From 3559ee427a52837baefcdb9b83cd3b97f8eb3324 Mon Sep 17 00:00:00 2001 From: Sergio Oliveira Date: Mon, 5 Dec 2022 12:16:22 +0100 Subject: [PATCH] Split psl-linter from original repo --- .github/ISSUE_TEMPLATE/bug_report.md | 4 +- .github/workflows/build_test.yml | 26 + .github/workflows/build_test_vscode.yml | 28 - .github/workflows/publish_vscode.yml | 48 - .gitignore | 19 +- .npmignore | 12 + src/pslLint/cli/.npmrc.psl-lint => .npmrc | 0 .travis.yml | 61 - .vscode/launch.json | 84 - .vscode/settings.json | 9 +- .vscode/tasks.json | 36 - .vscodeignore | 16 - README.md | 202 +- __tests__/parser-test.ts | 737 --- __tests__/statementParser-test.ts | 874 --- __tests__/tokenize-test.ts | 171 - __tests__/utilities-test.ts | 236 - icons/dark/arrow-down.svg | 73 - icons/dark/arrow-up.svg | 73 - icons/dark/gear.svg | 73 - icons/dark/link.svg | 73 - icons/dark/sync.svg | 73 - icons/dark/triangle-right.svg | 69 - icons/light/arrow-down.svg | 12 - icons/light/arrow-up.svg | 12 - icons/light/gear.svg | 12 - icons/light/link.svg | 12 - icons/light/sync.svg | 12 - icons/light/triangle-right.svg | 68 - jest.config.js | 12 + languages/def-language-configuration.json | 18 - languages/psl-language-configuration.json | 25 - package-lock.json | 5542 +++++------------ package.json | 891 +-- schemas/environmentSchema.json | 17 - schemas/environmentsSchema.json | 65 - snippets/columnDefinition.json | 25 - snippets/psl.json | 89 - snippets/tableDefinition.json | 26 - src/{pslLint => }/activate.ts | 20 +- src/{pslLint => }/api.ts | 22 +- src/{pslLint/cli => }/cli.ts | 8 +- src/common/context.ts | 38 - src/common/diagnostics.ts | 55 - src/common/environment.ts | 347 -- src/common/statusUtils.ts | 13 - src/common/terminal.ts | 111 - src/{pslLint => }/config.ts | 0 .../elementsConventionChecker.ts | 2 +- src/extension.ts | 31 - src/hostCommands/activate.ts | 78 - src/hostCommands/compileAndLink.ts | 64 - src/hostCommands/get.ts | 306 - src/hostCommands/hostCommandUtils.ts | 154 - src/hostCommands/pslUnitTest.ts | 228 - src/hostCommands/refresh.ts | 122 - src/hostCommands/run.ts | 67 - src/hostCommands/runCustom.ts | 150 - src/hostCommands/send.ts | 117 - src/hostCommands/testCompile.ts | 209 - src/language/activate.ts | 117 - src/language/codeAction.ts | 100 - src/language/codeQuality.ts | 153 - src/language/dataItem.ts | 76 - src/language/lang.ts | 116 - src/language/mumps.ts | 54 - src/language/previewDocumentation.ts | 71 - src/language/pslDefinitionProvider.ts | 37 - src/language/pslDocument.ts | 61 - src/language/pslFormat.ts | 79 - src/language/pslHoverProvider.ts | 40 - src/language/pslSignature.ts | 67 - src/language/pslSuggest.ts | 62 - src/{pslLint => }/methodDoc.ts | 10 +- src/mtm/hostSocket.ts | 58 - src/mtm/mtm.ts | 358 -- src/mtm/utils.ts | 346 - src/{pslLint => }/multiLineDeclare.ts | 5 +- src/{pslLint => }/parameters.ts | 2 +- src/parser/.npmignore | 6 - src/parser/.npmrc.psl-parser | 4 - src/parser/README.md | 15 - src/parser/config.ts | 96 - src/parser/index.ts | 9 - src/parser/package.json | 22 - src/parser/parser.ts | 841 --- src/parser/statementParser.ts | 757 --- src/parser/tokenizer.ts | 557 -- src/parser/tsconfig.json | 20 - src/parser/utilities.ts | 422 -- src/pslLint/cli/.npmignore | 6 - src/pslLint/cli/README.md | 36 - src/pslLint/cli/package-lock.json | 162 - src/pslLint/cli/package.json | 24 - src/pslLint/cli/tsconfig.json | 20 - src/{pslLint => }/runtime.ts | 28 +- src/{pslLint => }/tblcolDoc.ts | 6 +- src/{pslLint => }/todos.ts | 12 +- syntaxes/JSON.tmLanguage | 386 -- syntaxes/psl.tmLanguage.json | 530 -- .../config-test.ts => test/config.test.ts | 2 +- .../convention.test.ts | 4 +- .../duplicateProperty.test.ts | 4 +- {__tests__ => test}/files/ZChild.PROC | 0 .../files/ZDuplicateProperty.PROC | 0 {__tests__ => test}/files/ZMethodDoc.PROC | 0 .../files/ZMultiLineDeclare.PROC | 0 {__tests__ => test}/files/ZParent.PROC | 0 {__tests__ => test}/files/ZRuntime.PROC | 0 .../files/ZTblColDocTst-Col1.COL | 0 .../files/ZTblColDocTst-Col2.COL | 0 .../files/ZTblColDocTst-Col3.COL | 0 .../files/ZTblColDocTst-Col4.COL | 0 .../files/ZTblColDocTst-Col5.COL | 0 .../files/ZTblColDocTst-Col6.COL | 0 {__tests__ => test}/files/ZTblColDocTst1.TBL | 0 {__tests__ => test}/files/ZTblColDocTst2.TBL | 0 {__tests__ => test}/files/ZTblColDocTst3.TBL | 0 {__tests__ => test}/files/ZTblColDocTst4.TBL | 0 {__tests__ => test}/files/ZTblColDocTst5.TBL | 0 {__tests__ => test}/files/ZTblColDocTst6.TBL | 0 .../files/ZTestConvention.PROC | 0 {__tests__ => test}/files/ZTestParams.PROC | 0 .../methodDoc.test.ts | 4 +- .../multiLineDeclare.test.ts | 4 +- .../parameters.test.ts | 4 +- {__tests__ => test}/ruleUtils.ts | 10 +- .../runtime-test.ts => test/runtime.test.ts | 4 +- .../tblcolDoc.test.ts | 4 +- tsconfig.json | 20 +- 130 files changed, 1797 insertions(+), 16011 deletions(-) create mode 100644 .github/workflows/build_test.yml delete mode 100644 .github/workflows/build_test_vscode.yml delete mode 100644 .github/workflows/publish_vscode.yml create mode 100644 .npmignore rename src/pslLint/cli/.npmrc.psl-lint => .npmrc (100%) delete mode 100644 .travis.yml delete mode 100644 .vscode/launch.json delete mode 100644 .vscode/tasks.json delete mode 100644 .vscodeignore delete mode 100644 __tests__/parser-test.ts delete mode 100644 __tests__/statementParser-test.ts delete mode 100644 __tests__/tokenize-test.ts delete mode 100644 __tests__/utilities-test.ts delete mode 100644 icons/dark/arrow-down.svg delete mode 100644 icons/dark/arrow-up.svg delete mode 100644 icons/dark/gear.svg delete mode 100644 icons/dark/link.svg delete mode 100644 icons/dark/sync.svg delete mode 100644 icons/dark/triangle-right.svg delete mode 100644 icons/light/arrow-down.svg delete mode 100644 icons/light/arrow-up.svg delete mode 100644 icons/light/gear.svg delete mode 100644 icons/light/link.svg delete mode 100644 icons/light/sync.svg delete mode 100644 icons/light/triangle-right.svg create mode 100644 jest.config.js delete mode 100644 languages/def-language-configuration.json delete mode 100644 languages/psl-language-configuration.json delete mode 100644 schemas/environmentSchema.json delete mode 100644 schemas/environmentsSchema.json delete mode 100644 snippets/columnDefinition.json delete mode 100644 snippets/psl.json delete mode 100644 snippets/tableDefinition.json rename src/{pslLint => }/activate.ts (90%) rename src/{pslLint => }/api.ts (91%) rename src/{pslLint/cli => }/cli.ts (97%) delete mode 100644 src/common/context.ts delete mode 100644 src/common/diagnostics.ts delete mode 100644 src/common/environment.ts delete mode 100644 src/common/statusUtils.ts delete mode 100644 src/common/terminal.ts rename src/{pslLint => }/config.ts (100%) rename src/{pslLint => }/elementsConventionChecker.ts (98%) delete mode 100644 src/extension.ts delete mode 100644 src/hostCommands/activate.ts delete mode 100644 src/hostCommands/compileAndLink.ts delete mode 100644 src/hostCommands/get.ts delete mode 100644 src/hostCommands/hostCommandUtils.ts delete mode 100644 src/hostCommands/pslUnitTest.ts delete mode 100644 src/hostCommands/refresh.ts delete mode 100644 src/hostCommands/run.ts delete mode 100644 src/hostCommands/runCustom.ts delete mode 100644 src/hostCommands/send.ts delete mode 100644 src/hostCommands/testCompile.ts delete mode 100644 src/language/activate.ts delete mode 100644 src/language/codeAction.ts delete mode 100644 src/language/codeQuality.ts delete mode 100644 src/language/dataItem.ts delete mode 100644 src/language/lang.ts delete mode 100644 src/language/mumps.ts delete mode 100644 src/language/previewDocumentation.ts delete mode 100644 src/language/pslDefinitionProvider.ts delete mode 100644 src/language/pslDocument.ts delete mode 100644 src/language/pslFormat.ts delete mode 100644 src/language/pslHoverProvider.ts delete mode 100644 src/language/pslSignature.ts delete mode 100644 src/language/pslSuggest.ts rename src/{pslLint => }/methodDoc.ts (86%) delete mode 100644 src/mtm/hostSocket.ts delete mode 100644 src/mtm/mtm.ts delete mode 100644 src/mtm/utils.ts rename src/{pslLint => }/multiLineDeclare.ts (93%) rename src/{pslLint => }/parameters.ts (96%) delete mode 100644 src/parser/.npmignore delete mode 100644 src/parser/.npmrc.psl-parser delete mode 100644 src/parser/README.md delete mode 100644 src/parser/config.ts delete mode 100644 src/parser/index.ts delete mode 100644 src/parser/package.json delete mode 100644 src/parser/parser.ts delete mode 100644 src/parser/statementParser.ts delete mode 100644 src/parser/tokenizer.ts delete mode 100644 src/parser/tsconfig.json delete mode 100644 src/parser/utilities.ts delete mode 100644 src/pslLint/cli/.npmignore delete mode 100644 src/pslLint/cli/README.md delete mode 100644 src/pslLint/cli/package-lock.json delete mode 100644 src/pslLint/cli/package.json delete mode 100644 src/pslLint/cli/tsconfig.json rename src/{pslLint => }/runtime.ts (85%) rename src/{pslLint => }/tblcolDoc.ts (86%) rename src/{pslLint => }/todos.ts (83%) delete mode 100644 syntaxes/JSON.tmLanguage delete mode 100644 syntaxes/psl.tmLanguage.json rename __tests__/config-test.ts => test/config.test.ts (91%) rename __tests__/convention-test.ts => test/convention.test.ts (96%) rename __tests__/duplicateProperty-test.ts => test/duplicateProperty.test.ts (96%) rename {__tests__ => test}/files/ZChild.PROC (100%) rename {__tests__ => test}/files/ZDuplicateProperty.PROC (100%) rename {__tests__ => test}/files/ZMethodDoc.PROC (100%) rename {__tests__ => test}/files/ZMultiLineDeclare.PROC (100%) rename {__tests__ => test}/files/ZParent.PROC (100%) rename {__tests__ => test}/files/ZRuntime.PROC (100%) rename {__tests__ => test}/files/ZTblColDocTst-Col1.COL (100%) rename {__tests__ => test}/files/ZTblColDocTst-Col2.COL (100%) rename {__tests__ => test}/files/ZTblColDocTst-Col3.COL (100%) rename {__tests__ => test}/files/ZTblColDocTst-Col4.COL (100%) rename {__tests__ => test}/files/ZTblColDocTst-Col5.COL (100%) rename {__tests__ => test}/files/ZTblColDocTst-Col6.COL (100%) rename {__tests__ => test}/files/ZTblColDocTst1.TBL (100%) rename {__tests__ => test}/files/ZTblColDocTst2.TBL (100%) rename {__tests__ => test}/files/ZTblColDocTst3.TBL (100%) rename {__tests__ => test}/files/ZTblColDocTst4.TBL (100%) rename {__tests__ => test}/files/ZTblColDocTst5.TBL (100%) rename {__tests__ => test}/files/ZTblColDocTst6.TBL (100%) rename {__tests__ => test}/files/ZTestConvention.PROC (100%) rename {__tests__ => test}/files/ZTestParams.PROC (100%) rename __tests__/methodDoc-test.ts => test/methodDoc.test.ts (97%) rename __tests__/multiLineDeclare-test.ts => test/multiLineDeclare.test.ts (98%) rename __tests__/parameters-test.ts => test/parameters.test.ts (91%) rename {__tests__ => test}/ruleUtils.ts (82%) rename __tests__/runtime-test.ts => test/runtime.test.ts (96%) rename __tests__/tblcolDoc-test.ts => test/tblcolDoc.test.ts (97%) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 624bca8..12c931b 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -25,8 +25,8 @@ If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - OS: [e.g. iOS] - - vscode version: [e.g. 1.72.2] - - vscode-psl version[e.g. 1.12.1] + - psl-linter version: [e.g. 1.72.2] + - node version[e.g. 1.12.1] **Additional context** Add any other context about the problem here. diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml new file mode 100644 index 0000000..b19df72 --- /dev/null +++ b/.github/workflows/build_test.yml @@ -0,0 +1,26 @@ +# This workflow will do a clean installation of node dependencies, +# cache/restore them, build the source code and run tests. + +name: Build and Test CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + name: Build and test + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: '16.x' + cache: 'npm' + - run: npm install + - run: npm run build + - run: npm run test diff --git a/.github/workflows/build_test_vscode.yml b/.github/workflows/build_test_vscode.yml deleted file mode 100644 index 863d53a..0000000 --- a/.github/workflows/build_test_vscode.yml +++ /dev/null @@ -1,28 +0,0 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests. - -name: Build and Test CI - -on: - push: - branches: [ "develop" ] - pull_request: - branches: [ "develop" ] - -jobs: - build: - name: Build and test - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js - uses: actions/setup-node@v3 - with: - node-version: '16.x' - cache: 'npm' - - run: npm install - - run: cd src/pslLint/cli && npm install && cd - - name: Install psl-lint CLI dependencies - - run: npm run compile - - run: npm run compile-lint - - run: npm test diff --git a/.github/workflows/publish_vscode.yml b/.github/workflows/publish_vscode.yml deleted file mode 100644 index 8e20e47..0000000 --- a/.github/workflows/publish_vscode.yml +++ /dev/null @@ -1,48 +0,0 @@ -# This workflow will build and publish the plugin on tag create - -name: Publish vscode-psl - -on: - push: - tags: 'vscode*' - -jobs: - test: - name: Build and test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Use Node.js - uses: actions/setup-node@v3 - with: - node-version: '16.x' - cache: 'npm' - - run: npm install - - run: cd src/pslLint/cli && npm install && cd - - name: Install psl-lint CLI dependencies - - run: npm run compile - - run: npm run compile-lint - - run: npm test - - publish: - needs: test - name: Publish vscode-psl - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Use Node.js - uses: actions/setup-node@v3 - with: - node-version: '16.x' - cache: 'npm' - - run: npm install . - - env: - VSCODE_TOKEN: ${{ secrets.VSCODE_TOKEN_PUBLISH }} - if: ${{ contains(github.ref, '-rc') }} - run: npm run compile && npm i -g vsce && vsce package --pre-release && vsce publish --pre-release -p $VSCODE_TOKEN - name: Publish Pre-Release - - env: - VSCODE_TOKEN: ${{ secrets.VSCODE_TOKEN_PUBLISH }} - run: npm run compile && npm i -g vsce && vsce package && vsce publish -p $VSCODE_TOKEN - if: ${{ ! contains(github.ref, '-rc') }} - name: Publish Release diff --git a/.gitignore b/.gitignore index 848d265..fdcd296 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,9 @@ -*.jrnl -*.log -out -node_modules -*.vsix -.project -.settings -src/hostif/target/* -.classpath -src/pslLint/cli/lib/* \ No newline at end of file +# Dependency directory +node_modules/ + +# Editors +.idea/ + +# Project build +lib/ +*.tgz diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..b83754b --- /dev/null +++ b/.npmignore @@ -0,0 +1,12 @@ +# Exclude all files +* + +# Add lib/ +!lib/** +# Exclude .map in lib/ +*.map + +# Add documentation +!LICENSE +!CHANGELOG.md +!README.md diff --git a/src/pslLint/cli/.npmrc.psl-lint b/.npmrc similarity index 100% rename from src/pslLint/cli/.npmrc.psl-lint rename to .npmrc diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 35e2e8e..0000000 --- a/.travis.yml +++ /dev/null @@ -1,61 +0,0 @@ -sudo: false -dist: trusty -language: node_js -node_js: - - "10" - -stages: - - build - - name: deploy parser - if: tag =~ ^parser - - name: deploy lint - if: tag =~ ^lint - - name: deploy vscode - if: tag =~ ^vscode - -jobs: - include: - - stage: build - script: - - npm run compile - - npm run compile-lint - name: compile - - script: - - npm run lint - name: lint - - script: - - npm run test - name: test - - - stage: deploy parser - script: cp ./src/parser/.npmrc.psl-parser .npmrc && npm run compile-parser - deploy: - provider: script - script: npm publish ./src/parser - skip_cleanup: true - on: - tags: true - all_branches: true - name: npm - - - stage: deploy lint - script: cp ./src/pslLint/cli/.npmrc.psl-lint .npmrc && npm run compile-lint - deploy: - provider: script - script: npm publish ./src/pslLint/cli - skip_cleanup: true - on: - tags: true - all_branches: true - name: npm - - - stage: deploy vscode - script: npm run compile && npm i -g vsce && vsce package - deploy: - provider: script - script: vsce publish -p $VSCODE_TOKEN - skip_cleanup: true - on: - tags: true - all_branches: true - name: marketplace diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 08b85f7..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,84 +0,0 @@ -// A launch configuration that compiles the extension and then opens it inside a new window -{ - "version": "0.2.0", - "configurations": [ - { - "type": "node", - "request": "attach", - "name": "Attach by Process ID", - "processId": "${command:PickProcess}" - }, - { - "name": "Attach to docker", - "type": "node", - "request": "attach", - "port": 5858, - "address": "localhost", - "sourceMaps": true, - "outFiles": [], - "localRoot": "${workspaceRoot}/src/pslLint/cli", - "remoteRoot": "/app" - }, - { - "name": "Launch Extension", - "type": "extensionHost", - "request": "launch", - "runtimeExecutable": "${execPath}", - "args": [ - "--extensionDevelopmentPath=${workspaceRoot}" - ], - "stopOnEntry": false, - "sourceMaps": true, - "outFiles": [ - "${workspaceRoot}/out/src/**/*.js" - ], - "preLaunchTask": "watch" - }, - { - "name": "Debug CLI", - "type": "node", - "request": "launch", - "program": "${workspaceRoot}/src/pslLint/cli/lib/pslLint/cli/cli.js", - "args": [ - "." - ], - "stopOnEntry": false, - "sourceMaps": true, - "outFiles": [ - "${workspaceRoot}/src/pslLint/cli/lib/**/*.js" - ], - "preLaunchTask": "watch" - }, - { - "type": "node", - "request": "launch", - "name": "Debug Tests", - "program": "${workspaceRoot}/node_modules/jest/bin/jest.js", - "args": [ - "--runInBand" - ], - "internalConsoleOptions": "openOnSessionStart", - "outFiles": [ - "${workspaceRoot}/out/**/*" - ], - "preLaunchTask": "watch" - }, - { - "name": "Launch Tests", - "type": "extensionHost", - "request": "launch", - "runtimeExecutable": "${execPath}", - "args": [ - "${workspaceRoot}/test/dataqwik/procedure/test.PROC", - "--extensionDevelopmentPath=${workspaceRoot}", - "--extensionTestsPath=${workspaceRoot}/out/test" - ], - "stopOnEntry": false, - "sourceMaps": true, - "outFiles": [ - "${workspaceRoot}/out/test/**/*.js" - ], - "preLaunchTask": "watch" - } - ] -} diff --git a/.vscode/settings.json b/.vscode/settings.json index 7351568..4ed3209 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,10 +1,9 @@ -// Place your settings in this file to overwrite default and user settings. { "files.exclude": { - "out": false // set this to true to hide the "out" folder with the compiled JS files + "lib": false }, "search.exclude": { - "out": true // set this to false to include "out" folder in search results + "lib": true }, - "editor.rulers": [120] // Recommended typescript ruler -} \ No newline at end of file + "editor.rulers": [120] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index a124082..0000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "version": "2.0.0", - "tasks": [ - { - "label": "watch", - "command": "npm run watch --loglevel silent", - "type": "shell", - "group": { - "kind": "build", - "isDefault": true - }, - "isBackground": true, - "problemMatcher": "$tsc-watch", - "presentation": { - "reveal": "never", - "focus": false, - "panel": "shared" - } - }, - { - "label": "test", - "command": "npm run test -- --watch", - "type": "shell", - "group": { - "kind": "test", - "isDefault": true - }, - "isBackground": false, - "presentation": { - "focus": false, - "panel": "new" - }, - "problemMatcher": [] - } - ] -} \ No newline at end of file diff --git a/.vscodeignore b/.vscodeignore deleted file mode 100644 index 5c3d81b..0000000 --- a/.vscodeignore +++ /dev/null @@ -1,16 +0,0 @@ -.vscode/** -.vscode-test/** -out/test/** -test/** -src/** -**/*.map -.gitignore -tsconfig.json -vsc-extension-quickstart.md -*.html -*.vsix -*.pyc -!src/python/** -python_scripts/** -images/** -package-lock.json diff --git a/README.md b/README.md index c0736f7..7c20733 100644 --- a/README.md +++ b/README.md @@ -1,166 +1,36 @@ -# vscode-psl - - -[![Build and Test CI](https://github.com/ing-bank/vscode-psl/actions/workflows/build_test_vscode.yml/badge.svg)](https://github.com/ing-bank/vscode-psl/actions/workflows/build_test_vscode.yml) - -Profile Scripting Language functionality for Visual Studio Code. - -## Dependencies - -* Visual Studio Code version 1.72.2 or higher. - -## Environment Configuration - -Locate the button at the bottom-right corner titled `Configure Environments`. If the button is not visible, use the Command Palette (F1 or Ctrl+Shift+P) to find the `PSL: Configure Environment` command. A JSON object of the following form will appear: - -```json -{ - "environments": [ - { - "name": "", - "host": "", - "port": 0, - "user": "", - "password": "", - "sshLogin": "", - "serverType": "SCA$IBS", - "encoding": "utf8" - } - ] -} -``` - -> Added in v1.8.0 are the fields `serverType` and `encoding`. Their default values are "SCA$IBS" and "utf8", respectively. - -Here you can store a global array of configurations. Any project can read from this configuration. Use auto-complete and hover suggestions for hints about using the configuration file. - -Once the global configuration is saved, environments can be activated by using the `Configure Environments` button at the bottom. Multiple environments can be selected, allowing for simultaneous interactions with hosts. - -## Host Communication - -Commands to communicate with the Host via MRPC121 can be executed via the Command Pallette (F1 or Ctrl+Shift+P), icons at the top-right corner of the document, right-clicking the document, or right-clicking the file in the Explorer sidebar. - -* `Compile and Link`: Compiles and links PSL or tables -* `Get Element from Host`: Gets a new element -* `Refresh from Host`: Refreshes an existing element -* `Run PSL`: Runs a PSL element "as is" and displays the output -* `Send to Host`: Sends an existing element -* `Table Get from Host`: Gets all elements related to a table -* `Table Refresh from Host`: Fetches all elements related to an existing table element -* `Table Send to Host`: Sends all existing elements related to the table -* `Test Compile`: Test compiles PSL - -> Please note that the Host Communication is done *asynchronously*, meaning that vscode will not require you to wait to finish one action before you start another. This may have unintended consequences if you do not wait. For example, you must wait for sending to finish before you compile and link. - -### Getting New Elements - -Two commands `Get Element from Host` and `Table Get from Host` will allow you to get new elements from the Host. When activating the commands from the editor, the element(s) will try to be placed according to this table: - -|Type | Directory | -|---|---| -BATCH | `dataqwik/batch/` | -DAT | `data/` | -FKY | `dataqwik/foreign_key/` | -IDX | `dataqwik/index/` | -JFD | `dataqwik/journal/` | -m | `routine/` | -PROC | `dataqwik/procedure/` | -properties | `property/` | -QRY | `dataqwik/query/` | -RPT | `dataqwik/report/` | -SCR | `dataqwik/screen/` | -table files (TBL and COL) | `dataqwik/table/{table_name}/` | -TRIG | `dataqwik/trigger/` | - -If an element is not in the table, a prompt will ask where it should be saved. - -In the case of `Table Get from Host`, the TBL and COL files will all be retrieved and placed in the `dataqwik/table/{table_name}/` directory. To get an individual TBL or COL file, use the regular `Get Element from Host` command. - -These two commands behave differently when they are used in the Explorer sidebar, specifically on a directory. In this case, both "Get" commands will place the new element(s) inside the targeted directory. - -### Acting on Tables - -When editing a TBL or COL, the commands `Table Refresh from Host` and `Table Send to Host` are present. - -The "Send" command will act on all existing elements of that table in the project at once, while the "Refresh" command will fetch all elements related to the table from the Host, even elements not present in the project. - -`Compile and Link` is also available, allowing you to "Rebuild Data Item Control Files". - -### Acting on Directories - -The five commands `Compile and Link`, `Refresh from Host`, `Run PSL`, `Send to Host`, and `Test Compile` can all be executed on directories from the Explorer sidebar. In this case a dialogue box will open, allowing you to act on multiple elements within the directory at once. - -## Language Features - -Basic language features also exist for files written in PSL, data configuration, and table files. - -These features include: - -* Syntax coloring -* Property and Label outline for PSL files (access by Ctrl+Shift+O or by enabling the built-in outline). -* Code Completion, Hovers, and Go-To Definitions. -* Highlighting and Hover information for editing data configuration files -* Code snippets for loops, comments, and table/column definitions, etc. - -## psl-lint - -This extension includes support for checking PSL against common coding standards. The setting `psl.lint` is by default set to `config`, meaning the linting module will activate upon finding a `psl-lint.json` configuration file. Here is a sample: - -``` -{ - "version": 1, - "include": { - "Z*": ["*"], - "*": ["TodoInfo"] - }, - "exclude": { - "ZRPC*.PROC": ["MemberCamelCase"] - } -} -``` - -Within `include` and `exclude` are mappings from filename patterns to Rules. These are glob-style patterns ("Z*" will match all files that start with Z). The Rules are written in an array, and must be explicitly stated. The only exception is "*", which matches all Rules. - -[For more information about which Rules are available, and how the linting can be used as a tool outside of vscode, visit the package at npm](https://www.npmjs.com/package/psl-lint). - -## Debugging GT.M - -The extension can be configured to help you debug in the Integrated Terminal with the following actions: - -* Step In (Ctrl+Q): `ZSTEP INTO:"W $ZPOS ZP @$ZPOS B"` -* Step Over (Ctrl+W): `ZSTEP OVER:"W $ZPOS ZP @$ZPOS B"` -* Step Out (Ctrl+E): `ZSTEP OUTOF:"W $ZPOS ZP @$ZPOS B"` - -By toggling the status bar item "GT.M Debug", the extension can send the text to your active Integrated Terminal. The default values are presented above, but can be customized to your liking. - -The setting `psl.gtmDebugEnabled` can be set to `true` to keep "GT.M Debug" on by default. - -You may even define custom sequences using the `psl.sendToHostTerminal` command. `key` and `args` are completely configurable. You can add as many of these configurations as you would like to your `keybindings.json`: - -``` -{ - "key": "ctrl+1", - "args": "d ^DRV\n1\nxxx", - "command": "psl.sendToHostTerminal", - "when": "terminalFocus && psl.gtmDebug" -} -``` - -The `psl.gtmDebug` context value guarantees the shortcuts are only enabled when "GT.M Debug" is toggled on. This can be omitted for "always on" shortcuts. - -## Available Settings - -* `psl.lint`: Whether to lint files written in PSL. The default value is `config`, which means linting only activates when the `psl-lint.json` config file is present. [Read more here](#psl-lint). -* `psl.previewFeatures`: Set true to enable the latest developing features. Default value is false. -* `psl.gtmDebug`: Set true to keep GT.M Debug on by default. -* `psl.trailingNewline`: Adds a trailing newline after a "Get" or "Refresh". The default behavior is to not change the output. - -## Development - -If you would like to join the development of this extension, you will need to install [node.js](https://nodejs.org/en/) (with npm) in order to install the dependencies. - -Once you clone the project, from the command line in the root of this project, run `npm install`. - -For ideas on features to implement, visit the below link: - -https://code.visualstudio.com/docs/extensions/language-support +# psl-lint + +A linter or lint refers to tools that analyze source code to flag programming errors, bugs, stylistic errors, and suspicious constructs. + +This module works by adding rules that are automatically checked at the appropriate time. + +## Current Rules + +* MemberCamelCase +* MemberLength +* MemberLiteralCase +* MemberStartsWithV +* MethodDocumentation +* MethodParametersOnNewLine +* MethodSeparator +* MultiLineDeclare +* PropertyIsDummy +* PropertyIsDuplicate +* RuntimeStart +* TblColDocumentation +* TodoInfo +* TwoEmptyLines + + +## Contributing + +To add a rule, create a class implementing one of the rule interfaces. Then, add an instance of your class to the `addRules` method found in the `activate.ts` module. + +Rules will have a parsed document at their disposal. Auto-complete can guide you to using the parsed document effectively. Use the `todo.ts` and `parameters.ts` modules as examples. + +Tests can be found in the `__tests__` directory at the root of the vscode-psl project. Use `parameters.test.ts` as an example. + +## TODO + +* More tests +* Build/Deploy/Integrate diff --git a/__tests__/parser-test.ts b/__tests__/parser-test.ts deleted file mode 100644 index fff3924..0000000 --- a/__tests__/parser-test.ts +++ /dev/null @@ -1,737 +0,0 @@ -import * as parser from '../src/parser/parser'; -import * as tokenizer from '../src/parser/tokenizer'; - -function getMethod(methodString: string): parser.Method | undefined { - const d = parser.parseText(methodString); - return d.methods[0]; -} -function getParsedDoc(documentString: string): parser.ParsedDocument { - return parser.parseText(documentString); -} - -function toValues(tokens: tokenizer.Token[]): string[] { - return tokens.map(t => t.value); -} - -function argsToValues(args: parser.Parameter[]): string[][] { - return args.map(a => a.types).map(ts => toValues(ts)); -} - -function argsToNames(args: parser.Parameter[]): string[] { - return toValues(args.map(a => a.id)); -} - -describe('Batch label', () => { - const batchText = `---------- OPEN ------ Section marker - - type public Boolean ER - type public Number BRCD - type public String ET, RM - - do SOURCE^BCHSOURC("BOFF", "ACCUPD", .%UserID, .BRCD, .%UserClass) - - // ~p1 source not set up - if ER set RM = $$^MSG(1184,"BOFF-ACCUPD"), %BatchExit = 1 do EXC quit`; - - const d = getParsedDoc(batchText); - expect(d.methods).toHaveLength(1); -}); - -describe('Method Identifiers', () => { - test('inline label statement symbol', () => { - const methodString = 'label do something^SOMETHING'; - const result = getMethod(methodString); - if (!result) { - fail(); - return; - } - // let identifierValues = toValues(result.modifiers) - expect(result.id.value).toEqual('label'); - }); - test('inline label statement keyword', () => { - const methodString = 'label do something()'; - const result = getMethod(methodString); - if (!result) { - fail(); - return; - } - // let identifierValues = toValues(result.modifiers) - expect(result.id.value).toEqual('label'); - }); - test('1 argument', () => { - const methodString = 'public static void main(String args)'; - const result = getMethod(methodString); - if (!result) { - fail(); - return; - } - const identifierValues = toValues(result.modifiers); - expect(identifierValues).toEqual(['public', 'static']); - }); - - test('2 arguments', () => { - const methodString = 'public static void main(String arg1, String arg2)'; - const result = getMethod(methodString); - if (!result) { - fail(); - return; - } - const identifierValues = toValues(result.modifiers); - expect(identifierValues).toEqual(['public', 'static']); - }); - - test('Label', () => { - const methodString = 'main'; - const result = getMethod(methodString); - if (!result) { - fail(); - return; - } - // let identifierValues = toValues(result.modifiers) - expect(result.id.value).toEqual('main'); - }); - - test('Label from document', () => { - const methodString = 'main\r\n'; - const result = getParsedDoc(methodString); - if (!result) { - fail(); - return; - } - expect(result.methods[0].id.value).toEqual('main'); - }); - - test('Label with line comment', () => { - const methodString = 'main // a comment'; - const result = getMethod(methodString); - if (!result) { - fail(); - return; - } - toValues(result.modifiers); - expect(result.id.value).toEqual('main'); - }); - - test('Label with parens', () => { - const methodString = 'main()'; - const result = getMethod(methodString); - if (!result) { - fail(); - return; - } - toValues(result.modifiers); - expect(result.id.value).toEqual('main'); - }); - - test('Label with 1 argument', () => { - const methodString = 'main(String x1)'; - const result = getMethod(methodString); - if (!result) { - fail(); - return; - } - toValues(result.modifiers); - expect(result.id.value).toEqual('main'); - }); - - test('Label with 2 arguments', () => { - const methodString = 'main(String x1, String x2)'; - const result = getMethod(methodString); - if (!result) { - fail(); - return; - } - toValues(result.modifiers); - expect(result.id.value).toEqual('main'); - }); - - test('Label with 2 arguments multiline', () => { - const methodString = 'main(String x1\n\t, String x2)'; - const result = getMethod(methodString); - if (!result) { - fail(); - return; - } - toValues(result.modifiers); - expect(result.id.value).toEqual('main'); - }); - - test('percent', () => { - const methodString = 'public %main()'; - const method = getMethod(methodString); - expect(method.id.value).toEqual('%main'); - }); -}); - -describe('Argument Names', () => { - - test('1 argument', () => { - const methodString = 'public static void main(String x1)'; - const result = getMethod(methodString); - if (!result) { - fail(); - return; - } - const argNameValues = argsToNames(result.parameters); - expect(argNameValues).toEqual(['x1']); - }); - - test('2 arguments', () => { - const methodString = 'public static void main(String x1, String x2)'; - const result = getMethod(methodString); - if (!result) { - fail(); - return; - } - const argNameValues = argsToNames(result.parameters); - expect(argNameValues).toEqual(['x1', 'x2']); - }); - - test('1 argument multiline', () => { - const methodString = 'public static void main(\n\tString x1)'; - const result = getMethod(methodString); - if (!result) { - fail(); - return; - } - const argNameValues = argsToNames(result.parameters); - expect(argNameValues).toEqual(['x1']); - }); - - test('2 argument multiline', () => { - const methodString = 'public static void main(String x1,\n\tString x2)'; - const result = getMethod(methodString); - if (!result) { - fail(); - return; - } - const argNameValues = argsToNames(result.parameters); - expect(argNameValues).toEqual(['x1', 'x2']); - }); - - test('1 argument multitype', () => { - const methodString = 'public static void main(void x1(Integer, Record))'; - const result = getMethod(methodString); - if (!result) { - fail(); - return; - } - const argNameValues = argsToNames(result.parameters); - expect(argNameValues).toEqual(['x1']); - }); - - test('2 argument multitype', () => { - const methodString = 'public static void main(void x1(Integer, Record), void x2(void, String))'; - const result = getMethod(methodString); - if (!result) { - fail(); - return; - } - const argNameValues = argsToNames(result.parameters); - expect(argNameValues).toEqual(['x1', 'x2']); - }); - - test('2 argument multitype', () => { - const methodString = 'public static void main(void x1(Integer, Record)\n\t, void x2(void, String))'; - const result = getMethod(methodString); - if (!result) { - fail(); - return; - } - const argNameValues = argsToNames(result.parameters); - expect(argNameValues).toEqual(['x1', 'x2']); - }); - - test('test label with parens 1 arg', () => { - const methodString = 'main(String x1)'; - const result = getMethod(methodString); - if (!result) { - fail(); - return; - } - const argNameValues = argsToNames(result.parameters); - expect(argNameValues).toEqual(['x1']); - }); - - test('Label no args', () => { - const methodString = 'main'; - const result = getMethod(methodString); - if (!result) { - fail(); - return; - } - const args = result.parameters; - expect(args).toHaveLength(0); - }); - - test('Label with parens no args', () => { - const methodString = 'main()'; - const result = getMethod(methodString); - if (!result) { - fail(); - return; - } - const args = result.parameters; - expect(args).toHaveLength(0); - }); - - test('Label with multiline parens no args', () => { - const methodString = 'main(\n\t)'; - const result = getMethod(methodString); - if (!result) { - fail(); - return; - } - const args = result.parameters; - expect(args).toHaveLength(0); - }); -}); - -describe('Argument Types', () => { - test('1 argument', () => { - const methodString = 'public static void main(String x1)'; - const result = getMethod(methodString); - if (!result) { - fail(); - return; - } - const argValues = argsToValues(result.parameters); - expect(argValues).toEqual([['String']]); - }); - - test('1 argument multitype', () => { - const methodString = 'public static void main(String x1(Number))'; - const result = getMethod(methodString); - if (!result) { - fail(); - return; - } - const argValues = argsToValues(result.parameters); - expect(argValues).toEqual([['String', 'Number']]); - }); - - test('test 2 argument types newline', () => { - const methodString = 'public static void main(String x1 \n\t, Number x2)'; - const result = getMethod(methodString); - if (!result) { - fail(); - return; - } - const argValues = argsToValues(result.parameters); - expect(argValues).toEqual([['String'], ['Number']]); - }); - - test('test 1 argument 3 types newline', () => { - const methodString = 'public static void main(void x1(Integer, Record))'; - const result = getMethod(methodString); - if (!result) { - fail('Did not parse'); - return; - } - const argValues = argsToValues(result.parameters); - expect(argValues).toEqual([['void', 'Integer', 'Record']]); - }); - - test('test 2 argument 3 types newline', () => { - const methodString = 'public static void main(void x1(Integer, Record), void x2(void, String))'; - const result = getMethod(methodString); - if (!result) { - fail('Did not parse'); - return; - } - const argValues = argsToValues(result.parameters); - expect(argValues).toEqual([['void', 'Integer', 'Record'], ['void', 'void', 'String']]); - }); -}); - -describe('Propertydefs', () => { - test('empty propertydef', () => { - const propertyString = '\t#PROPERTYDEF'; - const doc = getParsedDoc(propertyString); - expect(doc.properties).toHaveLength(0); - }); - - test('one word propertydef', () => { - const propertyString = '\t#PROPERTYDEF test'; - const doc = getParsedDoc(propertyString); - expect(doc.properties).toHaveLength(1); - }); -}); - -test('parse document method count', () => { - const documentString = ` #PACKAGE custom.core - #CLASSDEF extends = Primitive public - - /*DOC ----------------------------------------------------------------- - Auto-generated by vscode-psl - ** ENDDOC */ - - - // -------------------------------------------------------------------- -public final Integer toInteger() - /*DOC ----------------------------------------------------------------- - convert Boolean to Integer - ** ENDDOC */ - do prim2prim^UCPRIM("Integer") - quit - - - // -------------------------------------------------------------------- -public final Number toNumber() - /*DOC ----------------------------------------------------------------- - convert Boolean to Number - ** ENDDOC */ - do prim2prim^UCPRIM("Number") - quit - - - // -------------------------------------------------------------------- -public final String toString(String vMask) - /*DOC ----------------------------------------------------------------- - convert Boolean to String - ** ENDDOC */ - do insMet^UCMETHOD("$$toString^PslNllBoolean(",1) - quit -`; - - const doc = getParsedDoc(documentString); - expect(doc.methods).toHaveLength(3); -}); - -test('parse extends', () => { - const documentString = ` #PACKAGE custom.core - #CLASSDEF extends = Primitive public - - /*DOC ----------------------------------------------------------------- - Auto-generated by vscode-psl - ** ENDDOC */ - - - // -------------------------------------------------------------------- -public final Integer toInteger() - /*DOC ----------------------------------------------------------------- - convert Boolean to Integer - ** ENDDOC */ - do prim2prim^UCPRIM("Integer") - quit -`; - - const doc = getParsedDoc(documentString); - expect(doc.extending.value).toBe('Primitive'); -}); - -test('parse psl package', () => { - const documentString = ` #PACKAGE custom.core - #CLASSDEF extends = Primitive public - - /*DOC ----------------------------------------------------------------- - Auto-generated by vscode-psl - ** ENDDOC */ - - - // -------------------------------------------------------------------- -public final Integer toInteger() - /*DOC ----------------------------------------------------------------- - convert Boolean to Integer - ** ENDDOC */ - do prim2prim^UCPRIM("Integer") - quit -`; - - const doc = getParsedDoc(documentString); - expect(doc.pslPackage).toBe('custom.core'); -}); - -test('parse numerical method', () => { - const documentString = ` #PACKAGE custom.core - #CLASSDEF extends = Primitive public - - /*DOC ----------------------------------------------------------------- - Auto-generated by vscode-psl - ** ENDDOC */ - - - // -------------------------------------------------------------------- -public final Integer 900() - /*DOC ----------------------------------------------------------------- - convert Boolean to Integer - ** ENDDOC */ - do prim2prim^UCPRIM("Integer") - quit -`; - - const doc = getParsedDoc(documentString); - expect(doc.methods[0].id.value).toBe('900'); -}); - -test('parse document method location', () => { - const documentString = ` #PACKAGE custom.core - #CLASSDEF extends = Primitive public - - /*DOC ----------------------------------------------------------------- - Auto-generated by vscode-psl - ** ENDDOC */ - - - // -------------------------------------------------------------------- -public final Integer toInteger() - /*DOC ----------------------------------------------------------------- - convert Boolean to Integer - ** ENDDOC */ - do prim2prim^UCPRIM("Integer") - quit - - - // -------------------------------------------------------------------- -public final Number toNumber() - /*DOC ----------------------------------------------------------------- - convert Boolean to Number - ** ENDDOC */ - do prim2prim^UCPRIM("Number") - quit - - - // -------------------------------------------------------------------- -public final String toString(String vMask) - /*DOC ----------------------------------------------------------------- - convert Boolean to String - ** ENDDOC */ - do insMet^UCMETHOD("$$toString^PslNllBoolean(",1) - quit -`; - - const doc = getParsedDoc(documentString); - expect(doc.methods.map(method => method.line)).toEqual([9, 18, 27]); -}); - -test('labels in document', () => { - const documentString = ` #PACKAGE custom.core - #CLASSDEF extends = Primitive public - - /*DOC ----------------------------------------------------------------- - Auto-generated by vscode-psl - ** ENDDOC */ - - - -toInteger - /*DOC ----------------------------------------------------------------- - convert Boolean to Integer - ** ENDDOC */ - do prim2prim^UCPRIM("Integer") - quit - - - // -------------------------------------------------------------------- -toNumber - /*DOC ----------------------------------------------------------------- - convert Boolean to Number - ** ENDDOC */ - do prim2prim^UCPRIM("Number") - quit - - - // -------------------------------------------------------------------- -toString - /*DOC ----------------------------------------------------------------- - convert Boolean to String - ** ENDDOC */ - do insMet^UCMETHOD("$$toString^PslNllBoolean(",1) - quit -`; - - const doc = getParsedDoc(documentString); - expect(doc.methods.map(method => method.id.value)).toEqual(['toInteger', 'toNumber', 'toString']); - expect(doc.methods.map(method => method.line)).toEqual([9, 18, 27]); -}); - -test('parse methods with propertydef', () => { - const documentString = ` #PACKAGE custom.core - #CLASSDEF extends = Primitive public - - /*DOC ----------------------------------------------------------------- - Auto-generated by vscode-psl - ** ENDDOC */ - - #PROPERTYDEF test class = String node = 1 public - - - // -------------------------------------------------------------------- -public final Integer toInteger() - /*DOC ----------------------------------------------------------------- - convert Boolean to Integer - ** ENDDOC */ - do prim2prim^UCPRIM("Integer") - quit - - - // -------------------------------------------------------------------- -public final Number toNumber() - /*DOC ----------------------------------------------------------------- - convert Boolean to Number - ** ENDDOC */ - do prim2prim^UCPRIM("Number") - quit - - - // -------------------------------------------------------------------- -public final String toString(String vMask) - /*DOC ----------------------------------------------------------------- - convert Boolean to String - ** ENDDOC */ - do insMet^UCMETHOD("$$toString^PslNllBoolean(",1) - quit -`; - - const doc = getParsedDoc(documentString); - expect(doc.methods).toHaveLength(3); -}); - -test('parse methods with propertydef count', () => { - const documentString = ` #PACKAGE custom.core - #CLASSDEF extends = Primitive public - - /*DOC ----------------------------------------------------------------- - Auto-generated by vscode-psl - ** ENDDOC */ - - #PROPERTYDEF test class = String node = 1 public - - - // -------------------------------------------------------------------- -public final Integer toInteger() - /*DOC ----------------------------------------------------------------- - convert Boolean to Integer - ** ENDDOC */ - do prim2prim^UCPRIM("Integer") - quit - - - // -------------------------------------------------------------------- -public final Number toNumber() - /*DOC ----------------------------------------------------------------- - convert Boolean to Number - ** ENDDOC */ - do prim2prim^UCPRIM("Number") - quit - - - // -------------------------------------------------------------------- -public final String toString(String vMask) - /*DOC ----------------------------------------------------------------- - convert Boolean to String - ** ENDDOC */ - do insMet^UCMETHOD("$$toString^PslNllBoolean(",1) - quit -`; - - const doc = getParsedDoc(documentString); - expect(doc.properties).toHaveLength(1); - -}); - -test('parse methods with propertydef count', () => { - const documentString = ` #PACKAGE custom.core - #CLASSDEF extends = Primitive public - - /*DOC ----------------------------------------------------------------- - Auto-generated by vscode-psl - ** ENDDOC */ - - #PROPERTYDEF test class = String node = 1 public - - - // -------------------------------------------------------------------- -public final Integer toInteger() - /*DOC ----------------------------------------------------------------- - convert Boolean to Integer - ** ENDDOC */ - do prim2prim^UCPRIM("Integer") - quit - - - // -------------------------------------------------------------------- -public final Number toNumber() - /*DOC ----------------------------------------------------------------- - convert Boolean to Number - ** ENDDOC */ - do prim2prim^UCPRIM("Number") - quit - - - // -------------------------------------------------------------------- -public final String toString(String vMask) - /*DOC ----------------------------------------------------------------- - convert Boolean to String - ** ENDDOC */ - do insMet^UCMETHOD("$$toString^PslNllBoolean(",1) - quit -`; - - const doc = getParsedDoc(documentString); - expect(toValues(doc.properties[0].modifiers)).toEqual(['public']); - expect(doc.properties[0].id.value).toEqual('test'); - -}); - -describe('type declarations', () => { - test('basic type declaration', () => { - const declarationString = '\ttype public literal String x = "hi there"'; - const doc = getParsedDoc(declarationString); - expect(doc.declarations[0].types[0].value).toEqual('String'); - expect(doc.declarations[0].id.value).toEqual('x'); - }); - test('mutliple type declaration', () => { - const declarationString = '\ttype public literal String x,y'; - const doc = getParsedDoc(declarationString); - expect(doc.declarations[0].types[0].value).toEqual('String'); - expect(doc.declarations[0].id.value).toEqual('x'); - expect(doc.declarations[1].types[0].value).toEqual('String'); - expect(doc.declarations[1].id.value).toEqual('y'); - }); - test('mutliple multitype type declaration', () => { - const declarationString = '\ttype public literal String x(Number,Boolean),y'; - const doc = getParsedDoc(declarationString); - expect(doc.declarations[0].types[0].value).toEqual('String'); - expect(doc.declarations[0].types[1].value).toEqual('Number'); - expect(doc.declarations[0].types[2].value).toEqual('Boolean'); - expect(doc.declarations[0].id.value).toEqual('x'); - expect(doc.declarations[1].types[0].value).toEqual('String'); - expect(doc.declarations[1].id.value).toEqual('y'); - }); - test('mutliple type declaration equal sign', () => { - const declarationString = '\ttype String x = "hi", y = "hi"'; - const doc = getParsedDoc(declarationString); - expect(doc.declarations[0].types[0].value).toEqual('String'); - expect(doc.declarations[0].id.value).toEqual('x'); - expect(doc.declarations[1].types[0].value).toEqual('String'); - expect(doc.declarations[1].id.value).toEqual('y'); - }); - test('static type declaration', () => { - const declarationString = '\ttype static x'; - const doc = getParsedDoc(declarationString); - expect(doc.declarations[0].types[0].value).toEqual('x'); - expect(doc.declarations[0].id.value).toEqual('x'); - }); - test('type type declaration', () => { - const declarationString = '\ttype String type'; - const doc = getParsedDoc(declarationString); - expect(doc.declarations[0].types[0].value).toEqual('String'); - expect(doc.declarations[0].id.value).toEqual('type'); - }); - - test('method declarations', () => { - const documentString = ` -public static void main() - type String x - quit - -public static void main2() - type Number y - quit -`; - const doc = getParsedDoc(documentString); - expect(doc.methods[0].declarations[0].id.value).toEqual('x'); - expect(doc.methods[1].declarations[0].id.value).toEqual('y'); - }); -}); diff --git a/__tests__/statementParser-test.ts b/__tests__/statementParser-test.ts deleted file mode 100644 index c1b15cb..0000000 --- a/__tests__/statementParser-test.ts +++ /dev/null @@ -1,874 +0,0 @@ -import { - BinaryOperator, DeclarationStatement, Expression, Identifier, MultiSet, NumericLiteral, - PostCondition, Statement, StatementParser, StringLiteral, SyntaxKind, TypeIdentifier, Value, -} from '../src/parser/statementParser'; -import { getTokens, Token } from '../src/parser/tokenizer'; - -function parse(text: string) { - return new StatementParser(getTokens(text)); -} - -describe('recursive tests', () => { - test('parse value', () => { - const parser = parse('alex'); - const value = parser.parseValue() as Identifier; - expect(value.id.value).toBe('alex'); - expect(value.args).toBeUndefined(); - expect(value.openParen).toBeUndefined(); - expect(value.closeParen).toBeUndefined(); - }); - test('parse string value', () => { - const parser = parse('"alex"'); - const value = parser.parseValue() as StringLiteral; - expect(value.id.value).toBe('alex'); - }); - test('parse number value', () => { - const parser = parse('42'); - const value = parser.parseValue() as NumericLiteral; - expect(value.id.value).toBe('42'); - }); - test('parse complex value', () => { - const parser = parse('(a.b()_c)'); - const value = parser.parseValue() as BinaryOperator; - expect(value.operator[0].value).toBe('_'); - }); - test('parse value with 0 args', () => { - const parser = parse('alex()'); - const alex = parser.parseValue() as Identifier; - const args = alex.args as Value[]; - expect(alex.id.value).toBe('alex'); - expect(args.length).toBe(0); - expect(alex.openParen).not.toBeUndefined(); - expect(alex.closeParen).not.toBeUndefined(); - }); - test('parse value with 1 arg', () => { - const parser = parse('alex(ioana)'); - const alex = parser.parseValue() as Identifier; - const args = alex.args as Value[]; - expect(alex.id.value).toBe('alex'); - expect(args[0].id.value).toBe('ioana'); - }); - test('parse value with 1 arg as expression', () => { - const parser = parse('alex(ioana)'); - const alex = parser.parseExpression() as Identifier; - const args = alex.args as Value[]; - expect(alex.id.value).toBe('alex'); - expect(args[0].id.value).toBe('ioana'); - }); - test('parse value with 2 args', () => { - const parser = parse('alex(ioana,chris)'); - const alex = parser.parseExpression() as Identifier; - const args = alex.args as Identifier[]; - expect(alex.id.value).toBe('alex'); - expect(args[0].id.value).toBe('ioana'); - expect(args[1].id.value).toBe('chris'); - }); - test('parse args', () => { - const parser = parse(' a, b '); - const args = parser.parseArgs() as Value[]; - expect(args[0].id.value).toBe('a'); - expect(args[1].id.value).toBe('b'); - }); - test('parse arg', () => { - const parser = parse('a'); - const args = parser.parseArgs() as Value[]; - expect(args[0].id.value).toBe('a'); - }); - test('parse value with 2 args with spaces', () => { - const parser = parse('alex( ioana , chris)'); - const alex = parser.parseValue() as Identifier; - const args = alex.args as Value[]; - expect(alex.id.value).toBe('alex'); - expect(args[0].id.value).toBe('ioana'); - expect(args[1].id.value).toBe('chris'); - }); - test('child', () => { - const parser = parse('a + b'); - const plus = parser.parseExpression() as BinaryOperator; - const a = plus.left as Identifier; - const b = plus.right as Identifier; - expect(plus.operator[0].value).toBe('+'); - expect(a.id.value).toBe('a'); - expect(b.id.value).toBe('b'); - }); - test('double token operator', () => { - const parser = parse('a <= b'); - const plus = parser.parseExpression() as BinaryOperator; - const a = plus.left as Identifier; - const b = plus.right as Identifier; - expect(plus.operator[0].value).toBe('<'); - expect(plus.operator[1].value).toBe('='); - expect(a.id.value).toBe('a'); - expect(b.id.value).toBe('b'); - }); - test('dot operator precedence', () => { - const parser = parse('a.b < x.y'); - const lessThan = parser.parseExpression() as BinaryOperator; - const aDot = lessThan.left as BinaryOperator; - const a = aDot.left as Identifier; - const b = aDot.right as Identifier; - const xDot = lessThan.right as BinaryOperator; - const x = xDot.left as Identifier; - const y = xDot.right as Identifier; - expect(lessThan.operator[0].value).toBe('<'); - expect(a.id.value).toBe('a'); - expect(b.id.value).toBe('b'); - expect(x.id.value).toBe('x'); - expect(y.id.value).toBe('y'); - }); - test('child', () => { - const parser = parse('Runtime.start'); - const dotNode = parser.parseExpression() as BinaryOperator; - const runtime = dotNode.left as Identifier; - const start = dotNode.right as Identifier; - expect(dotNode.operator[0]).toBe(parser.tokens[1]); - expect(runtime.id).toBe(parser.tokens[0]); - expect(start.id).toBe(parser.tokens[2]); - }); - test('Runtime start', () => { - const parser = parse('Runtime.start("BA",varlist)'); - const dotNode = parser.parseExpression() as BinaryOperator; - const runtime = dotNode.left as Identifier; - const start = dotNode.right as Identifier; - const args = start.args as Value[]; - const ba = args[0]; - const varlist = args[1]; - expect(dotNode.kind === SyntaxKind.BINARY_OPERATOR); - expect(runtime.id).toBe(parser.tokens[0]); - expect((start).id).toBe(parser.tokens[2]); - expect(ba.id).toBe(parser.tokens[5]); - expect(varlist.id).toBe(parser.tokens[8]); - }); - test('grandchild', () => { - const parser = parse('a.b.c'); - const rootNode = parser.parseExpression() as BinaryOperator; - const leftTree = rootNode.left as BinaryOperator; - const a = leftTree.left as Identifier; - const b = leftTree.right as Identifier; - const c = rootNode.right as Identifier; - expect(rootNode.kind === SyntaxKind.BINARY_OPERATOR); - expect(leftTree.kind === SyntaxKind.BINARY_OPERATOR); - expect(a.id.value).toBe('a'); - expect(b.id.value).toBe('b'); - expect(c.id.value).toBe('c'); - }); - test('grandchild with args', () => { - const parser = parse('a(x).b(y).c(z)'); - const rootNode = parser.parseExpression() as BinaryOperator; - const leftTree = rootNode.left as BinaryOperator; - const a = leftTree.left as Identifier; - const b = leftTree.right as Identifier; - const c = rootNode.right as Identifier; - expect(rootNode.kind === SyntaxKind.BINARY_OPERATOR); - expect(leftTree.kind === SyntaxKind.BINARY_OPERATOR); - expect(a.id).toBe(parser.tokens[0]); - expect(b.id).toBe(parser.tokens[5]); - expect(c.id).toBe(parser.tokens[10]); - }); - test('grandchild with Numeric args', () => { - const parser = parse('a(1).b(1).c(1)'); - const rootNode = parser.parseExpression() as BinaryOperator; - const leftTree = rootNode.left as BinaryOperator; - const a = leftTree.left as Identifier; - const b = leftTree.right as Identifier; - const c = rootNode.right as Identifier; - expect(rootNode.kind === SyntaxKind.BINARY_OPERATOR); - expect(leftTree.kind === SyntaxKind.BINARY_OPERATOR); - expect(a.id).toBe(parser.tokens[0]); - expect(b.id).toBe(parser.tokens[5]); - expect(c.id).toBe(parser.tokens[10]); - }); - test('parse do statement', () => { - const parser = parse('do x(y.z)'); - - const statement = parser.parseStatement() as Statement; - const x = statement.expressions[0] as Identifier; - const args = x.args as Expression[]; - const dot = args[0] as BinaryOperator; - const y = dot.left as Identifier; - const z = dot.right as Identifier; - - expect(statement.action.value).toBe('do'); - expect(x.id.value).toBe('x'); - expect(y.id.value).toBe('y'); - expect(z.id.value).toBe('z'); - }); - test('parse set statement', () => { - const parser = parse('set x = y'); - - const statement = parser.parseStatement() as Statement; - const equal = statement.expressions[0] as BinaryOperator; - const x = equal.left as Identifier; - const y = equal.right as Identifier; - - expect(x.id.value).toBe('x'); - expect(y.id.value).toBe('y'); - }); - test('parse set statement2', () => { - const parser = parse('set x = y'); - - const statement = parser.parseStatement() as Statement; - const equal = statement.expressions[0] as BinaryOperator; - const x = equal.left as Identifier; - const y = equal.right as Identifier; - - expect(x.id.value).toBe('x'); - expect(y.id.value).toBe('y'); - }); - test('parse set prop statement', () => { - const parser = parse('set x.y = z'); - - const statement = parser.parseStatement() as Statement; - const equal = statement.expressions[0] as BinaryOperator; - const dot = equal.left as BinaryOperator; - const x = dot.left as Identifier; - const y = dot.right as Identifier; - const z = equal.right as Identifier; - - expect(x.id.value).toBe('x'); - expect(y.id.value).toBe('y'); - expect(z.id.value).toBe('z'); - }); - test('parse multi set', () => { - const parser = parse('set a = b, x = y'); - - const setStatement = parser.parseStatement() as Statement; - const aEqual = setStatement.expressions[0] as BinaryOperator; - const a = aEqual.left as Identifier; - const b = aEqual.right as Identifier; - const xEqual = setStatement.expressions[1] as BinaryOperator; - const x = xEqual.left as Identifier; - const y = xEqual.right as Identifier; - - expect(setStatement.action.value).toBe('set'); - expect(aEqual.kind).toBe(SyntaxKind.ASSIGNMENT); - expect(xEqual.kind).toBe(SyntaxKind.ASSIGNMENT); - expect(aEqual.operator[0].value).toBe('='); - expect(xEqual.operator[0].value).toBe('='); - expect(a.id.value).toBe('a'); - expect(b.id.value).toBe('b'); - expect(x.id.value).toBe('x'); - expect(y.id.value).toBe('y'); - }); - test('parse set to complex expression', () => { - const parser = parse('set a = x(y,z)'); - - const statement = parser.parseStatement() as Statement; - const equal1 = statement.expressions[0] as BinaryOperator; - - const a = equal1.left as Identifier; - const x = equal1.right as Identifier; - const xArgs = x.args as Identifier[]; - const y = xArgs[0] as Identifier; - const z = xArgs[1] as Identifier; - - expect(statement.action.value).toBe('set'); - expect(a.id.value).toBe('a'); - expect(x.id.value).toBe('x'); - expect(xArgs.length).toBe(2); - expect(y.id.value).toBe('y'); - expect(z.id.value).toBe('z'); - }); - test('multi variable set', () => { - const parser = parse('set (a,b) = c'); - - const statement = parser.parseStatement() as Statement; - const equal = statement.expressions[0] as BinaryOperator; - const variables = equal.left as MultiSet; - const a = variables.variables[0] as Identifier; - const b = variables.variables[1] as Identifier; - const c = equal.right as Identifier; - - expect(statement.action.value).toBe('set'); - expect(equal.operator[0].value).toBe('='); - expect(a.id.value).toBe('a'); - expect(b.id.value).toBe('b'); - expect(c.id.value).toBe('c'); - }); - test('multi variable set', () => { - const parser = parse('set (a.x,b.y) = c, i = j'); - - const statement = parser.parseStatement() as Statement; - const equal1 = statement.expressions[0] as BinaryOperator; - const variables = equal1.left as MultiSet; - const dot1 = variables.variables[0] as BinaryOperator; - const a = dot1.left as Identifier; - const x = dot1.right as Identifier; - const dot2 = variables.variables[1] as BinaryOperator; - const b = dot2.left as Identifier; - const y = dot2.right as Identifier; - const c = equal1.right as Identifier; - - const equal2 = statement.expressions[1] as BinaryOperator; - const i = equal2.left as Identifier; - const j = equal2.right as Identifier; - - expect(statement.action.value).toBe('set'); - expect(equal1.operator[0].value).toBe('='); - expect(a.id.value).toBe('a'); - expect(x.id.value).toBe('x'); - expect(b.id.value).toBe('b'); - expect(y.id.value).toBe('y'); - expect(c.id.value).toBe('c'); - expect(i.id.value).toBe('i'); - expect(j.id.value).toBe('j'); - - expect(c.id.value).toBe('c'); - }); - test('parse set and do', () => { - const parser = parse('set a = b do c()'); - - const statements = parser.parseLine(); - const setStatement = statements[0]; - const equal = setStatement.expressions[0] as BinaryOperator; - const a = equal.left as Identifier; - const b = equal.right as Identifier; - const doStatement = statements[1]; - const c = doStatement.expressions[0] as Identifier; - - expect(setStatement.action.value).toBe('set'); - expect(equal.operator[0].value).toBe('='); - expect(a.id.value).toBe('a'); - expect(b.id.value).toBe('b'); - expect(c.id.value).toBe('c'); - }); - test('parse if set', () => { - const parser = parse('if x set y = z'); - - const statements = parser.parseLine(); - const ifStatement = statements[0]; - const setStatement = statements[1]; - const x = ifStatement.expressions[0] as Identifier; - const equal = setStatement.expressions[0] as BinaryOperator; - const y = equal.left as Identifier; - const z = equal.right as Identifier; - expect(x.id.value).toBe('x'); - expect(y.id.value).toBe('y'); - expect(z.id.value).toBe('z'); - }); - test('parse if with comma and set', () => { - const parser = parse('if a,b!c set y = z'); - - const statements = parser.parseLine(); - const ifStatement = statements[0]; - const setStatement = statements[1]; - expect(ifStatement.kind).toBe(SyntaxKind.IF_STATEMENT); - expect(setStatement.kind).toBe(SyntaxKind.SET_STATEMENT); - }); - test('parse complex if set', () => { - const parser = parse('if ((x > y) and z.isNotNull()) set a = b'); - - const statements = parser.parseLine(); - const ifStatement = statements[0]; - const setStatement = statements[1]; - const and = ifStatement.expressions[0] as BinaryOperator; - const greaterThan = and.left as BinaryOperator; - const x = greaterThan.left as Identifier; - const y = greaterThan.right as Identifier; - const dot = and.right as BinaryOperator; - const z = dot.left as Identifier; - const isNotNull = dot.right as Identifier; - const equal = setStatement.expressions[0] as BinaryOperator; - const a = equal.left as Identifier; - const b = equal.right as Identifier; - - expect(and.operator[0].value).toBe('and'); - expect(greaterThan.operator[0].value).toBe('>'); - expect(x.id.value).toBe('x'); - expect(y.id.value).toBe('y'); - expect(dot.operator[0].value).toBe('.'); - expect(z.id.value).toBe('z'); - expect(isNotNull.id.value).toBe('isNotNull'); - expect(equal.operator[0].value).toBe('='); - expect(a.id.value).toBe('a'); - expect(b.id.value).toBe('b'); - }); - test('test unary operator', () => { - const parser = parse('set x = $$LABEL^PROC'); - const statement = parser.parseStatement() as Statement; - const equal = statement.expressions[0] as BinaryOperator; - const carrot = equal.right as BinaryOperator; - const label = carrot.left as Identifier; - const unaryOperator = label.unaryOperator as Token[]; - const proc = carrot.right as Identifier; - - expect(equal.operator[0].value).toBe('='); - expect(carrot.operator[0].value).toBe('^'); - expect(label.id.value).toBe('LABEL'); - expect(unaryOperator.map(o => o.value).join('')).toBe('$$'); - expect(proc.id.value).toBe('PROC'); - }); - test('test unary and operator', () => { - const parser = parse('if x and not y'); - const statement = parser.parseStatement() as Statement; - const and = statement.expressions[0] as BinaryOperator; - const y = and.right as Identifier; - const unaryOperator = y.unaryOperator as Token[]; - expect(and.operator.map(o => o.value).join(' ')).toBe('and'); - expect(y.id.value).toBe('y'); - expect(unaryOperator.map(o => o.value).join(' ')).toBe('not'); - }); - test('many statements', () => { - const parser = parse('if x.isNotNull() and (y <= (z+3)) set a = "19900415".toDate() do b.func()'); - - const statements = parser.parseLine(); - const ifStatement = statements[0]; - const setStatement = statements[1]; - const doStatement = statements[2]; - const and = ifStatement.expressions[0] as BinaryOperator; - const xDot = and.left as BinaryOperator; - const x = xDot.left as Identifier; - const isNotNull = xDot.right as Identifier; - const lessThanEqualTo = and.right as BinaryOperator; - const y = lessThanEqualTo.left as Identifier; - const plus = lessThanEqualTo.right as BinaryOperator; - const z = plus.left as Identifier; - const three = plus.right as NumericLiteral; - const equal = setStatement.expressions[0] as BinaryOperator; - const a = equal.left as Identifier; - const stringDot = equal.right as BinaryOperator; - const dobString = stringDot.left as StringLiteral; - const toDate = stringDot.right as Identifier; - const bDot = doStatement.expressions[0] as BinaryOperator; - const b = bDot.left as Identifier; - const func = bDot.right as Identifier; - - expect(ifStatement.action.value).toBe('if'); - expect(x.id.value).toBe('x'); - expect(xDot.operator.map(o => o.value).join('')).toBe('.'); - expect(isNotNull.id.value).toBe('isNotNull'); - expect(and.operator.map(o => o.value).join('')).toBe('and'); - expect(y.id.value).toBe('y'); - expect(lessThanEqualTo.operator.map(o => o.value).join('')).toBe('<='); - expect(z.id.value).toBe('z'); - expect(plus.operator.map(o => o.value).join('')).toBe('+'); - expect(three.id.value).toBe('3'); - expect(setStatement.action.value).toBe('set'); - expect(a.id.value).toBe('a'); - expect(equal.operator.map(o => o.value).join('')).toBe('='); - expect(dobString.id.value).toBe('19900415'); - expect(stringDot.operator.map(o => o.value).join('')).toBe('.'); - expect(toDate.id.value).toBe('toDate'); - expect(doStatement.action.value).toBe('do'); - expect(b.id.value).toBe('b'); - expect(bDot.operator.map(o => o.value).join('')).toBe('.'); - expect(func.id.value).toBe('func'); - }); - test('catch with colon', () => { - const parser = parse('catch a@"b":c = d'); - const catchStatement = parser.parseStatement() as Statement; - const colon = catchStatement.expressions[0] as BinaryOperator; - expect(colon.operator.map(o => o.value).join('')).toBe(':'); - }); - test('set with colon', () => { - const parser = parse('set:x=ER (x,y)=1'); - const setStatement = parser.parseStatement() as Statement; - const postCondition = setStatement.expressions[0] as PostCondition; - const postEqual = postCondition.condition as BinaryOperator; - const assignEqual = postCondition.expression as BinaryOperator; - expect(postEqual.operator.map(o => o.value).join('')).toBe('='); - expect(postEqual.kind).toBe(SyntaxKind.BINARY_OPERATOR); - expect(assignEqual.operator.map(o => o.value).join('')).toBe('='); - expect(assignEqual.kind).toBe(SyntaxKind.ASSIGNMENT); - }); - test('set with colon and assignment', () => { - const parser = parse('set:EVENT.isNull() EVENT = "No "'); - const setStatement = parser.parseStatement() as Statement; - const postCondition = setStatement.expressions[0] as PostCondition; - const postDot = postCondition.condition as BinaryOperator; - const postEvent = postDot.left as Identifier; - const isNull = postDot.right as Identifier; - const assignEqual = postCondition.expression as BinaryOperator; - const assignEvent = assignEqual.left as Identifier; - const no = assignEqual.right as StringLiteral; - expect(postEvent.id.value).toBe('EVENT'); - expect(isNull.id.value).toBe('isNull'); - expect(no.id.value).toBe('No '); - expect(assignEvent.id.value).toBe('EVENT'); - }); - test('set with colon not contain and assignment', () => { - const parser = parse(`set:VAL '[ "." VAL = VAL_ "."`); - const setStatement = parser.parseStatement() as Statement; - const postCondition = setStatement.expressions[0] as PostCondition; - const notContain = postCondition.condition as BinaryOperator; - const val1 = notContain.left as Identifier; - const dot1 = notContain.right as StringLiteral; - const assignment = postCondition.expression as BinaryOperator; - const val2 = assignment.left as Identifier; - const underscore = assignment.right as BinaryOperator; - const val3 = underscore.left as Identifier; - const dot2 = underscore.right as StringLiteral; - expect(notContain.operator.map(o => o.value).join('')).toBe(`'[`); - expect(val1.id.value).toBe('VAL'); - expect(val2.id.value).toBe('VAL'); - expect(val3.id.value).toBe('VAL'); - expect(dot1.id.value).toBe('.'); - expect(dot2.id.value).toBe('.'); - }); - test('do with colon', () => { - const parser = parse('do:x=ER logErr^LOG(msg)'); - const setStatement = parser.parseStatement() as Statement; - const postCondition = setStatement.expressions[0] as PostCondition; - const postEqual = postCondition.condition as BinaryOperator; - const carrot = postCondition.expression as BinaryOperator; - expect(postEqual.operator.map(o => o.value).join('')).toBe('='); - expect(postEqual.kind).toBe(SyntaxKind.BINARY_OPERATOR); - expect(carrot.operator.map(o => o.value).join('')).toBe('^'); - expect(carrot.kind).toBe(SyntaxKind.BINARY_OPERATOR); - }); - test('$select', () => { - const parser = parse('set x = $select(ER:"error",true:"ok")'); - const setStatement = parser.parseStatement() as Statement; - const equal = setStatement.expressions[0] as BinaryOperator; - const select = equal.right as Identifier; - const args = select.args as Expression[]; - const arg1 = args[0] as BinaryOperator; - expect(equal.operator.map(o => o.value).join('')).toBe('='); - expect(arg1.operator.map(o => o.value).join('')).toBe(':'); - }); - test('for loop', () => { - const parser = parse('for i=1:1:100'); - const setStatement = parser.parseStatement() as Statement; - const outsideColon = setStatement.expressions[0] as BinaryOperator; - const oneHundred = outsideColon.right as NumericLiteral; - const insideColon = outsideColon.left as BinaryOperator; - const equal = insideColon.left as BinaryOperator; - const increment = insideColon.right as NumericLiteral; - const i = equal.left as Identifier; - const initial = equal.right as NumericLiteral; - expect(outsideColon.operator.map(o => o.value).join('')).toBe(':'); - expect(insideColon.operator.map(o => o.value).join('')).toBe(':'); - expect(oneHundred.id.value).toBe('100'); - expect(equal.operator.map(o => o.value).join('')).toBe('='); - // expect(equal.kind).toBe(SyntaxKind.ASSIGNMENT); - expect(increment.id.value).toBe('1'); - expect(i.id.value).toBe('i'); - expect(initial.id.value).toBe('1'); - }); - test('argumentless for loop', () => { - const parser = parse('for set x = 1'); - const statements = parser.parseLine(); - const forStatement = statements[0]; - const setStatement = statements[1]; - const equal = setStatement.expressions[0] as BinaryOperator; - expect(forStatement.expressions.length).toBe(0); - expect(equal.operator.map(o => o.value).join('')).toBe('='); - }); - test('empty arg', () => { - const parser = parse('do Runtime.start("CS",,ALERT)'); - const doStatement = parser.parseStatement() as Statement; - const dot = doStatement.expressions[0] as BinaryOperator; - const start = dot.right as Identifier; - const args = start.args as Identifier[]; - expect(args.length).toBe(3); - }); - test('for order', () => { - const parser = parse('for set seq=tras(seq).order() quit:seq.isNull() do set(tras(seq))'); - const statements = parser.parseLine(); - const setStatement = statements[1]; - const equal = setStatement.expressions[0] as BinaryOperator; - expect(equal.kind).toBe(SyntaxKind.ASSIGNMENT); - }); - test('ret identifier', () => { - const parser = parse('set ret.x = y'); - const statements = parser.parseLine(); - const setStatement = statements[0]; - const equal = setStatement.expressions[0] as BinaryOperator; - const dot = equal.left as BinaryOperator; - const ret = dot.left as Identifier; - expect(equal.kind).toBe(SyntaxKind.ASSIGNMENT); - expect(ret.id.value).toBe('ret'); - }); - test('ret in args', () => { - const parser = parse('do f(ret x)'); - const statements = parser.parseLine(); - const doStatement = statements[0]; - const f = doStatement.expressions[0] as Identifier; - const args = f.args as Expression[]; - const x = args[0] as Identifier; - const unaryOperator = x.unaryOperator as Token[]; - expect(f.id.value).toBe('f'); - expect(x.id.value).toBe('x'); - expect(unaryOperator[0].value).toBe('ret'); - }); - test('robust do', () => { - const parser = parse('do x.'); - const statements = parser.parseLine(); - const doStatement = statements[0]; - const dot = doStatement.expressions[0] as BinaryOperator; - const x = dot.left as Identifier; - expect(dot.operator[0].value).toBe('.'); - expect(x.id.value).toBe('x'); - }); - test('robust set', () => { - const parser = parse('set x.'); - const statements = parser.parseLine(); - const setStatement = statements[0]; - const dot = setStatement.expressions[0] as BinaryOperator; - const x = dot.left as Identifier; - expect(dot.operator[0].value).toBe('.'); - expect(x.id.value).toBe('x'); - }); - test('robust set', () => { - const parser = parse('set x.'); - const statements = parser.parseLine(); - const setStatement = statements[0]; - const dot = setStatement.expressions[0] as BinaryOperator; - const x = dot.left as Identifier; - expect(dot.operator[0].value).toBe('.'); - expect(x.id.value).toBe('x'); - }); - test('robust binary', () => { - const parser = parse('do x_'); - const statements = parser.parseLine(); - const doStatement = statements[0]; - const _ = doStatement.expressions[0] as BinaryOperator; - const x = _.left as Identifier; - expect(_.operator[0].value).toBe('_'); - expect(x.id.value).toBe('x'); - }); - - test('empty quit', () => { - const parser = parse('quit'); - const statements = parser.parseLine(); - const quitStatement = statements[0]; - expect(quitStatement.kind).toBe(SyntaxKind.QUIT_STATEMENT); - expect(quitStatement.expressions.length).toBe(0); - }); - test('empty quit with colon', () => { - const parser = parse('quit:'); - const statements = parser.parseLine(); - const quitStatement = statements[0]; - expect(quitStatement.kind).toBe(SyntaxKind.QUIT_STATEMENT); - expect(quitStatement.expressions.length).toBe(1); - }); - test('colon quit with expression', () => { - const parser = parse('quit:x x+y'); - const statements = parser.parseLine(); - const quitStatement = statements[0]; - const conditionalExpression = quitStatement.expressions[0] as PostCondition; - const x = conditionalExpression.condition as Identifier; - const xPlusY = conditionalExpression.expression as BinaryOperator; - expect(quitStatement.kind).toBe(SyntaxKind.QUIT_STATEMENT); - expect(quitStatement.expressions.length).toBe(1); - expect(x.id.value).toBe('x'); - expect(xPlusY.kind).toBe(SyntaxKind.BINARY_OPERATOR); - }); - test('return expression', () => { - const parser = parse('return x+y'); - const statements = parser.parseLine(); - const returnStatement = statements[0]; - const plus = returnStatement.expressions[0] as BinaryOperator; - const x = plus.left as Identifier; - const y = plus.right as Identifier; - expect(returnStatement.kind).toBe(SyntaxKind.RETURN_STATEMENT); - expect(returnStatement.expressions.length).toBe(1); - expect(plus.operator[0].value).toBe('+'); - expect(x.id.value).toBe('x'); - expect(y.id.value).toBe('y'); - }); - test('empty set', () => { - const parser = parse('set'); - const statements = parser.parseLine(); - const setStatement = statements[0]; - expect(setStatement.kind).toBe(SyntaxKind.SET_STATEMENT); - expect(setStatement.expressions.length).toBe(0); - }); - test('empty do', () => { - const parser = parse('do'); - const statements = parser.parseLine(); - const doStatement = statements[0]; - expect(doStatement.kind).toBe(SyntaxKind.DO_STATEMENT); - expect(doStatement.expressions.length).toBe(0); - }); - test('empty set with new line', () => { - const parser = parse('set\r\n'); - const statements = parser.parseLine(); - const setStatement = statements[0]; - expect(setStatement.kind).toBe(SyntaxKind.SET_STATEMENT); - expect(setStatement.expressions.length).toBe(0); - }); - test('empty quit with new line', () => { - const parser = parse('quit\r\n'); - const statements = parser.parseLine(); - const quitStatement = statements[0]; - expect(quitStatement.kind).toBe(SyntaxKind.QUIT_STATEMENT); - expect(quitStatement.expressions.length).toBe(0); - }); - test('empty do with new line', () => { - const parser = parse('do\r\n'); - const statements = parser.parseLine(); - const doStatement = statements[0]; - expect(doStatement.kind).toBe(SyntaxKind.DO_STATEMENT); - expect(doStatement.expressions.length).toBe(0); - }); - test('do with only post condition', () => { - const parser = parse('do:x'); - const statements = parser.parseLine(); - const doStatement = statements[0]; - expect(doStatement.kind).toBe(SyntaxKind.DO_STATEMENT); - expect(doStatement.expressions.length).toBe(1); - }); - test('do with post condition and expression', () => { - const parser = parse('do:x f(x)'); - const statements = parser.parseLine(); - const doStatement = statements[0]; - const conditionalExpression = doStatement.expressions[0] as PostCondition; - const x = conditionalExpression.condition as Identifier; - const fOfX = conditionalExpression.expression as Identifier; - expect(doStatement.kind).toBe(SyntaxKind.DO_STATEMENT); - expect(doStatement.expressions.length).toBe(1); - expect(x.id.value).toBe('x'); - expect(fOfX.id.value).toBe('f'); - }); - test('set with only post condition', () => { - const parser = parse('set:x'); - const statements = parser.parseLine(); - const setStatement = statements[0]; - expect(setStatement.kind).toBe(SyntaxKind.SET_STATEMENT); - expect(setStatement.expressions.length).toBe(1); - }); - test('set with only unary', () => { - const parser = parse('set x = ^'); - const statements = parser.parseLine(); - const setStatement = statements[0]; - expect(setStatement.kind).toBe(SyntaxKind.SET_STATEMENT); - expect(setStatement.expressions.length).toBe(1); - }); - test('set partial expression', () => { - const parser = parse('set x. = "something" do'); - const statements = parser.parseLine(); - const setStatement = statements[0]; - const doStatement = statements[1]; - expect(setStatement.kind).toBe(SyntaxKind.SET_STATEMENT); - expect(setStatement.expressions.length).toBe(1); - expect(doStatement.kind).toBe(SyntaxKind.DO_STATEMENT); - }); - test('do partial expression', () => { - const parser = parse('do x. set y = ""'); - const statements = parser.parseLine(); - const doStatement = statements[0]; - const setStatement = statements[1]; - expect(doStatement.kind).toBe(SyntaxKind.DO_STATEMENT); - expect(doStatement.expressions.length).toBe(1); - expect(setStatement.kind).toBe(SyntaxKind.SET_STATEMENT); - }); - test('type statement', () => { - const parser = parse('type String x'); - const statement = parser.parseTypeStatement() as Statement; - const declaration = statement.expressions[0] as DeclarationStatement; - const typeIdentifier = declaration.type as TypeIdentifier; - expect(typeIdentifier.id.value).toBe('String'); - expect(declaration.id.value).toBe('x'); - expect(declaration.args).toBeUndefined(); - }); - test('type statement with arg', () => { - const parser = parse('type void x(Number)'); - const statement = parser.parseTypeStatement() as Statement; - const declaration = statement.expressions[0] as DeclarationStatement; - const args = declaration.args as Identifier[]; - const arrayTypeNumber = args[0] as Identifier; - const typeIdentifier = declaration.type as TypeIdentifier; - expect(typeIdentifier.id.value).toBe('void'); - expect(declaration.id.value).toBe('x'); - expect(args.length).toBe(1); - expect(arrayTypeNumber.id.value).toBe('Number'); - }); - test('type statement with 2 arg', () => { - const parser = parse('type void x(Number, String)'); - const statement = parser.parseTypeStatement() as Statement; - const declaration = statement.expressions[0] as DeclarationStatement; - const args = declaration.args as Identifier[]; - const arrayTypeNumber = args[0] as Identifier; - const arrayTypeString = args[1] as Identifier; - const typeIdentifier = declaration.type as TypeIdentifier; - expect(typeIdentifier.id.value).toBe('void'); - expect(declaration.id.value).toBe('x'); - expect(args.length).toBe(2); - expect(arrayTypeNumber.id.value).toBe('Number'); - expect(arrayTypeString.id.value).toBe('String'); - }); - test('type statement with no arg', () => { - const parser = parse('type void x()'); - const statement = parser.parseTypeStatement() as Statement; - const declaration = statement.expressions[0] as DeclarationStatement; - const args = declaration.args as Identifier[]; - const typeIdentifier = declaration.type as TypeIdentifier; - expect(typeIdentifier.id.value).toBe('void'); - expect(declaration.id.value).toBe('x'); - expect(args.length).toBe(0); - }); - test('type statement with 2 empty args', () => { - const parser = parse('type void x(,)'); - const statement = parser.parseTypeStatement() as Statement; - const declaration = statement.expressions[0] as DeclarationStatement; - const args = declaration.args as Identifier[]; - const typeIdentifier = declaration.type as TypeIdentifier; - expect(typeIdentifier.id.value).toBe('void'); - expect(declaration.id.value).toBe('x'); - expect(args.length).toBe(2); - }); - test('type statement with assignment', () => { - const parser = parse('type String x = "something"'); - const statement = parser.parseTypeStatement() as Statement; - const assignment = statement.expressions[0] as BinaryOperator; - const declaration = assignment.left as DeclarationStatement; - const something = assignment.right as StringLiteral; - const typeIdentifier = declaration.type as TypeIdentifier; - expect(typeIdentifier.id.value).toBe('String'); - expect(declaration.id.value).toBe('x'); - expect(declaration.args).toBeUndefined(); - expect(something.id.value).toBe('something'); - }); - test('type statement with keywords', () => { - const parser = parse('type public new String x'); - const statement = parser.parseTypeStatement() as Statement; - const declaration = statement.expressions[0] as DeclarationStatement; - const publicToken = declaration.publicToken as Token; - const newToken = declaration.newToken as Token; - const typeIdentifier = declaration.type as TypeIdentifier; - expect(typeIdentifier.id.value).toBe('String'); - expect(publicToken.value).toBe('public'); - expect(newToken.value).toBe('new'); - expect(declaration.id.value).toBe('x'); - expect(declaration.args).toBeUndefined(); - }); - test('complex multi line set', () => { - const parser = parse('type Number x = 1, y = 2'); - const statement = parser.parseStatement() as Statement; - const xAssign = statement.expressions[0] as BinaryOperator; - const yAssign = statement.expressions[1] as BinaryOperator; - expect(statement.expressions.length).toBe(2); - expect(xAssign.kind).toBe(SyntaxKind.ASSIGNMENT); - expect(yAssign.kind).toBe(SyntaxKind.ASSIGNMENT); - }); - test('static declaration', () => { - const parser = parse('type static ZTest'); - const statement = parser.parseStatement() as Statement; - const declaration = statement.expressions[0] as DeclarationStatement; - expect(declaration.type.id.value).toBe('ZTest'); - expect(declaration.staticToken.value).toBe('static'); - }); - test('only type', () => { - const parser = parse('type'); - const statement = parser.parseStatement() as Statement; - expect(statement.kind).toBe(SyntaxKind.TYPE_STATEMENT); - expect(statement.expressions.length).toBe(0); - }); - test('type String', () => { - const parser = parse('type String'); - const statement = parser.parseStatement() as Statement; - const declaration = statement.expressions[0] as DeclarationStatement; - const stringType = declaration.type as TypeIdentifier; - expect(statement.kind).toBe(SyntaxKind.TYPE_STATEMENT); - expect(stringType.id.value).toBe('String'); - expect(declaration.id).toBeUndefined(); - }); - test('type static', () => { - const parser = parse('type static'); - const statement = parser.parseStatement() as Statement; - const declaration = statement.expressions[0] as DeclarationStatement; - expect(declaration.type).toBeUndefined(); - expect(declaration.staticToken.value).toBe('static'); - }); -}); diff --git a/__tests__/tokenize-test.ts b/__tests__/tokenize-test.ts deleted file mode 100644 index 752928c..0000000 --- a/__tests__/tokenize-test.ts +++ /dev/null @@ -1,171 +0,0 @@ -import {getTokens, Type} from '../src/parser/tokenizer'; - -test('pipe token', () => { - let tokenizer = getTokens('|'); - expect(tokenizer.next().value).toEqual({type: Type.Pipe, value: '|', position: {line: 0, character: 0}}); - expect(tokenizer.next().value).toBeUndefined(); -}) - -test('property def', () => { - let tokenizer = getTokens('#PROPERTYDEF'); - expect(tokenizer.next().value).toEqual({type: Type.NumberSign, value: '#', position: {line: 0, character: 0}}); - expect(tokenizer.next().value).toEqual({type: Type.Alphanumeric, value: 'PROPERTYDEF', position: {line: 0, character: 1}}); - expect(tokenizer.next().value).toBeUndefined(); -}) - - -test('property def full', () => { - let tokenizer = getTokens('\t#PROPERTYDEF dummy\t\t\tclass = String\tpublic position = 2'); - expect(tokenizer.next().value).toEqual({type: Type.Tab, value: '\t', position: {line: 0, character: 0}}); - expect(tokenizer.next().value).toEqual({type: Type.NumberSign, value: '#', position: {line: 0, character: 1}}); - expect(tokenizer.next().value).toEqual({type: Type.Alphanumeric, value: 'PROPERTYDEF', position: {line: 0, character: 2}}); - expect(tokenizer.next().value).toEqual({type: Type.Space, value: ' ', position: {line: 0, character: 13}}); - expect(tokenizer.next().value).toEqual({type: Type.Alphanumeric, value: 'dummy', position: {line: 0, character: 14}}); - expect(tokenizer.next().value).toEqual({type: Type.Tab, value: '\t', position: {line: 0, character: 19}}); - expect(tokenizer.next().value).toEqual({type: Type.Tab, value: '\t', position: {line: 0, character: 20}}); - expect(tokenizer.next().value).toEqual({type: Type.Tab, value: '\t', position: {line: 0, character: 21}}); - expect(tokenizer.next().value).toEqual({type: Type.Alphanumeric, value: 'class', position: {line: 0, character: 22}}); - expect(tokenizer.next().value).toEqual({type: Type.Space, value: ' ', position: {line: 0, character: 27}}); - expect(tokenizer.next().value).toEqual({type: Type.EqualSign, value: '=', position: {line: 0, character: 28}}); - expect(tokenizer.next().value).toEqual({type: Type.Space, value: ' ', position: {line: 0, character: 29}}); - expect(tokenizer.next().value).toEqual({type: Type.Alphanumeric, value: 'String', position: {line: 0, character: 30}}); - expect(tokenizer.next().value).toEqual({type: Type.Tab, value: '\t', position: {line: 0, character: 36}}); - expect(tokenizer.next().value).toEqual({type: Type.Alphanumeric, value: 'public', position: {line: 0, character: 37}}); - expect(tokenizer.next().value).toEqual({type: Type.Space, value: ' ', position: {line: 0, character: 43}}); - expect(tokenizer.next().value).toEqual({type: Type.Alphanumeric, value: 'position', position: {line: 0, character: 44}}); - expect(tokenizer.next().value).toEqual({type: Type.Space, value: ' ', position: {line: 0, character: 52}}); - expect(tokenizer.next().value).toEqual({type: Type.EqualSign, value: '=', position: {line: 0, character: 53}}); - expect(tokenizer.next().value).toEqual({type: Type.Space, value: ' ', position: {line: 0, character: 54}}); - expect(tokenizer.next().value).toEqual({type: Type.Numeric, value: '2', position: {line: 0, character: 55}}); - expect(tokenizer.next().value).toBeUndefined(); -}) - -test('numeric', () => { - let tokenizer = getTokens('1'); - expect(tokenizer.next().value).toEqual({type: Type.Numeric, value: '1', position: {line: 0, character: 0}}); - expect(tokenizer.next().value).toBeUndefined(); -}) - -test('whitespace', () => { - let tabTokenizer = getTokens('\t'); - expect(tabTokenizer.next().value).toEqual({type: Type.Tab, value: '\t', position: {line: 0, character: 0}}); - expect(tabTokenizer.next().value).toBeUndefined(); - - let spaceTokenizer = getTokens(' '); - expect(spaceTokenizer.next().value).toEqual({type: Type.Space, value: ' ', position: {line: 0, character: 0}}); - expect(spaceTokenizer.next().value).toEqual({type: Type.Space, value: ' ', position: {line: 0, character: 1}}); - expect(spaceTokenizer.next().value).toBeUndefined(); -}) - -test('line comment', () => { - let tokenizer = getTokens('//line comment'); - expect(tokenizer.next().value).toEqual({type: Type.LineCommentInit, value: '//', position: {line: 0, character: 0}}); - expect(tokenizer.next().value).toEqual({type: Type.LineComment, value: 'line comment', position: {line: 0, character: 2}}); - expect(tokenizer.next().value).toBeUndefined(); - - tokenizer = getTokens('//line comment\nword'); - expect(tokenizer.next().value).toEqual({type: Type.LineCommentInit, value: '//', position: {line: 0, character: 0}}); - expect(tokenizer.next().value).toEqual({type: Type.LineComment, value: 'line comment', position: {line: 0, character: 2}}); - expect(tokenizer.next().value).toEqual({type: Type.NewLine, value: '\n', position: {line: 0, character: 14}}); - expect(tokenizer.next().value).toEqual({type: Type.Alphanumeric, value: 'word', position: {line: 1, character: 0}}); - expect(tokenizer.next().value).toBeUndefined(); - - tokenizer = getTokens('///*line comment*/'); - expect(tokenizer.next().value).toEqual({type: Type.LineCommentInit, value: '//', position: {line: 0, character: 0}}); - expect(tokenizer.next().value).toEqual({type: Type.LineComment, value: '/*line comment*/', position: {line: 0, character: 2}}); - expect(tokenizer.next().value).toBeUndefined(); - - tokenizer = getTokens('//\n'); - expect(tokenizer.next().value).toEqual({type: Type.LineCommentInit, value: '//', position: {line: 0, character: 0}}); - expect(tokenizer.next().value).toEqual({type: Type.LineComment, value: '', position: {line: 0, character: 2}}); - expect(tokenizer.next().value).toEqual({type: Type.NewLine, value: '\n', position: {line: 0, character: 2}}); - expect(tokenizer.next().value).toBeUndefined(); -}) - -test('block comment', () => { - let tokenizer = getTokens('/*a block* / comment*/ alphanumeric'); - expect(tokenizer.next().value).toEqual({type: Type.BlockCommentInit, value: '/*', position: {line: 0, character: 0}}); - expect(tokenizer.next().value).toEqual({type: Type.BlockComment, value: 'a block* / comment', position: {line: 0, character: 2}}); - expect(tokenizer.next().value).toEqual({type: Type.BlockCommentTerm, value: '*/', position: {line: 0, character: 20}}); - expect(tokenizer.next().value).toEqual({type: Type.Space, value: ' ', position: {line: 0, character: 22}}); - expect(tokenizer.next().value).toEqual({type: Type.Alphanumeric, value: 'alphanumeric', position: {line: 0, character: 23}}); - expect(tokenizer.next().value).toBeUndefined(); - - tokenizer = getTokens('/**/'); - expect(tokenizer.next().value).toEqual({type: Type.BlockCommentInit, value: '/*', position: {line: 0, character: 0}}); - expect(tokenizer.next().value).toEqual({type: Type.BlockComment, value: '', position: {line: 0, character: 2}}); - expect(tokenizer.next().value).toEqual({type: Type.BlockCommentTerm, value: '*/', position: {line: 0, character: 2}}); - expect(tokenizer.next().value).toBeUndefined(); -}) - -test('documentation block comment', () => { - let tokenizer = getTokens('\t/*DOC -----------------------------------------------------------------\n\tdocumentation\n\t** ENDDOC */'); - expect(tokenizer.next().value).toEqual({type: Type.Tab, value: '\t', position: {line: 0, character: 0}}); - expect(tokenizer.next().value).toEqual({type: Type.BlockCommentInit, value: '/*', position: {line: 0, character: 1}}); - expect(tokenizer.next().value).toEqual({type: Type.BlockComment, value: 'DOC -----------------------------------------------------------------\n\tdocumentation\n\t** ENDDOC ', position: {line: 0, character: 3}}); - expect(tokenizer.next().value).toEqual({type: Type.BlockCommentTerm, value: '*/', position: {line: 2, character: 11}}); - expect(tokenizer.next().value).toBeUndefined(); -}) - -test('string', () => { - let tokenizer = getTokens('"this is a string"'); - expect(tokenizer.next().value).toEqual({type: Type.DoubleQuotes, value: '"', position: {line: 0, character: 0}}); - expect(tokenizer.next().value).toEqual({type: Type.String, value: 'this is a string', position: {line: 0, character: 1}}); - expect(tokenizer.next().value).toEqual({type: Type.DoubleQuotes, value: '"', position: {line: 0, character: 17}}); - expect(tokenizer.next().value).toBeUndefined(); - - tokenizer = getTokens('"string"alphanumeric"'); - expect(tokenizer.next().value).toEqual({type: Type.DoubleQuotes, value: '"', position: {line: 0, character: 0}}); - expect(tokenizer.next().value).toEqual({type: Type.String, value: 'string', position: {line: 0, character: 1}}); - expect(tokenizer.next().value).toEqual({type: Type.DoubleQuotes, value: '"', position: {line: 0, character: 7}}); - expect(tokenizer.next().value).toEqual({type: Type.Alphanumeric, value: 'alphanumeric', position: {line: 0, character: 8}}); - expect(tokenizer.next().value).toEqual({type: Type.DoubleQuotes, value: '"', position: {line: 0, character: 20}}); - expect(tokenizer.next().value).toEqual({type: Type.String, value: '', position: {line: 0, character: 21}}); - expect(tokenizer.next().value).toBeUndefined(); - - tokenizer = getTokens('""'); - expect(tokenizer.next().value).toEqual({type: Type.DoubleQuotes, value: '"', position: {line: 0, character: 0}}); - expect(tokenizer.next().value).toEqual({type: Type.String, value: '', position: {line: 0, character: 1}}); - expect(tokenizer.next().value).toEqual({type: Type.DoubleQuotes, value: '"', position: {line: 0, character: 1}}); - expect(tokenizer.next().value).toBeUndefined(); - - tokenizer = getTokens('"eggs\nflour\nmilk"'); - expect(tokenizer.next().value).toEqual({type: Type.DoubleQuotes, value: '"', position: {line: 0, character: 0}}); - expect(tokenizer.next().value).toEqual({type: Type.String, value: 'eggs\nflour\nmilk', position: {line: 0, character: 1}}); - expect(tokenizer.next().value).toEqual({type: Type.DoubleQuotes, value: '"', position: {line: 2, character: 4}}); - expect(tokenizer.next().value).toBeUndefined(); -}) - -test('carriage return line feed', () => { - let tokenizer = getTokens('\r\n') - let tokens = []; - for (let token of tokenizer) { - tokens.push(token); - } - expect(tokens).toHaveLength(2); - expect(tokens[0].value).toBe('\r') -}) - -test('comment newline', () => { - let tokenizer = getTokens('// this is a comment\n') - let tokens = []; - for (let token of tokenizer) { - tokens.push(token); - } - expect(tokens[0].type).toBe(Type.LineCommentInit) - expect(tokens[1].type).toBe(Type.LineComment) - expect(tokens[1].value).toBe(' this is a comment') - expect(tokens[2].type).toBe(Type.NewLine) -}) - -test('comment with semicolon', () => { - let tokenizer = getTokens('; this is a comment\n') - let tokens = []; - for (let token of tokenizer) { - tokens.push(token); - } - expect(tokens[0].type).toBe(Type.LineCommentInit) - expect(tokens[1].type).toBe(Type.LineComment) - expect(tokens[1].value).toBe(' this is a comment') - expect(tokens[2].type).toBe(Type.NewLine) -}) diff --git a/__tests__/utilities-test.ts b/__tests__/utilities-test.ts deleted file mode 100644 index 53ec262..0000000 --- a/__tests__/utilities-test.ts +++ /dev/null @@ -1,236 +0,0 @@ -import * as path from 'path'; -import { FinderPaths } from '../src/parser/config'; -import { MemberClass, ParsedDocument, parseFile } from '../src/parser/parser'; -import * as tokenizer from '../src/parser/tokenizer'; -import * as utilities from '../src/parser/utilities'; - -function getTokens(str: string): tokenizer.Token[] { - return [...tokenizer.getTokens(str)]; -} - -describe('completion', () => { - test('empty', () => { - const tokensOnLine: tokenizer.Token[] = []; - const index = 0; - const result = utilities.getCallTokens(tokensOnLine, index); - expect(result.length).toBe(0); - }); - test('undefined', () => { - const tokensOnLine: tokenizer.Token[] = getTokens('a()'); - const index = 1; - const result = utilities.getCallTokens(tokensOnLine, index); - expect(result.length).toBe(0); - }); - test('undefined 2', () => { - const tokensOnLine: tokenizer.Token[] = getTokens('a()'); - const index = 2; - const result = utilities.getCallTokens(tokensOnLine, index); - expect(result.length).toBe(0); - }); - test('undefined 3', () => { - const tokensOnLine: tokenizer.Token[] = getTokens('a '); - const index = 1; - const result = utilities.getCallTokens(tokensOnLine, index); - expect(result.length).toBe(0); - }); - test('basic dot', () => { - const tokensOnLine: tokenizer.Token[] = getTokens('a.b'); - const index = 2; - const result = utilities.getCallTokens(tokensOnLine, index); - expect(result[0].value).toBe('a'); - expect(result[1].value).toBe('b'); - }); - test('two dots', () => { - const tokensOnLine: tokenizer.Token[] = getTokens('a.b.c'); - const index = 4; - const result = utilities.getCallTokens(tokensOnLine, index); - expect(result[0].value).toBe('a'); - expect(result[1].value).toBe('b'); - expect(result[2].value).toBe('c'); - }); - test('single reference', () => { - const tokensOnLine: tokenizer.Token[] = getTokens('do a()'); - const index = 2; - const result = utilities.getCallTokens(tokensOnLine, index); - expect(result[0].value).toBe('a'); - }); - test('dot with parens', () => { - const tokensOnLine: tokenizer.Token[] = getTokens('a().b'); - const index = 4; - const result = utilities.getCallTokens(tokensOnLine, index); - expect(result[0].value).toBe('a'); - expect(result[1].value).toBe('b'); - }); - test('dot with parens content', () => { - const tokensOnLine: tokenizer.Token[] = getTokens('a(blah).b'); - const index = 5; - const result = utilities.getCallTokens(tokensOnLine, index); - expect(result[0].value).toBe('a'); - expect(result[1].value).toBe('b'); - }); - test('dot with parens content with parens', () => { - const tokensOnLine: tokenizer.Token[] = getTokens('a(blah(bleh())).b'); - const index = 10; - const result = utilities.getCallTokens(tokensOnLine, index); - expect(result[0].value).toBe('a'); - expect(result[1].value).toBe('b'); - }); - test('dot with parens content on dot', () => { - const tokensOnLine: tokenizer.Token[] = getTokens('a(blah).b'); - const index = 4; - const result = utilities.getCallTokens(tokensOnLine, index); - expect(result[0].value).toBe('a'); - expect(result[1].value).toBe('.'); - }); - test('clusterfuck', () => { - const tokensOnLine: tokenizer.Token[] = getTokens('a.b().c(x(y)).d'); - const index = 14; - const result = utilities.getCallTokens(tokensOnLine, index); - expect(result[0].value).toBe('a'); - expect(result[1].value).toBe('b'); - expect(result[2].value).toBe('c'); - expect(result[3].value).toBe('d'); - }); - test('clusterfuck2', () => { - const tokensOnLine: tokenizer.Token[] = getTokens('a.b().c(x(y)).d'); - const index = 14; - const result = utilities.getCallTokens(tokensOnLine, index); - expect(result[0].value).toBe('a'); - expect(result[1].value).toBe('b'); - expect(result[2].value).toBe('c'); - expect(result[3].value).toBe('d'); - }); - test('mumps call label', () => { - const tokensOnLine: tokenizer.Token[] = getTokens('method^CLASS()'); - const index = 0; - const result = utilities.getCallTokens(tokensOnLine, index); - expect(result[1].value).toBe('method'); - expect(result[0].value).toBe('CLASS'); - }); - - test('mumps call routine', () => { - const tokensOnLine: tokenizer.Token[] = getTokens('method^CLASS()'); - const index = 2; - const result = utilities.getCallTokens(tokensOnLine, index); - expect(result[0].value).toBe('CLASS'); - }); -}); - -describe('ParsedDocFinder', () => { - let filesDir: string; - - let parentFilePath: string; - let childFilePath: string; - - let parsedParent: ParsedDocument; - let parsedChild: ParsedDocument; - - const getPaths = (activeRoutine: string): FinderPaths => { - return { - activeRoutine, - corePsl: '', - projectPsl: [filesDir], - tables: [], - }; - } - - beforeAll(async () => { - filesDir = path.resolve('__tests__', 'files'); - - parentFilePath = path.join(filesDir, 'ZParent.PROC'); - childFilePath = path.join(filesDir, 'ZChild.PROC'); - - parsedParent = await parseFile(parentFilePath); - parsedChild = await parseFile(childFilePath); - }); - - test('Find dummy in child', async () => { - const paths = getPaths(childFilePath); - const finder: utilities.ParsedDocFinder = new utilities.ParsedDocFinder(parsedChild, paths); - const result = await searchParser(finder, 'dummy', { character: 0, line: 0 }); - expect(result.member.memberClass).toBe(MemberClass.property); - expect(result.member.id.value).toBe('dummy'); - expect(result.fsPath).toBe(childFilePath); - }); - - test('Find property in child', async () => { - const paths = getPaths(childFilePath); - const finder: utilities.ParsedDocFinder = new utilities.ParsedDocFinder(parsedChild, paths); - const result = await searchParser(finder, 'propInChild', { character: 0, line: 0 }); - expect(result.member.memberClass).toBe(MemberClass.property); - expect(result.member.id.value).toBe('propInChild'); - expect(result.fsPath).toBe(childFilePath); - }); - - test('Find method in child', async () => { - const paths = getPaths(childFilePath); - const finder: utilities.ParsedDocFinder = new utilities.ParsedDocFinder(parsedChild, paths); - const result = await searchParser(finder, 'methodInChild', { character: 0, line: 0 }); - expect(result.member.memberClass).toBe(MemberClass.method); - expect(result.member.id.value).toBe('methodInChild'); - expect(result.fsPath).toBe(childFilePath); - }); - - test('Find method overriden method in child', async () => { - const paths = getPaths(childFilePath); - const finder: utilities.ParsedDocFinder = new utilities.ParsedDocFinder(parsedChild, paths); - const result = await searchParser(finder, 'methodInParentAndChild', { character: 0, line: 0 }); - expect(result.member.memberClass).toBe(MemberClass.method); - expect(result.member.id.value).toBe('methodInParentAndChild'); - expect(result.fsPath).toBe(childFilePath); - }); - - test('Find method inherited method in parent', async () => { - const paths = getPaths(childFilePath); - const finder: utilities.ParsedDocFinder = new utilities.ParsedDocFinder(parsedChild, paths); - const result = await searchParser(finder, 'methodInParent', { character: 0, line: 0 }); - expect(result.member.memberClass).toBe(MemberClass.method); - expect(result.member.id.value).toBe('methodInParent'); - expect(result.fsPath).toBe(parentFilePath); - }); - - test('Find method in parent', async () => { - const paths = getPaths(parentFilePath); - const finder: utilities.ParsedDocFinder = new utilities.ParsedDocFinder(parsedParent, paths); - const result = await searchParser(finder, 'methodInParent', { character: 0, line: 0 }); - expect(result.member.memberClass).toBe(MemberClass.method); - expect(result.member.id.value).toBe('methodInParent'); - expect(result.fsPath).toBe(parentFilePath); - }); - - test('Find y in methodInChild', async () => { - const paths = getPaths(childFilePath); - const finder: utilities.ParsedDocFinder = new utilities.ParsedDocFinder(parsedChild, paths); - const result = await searchParser(finder, 'y', { character: 0, line: 12 }); - expect(result.member.memberClass).toBe(MemberClass.declaration); - expect(result.member.id.value).toBe('y'); - expect(result.fsPath).toBe(childFilePath); - }); - - test('Do not find x', async () => { - const paths = getPaths(childFilePath); - const finder: utilities.ParsedDocFinder = new utilities.ParsedDocFinder(parsedChild, paths); - const result = await searchParser(finder, 'x', { character: 0, line: 12 }); - expect(result).toBeUndefined(); - }); - - test('Do not find reallySpecificName', async () => { - const paths = getPaths(childFilePath); - const finder: utilities.ParsedDocFinder = new utilities.ParsedDocFinder(parsedChild, paths); - const result = await searchParser(finder, 'reallySpecificName', { character: 0, line: 10 }); - expect(result).toBeUndefined(); - }); - - test('Do find reallySpecificName', async () => { - const paths = getPaths(parentFilePath); - const finder: utilities.ParsedDocFinder = new utilities.ParsedDocFinder(parsedParent, paths); - const result = await searchParser(finder, 'reallySpecificName', { character: 0, line: 10 }); - expect(result.member.memberClass).toBe(MemberClass.declaration); - expect(result.member.id.value).toBe('reallySpecificName'); - expect(result.fsPath).toBe(parentFilePath); - }); -}); - -function searchParser(finder: utilities.ParsedDocFinder, value: string, position: tokenizer.Position) { - return finder.searchParser(new tokenizer.Token(tokenizer.Type.Alphanumeric, value, position)); -} diff --git a/icons/dark/arrow-down.svg b/icons/dark/arrow-down.svg deleted file mode 100644 index c31d63a..0000000 --- a/icons/dark/arrow-down.svg +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - image/svg+xml - - arrow-down - - - - - - arrow-down - Created with Sketch. - - - - - - - diff --git a/icons/dark/arrow-up.svg b/icons/dark/arrow-up.svg deleted file mode 100644 index 41883fc..0000000 --- a/icons/dark/arrow-up.svg +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - image/svg+xml - - arrow-up - - - - - - arrow-up - Created with Sketch. - - - - - - - diff --git a/icons/dark/gear.svg b/icons/dark/gear.svg deleted file mode 100644 index 9aa01de..0000000 --- a/icons/dark/gear.svg +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - image/svg+xml - - gear - - - - - - gear - Created with Sketch. - - - - - - - diff --git a/icons/dark/link.svg b/icons/dark/link.svg deleted file mode 100644 index 1b44743..0000000 --- a/icons/dark/link.svg +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - image/svg+xml - - link - - - - - - link - Created with Sketch. - - - - - - - diff --git a/icons/dark/sync.svg b/icons/dark/sync.svg deleted file mode 100644 index 7859522..0000000 --- a/icons/dark/sync.svg +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - image/svg+xml - - sync - - - - - - sync - Created with Sketch. - - - - - - - diff --git a/icons/dark/triangle-right.svg b/icons/dark/triangle-right.svg deleted file mode 100644 index 44b0855..0000000 --- a/icons/dark/triangle-right.svg +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - image/svg+xml - - triangle-right - - - - - - triangle-right - Created with Sketch. - - - - - - - diff --git a/icons/light/arrow-down.svg b/icons/light/arrow-down.svg deleted file mode 100644 index 0b2bcd5..0000000 --- a/icons/light/arrow-down.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - arrow-down - Created with Sketch. - - - - - - - \ No newline at end of file diff --git a/icons/light/arrow-up.svg b/icons/light/arrow-up.svg deleted file mode 100644 index f6cb23a..0000000 --- a/icons/light/arrow-up.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - arrow-up - Created with Sketch. - - - - - - - \ No newline at end of file diff --git a/icons/light/gear.svg b/icons/light/gear.svg deleted file mode 100644 index e72ca6a..0000000 --- a/icons/light/gear.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - gear - Created with Sketch. - - - - - - - \ No newline at end of file diff --git a/icons/light/link.svg b/icons/light/link.svg deleted file mode 100644 index 39e4933..0000000 --- a/icons/light/link.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - link - Created with Sketch. - - - - - - - \ No newline at end of file diff --git a/icons/light/sync.svg b/icons/light/sync.svg deleted file mode 100644 index d57fe3c..0000000 --- a/icons/light/sync.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - sync - Created with Sketch. - - - - - - - \ No newline at end of file diff --git a/icons/light/triangle-right.svg b/icons/light/triangle-right.svg deleted file mode 100644 index 3867ddf..0000000 --- a/icons/light/triangle-right.svg +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - image/svg+xml - - - - - - - triangle-right - Created with Sketch. - - - - - - - diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..42aaba3 --- /dev/null +++ b/jest.config.js @@ -0,0 +1,12 @@ +module.exports = { + moduleFileExtensions: [ + "ts", + "js", + ], + transform: { + "^.+\\.tsx?$": "ts-jest" + }, + testMatch: [ + "**/test/**/*.test.(ts|js)" + ], +}; diff --git a/languages/def-language-configuration.json b/languages/def-language-configuration.json deleted file mode 100644 index 53ccbd2..0000000 --- a/languages/def-language-configuration.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "comments": { - "lineComment": "//", - "blockComment": [ "/*", "*/" ] - }, - "brackets": [ - ["{", "}"], - ["[", "]"] - ], - "autoClosingPairs": [ - { "open": "{", "close": "}", "notIn": ["string"] }, - { "open": "[", "close": "]", "notIn": ["string"] }, - { "open": "(", "close": ")", "notIn": ["string"] }, - { "open": "'", "close": "'", "notIn": ["string"] }, - { "open": "\"", "close": "\"", "notIn": ["string", "comment"] }, - { "open": "`", "close": "`", "notIn": ["string", "comment"] } - ] -} \ No newline at end of file diff --git a/languages/psl-language-configuration.json b/languages/psl-language-configuration.json deleted file mode 100644 index 568db99..0000000 --- a/languages/psl-language-configuration.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "comments": { - // symbol used for single line comment. Remove this entry if your language does not support line comments - "lineComment": "//", - // symbols used for start and end a block comment. Remove this entry if your language does not support block comments - "blockComment": [ "/*", "*/" ] - }, - // symbols used as brackets - "brackets": [ - ["{", "}"], - ["(", ")"] - ], - // symbols that are auto closed when typing - "autoClosingPairs": [ - ["{", "}"], - ["(", ")"], - ["\"", "\""] - ], - // symbols that that can be used to surround a selection - "surroundingPairs": [ - ["{", "}"], - ["(", ")"], - ["\"", "\""] - ] -} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 21ad980..9d094a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,33 +1,30 @@ { - "name": "vscode-psl", - "version": "1.13.2", + "name": "psl-lint", + "version": "1.6.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "vscode-psl", - "version": "1.13.2", + "name": "psl-lint", + "version": "1.6.0", "license": "MIT", "dependencies": { + "commander": "^9.4.1", "fs-extra": "^10.1.0", - "jsonc-parser": "^3.2.0", "minimatch": "^5.1.0", - "request-light": "^0.5.8", - "vscode-json-languageservice": "^5.1.1" + "psl-parser": "^0.0.3" + }, + "bin": { + "psl-lint": "lib/cli.js" }, "devDependencies": { "@types/fs-extra": "^9.0.13", "@types/jest": "^29.2.0", - "@types/minimatch": "^5.1.2", "@types/node": "^18.11.4", - "@types/vscode": "^1.72.0", "jest": "^29.2.1", + "rimraf": "^3.0.2", "ts-jest": "^29.0.3", - "tslint": "^5.20.1", - "typescript": "^4.8.4" - }, - "engines": { - "vscode": "^1.72.2" + "tslint": "^5.20.1" } }, "node_modules/@ampproject/remapping": { @@ -56,30 +53,30 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.4.tgz", - "integrity": "sha512-CHIGpJcUQ5lU9KrPHTjBMhVwQG6CQjxfg36fGXl3qk/Gik1WwWachaXFuo0uCWJT/mStOKtcbFJCaVLihC1CMw==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.5.tgz", + "integrity": "sha512-KZXo2t10+/jxmkhNXc7pZTqRvSOIvVv/+lJwHS+B2rErwOyjuVRh60yVpb7liQ1U5t7lLJ1bz+t8tSypUZdm0g==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.19.6", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.6.tgz", - "integrity": "sha512-D2Ue4KHpc6Ys2+AxpIx1BZ8+UegLLLE2p3KJEuJRKmokHOtl49jQ5ny1773KsGLZs8MQvBidAF6yWUJxRqtKtg==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.5.tgz", + "integrity": "sha512-UdOWmk4pNWTm/4DlPUl/Pt4Gz4rcEMb7CY0Y3eJl5Yz1vI8ZJGmHWaVE55LoxRjdpx0z259GE9U5STA9atUinQ==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.6", - "@babel/helper-compilation-targets": "^7.19.3", - "@babel/helper-module-transforms": "^7.19.6", - "@babel/helpers": "^7.19.4", - "@babel/parser": "^7.19.6", + "@babel/generator": "^7.20.5", + "@babel/helper-compilation-targets": "^7.20.0", + "@babel/helper-module-transforms": "^7.20.2", + "@babel/helpers": "^7.20.5", + "@babel/parser": "^7.20.5", "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.6", - "@babel/types": "^7.19.4", + "@babel/traverse": "^7.20.5", + "@babel/types": "^7.20.5", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -94,45 +91,19 @@ "url": "https://opencollective.com/babel" } }, - "node_modules/@babel/core/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/@babel/core/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "node_modules/@babel/core/node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", "dev": true }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/@babel/generator": { - "version": "7.19.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.6.tgz", - "integrity": "sha512-oHGRUQeoX1QrKeJIKVe0hwjGqNnVYsM5Nep5zo0uE0m42sLH+Fsd2pStJ5sRM1bNyTUUoz0pe2lTeMJrb/taTA==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.5.tgz", + "integrity": "sha512-jl7JY2Ykn9S0yj4DQP82sYvPU+T3g0HFcWTqDLqiuA9tGRNIj9VfbtXGAYTTkyNEnQk1jkMGOdYka8aG/lulCA==", "dev": true, "dependencies": { - "@babel/types": "^7.19.4", + "@babel/types": "^7.20.5", "@jridgewell/gen-mapping": "^0.3.2", "jsesc": "^2.5.1" }, @@ -155,12 +126,12 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz", - "integrity": "sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==", + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.0.tgz", + "integrity": "sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.19.3", + "@babel/compat-data": "^7.20.0", "@babel/helper-validator-option": "^7.18.6", "browserslist": "^4.21.3", "semver": "^6.3.0" @@ -172,15 +143,6 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/@babel/helper-environment-visitor": { "version": "7.18.9", "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", @@ -228,40 +190,40 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.19.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.6.tgz", - "integrity": "sha512-fCmcfQo/KYr/VXXDIyd3CBGZ6AFhPFy1TfSEJ+PilGVlQT6jcbqtHAM4C1EciRqMza7/TpOUZliuSH+U6HAhJw==", + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.20.2.tgz", + "integrity": "sha512-zvBKyJXRbmK07XhMuujYoJ48B5yvvmM6+wcpv6Ivj4Yg6qO7NOZOSnvZN9CRl1zz1Z4cKf8YejmCMh8clOoOeA==", "dev": true, "dependencies": { "@babel/helper-environment-visitor": "^7.18.9", "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.19.4", + "@babel/helper-simple-access": "^7.20.2", "@babel/helper-split-export-declaration": "^7.18.6", "@babel/helper-validator-identifier": "^7.19.1", "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.6", - "@babel/types": "^7.19.4" + "@babel/traverse": "^7.20.1", + "@babel/types": "^7.20.2" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", - "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz", + "integrity": "sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-simple-access": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.19.4.tgz", - "integrity": "sha512-f9Xq6WqBFqaDfbCzn2w85hwklswz5qsKlh7f08w4Y9yhJHpnNC0QemtSkK5YyOY8kPGvyiwdzZksGUhnGdaUIg==", + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz", + "integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==", "dev": true, "dependencies": { - "@babel/types": "^7.19.4" + "@babel/types": "^7.20.2" }, "engines": { "node": ">=6.9.0" @@ -307,14 +269,14 @@ } }, "node_modules/@babel/helpers": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.4.tgz", - "integrity": "sha512-G+z3aOx2nfDHwX/kyVii5fJq+bgscg89/dJNWpYeKeBv3v9xX8EIabmx1k6u9LS04H7nROFVRVK+e3k0VHp+sw==", + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.6.tgz", + "integrity": "sha512-Pf/OjgfgFRW5bApskEz5pvidpim7tEDPlFtKcNRXWmfHGn9IEI2W2flqRQXTFb7gIPTyK++N6rVHuwKut4XK6w==", "dev": true, "dependencies": { "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.4", - "@babel/types": "^7.19.4" + "@babel/traverse": "^7.20.5", + "@babel/types": "^7.20.5" }, "engines": { "node": ">=6.9.0" @@ -334,10 +296,81 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/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": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/parser": { - "version": "7.19.6", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.6.tgz", - "integrity": "sha512-h1IUp81s2JYJ3mRkdxJgs4UvmSsRvDrx5ICSJbPvtWYv5i1nTBGcBpnog+89rAFMwvvru6E5NUHdBe01UeSzYA==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.5.tgz", + "integrity": "sha512-r27t/cy/m9uKLXQNWWebeCUHgnAZq0CpG1OwKRxzJMP1vpSU4bSIK2hq+/cp0bQxetkXx38n09rNu8jVkcK/zA==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -509,12 +542,12 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", - "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.20.0.tgz", + "integrity": "sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.19.0" }, "engines": { "node": ">=6.9.0" @@ -538,19 +571,19 @@ } }, "node_modules/@babel/traverse": { - "version": "7.19.6", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.6.tgz", - "integrity": "sha512-6l5HrUCzFM04mfbG09AagtYyR2P0B71B1wN7PfSPiksDPz2k5H9CBC1tcZpz2M8OxbKTPccByoOJ22rUKbpmQQ==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.5.tgz", + "integrity": "sha512-WM5ZNN3JITQIq9tFZaw1ojLU3WgWdtkxnhM1AegMS+PvHjkM5IXjmYEGY7yukz5XS4sJyEf2VzWjI8uAavhxBQ==", "dev": true, "dependencies": { "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.6", + "@babel/generator": "^7.20.5", "@babel/helper-environment-visitor": "^7.18.9", "@babel/helper-function-name": "^7.19.0", "@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.19.6", - "@babel/types": "^7.19.4", + "@babel/parser": "^7.20.5", + "@babel/types": "^7.20.5", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -558,33 +591,10 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/traverse/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/@babel/traverse/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "node_modules/@babel/types": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.4.tgz", - "integrity": "sha512-M5LK7nAeS6+9j7hAq+b3fQs+pNfUtTGq+yFFfHnauFA8zQtLRfmuipmsKDKKLuyG+wC8ABW43A153YNawNTEtw==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.5.tgz", + "integrity": "sha512-c9fst/h2/dcF7H+MJKZ2T0KjEQ8hY/BNnDk/H3XY8C4Aw/eWQXWn/lWntHF9ooUBnGmEvbfGrTgLWc+um0YDUg==", "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.19.4", @@ -627,103 +637,33 @@ } }, "node_modules/@jest/console": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.2.1.tgz", - "integrity": "sha512-MF8Adcw+WPLZGBiNxn76DOuczG3BhODTcMlDCA4+cFi41OkaY/lyI0XUUhi73F88Y+7IHoGmD80pN5CtxQUdSw==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.3.1.tgz", + "integrity": "sha512-IRE6GD47KwcqA09RIWrabKdHPiKDGgtAL31xDxbi/RjQMsr+lY+ppxmHwY0dUEV3qvvxZzoe5Hl0RXZJOjQNUg==", "dev": true, "dependencies": { - "@jest/types": "^29.2.1", + "@jest/types": "^29.3.1", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^29.2.1", - "jest-util": "^29.2.1", + "jest-message-util": "^29.3.1", + "jest-util": "^29.3.1", "slash": "^3.0.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/console/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/@jest/console/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/@jest/console/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/@jest/console/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/@jest/console/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/@jest/console/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/@jest/core": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.2.1.tgz", - "integrity": "sha512-kuLKYqnqgerXkBUwlHVxeSuhSnd+JMnMCLfU98bpacBSfWEJPegytDh3P2m15/JHzet32hGGld4KR4OzMb6/Tg==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.3.1.tgz", + "integrity": "sha512-0ohVjjRex985w5MmO5L3u5GR1O30DexhBSpuwx2P+9ftyqHdJXnk7IUWiP80oHMvt7ubHCJHxV0a0vlKVuZirw==", "dev": true, "dependencies": { - "@jest/console": "^29.2.1", - "@jest/reporters": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/console": "^29.3.1", + "@jest/reporters": "^29.3.1", + "@jest/test-result": "^29.3.1", + "@jest/transform": "^29.3.1", + "@jest/types": "^29.3.1", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", @@ -731,20 +671,20 @@ "exit": "^0.1.2", "graceful-fs": "^4.2.9", "jest-changed-files": "^29.2.0", - "jest-config": "^29.2.1", - "jest-haste-map": "^29.2.1", - "jest-message-util": "^29.2.1", + "jest-config": "^29.3.1", + "jest-haste-map": "^29.3.1", + "jest-message-util": "^29.3.1", "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.2.1", - "jest-resolve-dependencies": "^29.2.1", - "jest-runner": "^29.2.1", - "jest-runtime": "^29.2.1", - "jest-snapshot": "^29.2.1", - "jest-util": "^29.2.1", - "jest-validate": "^29.2.1", - "jest-watcher": "^29.2.1", + "jest-resolve": "^29.3.1", + "jest-resolve-dependencies": "^29.3.1", + "jest-runner": "^29.3.1", + "jest-runtime": "^29.3.1", + "jest-snapshot": "^29.3.1", + "jest-util": "^29.3.1", + "jest-validate": "^29.3.1", + "jest-watcher": "^29.3.1", "micromatch": "^4.0.4", - "pretty-format": "^29.2.1", + "pretty-format": "^29.3.1", "slash": "^3.0.0", "strip-ansi": "^6.0.0" }, @@ -760,159 +700,89 @@ } } }, - "node_modules/@jest/core/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/@jest/core/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/@jest/environment": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.3.1.tgz", + "integrity": "sha512-pMmvfOPmoa1c1QpfFW0nXYtNLpofqo4BrCIk6f2kW4JFeNlHV2t3vd+3iDLf31e2ot2Mec0uqZfmI+U0K2CFag==", "dev": true, "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "@jest/fake-timers": "^29.3.1", + "@jest/types": "^29.3.1", + "@types/node": "*", + "jest-mock": "^29.3.1" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/core/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/@jest/expect": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.3.1.tgz", + "integrity": "sha512-QivM7GlSHSsIAWzgfyP8dgeExPRZ9BIe2LsdPyEhCGkZkoyA+kGsoIzbKAfZCvvRzfZioKwPtCZIt5SaoxYCvg==", "dev": true, "dependencies": { - "color-name": "~1.1.4" + "expect": "^29.3.1", + "jest-snapshot": "^29.3.1" }, "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@jest/core/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/@jest/core/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": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/core/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/@jest/expect-utils": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.3.1.tgz", + "integrity": "sha512-wlrznINZI5sMjwvUoLVk617ll/UYfGIZNxmbU+Pa7wmkL4vYzhV9R2pwVqUh4NWWuLQWkI8+8mOkxs//prKQ3g==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" + "jest-get-type": "^29.2.0" }, "engines": { - "node": ">=8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/environment": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.2.1.tgz", - "integrity": "sha512-EutqA7T/X6zFjw6mAWRHND+ZkTPklmIEWCNbmwX6uCmOrFrWaLbDZjA+gePHJx6fFMMRvNfjXcvzXEtz54KPlg==", + "node_modules/@jest/fake-timers": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.3.1.tgz", + "integrity": "sha512-iHTL/XpnDlFki9Tq0Q1GGuVeQ8BHZGIYsvCO5eN/O/oJaRzofG9Xndd9HuSDBI/0ZS79pg0iwn07OMTQ7ngF2A==", "dev": true, "dependencies": { - "@jest/fake-timers": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/types": "^29.3.1", + "@sinonjs/fake-timers": "^9.1.2", "@types/node": "*", - "jest-mock": "^29.2.1" + "jest-message-util": "^29.3.1", + "jest-mock": "^29.3.1", + "jest-util": "^29.3.1" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/expect": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.2.1.tgz", - "integrity": "sha512-o14R2t2tHHHudwji43UKkzmmH49xfF5T++FQBK2tl88qwuBWQOcx7fNUYl+mA/9TPNAN0FkQ3usnpyS8FUwsvQ==", + "node_modules/@jest/globals": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.3.1.tgz", + "integrity": "sha512-cTicd134vOcwO59OPaB6AmdHQMCtWOe+/DitpTZVxWgMJ+YvXL1HNAmPyiGbSHmF/mXVBkvlm8YYtQhyHPnV6Q==", "dev": true, "dependencies": { - "expect": "^29.2.1", - "jest-snapshot": "^29.2.1" + "@jest/environment": "^29.3.1", + "@jest/expect": "^29.3.1", + "@jest/types": "^29.3.1", + "jest-mock": "^29.3.1" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/expect-utils": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.2.1.tgz", - "integrity": "sha512-yr4aHNg5Z1CjKby5ozm7sKjgBlCOorlAoFcvrOQ/4rbZRfgZQdnmh7cth192PYIgiPZo2bBXvqdOApnAMWFJZg==", - "dev": true, - "dependencies": { - "jest-get-type": "^29.2.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/fake-timers": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.2.1.tgz", - "integrity": "sha512-KWil+8fef7Uj/P/PTZlPKk1Pw117wAmr71VWFV8ZDtRtkwmTG8oY4IRf0Ss44J2y5CYRy8d/zLOhxyoGRENjvA==", - "dev": true, - "dependencies": { - "@jest/types": "^29.2.1", - "@sinonjs/fake-timers": "^9.1.2", - "@types/node": "*", - "jest-message-util": "^29.2.1", - "jest-mock": "^29.2.1", - "jest-util": "^29.2.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/globals": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.2.1.tgz", - "integrity": "sha512-Z4EejYPP1OPVq2abk1+9urAwJqkgw5jB2UJGlPjb5ZwzPQF8WLMcigKEfFzZb2OHhEVPP0RZD0/DbVTY1R6iQA==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.2.1", - "@jest/expect": "^29.2.1", - "@jest/types": "^29.2.1", - "jest-mock": "^29.2.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/reporters": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.2.1.tgz", - "integrity": "sha512-sCsfUKM/yIF4nNed3e/rIgVIS58EiASGMDEPWqItfLZ9UO1ALW2ASDNJzdWkxEt0T8o2Ztj619G0KKrvK+McAw==", + "node_modules/@jest/reporters": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.3.1.tgz", + "integrity": "sha512-GhBu3YFuDrcAYW/UESz1JphEAbvUjaY2vShRZRoRY1mxpCMB3yGSJ4j9n0GxVlEOdCf7qjvUfBCrTUUqhVfbRA==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/console": "^29.3.1", + "@jest/test-result": "^29.3.1", + "@jest/transform": "^29.3.1", + "@jest/types": "^29.3.1", "@jridgewell/trace-mapping": "^0.3.15", "@types/node": "*", "chalk": "^4.0.0", @@ -925,9 +795,9 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.2.1", - "jest-util": "^29.2.1", - "jest-worker": "^29.2.1", + "jest-message-util": "^29.3.1", + "jest-util": "^29.3.1", + "jest-worker": "^29.3.1", "slash": "^3.0.0", "string-length": "^4.0.1", "strip-ansi": "^6.0.0", @@ -945,76 +815,6 @@ } } }, - "node_modules/@jest/reporters/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/@jest/reporters/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/@jest/reporters/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/@jest/reporters/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/@jest/reporters/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/@jest/reporters/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/@jest/schemas": { "version": "29.0.0", "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz", @@ -1042,13 +842,13 @@ } }, "node_modules/@jest/test-result": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.2.1.tgz", - "integrity": "sha512-lS4+H+VkhbX6z64tZP7PAUwPqhwj3kbuEHcaLuaBuB+riyaX7oa1txe0tXgrFj5hRWvZKvqO7LZDlNWeJ7VTPA==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.3.1.tgz", + "integrity": "sha512-qeLa6qc0ddB0kuOZyZIhfN5q0e2htngokyTWsGriedsDhItisW7SDYZ7ceOe57Ii03sL988/03wAcBh3TChMGw==", "dev": true, "dependencies": { - "@jest/console": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/console": "^29.3.1", + "@jest/types": "^29.3.1", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, @@ -1057,14 +857,14 @@ } }, "node_modules/@jest/test-sequencer": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.2.1.tgz", - "integrity": "sha512-O/pnk0/xGj3lxPVNwB6HREJ7AYvUdyP2xo/s14/9Dtf091HoOeyIhWLKQE/4HzB8lNQBMo6J5mg0bHz/uCWK7w==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.3.1.tgz", + "integrity": "sha512-IqYvLbieTv20ArgKoAMyhLHNrVHJfzO6ARZAbQRlY4UGWfdDnLlZEF0BvKOMd77uIiIjSZRwq3Jb3Fa3I8+2UA==", "dev": true, "dependencies": { - "@jest/test-result": "^29.2.1", + "@jest/test-result": "^29.3.1", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.2.1", + "jest-haste-map": "^29.3.1", "slash": "^3.0.0" }, "engines": { @@ -1072,22 +872,22 @@ } }, "node_modules/@jest/transform": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.2.1.tgz", - "integrity": "sha512-xup+iEuaIRSQabQaeqxaQyN0vg1Dctrp9oTObQsNf3sZEowTIa5cANYuoyi8Tqhg4GCqEVLTf18KW7ii0UeFVA==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.3.1.tgz", + "integrity": "sha512-8wmCFBTVGYqFNLWfcOWoVuMuKYPUBTnTMDkdvFtAYELwDOl9RGwOsvQWGPFxDJ8AWY9xM/8xCXdqmPK3+Q5Lug==", "dev": true, "dependencies": { "@babel/core": "^7.11.6", - "@jest/types": "^29.2.1", + "@jest/types": "^29.3.1", "@jridgewell/trace-mapping": "^0.3.15", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", + "convert-source-map": "^2.0.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.2.1", + "jest-haste-map": "^29.3.1", "jest-regex-util": "^29.2.0", - "jest-util": "^29.2.1", + "jest-util": "^29.3.1", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", @@ -1097,80 +897,10 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/transform/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/@jest/transform/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/@jest/transform/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/@jest/transform/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/@jest/transform/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/@jest/transform/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/@jest/types": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.2.1.tgz", - "integrity": "sha512-O/QNDQODLnINEPAI0cl9U6zUIDXEWXt6IC1o2N2QENuos7hlGUIthlKyV4p6ki3TvXFX071blj8HUhgLGquPjw==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.3.1.tgz", + "integrity": "sha512-d0S0jmmTpjnhCmNpApgX3jrUZgZ22ivKJRvL2lli5hpCRoNnp1f85r2/wpKfXuYu8E7Jjh1hGfhPyup1NM5AmA==", "dev": true, "dependencies": { "@jest/schemas": "^29.0.0", @@ -1184,76 +914,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/types/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/@jest/types/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/@jest/types/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/@jest/types/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/@jest/types/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/@jest/types/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/@jridgewell/gen-mapping": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", @@ -1302,15 +962,15 @@ } }, "node_modules/@sinclair/typebox": { - "version": "0.24.50", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.50.tgz", - "integrity": "sha512-k8ETQOOQDg5FtK7y9KJWpsGLik+QlPmIi8zzl/dGUgshV2QitprkFlCR/AemjWOTyKn9UwSSGRTzLVotvgCjYQ==", + "version": "0.24.51", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.51.tgz", + "integrity": "sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA==", "dev": true }, "node_modules/@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", + "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", "dev": true, "dependencies": { "type-detect": "4.0.8" @@ -1326,9 +986,9 @@ } }, "node_modules/@types/babel__core": { - "version": "7.1.19", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", - "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", + "version": "7.1.20", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.20.tgz", + "integrity": "sha512-PVb6Bg2QuscZ30FvOU7z4guG6c926D9YRvOxEaelzndpMsvP+YM74Q/dAFASpg2l6+XLalxSGxcq/lrgYWZtyQ==", "dev": true, "dependencies": { "@babel/parser": "^7.1.0", @@ -1358,9 +1018,9 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.2.tgz", - "integrity": "sha512-FcFaxOr2V5KZCviw1TnutEMVUVsGt4D2hP1TAfXZAMKuHYW3xQhe3jTxNPWutgCJ3/X1c5yX8ZoGVEItxKbwBg==", + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.3.tgz", + "integrity": "sha512-1kbcJ40lLB7MHsj39U4Sh1uTd2E7rLEa79kmDpI6cy+XiXsteB3POdQomoq4FxszMrO3ZYchkhYJw7A2862b3w==", "dev": true, "dependencies": { "@babel/types": "^7.3.0" @@ -1409,25 +1069,19 @@ } }, "node_modules/@types/jest": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.2.0.tgz", - "integrity": "sha512-KO7bPV21d65PKwv3LLsD8Jn3E05pjNjRZvkm+YTacWhVmykAb07wW6IkZUmQAltwQafNcDUEUrMO2h3jeBSisg==", + "version": "29.2.4", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.2.4.tgz", + "integrity": "sha512-PipFB04k2qTRPePduVLTRiPzQfvMeLwUN3Z21hsAKaB/W9IIzgB2pizCL466ftJlcyZqnHoC9ZHpxLGl3fS86A==", "dev": true, "dependencies": { "expect": "^29.0.0", "pretty-format": "^29.0.0" } }, - "node_modules/@types/minimatch": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", - "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", - "dev": true - }, "node_modules/@types/node": { - "version": "18.11.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.4.tgz", - "integrity": "sha512-BxcJpBu8D3kv/GZkx/gSMz6VnTJREBj/4lbzYOQueUOELkt8WrO6zAcSPmp9uRPEW/d+lUO8QK0W2xnS1hEU0A==", + "version": "18.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.10.tgz", + "integrity": "sha512-juG3RWMBOqcOuXC643OAdSA525V44cVgGV6dUDuiFtss+8Fk5x1hI93Rsld43VeJVIeqlP9I7Fn9/qaVqoEAuQ==", "dev": true }, "node_modules/@types/prettier": { @@ -1442,16 +1096,10 @@ "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", "dev": true }, - "node_modules/@types/vscode": { - "version": "1.72.0", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.72.0.tgz", - "integrity": "sha512-WvHluhUo+lQvE3I4wUagRpnkHuysB4qSyOQUyIAS9n9PYMJjepzTUD8Jyks0YeXoPD0UGctjqp2u84/b3v6Ydw==", - "dev": true - }, "node_modules/@types/yargs": { - "version": "17.0.13", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz", - "integrity": "sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg==", + "version": "17.0.15", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.15.tgz", + "integrity": "sha512-ZHc4W2dnEQPfhn06TBEdWaiUHEZAocYaiVMfwOipY5jcJt/251wVrKCBWBetGZWO5CF8tdb7L3DmdxVlZ2BOIg==", "dev": true, "dependencies": { "@types/yargs-parser": "*" @@ -1488,21 +1136,24 @@ } }, "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "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": "^1.9.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "dependencies": { "normalize-path": "^3.0.0", @@ -1522,12 +1173,12 @@ } }, "node_modules/babel-jest": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.2.1.tgz", - "integrity": "sha512-gQJwArok0mqoREiCYhXKWOgUhElJj9DpnssW6GL8dG7ARYqHEhrM9fmPHTjdqEGRVXZAd6+imo3/Vwa8TjLcsw==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.3.1.tgz", + "integrity": "sha512-aard+xnMoxgjwV70t0L6wkW/3HQQtV+O0PEimxKgzNqCJnbYmroPojdP2tqKSOAt8QAKV/uSZU8851M7B5+fcA==", "dev": true, "dependencies": { - "@jest/transform": "^29.2.1", + "@jest/transform": "^29.3.1", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", "babel-preset-jest": "^29.2.0", @@ -1542,87 +1193,17 @@ "@babel/core": "^7.8.0" } }, - "node_modules/babel-jest/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==", + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/babel-jest/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/babel-jest/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/babel-jest/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/babel-jest/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/babel-jest/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/babel-plugin-istanbul": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", - "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" }, "engines": { "node": ">=8" @@ -1757,15 +1338,15 @@ } }, "node_modules/buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "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/builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "integrity": "sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ==", "dev": true, "engines": { "node": ">=0.10.0" @@ -1790,9 +1371,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001423", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001423.tgz", - "integrity": "sha512-09iwWGOlifvE1XuHokFMP7eR38a0JnajoyL3/i87c8ZjRWRrdKo1fqjNfugfBD0UDBIOz0U+jtNhJ0EPm1VleQ==", + "version": "1.0.30001436", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001436.tgz", + "integrity": "sha512-ZmWkKsnC2ifEPoWUvSAIGyOYwT+keAaaWPHiQ9DfMqS1t6tfuyFYoWR78TeZtznkEQ64+vGXH9cZrElwR2Mrxg==", "dev": true, "funding": [ { @@ -1806,17 +1387,19 @@ ] }, "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "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": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/char-regex": { @@ -1829,10 +1412,13 @@ } }, "node_modules/ci-info": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.5.0.tgz", - "integrity": "sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==", - "dev": true + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.7.0.tgz", + "integrity": "sha512-2CpRNYmImPx+RXKLq6jko/L07phmS9I02TyqkcNU20GCF/GgaWvc58hPtjxDX8lPpkdwc9sNh72V9k00S7ezog==", + "dev": true, + "engines": { + "node": ">=8" + } }, "node_modules/cjs-module-lexer": { "version": "1.2.2", @@ -1871,25 +1457,30 @@ "dev": true }, "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "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.3" + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "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/commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.1.tgz", + "integrity": "sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==", + "engines": { + "node": "^12.20.0 || >=14" + } }, "node_modules/concat-map": { "version": "0.0.1", @@ -1898,9 +1489,9 @@ "dev": true }, "node_modules/convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "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 }, "node_modules/cross-spawn": { @@ -1917,6 +1508,23 @@ "node": ">= 8" } }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, "node_modules/dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", @@ -1942,18 +1550,18 @@ } }, "node_modules/diff": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz", - "integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true, "engines": { "node": ">=0.3.1" } }, "node_modules/diff-sequences": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.2.0.tgz", - "integrity": "sha512-413SY5JpYeSBZxmenGEmCVQ8mCgtFJF0w9PROdaS6z987XC2Pd2GOKqOITLtMftmyFZqgtCOb/QA7/Z3ZXfzIw==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.3.1.tgz", + "integrity": "sha512-hlM3QR272NXCi4pq+N4Kok4kOp6EsgOM3ZSpJI7Da3UAs+Ttsi8MRmB6trM/lhyzUxGfOgnpkHtgqm5Q/CTcfQ==", "dev": true, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -1966,9 +1574,9 @@ "dev": true }, "node_modules/emittery": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", - "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", "dev": true, "engines": { "node": ">=12" @@ -2002,12 +1610,12 @@ } }, "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", "dev": true, "engines": { - "node": ">=0.8.0" + "node": ">=8" } }, "node_modules/esprima": { @@ -2056,16 +1664,16 @@ } }, "node_modules/expect": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.2.1.tgz", - "integrity": "sha512-BJtA754Fba0YWRWHgjKUMTA3ltWarKgITXHQnbZ2mTxTXC4yMQlR0FI7HkB3fJYkhWBf4qjNiqvg3LDtXCcVRQ==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.3.1.tgz", + "integrity": "sha512-gGb1yTgU30Q0O/tQq+z30KBWv24ApkMgFUpvKBkyLUBL68Wv8dHdJxTBZFl/iT8K/bqDHvUYRH6IIN3rToopPA==", "dev": true, "dependencies": { - "@jest/expect-utils": "^29.2.1", + "@jest/expect-utils": "^29.3.1", "jest-get-type": "^29.2.0", - "jest-matcher-utils": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-util": "^29.2.1" + "jest-matcher-utils": "^29.3.1", + "jest-message-util": "^29.3.1", + "jest-util": "^29.3.1" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" @@ -2127,7 +1735,7 @@ "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, "node_modules/fsevents": { @@ -2190,20 +1798,23 @@ } }, "node_modules/glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, "engines": { "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/glob/node_modules/brace-expansion": { @@ -2255,12 +1866,12 @@ } }, "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "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": ">=4" + "node": ">=8" } }, "node_modules/html-escaper": { @@ -2309,7 +1920,7 @@ "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, "dependencies": { "once": "^1.3.0", @@ -2410,15 +2021,6 @@ "node": ">=8" } }, - "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/istanbul-lib-report": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", @@ -2433,27 +2035,6 @@ "node": ">=8" } }, - "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, - "engines": { - "node": ">=8" - } - }, - "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, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/istanbul-lib-source-maps": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", @@ -2468,29 +2049,6 @@ "node": ">=10" } }, - "node_modules/istanbul-lib-source-maps/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/istanbul-lib-source-maps/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "node_modules/istanbul-reports": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", @@ -2505,15 +2063,15 @@ } }, "node_modules/jest": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.2.1.tgz", - "integrity": "sha512-K0N+7rx+fv3Us3KhuwRSJt55MMpZPs9Q3WSO/spRZSnsalX8yEYOTQ1PiSN7OvqzoRX4JEUXCbOJRlP4n8m5LA==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.3.1.tgz", + "integrity": "sha512-6iWfL5DTT0Np6UYs/y5Niu7WIfNv/wRTtN5RSXt2DIEft3dx3zPuw/3WJQBCJfmEzvDiEKwoqMbGD9n49+qLSA==", "dev": true, "dependencies": { - "@jest/core": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/core": "^29.3.1", + "@jest/types": "^29.3.1", "import-local": "^3.0.2", - "jest-cli": "^29.2.1" + "jest-cli": "^29.3.1" }, "bin": { "jest": "bin/jest.js" @@ -2544,28 +2102,28 @@ } }, "node_modules/jest-circus": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.2.1.tgz", - "integrity": "sha512-W+ZQQ5ln4Db2UZNM4NJIeasnhCdDhSuYW4eLgNAUi0XiSSpF634Kc5wiPvGiHvTgXMFVn1ZgWIijqhi9+kLNLg==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.3.1.tgz", + "integrity": "sha512-wpr26sEvwb3qQQbdlmei+gzp6yoSSoSL6GsLPxnuayZSMrSd5Ka7IjAvatpIernBvT2+Ic6RLTg+jSebScmasg==", "dev": true, "dependencies": { - "@jest/environment": "^29.2.1", - "@jest/expect": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/environment": "^29.3.1", + "@jest/expect": "^29.3.1", + "@jest/test-result": "^29.3.1", + "@jest/types": "^29.3.1", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", "is-generator-fn": "^2.0.0", - "jest-each": "^29.2.1", - "jest-matcher-utils": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-runtime": "^29.2.1", - "jest-snapshot": "^29.2.1", - "jest-util": "^29.2.1", + "jest-each": "^29.3.1", + "jest-matcher-utils": "^29.3.1", + "jest-message-util": "^29.3.1", + "jest-runtime": "^29.3.1", + "jest-snapshot": "^29.3.1", + "jest-util": "^29.3.1", "p-limit": "^3.1.0", - "pretty-format": "^29.2.1", + "pretty-format": "^29.3.1", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, @@ -2573,1468 +2131,488 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-circus/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==", + "node_modules/jest-cli": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.3.1.tgz", + "integrity": "sha512-TO/ewvwyvPOiBBuWZ0gm04z3WWP8TIK8acgPzE4IxgsLKQgb377NYGrQLc3Wl/7ndWzIH2CDNNsUjGxwLL43VQ==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" + "@jest/core": "^29.3.1", + "@jest/test-result": "^29.3.1", + "@jest/types": "^29.3.1", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "import-local": "^3.0.2", + "jest-config": "^29.3.1", + "jest-util": "^29.3.1", + "jest-validate": "^29.3.1", + "prompts": "^2.0.1", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" }, "engines": { - "node": ">=8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } } }, - "node_modules/jest-circus/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/jest-config": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.3.1.tgz", + "integrity": "sha512-y0tFHdj2WnTEhxmGUK1T7fgLen7YK4RtfvpLFBXfQkh2eMJAQq24Vx9472lvn5wg0MAO6B+iPfJfzdR9hJYalg==", "dev": true, "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.3.1", + "@jest/types": "^29.3.1", + "babel-jest": "^29.3.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.3.1", + "jest-environment-node": "^29.3.1", + "jest-get-type": "^29.2.0", + "jest-regex-util": "^29.2.0", + "jest-resolve": "^29.3.1", + "jest-runner": "^29.3.1", + "jest-util": "^29.3.1", + "jest-validate": "^29.3.1", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.3.1", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" }, "engines": { - "node": ">=10" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } } }, - "node_modules/jest-circus/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/jest-circus/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/jest-circus/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/jest-circus/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/jest-cli": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.2.1.tgz", - "integrity": "sha512-UIMD5aNqvPKpdlJSaeUAoLfxsh9TZvOkaMETx5qXnkboc317bcbb0eLHbIj8sFBHdcJAIAM+IRKnIU7Wi61MBw==", - "dev": true, - "dependencies": { - "@jest/core": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/types": "^29.2.1", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "import-local": "^3.0.2", - "jest-config": "^29.2.1", - "jest-util": "^29.2.1", - "jest-validate": "^29.2.1", - "prompts": "^2.0.1", - "yargs": "^17.3.1" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-cli/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/jest-cli/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/jest-cli/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/jest-cli/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/jest-cli/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/jest-cli/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/jest-config": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.2.1.tgz", - "integrity": "sha512-EV5F1tQYW/quZV2br2o88hnYEeRzG53Dfi6rSG3TZBuzGQ6luhQBux/RLlU5QrJjCdq3LXxRRM8F1LP6DN1ycA==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.2.1", - "@jest/types": "^29.2.1", - "babel-jest": "^29.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.2.1", - "jest-environment-node": "^29.2.1", - "jest-get-type": "^29.2.0", - "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.2.1", - "jest-runner": "^29.2.1", - "jest-util": "^29.2.1", - "jest-validate": "^29.2.1", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^29.2.1", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/jest-config/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/jest-config/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/jest-config/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/jest-config/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/jest-config/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/jest-config/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/jest-diff": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.2.1.tgz", - "integrity": "sha512-gfh/SMNlQmP3MOUgdzxPOd4XETDJifADpT937fN1iUGz+9DgOu2eUPHH25JDkLVcLwwqxv3GzVyK4VBUr9fjfA==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.2.0", - "jest-get-type": "^29.2.0", - "pretty-format": "^29.2.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-diff/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/jest-diff/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/jest-diff/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/jest-diff/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/jest-diff/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/jest-diff/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/jest-docblock": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.2.0.tgz", - "integrity": "sha512-bkxUsxTgWQGbXV5IENmfiIuqZhJcyvF7tU4zJ/7ioTutdz4ToB5Yx6JOFBpgI+TphRY4lhOyCWGNH/QFQh5T6A==", - "dev": true, - "dependencies": { - "detect-newline": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-each": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.2.1.tgz", - "integrity": "sha512-sGP86H/CpWHMyK3qGIGFCgP6mt+o5tu9qG4+tobl0LNdgny0aitLXs9/EBacLy3Bwqy+v4uXClqJgASJWcruYw==", - "dev": true, - "dependencies": { - "@jest/types": "^29.2.1", - "chalk": "^4.0.0", - "jest-get-type": "^29.2.0", - "jest-util": "^29.2.1", - "pretty-format": "^29.2.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-each/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/jest-each/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/jest-each/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/jest-each/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/jest-each/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/jest-each/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/jest-environment-node": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.2.1.tgz", - "integrity": "sha512-PulFKwEMz6nTAdLUwglFKei3b/LixwlRiqTN6nvPE1JtrLtlnpd6LXnFI1NFHYJGlTmIWilMP2n9jEtPPKX50g==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.2.1", - "@jest/fake-timers": "^29.2.1", - "@jest/types": "^29.2.1", - "@types/node": "*", - "jest-mock": "^29.2.1", - "jest-util": "^29.2.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-get-type": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.2.0.tgz", - "integrity": "sha512-uXNJlg8hKFEnDgFsrCjznB+sTxdkuqiCL6zMgA75qEbAJjJYTs9XPrvDctrEig2GDow22T/LvHgO57iJhXB/UA==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-haste-map": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.2.1.tgz", - "integrity": "sha512-wF460rAFmYc6ARcCFNw4MbGYQjYkvjovb9GBT+W10Um8q5nHq98jD6fHZMDMO3tA56S8XnmNkM8GcA8diSZfnA==", - "dev": true, - "dependencies": { - "@jest/types": "^29.2.1", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.2.0", - "jest-util": "^29.2.1", - "jest-worker": "^29.2.1", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } - }, - "node_modules/jest-leak-detector": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.2.1.tgz", - "integrity": "sha512-1YvSqYoiurxKOJtySc+CGVmw/e1v4yNY27BjWTVzp0aTduQeA7pdieLiW05wTYG/twlKOp2xS/pWuikQEmklug==", - "dev": true, - "dependencies": { - "jest-get-type": "^29.2.0", - "pretty-format": "^29.2.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-matcher-utils": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.2.1.tgz", - "integrity": "sha512-hUTBh7H/Mnb6GTpihbLh8uF5rjAMdekfW/oZNXUMAXi7bbmym2HiRpzgqf/zzkjgejMrVAkPdVSQj+32enlUww==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^29.2.1", - "jest-get-type": "^29.2.0", - "pretty-format": "^29.2.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-matcher-utils/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/jest-matcher-utils/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/jest-matcher-utils/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/jest-matcher-utils/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/jest-matcher-utils/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/jest-matcher-utils/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/jest-message-util": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.2.1.tgz", - "integrity": "sha512-Dx5nEjw9V8C1/Yj10S/8ivA8F439VS8vTq1L7hEgwHFn9ovSKNpYW/kwNh7UglaEgXO42XxzKJB+2x0nSglFVw==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.2.1", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.2.1", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-message-util/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/jest-message-util/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/jest-message-util/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/jest-message-util/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/jest-message-util/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/jest-message-util/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/jest-mock": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.2.1.tgz", - "integrity": "sha512-NDphaY/GqyQpTfnTZiTqqpMaw4Z0I7XnB7yBgrT6IwYrLGxpOhrejYr4ANY4YvO2sEGdd8Tx/6D0+WLQy7/qDA==", - "dev": true, - "dependencies": { - "@jest/types": "^29.2.1", - "@types/node": "*", - "jest-util": "^29.2.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", - "dev": true, - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" - }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } - } - }, - "node_modules/jest-regex-util": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.2.0.tgz", - "integrity": "sha512-6yXn0kg2JXzH30cr2NlThF+70iuO/3irbaB4mh5WyqNIvLLP+B6sFdluO1/1RJmslyh/f9osnefECflHvTbwVA==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.2.1.tgz", - "integrity": "sha512-1dJTW76Z9622Viq4yRcwBuEXuzGtE9B2kdl05RC8Om/lAzac9uEgC+M8Q5osVidbuBPmxm8wSrcItYhca2ZAtQ==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.2.1", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.2.1", - "jest-validate": "^29.2.1", - "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve-dependencies": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.2.1.tgz", - "integrity": "sha512-o3mUGX2j08usj1jIAIE8KmUVpqVAn54k80kI27ldbZf2oJn6eghhB6DvJxjrcH40va9CQgWTfU5f2Ag/MoUqgQ==", - "dev": true, - "dependencies": { - "jest-regex-util": "^29.2.0", - "jest-snapshot": "^29.2.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve/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/jest-resolve/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/jest-resolve/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/jest-resolve/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/jest-resolve/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/jest-resolve/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/jest-runner": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.2.1.tgz", - "integrity": "sha512-PojFI+uVhQ4u4YZKCN/a3yU0/l/pJJXhq1sW3JpCp8CyvGBYGddRFPKZ1WihApusxqWRTHjBJmGyPWv6Av2lWA==", - "dev": true, - "dependencies": { - "@jest/console": "^29.2.1", - "@jest/environment": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.10.2", - "graceful-fs": "^4.2.9", - "jest-docblock": "^29.2.0", - "jest-environment-node": "^29.2.1", - "jest-haste-map": "^29.2.1", - "jest-leak-detector": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-resolve": "^29.2.1", - "jest-runtime": "^29.2.1", - "jest-util": "^29.2.1", - "jest-watcher": "^29.2.1", - "jest-worker": "^29.2.1", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runner/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/jest-runner/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/jest-runner/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/jest-runner/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/jest-runner/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/jest-runner/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/jest-runtime": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.2.1.tgz", - "integrity": "sha512-PSQ880OoIW9y8E6/jjhGn3eQNgNc6ndMzCZaKqy357bv7FqCfSyYepu3yDC6Sp1Vkt+GhP2M/PVgldS2uZSFZg==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.2.1", - "@jest/fake-timers": "^29.2.1", - "@jest/globals": "^29.2.1", - "@jest/source-map": "^29.2.0", - "@jest/test-result": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", - "@types/node": "*", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-mock": "^29.2.1", - "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.2.1", - "jest-snapshot": "^29.2.1", - "jest-util": "^29.2.1", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runtime/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/jest-runtime/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/jest-runtime/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/jest-runtime/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/jest-runtime/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/jest-runtime/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/jest-snapshot": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.2.1.tgz", - "integrity": "sha512-KZdLD7iEz5M4ZYd+ezZ/kk73z+DtNbk/yJ4Qx7408Vb0CCuclJIZPa/HmIwSsCfIlOBNcYTKufr7x/Yv47oYlg==", + "node_modules/jest-diff": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.3.1.tgz", + "integrity": "sha512-vU8vyiO7568tmin2lA3r2DP8oRvzhvRcD4DjpXc6uGveQodyk7CKLhQlCSiwgx3g0pFaE88/KLZ0yaTWMc4Uiw==", "dev": true, "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^29.2.1", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.2.1", + "diff-sequences": "^29.3.1", "jest-get-type": "^29.2.0", - "jest-haste-map": "^29.2.1", - "jest-matcher-utils": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-util": "^29.2.1", - "natural-compare": "^1.4.0", - "pretty-format": "^29.2.1", - "semver": "^7.3.5" + "pretty-format": "^29.3.1" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-snapshot/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/jest-snapshot/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/jest-docblock": { + "version": "29.2.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.2.0.tgz", + "integrity": "sha512-bkxUsxTgWQGbXV5IENmfiIuqZhJcyvF7tU4zJ/7ioTutdz4ToB5Yx6JOFBpgI+TphRY4lhOyCWGNH/QFQh5T6A==", "dev": true, "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "detect-newline": "^3.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-snapshot/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/jest-each": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.3.1.tgz", + "integrity": "sha512-qrZH7PmFB9rEzCSl00BWjZYuS1BSOH8lLuC0azQE9lQrAx3PWGKHTDudQiOSwIy5dGAJh7KA0ScYlCP7JxvFYA==", "dev": true, "dependencies": { - "color-name": "~1.1.4" + "@jest/types": "^29.3.1", + "chalk": "^4.0.0", + "jest-get-type": "^29.2.0", + "jest-util": "^29.3.1", + "pretty-format": "^29.3.1" }, "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-snapshot/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/jest-snapshot/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": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "node_modules/jest-environment-node": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.3.1.tgz", + "integrity": "sha512-xm2THL18Xf5sIHoU7OThBPtuH6Lerd+Y1NLYiZJlkE3hbE+7N7r8uvHIl/FkZ5ymKXJe/11SQuf3fv4v6rUMag==", "dev": true, "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" + "@jest/environment": "^29.3.1", + "@jest/fake-timers": "^29.3.1", + "@jest/types": "^29.3.1", + "@types/node": "*", + "jest-mock": "^29.3.1", + "jest-util": "^29.3.1" }, "engines": { - "node": ">=10" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-snapshot/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/jest-get-type": { + "version": "29.2.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.2.0.tgz", + "integrity": "sha512-uXNJlg8hKFEnDgFsrCjznB+sTxdkuqiCL6zMgA75qEbAJjJYTs9XPrvDctrEig2GDow22T/LvHgO57iJhXB/UA==", "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, "engines": { - "node": ">=8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-util": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.2.1.tgz", - "integrity": "sha512-P5VWDj25r7kj7kl4pN2rG/RN2c1TLfYYYZYULnS/35nFDjBai+hBeo3MDrYZS7p6IoY3YHZnt2vq4L6mKnLk0g==", + "node_modules/jest-haste-map": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.3.1.tgz", + "integrity": "sha512-/FFtvoG1xjbbPXQLFef+WSU4yrc0fc0Dds6aRPBojUid7qlPqZvxdUBA03HW0fnVHXVCnCdkuoghYItKNzc/0A==", "dev": true, "dependencies": { - "@jest/types": "^29.2.1", + "@jest/types": "^29.3.1", + "@types/graceful-fs": "^4.1.3", "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" + "jest-regex-util": "^29.2.0", + "jest-util": "^29.3.1", + "jest-worker": "^29.3.1", + "micromatch": "^4.0.4", + "walker": "^1.0.8" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-util/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/jest-util/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" + "optionalDependencies": { + "fsevents": "^2.3.2" } }, - "node_modules/jest-util/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/jest-leak-detector": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.3.1.tgz", + "integrity": "sha512-3DA/VVXj4zFOPagGkuqHnSQf1GZBmmlagpguxEERO6Pla2g84Q1MaVIB3YMxgUaFIaYag8ZnTyQgiZ35YEqAQA==", "dev": true, "dependencies": { - "color-name": "~1.1.4" + "jest-get-type": "^29.2.0", + "pretty-format": "^29.3.1" }, "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-util/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/jest-util/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": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-util/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/jest-matcher-utils": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.3.1.tgz", + "integrity": "sha512-fkRMZUAScup3txIKfMe3AIZZmPEjWEdsPJFK3AIy5qRohWqQFg1qrmKfYXR9qEkNc7OdAu2N4KPHibEmy4HPeQ==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" + "chalk": "^4.0.0", + "jest-diff": "^29.3.1", + "jest-get-type": "^29.2.0", + "pretty-format": "^29.3.1" }, "engines": { - "node": ">=8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-validate": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.2.1.tgz", - "integrity": "sha512-DZVX5msG6J6DL5vUUw+++6LEkXUsPwB5R7fsfM7BXdz2Ipr0Ib046ak+8egrwAR++pvSM/5laxLK977ieIGxkQ==", + "node_modules/jest-message-util": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.3.1.tgz", + "integrity": "sha512-lMJTbgNcDm5z+6KDxWtqOFWlGQxD6XaYwBqHR8kmpkP+WWWG90I35kdtQHY67Ay5CSuydkTBbJG+tH9JShFCyA==", "dev": true, "dependencies": { - "@jest/types": "^29.2.1", - "camelcase": "^6.2.0", + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.3.1", + "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", - "jest-get-type": "^29.2.0", - "leven": "^3.1.0", - "pretty-format": "^29.2.1" + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.3.1", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-validate/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==", + "node_modules/jest-mock": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.3.1.tgz", + "integrity": "sha512-H8/qFDtDVMFvFP4X8NuOT3XRDzOUTz+FeACjufHzsOIBAxivLqkB1PoLCaJx9iPPQ8dZThHPp/G3WRWyMgA3JA==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" + "@jest/types": "^29.3.1", + "@types/node": "*", + "jest-util": "^29.3.1" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-validate/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", "dev": true, "engines": { - "node": ">=10" + "node": ">=6" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } } }, - "node_modules/jest-validate/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/jest-regex-util": { + "version": "29.2.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.2.0.tgz", + "integrity": "sha512-6yXn0kg2JXzH30cr2NlThF+70iuO/3irbaB4mh5WyqNIvLLP+B6sFdluO1/1RJmslyh/f9osnefECflHvTbwVA==", "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" + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-validate/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/jest-resolve": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.3.1.tgz", + "integrity": "sha512-amXJgH/Ng712w3Uz5gqzFBBjxV8WFLSmNjoreBGMqxgCz5cH7swmBZzgBaCIOsvb0NbpJ0vgaSFdJqMdT+rADw==", "dev": true, "dependencies": { - "color-name": "~1.1.4" + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.3.1", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.3.1", + "jest-validate": "^29.3.1", + "resolve": "^1.20.0", + "resolve.exports": "^1.1.0", + "slash": "^3.0.0" }, "engines": { - "node": ">=7.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-validate/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/jest-validate/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/jest-resolve-dependencies": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.3.1.tgz", + "integrity": "sha512-Vk0cYq0byRw2WluNmNWGqPeRnZ3p3hHmjJMp2dyyZeYIfiBskwq4rpiuGFR6QGAdbj58WC7HN4hQHjf2mpvrLA==", "dev": true, + "dependencies": { + "jest-regex-util": "^29.2.0", + "jest-snapshot": "^29.3.1" + }, "engines": { - "node": ">=8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-validate/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/jest-runner": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.3.1.tgz", + "integrity": "sha512-oFvcwRNrKMtE6u9+AQPMATxFcTySyKfLhvso7Sdk/rNpbhg4g2GAGCopiInk1OP4q6gz3n6MajW4+fnHWlU3bA==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" + "@jest/console": "^29.3.1", + "@jest/environment": "^29.3.1", + "@jest/test-result": "^29.3.1", + "@jest/transform": "^29.3.1", + "@jest/types": "^29.3.1", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.2.0", + "jest-environment-node": "^29.3.1", + "jest-haste-map": "^29.3.1", + "jest-leak-detector": "^29.3.1", + "jest-message-util": "^29.3.1", + "jest-resolve": "^29.3.1", + "jest-runtime": "^29.3.1", + "jest-util": "^29.3.1", + "jest-watcher": "^29.3.1", + "jest-worker": "^29.3.1", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" }, "engines": { - "node": ">=8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-watcher": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.2.1.tgz", - "integrity": "sha512-7jFaHUaRq50l4w/f6RuY713bvI5XskMmjWCE54NGYcY74fLkShS8LucXJke1QfGnwDSCoIqGnGGGKPwdaBYz2Q==", + "node_modules/jest-runtime": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.3.1.tgz", + "integrity": "sha512-jLzkIxIqXwBEOZx7wx9OO9sxoZmgT2NhmQKzHQm1xwR1kNW/dn0OjxR424VwHHf1SPN6Qwlb5pp1oGCeFTQ62A==", "dev": true, "dependencies": { - "@jest/test-result": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/environment": "^29.3.1", + "@jest/fake-timers": "^29.3.1", + "@jest/globals": "^29.3.1", + "@jest/source-map": "^29.2.0", + "@jest/test-result": "^29.3.1", + "@jest/transform": "^29.3.1", + "@jest/types": "^29.3.1", "@types/node": "*", - "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "emittery": "^0.10.2", - "jest-util": "^29.2.1", - "string-length": "^4.0.1" + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.3.1", + "jest-message-util": "^29.3.1", + "jest-mock": "^29.3.1", + "jest-regex-util": "^29.2.0", + "jest-resolve": "^29.3.1", + "jest-snapshot": "^29.3.1", + "jest-util": "^29.3.1", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-watcher/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==", + "node_modules/jest-snapshot": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.3.1.tgz", + "integrity": "sha512-+3JOc+s28upYLI2OJM4PWRGK9AgpsMs/ekNryUV0yMBClT9B1DF2u2qay8YxcQd338PPYSFNb0lsar1B49sLDA==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.3.1", + "@jest/transform": "^29.3.1", + "@jest/types": "^29.3.1", + "@types/babel__traverse": "^7.0.6", + "@types/prettier": "^2.1.5", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.3.1", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.3.1", + "jest-get-type": "^29.2.0", + "jest-haste-map": "^29.3.1", + "jest-matcher-utils": "^29.3.1", + "jest-message-util": "^29.3.1", + "jest-util": "^29.3.1", + "natural-compare": "^1.4.0", + "pretty-format": "^29.3.1", + "semver": "^7.3.5" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-watcher/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/jest-snapshot/node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dev": true, "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/jest-watcher/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/jest-util": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.3.1.tgz", + "integrity": "sha512-7YOVZaiX7RJLv76ZfHt4nbNEzzTRiMW/IiOG7ZOKmTXmoGBxUDefgMAxQubu6WPVqP5zSzAdZG0FfLcC7HOIFQ==", "dev": true, "dependencies": { - "color-name": "~1.1.4" + "@jest/types": "^29.3.1", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" }, "engines": { - "node": ">=7.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-watcher/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/jest-validate": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.3.1.tgz", + "integrity": "sha512-N9Lr3oYR2Mpzuelp1F8negJR3YE+L1ebk1rYA5qYo9TTY3f9OWdptLoNSPP9itOCBIRBqjt/S5XHlzYglLN67g==", + "dev": true, + "dependencies": { + "@jest/types": "^29.3.1", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.2.0", + "leven": "^3.1.0", + "pretty-format": "^29.3.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } }, - "node_modules/jest-watcher/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/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-watcher/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/jest-watcher": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.3.1.tgz", + "integrity": "sha512-RspXG2BQFDsZSRKGCT/NiNa8RkQ1iKAjrO0//soTMWx/QUt+OcxMqMSBxz23PYGqUuWm2+m2mNNsmj0eIoOaFg==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" + "@jest/test-result": "^29.3.1", + "@jest/types": "^29.3.1", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.3.1", + "string-length": "^4.0.1" }, "engines": { - "node": ">=8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-worker": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.2.1.tgz", - "integrity": "sha512-ROHTZ+oj7sBrgtv46zZ84uWky71AoYi0vEV9CdEtc1FQunsoAGe5HbQmW76nI5QWdvECVPrSi1MCVUmizSavMg==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.3.1.tgz", + "integrity": "sha512-lY4AnnmsEWeiXirAIA0c9SDPbuCBq8IYuDVL8PMm0MZ2PEs2yPvRA/J64QBXuZp7CYKrDM/rmNrc9/i3KJQncw==", "dev": true, "dependencies": { "@types/node": "*", - "jest-util": "^29.2.1", + "jest-util": "^29.3.1", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" }, @@ -4042,15 +2620,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-worker/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/jest-worker/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -4073,9 +2642,9 @@ "dev": true }, "node_modules/js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, "dependencies": { "argparse": "^1.0.7", @@ -4115,11 +2684,6 @@ "node": ">=6" } }, - "node_modules/jsonc-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", - "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==" - }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -4200,15 +2764,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -4253,9 +2808,9 @@ } }, "node_modules/minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.1.tgz", + "integrity": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -4273,17 +2828,23 @@ } }, "node_modules/mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", "dev": true, "dependencies": { - "minimist": "^1.2.5" + "minimist": "^1.2.6" }, "bin": { "mkdirp": "bin/cmd.js" } }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -4326,7 +2887,7 @@ "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "dependencies": { "wrappy": "1" @@ -4428,7 +2989,7 @@ "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, "engines": { "node": ">=0.10.0" @@ -4489,9 +3050,9 @@ } }, "node_modules/pretty-format": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.2.1.tgz", - "integrity": "sha512-Y41Sa4aLCtKAXvwuIpTvcFBkyeYp2gdFWzXGA+ZNES3VwURIB165XO/z7CjETwzCCS53MjW/rLMyyqEnTtaOfA==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.3.1.tgz", + "integrity": "sha512-FyLnmb1cYJV8biEIiRyzRFvs2lry7PPIvOqKVe1GCUEYg4YGmlx1qG9EJNMxArYm7piII4qb8UV1Pncq5dxmcg==", "dev": true, "dependencies": { "@jest/schemas": "^29.0.0", @@ -4527,17 +3088,46 @@ "node": ">= 6" } }, + "node_modules/psl-parser": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/psl-parser/-/psl-parser-0.0.3.tgz", + "integrity": "sha512-EvZqWXIpleJ0cbW7+3QbSq14NJkG6jYmedL23kqThQVVcZEgjGpAy04h3AXrIudya9IgMEDK7uOf+I6t2+No0Q==", + "dependencies": { + "fs-extra": "^5.0.0" + } + }, + "node_modules/psl-parser/node_modules/fs-extra": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", + "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "node_modules/psl-parser/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/psl-parser/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/react-is": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", "dev": true }, - "node_modules/request-light": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/request-light/-/request-light-0.5.8.tgz", - "integrity": "sha512-3Zjgh+8b5fhRJBQZoy+zbVKpAQGLyka0MPgW3zruTF4dFFJ8Fqcfu9YsAvi/rvdcaTeWG3MkbZv4WKxAn/84Lg==" - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -4594,13 +3184,28 @@ "node": ">=10" } }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true, "bin": { - "semver": "bin/semver" + "semver": "bin/semver.js" } }, "node_modules/shebang-command": { @@ -4667,13 +3272,13 @@ "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, "node_modules/stack-utils": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", - "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, "dependencies": { "escape-string-regexp": "^2.0.0" @@ -4682,15 +3287,6 @@ "node": ">=10" } }, - "node_modules/stack-utils/node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -4761,15 +3357,15 @@ } }, "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==", + "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": "^3.0.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/supports-preserve-symlinks-flag": { @@ -4891,9 +3487,9 @@ } }, "node_modules/ts-jest/node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -4906,9 +3502,9 @@ } }, "node_modules/tslib": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", - "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, "node_modules/tslint": { @@ -4941,14 +3537,79 @@ "typescript": ">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev" } }, - "node_modules/tslint/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "node_modules/tslint/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/tslint/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tslint/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "color-name": "1.1.3" + } + }, + "node_modules/tslint/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/tslint/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/tslint/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/tslint/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" } }, "node_modules/tslint/node_modules/minimatch": { @@ -4963,6 +3624,27 @@ "node": "*" } }, + "node_modules/tslint/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_modules/tslint/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": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/tsutils": { "version": "2.29.0", "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", @@ -4997,10 +3679,11 @@ } }, "node_modules/typescript": { - "version": "4.8.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", - "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz", + "integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==", "dev": true, + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -5057,37 +3740,11 @@ "node": ">=10.12.0" } }, - "node_modules/vscode-json-languageservice": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-5.1.1.tgz", - "integrity": "sha512-EtAcTD6MOfyf8+MokDsAHNM7ttuZvCo077w9aMtJiyps41gkOcoBThAbXDk6Y0Oi6ki5aDs8lgY4KxYiVW/lxA==", - "dependencies": { - "jsonc-parser": "^3.2.0", - "vscode-languageserver-textdocument": "^1.0.7", - "vscode-languageserver-types": "^3.17.2", - "vscode-nls": "^5.2.0", - "vscode-uri": "^3.0.6" - } - }, - "node_modules/vscode-languageserver-textdocument": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.7.tgz", - "integrity": "sha512-bFJH7UQxlXT8kKeyiyu41r22jCZXG8kuuVVA33OEJn1diWOZK5n8zBSPZFHVBOu8kXZ6h0LIRhf5UnCo61J4Hg==" - }, - "node_modules/vscode-languageserver-types": { - "version": "3.17.2", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.2.tgz", - "integrity": "sha512-zHhCWatviizPIq9B7Vh9uvrH6x3sK8itC84HkamnBWoDFJtzBf7SWlpLCZUit72b3os45h6RWQNC9xHRDF8dRA==" - }, - "node_modules/vscode-nls": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-5.2.0.tgz", - "integrity": "sha512-RAaHx7B14ZU04EU31pT+rKz2/zSl7xMsfIZuo8pd+KZO6PXtQmpevpq3vxvWNcrGbdmhM/rr5Uw5Mz+NBfhVng==" - }, - "node_modules/vscode-uri": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.6.tgz", - "integrity": "sha512-fmL7V1eiDBFRRnu+gfRWTzyPpNIHJTc4mWnFkwBUmO9U3KPgJAmTx7oxi2bl/Rh6HLdU7+4C9wlj0k2E4AdKFQ==" + "node_modules/v8-to-istanbul/node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true }, "node_modules/walker": { "version": "1.0.8", @@ -5130,43 +3787,10 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "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", - "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/wrap-ansi/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/wrap-ansi/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/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, "node_modules/write-file-atomic": { @@ -5198,9 +3822,9 @@ "dev": true }, "node_modules/yargs": { - "version": "17.6.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.0.tgz", - "integrity": "sha512-8H/wTDqlSwoSnScvV2N/JHfLWOKuh5MVla9hqLjK3nsfyy6Y4kDSYSvkU5YCUEPOSnRXfIyx3Sq+B/IWudTo4g==", + "version": "17.6.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz", + "integrity": "sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw==", "dev": true, "dependencies": { "cliui": "^8.0.1", @@ -5209,7 +3833,7 @@ "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" + "yargs-parser": "^21.1.1" }, "engines": { "node": ">=12" @@ -5258,27 +3882,27 @@ } }, "@babel/compat-data": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.4.tgz", - "integrity": "sha512-CHIGpJcUQ5lU9KrPHTjBMhVwQG6CQjxfg36fGXl3qk/Gik1WwWachaXFuo0uCWJT/mStOKtcbFJCaVLihC1CMw==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.5.tgz", + "integrity": "sha512-KZXo2t10+/jxmkhNXc7pZTqRvSOIvVv/+lJwHS+B2rErwOyjuVRh60yVpb7liQ1U5t7lLJ1bz+t8tSypUZdm0g==", "dev": true }, "@babel/core": { - "version": "7.19.6", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.19.6.tgz", - "integrity": "sha512-D2Ue4KHpc6Ys2+AxpIx1BZ8+UegLLLE2p3KJEuJRKmokHOtl49jQ5ny1773KsGLZs8MQvBidAF6yWUJxRqtKtg==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.5.tgz", + "integrity": "sha512-UdOWmk4pNWTm/4DlPUl/Pt4Gz4rcEMb7CY0Y3eJl5Yz1vI8ZJGmHWaVE55LoxRjdpx0z259GE9U5STA9atUinQ==", "dev": true, "requires": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.6", - "@babel/helper-compilation-targets": "^7.19.3", - "@babel/helper-module-transforms": "^7.19.6", - "@babel/helpers": "^7.19.4", - "@babel/parser": "^7.19.6", + "@babel/generator": "^7.20.5", + "@babel/helper-compilation-targets": "^7.20.0", + "@babel/helper-module-transforms": "^7.20.2", + "@babel/helpers": "^7.20.5", + "@babel/parser": "^7.20.5", "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.6", - "@babel/types": "^7.19.4", + "@babel/traverse": "^7.20.5", + "@babel/types": "^7.20.5", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -5286,36 +3910,21 @@ "semver": "^6.3.0" }, "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", "dev": true } } }, "@babel/generator": { - "version": "7.19.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.19.6.tgz", - "integrity": "sha512-oHGRUQeoX1QrKeJIKVe0hwjGqNnVYsM5Nep5zo0uE0m42sLH+Fsd2pStJ5sRM1bNyTUUoz0pe2lTeMJrb/taTA==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.5.tgz", + "integrity": "sha512-jl7JY2Ykn9S0yj4DQP82sYvPU+T3g0HFcWTqDLqiuA9tGRNIj9VfbtXGAYTTkyNEnQk1jkMGOdYka8aG/lulCA==", "dev": true, "requires": { - "@babel/types": "^7.19.4", + "@babel/types": "^7.20.5", "@jridgewell/gen-mapping": "^0.3.2", "jsesc": "^2.5.1" }, @@ -5334,23 +3943,15 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.19.3", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz", - "integrity": "sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==", + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.0.tgz", + "integrity": "sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ==", "dev": true, "requires": { - "@babel/compat-data": "^7.19.3", + "@babel/compat-data": "^7.20.0", "@babel/helper-validator-option": "^7.18.6", "browserslist": "^4.21.3", "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } } }, "@babel/helper-environment-visitor": { @@ -5388,34 +3989,34 @@ } }, "@babel/helper-module-transforms": { - "version": "7.19.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.6.tgz", - "integrity": "sha512-fCmcfQo/KYr/VXXDIyd3CBGZ6AFhPFy1TfSEJ+PilGVlQT6jcbqtHAM4C1EciRqMza7/TpOUZliuSH+U6HAhJw==", + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.20.2.tgz", + "integrity": "sha512-zvBKyJXRbmK07XhMuujYoJ48B5yvvmM6+wcpv6Ivj4Yg6qO7NOZOSnvZN9CRl1zz1Z4cKf8YejmCMh8clOoOeA==", "dev": true, "requires": { "@babel/helper-environment-visitor": "^7.18.9", "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.19.4", + "@babel/helper-simple-access": "^7.20.2", "@babel/helper-split-export-declaration": "^7.18.6", "@babel/helper-validator-identifier": "^7.19.1", "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.6", - "@babel/types": "^7.19.4" + "@babel/traverse": "^7.20.1", + "@babel/types": "^7.20.2" } }, "@babel/helper-plugin-utils": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz", - "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==", + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz", + "integrity": "sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==", "dev": true }, "@babel/helper-simple-access": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.19.4.tgz", - "integrity": "sha512-f9Xq6WqBFqaDfbCzn2w85hwklswz5qsKlh7f08w4Y9yhJHpnNC0QemtSkK5YyOY8kPGvyiwdzZksGUhnGdaUIg==", + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz", + "integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==", "dev": true, "requires": { - "@babel/types": "^7.19.4" + "@babel/types": "^7.20.2" } }, "@babel/helper-split-export-declaration": { @@ -5446,14 +4047,14 @@ "dev": true }, "@babel/helpers": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.4.tgz", - "integrity": "sha512-G+z3aOx2nfDHwX/kyVii5fJq+bgscg89/dJNWpYeKeBv3v9xX8EIabmx1k6u9LS04H7nROFVRVK+e3k0VHp+sw==", + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.6.tgz", + "integrity": "sha512-Pf/OjgfgFRW5bApskEz5pvidpim7tEDPlFtKcNRXWmfHGn9IEI2W2flqRQXTFb7gIPTyK++N6rVHuwKut4XK6w==", "dev": true, "requires": { "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.4", - "@babel/types": "^7.19.4" + "@babel/traverse": "^7.20.5", + "@babel/types": "^7.20.5" } }, "@babel/highlight": { @@ -5465,12 +4066,70 @@ "@babel/helper-validator-identifier": "^7.18.6", "chalk": "^2.0.0", "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "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, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "@babel/parser": { - "version": "7.19.6", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.6.tgz", - "integrity": "sha512-h1IUp81s2JYJ3mRkdxJgs4UvmSsRvDrx5ICSJbPvtWYv5i1nTBGcBpnog+89rAFMwvvru6E5NUHdBe01UeSzYA==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.5.tgz", + "integrity": "sha512-r27t/cy/m9uKLXQNWWebeCUHgnAZq0CpG1OwKRxzJMP1vpSU4bSIK2hq+/cp0bQxetkXx38n09rNu8jVkcK/zA==", "dev": true }, "@babel/plugin-syntax-async-generators": { @@ -5591,12 +4250,12 @@ } }, "@babel/plugin-syntax-typescript": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", - "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.20.0.tgz", + "integrity": "sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.19.0" } }, "@babel/template": { @@ -5611,44 +4270,27 @@ } }, "@babel/traverse": { - "version": "7.19.6", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.19.6.tgz", - "integrity": "sha512-6l5HrUCzFM04mfbG09AagtYyR2P0B71B1wN7PfSPiksDPz2k5H9CBC1tcZpz2M8OxbKTPccByoOJ22rUKbpmQQ==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.5.tgz", + "integrity": "sha512-WM5ZNN3JITQIq9tFZaw1ojLU3WgWdtkxnhM1AegMS+PvHjkM5IXjmYEGY7yukz5XS4sJyEf2VzWjI8uAavhxBQ==", "dev": true, "requires": { "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.19.6", + "@babel/generator": "^7.20.5", "@babel/helper-environment-visitor": "^7.18.9", "@babel/helper-function-name": "^7.19.0", "@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.19.6", - "@babel/types": "^7.19.4", + "@babel/parser": "^7.20.5", + "@babel/types": "^7.20.5", "debug": "^4.1.0", "globals": "^11.1.0" - }, - "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } } }, "@babel/types": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.4.tgz", - "integrity": "sha512-M5LK7nAeS6+9j7hAq+b3fQs+pNfUtTGq+yFFfHnauFA8zQtLRfmuipmsKDKKLuyG+wC8ABW43A153YNawNTEtw==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.5.tgz", + "integrity": "sha512-c9fst/h2/dcF7H+MJKZ2T0KjEQ8hY/BNnDk/H3XY8C4Aw/eWQXWn/lWntHF9ooUBnGmEvbfGrTgLWc+um0YDUg==", "dev": true, "requires": { "@babel/helper-string-parser": "^7.19.4", @@ -5682,81 +4324,30 @@ "dev": true }, "@jest/console": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.2.1.tgz", - "integrity": "sha512-MF8Adcw+WPLZGBiNxn76DOuczG3BhODTcMlDCA4+cFi41OkaY/lyI0XUUhi73F88Y+7IHoGmD80pN5CtxQUdSw==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.3.1.tgz", + "integrity": "sha512-IRE6GD47KwcqA09RIWrabKdHPiKDGgtAL31xDxbi/RjQMsr+lY+ppxmHwY0dUEV3qvvxZzoe5Hl0RXZJOjQNUg==", "dev": true, "requires": { - "@jest/types": "^29.2.1", + "@jest/types": "^29.3.1", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^29.2.1", - "jest-util": "^29.2.1", + "jest-message-util": "^29.3.1", + "jest-util": "^29.3.1", "slash": "^3.0.0" - }, - "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 - }, - "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" - } - } } }, "@jest/core": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.2.1.tgz", - "integrity": "sha512-kuLKYqnqgerXkBUwlHVxeSuhSnd+JMnMCLfU98bpacBSfWEJPegytDh3P2m15/JHzet32hGGld4KR4OzMb6/Tg==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.3.1.tgz", + "integrity": "sha512-0ohVjjRex985w5MmO5L3u5GR1O30DexhBSpuwx2P+9ftyqHdJXnk7IUWiP80oHMvt7ubHCJHxV0a0vlKVuZirw==", "dev": true, "requires": { - "@jest/console": "^29.2.1", - "@jest/reporters": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/console": "^29.3.1", + "@jest/reporters": "^29.3.1", + "@jest/test-result": "^29.3.1", + "@jest/transform": "^29.3.1", + "@jest/types": "^29.3.1", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", @@ -5764,213 +4355,111 @@ "exit": "^0.1.2", "graceful-fs": "^4.2.9", "jest-changed-files": "^29.2.0", - "jest-config": "^29.2.1", - "jest-haste-map": "^29.2.1", - "jest-message-util": "^29.2.1", + "jest-config": "^29.3.1", + "jest-haste-map": "^29.3.1", + "jest-message-util": "^29.3.1", "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.2.1", - "jest-resolve-dependencies": "^29.2.1", - "jest-runner": "^29.2.1", - "jest-runtime": "^29.2.1", - "jest-snapshot": "^29.2.1", - "jest-util": "^29.2.1", - "jest-validate": "^29.2.1", - "jest-watcher": "^29.2.1", + "jest-resolve": "^29.3.1", + "jest-resolve-dependencies": "^29.3.1", + "jest-runner": "^29.3.1", + "jest-runtime": "^29.3.1", + "jest-snapshot": "^29.3.1", + "jest-util": "^29.3.1", + "jest-validate": "^29.3.1", + "jest-watcher": "^29.3.1", "micromatch": "^4.0.4", - "pretty-format": "^29.2.1", + "pretty-format": "^29.3.1", "slash": "^3.0.0", "strip-ansi": "^6.0.0" - }, - "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 - }, - "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" - } - } } }, "@jest/environment": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.2.1.tgz", - "integrity": "sha512-EutqA7T/X6zFjw6mAWRHND+ZkTPklmIEWCNbmwX6uCmOrFrWaLbDZjA+gePHJx6fFMMRvNfjXcvzXEtz54KPlg==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.3.1.tgz", + "integrity": "sha512-pMmvfOPmoa1c1QpfFW0nXYtNLpofqo4BrCIk6f2kW4JFeNlHV2t3vd+3iDLf31e2ot2Mec0uqZfmI+U0K2CFag==", "dev": true, "requires": { - "@jest/fake-timers": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/fake-timers": "^29.3.1", + "@jest/types": "^29.3.1", "@types/node": "*", - "jest-mock": "^29.2.1" + "jest-mock": "^29.3.1" } }, "@jest/expect": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.2.1.tgz", - "integrity": "sha512-o14R2t2tHHHudwji43UKkzmmH49xfF5T++FQBK2tl88qwuBWQOcx7fNUYl+mA/9TPNAN0FkQ3usnpyS8FUwsvQ==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.3.1.tgz", + "integrity": "sha512-QivM7GlSHSsIAWzgfyP8dgeExPRZ9BIe2LsdPyEhCGkZkoyA+kGsoIzbKAfZCvvRzfZioKwPtCZIt5SaoxYCvg==", "dev": true, "requires": { - "expect": "^29.2.1", - "jest-snapshot": "^29.2.1" + "expect": "^29.3.1", + "jest-snapshot": "^29.3.1" } }, "@jest/expect-utils": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.2.1.tgz", - "integrity": "sha512-yr4aHNg5Z1CjKby5ozm7sKjgBlCOorlAoFcvrOQ/4rbZRfgZQdnmh7cth192PYIgiPZo2bBXvqdOApnAMWFJZg==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.3.1.tgz", + "integrity": "sha512-wlrznINZI5sMjwvUoLVk617ll/UYfGIZNxmbU+Pa7wmkL4vYzhV9R2pwVqUh4NWWuLQWkI8+8mOkxs//prKQ3g==", "dev": true, "requires": { "jest-get-type": "^29.2.0" } }, "@jest/fake-timers": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.2.1.tgz", - "integrity": "sha512-KWil+8fef7Uj/P/PTZlPKk1Pw117wAmr71VWFV8ZDtRtkwmTG8oY4IRf0Ss44J2y5CYRy8d/zLOhxyoGRENjvA==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.3.1.tgz", + "integrity": "sha512-iHTL/XpnDlFki9Tq0Q1GGuVeQ8BHZGIYsvCO5eN/O/oJaRzofG9Xndd9HuSDBI/0ZS79pg0iwn07OMTQ7ngF2A==", "dev": true, "requires": { - "@jest/types": "^29.2.1", + "@jest/types": "^29.3.1", "@sinonjs/fake-timers": "^9.1.2", "@types/node": "*", - "jest-message-util": "^29.2.1", - "jest-mock": "^29.2.1", - "jest-util": "^29.2.1" + "jest-message-util": "^29.3.1", + "jest-mock": "^29.3.1", + "jest-util": "^29.3.1" } }, "@jest/globals": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.2.1.tgz", - "integrity": "sha512-Z4EejYPP1OPVq2abk1+9urAwJqkgw5jB2UJGlPjb5ZwzPQF8WLMcigKEfFzZb2OHhEVPP0RZD0/DbVTY1R6iQA==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.3.1.tgz", + "integrity": "sha512-cTicd134vOcwO59OPaB6AmdHQMCtWOe+/DitpTZVxWgMJ+YvXL1HNAmPyiGbSHmF/mXVBkvlm8YYtQhyHPnV6Q==", "dev": true, "requires": { - "@jest/environment": "^29.2.1", - "@jest/expect": "^29.2.1", - "@jest/types": "^29.2.1", - "jest-mock": "^29.2.1" + "@jest/environment": "^29.3.1", + "@jest/expect": "^29.3.1", + "@jest/types": "^29.3.1", + "jest-mock": "^29.3.1" } }, "@jest/reporters": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.2.1.tgz", - "integrity": "sha512-sCsfUKM/yIF4nNed3e/rIgVIS58EiASGMDEPWqItfLZ9UO1ALW2ASDNJzdWkxEt0T8o2Ztj619G0KKrvK+McAw==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.3.1.tgz", + "integrity": "sha512-GhBu3YFuDrcAYW/UESz1JphEAbvUjaY2vShRZRoRY1mxpCMB3yGSJ4j9n0GxVlEOdCf7qjvUfBCrTUUqhVfbRA==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/console": "^29.3.1", + "@jest/test-result": "^29.3.1", + "@jest/transform": "^29.3.1", + "@jest/types": "^29.3.1", "@jridgewell/trace-mapping": "^0.3.15", "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.2.1", - "jest-util": "^29.2.1", - "jest-worker": "^29.2.1", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "v8-to-istanbul": "^9.0.1" - }, - "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 - }, - "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" - } - } + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.3.1", + "jest-util": "^29.3.1", + "jest-worker": "^29.3.1", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" } }, "@jest/schemas": { @@ -5994,107 +4483,56 @@ } }, "@jest/test-result": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.2.1.tgz", - "integrity": "sha512-lS4+H+VkhbX6z64tZP7PAUwPqhwj3kbuEHcaLuaBuB+riyaX7oa1txe0tXgrFj5hRWvZKvqO7LZDlNWeJ7VTPA==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.3.1.tgz", + "integrity": "sha512-qeLa6qc0ddB0kuOZyZIhfN5q0e2htngokyTWsGriedsDhItisW7SDYZ7ceOe57Ii03sL988/03wAcBh3TChMGw==", "dev": true, "requires": { - "@jest/console": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/console": "^29.3.1", + "@jest/types": "^29.3.1", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" } }, "@jest/test-sequencer": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.2.1.tgz", - "integrity": "sha512-O/pnk0/xGj3lxPVNwB6HREJ7AYvUdyP2xo/s14/9Dtf091HoOeyIhWLKQE/4HzB8lNQBMo6J5mg0bHz/uCWK7w==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.3.1.tgz", + "integrity": "sha512-IqYvLbieTv20ArgKoAMyhLHNrVHJfzO6ARZAbQRlY4UGWfdDnLlZEF0BvKOMd77uIiIjSZRwq3Jb3Fa3I8+2UA==", "dev": true, "requires": { - "@jest/test-result": "^29.2.1", + "@jest/test-result": "^29.3.1", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.2.1", + "jest-haste-map": "^29.3.1", "slash": "^3.0.0" } }, "@jest/transform": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.2.1.tgz", - "integrity": "sha512-xup+iEuaIRSQabQaeqxaQyN0vg1Dctrp9oTObQsNf3sZEowTIa5cANYuoyi8Tqhg4GCqEVLTf18KW7ii0UeFVA==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.3.1.tgz", + "integrity": "sha512-8wmCFBTVGYqFNLWfcOWoVuMuKYPUBTnTMDkdvFtAYELwDOl9RGwOsvQWGPFxDJ8AWY9xM/8xCXdqmPK3+Q5Lug==", "dev": true, "requires": { "@babel/core": "^7.11.6", - "@jest/types": "^29.2.1", + "@jest/types": "^29.3.1", "@jridgewell/trace-mapping": "^0.3.15", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", + "convert-source-map": "^2.0.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.2.1", + "jest-haste-map": "^29.3.1", "jest-regex-util": "^29.2.0", - "jest-util": "^29.2.1", + "jest-util": "^29.3.1", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", "write-file-atomic": "^4.0.1" - }, - "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 - }, - "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" - } - } } }, "@jest/types": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.2.1.tgz", - "integrity": "sha512-O/QNDQODLnINEPAI0cl9U6zUIDXEWXt6IC1o2N2QENuos7hlGUIthlKyV4p6ki3TvXFX071blj8HUhgLGquPjw==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.3.1.tgz", + "integrity": "sha512-d0S0jmmTpjnhCmNpApgX3jrUZgZ22ivKJRvL2lli5hpCRoNnp1f85r2/wpKfXuYu8E7Jjh1hGfhPyup1NM5AmA==", "dev": true, "requires": { "@jest/schemas": "^29.0.0", @@ -6103,57 +4541,6 @@ "@types/node": "*", "@types/yargs": "^17.0.8", "chalk": "^4.0.0" - }, - "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 - }, - "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" - } - } } }, "@jridgewell/gen-mapping": { @@ -6195,15 +4582,15 @@ } }, "@sinclair/typebox": { - "version": "0.24.50", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.50.tgz", - "integrity": "sha512-k8ETQOOQDg5FtK7y9KJWpsGLik+QlPmIi8zzl/dGUgshV2QitprkFlCR/AemjWOTyKn9UwSSGRTzLVotvgCjYQ==", + "version": "0.24.51", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.51.tgz", + "integrity": "sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA==", "dev": true }, "@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", + "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", "dev": true, "requires": { "type-detect": "4.0.8" @@ -6219,9 +4606,9 @@ } }, "@types/babel__core": { - "version": "7.1.19", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz", - "integrity": "sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==", + "version": "7.1.20", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.20.tgz", + "integrity": "sha512-PVb6Bg2QuscZ30FvOU7z4guG6c926D9YRvOxEaelzndpMsvP+YM74Q/dAFASpg2l6+XLalxSGxcq/lrgYWZtyQ==", "dev": true, "requires": { "@babel/parser": "^7.1.0", @@ -6251,9 +4638,9 @@ } }, "@types/babel__traverse": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.2.tgz", - "integrity": "sha512-FcFaxOr2V5KZCviw1TnutEMVUVsGt4D2hP1TAfXZAMKuHYW3xQhe3jTxNPWutgCJ3/X1c5yX8ZoGVEItxKbwBg==", + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.3.tgz", + "integrity": "sha512-1kbcJ40lLB7MHsj39U4Sh1uTd2E7rLEa79kmDpI6cy+XiXsteB3POdQomoq4FxszMrO3ZYchkhYJw7A2862b3w==", "dev": true, "requires": { "@babel/types": "^7.3.0" @@ -6302,25 +4689,19 @@ } }, "@types/jest": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.2.0.tgz", - "integrity": "sha512-KO7bPV21d65PKwv3LLsD8Jn3E05pjNjRZvkm+YTacWhVmykAb07wW6IkZUmQAltwQafNcDUEUrMO2h3jeBSisg==", + "version": "29.2.4", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.2.4.tgz", + "integrity": "sha512-PipFB04k2qTRPePduVLTRiPzQfvMeLwUN3Z21hsAKaB/W9IIzgB2pizCL466ftJlcyZqnHoC9ZHpxLGl3fS86A==", "dev": true, "requires": { "expect": "^29.0.0", "pretty-format": "^29.0.0" } }, - "@types/minimatch": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", - "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", - "dev": true - }, "@types/node": { - "version": "18.11.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.4.tgz", - "integrity": "sha512-BxcJpBu8D3kv/GZkx/gSMz6VnTJREBj/4lbzYOQueUOELkt8WrO6zAcSPmp9uRPEW/d+lUO8QK0W2xnS1hEU0A==", + "version": "18.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.10.tgz", + "integrity": "sha512-juG3RWMBOqcOuXC643OAdSA525V44cVgGV6dUDuiFtss+8Fk5x1hI93Rsld43VeJVIeqlP9I7Fn9/qaVqoEAuQ==", "dev": true }, "@types/prettier": { @@ -6335,16 +4716,10 @@ "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", "dev": true }, - "@types/vscode": { - "version": "1.72.0", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.72.0.tgz", - "integrity": "sha512-WvHluhUo+lQvE3I4wUagRpnkHuysB4qSyOQUyIAS9n9PYMJjepzTUD8Jyks0YeXoPD0UGctjqp2u84/b3v6Ydw==", - "dev": true - }, "@types/yargs": { - "version": "17.0.13", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz", - "integrity": "sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg==", + "version": "17.0.15", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.15.tgz", + "integrity": "sha512-ZHc4W2dnEQPfhn06TBEdWaiUHEZAocYaiVMfwOipY5jcJt/251wVrKCBWBetGZWO5CF8tdb7L3DmdxVlZ2BOIg==", "dev": true, "requires": { "@types/yargs-parser": "*" @@ -6372,18 +4747,18 @@ "dev": true }, "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "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": "^1.9.0" + "color-convert": "^2.0.1" } }, "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "requires": { "normalize-path": "^3.0.0", @@ -6400,69 +4775,18 @@ } }, "babel-jest": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.2.1.tgz", - "integrity": "sha512-gQJwArok0mqoREiCYhXKWOgUhElJj9DpnssW6GL8dG7ARYqHEhrM9fmPHTjdqEGRVXZAd6+imo3/Vwa8TjLcsw==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.3.1.tgz", + "integrity": "sha512-aard+xnMoxgjwV70t0L6wkW/3HQQtV+O0PEimxKgzNqCJnbYmroPojdP2tqKSOAt8QAKV/uSZU8851M7B5+fcA==", "dev": true, "requires": { - "@jest/transform": "^29.2.1", + "@jest/transform": "^29.3.1", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", "babel-preset-jest": "^29.2.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "slash": "^3.0.0" - }, - "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 - }, - "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" - } - } } }, "babel-plugin-istanbul": { @@ -6573,15 +4897,15 @@ } }, "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "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 }, "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "integrity": "sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ==", "dev": true }, "callsites": { @@ -6597,20 +4921,19 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001423", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001423.tgz", - "integrity": "sha512-09iwWGOlifvE1XuHokFMP7eR38a0JnajoyL3/i87c8ZjRWRrdKo1fqjNfugfBD0UDBIOz0U+jtNhJ0EPm1VleQ==", + "version": "1.0.30001436", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001436.tgz", + "integrity": "sha512-ZmWkKsnC2ifEPoWUvSAIGyOYwT+keAaaWPHiQ9DfMqS1t6tfuyFYoWR78TeZtznkEQ64+vGXH9cZrElwR2Mrxg==", "dev": true }, "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "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": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, "char-regex": { @@ -6620,9 +4943,9 @@ "dev": true }, "ci-info": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.5.0.tgz", - "integrity": "sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.7.0.tgz", + "integrity": "sha512-2CpRNYmImPx+RXKLq6jko/L07phmS9I02TyqkcNU20GCF/GgaWvc58hPtjxDX8lPpkdwc9sNh72V9k00S7ezog==", "dev": true }, "cjs-module-lexer": { @@ -6655,25 +4978,24 @@ "dev": true }, "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "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.3" + "color-name": "~1.1.4" } }, "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "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 }, "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.1.tgz", + "integrity": "sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==" }, "concat-map": { "version": "0.0.1", @@ -6682,9 +5004,9 @@ "dev": true }, "convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "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 }, "cross-spawn": { @@ -6698,6 +5020,15 @@ "which": "^2.0.1" } }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, "dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", @@ -6717,15 +5048,15 @@ "dev": true }, "diff": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz", - "integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true }, "diff-sequences": { - "version": "29.2.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.2.0.tgz", - "integrity": "sha512-413SY5JpYeSBZxmenGEmCVQ8mCgtFJF0w9PROdaS6z987XC2Pd2GOKqOITLtMftmyFZqgtCOb/QA7/Z3ZXfzIw==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.3.1.tgz", + "integrity": "sha512-hlM3QR272NXCi4pq+N4Kok4kOp6EsgOM3ZSpJI7Da3UAs+Ttsi8MRmB6trM/lhyzUxGfOgnpkHtgqm5Q/CTcfQ==", "dev": true }, "electron-to-chromium": { @@ -6735,9 +5066,9 @@ "dev": true }, "emittery": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.2.tgz", - "integrity": "sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", "dev": true }, "emoji-regex": { @@ -6762,9 +5093,9 @@ "dev": true }, "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", "dev": true }, "esprima": { @@ -6797,16 +5128,16 @@ "dev": true }, "expect": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.2.1.tgz", - "integrity": "sha512-BJtA754Fba0YWRWHgjKUMTA3ltWarKgITXHQnbZ2mTxTXC4yMQlR0FI7HkB3fJYkhWBf4qjNiqvg3LDtXCcVRQ==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.3.1.tgz", + "integrity": "sha512-gGb1yTgU30Q0O/tQq+z30KBWv24ApkMgFUpvKBkyLUBL68Wv8dHdJxTBZFl/iT8K/bqDHvUYRH6IIN3rToopPA==", "dev": true, "requires": { - "@jest/expect-utils": "^29.2.1", + "@jest/expect-utils": "^29.3.1", "jest-get-type": "^29.2.0", - "jest-matcher-utils": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-util": "^29.2.1" + "jest-matcher-utils": "^29.3.1", + "jest-message-util": "^29.3.1", + "jest-util": "^29.3.1" } }, "fast-json-stable-stringify": { @@ -6856,7 +5187,7 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, "fsevents": { @@ -6897,15 +5228,15 @@ "dev": true }, "glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, @@ -6952,9 +5283,9 @@ } }, "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "html-escaper": { @@ -6988,7 +5319,7 @@ "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, "requires": { "once": "^1.3.0", @@ -7063,14 +5394,6 @@ "@istanbuljs/schema": "^0.1.2", "istanbul-lib-coverage": "^3.2.0", "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } } }, "istanbul-lib-report": { @@ -7082,23 +5405,6 @@ "istanbul-lib-coverage": "^3.0.0", "make-dir": "^3.0.0", "supports-color": "^7.1.0" - }, - "dependencies": { - "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 - }, - "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" - } - } } }, "istanbul-lib-source-maps": { @@ -7110,23 +5416,6 @@ "debug": "^4.1.1", "istanbul-lib-coverage": "^3.0.0", "source-map": "^0.6.1" - }, - "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } } }, "istanbul-reports": { @@ -7140,15 +5429,15 @@ } }, "jest": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.2.1.tgz", - "integrity": "sha512-K0N+7rx+fv3Us3KhuwRSJt55MMpZPs9Q3WSO/spRZSnsalX8yEYOTQ1PiSN7OvqzoRX4JEUXCbOJRlP4n8m5LA==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.3.1.tgz", + "integrity": "sha512-6iWfL5DTT0Np6UYs/y5Niu7WIfNv/wRTtN5RSXt2DIEft3dx3zPuw/3WJQBCJfmEzvDiEKwoqMbGD9n49+qLSA==", "dev": true, "requires": { - "@jest/core": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/core": "^29.3.1", + "@jest/types": "^29.3.1", "import-local": "^3.0.2", - "jest-cli": "^29.2.1" + "jest-cli": "^29.3.1" } }, "jest-changed-files": { @@ -7162,296 +5451,92 @@ } }, "jest-circus": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.2.1.tgz", - "integrity": "sha512-W+ZQQ5ln4Db2UZNM4NJIeasnhCdDhSuYW4eLgNAUi0XiSSpF634Kc5wiPvGiHvTgXMFVn1ZgWIijqhi9+kLNLg==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.3.1.tgz", + "integrity": "sha512-wpr26sEvwb3qQQbdlmei+gzp6yoSSoSL6GsLPxnuayZSMrSd5Ka7IjAvatpIernBvT2+Ic6RLTg+jSebScmasg==", "dev": true, "requires": { - "@jest/environment": "^29.2.1", - "@jest/expect": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/environment": "^29.3.1", + "@jest/expect": "^29.3.1", + "@jest/test-result": "^29.3.1", + "@jest/types": "^29.3.1", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", "is-generator-fn": "^2.0.0", - "jest-each": "^29.2.1", - "jest-matcher-utils": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-runtime": "^29.2.1", - "jest-snapshot": "^29.2.1", - "jest-util": "^29.2.1", + "jest-each": "^29.3.1", + "jest-matcher-utils": "^29.3.1", + "jest-message-util": "^29.3.1", + "jest-runtime": "^29.3.1", + "jest-snapshot": "^29.3.1", + "jest-util": "^29.3.1", "p-limit": "^3.1.0", - "pretty-format": "^29.2.1", + "pretty-format": "^29.3.1", "slash": "^3.0.0", "stack-utils": "^2.0.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": { - "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 - }, - "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" - } - } } }, "jest-cli": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.2.1.tgz", - "integrity": "sha512-UIMD5aNqvPKpdlJSaeUAoLfxsh9TZvOkaMETx5qXnkboc317bcbb0eLHbIj8sFBHdcJAIAM+IRKnIU7Wi61MBw==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.3.1.tgz", + "integrity": "sha512-TO/ewvwyvPOiBBuWZ0gm04z3WWP8TIK8acgPzE4IxgsLKQgb377NYGrQLc3Wl/7ndWzIH2CDNNsUjGxwLL43VQ==", "dev": true, "requires": { - "@jest/core": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/core": "^29.3.1", + "@jest/test-result": "^29.3.1", + "@jest/types": "^29.3.1", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^29.2.1", - "jest-util": "^29.2.1", - "jest-validate": "^29.2.1", + "jest-config": "^29.3.1", + "jest-util": "^29.3.1", + "jest-validate": "^29.3.1", "prompts": "^2.0.1", - "yargs": "^17.3.1" - }, - "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 - }, - "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" - } - } + "yargs": "^17.3.1" } }, "jest-config": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.2.1.tgz", - "integrity": "sha512-EV5F1tQYW/quZV2br2o88hnYEeRzG53Dfi6rSG3TZBuzGQ6luhQBux/RLlU5QrJjCdq3LXxRRM8F1LP6DN1ycA==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.3.1.tgz", + "integrity": "sha512-y0tFHdj2WnTEhxmGUK1T7fgLen7YK4RtfvpLFBXfQkh2eMJAQq24Vx9472lvn5wg0MAO6B+iPfJfzdR9hJYalg==", "dev": true, "requires": { "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.2.1", - "@jest/types": "^29.2.1", - "babel-jest": "^29.2.1", + "@jest/test-sequencer": "^29.3.1", + "@jest/types": "^29.3.1", + "babel-jest": "^29.3.1", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^29.2.1", - "jest-environment-node": "^29.2.1", + "jest-circus": "^29.3.1", + "jest-environment-node": "^29.3.1", "jest-get-type": "^29.2.0", "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.2.1", - "jest-runner": "^29.2.1", - "jest-util": "^29.2.1", - "jest-validate": "^29.2.1", + "jest-resolve": "^29.3.1", + "jest-runner": "^29.3.1", + "jest-util": "^29.3.1", + "jest-validate": "^29.3.1", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^29.2.1", + "pretty-format": "^29.3.1", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" - }, - "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 - }, - "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" - } - } } }, "jest-diff": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.2.1.tgz", - "integrity": "sha512-gfh/SMNlQmP3MOUgdzxPOd4XETDJifADpT937fN1iUGz+9DgOu2eUPHH25JDkLVcLwwqxv3GzVyK4VBUr9fjfA==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.3.1.tgz", + "integrity": "sha512-vU8vyiO7568tmin2lA3r2DP8oRvzhvRcD4DjpXc6uGveQodyk7CKLhQlCSiwgx3g0pFaE88/KLZ0yaTWMc4Uiw==", "dev": true, "requires": { "chalk": "^4.0.0", - "diff-sequences": "^29.2.0", + "diff-sequences": "^29.3.1", "jest-get-type": "^29.2.0", - "pretty-format": "^29.2.1" - }, - "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 - }, - "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" - } - } + "pretty-format": "^29.3.1" } }, "jest-docblock": { @@ -7464,81 +5549,30 @@ } }, "jest-each": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.2.1.tgz", - "integrity": "sha512-sGP86H/CpWHMyK3qGIGFCgP6mt+o5tu9qG4+tobl0LNdgny0aitLXs9/EBacLy3Bwqy+v4uXClqJgASJWcruYw==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.3.1.tgz", + "integrity": "sha512-qrZH7PmFB9rEzCSl00BWjZYuS1BSOH8lLuC0azQE9lQrAx3PWGKHTDudQiOSwIy5dGAJh7KA0ScYlCP7JxvFYA==", "dev": true, "requires": { - "@jest/types": "^29.2.1", + "@jest/types": "^29.3.1", "chalk": "^4.0.0", "jest-get-type": "^29.2.0", - "jest-util": "^29.2.1", - "pretty-format": "^29.2.1" - }, - "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 - }, - "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" - } - } + "jest-util": "^29.3.1", + "pretty-format": "^29.3.1" } }, "jest-environment-node": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.2.1.tgz", - "integrity": "sha512-PulFKwEMz6nTAdLUwglFKei3b/LixwlRiqTN6nvPE1JtrLtlnpd6LXnFI1NFHYJGlTmIWilMP2n9jEtPPKX50g==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.3.1.tgz", + "integrity": "sha512-xm2THL18Xf5sIHoU7OThBPtuH6Lerd+Y1NLYiZJlkE3hbE+7N7r8uvHIl/FkZ5ymKXJe/11SQuf3fv4v6rUMag==", "dev": true, "requires": { - "@jest/environment": "^29.2.1", - "@jest/fake-timers": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/environment": "^29.3.1", + "@jest/fake-timers": "^29.3.1", + "@jest/types": "^29.3.1", "@types/node": "*", - "jest-mock": "^29.2.1", - "jest-util": "^29.2.1" + "jest-mock": "^29.3.1", + "jest-util": "^29.3.1" } }, "jest-get-type": { @@ -7548,12 +5582,12 @@ "dev": true }, "jest-haste-map": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.2.1.tgz", - "integrity": "sha512-wF460rAFmYc6ARcCFNw4MbGYQjYkvjovb9GBT+W10Um8q5nHq98jD6fHZMDMO3tA56S8XnmNkM8GcA8diSZfnA==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.3.1.tgz", + "integrity": "sha512-/FFtvoG1xjbbPXQLFef+WSU4yrc0fc0Dds6aRPBojUid7qlPqZvxdUBA03HW0fnVHXVCnCdkuoghYItKNzc/0A==", "dev": true, "requires": { - "@jest/types": "^29.2.1", + "@jest/types": "^29.3.1", "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", @@ -7561,168 +5595,66 @@ "fsevents": "^2.3.2", "graceful-fs": "^4.2.9", "jest-regex-util": "^29.2.0", - "jest-util": "^29.2.1", - "jest-worker": "^29.2.1", + "jest-util": "^29.3.1", + "jest-worker": "^29.3.1", "micromatch": "^4.0.4", "walker": "^1.0.8" } }, "jest-leak-detector": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.2.1.tgz", - "integrity": "sha512-1YvSqYoiurxKOJtySc+CGVmw/e1v4yNY27BjWTVzp0aTduQeA7pdieLiW05wTYG/twlKOp2xS/pWuikQEmklug==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.3.1.tgz", + "integrity": "sha512-3DA/VVXj4zFOPagGkuqHnSQf1GZBmmlagpguxEERO6Pla2g84Q1MaVIB3YMxgUaFIaYag8ZnTyQgiZ35YEqAQA==", "dev": true, "requires": { "jest-get-type": "^29.2.0", - "pretty-format": "^29.2.1" + "pretty-format": "^29.3.1" } }, "jest-matcher-utils": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.2.1.tgz", - "integrity": "sha512-hUTBh7H/Mnb6GTpihbLh8uF5rjAMdekfW/oZNXUMAXi7bbmym2HiRpzgqf/zzkjgejMrVAkPdVSQj+32enlUww==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.3.1.tgz", + "integrity": "sha512-fkRMZUAScup3txIKfMe3AIZZmPEjWEdsPJFK3AIy5qRohWqQFg1qrmKfYXR9qEkNc7OdAu2N4KPHibEmy4HPeQ==", "dev": true, "requires": { "chalk": "^4.0.0", - "jest-diff": "^29.2.1", + "jest-diff": "^29.3.1", "jest-get-type": "^29.2.0", - "pretty-format": "^29.2.1" - }, - "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 - }, - "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" - } - } + "pretty-format": "^29.3.1" } }, "jest-message-util": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.2.1.tgz", - "integrity": "sha512-Dx5nEjw9V8C1/Yj10S/8ivA8F439VS8vTq1L7hEgwHFn9ovSKNpYW/kwNh7UglaEgXO42XxzKJB+2x0nSglFVw==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.3.1.tgz", + "integrity": "sha512-lMJTbgNcDm5z+6KDxWtqOFWlGQxD6XaYwBqHR8kmpkP+WWWG90I35kdtQHY67Ay5CSuydkTBbJG+tH9JShFCyA==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.2.1", + "@jest/types": "^29.3.1", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^29.2.1", + "pretty-format": "^29.3.1", "slash": "^3.0.0", "stack-utils": "^2.0.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": { - "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 - }, - "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" - } - } } }, "jest-mock": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.2.1.tgz", - "integrity": "sha512-NDphaY/GqyQpTfnTZiTqqpMaw4Z0I7XnB7yBgrT6IwYrLGxpOhrejYr4ANY4YvO2sEGdd8Tx/6D0+WLQy7/qDA==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.3.1.tgz", + "integrity": "sha512-H8/qFDtDVMFvFP4X8NuOT3XRDzOUTz+FeACjufHzsOIBAxivLqkB1PoLCaJx9iPPQ8dZThHPp/G3WRWyMgA3JA==", "dev": true, "requires": { - "@jest/types": "^29.2.1", + "@jest/types": "^29.3.1", "@types/node": "*", - "jest-util": "^29.2.1" + "jest-util": "^29.3.1" } }, "jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", "dev": true, "requires": {} }, @@ -7733,248 +5665,95 @@ "dev": true }, "jest-resolve": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.2.1.tgz", - "integrity": "sha512-1dJTW76Z9622Viq4yRcwBuEXuzGtE9B2kdl05RC8Om/lAzac9uEgC+M8Q5osVidbuBPmxm8wSrcItYhca2ZAtQ==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.3.1.tgz", + "integrity": "sha512-amXJgH/Ng712w3Uz5gqzFBBjxV8WFLSmNjoreBGMqxgCz5cH7swmBZzgBaCIOsvb0NbpJ0vgaSFdJqMdT+rADw==", "dev": true, "requires": { "chalk": "^4.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.2.1", + "jest-haste-map": "^29.3.1", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.2.1", - "jest-validate": "^29.2.1", + "jest-util": "^29.3.1", + "jest-validate": "^29.3.1", "resolve": "^1.20.0", "resolve.exports": "^1.1.0", "slash": "^3.0.0" - }, - "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 - }, - "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" - } - } } }, "jest-resolve-dependencies": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.2.1.tgz", - "integrity": "sha512-o3mUGX2j08usj1jIAIE8KmUVpqVAn54k80kI27ldbZf2oJn6eghhB6DvJxjrcH40va9CQgWTfU5f2Ag/MoUqgQ==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.3.1.tgz", + "integrity": "sha512-Vk0cYq0byRw2WluNmNWGqPeRnZ3p3hHmjJMp2dyyZeYIfiBskwq4rpiuGFR6QGAdbj58WC7HN4hQHjf2mpvrLA==", "dev": true, "requires": { "jest-regex-util": "^29.2.0", - "jest-snapshot": "^29.2.1" + "jest-snapshot": "^29.3.1" } }, "jest-runner": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.2.1.tgz", - "integrity": "sha512-PojFI+uVhQ4u4YZKCN/a3yU0/l/pJJXhq1sW3JpCp8CyvGBYGddRFPKZ1WihApusxqWRTHjBJmGyPWv6Av2lWA==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.3.1.tgz", + "integrity": "sha512-oFvcwRNrKMtE6u9+AQPMATxFcTySyKfLhvso7Sdk/rNpbhg4g2GAGCopiInk1OP4q6gz3n6MajW4+fnHWlU3bA==", "dev": true, "requires": { - "@jest/console": "^29.2.1", - "@jest/environment": "^29.2.1", - "@jest/test-result": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/console": "^29.3.1", + "@jest/environment": "^29.3.1", + "@jest/test-result": "^29.3.1", + "@jest/transform": "^29.3.1", + "@jest/types": "^29.3.1", "@types/node": "*", "chalk": "^4.0.0", - "emittery": "^0.10.2", + "emittery": "^0.13.1", "graceful-fs": "^4.2.9", "jest-docblock": "^29.2.0", - "jest-environment-node": "^29.2.1", - "jest-haste-map": "^29.2.1", - "jest-leak-detector": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-resolve": "^29.2.1", - "jest-runtime": "^29.2.1", - "jest-util": "^29.2.1", - "jest-watcher": "^29.2.1", - "jest-worker": "^29.2.1", + "jest-environment-node": "^29.3.1", + "jest-haste-map": "^29.3.1", + "jest-leak-detector": "^29.3.1", + "jest-message-util": "^29.3.1", + "jest-resolve": "^29.3.1", + "jest-runtime": "^29.3.1", + "jest-util": "^29.3.1", + "jest-watcher": "^29.3.1", + "jest-worker": "^29.3.1", "p-limit": "^3.1.0", "source-map-support": "0.5.13" - }, - "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 - }, - "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" - } - } } - }, - "jest-runtime": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.2.1.tgz", - "integrity": "sha512-PSQ880OoIW9y8E6/jjhGn3eQNgNc6ndMzCZaKqy357bv7FqCfSyYepu3yDC6Sp1Vkt+GhP2M/PVgldS2uZSFZg==", - "dev": true, - "requires": { - "@jest/environment": "^29.2.1", - "@jest/fake-timers": "^29.2.1", - "@jest/globals": "^29.2.1", - "@jest/source-map": "^29.2.0", - "@jest/test-result": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", - "@types/node": "*", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-mock": "^29.2.1", - "jest-regex-util": "^29.2.0", - "jest-resolve": "^29.2.1", - "jest-snapshot": "^29.2.1", - "jest-util": "^29.2.1", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "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 - }, - "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" - } - } + }, + "jest-runtime": { + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.3.1.tgz", + "integrity": "sha512-jLzkIxIqXwBEOZx7wx9OO9sxoZmgT2NhmQKzHQm1xwR1kNW/dn0OjxR424VwHHf1SPN6Qwlb5pp1oGCeFTQ62A==", + "dev": true, + "requires": { + "@jest/environment": "^29.3.1", + "@jest/fake-timers": "^29.3.1", + "@jest/globals": "^29.3.1", + "@jest/source-map": "^29.2.0", + "@jest/test-result": "^29.3.1", + "@jest/transform": "^29.3.1", + "@jest/types": "^29.3.1", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.3.1", + "jest-message-util": "^29.3.1", + "jest-mock": "^29.3.1", + "jest-regex-util": "^29.2.0", + "jest-resolve": "^29.3.1", + "jest-snapshot": "^29.3.1", + "jest-util": "^29.3.1", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" } }, "jest-snapshot": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.2.1.tgz", - "integrity": "sha512-KZdLD7iEz5M4ZYd+ezZ/kk73z+DtNbk/yJ4Qx7408Vb0CCuclJIZPa/HmIwSsCfIlOBNcYTKufr7x/Yv47oYlg==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.3.1.tgz", + "integrity": "sha512-+3JOc+s28upYLI2OJM4PWRGK9AgpsMs/ekNryUV0yMBClT9B1DF2u2qay8YxcQd338PPYSFNb0lsar1B49sLDA==", "dev": true, "requires": { "@babel/core": "^7.11.6", @@ -7983,66 +5762,26 @@ "@babel/plugin-syntax-typescript": "^7.7.2", "@babel/traverse": "^7.7.2", "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.2.1", - "@jest/transform": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/expect-utils": "^29.3.1", + "@jest/transform": "^29.3.1", + "@jest/types": "^29.3.1", "@types/babel__traverse": "^7.0.6", "@types/prettier": "^2.1.5", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^29.2.1", + "expect": "^29.3.1", "graceful-fs": "^4.2.9", - "jest-diff": "^29.2.1", + "jest-diff": "^29.3.1", "jest-get-type": "^29.2.0", - "jest-haste-map": "^29.2.1", - "jest-matcher-utils": "^29.2.1", - "jest-message-util": "^29.2.1", - "jest-util": "^29.2.1", + "jest-haste-map": "^29.3.1", + "jest-matcher-utils": "^29.3.1", + "jest-message-util": "^29.3.1", + "jest-util": "^29.3.1", "natural-compare": "^1.4.0", - "pretty-format": "^29.2.1", + "pretty-format": "^29.3.1", "semver": "^7.3.5" }, "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.3.8", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", @@ -8051,239 +5790,73 @@ "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" - } } } }, "jest-util": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.2.1.tgz", - "integrity": "sha512-P5VWDj25r7kj7kl4pN2rG/RN2c1TLfYYYZYULnS/35nFDjBai+hBeo3MDrYZS7p6IoY3YHZnt2vq4L6mKnLk0g==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.3.1.tgz", + "integrity": "sha512-7YOVZaiX7RJLv76ZfHt4nbNEzzTRiMW/IiOG7ZOKmTXmoGBxUDefgMAxQubu6WPVqP5zSzAdZG0FfLcC7HOIFQ==", "dev": true, "requires": { - "@jest/types": "^29.2.1", + "@jest/types": "^29.3.1", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", "graceful-fs": "^4.2.9", "picomatch": "^2.2.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": { - "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 - }, - "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" - } - } } }, "jest-validate": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.2.1.tgz", - "integrity": "sha512-DZVX5msG6J6DL5vUUw+++6LEkXUsPwB5R7fsfM7BXdz2Ipr0Ib046ak+8egrwAR++pvSM/5laxLK977ieIGxkQ==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.3.1.tgz", + "integrity": "sha512-N9Lr3oYR2Mpzuelp1F8negJR3YE+L1ebk1rYA5qYo9TTY3f9OWdptLoNSPP9itOCBIRBqjt/S5XHlzYglLN67g==", "dev": true, "requires": { - "@jest/types": "^29.2.1", + "@jest/types": "^29.3.1", "camelcase": "^6.2.0", "chalk": "^4.0.0", "jest-get-type": "^29.2.0", "leven": "^3.1.0", - "pretty-format": "^29.2.1" + "pretty-format": "^29.3.1" }, "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" - } - }, "camelcase": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true - }, - "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 - }, - "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" - } } } }, "jest-watcher": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.2.1.tgz", - "integrity": "sha512-7jFaHUaRq50l4w/f6RuY713bvI5XskMmjWCE54NGYcY74fLkShS8LucXJke1QfGnwDSCoIqGnGGGKPwdaBYz2Q==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.3.1.tgz", + "integrity": "sha512-RspXG2BQFDsZSRKGCT/NiNa8RkQ1iKAjrO0//soTMWx/QUt+OcxMqMSBxz23PYGqUuWm2+m2mNNsmj0eIoOaFg==", "dev": true, "requires": { - "@jest/test-result": "^29.2.1", - "@jest/types": "^29.2.1", + "@jest/test-result": "^29.3.1", + "@jest/types": "^29.3.1", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "emittery": "^0.10.2", - "jest-util": "^29.2.1", + "emittery": "^0.13.1", + "jest-util": "^29.3.1", "string-length": "^4.0.1" - }, - "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 - }, - "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" - } - } } }, "jest-worker": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.2.1.tgz", - "integrity": "sha512-ROHTZ+oj7sBrgtv46zZ84uWky71AoYi0vEV9CdEtc1FQunsoAGe5HbQmW76nI5QWdvECVPrSi1MCVUmizSavMg==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.3.1.tgz", + "integrity": "sha512-lY4AnnmsEWeiXirAIA0c9SDPbuCBq8IYuDVL8PMm0MZ2PEs2yPvRA/J64QBXuZp7CYKrDM/rmNrc9/i3KJQncw==", "dev": true, "requires": { "@types/node": "*", - "jest-util": "^29.2.1", + "jest-util": "^29.3.1", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" }, "dependencies": { - "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 - }, "supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -8302,9 +5875,9 @@ "dev": true }, "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -8329,11 +5902,6 @@ "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", "dev": true }, - "jsonc-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", - "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==" - }, "jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -8392,14 +5960,6 @@ "dev": true, "requires": { "semver": "^6.0.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } } }, "make-error": { @@ -8440,9 +6000,9 @@ "dev": true }, "minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.1.tgz", + "integrity": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==", "requires": { "brace-expansion": "^2.0.1" } @@ -8454,14 +6014,20 @@ "dev": true }, "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", "dev": true, "requires": { - "minimist": "^1.2.5" + "minimist": "^1.2.6" } }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -8498,7 +6064,7 @@ "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "requires": { "wrappy": "1" @@ -8569,7 +6135,7 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true }, "path-key": { @@ -8612,9 +6178,9 @@ } }, "pretty-format": { - "version": "29.2.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.2.1.tgz", - "integrity": "sha512-Y41Sa4aLCtKAXvwuIpTvcFBkyeYp2gdFWzXGA+ZNES3VwURIB165XO/z7CjETwzCCS53MjW/rLMyyqEnTtaOfA==", + "version": "29.3.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.3.1.tgz", + "integrity": "sha512-FyLnmb1cYJV8biEIiRyzRFvs2lry7PPIvOqKVe1GCUEYg4YGmlx1qG9EJNMxArYm7piII4qb8UV1Pncq5dxmcg==", "dev": true, "requires": { "@jest/schemas": "^29.0.0", @@ -8640,17 +6206,45 @@ "sisteransi": "^1.0.5" } }, + "psl-parser": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/psl-parser/-/psl-parser-0.0.3.tgz", + "integrity": "sha512-EvZqWXIpleJ0cbW7+3QbSq14NJkG6jYmedL23kqThQVVcZEgjGpAy04h3AXrIudya9IgMEDK7uOf+I6t2+No0Q==", + "requires": { + "fs-extra": "^5.0.0" + }, + "dependencies": { + "fs-extra": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", + "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + } + } + }, "react-is": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", "dev": true }, - "request-light": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/request-light/-/request-light-0.5.8.tgz", - "integrity": "sha512-3Zjgh+8b5fhRJBQZoy+zbVKpAQGLyka0MPgW3zruTF4dFFJ8Fqcfu9YsAvi/rvdcaTeWG3MkbZv4WKxAn/84Lg==" - }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -8689,10 +6283,19 @@ "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", "dev": true }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true }, "shebang-command": { @@ -8747,24 +6350,16 @@ "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, "stack-utils": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", - "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, "requires": { "escape-string-regexp": "^2.0.0" - }, - "dependencies": { - "escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true - } } }, "string-length": { @@ -8816,12 +6411,12 @@ "dev": true }, "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "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": "^3.0.0" + "has-flag": "^4.0.0" } }, "supports-preserve-symlinks-flag": { @@ -8900,9 +6495,9 @@ }, "dependencies": { "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -8911,9 +6506,9 @@ } }, "tslib": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", - "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, "tslint": { @@ -8937,6 +6532,15 @@ "tsutils": "^2.29.0" }, "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -8947,6 +6551,50 @@ "concat-map": "0.0.1" } }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "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 + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -8955,6 +6603,21 @@ "requires": { "brace-expansion": "^1.1.7" } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "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, + "requires": { + "has-flag": "^3.0.0" + } } } }, @@ -8980,10 +6643,11 @@ "dev": true }, "typescript": { - "version": "4.8.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", - "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", - "dev": true + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz", + "integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==", + "dev": true, + "peer": true }, "universalify": { "version": "2.0.0", @@ -9009,40 +6673,16 @@ "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", "convert-source-map": "^1.6.0" + }, + "dependencies": { + "convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + } } }, - "vscode-json-languageservice": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-5.1.1.tgz", - "integrity": "sha512-EtAcTD6MOfyf8+MokDsAHNM7ttuZvCo077w9aMtJiyps41gkOcoBThAbXDk6Y0Oi6ki5aDs8lgY4KxYiVW/lxA==", - "requires": { - "jsonc-parser": "^3.2.0", - "vscode-languageserver-textdocument": "^1.0.7", - "vscode-languageserver-types": "^3.17.2", - "vscode-nls": "^5.2.0", - "vscode-uri": "^3.0.6" - } - }, - "vscode-languageserver-textdocument": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.7.tgz", - "integrity": "sha512-bFJH7UQxlXT8kKeyiyu41r22jCZXG8kuuVVA33OEJn1diWOZK5n8zBSPZFHVBOu8kXZ6h0LIRhf5UnCo61J4Hg==" - }, - "vscode-languageserver-types": { - "version": "3.17.2", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.2.tgz", - "integrity": "sha512-zHhCWatviizPIq9B7Vh9uvrH6x3sK8itC84HkamnBWoDFJtzBf7SWlpLCZUit72b3os45h6RWQNC9xHRDF8dRA==" - }, - "vscode-nls": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-5.2.0.tgz", - "integrity": "sha512-RAaHx7B14ZU04EU31pT+rKz2/zSl7xMsfIZuo8pd+KZO6PXtQmpevpq3vxvWNcrGbdmhM/rr5Uw5Mz+NBfhVng==" - }, - "vscode-uri": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.6.tgz", - "integrity": "sha512-fmL7V1eiDBFRRnu+gfRWTzyPpNIHJTc4mWnFkwBUmO9U3KPgJAmTx7oxi2bl/Rh6HLdU7+4C9wlj0k2E4AdKFQ==" - }, "walker": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", @@ -9070,38 +6710,12 @@ "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" - }, - "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" - } - }, - "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 - } } }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, "write-file-atomic": { @@ -9127,9 +6741,9 @@ "dev": true }, "yargs": { - "version": "17.6.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.0.tgz", - "integrity": "sha512-8H/wTDqlSwoSnScvV2N/JHfLWOKuh5MVla9hqLjK3nsfyy6Y4kDSYSvkU5YCUEPOSnRXfIyx3Sq+B/IWudTo4g==", + "version": "17.6.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz", + "integrity": "sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw==", "dev": true, "requires": { "cliui": "^8.0.1", @@ -9138,7 +6752,7 @@ "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" + "yargs-parser": "^21.1.1" } }, "yargs-parser": { diff --git a/package.json b/package.json index edc9ea3..690357e 100644 --- a/package.json +++ b/package.json @@ -1,875 +1,52 @@ { - "name": "vscode-psl", - "displayName": "vscode-psl", - "description": "Profile Scripting Language support", - "version": "1.13.2", - "preview": true, - "publisher": "ing-bank", - "engines": { - "vscode": "^1.72.2" - }, - "categories": [ - "Programming Languages" + "name": "psl-lint", + "version": "1.6.0", + "description": "Profile Scripting Language Linter", + "keywords": [ + "PSL", + "linter", + "lint", + "profile", + "scripting", + "language" ], + "homepage": "https://github.com/ing-bank/psl-linter#readme", + "bugs": { + "url": "https://github.com/ing-bank/psl-linter/issues" + }, "license": "MIT", - "activationEvents": [ - "workspaceContains:dataqwik", - "workspaceContains:.vscode/environment.json", - "onLanguage:psl", - "onCommand:psl.getElement", - "onCommand:psl.refreshElement", - "onCommand:psl.getTable", - "onCommand:psl.testCompile", - "onCommand:psl.configureEnvironment", - "onCommand:psl.sendElement", - "onCommand:psl.compileAndLink", - "onCommand:psl.runPSL", - "onCommand:psl.launchHostTerminal" + "author": "atiplea", + "contributors": [ + "SOliveira" ], - "main": "./out/src/extension", - "contributes": { - "languages": [ - { - "id": "profileTable", - "aliases": [ - "Profile Table Definition" - ], - "extensions": [ - ".TBL" - ], - "configuration": "./def-language-configuration.json" - }, - { - "id": "profileColumn", - "aliases": [ - "Profile Column Definition" - ], - "extensions": [ - ".COL" - ], - "configuration": "./languages/def-language-configuration.json" - }, - { - "id": "profileData", - "aliases": [ - "Profile Data Item" - ], - "extensions": [ - ".DAT" - ] - }, - { - "id": "profileSerialData", - "aliases": [ - "Profile Serialized Data Element" - ], - "extensions": [ - ".serial" - ] - }, - { - "id": "psl", - "aliases": [ - "Profile Scripting Language", - "psl" - ], - "extensions": [ - ".PROC", - ".PSL", - ".psl" - ], - "configuration": "./languages/psl-language-configuration.json" - }, - { - "id": "profileBatch", - "aliases": [ - "Profile Batch Definition" - ], - "extensions": [ - ".BATCH" - ], - "configuration": "./languages/psl-language-configuration.json" - }, - { - "id": "profileTrigger", - "aliases": [ - "Profile Trigger Definition" - ], - "extensions": [ - ".TRIG" - ], - "configuration": "./languages/psl-language-configuration.json" - } - ], - "grammars": [ - { - "language": "psl", - "scopeName": "source.psl", - "path": "./syntaxes/psl.tmLanguage.json" - }, - { - "language": "profileBatch", - "scopeName": "source.psl", - "path": "./syntaxes/psl.tmLanguage.json" - }, - { - "language": "profileTrigger", - "scopeName": "source.psl", - "path": "./syntaxes/psl.tmLanguage.json" - }, - { - "language": "profileTable", - "scopeName": "source.json", - "path": "./syntaxes/JSON.tmLanguage" - }, - { - "language": "profileColumn", - "scopeName": "source.json", - "path": "./syntaxes/JSON.tmLanguage" - } - ], - "jsonValidation": [ - { - "fileMatch": "environment.json", - "url": "./schemas/environmentSchema.json" - }, - { - "fileMatch": "environments.json", - "url": "./schemas/environmentsSchema.json" - } - ], - "snippets": [ - { - "language": "psl", - "path": "./snippets/psl.json" - }, - { - "language": "profileTable", - "path": "./snippets/tableDefinition.json" - }, - { - "language": "profileColumn", - "path": "./snippets/columnDefinition.json" - } - ], - "configurationDefaults": { - "[psl]": { - "editor.snippetSuggestions": "bottom", - "editor.insertSpaces": false, - "editor.wordSeparators": "`~!@^&*()-=+[{]}\\|;:'\",.<>/?_$" - }, - "[profileBatch]": { - "editor.snippetSuggestions": "bottom", - "editor.insertSpaces": false, - "editor.wordSeparators": "`~!@^&*()-=+[{]}\\|;:'\",.<>/?_$" - }, - "[profileTrigger]": { - "editor.snippetSuggestions": "bottom", - "editor.insertSpaces": false, - "editor.wordSeparators": "`~!@^&*()-=+[{]}\\|;:'\",.<>/?_$" - }, - "[profileColumn]": { - "editor.insertSpaces": false - }, - "[profileData]": { - "editor.insertSpaces": false, - "editor.renderWhitespace": "boundary", - "diffEditor.ignoreTrimWhitespace": false - }, - "[profileSerialData]": { - "editor.insertSpaces": false, - "editor.renderWhitespace": "boundary", - "diffEditor.ignoreTrimWhitespace": false - }, - "[profileTable]": { - "editor.insertSpaces": false - } - }, - "commands": [ - { - "command": "psl.setGtmDebug", - "title": "Set GT.M Debug", - "category": "PSL" - }, - { - "command": "psl.stepOut", - "title": "Terminal Step Out", - "category": "PSL" - }, - { - "command": "psl.stepIn", - "title": "Terminal Step In", - "category": "PSL" - }, - { - "command": "psl.stepOver", - "title": "Terminal Step Over", - "category": "PSL" - }, - { - "command": "psl.getElement", - "title": "Get Element from Host", - "category": "PSL" - }, - { - "command": "psl.refreshElement", - "title": "Refresh from Host", - "category": "PSL", - "icon": { - "dark": "icons/dark/sync.svg", - "light": "icons/light/sync.svg" - } - }, - { - "command": "psl.getTable", - "title": "Table Get from Host", - "category": "PSL" - }, - { - "command": "psl.testCompile", - "title": "Test Compile", - "category": "PSL", - "icon": { - "dark": "icons/dark/gear.svg", - "light": "icons/light/gear.svg" - } - }, - { - "command": "psl.configureEnvironment", - "title": "Configure Environment", - "category": "PSL" - }, - { - "command": "psl.sendElement", - "title": "Send to Host", - "category": "PSL", - "icon": { - "dark": "icons/dark/arrow-up.svg", - "light": "icons/light/arrow-up.svg" - } - }, - { - "command": "psl.compileAndLink", - "title": "Compile and Link", - "category": "PSL", - "icon": { - "dark": "icons/dark/link.svg", - "light": "icons/light/link.svg" - } - }, - { - "command": "psl.runPSL", - "title": "Run PSL", - "category": "PSL", - "icon": { - "dark": "icons/dark/triangle-right.svg", - "light": "icons/light/triangle-right.svg" - } - }, - { - "command": "psl.runTest", - "title": "Run Test", - "category": "PSL" - }, - { - "command": "psl.runCoverage", - "title": "Run Test (with Coverage)", - "category": "PSL" - }, - { - "command": "psl.sendTable", - "title": "Table Send to Host", - "category": "PSL" - }, - { - "command": "psl.refreshTable", - "title": "Table Refresh from Host", - "category": "PSL" - }, - { - "command": "psl.previewDocumentation", - "title": "Preview Documentation", - "category": "PSL" - } - ], - "menus": { - "explorer/context": [ - { - "when": "explorerResourceIsFolder", - "command": "psl.getElement", - "group": "PSL.3" - }, - { - "when": "explorerResourceIsFolder", - "command": "psl.sendElement", - "group": "PSL.2" - }, - { - "when": "explorerResourceIsFolder", - "command": "psl.getTable", - "group": "PSL.3" - }, - { - "when": "explorerResourceIsFolder", - "command": "psl.testCompile", - "group": "PSL.2" - }, - { - "when": "explorerResourceIsFolder", - "command": "psl.refreshElement", - "group": "PSL.2" - }, - { - "when": "explorerResourceIsFolder", - "command": "psl.runPSL", - "group": "PSL.2" - }, - { - "when": "explorerResourceIsFolder", - "command": "psl.compileAndLink", - "group": "PSL.2" - }, - { - "when": "resourceLangId == psl && !explorerResourceIsFolder", - "command": "psl.refreshElement", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileData && !explorerResourceIsFolder", - "command": "psl.refreshElement", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileSerialData && !explorerResourceIsFolder", - "command": "psl.refreshElement", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileTable && !explorerResourceIsFolder", - "command": "psl.refreshElement", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileColumn && !explorerResourceIsFolder", - "command": "psl.refreshElement", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileBatch && !explorerResourceIsFolder", - "command": "psl.refreshElement", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileTrigger && !explorerResourceIsFolder", - "command": "psl.refreshElement", - "group": "PSL.2" - }, - { - "when": "resourceLangId == psl && !explorerResourceIsFolder", - "command": "psl.sendElement", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileData && !explorerResourceIsFolder", - "command": "psl.sendElement", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileSerialData && !explorerResourceIsFolder", - "command": "psl.sendElement", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileTable && !explorerResourceIsFolder", - "command": "psl.sendElement", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileColumn && !explorerResourceIsFolder", - "command": "psl.sendElement", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileBatch && !explorerResourceIsFolder", - "command": "psl.sendElement", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileTrigger && !explorerResourceIsFolder", - "command": "psl.sendElement", - "group": "PSL.2" - }, - { - "when": "resourceLangId == psl && !explorerResourceIsFolder", - "command": "psl.runPSL", - "group": "PSL.2" - }, - { - "when": "resourceLangId == psl && !explorerResourceIsFolder", - "command": "psl.compileAndLink", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileTable && !explorerResourceIsFolder", - "command": "psl.compileAndLink", - "group": "PSL.2" - }, - { - "when": "resourceLangId == psl && !explorerResourceIsFolder", - "command": "psl.testCompile", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileTable && !explorerResourceIsFolder", - "command": "psl.sendTable", - "group": "PSL.1" - }, - { - "when": "resourceLangId == profileColumn && !explorerResourceIsFolder", - "command": "psl.sendTable", - "group": "PSL.1" - }, - { - "when": "resourceLangId == profileTable && !explorerResourceIsFolder", - "command": "psl.refreshTable", - "group": "PSL.1" - }, - { - "when": "resourceLangId == profileColumn && !explorerResourceIsFolder", - "command": "psl.refreshTable", - "group": "PSL.1" - }, - { - "command": "psl.configureEnvironment", - "group": "PSL.4" - } - ], - "editor/context": [ - { - "when": "resourceLangId == psl", - "command": "psl.refreshElement", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileData", - "command": "psl.refreshElement", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileSerialData", - "command": "psl.refreshElement", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileTable", - "command": "psl.refreshElement", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileColumn", - "command": "psl.refreshElement", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileBatch", - "command": "psl.refreshElement", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileTrigger", - "command": "psl.refreshElement", - "group": "PSL.2" - }, - { - "when": "psl.isProfileElement", - "command": "psl.refreshElement", - "group": "PSL.2" - }, - { - "when": "resourceLangId == psl", - "command": "psl.sendElement", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileData", - "command": "psl.sendElement", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileSerialData", - "command": "psl.sendElement", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileTable", - "command": "psl.sendElement", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileColumn", - "command": "psl.sendElement", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileBatch", - "command": "psl.sendElement", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileTrigger", - "command": "psl.sendElement", - "group": "PSL.2" - }, - { - "when": "psl.isProfileElement", - "command": "psl.sendElement", - "group": "PSL.2" - }, - { - "command": "psl.getElement", - "group": "PSL.4" - }, - { - "command": "psl.getTable", - "group": "PSL.4" - }, - { - "when": "resourceLangId == psl", - "command": "psl.testCompile", - "group": "PSL.2" - }, - { - "when": "resourceLangId == psl", - "command": "psl.runPSL", - "group": "PSL.2" - }, - { - "when": "resourceFilename =~ /^(Ut|St)/ && resourceLangId == psl && psl.runTestContext", - "command": "psl.runTest", - "group": "PSL.3" - }, - { - "when": "resourceFilename =~ /^(Ut|St)/ && resourceLangId == psl && psl.runCoverageContext", - "command": "psl.runCoverage", - "group": "PSL.3" - }, - { - "when": "resourceLangId == psl", - "command": "psl.compileAndLink", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileTable", - "command": "psl.compileAndLink", - "group": "PSL.2" - }, - { - "when": "resourceLangId == profileTable", - "command": "psl.sendTable", - "group": "PSL.1" - }, - { - "when": "resourceLangId == profileColumn", - "command": "psl.sendTable", - "group": "PSL.1" - }, - { - "when": "resourceLangId == profileTable", - "command": "psl.refreshTable", - "group": "PSL.1" - }, - { - "when": "resourceLangId == profileColumn", - "command": "psl.refreshTable", - "group": "PSL.1" - } - ], - "editor/title": [ - { - "command": "psl.previewDocumentation", - "group": "navigation@-206", - "when": "resourceLangId == psl && psl.hasDocumentationServer" - }, - { - "command": "psl.refreshElement", - "group": "navigation@-205", - "when": "resourceLangId == profileData" - }, - { - "command": "psl.refreshElement", - "group": "navigation@-205", - "when": "resourceLangId == profileSerialData" - }, - { - "command": "psl.refreshElement", - "group": "navigation@-205", - "when": "resourceLangId == profileBatch" - }, - { - "command": "psl.refreshElement", - "group": "navigation@-205", - "when": "resourceLangId == profileTrigger" - }, - { - "command": "psl.refreshElement", - "group": "navigation@-205", - "when": "resourceLangId == psl" - }, - { - "command": "psl.refreshElement", - "group": "navigation@-205", - "when": "psl.isProfileElement" - }, - { - "command": "psl.refreshElement", - "group": "navigation@-205", - "when": "resourceLangId == profileTable" - }, - { - "command": "psl.refreshElement", - "group": "navigation@-205", - "when": "resourceLangId == profileColumn" - }, - { - "command": "psl.testCompile", - "group": "navigation@-204", - "when": "resourceLangId == psl" - }, - { - "command": "psl.sendElement", - "group": "navigation@-203", - "when": "resourceLangId == profileBatch" - }, - { - "command": "psl.sendElement", - "group": "navigation@-203", - "when": "resourceLangId == profileTrigger" - }, - { - "command": "psl.sendElement", - "group": "navigation@-203", - "when": "resourceLangId == profileData" - }, - { - "command": "psl.sendElement", - "group": "navigation@-203", - "when": "resourceLangId == profileSerialData" - }, - { - "command": "psl.sendElement", - "group": "navigation@-203", - "when": "resourceLangId == psl" - }, - { - "command": "psl.sendElement", - "group": "navigation@-203", - "when": "psl.isProfileElement" - }, - { - "command": "psl.sendElement", - "group": "navigation@-203", - "when": "resourceLangId == profileTable" - }, - { - "command": "psl.sendElement", - "group": "navigation@-203", - "when": "resourceLangId == profileColumn" - }, - { - "command": "psl.compileAndLink", - "group": "navigation@-202", - "when": "resourceLangId == psl" - }, - { - "command": "psl.compileAndLink", - "group": "navigation@-202", - "when": "resourceLangId == profileTable" - }, - { - "command": "psl.runPSL", - "group": "navigation@-201", - "when": "resourceLangId == psl" - } - ], - "commandPalette": [ - { - "when": "resourceLangId == profileTable", - "command": "psl.sendTable", - "group": "PSL" - }, - { - "when": "resourceLangId == profileColumn", - "command": "psl.sendTable", - "group": "PSL" - }, - { - "when": "resourceLangId == profileTable", - "command": "psl.refreshTable", - "group": "PSL" - }, - { - "when": "resourceLangId == psl && psl.hasDocumentationServer", - "command": "psl.previewDocumentation", - "group": "PSL" - }, - { - "when": "resourceLangId == profileColumn", - "command": "psl.refreshTable", - "group": "PSL" - } - ] - }, - "keybindings": [ - { - "when": "resourceLangId == psl", - "command": "psl.testCompile", - "key": "Ctrl+Shift+B" - }, - { - "key": "Ctrl+E", - "command": "psl.stepOut", - "when": "terminalFocus && psl.gtmDebug" - }, - { - "key": "Ctrl+Q", - "command": "psl.stepIn", - "when": "terminalFocus && psl.gtmDebug" - }, - { - "key": "Ctrl+W", - "command": "psl.stepOver", - "when": "terminalFocus && psl.gtmDebug" - }, - { - "command": "psl.launchHostTerminal", - "key": "win+oem_3" - } - ], - "configuration": { - "type": "object", - "title": "PSL Configuration", - "properties": { - "psl.lint": { - "scope": "resource", - "type": "string", - "default": "config", - "enum": [ - "config", - "all", - "none" - ], - "description": "Whether to lint files written in PSL." - }, - "psl.previewFeatures": { - "scope": "resource", - "type": "boolean", - "default": false, - "description": "Set true to enable the latest developing features." - }, - "psl.gtmDebugEnabled": { - "scope": "machine", - "type": "boolean", - "default": false, - "description": "Set true to keep GT.M Debug on by default." - }, - "psl.customTasks": { - "scope": "resource", - "type": "array", - "items": { - "type": "object", - "required": [ - "command", - "mrpcID", - "request" - ], - "properties": { - "command": { - "type": "string", - "enum": [ - "runTest", - "runCoverage" - ], - "enumDescriptions": [ - "A command for running tests via PslUtTestCase.", - "A command for running tests with coverage output." - ] - }, - "mrpcID": { - "type": "string", - "description": "The MRPC ID supplied in the client message. For example \"121\" or \"^ZMRPC121\"." - }, - "request": { - "type": "string", - "description": "The request type. For example \"PSLRUNTEST\"." - } - } - } - }, - "psl.documentationServer": { - "scope": "resource", - "type": "string", - "description": "HTTP POST endpoint that responds with PSL documentation in markdown format." - }, - "psl.trailingNewline": { - "scope": "resource", - "type": "string", - "enum": [ - "default", - "always", - "never" - ], - "enumDescriptions": [ - "Allows the default behavior, makes no modification.", - "Always add a trailing newline if not present.", - "Remove trailing newlines if they are present." - ], - "default": "default", - "description": "Adds a trailing newline after a \"Get\" or \"Refresh\"." - } - } - } + "main": "./lib/cli.js", + "types": "./lib/types/cli.js", + "bin": "./lib/cli.js", + "repository": { + "type": "git", + "url": "https://github.com/ing-bank/psl-linter.git" }, "scripts": { - "compile": "tsc -p ./", - "compile-lint": "tsc -p ./src/pslLint/cli", - "compile-parser": "tsc -p ./src/parser", + "clean": "rimraf lib", + "buildts": "tsc", + "build": "npm run clean && npm run buildts", "lint": "tslint -c tslint.json --project .", - "watch": "npm run compile -- -watch", + "watch": "npm run build -- -watch", "test": "jest" }, - "repository": { - "type": "git", - "url": "https://github.com/ing-bank/vscode-psl" + "dependencies": { + "commander": "^9.4.1", + "fs-extra": "^10.1.0", + "minimatch": "^5.1.0", + "psl-parser": "^0.0.3" }, "devDependencies": { "@types/fs-extra": "^9.0.13", "@types/jest": "^29.2.0", - "@types/minimatch": "^5.1.2", "@types/node": "^18.11.4", - "@types/vscode": "^1.72.0", "jest": "^29.2.1", + "rimraf": "^3.0.2", "ts-jest": "^29.0.3", - "tslint": "^5.20.1", - "typescript": "^4.8.4" - }, - "dependencies": { - "fs-extra": "^10.1.0", - "jsonc-parser": "^3.2.0", - "minimatch": "^5.1.0", - "request-light": "^0.5.8", - "vscode-json-languageservice": "^5.1.1" - }, - "jest": { - "transform": { - "^.+\\.tsx?$": "ts-jest" - }, - "testRegex": ".*?/__tests__/.*-test(\\.ts|\\.js)", - "moduleFileExtensions": [ - "ts", - "tsx", - "js", - "json", - "jsx" - ] + "tslint": "^5.20.1" } } diff --git a/schemas/environmentSchema.json b/schemas/environmentSchema.json deleted file mode 100644 index e26ddf4..0000000 --- a/schemas/environmentSchema.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object", - "required": ["names"], - "default": { - "names": [] - }, - "properties": { - "names": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The names of your selected environments." - } - } -} \ No newline at end of file diff --git a/schemas/environmentsSchema.json b/schemas/environmentsSchema.json deleted file mode 100644 index c2cb1c7..0000000 --- a/schemas/environmentsSchema.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object", - "required": ["environments"], - "properties": { - "environments": { - "type": "array", - "description": "A list of all available environments.", - "items": { - "default": { - "name": "", - "host": "", - "port": 0, - "user": "", - "password": "", - "sshLogin": "", - "serverType": "SCA$IBS", - "encoding": "utf8" - }, - "properties": { - "name": { - "type": "string", - "description": "A name you can use to identifiy this specific configuration." - }, - "host": { - "type": "string", - "description": "The host/server name." - }, - "port": { - "type": "integer", - "description": "The MTM port number of your environment." - }, - "user": { - "type": "string", - "description": "User to log in to the driver." - }, - "password": { - "type": "string", - "description": "The user's password." - }, - "sshLogin": { - "type": "string", - "description": "The login used to ssh into the Profile Server." - }, - "serverType": { - "type": "string", - "description": "The server type. Default value is \"SCA$IBS\"." - }, - "encoding": { - "type": "string", - "description": "Encoding to use in request/response. The default value is \"utf8\".", - "enum": ["ascii", "utf8", "ucs2", "base64", "latin1", "binary", "hex"] - } - } - } - } - }, - "default": { - "environments": [ - {"name": "" , "host": "" , "port": 0, "user": "" , "password": "" , "sshLogin": "" } - - ] - } -} - diff --git a/snippets/columnDefinition.json b/snippets/columnDefinition.json deleted file mode 100644 index 700465a..0000000 --- a/snippets/columnDefinition.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "Column Definition": { - "prefix": "columndefinition", - "body": [ - "{", - "\t\"%LIBS\" : \"SYSDEV\",", - "\t\"FID\" : \"${1:tableName}\",", - "\t\"DI\" : \"${2:columnName}\",", - "\t\"ALIAS\" : \"${3:alias}\",", - "\t\"CMP\" : ${4:computed},", - "\t\"DES\" : ${5:description},", - "\t\"LEN\" : ${6:lengthInteger},", - "\t\"MDD\" : null,", - "\t\"MIN\" : null,", - "\t\"NOD\" : \"${7:nodeIdentifier}\",", - "\t\"POS\" : ${8:positionInteger},", - "\t\"REQ\" : ${9:required},", - "\t\"RHD\" : \"${10:reportHeader}\",", - "\t\"TYP\" : \"${11:dataType}\",", - "}", - "${12:Column documentation (do not exceed 80-character margin)}" - ], - "description": "Column Definition" - } -} diff --git a/snippets/psl.json b/snippets/psl.json deleted file mode 100644 index fd92381..0000000 --- a/snippets/psl.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "Documentation": { - "prefix": "documentation", - "body": [ - "/* DOC ----------------------------------------------------------------", - "$0", - "** ENDDOC */" - ], - "description": "Adds a documentation comment block" - }, - "Separator": { - "prefix": "separator", - "body": [ - "// --------------------------------------------------------------------" - ], - "description": "Adds a comment separator" - }, - "For Loop (with index)": { - "prefix": "forIndex", - "body": [ - "type Number ${1:}", - "for ${1:}=${2:}:${3:}:${4:} {", - "\t$0", - "}" - ] - }, - "For Loop (order)": { - "prefix": "forOrder", - "body": [ - "type String ${1:} = \"\"", - "for set ${1:} = ${2:}(${1:}).order() quit:${1:}.isNull() {", - "\t$0", - "}" - ] - }, - "Accept Directive":{ - "prefix": "#ACCEPT", - "body": [ - "#ACCEPT GROUP=${1:}; DATE=${2:}; PGM=${3:}; CR=${4:}" - ], - "description": "Suppresses warnings generated by the next line of PSL source code." - }, - "Revision History":{ - "prefix": "revisionHistory", - "body": [ - "/* Revision History ----------------------------------------------------", - "${1:$CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE}, ${2:}, ${3:}", - "\t* $0", - "*/" - ], - "description": "Adds a revision history comment block." - }, - "Method":{ - "prefix": "method", - "body": [ - "\t// --------------------------------------------------------------------", - "${1:private} ${2:void} ${3:}()", - "\t/* DOC ----------------------------------------------------------------", - "\t$0", - "\t** ENDDOC */" - ], - "description": "Adds a method stub with a documentation comment block." - }, - "Property": { - "prefix": "pslProperty", - "body": [ - "// --------------------------------------------------------------------", - "#PROPERTYDEF $1 class = $2", - "/* DOC ----------------------------------------------------------------", - "$0", - "** ENDDOC */" - ] - }, - "pslmain":{ - "prefix": "psip", - "body": [ - "\t// --------------------------------------------------------------------", - "public static Integer pslmain(void args(String))", - "\t/* DOC ----------------------------------------------------------------", - "\tCommand line entry point.", - "", - "\t@param\targs\tCommand line arguments", - "\t** ENDDOC */", - "\t$0", - "\treturn 0" - ], - "description": "Add the method signature for a pslmain method." - } -} diff --git a/snippets/tableDefinition.json b/snippets/tableDefinition.json deleted file mode 100644 index a6b685d..0000000 --- a/snippets/tableDefinition.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "Table Definition": { - "prefix": "tabledefinition", - "body": [ - "{", - "\t\"%LIBS\" : \"SYSDEV\",", - "\t\"FID\" : \"${1:tableName}\",", - "\t\"ACCKEYS\" : \"${2:keys}\",", - "\t\"ALIAS\" : null,", - "\t\"CACHED\" : null,", - "\t\"DEL\" : ${3:delimiterInteger},", - "\t\"DES\" : \"${4:description}\",", - "\t\"FILETYP\" : ${5:fileTypeInteger},", - "\t\"FSN\" : \"f${1:tableName}\",", - "\t\"GLOBAL\" : \"${1:tableName}\",", - "\t\"GLREF\" : \"^${1:tableName}(${2:keys}\",", - "\t\"PSLPACKAGE\" : \"${6:packageName}\",", - "\t\"PSLRESTRICTION\" : null,", - "\t\"RECTYP\" : 1,", - "\t\"SYSSN\" : \"PBS\"", - "}", - "${7:// Table documentation (do not exceed 80 character margin)}" - ], - "description": "Table Definition" - } -} \ No newline at end of file diff --git a/src/pslLint/activate.ts b/src/activate.ts similarity index 90% rename from src/pslLint/activate.ts rename to src/activate.ts index 5fc40fa..3ab3181 100644 --- a/src/pslLint/activate.ts +++ b/src/activate.ts @@ -8,7 +8,7 @@ import { getConfig, matchConfig } from './config'; /** * Import rules here. */ -import { ParsedDocument } from '../parser/parser'; +import { ParsedDocument } from 'psl-parser'; import { MemberCamelCase, MemberLength, MemberLiteralCase, MemberStartsWithV, PropertyIsDummy, PropertyIsDuplicate, @@ -65,15 +65,15 @@ export function getDiagnostics( */ class RuleSubscription { - private diagnostics: Diagnostic[]; - private componentRules: ProfileComponentRule[]; - private pslRules: PslRule[]; - private fileDefinitionRules: FileDefinitionRule[]; - private methodRules: MethodRule[]; - private memberRules: MemberRule[]; - private propertyRules: PropertyRule[]; - private declarationRules: DeclarationRule[]; - private parameterRules: ParameterRule[]; + private readonly diagnostics: Diagnostic[]; + private readonly componentRules: ProfileComponentRule[]; + private readonly pslRules: PslRule[]; + private readonly fileDefinitionRules: FileDefinitionRule[]; + private readonly methodRules: MethodRule[]; + private readonly memberRules: MemberRule[]; + private readonly propertyRules: PropertyRule[]; + private readonly declarationRules: DeclarationRule[]; + private readonly parameterRules: ParameterRule[]; constructor(private profileComponent: ProfileComponent, private parsedDocument?: ParsedDocument, useConfig?: boolean) { this.diagnostics = []; diff --git a/src/pslLint/api.ts b/src/api.ts similarity index 91% rename from src/pslLint/api.ts rename to src/api.ts index fcbae73..c1da91b 100644 --- a/src/pslLint/api.ts +++ b/src/api.ts @@ -1,6 +1,6 @@ import * as path from 'path'; -import { Declaration, Member, Method, Parameter, ParsedDocument, Property } from './../parser/parser'; -import { Position, Range } from './../parser/tokenizer'; +import { Declaration, Member, Method, Parameter, ParsedDocument, Property } from 'psl-parser'; +import { tokenizer } from 'psl-parser'; export enum DiagnosticSeverity { @@ -31,7 +31,7 @@ export class Diagnostic { /** * The range to which this diagnostic applies. */ - range: Range; + range: tokenizer.Range; /** * The human-readable message. @@ -73,7 +73,11 @@ export class Diagnostic { * @param message The human-readable message. * @param severity The severity, default is [error](#DiagnosticSeverity.Error). */ - constructor(range: Range, message: string, ruleName: string, severity?: DiagnosticSeverity, member?: Member) { + constructor(range: tokenizer.Range, + message: string, + ruleName: string, + severity?: DiagnosticSeverity, + member?: Member) { this.range = range; this.message = message; this.ruleName = ruleName; @@ -84,7 +88,7 @@ export class Diagnostic { /** * Represents a related message and source code location for a diagnostic. This should be - * used to point to code locations that cause or related to a diagnostics, e.g when duplicating + * used to point to code locations that cause or related to a diagnostics, e.g. when duplicating * a symbol in a scope. */ export class DiagnosticRelatedInformation { @@ -92,7 +96,7 @@ export class DiagnosticRelatedInformation { /** * The range of this related diagnostic information. */ - range: Range; + range: tokenizer.Range; /** * The message of this related diagnostic information. @@ -105,7 +109,7 @@ export class DiagnosticRelatedInformation { * @param range The range. * @param message The message. */ - constructor(range: Range, message: string) { + constructor(range: tokenizer.Range, message: string) { this.range = range; this.message = message; } @@ -205,12 +209,12 @@ export class ProfileComponent { * @param offset A zero-based offset. * @return A valid [position](#Position). */ - positionAt(offset: number): Position { + positionAt(offset: number): tokenizer.Position { const before = this.textDocument.slice(0, offset); const newLines = before.match(/\n/g); const line = newLines ? newLines.length : 0; const preCharacters = before.match(/(\n|^).*$/g); - return new Position(line, preCharacters ? preCharacters[0].length : 0); + return new tokenizer.Position(line, preCharacters ? preCharacters[0].length : 0); } private createIndexedDocument(): Map { diff --git a/src/pslLint/cli/cli.ts b/src/cli.ts similarity index 97% rename from src/pslLint/cli/cli.ts rename to src/cli.ts index d8aadc2..948569d 100644 --- a/src/pslLint/cli/cli.ts +++ b/src/cli.ts @@ -4,10 +4,10 @@ import * as crypto from 'crypto'; import * as fs from 'fs-extra'; import * as path from 'path'; import * as process from 'process'; -import { parseText } from '../../parser/parser'; -import { getDiagnostics } from '../activate'; -import { Diagnostic, DiagnosticSeverity, ProfileComponent } from '../api'; -import { setConfig } from '../config'; +import { parseText } from 'psl-parser'; +import { getDiagnostics } from './activate'; +import { Diagnostic, DiagnosticSeverity, ProfileComponent } from './api'; +import { setConfig } from './config'; interface CodeClimateIssue { categories?: string[]; diff --git a/src/common/context.ts b/src/common/context.ts deleted file mode 100644 index 12276ff..0000000 --- a/src/common/context.ts +++ /dev/null @@ -1,38 +0,0 @@ -import * as vscode from 'vscode'; -import * as fsExtra from 'fs-extra'; - -export const enum ContextMode { - FILE = 1, - DIRECTORY = 2, - EMPTY = 3 -} - -export interface ExtensionCommandContext { - fsPath: string; -} - -export interface HostCommandContext { - fsPath: string; - mode: ContextMode; -} - -export function getFullContext(context: ExtensionCommandContext | undefined, useActiveTextEditor?: boolean): HostCommandContext { - let fsPath: string = ''; - let mode: ContextMode; - let activeTextEditor = vscode.window.activeTextEditor; - - if (context) { - fsPath = context.fsPath; - mode = fsExtra.lstatSync(fsPath).isFile() ? ContextMode.FILE : ContextMode.DIRECTORY; - return {fsPath, mode}; - } - else if (useActiveTextEditor && activeTextEditor) { - fsPath = activeTextEditor.document.fileName; - mode = ContextMode.FILE; - return {fsPath, mode}; - } - else { - mode = ContextMode.EMPTY; - return {fsPath, mode}; - } -} \ No newline at end of file diff --git a/src/common/diagnostics.ts b/src/common/diagnostics.ts deleted file mode 100644 index 94d98c7..0000000 --- a/src/common/diagnostics.ts +++ /dev/null @@ -1,55 +0,0 @@ -import * as vscode from 'vscode'; - -export class PSLDiagnostic { - - static diagnosticCollections: vscode.DiagnosticCollection[] = []; - - static setDiagnostics(pslDiagnostics: PSLDiagnostic[], envName: string, fsPath: string) { - let diagnosticMap: Map = new Map(); - pslDiagnostics.forEach(pslDiagnostic => { - let canonicalFile = vscode.Uri.file(pslDiagnostic.file).toString(); - let diagnostics = diagnosticMap.get(canonicalFile); - pslDiagnostic.diagnostic.source = envName; - if (!diagnostics) { diagnostics = []; } - - diagnostics.push(pslDiagnostic.diagnostic); - diagnosticMap.set(canonicalFile, diagnostics); - }); - let collection = this.diagnosticCollections.find(col => col.name === envName); - if (!collection) { - collection = this.registerCollection(envName); - } - let uri = vscode.Uri.file(fsPath); - collection.delete(uri); - diagnosticMap.forEach((diags, file) => { - collection.set(vscode.Uri.parse(file), diags); - - }); - } - - static registerCollection(envName: string): vscode.DiagnosticCollection { - let collection = vscode.languages.createDiagnosticCollection(envName); - vscode.workspace.onDidCloseTextDocument((textDocument) => { - let uri = textDocument.uri; - collection.delete(uri); - }) - this.diagnosticCollections.push(collection); - return collection; - } - - message: string; - severity: vscode.DiagnosticSeverity; - file: string; - range: vscode.Range; - - diagnostic: vscode.Diagnostic; - - constructor(message: string, severity: vscode.DiagnosticSeverity, file: string, range: vscode.Range) { - this.message = message; - this.severity = severity; - this.file = file; - this.range = range; - - this.diagnostic = new vscode.Diagnostic(this.range, this.message, this.severity); - } -} diff --git a/src/common/environment.ts b/src/common/environment.ts deleted file mode 100644 index 0f0bd3d..0000000 --- a/src/common/environment.ts +++ /dev/null @@ -1,347 +0,0 @@ -import * as vscode from 'vscode'; -import * as fs from 'fs-extra'; -import * as path from 'path'; -import * as jsonc from 'jsonc-parser'; -import * as os from 'os'; - -const configEnvCommand = 'psl.configureEnvironment'; - -const LOCAL_ENV_DIR = path.join('.vscode', 'environment.json'); - -const statusBar = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, 900); -statusBar.command = configEnvCommand; - -export function activate(context: vscode.ExtensionContext) { - - context.subscriptions.push( - vscode.commands.registerCommand( - configEnvCommand, configureEnvironmentHandler - ) - ); - - context.subscriptions.push(statusBar); - - context.subscriptions.push(vscode.window.onDidChangeActiveTextEditor((e) => changeTextEditorHandler(e))); - changeTextEditorHandler(vscode.window.activeTextEditor) - -} - -export interface EnvironmentConfig { - name: string; - host: string; - port: number; - user: string; - password: string; - sshLogin?: string; - serverType?: string; - encoding?: BufferEncoding; -} - -interface GlobalConfig { - environments: EnvironmentConfig[] -} - -interface WorkspaceEnvironments { - names: string[] -} - -interface WorkspaceQuickPick extends vscode.QuickPickItem { - fsPath: string; -} - -export async function workspaceQuickPick(): Promise { - try { - await GlobalFile.read(); - } - catch (e) { - let defaultConfig: GlobalConfig = { environments: [{ name: '', host: '', port: 0, user: '', password: '', sshLogin: '', serverType: 'SCA$IBS', encoding: 'utf8' }] } - await GlobalFile.write(defaultConfig); - await GlobalFile.show(); - return; - } - if (!vscode.workspace.workspaceFolders) return; - let workspaceFolders = vscode.workspace.workspaceFolders; - let items: WorkspaceQuickPick[] = await Promise.all(workspaceFolders.map(async folder => { - let name; - try { - let envObjects = await new WorkspaceFile(folder.uri.fsPath).environmentObjects; - if (envObjects.length === 1) { - name = '\u00a0 \u00a0 $(server) ' + envObjects[0].name - } - else if (envObjects.length > 1) { - name = '\u00a0 \u00a0 $(server) ' + envObjects.map(e => e.name).join(', ') - } - else { - name = '\u00a0 \u00a0 Not configured'; - } - } - catch (e) { - name = '\u00a0 \u00a0 Not configured'; - } - let item: WorkspaceQuickPick = { label: '$(file-directory) ' + folder.name, description: folder.uri.fsPath, detail: name, fsPath: folder.uri.fsPath } - return item; - })); - if (items.length === 1) return items[0]; - let configureEnvironments = '\u270E Edit Environments...'; - items.push({ label: configureEnvironments, description: '', fsPath: '' }); - let choice = await vscode.window.showQuickPick(items, { placeHolder: 'Select a Workspace.' }) - if (!choice) return; - if (choice.label === configureEnvironments) { - await GlobalFile.show(); - return; - } - return choice; -} - -async function configureEnvironmentHandler() { - let workspace = await workspaceQuickPick(); - if (!workspace) return; - environmentQuickPick(new WorkspaceFile(workspace.fsPath)); -} - -async function environmentQuickPick(workspaceFile: WorkspaceFile) { - let choice = undefined; - let workspaceEnvironments; - let globalConfig: GlobalConfig; - let names; - try { - globalConfig = await GlobalFile.read(); - } - catch (e) { - if (e === GlobalFile.INVALID_CONFIG) { - await GlobalFile.show(); - } - else { - - } - let defaultConfig: GlobalConfig = { environments: [{ name: '', host: '', port: 0, user: '', password: '', sshLogin: '' }] } - await GlobalFile.write(defaultConfig); - await GlobalFile.show(); - return; - } - - try { - workspaceEnvironments = await workspaceFile.environment; - names = workspaceEnvironments.names - } - catch (e) { - await workspaceFile.writeLocalEnv({'names': []}); - workspaceEnvironments = await workspaceFile.environment; - names = workspaceEnvironments.names; - } - do { - let items: vscode.QuickPickItem[] = globalConfig.environments.map(env => { - if (names.indexOf(env.name) > -1) { - return { label: `${env.name}`, description: '✔' } - } - return { label: `${env.name}`, description: '' } - }) - let configureEnvironments = '\u270E Edit Environments...'; - let back = '\u21a9 Back to Workspaces'; - items.push({ label: configureEnvironments, description: '' }) - if (vscode.workspace.workspaceFolders.length > 1) { - items.push({ label: back, description: '' }) - } - choice = await vscode.window.showQuickPick(items, { placeHolder: `Enable environments for ${workspaceFile.workspaceFolder.name}` }); - if (choice) { - if (choice.label === configureEnvironments) { - GlobalFile.show(); - break; - } - if (choice.label === back) { - configureEnvironmentHandler(); - break; - } - let index = names.indexOf(choice.label); - if (index > -1) { - names.splice(index, 1); - } - else names.push(choice.label); - workspaceFile.writeLocalEnv(workspaceEnvironments); - } - } while (choice); - await changeTextEditorHandler(vscode.window.activeTextEditor); -} - -async function changeTextEditorHandler(textEditor: vscode.TextEditor | undefined) { - let configureEnvironmentText = '$(server) Configure Environments'; - try { - let workspaceFile = new WorkspaceFile(textEditor.document.fileName); - let workspaceEnvironments = await workspaceFile.environment - if (workspaceEnvironments.names.length === 0) { - statusBar.text = configureEnvironmentText; - } - else if (workspaceEnvironments.names.length === 1) { - statusBar.text = '$(server) ' + workspaceEnvironments.names[0]; - } - else { - statusBar.text = '$(server) ' + workspaceEnvironments.names.length + ' environments'; - } - } - catch (e) { - statusBar.text = configureEnvironmentText; - } - statusBar.show(); -} - - - -export interface LaunchQuickPick extends vscode.QuickPickItem { - env: EnvironmentConfig; -} - -export class WorkspaceFile { - - /** - * The file system path of the file. - */ - readonly fsPath: string; - - /** - * The file system path of the file. - */ - readonly environmentPath: string; - - /** - * The file system path of the file. - */ - readonly workspaceFolder: vscode.WorkspaceFolder | undefined = undefined; - - /** - * Contents of local environment.json - */ - private _enviornment: WorkspaceEnvironments = undefined; - - /** - * Environment configurations from global environments.json - * corresponding to names in local environment.json - */ - private _environmentObjects: EnvironmentConfig[] = undefined; - - /** - * @param {string} fsPath The file system path of the file. - */ - constructor(fsPath: string) { - this.fsPath = fsPath; - - if (!fsPath) { - this.environmentPath = ''; - return; - } - - this.workspaceFolder = vscode.workspace.getWorkspaceFolder(vscode.Uri.file(fsPath)); - if (!this.workspaceFolder) { - this.environmentPath = ''; - } - else { - this.environmentPath = path.join(this.workspaceFolder.uri.fsPath, LOCAL_ENV_DIR); - } - } - - /** - * Environment configurations from global environments.json - * corresponding to names in local environment.json - */ - get environmentObjects(): Promise { - if (this._environmentObjects) return Promise.resolve(this._environmentObjects); - return this.getEnvironmentObjects(); - } - - private async getEnvironmentObjects() { - let environment = await this.environment; - let globalEnv = await this.getEnvironmentFromGlobalConfig(environment.names); - this._environmentObjects = globalEnv; - return this._environmentObjects; - } - - /** - * - * @param nameArray An array of names to match the names of configurations in the GlobalConfig. - */ - private async getEnvironmentFromGlobalConfig(nameArray: string[]): Promise { - let allEnvs = (await GlobalFile.read()).environments; - let ret: EnvironmentConfig[] = [] - for (let name of nameArray) { - for (let env of allEnvs) { - if (env.name === name) { - ret.push(env); - } - } - } - return ret; - } - - /** - * Contents of local environment.json - */ - get environment(): Promise { - if (this._enviornment) return Promise.resolve(this._enviornment); - return fs.readFile(this.environmentPath).then(async file => { - let localEnvironment: WorkspaceEnvironments = jsonc.parse(file.toString()); - if (!localEnvironment.names || !Array.isArray(localEnvironment.names)) { - throw new Error('Local environment.json is not properly configured.'); - } - this._enviornment = localEnvironment; - return localEnvironment; - }) - } - - async writeLocalEnv(newLocalEnv: WorkspaceEnvironments) { - // TODO prune names - await fs.ensureFile(this.environmentPath); - await fs.writeFile(this.environmentPath, JSON.stringify(newLocalEnv, null, '\t')); - } -} - -export class GlobalFile { - - /** - * Path to the global config file - */ - private static readonly path = (() => { - const envFileName = 'environments.json'; - const appdata = process.env.APPDATA || (process.platform === 'darwin' ? process.env.HOME + '/Library/Application Support' : '/var/local'); - let channelPath: string; - if (vscode.env.appName.indexOf('Insiders') > 0) { - channelPath = 'Code - Insiders'; - } else { - channelPath = 'Code'; - } - let envPath = path.join(appdata, channelPath, 'User', envFileName); - // in linux, it may not work with /var/local, then try to use /home/myuser/.config - if ((process.platform === 'linux') && (!fs.existsSync(envPath))) { - envPath = path.join(os.homedir(), '.config/', channelPath, 'User', envFileName); - } - return envPath; - })(); - - static readonly INVALID_CONFIG = new Error('Missing environments in global config.'); - - /** - * Reads and returns the contents of the file. - * - * @throws An error if parsing fails or if improperly formatted. - */ - static async read(): Promise { - let globalConfig = jsonc.parse((await fs.readFile(this.path)).toString()); - if (!globalConfig.environments) throw this.INVALID_CONFIG; - return globalConfig; - } - - /** - * Writes the new configuration to the file. - * - * @param newGlobalConfig The new configuration. - */ - static async write(newGlobalConfig: GlobalConfig) { - await fs.ensureFile(this.path); - await fs.writeFile(this.path, JSON.stringify(newGlobalConfig, null, '\t')); - } - - /** - * Shows the configuration file in the editor window. - */ - static async show() { - await vscode.window.showTextDocument(vscode.Uri.file(this.path)); - } -} diff --git a/src/common/statusUtils.ts b/src/common/statusUtils.ts deleted file mode 100644 index d8c034b..0000000 --- a/src/common/statusUtils.ts +++ /dev/null @@ -1,13 +0,0 @@ -import * as vscode from 'vscode'; - -export function updateStatus(status: vscode.StatusBarItem, langs: Array) { - if (langs.length === 0) { - status.show(); - } - else if (vscode.window.activeTextEditor && langs.indexOf(vscode.window.activeTextEditor.document.languageId) >= 0) { - status.show(); - } - else { - status.hide(); - } -} \ No newline at end of file diff --git a/src/common/terminal.ts b/src/common/terminal.ts deleted file mode 100644 index 5f23298..0000000 --- a/src/common/terminal.ts +++ /dev/null @@ -1,111 +0,0 @@ -import * as vscode from 'vscode'; - -export async function activate(context: vscode.ExtensionContext) { - - context.subscriptions.push( - vscode.commands.registerCommand( - 'psl.stepIn', stepIn, - ), - ); - - context.subscriptions.push( - vscode.commands.registerCommand( - 'psl.stepOut', stepOut, - ), - ); - - context.subscriptions.push( - vscode.commands.registerCommand( - 'psl.stepOver', stepOver, - ), - ); - - context.subscriptions.push( - vscode.commands.registerCommand( - 'psl.sendToHostTerminal', sendToHostTerminal, - ), - ); - terminalSendSettings(); - - configureGtmDebug(context); -} - -async function terminalSendSettings() { - const pslTerminalCommands = ['psl.stepIn', 'psl.stepOut', 'psl.stepOver', 'psl.sendToHostTerminal']; - const terminalSettings = vscode.workspace.getConfiguration('terminal'); - const commandsToSkip: string[] | undefined = terminalSettings.get('integrated.commandsToSkipShell'); - if (commandsToSkip) { - const merged = commandsToSkip.concat(pslTerminalCommands); - const filteredMerge = merged.filter((item, pos) => merged.indexOf(item) === pos); - terminalSettings.update('integrated.commandsToSkipShell', filteredMerge, true); - } -} - -function stepIn() { - terminalSend('ZSTEP INTO:"W $ZPOS,! ZP @$ZPOS B"'); -} - -function stepOut() { - terminalSend('ZSTEP OUTOF:"W $ZPOS,! ZP @$ZPOS B"'); -} - -function stepOver() { - terminalSend('ZSTEP OVER:"W $ZPOS,! ZP @$ZPOS B"'); -} - -function sendToHostTerminal(text: string) { - terminalSend(text); -} - -function terminalSend(text: string) { - const activeTerminal: vscode.Terminal | undefined = vscode.window.activeTerminal; - if (activeTerminal) { - activeTerminal.show(); - activeTerminal.sendText(text, true); - } -} - -function configureGtmDebug(context: vscode.ExtensionContext) { - const statusBar = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, 901); - const commandName = 'psl.setGtmDebug'; - let gtmDebug = vscode.workspace.getConfiguration('psl').get('gtmDebugEnabled'); - - const set = () => { - if (gtmDebug) showInformation(context); - statusBar.text = `GT.M Debug ${gtmDebug ? '$(check)' : '$(circle-slash)'}`; - vscode.commands.executeCommand('setContext', 'psl.gtmDebug', gtmDebug); - }; - - set(); - context.subscriptions.push( - vscode.commands.registerCommand( - commandName, () => { - gtmDebug = !gtmDebug; - set(); - }, - ), - ); - - vscode.workspace.onDidChangeConfiguration(event => { - if (event.affectsConfiguration('psl.gtmDebugEnabled')) { - gtmDebug = true; - set(); - } - }); - - statusBar.command = commandName; - statusBar.tooltip = 'GT.M Debug hotkeys'; - statusBar.show(); -} - -async function showInformation(context: vscode.ExtensionContext) { - const doNotShow = context.globalState.get('gtmDebugShow'); - if (doNotShow) return; - const response = await vscode.window.showInformationMessage( - 'INTO Ctrl+Q | OVER Ctrl+W | OUTOF Ctrl+E', - 'Do not show again', - ); - if (response) { - context.globalState.update('gtmDebugShow', true); - } -} diff --git a/src/pslLint/config.ts b/src/config.ts similarity index 100% rename from src/pslLint/config.ts rename to src/config.ts diff --git a/src/pslLint/elementsConventionChecker.ts b/src/elementsConventionChecker.ts similarity index 98% rename from src/pslLint/elementsConventionChecker.ts rename to src/elementsConventionChecker.ts index a8c0a59..7eb02e2 100644 --- a/src/pslLint/elementsConventionChecker.ts +++ b/src/elementsConventionChecker.ts @@ -1,4 +1,4 @@ -import { Member, MemberClass, Method, Property } from '../parser/parser'; +import { Member, MemberClass, Method, Property } from 'psl-parser'; import { Diagnostic, DiagnosticRelatedInformation, DiagnosticSeverity, MemberRule, MethodRule, PropertyRule, diff --git a/src/extension.ts b/src/extension.ts deleted file mode 100644 index 5a8cd52..0000000 --- a/src/extension.ts +++ /dev/null @@ -1,31 +0,0 @@ -import * as vscode from 'vscode'; - -import * as terminal from './common/terminal'; -import * as hostEnvironment from './common/environment'; -import * as hostCommands from './hostCommands/activate'; -import * as languageFeatures from './language/activate'; - -export const PSL_MODE: vscode.DocumentFilter = { language: 'psl', scheme: 'file' }; -export const BATCH_MODE: vscode.DocumentFilter = { language: 'profileBatch', scheme: 'file' }; -export const TRIG_MODE: vscode.DocumentFilter = { language: 'profileTrigger', scheme: 'file' }; -export const DATA_MODE: vscode.DocumentFilter = { language: 'profileData', scheme: 'file' }; -export const SERIAL_MODE: vscode.DocumentFilter = { language: 'profileSerialData', scheme: 'file'}; -export const TBL_MODE: vscode.DocumentFilter = { language: 'profileTable', scheme: 'file' }; -export const COL_MODE: vscode.DocumentFilter = { language: 'profileColumn', scheme: 'file' }; - - -export function activate(context: vscode.ExtensionContext) { - - hostCommands.activate(context); - - hostEnvironment.activate(context); - - terminal.activate(context); - - languageFeatures.activate(context); -} - - -// this method is called when your extension is deactivated -export function deactivate() { -} diff --git a/src/hostCommands/activate.ts b/src/hostCommands/activate.ts deleted file mode 100644 index de3c6d1..0000000 --- a/src/hostCommands/activate.ts +++ /dev/null @@ -1,78 +0,0 @@ -import * as path from 'path'; -import * as vscode from 'vscode'; - -import { compileAndLinkHandler } from './compileAndLink'; -import { getElementHandler, getTableHandler } from './get'; - -import { refreshElementHandler, refreshTableHandler } from './refresh'; -import { runPSLHandler } from './run'; -import { - coverageContext, registerCustomRunContext, runCoverageHandler, - runTestHandler, testContext, -} from './runCustom'; -import { sendElementHandler, sendTableHandler } from './send'; -import { testCompileHandler } from './testCompile'; - -const PROFILE_ELEMENTS = [ - '.FKY', - '.G', - '.IDX', - '.JFD', - '.M', - '.m', - '.PPL', - '.properties', - '.PROPERTIES', - '.PSLX', - '.pslx', - '.PSLXTRA', - '.pslxtra', - '.PSQL', - '.psql', - '.QRY', - '.RPT', - '.SCR', -]; - -export function activate(context: vscode.ExtensionContext) { - - registerProfileElementContext(); - registerCustomRunContext(); - - const commands = [ - { id: 'psl.getElement', callback: getElementHandler }, - { id: 'psl.getTable', callback: getTableHandler }, - { id: 'psl.refreshElement', callback: refreshElementHandler }, - { id: 'psl.sendElement', callback: sendElementHandler }, - { id: 'psl.testCompile', callback: testCompileHandler }, - { id: 'psl.compileAndLink', callback: compileAndLinkHandler }, - { id: 'psl.runPSL', callback: runPSLHandler }, - { id: 'psl.sendTable', callback: sendTableHandler }, - { id: 'psl.refreshTable', callback: refreshTableHandler }, - // Custom commands - // { id: 'psl.getCompiledCode', callback: getCompiledCodeHandler }, - { id: `psl.${testContext.command}`, callback: runTestHandler }, - { id: `psl.${coverageContext.command}`, callback: runCoverageHandler }, - ]; - - for (const command of commands) { - context.subscriptions.push( - vscode.commands.registerCommand( - command.id, command.callback, - ), - ); - } -} - -function registerProfileElementContext() { - if (vscode.window.activeTextEditor) setIsProfileElementContext(vscode.window.activeTextEditor); - vscode.window.onDidChangeActiveTextEditor(setIsProfileElementContext); -} - -function setIsProfileElementContext(textEditor: vscode.TextEditor) { - let isElement: boolean = false; - if (textEditor) { - isElement = PROFILE_ELEMENTS.indexOf(path.extname(textEditor.document.fileName)) >= 0; - } - vscode.commands.executeCommand('setContext', 'psl.isProfileElement', isElement); -} diff --git a/src/hostCommands/compileAndLink.ts b/src/hostCommands/compileAndLink.ts deleted file mode 100644 index a4ba244..0000000 --- a/src/hostCommands/compileAndLink.ts +++ /dev/null @@ -1,64 +0,0 @@ -import * as vscode from 'vscode'; -import * as path from 'path'; -import * as fs from 'fs-extra'; - -import * as utils from './hostCommandUtils'; -import * as environment from '../common/environment' - -const icon = utils.icons.LINK; - -export async function compileAndLinkHandler(context: utils.ExtensionCommandContext): Promise { - let c = utils.getFullContext(context); - if (c.mode === utils.ContextMode.FILE) { - return compileAndLink(c.fsPath).catch(() => { }); - } - else if (c.mode === utils.ContextMode.DIRECTORY) { - let files = await vscode.window.showOpenDialog({ defaultUri: vscode.Uri.file(c.fsPath), canSelectMany: true, openLabel: 'Compile and Link' }) - if (!files) return; - for (let fsPath of files.map(file => file.fsPath)) { - await compileAndLink(fsPath).catch(() => { }); - } - } - else { - let quickPick = await environment.workspaceQuickPick(); - if (!quickPick) return; - let chosenEnv = quickPick; - let files = await vscode.window.showOpenDialog({ defaultUri: vscode.Uri.file(chosenEnv.fsPath), canSelectMany: true, openLabel: 'Compile and Link' }) - if (!files) return; - for (let fsPath of files.map(file => file.fsPath)) { - await compileAndLink(fsPath).catch(() => { }); - } - } - return; -} - -async function compileAndLink(fsPath: string) { - if (!fs.statSync(fsPath).isFile()) return - let envs; - try { - envs = await utils.getEnvironment(fsPath); - } - catch (e) { - utils.logger.error(`${utils.icons.ERROR} ${icon} Invalid environment configuration.`); - return; - } - if (envs.length === 0) { - utils.logger.error(`${utils.icons.ERROR} ${icon} No environments selected.`); - return; - } - let promises = [] - await vscode.workspace.openTextDocument(fsPath).then(doc => doc.save()); - for (let env of envs) { - promises.push(utils.executeWithProgress(`${icon} ${path.basename(fsPath)} COMPILE AND LINK`, async () => { - utils.logger.info(`${utils.icons.WAIT} ${icon} ${path.basename(fsPath)} COMPILE AND LINK in ${env.name}`); - let connection = await utils.getConnection(env); - let output = await connection.compileAndLink(fsPath); - connection.close(); - if (output.includes('compile and link successful')) utils.logger.info(`${utils.icons.SUCCESS} ${icon} ${path.basename(fsPath)} COMPILE AND LINK ${env.name} successful`) - else utils.logger.error(`${utils.icons.ERROR} ${icon} ${output}`); - }).catch((e: Error) => { - utils.logger.error(`${utils.icons.ERROR} ${icon} error in ${env.name} ${e.message}`); - })) - } - await Promise.all(promises); -} diff --git a/src/hostCommands/get.ts b/src/hostCommands/get.ts deleted file mode 100644 index 8914718..0000000 --- a/src/hostCommands/get.ts +++ /dev/null @@ -1,306 +0,0 @@ -import * as vscode from 'vscode'; -import * as utils from './hostCommandUtils'; -import * as path from 'path'; -import * as fs from 'fs-extra'; -import * as environment from '../common/environment'; -import { MumpsVirtualDocument } from '../language/mumps'; - -const icon = utils.icons.GET; - -export async function getElementHandler(context: utils.ExtensionCommandContext): Promise { - let c = utils.getFullContext(context); - if (c.mode === utils.ContextMode.DIRECTORY) { - let input = await promptUserForComponent(); - if (input) return getElement(path.join(c.fsPath, input)).catch(() => { }); - } - else if (c.mode === utils.ContextMode.FILE) { - let workspace = vscode.workspace.getWorkspaceFolder(vscode.Uri.file(c.fsPath)); - if (!workspace) { - // skeptical of this approach - return; - } - let input = await promptUserForComponent(); - if (!input) return; - let extension = path.extname(input).replace('.', ''); - let description = utils.extensionToDescription[extension] - let filters: { [name: string]: string[] } = {} - filters[description] = [extension] - let currentFolder = vscode.workspace.getWorkspaceFolder(vscode.Uri.file(c.fsPath)) - if (!currentFolder) return; - let target - let defaultDir = DIR_MAPPINGS[extension]; - if (defaultDir) { - target = { fsPath: path.join(currentFolder.uri.fsPath, defaultDir, input) } - } - else { - let defaultUri = vscode.Uri.file(path.join(currentFolder.uri.fsPath, input)) - target = await vscode.window.showSaveDialog({ defaultUri, filters: filters }); - } - if (!target) return; - return getElement(target.fsPath).catch(() => { }); - } - else { - let quickPick = await environment.workspaceQuickPick(); - if (!quickPick) return; - let chosenEnv = quickPick; - let input = await promptUserForComponent(); - if (!input) return; - let extension = path.extname(input).replace('.', ''); - let description = utils.extensionToDescription[extension] - let filters: { [name: string]: string[] } = {} - filters[description] = [extension] - let target - let defaultDir = DIR_MAPPINGS[extension]; - if (defaultDir) { - target = { fsPath: path.join(chosenEnv.fsPath, defaultDir, input) } - } - else { - let defaultUri = vscode.Uri.file(path.join(chosenEnv.fsPath, input)) - target = await vscode.window.showSaveDialog({ defaultUri, filters: filters }); - } - if (!target) return; - return getElement(target.fsPath).catch(() => { }); - } - return; -} - -export async function getTableHandler(context: utils.ExtensionCommandContext) { - let c = utils.getFullContext(context); - if (c.mode === utils.ContextMode.DIRECTORY) { - let input = await promptUserForTable(); - if (input) return getTable(input, c.fsPath, c.fsPath).catch(() => { }); - } - else if (c.mode === utils.ContextMode.FILE) { - let workspace = vscode.workspace.getWorkspaceFolder(vscode.Uri.file(c.fsPath)); - if (!workspace) { - // skeptical of this approach - return; - } - let tableName = await promptUserForTable(); - if (!tableName) return; - let tableDir = DIR_MAPPINGS['TABLE'] - let target; - if (tableDir) { - target = [{ fsPath: path.join(workspace.uri.fsPath, tableDir) }] - } - else { - target = await vscode.window.showOpenDialog({ defaultUri: workspace.uri, canSelectFiles: false, canSelectFolders: true, canSelectMany: false, filters: { 'Table Directory': [] } }); - } - if (!target) return; - return getTable(tableName, target[0].fsPath, workspace.uri.fsPath).catch(() => { }); - } - else { - let quickPick = await environment.workspaceQuickPick(); - if (!quickPick) return; - let chosenEnv = quickPick; - let tableName = await promptUserForTable(); - if (!tableName) return; - let tableDir = DIR_MAPPINGS['TABLE'] - let target; - if (tableDir) { - target = [{ fsPath: path.join(chosenEnv.description, tableDir) }] - } - else { - target = await vscode.window.showOpenDialog({ defaultUri: vscode.Uri.file(chosenEnv.description), canSelectFiles: false, canSelectFolders: true, canSelectMany: false, filters: { 'Table Directory': [] } }); - } - if (!target) return; - return getTable(tableName, target[0].fsPath, chosenEnv.description).catch(() => { }); - } - return; -} - -export async function getCompiledCodeHandler(context: utils.ExtensionCommandContext): Promise { - let c = utils.getFullContext(context); - if (c.mode === utils.ContextMode.FILE) { - return getCompiledCode(c.fsPath).catch(() => {}); - } - else if (c.mode === utils.ContextMode.DIRECTORY) { - let files = await vscode.window.showOpenDialog({defaultUri: vscode.Uri.file(c.fsPath), canSelectMany: true, openLabel: 'Refresh'}) - if (!files) return; - for (let fsPath of files.map(file => file.fsPath)) { - await getCompiledCode(fsPath).catch(() => {}); - } - } - else { - let quickPick = await environment.workspaceQuickPick(); - if (!quickPick) return; - let chosenEnv = quickPick; - let files = await vscode.window.showOpenDialog({defaultUri: vscode.Uri.file(chosenEnv.fsPath), canSelectMany: true, openLabel: 'Refresh'}) - if (!files) return; - for (let fsPath of files.map(file => file.fsPath)) { - await getCompiledCode(fsPath).catch(() => {}) - } - } - return; -} - -async function getCompiledCode(fsPath: string) { - if (!fs.statSync(fsPath).isFile()) return; - let env: environment.EnvironmentConfig; - const routineName = `${path.basename(fsPath).split('.')[0]}.m`; - return utils.executeWithProgress(`${icon} ${path.basename(fsPath)} GET`, async () => { - let envs; - try { - envs = await utils.getEnvironment(fsPath); - } - catch (e) { - utils.logger.error(`${utils.icons.ERROR} ${icon} Invalid environment configuration.`); - return; - } - if (envs.length === 0) { - utils.logger.error(`${utils.icons.ERROR} ${icon} No environments selected.`); - return; - } - let choice = await utils.getCommandenvConfigQuickPick(envs); - if (!choice) return; - env = choice; - utils.logger.info(`${utils.icons.WAIT} ${icon} ${routineName} GET COMPILED from ${env.name}`); - let doc = await vscode.workspace.openTextDocument(fsPath); - await doc.save(); - let connection = await utils.getConnection(env); - let output = await connection.get(routineName); - const uri = vscode.Uri.parse(`${MumpsVirtualDocument.schemes.compiled}:/${env.name}/${routineName}`); - const virtualDocument = new MumpsVirtualDocument(routineName, output, uri); - utils.logger.info(`${utils.icons.SUCCESS} ${icon} ${routineName} GET COMPILED from ${env.name} succeeded`); - connection.close(); - vscode.window.showTextDocument(virtualDocument.uri, {preview: false}); - }).catch((e: Error) => { - if (env && env.name) { - utils.logger.error(`${utils.icons.ERROR} ${icon} error in ${env.name} ${e.message}`); - } - else { - utils.logger.error(`${utils.icons.ERROR} ${icon} ${e.message}`); - } - }) -} - -async function getElement(fsPath: string) { - let env; - await utils.executeWithProgress(`${icon} ${path.basename(fsPath)} GET`, async () => { - let envs; - try { - envs = await utils.getEnvironment(fsPath); - } - catch (e) { - utils.logger.error(`${utils.icons.ERROR} ${icon} Invalid environment configuration.`); - return; - } - if (envs.length === 0) { - utils.logger.error(`${utils.icons.ERROR} ${icon} No environments selected.`); - return; - } - let choice = await utils.getCommandenvConfigQuickPick(envs); - if (!choice) return; - env = choice; - utils.logger.info(`${utils.icons.WAIT} ${icon} ${path.basename(fsPath)} GET from ${env.name}`); - let connection = await utils.getConnection(env); - let output = await connection.get(fsPath); - await fs.ensureDir(path.dirname(fsPath)) - await utils.writeFileWithSettings(fsPath, output); - utils.logger.info(`${utils.icons.SUCCESS} ${icon} ${path.basename(fsPath)} GET from ${env.name} succeeded`); - connection.close(); - await vscode.workspace.openTextDocument(fsPath).then(vscode.window.showTextDocument) - }).catch((e: Error) => { - if (env && env.name) { - utils.logger.error(`${utils.icons.ERROR} ${icon} error in ${env.name} ${e.message}`); - } - else { - utils.logger.error(`${utils.icons.ERROR} ${icon} ${e.message}`); - } - }) - return; -} - -async function getTable(tableName: string, targetDirectory: string, workpacePath: string) { - let env; - await utils.executeWithProgress(`${icon} ${tableName} TABLE GET`, async () => { - let envs; - try { - envs = await utils.getEnvironment(workpacePath); - } - catch (e) { - utils.logger.error(`${utils.icons.ERROR} ${icon} Invalid environment configuration.`); - return; - } - if (envs.length === 0) { - utils.logger.error(`${utils.icons.ERROR} ${icon} No environments selected.`); - return; - } - let choice = await utils.getCommandenvConfigQuickPick(envs); - if (!choice) return; - env = choice; utils.logger.info(`${utils.icons.WAIT} ${icon} ${tableName} TABLE GET from ${env.name}`); - let connection = await utils.getConnection(env); - let output = await connection.getTable(tableName.toUpperCase() + '.TBL'); - await fs.ensureDir(path.join(targetDirectory, tableName.toLowerCase())); - let tableFiles = (await fs.readdir(targetDirectory)).filter(f => f.startsWith(tableName)); - for (let file of tableFiles) { - await fs.remove(file); - } - const promises = output.split(String.fromCharCode(0)).map(content => { - const contentArray = content.split(String.fromCharCode(1)); - const fileName = contentArray[0]; - const fileContent = contentArray[1]; - return utils.writeFileWithSettings(path.join(targetDirectory, tableName.toLowerCase(), fileName), fileContent); - }); - await Promise.all(promises); - utils.logger.info(`${utils.icons.SUCCESS} ${icon} ${tableName} TABLE GET from ${env.name} succeeded`); - connection.close(); - }).catch((e: Error) => { - if (env && env.name) { - utils.logger.error(`${utils.icons.ERROR} ${icon} error in ${env.name} ${e.message}`); - } - else { - utils.logger.error(`${utils.icons.ERROR} ${icon} ${e.message}`); - } - }) - return; -} - -async function promptUserForComponent() { - let inputOptions: vscode.InputBoxOptions = { - prompt: 'Name of Component (with extension)', validateInput: (input: string) => { - if (!input) return; - let extension = path.extname(input) ? path.extname(input).replace('.', '') : 'No extension' - if (extension in utils.extensionToDescription) return ''; - return `Invalid extension (${extension})`; - } - }; - return vscode.window.showInputBox(inputOptions); -} - -async function promptUserForTable() { - let inputOptions: vscode.InputBoxOptions = { - prompt: 'Name of Table (no extension)', - validateInput: (value: string) => { - if (!value) return; - if (value.includes('.')) return 'Do not include the extension'; - } - }; - return vscode.window.showInputBox(inputOptions); -} - -const DIR_MAPPINGS = { - 'BATCH': 'dataqwik/batch', - 'COL': '', - 'DAT': 'data', - 'FKY': 'dataqwik/foreign_key', - // 'G': 'Global', - 'IDX': 'dataqwik/index', - 'JFD': 'dataqwik/journal', - 'm': 'routine', - 'PPL': '', - 'PROC': 'dataqwik/procedure', - 'properties': 'property', - 'PSL': '', - 'psl': '', - 'pslx': '', - 'pslxtra': '', - 'psql': '', - 'QRY': 'dataqwik/query', - 'RPT': 'dataqwik/report', - 'SCR': 'dataqwik/screen', - // TABLE not supported - 'TABLE': 'dataqwik/table', - 'TBL': '', - 'TRIG': 'dataqwik/trigger', -} diff --git a/src/hostCommands/hostCommandUtils.ts b/src/hostCommands/hostCommandUtils.ts deleted file mode 100644 index e842810..0000000 --- a/src/hostCommands/hostCommandUtils.ts +++ /dev/null @@ -1,154 +0,0 @@ -import * as fs from 'fs-extra'; -import * as vscode from 'vscode'; -export { extensionToDescription } from '../mtm/utils'; -import * as environment from '../common/environment'; -import { MtmConnection } from '../mtm/mtm'; - -const outputChannel = vscode.window.createOutputChannel('Profile Host'); - -export const logger = { - error: (message: string) => { - outputChannel.show(true); - outputChannel.appendLine(`[ERR!][${new Date().toTimeString().split(' ')[0]}] ${message.trim()}\n`); - }, - info: (message: string, hide?: boolean) => { - if (!hide) outputChannel.show(true); - outputChannel.appendLine(`[INFO][${new Date().toTimeString().split(' ')[0]}] ${message.trim()}\n`); - }, - -}; - -export const enum icons { - ERROR = '❌', - GET = '⇩', - LINK = '🔗', - REFRESH = '🔃', - RUN = '▶', - SEND = '⇧', - SUCCESS = '✔', - TEST = '⚙', - WAIT = '…', - WARN = '⚠', -} - -export const enum ContextMode { - FILE = 1, - DIRECTORY = 2, - EMPTY = 3, -} - -const enum NEWLINE_SETTING { - ALWAYS = 'always', - NEVER = 'never', -} - -export interface ExtensionCommandContext { - fsPath: string; - dialog: boolean; -} - -export interface HostCommandContext { - fsPath: string; - mode: ContextMode; -} - -export function getFullContext(context: ExtensionCommandContext | undefined): HostCommandContext { - let fsPath: string = ''; - let mode: ContextMode; - const activeTextEditor = vscode.window.activeTextEditor; - if (context && context.dialog) { - mode = ContextMode.EMPTY; - return { fsPath, mode }; - } - if ((!context || !context.fsPath) && activeTextEditor) { - fsPath = activeTextEditor.document.fileName; - mode = ContextMode.FILE; - return { fsPath, mode }; - } - else if (!context) { - mode = ContextMode.EMPTY; - return { fsPath, mode }; - } - else { - fsPath = context.fsPath; - mode = fs.lstatSync(fsPath).isFile() ? ContextMode.FILE : ContextMode.DIRECTORY; - return { fsPath, mode }; - } -} - -export async function executeWithProgress(message: string, task: () => Promise) { - return vscode.window.withProgress({ location: vscode.ProgressLocation.Window, title: message }, async () => { - await task(); - return; - }); -} - -export async function getConnection(env: environment.EnvironmentConfig): Promise { - const connection = new MtmConnection(env.serverType, env.encoding); - await connection.open(env.host, env.port, env.user, env.password); - return connection; -} - -export async function getEnvironment(fsPath: string): Promise { - const workspaceFile = new environment.WorkspaceFile(fsPath); - try { - const envs = await workspaceFile.environmentObjects; - envs.forEach(env => { - if (!env.host || !env.port || !env.user || !env.password) { - throw new Error(); - } - }); - return envs; - } - catch (e) { - const workspaceFolder = workspaceFile.workspaceFolder; - if (workspaceFolder) { - throw new Error(`Invalid configuration for Workspace Folder ${workspaceFolder.name}`); - } - throw new Error(`File ${fsPath} is not a member of the Workspace.`); - } -} - -export async function getCommandenvConfigQuickPick(envs: environment.EnvironmentConfig[]): Promise { - const items: environment.LaunchQuickPick[] = envs.map(env => { - return { label: env.name, description: '', env }; - }); - if (items.length === 1) return items[0].env; - const choice = await vscode.window.showQuickPick(items, { placeHolder: 'Select environment to get from.' }); - if (!choice) return undefined; - return choice.env; -} - -export function writeFileWithSettings(fsPath: string, output: string): Promise { - const trailingNewline: NEWLINE_SETTING = vscode.workspace.getConfiguration('psl', vscode.Uri.file(fsPath)).get('trailingNewline'); - switch (trailingNewline) { - case NEWLINE_SETTING.ALWAYS: - if (!output.endsWith('\n')) output += detectNewline(output); - break; - case NEWLINE_SETTING.NEVER: - output = output.replace(/(\r?\n)+$/, ''); - break; - default: - break; - } - return fs.writeFile(fsPath, output); -} - -/** - * https://github.com/sindresorhus/detect-newline - */ -function detectNewline(output: string) { - const newlines = (output.match(/(?:\r?\n)/g) || []); - - if (newlines.length === 0) { - return '\n'; - } - - const crlfCount = newlines.filter(el => { - return el === '\r\n'; - }).length; - - const lfCount = newlines.length - crlfCount; - - return crlfCount > lfCount ? '\r\n' : '\n'; -} diff --git a/src/hostCommands/pslUnitTest.ts b/src/hostCommands/pslUnitTest.ts deleted file mode 100644 index a73fb36..0000000 --- a/src/hostCommands/pslUnitTest.ts +++ /dev/null @@ -1,228 +0,0 @@ -import * as vscode from 'vscode'; -import { EnvironmentConfig } from '../common/environment'; -import { getVirtualDocument, MumpsVirtualDocument, onDidDeleteVirtualMumps } from '../language/mumps'; -import { getConnection } from './hostCommandUtils'; - -export interface RoutineCoverage { - methods: MethodCoverage[]; - coverage: string; - name: string; -} - -interface MethodCoverage { - name: string; - coverageSequence: LineCoverage[]; -} - -interface LineCoverage { - indicator: CoverageIndicator; -} - -enum CoverageIndicator { - NOT_COVERED = 0, - COVERED = 1, - COMMENT = 2, -} - -interface ParsedOutput { - /** - * Output without coverage information. - */ - output: string; - - /** - * Parsed coverage information for a series of routines. - */ - documents: RoutineCoverage[]; -} - -const diagnosticCollection = vscode.languages.createDiagnosticCollection('psl-test'); - -const coverageScheme = MumpsVirtualDocument.schemes.coverage; - -function createDecoration(backgroundKey: string, rulerKey: string) { - return vscode.window.createTextEditorDecorationType({ - backgroundColor: new vscode.ThemeColor(backgroundKey), - isWholeLine: true, - overviewRulerColor: new vscode.ThemeColor(rulerKey), - overviewRulerLane: vscode.OverviewRulerLane.Full, - rangeBehavior: vscode.DecorationRangeBehavior.ClosedOpen, - }); -} -const notCovered = createDecoration('diffEditor.removedTextBackground', 'editorOverviewRuler.errorForeground'); -const covered = createDecoration('diffEditor.insertedTextBackground', 'diffEditor.insertedTextBackground'); - -onDidDeleteVirtualMumps(uri => { - if (uri.scheme === coverageScheme) { - diagnosticCollection.delete(uri); - } -}); - -vscode.window.onDidChangeActiveTextEditor(textEditor => { - if (textEditor && textEditor.document.uri.scheme === coverageScheme) { - setCoverageDecorations(textEditor); - } -}); - -export async function displayCoverage(documents: RoutineCoverage[], env: EnvironmentConfig, testName: string) { - const baseUri = vscode.Uri.parse(`${coverageScheme}:`); - const connection = await getConnection(env); - for (const documentCoverage of documents) { - await connection.get(`${documentCoverage.name}.m`).then(mCode => { - const sourceCode = mCode; - const uri = baseUri.with({ - path: `/${env.name}/${testName}/${documentCoverage.name}.m`, - query: JSON.stringify(documentCoverage), - }); - const virtualMumps = new MumpsVirtualDocument(documentCoverage.name, sourceCode, uri); - setCoverageDiagnostics(virtualMumps); - vscode.window.showTextDocument(virtualMumps.uri, { preview: false }); - }); - } -} - -function getRoutineCoverage(uri: vscode.Uri): RoutineCoverage { - return JSON.parse(uri.query); -} - -function setCoverageDiagnostics(virtualMumps: MumpsVirtualDocument) { - let allDiagnostics: vscode.Diagnostic[] = []; - getRoutineCoverage(virtualMumps.uri).methods.forEach(coverageMethod => { - const documentMethod = virtualMumps.parsedDocument.methods.find(method => { - return method.id.value === coverageMethod.name; - }); - if (!documentMethod) return; - const methodRanges = collectMethodRanges(coverageMethod); - const diagnostics = methodRanges.map(methodRange => { - const vscodeRange = new vscode.Range( - documentMethod.line + methodRange.start, - 0, - documentMethod.line + methodRange.end, - Number.MAX_VALUE, - ); - return new vscode.Diagnostic( - vscodeRange, - `Missing coverage in method "${coverageMethod.name}"`, - vscode.DiagnosticSeverity.Error, - ); - }); - allDiagnostics = [...allDiagnostics, ...diagnostics]; - }); - diagnosticCollection.set(virtualMumps.uri, allDiagnostics); -} - -function collectMethodRanges(methodCoverage: MethodCoverage) { - const ranges = []; - let previousIndicator: number; - interface SequenceRange { start: number; end: number; } - const last = methodCoverage.coverageSequence.reduce((range: SequenceRange, lineCoverage, index) => { - let indicator: number; - if (indicator === CoverageIndicator.COMMENT) indicator = previousIndicator; - else indicator = lineCoverage.indicator; - - if (indicator === CoverageIndicator.NOT_COVERED) { - if (!range) { - previousIndicator = indicator; - return { start: index, end: index }; - } - else { - previousIndicator = indicator; - range.end = index; - return range; - } - } - if (indicator === CoverageIndicator.COVERED && range) { - previousIndicator = indicator; - ranges.push(range); - } - }, undefined); - if (last) ranges.push(last); - return ranges; -} - -/** - * Called every time the document becomes active (`onDidChangeActiveTextEditor`) - * for the mumps coverage uri scheme. - */ -function setCoverageDecorations(textEditor: vscode.TextEditor) { - const notCoveredLines: number[] = []; - const coveredLines: number[] = []; - const virtualMumps = getVirtualDocument(textEditor.document.uri); - getRoutineCoverage(virtualMumps.uri).methods.forEach(coverageMethod => { - const documentMethod = virtualMumps.parsedDocument.methods.find(method => { - return method.id.value === coverageMethod.name; - }); - if (!documentMethod) return; - let lastIndicator: number; - for (let lineNumber = 0; lineNumber < coverageMethod.coverageSequence.length; lineNumber++) { - const indicator = coverageMethod.coverageSequence[lineNumber].indicator; - if (!indicator || (indicator === CoverageIndicator.COMMENT && !lastIndicator)) { - notCoveredLines.push(documentMethod.line + lineNumber); - lastIndicator = 0; - } - else { - coveredLines.push(documentMethod.line + lineNumber); - lastIndicator = 1; - } - } - }); - textEditor.setDecorations(notCovered, notCoveredLines.map(line => new vscode.Range(line, 0, line, Number.MAX_VALUE))); - textEditor.setDecorations(covered, coveredLines.map(line => new vscode.Range(line, 0, line, Number.MAX_VALUE))); -} - -/** - * Parses the RPC output of a coverage run. Returns sanitized output and parsed coverage report. - */ -export function parseCoverageOutput(input: string): ParsedOutput { - const parsed: ParsedOutput = { - documents: [], - output: input, - }; - - const begin = '#BeginCoverageInfo'; - const end = '#EndCoverageInfo'; - - if (!input.includes(begin) && !input.includes(end)) { - return parsed; - } - - const split1 = input.split(begin); - const split2 = split1[1].split(end); - const output = split1[0] + split2[split2.length - 1]; - parsed.output = output; - - const routinesToPercentages = new Map(); - - const match = output.match(/\d+\.\d+% - \w+/g); - if (!match) return parsed; - - match.forEach(l => routinesToPercentages.set((l.split(' - ')[1]), l.split(' - ')[0])); - - parsed.documents = extractDocumentCoverage(split2[0], routinesToPercentages); - - return parsed; -} - -function extractDocumentCoverage(codeOutput: string, routinesToPercentages: Map): RoutineCoverage[] { - const splitOutput = codeOutput.split(/\r?\n/).filter(x => x).map(x => x.trim()); - - const documents: RoutineCoverage[] = []; - let documentCoverage: RoutineCoverage = { coverage: '', methods: [], name: '' }; - const initialize = (routineName: string) => { - documentCoverage = { name: routineName, methods: [], coverage: routinesToPercentages.get(routineName) || '' }; - documents.push(documentCoverage); - }; - - for (const line of splitOutput) { - if (line.match(/^9\|.*/)) { - initialize(line.split('|')[1]); - } - else if (line.match(/^1/)) { - documentCoverage.methods.push( - { name: line.split('|')[1], coverageSequence: line.split('|')[2].split('').map(s => ({ indicator: Number(s) })) }, - ); - } - } - - return documents; -} diff --git a/src/hostCommands/refresh.ts b/src/hostCommands/refresh.ts deleted file mode 100644 index 7a6bfa0..0000000 --- a/src/hostCommands/refresh.ts +++ /dev/null @@ -1,122 +0,0 @@ -import * as vscode from 'vscode'; -import * as utils from './hostCommandUtils'; -import * as path from 'path'; -import * as fs from 'fs-extra'; -import * as environment from '../common/environment'; - -const icon = utils.icons.REFRESH; - -export async function refreshElementHandler(context: utils.ExtensionCommandContext): Promise { - let c = utils.getFullContext(context); - if (c.mode === utils.ContextMode.FILE) { - return refreshElement(c.fsPath).catch(() => {}); - } - else if (c.mode === utils.ContextMode.DIRECTORY) { - let files = await vscode.window.showOpenDialog({defaultUri: vscode.Uri.file(c.fsPath), canSelectMany: true, openLabel: 'Refresh'}) - if (!files) return; - for (let fsPath of files.map(file => file.fsPath)) { - await refreshElement(fsPath).catch(() => {}); - } - } - else { - let quickPick = await environment.workspaceQuickPick(); - if (!quickPick) return; - let chosenEnv = quickPick; - let files = await vscode.window.showOpenDialog({defaultUri: vscode.Uri.file(chosenEnv.fsPath), canSelectMany: true, openLabel: 'Refresh'}) - if (!files) return; - for (let fsPath of files.map(file => file.fsPath)) { - await refreshElement(fsPath).catch(() => {}) - } - } - return; -} - -async function refreshElement(fsPath: string) { - if (!fs.statSync(fsPath).isFile()) return; - let env; - return utils.executeWithProgress(`${icon} ${path.basename(fsPath)} REFRESH`, async () => { - let envs; - try { - envs = await utils.getEnvironment(fsPath); - } - catch (e) { - utils.logger.error(`${utils.icons.ERROR} ${icon} Invalid environment configuration.`); - return; - } - if (envs.length === 0) { - utils.logger.error(`${utils.icons.ERROR} ${icon} No environments selected.`); - return; - } - let choice = await utils.getCommandenvConfigQuickPick(envs); - if (!choice) return; - env = choice; - utils.logger.info(`${utils.icons.WAIT} ${icon} ${path.basename(fsPath)} REFRESH from ${env.name}`); - let doc = await vscode.workspace.openTextDocument(fsPath); - await doc.save(); - let connection = await utils.getConnection(env); - let output = await connection.get(fsPath); - await utils.writeFileWithSettings(fsPath, output); - utils.logger.info(`${utils.icons.SUCCESS} ${icon} ${path.basename(fsPath)} REFRESH from ${env.name} succeeded`); - connection.close(); - await vscode.window.showTextDocument(doc); - }).catch((e: Error) => { - if (env && env.name) { - utils.logger.error(`${utils.icons.ERROR} ${icon} error in ${env.name} ${e.message}`); - } - else { - utils.logger.error(`${utils.icons.ERROR} ${icon} ${e.message}`); - } - }) -} - -export async function refreshTableHandler(context: utils.ExtensionCommandContext) { - let c = utils.getFullContext(context); - if (c.mode === utils.ContextMode.FILE) { - let tableName: string; - if (path.extname(c.fsPath) === '.TBL') { - tableName = path.basename(c.fsPath).split('.TBL')[0]; - } - else if (path.extname(c.fsPath) === '.COL') { - tableName = path.basename(c.fsPath).split('.COL')[0].split('-')[0]; - } - else { - return; - } - let targetDir = path.dirname(c.fsPath); - return refreshTable(tableName, targetDir).catch(() => {}); - } -} - - -async function refreshTable(tableName: string, targetDirectory: string) { - let env; - await utils.executeWithProgress(`${icon} ${tableName} TABLE REFRESH`, async () => { - let envs = await utils.getEnvironment(targetDirectory); - let choice = await utils.getCommandenvConfigQuickPick(envs); - if (!choice) return; - env = choice; - utils.logger.info(`${utils.icons.WAIT} ${icon} ${tableName} TABLE REFRESH from ${env.name}`); - let connection = await utils.getConnection(env); - let output = await connection.getTable(tableName.toUpperCase() + '.TBL'); - let tableFiles = (await fs.readdir(targetDirectory)).filter(f => f.startsWith(tableName)); - for (let file of tableFiles) { - await fs.remove(file); - } - const promises = output.split(String.fromCharCode(0)).map(content => { - const contentArray = content.split(String.fromCharCode(1)); - const fileName = contentArray[0]; - const fileContent = contentArray[1]; - return utils.writeFileWithSettings(path.join(targetDirectory, fileName), fileContent); - }); - await Promise.all(promises); - utils.logger.info(`${utils.icons.SUCCESS} ${icon} ${tableName} TABLE REFRESH from ${env.name} succeeded`); - connection.close(); - }).catch((e: Error) => { - if (env && env.name) { - utils.logger.error(`${utils.icons.ERROR} ${icon} error in ${env.name} ${e.message}`); - } - else { - utils.logger.error(`${utils.icons.ERROR} ${icon} ${e.message}`); - } - }) -} diff --git a/src/hostCommands/run.ts b/src/hostCommands/run.ts deleted file mode 100644 index 2f80b7e..0000000 --- a/src/hostCommands/run.ts +++ /dev/null @@ -1,67 +0,0 @@ -import * as fs from 'fs-extra'; -import * as path from 'path'; -import * as vscode from 'vscode'; -import * as environment from '../common/environment'; -import * as utils from './hostCommandUtils'; - -const icon = utils.icons.RUN; - -export async function runPSLHandler(context: utils.ExtensionCommandContext): Promise { - handle(context); -} - -async function handle(context: utils.ExtensionCommandContext): Promise { - const c = utils.getFullContext(context); - if (c.mode === utils.ContextMode.FILE) { - return runPSL(c.fsPath).catch(() => { }); - } - else if (c.mode === utils.ContextMode.DIRECTORY) { - const files = await vscode.window.showOpenDialog({ defaultUri: vscode.Uri.file(c.fsPath), canSelectMany: true, openLabel: 'Run PSL' }); - if (!files) return; - for (const fsPath of files.map(file => file.fsPath)) { - await runPSL(fsPath).catch(() => { }); - } - } - else { - const quickPick = await environment.workspaceQuickPick(); - if (!quickPick) return; - const chosenEnv = quickPick; - const files = await vscode.window.showOpenDialog({ defaultUri: vscode.Uri.file(chosenEnv.fsPath), canSelectMany: true, openLabel: 'Run PSL' }); - if (!files) return; - for (const fsPath of files.map(file => file.fsPath)) { - await runPSL(fsPath).catch(() => { }); - } - } - return; -} - -async function runPSL(fsPath: string) { - if (!fs.statSync(fsPath).isFile()) return; - const doc = await vscode.workspace.openTextDocument(fsPath); - await doc.save(); - let envs: environment.EnvironmentConfig[]; - try { - envs = await utils.getEnvironment(fsPath); - } - catch (e) { - utils.logger.error(`${utils.icons.ERROR} ${icon} Invalid environment configuration.`); - return; - } - if (envs.length === 0) { - utils.logger.error(`${utils.icons.ERROR} ${icon} No environments selected.`); - return; - } - const promises = []; - for (const env of envs) { - promises.push(utils.executeWithProgress(`${icon} ${path.basename(fsPath)} RUN`, async () => { - utils.logger.info(`${utils.icons.WAIT} ${icon} ${path.basename(fsPath)} RUN in ${env.name}`); - const connection = await utils.getConnection(env); - const output: string = await connection.runPsl(fsPath); - connection.close(); - utils.logger.info(output.trim()); - }).catch((e: Error) => { - utils.logger.error(`${utils.icons.ERROR} ${icon} error in ${env.name} ${e.message}`); - })); - } - await Promise.all(promises); -} diff --git a/src/hostCommands/runCustom.ts b/src/hostCommands/runCustom.ts deleted file mode 100644 index 0a7cf6c..0000000 --- a/src/hostCommands/runCustom.ts +++ /dev/null @@ -1,150 +0,0 @@ -import * as fs from 'fs-extra'; -import * as path from 'path'; -import * as vscode from 'vscode'; -import * as environment from '../common/environment'; -import { MtmConnection } from '../mtm/mtm'; -import * as utils from './hostCommandUtils'; -import { displayCoverage, parseCoverageOutput, RoutineCoverage } from './pslUnitTest'; - -const icon = utils.icons.RUN; - -interface CustomRunContext { - command: string; - contextKey: string; -} - -export const testContext: CustomRunContext = { - command: 'runTest', - contextKey: 'psl.runTestContext', -}; - -export const coverageContext: CustomRunContext = { - command: 'runCoverage', - contextKey: 'psl.runCoverageContext', -}; - -const customRunContexts = [testContext, coverageContext]; - -interface CustomTaskConfig { - mrpcID: string; - request: string; - command: string; -} - -export async function runTestHandler(context: utils.ExtensionCommandContext): Promise { - handle(context, testContext); -} - -export async function runCoverageHandler(context: utils.ExtensionCommandContext): Promise { - handle(context, coverageContext); -} - -async function handle(context: utils.ExtensionCommandContext, runContext?: CustomRunContext): Promise { - const c = utils.getFullContext(context); - if (c.mode === utils.ContextMode.FILE) { - return runPSL(c.fsPath, runContext).catch(() => { }); - } - else if (c.mode === utils.ContextMode.DIRECTORY) { - const files = await vscode.window.showOpenDialog({ defaultUri: vscode.Uri.file(c.fsPath), canSelectMany: true, openLabel: 'Run PSL' }); - if (!files) return; - for (const fsPath of files.map(file => file.fsPath)) { - await runPSL(fsPath, runContext).catch(() => { }); - } - } - else { - const quickPick = await environment.workspaceQuickPick(); - if (!quickPick) return; - const chosenEnv = quickPick; - const files = await vscode.window.showOpenDialog({ defaultUri: vscode.Uri.file(chosenEnv.fsPath), canSelectMany: true, openLabel: 'Run PSL' }); - if (!files) return; - for (const fsPath of files.map(file => file.fsPath)) { - await runPSL(fsPath, runContext).catch(() => { }); - } - } - return; -} - -async function runPSL(fsPath: string, runContext: CustomRunContext) { - if (!fs.statSync(fsPath).isFile()) return; - const doc = await vscode.workspace.openTextDocument(fsPath); - const config = getFromConfiguration(doc.uri, runContext); - if (!config) throw new Error(`Invalid configuration for ${runContext.command}`); - await doc.save(); - let envs: environment.EnvironmentConfig[]; - try { - envs = await utils.getEnvironment(fsPath); - } - catch (e) { - utils.logger.error(`${utils.icons.ERROR} ${icon} Invalid environment configuration.`); - return; - } - if (envs.length === 0) { - utils.logger.error(`${utils.icons.ERROR} ${icon} No environments selected.`); - return; - } - const promises = []; - for (const env of envs) { - promises.push(utils.executeWithProgress(`${icon} ${path.basename(fsPath)} RUN`, async () => { - utils.logger.info(`${utils.icons.WAIT} ${icon} ${path.basename(fsPath)} RUN in ${env.name}`); - const connection = await utils.getConnection(env); - const output = await runCustom(connection, fsPath, config, env); - connection.close(); - utils.logger.info(output.trim()); - }).catch((e: Error) => { - utils.logger.error(`${utils.icons.ERROR} ${icon} error in ${env.name} ${e.message}`); - })); - } - await Promise.all(promises); -} - -function getFromConfiguration(uri: vscode.Uri, runContext: CustomRunContext): CustomTaskConfig | undefined { - const configs = vscode.workspace.getConfiguration('psl', uri).get('customTasks'); - const config = configs.find(c => c.command === runContext.command); - if (!config || !config.mrpcID || !config.request) { - return undefined; - } - return config; -} - -export function registerCustomRunContext() { - if (vscode.window.activeTextEditor) setCustomRunContext(vscode.window.activeTextEditor); - vscode.window.onDidChangeActiveTextEditor(setCustomRunContext); -} - -export function setCustomRunContext(textEditor: vscode.TextEditor) { - for (const context of customRunContexts) { - let showCommand = false; - if (textEditor) { - if (getFromConfiguration(textEditor.document.uri, context)) showCommand = true; - } - vscode.commands.executeCommand('setContext', context.contextKey, showCommand); - } -} - -async function runCustom( - connection: MtmConnection, - fsPath: string, - config: CustomTaskConfig, - env: environment.EnvironmentConfig, -): Promise { - - const output = await connection.runCustom(fsPath, config.mrpcID, config.request); - if (config.command !== coverageContext.command) return output; - const parsedOutput = parseCoverageOutput(output); - if (parsedOutput.documents.length) { - type QuickPickItem = vscode.QuickPickItem & { documentCoverage: RoutineCoverage }; - const items: QuickPickItem[] = parsedOutput.documents.map(documentCoverage => { - return { - description: documentCoverage.coverage, - documentCoverage, - label: documentCoverage.name, - }; - }); - vscode.window.showQuickPick(items, { canPickMany: true, placeHolder: 'Show coverage', ignoreFocusOut: true }) - .then(choices => { - if (!choices || !choices.length) return; - displayCoverage(choices.map(x => x.documentCoverage), env, path.basename(fsPath)); - }); - } - return parsedOutput.output; -} diff --git a/src/hostCommands/send.ts b/src/hostCommands/send.ts deleted file mode 100644 index 6a5dc58..0000000 --- a/src/hostCommands/send.ts +++ /dev/null @@ -1,117 +0,0 @@ -import * as vscode from 'vscode'; -import * as utils from './hostCommandUtils'; -import * as path from 'path'; -import * as fs from 'fs-extra'; -import * as environment from '../common/environment'; - -const icon = utils.icons.SEND; - -export async function sendElementHandler(context: utils.ExtensionCommandContext): Promise { - let c = utils.getFullContext(context); - if (c.mode === utils.ContextMode.EMPTY) { - let quickPick = await environment.workspaceQuickPick(); - if (!quickPick) return; - let chosenEnv = quickPick; - let files = await vscode.window.showOpenDialog({ defaultUri: vscode.Uri.file(chosenEnv.fsPath), canSelectMany: true, openLabel: 'Send' }) - if (!files) return; - for (let fsPath of files.map(file => file.fsPath).sort(tableFirst)) { - await sendElement(fsPath).catch(() => { }); - } - } - else if (c.mode === utils.ContextMode.DIRECTORY) { - let files = await vscode.window.showOpenDialog({ defaultUri: vscode.Uri.file(c.fsPath), canSelectMany: true, openLabel: 'Send' }); - if (!files) return; - let sortedFiles = files.map(uri => uri.fsPath).sort(tableFirst); - for (let fsPath of sortedFiles) { - await sendElement(fsPath).catch(() => { }); - } - } - if (c.mode === utils.ContextMode.FILE) { - return sendElement(c.fsPath).catch(() => { }); - } - return; -} - -export async function sendTableHandler(context: utils.ExtensionCommandContext): Promise { - let c = utils.getFullContext(context); - if (c.mode === utils.ContextMode.EMPTY) { - return; - } - if (c.mode === utils.ContextMode.FILE) { - let tableName: string; - if (path.extname(c.fsPath) === '.TBL') { - tableName = path.basename(c.fsPath).split('.TBL')[0]; - } - else if (path.extname(c.fsPath) === '.COL') { - tableName = path.basename(c.fsPath).split('.COL')[0].split('-')[0]; - } - else { - return; - } - let files = await fs.readdir(path.dirname(c.fsPath)) - let sortedFiles = files.filter(f => f.startsWith(tableName)).sort(tableFirst); - if (sortedFiles.length > 99) { - let resp = await vscode.window.showInformationMessage(`Send ${sortedFiles.length} elements of ${tableName}?`, { modal: true }, 'Yes'); - if (resp !== 'Yes') return; - } - for (let file of sortedFiles) { - await sendElement(path.join(path.dirname(c.fsPath), file)).catch(() => { }); - } - } - return; -} - -// async function sendDirectory(targetDir: string) { -// let fileNames = await fs.readdir(targetDir); -// let word = fileNames.length === 1 ? 'file' : 'files'; -// let resp = await vscode.window.showInformationMessage(`Send contents of ${targetDir} (${fileNames.length} ${word})?`, { modal: true }, 'Yes'); -// if (resp !== 'Yes') return; -// fileNames.sort(tableFirst); -// for (let index = 0; index < fileNames.length; index++) { -// let fileName = fileNames[index]; -// // TODO what if element is a directory? -// await sendElement(path.join(targetDir, fileName)); -// } -// } - -async function sendElement(fsPath: string) { - if (!fs.statSync(fsPath).isFile()) return - let envs; - try { - envs = await utils.getEnvironment(fsPath); - } - catch (e) { - utils.logger.error(`${utils.icons.ERROR} ${icon} Invalid environment configuration.`); - return; - } - if (envs.length === 0) { - utils.logger.error(`${utils.icons.ERROR} ${icon} No environments selected.`); - return; - } - let promises: Promise[] = [] - for (let env of envs) { - promises.push(utils.executeWithProgress(`${icon} ${path.basename(fsPath)} SEND`, async () => { - await vscode.workspace.openTextDocument(fsPath).then(doc => doc.save()) - utils.logger.info(`${utils.icons.WAIT} ${icon} ${path.basename(fsPath)} SEND to ${env.name}`); - let connection = await utils.getConnection(env); - await connection.send(fsPath); - connection.close(); - utils.logger.info(`${utils.icons.SUCCESS} ${icon} ${path.basename(fsPath)} SEND to ${env.name} successful`); - }).catch((e: Error) => { - utils.logger.error(`${utils.icons.ERROR} ${icon} error in ${env.name} ${e.message}`); - })) - }; - await Promise.all(promises); -} - -function tableFirst(a: string, b: string) { - let aIsTable = a.endsWith('.TBL'); - let bIsTable = b.endsWith('.TBL'); - if (aIsTable && !bIsTable) { - return -1; - } - else if (bIsTable && !aIsTable) { - return 1; - } - return a.localeCompare(b); -} \ No newline at end of file diff --git a/src/hostCommands/testCompile.ts b/src/hostCommands/testCompile.ts deleted file mode 100644 index c65e0be..0000000 --- a/src/hostCommands/testCompile.ts +++ /dev/null @@ -1,209 +0,0 @@ -import * as vscode from 'vscode'; -import * as utils from './hostCommandUtils'; -import * as path from 'path'; -import * as fs from 'fs-extra'; -import { PSLDiagnostic } from '../common/diagnostics'; -import * as extension from '../extension'; -import * as environment from '../common/environment'; - -const icon = utils.icons.TEST; - -export async function testCompileHandler(context: utils.ExtensionCommandContext): Promise { - let c = utils.getFullContext(context); - let diagnostics = [] - if (c.mode === utils.ContextMode.FILE) { - await testCompile(c.fsPath).catch(() => { }); - } - else if (c.mode === utils.ContextMode.DIRECTORY) { - let files = await vscode.window.showOpenDialog({ defaultUri: vscode.Uri.file(c.fsPath), canSelectMany: true, openLabel: 'Test Compile' }) - if (!files) return; - for (let fsPath of files.map(file => file.fsPath)) { - let result = await testCompile(fsPath).catch(() => { }); - if (result) diagnostics = diagnostics.concat(result); - } - } - else { - let quickPick = await environment.workspaceQuickPick(); - if (!quickPick) return; - let chosenEnv = quickPick; - let files = await vscode.window.showOpenDialog({ defaultUri: vscode.Uri.file(chosenEnv.fsPath), canSelectMany: true, openLabel: 'Test Compile' }) - if (!files) return; - for (let fsPath of files.map(file => file.fsPath)) { - let result = await testCompile(fsPath); - if (result) diagnostics = diagnostics.concat(result); - } - } -} - -export async function testCompile(fsPath: string): Promise { - const fileStats = await fs.stat(fsPath); - if (!fileStats.isFile()) { - utils.logger.error(`${utils.icons.ERROR} ${icon} ${fsPath} is not a file.`); - return true; - } - let textDocument = await vscode.workspace.openTextDocument(fsPath); - if (!canTestCompileFile(textDocument, fsPath)) { - // The error message for the specific error was already added in 'canTestCompileFile' - return true; - } - - let testCompileSucceeded = false; - let envs; - try { - envs = await utils.getEnvironment(fsPath); - } - catch (e) { - utils.logger.error(`${utils.icons.ERROR} ${icon} Invalid environment configuration.`); - return true; - } - if (envs.length === 0) { - utils.logger.error(`${utils.icons.ERROR} ${icon} No environments selected.`); - return true; - } - let testCompiles: Promise[] = []; - for (let env of envs) { - testCompiles.push(utils.executeWithProgress(`${icon} ${path.basename(fsPath)} TEST COMPILE`, async () => { - await textDocument.save(); - utils.logger.info(`${utils.icons.WAIT} ${icon} ${path.basename(fsPath)} TEST COMPILE in ${env.name}`); - let connection = await utils.getConnection(env); - let output = await connection.testCompile(fsPath); - connection.close(); - let pslDiagnostics = parseCompilerOutput(output, textDocument); - testCompileSucceeded = pslDiagnostics.filter(d => d.severity === vscode.DiagnosticSeverity.Error).length === 0; - let testCompileWarning = pslDiagnostics.filter(d => d.severity === vscode.DiagnosticSeverity.Warning).length > 0; - if (!testCompileSucceeded) { - output = `${utils.icons.ERROR} ${icon} ${path.basename(fsPath)} TEST COMPILE in ${env.name} failed\n` + output - } - else if (testCompileWarning) { - output = `${utils.icons.WARN} ${icon} ${path.basename(fsPath)} TEST COMPILE in ${env.name} succeeded with warning\n` + output - } - else { - output = `${utils.icons.SUCCESS} ${icon} ${path.basename(fsPath)} TEST COMPILE in ${env.name} succeeded\n` + output - } - utils.logger.info(output.split('\n').join('\n' + ' '.repeat(20))); - PSLDiagnostic.setDiagnostics(pslDiagnostics, env.name, fsPath); - }).catch((e: Error) => { - utils.logger.error(`${utils.icons.ERROR} ${icon} error in ${env.name} ${e.message}`); - })) - } - return false; -} - -function parseCompilerOutput(compilerOutput: string, document: vscode.TextDocument): PSLDiagnostic[] { - /* - ZFeatureToggleUtilities.PROC compiled at 15:31 on 29-05-17 - Source: ZFeatureToggleUtilities.PROC - - %PSL-E-SYNTAX: Missing #PROPERTYDEF - In module: ZFeatureToggleUtilities - - Source: ZFeatureToggleUtilities.PROC - #PROPEYDEF dummy class = String private node = "dummy" - %PSL-E-SYNTAX: Unexpected compiler command: PROPEYDEF - At source code line: 25 in subroutine: - - Source: ZFeatureToggleUtilities.PROC - - %PSL-I-LIST: 2 errors, 0 warnings, 0 informational messages ** failed ** - In module: ZFeatureToggleUtilities - */ - let outputArrays: Array = splitCompilerOutput(compilerOutput); - let pslDiagnostics: PSLDiagnostic[] = []; - outputArrays.slice(0, outputArrays.length - 1).forEach(pslCompilerMessage => { - - let lineNumber: number = pslCompilerMessage.getLineNumber(); - if (lineNumber - 1 > document.lineCount || lineNumber <= 0) return; - - let codeLine: string = document.lineAt(lineNumber - 1).text; - let startIndex: number = codeLine.search(/\S/); // returns the index of the first non-whitespace character - if (startIndex === -1) startIndex = 0; // codeLine is only whitespace characters - let range = new vscode.Range(lineNumber - 1, startIndex, lineNumber - 1, codeLine.length); - let severity = pslCompilerMessage.getSeverity(); - if (severity >= 0) { - pslDiagnostics.push(new PSLDiagnostic(`${pslCompilerMessage.message}`, severity, document.fileName, range)); - } - }); - return pslDiagnostics; -} - -function canTestCompileFile(document: vscode.TextDocument, fsPath: string): boolean { - let compilable: boolean = false; - if (vscode.languages.match(extension.PSL_MODE, document)) { - compilable = true; - } - else { - let fileTypeDescription = ""; - if (vscode.languages.match(extension.BATCH_MODE, document)) { - fileTypeDescription = "Batch" - } - else if (vscode.languages.match(extension.COL_MODE, document)) { - fileTypeDescription = "Column Definition" - } - else if (vscode.languages.match(extension.DATA_MODE, document)) { - fileTypeDescription = "Data File" - } - else if (vscode.languages.match(extension.SERIAL_MODE, document)) { - fileTypeDescription = "Serialized Data"; - } - else if (vscode.languages.match(extension.TBL_MODE, document)) { - fileTypeDescription = "Table Definition" - } - else if (vscode.languages.match(extension.TRIG_MODE, document)) { - fileTypeDescription = "Trigger" - } - if (fileTypeDescription != "") { - utils.logger.error(`${utils.icons.ERROR} ${icon} ${fileTypeDescription} ${path.basename(fsPath)} cannot be test compiled.`); - } - else { - utils.logger.error(`${utils.icons.ERROR} ${icon} ${path.basename(fsPath)} is not a PSL file.`); - } - } - return compilable; -} - -class PSLCompilerMessage { - source: string - code: string - message: string - location: string - - isFilled(): boolean { - return (this.source && this.message && this.location) !== ''; - } - getLineNumber(): number { - if (this.location.startsWith('In module:')) return -1; - return parseInt(this.location.replace('At source code line: ', '').split(' ')[0]); - } - getSeverity(): vscode.DiagnosticSeverity { - if (this.message.startsWith('%PSL-W-')) { - return vscode.DiagnosticSeverity.Warning; - } - else if (this.message.startsWith('%PSL-E-')) { - return vscode.DiagnosticSeverity.Error; - } - else if (this.message.startsWith('%PSL-I-')) { - return vscode.DiagnosticSeverity.Information; - } - return -1; - } -} - -function splitCompilerOutput(compilerOutput: string): Array { - /** - * breaks apart the psl compiler output string into an arrays of compiler messages - */ - let outputArrays: Array = []; - let compilerMessage: PSLCompilerMessage; - - let splitCompilerOutput = compilerOutput.replace(/\r/g, '').trim().split('\n'); - for (let i = 1; i < splitCompilerOutput.length; i++) { - compilerMessage = new PSLCompilerMessage(); - compilerMessage.source = splitCompilerOutput[i]; - compilerMessage.code = splitCompilerOutput[i + 1]; - compilerMessage.message = splitCompilerOutput[i + 2]; - compilerMessage.location = splitCompilerOutput[i + 3]; - if (compilerMessage.isFilled()) outputArrays.push(compilerMessage); - i = i + 4; - } - return outputArrays; -} diff --git a/src/language/activate.ts b/src/language/activate.ts deleted file mode 100644 index bd53153..0000000 --- a/src/language/activate.ts +++ /dev/null @@ -1,117 +0,0 @@ -import * as vscode from 'vscode'; - -import { BATCH_MODE, DATA_MODE, PSL_MODE, TRIG_MODE } from '../extension'; - -import * as codeQuality from './codeQuality'; -import { DataDocumentHighlightProvider, DataHoverProvider } from './dataItem'; -import { MumpsDocumentProvider, MumpsVirtualDocument } from './mumps'; -import * as previewDocumentation from './previewDocumentation'; -import { PSLDefinitionProvider } from './pslDefinitionProvider'; -import { MumpsDocumentSymbolProvider, PSLDocumentSymbolProvider } from './pslDocument'; -import { PSLHoverProvider } from './pslHoverProvider'; -import { PSLSignatureHelpProvider } from './pslSignature'; -import { PSLCompletionItemProvider } from './pslSuggest'; -import { setConfig, removeConfig } from '../parser/config'; - -export async function activate(context: vscode.ExtensionContext) { - - const PSL_MODES = [PSL_MODE, BATCH_MODE, TRIG_MODE]; - const MUMPS_MODES: vscode.DocumentFilter[] = Object.values(MumpsVirtualDocument.schemes).map(scheme => ({ scheme })); - - context.subscriptions.push( - // Data Hovers - vscode.languages.registerHoverProvider( - DATA_MODE, new DataHoverProvider(), - ), - - // Data Document Highlights - vscode.languages.registerDocumentHighlightProvider( - DATA_MODE, new DataDocumentHighlightProvider(), - ), - ); - - PSL_MODES.forEach(pslMode => { - context.subscriptions.push( - // Document Symbol Outline - vscode.languages.registerDocumentSymbolProvider( - pslMode, new PSLDocumentSymbolProvider(), - ), - - // Completion Items - vscode.languages.registerCompletionItemProvider( - pslMode, new PSLCompletionItemProvider(), '.', - ), - - // Signature Help - vscode.languages.registerSignatureHelpProvider( - pslMode, new PSLSignatureHelpProvider(), '(', ',', - ), - - // Go-to Definitions - vscode.languages.registerDefinitionProvider( - pslMode, new PSLDefinitionProvider(), - ), - - // Hovers - vscode.languages.registerHoverProvider( - pslMode, new PSLHoverProvider(), - ), - ); - }); - - MUMPS_MODES.forEach(mumpsMode => { - context.subscriptions.push( - // Content provider for virtual documents - vscode.workspace.registerTextDocumentContentProvider( - mumpsMode.scheme, new MumpsDocumentProvider(), - ), - - // Document Symbol Outline - vscode.languages.registerDocumentSymbolProvider( - mumpsMode, new MumpsDocumentSymbolProvider(), - ), - ); - }); - - projectActivate(context); - codeQuality.activate(context); - - previewDocumentation.activate(context); - - // Language Configuration - const wordPattern = /(-?\d*\.\d[a-zA-Z0-9\%\#]*)|([^\`\~\!\@\^\&\*\(\)\-\=\+\[\{\]\}\\\|\"\;\:\'\'\,\.\<\>\/\?\s_]+)/g; - vscode.languages.setLanguageConfiguration('psl', { wordPattern }); - vscode.languages.setLanguageConfiguration('profileBatch', { wordPattern }); - vscode.languages.setLanguageConfiguration('profileTrigger', { wordPattern }); -} - -export function previewEnabled(uri: vscode.Uri) { - return vscode.workspace.getConfiguration('psl', uri).get('previewFeatures'); -} - -async function projectActivate(context: vscode.ExtensionContext) { - const workspaces = new Map(); - if (vscode.workspace.workspaceFolders) { - vscode.workspace.workspaceFolders.forEach(workspace => { - workspaces.set(workspace.name, workspace.uri.fsPath); - }); - } - return Promise.all( - vscode.workspace.workspaceFolders - .map(workspace => new vscode.RelativePattern(workspace, 'profile-project.json')) - .map(async pattern => { - const watcher = vscode.workspace.createFileSystemWatcher(pattern); - context.subscriptions.push(watcher.onDidChange(uri => { - setConfig(uri.fsPath, workspaces); - }), watcher.onDidCreate(uri => { - setConfig(uri.fsPath, workspaces); - })); - watcher.onDidDelete(uri => { - removeConfig(uri.fsPath); - }); - const uris = await vscode.workspace.findFiles(pattern); - if (!uris.length) return; - await setConfig(uris[0].fsPath, workspaces); - }), - ); -} diff --git a/src/language/codeAction.ts b/src/language/codeAction.ts deleted file mode 100644 index 0f6ce44..0000000 --- a/src/language/codeAction.ts +++ /dev/null @@ -1,100 +0,0 @@ -import * as vscode from 'vscode'; -import { MemberDiagnostic } from '../language/codeQuality'; -import * as parser from '../parser/parser'; -import { getLineAfter } from '../parser/utilities'; -import { MethodDocumentation, MethodSeparator } from '../pslLint/methodDoc'; - -function initializeAction(title: string, ...diagnostics: MemberDiagnostic[]) { - const action = new vscode.CodeAction(title, vscode.CodeActionKind.QuickFix); - action.edit = new vscode.WorkspaceEdit(); - if (diagnostics) action.diagnostics = diagnostics; - return action; -} - -/* NOTE: -The CodeQualityActionContext is used in the provideCodeActions implementation of the -PSLActionProvider. This interface has a list of MemberDiagnostics, which extend -the vscode.Diagnostic interface. The provideCodeActions method expects an object that -implements the vscode.CodeActionContext interface. Ths interface now also has a triggerKind -and only property. These are not used currently, but this is fixing compilation errors. - -It might be worth revisiting all the custom interfaces that are extremely similar to -exposed vscode interfaces. -*/ -interface CodeQualityActionContext { - readonly triggerKind: vscode.CodeActionTriggerKind; - readonly only: vscode.CodeActionKind | undefined; - diagnostics: MemberDiagnostic[]; -} - -export class PSLActionProvider implements vscode.CodeActionProvider { - public async provideCodeActions( - document: vscode.TextDocument, - _range: vscode.Range | vscode.Selection, - context: CodeQualityActionContext, - _token: vscode.CancellationToken - ): Promise { - - if (context.diagnostics.length === 0) return; - - const newLine = document.eol === vscode.EndOfLine.LF ? '\n' : '\r\n'; - const actions: vscode.CodeAction[] = []; - const allDiagnostics: MemberDiagnostic[] = []; - const allTextEdits: Array<{ edit: vscode.TextEdit, priority: number }> = []; - - const fixAll: vscode.CodeAction = initializeAction('Fix all.'); - - for (const diagnostic of context.diagnostics) { - if (!diagnostic.member) continue; - - const method = diagnostic.member as parser.Method; - - if (diagnostic.ruleName === MethodSeparator.name) { - const separatorAction = initializeAction('Add separator.', diagnostic); - - const textEdit = vscode.TextEdit.insert( - new vscode.Position(method.id.position.line - 1, Number.MAX_VALUE), - `${newLine}\t// ---------------------------------------------------------------------`, - ); - - separatorAction.edit.set(document.uri, [textEdit]); - actions.push(separatorAction); - - allDiagnostics.push(diagnostic); - allTextEdits.push({ edit: textEdit, priority: 2 }); - } - - if (diagnostic.ruleName === MethodDocumentation.name) { - const documentationAction = initializeAction('Add documentation block.', diagnostic); - - let docText = `\t/* DOC -----------------------------------------------------------------${newLine}\t` - + `TODO: description of label ${method.id.value}${newLine}${newLine}`; - const terminator = `\t** ENDDOC */${newLine}`; - if (method.parameters.length > 0) { - const spacing = method.parameters.slice().sort((p1, p2): number => { - return p2.id.value.length - p1.id.value.length; - })[0].id.value.length + 2; - - docText += method.parameters.map(p => { - return `\t@param ${p.id.value}${' '.repeat(spacing - p.id.value.length)}TODO: description of param ${p.id.value}`; - }).join(`${newLine}${newLine}`) + `${newLine}`; - } - docText += terminator; - - const textEdit = vscode.TextEdit.insert(new vscode.Position(getLineAfter(method), 0), docText); - documentationAction.edit.set(document.uri, [textEdit]); - actions.push(documentationAction); - - allDiagnostics.push(diagnostic); - allTextEdits.push({ edit: textEdit, priority: 2 }); - - } - } - if (actions.length > 1) { - fixAll.edit.set(document.uri, allTextEdits.sort((a, b) => a.priority - b.priority).map(edits => edits.edit)); - fixAll.diagnostics = allDiagnostics; - actions.push(fixAll); - } - return actions; - } -} diff --git a/src/language/codeQuality.ts b/src/language/codeQuality.ts deleted file mode 100644 index 4ea1869..0000000 --- a/src/language/codeQuality.ts +++ /dev/null @@ -1,153 +0,0 @@ -import * as vscode from 'vscode'; -import { BATCH_MODE, PSL_MODE, TRIG_MODE } from '../extension'; -import * as parser from '../parser/parser'; -import { getDiagnostics } from '../pslLint/activate'; -import * as api from '../pslLint/api'; -import { getConfig, removeConfig, setConfig } from '../pslLint/config'; -import { PSLActionProvider } from './codeAction'; - -type lintOption = 'none' | 'all' | 'config' | true; - -export async function activate(context: vscode.ExtensionContext) { - - await pslLintConfigurationWatchers(context); - - const lintDiagnostics = vscode.languages.createDiagnosticCollection('psl-lint'); - context.subscriptions.push(lintDiagnostics); - - // initial token - let tokenSource = new vscode.CancellationTokenSource(); - - if (vscode.window.activeTextEditor) { - prepareRules(vscode.window.activeTextEditor.document, lintDiagnostics, tokenSource.token); - } - - vscode.window.onDidChangeActiveTextEditor(e => { - if (!e) return; - prepareRules(e.document, lintDiagnostics, tokenSource.token); - }); - - vscode.workspace.onDidChangeTextDocument(e => { - if (!e) return; - tokenSource.cancel(); - tokenSource = new vscode.CancellationTokenSource(); - prepareRules(e.document, lintDiagnostics, tokenSource.token); - }); - - vscode.workspace.onDidCloseTextDocument(closedDocument => { - lintDiagnostics.delete(closedDocument.uri); - }); - - const actionProvider = new PSLActionProvider(); - - for (const mode of [PSL_MODE, BATCH_MODE, TRIG_MODE]) { - context.subscriptions.push( - vscode.languages.registerCodeActionsProvider( - mode, actionProvider, - ), - ); - } -} - -async function pslLintConfigurationWatchers(context: vscode.ExtensionContext) { - return Promise.all( - vscode.workspace.workspaceFolders - .map(workspace => new vscode.RelativePattern(workspace, 'psl-lint.json')) - .map(async pattern => { - const watcher = vscode.workspace.createFileSystemWatcher(pattern); - context.subscriptions.push(watcher.onDidChange(uri => { - setConfig(uri.fsPath); - }), watcher.onDidCreate(uri => { - setConfig(uri.fsPath); - })); - watcher.onDidDelete(uri => { - removeConfig(uri.fsPath); - }); - const uris = await vscode.workspace.findFiles(pattern); - if (!uris.length) return; - await setConfig(uris[0].fsPath); - }), - ); -} - -export class MemberDiagnostic extends vscode.Diagnostic { - member: parser.Member; - ruleName: string; -} - -function prepareRules( - textDocument: vscode.TextDocument, - lintDiagnostics: vscode.DiagnosticCollection, - cancellationToken: vscode.CancellationToken, -) { - if (!api.ProfileComponent.isProfileComponent(textDocument.fileName)) return; - - const lintConfigValue: lintOption = vscode.workspace.getConfiguration('psl', textDocument.uri).get('lint'); - - let useConfig = false; - if (lintConfigValue === 'config') { - // check if config exist first - const config = getConfig(textDocument.uri.fsPath); - if (!config) return; - useConfig = true; - } - else if (lintConfigValue !== 'all' && lintConfigValue !== true) { - lintDiagnostics.clear(); - return; - } - - process.nextTick(() => { - if (!cancellationToken.isCancellationRequested) { - lint(textDocument, useConfig, cancellationToken, lintDiagnostics); - } - }); -} - -function lint( - textDocument: vscode.TextDocument, - useConfig: boolean, cancellationToken: vscode.CancellationToken, - lintDiagnostics: vscode.DiagnosticCollection, -) { - const profileComponent: api.ProfileComponent = prepareDocument(textDocument); - const parsedDocument = api.ProfileComponent.isPsl(profileComponent.fsPath) ? - parser.parseText(textDocument.getText()) : undefined; - const diagnostics = getDiagnostics(profileComponent, parsedDocument, useConfig); - const memberDiagnostics = transform(diagnostics, textDocument.uri); - process.nextTick(() => { - if (!cancellationToken.isCancellationRequested) { - lintDiagnostics.set(textDocument.uri, memberDiagnostics); - } - }); -} - -function prepareDocument(textDocument: vscode.TextDocument) { - const getTextAtLine = (n: number) => textDocument.lineAt(n).text; - const profileComponent = new api.ProfileComponent(textDocument.uri.fsPath, textDocument.getText(), getTextAtLine); - return profileComponent; -} - -function transform(diagnostics: api.Diagnostic[], uri: vscode.Uri): MemberDiagnostic[] { - return diagnostics.map(pslLintDiagnostic => { - const r = pslLintDiagnostic.range; - const vscodeRange = new vscode.Range(r.start.line, r.start.character, r.end.line, r.end.character); - const memberDiagnostic = new MemberDiagnostic(vscodeRange, pslLintDiagnostic.message, pslLintDiagnostic.severity); - memberDiagnostic.source = pslLintDiagnostic.source; - memberDiagnostic.code = pslLintDiagnostic.code; - memberDiagnostic.ruleName = pslLintDiagnostic.ruleName; - if (pslLintDiagnostic.member) memberDiagnostic.member = pslLintDiagnostic.member; - if (pslLintDiagnostic.relatedInformation) { - memberDiagnostic.relatedInformation = pslLintDiagnostic.relatedInformation.map(x => { - return new vscode.DiagnosticRelatedInformation( - new vscode.Location(uri, - new vscode.Range(x.range.start.line, - x.range.start.character, - x.range.end.line, - x.range.end.character, - )), - x.message, - ); - }); - } - return memberDiagnostic; - }); -} diff --git a/src/language/dataItem.ts b/src/language/dataItem.ts deleted file mode 100644 index 0c6a08b..0000000 --- a/src/language/dataItem.ts +++ /dev/null @@ -1,76 +0,0 @@ -import * as path from 'path'; -import * as vscode from 'vscode'; -import * as jsonc from 'jsonc-parser'; -import * as fs from 'fs-extra' - -function getEnvBase(fileName: string) { - return vscode.workspace.getWorkspaceFolder(vscode.Uri.file(fileName)).uri.fsPath -} - -export class DataHoverProvider implements vscode.HoverProvider { - public async provideHover(document: vscode.TextDocument, position: vscode.Position): Promise { - - // array of column names - let columnNames: Array = document.lineAt(0).text.split('\t'); - - // the text up to the cursor - let textToPosition: string = document.getText(new vscode.Range(position.line, 0, position.line, position.character)); - - // position of current data item - let currentDataItemPosition: number = textToPosition.split('\t').length - 1; - - // full text of data item - let dataItemText = document.lineAt(position.line).text.split('\t')[currentDataItemPosition]; - - let prevTabPos: number = textToPosition.lastIndexOf('\t') + 1; - let nextTabPos: number = prevTabPos + dataItemText.length; - - if (currentDataItemPosition <= columnNames.length) { - let columnName = columnNames[currentDataItemPosition]; - let tableName = path.basename(document.fileName).replace('.DAT', '') - let fileName = `${tableName.toUpperCase()}-${columnName.toUpperCase()}.COL` - let link = path.join(getEnvBase(document.fileName), 'dataqwik', 'table', `${tableName.toLowerCase()}`, `${fileName}`) - let content; - if (!fs.existsSync(link)) { - content = new vscode.MarkdownString(`COLUMN: **${columnName}**`); - } - else { - let uri = vscode.Uri.file(link) - let tbl = await vscode.workspace.openTextDocument(uri); - let tblJSON = jsonc.parse(tbl.getText()) - content = new vscode.MarkdownString(`COLUMN: **[${columnName}](command:vscode.open?${encodeURIComponent(JSON.stringify(uri))})** (*${tblJSON['DES']}*)`); - } - content.isTrusted = true; - return new vscode.Hover(content, new vscode.Range(position.line, prevTabPos, position.line, nextTabPos)) - } - - return undefined; - } -} - -export class DataDocumentHighlightProvider implements vscode.DocumentHighlightProvider { - public async provideDocumentHighlights(document: vscode.TextDocument, position: vscode.Position): Promise { - // the text up to the cursor - let textToPosition: string = document.getText(new vscode.Range(position.line, 0, position.line, position.character)); - - // position of current data item - let currentDataItemPosition: number = textToPosition.split('\t').length - 1; - - let highlights: vscode.DocumentHighlight[] = []; - for (let lineNumber = 0; lineNumber < document.lineCount; lineNumber++) { - let text = document.lineAt(lineNumber).text - if (!text) continue; - let row = document.lineAt(lineNumber).text.split('\t') - let dataItemText = row[currentDataItemPosition]; - let textToPosition = row.slice(0, currentDataItemPosition + 1).join('\t') - let prevTabCol: number = textToPosition.lastIndexOf('\t') + 1; - let nextTabCol: number = prevTabCol + dataItemText.length; - let range = new vscode.Range(lineNumber, prevTabCol, lineNumber, nextTabCol) - document.validateRange(range) - let highlight = new vscode.DocumentHighlight(range, vscode.DocumentHighlightKind.Write) - highlights.push(highlight) - } - return highlights; - } - -} \ No newline at end of file diff --git a/src/language/lang.ts b/src/language/lang.ts deleted file mode 100644 index 8205d93..0000000 --- a/src/language/lang.ts +++ /dev/null @@ -1,116 +0,0 @@ -import * as fs from 'fs-extra'; -import * as jsonc from 'jsonc-parser'; -import * as path from 'path'; -import * as vscode from 'vscode'; -import * as parser from '../parser/parser'; -import { Token } from '../parser/tokenizer'; -import * as utils from '../parser/utilities'; - -export interface Documentation { - code: string; - markdown: string; -} - -export async function getDocumentation(result: utils.FinderResult, finder: utils.ParsedDocFinder): Promise { - const { fsPath, member } = result; - if (!member) { - // handle tables here - if (fsPath.endsWith('.TBL')) { - const text = await getWorkspaceDocumentText(fsPath); - const parsed = jsonc.parse(text); - const doc = text.split('}')[1]; - const tableName = path.basename(fsPath).split('.')[0]; - - return { code: '(table) ' + tableName, markdown: `${parsed.DES}\n\n${doc}` }; - } - } - else if (member.memberClass === parser.MemberClass.column) { - const typs = { - $: ['Number', 'column type: $ (Currency)'], - B: ['String', 'column type: B (Blob)'], - C: ['Number', 'column type: C (Time)'], - D: ['Date', 'column type: D (Date)'], - F: ['Number', 'column type: F (Frequency)'], - L: ['Boolean', 'column type: L (Logical)'], - M: ['String', 'column type: M (Memo)'], - N: ['Number', 'column type: N (Number)'], - T: ['String', 'column type: T (Text)'], - U: ['String', 'column type: U (Uppercase text)'], - }; - const text = await getWorkspaceDocumentText(fsPath); - const parsed = jsonc.parse(text); - const typ = parsed.TYP; - const doc = text.split('}')[1]; - - return { - code: `(column) ${typs[typ][0]} ${member.id.value}`, - markdown: `${parsed.DES}\n\n${typs[typ][1]}\n\n${doc}`, - }; - } - else if (member.memberClass === parser.MemberClass.method) { - const method = member as parser.Method; - - const sigArray: Token[] = [...method.modifiers, method.types[0], method.id]; - const sig: string = sigArray.filter(Boolean).map(t => t.value).join(' '); - const argString: string = method.parameters - .map(param => `${param.types[0].value} ${param.id.value}`) - .join('\n\u200B , '); - let code = ''; - if (method.parameters.length === 0) code = `${sig}(${argString})`; - else code = `${sig}(\n\u200B \u200B \u200B ${argString}\n\u200B )`; - const markdown = method.documentation ? method.documentation : ''; - return { code, markdown }; - } - else { - let code = ''; - - if (member.types.length === 0) code = `void ${member.id.value}`; - else if (member.types.length === 1) { - if (member.types[0] === member.id) code = `static ${member.id.value}`; - else code = `${member.types[0].value} ${member.id.value}`; - } - else { - code = `${member.types[0].value} ${member.id.value}( ${member.types.slice(1).map((t: any) => t.value).join(', ')})`; - } - - switch (member.memberClass) { - case parser.MemberClass.declaration: - code = ' type ' + code; - break; - case parser.MemberClass.parameter: - code = '(parameter) ' + code; - break; - case parser.MemberClass.property: - code = ' #PROPERTYDEF ' + code; - break; - default: - return; - } - - let markdown = result.member.documentation ? result.member.documentation : ''; - - if (member.types[0].value.startsWith('Record')) { - const tableName = member.types[0].value.replace('Record', ''); - const tableDirectory = await finder.resolveFileDefinitionDirectory(tableName); - if (tableDirectory) { - const tableLocation = path.join( - tableDirectory, - tableName.toUpperCase() + '.TBL', - ); - const text = await getWorkspaceDocumentText(tableLocation); - const parsed = jsonc.parse(text); - const doc = text.split('}')[1]; - - markdown = `${parsed.DES}\n\n${doc}`; - } - } - return { code, markdown }; - } - -} - -export async function getWorkspaceDocumentText(fsPath: string): Promise { - return fs.stat(fsPath).then(_ => { - return vscode.workspace.openTextDocument(fsPath).then(textDocument => textDocument.getText(), () => ''); - }).catch(() => ''); -} diff --git a/src/language/mumps.ts b/src/language/mumps.ts deleted file mode 100644 index f7113ed..0000000 --- a/src/language/mumps.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { EventEmitter, TextDocumentContentProvider, Uri, workspace } from 'vscode'; -import { ParsedDocument, parseText } from '../parser'; - -export class MumpsVirtualDocument { - - static readonly schemes = { - compiled: 'compiledMumps', - coverage: 'coverageMumps', - }; - - readonly parsedDocument: ParsedDocument; - - constructor( - readonly routineName: string, - readonly sourceCode: string, - /** - * Uri with scheme in `mumpsSchemes` - */ - readonly uri: Uri, - ) { - this.parsedDocument = parseText(sourceCode); - virtualDocuments.set(uri.toString(), this); - } -} - -export class MumpsDocumentProvider implements TextDocumentContentProvider { - provideTextDocumentContent(uri: Uri): string { - return getVirtualDocument(uri).sourceCode; - } -} - -export function getVirtualDocument(uri: Uri) { - return virtualDocuments.get(uri.toString()); -} - -function isScheme(uri: Uri) { - return Object.values(MumpsVirtualDocument.schemes).indexOf(uri.scheme) > -1; -} - -/** - * Virtual Documents keyed by the string the string representation of their `Uri`s - */ -const virtualDocuments = new Map(); - -const _onDidDeleteVirtualMumps = new EventEmitter(); -export const onDidDeleteVirtualMumps = _onDidDeleteVirtualMumps.event; - -workspace.onDidCloseTextDocument(textDocument => { - const uri = textDocument.uri; - if (isScheme(uri)) { - virtualDocuments.delete(uri.toString()); - _onDidDeleteVirtualMumps.fire(uri); - } -}); diff --git a/src/language/previewDocumentation.ts b/src/language/previewDocumentation.ts deleted file mode 100644 index 06aac85..0000000 --- a/src/language/previewDocumentation.ts +++ /dev/null @@ -1,71 +0,0 @@ -import * as path from 'path'; -import { xhr }from 'request-light'; -import * as vscode from 'vscode'; - -export function activate(context: vscode.ExtensionContext) { - context.subscriptions.push( - vscode.commands.registerTextEditorCommand( - 'psl.previewDocumentation', - preparePreview, - ), - ); - - checkForDocumentationServer(); - - vscode.workspace.onDidChangeConfiguration(event => { - if (!event.affectsConfiguration('psl')) return; - checkForDocumentationServer(); - }); -} - -function checkForDocumentationServer(): string { - const documentationServer: string = vscode.workspace.getConfiguration('psl', null).get('documentationServer'); - if (documentationServer) { - vscode.commands.executeCommand('setContext', 'psl.hasDocumentationServer', true); - return documentationServer; - } - else { - vscode.commands.executeCommand('setContext', 'psl.hasDocumentationServer', false); - return ''; - } -} - -async function preparePreview(textEditor: vscode.TextEditor) { - const documentationServer: string = checkForDocumentationServer(); - if (!documentationServer) return; - - const markdown = await getMarkdownFromApi( - textEditor.document.getText(), - path.basename(textEditor.document.fileName), - documentationServer, - ); - if (!markdown) return; - showPreview(markdown); -} - -async function showPreview(markdown: string) { - const untitledDoc = await vscode.workspace.openTextDocument({ language: 'markdown', content: markdown }); - vscode.commands.executeCommand('markdown.showPreview', untitledDoc.uri); -} - -async function getMarkdownFromApi(pslText: string, fileName: string, documentationServer: string) { - try { - const data: string = JSON.stringify({ - sourceText: pslText, - }); - const response = await xhr({ - data, - headers: { - 'Content-Length': `${Buffer.byteLength(data)}`, - 'Content-Type': 'application/json', - }, - type: 'POST', - url: documentationServer + fileName, - }); - return response.responseText; - } - catch (e) { - vscode.window.showErrorMessage(e.responseText); - return ''; - } -} diff --git a/src/language/pslDefinitionProvider.ts b/src/language/pslDefinitionProvider.ts deleted file mode 100644 index b302807..0000000 --- a/src/language/pslDefinitionProvider.ts +++ /dev/null @@ -1,37 +0,0 @@ -import * as vscode from 'vscode'; -import { FinderPaths, getFinderPaths } from '../parser/config'; -import * as parser from '../parser/parser'; -import * as utils from '../parser/utilities'; -import * as lang from './lang'; - -export class PSLDefinitionProvider implements vscode.DefinitionProvider { - - async provideDefinition(document: vscode.TextDocument, position: vscode.Position, cancellationToknen: vscode.CancellationToken): Promise { - if (cancellationToknen.isCancellationRequested) return; - let parsedDoc = parser.parseText(document.getText()); - - // get tokens on line and current token - let tokenSearchResults = utils.searchTokens(parsedDoc.tokens, position); - if (!tokenSearchResults) return []; - let { tokensOnLine, index } = tokenSearchResults; - - const workspaceDirectory = vscode.workspace.getWorkspaceFolder(document.uri); - if (!workspaceDirectory) return; - - let callTokens = utils.getCallTokens(tokensOnLine, index); - if (callTokens.length === 0) return; - let paths: FinderPaths = getFinderPaths(workspaceDirectory.uri.fsPath, document.fileName); - let finder = new utils.ParsedDocFinder(parsedDoc, paths, lang.getWorkspaceDocumentText); - let resolvedResult = await finder.resolveResult(callTokens); - if (resolvedResult) return getLocation(resolvedResult); - } -} - -function getLocation(result: utils.FinderResult): vscode.Location { - if (!result.member) { - return new vscode.Location(vscode.Uri.file(result.fsPath), new vscode.Position(0, 0)); - } - let range = result.member.id.getRange(); - let vscodeRange = new vscode.Range(range.start.line, range.start.character, range.end.line, range.end.character); - return new vscode.Location(vscode.Uri.file(result.fsPath), vscodeRange); -} diff --git a/src/language/pslDocument.ts b/src/language/pslDocument.ts deleted file mode 100644 index 3b6304d..0000000 --- a/src/language/pslDocument.ts +++ /dev/null @@ -1,61 +0,0 @@ -import * as vscode from 'vscode'; -import * as parser from '../parser/parser'; -import { getVirtualDocument } from './mumps'; - -export class PSLDocumentSymbolProvider implements vscode.DocumentSymbolProvider { - - public provideDocumentSymbols(document: vscode.TextDocument): Promise { - return new Promise(resolve => { - const parsedDoc = parser.parseText(document.getText()); - const symbols: vscode.SymbolInformation[] = []; - parsedDoc.methods.forEach(method => { - symbols.push(createMethodSymbol(method, document)); - }); - parsedDoc.properties.forEach(property => { - const propertyNameToken = property.id; - const name = propertyNameToken.value; - const containerName = ''; - const position = propertyNameToken.position; - const location = new vscode.Location(document.uri, new vscode.Position(position.line, position.character)); - symbols.push(new vscode.SymbolInformation(name, vscode.SymbolKind.Property, containerName, location)); - }); - resolve(symbols); - }); - } -} - -/** - * Outline provider for MUMPS - */ -export class MumpsDocumentSymbolProvider implements vscode.DocumentSymbolProvider { - - public provideDocumentSymbols(document: vscode.TextDocument): vscode.SymbolInformation[] { - const symbols: vscode.SymbolInformation[] = []; - const parsedDoc = this.getParsedDoc(document); - parsedDoc.methods.forEach(method => { - symbols.push(createMethodSymbol(method, document)); - }); - return symbols; - } - - getParsedDoc(document: vscode.TextDocument) { - const cachedMumps = getVirtualDocument(document.uri); - if (cachedMumps) return cachedMumps.parsedDocument; - else return parser.parseText(document.getText()); - } -} - -function createMethodSymbol(method: parser.Method, document: vscode.TextDocument) { - const methodToken = method.id; - const name = methodToken.value; - const containerName = ''; - - const startPosition = new vscode.Position(methodToken.position.line, 0); - - let endPositionNumber = method.endLine; - if (endPositionNumber === -1) endPositionNumber = document.lineCount - 1; // last line - const endPosition = new vscode.Position(endPositionNumber, 0); - const methodRange = new vscode.Location(document.uri, new vscode.Range(startPosition, endPosition)); - const kind = method.batch ? vscode.SymbolKind.Module : vscode.SymbolKind.Function; - return new vscode.SymbolInformation(name, kind, containerName, methodRange); -} diff --git a/src/language/pslFormat.ts b/src/language/pslFormat.ts deleted file mode 100644 index 0ca6658..0000000 --- a/src/language/pslFormat.ts +++ /dev/null @@ -1,79 +0,0 @@ -import * as vscode from 'vscode'; -import * as parser from '../parser/parser'; -import { PSL_MODE } from '../extension'; - -export function activate(context: vscode.ExtensionContext) { - - context.subscriptions.push( - vscode.languages.registerDocumentFormattingEditProvider( - PSL_MODE, new PSLFormatProvider() - ) - ); - -} - -export class PSLFormatProvider implements vscode.DocumentFormattingEditProvider { - provideDocumentFormattingEdits(document: vscode.TextDocument): Promise { - let textEdits: vscode.TextEdit[] = []; - return new Promise(resolve => { - let p = parser.parseText(document.getText()); - p.methods.forEach(method => { - if (!method.closeParen) return; - method.memberClass - let methodLine = method.id.position.line; - let closePosition = method.closeParen.position; - let methodRange = new vscode.Range(methodLine, 0, closePosition.line, closePosition.character + 1) - textEdits.push(new vscode.TextEdit(methodRange, buildText(method))); - }) - resolve(textEdits); - }) - } -} - -interface Param { - parameter: string - comment: string -} - -function buildText(method: parser.Method): string { - let methodString = ''; - if (method.modifiers.length > 0) { - methodString += method.modifiers.map(m => m.value).join(' ') + ' '; - } - - methodString += `${method.id.value}(`; - let parameterStrings: Param[] = method.parameters.map(p => { - let param = { parameter: '', comment: '' } - let parameterString = ''; - if (p.req) { - parameterString += 'req '; - } - if (p.ret) { - parameterString += 'ret '; - } - if (p.literal) { - parameterString += 'literal '; - } - parameterString += p.types[0].value + ' ' + p.id.value; - if (p.types.length > 1) { - parameterString += `( ${p.types.map(t => t.value).slice(1).join(', ')})`; - } - if (p.comment) { - param.comment = `\t// ${p.comment.value.trim()}` - } - param.parameter = parameterString - return param; - }) - if (parameterStrings.length === 0) { - methodString += ')'; - } - else if (parameterStrings.length === 1) { - methodString += parameterStrings[0].parameter + ')' + parameterStrings[0].comment; - } - else { - methodString += '\n\t\t ' + parameterStrings.map(p => p.parameter + p.comment).join('\n\t\t, '); - methodString += '\n\t\t)' - } - - return methodString; -} \ No newline at end of file diff --git a/src/language/pslHoverProvider.ts b/src/language/pslHoverProvider.ts deleted file mode 100644 index 417e531..0000000 --- a/src/language/pslHoverProvider.ts +++ /dev/null @@ -1,40 +0,0 @@ -import * as vscode from 'vscode'; -import { FinderPaths, getFinderPaths } from '../parser/config'; -import * as parser from '../parser/parser'; -import * as utils from '../parser/utilities'; -import * as lang from './lang'; - -export class PSLHoverProvider implements vscode.HoverProvider { - - async provideHover(document: vscode.TextDocument, position: vscode.Position, cancellationToken: vscode.CancellationToken): Promise { - if (cancellationToken.isCancellationRequested) return; - let parsedDoc = parser.parseText(document.getText()); - - // get tokens on line and current token - let tokenSearchResults = utils.searchTokens(parsedDoc.tokens, position); - if (!tokenSearchResults) return; - let { tokensOnLine, index } = tokenSearchResults; - - const workspaceDirectory = vscode.workspace.getWorkspaceFolder(document.uri); - if (!workspaceDirectory) return; - - let callTokens = utils.getCallTokens(tokensOnLine, index); - if (callTokens.length === 0) return; - let paths: FinderPaths = getFinderPaths(workspaceDirectory.uri.fsPath, document.fileName); - let finder = new utils.ParsedDocFinder(parsedDoc, paths, lang.getWorkspaceDocumentText); - let resolvedResult = await finder.resolveResult(callTokens); - if (resolvedResult) return getHover(resolvedResult, finder); - } -} - -async function getHover(result: utils.FinderResult, finder: utils.ParsedDocFinder): Promise { - let { code, markdown } = await lang.getDocumentation(result, finder); - - let clean = markdown.replace(/\s*(DOC)?\s*\-+/, '').replace(/\*+\s+ENDDOC/, '').trim(); - clean = clean - .split(/\r?\n/g).map(l => l.trim()).join('\n') - .replace(/(@\w+)/g, '*$1*') - .replace(/(\*(@(param|publicnew|public|throws?))\*)\s+([A-Za-z\-0-9%_\.]+)/g, '$1 `$4`'); - - return new vscode.Hover([new vscode.MarkdownString().appendCodeblock(code), new vscode.MarkdownString().appendMarkdown(clean)]); -} diff --git a/src/language/pslSignature.ts b/src/language/pslSignature.ts deleted file mode 100644 index 788baf6..0000000 --- a/src/language/pslSignature.ts +++ /dev/null @@ -1,67 +0,0 @@ -import * as vscode from 'vscode'; -import { FinderPaths, getFinderPaths } from '../parser/config'; -import * as parser from '../parser/parser'; -import { Position, Token } from '../parser/tokenizer'; -import * as utils from '../parser/utilities'; -import * as lang from './lang'; - -export class PSLSignatureHelpProvider implements vscode.SignatureHelpProvider { - public async provideSignatureHelp(document: vscode.TextDocument, position: vscode.Position): Promise { - const workspaceDirectory = vscode.workspace.getWorkspaceFolder(document.uri); - if (!workspaceDirectory) return; - - let parsedDoc = parser.parseText(document.getText()); - // get tokens on line and current token - let tokenSearchResults = ((tokens: Token[], position: Position) => { - const tokensOnLine = tokens.filter(t => t.position.line === position.line); - if (tokensOnLine.length === 0) return undefined; - const index = tokensOnLine.findIndex(t => { - const start: Position = t.position; - const end: Position = { line: t.position.line, character: t.position.character + t.value.length }; - const isBetween = (lb: Position, t: Position, ub: Position): boolean => { - return lb.line <= t.line && - lb.character <= t.character && - ub.line >= t.line && - ub.character >= t.character; - } - return isBetween(start, position, end); - }); - return { tokensOnLine, index }; - })(parsedDoc.tokens, position); - - if (!tokenSearchResults) return; - let { tokensOnLine, index } = tokenSearchResults; - - let { callTokens, parameterIndex } = utils.findCallable(tokensOnLine, index); - - if (callTokens.length === 0) return; - let paths: FinderPaths = getFinderPaths(workspaceDirectory.uri.fsPath, document.fileName); - let finder = new utils.ParsedDocFinder(parsedDoc, paths, lang.getWorkspaceDocumentText); - let resolvedResult = await finder.resolveResult(callTokens); - if (!resolvedResult.member || resolvedResult.member.memberClass !== parser.MemberClass.method) return; - if (resolvedResult) return getSignature(resolvedResult, parameterIndex, finder); - } -} - -async function getSignature(result: utils.FinderResult, parameterIndex: number, finder: utils.ParsedDocFinder): Promise { - let { code, markdown } = await lang.getDocumentation(result, finder); - - let clean = markdown.replace(/\s*(DOC)?\s*\-+/, '').replace(/\*+\s+ENDDOC/, '').trim(); - clean = clean - .split(/\r?\n/g).map(l => l.trim()).join('\n') - .replace(/(@\w+)/g, '*$1*') - .replace(/(\*(@(param|publicnew|public|throws?))\*)\s+([A-Za-z\-0-9%_\.]+)/g, '$1 `$4`'); - - let method = result.member as parser.Method; - let argString: string = method.parameters.map((param: parser.Parameter) => `${param.types[0].value} ${param.id.value}`).join(', '); - code = `${method.id.value}(${argString})`; - - let info = new vscode.SignatureInformation(code, new vscode.MarkdownString().appendMarkdown(clean)); - info.parameters = method.parameters.map(parameter => new vscode.ParameterInformation(`${parameter.types[0].value} ${parameter.id.value}`)); - - let signatureHelp = new vscode.SignatureHelp(); - signatureHelp.signatures = [info]; - signatureHelp.activeSignature = 0; - signatureHelp.activeParameter = parameterIndex; - return signatureHelp; -} diff --git a/src/language/pslSuggest.ts b/src/language/pslSuggest.ts deleted file mode 100644 index 978ff21..0000000 --- a/src/language/pslSuggest.ts +++ /dev/null @@ -1,62 +0,0 @@ -import * as path from 'path'; -import * as vscode from 'vscode'; -import { FinderPaths, getFinderPaths } from '../parser/config'; -import * as parser from '../parser/parser'; -import { MemberClass } from '../parser/parser'; -import * as utils from '../parser/utilities'; -import * as lang from './lang'; - -export class PSLCompletionItemProvider implements vscode.CompletionItemProvider { - - async provideCompletionItems(document: vscode.TextDocument, position: vscode.Position, cancellationToken: vscode.CancellationToken): Promise { - if (cancellationToken.isCancellationRequested) return; - let parsedDoc = parser.parseText(document.getText()); - - // get tokens on line and current token - let tokenSearchResults = utils.searchTokens(parsedDoc.tokens, position); - if (!tokenSearchResults) return; - let { tokensOnLine, index } = tokenSearchResults; - - const workspaceDirectory = vscode.workspace.getWorkspaceFolder(document.uri); - if (!workspaceDirectory) return; - - let callTokens = utils.getCallTokens(tokensOnLine, index); - if (callTokens.length === 0) return; - let paths: FinderPaths = getFinderPaths(workspaceDirectory.uri.fsPath, document.fileName); - let finder = new utils.ParsedDocFinder(parsedDoc, paths, lang.getWorkspaceDocumentText); - let result = await finder.resolveResult(callTokens.slice(0, -1)); - let resultFinder = result.member ? await finder.newFinder(result.member.types[0].value) : await finder.newFinder(path.basename(result.fsPath).split('.')[0]); - let resolvedResults = await resultFinder.findAllInDocument(); - if (resolvedResults) return getCompletionItems(resolvedResults, finder); - } - - async resolveCompletionItem(item: PSLCompletionItem) { - let { code, markdown } = await lang.getDocumentation(item.result, item.finder); - - let clean = markdown.replace(/\s*(DOC)?\s*\-+/, '').replace(/\*+\s+ENDDOC/, '').trim(); - clean = clean - .split(/\r?\n/g).map(l => l.trim()).join('\n') - .replace(/(@\w+)/g, '*$1*') - .replace(/(\*(@(param|publicnew|public|throws?))\*)\s+([A-Za-z\-0-9%_\.]+)/g, '$1 `$4`'); - - item.detail = code; - item.documentation = new vscode.MarkdownString().appendMarkdown(clean); - return item; - } -} - -async function getCompletionItems(results: utils.FinderResult[], finder: utils.ParsedDocFinder): Promise { - let ret = results.map(async result => { - const item = new PSLCompletionItem(result.member.id.value); - item.kind = result.member.memberClass === MemberClass.method ? vscode.CompletionItemKind.Method : vscode.CompletionItemKind.Property; - item.result = result; - item.finder = finder; - return item; - }) - return Promise.all(ret); -} - -class PSLCompletionItem extends vscode.CompletionItem { - result: utils.FinderResult; - finder: utils.ParsedDocFinder; -} diff --git a/src/pslLint/methodDoc.ts b/src/methodDoc.ts similarity index 86% rename from src/pslLint/methodDoc.ts rename to src/methodDoc.ts index c48e851..b493ec2 100644 --- a/src/pslLint/methodDoc.ts +++ b/src/methodDoc.ts @@ -1,6 +1,4 @@ -import { Method, ParsedDocument } from '../parser/parser'; -import { Token } from '../parser/tokenizer'; -import { getCommentsOnLine, getLineAfter} from '../parser/utilities'; +import { Method, ParsedDocument, tokenizer, utilities } from 'psl-parser'; import { Diagnostic, DiagnosticSeverity, MethodRule } from './api'; export enum Code { @@ -87,7 +85,7 @@ export class TwoEmptyLines extends MethodRule { } } -function addDiagnostic(idToken: Token, method: Method, message: string, ruleName: string, code?: Code): Diagnostic { +function addDiagnostic(idToken: tokenizer.Token, method: Method, message: string, ruleName: string, code?: Code): Diagnostic { const range = idToken.getRange(); const diagnostic = new Diagnostic(range, message, ruleName, DiagnosticSeverity.Information); diagnostic.source = 'lint'; @@ -97,11 +95,11 @@ function addDiagnostic(idToken: Token, method: Method, message: string, ruleName } function hasSeparator(method: Method, parsedDocument: ParsedDocument): boolean { - const nextLineCommentTokens: Token[] = getCommentsOnLine(parsedDocument, method.id.position.line - 1); + const nextLineCommentTokens: tokenizer.Token[] = utilities.getCommentsOnLine(parsedDocument, method.id.position.line - 1); return nextLineCommentTokens[0] && nextLineCommentTokens[0].isLineComment(); } function hasBlockComment(method: Method, parsedDocument: ParsedDocument): boolean { - const nextLineCommentTokens: Token[] = getCommentsOnLine(parsedDocument, getLineAfter(method)); + const nextLineCommentTokens: tokenizer.Token[] = utilities.getCommentsOnLine(parsedDocument, utilities.getLineAfter(method)); return nextLineCommentTokens[0] && nextLineCommentTokens[0].isBlockComment(); } diff --git a/src/mtm/hostSocket.ts b/src/mtm/hostSocket.ts deleted file mode 100644 index 5e173aa..0000000 --- a/src/mtm/hostSocket.ts +++ /dev/null @@ -1,58 +0,0 @@ -import {Socket} from 'net'; - -export default class HostSocket { - socket: Socket; - - constructor() { - this.socket = new Socket(); - } - - // resolves when done with no value - connect(port: number, host: string): Promise { - this.onClose(); - return new Promise((resolve, reject) => { - this.socket.connect(port, host, () => { - resolve(); - }) - this.socket.once('error', (err: Error) => { - this.closeConnection(); - reject(err); - }) - }) - } - - closeConnection() { - this.socket.removeAllListeners(); - this.socket.destroy(); - } - - - onceData(): Promise { - return new Promise((resolve, reject) => { - this.socket.once('data', (ret) => { - this.socket.removeAllListeners(); - resolve(ret); - }) - this.socket.once('error', (ret) => { - this.socket.removeAllListeners(); - reject(ret.message); - }) - }) - } - - onClose(): Promise { - return new Promise(resolve => { - this.socket.once('close', (had_error) => { - resolve(had_error); - }) - }) - } - - send(messageString: string): Promise { - return new Promise(resolve => { - this.socket.write(messageString, 'ascii', () => { - resolve(); - }); - }) - } -} diff --git a/src/mtm/mtm.ts b/src/mtm/mtm.ts deleted file mode 100644 index 9c0bbf8..0000000 --- a/src/mtm/mtm.ts +++ /dev/null @@ -1,358 +0,0 @@ -import HostSocket from './hostSocket'; -import * as utils from './utils'; -import * as fs from 'fs'; - -enum ServiceClass { - CONNECTION = 0, - MRPC = 3, - SQL = 5, -} - -interface ServiceDetail { - serviceClass: ServiceClass; - mrpcID?: string; -} - -export class MtmConnection { - - private socket: HostSocket = new HostSocket() - private messageByte: string = String.fromCharCode(28); - private token: string = ''; - private messageId: number = 0; - private maxRow: number = 30; - private isSql: boolean = false; - private recordCount: number = 0; - - constructor(private serverType: string = 'SCA$IBS', private encoding: BufferEncoding = 'utf8') { } - - async open(host: string, port: number, profileUsername: string, profilePassword: string) { - await this.socket.connect(port, host); - let prepareString = utils.connectionObject(profileUsername, profilePassword); - let returnArray = await this.execute({ serviceClass: ServiceClass.CONNECTION }, prepareString); - this.token = returnArray; - } - - async send(fileName: string) { - try { - let codeToken = await this._send(fileName) - let returnString = await this.saveInProfile(fileName, codeToken) - if (returnString !== '1') { - throw new Error(returnString.split('\r\n')[1]); - } - return returnString - } - catch (err) { - this.close(); - throw new Error(err.toString()); - } - } - - async testCompile(fileName: string) { - try { - let codeToken = await this._send(fileName) - let returnString = await this._testCompile(fileName, codeToken) - return returnString - } - catch (err) { - this.close(); - throw new Error(err.toString()); - } - } - - async get(fileName: string) { - try { - let returnString = await this._get(fileName) - return returnString - } - catch (err) { - this.close(); - throw new Error(err.toString()); - } - } - - async compileAndLink(fileName: string) { - try { - let returnString = await this._compileAndLink(fileName) - return returnString - } - catch (err) { - this.close(); - throw new Error(err.toString()); - } - } - - async runPsl(fileName: string) { - try { - let codeToken = await this._send(fileName) - let returnString = await this._runPsl(codeToken) - return returnString - } - catch (err) { - this.close(); - throw new Error(err.toString()); - } - } - - async runCustom(fileName: string, mrpcID: string, request: string) { - try { - const codeToken = await this._send(fileName); - const returnString = await this._runCustom(codeToken, mrpcID, request); - return returnString; - } - catch (err) { - this.close(); - throw new Error(err.toString()); - } - } - - async close() { - this.socket.closeConnection(); - return this.socket.socket.destroyed; - } - - async batchcomp(fileName: string) { - try { - let returnString = await this.batchCompileAndLink(fileName) - return returnString - } - catch (err) { - this.close(); - throw new Error(err.toString()); - } - } - - async getTable(fileName: string) { - try { - this.isSql = false - let returnString = await this._getTable(fileName) - return returnString - } - catch (err) { - this.close(); - throw new Error(err.toString()); - } - } - - async sqlQuery(query: string) { - try { - this.isSql = true - let returnString = await this._sqlQuery(query) - return returnString - } - catch (err) { - this.close(); - throw new Error(err.toString()); - } - } - - async getPSLClasses() { - try { - let returnString = await this._getPslClasses(); - return returnString; - } - catch (err) { - this.close(); - throw new Error(err.toString()); - } - } - - private async _send(filename: string) { - let returnString: string; - let fileString: string = (await readFileAsync(filename, {encoding: this.encoding})).toString(this.encoding); - let fileContentLength: number = fileString.length; - let totalLoop: number = Math.ceil(fileContentLength / 1024); - let codeToken: string = ''; - for (let i = 0; i < totalLoop; i++) { - let partialString: string = fileString.slice(i * 1024, (i * 1024) + 1024); - let withPipe: string = ''; - for (const char of partialString) { - withPipe += char.charCodeAt(0) + '|'; - } - let prepareString: string = utils.initCodeObject(withPipe, codeToken) - returnString = await this.execute({ mrpcID: '121', serviceClass: ServiceClass.MRPC }, prepareString) - codeToken = returnString; - } - let prepareString: string = utils.initCodeObject('', codeToken) - returnString = await this.execute({ mrpcID: '121', serviceClass: ServiceClass.MRPC }, prepareString) - return returnString; - } - - private async saveInProfile(fileName: string, codeToken: string) { - let returnString: string; - let fileDetails = utils.getObjectType(fileName); - let prepareString = utils.saveObject(fileDetails.fileBaseName, codeToken, utils.getUserName()) - returnString = await this.execute({ mrpcID: '121', serviceClass: ServiceClass.MRPC }, prepareString); - return returnString - } - - private async _testCompile(fileName: string, codeToken: string) { - let returnString: string; - let fileDetails = utils.getObjectType(fileName); - let prepareString = utils.testCompileObject(fileDetails.fileBaseName, codeToken) - returnString = await this.execute({ mrpcID: '121', serviceClass: ServiceClass.MRPC }, prepareString); - return returnString - } - - private async _get(fileName: string) { - let returnString: string; - let fileDetails = utils.getObjectType(fileName); - let prepareString = utils.initObject(fileDetails.fileId, fileDetails.fileName) - returnString = await this.execute({ mrpcID: '121', serviceClass: ServiceClass.MRPC }, prepareString); - let codeToken = returnString.split('\r\n')[1]; - let hasMore = '1' - returnString = '' - while (hasMore === '1') { - prepareString = utils.retObject(codeToken) - let nextReturnString = await this.execute({ mrpcID: '121', serviceClass: ServiceClass.MRPC }, prepareString); - hasMore = nextReturnString.substr(0, 1); - returnString = returnString + nextReturnString.substr(1, nextReturnString.length); - } - return returnString - } - - private async _compileAndLink(fileName: string) { - let returnString: string; - let fileDetails = utils.getObjectType(fileName); - let prepareString = utils.preCompileObject(fileDetails.fileBaseName) - let codeToken = await this.execute({ mrpcID: '121', serviceClass: ServiceClass.MRPC }, prepareString); - prepareString = utils.compileObject(codeToken) - returnString = await this.execute({ mrpcID: '121', serviceClass: ServiceClass.MRPC }, prepareString); - return returnString; - } - - private async _runPsl(codeToken: string) { - let returnString: string; - let prepareString = utils.pslRunObject(codeToken) - returnString = await this.execute({ mrpcID: '121', serviceClass: ServiceClass.MRPC }, prepareString); - return returnString; - } - - private async _runCustom(codeToken: string, mrpcID: string, request: string) { - let returnString: string; - let prepareString = utils.customRunObject(request, codeToken); - returnString = await this.execute({ mrpcID, serviceClass: ServiceClass.MRPC }, prepareString); - return returnString; - } - - // Batch complie is not working since 81 is not fully exposed from profile - private async batchCompileAndLink(fileName: string) { - let returnString: string; - let fileDetails = utils.getObjectType(fileName); - let dbtblTableName = utils.getDbtblInfo(fileDetails.fileId); - let prepareString = utils.batchCompileObject(dbtblTableName, fileDetails.fileName) - returnString = await this.execute({ mrpcID: '121', serviceClass: ServiceClass.MRPC }, prepareString); - return returnString; - } - - private async _getTable(fileName: string) { - let returnString: string; - let columnList: string[]; - let fileDetails = utils.getObjectType(fileName); - let tableReturnString = fileDetails.fileBaseName + String.fromCharCode(1) + await this._get(fileName) - let selectStatement = `SELECT COUNT(DI) FROM DBTBL1D WHERE FID='${fileDetails.fileName}' `; - this.recordCount = Number(await this._sqlQuery(selectStatement)) - selectStatement = `SELECT DI FROM DBTBL1D WHERE FID='${fileDetails.fileName}'`; - returnString = await this._sqlQuery(selectStatement) - columnList = returnString.split('\r\n'); - returnString = tableReturnString - for (let i = 0; i < columnList.length; i++) { - fileName = fileDetails.fileName + '-' + columnList[i] + '.COL' - returnString = returnString + String.fromCharCode(0) + fileName + String.fromCharCode(1) + await this._get(fileName) - } - return returnString; - } - - private async _sqlQuery(selectQuery: string) { - selectQuery = selectQuery.toUpperCase() - if (!selectQuery.startsWith('SELECT')) { - throw new Error('Not a select query'); - } - let cursorNumber = new Date().getTime().toString() - let returnString = await this.openSqlCursor(cursorNumber, selectQuery) - returnString = await this.fetchSqlCursor(cursorNumber) - await this.closeSqlCursor(cursorNumber) - return returnString; - } - - private async openSqlCursor(cursorNumber: string, selectQuery: string) { - let openCursor = 'OPEN CURSOR ' + cursorNumber + ' AS '; - let rows = ''; - let prepareString = utils.sqlObject(openCursor + selectQuery, rows) - let returnString = await this.execute({ serviceClass: ServiceClass.SQL }, prepareString); - return returnString - } - - private async fetchSqlCursor(cursorNumber: string) { - let fetchCursor = 'FETCH ' + cursorNumber; - let rows = 'ROWS=' + this.maxRow; - let prepareString = utils.sqlObject(fetchCursor, rows) - let returnString = await this.execute({ serviceClass: ServiceClass.SQL }, prepareString); - let splitReturnSring: string[] = returnString.split(String.fromCharCode(0)) - let totalCount = Number(splitReturnSring[0]); - returnString = splitReturnSring[1]; - if (this.isSql === false) { - while ((totalCount < this.recordCount)) { - splitReturnSring = []; - let nextReturnString = await this.execute({ serviceClass: ServiceClass.SQL }, prepareString); - splitReturnSring = nextReturnString.split(String.fromCharCode(0)) - totalCount = totalCount + Number(splitReturnSring[0]); - returnString = returnString + '\r\n' + splitReturnSring[1] - } - } - return returnString - } - - private async closeSqlCursor(cursorNumber: string) { - let closeCursor = 'CLOSE ' + cursorNumber; - let prepareString = utils.sqlObject(closeCursor, '') - let returnString = await this.execute({ serviceClass: ServiceClass.SQL }, prepareString); - return returnString - } - - private async _getPslClasses() { - let returnString: string; - let prepareString = utils.getPslCls() - returnString = await this.execute({ mrpcID: '121', serviceClass: ServiceClass.MRPC }, prepareString); - return returnString; - } - - private async execute(detail: ServiceDetail, prepareString: string): Promise { - const sendingMessage = this.prepareSendingMessage(detail, prepareString); - await this.socket.send(sendingMessage); - let message = await this.socket.onceData(); - const { totalBytes, startByte } = utils.unpack(message); - let messageLength = message.length; - - while (messageLength < totalBytes) { - const nextMessage = await this.socket.onceData(); - messageLength = messageLength + nextMessage.length; - message = Buffer.concat([message, nextMessage], messageLength); - } - return (utils.parseResponse(detail.serviceClass, message.slice(startByte, message.length), this.encoding)); - } - - private prepareSendingMessage(detail: ServiceDetail, prepareString: string): string { - let tokenMessage = utils.tokenMessage(detail.serviceClass, this.token, this.messageId); - if (detail.serviceClass === ServiceClass.MRPC) { - let version: number = 1; - prepareString = utils.mrpcMessage(detail.mrpcID, version.toString(), prepareString) - } - let sendingMessage = utils.sendingMessage(tokenMessage, prepareString); - sendingMessage = this.serverType + this.messageByte + sendingMessage - sendingMessage = utils.pack(sendingMessage.length + 2) + sendingMessage; - this.messageId++; - return sendingMessage; - } -} - -function readFileAsync(file: string, options?: {encoding?: string, flag?: string}): Promise { - return new Promise((resolve, reject) => { - fs.readFile(file, {encoding: null, flag: options.flag}, (err, data) => { - if (err) { - reject(err); - } else { - resolve(data); - } - }); - }); -} diff --git a/src/mtm/utils.ts b/src/mtm/utils.ts deleted file mode 100644 index 413ed33..0000000 --- a/src/mtm/utils.ts +++ /dev/null @@ -1,346 +0,0 @@ -import * as os from 'os'; -import * as path from 'path'; - -interface FileDetails { - fileId: string - fileName: string - fileBaseName: string -} - -export const extensionToDescription: { [key: string]: string } = { - 'BATCH': 'Batch', - 'COL': 'Column', - 'DAT': 'Data', - 'FKY': 'Foreign Key', - // 'G': 'Global', - 'IDX': 'Index', - 'JFD': 'Journal', - 'm': 'M routine', - 'PPL': 'Pre Post Lib', - 'PROC': 'Procedure', - 'properties': 'properties file', - 'PSL': 'psl File', - 'psl': 'psl File', - 'pslx': 'pslx File', - 'pslxtra': 'pslxtra File', - 'psql': 'PSQLScript', - 'serial': 'Serialized Data', - 'QRY': 'Query', - 'RPT': 'Report', - 'SCR': 'Screen', - // TABLE not supported - // 'TABLE': 'Complete Table', - 'TBL': 'Table', - 'TRIG': 'Trigger', -} - -export function v2lvFormat(messageValue: string[]) { - let lvMessage = '' - if (messageValue.length !== 0) { - messageValue.forEach(messageString => { - lvMessage = lvMessage + lvFormat(messageString) - }) - } - return lvMessage -} - -export function lvFormat(messagString: String): string { - let returnLvFormat = '' - let lvArray = [] - let messageLength = messagString.length - let splitBytes - - if (messageLength < 255) { splitBytes = 1 } - else if (messageLength < 65534) { splitBytes = 2 } - else if (messageLength < 16777213) { splitBytes = 3 } - else { splitBytes = 4 } - - messageLength = splitBytes + messageLength - - if (messageLength > 255) { - for (let loop = 0; loop < splitBytes; loop++) { - lvArray.push(messageLength % 256) - messageLength = Math.trunc(messageLength / 256) - } - returnLvFormat = String.fromCharCode(0) + String.fromCharCode(splitBytes); - for (let loop = splitBytes - 1; loop >= 0; loop--) { - returnLvFormat = returnLvFormat + String.fromCharCode(lvArray[loop]) - } - } - else { returnLvFormat = String.fromCharCode(messageLength) } - return (returnLvFormat + messagString); -} - -/** - * This method does a thing. - * - * @export - * @param {Buffer} messageString The message string - * @returns {Buffer[]} A buffer array - */ -export function lv2vFormat(messageString: Buffer): Buffer[] { - let returnString: Buffer[] = []; - let messageLength = messageString.length; - - if (messageLength === 0) { return [] }; - - let bytePointer: number = 0; - let extractChar: number = 0; - let numberOfBufferedLine: number = 0; - let byteCalcNumber: number; - - while (bytePointer < messageLength) { - extractChar = messageString.readUInt8(bytePointer); - - numberOfBufferedLine = 1; - - if (extractChar === 0) { - numberOfBufferedLine = messageString.readUInt8(bytePointer + 1); - bytePointer = bytePointer + 2; - if (numberOfBufferedLine === 0) { - continue; - } - byteCalcNumber = 1; - for (let loopFor = numberOfBufferedLine - 1; loopFor >= 0; loopFor--) { - extractChar = (messageString.readUInt8(bytePointer + loopFor) * byteCalcNumber) + extractChar; - byteCalcNumber = byteCalcNumber * 256 - } - } - if (bytePointer > messageLength) { - continue; - } - returnString.push(messageString.slice(bytePointer + numberOfBufferedLine, bytePointer + extractChar)); - bytePointer = bytePointer + extractChar; - } - return returnString -} - -export function parseResponse(serviceClass: number, outputData: Buffer, encoding: BufferEncoding): string { - // unpacking multiple times to get the token, remove the endiness by extracting from position 2 - let returnString: string = '' - let returnArray: Buffer[]; - returnArray = lv2vFormat(outputData); - returnArray = lv2vFormat(returnArray[1]); - returnArray = lv2vFormat(returnArray[1]); - returnString = returnArray[0].toString(encoding) - if (returnString === 'ER') { - throw returnArray.map(x => x.toString(encoding)).join('') - } - if (serviceClass === 5) { - returnString = returnArray[2].toString(encoding) + String.fromCharCode(0) + returnArray[3].toString(encoding) - } - return returnString; -} - -export function sendingMessage(tokenMessage: string, mrpcMessage: string): string { - return v2lvFormat([tokenMessage, mrpcMessage]) -} - -export function mrpcMessage(mrpcId: string, version: string, prepareString: string): string { - let exchangeMessage = [ - mrpcId, - version, - prepareString, - mrpcConnMessage() - ]; - return v2lvFormat(exchangeMessage); -} - - -export function tokenMessage(serviceClass: number, token: string, messageId: number): string { - let exchangeMessage = [ - serviceClass.toString(), - token, - messageId.toString(), - '0', - '' - ] - return v2lvFormat(exchangeMessage); -} - - -export function connectionObject(envUser: string, envPassword: string): string { - let perpareString: string[] = [ - '1', - envUser.toString(), - 'nowhere', - envPassword, - '', - '', - netConnMessage() - ] - return v2lvFormat(perpareString); -} - -export function checkObject(localFile: string, token: string): string { - let messageArray = [ - 'CHECKOBJ', - '', '', localFile, '', '', token - ]; - return v2lvFormat(messageArray); -} - -export function saveObject(localFile: string, token: string, username: string): string { - let messageArray = [ - 'SAVEOBJ', - '', '', localFile, '', '', token, username - ]; - return v2lvFormat(messageArray); -} - -export function initCodeObject(code: string, compilationToken: string): string { - let messageArray = [ - 'INITCODE', - code, compilationToken - ]; - return v2lvFormat(messageArray); -} - -export function testCompileObject(fileName: string, compilationToken: string): string { - let messageArray = [ - 'EXECCOMP', - '', compilationToken, fileName - ]; - return v2lvFormat(messageArray); -} - -export function initObject(objectId: string, objectName: string): string { - let messageArray = [ - 'INITOBJ', - '', '', '', objectId, objectName - ]; - return v2lvFormat(messageArray); -} - -export function retObject(token: string): string { - let messageArray = [ - 'RETOBJ', - '', '', '', '', '', token - ]; - return v2lvFormat(messageArray); -} - -export function preCompileObject(fileName: string): string { - let messageArray = [ - 'PRECMP', - '', '', fileName - ]; - return v2lvFormat(messageArray); -} - -export function compileObject(compilationToken: string): string { - let messageArray = [ - 'CMPLINK', - '', compilationToken - ] - return v2lvFormat(messageArray); -} - -export function pslRunObject(compilationToken: string): string { - let messageArray = [ - 'PSLRUN', - '', compilationToken - ]; - return v2lvFormat(messageArray); -} - -export function customRunObject(request: string, compilationToken: string): string { - let messageArray = [ - request, - '', compilationToken - ]; - return v2lvFormat(messageArray); -} - -export function sqlObject(query: string, rows: string) { - let messageArray = [ - query, - rows, - '' - ] - return v2lvFormat(messageArray); -} - -export function batchCompileObject(dbtblTableName: string, elementName: string): string { - let messageArray = [ - dbtblTableName, - elementName - ] - return v2lvFormat(messageArray); -} - -export function getPslCls(): string { - let messageArray = [ - 'GETPSLCLS', '', '' - ]; - return v2lvFormat(messageArray); -} - -export function getUserName(): string { - return os.userInfo().username; -} - -export function getObjectType(fileName: string): FileDetails { - let elementBaseName: string = path.basename(fileName) - let elementName = elementBaseName.substr(0, elementBaseName.lastIndexOf('.')) - let elementExtension = elementBaseName.substr(elementBaseName.lastIndexOf('.') + 1, elementBaseName.length) - if (elementName.includes('.')) elementName = elementBaseName; - return { - fileId: getFileDetails(elementExtension), - fileName: elementName, - fileBaseName: elementBaseName - } -} - -function getFileDetails(fileExtension: string) { - if (fileExtension in extensionToDescription) return extensionToDescription[fileExtension]; - throw new Error(`Invalid file extension: ${fileExtension}`); - -} - -export function getDbtblInfo(fileId: string): string { - switch (fileId) { - case 'Batch': return 'DBTBL33'; - case 'Column': return 'DBTBL25'; - case 'Procedure': return 'DBTBL1'; - case 'Table': return 'DBTBL1'; - default: return 'Unknown Type'; - } -} - -export function pack(totalLength: number): string { - // For ING we use Big Endian !h which is 2 bytes - let quotient = Math.floor(totalLength / 256); - let firstByte = String.fromCharCode(quotient); - let secondByte = String.fromCharCode(totalLength - (quotient * 256)); - return (firstByte + secondByte); -} - -export function unpack(message: Buffer): { totalBytes: number, startByte: number } { - // For ING we use Big Endian !h which is 2 bytes - if (!message.readUInt8(0) && !message.readUInt8(1)) return longMessageLength(message); - return { totalBytes: (message.readUInt8(0) * 256) + message.readUInt8(1), startByte: 3 }; -} - -function longMessageLength(message: Buffer): { totalBytes: number, startByte: number } { - // the third byte of the message tells us how many bytes are used to encode the length - const numberOfBytes = message.readUInt8(2); - const lastLengthByte = 3 + numberOfBytes; - - // slice the message to just use the bytes that encode message length - const messageLengthBytes = message.slice(3, lastLengthByte); - let totalBytes = 0; - for (let index = 0; index < messageLengthBytes.length; index++) { - const byte = messageLengthBytes.readUInt8(index); - totalBytes += byte * 256 ** (messageLengthBytes.length - 1 - index); - } - return { totalBytes, startByte: lastLengthByte + 1}; -} - -function mrpcConnMessage(): string { - return String.fromCharCode(4, 3, 2) + '1'; -} - -function netConnMessage(): string { - return String.fromCharCode(21, 2) + '5' + String.fromCharCode(6) + 'ICODE' + String.fromCharCode(2) + '1' + String.fromCharCode(8) + 'PREPARE' + String.fromCharCode(2) + '3'; -} diff --git a/src/pslLint/multiLineDeclare.ts b/src/multiLineDeclare.ts similarity index 93% rename from src/pslLint/multiLineDeclare.ts rename to src/multiLineDeclare.ts index d0c3fc6..50872b0 100644 --- a/src/pslLint/multiLineDeclare.ts +++ b/src/multiLineDeclare.ts @@ -1,5 +1,4 @@ -import { Declaration, Method, NON_TYPE_MODIFIERS } from '../parser/parser'; -import { getTokens } from '../parser/tokenizer'; +import { Declaration, Method, NON_TYPE_MODIFIERS, tokenizer } from 'psl-parser'; import { Diagnostic, DiagnosticSeverity, MethodRule } from './api'; export class MultiLineDeclare extends MethodRule { @@ -20,7 +19,7 @@ export class MultiLineDeclare extends MethodRule { let commaFound: boolean = false; let conditionClose: boolean = false; let typePresent: boolean = false; - for (const token of getTokens(fullLine)) { + for (const token of tokenizer.getTokens(fullLine)) { if (token.isWhiteSpace()) continue; if (token.isDoubleQuotes()) continue; if (token.isBlockCommentInit()) continue; diff --git a/src/pslLint/parameters.ts b/src/parameters.ts similarity index 96% rename from src/pslLint/parameters.ts rename to src/parameters.ts index 318d95a..6dd9e9c 100644 --- a/src/pslLint/parameters.ts +++ b/src/parameters.ts @@ -1,4 +1,4 @@ -import { Method, Parameter } from '../parser/parser'; +import { Method, Parameter } from 'psl-parser'; import { Diagnostic, DiagnosticSeverity, MethodRule } from './api'; /** diff --git a/src/parser/.npmignore b/src/parser/.npmignore deleted file mode 100644 index b03f0d1..0000000 --- a/src/parser/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -*.ts -!*.d.ts -tsconfig.json -*.tgz -.npmrc* -*.map diff --git a/src/parser/.npmrc.psl-parser b/src/parser/.npmrc.psl-parser deleted file mode 100644 index bbd9e9e..0000000 --- a/src/parser/.npmrc.psl-parser +++ /dev/null @@ -1,4 +0,0 @@ -always-auth=true -registry=https://registry.npmjs.org -//registry.npmjs.org/:_authToken=${PARSER_TOKEN} -//registry.npmjs.org/:username=${PARSER_USER} diff --git a/src/parser/README.md b/src/parser/README.md deleted file mode 100644 index 100e58c..0000000 --- a/src/parser/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# psl-parser - -TypeScript implementation of a PSL parser, from scratch. - -## Usage - -```javascript -import { parseText } from 'psl-parser'; - -const parsedPsl = parseText(/* PSL source text */); - -parsedPsl.methods.forEach(method => { - console.log(method.id.value); -}) -``` diff --git a/src/parser/config.ts b/src/parser/config.ts deleted file mode 100644 index 7efbb8a..0000000 --- a/src/parser/config.ts +++ /dev/null @@ -1,96 +0,0 @@ -import * as fs from 'fs-extra'; -import * as path from 'path'; - -type ConfigBaseDir = string; - -const activeConfigs: Map = new Map(); - -interface ProjectConfig { - parentProjects: string[]; - pslSources: string[]; - fileDefinitionSources: string[]; -} - -export async function setConfig(configPath: string, workspaces: Map) { - const configBaseDir: ConfigBaseDir = path.dirname(configPath); - const config: ProjectConfig = await fs.readFile(configPath).then(b => JSON.parse(b.toString())); - config.parentProjects = config.parentProjects.map(p => workspaces.get(p)).filter(x => x); - activeConfigs.set(configBaseDir, config); -} - -export async function removeConfig(configPath: string) { - const configBaseDir: ConfigBaseDir = path.dirname(configPath); - activeConfigs.delete(configBaseDir); -} - -/** - * Absolute paths. - */ -export interface FinderPaths { - /** - * Absolute path to the active routine, if the active component is a routine. - */ - activeRoutine?: string; - - /** - * Absolute path to the active table, if the active component is a table. - */ - activeTable?: string; - - /** - * Absolute paths to all possible sources for PSL classes, across all projects. Ordered by priority. - */ - projectPsl: string[]; - - /** - * Absolute path to the location of PSL core class definitions. - */ - corePsl: string; - - /** - * Absolute path to the directory that contains file definitions. - */ - tables: string[]; -} - -export function getFinderPaths(currentDir: string, activeRoutine?: string): FinderPaths { - - const defaultPslSources = ['dataqwik/procedure/', 'psl/']; - const defaultFileDefinitionSources = ['dataqwik/table/']; - - const config: ProjectConfig | undefined = activeConfigs.get(currentDir); - - const projectPsl = []; - const tables = []; - - const loadPsl = (base, source) => projectPsl.push(path.join(base, source)); - const loadFileDefinition = (base, source) => tables.push(path.join(base, source)); - - const relativePslSources = config && config.pslSources ? config.pslSources : defaultPslSources; - const relativeFileDefinitionSource = config && config.fileDefinitionSources ? - config.fileDefinitionSources : defaultFileDefinitionSources; - - const corePsl = path.join(currentDir, '.vscode/pslcls/'); - // load core first - projectPsl.push(corePsl); - - // load base sources - relativePslSources.forEach(source => loadPsl(currentDir, source)); - relativeFileDefinitionSource.forEach(source => loadFileDefinition(currentDir, source)); - - // load parent sources - if (config && config.parentProjects) { - for (const parent of config.parentProjects) { - relativePslSources.forEach(source => loadPsl(parent, source)); - relativeFileDefinitionSource.forEach(source => loadFileDefinition(parent, source)); - } - - } - - return { - activeRoutine, - corePsl, - projectPsl, - tables, - }; -} diff --git a/src/parser/index.ts b/src/parser/index.ts deleted file mode 100644 index 32e6c05..0000000 --- a/src/parser/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -export * from './parser'; - -export * from './statementParser'; - -import * as _tokenizer from './tokenizer'; -export { _tokenizer as tokenizer }; - -import * as _utilities from './utilities'; -export { _utilities as utilities }; diff --git a/src/parser/package.json b/src/parser/package.json deleted file mode 100644 index 707bf8a..0000000 --- a/src/parser/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "psl-parser", - "version": "0.0.3", - "description": "A parser for the Profile Scripting Language", - "main": "out/index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ing-bank/vscode-psl.git" - }, - "author": "atiplea", - "license": "MIT", - "bugs": { - "url": "https://github.com/ing-bank/vscode-psl/issues" - }, - "homepage": "https://github.com/ing-bank/vscode-psl#readme", - "dependencies": { - "fs-extra": "^5.0.0" - } -} diff --git a/src/parser/parser.ts b/src/parser/parser.ts deleted file mode 100644 index d809703..0000000 --- a/src/parser/parser.ts +++ /dev/null @@ -1,841 +0,0 @@ -import * as fs from 'fs'; -import { Statement, StatementParser } from './statementParser'; -import { getTokens, Token, Type } from './tokenizer'; -import { getLineAfter } from './utilities'; - -/** - * Used for checking the type of Member at runtime - */ -export enum MemberClass { - method = 1, - parameter = 2, - property = 3, - declaration = 4, - column = 5, - table = 6, - proc = 7, -} - -/** - * A generic type that abstracts Method, Parameter, Declaration, etc - */ -export interface Member { - - /** - * The Token representing the name of the member. - */ - id: Token; - - /** - * An array of types. The 0 index represents the 0 node type. - * For trees the type of the nth node will be found at index n. - */ - types: Token[]; - - modifiers: Token[]; - - /** - * The member class to determine the type at runtime - */ - memberClass: MemberClass; - - documentation?: string; -} - -/** - * Contains information about a Method - */ -export interface Method extends Member { - - /** - * The Token of the closing parenthesis after the declaration of all the Method's parameters. - */ - closeParen: Token; - - /** - * Currently unused for Methods. - */ - types: Token[]; - - /** - * All the modifiers before the Method id, like "public", "static", "void", "String", etc. - */ - modifiers: Token[]; - - /** - * The parameters of the Method, each with their own typing and comment information. - */ - parameters: Parameter[]; - - /** - * The "type" declarations found within the body of the method. - * Only the location where they are declared is referenced. - */ - declarations: Declaration[]; - - /** - * The zero-based line where the Method begins - */ - line: number; - - /** - * The last line of the Method, right before the start of a new Method - */ - endLine: number; - - /** - * Whether the Method (label) is a batch label, such as "OPEN" or "EXEC" - */ - batch: boolean; - - statements: Statement[]; - -} - -/** - * A PROPERTYDEF declaration - */ -export interface Property extends Member { - - /** - * The other Tokens in the declaration, currently unparsed. - */ - modifiers: Token[]; -} - -/** - * Represents a parameter, always belonging to a Method - */ -export interface Parameter extends Member { - - /** - * If the req keyword is used - */ - req: boolean; - - /** - * If the ret keyword is used - */ - ret: boolean; - - /** - * If the literal keyword is used. - */ - literal: boolean; - - /** - * The contents of the comment for the parameter, i.e. - * ``` - * public String name( - * String p1 // a comment - * ) - * ``` - */ - comment: Token; -} - -/** - * A type declaration, typically found within a method. - */ -export interface Declaration extends Member { - - /** - * The other Tokens in the declaration, currently unparsed. - */ - modifiers: Token[]; -} - -/** - * An abstract syntax tree of a PSL document - */ -export interface ParsedDocument { - - /** - * An array of Declarations that are not contained within a method. - * This will be empty for valid Profile 7.6 code but is maintained for compatibility. - */ - declarations: Declaration[]; - - /** - * An array of PROPERTYDEFs - */ - properties: Property[]; - - /** - * An array of the methods in the document - */ - methods: Method[]; - - /** - * All the tokens in the document, for reference. - */ - tokens: Token[]; - - /** - * The Token that represents the parent class. - */ - extending: Token; - - /** - * The Token that represents the PSL package. - */ - pslPackage: string; - - /** - * The tokens corresponding to line and block comments. - */ - comments: Token[]; -} - -// tslint:disable-next-line:class-name -class _Method implements Method { - - closeParen: Token; - id: Token; - types: Token[]; - modifiers: Token[]; - parameters: _Parameter[]; - declarations: Declaration[]; - line: number; - endLine: number; - batch: boolean; - memberClass: MemberClass; - documentation: string; - statements: Statement[]; - - constructor() { - this.types = []; - this.modifiers = []; - this.parameters = []; - this.line = -1; - this.declarations = []; - this.endLine = -1; - this.memberClass = MemberClass.method; - this.documentation = ''; - this.statements = []; - } -} - -// tslint:disable-next-line:class-name -class _Parameter implements Parameter { - types: Token[]; - req: boolean; - ret: boolean; - literal: boolean; - id: Token; - memberClass: MemberClass; - comment: Token; - modifiers: Token[]; - - constructor() { - this.modifiers = []; - this.req = false; - this.ret = false; - this.literal = false; - this.memberClass = MemberClass.parameter; - } -} - -const NON_METHOD_KEYWORDS = [ - 'do', 'd', 'set', 's', 'if', 'i', 'for', 'f', 'while', 'w', -]; - -export const NON_TYPE_MODIFIERS = [ - 'public', 'static', 'private', -]; - -export function parseText(sourceText: string): ParsedDocument { - const parser = new Parser(); - return parser.parseDocument(sourceText); -} - -export function parseFile(sourcePath: string): Promise { - return new Promise((resolve, reject) => { - fs.readFile(sourcePath, (err, data) => { - if (err) { - reject(err); - } - else { - const parser = new Parser(); - resolve(parser.parseDocument(data.toString())); - } - }); - }); -} - -class Parser { - - private tokenizer: IterableIterator; - private activeToken: Token; - private methods: _Method[]; - private properties: Property[]; - private declarations: Declaration[]; - private activeMethod: _Method; - private activeProperty: Property; - private tokens: Token[]; - private extending: Token; - private pslPackage: string; - private comments: Token[]; - - constructor(tokenizer?: IterableIterator) { - this.methods = []; - this.properties = []; - this.declarations = []; - this.tokens = []; - this.comments = []; - if (tokenizer) this.tokenizer = tokenizer; - } - - parseDocument(documentText: string): ParsedDocument { - this.tokenizer = getTokens(documentText); - while (this.next()) { - if (this.activeToken.isAlphanumeric() || this.activeToken.isMinusSign()) { - const method = this.parseMethod(); - if (!method) continue; - this.methods.push(method); - this.activeMethod = method; - } - else if (this.activeToken.isTab() || this.activeToken.isSpace()) { - const lineNumber = this.activeToken.position.line; - const tokenBuffer = this.loadTokenBuffer(); - const propertyDef = this.lookForPropertyDef(tokenBuffer); - if (propertyDef) { - if (propertyDef.id) this.properties.push(propertyDef); - this.activeProperty = propertyDef; - continue; - } - const typeDec = this.lookForTypeDeclaration(tokenBuffer); - if (typeDec.length > 0) { - const activeDeclarations = this.activeMethod ? this.activeMethod.declarations : this.declarations; - for (const dec of typeDec) activeDeclarations.push(dec); - continue; - } - const extending = this.checkForExtends(tokenBuffer); - if (extending) this.extending = extending; - const pslPackage = this.checkForPSLPackage(tokenBuffer); - if (pslPackage) this.pslPackage = pslPackage; - if (this.activeMethod && this.activeMethod.batch && this.activeMethod.id.value === 'REVHIST') { - continue; - } - const statements = this.parseStatementsOnLine(tokenBuffer); - if (statements && this.activeMethod) this.activeMethod.statements = this.activeMethod.statements.concat(statements); - if (this.activeProperty && this.activeProperty.id.position.line + 1 === lineNumber) { - const documentation = this.checkForDocumentation(tokenBuffer); - if (documentation) this.activeProperty.documentation = documentation; - } - else if (this.activeMethod && getLineAfter(this.activeMethod) === lineNumber) { - const documentation = this.checkForDocumentation(tokenBuffer); - if (documentation) this.activeMethod.documentation = documentation; - } - } - else if (this.activeToken.isNewLine()) continue; - else this.throwAwayTokensTil(Type.NewLine); - } - return { - comments: this.comments, - declarations: this.declarations, - extending: this.extending, - pslPackage: this.pslPackage, - methods: this.methods, - properties: this.properties, - tokens: this.tokens, - }; - } - - private next(): boolean { - this.activeToken = this.tokenizer.next().value; - if (this.activeToken) { - this.tokens.push(this.activeToken); - if (this.activeToken.isLineComment() || this.activeToken.isBlockComment()) { - this.comments.push(this.activeToken); - } - } - return this.activeToken !== undefined; - } - - private checkForDocumentation(tokenBuffer: Token[]): string { - let i = 0; - while (i < tokenBuffer.length) { - const token = tokenBuffer[i]; - if (token.isTab() || token.isSpace()) { - i++; - continue; - } - if (token.isBlockCommentInit() && tokenBuffer[i + 1] && tokenBuffer[i + 1].isBlockComment()) { - return tokenBuffer[i + 1].value; - } - return ''; - } - } - - private lookForTypeDeclaration(tokenBuffer: Token[]): Declaration[] | undefined { - let i = 0; - const tokens: Token[] = []; - while (i < tokenBuffer.length) { - const token = tokenBuffer[i]; - if (token.isTab() || token.isSpace()) { - i++; - continue; - } - if (token.isAlphanumeric() && token.value === 'type') { - for (let j = i + 1; j < tokenBuffer.length; j++) { - const loadToken = tokenBuffer[j]; - if (loadToken.isSpace() || loadToken.isTab()) continue; - // if (loadToken.isEqualSign()) break; - tokens.push(loadToken); - } - } - else if (token.isAlphanumeric() && token.value === 'catch') { - for (let j = i + 1; j < tokenBuffer.length; j++) { - const loadToken = tokenBuffer[j]; - if (loadToken.isSpace() || loadToken.isTab()) continue; - // if (loadToken.isEqualSign()) break; - tokens.push(new Token(Type.Alphanumeric, 'Error', { character: 0, line: 0 })); - tokens.push(loadToken); - break; - } - } - break; - } - const memberClass = MemberClass.declaration; - const declarations: Declaration[] = []; - let type; - let tokenIndex = 0; - let id; - let hasType; - const modifiers: Token[] = []; - while (tokenIndex < tokens.length) { - const token = tokens[tokenIndex]; - tokenIndex++; - if (this.isDeclarationKeyword(token)) { - modifiers.push(token); - continue; - } - if (!hasType) { - if (token.type !== Type.Alphanumeric) break; - if (token.value === 'static') { - modifiers.push(token); - hasType = true; - } - else { - type = token; - hasType = true; - } - continue; - } - else if (token.isAlphanumeric()) { - id = token; - if (hasType && !type) type = token; - // declarations.push({types: [type], identifier}); - } - else if (token.isEqualSign()) { - tokenIndex = this.skipToNextDeclaration(tokens, tokenIndex); - if (id && type) declarations.push({ types: [type], id, memberClass, modifiers }); - id = undefined; - } - else if (token.isOpenParen()) { - const types = []; - const myIdentifier = tokens[tokenIndex - 2]; - while (tokenIndex < tokens.length) { - const arrayTypeToken = tokens[tokenIndex]; - tokenIndex++; - if (arrayTypeToken.isOpenParen()) continue; - else if (arrayTypeToken.isAlphanumeric()) { - types.push(arrayTypeToken); - } - else if (arrayTypeToken.isComma()) { - continue; - } - else if (arrayTypeToken.isCloseParen()) { - if (type) declarations.push({ id: myIdentifier, types: [type].concat(types), memberClass, modifiers }); - id = undefined; - break; - } - } - } - // Cheating!! - // else if (token.isPercentSign()) continue; - else if (token.isComma()) { - if (id && type) declarations.push({ types: [type], id, memberClass, modifiers }); - id = undefined; - continue; - } - else if (token.value === '\r') continue; - else if (token.isBlockComment()) continue; - else if (token.isBlockCommentInit()) continue; - else if (token.isBlockCommentTerm()) continue; - else if (token.isNewLine()) { - if (id && type) declarations.push({ types: [type], id, memberClass, modifiers }); - id = undefined; - break; - } - else break; - } - if (id && type) declarations.push({ types: [type], id, memberClass, modifiers }); - return declarations; - } - - private checkForExtends(tokenBuffer: Token[]): Token { - let i = 0; - let classDef = false; - let extending = false; - let equals = false; - while (i < tokenBuffer.length) { - const token = tokenBuffer[i]; - if (token.isTab() || token.isSpace()) { - i++; - continue; - } - else if (token.isNumberSign() && !classDef) { - const nextToken = tokenBuffer[i + 1]; - if (!nextToken) return; - if (nextToken.value === 'CLASSDEF') { - classDef = true; - i += 2; - } - else break; - } - else if (token.value === 'extends' && !extending) { - extending = true; - i++; - } - else if (token.isEqualSign() && !equals) { - equals = true; - i++; - } - else if (token.isAlphanumeric() && classDef && extending && equals) { - return token; - } - else { - i++; - } - } - return; - } - - private checkForPSLPackage(tokenBuffer: Token[]): string { - let i = 0; - let foundPackageToken = false; - - let fullPackage = ''; - - while (i < tokenBuffer.length) { - const token = tokenBuffer[i]; - - if (token.isTab() || token.isSpace()) { - i++; - continue; - } - else if (token.isNumberSign() && !foundPackageToken) { - const nextToken = tokenBuffer[i + 1]; - if (!nextToken) return; - if (nextToken.value === 'PACKAGE') { - foundPackageToken = true; - i += 2; - } - else break; - } - else if (token.isAlphanumeric() && foundPackageToken) { - // TODO: Maybe this should return an ordered list of tokens? - if (fullPackage === '') { - fullPackage = token.value; - } - else { - fullPackage += ('.' + token.value); - } - i++; - } - else { - i++; - } - } - if (fullPackage !== '') { - return fullPackage; - } - return; - } - - private skipToNextDeclaration(identifiers: Token[], tokenIndex: number): number { - let parenStack = 0; - while (tokenIndex < identifiers.length) { - const token = identifiers[tokenIndex]; - tokenIndex++; - if (token.isOpenParen()) { - parenStack++; - } - else if (token.isCloseParen()) { - parenStack--; - } - else if (token.isComma() && parenStack === 0) { - break; - } - } - return tokenIndex; - } - - private isDeclarationKeyword(token: Token) { - if (token.type !== Type.Alphanumeric) return false; - const keywords = ['public', 'private', 'new', 'literal']; - return keywords.indexOf(token.value) !== -1; - } - - private throwAwayTokensTil(type: Type) { - while (this.next() && this.activeToken.type !== type); - } - - private loadTokenBuffer() { - const tokenBuffer = []; - while (this.next() && this.activeToken.type !== Type.NewLine) { - tokenBuffer.push(this.activeToken); - } - return tokenBuffer; - - } - - private lookForPropertyDef(tokenBuffer: Token[]): Property | undefined { - let i = 0; - // TODO better loop - while (i < tokenBuffer.length) { - let token = tokenBuffer[i]; - if (token.isTab() || token.isSpace()) { - i++; - continue; - } - if (token.isNumberSign()) { - token = tokenBuffer[i + 1]; - if (token && token.value === 'PROPERTYDEF') { - const tokens = tokenBuffer.filter(t => { - if (t.isNumberSign()) return false; - if (t.value === 'PROPERTYDEF') return false; - return t.type !== Type.Space && t.type !== Type.Tab; - }, - ); - const classTypes: Token[] = []; - const classIndex = tokens.findIndex(t => t.value === 'class'); - if ( - tokens[classIndex + 1] - && tokens[classIndex + 1].value === '=' - && tokens[classIndex + 2] - && tokens[classIndex + 2].isAlphanumeric() - ) { - classTypes.push(tokens[classIndex + 2]); - } - return { - id: tokens[0], - memberClass: MemberClass.property, - modifiers: this.findPropertyModifiers(tokens.slice(1)), - types: classTypes, - }; - - } - else { - break; - } - } - else { - break; - } - } - return; - } - - private findPropertyModifiers(tokens: Token[]) { - return tokens.filter(t => { - return t.value === 'private' || t.value === 'literal' || t.value === 'public'; - }); - } - - private parseMethod(): _Method | undefined { - let batchLabel = false; - const method: _Method = new _Method(); - do { - if (!this.activeToken) continue; - if (this.activeToken.isTab() || this.activeToken.isSpace()) continue; - else if (this.activeToken.isNewLine()) break; - else if (this.activeToken.isOpenParen()) { - const processed = this.processParameters(method); - if (!processed) return undefined; - method.parameters = processed; - break; - } - else if (this.activeToken.isAlphanumeric() || this.activeToken.isNumeric()) { - if (batchLabel) { - method.modifiers.push(this.activeToken); - method.batch = true; - break; - } - if (method.line === -1) { - method.line = this.activeToken.position.line; - } - method.modifiers.push(this.activeToken); - } - else if (this.activeToken.isMinusSign()) { - batchLabel = true; - continue; - } - else if ( - this.activeToken.isLineCommentInit() - || this.activeToken.isLineComment() - || this.activeToken.isBlockCommentInit() - || this.activeToken.isBlockComment() - || this.activeToken.isBlockCommentTerm() - ) { - continue; - } - else if (this.activeToken.value === '\r') continue; - else if (this.activeToken.isCloseParen()) { - if (!method.closeParen) { - method.closeParen = this.activeToken; - } - } - else { - this.throwAwayTokensTil(Type.NewLine); - if (method.modifiers.length > 1) { - break; - } - return undefined; - } - } while (this.next()); - - return this.finalizeMethod(method); - } - - private finalizeMethod(method: _Method) { - for (const keyword of NON_METHOD_KEYWORDS) { - const index = method.modifiers.map(i => i.value.toLowerCase()).indexOf(keyword.toLowerCase()); - if (index > -1 && index <= method.modifiers.length - 1) { - method.modifiers = [method.modifiers[0]]; - method.parameters = []; - break; - } - } - // better way... - method.id = method.modifiers.pop(); - if (this.activeMethod) { - this.activeMethod.endLine = method.id.position.line - 1; - } - const lastModifier = method.modifiers[method.modifiers.length - 1]; - if (lastModifier && NON_TYPE_MODIFIERS.indexOf(lastModifier.value) < 0) { - method.types = [method.modifiers.pop()]; - } - this.activeMethod = method; - return method; - } - - private processParameters(method: _Method): _Parameter[] | undefined { - - const args: _Parameter[] = []; - let param: _Parameter | undefined; - let open = false; - while (this.next()) { - if (this.activeToken.isTab() || this.activeToken.isSpace() || this.activeToken.isNewLine()) continue; - else if (this.activeToken.isOpenParen()) { - open = true; - if (!param) return undefined; - if (param.types.length === 1 && !param.id) { - param.id = param.types[0]; - param.types[0] = this.getDummy(); - } - const objectArgs = this.processObjectArgs(); - if (!objectArgs) return undefined; - param.types = param.types.concat(objectArgs); - continue; - } - else if (this.activeToken.isCloseParen()) { - open = false; - method.closeParen = this.activeToken; - if (!param) break; - if (param.types.length === 1 && !param.id) { - param.id = param.types[0]; - param.types[0] = this.getDummy(); - } - args.push(param); - break; - } - else if (this.activeToken.isAlphanumeric()) { - if (!param) param = new _Parameter(); - // let value = this.activeToken.value; - if (this.activeToken.value === 'req') { - param.modifiers.push(this.activeToken); - param.req = true; - } - else if (this.activeToken.value === 'ret') { - param.modifiers.push(this.activeToken); - param.ret = true; - } - else if (this.activeToken.value === 'literal') { - param.modifiers.push(this.activeToken); - param.literal = true; - } - else if (!param.types) param.types = [this.activeToken]; - else { - param.id = this.activeToken; - } - } - else if (this.activeToken.isLineComment()) { - if (param) { - param.comment = this.activeToken; - } - else if (args.length >= 1) { - args[args.length - 1].comment = this.activeToken; - } - } - else if (this.activeToken.isComma()) { - if (!param) return undefined; - if (param.types.length === 1 && !param.id) { - param.id = param.types[0]; - param.types[0] = this.getDummy(); - } - args.push(param); - param = undefined; - } - } - if (open) return undefined; - return args; - } - - private processObjectArgs(): Token[] | undefined { - const types: Token[] = []; - let found = false; - while (this.next()) { - const dummy = this.getDummy(); - if (this.activeToken.isTab() || this.activeToken.isSpace()) continue; - else if (this.activeToken.isCloseParen()) { - if (types.length === 0) types.push(dummy); - return types; - } - else if (this.activeToken.isAlphanumeric()) { - if (!found) { - types.push(this.activeToken); - found = true; - } - else return undefined; - } - else if (this.activeToken.isComma()) { - if (!found) { - if (types.length === 0) { - types.push(dummy); - } - types.push(dummy); - } - found = false; - continue; - } - } - return undefined; - } - - private parseStatementsOnLine(tokenBuffer: Token[]): Statement[] { - const statementParser = new StatementParser(tokenBuffer); - try { - return statementParser.parseLine(); - } - catch { - return []; - } - } - - private getDummy() { - return new Token(Type.Undefined, '', this.activeToken.position); - } -} diff --git a/src/parser/statementParser.ts b/src/parser/statementParser.ts deleted file mode 100644 index 2b1ced9..0000000 --- a/src/parser/statementParser.ts +++ /dev/null @@ -1,757 +0,0 @@ -import { getTokens, Token, Type } from './tokenizer'; - -export enum SyntaxKind { - ASSIGNMENT, - BINARY_OPERATOR, - CATCH_STATEMENT, - DO_STATEMENT, - FOR_STATEMENT, - IDENTIFIER, - IF_STATEMENT, - NUMERIC_LITERAL, - POST_CONDITION, - QUIT_STATEMENT, - RETURN_STATEMENT, - SET_STATEMENT, - MULTIPLE_VARIABLE_SET, - STRING_LITERAL, - WHILE_STATEMENT, - TYPE_STATEMENT, - VARIABLE_DECLARATION, - TYPE_IDENTIFIER, -} - -enum OPERATOR_VALUE { - AND_LITERAL = 'and', - APOSTROPHE = '\'', - AT = '@', - BACK_SLASH = '\\', - CARROT = '^', - COLON = ':', - DOLLAR = '$', - DOT = '.', - EQUAL = '=', - EXCLAMATION = '!', - GREATER_THAN = '>', - HASH = '#', - LEFT_BRACKET = '[', - LESS_THAN = '<', - MINUS = '-', - NOT_LITERAL = 'not', - OR_LITERAL = 'or', - PLUS = '+', - QUESTION_MARK = '?', - RIGHT_BRACKET = ']', - SLASH = '/', - STAR = '*', - UNDERSCORE = '_', - RET = 'ret', -} - -enum STORAGE_MODIFIERS { - STATIC = 'static', - NEW = 'new', - LITERAL = 'literal', -} - -enum ACCESS_MODIFIERS { - PUBLIC = 'public', - PRIVATE = 'private', -} - -enum STATEMENT_KEYWORD { - DO = 'do', - SET = 'set', - IF = 'if', - CATCH = 'catch', - FOR = 'for', - QUIT = 'quit', - RETURN = 'return', - WHILE = 'while', - TYPE = 'type', -} - -interface Operator { - value: OPERATOR_VALUE; - appendable?: boolean; -} - -const UNARY_OPERATORS: Operator[] = [ - { value: OPERATOR_VALUE.APOSTROPHE }, - { value: OPERATOR_VALUE.AT }, - { value: OPERATOR_VALUE.CARROT }, - { value: OPERATOR_VALUE.DOLLAR, appendable: true }, - { value: OPERATOR_VALUE.DOT }, - { value: OPERATOR_VALUE.MINUS }, - { value: OPERATOR_VALUE.NOT_LITERAL }, - { value: OPERATOR_VALUE.PLUS }, - { value: OPERATOR_VALUE.RIGHT_BRACKET }, - { value: OPERATOR_VALUE.RET }, -]; - -const BINARY_OPERATORS: Operator[] = [ - { value: OPERATOR_VALUE.AND_LITERAL }, - { value: OPERATOR_VALUE.APOSTROPHE, appendable: true }, - { value: OPERATOR_VALUE.AT }, - { value: OPERATOR_VALUE.BACK_SLASH }, - { value: OPERATOR_VALUE.CARROT }, - { value: OPERATOR_VALUE.DOT }, - { value: OPERATOR_VALUE.EQUAL }, - { value: OPERATOR_VALUE.EXCLAMATION }, - { value: OPERATOR_VALUE.GREATER_THAN, appendable: true }, - { value: OPERATOR_VALUE.HASH }, - { value: OPERATOR_VALUE.LEFT_BRACKET }, - { value: OPERATOR_VALUE.LESS_THAN, appendable: true }, - { value: OPERATOR_VALUE.MINUS }, - { value: OPERATOR_VALUE.NOT_LITERAL, appendable: true }, - { value: OPERATOR_VALUE.OR_LITERAL }, - { value: OPERATOR_VALUE.PLUS }, - { value: OPERATOR_VALUE.QUESTION_MARK }, - { value: OPERATOR_VALUE.SLASH }, - { value: OPERATOR_VALUE.STAR }, - { value: OPERATOR_VALUE.UNDERSCORE }, -]; - -export interface Node { - kind: SyntaxKind; - parent?: Node; -} - -export interface BinaryOperator extends Node { - operator: Token[]; - left?: Node; - right?: Node; -} - -export interface MultiSet extends Node { - variables: Expression[]; -} - -export interface PostCondition extends Node { - colon: Token; - condition?: Expression; - expression?: Expression | MultiSet; -} - -export type Expression = Value | BinaryOperator | PostCondition | MultiSet; - -export interface Statement extends Node { - action: Token; - expressions: Expression[]; - block?: Node; -} - -export interface Value extends Node { - id: Token; - unaryOperator?: Token[]; -} - -export type NumericLiteral = Value; - -export interface StringLiteral extends Value { - openQuote: Token; - closeQuote: Token; -} - -export interface Identifier extends Value { - args?: Expression[]; - openParen?: Token; - closeParen?: Token; -} - -export interface DeclarationStatement extends Identifier { - type: TypeIdentifier; - staticToken?: Token; - newToken?: Token; - publicToken?: Token; - literalToken?: Token; -} - -export type TypeIdentifier = Identifier; - -export class StatementParser { - tokenizer: IterableIterator; - tokens: Token[] = []; - previousToken: Token | undefined; - activeToken: Token | undefined; - - constructor(arg: string | IterableIterator | Token[]) { - if (typeof arg === 'string') { - this.tokenizer = getTokens(arg); - } - else if (Array.isArray(arg)) { - this.tokenizer = arg[Symbol.iterator](); - } - else { - this.tokenizer = arg; - } - this.next(); // should I? - } - - parseLine(): Statement[] { - if (!this.activeToken) return []; - const statements: Statement[] = []; - do { - if (this.activeToken.isNewLine()) break; - if (this.activeToken.isAlphanumeric()) { - const statement = this.parseStatement(); - if (!statement) { - this.next(); - continue; - } - statements.push(statement); - } - else if (this.activeToken.isWhiteSpace()) this.next(true); - else break; - } while (this.activeToken); - return statements; - } - - parseStatement(): Statement | undefined { - if (!this.activeToken) return; - if (!this.activeToken.isAlphanumeric()) return; - - const action = this.activeToken; - let loadFunction: () => Expression | undefined; - let kind: SyntaxKind; - - const loadSingleExpression = (): Statement => { - if (!this.next(true)) return { action, kind, expressions: [] }; - const expression: Expression | undefined = loadFunction(); - const expressions = expression ? [expression] : []; - return { kind, action, expressions }; - }; - - const loadCommaSeparatedExpressions = (): Statement => { - if (!this.next(true)) return { action, kind, expressions: [] }; - const expressions: Expression[] = this.loadCommaSeparated(loadFunction); - return { kind, action, expressions }; - }; - - switch (action.value) { - case STATEMENT_KEYWORD.DO: - loadFunction = () => this.parseExpression(); - kind = SyntaxKind.DO_STATEMENT; - return loadCommaSeparatedExpressions(); - - case STATEMENT_KEYWORD.SET: - loadFunction = () => this.parseSetExpression(); - kind = SyntaxKind.SET_STATEMENT; - return loadCommaSeparatedExpressions(); - - case STATEMENT_KEYWORD.IF: - loadFunction = () => this.parseExpression(); - kind = SyntaxKind.IF_STATEMENT; - return loadCommaSeparatedExpressions(); - - case STATEMENT_KEYWORD.CATCH: - loadFunction = () => this.parseExpression(); - kind = SyntaxKind.CATCH_STATEMENT; - return loadCommaSeparatedExpressions(); - - case STATEMENT_KEYWORD.FOR: - return this.parseForStatement(); - - case STATEMENT_KEYWORD.QUIT: - loadFunction = () => this.parseExpression(); - kind = SyntaxKind.QUIT_STATEMENT; - return loadCommaSeparatedExpressions(); - - case STATEMENT_KEYWORD.RETURN: - loadFunction = () => this.parseExpression(); - kind = SyntaxKind.RETURN_STATEMENT; - return loadSingleExpression(); - - case STATEMENT_KEYWORD.WHILE: - loadFunction = () => this.parseExpression(); - kind = SyntaxKind.WHILE_STATEMENT; - return loadSingleExpression(); - - case STATEMENT_KEYWORD.TYPE: - return this.parseTypeStatement(); - - default: - return; - } - } - - parseTypeStatement(): Statement { - const action = this.activeToken as Token; - this.next(true); - let staticToken: Token | undefined; - let newToken: Token | undefined; - let publicToken: Token | undefined; - let literalToken: Token | undefined; - - const getKeyWordToken = (token: Token) => { - switch (token.value) { - case ACCESS_MODIFIERS.PUBLIC: - publicToken = token; - return true; - case STORAGE_MODIFIERS.LITERAL: - literalToken = token; - return true; - case STORAGE_MODIFIERS.NEW: - newToken = token; - return true; - case STORAGE_MODIFIERS.STATIC: - staticToken = token; - return true; - default: - return false; - } - }; - - const parseTypeAssignments = (): Expression[] => { - if (!this.activeToken || !this.activeToken.isAlphanumeric()) { - if (literalToken || newToken || publicToken || staticToken) { - const emptyDeclaration: DeclarationStatement = { - id: undefined, - kind: SyntaxKind.VARIABLE_DECLARATION, - literalToken: undefined, - newToken, - publicToken, - staticToken, - type: undefined, - }; - return [emptyDeclaration]; - } - return []; - } - - const type: TypeIdentifier = { id: this.activeToken, kind: SyntaxKind.TYPE_IDENTIFIER }; - if (!this.next(true) || staticToken) { - const declaration: DeclarationStatement = { - id: undefined, - kind: SyntaxKind.VARIABLE_DECLARATION, - literalToken, - newToken, - publicToken, - staticToken, - type, - }; - return [declaration]; - } - const assignments = - this.loadCommaSeparated(() => { - return this.parseAssignment(() => { - const variable = this.parseValue() as Identifier; // why not parseIdentifier - return { - args: variable.args, - id: variable.id, - kind: SyntaxKind.VARIABLE_DECLARATION, - literalToken, - newToken, - publicToken, - staticToken, - type, - }; - }); - }); - assignments.forEach(expression => { - forEachChild(expression, node => { - if (!node) return; - if (node.kind === SyntaxKind.VARIABLE_DECLARATION) { - const declaration = node as DeclarationStatement; - if (declaration.args) { - declaration.args = declaration.args.map((arg: Identifier) => { - if (!arg) return; - arg.kind = SyntaxKind.TYPE_IDENTIFIER; - return arg; - }); - } - } - return true; - }); - }); - return assignments; - }; - - while (this.activeToken && getKeyWordToken(this.activeToken)) { - if (!this.next(true)) break; - } - - const expressions = parseTypeAssignments(); - return { - action, - expressions, - kind: SyntaxKind.TYPE_STATEMENT, - }; - } - - parseAssignment(getLeft: () => Expression | MultiSet | DeclarationStatement | undefined): Expression | undefined { - const left = getLeft(); - let rootNode = left; - if (this.activeToken && this.activeToken.isEqualSign()) { - const equalSign = this.activeToken; - this.next(true); - const expression = this.parseExpression(); - rootNode = { operator: [equalSign], kind: SyntaxKind.ASSIGNMENT }; - rootNode.left = left; - rootNode.right = expression; - } - return rootNode; - } - - parseForStatement(): Statement | undefined { - if (!this.activeToken) return; - const action = this.activeToken; - const forStatement: Statement = { action, kind: SyntaxKind.FOR_STATEMENT, expressions: [] }; - if (!this.next()) return forStatement; // consume for - if (!this.next()) return forStatement; // consume first space - const spaceOrExpression = this.activeToken; - if (spaceOrExpression.isSpace()) { - this.next(); - return forStatement; // argumentless for - } - const expression = this.parseExpression(); - if (expression) forStatement.expressions.push(expression); - return forStatement; - } - - parseSetExpression(): Expression | undefined { - if (!this.activeToken) return; - const postCondition: PostCondition | undefined = this.parsePostCondition(); - const assignment = this.parseAssignment(() => { - const setVariables = this.parseSetVariables(); - if (this.activeToken && this.activeToken.isWhiteSpace()) this.next(true); - if (postCondition && !setVariables) { - postCondition.expression = setVariables; - return postCondition; - } - return setVariables; - }); - if (assignment && postCondition) { - postCondition.expression = assignment; - return postCondition; - } - return assignment; - } - - parsePostCondition(): PostCondition | undefined { - if (!this.activeToken) return; - if (this.activeToken.isColon()) { - const colon = this.activeToken; - const postCondition: PostCondition = { kind: SyntaxKind.POST_CONDITION, colon }; - this.next(true); - const condition = this.parseExpression(); - if (!condition) return postCondition; - postCondition.condition = condition; - return postCondition; - } - } - - parseSetVariables(): Expression | undefined { - if (!this.activeToken) return; - if (this.activeToken.isOpenParen()) { - this.next(true); - const variables = this.loadCommaSeparated(() => this.parseExpression()); - if (this.activeToken && this.activeToken.isCloseParen()) this.next(true); - return { variables, kind: SyntaxKind.MULTIPLE_VARIABLE_SET } as MultiSet; - } - else { - return this.parseExpression(true); - } - } - - parseExpression(ignoreEquals?: boolean, includeRet?: boolean): Expression | undefined { - const postCondition = this.parsePostCondition(); - - let rootNode = this.parseValue(undefined, includeRet); - if (!rootNode) { - if (postCondition) return postCondition; - else return; - } - - if (this.activeToken && this.activeToken.isEqualSign() && ignoreEquals) { - return rootNode; - } - - rootNode = this.parseOperatorSeparatedValues(rootNode, ignoreEquals); - if (!rootNode) return; - - rootNode = this.parseColonSeparatedValues(rootNode); - - if (postCondition) { - postCondition.expression = rootNode; - rootNode = postCondition; - } - - return rootNode; - } - - parseColonSeparatedValues(rootNode: Expression) { - while (this.activeToken && this.activeToken.isColon()) { - const colonToken = this.activeToken; - this.next(true); - const colon: BinaryOperator = { - kind: SyntaxKind.BINARY_OPERATOR, - left: rootNode, - operator: [colonToken], - right: this.parseValue(), - }; - rootNode = colon; - } - return rootNode; - } - - parseOperatorSeparatedValues(rootNode: Expression, ignoreEquals?: boolean) { - while (this.activeToken && getBinaryOperator(this.activeToken.value)) { - if (this.activeToken.isEqualSign() && ignoreEquals) break; - const operator = this.parseBinaryOperator(); - if (!operator) return; - operator.left = rootNode; - operator.right = this.parseValue(); - rootNode = operator; - } - return rootNode; - } - - parseBinaryOperator(): BinaryOperator | undefined { - if (!this.activeToken) return; - const binaryOperator: BinaryOperator = { - kind: SyntaxKind.BINARY_OPERATOR, - operator: [this.activeToken], - }; - if (!this.next(true)) return binaryOperator; - let operator: Operator | undefined; - do { - operator = getBinaryOperator(this.activeToken.value); - if (!operator) break; - if (operator) { - const not = operator.value === OPERATOR_VALUE.NOT_LITERAL - || operator.value === OPERATOR_VALUE.APOSTROPHE; - if (not && binaryOperator.operator.length) break; - } - binaryOperator.operator.push(this.activeToken); - this.next(true); - } while (operator && operator.appendable); - return binaryOperator; - } - - parseUnaryOperator(includeRet?: boolean): Token[] { - if (!this.activeToken) return []; - const leftOperator: Token[] = []; - let unaryOperator = getUnaryOperator(this.activeToken.value, includeRet); - if (unaryOperator) { - leftOperator.push(this.activeToken); - this.next(true); - while (unaryOperator && unaryOperator.appendable) { - unaryOperator = getUnaryOperator(this.activeToken.value); - if (unaryOperator) { - leftOperator.push(this.activeToken); - this.next(true); - } - } - } - return leftOperator; - } - - parseValue(tree?: BinaryOperator, includeRet?: boolean): Value | Expression | undefined { - let value: Value | Expression | undefined; - if (!this.activeToken || this.activeToken.isWhiteSpace()) { - if (tree) return tree; - else return; - } - - const unaryOperator: Token[] = this.parseUnaryOperator(includeRet); - if (!this.activeToken) { - return { - id: new Token(Type.Undefined, '', { character: 0, line: 0 }), - kind: SyntaxKind.IDENTIFIER, - unaryOperator, - }; - } - if (this.activeToken.type === Type.Alphanumeric) { - value = this.parseIdentifier(); - if (!value) return; - if (unaryOperator.length) value.unaryOperator = unaryOperator; - } - else if (this.activeToken.type === Type.DoubleQuotes) { - value = this.parseStringLiteral(); - if (!value) return; - if (unaryOperator.length) value.unaryOperator = unaryOperator; - } - else if (this.activeToken.type === Type.Numeric) { - value = { id: this.activeToken, kind: SyntaxKind.NUMERIC_LITERAL } as NumericLiteral; - if (unaryOperator.length) value.unaryOperator = unaryOperator; - this.next(true); - } - else if (this.activeToken.type === Type.OpenParen) { - this.next(true); - value = this.parseExpression(); - this.next(true); - } - if (tree && value) { - tree.right = value; - value = tree; - } - if (this.activeToken && (this.activeToken.type === Type.Period || this.activeToken.type === Type.Caret)) { - const operator: BinaryOperator = { - kind: SyntaxKind.BINARY_OPERATOR, - left: value, - operator: [this.activeToken], - }; - this.next(); - return this.parseValue(operator); - } - - if (value && this.activeToken && this.activeToken.isWhiteSpace()) this.next(true); - - return value; - } - - parseIdentifier(): Identifier | undefined { - if (!this.activeToken) return; - const id = this.activeToken; - if (this.next() && this.activeToken.isOpenParen()) { - const openParen = this.activeToken; - if (this.next(true)) { - const args = this.parseArgs(); - if (this.activeToken.isCloseParen()) { - const closeParen = this.activeToken; - this.next(); - return { id, kind: SyntaxKind.IDENTIFIER, args, openParen, closeParen } as Identifier; - } - } - } - return { id, kind: SyntaxKind.IDENTIFIER }; - } - - parseStringLiteral(): StringLiteral | undefined { - if (!this.activeToken) return; - const openQuote = this.activeToken; - this.next(); - const id = this.activeToken; - if (!id || !this.next()) return; - if (this.activeToken.isDoubleQuotes()) { - const closeQuote = this.activeToken; - this.next(true); - return { id, kind: SyntaxKind.STRING_LITERAL, openQuote, closeQuote }; - } - } - - parseArgs(): Expression[] { - return this.loadCommaSeparated(() => this.parseExpression(false, true)); - } - - loadCommaSeparated(getArg: () => T | T[] | undefined): T[] { - const args: T[] = []; - do { - if (!this.activeToken) break; - if (this.activeToken.isWhiteSpace()) { - if (!this.next(true)) break; - } - if (this.activeToken.isComma()) { - args.push(undefined); // desired behavior? - continue; - } - const arg: T | T[] | undefined = getArg(); - if (arg && !Array.isArray(arg)) args.push(arg); - else if (arg) args.push(...(arg as T[])); - else if (!arg && args.length > 0) args.push(undefined); - else break; - if (!this.activeToken) break; - } while (this.activeToken.isComma() && this.next(true)); - return args; - } - - private next(skipSpaceOrTab?: boolean): boolean { - if (this.activeToken) this.previousToken = this.activeToken; - do { - this.activeToken = this.tokenizer.next().value; - if (this.activeToken) this.tokens.push(this.activeToken); - } while (skipSpaceOrTab && this.activeToken && (this.activeToken.isSpace() || this.activeToken.isTab())); - return this.activeToken !== undefined; - } -} - -function getBinaryOperator(tokenValue: string): Operator | undefined { - return BINARY_OPERATORS.find(o => o.value === tokenValue); -} - -function getUnaryOperator(tokenValue: string, includeRet?: boolean): Operator | undefined { - const operator = UNARY_OPERATORS.find(o => o.value === tokenValue); - if (!operator) return; - if (operator.value === OPERATOR_VALUE.RET && !includeRet) return; - return operator; -} - -export function forEachChild(node: Node, f: (n: Node) => boolean) { - let goDeeper: boolean = false; - if (!node) return; - switch (node.kind) { - case SyntaxKind.DO_STATEMENT: - case SyntaxKind.IF_STATEMENT: - case SyntaxKind.QUIT_STATEMENT: - case SyntaxKind.RETURN_STATEMENT: - case SyntaxKind.SET_STATEMENT: - case SyntaxKind.WHILE_STATEMENT: - case SyntaxKind.FOR_STATEMENT: - case SyntaxKind.CATCH_STATEMENT: - case SyntaxKind.TYPE_STATEMENT: - goDeeper = f(node); - if (!goDeeper) return; - const statement = node as Statement; - statement.expressions.forEach(expression => { - if (!expression) return; - forEachChild(expression, f); - }); - break; - case SyntaxKind.ASSIGNMENT: - case SyntaxKind.BINARY_OPERATOR: - goDeeper = f(node); - if (!goDeeper) return; - const assignment = node as BinaryOperator; - const left = assignment.left; - if (left && left.kind === SyntaxKind.MULTIPLE_VARIABLE_SET) { - (left as MultiSet).variables.forEach(n => { - forEachChild(n, f); - }); - } - else if (left) { - forEachChild(left, f); - } - const right = assignment.right; - if (right) { - forEachChild(right, f); - } - break; - case SyntaxKind.POST_CONDITION: - goDeeper = f(node); - if (!goDeeper) return; - const postCondition = node as PostCondition; - if (postCondition.condition) forEachChild(postCondition.condition, f); - if (postCondition.expression) { - const expression = postCondition.expression; - if (Array.isArray(expression)) { - expression.forEach(n => { - forEachChild(n, f); - }); - } - else if (expression) { - forEachChild(expression, f); - } - } - break; - case SyntaxKind.IDENTIFIER: - case SyntaxKind.TYPE_IDENTIFIER: - goDeeper = f(node); - if (!goDeeper) return; - const identifier = node as Identifier; - if (identifier.args) identifier.args.forEach(arg => forEachChild(arg, f)); - break; - case SyntaxKind.VARIABLE_DECLARATION: - goDeeper = f(node); - if (!goDeeper) return; - const declaration = node as DeclarationStatement; - if (declaration.args) declaration.args.forEach(arg => forEachChild(arg, f)); - f(declaration.type); - case SyntaxKind.NUMERIC_LITERAL: - case SyntaxKind.STRING_LITERAL: - f(node); - break; - default: - break; - } -} diff --git a/src/parser/tokenizer.ts b/src/parser/tokenizer.ts deleted file mode 100644 index 98e606d..0000000 --- a/src/parser/tokenizer.ts +++ /dev/null @@ -1,557 +0,0 @@ -export function* getTokens(documentContents: string): IterableIterator { - const t: Tokenizer = new Tokenizer(); - - for (const char of documentContents) { - t.charType = getType(char); - if (t.tokenType === 0) { - t.tokenType = t.charType; - } - while (!t.parsed) { - if (t.parseCharacter(char)) { - yield t.token; - } - } - t.parsed = false; - } - if (t.tokenType !== 0) { // if there is an unfinished token left - t.finalizeToken(0); - yield t.token; - } -} - -export class Token { - type: Type; - value: string; - position: Position; - - constructor(type: Type, value: string, position: Position) { - this.position = position; - this.value = value; - this.type = type; - } - - getRange() { - const startPosition: Position = this.position; - const endPosition: Position = { line: this.position.line, character: this.position.character + this.value.length }; - return new Range(startPosition, endPosition); - } - isWhiteSpace() { - return this.type === Type.Space - || this.type === Type.Tab - || this.type === Type.NewLine - || this.type === Type.Undefined; - } - isAlphanumeric() { - return this.type === Type.Alphanumeric; - } - isNumeric() { - return this.type === Type.Numeric; - } - isLineComment() { - return this.type === Type.LineComment; - } - isBlockComment() { - return this.type === Type.BlockComment; - } - isString() { - return this.type === Type.String; - } - isLineCommentInit() { - return this.type === Type.LineCommentInit; - } - isBlockCommentInit() { - return this.type === Type.BlockCommentInit; - } - isBlockCommentTerm() { - return this.type === Type.BlockCommentTerm; - } - isDoubleQuotes() { - return this.type === Type.DoubleQuotes; - } - isSlash() { - return this.type === Type.Slash; - } - isTab() { - return this.type === Type.Tab; - } - isNewLine() { - return this.type === Type.NewLine; - } - isSpace() { - return this.type === Type.Space; - } - isExclamationMark() { - return this.type === Type.ExclamationMark; - } - isNumberSign() { - return this.type === Type.NumberSign; - } - isDollarSign() { - return this.type === Type.DollarSign; - } - isAmpersand() { - return this.type === Type.Ampersand; - } - isSingleQuote() { - return this.type === Type.SingleQuote; - } - isOpenParen() { - return this.type === Type.OpenParen; - } - isCloseParen() { - return this.type === Type.CloseParen; - } - isAsterisk() { - return this.type === Type.Asterisk; - } - isPlusSign() { - return this.type === Type.PlusSign; - } - isComma() { - return this.type === Type.Comma; - } - isMinusSign() { - return this.type === Type.MinusSign; - } - isPeriod() { - return this.type === Type.Period; - } - isColon() { - return this.type === Type.Colon; - } - isSemiColon() { - return this.type === Type.SemiColon; - } - isLessThan() { - return this.type === Type.LessThan; - } - isEqualSign() { - return this.type === Type.EqualSign; - } - isGreaterThan() { - return this.type === Type.GreaterThan; - } - isQuestionMark() { - return this.type === Type.QuestionMark; - } - isAtSymbol() { - return this.type === Type.AtSymbol; - } - isOpenBracket() { - return this.type === Type.OpenBracket; - } - isBackslash() { - return this.type === Type.Backslash; - } - isCloseBracket() { - return this.type === Type.CloseBracket; - } - isCaret() { - return this.type === Type.Caret; - } - isUnderscore() { - return this.type === Type.Underscore; - } - isBackQuote() { - return this.type === Type.BackQuote; - } - isOpenBrace() { - return this.type === Type.OpenBrace; - } - isPipe() { - return this.type === Type.Pipe; - } - isCloseBrace() { - return this.type === Type.CloseBrace; - } - isTilde() { - return this.type === Type.Tilde; - } -} - -export class Range { - - /** - * The start position. It is before or equal to [end](#Range.end). - */ - readonly start: Position; - - /** - * The end position. It is after or equal to [start](#Range.start). - */ - readonly end: Position; - - /** - * Create a new range from two positions. If `start` is not - * before or equal to `end`, the values will be swapped. - * - * @param start A position. - * @param end A position. - */ - constructor(start: Position, end: Position); - - /** - * Create a new range from number coordinates. It is a shorter equivalent of - * using `new Range(new Position(startLine, startCharacter), new Position(endLine, endCharacter))` - * - * @param startLine A zero-based line value. - * @param startCharacter A zero-based character value. - * @param endLine A zero-based line value. - * @param endCharacter A zero-based character value. - */ - constructor(startLine: number, startCharacter: number, endLine: number, endCharacter: number); - - constructor(a: number | Position, b: number | Position, c?: number, d?: number) { - if (typeof a === 'number' && typeof b === 'number' && typeof c === 'number' && typeof d === 'number') { - this.start = new Position(a, b); - this.end = new Position(c, d); - } - else { - this.start = a as Position; - this.end = b as Position; - } - } - -} - -export class Position { - - /** - * The zero-based line value. - */ - readonly line: number; - - /** - * The zero-based character value. - */ - readonly character: number; - - /** - * @param line A zero-based line value. - * @param character A zero-based character value. - */ - constructor(line: number, character: number) { - this.line = line; - this.character = character; - } -} - -class Tokenizer { - documentLine: number; - documentColumn: number; - - charType: number; - tokenType: number; - tokenValue: string; - tokenPosition: Position; - token: Token; - - parsed: boolean; - stringOpen: boolean; - firstSlash: boolean; - asterisk: boolean; - - constructor() { - this.documentLine = 0; - this.documentColumn = 0; - - this.charType = 0; - this.tokenType = 0; - this.tokenValue = ''; - this.tokenPosition = { line: this.documentLine, character: this.documentColumn }; - - this.parsed = false; - this.stringOpen = false; - this.firstSlash = false; - this.asterisk = false; - } - - parseCharacter(char: string): boolean { - if (this.tokenType === Type.Alphanumeric) { - if (this.charType === Type.Alphanumeric || this.charType === Type.Numeric) { - this.tokenValue = this.tokenValue + char; - this.parsed = true; - this.documentColumn++; - return false; - } else { - this.finalizeToken(this.charType); - return true; - } - } else if (this.tokenType === Type.Numeric) { - if (this.charType === Type.Numeric) { - this.tokenValue = this.tokenValue + char; - this.parsed = true; - this.documentColumn++; - return false; - } else { - this.finalizeToken(this.charType); - return true; - } - } else if (this.tokenType === Type.LineComment) { - if (this.charType === Type.NewLine) { - this.finalizeToken(Type.NewLine); - return true; - } else { - this.tokenValue = this.tokenValue + char; - this.parsed = true; - this.documentColumn++; - return false; - } - } else if (this.tokenType === Type.BlockComment) { - if (this.asterisk) { // the previous char is * - this.asterisk = false; - if (this.charType === Type.Slash) { // the last two chars are * / - this.finalizeToken(Type.BlockCommentTerm); - this.tokenValue = this.tokenValue + '*'; // add the * that was not yet added to the token - this.documentColumn++; - return true; - } else { - this.tokenValue = this.tokenValue + '*'; // add the * that was not yet added to the token - this.documentColumn++; - } - } - // do not add a * to the token immediately, it could be the end of a block comment - if (this.charType === Type.Asterisk) { - this.asterisk = true; - } else { - this.tokenValue = this.tokenValue + char; - if (this.charType === Type.NewLine) { - this.documentLine++; - this.documentColumn = 0; - } else { - this.documentColumn++; - } - } - this.parsed = true; - return false; - } else if (this.tokenType === Type.String) { - if (this.charType === Type.DoubleQuotes) { - this.finalizeToken(Type.DoubleQuotes); - return true; - } else { - this.tokenValue = this.tokenValue + char; - this.parsed = true; - if (this.charType === Type.NewLine) { - this.documentLine++; - this.documentColumn = 0; - } else { - this.documentColumn++; - } - return false; - } - } else if (this.tokenType === Type.LineCommentInit) { - this.tokenValue = this.tokenValue + char; - this.parsed = true; - this.documentColumn++; - this.finalizeToken(Type.LineComment); - return true; - } else if (this.tokenType === Type.BlockCommentInit) { - this.tokenValue = this.tokenValue + char; - this.parsed = true; - this.documentColumn++; - this.finalizeToken(Type.BlockComment); - return true; - } else if (this.tokenType === Type.BlockCommentTerm) { - this.tokenValue = this.tokenValue + char; - this.parsed = true; - this.documentColumn++; - this.finalizeToken(0); - return true; - } else if (this.tokenType === Type.DoubleQuotes) { - this.tokenValue = this.tokenValue + char; - this.parsed = true; - this.documentColumn++; - if (this.stringOpen) { - this.stringOpen = false; - this.finalizeToken(0); - } else { - this.stringOpen = true; - this.finalizeToken(Type.String); - } - return true; - } else if (this.tokenType === Type.Slash || this.tokenType === Type.SemiColon) { - if (this.tokenType === Type.SemiColon) { - this.tokenType = Type.LineCommentInit; - return false; - } - else if (this.firstSlash) { - this.firstSlash = false; - if (this.charType === Type.Slash) { - this.tokenType = Type.LineCommentInit; - return false; - } else if (this.charType === Type.Asterisk) { - this.tokenType = Type.BlockCommentInit; - return false; - } else { - this.finalizeToken(this.charType); - return true; - } - } else { - this.firstSlash = true; - this.tokenValue = this.tokenValue + char; - this.parsed = true; - this.documentColumn++; - return false; - } - } else if (this.tokenType === Type.NewLine) { - this.tokenValue = this.tokenValue + char; - this.parsed = true; - this.documentLine++; - this.documentColumn = 0; - this.finalizeToken(0); - return true; - } else if (this.tokenType > 10) { // all other token types - this.tokenValue = this.tokenValue + char; - this.parsed = true; - this.documentColumn++; - this.finalizeToken(0); - return true; - } else if (this.tokenType === -1) { // undefined - this.tokenValue = this.tokenValue + char; - this.parsed = true; - this.documentColumn++; - this.finalizeToken(0); - return true; - } - return false; - } - - finalizeToken(newType: number): void { - this.token = new Token(this.tokenType, this.tokenValue, this.tokenPosition); - this.tokenType = newType; - this.tokenValue = ''; - this.tokenPosition = { line: this.documentLine, character: this.documentColumn }; - } -} - -function getType(c: string): Type { - const charCode: number = c.charCodeAt(0); - // Find a better way to incorporate the % - if (charCode >= 65 && charCode <= 90 || charCode >= 97 && charCode <= 122 || charCode === 37) { - return Type.Alphanumeric; - } else if (charCode >= 48 && charCode <= 57) { - return Type.Numeric; - } else if (charCode === 34) { - return Type.DoubleQuotes; - } else if (charCode === 47) { - return Type.Slash; - } else if (charCode === 9) { - return Type.Tab; - } else if (charCode === 10) { - return Type.NewLine; - } else if (charCode === 32) { - return Type.Space; - } else if (charCode === 33) { - return Type.ExclamationMark; - } else if (charCode === 35) { - return Type.NumberSign; - } else if (charCode === 36) { - return Type.DollarSign; - // } else if (charCode === 37) { - // return Type.PercentSign; - } else if (charCode === 38) { - return Type.Ampersand; - } else if (charCode === 39) { - return Type.SingleQuote; - } else if (charCode === 40) { - return Type.OpenParen; - } else if (charCode === 41) { - return Type.CloseParen; - } else if (charCode === 42) { - return Type.Asterisk; - } else if (charCode === 43) { - return Type.PlusSign; - } else if (charCode === 44) { - return Type.Comma; - } else if (charCode === 45) { - return Type.MinusSign; - } else if (charCode === 46) { - return Type.Period; - } else if (charCode === 58) { - return Type.Colon; - } else if (charCode === 59) { - return Type.SemiColon; - } else if (charCode === 60) { - return Type.LessThan; - } else if (charCode === 61) { - return Type.EqualSign; - } else if (charCode === 62) { - return Type.GreaterThan; - } else if (charCode === 63) { - return Type.QuestionMark; - } else if (charCode === 64) { - return Type.AtSymbol; - } else if (charCode === 91) { - return Type.OpenBracket; - } else if (charCode === 92) { - return Type.Backslash; - } else if (charCode === 93) { - return Type.CloseBracket; - } else if (charCode === 94) { - return Type.Caret; - } else if (charCode === 95) { - return Type.Underscore; - } else if (charCode === 96) { - return Type.BackQuote; - } else if (charCode === 123) { - return Type.OpenBrace; - } else if (charCode === 124) { - return Type.Pipe; - } else if (charCode === 125) { - return Type.CloseBrace; - } else if (charCode === 126) { - return Type.Tilde; - } - else { - return Type.Undefined; - } -} - -export const enum Type { - Alphanumeric = 1, - Numeric = 2, - LineComment = 3, - BlockComment = 4, - String = 5, - LineCommentInit = 6, - BlockCommentInit = 7, - BlockCommentTerm = 8, - DoubleQuotes = 9, - Slash = 10, - - Tab = 11, - NewLine = 13, - Space = 32, - ExclamationMark = 33, - NumberSign = 35, - DollarSign = 36, - // PercentSign = 37, - Ampersand = 38, - SingleQuote = 39, - OpenParen = 40, - CloseParen = 41, - Asterisk = 42, - PlusSign = 43, - Comma = 44, - MinusSign = 45, - Period = 46, - Colon = 58, - SemiColon = 59, - LessThan = 60, - EqualSign = 61, - GreaterThan = 62, - QuestionMark = 63, - AtSymbol = 64, - OpenBracket = 91, - Backslash = 92, - CloseBracket = 93, - Caret = 94, - Underscore = 95, - BackQuote = 96, - OpenBrace = 123, - Pipe = 124, - CloseBrace = 125, - Tilde = 126, - - Undefined = -1, -} diff --git a/src/parser/tsconfig.json b/src/parser/tsconfig.json deleted file mode 100644 index c047352..0000000 --- a/src/parser/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "target": "es2017", - "lib": [ - "es2017" - ], - "outDir": "out", - "declaration": true, - "sourceMap": true, - "rootDir": "." - }, - "formatCodeOptions": { - "newLine": "LF" - }, - "exclude": [ - "node_modules", - "out" - ] -} diff --git a/src/parser/utilities.ts b/src/parser/utilities.ts deleted file mode 100644 index 6c3f411..0000000 --- a/src/parser/utilities.ts +++ /dev/null @@ -1,422 +0,0 @@ -import * as fs from 'fs-extra'; -import * as jsonc from 'jsonc-parser'; -import * as path from 'path'; -import { FinderPaths } from './config'; -import { Member, MemberClass, Method, ParsedDocument, parseText, Property } from './parser'; -import { Position, Token, Type } from './tokenizer'; - -export interface FinderResult { - fsPath: string; - member?: Member; -} - -export const dummyPosition = new Position(0, 0); - -export class ParsedDocFinder { - - parsedDocument: ParsedDocument; - paths: FinderPaths; - procName: string; - - private hierarchy: string[] = []; - - constructor( - parsedDocument: ParsedDocument, - paths: FinderPaths, - getWorkspaceDocumentText?: (fsPath: string) => Promise, - ) { - this.parsedDocument = parsedDocument; - this.paths = paths; - if (getWorkspaceDocumentText) this.getWorkspaceDocumentText = getWorkspaceDocumentText; - this.procName = path.basename(this.paths.activeRoutine).split('.')[0]; - } - - async resolveResult(callTokens: Token[]): Promise { - let finder: ParsedDocFinder = this; - - if (callTokens.length === 1) { - const result = await finder.searchParser(callTokens[0]); - - // check for core class or tables - if (!result) { - const pslClsNames = await getPslClsNames(this.paths.corePsl); - if (pslClsNames.indexOf(callTokens[0].value) >= 0) { - finder = await finder.newFinder(callTokens[0].value); - return { - fsPath: finder.paths.activeRoutine, - }; - } - const tableName = callTokens[0].value.replace('Record', ''); - const fileDefinitionDirectory = await this.resolveFileDefinitionDirectory(tableName); - if (fileDefinitionDirectory) { - return { - fsPath: path.join(fileDefinitionDirectory, tableName.toUpperCase() + '.TBL'), - }; - } - else if (callTokens[0] === this.parsedDocument.extending) { - finder = await finder.newFinder(callTokens[0].value); - return { - fsPath: finder.paths.activeRoutine, - }; - } - else if (callTokens[0].value === 'this' || callTokens[0].value === this.procName) { - return { - fsPath: this.paths.activeRoutine, - }; - } - } - - // handle static types - else if (result.member.types[0] === callTokens[0]) { - finder = await finder.newFinder(result.member.id.value); - return { - fsPath: finder.paths.activeRoutine, - }; - } - - return result; - } - else { - let result: FinderResult; - for (let index = 0; index < callTokens.length; index++) { - const token = callTokens[index]; - - if (index === 0) { - // handle core class - const pslClsNames = await getPslClsNames(this.paths.corePsl); - if (pslClsNames.indexOf(token.value) >= 0) { - finder = await finder.newFinder(token.value); - continue; - } - // skip over 'this' - else if (token.value === 'this' || token.value === this.procName) { - result = { - fsPath: this.paths.activeRoutine, - }; - continue; - } - else { - result = await finder.searchParser(token); - } - } - - if (!result || (result.fsPath === this.paths.activeRoutine && !result.member)) { - result = await finder.searchInDocument(token.value); - } - if (!result) return; - if (!callTokens[index + 1]) return result; - let type = result.member.types[0].value; - if (type === 'void') type = 'Primitive'; // TODO whack hack - finder = await finder.newFinder(type); - result = undefined; - } - } - } - - async newFinder(routineName: string): Promise { - - if (routineName.startsWith('Record') && routineName !== 'Record') { - const tableName = routineName.replace('Record', ''); - const tableDirectory = await this.resolveFileDefinitionDirectory(tableName.toLowerCase()); - if (!tableDirectory) return; - const columns: Property[] = (await fs.readdir(tableDirectory)).filter(file => file.endsWith('.COL')).map(col => { - const colName = col.replace(`${tableName}-`, '').replace('.COL', '').toLowerCase(); - const ret: Property = { - id: new Token(Type.Alphanumeric, colName, dummyPosition), - memberClass: MemberClass.column, - modifiers: [], - types: [new Token(Type.Alphanumeric, 'String', dummyPosition)], - }; - return ret; - }); - const text = await this.getWorkspaceDocumentText(path.join(tableDirectory, `${tableName.toUpperCase()}.TBL`)); - const parsed = jsonc.parse(text); - const parentFileId = parsed.PARFID; - const extendingValue = parentFileId ? `Record${parentFileId}` : 'Record'; - const parsedDocument: ParsedDocument = { - comments: [], - declarations: [], - extending: new Token(Type.Alphanumeric, extendingValue, dummyPosition), - methods: [], - properties: columns, - pslPackage: '', - tokens: [], - }; - const newPaths: FinderPaths = Object.create(this.paths); - newPaths.activeRoutine = ''; - newPaths.activeTable = tableDirectory; - return new ParsedDocFinder(parsedDocument, newPaths, this.getWorkspaceDocumentText); - } - const pathsWithoutExtensions: string[] = this.paths.projectPsl.map(pslPath => path.join(pslPath, routineName)); - - for (const pathWithoutExtension of pathsWithoutExtensions) { - for (const extension of ['.PROC', '.psl', '.PSL']) { - const possiblePath = pathWithoutExtension + extension; - const routineText = await this.getWorkspaceDocumentText(possiblePath); - if (!routineText) continue; - const newPaths: FinderPaths = Object.create(this.paths); - newPaths.activeRoutine = possiblePath; - return new ParsedDocFinder(parseText(routineText), newPaths, this.getWorkspaceDocumentText); - } - } - } - - /** - * Search the parsed document and parents for a particular member - */ - async searchParser(queriedToken: Token): Promise { - const activeMethod = this.findActiveMethod(queriedToken); - if (activeMethod) { - const variable = this.searchInMethod(activeMethod, queriedToken); - if (variable) return { member: variable, fsPath: this.paths.activeRoutine }; - } - return this.searchInDocument(queriedToken.value); - } - - async searchInDocument(queriedId: string): Promise { - let foundProperty; - if (this.paths.activeTable) { - foundProperty = this.parsedDocument.properties.find(p => p.id.value.toLowerCase() === queriedId.toLowerCase()); - if (foundProperty) { - const tableName = path.basename(this.paths.activeTable).toUpperCase(); - return { - fsPath: path.join(this.paths.activeTable, `${tableName}-${foundProperty.id.value.toUpperCase()}.COL`), - member: foundProperty, - }; - } - } - - foundProperty = this.parsedDocument.properties.find(p => p.id.value === queriedId); - if (foundProperty) return { member: foundProperty, fsPath: this.paths.activeRoutine }; - - const foundMethod = this.parsedDocument.methods.find(p => p.id.value === queriedId); - if (foundMethod) return { member: foundMethod, fsPath: this.paths.activeRoutine }; - - if (this.parsedDocument.extending) { - const parentRoutineName = this.parsedDocument.extending.value; - if (this.hierarchy.indexOf(parentRoutineName) > -1) return; - const parentFinder: ParsedDocFinder | undefined = await this.searchForParent(parentRoutineName); - if (!parentFinder) return; - return parentFinder.searchInDocument(queriedId); - } - - } - - async findAllInDocument(results?: FinderResult[]): Promise { - if (!results) results = []; - - const addToResults = (result: FinderResult) => { - if (!results.find(r => r.member.id.value === result.member.id.value)) { - results.push(result); - } - }; - - if (this.paths.activeTable) { - this.parsedDocument.properties.forEach(property => { - const tableName = path.basename(this.paths.activeTable).toUpperCase(); - addToResults( - { member: property, fsPath: path.join(this.paths.activeTable, `${tableName}-${property.id.value.toUpperCase()}.COL`) }, - ); - }); - } - this.parsedDocument.properties.forEach(property => { - addToResults({ member: property, fsPath: this.paths.activeRoutine }); - }); - - this.parsedDocument.methods.forEach(method => { - addToResults({ member: method, fsPath: this.paths.activeRoutine }); - }); - - if (this.parsedDocument.extending) { - const parentRoutineName = this.parsedDocument.extending.value; - if (this.hierarchy.indexOf(parentRoutineName) > -1) return results; - const parentFinder: ParsedDocFinder | undefined = await this.searchForParent(parentRoutineName); - if (!parentFinder) return results; - return parentFinder.findAllInDocument(results); - } - return results; - } - - async resolveFileDefinitionDirectory(tableName: string): Promise { - for (const tableSource of this.paths.tables) { - const directory = path.join(tableSource, tableName.toLowerCase()); - if (await fs.pathExists(directory)) { - return directory; - } - } - return ''; - } - - private async searchForParent(parentRoutineName: string): Promise { - const parentFinder = await this.newFinder(parentRoutineName); - if (!parentFinder) return; - parentFinder.hierarchy = this.hierarchy.concat(this.paths.activeRoutine); - return parentFinder; - } - - private searchInMethod(activeMethod: Method, queriedToken: Token): Member | undefined { - for (const variable of activeMethod.declarations.reverse()) { - if (queriedToken.position.line < variable.id.position.line) continue; - if (queriedToken.value === variable.id.value) return variable; - } - for (const parameter of activeMethod.parameters) { - if (queriedToken.value === parameter.id.value) return parameter; - } - } - - private findActiveMethod(queriedToken: Token): Method | undefined { - const methods = this.parsedDocument.methods.filter(method => queriedToken.position.line >= method.id.position.line); - if (methods) return methods[methods.length - 1]; - } - - private async getWorkspaceDocumentText(fsPath: string): Promise { - return fs.readFile(fsPath).then(b => b.toString()).catch(() => ''); - } - -} - -async function getPslClsNames(dir: string) { - try { - const names = await fs.readdir(dir); - return names.map(name => name.split('.')[0]); - } - catch { - return []; - } -} - -/** - * Get the tokens on the line of position, as well as the specific index of the token at position - */ -export function searchTokens(tokens: Token[], position: Position) { - const tokensOnLine = tokens.filter(t => t.position.line === position.line); - if (tokensOnLine.length === 0) return undefined; - const index = tokensOnLine.findIndex(t => { - if (t.isNewLine() || t.isSpace() || t.isTab()) return; - const start: Position = t.position; - const end: Position = { line: t.position.line, character: t.position.character + t.value.length }; - return isBetween(start, position, end); - }); - return { tokensOnLine, index }; -} - -function isBetween(lb: Position, t: Position, ub: Position): boolean { - return lb.line <= t.line && - lb.character <= t.character && - ub.line >= t.line && - ub.character >= t.character; -} - -interface Node { - token: Token | undefined; - parent?: Node; - child?: Node; - routine?: boolean; -} - -export function getCallTokens(tokensOnLine: Token[], index: number): Token[] { - const ret: Token[] = []; - let current = getChildNode(tokensOnLine, index); - if (!current) return ret; - while (current.parent && current.token) { - ret.unshift(current.token); - current = current.parent; - } - if (current.token) ret.unshift(current.token); - return ret; -} - -function getChildNode(tokensOnLine: Token[], index: number): Node | undefined { - const currentToken = tokensOnLine[index]; - if (!currentToken) return { token: undefined }; - const previousToken = tokensOnLine[index - 1]; - const nextToken = tokensOnLine[index + 1]; - let routine = false; - if (previousToken) { - let newIndex = -1; - if (currentToken.isPeriod()) { - newIndex = resolve(tokensOnLine.slice(0, index)); - } - else if (previousToken.isCaret()) { - routine = true; - } - else if (currentToken.isAlphanumeric() && previousToken.isPeriod()) { - newIndex = resolve(tokensOnLine.slice(0, index - 1)); - } - - if (newIndex >= 0) { - const parent = getChildNode(tokensOnLine, newIndex); - return { parent, token: currentToken }; - } - - } - if (nextToken && nextToken.isCaret()) { - const routineToken = tokensOnLine[index + 2]; - if (!routineToken) return undefined; - return { parent: { token: routineToken, routine: true }, token: currentToken }; - } - if (currentToken.isAlphanumeric()) { - return { token: currentToken, routine }; - } - return undefined; -} - -export function resolve(tokens: Token[]): number { - const length = tokens.length; - - let parenCount = 0; - - if (length === 0) return -1; - - if (tokens[length - 1].isAlphanumeric()) return length - 1; - - for (let index = tokens.length - 1; index >= 0; index--) { - const token = tokens[index]; - if (token.isCloseParen()) parenCount++; - else if (token.isOpenParen()) parenCount--; - if (parenCount === 0) { - if (index > 0 && tokens[index - 1].isAlphanumeric()) return index - 1; - else return -1; - } - } - return -1; -} - -interface Callable { - tokenBufferIndex: number; - parameterIndex: number; -} - -export function findCallable(tokensOnLine: Token[], index: number) { - const callables: Callable[] = []; - for (let tokenBufferIndex = 0; tokenBufferIndex <= index; tokenBufferIndex++) { - const token = tokensOnLine[tokenBufferIndex]; - if (!tokenBufferIndex && !token.isTab() && !token.isSpace()) return; - if (token.isOpenParen()) { - callables.push({ tokenBufferIndex: tokenBufferIndex - 1, parameterIndex: 0 }); - } - else if (token.isCloseParen()) { - if (callables.length) callables.pop(); - else return; - } - else if (token.isComma() && callables.length) { - callables[callables.length - 1].parameterIndex += 1; - } - } - if (!callables.length) return; - const activeCallable = callables[callables.length - 1]; - return { - callTokens: getCallTokens(tokensOnLine, activeCallable.tokenBufferIndex), - parameterIndex: activeCallable.parameterIndex, - }; -} - -export function getLineAfter(method: Method): number { - return method.closeParen ? method.closeParen.position.line + 1 : method.id.position.line + 1; -} - -export function getCommentsOnLine(parsedDocument: ParsedDocument, lineNumber: number): Token[] { - return parsedDocument.comments.filter(t => { - return t.position.line === lineNumber; - }); -} diff --git a/src/pslLint/cli/.npmignore b/src/pslLint/cli/.npmignore deleted file mode 100644 index b03f0d1..0000000 --- a/src/pslLint/cli/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -*.ts -!*.d.ts -tsconfig.json -*.tgz -.npmrc* -*.map diff --git a/src/pslLint/cli/README.md b/src/pslLint/cli/README.md deleted file mode 100644 index eae911f..0000000 --- a/src/pslLint/cli/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# psl-lint - -A linter or lint refers to tools that analyze source code to flag programming errors, bugs, stylistic errors, and suspicious constructs. - -This module works by adding rules that are automatically checked at the appropriate time. - -## Current Rules - -* MemberCamelCase -* MemberLength -* MemberLiteralCase -* MemberStartsWithV -* MethodDocumentation -* MethodParametersOnNewLine -* MethodSeparator -* MultiLineDeclare -* PropertyIsDummy -* PropertyIsDuplicate -* RuntimeStart -* TblColDocumentation -* TodoInfo -* TwoEmptyLines - - -## Contributing - -To add a rule, create a class implementing one of the rule interfaces. Then, add an instance of your class to the `addRules` method found in the `activate.ts` module. - -Rules will have a parsed document at their disposal. Auto-complete can guide you to using the parsed document effectively. Use the `todo.ts` and `parameters.ts` modules as examples. - -Tests can be found in the `__tests__` directory at the root of the vscode-psl project. Use `parameters-test.ts` as an example. - -## TODO - -* More tests -* Build/Deploy/Integrate diff --git a/src/pslLint/cli/package-lock.json b/src/pslLint/cli/package-lock.json deleted file mode 100644 index d145120..0000000 --- a/src/pslLint/cli/package-lock.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "name": "psl-lint", - "version": "1.6.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "psl-lint", - "version": "1.6.0", - "license": "MIT", - "dependencies": { - "commander": "^9.4.1", - "fs-extra": "^10.1.0", - "minimatch": "^5.1.0" - }, - "bin": { - "psl-lint": "lib/pslLint/cli/cli.js" - }, - "devDependencies": { - "@types/node": "^18.11.4" - } - }, - "node_modules/@types/node": { - "version": "18.11.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.4.tgz", - "integrity": "sha512-BxcJpBu8D3kv/GZkx/gSMz6VnTJREBj/4lbzYOQueUOELkt8WrO6zAcSPmp9uRPEW/d+lUO8QK0W2xnS1hEU0A==", - "dev": true - }, - "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==" - }, - "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/commander": { - "version": "9.4.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.1.tgz", - "integrity": "sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==", - "engines": { - "node": "^12.20.0 || >=14" - } - }, - "node_modules/fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "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==" - }, - "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "engines": { - "node": ">= 10.0.0" - } - } - }, - "dependencies": { - "@types/node": { - "version": "18.11.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.4.tgz", - "integrity": "sha512-BxcJpBu8D3kv/GZkx/gSMz6VnTJREBj/4lbzYOQueUOELkt8WrO6zAcSPmp9uRPEW/d+lUO8QK0W2xnS1hEU0A==", - "dev": true - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "requires": { - "balanced-match": "^1.0.0" - } - }, - "commander": { - "version": "9.4.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.1.tgz", - "integrity": "sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==" - }, - "fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - } - }, - "graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" - }, - "jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "requires": { - "graceful-fs": "^4.1.6", - "universalify": "^2.0.0" - } - }, - "minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", - "requires": { - "brace-expansion": "^2.0.1" - } - }, - "universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" - } - } -} diff --git a/src/pslLint/cli/package.json b/src/pslLint/cli/package.json deleted file mode 100644 index 67a517d..0000000 --- a/src/pslLint/cli/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "psl-lint", - "version": "1.6.0", - "description": "Code quality for PSL", - "main": "./lib/pslLint/cli/cli.js", - "bin": { - "psl-lint": "./lib/pslLint/cli/cli.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/ing-bank/vscode-psl" - }, - "keywords": [], - "author": "atiplea", - "license": "MIT", - "dependencies": { - "commander": "^9.4.1", - "fs-extra": "^10.1.0", - "minimatch": "^5.1.0" - }, - "devDependencies": { - "@types/node": "^18.11.4" - } -} diff --git a/src/pslLint/cli/tsconfig.json b/src/pslLint/cli/tsconfig.json deleted file mode 100644 index b127abe..0000000 --- a/src/pslLint/cli/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "target": "es2017", - "lib": [ - "es2017" - ], - "outDir": "lib", - "sourceMap": true, - "declaration": true, - "rootDir": "./../.." - }, - "formatCodeOptions": { - "newLine": "LF" - }, - "exclude": [ - "node_modules", - "lib" - ] -} diff --git a/src/pslLint/runtime.ts b/src/runtime.ts similarity index 85% rename from src/pslLint/runtime.ts rename to src/runtime.ts index 5305a20..acce304 100644 --- a/src/pslLint/runtime.ts +++ b/src/runtime.ts @@ -1,10 +1,6 @@ -import { Member, MemberClass, Method } from '../parser/parser'; -import { - BinaryOperator, Identifier, - StringLiteral, SyntaxKind, Value, -} from '../parser/statementParser'; -import { Range, Token } from '../parser/tokenizer'; -import { getCommentsOnLine } from '../parser/utilities'; +import {Member, MemberClass, Method, tokenizer, utilities} from 'psl-parser'; +import {BinaryOperator, Identifier, StringLiteral, SyntaxKind, Value} from 'psl-parser'; + import { Diagnostic, DiagnosticRelatedInformation, DiagnosticSeverity, MethodRule } from './api'; export class RuntimeStart extends MethodRule { @@ -49,7 +45,7 @@ export class RuntimeStart extends MethodRule { method: Method, ): void { let lastStart: Value; - let variables: Map; + let variables: Map; let acceptVariables: string[] = []; for (const runtimeCall of runtimeCalls) { const runtimeMethod = this.getMethod(runtimeCall); @@ -68,7 +64,7 @@ export class RuntimeStart extends MethodRule { else { const startLine = lastStart.id.position.line; const commitLine = runtimeMethod.id.position.line; - const identifierTokens: Token[] = this.getAllIdentifersInRange( + const identifierTokens: tokenizer.Token[] = this.getAllIdentifersInRange( this.parsedDocument.tokens, startLine, commitLine, @@ -91,13 +87,13 @@ export class RuntimeStart extends MethodRule { } } - private getAllIdentifersInRange(tokens: Token[], startLine: number, commitLine: number): Token[] { + private getAllIdentifersInRange(tokens: tokenizer.Token[], startLine: number, commitLine: number): tokenizer.Token[] { return tokens.filter(token => { return token.position.line > startLine && token.position.line < commitLine; }); } - private createDiagnostic(lastStart: Value, variable: Member, identifiers: Token[], diagnostics: Diagnostic[]) { + private createDiagnostic(lastStart: Value, variable: Member, identifiers: tokenizer.Token[], diagnostics: Diagnostic[]) { const range = this.getDiagnosticRange(lastStart); const word = variable.memberClass === MemberClass.parameter ? 'Parameter' : 'Declaration'; const diag = new Diagnostic( @@ -124,9 +120,9 @@ export class RuntimeStart extends MethodRule { private addVariable( localVariablesOutsideStart: Member[], - identifierToken: Token, + identifierToken: tokenizer.Token, start: Identifier, - variables: Map, + variables: Map, ) { const variable = localVariablesOutsideStart.find(v => v.id.value === identifierToken.value); if ( @@ -147,15 +143,15 @@ export class RuntimeStart extends MethodRule { } } - private getDiagnosticRange(start: Identifier): Range { + private getDiagnosticRange(start: Identifier): tokenizer.Range { const startPos = start.id.position.character - 'do Runtime.'.length; const endPos = start.closeParen.position.character + 1; - return new Range(start.id.position.line, startPos, start.id.position.line, endPos); + return new tokenizer.Range(start.id.position.line, startPos, start.id.position.line, endPos); } private addToWhitelist(runtimeMethod: Identifier) { let acceptVariables: string[] = []; - const commentsAbove: Token[] = getCommentsOnLine(this.parsedDocument, runtimeMethod.id.position.line - 1); + const commentsAbove: tokenizer.Token[] = utilities.getCommentsOnLine(this.parsedDocument, runtimeMethod.id.position.line - 1); const whiteListComment = commentsAbove[0]; if (!whiteListComment || !whiteListComment.isLineComment()) return []; diff --git a/src/pslLint/tblcolDoc.ts b/src/tblcolDoc.ts similarity index 86% rename from src/pslLint/tblcolDoc.ts rename to src/tblcolDoc.ts index 1812345..07bf377 100644 --- a/src/pslLint/tblcolDoc.ts +++ b/src/tblcolDoc.ts @@ -1,5 +1,5 @@ import * as path from 'path'; -import { Range } from '../parser/tokenizer'; +import { tokenizer } from 'psl-parser'; import { Diagnostic, DiagnosticSeverity, FileDefinitionRule } from './api'; /** @@ -27,7 +27,7 @@ export class TblColDocumentation extends FileDefinitionRule { } else message = `Documentation missing for data item "${baseName}".`; const position = this.profileComponent.positionAt(charcterOffset); - const range = new Range(position, position); + const range = new tokenizer.Range(position, position); diagnostics.push(addDiagnostic(range, message, this.ruleName)); } @@ -36,7 +36,7 @@ export class TblColDocumentation extends FileDefinitionRule { } -function addDiagnostic(range: Range, message: string, ruleName: string): Diagnostic { +function addDiagnostic(range: tokenizer.Range, message: string, ruleName: string): Diagnostic { const diagnostic = new Diagnostic(range, message, ruleName, DiagnosticSeverity.Information); diagnostic.source = 'lint'; return diagnostic; diff --git a/src/pslLint/todos.ts b/src/todos.ts similarity index 83% rename from src/pslLint/todos.ts rename to src/todos.ts index 2bb7466..5b3add8 100644 --- a/src/pslLint/todos.ts +++ b/src/todos.ts @@ -1,4 +1,4 @@ -import { getTokens, Position, Range } from '../parser/tokenizer'; +import { tokenizer } from 'psl-parser'; import { Diagnostic, DiagnosticSeverity, PslRule } from './api'; export class TodoInfo extends PslRule { @@ -21,7 +21,7 @@ export class TodoInfo extends PslRule { } interface Todo { - range: Range; + range: tokenizer.Range; message: string; } @@ -34,15 +34,15 @@ function getTodosFromComment(commentText: string, startLine: number, startChar: const finalize = () => { if (!todo) return; const start = todo.range.start; - const end = new Position(currentLine, todo.range.end.character + todo.message.trimRight().length); - todo.range = new Range(start, end); + const end = new tokenizer.Position(currentLine, todo.range.end.character + todo.message.trimRight().length); + todo.range = new tokenizer.Range(start, end); todo.message = todo.message.trim().replace(/^:/gm, '').trim(); if (!todo.message) todo.message = `TODO on line ${todo.range.start.line + 1}.`; todos.push(todo); todo = undefined; }; - const tokens = getTokens(commentText); + const tokens = tokenizer.getTokens(commentText); for (const token of tokens) { currentLine = startLine + token.position.line; currentChar = startLine === currentLine ? token.position.character + startChar : token.position.character; @@ -51,7 +51,7 @@ function getTodosFromComment(commentText: string, startLine: number, startChar: todos = todos.concat(getTodosFromComment(token.value, currentLine, currentChar)); } else if (token.value === 'TODO' && !todo) { - const range = new Range(currentLine, currentChar, currentLine, currentChar + 4); + const range = new tokenizer.Range(currentLine, currentChar, currentLine, currentChar + 4); const message = ''; todo = { range, message }; } diff --git a/syntaxes/JSON.tmLanguage b/syntaxes/JSON.tmLanguage deleted file mode 100644 index 61d005e..0000000 --- a/syntaxes/JSON.tmLanguage +++ /dev/null @@ -1,386 +0,0 @@ - - - - - fileTypes - - json - sublime-settings - sublime-menu - sublime-keymap - sublime-mousemap - sublime-theme - sublime-build - sublime-project - sublime-completions - - foldingStartMarker - (?x) # turn on extended mode - ^ # a line beginning with - \s* # some optional space - [{\[] # the start of an object or array - (?! # but not followed by - .* # whatever - [}\]] # and the close of an object or array - ,? # an optional comma - \s* # some optional space - $ # at the end of the line - ) - | # ...or... - [{\[] # the start of an object or array - \s* # some optional space - $ # at the end of the line - foldingStopMarker - (?x) # turn on extended mode - ^ # a line beginning with - \s* # some optional space - [}\]] # and the close of an object or array - keyEquivalent - ^~J - name - JSON (Javascript Next) - patterns - - - include - #value - - - repository - - array - - begin - \[ - beginCaptures - - 0 - - name - punctuation.definition.array.begin.json - - - end - \] - endCaptures - - 0 - - name - punctuation.definition.array.end.json - - - name - meta.structure.array.json - patterns - - - include - #value - - - match - , - name - punctuation.separator.array.json - - - match - [^\s\]] - name - invalid.illegal.expected-array-separator.json - - - - comments - - patterns - - - begin - /\*\* - captures - - 0 - - name - punctuation.definition.comment.json - - - end - \*/ - name - comment.block.documentation.json - - - begin - /\* - captures - - 0 - - name - punctuation.definition.comment.json - - - end - \*/ - name - comment.block.json - - - captures - - 1 - - name - punctuation.definition.comment.json - - - match - (//).*$\n? - name - comment.line.double-slash.js - - - - constant - - match - \b(?:true|false|null)\b - name - constant.language.json - - number - - match - (?x) # turn on extended mode - -? # an optional minus - (?: - 0 # a zero - | # ...or... - [1-9] # a 1-9 character - \d* # followed by zero or more digits - ) - (?: - (?: - \. # a period - \d+ # followed by one or more digits - )? - (?: - [eE] # an e character - [+-]? # followed by an option +/- - \d+ # followed by one or more digits - )? # make exponent optional - )? # make decimal portion optional - name - constant.numeric.json - - object - - begin - \{ - beginCaptures - - 0 - - name - punctuation.definition.dictionary.begin.json - - - end - \} - endCaptures - - 0 - - name - punctuation.definition.dictionary.end.json - - - name - meta.structure.dictionary.json - patterns - - - comment - the JSON object key - include - #objectkey - - - include - #comments - - - begin - : - beginCaptures - - 0 - - name - punctuation.separator.dictionary.key-value.json - - - end - (,)|(?=\}) - endCaptures - - 1 - - name - punctuation.separator.dictionary.pair.json - - - name - meta.structure.dictionary.value.json - patterns - - - comment - the JSON object value - include - #value - - - match - [^\s,] - name - invalid.illegal.expected-dictionary-separator.json - - - - - match - [^\s\}] - name - invalid.illegal.expected-dictionary-separator.json - - - - string - - begin - " - beginCaptures - - 0 - - name - punctuation.definition.string.begin.json - - - end - " - endCaptures - - 0 - - name - punctuation.definition.string.end.json - - - name - string.quoted.double.json - patterns - - - include - #stringcontent - - - - objectkey - - begin - " - beginCaptures - - 0 - - name - punctuation.support.type.property-name.begin.json - - - end - " - endCaptures - - 0 - - name - punctuation.support.type.property-name.end.json - - - name - support.type.property-name.json - patterns - - - include - #stringcontent - - - - stringcontent - - patterns - - - match - (?x) # turn on extended mode - \\ # a literal backslash - (?: # ...followed by... - ["\\/bfnrt] # one of these characters - | # ...or... - u # a u - [0-9a-fA-F]{4}) # and four hex digits - name - constant.character.escape.json - - - match - \\. - name - invalid.illegal.unrecognized-string-escape.json - - - - value - - patterns - - - include - #constant - - - include - #number - - - include - #string - - - include - #array - - - include - #object - - - include - #comments - - - - - scopeName - source.json - uuid - 8f97457b-516e-48ce-83c7-08ae12fb327a - - \ No newline at end of file diff --git a/syntaxes/psl.tmLanguage.json b/syntaxes/psl.tmLanguage.json deleted file mode 100644 index 031f320..0000000 --- a/syntaxes/psl.tmLanguage.json +++ /dev/null @@ -1,530 +0,0 @@ -{ - "comment": "Syntax highlighting for the Profile Scripting Langauge (PSL) and M", - "comment": " ", - "comment": "The order of the includes and mataches in the patterns is significant", - "comment": "The order of the repository entries is not and occur in alpabetic order.", - "comment": " ", - "comment": "Known issues:", - "comment": " * A statement on a line with a non-numeric label (i.e., no formal-list) is classified as entity.name.function.psl", - "comment": " * A local method occurrence in a do statement is classified as entity.name.unknown.psl", - - "name": "Profile Scripting Language", - "scopeName": "source.psl", - "patterns": [ - { "include": "#comments", "comment": "PSL comment-block, PSL comment-to-end-of-line, and M comment-to-end-of-line"}, - { "include": "#accept-directive", "comment": "#ACCEPT directive with all text following the directive considered comment"}, - { "include": "#classdef-directive", "comment": "#CLASSDEF directive with qualifiers"}, - { "include": "#if-directive", "comment": "#IF and #ELSEIF directives (followed by PSL code)"}, - { "include": "#optimize-directive", "comment": "#OPTIMIZE directive"}, - { "include": "#option-directive", "comment": "#OPTION directive"}, - { "include": "#package-directive", "comment": "#PACKAGE directive with root-package and optional sub-packages"}, - { "include": "#propertydef-directive", "comment": "#PROPERTYDEF directive with qualifiers"}, - { "include": "#warn-directive", "comment": "#INFO and #WARN directives"}, - { "include": "#other-directive", "comment": "#BYPASS, #ELSE, #END, #ENDBYPASS, and #ENDIF directives"}, - { "include": "#method-declaration", "comment": "method declaration"}, - { "include": "#label-declaration", "comment": "label declaration (method declaration without formal-list"}, - { "include": "#statements", "comment": "PSL statements"}, - { "include": "#literals", "comment": "Numeric literals and string literals"}, - { "include": "#special-constructs", "comment": "true/false, this/super, system keywords"}, - { "include": "#modifiers", "comment": "private, protected, literal, readonly, etc."}, - { "include": "#name-in-context", "comment": "class name, method name, proprty name, and variable name"} - ], - "repository": { - "accept-directive": { - "comment": "#ACCEPT PSL code generator directive. All text following the directive is rendered as comment.", - "match": "^\\s+(#ACCEPT)(.*)", - "captures": { - "1": { "name": "constant.language.codegeneratorDirective.accept.psl"}, - "2": { "name": "comment.inline.psl"} - } - }, - "class-names": { - "patterns": [ - { "include": "#psl-language-class" - }, - { "comment": "All other names that occur when a class name is expected.", - "name": "entity.name.class.psl", - "match": "[%A-Za-z][A-Za-z0-9]*" - } - ] - }, - "classdef-directive": { - "match": "^\\s+(#CLASSDEF)(\\s+)(.*)", - "captures": { - "1": { "name": "constant.language.classdef.psl"}, - "3": { - "patterns": [ - { "name": "keyword.other.classdef.psl", "match": "(extends|delimiter)"}, - { "name": "storage.modifier.visibility.psl", "match": "\\b(public)\\b"}, - { "include": "#class-names"} - ] - } - } - }, - "comments": { - "patterns": [ - { "include": "#comments-inline-m"}, - { "include": "#comments-inline-psl"}, - { "include": "#comments-psldoc", "comment": "This rule must occur *before* the rule for a (standard) comment block."}, - { "include": "#comments-block"} - ] - }, - "comments-block": { - "begin": "/\\*", - "end": "\\*/", - "name": "comment.block.psl", - "captures": { - "0": { "name": "punctuation.definition.comment.psl"} - }, - "patterns": [ - { "include": "#comments-inline-m"}, - { "include": "#comments-inline-psl"}, - { "include": "#doc-params"}, - { "include": "#todo"} - ] - }, - "comments-inline-m": { - "begin": ";", - "beginCaptures": { - "0": { "name": "punctuation.definition.comment.psl"} - }, - "end": "\\n", - "name": "comment.line.semicolon.psl", - "patterns": [ - { "include": "#doc-params"}, - { "include": "#todo"} - ] - }, - "comments-inline-psl": { - "begin": "//", - "beginCaptures": { - "0": { "name": "punctuation.definition.comment.psl"} - }, - "end": "\\n", - "name": "comment.line.double-slash.psl", - "patterns": [ - { "include": "#doc-params"}, - { "include": "#todo"} - ] - }, - "comments-psldoc": { - "begin": "/\\* *DOC *", - "end": "(\\*\\* *ENDDOC *\\*/|\\*/)", - "name": "comment.block.documentation.psl", - "captures": { - "0": { "name": "punctuation.definition.comment.psl"} - }, - "patterns": [ - { "include": "#comments-inline-m"}, - { "include": "#comments-inline-psl"}, - { "include": "#doc-params"}, - { "include": "#todo"} - ] - }, - "doc-params": { - "patterns": [ - { "comment": "PSL DOC subsections with an identifier.", - "match": "(@(args|param|publicnew|public|throws?))(\\s*)([A-Za-z\\-0-9%_\\.]+)", - "captures": { - "1": { "comment": "The PSL DOC subsection keyword.", - "name": "markup.heading.jsdoc" - }, - "4": { "comment": "The variable or error ID.", - "name": "variable.other.jsdoc" - } - } - }, - { "comment": "PSL DOC subsections without an identifier.", - "match": "@created|@return|@when?", - "name": "markup.heading.jsdoc" - } - ] - }, - "formal-parameter": { - "name": "meta.function.formal-parameter.psl", - "patterns": [ - { "match": "(\\s*)(noreq\\s+ret\\s+|noreq\\s+|req\\s+ret\\s+|req\\s+|ret\\s+)?([%A-Za-z][A-Za-z0-9]*\\s+)?([%A-Za-z][A-Za-z0-9]*)(\\((,?\\s*([%A-Za-z][A-Za-z0-9]*)?\\s*)*\\))?", - "captures": { - "2": { "name": "storage.modifier.formal-argument.psl"}, - "3": { "patterns": [ - { "include": "#class-names"} ] - }, - "4": { "name": "variable.parameter.psl"}, - "5": { "patterns": [ - { "include": "#class-names"} ] - }, - "6": { "patterns": [ - { "include": "#class-names"} ] - } - } - } - ] - }, - "if-directive": { - "comment": "PSL code genertor directives that are followed by PSL code", - "match": "^\\s+(#IF|#ELSEIF)\\b(.*)", - "captures": { - "1": { "name": "constant.language.codeGeneratorDirective.psl"}, - "2": { "patterns": [ - { "include": "#statements", "comment": "Try statements prior to class names in case the line constains a label and statements."}, - { "include": "#literals", "comment": "Numeric literals and string literals"}, - { "include": "#special-constructs", "comment": "true/false, this/super, system keywords"}, - { "include": "#name-in-context", "comment": "class name, method name, proprty name, and variable name"}, - { "include": "#comments-inline-m"}, - { "include": "#comments-inline-psl"} - ] } - } - }, - "label-declaration": { - "comment": "A label declaration is a method declaration without a formal parameter list.", - "comment": "Like a method, it starts in the first position of the line, but there are", - "comment": "fewer variations that we need to account for.", - "comment": "In its most extensive form it only has the following components:", - "comment": "", - "comment": "* accessModifier methodName // comment", - "comment": "", - "comment": "However, the following scenario als needs to be recognized:", - "comment": "* methodName statement ...", - "comment": "", - "name": "meta.function.label.psl", - "match": "^((([%A-Za-z][A-Za-z0-9]*)\\s+)?)([0-9]+|[%A-Za-z][A-Za-z0-9]*)(.*)", - "captures": { - "2": { "patterns": [ - { "comment": "access modifier:", "include": "#modifiers"}, - { "comment": "label followed by statement:", "name": "entity.name.function.psl"} - ] }, - "4": { "name": "entity.name.function.psl" }, - "5": { "patterns": [ - { "include": "#statements", "comment": "Try statements prior to class names in case the line constains a label and statements." }, - { "include": "#literals", "comment": "Numeric literals and string literals"}, - { "include": "#special-constructs", "comment": "true/false, this/super, system keywords"}, - { "include": "#name-in-context", "comment": "class name, method name, proprty name, and variable name"}, - { "include": "#comments-inline-m"}, - { "include": "#comments-inline-psl"} - ]} - } - }, - "literals": { - "patterns": [ - { "comment": "Non-integer values", - "name": "constant.numeric.decimal.psl", - "match": "(?:\\b|(?<=_))[0-9]*\\.[0-9]+(?=\\b|_)" - }, - { "comment": "Integer values", - "name": "constant.numeric.integer.psl", - "match": "(?:\\b|(?<=_))[0-9]+(?=\\b|_)" - }, - { "include": "#strings", "comment": "PSL String (double quoted"} - ] - }, - "method-declaration": { - "comment": "A method declaration starts in the first position of the line.", - "comment": "There are many variations that we need to account for.", - "comment": "In its most extensive form it has the following components:", - "comment": "", - "comment": "* accessModifier storageModifier resultClass methodName ( formal-list ) // comment", - "comment": "", - "comment": "From a syntax highlighting perspective, only the methodName is required", - "comment": "and in an M routine the '// comment' can also be arbitrary M code.", - "comment": "", - "name": "meta.function.method.psl", - "begin": "^(((([%A-Za-z][A-Za-z0-9]*)\\s+)*)([%A-Za-z][A-Za-z0-9]*)\\s+)*([%A-Za-z][A-Za-z0-9]*)\\(", - "beginCaptures": { - "2": { "patterns": [ - { "comment": "access modifier:", "include": "#modifiers"} - ] }, - "5": { "patterns": [ - { "include": "#modifiers"}, - { "include": "#class-names"} - ] }, - "6": { "name": "entity.name.function.psl" - } - }, - "end": "\\)", - "patterns": [ - { "include": "#formal-parameter"}, - { "include": "#comments-inline-psl"} - ] - }, - "modifiers": { - "patterns": [ - { "comment": "storage modifiers", - "name": "storage.modifier.psl", - "match": "\\b(final|literal|readonly|static)\\b" - }, - { "comment": "visibility modifiers", - "name": "storage.modifier.visibility.psl", - "match": "\\b(public|protected|private)\\b" - } - ] - }, - "name-in-context": { "comment": "try to guess the kind of name based on the surrounding characters", - "patterns": [ - { "comment": "$$name ==> method name", - "name": "entity.name.function.psl", - "match": "\\$\\$([%A-Za-z][A-Za-z0-9]*)" - }, - { "comment": "$select() PSL language function", - "name": "support.function.psl", - "match": "(\\$select)(?=\\()" - }, - { "comment": ".name( ==> a method name (or tree property)", - "name": "entity.name.function.psl", - "match": "(\\.[%A-Za-z][A-Za-z0-9]*)(?=\\()" - }, - { "comment": ".name ==> a property name (note that this must follow the check for method)", - "name": "variable.other.propertydef.psl", - "match": "(\\.[%A-Za-z][A-Za-z0-9]*)" - }, - { "comment": "^routine = class name)", - "name": "entity.name.class.psl", - "match": "(\\^[%A-Za-z][A-Za-z0-9]*)" - }, - { "comment": "PSL language classes are usually valid in any context", - "comment": "they take precedence over other static methods or properties.", - "include": "#psl-language-class" - }, - { "comment": "name. ==> instance variable (or class name in case of static method orproperty)", - "name": "variable.other.instanceOrStatic.psl", - "match": "([%A-Za-z][A-Za-z0-9]*)(?=\\.)" - }, - { "comment": "name^ ==> method name", - "name": "entity.name.function.psl", - "match": "([%A-Za-z][A-Za-z0-9]*)(?=\\^)" - }, - { "comment": "Keyword 'ret' in actual parameter list", - "name": "storage.modifier.actual-list.psl", - "match": "\\bret\\s+" - }, - { "comment": "If nothing else matches, try if it is a PSL/M name", - "name": "entity.name.unknown.psl", - "match": "[%A-Z-a-z][A-Z-a-z0-9]*" - } - ] - }, - "optimize-directive": { - "comment": "#OPTIMIZE directive", - "match": "^\\s+(#OPTIMIZE)(\\s+)(.*)", - "captures": { - "1": { "name": "constant.language.codeGeneratorDirective.optimize.psl"}, - "3": { "patterns": [ - {"include": "#optimize-keywords"}, - {"match": "(ON|OFF)", "name": "constant.language.psl"} - ] } - } - }, - "optimize-keywords": { - "comment": "Active and deprecated OPTIMIZE keywords", - "patterns": [ - {"match": "(CUVARLITERAL|OBJECTS)", "name": "keyword.other.optimize.psl"}, - {"match": "(FUNCTIONS)", "name": "invalid.keyword.other.optimize.psl"} - ] - }, - "option-directive": { - "comment": "#OPTION directive", - "match": "^\\s+(#OPTION)(\\s+)(.*)", - "captures": { - "1": { "name": "constant.language.codeGeneratorDirective.option.psl"}, - "3": { "patterns": [ - {"include": "#option-keywords"}, - {"match": "(ON|OFF)", "name": "constant.language.psl"} - ] } - } - }, - "option-keywords": { - "comment": "Active and deprecated #OPTION keywords", - "patterns": [ - {"match": "(IncludePSL|ResultClass)", "name": "keyword.other.option-keyword.psl"}, - {"match": "(\\$GetEFD|AutoPublicERRM|nolink)", "name": "invalid.keyword.other.option-keyword.psl"} - ] - }, - "other-directive": { - "comment": "PSL code genertor directives that stand alone. All text follwoing the directive is ignored (treated as comment).", - "match": "^\\s+(#BYPASS|#ELSE|#END|#ENDBYPASS|#ENDIF)\\b(.*)", - "captures": { - "1": { "name": "constant.language.codeGeneratorDirective.psl"}, - "2": { "name": "comment.inline.psl"} - } - }, - "package-directive": { - "comment": "#PACKAGE directive, followed by root package and optionally subpackages", - "match": "^\\s+(#PACKAGE)(\\s+)([A-Za-z][A-Za-z0-9]*)(\\.[A-Za-z][A-Za-z0-9]*)*", - "captures": { - "1": { "name": "constant.language.codeGeneratorDirective.package.psl"}, - "3": { "name": "entity.name.rootPackage.psl"}, - "4": { "name": "entity.name.subPackage.psl"} - } - }, - "propertydef-directive": { - "match": "^\\s+(#PROPERTYDEF)(\\s+)([%A-Za-z][A-Za-z0-9]*)(.*)", - "captures": { - "1": { "name": "constant.language.propertydef.psl"}, - "3": { "name": "entity.name.other.property.psl"}, - "4": { - "patterns": [ - { "name": "keyword.other.propertydef.psl", "match": "(class|node|position)"}, - { "include": "#modifiers"}, - { "include": "#special-constructs"}, - { "include": "#literals"}, - { "include": "#class-names"} - ] - } - } - }, - "psl-language-class": { - "comment": "Keyword 'void', PSL Language classes, and Record descendants.", - "name": "support.class.language.psl", - "match": "(?:\\b|(?<=_))(void|Boolean|ByteString|Class|Column|Date|Db|DbSet|Error|Host|Integer|IO|List|Number|Object|Primitive|PSL|PslColumnChange|PslJsonObject|Reference|ResultSet|Row|RowSet|Runtime|String|Time|DbsMakerCheckerDlgt|FwkAuthenticate|FwkHostSTF|FwkRestriction|FwkRestrictionOvr|PslDateDlgt|PslMapDlgt|PslMapPathsDlgt|PslNumberDlgt|DBARCHIVE|DbsFunc|DbsFuncUcls|DbsValueDescriptions|FwkErrorLogger|FwkErrorLogReport|FwkEvent|FwkInstCompile|FwkInstTypeInterface|FwkMessage|FwkNotification|FwkStringUtil|PbsPjiCore|PbsPjiProxyVerify|PslMap|PslMapPaths|PslUtAssert|PslUtTestCase|PslUtTestCase4Pbs|PslUtTestSuite|PslUtTestResult|PslUtPbsInterface|Record[A-Za-z0-9]*)(?=\\b|_)" - }, - "special-constructs": { - "patterns": [ - { - "name": "constant.language.psl", - "match": "(?:\\b|(?<=_))(true|false)(?=\\b|_)" - }, - { "comment": "System Keywords that are constant within the PSL process", - "name": "constant.language.systemkeyword.psl", - "match": "(%ModuleName|%ProcessID|%UserDirectory|%UserName)" - }, - { "comment": "System Keywords that are variable within the PSL process but read-only", - "name": "variable.language.systemkeyword.readonly.psl", - "match": "(%CurrentDate|%CurrentTime)" - }, - { "comment": "System Keywords that are variable within the PSL process", - "name": "variable.language.systemkeyword.readwrite.psl", - "match": "(%BatchExit|%BatchRestart|%CompanyName|%EffectiveDate|%Identifier|%ProcessMode|%SessionID|%SystemCurrency|%SystemDate|%UserClass|%UserID|%UserStation)" - }, - { - "match": "(?:\\b|(?<=_))(this|super)(?=\\b|_)", - "name": "variable.language.psl" - } - ] - }, - "statements": { - "patterns": [ - { "comment": "Declaration statement - type static:", - "comment": " * keyword 'type'", - "comment": " * modifier 'static'", - "comment": " * class name", - "match": "\\s+(type\\s+)(static\\s+)([%A-Za-z][A-Za-z0-9]*)", - "captures": { - "1": { "name": "keyword.other.declaration.static.psl"}, - "2": { "name": "storage.modifier.scope.psl"}, - "3": { "patterns": [ - { "include": "#class-names"} - ] } - } - }, - { "comment": "Declaration statement - tree:", - "comment": " 1. keyword 'type'", - "comment": " 2. modifiers 'public new' and 'public'", - "comment": " Note that 'public new' must occur before 'public' !", - "comment": " 3. class name", - "comment": " 4. variable name", - "comment": " 5. ( class name, ... )", - "match": "\\s+(type\\s*)(public\\s+new\\s*|public\\s*)?([%A-Za-z][A-Za-z0-9]*\\s+)([%A-Za-z][A-Za-z0-9]*(\\((,?\\s*([%A-Za-z][A-Za-z0-9]*)\\s*)*\\)))", - "captures": { - "1": { "name": "keyword.other.declaration.tree.psl"}, - "2": { "name": "storage.modifier.scope.psl"}, - "3": { "patterns": [ - { "include": "#class-names"} - ] }, - "4": { "name": "variable.other.psl"}, - "5": { "patterns": [ - { "include": "#class-names"} ] - }, - "6": { "patterns": [ - { "include": "#class-names"} ] - } - } - }, - { "comment": "Declaration statement - deprecated tree:", - "comment": " 1. keyword 'type'", - "comment": " 2. modifiers 'public new', 'public', and 'literal'", - "comment": " Note that 'public new' must occur before 'public' !", - "comment": " 3. class name", - "comment": " 4. variable name", - "comment": " 5. (,...)", - "match": "\\s+(type\\s+)(public\\s+new\\s+|public\\s+|literal\\s+)?([%A-Za-z][A-Za-z0-9]*\\s+)([%A-Za-z][A-Za-z0-9]*)(\\((\\s*,?\\s*)*\\))", - "captures": { - "1": { "name": "keyword.other.declaration.other.psl"}, - "2": { "name": "storage.modifier.scope.psl"}, - "3": { "patterns": [ - { "include": "#class-names"} - ] }, - "4": { "name": "variable.other.psl"}, - "5": { "name": "storage.modifier.deprecated.psl"} - } - }, - { "comment": "Declaration statement - other:", - "comment": " 1. keyword 'type'", - "comment": " 2. modifiers 'public new', 'public', and 'literal'", - "comment": " Note that 'public new' must occur before 'public' !", - "comment": " 3. class name", - "comment": " 4. variable name", - "comment": " 5. , variable name ...", - "match": "\\s+(type\\s+)(public\\s+new\\s+|public\\s+|literal\\s+)?([%A-Za-z][A-Za-z0-9]*\\s+)([%A-Za-z][A-Za-z0-9]*)(((\\s*,)\\s*[%A-Za-z][A-Za-z0-9]*)*)", - "captures": { - "1": { "name": "keyword.other.declaration.other.psl"}, - "2": { "name": "storage.modifier.scope.psl"}, - "3": { "patterns": [ - { "include": "#class-names"} - ] }, - "4": { "name": "variable.other.psl"}, - "5": { "patterns": [ - { "match": "[%A-Za-z][A-Za-z0-9]*", - "name": "variable.other.psl" - } - ] } - } - }, - { "comment": "Control statements", - "match": "\\b(? { diff --git a/__tests__/duplicateProperty-test.ts b/test/duplicateProperty.test.ts similarity index 96% rename from __tests__/duplicateProperty-test.ts rename to test/duplicateProperty.test.ts index e5a4c80..0b43862 100644 --- a/__tests__/duplicateProperty-test.ts +++ b/test/duplicateProperty.test.ts @@ -1,5 +1,5 @@ -import * as api from '../src/pslLint/api'; -import { PropertyIsDuplicate } from '../src/pslLint/elementsConventionChecker'; +import * as api from '../src/api'; +import { PropertyIsDuplicate } from '../src/elementsConventionChecker'; import * as utils from './ruleUtils'; describe('Parameter tests', () => { diff --git a/__tests__/files/ZChild.PROC b/test/files/ZChild.PROC similarity index 100% rename from __tests__/files/ZChild.PROC rename to test/files/ZChild.PROC diff --git a/__tests__/files/ZDuplicateProperty.PROC b/test/files/ZDuplicateProperty.PROC similarity index 100% rename from __tests__/files/ZDuplicateProperty.PROC rename to test/files/ZDuplicateProperty.PROC diff --git a/__tests__/files/ZMethodDoc.PROC b/test/files/ZMethodDoc.PROC similarity index 100% rename from __tests__/files/ZMethodDoc.PROC rename to test/files/ZMethodDoc.PROC diff --git a/__tests__/files/ZMultiLineDeclare.PROC b/test/files/ZMultiLineDeclare.PROC similarity index 100% rename from __tests__/files/ZMultiLineDeclare.PROC rename to test/files/ZMultiLineDeclare.PROC diff --git a/__tests__/files/ZParent.PROC b/test/files/ZParent.PROC similarity index 100% rename from __tests__/files/ZParent.PROC rename to test/files/ZParent.PROC diff --git a/__tests__/files/ZRuntime.PROC b/test/files/ZRuntime.PROC similarity index 100% rename from __tests__/files/ZRuntime.PROC rename to test/files/ZRuntime.PROC diff --git a/__tests__/files/ZTblColDocTst-Col1.COL b/test/files/ZTblColDocTst-Col1.COL similarity index 100% rename from __tests__/files/ZTblColDocTst-Col1.COL rename to test/files/ZTblColDocTst-Col1.COL diff --git a/__tests__/files/ZTblColDocTst-Col2.COL b/test/files/ZTblColDocTst-Col2.COL similarity index 100% rename from __tests__/files/ZTblColDocTst-Col2.COL rename to test/files/ZTblColDocTst-Col2.COL diff --git a/__tests__/files/ZTblColDocTst-Col3.COL b/test/files/ZTblColDocTst-Col3.COL similarity index 100% rename from __tests__/files/ZTblColDocTst-Col3.COL rename to test/files/ZTblColDocTst-Col3.COL diff --git a/__tests__/files/ZTblColDocTst-Col4.COL b/test/files/ZTblColDocTst-Col4.COL similarity index 100% rename from __tests__/files/ZTblColDocTst-Col4.COL rename to test/files/ZTblColDocTst-Col4.COL diff --git a/__tests__/files/ZTblColDocTst-Col5.COL b/test/files/ZTblColDocTst-Col5.COL similarity index 100% rename from __tests__/files/ZTblColDocTst-Col5.COL rename to test/files/ZTblColDocTst-Col5.COL diff --git a/__tests__/files/ZTblColDocTst-Col6.COL b/test/files/ZTblColDocTst-Col6.COL similarity index 100% rename from __tests__/files/ZTblColDocTst-Col6.COL rename to test/files/ZTblColDocTst-Col6.COL diff --git a/__tests__/files/ZTblColDocTst1.TBL b/test/files/ZTblColDocTst1.TBL similarity index 100% rename from __tests__/files/ZTblColDocTst1.TBL rename to test/files/ZTblColDocTst1.TBL diff --git a/__tests__/files/ZTblColDocTst2.TBL b/test/files/ZTblColDocTst2.TBL similarity index 100% rename from __tests__/files/ZTblColDocTst2.TBL rename to test/files/ZTblColDocTst2.TBL diff --git a/__tests__/files/ZTblColDocTst3.TBL b/test/files/ZTblColDocTst3.TBL similarity index 100% rename from __tests__/files/ZTblColDocTst3.TBL rename to test/files/ZTblColDocTst3.TBL diff --git a/__tests__/files/ZTblColDocTst4.TBL b/test/files/ZTblColDocTst4.TBL similarity index 100% rename from __tests__/files/ZTblColDocTst4.TBL rename to test/files/ZTblColDocTst4.TBL diff --git a/__tests__/files/ZTblColDocTst5.TBL b/test/files/ZTblColDocTst5.TBL similarity index 100% rename from __tests__/files/ZTblColDocTst5.TBL rename to test/files/ZTblColDocTst5.TBL diff --git a/__tests__/files/ZTblColDocTst6.TBL b/test/files/ZTblColDocTst6.TBL similarity index 100% rename from __tests__/files/ZTblColDocTst6.TBL rename to test/files/ZTblColDocTst6.TBL diff --git a/__tests__/files/ZTestConvention.PROC b/test/files/ZTestConvention.PROC similarity index 100% rename from __tests__/files/ZTestConvention.PROC rename to test/files/ZTestConvention.PROC diff --git a/__tests__/files/ZTestParams.PROC b/test/files/ZTestParams.PROC similarity index 100% rename from __tests__/files/ZTestParams.PROC rename to test/files/ZTestParams.PROC diff --git a/__tests__/methodDoc-test.ts b/test/methodDoc.test.ts similarity index 97% rename from __tests__/methodDoc-test.ts rename to test/methodDoc.test.ts index 2b775bc..4a660c6 100644 --- a/__tests__/methodDoc-test.ts +++ b/test/methodDoc.test.ts @@ -1,5 +1,5 @@ -import * as api from '../src/pslLint/api'; -import { MethodDocumentation, MethodSeparator, TwoEmptyLines } from '../src/pslLint/methodDoc'; +import * as api from '../src/api'; +import { MethodDocumentation, MethodSeparator, TwoEmptyLines } from '../src/methodDoc'; import * as utils from './ruleUtils'; function messageOnLine(lineNumber: number, allDiagnostics: api.Diagnostic[]): string { diff --git a/__tests__/multiLineDeclare-test.ts b/test/multiLineDeclare.test.ts similarity index 98% rename from __tests__/multiLineDeclare-test.ts rename to test/multiLineDeclare.test.ts index 9e8249c..d4cfbff 100644 --- a/__tests__/multiLineDeclare-test.ts +++ b/test/multiLineDeclare.test.ts @@ -1,5 +1,5 @@ -import * as api from '../src/pslLint/api'; -import { MultiLineDeclare } from '../src/pslLint/multiLineDeclare'; +import * as api from '../src/api'; +import { MultiLineDeclare } from '../src/multiLineDeclare'; import * as utils from './ruleUtils'; describe('Parameter tests', () => { diff --git a/__tests__/parameters-test.ts b/test/parameters.test.ts similarity index 91% rename from __tests__/parameters-test.ts rename to test/parameters.test.ts index e0f907d..b36671f 100644 --- a/__tests__/parameters-test.ts +++ b/test/parameters.test.ts @@ -1,5 +1,5 @@ -import { MethodParametersOnNewLine } from '../src/pslLint/parameters'; -import * as api from '../src/pslLint/api'; +import { MethodParametersOnNewLine } from '../src/parameters'; +import * as api from '../src/api'; import * as utils from './ruleUtils'; describe('Parameter tests', () => { diff --git a/__tests__/ruleUtils.ts b/test/ruleUtils.ts similarity index 82% rename from __tests__/ruleUtils.ts rename to test/ruleUtils.ts index 79dbd3a..0ab3b6f 100644 --- a/__tests__/ruleUtils.ts +++ b/test/ruleUtils.ts @@ -1,8 +1,8 @@ import * as fs from 'fs-extra'; import * as path from 'path'; -import { parseText } from '../src/parser/parser'; -import * as activate from '../src/pslLint/activate'; -import * as api from '../src/pslLint/api'; +import { parseText } from 'psl-parser'; +import * as activate from '../src/activate'; +import * as api from '../src/api'; /** * Returns the specific diagnostics on a given line @@ -18,11 +18,11 @@ export function diagnosticsOnLine(lineNumber: number, diagnostics: api.Diagnosti /** * Gets the diagnostics for the given file. * - * @param testFileName The name of the file located in `${PROJECT_ROOT}/__tests__/files/` + * @param testFileName The name of the file located in `${PROJECT_ROOT}/test/files/` * @param ruleName Optional parameter to return only diagnostics corresponding to the ruleName */ export async function getDiagnostics(testFileName: string, ruleName?: string): Promise { - const testFilePath = path.resolve('__tests__', 'files', testFileName); + const testFilePath = path.resolve('test', 'files', testFileName); const text = await fs.readFile(testFilePath).then(b => b.toString()); const profileComponent = new api.ProfileComponent(testFilePath, text); diff --git a/__tests__/runtime-test.ts b/test/runtime.test.ts similarity index 96% rename from __tests__/runtime-test.ts rename to test/runtime.test.ts index f84f076..4407f76 100644 --- a/__tests__/runtime-test.ts +++ b/test/runtime.test.ts @@ -1,5 +1,5 @@ -import * as api from '../src/pslLint/api'; -import { RuntimeStart } from '../src/pslLint/runtime'; +import * as api from '../src/api'; +import { RuntimeStart } from '../src/runtime'; import * as utils from './ruleUtils'; describe('Parameter tests', () => { diff --git a/__tests__/tblcolDoc-test.ts b/test/tblcolDoc.test.ts similarity index 97% rename from __tests__/tblcolDoc-test.ts rename to test/tblcolDoc.test.ts index 56f7289..f6b6c11 100644 --- a/__tests__/tblcolDoc-test.ts +++ b/test/tblcolDoc.test.ts @@ -1,5 +1,5 @@ -import * as api from '../src/pslLint/api'; -import { TblColDocumentation } from '../src/pslLint/tblcolDoc'; +import * as api from '../src/api'; +import { TblColDocumentation } from '../src/tblcolDoc'; import * as utils from './ruleUtils'; function messageOnLine(lineNumber: number, allDiagnostics: api.Diagnostic[]): string { diff --git a/tsconfig.json b/tsconfig.json index e4b722f..7b85e00 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,19 +1,15 @@ { "compilerOptions": { - "noUnusedLocals": true, - "noUnusedParameters": true, - "moduleResolution": "node", "module": "commonjs", - "target": "es6", - "outDir": "out", + "target": "es2017", "lib": [ - "es6" + "es2017" ], - "inlineSourceMap": true, - "rootDir": ".", - "skipLibCheck": true + "outDir": "lib", + "sourceMap": true, + "declaration": true, + "declarationDir": "lib/types", + "rootDir": "src/" }, - "exclude": [ - "node_modules" - ] + "include": ["src/**/*"] }