diff --git a/.eslintrc b/.eslintrc
index 6c27181..5dbc4d2 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -1,24 +1,155 @@
{
- "root": true,
- "parser": "@typescript-eslint/parser",
- "env": { "node": true },
- "plugins": [
- "@typescript-eslint"
- ],
- "extends": [
- "eslint:recommended",
- "plugin:@typescript-eslint/eslint-recommended",
- "plugin:@typescript-eslint/recommended"
- ],
- "parserOptions": {
- "sourceType": "module"
- },
- "rules": {
- "no-unused-vars": "off",
- "@typescript-eslint/no-unused-vars": ["error", { "args": "none" }],
- "@typescript-eslint/ban-ts-comment": "off",
- "no-prototype-builtins": "off",
- "@typescript-eslint/no-empty-function": "off",
- "no-case-declarations": "off"
- }
- }
\ No newline at end of file
+ "root": true,
+ "parser": "@typescript-eslint/parser",
+ "env": {
+ "node": true
+ },
+ "plugins": [
+ "@typescript-eslint",
+ "@stylistic/eslint-plugin"
+ ],
+ "extends": [
+ "eslint:recommended",
+ "plugin:@typescript-eslint/eslint-recommended",
+ "plugin:@typescript-eslint/recommended"
+ ],
+ "parserOptions": {
+ "sourceType": "module"
+ },
+ "rules": {
+ "@stylistic/indent": [
+ "error",
+ "tab"
+ ],
+ "@stylistic/indent-binary-ops": [
+ "error",
+ "tab"
+ ],
+ "@stylistic/quotes": [
+ "error",
+ "single"
+ ],
+ "@stylistic/semi": [
+ "error",
+ "always"
+ ],
+ "@stylistic/brace-style": [
+ "error",
+ "stroustrup",
+ {
+ "allowSingleLine": true
+ }
+ ],
+ "@stylistic/comma-dangle": [
+ "error",
+ "always-multiline"
+ ],
+ "comma-spacing": [
+ "error",
+ {
+ "before": false,
+ "after": true
+ }
+ ],
+ "@stylistic/dot-location": [
+ "error",
+ "property"
+ ],
+ "@stylistic/function-call-argument-newline": [
+ "error",
+ "consistent"
+ ],
+ "@stylistic/function-call-spacing": "error",
+ "@stylistic/implicit-arrow-linebreak": "error",
+ "@stylistic/key-spacing": "error",
+ "@stylistic/lines-around-comment": [
+ "error",
+ {
+ "beforeBlockComment": true,
+ "afterBlockComment": false,
+ "beforeLineComment": true,
+ "afterLineComment": false,
+ "allowBlockStart": true,
+ "allowBlockEnd": false,
+ "allowClassStart": true,
+ "allowClassEnd": false,
+ "allowObjectStart": true,
+ "allowObjectEnd": false,
+ "allowArrayStart": true,
+ "allowArrayEnd": false,
+ "ignorePattern": "TODO|HACK|BUG|TEST",
+ "applyDefaultIgnorePatterns": false
+ }
+ ],
+ "@stylistic/new-parens": "error",
+ "@stylistic/no-confusing-arrow": "error",
+ "@stylistic/no-extra-semi": "error",
+ "@stylistic/no-floating-decimal": "error",
+ "@stylistic/no-mixed-operators": "error",
+ "@stylistic/no-mixed-spaces-and-tabs": "error",
+ "@stylistic/no-multi-spaces": "error",
+ "@stylistic/no-multiple-empty-lines": [
+ "error",
+ {
+ "max": 1,
+ "maxEOF": 0,
+ "maxBOF": 0
+ }
+ ],
+ "@stylistic/no-trailing-spaces": [
+ "error",
+ {
+ "skipBlankLines": false,
+ "ignoreComments": false
+ }
+ ],
+ "@stylistic/nonblock-statement-body-position": "error",
+ "@stylistic/operator-linebreak": [
+ "error",
+ "after"
+ ],
+ "@stylistic/padded-blocks": [
+ "error",
+ "never"
+ ],
+ "@stylistic/padding-line-between-statements": "error",
+ "@stylistic/rest-spread-spacing": "error",
+ "@stylistic/semi-spacing": "error",
+ "@stylistic/semi-style": "error",
+ "@stylistic/space-before-blocks": "error",
+ "@stylistic/space-before-function-paren": [
+ "error",
+ {
+ "anonymous": "always",
+ "named": "never",
+ "asyncArrow": "always"
+ }
+ ],
+ "@stylistic/arrow-spacing": "error",
+ "@stylistic/space-in-parens": "error",
+ "@stylistic/space-infix-ops": "error",
+ "@stylistic/space-unary-ops": "error",
+ "@stylistic/spaced-comment": [
+ "error",
+ "always"
+ ],
+ "@stylistic/switch-colon-spacing": "error",
+ "@stylistic/template-curly-spacing": "error",
+ "@stylistic/type-generic-spacing": "error",
+ "@stylistic/type-named-tuple-spacing": "error",
+ "no-fallthrough": [
+ "error",
+ {
+ "allowEmptyCase": true
+ }
+ ],
+ "line-comment-position": [
+ "error",
+ {
+ "position": "above",
+ "ignorePattern": "TODO|HACK|BUG|TEST",
+ "applyDefaultIgnorePatterns": false
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/.eslintrc.dev b/.eslintrc.dev
new file mode 100644
index 0000000..c38a17b
--- /dev/null
+++ b/.eslintrc.dev
@@ -0,0 +1,8 @@
+{
+ "extends": [
+ "./.eslintrc"
+ ],
+ "rules": {
+ "no-console": "off",
+ }
+}
\ No newline at end of file
diff --git a/.eslintrc.release b/.eslintrc.release
new file mode 100644
index 0000000..91ed21d
--- /dev/null
+++ b/.eslintrc.release
@@ -0,0 +1,21 @@
+{
+ "extends": [
+ "./.eslintrc"
+ ],
+ "rules": {
+ "no-console": [
+ "error",
+ {
+ "allow": [
+ "warn",
+ "error",
+ "debug"
+ ]
+ }
+ ],
+ "multiline-comment-style": [
+ "error",
+ "starred-block"
+ ]
+ }
+}
\ No newline at end of file
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 3eb9f08..452faeb 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -1,46 +1,91 @@
-# Welcome to Settings profiles contributing guide
-Thank you for investing your time in contributing to this plugin!
+Thank you for taking the time to contribute to this plugin!
-In this guide you will get an overview of the contribution workflow from opening an issue, creating a pull request, and testing the plugin.
+This guide will walk you through the contribution workflow - from [reporting issues](#reporting-issues) and [making changes](#making-changes), to [submitting a pull request](#pull-requests) and [testing the plugin](#testing-the-plugin).
-## Getting started
-### Issues
-#### Create a new issue
-If you spot a problem with the plugin, [search if an issue already exists](https://github.com/4Source/settings-profiles-obsidian-plugin/issues). If a related issue doesn't exist, you can open a new issue using a relevant [issue form](https://github.com/4Source/settings-profiles-obsidian-plugin/issues/new/choose).
+# Getting started
+## Reporting Issues
+### 1. Check for existing issues
+If you encounter a problem, first search the issue tracker to see if it has already been reported.
+- If an there is an existing issue and you can provide additional information add a comment with your information.
+- If you just want to indicate that you are experiencing the same issue, add a :+1: reaction to the issue.
+### 2. Create a new Issue
+If not related issue exists, open a new one using the appropriate issue form.
-#### Solve an issue
-Scan through the [existing issues](https://github.com/4Source/settings-profiles-obsidian-plugin/issues) to find one that interests you. If you find an issue to work on, you are welcome to [open a PR](#pull-request) with a fix.
+## Working on an Issue
+#### 1. Browse existing issues to find something you'd like to work on.
+#### 2. Comment on the issue to let others know you're working on it.
+#### 3. Follow the [making changes](#making-changes) guide below.
+#### 4. When ready, submit a [pull request](#pull-request).
-### Make changes
-1. Fork the repository.
-2. Install [**Git**](https://git-scm.com/) on your local machine.
-3. Install or update [**Node.js**](https://nodejs.org/en) version at least `18.x`.
-4. You will need a code editor, such as [Visual Studio Code](https://code.visualstudio.com/)
-5. Clone repository to your local machine.
- - Create a new vault
- - ``cd path/to/vault``
- - ``mkdir .obsidian/plugins``
- - ``cd .obsidian/plugins``
- - ``git clone settings-profiles``
-6. Install dependencies
- - ``cd settings-profiles``
- - ``npm install``
-7. Create a working branch and start with your changes!
- - ``git branch master``
- - ``git checkout ``
-8. Compile the source code. The following command keeps running in the terminal and rebuilds the plugin when you modify the source code.
- - ``npm run dev``
-9. Enable the plugin in Obsidian settings
+## Making Changes
+### What you need:
+- [**Git**](https://git-scm.com/) on your local machine.
+- [**Node.js**](https://nodejs.org/en) at least version `18.x`.
+- Code editor, such as [Visual Studio Code](https://code.visualstudio.com/)
+### Start working:
+#### 1. Fork the repository.
+#### 2. Create a new vault
+Just for testing the plugin so you **can't** exedentially destroy your real vault
+#### 3. Clone repository to your local machine.
+```shell
+cd path/to/vault
+mkdir .obsidian/plugins
+cd .obsidian/plugins
+git clone
+```
+#### 4. Install dependencies
+```shell
+cd
+npm install
+```
+#### 5. Create a working branch
+```shell
+git checkout -b
+```
+#### 6. Compile the source code
+The following command keeps running in the terminal and rebuilds the plugin when you modify the source code.
+```shell
+npm run dev
+```
+#### 7. Enable the plugin in Obsidian settings
> [!TIP]
> Install the [Hot-Reload](https://github.com/pjeby/hot-reload) plugin to automatically reload the plugin while developing.
-### Commit your update
-Commit the changes once you are happy with them.
+## Committing Your Changes
+#### 1. Check the formatting of your code
+Before committing the following command will fix most of the formatting issues according to our ESLint configuration.
+```shell
+npm run lint-fix
+```
+If you see the following output without any errors the formatting matches the the requirements if any errors remain, fix them manually before proceeding.
+```output
+> eslint . --fix --config .eslintrc.release
+```
+#### 2. Create commit
+Than commit your changes with a clear, descriptive commit message.
-### Pull Request
-When you're finished with the changes, push them to your fork and create a pull request. Make sure you fill the pull request template.
+## Pull Requests
+#### 1. Run tests before submitting
+```shell
+npm run test
+```
+- Ensure all tests pass.
+- If new tests are needed, add them or note what should be tested in your PR.
+#### 2. Push your Branch to your fork
+#### 3. Open a Pull Request using the provided template
+#### 4. Reference any related issues
-### Test plugin
-*Not a developer* but still want to help? You can help with testing. Either you test the current version for possible problems or, if there are currently any, you can also test [pre-releases (alpha/beta)](https://github.com/4Source/settings-profiles-obsidian-plugin/releases). You need to install the version you wanna test in a vault. It is not recommendet to test in your acctual vault create a copy of it or create new one for testing. If you found a bug or unexpected behavior create an [issue](https://github.com/4Source/SettingsProfiles-Obsidian-Plugin/issues) with the version you have tested. Before creating an issue, make sure you know how to reproduce the bug. If there is already an issue for the bug you found that is still open but you have additional information, add it to the issue.
+## Testing the Plugin
+*Not a developer* but still want to help? You can help with testing:
+- Test the latest release for problems
+- Test pre-releases
+### How to test
+#### 1. Do **not** test in your actual vault - create new vault just for testing
+#### 2. Install the version you want to test in the vault
> [!TIP]
> Install the [VARE](https://obsidian.md/plugins?id=vare) plugin to easily switch versions while testing.
+#### 3. If you found a bug or unexpected behavior
+- Checkout [reporting issues](#reporting-issues)
+- Make sure you know how to reproduce the bug
+- Mention the version you have tested
+- Provide screenshots/videos or your testfiles to make it easier to reproduce
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml
index e4cc1a9..ea4c3b7 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yaml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yaml
@@ -16,7 +16,11 @@ body:
attributes:
label: How to Reproduce
description: Steps to reproduce the behavior.
- placeholder: "1. In this environment..., 2. With this config..., 3. Run..., 4. See error..."
+ placeholder: |
+ 1. In this environment...
+ 2. With this config...
+ 3. Run...
+ 4. See error...
validations:
required: true
- type: textarea
@@ -31,7 +35,7 @@ body:
id: operating-system
attributes:
label: OS of your device
- description: What operating system is your device runnging
+ description: What operating system is your device running
placeholder: e.g. Win10
validations:
required: true
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index 92fb6a5..475b1a3 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -1,5 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Community Support
- url: "../../../discussions"
+ url: https://github.com/4Source/settings-profiles-obsidian-plugin/discussions
about: Please ask and answer questions here.
+ - name: Documentation
+ url: https://github.com/4Source/settings-profiles-obsidian-plugin/wiki
+ about: Check out the documentation if you want to know what's possible.
+ - name: Contributing
+ url: https://github.com/4Source/settings-profiles-obsidian-plugin/blob/master/.github/CONTRIBUTING.md
+ about: Overview of the contribution workflow
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml
index 712f70c..23d6778 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.yaml
+++ b/.github/ISSUE_TEMPLATE/feature_request.yaml
@@ -32,4 +32,4 @@ body:
required: false
- type: markdown
attributes:
- value: "Thanks for taking the time to fill out this feature request!"
+ value: "Thanks for taking the time to fill out this feature request!"
\ No newline at end of file
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 6b66600..c1aae24 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -5,19 +5,20 @@
## Related Issues
Fixes #
+### Missing changes
+
-## Checklist before requesting a review
-- [ ] I have followed the guidelines in our Contributing document
-- [ ] I have performed a self-review of my code
-- [ ] My code follows the style guidelines of this project
-- [ ] I have commented my code, particularly in hard-to-understand areas
-- [ ] I have made corresponding changes to the documentation
-- [ ] My code fixes the feature discussed in [Related Issues](#related-issues)
-
-## How has this been tested?
+## Tests
+### How has this been tested?
**OS:**
**Obsidian Version:**
-### Tests
-
\ No newline at end of file
+
+
+## Checklist before requesting a review
+- [ ] I have performed a self-review of my code
+- [ ] I have commented my code, particularly in hard-to-understand areas
+- [ ] I have made corresponding changes to the documentation
+- [ ] I have tested my changes in Obsidian and describte how I tested in [Tests](#tests)
+- [ ] My code fixes the feature discussed in [Related Issues](#related-issues) if not or not fully describe what is missing in [Missing changes](#missing-changes)
diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml
new file mode 100644
index 0000000..e48a9a0
--- /dev/null
+++ b/.github/workflows/cd.yml
@@ -0,0 +1,71 @@
+name: Continuous Deployment
+on:
+ pull_request:
+ types:
+ - closed
+ branches:
+ - master
+ workflow_dispatch:
+
+jobs:
+ release:
+ runs-on: ubuntu-latest
+ if: github.event.pull_request.merged == true
+ permissions:
+ pull-requests: write
+ contents: write
+
+ steps:
+ - name: Checkout
+ id: checkout
+ uses: actions/checkout@v4
+
+ - name: Use Node.js 18.x
+ uses: actions/setup-node@v4
+ with:
+ node-version: 18.x
+
+ - name: Install Dependencies
+ run: npm install
+
+ - name: Bump version
+ id: version-bump
+ uses: 4Source/version-control-action@v1
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ owner: ${{ github.repository_owner }}
+ repository: ${{ github.event.repository.name }}
+ pr_number: ${{ github.event.number }}
+ tag_prefix: ''
+ dry_run: true
+
+ - name: Configure git
+ run: |
+ git config --global user.name "4Source"
+ git config --global user.email "38220764+4Source@users.noreply.github.com."
+
+ - name: Change version in files
+ run: |
+ npm run version -- --new_version=${{ steps.version-bump.outputs.new_version }}
+
+ - name: Commit and push changes
+ run: |
+ git commit -a -m "Apply version ${{ steps.version-bump.outputs.new_version }}"
+ git push -f
+
+ - name: Push version tag
+ run: |
+ git tag -a ${{ steps.version-bump.outputs.new_version }} -m "${{ steps.version-bump.outputs.new_version }}"
+ git push -f origin ${{ steps.version-bump.outputs.new_version }}
+
+ - name: Build plugin
+ run: npm run build
+
+ - name: Create release
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ gh release create "${{ steps.version-bump.outputs.new_version }}" \
+ --title="${{ steps.version-bump.outputs.new_version }}" \
+ --draft \
+ main.js manifest.json styles.css
\ No newline at end of file
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..13561f1
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,118 @@
+name: Continuous Integration
+
+on:
+ pull_request:
+ branches:
+ - master
+ paths:
+ - 'src/**'
+ - 'test/**'
+ push:
+ branches:
+ - master
+ paths:
+ - 'src/**'
+ - 'test/**'
+ workflow_dispatch:
+
+jobs:
+ test:
+ strategy:
+ matrix:
+ os: [ ubuntu-latest, windows-latest, macos-latest ]
+
+ name: Run unit tests
+ runs-on: ${{ matrix.os }}
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Use Node.js "18.x"
+ uses: actions/setup-node@v4
+ with:
+ node-version: "18.x"
+
+ - name: Install Dependencies
+ run: npm install
+
+ - name: Run Tests
+ run: npm run test
+
+ lint:
+ name: Run linter
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Use Node.js 18.x
+ uses: actions/setup-node@v4
+ with:
+ node-version: "18.x"
+
+ - name: Install Dependencies
+ run: npm install
+
+ - name: Run linter
+ run: npm run lint
+
+ build:
+ name: Build Plugin
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Use Node.js 18.x
+ uses: actions/setup-node@v4
+ with:
+ node-version: "18.x"
+
+ - name: Install Dependencies
+ run: npm install
+
+ - name: Run Build
+ run: npm run build
+
+ audit:
+ name: Security Audit
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Use Node.js 18.x
+ uses: actions/setup-node@v4
+ with:
+ node-version: "18.x"
+
+ - name: Install Dependencies
+ run: npm install
+
+ - name: Audit for vulnerabilities
+ run: npm audit --audit-level=moderate
+
+ version:
+ name: Version Bump
+ runs-on: ubuntu-latest
+ if: github.event_name == 'pull_request'
+ permissions:
+ pull-requests: write
+
+ steps:
+ - name: Checkout
+ id: checkout
+ uses: actions/checkout@v4
+ - name: Bump version
+ uses: 4Source/version-control-action@v1
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ owner: ${{ github.repository_owner }}
+ repository: ${{ github.event.repository.name }}
+ pr_number: ${{ github.event.number }}
+ tag_prefix: ''
+ dry_run: true
\ No newline at end of file
diff --git a/.github/workflows/manual_release.yml b/.github/workflows/manual_release.yml
new file mode 100644
index 0000000..f7e1c83
--- /dev/null
+++ b/.github/workflows/manual_release.yml
@@ -0,0 +1,77 @@
+name: Manual Release
+on:
+ workflow_dispatch:
+ inputs:
+ version_increase:
+ description: 'Level of changes for new version'
+ required: true
+ default: 'patch'
+ type: choice
+ options:
+ - patch
+ - minor
+ - major
+
+
+jobs:
+ release:
+ runs-on: ubuntu-latest
+ permissions:
+ pull-requests: write
+ contents: write
+
+ steps:
+ - name: Checkout
+ id: checkout
+ uses: actions/checkout@v4
+
+ - name: Use Node.js 18.x
+ uses: actions/setup-node@v4
+ with:
+ node-version: 18.x
+
+ - name: Install Dependencies
+ run: npm install
+
+ - name: Bump version
+ id: version-bump
+ uses: 4Source/version-control-action@v1
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ owner: ${{ github.repository_owner }}
+ repository: ${{ github.event.repository.name }}
+ version_increase: ${{ inputs.version_increase }}
+ tag_prefix: ''
+ dry_run: true
+
+ - name: Configure git
+ run: |
+ git config --global user.name "4Source"
+ git config --global user.email "38220764+4Source@users.noreply.github.com."
+
+ - name: Change version in files
+ run: |
+ npm run version -- --new_version=${{ steps.version-bump.outputs.new_version }}
+ git add manifest.json versions.json package.json
+
+ - name: Commit and push changes
+ run: |
+ git commit -a -m "Apply version ${{ steps.version-bump.outputs.new_version }}"
+ git push -f
+
+ - name: Push version tag
+ run: |
+ git tag -a ${{ steps.version-bump.outputs.new_version }} -m "${{ steps.version-bump.outputs.new_version }}"
+ git push -f origin ${{ steps.version-bump.outputs.new_version }}
+
+ - name: Build plugin
+ run: npm run build
+
+ - name: Create release
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ gh release create "${{ steps.version-bump.outputs.new_version }}" \
+ --title="${{ steps.version-bump.outputs.new_version }}" \
+ --draft \
+ main.js manifest.json styles.css
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
deleted file mode 100644
index 943ee61..0000000
--- a/.github/workflows/release.yml
+++ /dev/null
@@ -1,43 +0,0 @@
-name: Release Obsidian plugin
-
-on:
- push:
- tags:
- - "*"
-
-permissions:
- contents: write
-
-jobs:
- build:
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v3
-
- - name: Use Node.js
- uses: actions/setup-node@v3
- with:
- node-version: "18.x"
-
- - name: Build plugin
- run: |
- npm install
- npm run build
-
- - name: Zip release files
- run: |
- mkdir settings-profiles
- cp main.js manifest.json styles.css ./settings-profiles
- zip -r settings-profiles-${GITHUB_REF#refs/tags/}.zip settings-profiles
-
- - name: Create release
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
- tag="${GITHUB_REF#refs/tags/}"
-
- gh release create "$tag" \
- --title="$tag" \
- --draft \
- main.js manifest.json styles.css settings-profiles-$tag.zip
diff --git a/jest.config.js b/jest.config.js
new file mode 100644
index 0000000..21a6b3d
--- /dev/null
+++ b/jest.config.js
@@ -0,0 +1,7 @@
+module.exports = {
+ preset: 'ts-jest',
+ testEnvironment: 'jsdom',
+ moduleNameMapper: {
+ 'src/(.*)': '/src/$1',
+ },
+};
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index fe21bb2..f1ef423 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,25 +1,31 @@
{
"name": "settings-profiles-obsidian-plugin",
- "version": "0.5.9",
+ "version": "0.7.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "settings-profiles-obsidian-plugin",
- "version": "0.5.9",
+ "version": "0.7.0",
"license": "MIT",
"dependencies": {
+ "@folder/xdg": "^4.0.1",
"node-machine-id": "^1.1.12"
},
"devDependencies": {
- "@folder/xdg": "^4.0.1",
- "@types/node": "^16.11.6",
- "@typescript-eslint/eslint-plugin": "5.29.0",
- "@typescript-eslint/parser": "5.29.0",
+ "@stylistic/eslint-plugin": "^3.1.0",
+ "@types/jest": "^29.5.12",
+ "@types/node": "^20.10.7",
+ "@typescript-eslint/eslint-plugin": "^7.1.0",
+ "@typescript-eslint/parser": "^7.1.0",
"builtin-modules": "3.3.0",
- "esbuild": "0.17.3",
+ "esbuild": "^0.25.8",
+ "eslint": "^8.57.0",
"jest": "^29.7.0",
+ "jest-environment-jsdom": "^29.7.0",
"obsidian": "latest",
+ "semver": "^7.6.0",
+ "ts-jest": "^29.1.2",
"tslib": "2.4.0",
"typescript": "4.7.4"
}
@@ -38,13 +44,14 @@
}
},
"node_modules/@babel/code-frame": {
- "version": "7.24.2",
- "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz",
- "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==",
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz",
+ "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==",
"dev": true,
"dependencies": {
- "@babel/highlight": "^7.24.2",
- "picocolors": "^1.0.0"
+ "@babel/helper-validator-identifier": "^7.27.1",
+ "js-tokens": "^4.0.0",
+ "picocolors": "^1.1.1"
},
"engines": {
"node": ">=6.9.0"
@@ -237,18 +244,18 @@
}
},
"node_modules/@babel/helper-string-parser": {
- "version": "7.24.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz",
- "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==",
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz",
+ "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==",
"dev": true,
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-validator-identifier": {
- "version": "7.24.5",
- "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz",
- "integrity": "sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==",
+ "version": "7.27.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz",
+ "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==",
"dev": true,
"engines": {
"node": ">=6.9.0"
@@ -264,110 +271,26 @@
}
},
"node_modules/@babel/helpers": {
- "version": "7.24.5",
- "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.5.tgz",
- "integrity": "sha512-CiQmBMMpMQHwM5m01YnrM6imUG1ebgYJ+fAIW4FZe6m4qHTPaRHti+R8cggAwkdz4oXhtO4/K9JWlh+8hIfR2Q==",
- "dev": true,
- "dependencies": {
- "@babel/template": "^7.24.0",
- "@babel/traverse": "^7.24.5",
- "@babel/types": "^7.24.5"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/highlight": {
- "version": "7.24.5",
- "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.5.tgz",
- "integrity": "sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==",
+ "version": "7.28.2",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.2.tgz",
+ "integrity": "sha512-/V9771t+EgXz62aCcyofnQhGM8DQACbRhvzKFsXKC9QM+5MadF8ZmIm0crDMaz3+o0h0zXfJnd4EhbYbxsrcFw==",
"dev": true,
"dependencies": {
- "@babel/helper-validator-identifier": "^7.24.5",
- "chalk": "^2.4.2",
- "js-tokens": "^4.0.0",
- "picocolors": "^1.0.0"
+ "@babel/template": "^7.27.2",
+ "@babel/types": "^7.28.2"
},
"engines": {
"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==",
+ "node_modules/@babel/parser": {
+ "version": "7.28.0",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.0.tgz",
+ "integrity": "sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==",
"dev": true,
"dependencies": {
- "has-flag": "^3.0.0"
+ "@babel/types": "^7.28.0"
},
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/@babel/parser": {
- "version": "7.24.5",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.5.tgz",
- "integrity": "sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==",
- "dev": true,
"bin": {
"parser": "bin/babel-parser.js"
},
@@ -553,14 +476,14 @@
}
},
"node_modules/@babel/template": {
- "version": "7.24.0",
- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz",
- "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==",
+ "version": "7.27.2",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz",
+ "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==",
"dev": true,
"dependencies": {
- "@babel/code-frame": "^7.23.5",
- "@babel/parser": "^7.24.0",
- "@babel/types": "^7.24.0"
+ "@babel/code-frame": "^7.27.1",
+ "@babel/parser": "^7.27.2",
+ "@babel/types": "^7.27.1"
},
"engines": {
"node": ">=6.9.0"
@@ -597,14 +520,13 @@
}
},
"node_modules/@babel/types": {
- "version": "7.24.5",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.5.tgz",
- "integrity": "sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==",
+ "version": "7.28.2",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.2.tgz",
+ "integrity": "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==",
"dev": true,
"dependencies": {
- "@babel/helper-string-parser": "^7.24.1",
- "@babel/helper-validator-identifier": "^7.24.5",
- "to-fast-properties": "^2.0.0"
+ "@babel/helper-string-parser": "^7.27.1",
+ "@babel/helper-validator-identifier": "^7.27.1"
},
"engines": {
"node": ">=6.9.0"
@@ -635,10 +557,26 @@
"w3c-keyname": "^2.2.4"
}
},
+ "node_modules/@esbuild/aix-ppc64": {
+ "version": "0.25.8",
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.8.tgz",
+ "integrity": "sha512-urAvrUedIqEiFR3FYSLTWQgLu5tb+m0qZw0NBEasUeo6wuqatkMDaRT+1uABiGXEu5vqgPd7FGE1BhsAIy9QVA==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "aix"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
"node_modules/@esbuild/android-arm": {
- "version": "0.17.3",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.3.tgz",
- "integrity": "sha512-1Mlz934GvbgdDmt26rTLmf03cAgLg5HyOgJN+ZGCeP3Q9ynYTNMn2/LQxIl7Uy+o4K6Rfi2OuLsr12JQQR8gNg==",
+ "version": "0.25.8",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.8.tgz",
+ "integrity": "sha512-RONsAvGCz5oWyePVnLdZY/HHwA++nxYWIX1atInlaW6SEkwq6XkP3+cb825EUcRs5Vss/lGh/2YxAb5xqc07Uw==",
"cpu": [
"arm"
],
@@ -648,13 +586,13 @@
"android"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/android-arm64": {
- "version": "0.17.3",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.3.tgz",
- "integrity": "sha512-XvJsYo3dO3Pi4kpalkyMvfQsjxPWHYjoX4MDiB/FUM4YMfWcXa5l4VCwFWVYI1+92yxqjuqrhNg0CZg3gSouyQ==",
+ "version": "0.25.8",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.8.tgz",
+ "integrity": "sha512-OD3p7LYzWpLhZEyATcTSJ67qB5D+20vbtr6vHlHWSQYhKtzUYrETuWThmzFpZtFsBIxRvhO07+UgVA9m0i/O1w==",
"cpu": [
"arm64"
],
@@ -664,13 +602,13 @@
"android"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/android-x64": {
- "version": "0.17.3",
- "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.3.tgz",
- "integrity": "sha512-nuV2CmLS07Gqh5/GrZLuqkU9Bm6H6vcCspM+zjp9TdQlxJtIe+qqEXQChmfc7nWdyr/yz3h45Utk1tUn8Cz5+A==",
+ "version": "0.25.8",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.8.tgz",
+ "integrity": "sha512-yJAVPklM5+4+9dTeKwHOaA+LQkmrKFX96BM0A/2zQrbS6ENCmxc4OVoBs5dPkCCak2roAD+jKCdnmOqKszPkjA==",
"cpu": [
"x64"
],
@@ -680,13 +618,13 @@
"android"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/darwin-arm64": {
- "version": "0.17.3",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.3.tgz",
- "integrity": "sha512-01Hxaaat6m0Xp9AXGM8mjFtqqwDjzlMP0eQq9zll9U85ttVALGCGDuEvra5Feu/NbP5AEP1MaopPwzsTcUq1cw==",
+ "version": "0.25.8",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.8.tgz",
+ "integrity": "sha512-Jw0mxgIaYX6R8ODrdkLLPwBqHTtYHJSmzzd+QeytSugzQ0Vg4c5rDky5VgkoowbZQahCbsv1rT1KW72MPIkevw==",
"cpu": [
"arm64"
],
@@ -696,13 +634,13 @@
"darwin"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/darwin-x64": {
- "version": "0.17.3",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.3.tgz",
- "integrity": "sha512-Eo2gq0Q/er2muf8Z83X21UFoB7EU6/m3GNKvrhACJkjVThd0uA+8RfKpfNhuMCl1bKRfBzKOk6xaYKQZ4lZqvA==",
+ "version": "0.25.8",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.8.tgz",
+ "integrity": "sha512-Vh2gLxxHnuoQ+GjPNvDSDRpoBCUzY4Pu0kBqMBDlK4fuWbKgGtmDIeEC081xi26PPjn+1tct+Bh8FjyLlw1Zlg==",
"cpu": [
"x64"
],
@@ -712,13 +650,13 @@
"darwin"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/freebsd-arm64": {
- "version": "0.17.3",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.3.tgz",
- "integrity": "sha512-CN62ESxaquP61n1ZjQP/jZte8CE09M6kNn3baos2SeUfdVBkWN5n6vGp2iKyb/bm/x4JQzEvJgRHLGd5F5b81w==",
+ "version": "0.25.8",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.8.tgz",
+ "integrity": "sha512-YPJ7hDQ9DnNe5vxOm6jaie9QsTwcKedPvizTVlqWG9GBSq+BuyWEDazlGaDTC5NGU4QJd666V0yqCBL2oWKPfA==",
"cpu": [
"arm64"
],
@@ -728,13 +666,13 @@
"freebsd"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/freebsd-x64": {
- "version": "0.17.3",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.3.tgz",
- "integrity": "sha512-feq+K8TxIznZE+zhdVurF3WNJ/Sa35dQNYbaqM/wsCbWdzXr5lyq+AaTUSER2cUR+SXPnd/EY75EPRjf4s1SLg==",
+ "version": "0.25.8",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.8.tgz",
+ "integrity": "sha512-MmaEXxQRdXNFsRN/KcIimLnSJrk2r5H8v+WVafRWz5xdSVmWLoITZQXcgehI2ZE6gioE6HirAEToM/RvFBeuhw==",
"cpu": [
"x64"
],
@@ -744,13 +682,13 @@
"freebsd"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/linux-arm": {
- "version": "0.17.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.3.tgz",
- "integrity": "sha512-CLP3EgyNuPcg2cshbwkqYy5bbAgK+VhyfMU7oIYyn+x4Y67xb5C5ylxsNUjRmr8BX+MW3YhVNm6Lq6FKtRTWHQ==",
+ "version": "0.25.8",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.8.tgz",
+ "integrity": "sha512-FuzEP9BixzZohl1kLf76KEVOsxtIBFwCaLupVuk4eFVnOZfU+Wsn+x5Ryam7nILV2pkq2TqQM9EZPsOBuMC+kg==",
"cpu": [
"arm"
],
@@ -760,13 +698,13 @@
"linux"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/linux-arm64": {
- "version": "0.17.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.3.tgz",
- "integrity": "sha512-JHeZXD4auLYBnrKn6JYJ0o5nWJI9PhChA/Nt0G4MvLaMrvXuWnY93R3a7PiXeJQphpL1nYsaMcoV2QtuvRnF/g==",
+ "version": "0.25.8",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.8.tgz",
+ "integrity": "sha512-WIgg00ARWv/uYLU7lsuDK00d/hHSfES5BzdWAdAig1ioV5kaFNrtK8EqGcUBJhYqotlUByUKz5Qo6u8tt7iD/w==",
"cpu": [
"arm64"
],
@@ -776,13 +714,13 @@
"linux"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/linux-ia32": {
- "version": "0.17.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.3.tgz",
- "integrity": "sha512-FyXlD2ZjZqTFh0sOQxFDiWG1uQUEOLbEh9gKN/7pFxck5Vw0qjWSDqbn6C10GAa1rXJpwsntHcmLqydY9ST9ZA==",
+ "version": "0.25.8",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.8.tgz",
+ "integrity": "sha512-A1D9YzRX1i+1AJZuFFUMP1E9fMaYY+GnSQil9Tlw05utlE86EKTUA7RjwHDkEitmLYiFsRd9HwKBPEftNdBfjg==",
"cpu": [
"ia32"
],
@@ -792,13 +730,13 @@
"linux"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/linux-loong64": {
- "version": "0.17.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.3.tgz",
- "integrity": "sha512-OrDGMvDBI2g7s04J8dh8/I7eSO+/E7nMDT2Z5IruBfUO/RiigF1OF6xoH33Dn4W/OwAWSUf1s2nXamb28ZklTA==",
+ "version": "0.25.8",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.8.tgz",
+ "integrity": "sha512-O7k1J/dwHkY1RMVvglFHl1HzutGEFFZ3kNiDMSOyUrB7WcoHGf96Sh+64nTRT26l3GMbCW01Ekh/ThKM5iI7hQ==",
"cpu": [
"loong64"
],
@@ -808,13 +746,13 @@
"linux"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/linux-mips64el": {
- "version": "0.17.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.3.tgz",
- "integrity": "sha512-DcnUpXnVCJvmv0TzuLwKBC2nsQHle8EIiAJiJ+PipEVC16wHXaPEKP0EqN8WnBe0TPvMITOUlP2aiL5YMld+CQ==",
+ "version": "0.25.8",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.8.tgz",
+ "integrity": "sha512-uv+dqfRazte3BzfMp8PAQXmdGHQt2oC/y2ovwpTteqrMx2lwaksiFZ/bdkXJC19ttTvNXBuWH53zy/aTj1FgGw==",
"cpu": [
"mips64el"
],
@@ -824,13 +762,13 @@
"linux"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/linux-ppc64": {
- "version": "0.17.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.3.tgz",
- "integrity": "sha512-BDYf/l1WVhWE+FHAW3FzZPtVlk9QsrwsxGzABmN4g8bTjmhazsId3h127pliDRRu5674k1Y2RWejbpN46N9ZhQ==",
+ "version": "0.25.8",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.8.tgz",
+ "integrity": "sha512-GyG0KcMi1GBavP5JgAkkstMGyMholMDybAf8wF5A70CALlDM2p/f7YFE7H92eDeH/VBtFJA5MT4nRPDGg4JuzQ==",
"cpu": [
"ppc64"
],
@@ -840,13 +778,13 @@
"linux"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/linux-riscv64": {
- "version": "0.17.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.3.tgz",
- "integrity": "sha512-WViAxWYMRIi+prTJTyV1wnqd2mS2cPqJlN85oscVhXdb/ZTFJdrpaqm/uDsZPGKHtbg5TuRX/ymKdOSk41YZow==",
+ "version": "0.25.8",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.8.tgz",
+ "integrity": "sha512-rAqDYFv3yzMrq7GIcen3XP7TUEG/4LK86LUPMIz6RT8A6pRIDn0sDcvjudVZBiiTcZCY9y2SgYX2lgK3AF+1eg==",
"cpu": [
"riscv64"
],
@@ -856,13 +794,13 @@
"linux"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/linux-s390x": {
- "version": "0.17.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.3.tgz",
- "integrity": "sha512-Iw8lkNHUC4oGP1O/KhumcVy77u2s6+KUjieUqzEU3XuWJqZ+AY7uVMrrCbAiwWTkpQHkr00BuXH5RpC6Sb/7Ug==",
+ "version": "0.25.8",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.8.tgz",
+ "integrity": "sha512-Xutvh6VjlbcHpsIIbwY8GVRbwoviWT19tFhgdA7DlenLGC/mbc3lBoVb7jxj9Z+eyGqvcnSyIltYUrkKzWqSvg==",
"cpu": [
"s390x"
],
@@ -872,13 +810,13 @@
"linux"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/linux-x64": {
- "version": "0.17.3",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.3.tgz",
- "integrity": "sha512-0AGkWQMzeoeAtXQRNB3s4J1/T2XbigM2/Mn2yU1tQSmQRmHIZdkGbVq2A3aDdNslPyhb9/lH0S5GMTZ4xsjBqg==",
+ "version": "0.25.8",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.8.tgz",
+ "integrity": "sha512-ASFQhgY4ElXh3nDcOMTkQero4b1lgubskNlhIfJrsH5OKZXDpUAKBlNS0Kx81jwOBp+HCeZqmoJuihTv57/jvQ==",
"cpu": [
"x64"
],
@@ -888,13 +826,29 @@
"linux"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-arm64": {
+ "version": "0.25.8",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.8.tgz",
+ "integrity": "sha512-d1KfruIeohqAi6SA+gENMuObDbEjn22olAR7egqnkCD9DGBG0wsEARotkLgXDu6c4ncgWTZJtN5vcgxzWRMzcw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
}
},
"node_modules/@esbuild/netbsd-x64": {
- "version": "0.17.3",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.3.tgz",
- "integrity": "sha512-4+rR/WHOxIVh53UIQIICryjdoKdHsFZFD4zLSonJ9RRw7bhKzVyXbnRPsWSfwybYqw9sB7ots/SYyufL1mBpEg==",
+ "version": "0.25.8",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.8.tgz",
+ "integrity": "sha512-nVDCkrvx2ua+XQNyfrujIG38+YGyuy2Ru9kKVNyh5jAys6n+l44tTtToqHjino2My8VAY6Lw9H7RI73XFi66Cg==",
"cpu": [
"x64"
],
@@ -904,13 +858,29 @@
"netbsd"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-arm64": {
+ "version": "0.25.8",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.8.tgz",
+ "integrity": "sha512-j8HgrDuSJFAujkivSMSfPQSAa5Fxbvk4rgNAS5i3K+r8s1X0p1uOO2Hl2xNsGFppOeHOLAVgYwDVlmxhq5h+SQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
}
},
"node_modules/@esbuild/openbsd-x64": {
- "version": "0.17.3",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.3.tgz",
- "integrity": "sha512-cVpWnkx9IYg99EjGxa5Gc0XmqumtAwK3aoz7O4Dii2vko+qXbkHoujWA68cqXjhh6TsLaQelfDO4MVnyr+ODeA==",
+ "version": "0.25.8",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.8.tgz",
+ "integrity": "sha512-1h8MUAwa0VhNCDp6Af0HToI2TJFAn1uqT9Al6DJVzdIBAd21m/G0Yfc77KDM3uF3T/YaOgQq3qTJHPbTOInaIQ==",
"cpu": [
"x64"
],
@@ -920,13 +890,29 @@
"openbsd"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openharmony-arm64": {
+ "version": "0.25.8",
+ "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.8.tgz",
+ "integrity": "sha512-r2nVa5SIK9tSWd0kJd9HCffnDHKchTGikb//9c7HX+r+wHYCpQrSgxhlY6KWV1nFo1l4KFbsMlHk+L6fekLsUg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "openharmony"
+ ],
+ "engines": {
+ "node": ">=18"
}
},
"node_modules/@esbuild/sunos-x64": {
- "version": "0.17.3",
- "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.3.tgz",
- "integrity": "sha512-RxmhKLbTCDAY2xOfrww6ieIZkZF+KBqG7S2Ako2SljKXRFi+0863PspK74QQ7JpmWwncChY25JTJSbVBYGQk2Q==",
+ "version": "0.25.8",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.8.tgz",
+ "integrity": "sha512-zUlaP2S12YhQ2UzUfcCuMDHQFJyKABkAjvO5YSndMiIkMimPmxA+BYSBikWgsRpvyxuRnow4nS5NPnf9fpv41w==",
"cpu": [
"x64"
],
@@ -936,13 +922,13 @@
"sunos"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/win32-arm64": {
- "version": "0.17.3",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.3.tgz",
- "integrity": "sha512-0r36VeEJ4efwmofxVJRXDjVRP2jTmv877zc+i+Pc7MNsIr38NfsjkQj23AfF7l0WbB+RQ7VUb+LDiqC/KY/M/A==",
+ "version": "0.25.8",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.8.tgz",
+ "integrity": "sha512-YEGFFWESlPva8hGL+zvj2z/SaK+pH0SwOM0Nc/d+rVnW7GSTFlLBGzZkuSU9kFIGIo8q9X3ucpZhu8PDN5A2sQ==",
"cpu": [
"arm64"
],
@@ -952,13 +938,13 @@
"win32"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/win32-ia32": {
- "version": "0.17.3",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.3.tgz",
- "integrity": "sha512-wgO6rc7uGStH22nur4aLFcq7Wh86bE9cOFmfTr/yxN3BXvDEdCSXyKkO+U5JIt53eTOgC47v9k/C1bITWL/Teg==",
+ "version": "0.25.8",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.8.tgz",
+ "integrity": "sha512-hiGgGC6KZ5LZz58OL/+qVVoZiuZlUYlYHNAmczOm7bs2oE1XriPFi5ZHHrS8ACpV5EjySrnoCKmcbQMN+ojnHg==",
"cpu": [
"ia32"
],
@@ -968,13 +954,13 @@
"win32"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/win32-x64": {
- "version": "0.17.3",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.3.tgz",
- "integrity": "sha512-FdVl64OIuiKjgXBjwZaJLKp0eaEckifbhn10dXWhysMJkWblg3OEEGKSIyhiD5RSgAya8WzP3DNkngtIg3Nt7g==",
+ "version": "0.25.8",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.8.tgz",
+ "integrity": "sha512-cn3Yr7+OaaZq1c+2pe+8yxC8E144SReCQjN6/2ynubzYjvyqZjTXfQJpAcQpsdJq3My7XADANiYGHoFC69pLQw==",
"cpu": [
"x64"
],
@@ -984,21 +970,23 @@
"win32"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@eslint-community/eslint-utils": {
- "version": "4.4.0",
- "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz",
- "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==",
+ "version": "4.7.0",
+ "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz",
+ "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==",
"dev": true,
- "peer": true,
"dependencies": {
- "eslint-visitor-keys": "^3.3.0"
+ "eslint-visitor-keys": "^3.4.3"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
},
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ },
"peerDependencies": {
"eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"
}
@@ -1008,7 +996,6 @@
"resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz",
"integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==",
"dev": true,
- "peer": true,
"engines": {
"node": "^12.0.0 || ^14.0.0 || >=16.0.0"
}
@@ -1018,7 +1005,6 @@
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz",
"integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==",
"dev": true,
- "peer": true,
"dependencies": {
"ajv": "^6.12.4",
"debug": "^4.3.2",
@@ -1042,7 +1028,6 @@
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz",
"integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==",
"dev": true,
- "peer": true,
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
}
@@ -1051,7 +1036,6 @@
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/@folder/xdg/-/xdg-4.0.1.tgz",
"integrity": "sha512-mIBEyXvNK6sX341FOR6ZyGBmq84sSSkG2ocwTDmi4kJfAF6z8W//6aeMAi6vD/FuTcd4q0Px0HMVyP3ggOT/bg==",
- "dev": true,
"dependencies": {
"ini": "^4.1.1",
"picomatch": "^2.3.1",
@@ -1065,7 +1049,6 @@
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz",
"integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==",
"dev": true,
- "peer": true,
"dependencies": {
"@humanwhocodes/object-schema": "^2.0.2",
"debug": "^4.3.1",
@@ -1080,7 +1063,6 @@
"resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
"integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
"dev": true,
- "peer": true,
"engines": {
"node": ">=12.22"
},
@@ -1093,8 +1075,7 @@
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz",
"integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==",
- "dev": true,
- "peer": true
+ "dev": true
},
"node_modules/@istanbuljs/load-nyc-config": {
"version": "1.1.0",
@@ -1589,107 +1570,379 @@
"@sinonjs/commons": "^3.0.0"
}
},
- "node_modules/@types/babel__core": {
- "version": "7.20.5",
- "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",
- "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==",
+ "node_modules/@stylistic/eslint-plugin": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-3.1.0.tgz",
+ "integrity": "sha512-pA6VOrOqk0+S8toJYhQGv2MWpQQR0QpeUo9AhNkC49Y26nxBQ/nH1rta9bUU1rPw2fJ1zZEMV5oCX5AazT7J2g==",
"dev": true,
"dependencies": {
- "@babel/parser": "^7.20.7",
- "@babel/types": "^7.20.7",
- "@types/babel__generator": "*",
- "@types/babel__template": "*",
- "@types/babel__traverse": "*"
+ "@typescript-eslint/utils": "^8.13.0",
+ "eslint-visitor-keys": "^4.2.0",
+ "espree": "^10.3.0",
+ "estraverse": "^5.3.0",
+ "picomatch": "^4.0.2"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "peerDependencies": {
+ "eslint": ">=8.40.0"
}
},
- "node_modules/@types/babel__generator": {
- "version": "7.6.8",
- "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz",
- "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==",
+ "node_modules/@stylistic/eslint-plugin/node_modules/@typescript-eslint/project-service": {
+ "version": "8.39.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.39.1.tgz",
+ "integrity": "sha512-8fZxek3ONTwBu9ptw5nCKqZOSkXshZB7uAxuFF0J/wTMkKydjXCzqqga7MlFMpHi9DoG4BadhmTkITBcg8Aybw==",
"dev": true,
"dependencies": {
- "@babel/types": "^7.0.0"
+ "@typescript-eslint/tsconfig-utils": "^8.39.1",
+ "@typescript-eslint/types": "^8.39.1",
+ "debug": "^4.3.4"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4 <6.0.0"
}
},
- "node_modules/@types/babel__template": {
- "version": "7.4.4",
- "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz",
- "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==",
+ "node_modules/@stylistic/eslint-plugin/node_modules/@typescript-eslint/scope-manager": {
+ "version": "8.39.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.39.1.tgz",
+ "integrity": "sha512-RkBKGBrjgskFGWuyUGz/EtD8AF/GW49S21J8dvMzpJitOF1slLEbbHnNEtAHtnDAnx8qDEdRrULRnWVx27wGBw==",
"dev": true,
"dependencies": {
- "@babel/parser": "^7.1.0",
- "@babel/types": "^7.0.0"
+ "@typescript-eslint/types": "8.39.1",
+ "@typescript-eslint/visitor-keys": "8.39.1"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
}
},
- "node_modules/@types/babel__traverse": {
- "version": "7.20.5",
- "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.5.tgz",
- "integrity": "sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==",
+ "node_modules/@stylistic/eslint-plugin/node_modules/@typescript-eslint/tsconfig-utils": {
+ "version": "8.39.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.39.1.tgz",
+ "integrity": "sha512-ePUPGVtTMR8XMU2Hee8kD0Pu4NDE1CN9Q1sxGSGd/mbOtGZDM7pnhXNJnzW63zk/q+Z54zVzj44HtwXln5CvHA==",
"dev": true,
- "dependencies": {
- "@babel/types": "^7.20.7"
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4 <6.0.0"
}
},
- "node_modules/@types/codemirror": {
- "version": "5.60.8",
- "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-5.60.8.tgz",
- "integrity": "sha512-VjFgDF/eB+Aklcy15TtOTLQeMjTo07k7KAjql8OK5Dirr7a6sJY4T1uVBDuTVG9VEmn1uUsohOpYnVfgC6/jyw==",
+ "node_modules/@stylistic/eslint-plugin/node_modules/@typescript-eslint/types": {
+ "version": "8.39.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.39.1.tgz",
+ "integrity": "sha512-7sPDKQQp+S11laqTrhHqeAbsCfMkwJMrV7oTDvtDds4mEofJYir414bYKUEb8YPUm9QL3U+8f6L6YExSoAGdQw==",
"dev": true,
- "dependencies": {
- "@types/tern": "*"
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
}
},
- "node_modules/@types/estree": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
- "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==",
- "dev": true
- },
- "node_modules/@types/graceful-fs": {
- "version": "4.1.9",
- "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz",
- "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==",
+ "node_modules/@stylistic/eslint-plugin/node_modules/@typescript-eslint/typescript-estree": {
+ "version": "8.39.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.39.1.tgz",
+ "integrity": "sha512-EKkpcPuIux48dddVDXyQBlKdeTPMmALqBUbEk38McWv0qVEZwOpVJBi7ugK5qVNgeuYjGNQxrrnoM/5+TI/BPw==",
"dev": true,
"dependencies": {
- "@types/node": "*"
+ "@typescript-eslint/project-service": "8.39.1",
+ "@typescript-eslint/tsconfig-utils": "8.39.1",
+ "@typescript-eslint/types": "8.39.1",
+ "@typescript-eslint/visitor-keys": "8.39.1",
+ "debug": "^4.3.4",
+ "fast-glob": "^3.3.2",
+ "is-glob": "^4.0.3",
+ "minimatch": "^9.0.4",
+ "semver": "^7.6.0",
+ "ts-api-utils": "^2.1.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4 <6.0.0"
}
},
- "node_modules/@types/istanbul-lib-coverage": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz",
- "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==",
- "dev": true
- },
- "node_modules/@types/istanbul-lib-report": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz",
- "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==",
+ "node_modules/@stylistic/eslint-plugin/node_modules/@typescript-eslint/utils": {
+ "version": "8.39.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.39.1.tgz",
+ "integrity": "sha512-VF5tZ2XnUSTuiqZFXCZfZs1cgkdd3O/sSYmdo2EpSyDlC86UM/8YytTmKnehOW3TGAlivqTDT6bS87B/GQ/jyg==",
"dev": true,
"dependencies": {
- "@types/istanbul-lib-coverage": "*"
+ "@eslint-community/eslint-utils": "^4.7.0",
+ "@typescript-eslint/scope-manager": "8.39.1",
+ "@typescript-eslint/types": "8.39.1",
+ "@typescript-eslint/typescript-estree": "8.39.1"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^8.57.0 || ^9.0.0",
+ "typescript": ">=4.8.4 <6.0.0"
}
},
- "node_modules/@types/istanbul-reports": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz",
- "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==",
+ "node_modules/@stylistic/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": {
+ "version": "8.39.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.39.1.tgz",
+ "integrity": "sha512-W8FQi6kEh2e8zVhQ0eeRnxdvIoOkAp/CPAahcNio6nO9dsIwb9b34z90KOlheoyuVf6LSOEdjlkxSkapNEc+4A==",
"dev": true,
"dependencies": {
- "@types/istanbul-lib-report": "*"
+ "@typescript-eslint/types": "8.39.1",
+ "eslint-visitor-keys": "^4.2.1"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
}
},
- "node_modules/@types/json-schema": {
- "version": "7.0.15",
- "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
- "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
- "dev": true
+ "node_modules/@stylistic/eslint-plugin/node_modules/brace-expansion": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
+ "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0"
+ }
},
- "node_modules/@types/node": {
- "version": "16.18.97",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.97.tgz",
- "integrity": "sha512-4muilE1Lbfn57unR+/nT9AFjWk0MtWi5muwCEJqnOvfRQDbSfLCUdN7vCIg8TYuaANfhLOV85ve+FNpiUsbSRg==",
+ "node_modules/@stylistic/eslint-plugin/node_modules/eslint-visitor-keys": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz",
+ "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",
+ "dev": true,
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/@stylistic/eslint-plugin/node_modules/espree": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz",
+ "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==",
+ "dev": true,
+ "dependencies": {
+ "acorn": "^8.15.0",
+ "acorn-jsx": "^5.3.2",
+ "eslint-visitor-keys": "^4.2.1"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/@stylistic/eslint-plugin/node_modules/minimatch": {
+ "version": "9.0.5",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
+ "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/@stylistic/eslint-plugin/node_modules/picomatch": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
+ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/@stylistic/eslint-plugin/node_modules/ts-api-utils": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz",
+ "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=18.12"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4"
+ }
+ },
+ "node_modules/@stylistic/eslint-plugin/node_modules/typescript": {
+ "version": "5.9.2",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz",
+ "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==",
+ "dev": true,
+ "peer": true,
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
+ "node_modules/@tootallnate/once": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz",
+ "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==",
+ "dev": true,
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/@types/babel__core": {
+ "version": "7.20.5",
+ "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",
+ "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/parser": "^7.20.7",
+ "@babel/types": "^7.20.7",
+ "@types/babel__generator": "*",
+ "@types/babel__template": "*",
+ "@types/babel__traverse": "*"
+ }
+ },
+ "node_modules/@types/babel__generator": {
+ "version": "7.6.8",
+ "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz",
+ "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.0.0"
+ }
+ },
+ "node_modules/@types/babel__template": {
+ "version": "7.4.4",
+ "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz",
+ "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==",
+ "dev": true,
+ "dependencies": {
+ "@babel/parser": "^7.1.0",
+ "@babel/types": "^7.0.0"
+ }
+ },
+ "node_modules/@types/babel__traverse": {
+ "version": "7.20.5",
+ "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.5.tgz",
+ "integrity": "sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.20.7"
+ }
+ },
+ "node_modules/@types/codemirror": {
+ "version": "5.60.8",
+ "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-5.60.8.tgz",
+ "integrity": "sha512-VjFgDF/eB+Aklcy15TtOTLQeMjTo07k7KAjql8OK5Dirr7a6sJY4T1uVBDuTVG9VEmn1uUsohOpYnVfgC6/jyw==",
+ "dev": true,
+ "dependencies": {
+ "@types/tern": "*"
+ }
+ },
+ "node_modules/@types/estree": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
+ "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==",
+ "dev": true
+ },
+ "node_modules/@types/graceful-fs": {
+ "version": "4.1.9",
+ "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz",
+ "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==",
+ "dev": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/istanbul-lib-coverage": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz",
+ "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==",
"dev": true
},
+ "node_modules/@types/istanbul-lib-report": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz",
+ "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==",
+ "dev": true,
+ "dependencies": {
+ "@types/istanbul-lib-coverage": "*"
+ }
+ },
+ "node_modules/@types/istanbul-reports": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz",
+ "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==",
+ "dev": true,
+ "dependencies": {
+ "@types/istanbul-lib-report": "*"
+ }
+ },
+ "node_modules/@types/jest": {
+ "version": "29.5.14",
+ "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz",
+ "integrity": "sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==",
+ "dev": true,
+ "dependencies": {
+ "expect": "^29.0.0",
+ "pretty-format": "^29.0.0"
+ }
+ },
+ "node_modules/@types/jsdom": {
+ "version": "20.0.1",
+ "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-20.0.1.tgz",
+ "integrity": "sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==",
+ "dev": true,
+ "dependencies": {
+ "@types/node": "*",
+ "@types/tough-cookie": "*",
+ "parse5": "^7.0.0"
+ }
+ },
+ "node_modules/@types/node": {
+ "version": "20.19.10",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.10.tgz",
+ "integrity": "sha512-iAFpG6DokED3roLSP0K+ybeDdIX6Bc0Vd3mLW5uDqThPWtNos3E+EqOM11mPQHKzfWHqEBuLjIlsBQQ8CsISmQ==",
+ "dev": true,
+ "dependencies": {
+ "undici-types": "~6.21.0"
+ }
+ },
"node_modules/@types/stack-utils": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz",
@@ -1705,6 +1958,12 @@
"@types/estree": "*"
}
},
+ "node_modules/@types/tough-cookie": {
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz",
+ "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==",
+ "dev": true
+ },
"node_modules/@types/yargs": {
"version": "17.0.32",
"resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz",
@@ -1721,31 +1980,31 @@
"dev": true
},
"node_modules/@typescript-eslint/eslint-plugin": {
- "version": "5.29.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.29.0.tgz",
- "integrity": "sha512-kgTsISt9pM53yRFQmLZ4npj99yGl3x3Pl7z4eA66OuTzAGC4bQB5H5fuLwPnqTKU3yyrrg4MIhjF17UYnL4c0w==",
+ "version": "7.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz",
+ "integrity": "sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==",
"dev": true,
"dependencies": {
- "@typescript-eslint/scope-manager": "5.29.0",
- "@typescript-eslint/type-utils": "5.29.0",
- "@typescript-eslint/utils": "5.29.0",
- "debug": "^4.3.4",
- "functional-red-black-tree": "^1.0.1",
- "ignore": "^5.2.0",
- "regexpp": "^3.2.0",
- "semver": "^7.3.7",
- "tsutils": "^3.21.0"
+ "@eslint-community/regexpp": "^4.10.0",
+ "@typescript-eslint/scope-manager": "7.18.0",
+ "@typescript-eslint/type-utils": "7.18.0",
+ "@typescript-eslint/utils": "7.18.0",
+ "@typescript-eslint/visitor-keys": "7.18.0",
+ "graphemer": "^1.4.0",
+ "ignore": "^5.3.1",
+ "natural-compare": "^1.4.0",
+ "ts-api-utils": "^1.3.0"
},
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ "node": "^18.18.0 || >=20.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
- "@typescript-eslint/parser": "^5.0.0",
- "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
+ "@typescript-eslint/parser": "^7.0.0",
+ "eslint": "^8.56.0"
},
"peerDependenciesMeta": {
"typescript": {
@@ -1754,25 +2013,26 @@
}
},
"node_modules/@typescript-eslint/parser": {
- "version": "5.29.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.29.0.tgz",
- "integrity": "sha512-ruKWTv+x0OOxbzIw9nW5oWlUopvP/IQDjB5ZqmTglLIoDTctLlAJpAQFpNPJP/ZI7hTT9sARBosEfaKbcFuECw==",
+ "version": "7.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz",
+ "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==",
"dev": true,
"dependencies": {
- "@typescript-eslint/scope-manager": "5.29.0",
- "@typescript-eslint/types": "5.29.0",
- "@typescript-eslint/typescript-estree": "5.29.0",
+ "@typescript-eslint/scope-manager": "7.18.0",
+ "@typescript-eslint/types": "7.18.0",
+ "@typescript-eslint/typescript-estree": "7.18.0",
+ "@typescript-eslint/visitor-keys": "7.18.0",
"debug": "^4.3.4"
},
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ "node": "^18.18.0 || >=20.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
- "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
+ "eslint": "^8.56.0"
},
"peerDependenciesMeta": {
"typescript": {
@@ -1781,16 +2041,16 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
- "version": "5.29.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.29.0.tgz",
- "integrity": "sha512-etbXUT0FygFi2ihcxDZjz21LtC+Eps9V2xVx09zFoN44RRHPrkMflidGMI+2dUs821zR1tDS6Oc9IXxIjOUZwA==",
+ "version": "7.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz",
+ "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==",
"dev": true,
"dependencies": {
- "@typescript-eslint/types": "5.29.0",
- "@typescript-eslint/visitor-keys": "5.29.0"
+ "@typescript-eslint/types": "7.18.0",
+ "@typescript-eslint/visitor-keys": "7.18.0"
},
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ "node": "^18.18.0 || >=20.0.0"
},
"funding": {
"type": "opencollective",
@@ -1798,24 +2058,25 @@
}
},
"node_modules/@typescript-eslint/type-utils": {
- "version": "5.29.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.29.0.tgz",
- "integrity": "sha512-JK6bAaaiJozbox3K220VRfCzLa9n0ib/J+FHIwnaV3Enw/TO267qe0pM1b1QrrEuy6xun374XEAsRlA86JJnyg==",
+ "version": "7.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz",
+ "integrity": "sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==",
"dev": true,
"dependencies": {
- "@typescript-eslint/utils": "5.29.0",
+ "@typescript-eslint/typescript-estree": "7.18.0",
+ "@typescript-eslint/utils": "7.18.0",
"debug": "^4.3.4",
- "tsutils": "^3.21.0"
+ "ts-api-utils": "^1.3.0"
},
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ "node": "^18.18.0 || >=20.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
- "eslint": "*"
+ "eslint": "^8.56.0"
},
"peerDependenciesMeta": {
"typescript": {
@@ -1824,12 +2085,12 @@
}
},
"node_modules/@typescript-eslint/types": {
- "version": "5.29.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.29.0.tgz",
- "integrity": "sha512-X99VbqvAXOMdVyfFmksMy3u8p8yoRGITgU1joBJPzeYa0rhdf5ok9S56/itRoUSh99fiDoMtarSIJXo7H/SnOg==",
+ "version": "7.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz",
+ "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==",
"dev": true,
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ "node": "^18.18.0 || >=20.0.0"
},
"funding": {
"type": "opencollective",
@@ -1837,21 +2098,22 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
- "version": "5.29.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.29.0.tgz",
- "integrity": "sha512-mQvSUJ/JjGBdvo+1LwC+GY2XmSYjK1nAaVw2emp/E61wEVYEyibRHCqm1I1vEKbXCpUKuW4G7u9ZCaZhJbLoNQ==",
+ "version": "7.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz",
+ "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==",
"dev": true,
"dependencies": {
- "@typescript-eslint/types": "5.29.0",
- "@typescript-eslint/visitor-keys": "5.29.0",
+ "@typescript-eslint/types": "7.18.0",
+ "@typescript-eslint/visitor-keys": "7.18.0",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
- "semver": "^7.3.7",
- "tsutils": "^3.21.0"
+ "minimatch": "^9.0.4",
+ "semver": "^7.6.0",
+ "ts-api-utils": "^1.3.0"
},
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ "node": "^18.18.0 || >=20.0.0"
},
"funding": {
"type": "opencollective",
@@ -1863,41 +2125,63 @@
}
}
},
+ "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
+ "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": {
+ "version": "9.0.5",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
+ "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
"node_modules/@typescript-eslint/utils": {
- "version": "5.29.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.29.0.tgz",
- "integrity": "sha512-3Eos6uP1nyLOBayc/VUdKZikV90HahXE5Dx9L5YlSd/7ylQPXhLk1BYb29SDgnBnTp+jmSZUU0QxUiyHgW4p7A==",
+ "version": "7.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz",
+ "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==",
"dev": true,
"dependencies": {
- "@types/json-schema": "^7.0.9",
- "@typescript-eslint/scope-manager": "5.29.0",
- "@typescript-eslint/types": "5.29.0",
- "@typescript-eslint/typescript-estree": "5.29.0",
- "eslint-scope": "^5.1.1",
- "eslint-utils": "^3.0.0"
+ "@eslint-community/eslint-utils": "^4.4.0",
+ "@typescript-eslint/scope-manager": "7.18.0",
+ "@typescript-eslint/types": "7.18.0",
+ "@typescript-eslint/typescript-estree": "7.18.0"
},
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ "node": "^18.18.0 || >=20.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
- "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
+ "eslint": "^8.56.0"
}
},
"node_modules/@typescript-eslint/visitor-keys": {
- "version": "5.29.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.29.0.tgz",
- "integrity": "sha512-Hpb/mCWsjILvikMQoZIE3voc9wtQcS0A9FUw3h8bhr9UxBdtI/tw1ZDZUOXHXLOVMedKCH5NxyzATwnU78bWCQ==",
+ "version": "7.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz",
+ "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==",
"dev": true,
"dependencies": {
- "@typescript-eslint/types": "5.29.0",
- "eslint-visitor-keys": "^3.3.0"
+ "@typescript-eslint/types": "7.18.0",
+ "eslint-visitor-keys": "^3.4.3"
},
"engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ "node": "^18.18.0 || >=20.0.0"
},
"funding": {
"type": "opencollective",
@@ -1908,15 +2192,20 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz",
"integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==",
- "dev": true,
- "peer": true
+ "dev": true
+ },
+ "node_modules/abab": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz",
+ "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==",
+ "deprecated": "Use your platform's native atob() and btoa() methods instead",
+ "dev": true
},
"node_modules/acorn": {
- "version": "8.11.3",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
- "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==",
+ "version": "8.15.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
+ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
"dev": true,
- "peer": true,
"bin": {
"acorn": "bin/acorn"
},
@@ -1924,21 +2213,41 @@
"node": ">=0.4.0"
}
},
+ "node_modules/acorn-globals": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-7.0.1.tgz",
+ "integrity": "sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==",
+ "dev": true,
+ "dependencies": {
+ "acorn": "^8.1.0",
+ "acorn-walk": "^8.0.2"
+ }
+ },
"node_modules/acorn-jsx": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
"integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
"dev": true,
- "peer": true,
"peerDependencies": {
"acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
}
},
+ "node_modules/acorn-walk": {
+ "version": "8.3.4",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz",
+ "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==",
+ "dev": true,
+ "dependencies": {
+ "acorn": "^8.11.0"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
"node_modules/add-filename-increment": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/add-filename-increment/-/add-filename-increment-1.0.0.tgz",
"integrity": "sha512-pFV8VZX8jxuVMIycKvGZkWF/ihnUubu9lbQVnOnZWp7noVxbKQTNj7zG2y9fXdPcuZ6lAN3Drr517HaivGCjdQ==",
- "dev": true,
"dependencies": {
"strip-filename-increment": "^2.0.1"
},
@@ -1946,12 +2255,23 @@
"node": ">=8"
}
},
+ "node_modules/agent-base": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
+ "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
+ "dev": true,
+ "dependencies": {
+ "debug": "4"
+ },
+ "engines": {
+ "node": ">= 6.0.0"
+ }
+ },
"node_modules/ajv": {
"version": "6.12.6",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
"integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
"dev": true,
- "peer": true,
"dependencies": {
"fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
@@ -2031,8 +2351,7 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
- "dev": true,
- "peer": true
+ "dev": true
},
"node_modules/array-union": {
"version": "2.1.0",
@@ -2043,6 +2362,12 @@
"node": ">=8"
}
},
+ "node_modules/asynckit": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
+ "dev": true
+ },
"node_modules/babel-jest": {
"version": "29.7.0",
"resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz",
@@ -2166,9 +2491,9 @@
"dev": true
},
"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==",
+ "version": "1.1.12",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
+ "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
"dev": true,
"dependencies": {
"balanced-match": "^1.0.0",
@@ -2219,6 +2544,18 @@
"node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
}
},
+ "node_modules/bs-logger": {
+ "version": "0.2.6",
+ "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz",
+ "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==",
+ "dev": true,
+ "dependencies": {
+ "fast-json-stable-stringify": "2.x"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
"node_modules/bser": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz",
@@ -2246,6 +2583,19 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/call-bind-apply-helpers": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
+ "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
+ "dev": true,
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/callsites": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
@@ -2378,6 +2728,18 @@
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
+ "node_modules/combined-stream": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+ "dev": true,
+ "dependencies": {
+ "delayed-stream": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
"node_modules/concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
@@ -2425,6 +2787,44 @@
"node": ">= 8"
}
},
+ "node_modules/cssom": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz",
+ "integrity": "sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==",
+ "dev": true
+ },
+ "node_modules/cssstyle": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz",
+ "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==",
+ "dev": true,
+ "dependencies": {
+ "cssom": "~0.3.6"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/cssstyle/node_modules/cssom": {
+ "version": "0.3.8",
+ "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz",
+ "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==",
+ "dev": true
+ },
+ "node_modules/data-urls": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz",
+ "integrity": "sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==",
+ "dev": true,
+ "dependencies": {
+ "abab": "^2.0.6",
+ "whatwg-mimetype": "^3.0.0",
+ "whatwg-url": "^11.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
"node_modules/debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
@@ -2442,6 +2842,12 @@
}
}
},
+ "node_modules/decimal.js": {
+ "version": "10.6.0",
+ "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz",
+ "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==",
+ "dev": true
+ },
"node_modules/dedent": {
"version": "1.5.3",
"resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz",
@@ -2460,8 +2866,7 @@
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
"integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
- "dev": true,
- "peer": true
+ "dev": true
},
"node_modules/deepmerge": {
"version": "4.3.1",
@@ -2472,6 +2877,15 @@
"node": ">=0.10.0"
}
},
+ "node_modules/delayed-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+ "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
"node_modules/detect-newline": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz",
@@ -2507,7 +2921,6 @@
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
"integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
"dev": true,
- "peer": true,
"dependencies": {
"esutils": "^2.0.2"
},
@@ -2515,6 +2928,33 @@
"node": ">=6.0.0"
}
},
+ "node_modules/domexception": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz",
+ "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==",
+ "deprecated": "Use your platform's native DOMException instead",
+ "dev": true,
+ "dependencies": {
+ "webidl-conversions": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/dunder-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
+ "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
+ "dev": true,
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "gopd": "^1.2.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/electron-to-chromium": {
"version": "1.4.757",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.757.tgz",
@@ -2539,6 +2979,18 @@
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true
},
+ "node_modules/entities": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz",
+ "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.12"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/entities?sponsor=1"
+ }
+ },
"node_modules/error-ex": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
@@ -2548,41 +3000,90 @@
"is-arrayish": "^0.2.1"
}
},
+ "node_modules/es-define-property": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
+ "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-errors": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-object-atoms": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
+ "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
+ "dev": true,
+ "dependencies": {
+ "es-errors": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-set-tostringtag": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
+ "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
+ "dev": true,
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.6",
+ "has-tostringtag": "^1.0.2",
+ "hasown": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/esbuild": {
- "version": "0.17.3",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.3.tgz",
- "integrity": "sha512-9n3AsBRe6sIyOc6kmoXg2ypCLgf3eZSraWFRpnkto+svt8cZNuKTkb1bhQcitBcvIqjNiK7K0J3KPmwGSfkA8g==",
+ "version": "0.25.8",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.8.tgz",
+ "integrity": "sha512-vVC0USHGtMi8+R4Kz8rt6JhEWLxsv9Rnu/lGYbPR8u47B+DCBksq9JarW0zOO7bs37hyOK1l2/oqtbciutL5+Q==",
"dev": true,
"hasInstallScript": true,
"bin": {
"esbuild": "bin/esbuild"
},
"engines": {
- "node": ">=12"
+ "node": ">=18"
},
"optionalDependencies": {
- "@esbuild/android-arm": "0.17.3",
- "@esbuild/android-arm64": "0.17.3",
- "@esbuild/android-x64": "0.17.3",
- "@esbuild/darwin-arm64": "0.17.3",
- "@esbuild/darwin-x64": "0.17.3",
- "@esbuild/freebsd-arm64": "0.17.3",
- "@esbuild/freebsd-x64": "0.17.3",
- "@esbuild/linux-arm": "0.17.3",
- "@esbuild/linux-arm64": "0.17.3",
- "@esbuild/linux-ia32": "0.17.3",
- "@esbuild/linux-loong64": "0.17.3",
- "@esbuild/linux-mips64el": "0.17.3",
- "@esbuild/linux-ppc64": "0.17.3",
- "@esbuild/linux-riscv64": "0.17.3",
- "@esbuild/linux-s390x": "0.17.3",
- "@esbuild/linux-x64": "0.17.3",
- "@esbuild/netbsd-x64": "0.17.3",
- "@esbuild/openbsd-x64": "0.17.3",
- "@esbuild/sunos-x64": "0.17.3",
- "@esbuild/win32-arm64": "0.17.3",
- "@esbuild/win32-ia32": "0.17.3",
- "@esbuild/win32-x64": "0.17.3"
+ "@esbuild/aix-ppc64": "0.25.8",
+ "@esbuild/android-arm": "0.25.8",
+ "@esbuild/android-arm64": "0.25.8",
+ "@esbuild/android-x64": "0.25.8",
+ "@esbuild/darwin-arm64": "0.25.8",
+ "@esbuild/darwin-x64": "0.25.8",
+ "@esbuild/freebsd-arm64": "0.25.8",
+ "@esbuild/freebsd-x64": "0.25.8",
+ "@esbuild/linux-arm": "0.25.8",
+ "@esbuild/linux-arm64": "0.25.8",
+ "@esbuild/linux-ia32": "0.25.8",
+ "@esbuild/linux-loong64": "0.25.8",
+ "@esbuild/linux-mips64el": "0.25.8",
+ "@esbuild/linux-ppc64": "0.25.8",
+ "@esbuild/linux-riscv64": "0.25.8",
+ "@esbuild/linux-s390x": "0.25.8",
+ "@esbuild/linux-x64": "0.25.8",
+ "@esbuild/netbsd-arm64": "0.25.8",
+ "@esbuild/netbsd-x64": "0.25.8",
+ "@esbuild/openbsd-arm64": "0.25.8",
+ "@esbuild/openbsd-x64": "0.25.8",
+ "@esbuild/openharmony-arm64": "0.25.8",
+ "@esbuild/sunos-x64": "0.25.8",
+ "@esbuild/win32-arm64": "0.25.8",
+ "@esbuild/win32-ia32": "0.25.8",
+ "@esbuild/win32-x64": "0.25.8"
}
},
"node_modules/escalade": {
@@ -2599,7 +3100,6 @@
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
"integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
"dev": true,
- "peer": true,
"engines": {
"node": ">=10"
},
@@ -2607,12 +3107,32 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/escodegen": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz",
+ "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==",
+ "dev": true,
+ "dependencies": {
+ "esprima": "^4.0.1",
+ "estraverse": "^5.2.0",
+ "esutils": "^2.0.2"
+ },
+ "bin": {
+ "escodegen": "bin/escodegen.js",
+ "esgenerate": "bin/esgenerate.js"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "optionalDependencies": {
+ "source-map": "~0.6.1"
+ }
+ },
"node_modules/eslint": {
"version": "8.57.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz",
"integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==",
"dev": true,
- "peer": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1",
@@ -2663,46 +3183,6 @@
"url": "https://opencollective.com/eslint"
}
},
- "node_modules/eslint-scope": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
- "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
- "dev": true,
- "dependencies": {
- "esrecurse": "^4.3.0",
- "estraverse": "^4.1.1"
- },
- "engines": {
- "node": ">=8.0.0"
- }
- },
- "node_modules/eslint-utils": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz",
- "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==",
- "dev": true,
- "dependencies": {
- "eslint-visitor-keys": "^2.0.0"
- },
- "engines": {
- "node": "^10.0.0 || ^12.0.0 || >= 14.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/mysticatea"
- },
- "peerDependencies": {
- "eslint": ">=5"
- }
- },
- "node_modules/eslint-utils/node_modules/eslint-visitor-keys": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz",
- "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==",
- "dev": true,
- "engines": {
- "node": ">=10"
- }
- },
"node_modules/eslint-visitor-keys": {
"version": "3.4.3",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
@@ -2720,7 +3200,6 @@
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz",
"integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==",
"dev": true,
- "peer": true,
"dependencies": {
"esrecurse": "^4.3.0",
"estraverse": "^5.2.0"
@@ -2732,22 +3211,11 @@
"url": "https://opencollective.com/eslint"
}
},
- "node_modules/eslint/node_modules/estraverse": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
- "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
- "dev": true,
- "peer": true,
- "engines": {
- "node": ">=4.0"
- }
- },
"node_modules/espree": {
"version": "9.6.1",
"resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz",
"integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==",
"dev": true,
- "peer": true,
"dependencies": {
"acorn": "^8.9.0",
"acorn-jsx": "^5.3.2",
@@ -2778,7 +3246,6 @@
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz",
"integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==",
"dev": true,
- "peer": true,
"dependencies": {
"estraverse": "^5.1.0"
},
@@ -2786,16 +3253,6 @@
"node": ">=0.10"
}
},
- "node_modules/esquery/node_modules/estraverse": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
- "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
- "dev": true,
- "peer": true,
- "engines": {
- "node": ">=4.0"
- }
- },
"node_modules/esrecurse": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
@@ -2808,7 +3265,7 @@
"node": ">=4.0"
}
},
- "node_modules/esrecurse/node_modules/estraverse": {
+ "node_modules/estraverse": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
"integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
@@ -2817,21 +3274,11 @@
"node": ">=4.0"
}
},
- "node_modules/estraverse": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
- "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
- "dev": true,
- "engines": {
- "node": ">=4.0"
- }
- },
"node_modules/esutils": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
"dev": true,
- "peer": true,
"engines": {
"node": ">=0.10.0"
}
@@ -2888,20 +3335,19 @@
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
- "dev": true,
- "peer": true
+ "dev": true
},
"node_modules/fast-glob": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
- "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==",
+ "version": "3.3.3",
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz",
+ "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==",
"dev": true,
"dependencies": {
"@nodelib/fs.stat": "^2.0.2",
"@nodelib/fs.walk": "^1.2.3",
"glob-parent": "^5.1.2",
"merge2": "^1.3.0",
- "micromatch": "^4.0.4"
+ "micromatch": "^4.0.8"
},
"engines": {
"node": ">=8.6.0"
@@ -2929,8 +3375,7 @@
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
"integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
- "dev": true,
- "peer": true
+ "dev": true
},
"node_modules/fastq": {
"version": "1.17.1",
@@ -2955,7 +3400,6 @@
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
"integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==",
"dev": true,
- "peer": true,
"dependencies": {
"flat-cache": "^3.0.4"
},
@@ -2980,7 +3424,6 @@
"resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
"integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
"dev": true,
- "peer": true,
"dependencies": {
"locate-path": "^6.0.0",
"path-exists": "^4.0.0"
@@ -2997,7 +3440,6 @@
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz",
"integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==",
"dev": true,
- "peer": true,
"dependencies": {
"flatted": "^3.2.9",
"keyv": "^4.5.3",
@@ -3011,8 +3453,23 @@
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz",
"integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==",
+ "dev": true
+ },
+ "node_modules/form-data": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz",
+ "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==",
"dev": true,
- "peer": true
+ "dependencies": {
+ "asynckit": "^0.4.0",
+ "combined-stream": "^1.0.8",
+ "es-set-tostringtag": "^2.1.0",
+ "hasown": "^2.0.2",
+ "mime-types": "^2.1.12"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
},
"node_modules/fs.realpath": {
"version": "1.0.0",
@@ -3043,12 +3500,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/functional-red-black-tree": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
- "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==",
- "dev": true
- },
"node_modules/gensync": {
"version": "1.0.0-beta.2",
"resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
@@ -3067,6 +3518,30 @@
"node": "6.* || 8.* || >= 10.*"
}
},
+ "node_modules/get-intrinsic": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
+ "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
+ "dev": true,
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "es-define-property": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.1.1",
+ "function-bind": "^1.1.2",
+ "get-proto": "^1.0.1",
+ "gopd": "^1.2.0",
+ "has-symbols": "^1.1.0",
+ "hasown": "^2.0.2",
+ "math-intrinsics": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/get-package-type": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz",
@@ -3076,6 +3551,19 @@
"node": ">=8.0.0"
}
},
+ "node_modules/get-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
+ "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
+ "dev": true,
+ "dependencies": {
+ "dunder-proto": "^1.0.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/get-stream": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
@@ -3113,7 +3601,6 @@
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
"integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
"dev": true,
- "peer": true,
"dependencies": {
"is-glob": "^4.0.3"
},
@@ -3126,7 +3613,6 @@
"resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz",
"integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==",
"dev": true,
- "peer": true,
"dependencies": {
"type-fest": "^0.20.2"
},
@@ -3157,6 +3643,18 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/gopd": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
+ "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/graceful-fs": {
"version": "4.2.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
@@ -3167,8 +3665,28 @@
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz",
"integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==",
+ "dev": true
+ },
+ "node_modules/handlebars": {
+ "version": "4.7.8",
+ "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz",
+ "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==",
"dev": true,
- "peer": true
+ "dependencies": {
+ "minimist": "^1.2.5",
+ "neo-async": "^2.6.2",
+ "source-map": "^0.6.1",
+ "wordwrap": "^1.0.0"
+ },
+ "bin": {
+ "handlebars": "bin/handlebars"
+ },
+ "engines": {
+ "node": ">=0.4.7"
+ },
+ "optionalDependencies": {
+ "uglify-js": "^3.1.4"
+ }
},
"node_modules/has-flag": {
"version": "4.0.0",
@@ -3179,6 +3697,33 @@
"node": ">=8"
}
},
+ "node_modules/has-symbols": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
+ "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-tostringtag": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
+ "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
+ "dev": true,
+ "dependencies": {
+ "has-symbols": "^1.0.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/hasown": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
@@ -3191,12 +3736,51 @@
"node": ">= 0.4"
}
},
+ "node_modules/html-encoding-sniffer": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz",
+ "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==",
+ "dev": true,
+ "dependencies": {
+ "whatwg-encoding": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
"node_modules/html-escaper": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz",
"integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==",
"dev": true
},
+ "node_modules/http-proxy-agent": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz",
+ "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==",
+ "dev": true,
+ "dependencies": {
+ "@tootallnate/once": "2",
+ "agent-base": "6",
+ "debug": "4"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/https-proxy-agent": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
+ "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
+ "dev": true,
+ "dependencies": {
+ "agent-base": "6",
+ "debug": "4"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
"node_modules/human-signals": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
@@ -3206,6 +3790,18 @@
"node": ">=10.17.0"
}
},
+ "node_modules/iconv-lite": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
+ "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
+ "dev": true,
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
"node_modules/ignore": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz",
@@ -3220,7 +3816,6 @@
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
"integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
"dev": true,
- "peer": true,
"dependencies": {
"parent-module": "^1.0.0",
"resolve-from": "^4.0.0"
@@ -3280,7 +3875,6 @@
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/ini/-/ini-4.1.2.tgz",
"integrity": "sha512-AMB1mvwR1pyBFY/nSevUX6y8nJWS63/SzUKD3JyQn97s4xgIdgQPT75IRouIiBAN4yLQBUShNYVW0+UG25daCw==",
- "dev": true,
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
}
@@ -3356,11 +3950,16 @@
"resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
"integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
"dev": true,
- "peer": true,
"engines": {
"node": ">=8"
}
},
+ "node_modules/is-potential-custom-element-name": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz",
+ "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==",
+ "dev": true
+ },
"node_modules/is-stream": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
@@ -3637,6 +4236,33 @@
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
}
},
+ "node_modules/jest-environment-jsdom": {
+ "version": "29.7.0",
+ "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.7.0.tgz",
+ "integrity": "sha512-k9iQbsf9OyOfdzWH8HDmrRT0gSIcX+FLNW7IQq94tFX0gynPwqDTW0Ho6iMVNjGz/nb+l/vW3dWM2bbLLpkbXA==",
+ "dev": true,
+ "dependencies": {
+ "@jest/environment": "^29.7.0",
+ "@jest/fake-timers": "^29.7.0",
+ "@jest/types": "^29.6.3",
+ "@types/jsdom": "^20.0.0",
+ "@types/node": "*",
+ "jest-mock": "^29.7.0",
+ "jest-util": "^29.7.0",
+ "jsdom": "^20.0.0"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+ },
+ "peerDependencies": {
+ "canvas": "^2.5.0"
+ },
+ "peerDependenciesMeta": {
+ "canvas": {
+ "optional": true
+ }
+ }
+ },
"node_modules/jest-environment-node": {
"version": "29.7.0",
"resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz",
@@ -4011,7 +4637,6 @@
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
"dev": true,
- "peer": true,
"dependencies": {
"argparse": "^2.0.1"
},
@@ -4019,6 +4644,51 @@
"js-yaml": "bin/js-yaml.js"
}
},
+ "node_modules/jsdom": {
+ "version": "20.0.3",
+ "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.3.tgz",
+ "integrity": "sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==",
+ "dev": true,
+ "dependencies": {
+ "abab": "^2.0.6",
+ "acorn": "^8.8.1",
+ "acorn-globals": "^7.0.0",
+ "cssom": "^0.5.0",
+ "cssstyle": "^2.3.0",
+ "data-urls": "^3.0.2",
+ "decimal.js": "^10.4.2",
+ "domexception": "^4.0.0",
+ "escodegen": "^2.0.0",
+ "form-data": "^4.0.0",
+ "html-encoding-sniffer": "^3.0.0",
+ "http-proxy-agent": "^5.0.0",
+ "https-proxy-agent": "^5.0.1",
+ "is-potential-custom-element-name": "^1.0.1",
+ "nwsapi": "^2.2.2",
+ "parse5": "^7.1.1",
+ "saxes": "^6.0.0",
+ "symbol-tree": "^3.2.4",
+ "tough-cookie": "^4.1.2",
+ "w3c-xmlserializer": "^4.0.0",
+ "webidl-conversions": "^7.0.0",
+ "whatwg-encoding": "^2.0.0",
+ "whatwg-mimetype": "^3.0.0",
+ "whatwg-url": "^11.0.0",
+ "ws": "^8.11.0",
+ "xml-name-validator": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "canvas": "^2.5.0"
+ },
+ "peerDependenciesMeta": {
+ "canvas": {
+ "optional": true
+ }
+ }
+ },
"node_modules/jsesc": {
"version": "2.5.2",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz",
@@ -4035,8 +4705,7 @@
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
"integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
- "dev": true,
- "peer": true
+ "dev": true
},
"node_modules/json-parse-even-better-errors": {
"version": "2.3.1",
@@ -4048,15 +4717,13 @@
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
- "dev": true,
- "peer": true
+ "dev": true
},
"node_modules/json-stable-stringify-without-jsonify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
"integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
- "dev": true,
- "peer": true
+ "dev": true
},
"node_modules/json5": {
"version": "2.2.3",
@@ -4075,7 +4742,6 @@
"resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
"integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",
"dev": true,
- "peer": true,
"dependencies": {
"json-buffer": "3.0.1"
}
@@ -4103,7 +4769,6 @@
"resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
"integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
"dev": true,
- "peer": true,
"dependencies": {
"prelude-ls": "^1.2.1",
"type-check": "~0.4.0"
@@ -4123,7 +4788,6 @@
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
"integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
"dev": true,
- "peer": true,
"dependencies": {
"p-locate": "^5.0.0"
},
@@ -4134,12 +4798,17 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/lodash.memoize": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
+ "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==",
+ "dev": true
+ },
"node_modules/lodash.merge": {
"version": "4.6.2",
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
"integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
- "dev": true,
- "peer": true
+ "dev": true
},
"node_modules/lru-cache": {
"version": "5.1.1",
@@ -4165,6 +4834,12 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/make-error": {
+ "version": "1.3.6",
+ "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
+ "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
+ "dev": true
+ },
"node_modules/makeerror": {
"version": "1.0.12",
"resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz",
@@ -4174,6 +4849,15 @@
"tmpl": "1.0.5"
}
},
+ "node_modules/math-intrinsics": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
+ "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/merge-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
@@ -4202,6 +4886,27 @@
"node": ">=8.6"
}
},
+ "node_modules/mime-db": {
+ "version": "1.52.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "2.1.35",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "dev": true,
+ "dependencies": {
+ "mime-db": "1.52.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
"node_modules/mimic-fn": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
@@ -4223,6 +4928,15 @@
"node": "*"
}
},
+ "node_modules/minimist": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
+ "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/moment": {
"version": "2.29.4",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz",
@@ -4244,6 +4958,12 @@
"integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
"dev": true
},
+ "node_modules/neo-async": {
+ "version": "2.6.2",
+ "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
+ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
+ "dev": true
+ },
"node_modules/node-int64": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz",
@@ -4282,6 +5002,12 @@
"node": ">=8"
}
},
+ "node_modules/nwsapi": {
+ "version": "2.2.21",
+ "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.21.tgz",
+ "integrity": "sha512-o6nIY3qwiSXl7/LuOU0Dmuctd34Yay0yeuZRLFmDPrrdHpXKFndPj3hM+YEPVHYC5fx2otBx4Ilc/gyYSAUaIA==",
+ "dev": true
+ },
"node_modules/obsidian": {
"version": "1.5.7-1",
"resolved": "https://registry.npmjs.org/obsidian/-/obsidian-1.5.7-1.tgz",
@@ -4325,7 +5051,6 @@
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
"integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==",
"dev": true,
- "peer": true,
"dependencies": {
"deep-is": "^0.1.3",
"fast-levenshtein": "^2.0.6",
@@ -4358,7 +5083,6 @@
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
"integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
"dev": true,
- "peer": true,
"dependencies": {
"p-limit": "^3.0.2"
},
@@ -4383,7 +5107,6 @@
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
"integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
"dev": true,
- "peer": true,
"dependencies": {
"callsites": "^3.0.0"
},
@@ -4409,6 +5132,18 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/parse5": {
+ "version": "7.3.0",
+ "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz",
+ "integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==",
+ "dev": true,
+ "dependencies": {
+ "entities": "^6.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/inikulin/parse5?sponsor=1"
+ }
+ },
"node_modules/path-exists": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
@@ -4452,16 +5187,15 @@
}
},
"node_modules/picocolors": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
- "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
"dev": true
},
"node_modules/picomatch": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
- "dev": true,
"engines": {
"node": ">=8.6"
},
@@ -4547,7 +5281,6 @@
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
"integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
"dev": true,
- "peer": true,
"engines": {
"node": ">= 0.8.0"
}
@@ -4591,12 +5324,23 @@
"node": ">= 6"
}
},
+ "node_modules/psl": {
+ "version": "1.15.0",
+ "resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz",
+ "integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==",
+ "dev": true,
+ "dependencies": {
+ "punycode": "^2.3.1"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/lupomontero"
+ }
+ },
"node_modules/punycode": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
"integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
"dev": true,
- "peer": true,
"engines": {
"node": ">=6"
}
@@ -4617,6 +5361,12 @@
}
]
},
+ "node_modules/querystringify": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz",
+ "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==",
+ "dev": true
+ },
"node_modules/queue-microtask": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
@@ -4643,18 +5393,6 @@
"integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==",
"dev": true
},
- "node_modules/regexpp": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz",
- "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==",
- "dev": true,
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/mysticatea"
- }
- },
"node_modules/require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
@@ -4664,6 +5402,12 @@
"node": ">=0.10.0"
}
},
+ "node_modules/requires-port": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
+ "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==",
+ "dev": true
+ },
"node_modules/resolve": {
"version": "1.22.8",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
@@ -4707,7 +5451,6 @@
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
"integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
"dev": true,
- "peer": true,
"engines": {
"node": ">=4"
}
@@ -4736,7 +5479,6 @@
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"dev": true,
- "peer": true,
"dependencies": {
"glob": "^7.1.3"
},
@@ -4770,10 +5512,28 @@
"queue-microtask": "^1.2.2"
}
},
+ "node_modules/safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+ "dev": true
+ },
+ "node_modules/saxes": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz",
+ "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==",
+ "dev": true,
+ "dependencies": {
+ "xmlchars": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=v12.22.7"
+ }
+ },
"node_modules/semver": {
- "version": "7.6.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.1.tgz",
- "integrity": "sha512-f/vbBsu+fOiYt+lmwZV0rVwJScl46HppnOA1ZvIuBWKOTlllpyJ3bfVax76/OrhCH38dyxoDIA8K7uB963IYgA==",
+ "version": "7.7.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
+ "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
"dev": true,
"bin": {
"semver": "bin/semver.js"
@@ -4922,7 +5682,6 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/strip-filename-increment/-/strip-filename-increment-2.0.1.tgz",
"integrity": "sha512-+v5xsiTTsdYqkPj7qz1zlngIsjZedhHDi3xp/9bMurV8kXe9DAr732gNVqtt4X8sI3hOqS3nlFfps5gyVcux6w==",
- "dev": true,
"engines": {
"node": ">=8"
}
@@ -4979,6 +5738,12 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/symbol-tree": {
+ "version": "3.2.4",
+ "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz",
+ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==",
+ "dev": true
+ },
"node_modules/test-exclude": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz",
@@ -4997,8 +5762,7 @@
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
"integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==",
- "dev": true,
- "peer": true
+ "dev": true
},
"node_modules/tmpl": {
"version": "1.0.5",
@@ -5006,15 +5770,6 @@
"integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==",
"dev": true
},
- "node_modules/to-fast-properties": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
- "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==",
- "dev": true,
- "engines": {
- "node": ">=4"
- }
- },
"node_modules/to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
@@ -5030,34 +5785,115 @@
"node_modules/toml": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/toml/-/toml-3.0.0.tgz",
- "integrity": "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==",
- "dev": true
+ "integrity": "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w=="
},
- "node_modules/tslib": {
- "version": "2.4.0",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
- "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==",
- "dev": true
+ "node_modules/tough-cookie": {
+ "version": "4.1.4",
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz",
+ "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==",
+ "dev": true,
+ "dependencies": {
+ "psl": "^1.1.33",
+ "punycode": "^2.1.1",
+ "universalify": "^0.2.0",
+ "url-parse": "^1.5.3"
+ },
+ "engines": {
+ "node": ">=6"
+ }
},
- "node_modules/tsutils": {
- "version": "3.21.0",
- "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz",
- "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==",
+ "node_modules/tr46": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz",
+ "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",
"dev": true,
"dependencies": {
- "tslib": "^1.8.1"
+ "punycode": "^2.1.1"
},
"engines": {
- "node": ">= 6"
+ "node": ">=12"
+ }
+ },
+ "node_modules/ts-api-utils": {
+ "version": "1.4.3",
+ "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz",
+ "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==",
+ "dev": true,
+ "engines": {
+ "node": ">=16"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.2.0"
+ }
+ },
+ "node_modules/ts-jest": {
+ "version": "29.4.1",
+ "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.1.tgz",
+ "integrity": "sha512-SaeUtjfpg9Uqu8IbeDKtdaS0g8lS6FT6OzM3ezrDfErPJPHNDo/Ey+VFGP1bQIDfagYDLyRpd7O15XpG1Es2Uw==",
+ "dev": true,
+ "dependencies": {
+ "bs-logger": "^0.2.6",
+ "fast-json-stable-stringify": "^2.1.0",
+ "handlebars": "^4.7.8",
+ "json5": "^2.2.3",
+ "lodash.memoize": "^4.1.2",
+ "make-error": "^1.3.6",
+ "semver": "^7.7.2",
+ "type-fest": "^4.41.0",
+ "yargs-parser": "^21.1.1"
+ },
+ "bin": {
+ "ts-jest": "cli.js"
+ },
+ "engines": {
+ "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0"
},
"peerDependencies": {
- "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta"
+ "@babel/core": ">=7.0.0-beta.0 <8",
+ "@jest/transform": "^29.0.0 || ^30.0.0",
+ "@jest/types": "^29.0.0 || ^30.0.0",
+ "babel-jest": "^29.0.0 || ^30.0.0",
+ "jest": "^29.0.0 || ^30.0.0",
+ "jest-util": "^29.0.0 || ^30.0.0",
+ "typescript": ">=4.3 <6"
+ },
+ "peerDependenciesMeta": {
+ "@babel/core": {
+ "optional": true
+ },
+ "@jest/transform": {
+ "optional": true
+ },
+ "@jest/types": {
+ "optional": true
+ },
+ "babel-jest": {
+ "optional": true
+ },
+ "esbuild": {
+ "optional": true
+ },
+ "jest-util": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/ts-jest/node_modules/type-fest": {
+ "version": "4.41.0",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz",
+ "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==",
+ "dev": true,
+ "engines": {
+ "node": ">=16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/tsutils/node_modules/tslib": {
- "version": "1.14.1",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
- "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
+ "node_modules/tslib": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
+ "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==",
"dev": true
},
"node_modules/type-check": {
@@ -5065,7 +5901,6 @@
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
"integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
"dev": true,
- "peer": true,
"dependencies": {
"prelude-ls": "^1.2.1"
},
@@ -5087,7 +5922,6 @@
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
"integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
"dev": true,
- "peer": true,
"engines": {
"node": ">=10"
},
@@ -5108,6 +5942,34 @@
"node": ">=4.2.0"
}
},
+ "node_modules/uglify-js": {
+ "version": "3.19.3",
+ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz",
+ "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==",
+ "dev": true,
+ "optional": true,
+ "bin": {
+ "uglifyjs": "bin/uglifyjs"
+ },
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/undici-types": {
+ "version": "6.21.0",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
+ "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
+ "dev": true
+ },
+ "node_modules/universalify": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz",
+ "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 4.0.0"
+ }
+ },
"node_modules/update-browserslist-db": {
"version": "1.0.15",
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.15.tgz",
@@ -5143,11 +6005,20 @@
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
"integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
"dev": true,
- "peer": true,
"dependencies": {
"punycode": "^2.1.0"
}
},
+ "node_modules/url-parse": {
+ "version": "1.5.10",
+ "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz",
+ "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==",
+ "dev": true,
+ "dependencies": {
+ "querystringify": "^2.1.1",
+ "requires-port": "^1.0.0"
+ }
+ },
"node_modules/v8-to-istanbul": {
"version": "9.2.0",
"resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz",
@@ -5169,6 +6040,18 @@
"dev": true,
"peer": true
},
+ "node_modules/w3c-xmlserializer": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz",
+ "integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==",
+ "dev": true,
+ "dependencies": {
+ "xml-name-validator": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=14"
+ }
+ },
"node_modules/walker": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz",
@@ -5178,6 +6061,49 @@
"makeerror": "1.0.12"
}
},
+ "node_modules/webidl-conversions": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
+ "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/whatwg-encoding": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz",
+ "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==",
+ "dev": true,
+ "dependencies": {
+ "iconv-lite": "0.6.3"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/whatwg-mimetype": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz",
+ "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/whatwg-url": {
+ "version": "11.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz",
+ "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==",
+ "dev": true,
+ "dependencies": {
+ "tr46": "^3.0.0",
+ "webidl-conversions": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
"node_modules/which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
@@ -5198,11 +6124,16 @@
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",
"integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==",
"dev": true,
- "peer": true,
"engines": {
"node": ">=0.10.0"
}
},
+ "node_modules/wordwrap": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
+ "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==",
+ "dev": true
+ },
"node_modules/wrap-ansi": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
@@ -5230,7 +6161,6 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/write/-/write-2.0.0.tgz",
"integrity": "sha512-yam9TAqN8sAZokECAejo9HpT2j2s39OgK8i8yxadrFBVo+iSWLfnipRVFulfAw1d2dz5vSuGmlMHYRKG4fysOA==",
- "dev": true,
"dependencies": {
"add-filename-increment": "^1.0.0"
},
@@ -5251,6 +6181,42 @@
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
}
},
+ "node_modules/ws": {
+ "version": "8.18.3",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz",
+ "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==",
+ "dev": true,
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": ">=5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/xml-name-validator": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz",
+ "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/xmlchars": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz",
+ "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==",
+ "dev": true
+ },
"node_modules/y18n": {
"version": "5.0.8",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
@@ -5270,7 +6236,6 @@
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.2.tgz",
"integrity": "sha512-B3VqDZ+JAg1nZpaEmWtTXUlBneoGx6CPM9b0TENK6aoSu5t73dItudwdgmi6tHlIZZId4dZ9skcAQ2UbcyAeVA==",
- "dev": true,
"bin": {
"yaml": "bin.mjs"
},
diff --git a/package.json b/package.json
index 11d140c..cb9982e 100644
--- a/package.json
+++ b/package.json
@@ -6,27 +6,35 @@
"scripts": {
"dev": "node esbuild.config.mjs",
"build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production",
- "version": "node version-bump.mjs && git add manifest.json versions.json",
- "test": "jest --passWithNoTests",
- "test-coverage": "jest --coverage --passWithNoTests",
- "visualize-dependencies": "npx skott --displayMode=webapp"
+ "lint": "eslint . --config .eslintrc.release",
+ "lint-fix": "eslint . --fix --config .eslintrc.release",
+ "dev:lint": "eslint . --config .eslintrc.dev",
+ "dev:lint-fix": "eslint . --fix --config .eslintrc.dev",
+ "version": "node version-change.mjs",
+ "test": "jest --silent",
+ "dev:test": "jest --coverage"
},
- "keywords": [],
"author": "4Source",
"license": "MIT",
"devDependencies": {
- "@folder/xdg": "^4.0.1",
- "@types/node": "^16.11.6",
- "@typescript-eslint/eslint-plugin": "5.29.0",
- "@typescript-eslint/parser": "5.29.0",
+ "@stylistic/eslint-plugin": "^3.1.0",
+ "@types/jest": "^29.5.12",
+ "@types/node": "^20.10.7",
+ "@typescript-eslint/eslint-plugin": "^7.1.0",
+ "@typescript-eslint/parser": "^7.1.0",
"builtin-modules": "3.3.0",
- "esbuild": "0.17.3",
+ "esbuild": "^0.25.8",
+ "eslint": "^8.57.0",
"jest": "^29.7.0",
+ "jest-environment-jsdom": "^29.7.0",
"obsidian": "latest",
+ "semver": "^7.6.0",
+ "ts-jest": "^29.1.2",
"tslib": "2.4.0",
"typescript": "4.7.4"
},
"dependencies": {
+ "@folder/xdg": "^4.0.1",
"node-machine-id": "^1.1.12"
}
}
diff --git a/src/core/PluginExtended.ts b/src/core/PluginExtended.ts
index 38c781d..f8aba1b 100644
--- a/src/core/PluginExtended.ts
+++ b/src/core/PluginExtended.ts
@@ -1,74 +1,73 @@
-import { Plugin, setIcon } from "obsidian";
+import { Plugin, setIcon } from 'obsidian';
export default class PluginExtended extends Plugin {
+ /**
+ *
+ */
+ addStatusBarItem(): HTMLElement;
- /**
- *
- */
- addStatusBarItem(): HTMLElement;
- /**
- * @param icon The icon name to be used.
- * @param label The label to be displayed in status bar.
- */
- addStatusBarItem(icon?: string, label?: string, ariaLabel?: string, onClickCallback?: (ev: MouseEvent) => void): HTMLElement;
+ /**
+ * @param icon The icon name to be used.
+ * @param label The label to be displayed in status bar.
+ */
+ addStatusBarItem(icon?: string, label?: string, ariaLabel?: string, onClickCallback?: (ev: MouseEvent) => void): HTMLElement;
+ addStatusBarItem(icon?: string, label?: string, ariaLabel?: string, onClickCallback?: (ev: MouseEvent) => void): HTMLElement {
+ const item = super.addStatusBarItem();
+ if (icon) {
+ const iconWrapper = item.createEl('span', { cls: ['status-bar-item-icon', 'status-bar-item-segment'] });
+ setIcon(iconWrapper, icon);
+ }
+ if (label) {
+ item.createEl('span', { text: label, cls: ['status-bar-item-label', 'status-bar-item-segment'] });
+ }
+ if (ariaLabel) {
+ item.ariaLabel = ariaLabel;
+ item.setAttr('data-tooltip-position', 'top');
+ }
+ if (onClickCallback) {
+ item.addClass('mod-clickable');
+ item.onClickEvent((ev: MouseEvent) => {
+ onClickCallback(ev);
+ });
+ }
- addStatusBarItem(icon?: string, label?: string, ariaLabel?: string, onClickCallback?: (ev: MouseEvent) => void): HTMLElement {
- const item = super.addStatusBarItem();
- if (icon) {
- const iconWrapper = item.createEl('span', { cls: ['status-bar-item-icon', 'status-bar-item-segment'] });
- setIcon(iconWrapper, icon);
- }
- if (label) {
- item.createEl('span', { text: label, cls: ['status-bar-item-label', 'status-bar-item-segment'] });
- }
- if (ariaLabel) {
- item.ariaLabel = ariaLabel;
- item.setAttr('data-tooltip-position', 'top');
- }
- if (onClickCallback) {
- item.addClass('mod-clickable');
- item.onClickEvent((ev: MouseEvent) => {
- onClickCallback(ev);
- })
- }
+ return item;
+ }
- return item;
- }
+ updateStatusBarItem(item: HTMLElement, icon?: string, label?: string, ariaLabel?: string): void {
+ if (icon) {
+ let iconWrapper = item.getElementsByClassName('status-bar-item-icon')[0] as HTMLElement;
+ if (!iconWrapper) {
+ iconWrapper = item.createEl('span', { cls: ['status-bar-item-icon', 'status-bar-item-segment'] });
+ }
+ setIcon(iconWrapper, icon);
+ }
+ else {
+ const iconWrapper = item.getElementsByClassName('status-bar-item-icon')[0] as HTMLElement;
+ if (iconWrapper) {
+ iconWrapper.remove();
+ }
+ }
+ if (label) {
+ let labelEl = item.getElementsByClassName('status-bar-item-label')[0] as HTMLElement;
+ if (!labelEl) {
+ labelEl = item.createEl('span', { cls: ['status-bar-item-label', 'status-bar-item-segment'] });
+ }
+ labelEl.setText(label);
+ }
+ else {
+ const labelEl = item.getElementsByClassName('status-bar-item-label')[0] as HTMLElement;
+ if (labelEl) {
+ labelEl.remove();
+ }
+ }
+ if (ariaLabel) {
+ item.ariaLabel = ariaLabel;
+ }
+ }
- updateStatusBarItem(item: HTMLElement, icon?: string, label?: string, ariaLabel?: string): void {
- if (icon) {
- let iconWrapper = item.getElementsByClassName('status-bar-item-icon')[0] as HTMLElement;
- if (!iconWrapper) {
- iconWrapper = item.createEl('span', { cls: ['status-bar-item-icon', 'status-bar-item-segment'] });
- }
- setIcon(iconWrapper, icon);
- }
- else {
- let iconWrapper = item.getElementsByClassName('status-bar-item-icon')[0] as HTMLElement;
- if (iconWrapper) {
- iconWrapper.remove();
- }
- }
- if (label) {
- let labelEl = item.getElementsByClassName('status-bar-item-label')[0] as HTMLElement;
- if (!labelEl) {
- labelEl = item.createEl('span', { cls: ['status-bar-item-label', 'status-bar-item-segment'] });
- }
- labelEl.setText(label);
- }
- else {
- let labelEl = item.getElementsByClassName('status-bar-item-label')[0] as HTMLElement;
- if (labelEl) {
- labelEl.remove();
- }
- }
- if (ariaLabel) {
- item.ariaLabel = ariaLabel;
- }
- }
-
- removeStatusBarItem(item: HTMLElement): void {
- item.remove();
- }
+ removeStatusBarItem(item: HTMLElement): void {
+ item.remove();
+ }
}
diff --git a/src/main.ts b/src/main.ts
index d892b03..4806b39 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,5 +1,5 @@
import { Notice, debounce } from 'obsidian';
-import { SettingsProfilesSettingTab } from "src/settings/SettingsTab";
+import { SettingsProfilesSettingTab } from 'src/settings/SettingsTab';
import { ProfileSwitcherModal } from './modals/ProfileSwitcherModal';
import { copyFile, ensurePathExist, getVaultPath, isValidPath, removeDirectoryRecursiveSync } from './util/FileSystem';
import { DEFAULT_VAULT_SETTINGS, VaultSettings, ProfileOptions, GlobalSettings, DEFAULT_GLOBAL_SETTINGS, DEFAULT_PROFILE_OPTIONS, DEFAULT_PROFILE_PATH, StatusbarClickAction } from './settings/SettingsInterface';
@@ -11,7 +11,6 @@ import PluginExtended from './core/PluginExtended';
import { ICON_CURRENT_PROFILE, ICON_NO_CURRENT_PROFILE, ICON_UNLOADED_PROFILE, ICON_UNSAVED_PROFILE } from './constants';
import { machineIdSync } from 'node-machine-id';
-
export default class SettingsProfilesPlugin extends PluginExtended {
private vaultSettings: VaultSettings;
private globalSettings: GlobalSettings;
@@ -25,7 +24,7 @@ export default class SettingsProfilesPlugin extends PluginExtended {
this.addSettingTab(new SettingsProfilesSettingTab(this.app, this));
// Add settings change listener
- /**@todo watch didn't support recursive on Linux */
+ /** @todo watch didn't support recursive on Linux */
if (this.getProfileUpdate()) {
this.settingsListener = watch(join(getVaultPath(), this.app.vault.configDir), { recursive: true }, debounce((eventType, filename) => {
if (eventType !== 'change' || !filename) return;
@@ -43,7 +42,7 @@ export default class SettingsProfilesPlugin extends PluginExtended {
}, this.getProfileUpdateDelay(), true));
}
- // Update UI at Interval
+ // Update UI at Interval
if (this.getUiUpdate()) {
this.registerInterval(window.setInterval(() => {
this.updateUI();
@@ -52,27 +51,27 @@ export default class SettingsProfilesPlugin extends PluginExtended {
// Command to Switch between profiles
this.addCommand({
- id: "open-profile-switcher",
- name: "Open profile switcher",
+ id: 'open-profile-switcher',
+ name: 'Open profile switcher',
callback: () => {
// Open new profile switcher modal to switch or create a new profile
new ProfileSwitcherModal(this.app, this).open();
- }
+ },
});
// Command to Show current profile
this.addCommand({
- id: "current-profile",
- name: "Show current profile",
+ id: 'current-profile',
+ name: 'Show current profile',
callback: () => {
new Notice(`Current profile: ${this.getCurrentProfile()?.name}`);
- }
+ },
});
// Command to save current profile
this.addCommand({
- id: "save-current-profile",
- name: "Save current profile",
+ id: 'save-current-profile',
+ name: 'Save current profile',
callback: () => {
this.refreshProfilesList();
const profile = this.getCurrentProfile();
@@ -85,15 +84,15 @@ export default class SettingsProfilesPlugin extends PluginExtended {
new Notice('Failed to save profile!');
(e as Error).message = `Failed to handle command! CommandId: save-current-profile Profile: ${profile}` + (e as Error).message;
console.error(e);
- })
+ });
}
- }
+ },
});
// Command to load current profile
this.addCommand({
- id: "load-current-profile",
- name: "Reload current profile",
+ id: 'load-current-profile',
+ name: 'Reload current profile',
callback: () => {
this.refreshProfilesList();
const profile = this.getCurrentProfile();
@@ -101,12 +100,12 @@ export default class SettingsProfilesPlugin extends PluginExtended {
this.loadProfileSettings(profile)
.then((profile) => {
this.updateCurrentProfile(profile);
+
// Reload obsidian so changed settings can take effect
new DialogModal(this.app, 'Reload Obsidian now?', 'This is required for changes to take effect.', () => {
// Save Settings
this.saveSettings().then(() => {
- // @ts-ignore
- this.app.commands.executeCommandById("app:reload");
+ this.app.commands.executeCommandById('app:reload');
});
}, () => {
this.saveSettings();
@@ -114,19 +113,18 @@ export default class SettingsProfilesPlugin extends PluginExtended {
}, 'Reload')
.open();
});
-
}
- }
+ },
});
- // Command to update profile status
+ // Command to update profile status
if (this.getUiUpdate()) {
this.addCommand({
- id: "update-profile-status",
- name: "Update profile status",
+ id: 'update-profile-status',
+ name: 'Update profile status',
callback: () => {
this.updateUI();
- }
+ },
});
}
}
@@ -158,7 +156,7 @@ export default class SettingsProfilesPlugin extends PluginExtended {
* Update status bar
*/
updateUI() {
- let profile = this.getCurrentProfile();
+ const profile = this.getCurrentProfile();
let icon = ICON_NO_CURRENT_PROFILE;
let label = 'Switch profile';
@@ -184,7 +182,8 @@ export default class SettingsProfilesPlugin extends PluginExtended {
label = 'Unsaved changes for this profile';
}
}
- } catch (e) {
+ }
+ catch (e) {
(e as Error).message = 'Failed to check profile state! ' + (e as Error).message;
console.error(e);
this.updateCurrentProfile(undefined);
@@ -201,12 +200,12 @@ export default class SettingsProfilesPlugin extends PluginExtended {
this.loadProfileSettings(profile)
.then((profile) => {
this.updateCurrentProfile(profile);
+
// Reload obsidian so changed settings can take effect
new DialogModal(this.app, 'Reload Obsidian now?', 'This is required for changes to take effect.', () => {
// Save Settings
this.saveSettings().then(() => {
- // @ts-ignore
- this.app.commands.executeCommandById("app:reload");
+ this.app.commands.executeCommandById('app:reload');
});
}, () => {
this.saveSettings();
@@ -253,7 +252,7 @@ export default class SettingsProfilesPlugin extends PluginExtended {
new ProfileSwitcherModal(this.app, this).open();
}
else if ((modifiers === 0 && click_action == 'none') || (ev.ctrlKey && ctrl_action == 'none') || (ev.shiftKey && shift_action == 'none') || (ev.altKey && alt_action == 'none')) {
- new Notice(`This setting is disabled! Go to 'Settings profiles>Statusbar Interaction' to change this.`, 3000);
+ new Notice('This setting is disabled! Go to \'Settings profiles>Statusbar Interaction\' to change this.', 3000);
return;
}
else if (!profile) {
@@ -268,7 +267,8 @@ export default class SettingsProfilesPlugin extends PluginExtended {
else {
throw Error('Unknown Configuration!');
}
- } catch (e) {
+ }
+ catch (e) {
(e as Error).message = 'Failed to handle status bar callback! ' + (e as Error).message;
console.error(e);
new Notice('Something went wrong check console for more information!');
@@ -288,7 +288,8 @@ export default class SettingsProfilesPlugin extends PluginExtended {
// Load global settings from profiles path
this.globalSettings = DEFAULT_GLOBAL_SETTINGS;
this.refreshProfilesList();
- } catch (e) {
+ }
+ catch (e) {
(e as Error).message = 'Failed to load settings! ' + (e as Error).message + ` VaultSettings: ${JSON.stringify(this.vaultSettings)} GlobalSettings: ${JSON.stringify(this.globalSettings)}`;
console.error(e);
}
@@ -301,14 +302,15 @@ export default class SettingsProfilesPlugin extends PluginExtended {
try {
// Remove Legacy Settings
for (const key in this.vaultSettings) {
- if (!DEFAULT_VAULT_SETTINGS.hasOwnProperty(key)) {
- delete this.vaultSettings[key as keyof VaultSettings]
+ if (!Object.prototype.hasOwnProperty.call(DEFAULT_VAULT_SETTINGS, key)) {
+ delete this.vaultSettings[key as keyof VaultSettings];
}
}
// Save vault settings
await this.saveData(this.vaultSettings);
- } catch (e) {
+ }
+ catch (e) {
(e as Error).message = 'Failed to save settings! ' + (e as Error).message + ` VaultSettings: ${JSON.stringify(this.vaultSettings)}`;
console.error(e);
}
@@ -329,7 +331,7 @@ export default class SettingsProfilesPlugin extends PluginExtended {
throw Error(`Source path do not exist! SourcePath: ${join(...sourcePath)}`);
}
- // Target does not exist
+ // Target does not exist
if (!existsSync(join(...targetPath))) {
return true;
}
@@ -338,7 +340,8 @@ export default class SettingsProfilesPlugin extends PluginExtended {
filesList = getFilesWithoutPlaceholder(filesList, sourcePath);
filesList = filterIgnoreFilesList(filesList, profile);
return containsChangedFiles(filesList, targetPath, sourcePath);
- } catch (e) {
+ }
+ catch (e) {
(e as Error).message = 'Failed to check settings changed! ' + (e as Error).message + ` Profile: ${JSON.stringify(profile)}`;
console.error(e);
return true;
@@ -360,7 +363,7 @@ export default class SettingsProfilesPlugin extends PluginExtended {
throw Error(`Source path do not exist! SourcePath: ${join(...sourcePath)}`);
}
- // Target does not exist
+ // Target does not exist
if (!existsSync(join(...targetPath))) {
return false;
}
@@ -369,7 +372,8 @@ export default class SettingsProfilesPlugin extends PluginExtended {
filesList = getFilesWithoutPlaceholder(filesList, sourcePath);
filesList = filterIgnoreFilesList(filesList, profile);
return !containsChangedFiles(filesList, sourcePath, targetPath);
- } catch (e) {
+ }
+ catch (e) {
(e as Error).message = 'Failed to check settings changed! ' + (e as Error).message + ` Profile: ${JSON.stringify(profile)}`;
console.error(e);
return false;
@@ -378,12 +382,13 @@ export default class SettingsProfilesPlugin extends PluginExtended {
/**
* Load settings and data for the given profile
- * @param profile The profile
+ * @param profile The profile
*/
async loadProfileSettings(profile: ProfileOptions) {
try {
// Load profile settings
await this.loadProfile(profile.name);
+
// Load profile data
this.getProfilesList().forEach((value, index, array) => {
if (value.name === profile.name) {
@@ -391,7 +396,8 @@ export default class SettingsProfilesPlugin extends PluginExtended {
}
});
return this.getProfile(profile.name);
- } catch (e) {
+ }
+ catch (e) {
(e as Error).message = 'Failed to load profile settings! ' + (e as Error).message + ` Profile: ${JSON.stringify(profile)} GlobalSettings: ${JSON.stringify(this.globalSettings)}`;
console.error(e);
}
@@ -399,19 +405,22 @@ export default class SettingsProfilesPlugin extends PluginExtended {
/**
* Save settings and data for the given profile
- * @param profile The profile
+ * @param profile The profile
*/
async saveProfileSettings(profile: ProfileOptions) {
try {
// Save profile settings
await this.saveProfile(profile.name);
+
// Save profile data
- await saveProfileOptions(profile, this.getAbsolutProfilesPath())
+ await saveProfileOptions(profile, this.getAbsolutProfilesPath());
+
// Reload profiles list from files
this.refreshProfilesList();
return this.getProfile(profile.name);
- } catch (e) {
+ }
+ catch (e) {
(e as Error).message = 'Failed to save profile settings! ' + (e as Error).message + ` Profile: ${JSON.stringify(profile)} GlobalSettings: ${JSON.stringify(this.globalSettings)}`;
console.error(e);
}
@@ -427,11 +436,11 @@ export default class SettingsProfilesPlugin extends PluginExtended {
const currentProfile = this.getCurrentProfile();
// Deselect profile
- if (profileName === "") {
+ if (profileName === '') {
// Open dialog save current profile
if (currentProfile) {
new DialogModal(this.app, 'Save befor deselect profile?', 'Otherwise, unsaved changes will be lost.', async () => {
- // Save current profile
+ // Save current profile
await this.saveProfileSettings(currentProfile);
}, async () => { }, 'Save', false, 'Do not Save')
.open();
@@ -454,7 +463,7 @@ export default class SettingsProfilesPlugin extends PluginExtended {
return;
}
- // Save current profile
+ // Save current profile
if (currentProfile?.autoSync) {
await this.saveProfileSettings(currentProfile);
}
@@ -469,15 +478,15 @@ export default class SettingsProfilesPlugin extends PluginExtended {
new DialogModal(this.app, 'Reload Obsidian now?', 'This is required for changes to take effect.', () => {
// Save Settings
this.saveSettings().then(() => {
- // @ts-ignore
- this.app.commands.executeCommandById("app:reload");
+ this.app.commands.executeCommandById('app:reload');
});
}, async () => {
await this.saveSettings();
new Notice('Need to reload obsidian!', 5000);
}, 'Reload')
.open();
- } catch (e) {
+ }
+ catch (e) {
this.updateCurrentProfile(undefined);
new Notice(`Failed to switch to ${profileName} profile!`);
(e as Error).message = 'Failed to switch profile! ' + (e as Error).message + ` ProfileName: ${profileName} GlobalSettings: ${JSON.stringify(this.globalSettings)}`;
@@ -486,7 +495,7 @@ export default class SettingsProfilesPlugin extends PluginExtended {
}
/**
- * Create a new profile with the current settings
+ * Create a new profile with the current settings
* @param profile The profile options the profile should be created with
*/
async createProfile(profile: ProfileOptions) {
@@ -504,7 +513,8 @@ export default class SettingsProfilesPlugin extends PluginExtended {
await this.removeProfile(profile.name);
new Notice(`Failed to create profile ${profile.name}!`);
}
- } catch (e) {
+ }
+ catch (e) {
new Notice(`Failed to create ${profile.name} profile!`);
(e as Error).message = 'Failed to create profile! ' + (e as Error).message + ` Profile: ${JSON.stringify(profile)} GlobalSettings: ${JSON.stringify(this.globalSettings)}`;
console.error(e);
@@ -546,7 +556,8 @@ export default class SettingsProfilesPlugin extends PluginExtended {
else {
await this.saveProfileSettings(profile);
}
- } catch (e) {
+ }
+ catch (e) {
new Notice(`Failed to edit ${profileName} profile!`);
(e as Error).message = 'Failed to edit profile! ' + (e as Error).message + ` ProfileName: ${profileName} ProfileOptions: ${JSON.stringify(profileOptions)}`;
console.error(e);
@@ -570,7 +581,8 @@ export default class SettingsProfilesPlugin extends PluginExtended {
removeDirectoryRecursiveSync([this.getAbsolutProfilesPath(), profileName]);
this.refreshProfilesList();
await this.saveSettings();
- } catch (e) {
+ }
+ catch (e) {
new Notice(`Failed to remove ${profileName} profile!`);
(e as Error).message = 'Failed to remove profile! ' + (e as Error).message + ` ProfileName: ${profileName} GlobalSettings: ${JSON.stringify(this.globalSettings)}`;
console.error(e);
@@ -580,11 +592,11 @@ export default class SettingsProfilesPlugin extends PluginExtended {
/**
* Save the profile settings
* @param profileName The name of the profile to load.
- * @todo Update profile data/settings only when changed
+ * @todo Update profile data/settings only when changed
*/
private async saveProfile(profileName: string) {
try {
- let profile = this.getProfile(profileName);
+ const profile = this.getProfile(profileName);
const sourcePath = [getVaultPath(), this.app.vault.configDir];
const targetPath = [this.getAbsolutProfilesPath(), profileName];
@@ -602,11 +614,11 @@ export default class SettingsProfilesPlugin extends PluginExtended {
filesList.forEach(file => {
if (existsSync(join(...sourcePath, file))) {
changed = true;
- copyFile([...sourcePath, file], [...targetPath, file])
+ copyFile([...sourcePath, file], [...targetPath, file]);
}
});
- // Update profile data
+ // Update profile data
if (changed) {
profile.modifiedAt = new Date();
}
@@ -645,13 +657,14 @@ export default class SettingsProfilesPlugin extends PluginExtended {
filesList.forEach(file => {
if (existsSync(join(...sourcePath, file))) {
- copyFile([...sourcePath, file], [...targetPath, file])
+ copyFile([...sourcePath, file], [...targetPath, file]);
}
});
// Change active profile
this.updateCurrentProfile(profile);
- } catch (e) {
+ }
+ catch (e) {
new Notice(`Failed to load ${profileName} profile!`);
(e as Error).message = 'Failed to load profile! ' + (e as Error).message + ` ProfileName: ${profileName}`;
console.error(e);
@@ -660,24 +673,24 @@ export default class SettingsProfilesPlugin extends PluginExtended {
/**
* Retrieves the profile path for the current device.
- *
- * This function uses the machine ID to look up the associated profile path from the vault settings.
+ *
+ * This function uses the machine ID to look up the associated profile path from the vault settings.
* If the profile path is missing, it attempts to use a deprecated path and updates the vault settings accordingly.
* If neither the current nor deprecated paths are available, it creates a entry for current device with default profiles path.
- *
+ *
* @returns {string} The normalized profile path for the current device.
* @throws {Error} If the device ID cannot be determined.
*/
getProfilesPath(): string {
const deviceID = machineIdSync(false);
- if (!deviceID || deviceID === "") {
- throw Error("Failed to load device ID!");
+ if (!deviceID || deviceID === '') {
+ throw Error('Failed to load device ID!');
}
const devicePath = this.vaultSettings.devices[deviceID];
- if (!devicePath || devicePath === "") {
+ if (!devicePath || devicePath === '') {
const deprecatedPath = this.vaultSettings.profilesPath;
- if (deprecatedPath && deprecatedPath !== "") {
+ if (deprecatedPath && deprecatedPath !== '') {
// Use deprecated path if available
this.vaultSettings.devices[deviceID] = deprecatedPath;
this.saveSettings();
@@ -699,11 +712,11 @@ export default class SettingsProfilesPlugin extends PluginExtended {
/**
* Retrieves the absolute profile path for the current device.
- *
- * This function ensures that the profile path returned is an absolute path.
- * If the path is relative, it joins it with the vault path to convert it into an absolute path.
- * It validates the resulting path is an valid path.
- *
+ *
+ * This function ensures that the profile path returned is an absolute path.
+ * If the path is relative, it joins it with the vault path to convert it into an absolute path.
+ * It validates the resulting path is an valid path.
+ *
* @returns {string} The normalized absolute profile path for the current device.
* @throws {Error} If the device ID cannot be determined.
* @throws {Error} If no valid profiles path can be found.
@@ -725,27 +738,28 @@ export default class SettingsProfilesPlugin extends PluginExtended {
/**
* Sets the profile path in the vault settings for the current device ID.
- *
- * This function retrieves the device ID and updates its associated profile
- * path in the vault settings. If the provided path is invalid (empty after normalization),
+ *
+ * This function retrieves the device ID and updates its associated profile
+ * path in the vault settings. If the provided path is invalid (empty after normalization),
* an error is thrown, and the path is not updated.
- *
+ *
* @param {string} path - The new profile path to be set for the current device.
- *
+ *
* @throws {Error} If the device ID cannot be determined.
* @throws {Error} If the provided path is invalid (empty after normalization).
*/
setProfilePath(path: string) {
const deviceID = machineIdSync(false);
- if (!deviceID || deviceID === "") {
- throw Error("Failed to load device ID!");
+ if (!deviceID || deviceID === '') {
+ throw Error('Failed to load device ID!');
}
path = path.trim();
if (path !== '') {
this.vaultSettings.devices[deviceID] = normalize(path);
- } else {
- throw Error("Profile path failed to update. The provided path is invalid!");
+ }
+ else {
+ throw Error('Profile path failed to update. The provided path is invalid!');
}
}
@@ -756,12 +770,14 @@ export default class SettingsProfilesPlugin extends PluginExtended {
try {
this.globalSettings.profilesList = loadProfilesOptions(this.getAbsolutProfilesPath());
return;
- } catch (e) {
+ }
+ catch (e) {
console.warn(`Refresh profiles list failed with stored values because of: ${e.message}`);
}
try {
this.globalSettings.profilesList = loadProfilesOptions(DEFAULT_PROFILE_PATH);
- } catch (e) {
+ }
+ catch (e) {
console.error(`Refresh profiles list failed with default path because of: ${e.message}`);
}
}
@@ -800,7 +816,7 @@ export default class SettingsProfilesPlugin extends PluginExtended {
/**
* Returns the refresh interval currently in the settings
- * @returns
+ * @returns
*/
getUiRefreshInterval(): number {
if (!this.vaultSettings.uiUpdateInterval || this.vaultSettings.uiUpdateInterval <= 0 || this.vaultSettings.uiUpdateInterval >= 900000) {
@@ -870,7 +886,7 @@ export default class SettingsProfilesPlugin extends PluginExtended {
/**
* Returns the delay time for profile update currently in the settings
- * @returns
+ * @returns
*/
getProfileUpdateDelay(): number {
if (!this.vaultSettings.profileUpdateDelay || this.vaultSettings.profileUpdateDelay <= 0 || this.vaultSettings.profileUpdateDelay >= 900000) {
@@ -937,7 +953,7 @@ export default class SettingsProfilesPlugin extends PluginExtended {
/**
* Updates the current profile to passed profile
- * @param profile The profile to update to
+ * @param profile The profile to update to
*/
updateCurrentProfile(profile: ProfileOptions | undefined) {
if (!profile) {
@@ -949,7 +965,7 @@ export default class SettingsProfilesPlugin extends PluginExtended {
/**
* Checks the profile is currently enabled
- * @param profile The profile to check
+ * @param profile The profile to check
* @returns Is enabled profile
*/
isEnabled(profile: ProfileOptions): boolean {
@@ -964,7 +980,7 @@ export default class SettingsProfilesPlugin extends PluginExtended {
isValidProfile(profile: ProfileOptions): boolean {
let result = true;
for (const key in DEFAULT_PROFILE_OPTIONS) {
- if (!profile.hasOwnProperty(key)) {
+ if (!Object.prototype.hasOwnProperty.call(profile, key)) {
console.warn(`Missing property in profile! Property: ${key} Profile: ${JSON.stringify(profile)}`);
result = false;
break;
@@ -975,7 +991,7 @@ export default class SettingsProfilesPlugin extends PluginExtended {
break;
}
else if (profile[key as keyof ProfileOptions] === undefined || profile[key as keyof ProfileOptions] === null) {
- console.warn(`Undefined property in profile! Property: ${key} Profile: ${JSON.stringify(profile)}`)
+ console.warn(`Undefined property in profile! Property: ${key} Profile: ${JSON.stringify(profile)}`);
result = false;
break;
}
@@ -985,7 +1001,7 @@ export default class SettingsProfilesPlugin extends PluginExtended {
/**
* Checks the profile is up to date to the saved profile
- * @param profile The profile to check
+ * @param profile The profile to check
* @returns Is loaded profile newer/equal than saved profile
*/
isProfileUpToDate(profile: ProfileOptions): boolean {
@@ -1003,8 +1019,8 @@ export default class SettingsProfilesPlugin extends PluginExtended {
}
/**
- * Check the profile settings are saved
- * @param profile The profile to check
+ * Check the profile settings are saved
+ * @param profile The profile to check
* @returns Is saved profile newer/equal than saved profile
*/
isProfileSaved(profile: ProfileOptions): boolean {
@@ -1021,4 +1037,3 @@ export default class SettingsProfilesPlugin extends PluginExtended {
return this.areSettingsSaved(profile);
}
}
-
diff --git a/src/modals/DialogModal.ts b/src/modals/DialogModal.ts
index 53eb885..96c1b07 100644
--- a/src/modals/DialogModal.ts
+++ b/src/modals/DialogModal.ts
@@ -1,75 +1,75 @@
-import { App, Modal, Setting } from "obsidian";
+import { App, Modal, Setting } from 'obsidian';
export class DialogModal extends Modal {
- message: string;
- submit: string;
+ message: string;
+ submit: string;
submitWarning: boolean;
- deny: string;
+ deny: string;
denyWarning: boolean;
- onSubmit: () => void;
- onDeny: () => void;
+ onSubmit: () => void;
+ onDeny: () => void;
- constructor(app: App, title: string, message: string, onSubmit: () => void, onDeny: () => void, submit = 'Agree', submitWarning = false, deny = 'Cancel', denyWarning = true) {
- super(app);
+ constructor(app: App, title: string, message: string, onSubmit: () => void, onDeny: () => void, submit = 'Agree', submitWarning = false, deny = 'Cancel', denyWarning = true) {
+ super(app);
- this.titleEl.setText(title);
+ this.titleEl.setText(title);
- this.message = message;
- this.onSubmit = onSubmit;
- this.onDeny = onDeny;
- this.submit = submit;
+ this.message = message;
+ this.onSubmit = onSubmit;
+ this.onDeny = onDeny;
+ this.submit = submit;
this.submitWarning = submitWarning;
- this.deny = deny;
+ this.deny = deny;
this.denyWarning = denyWarning;
- }
+ }
- onOpen(): void {
- const { contentEl } = this;
+ onOpen(): void {
+ const { contentEl } = this;
- contentEl.createEl('span', { text: this.message });
+ contentEl.createEl('span', { text: this.message });
- const setting = new Setting(contentEl);
+ const setting = new Setting(contentEl);
if(this.submitWarning) {
setting.addButton(button => button
- .setButtonText(this.submit)
+ .setButtonText(this.submit)
.setWarning()
- .onClick(() => {
- this.close();
- this.onSubmit();
- }))
+ .onClick(() => {
+ this.close();
+ this.onSubmit();
+ }));
}
else {
setting.addButton(button => button
- .setButtonText(this.submit)
- .onClick(() => {
- this.close();
- this.onSubmit();
- }))
+ .setButtonText(this.submit)
+ .onClick(() => {
+ this.close();
+ this.onSubmit();
+ }));
}
if(this.denyWarning) {
setting.addButton(button => button
- .setButtonText(this.deny)
- .setWarning()
- .onClick(() => {
- this.close();
- this.onDeny();
- }))
+ .setButtonText(this.deny)
+ .setWarning()
+ .onClick(() => {
+ this.close();
+ this.onDeny();
+ }));
}
else {
setting.addButton(button => button
- .setButtonText(this.deny)
- .onClick(() => {
- this.close();
- this.onDeny();
- }))
+ .setButtonText(this.deny)
+ .onClick(() => {
+ this.close();
+ this.onDeny();
+ }));
}
-
- setting.setClass('modal-buttons');
- }
- onClose(): void {
- const { contentEl } = this;
- contentEl.empty();
- }
+ setting.setClass('modal-buttons');
+ }
+
+ onClose(): void {
+ const { contentEl } = this;
+ contentEl.empty();
+ }
}
\ No newline at end of file
diff --git a/src/modals/ProfileOptionsModal.ts b/src/modals/ProfileOptionsModal.ts
index 7df1ed0..8dbe7ce 100644
--- a/src/modals/ProfileOptionsModal.ts
+++ b/src/modals/ProfileOptionsModal.ts
@@ -1,87 +1,89 @@
-import { App, Modal, Notice, Setting } from "obsidian";
-import SettingsProfilesPlugin from "../main";
-import { ProfileOptions, PROFILE_OPTIONS_MAP } from "../settings/SettingsInterface";
+import { App, Modal, Notice, Setting } from 'obsidian';
+import SettingsProfilesPlugin from '../main';
+import { ProfileOptions, PROFILE_OPTIONS_MAP } from '../settings/SettingsInterface';
export class ProfileOptionsModal extends Modal {
- plugin: SettingsProfilesPlugin;
- profile: ProfileOptions;
- initialProfile: ProfileOptions;
- onSubmit: (result: ProfileOptions) => void;
+ plugin: SettingsProfilesPlugin;
+ profile: ProfileOptions;
+ initialProfile: ProfileOptions;
+ onSubmit: (result: ProfileOptions) => void;
+ constructor(app: App, plugin: SettingsProfilesPlugin, profile: ProfileOptions, onSubmit: (result: ProfileOptions) => void) {
+ super(app);
- constructor(app: App, plugin: SettingsProfilesPlugin, profile: ProfileOptions, onSubmit: (result: ProfileOptions) => void) {
- super(app);
+ this.plugin = plugin;
+ this.profile = structuredClone(profile);
+ this.initialProfile = structuredClone(profile);
+ this.onSubmit = onSubmit;
+ }
- this.plugin = plugin;
- this.profile = structuredClone(profile);
- this.initialProfile = structuredClone(profile);
- this.onSubmit = onSubmit;
- }
+ onOpen(): void {
+ const { contentEl } = this;
- onOpen(): void {
- const { contentEl } = this;
+ // Heading for Edit profile
+ contentEl.createEl('h1', { text: 'Profile options' });
- // Heading for Edit profile
- contentEl.createEl('h1', { text: `Profile options` });
+ // Add All existing options
+ for (const key in this.profile) {
+ if (Object.prototype.hasOwnProperty.call(this.profile, key)) {
+ const value = this.profile[key as keyof ProfileOptions];
- // Add All existing options
- for (const key in this.profile) {
- if (this.profile.hasOwnProperty(key)) {
- const value = this.profile[key as keyof ProfileOptions];
+ if (key === 'modifiedAt') {
+ break;
+ }
- if (key === 'modifiedAt') {
- break;
- }
- // Only toggle exclude enabled
- if (typeof value === 'boolean' && key !== 'enabled') {
- new Setting(contentEl)
- .setName(PROFILE_OPTIONS_MAP[key as keyof ProfileOptions].name)
- .setDesc(PROFILE_OPTIONS_MAP[key as keyof ProfileOptions].description)
- .addToggle(toggle => toggle
- .setValue(value)
- .onChange(async (value) => {
- // Assign value of this Setting an save it
- (this.profile[key as keyof ProfileOptions] as boolean) = value;
- }));
- }
- if (typeof value === 'string') {
- new Setting(contentEl)
- .setName(PROFILE_OPTIONS_MAP[key as keyof ProfileOptions].name)
- .setDesc(PROFILE_OPTIONS_MAP[key as keyof ProfileOptions].description)
- .addText(text => text
- .setPlaceholder(PROFILE_OPTIONS_MAP[key as keyof ProfileOptions].name)
- .setValue(value)
- .onChange(value => {
- // Assign value of this Setting an save it
- (this.profile[key as keyof ProfileOptions] as string) = value;
- }));
- }
- }
- }
+ // Only toggle exclude enabled
+ if (typeof value === 'boolean' && key !== 'enabled') {
+ new Setting(contentEl)
+ .setName(PROFILE_OPTIONS_MAP[key as keyof ProfileOptions].name)
+ .setDesc(PROFILE_OPTIONS_MAP[key as keyof ProfileOptions].description)
+ .addToggle(toggle => toggle
+ .setValue(value)
+ .onChange(async (value) => {
+ // Assign value of this Setting an save it
+ (this.profile[key as keyof ProfileOptions] as boolean) = value;
+ }));
+ }
+ if (typeof value === 'string') {
+ new Setting(contentEl)
+ .setName(PROFILE_OPTIONS_MAP[key as keyof ProfileOptions].name)
+ .setDesc(PROFILE_OPTIONS_MAP[key as keyof ProfileOptions].description)
+ .addText(text => text
+ .setPlaceholder(PROFILE_OPTIONS_MAP[key as keyof ProfileOptions].name)
+ .setValue(value)
+ .onChange(value => {
+ // Assign value of this Setting an save it
+ (this.profile[key as keyof ProfileOptions] as string) = value;
+ }));
+ }
+ }
+ }
- new Setting(contentEl)
- .addButton(button => button
- .setButtonText('Save')
- .onClick(() => {
- if (this.profile.name === "" || this.profile.name === undefined) {
- new Notice("Profile name cannot be empty!");
- } else if (this.initialProfile.name !== this.profile.name && this.plugin.getProfilesList().find(profile => profile.name === this.profile.name)) {
- new Notice("Profile with this name already exists!");
- } else {
- this.onSubmit(this.profile);
- this.close();
- }
- }))
- .addButton(button => button
- .setButtonText('Cancel')
- .setWarning()
- .onClick(() => {
- this.close();
- }));
- }
+ new Setting(contentEl)
+ .addButton(button => button
+ .setButtonText('Save')
+ .onClick(() => {
+ if (this.profile.name === '' || this.profile.name === undefined) {
+ new Notice('Profile name cannot be empty!');
+ }
+ else if (this.initialProfile.name !== this.profile.name && this.plugin.getProfilesList().find(profile => profile.name === this.profile.name)) {
+ new Notice('Profile with this name already exists!');
+ }
+ else {
+ this.onSubmit(this.profile);
+ this.close();
+ }
+ }))
+ .addButton(button => button
+ .setButtonText('Cancel')
+ .setWarning()
+ .onClick(() => {
+ this.close();
+ }));
+ }
- onClose(): void {
- const { contentEl } = this;
- contentEl.empty();
- }
+ onClose(): void {
+ const { contentEl } = this;
+ contentEl.empty();
+ }
}
\ No newline at end of file
diff --git a/src/modals/ProfileSwitcherModal.ts b/src/modals/ProfileSwitcherModal.ts
index a1d8739..979bb5b 100644
--- a/src/modals/ProfileSwitcherModal.ts
+++ b/src/modals/ProfileSwitcherModal.ts
@@ -1,130 +1,133 @@
-import { App, SuggestModal } from "obsidian";
-import SettingsProfilesPlugin from "../main";
-import { DEFAULT_PROFILE_OPTIONS, ProfileOptions } from "../settings/SettingsInterface";
-import { ProfileOptionsModal } from "./ProfileOptionsModal";
+import { App, SuggestModal } from 'obsidian';
+import SettingsProfilesPlugin from '../main';
+import { DEFAULT_PROFILE_OPTIONS, ProfileOptions } from '../settings/SettingsInterface';
+import { ProfileOptionsModal } from './ProfileOptionsModal';
enum ProfileState {
- EXIST,
- CURRENT,
- NEW,
- NEW_OPTIONS
+ EXIST,
+ CURRENT,
+ NEW,
+ NEW_OPTIONS,
}
interface SettingsProfileSuggestion extends ProfileOptions {
- state: ProfileState;
+ state: ProfileState;
}
export class ProfileSwitcherModal extends SuggestModal {
- plugin: SettingsProfilesPlugin;
-
- constructor(app: App, plugin: SettingsProfilesPlugin) {
- super(app);
- this.plugin = plugin;
-
- // Register key combination shift + enter
- this.scope.register(['Shift'], 'Enter', (evt: KeyboardEvent) => {
- // @ts-ignore
- if (!evt.isComposing && this.chooser.useSelectedItem(evt)) {
- return false;
- }
- });
-
- this.setPlaceholder("Find or create a profile...")
-
- this.setInstructions([{
- command: "↑↓",
- purpose: "to navigate"
- },
- {
- command: "↵",
- purpose: "to switch"
- },
- {
- command: "shift ↵",
- purpose: "to create with options"
- },
- {
- command: "esc",
- purpose: "to dismiss"
- }]);
-
- }
-
- // Returns all available suggestions.
- getSuggestions(query: string): SettingsProfileSuggestion[] {
- // Get all matching SettingsProfiles
- const profiles = this.plugin.getProfilesList().filter((profile) =>
- profile.name.toLowerCase().includes(query.toLowerCase())
- );
- // Expand SettingsProfile to SettingsProfileSuggestion
- const suggestions: SettingsProfileSuggestion[] = [];
- // Attach query string to suggestion
- if (profiles.every((value) => value.name.toLowerCase() !== query.toLowerCase()) && query.length > 0) {
- suggestions.push({
- ...DEFAULT_PROFILE_OPTIONS,
- name: query,
- state: ProfileState.NEW
- });
- }
- // Attach profiles to suggestions
- profiles.forEach(profile => {
- suggestions.push({
- ...profile,
- state: this.plugin.isEnabled(profile) ? ProfileState.CURRENT : ProfileState.EXIST
- });
- });
- return suggestions
- }
-
- // Renders each suggestion item.
- renderSuggestion(suggestion: SettingsProfileSuggestion, el: HTMLElement) {
- // Create Item
- el.addClass("mod-complex");
- const content = el.createEl("div", { cls: "suggestion-content" });
- content.createEl("div", { cls: "suggestion-title" })
- .createEl("span", { text: suggestion.name })
- // Profile not existing
- if (suggestion.state === ProfileState.NEW) {
- content.parentElement?.createEl("div", { cls: "suggestion-aux" })
- .createEl("span", { text: "Enter to create", cls: "suggestion-hotkey" })
- }
- // Profile is current
- if (suggestion.state === ProfileState.CURRENT) {
- content.parentElement?.createEl("div", { cls: "suggestion-aux" })
- .createEl("span", { text: "Current profile", cls: "suggestion-hotkey" })
- }
- }
-
- // Perform action on the selected suggestion.
- onChooseSuggestion(suggestion: SettingsProfileSuggestion, evt: MouseEvent | KeyboardEvent) {
- // Trim SettingsProfileSuggestion to SettingsProfile
- let { state, ...rest } = suggestion;
- const profile: ProfileOptions = { ...rest };
-
- if (evt.shiftKey && state !== ProfileState.EXIST && state !== ProfileState.CURRENT) {
- state = ProfileState.NEW_OPTIONS;
- }
-
- // Handle choice depending on state
- switch (state) {
- case ProfileState.NEW:
- // Create new Profile
- this.plugin.createProfile(profile).then(() => {
- this.plugin.switchProfile(profile.name);
- });
- break;
- case ProfileState.NEW_OPTIONS:
- new ProfileOptionsModal(this.app, this.plugin, profile, async (result) => {
- this.plugin.createProfile(result)
- .then(() => {
- this.plugin.switchProfile(result.name);
- });
- }).open();
- break;
- case ProfileState.EXIST:
- this.plugin.switchProfile(profile.name);
- break;
- }
- this.close()
- }
+ plugin: SettingsProfilesPlugin;
+
+ constructor(app: App, plugin: SettingsProfilesPlugin) {
+ super(app);
+ this.plugin = plugin;
+
+ // Register key combination shift + enter
+ this.scope.register(['Shift'], 'Enter', (evt: KeyboardEvent) => {
+ if (!evt.isComposing && this.chooser.useSelectedItem(evt)) {
+ return false;
+ }
+ });
+
+ this.setPlaceholder('Find or create a profile...');
+
+ this.setInstructions([{
+ command: '↑↓',
+ purpose: 'to navigate',
+ },
+ {
+ command: '↵',
+ purpose: 'to switch',
+ },
+ {
+ command: 'shift ↵',
+ purpose: 'to create with options',
+ },
+ {
+ command: 'esc',
+ purpose: 'to dismiss',
+ }]);
+ }
+
+ // Returns all available suggestions.
+ getSuggestions(query: string): SettingsProfileSuggestion[] {
+ // Get all matching SettingsProfiles
+ const profiles = this.plugin.getProfilesList().filter((profile) => profile.name.toLowerCase().includes(query.toLowerCase())
+ );
+
+ // Expand SettingsProfile to SettingsProfileSuggestion
+ const suggestions: SettingsProfileSuggestion[] = [];
+
+ // Attach query string to suggestion
+ if (profiles.every((value) => value.name.toLowerCase() !== query.toLowerCase()) && query.length > 0) {
+ suggestions.push({
+ ...DEFAULT_PROFILE_OPTIONS,
+ name: query,
+ state: ProfileState.NEW,
+ });
+ }
+
+ // Attach profiles to suggestions
+ profiles.forEach(profile => {
+ suggestions.push({
+ ...profile,
+ state: this.plugin.isEnabled(profile) ? ProfileState.CURRENT : ProfileState.EXIST,
+ });
+ });
+ return suggestions;
+ }
+
+ // Renders each suggestion item.
+ renderSuggestion(suggestion: SettingsProfileSuggestion, el: HTMLElement) {
+ // Create Item
+ el.addClass('mod-complex');
+ const content = el.createEl('div', { cls: 'suggestion-content' });
+ content.createEl('div', { cls: 'suggestion-title' })
+ .createEl('span', { text: suggestion.name });
+
+ // Profile not existing
+ if (suggestion.state === ProfileState.NEW) {
+ content.parentElement?.createEl('div', { cls: 'suggestion-aux' })
+ .createEl('span', { text: 'Enter to create', cls: 'suggestion-hotkey' });
+ }
+
+ // Profile is current
+ if (suggestion.state === ProfileState.CURRENT) {
+ content.parentElement?.createEl('div', { cls: 'suggestion-aux' })
+ .createEl('span', { text: 'Current profile', cls: 'suggestion-hotkey' });
+ }
+ }
+
+ // Perform action on the selected suggestion.
+ onChooseSuggestion(suggestion: SettingsProfileSuggestion, evt: MouseEvent | KeyboardEvent) {
+ // Trim SettingsProfileSuggestion to SettingsProfile
+ const { state, ...rest } = suggestion;
+ const profile: ProfileOptions = { ...rest };
+
+ let chosenState = state;
+ if (evt.shiftKey && state !== ProfileState.EXIST && state !== ProfileState.CURRENT) {
+ chosenState = ProfileState.NEW_OPTIONS;
+ }
+
+ // Handle choice depending on chosenState
+ switch (chosenState) {
+ case ProfileState.NEW:
+ // Create new Profile
+ this.plugin.createProfile(profile).then(() => {
+ this.plugin.switchProfile(profile.name);
+ });
+ break;
+ case ProfileState.NEW_OPTIONS:
+ new ProfileOptionsModal(this.app, this.plugin, profile, async (result) => {
+ this.plugin.createProfile(result)
+ .then(() => {
+ this.plugin.switchProfile(result.name);
+ });
+ }).open();
+ break;
+ case ProfileState.EXIST:
+ this.plugin.switchProfile(profile.name);
+ break;
+ }
+ this.close();
+ }
}
\ No newline at end of file
diff --git a/src/settings/SettingsInterface.ts b/src/settings/SettingsInterface.ts
index 4043f85..f7bf326 100644
--- a/src/settings/SettingsInterface.ts
+++ b/src/settings/SettingsInterface.ts
@@ -1,5 +1,6 @@
import { join, normalize, sep as slash } from 'path';
+// eslint-disable-next-line @typescript-eslint/no-var-requires
const xdg = require('@folder/xdg');
export interface GlobalSettings {
@@ -7,10 +8,10 @@ export interface GlobalSettings {
}
export const DEFAULT_GLOBAL_SETTINGS: GlobalSettings = {
- profilesList: []
-}
+ profilesList: [],
+};
-export type Device = Record
+export type Device = Record;
export type StatusbarClickAction = 'auto' | 'load' | 'switch' | 'save' | 'none';
export const STATUSBAR_CLICK_ACTIONS: Record = {
@@ -18,10 +19,11 @@ export const STATUSBAR_CLICK_ACTIONS: Record = {
'load': 'Load',
'switch': 'Switch',
'save': 'Save',
- 'none': 'Disabled'
+ 'none': 'Disabled',
};
export interface VaultSettings {
+
/** @deprecated since v0.6.0 now stored in devices with unique ID*/
profilesPath?: string;
activeProfile: Partial;
@@ -52,8 +54,8 @@ export const DEFAULT_VAULT_SETTINGS: VaultSettings = {
ctrl_click: 'none',
shift_click: 'none',
alt_click: 'none',
- }
-}
+ },
+};
export interface ProfileOptions {
name: string;
@@ -62,6 +64,7 @@ export interface ProfileOptions {
app: boolean;
bookmarks: boolean;
communityPlugins: boolean;
+
// communityPluginsAdvanced: {}
corePlugins: boolean;
graph: boolean;
@@ -76,29 +79,34 @@ export const DEFAULT_PROFILE_OPTIONS: ProfileOptions = {
app: true,
bookmarks: true,
communityPlugins: true,
+
// communityPluginsAdvanced: {},
corePlugins: true,
graph: true,
hotkeys: true,
modifiedAt: new Date(),
-}
+};
type ProfileOptionsMap = {
[key in keyof ProfileOptions]: {
+
// Display name of the setting
name: string;
+
// Description text of the setting
description: string;
+
// The setting this is the Advanced option.
advanced?: keyof ProfileOptions;
- // Files/Paths there get synced with this option.
+
+ // Files/Paths there get synced with this option.
file?: string | string[];
+
// Files/Paths there are ignored for sync
ignore?: string | string[];
};
};
-
export const PROFILE_OPTIONS_MAP: ProfileOptionsMap = {
name: {
name: 'Name',
@@ -116,41 +124,44 @@ export const PROFILE_OPTIONS_MAP: ProfileOptionsMap = {
app: {
name: 'App',
description: 'Says whether the obsidian app settings will sync.',
- file: 'app.json'
+ file: 'app.json',
},
bookmarks: {
name: 'Bookmarks',
description: 'Says whether the obsidian bookmarks will sync.',
- file: 'bookmarks.json'
+ file: 'bookmarks.json',
},
communityPlugins: {
name: 'Community plugins',
description: 'Says whether the community plugins and there settings will sync.',
file: ['community-plugins.json', `plugins${slash}*${slash}*`],
- ignore: `plugins${slash}settings-profiles${slash}data.json`
+ ignore: `plugins${slash}settings-profiles${slash}data.json`,
},
- // communityPluginsAdvanced: {
- // name: 'Community plugins advanced',
- // description: 'Advanced settings for the community plugins.',
- // advanced: 'communityPlugins'
- // },
+
+ /*
+ * communityPluginsAdvanced: {
+ * name: 'Community plugins advanced',
+ * description: 'Advanced settings for the community plugins.',
+ * advanced: 'communityPlugins'
+ * },
+ */
corePlugins: {
name: 'Core plugins',
description: 'Says whether the obsidian core plugin settings will sync.',
- file: ['core-plugins.json', 'core-plugins-migration.json', 'backlink.json', 'canvas.json', 'command-palette.json', 'daily-notes.json', 'file-recovery.json', 'note-composer.json', 'page-preview.json', 'switcher.json', 'templates.json', 'workspace.json', 'workspaces.json', 'zk-prefixer.json']
+ file: ['core-plugins.json', 'core-plugins-migration.json', 'backlink.json', 'canvas.json', 'command-palette.json', 'daily-notes.json', 'file-recovery.json', 'note-composer.json', 'page-preview.json', 'switcher.json', 'templates.json', 'workspace.json', 'workspaces.json', 'zk-prefixer.json'],
},
graph: {
name: 'Graph',
description: 'Says whether the obsidian graph settings will sync.',
- file: 'graph.json'
+ file: 'graph.json',
},
hotkeys: {
name: 'Hotkeys',
description: 'Says whether the obsidian hotkey settings will sync.',
- file: 'hotkeys.json'
+ file: 'hotkeys.json',
},
modifiedAt: {
name: 'Modified at',
- description: 'Date time of last modification.'
- }
-}
+ description: 'Date time of last modification.',
+ },
+};
diff --git a/src/settings/SettingsTab.ts b/src/settings/SettingsTab.ts
index 93c2540..e0fc6a8 100644
--- a/src/settings/SettingsTab.ts
+++ b/src/settings/SettingsTab.ts
@@ -33,7 +33,7 @@ export class SettingsProfilesSettingTab extends PluginSettingTab {
// Get text component
const inputEl: HTMLInputElement | null = this.containerEl.querySelector('#profile-path');
if (!inputEl) {
- throw Error("Input element not found! #profile-path");
+ throw Error('Input element not found! #profile-path');
}
inputEl.value = DEFAULT_PROFILE_PATH;
@@ -57,7 +57,8 @@ export class SettingsProfilesSettingTab extends PluginSettingTab {
this.plugin.refreshProfilesList();
this.display();
});
- } catch (e) {
+ }
+ catch (e) {
(e as Error).message = 'Failed to change profiles path! ' + (e as Error).message;
console.error(e);
}
@@ -67,7 +68,7 @@ export class SettingsProfilesSettingTab extends PluginSettingTab {
.onChange(value => {
debounce((value: string) => {
try {
- // Value is changed
+ // Value is changed
if (value !== this.plugin.getProfilesPath()) {
// Textbox empty
if (value === '' || value.trim() === '') {
@@ -75,6 +76,7 @@ export class SettingsProfilesSettingTab extends PluginSettingTab {
text.inputEl.addClass('mod-bad-input');
return;
}
+
// Validate entry is path
else if (!isValidPath([value])) {
console.debug('Entry is not a valid path!');
@@ -97,7 +99,8 @@ export class SettingsProfilesSettingTab extends PluginSettingTab {
this.display();
});
}
- } catch (e) {
+ }
+ catch (e) {
(e as Error).message = 'Failed to change profiles path! ' + (e as Error).message;
console.error(e);
}
@@ -108,13 +111,13 @@ export class SettingsProfilesSettingTab extends PluginSettingTab {
new Setting(containerEl)
.setName('UI update')
.setDesc(createFragment((fragment) => {
- fragment.append(fragment.createEl('div', { text: 'Controls UI update, when disabled, fewer file reads are performed. The status bar icon is deactivated.' }), fragment.createEl('div', { text: 'Requieres reload for changes to take effect!', cls: 'mod-warning' }))
+ fragment.append(fragment.createEl('div', { text: 'Controls UI update, when disabled, fewer file reads are performed. The status bar icon is deactivated.' }), fragment.createEl('div', { text: 'Requieres reload for changes to take effect!', cls: 'mod-warning' }));
}))
.addToggle(toggle => toggle
.setValue(this.plugin.getUiUpdate())
.onChange(value => {
try {
- // Value is changed
+ // Value is changed
if (value !== this.plugin.getUiUpdate()) {
// Set ui update to value
this.plugin.setUiUpdate(value);
@@ -125,7 +128,8 @@ export class SettingsProfilesSettingTab extends PluginSettingTab {
this.display();
});
}
- } catch (e) {
+ }
+ catch (e) {
(e as Error).message = 'Failed to change ui update! ' + (e as Error).message;
console.error(e);
}
@@ -136,7 +140,7 @@ export class SettingsProfilesSettingTab extends PluginSettingTab {
new Setting(containerEl)
.setName('UI update interval')
.setDesc(createFragment((fragment) => {
- fragment.append(fragment.createEl('div', { text: 'The time in ms in which ui is updated' }), fragment.createEl('div', { text: 'Requieres reload for changes to take effect!', cls: 'mod-warning' }))
+ fragment.append(fragment.createEl('div', { text: 'The time in ms in which ui is updated' }), fragment.createEl('div', { text: 'Requieres reload for changes to take effect!', cls: 'mod-warning' }));
}))
.addExtraButton(button => button
.setIcon(ICON_RESET)
@@ -146,7 +150,7 @@ export class SettingsProfilesSettingTab extends PluginSettingTab {
// Get slider component
const sliderEl: HTMLInputElement | null = this.containerEl.querySelector('#ui-interval');
if (!sliderEl) {
- throw Error("Input element not found! #ui-interval");
+ throw Error('Input element not found! #ui-interval');
}
sliderEl.valueAsNumber = DEFAULT_VAULT_SETTINGS.uiUpdateInterval;
@@ -159,7 +163,8 @@ export class SettingsProfilesSettingTab extends PluginSettingTab {
.then(() => {
this.display();
});
- } catch (e) {
+ }
+ catch (e) {
(e as Error).message = 'Failed to reset ui update interval! ' + (e as Error).message;
console.error(e);
}
@@ -171,7 +176,7 @@ export class SettingsProfilesSettingTab extends PluginSettingTab {
.onChange(value => {
debounce((value: number) => {
try {
- // Value is changed
+ // Value is changed
if (value !== this.plugin.getUiRefreshInterval()) {
// Set interval to slider value
this.plugin.setUiRefreshInterval(value);
@@ -182,25 +187,26 @@ export class SettingsProfilesSettingTab extends PluginSettingTab {
this.display();
});
}
- } catch (e) {
+ }
+ catch (e) {
(e as Error).message = 'Failed to change ui update interval! ' + (e as Error).message;
console.error(e);
}
}, 500, true).call(this, value);
})
- .sliderEl.setAttr('id', 'ui-interval'))
+ .sliderEl.setAttr('id', 'ui-interval'));
}
new Setting(containerEl)
.setName('Profile update')
.setDesc(createFragment((fragment) => {
- fragment.append(fragment.createEl('div', { text: 'Controls profile update, when disabled, fewer file reads/writes are performed. Changed settings are not saved automatically.' }), fragment.createEl('div', { text: 'Requieres reload for changes to take effect!', cls: 'mod-warning' }))
+ fragment.append(fragment.createEl('div', { text: 'Controls profile update, when disabled, fewer file reads/writes are performed. Changed settings are not saved automatically.' }), fragment.createEl('div', { text: 'Requieres reload for changes to take effect!', cls: 'mod-warning' }));
}))
.addToggle(toggle => toggle
.setValue(this.plugin.getProfileUpdate())
.onChange(value => {
try {
- // Value is changed
+ // Value is changed
if (value !== this.plugin.getProfileUpdate()) {
// Set profile update to value
this.plugin.setProfileUpdate(value);
@@ -211,7 +217,8 @@ export class SettingsProfilesSettingTab extends PluginSettingTab {
this.display();
});
}
- } catch (e) {
+ }
+ catch (e) {
(e as Error).message = 'Failed to change profile update! ' + (e as Error).message;
console.error(e);
}
@@ -222,7 +229,7 @@ export class SettingsProfilesSettingTab extends PluginSettingTab {
new Setting(containerEl)
.setName('Profile update delay')
.setDesc(createFragment((fragment) => {
- fragment.append(fragment.createEl('div', { text: 'The time in ms that must pass before the profile can be updated again' }), fragment.createEl('div', { text: 'Requieres reload for changes to take effect!', cls: 'mod-warning' }))
+ fragment.append(fragment.createEl('div', { text: 'The time in ms that must pass before the profile can be updated again' }), fragment.createEl('div', { text: 'Requieres reload for changes to take effect!', cls: 'mod-warning' }));
}))
.addExtraButton(button => button
.setIcon(ICON_RESET)
@@ -232,7 +239,7 @@ export class SettingsProfilesSettingTab extends PluginSettingTab {
// Get slider component
const sliderEl: HTMLInputElement | null = this.containerEl.querySelector('#update-delay');
if (!sliderEl) {
- throw Error("Input element not found! #update-delay");
+ throw Error('Input element not found! #update-delay');
}
sliderEl.valueAsNumber = DEFAULT_VAULT_SETTINGS.profileUpdateDelay;
@@ -245,7 +252,8 @@ export class SettingsProfilesSettingTab extends PluginSettingTab {
.then(() => {
this.display();
});
- } catch (e) {
+ }
+ catch (e) {
(e as Error).message = 'Failed to reset profile update interval! ' + (e as Error).message;
console.error(e);
}
@@ -257,7 +265,7 @@ export class SettingsProfilesSettingTab extends PluginSettingTab {
.onChange(value => {
debounce((value: number) => {
try {
- // Value is changed
+ // Value is changed
if (value !== this.plugin.getProfileUpdateDelay()) {
// Set interval to slider value
this.plugin.setProfileUpdateDelay(value);
@@ -268,13 +276,14 @@ export class SettingsProfilesSettingTab extends PluginSettingTab {
this.display();
});
}
- } catch (e) {
+ }
+ catch (e) {
(e as Error).message = 'Failed to change profile update interval! ' + (e as Error).message;
console.error(e);
}
}, 500, true).call(this, value);
})
- .sliderEl.setAttr('id', 'update-delay'))
+ .sliderEl.setAttr('id', 'update-delay'));
}
new Setting(containerEl)
@@ -351,7 +360,7 @@ export class SettingsProfilesSettingTab extends PluginSettingTab {
}));
this.plugin.getProfilesList().forEach(profile => {
- new Setting(containerEl.createEl("div", { cls: "profiles-container" }))
+ new Setting(containerEl.createEl('div', { cls: 'profiles-container' }))
.setName(profile.name)
.setClass(this.plugin.isEnabled(profile) ? 'profile-enabled' : 'profile-disabled')
.addExtraButton(button => button
@@ -367,10 +376,13 @@ export class SettingsProfilesSettingTab extends PluginSettingTab {
});
}).open();
}))
- // .addExtraButton(button => button
- // .setIcon(ICON_PROFILE_ADD_HOTKEY)
- // .setTooltip('Hotkeys')
- // .onClick(() => {
+
+ /*
+ * .addExtraButton(button => button
+ * .setIcon(ICON_PROFILE_ADD_HOTKEY)
+ * .setTooltip('Hotkeys')
+ * .onClick(() => {
+ */
// }))
.addExtraButton(button => button
@@ -385,6 +397,7 @@ export class SettingsProfilesSettingTab extends PluginSettingTab {
.addExtraButton(button => button
.setIcon(ICON_PROFILE_SAVE)
.setTooltip('Save settings to profile')
+
// .setDisabled(!this.plugin.areSettingsChanged(profile) || this.plugin.areSettingsSaved(profile))
.onClick(() => {
new DialogModal(this.app, 'Save current settings to profile?', 'You are about to overwrite the current settings of this profile. This cannot be undone.', async () => {
@@ -393,18 +406,18 @@ export class SettingsProfilesSettingTab extends PluginSettingTab {
new Notice('Saved profile successfully.');
this.display();
});
- }, async () => { }, "Override", true, "Cancel", false)
+ }, async () => { }, 'Override', true, 'Cancel', false)
.open();
}))
.addExtraButton(button => button
.setIcon(this.plugin.isEnabled(profile) ? ICON_CURRENT_PROFILE : ICON_NOT_CURRENT_PROFILE)
- .setTooltip(this.plugin.isEnabled(profile) ? "Deselect profile" : 'Switch to profile')
+ .setTooltip(this.plugin.isEnabled(profile) ? 'Deselect profile' : 'Switch to profile')
.onClick(() => {
- this.plugin.switchProfile(this.plugin.isEnabled(profile) ? "" : profile.name)
+ this.plugin.switchProfile(this.plugin.isEnabled(profile) ? '' : profile.name)
.then(() => {
this.display();
});
}));
- })
+ });
}
}
diff --git a/src/types.d.ts b/src/types.d.ts
new file mode 100644
index 0000000..f73b47d
--- /dev/null
+++ b/src/types.d.ts
@@ -0,0 +1,21 @@
+import { } from 'obsidian';
+
+declare module 'obsidian' {
+ interface Commands {
+ executeCommandById(commandId: string): boolean;
+ }
+
+ interface App {
+ commands: Commands;
+ }
+
+ interface SuggestModal {
+ chooser: SuggestModalChooser;
+ }
+
+ interface SuggestModalChooser {
+ chooser: TModal;
+ values: T[] | null;
+ useSelectedItem(evt: MouseEvent | KeyboardEvent): boolean;
+ }
+}
\ No newline at end of file
diff --git a/src/util/FileSystem.ts b/src/util/FileSystem.ts
index e82ff39..131fc18 100644
--- a/src/util/FileSystem.ts
+++ b/src/util/FileSystem.ts
@@ -1,7 +1,7 @@
-import { copyFileSync, createReadStream, existsSync, mkdirSync, readdirSync, rmSync, rmdirSync, statSync, unlinkSync } from "fs";
-import { FileSystemAdapter } from "obsidian";
-import { basename, dirname, join, normalize, sep as slash } from "path";
-import { PassThrough, Readable } from "stream";
+import { copyFileSync, createReadStream, existsSync, mkdirSync, readdirSync, rmSync, rmdirSync, statSync, unlinkSync } from 'fs';
+import { FileSystemAdapter } from 'obsidian';
+import { basename, dirname, join, normalize, sep as slash } from 'path';
+import { PassThrough, Readable } from 'stream';
/**
* Retruns all files in this direcory. Could be used with placeholder /*\/ for all paths or /* for all files that match the pattern.
@@ -12,63 +12,62 @@ export function getAllFiles(path: string[]): string[] {
let pathSections: string[] = [];
let files: string[] = [];
- try {
- // Check path contains path placeholder
- if (join(...path).includes(`${slash}*${slash}`)) {
- pathSections = join(...path).split(`${slash}*${slash}`);
+ // Check path contains path placeholder
+ if (join(...path).includes(`${slash}*${slash}`)) {
+ pathSections = join(...path).split(`${slash}*${slash}`);
- if (pathSections.length > 0) {
- if (!existsSync(pathSections[0])) {
- console.debug(`The path section does not exist! PathSections: ${pathSections[0]}`);
- return files;
- }
- if (!statSync(pathSections[0]).isDirectory()) {
- console.debug(`The path section is a file and is not inserted, does not match the pattern (/*/)! PathSections: ${pathSections[0]}`);
- return files;
- }
- // Get existing paths for placeholders
- let pathContent = readdirSync(pathSections[0]);
-
- // Add all combined files
- pathContent.forEach(value => {
- const joinedPath = join(pathSections[0], value, ...pathSections.filter((value, index) => index > 0));
- files = files.concat(getAllFiles([joinedPath]));
- });
+ if (pathSections.length > 0) {
+ if (!existsSync(pathSections[0])) {
+ console.debug(`The path section does not exist! PathSections: ${pathSections[0]}`);
+ return files;
}
- }
- // Check path contains file placeholder
- else if (join(...path).endsWith(`${slash}*`)) {
- pathSections = join(...path).split(`${slash}*`);
-
- if (pathSections.length > 0) {
- if (!existsSync(pathSections[0])) {
- console.debug(`The path section does not exist! PathSections: ${pathSections[0]}`);
- return files;
- }
- if (!statSync(pathSections[0]).isDirectory()) {
- console.debug(`The path section is a file and is not inserted, does not match the pattern (/*)! PathSections: ${pathSections[0]}`);
- return files;
- }
- let pathContent = readdirSync(pathSections[0]).map(value => join(pathSections[0], value));
- files = files.concat(...pathContent.filter((value) => {
- return statSync(value).isFile() && !FILE_IGNORE_LIST.contains(basename(value));
- }));
+ if (!statSync(pathSections[0]).isDirectory()) {
+ console.debug(`The path section is a file and is not inserted, does not match the pattern (/*/)! PathSections: ${pathSections[0]}`);
+ return files;
}
+
+ // Get existing paths for placeholders
+ const pathContent = readdirSync(pathSections[0]);
+
+ // Add all combined files
+ pathContent.forEach(value => {
+ const joinedPath = join(pathSections[0], value, ...pathSections.filter((value, index) => index > 0));
+ files = files.concat(getAllFiles([joinedPath]));
+ });
}
- // Path is file
- else if (existsSync(join(...path)) && statSync(join(...path)).isFile()) {
- if (!FILE_IGNORE_LIST.contains(basename(join(...path)))) {
- files.push(...path);
+ }
+
+ // Check path contains file placeholder
+ else if (join(...path).endsWith(`${slash}*`)) {
+ pathSections = join(...path).split(`${slash}*`);
+
+ if (pathSections.length > 0) {
+ if (!existsSync(pathSections[0])) {
+ console.debug(`The path section does not exist! PathSections: ${pathSections[0]}`);
+ return files;
+ }
+ if (!statSync(pathSections[0]).isDirectory()) {
+ console.debug(`The path section is a file and is not inserted, does not match the pattern (/*)! PathSections: ${pathSections[0]}`);
+ return files;
}
+ const pathContent = readdirSync(pathSections[0]).map(value => join(pathSections[0], value));
+ files = files.concat(...pathContent.filter((value) => {
+ return statSync(value).isFile() && !FILE_IGNORE_LIST.contains(basename(value));
+ }));
}
- return files;
- } catch (e) {
- throw e;
}
+
+ // Path is file
+ else if (existsSync(join(...path)) && statSync(join(...path)).isFile()) {
+ if (!FILE_IGNORE_LIST.contains(basename(join(...path)))) {
+ files.push(...path);
+ }
+ }
+ return files;
}
/**
- * Returns all subpaths in this directory. Could be used with placeholder /*\/ for all paths that match the pattern.
+ * Returns all subpaths in this directory. Could be used with placeholder /*\/ for all paths that match the pattern.
* @param path Path to check for subpaths
* @returns an array of path names
*/
@@ -76,45 +75,44 @@ export function getAllSubPaths(path: string[]): string[] {
let pathSections: string[] = [];
let paths: string[] = [];
- try {
- // Check path contains placeholder
- if (join(...path).includes(`${slash}*${slash}`)) {
- pathSections = join(...path).split(`${slash}*${slash}`);
+ // Check path contains placeholder
+ if (join(...path).includes(`${slash}*${slash}`)) {
+ pathSections = join(...path).split(`${slash}*${slash}`);
- if (pathSections.length > 0) {
- if (!existsSync(pathSections[0])) {
- console.debug(`The path section does not exist! PathSections: ${pathSections[0]}`);
- return paths;
- }
- if (!statSync(pathSections[0]).isDirectory()) {
- console.debug(`The path section is a file and is not inserted, does not match the pattern (/*/)! PathSections: ${pathSections[0]}`);
- return paths;
- }
- // Get existing paths for placeholder
- let pathContent = readdirSync(pathSections[0]);
-
- // Add all combined paths
- pathContent.forEach(value => {
- const joinedPath = join(pathSections[0], value, ...pathSections.filter((value, index) => index > 0));
- paths = paths.concat(getAllSubPaths([joinedPath]));
- });
+ if (pathSections.length > 0) {
+ if (!existsSync(pathSections[0])) {
+ console.debug(`The path section does not exist! PathSections: ${pathSections[0]}`);
+ return paths;
}
- }
- // Path doesn't exist
- else if (!existsSync(join(...path))) {
- return [];
- }
- // Get subpath in path
- else {
- let pathContent = readdirSync(join(...path)).map(value => join(...path, value));
- paths = pathContent.filter((value) => {
- return statSync(value).isDirectory();
+ if (!statSync(pathSections[0]).isDirectory()) {
+ console.debug(`The path section is a file and is not inserted, does not match the pattern (/*/)! PathSections: ${pathSections[0]}`);
+ return paths;
+ }
+
+ // Get existing paths for placeholder
+ const pathContent = readdirSync(pathSections[0]);
+
+ // Add all combined paths
+ pathContent.forEach(value => {
+ const joinedPath = join(pathSections[0], value, ...pathSections.filter((value, index) => index > 0));
+ paths = paths.concat(getAllSubPaths([joinedPath]));
});
}
- return paths;
- } catch (e) {
- throw e;
}
+
+ // Path doesn't exist
+ else if (!existsSync(join(...path))) {
+ return [];
+ }
+
+ // Get subpath in path
+ else {
+ const pathContent = readdirSync(join(...path)).map(value => join(...path, value));
+ paths = pathContent.filter((value) => {
+ return statSync(value).isDirectory();
+ });
+ }
+ return paths;
}
/**
@@ -123,23 +121,19 @@ export function getAllSubPaths(path: string[]): string[] {
* @param targetPath The target file
*/
export function keepNewestFile(sourcePath: string[], targetPath: string[]) {
- try {
- const sourceFile = join(...sourcePath);
- const targetFile = join(...targetPath);
-
- // Keep newest file
- if (existsSync(sourceFile) && (!existsSync(targetFile) || statSync(sourceFile).mtime > statSync(targetFile).mtime)) {
- // Check target path exist
- ensurePathExist([dirname(targetFile)])
- copyFileSync(sourceFile, targetFile);
- }
- else if (existsSync(targetFile)) {
- // Check target path exist
- ensurePathExist([dirname(sourceFile)])
- copyFileSync(targetFile, sourceFile);
- }
- } catch (e) {
- throw e;
+ const sourceFile = join(...sourcePath);
+ const targetFile = join(...targetPath);
+
+ // Keep newest file
+ if (existsSync(sourceFile) && (!existsSync(targetFile) || statSync(sourceFile).mtime > statSync(targetFile).mtime)) {
+ // Check target path exist
+ ensurePathExist([dirname(targetFile)]);
+ copyFileSync(sourceFile, targetFile);
+ }
+ else if (existsSync(targetFile)) {
+ // Check target path exist
+ ensurePathExist([dirname(sourceFile)]);
+ copyFileSync(targetFile, sourceFile);
}
}
@@ -150,28 +144,26 @@ export function keepNewestFile(sourcePath: string[], targetPath: string[]) {
* @returns Copy was successfull
*/
export function copyFile(sourcePath: string[], targetPath: string[]) {
- try {
- const sourceFile = normalize(join(...sourcePath));
- const targetFile = normalize(join(...targetPath));
+ const sourceFile = normalize(join(...sourcePath));
+ const targetFile = normalize(join(...targetPath));
- // Check source exist
- if (!isValidPath([sourceFile]) || !existsSync(sourceFile)) {
- throw Error(`Source file does not exist! SourceFile: ${sourceFile}`);
- }
- // Check target path exist
- isValidPath([...targetPath])
- ensurePathExist([targetFile.slice(0, targetFile.lastIndexOf(slash))]);
+ // Check source exist
+ if (!isValidPath([sourceFile]) || !existsSync(sourceFile)) {
+ throw Error(`Source file does not exist! SourceFile: ${sourceFile}`);
+ }
- // Check source is on ignore list
- if (FILE_IGNORE_LIST.contains(basename(sourceFile))) {
- console.warn(`An attempt was made to copy a file that is on the ignore list. File: ${sourceFile}`);
- return;
- }
- // Copy file
- copyFileSync(sourceFile, targetFile);
- } catch (e) {
- throw e;
+ // Check target path exist
+ isValidPath([...targetPath]);
+ ensurePathExist([targetFile.slice(0, targetFile.lastIndexOf(slash))]);
+
+ // Check source is on ignore list
+ if (FILE_IGNORE_LIST.contains(basename(sourceFile))) {
+ console.warn(`An attempt was made to copy a file that is on the ignore list. File: ${sourceFile}`);
+ return;
}
+
+ // Copy file
+ copyFileSync(sourceFile, targetFile);
}
/**
@@ -180,49 +172,48 @@ export function copyFile(sourcePath: string[], targetPath: string[]) {
* @param targetPath The target path where to copy the subfolders/files to
*/
export function copyFolderRecursiveSync(sourcePath: string[], targetPath: string[]) {
- try {
- const source = join(...sourcePath);
- const target = join(...targetPath);
+ const source = join(...sourcePath);
+ const target = join(...targetPath);
- // Check source is a valid path and exist
- if (!isValidPath([source]) || !existsSync(source)) {
- throw Error(`Source path does not exist! Path: ${source}`);
- }
- if (!statSync(source).isDirectory()) {
- throw Error(`Source path is not a path! Path: ${source}`);
- }
- // Check target is a valid path and ensure exist
- if (!isValidPath([target])) {
- throw Error(`Target path is not a vaild path! Path: ${target}`);
- }
- ensurePathExist([target]);
- if (!statSync(target).isDirectory()) {
- throw Error(`Target path is not a path! Path: ${source}`)
- }
+ // Check source is a valid path and exist
+ if (!isValidPath([source]) || !existsSync(source)) {
+ throw Error(`Source path does not exist! Path: ${source}`);
+ }
+ if (!statSync(source).isDirectory()) {
+ throw Error(`Source path is not a path! Path: ${source}`);
+ }
- // Files in source
- const files = readdirSync(source);
-
- files.forEach(file => {
- const sourceFile = join(source, file);
- const targetFile = join(target, file);
-
- if (statSync(sourceFile).isDirectory()) {
- // Copy files in subpath
- copyFolderRecursiveSync([sourceFile], [targetFile]);
- } else {
- // Check source is on ignore list
- if (FILE_IGNORE_LIST.contains(basename(sourceFile))) {
- console.warn(`An attempt was made to copy a file that is on the ignore list. File: ${sourceFile}`);
- return;
- }
- // Copy file
- copyFileSync(sourceFile, targetFile);
- }
- });
- } catch (e) {
- throw e;
+ // Check target is a valid path and ensure exist
+ if (!isValidPath([target])) {
+ throw Error(`Target path is not a vaild path! Path: ${target}`);
+ }
+ ensurePathExist([target]);
+ if (!statSync(target).isDirectory()) {
+ throw Error(`Target path is not a path! Path: ${source}`);
}
+
+ // Files in source
+ const files = readdirSync(source);
+
+ files.forEach(file => {
+ const sourceFile = join(source, file);
+ const targetFile = join(target, file);
+
+ if (statSync(sourceFile).isDirectory()) {
+ // Copy files in subpath
+ copyFolderRecursiveSync([sourceFile], [targetFile]);
+ }
+ else {
+ // Check source is on ignore list
+ if (FILE_IGNORE_LIST.contains(basename(sourceFile))) {
+ console.warn(`An attempt was made to copy a file that is on the ignore list. File: ${sourceFile}`);
+ return;
+ }
+
+ // Copy file
+ copyFileSync(sourceFile, targetFile);
+ }
+ });
}
/**
@@ -232,16 +223,12 @@ export function copyFolderRecursiveSync(sourcePath: string[], targetPath: string
* @returns Returns ``true`` if the path exists, ``false`` if failed to create the path.
*/
export function ensurePathExist(path: string[], recursive = true) {
- try {
- // If path not exist create it
+ // If path not exist create it
+ if (!existsSync(join(...path))) {
+ mkdirSync(join(...path), { recursive });
if (!existsSync(join(...path))) {
- mkdirSync(join(...path), { recursive });
- if (!existsSync(join(...path))) {
- throw Error(`Could not create path! Path: ${path}`);
- }
+ throw Error(`Could not create path! Path: ${path}`);
}
- } catch (e) {
- throw e;
}
}
@@ -252,9 +239,10 @@ export function ensurePathExist(path: string[], recursive = true) {
*/
export function isValidPath(path: string[]) {
// Check is not an empty string
- if (join(...path) === "") {
+ if (join(...path) === '') {
return false;
}
+
// accessSync(path, constants.F_OK);
return true;
@@ -265,33 +253,30 @@ export function isValidPath(path: string[]) {
* @param path The folder to remove
*/
export function removeDirectoryRecursiveSync(path: string[]) {
- try {
- const pathS = join(...path);
-
- if (existsSync(pathS)) {
- if (statSync(pathS).isDirectory()) {
- readdirSync(pathS).forEach(file => {
- const filePath = join(pathS, file);
-
- if (statSync(filePath).isDirectory()) {
- // Recursively remove subdirectories
- removeDirectoryRecursiveSync([filePath]);
- } else {
- // Remove files
- unlinkSync(filePath);
- }
- });
-
- // Remove the empty directory
- rmdirSync(pathS);
- }
- else {
- // Remove file if not directory
- rmSync(pathS);
- }
+ const pathS = join(...path);
+
+ if (existsSync(pathS)) {
+ if (statSync(pathS).isDirectory()) {
+ readdirSync(pathS).forEach(file => {
+ const filePath = join(pathS, file);
+
+ if (statSync(filePath).isDirectory()) {
+ // Recursively remove subdirectories
+ removeDirectoryRecursiveSync([filePath]);
+ }
+ else {
+ // Remove files
+ unlinkSync(filePath);
+ }
+ });
+
+ // Remove the empty directory
+ rmdirSync(pathS);
+ }
+ else {
+ // Remove file if not directory
+ rmSync(pathS);
}
- } catch (e) {
- throw e;
}
}
@@ -312,14 +297,16 @@ export function getVaultPath() {
* Files that generally should not be copied
*/
export const FILE_IGNORE_LIST = [
- '.DS_Store'
+ '.DS_Store',
];
-//----------------------------------------------------//
-// Credits: https://github.com/fent/node-stream-equal //
-//----------------------------------------------------//
+/*
+ * ----------------------------------------------------//
+ * Credits: https://github.com/fent/node-stream-equal //
+ * ----------------------------------------------------//
+ */
/**
- * Checks the file content of the file is equal
+ * Checks the file content of the file is equal
* @param file1 File path of first file
* @param file2 File path of seccond file
* @returns Are the files equal
@@ -329,8 +316,8 @@ export function filesEqual(file1: string, file2: string): Promise {
const stream2 = createReadStream(file2);
return new Promise((resolve, reject) => {
- let readStream1 = stream1.pipe(new PassThrough({ objectMode: true }));
- let readStream2 = stream2.pipe(new PassThrough({ objectMode: true }));
+ const readStream1 = stream1.pipe(new PassThrough({ objectMode: true }));
+ const readStream2 = stream2.pipe(new PassThrough({ objectMode: true }));
const cleanup = (equal: boolean) => {
stream1.removeListener('error', reject);
@@ -373,7 +360,7 @@ export function filesEqual(file1: string, file2: string): Promise {
// Start by reading from the first stream.
streamState1.stream.once('readable', streamState1.read);
- })
+ });
}
interface StreamState {
@@ -385,16 +372,18 @@ interface StreamState {
read: () => void;
}
-//----------------------------------------------------//
-// Credits: https://github.com/fent/node-stream-equal //
-//----------------------------------------------------//
+/*
+ * ----------------------------------------------------//
+ * Credits: https://github.com/fent/node-stream-equal //
+ * ----------------------------------------------------//
+ */
/**
- * Creates a function that gets when a stream read
- *
- * @param streamState1
- * @param streamState2
- * @param resolve
- * @returns
+ * Creates a function that gets when a stream read
+ *
+ * @param streamState1
+ * @param streamState2
+ * @param resolve
+ * @returns
*/
function createOnRead(streamState1: StreamState, streamState2: StreamState, resolve: (equal: boolean) => void): () => void {
return () => {
@@ -407,7 +396,8 @@ function createOnRead(streamState1: StreamState, streamState2: StreamState, reso
if (!Buffer.isBuffer(data)) {
if (typeof data === 'object') {
data = JSON.stringify(data);
- } else {
+ }
+ else {
data = data.toString();
}
data = Buffer.from(data);
@@ -419,12 +409,12 @@ function createOnRead(streamState1: StreamState, streamState2: StreamState, reso
if (!streamState2.data) {
return resolve(false);
}
- let minLength = Math.min(data.length, streamState2.data.length);
+ const minLength = Math.min(data.length, streamState2.data.length);
- let streamData = data.slice(0, minLength);
+ const streamData = data.slice(0, minLength);
streamState1.data = data.slice(minLength);
- let otherStreamData = streamState2.data.slice(0, minLength);
+ const otherStreamData = streamState2.data.slice(0, minLength);
streamState2.data = streamState2.data.slice(minLength);
// Compare.
@@ -433,33 +423,38 @@ function createOnRead(streamState1: StreamState, streamState2: StreamState, reso
return resolve(false);
}
}
-
- } else {
+ }
+ else {
streamState1.data = data;
}
-
streamState1.pos = newPos;
if (newPos > streamState2.pos) {
if (streamState2.ended) {
- // If this stream is still emitting `data` events but the other has
- // ended, then this is longer than the other one.
+ /*
+ * If this stream is still emitting `data` events but the other has
+ * ended, then this is longer than the other one.
+ */
return resolve(false);
}
- // If this stream has caught up to the other,
- // read from other one.
+ /*
+ * If this stream has caught up to the other,
+ * read from other one.
+ */
streamState2.read();
-
- } else {
+ }
+ else {
streamState1.read();
}
};
-};
+}
-//----------------------------------------------------//
-// Credits: https://github.com/fent/node-stream-equal //
-//----------------------------------------------------//
+/*
+ * ----------------------------------------------------//
+ * Credits: https://github.com/fent/node-stream-equal //
+ * ----------------------------------------------------//
+ */
/**
* Creates a function that gets called when a stream ends.
*
@@ -472,8 +467,9 @@ function createOnEndFn(streamState1: StreamState, streamState2: StreamState, res
streamState1.ended = true;
if (streamState2.ended) {
resolve(streamState1.pos === streamState2.pos);
- } else {
+ }
+ else {
streamState2.read();
}
};
-};
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/src/util/SettingsFiles.ts b/src/util/SettingsFiles.ts
index 2cdd236..b486d97 100644
--- a/src/util/SettingsFiles.ts
+++ b/src/util/SettingsFiles.ts
@@ -1,12 +1,12 @@
-import { existsSync, readFileSync, statSync, writeFileSync } from "fs";
-import { join, normalize, sep as slash } from "path";
-import { PROFILE_OPTIONS_MAP, ProfileOptions } from "src/settings/SettingsInterface";
-import { ensurePathExist, filesEqual, getAllFiles, isValidPath } from "./FileSystem";
+import { existsSync, readFileSync, statSync, writeFileSync } from 'fs';
+import { join, normalize, sep as slash } from 'path';
+import { PROFILE_OPTIONS_MAP, ProfileOptions } from 'src/settings/SettingsInterface';
+import { ensurePathExist, filesEqual, getAllFiles, isValidPath } from './FileSystem';
/**
* Saves the profile options data to the path.
* @param profile The profile to save
- * @param profilesPath The path where the profile should be saved
+ * @param profilesPath The path where the profile should be saved
*/
export async function saveProfileOptions(profile: ProfileOptions, profilesPath: string) {
try {
@@ -14,18 +14,21 @@ export async function saveProfileOptions(profile: ProfileOptions, profilesPath:
if (!profile) {
throw Error(`Can't save undefined profile! Profile: ${JSON.stringify(profile)}`);
}
+
// Ensure is valid path
if (!isValidPath([profilesPath, profile.name])) {
- throw Error(`Invalid path received! ProfilesPath: ${profilesPath}`)
+ throw Error(`Invalid path received! ProfilesPath: ${profilesPath}`);
}
+
// Ensure path exist
ensurePathExist([profilesPath, profile.name]);
// Write profile settings to path
- const file = join(profilesPath, profile.name, "profile.json");
+ const file = join(profilesPath, profile.name, 'profile.json');
const profileSettings = JSON.stringify(profile, null, 2);
writeFileSync(file, profileSettings, 'utf-8');
- } catch (e) {
+ }
+ catch (e) {
(e as Error).message = 'Failed to save profile data! ' + (e as Error).message;
throw e;
}
@@ -34,7 +37,7 @@ export async function saveProfileOptions(profile: ProfileOptions, profilesPath:
/**
* Saves the profiles options data to the path.
* @param profilesList The profiles to save
- * @param profilesPath The path where the profiles should be saved
+ * @param profilesPath The path where the profiles should be saved
*/
export async function saveProfilesOptions(profilesList: ProfileOptions[], profilesPath: string) {
try {
@@ -43,19 +46,22 @@ export async function saveProfilesOptions(profilesList: ProfileOptions[], profil
if (!profile) {
throw Error(`Can't save undefined profile! Profile: ${JSON.stringify(profile)}`);
}
+
// Ensure is valid path
if (!isValidPath([profilesPath, profile.name])) {
- throw Error(`Invalid path received! ProfilesPath: ${profilesPath}`)
+ throw Error(`Invalid path received! ProfilesPath: ${profilesPath}`);
}
+
// Ensure path exist
ensurePathExist([profilesPath, profile.name]);
// Write profile settings to path
- const file = join(profilesPath, profile.name, "profile.json");
+ const file = join(profilesPath, profile.name, 'profile.json');
const profileSettings = JSON.stringify(profile, null, 2);
writeFileSync(file, profileSettings, 'utf-8');
});
- } catch (e) {
+ }
+ catch (e) {
(e as Error).message = 'Failed to save profiles data! ' + (e as Error).message + ` ProfilesList: ${JSON.stringify(profilesList)}`;
throw e;
}
@@ -72,6 +78,7 @@ export function loadProfileOptions(profile: Partial, profilesPat
if (!profile.name) {
throw Error(`Name is requierd! Profile: ${JSON.stringify(profile)}`);
}
+
// Search for all profiles existing
const file = join(profilesPath, profile.name, 'profile.json');
let profileData: ProfileOptions | undefined = undefined;
@@ -85,18 +92,19 @@ export function loadProfileOptions(profile: Partial, profilesPat
}
// Read profile settings
- const data = readFileSync(file, "utf-8");
+ const data = readFileSync(file, 'utf-8');
profileData = JSON.parse(data);
if (!profileData) {
- throw Error(`Failed to read profile from file!`);
+ throw Error('Failed to read profile from file!');
}
// Convert date string to date
profileData.modifiedAt = new Date(profileData.modifiedAt);
return profileData;
- } catch (e) {
+ }
+ catch (e) {
(e as Error).message = 'Failed to load profile data! ' + (e as Error).message;
throw e;
}
@@ -110,7 +118,7 @@ export function loadProfilesOptions(profilesPath: string): ProfileOptions[] {
try {
// Search for all profiles existing
const files = getAllFiles([profilesPath, `${slash}*${slash}profile.json`]);
- let profilesList: ProfileOptions[] = [];
+ const profilesList: ProfileOptions[] = [];
// Read profile settings
files.forEach(file => {
@@ -121,11 +129,11 @@ export function loadProfilesOptions(profilesPath: string): ProfileOptions[] {
if (!statSync(file).isFile()) {
throw Error(`The path does not point to a file. Path: ${file}`);
}
- const data = readFileSync(file, "utf-8");
- let profileData = JSON.parse(data);
+ const data = readFileSync(file, 'utf-8');
+ const profileData = JSON.parse(data);
if (!profileData) {
- throw Error(`Failed to read profile from file!`);
+ throw Error('Failed to read profile from file!');
}
// Convert date string to date
@@ -134,7 +142,8 @@ export function loadProfilesOptions(profilesPath: string): ProfileOptions[] {
profilesList.push(profileData);
});
return profilesList;
- } catch (e) {
+ }
+ catch (e) {
(e as Error).message = 'Failed to load profiles data! ' + (e as Error).message;
throw e;
}
@@ -149,7 +158,7 @@ export function loadProfilesOptions(profilesPath: string): ProfileOptions[] {
export function getConfigFilesList(profile: ProfileOptions): string[] {
const files = [];
for (const key in profile) {
- if (profile.hasOwnProperty(key)) {
+ if (Object.prototype.hasOwnProperty.call(profile, key)) {
const value = profile[key as keyof ProfileOptions];
if (typeof value === 'boolean' && key !== 'enabled' && value) {
const file = PROFILE_OPTIONS_MAP[key as keyof ProfileOptions]?.file;
@@ -159,7 +168,7 @@ export function getConfigFilesList(profile: ProfileOptions): string[] {
else if (file && Array.isArray(file)) {
file.forEach(f => {
files.push(normalize(f));
- })
+ });
}
}
}
@@ -179,12 +188,13 @@ export function getFilesWithoutPlaceholder(filesList: string[], path: string[]):
filesList.forEach(file => {
if ((file.includes(`${slash}*${slash}`) || file.includes(`${slash}*`))) {
const pathVariants = getAllFiles([...path, file])
+
// Trim the start of path
- .map(value => value.split(slash).slice(-file.split(slash).length))
+ .map(value => value.split(slash).slice(-file.split(slash).length));
pathVariants.forEach(value => {
- files.push(join(...value))
- })
+ files.push(join(...value));
+ });
}
else {
files.push(file);
@@ -203,7 +213,7 @@ export function getFilesWithoutPlaceholder(filesList: string[], path: string[]):
export function getIgnoreFilesList(profile: ProfileOptions): string[] {
const files = [];
for (const key in profile) {
- if (profile.hasOwnProperty(key)) {
+ if (Object.prototype.hasOwnProperty.call(profile, key)) {
const value = profile[key as keyof ProfileOptions];
if (value && typeof value === 'boolean') {
const file = PROFILE_OPTIONS_MAP[key as keyof ProfileOptions]?.ignore;
@@ -213,7 +223,7 @@ export function getIgnoreFilesList(profile: ProfileOptions): string[] {
else if (file && Array.isArray(file)) {
file.forEach(f => {
files.push(normalize(f));
- })
+ });
}
}
}
@@ -225,7 +235,7 @@ export function getIgnoreFilesList(profile: ProfileOptions): string[] {
/**
* Filter the file list to only include not ignore files
* @param filesList Files list to compare
- * @param profile The profile for which the ignore files
+ * @param profile The profile for which the ignore files
* @returns The filtered files list
*/
export function filterIgnoreFilesList(filesList: string[], profile: ProfileOptions): string[] {
@@ -236,7 +246,7 @@ export function filterIgnoreFilesList(filesList: string[], profile: ProfileOptio
/**
* Filter the file list to only include unchanged files
* @param filesList Files list to compare
- * @param sourcePath The path to the source file
+ * @param sourcePath The path to the source file
* @param targetPath The path to the target file
* @returns The filtered files list
*/
@@ -253,28 +263,31 @@ export function filterUnchangedFiles(filesList: string[], sourcePath: string[],
return false;
}
const targetFile = join(...targetPath, file);
- // Check target don't exist
+
+ // Check target don't exist
if (!existsSync(targetFile)) {
return false;
}
const targetStat = statSync(targetFile);
+
// Check target is file
if (!targetStat.isFile()) {
return false;
}
+
// Check file size
if (sourceStat.size !== targetStat.size) {
return false;
}
return filesEqual(sourceFile, targetFile);
- })
+ });
}
/**
* Filter the file list to only include changed files
* @param filesList Files list to compare
- * @param sourcePath The path to the source file
+ * @param sourcePath The path to the source file
* @param targetPath The path to the target file
* @returns The filtered files list
*/
@@ -287,33 +300,37 @@ export function filterChangedFiles(filesList: string[], sourcePath: string[], ta
return false;
}
const sourceStat = statSync(sourceFile);
+
// Check source is file
if (!sourceStat.isFile()) {
return false;
}
const targetFile = join(...targetPath, file);
- // Check target don't exist
+
+ // Check target don't exist
if (!existsSync(targetFile)) {
return true;
}
const targetStat = statSync(targetFile);
+
// Check target is file
if (!targetStat.isFile()) {
return true;
}
+
// Check file size
if (sourceStat.size !== targetStat.size) {
return true;
}
return !filesEqual(sourceFile, targetFile);
- })
+ });
}
/**
* Filter the file list to only include the files there are newer in source than in target
* @param filesList Files list to compare
- * @param sourcePath The path to the source file
+ * @param sourcePath The path to the source file
* @param targetPath The path to the target file
* @returns The filterd files list
*/
@@ -330,20 +347,21 @@ export function filterNewerFiles(filesList: string[], sourcePath: string[], targ
return false;
}
const targetFile = join(...targetPath, file);
- // Check target don't exist
+
+ // Check target don't exist
if (!existsSync(targetFile)) {
return true;
}
const targetStat = statSync(targetFile);
return sourceStat.mtime.getTime() > targetStat.mtime.getTime();
- })
+ });
}
/**
* Check the files list contains a changed file
* @param filesList Files list to compare
- * @param sourcePath The path to the source file
+ * @param sourcePath The path to the source file
* @param targetPath The path to the target file
* @returns Is there a changed file
*/
@@ -360,20 +378,23 @@ export function containsChangedFiles(filesList: string[], sourcePath: string[],
return true;
}
const targetFile = join(...targetPath, file);
- // Check target don't exist
+
+ // Check target don't exist
if (!existsSync(targetFile)) {
return false;
}
const targetStat = statSync(targetFile);
+
// Check target is file
if (!targetStat.isFile()) {
return false;
}
+
// Check file size
if (sourceStat.size !== targetStat.size) {
return false;
}
return await filesEqual(sourceFile, targetFile);
- })
+ });
}
\ No newline at end of file
diff --git a/test/version.test.ts b/test/version.test.ts
new file mode 100644
index 0000000..2e293f1
--- /dev/null
+++ b/test/version.test.ts
@@ -0,0 +1,9 @@
+import { version as manifestVersion, minAppVersion as manifestMinAppVersion } from '../manifest.json';
+import { version as packageVersion } from '../package.json';
+import versions from '../versions.json';
+
+test('Versions matching', () => {
+ expect(manifestVersion).toBe(packageVersion);
+ expect(Object.keys(versions).find(value => value === manifestVersion)).toBe(manifestVersion);
+ expect(Object.entries(versions).find(value => value[0] === manifestVersion)?.[1]).toBe(manifestMinAppVersion);
+});
\ No newline at end of file
diff --git a/tsconfig.json b/tsconfig.json
index 2d6fbdf..aa144cf 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -10,6 +10,8 @@
"moduleResolution": "node",
"importHelpers": true,
"isolatedModules": true,
+ "esModuleInterop": true,
+ "resolveJsonModule": true,
"strictNullChecks": true,
"lib": [
"DOM",
diff --git a/version-bump.mjs b/version-bump.mjs
deleted file mode 100644
index 504f88e..0000000
--- a/version-bump.mjs
+++ /dev/null
@@ -1,24 +0,0 @@
-import { readFileSync, writeFileSync } from "fs";
-
-const targetVersion = process.env.npm_package_version;
-
-// read minAppVersion from manifest.json and bump version to target version
-let manifest = JSON.parse(readFileSync("manifest.json", "utf8"));
-const { minAppVersion } = manifest;
-manifest.version = targetVersion;
-writeFileSync("manifest.json", JSON.stringify(manifest, null, "\t"));
-
-// read versions file
-let versions = JSON.parse(readFileSync("versions.json", "utf8"));
-let keys = Object.keys(versions);
-
-// remove existing versions with minAppVersion
-keys.forEach(key => {
- if (minAppVersion === versions[key]) {
- delete versions[key];
- }
-});
-
-// update versions.json with target version and minAppVersion from manifest.json
-versions[targetVersion] = minAppVersion;
-writeFileSync("versions.json", JSON.stringify(versions, null, "\t"));
diff --git a/version-change.mjs b/version-change.mjs
new file mode 100644
index 0000000..240c6ae
--- /dev/null
+++ b/version-change.mjs
@@ -0,0 +1,45 @@
+import { readFileSync, writeFileSync } from "fs";
+import { valid } from "semver";
+
+const newVersion = process.argv.find(value => value.startsWith('--new_version'));
+if (!newVersion) {
+ throw Error('Param --new_version is missing!');
+}
+const targetVersion = newVersion.split('=')[1];
+if (!targetVersion) {
+ throw Error('Param --new_version is empty!');
+}
+if (!valid(targetVersion)) {
+ throw Error('New version is invalid!')
+}
+
+// read minAppVersion from manifest.json
+let manifestFile = JSON.parse(readFileSync("manifest.json", "utf8"));
+const { minAppVersion } = manifestFile;
+if (!minAppVersion || minAppVersion === "") {
+ throw Error('Missing minAppVersion in "manifest.json"');
+}
+
+// update version to target version
+manifestFile.version = targetVersion;
+writeFileSync("manifest.json", JSON.stringify(manifestFile, null, "\t"));
+
+// update version in package
+let packageFile = JSON.parse(readFileSync("package.json", "utf8"));
+packageFile.version = targetVersion;
+writeFileSync("package.json", JSON.stringify(packageFile, null, "\t"));
+
+// read versions file
+let versionsFile = JSON.parse(readFileSync("versions.json", "utf8"));
+let keys = Object.keys(versionsFile);
+
+// remove existing versions with same minAppVersion
+keys.forEach(key => {
+ if (minAppVersion === versionsFile[key]) {
+ delete versionsFile[key];
+ }
+});
+
+// update versions.json with target version and minAppVersion from manifest.json
+versionsFile[targetVersion] = minAppVersion;
+writeFileSync("versions.json", JSON.stringify(versionsFile, null, "\t"));