From 0067e82a9d2d3483ca725d71c2e5961e61624c47 Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Fri, 8 Aug 2025 17:25:13 +0200 Subject: [PATCH 01/17] docs: added section in readme about how to create a new release correctly --- README.md | 29 +++++++++++++++++++++++++++++ cSpell.json | 1 + 2 files changed, 30 insertions(+) diff --git a/README.md b/README.md index a25c566..d73d1fe 100644 --- a/README.md +++ b/README.md @@ -139,6 +139,35 @@ node-plugin/ | `package.json` | The npm [manifest file](https://docs.npmjs.com/cli/v7/configuring-npm/package-json), which informs the `npm` command. | | `target/` | Binary artifacts generated by the Rust build. | +## Creating a New Release + +1. Switch to another branch. (`main` is protected.) +2. **Bump the package version:** + Multiple packages need to be bumped to the same version. + For this purpose there exists a [bun](https://bun.sh/) script which does this automatically. + ```sh + # major, minor and patch are acceptable parameters: + bun run ./scripts/update-version.bun.ts minor + ``` +3. Open a PR and merge the branch into `main`. +4. Switch to `main` and fetch the new commit. +5. **Tag the commit correctly.** + The tag must be the same as the one in the `package.json`. + As an example: If `package.json` has the field: + ```jsonc + "version": "0.15.0", + ``` + then the tag must be **`v0.15.0`**. + + If you are on powershell and have [ripgrep](https://github.com/BurntSushi/ripgrep) installed: + ```pwsh + git checkout main + git pull + $CAL_NODE_VERSION = rg '^.*\"version\"\:\s*\"(?[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,})\".*$' .\package.json -r '$version' + git tag -s "v$CAL_NODE_VERSION" + git push origin "v$CAL_NODE_VERSION" + ``` + ## Learn More Learn more about: diff --git a/cSpell.json b/cSpell.json index ee04b76..45d9e5b 100644 --- a/cSpell.json +++ b/cSpell.json @@ -14,6 +14,7 @@ "msvc", "nmshd", "pswd", + "pwsh", "robinraju", "rustup", "softprops", From 106eb9b437b91bc3ca058753b95e78e4246041c9 Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Fri, 8 Aug 2025 17:46:32 +0200 Subject: [PATCH 02/17] build: add new version of version bump script for nodejs --- scripts/update-version.node.mjs | 52 +++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 scripts/update-version.node.mjs diff --git a/scripts/update-version.node.mjs b/scripts/update-version.node.mjs new file mode 100644 index 0000000..f705a6e --- /dev/null +++ b/scripts/update-version.node.mjs @@ -0,0 +1,52 @@ +import { execSync } from "node:child_process"; +import { readFileSync, writeFileSync } from "node:fs"; +import { join, dirname } from "node:path"; +import { fileURLToPath } from "node:url"; +import { argv, exit } from "node:process"; + +const sourceFileDir = dirname(fileURLToPath(import.meta.url)); +const packageRootDir = join(sourceFileDir, ".."); +const packageJsonPath = join(packageRootDir, "package.json"); + +const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8")); + +const currentVersion = packageJson.version; +console.log("Current version: ", currentVersion); + +if (argv.length !== 3) { + console.log("USAGE: node update-version.node.mjs [patch/minor/major]"); + exit(1); +} +if (!["patch", "minor", "major"].includes(argv[2])) { + console.log( + `'${argv[2]}' is not a valid argument. Valid arguments are patch, minor, major`, + ); + exit(1); +} + +execSync(`npm --no-git-tag-version version ${argv[2]}`, { + cwd: packageRootDir, + stdio: "inherit", +}); + +const packageJsonContent = readFileSync(packageJsonPath, "utf-8"); +const packageJsonFileParsed = JSON.parse(packageJsonContent); + +const newVersion = packageJsonFileParsed.version; +console.log("New version: ", newVersion); + +packageJsonFileParsed.optionalDependencies[ + "@nmshd/rs-crypto-node-win32-x64-msvc" +] = newVersion; +packageJsonFileParsed.optionalDependencies["@nmshd/rs-crypto-node-darwin-x64"] = + newVersion; +packageJsonFileParsed.optionalDependencies[ + "@nmshd/rs-crypto-node-darwin-arm64" +] = newVersion; +packageJsonFileParsed.optionalDependencies[ + "@nmshd/rs-crypto-node-linux-x64-gnu" +] = newVersion; + +writeFileSync(packageJsonPath, JSON.stringify(packageJsonFileParsed, null, 2)); + +console.log("Success!"); From 9eb9bc794f682e32a904f1388af9adbdd75e67c4 Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Fri, 8 Aug 2025 17:52:11 +0200 Subject: [PATCH 03/17] build: add bump commands to package json --- package.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4ac9100..a694b0d 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,10 @@ "version": "neon bump --binaries platforms && git add .", "release": "gh workflow run release.yml -f dryrun=false -f version=patch", "dryrun": "gh workflow run publish.yml -f dryrun=true", - "format": "prettier src/ --write && prettier tests/ --write" + "format": "prettier src/ --write && prettier tests/ --write", + "bump:patch": "node scripts/update-version.node.mjs patch", + "bump:minor": "node scripts/update-version.node.mjs minor", + "bump:major": "node scripts/update-version.node.mjs major" }, "exports": { ".": { @@ -71,4 +74,4 @@ "@nmshd/rs-crypto-node-linux-x64-gnu": "0.15.0", "@nmshd/rs-crypto-node-win32-x64-msvc": "0.15.0" } -} \ No newline at end of file +} From 8d78a5e688bb7156276dadb2727a138a5de9f958 Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Fri, 8 Aug 2025 18:04:36 +0200 Subject: [PATCH 04/17] docs: added instructions for publishing a new release via node --- README.md | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d73d1fe..0a1aecd 100644 --- a/README.md +++ b/README.md @@ -144,11 +144,18 @@ node-plugin/ 1. Switch to another branch. (`main` is protected.) 2. **Bump the package version:** Multiple packages need to be bumped to the same version. - For this purpose there exists a [bun](https://bun.sh/) script which does this automatically. - ```sh - # major, minor and patch are acceptable parameters: - bun run ./scripts/update-version.bun.ts minor - ``` + For this purpose there exist [node](https://nodejs.org/en) and [bun](https://bun.sh/) scripts which do this automatically: + * **node**: + ```sh + npm run bump:patch + npm run bump:minor + npm run bump:major + ``` + * **bun**: + ```sh + # major, minor and patch are acceptable parameters: + bun run ./scripts/update-version.bun.ts minor + ``` 3. Open a PR and merge the branch into `main`. 4. Switch to `main` and fetch the new commit. 5. **Tag the commit correctly.** @@ -168,6 +175,15 @@ node-plugin/ git push origin "v$CAL_NODE_VERSION" ``` + Or on bash: + ```bash + git checkout main + git pull + CAL_NODE_VERSION=$(grep -o '"version": "[0-9]\+\.[0-9]\+\.[0-9]\+"' package.json | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+') + git tag -s "v$CAL_NODE_VERSION" + git push origin "v$CAL_NODE_VERSION" + ``` + ## Learn More Learn more about: From 699453775f56e568a536d9fdf80ce12b32322b2d Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Fri, 8 Aug 2025 18:21:29 +0200 Subject: [PATCH 05/17] docs: fixed some incorrect documentation, removed commands that should not be used --- README.md | 24 +++++++++--------------- package.json | 4 +--- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 0a1aecd..bf16d1e 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,10 @@ [![NPM Version](https://img.shields.io/npm/v/%40nmshd%2Frs-crypto-node)](https://www.npmjs.com/package/@nmshd/rs-crypto-node) -> [!WARNING] -> Currently this node plugin crashes quite ungracefully. (See [#Debugging]) +**Crypto Layer TS interface for nodejs.** > [!WARNING] -> File storage works with fs locks and closing is sluggish. -> Closing and reopening a provider with the same file store might result in an db lock error. - -**Crypto Layer TS interface for nodejs.** +> Currently crypto-layer errors are not correctly mapped to javascript errors. (See [#Debugging]) This project was bootstrapped by [create-neon](https://www.npmjs.com/package/create-neon). @@ -84,15 +80,7 @@ Similar to `npm run build` but generates a debug build with `cargo`. Similar to `npm run build` but uses [cross-rs](https://github.com/cross-rs/cross) to cross-compile for another platform. Use the [`CARGO_BUILD_TARGET`](https://doc.rust-lang.org/cargo/reference/config.html#buildtarget) environment variable to select the build target. -#### `npm run release` - -Initiate a full build and publication of a new patch release of this library via GitHub Actions. - -#### `npm run dryrun` - -Initiate a dry run of a patch release of this library via GitHub Actions. This performs a full build but does not publish the final result. - -#### `npm test` +#### `npm run test` Runs the unit tests written with `jest`. @@ -100,6 +88,12 @@ The project must be compiled with `npm run debug` (recommended) or `npm run buil Consider running the tests with logging and full backtrace: +```pwsh +$RUST_LOG="info" +$RUST_BACKTRACE="full" +npm test +``` + ```bash RUST_LOG=info RUST_BACKTRACE=full npm test ``` diff --git a/package.json b/package.json index a694b0d..5196c8f 100644 --- a/package.json +++ b/package.json @@ -17,10 +17,8 @@ "build": "npm run cargo-build -- --release", "cross": "npm run cross-build -- --release", "prepack": "tsc &&neon update", - "version": "neon bump --binaries platforms && git add .", - "release": "gh workflow run release.yml -f dryrun=false -f version=patch", - "dryrun": "gh workflow run publish.yml -f dryrun=true", "format": "prettier src/ --write && prettier tests/ --write", + "version": "neon bump --binaries platforms && git add .", "bump:patch": "node scripts/update-version.node.mjs patch", "bump:minor": "node scripts/update-version.node.mjs minor", "bump:major": "node scripts/update-version.node.mjs major" From bce851e290b2280eb027d3a7b49bf30ef0820312 Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Fri, 8 Aug 2025 18:33:16 +0200 Subject: [PATCH 06/17] docs: moved development docs to separate file --- DEVELOPMENT.md | 182 +++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 181 +++--------------------------------------------- cSpell.json | 1 + 3 files changed, 191 insertions(+), 173 deletions(-) create mode 100644 DEVELOPMENT.md diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md new file mode 100644 index 0000000..84888af --- /dev/null +++ b/DEVELOPMENT.md @@ -0,0 +1,182 @@ +# `crypto-layer-node` Development Documentation + +## Building `crypto-layer-node` + +Building crypto-layer-node requires a [supported version of Node and Rust](https://github.com/neon-bindings/neon#platform-support). + +To run the build, run: + +```pwsh +npm i +npm run build +``` + +This command uses the [@neon-rs/cli](https://www.npmjs.com/package/@neon-rs/cli) utility to assemble the binary Node addon from the output of `cargo`. + +## Debugging + +- Compile the library with debug: + + ``` + npm run debug + ``` + +- Activate logging: + + ```bash + RUST_LOG=trace + ``` + + ```pwsh + $env:RUST_LOG="trace" + ``` + + Available levels are `trace`, `debug`, `info`, `warn` and `error`. + + It is possible to filter according to modules (see the [docs](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html)). + + ```pwsh + $env:RUST_LOG="crypto_layer_node=trace,crypto_layer=warn" + ``` + +- Activate full backtrace: + + ```bash + RUST_BACKTRACE=full + ``` + + ```pwsh + $env:RUST_BACKTRACE="full" + ``` + +## Available Scripts + +In the project directory, you can run: + +#### `npm run build` + +Builds the Node addon (`index.node`) from source, generating a release build with `cargo --release`. + +Additional [`cargo build`](https://doc.rust-lang.org/cargo/commands/cargo-build.html) arguments may be passed to `npm run build` and similar commands. For example, to enable a [cargo feature](https://doc.rust-lang.org/cargo/reference/features.html): + +``` +npm run build -- --feature=beetle +``` + +#### `npm run debug` + +Similar to `npm run build` but generates a debug build with `cargo`. + +#### `npm run cross` + +Similar to `npm run build` but uses [cross-rs](https://github.com/cross-rs/cross) to cross-compile for another platform. Use the [`CARGO_BUILD_TARGET`](https://doc.rust-lang.org/cargo/reference/config.html#buildtarget) environment variable to select the build target. + +#### `npm run test` + +Runs the unit tests written with `jest`. + +The project must be compiled with `npm run debug` (recommended) or `npm run build` beforehand. + +Consider running the tests with logging and full backtrace: + +```pwsh +$RUST_LOG="info" +$RUST_BACKTRACE="full" +npm test +``` + +```bash +RUST_LOG=info RUST_BACKTRACE=full npm test +``` + +#### `npm run bump:patch` && `npm run bump:minor` && `npm run bump:major` + +Bump the version of this package and the versions of the subpackages. + +## Project Layout + +The directory structure of this project is: + +``` +node-plugin/ +├── Cargo.toml +├── README.md +├── lib/ +├── src/ +| ├── index.mts +| └── index.cts +├── crates/ +| └── crypto-layer-ts/ +| └── src/ +| └── lib.rs +├── platforms/ +├── package.json +└── target/ +``` + +| Entry | Purpose | +| -------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `Cargo.toml` | The Cargo [manifest file](https://doc.rust-lang.org/cargo/reference/manifest.html), which informs the `cargo` command. | +| `README.md` | This file. | +| `lib/` | The directory containing the generated output from [tsc](https://typescriptlang.org). | +| `src/` | The directory containing the TypeScript source files. | +| `index.mts` | Entry point for when this library is loaded via [ESM `import`](https://nodejs.org/api/esm.html#modules-ecmascript-modules) syntax. | +| `index.cts` | Entry point for when this library is loaded via [CJS `require`](https://nodejs.org/api/modules.html#requireid). | +| `crates/` | The directory tree containing the Rust source code for the project. | +| `lib.rs` | Entry point for the Rust source code. | +| `platforms/` | The directory containing distributions of the binary addon backend for each platform supported by this library. | +| `package.json` | The npm [manifest file](https://docs.npmjs.com/cli/v7/configuring-npm/package-json), which informs the `npm` command. | +| `target/` | Binary artifacts generated by the Rust build. | + +## Creating a New Release + +1. Switch to another branch. (`main` is protected.) +2. **Bump the package version:** + Multiple packages need to be bumped to the same version. + For this purpose there exist [node](https://nodejs.org/en) and [bun](https://bun.sh/) scripts which do this automatically: + * **node**: + ```sh + npm run bump:patch + npm run bump:minor + npm run bump:major + ``` + * **bun**: + ```sh + # major, minor and patch are acceptable parameters: + bun run ./scripts/update-version.bun.ts minor + ``` +3. Open a PR and merge the branch into `main`. +4. Switch to `main` and fetch the new commit. +5. **Tag the commit correctly.** + The tag must be the same as the one in the `package.json`. + As an example: If `package.json` has the field: + ```jsonc + "version": "0.15.0", + ``` + then the tag must be **`v0.15.0`**. + + If you are on powershell and have [ripgrep](https://github.com/BurntSushi/ripgrep) installed: + ```pwsh + git checkout main + git pull + $CAL_NODE_VERSION = rg '^.*\"version\"\:\s*\"(?[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,})\".*$' .\package.json -r '$version' + git tag -s "v$CAL_NODE_VERSION" + git push origin "v$CAL_NODE_VERSION" + ``` + + Or on bash: + ```bash + git checkout main + git pull + CAL_NODE_VERSION=$(grep -o '"version": "[0-9]\+\.[0-9]\+\.[0-9]\+"' package.json | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+') + git tag -s "v$CAL_NODE_VERSION" + git push origin "v$CAL_NODE_VERSION" + ``` + +## Learn More + +Learn more about: + +- [Neon](https://neon-bindings.com). +- [Rust](https://www.rust-lang.org). +- [Node](https://nodejs.org). diff --git a/README.md b/README.md index bf16d1e..0c7115c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# crypto-layer-node +# `crypto-layer-node` [![NPM Version](https://img.shields.io/npm/v/%40nmshd%2Frs-crypto-node)](https://www.npmjs.com/package/@nmshd/rs-crypto-node) @@ -7,181 +7,16 @@ > [!WARNING] > Currently crypto-layer errors are not correctly mapped to javascript errors. (See [#Debugging]) -This project was bootstrapped by [create-neon](https://www.npmjs.com/package/create-neon). - -## Building crypto-layer-node - -Building crypto-layer-node requires a [supported version of Node and Rust](https://github.com/neon-bindings/neon#platform-support). - -To run the build, run: - -```pwsh -npm i -npm run build -``` - -This command uses the [@neon-rs/cli](https://www.npmjs.com/package/@neon-rs/cli) utility to assemble the binary Node addon from the output of `cargo`. - -## Debugging - -- Compile the library with debug: - - ``` - npm run debug - ``` - -- Activate logging: - - ```bash - RUST_LOG=trace - ``` - - ```pwsh - $env:RUST_LOG="trace" - ``` - - Available levels are `trace`, `debug`, `info`, `warn` and `error`. - - It is possible to filter according to modules (see the [docs](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html)). - - ```pwsh - $env:RUST_LOG="crypto_layer_node=trace,crypto_layer=warn" - ``` - -- Activate full backtrace: - - ```bash - RUST_BACKTRACE=full - ``` - - ```pwsh - $env:RUST_BACKTRACE="full" - ``` - -## Available Scripts - -In the project directory, you can run: +## Usage -#### `npm run build` +## Development && Building && Debugging -Builds the Node addon (`index.node`) from source, generating a release build with `cargo --release`. +For development docs or for docs on how to build the project yourself see [`DEVELOPMENT.md`](./DEVELOPMENT.md). -Additional [`cargo build`](https://doc.rust-lang.org/cargo/commands/cargo-build.html) arguments may be passed to `npm run build` and similar commands. For example, to enable a [cargo feature](https://doc.rust-lang.org/cargo/reference/features.html): +## Acknowledgments -``` -npm run build -- --feature=beetle -``` - -#### `npm run debug` - -Similar to `npm run build` but generates a debug build with `cargo`. - -#### `npm run cross` - -Similar to `npm run build` but uses [cross-rs](https://github.com/cross-rs/cross) to cross-compile for another platform. Use the [`CARGO_BUILD_TARGET`](https://doc.rust-lang.org/cargo/reference/config.html#buildtarget) environment variable to select the build target. - -#### `npm run test` - -Runs the unit tests written with `jest`. - -The project must be compiled with `npm run debug` (recommended) or `npm run build` beforehand. - -Consider running the tests with logging and full backtrace: - -```pwsh -$RUST_LOG="info" -$RUST_BACKTRACE="full" -npm test -``` - -```bash -RUST_LOG=info RUST_BACKTRACE=full npm test -``` - -## Project Layout - -The directory structure of this project is: - -``` -node-plugin/ -├── Cargo.toml -├── README.md -├── lib/ -├── src/ -| ├── index.mts -| └── index.cts -├── crates/ -| └── crypto-layer-ts/ -| └── src/ -| └── lib.rs -├── platforms/ -├── package.json -└── target/ -``` - -| Entry | Purpose | -| -------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| `Cargo.toml` | The Cargo [manifest file](https://doc.rust-lang.org/cargo/reference/manifest.html), which informs the `cargo` command. | -| `README.md` | This file. | -| `lib/` | The directory containing the generated output from [tsc](https://typescriptlang.org). | -| `src/` | The directory containing the TypeScript source files. | -| `index.mts` | Entry point for when this library is loaded via [ESM `import`](https://nodejs.org/api/esm.html#modules-ecmascript-modules) syntax. | -| `index.cts` | Entry point for when this library is loaded via [CJS `require`](https://nodejs.org/api/modules.html#requireid). | -| `crates/` | The directory tree containing the Rust source code for the project. | -| `lib.rs` | Entry point for the Rust source code. | -| `platforms/` | The directory containing distributions of the binary addon backend for each platform supported by this library. | -| `package.json` | The npm [manifest file](https://docs.npmjs.com/cli/v7/configuring-npm/package-json), which informs the `npm` command. | -| `target/` | Binary artifacts generated by the Rust build. | - -## Creating a New Release - -1. Switch to another branch. (`main` is protected.) -2. **Bump the package version:** - Multiple packages need to be bumped to the same version. - For this purpose there exist [node](https://nodejs.org/en) and [bun](https://bun.sh/) scripts which do this automatically: - * **node**: - ```sh - npm run bump:patch - npm run bump:minor - npm run bump:major - ``` - * **bun**: - ```sh - # major, minor and patch are acceptable parameters: - bun run ./scripts/update-version.bun.ts minor - ``` -3. Open a PR and merge the branch into `main`. -4. Switch to `main` and fetch the new commit. -5. **Tag the commit correctly.** - The tag must be the same as the one in the `package.json`. - As an example: If `package.json` has the field: - ```jsonc - "version": "0.15.0", - ``` - then the tag must be **`v0.15.0`**. - - If you are on powershell and have [ripgrep](https://github.com/BurntSushi/ripgrep) installed: - ```pwsh - git checkout main - git pull - $CAL_NODE_VERSION = rg '^.*\"version\"\:\s*\"(?[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,})\".*$' .\package.json -r '$version' - git tag -s "v$CAL_NODE_VERSION" - git push origin "v$CAL_NODE_VERSION" - ``` - - Or on bash: - ```bash - git checkout main - git pull - CAL_NODE_VERSION=$(grep -o '"version": "[0-9]\+\.[0-9]\+\.[0-9]\+"' package.json | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+') - git tag -s "v$CAL_NODE_VERSION" - git push origin "v$CAL_NODE_VERSION" - ``` - -## Learn More +This project was bootstrapped by [create-neon](https://www.npmjs.com/package/create-neon). -Learn more about: +## License -- [Neon](https://neon-bindings.com). -- [Rust](https://www.rust-lang.org). -- [Node](https://nodejs.org). +`crypto-layer-node` is licensed under the [MIT license](./LICENSE). diff --git a/cSpell.json b/cSpell.json index 45d9e5b..0c47c3e 100644 --- a/cSpell.json +++ b/cSpell.json @@ -18,6 +18,7 @@ "robinraju", "rustup", "softprops", + "subpackages", "Swatinem", "thiserror", "tojs", From 10ab6e9bc2592886de760d7be937fa5e6a972815 Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Fri, 8 Aug 2025 18:41:32 +0200 Subject: [PATCH 07/17] docs: addded missing license file The license file went missing during the transfer from the rust-crypto repo to the crypto-layer-node repo. --- DEVELOPMENT.md | 2 +- LICENSE | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 LICENSE diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 84888af..aa2cc8b 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -130,7 +130,7 @@ node-plugin/ ## Creating a New Release -1. Switch to another branch. (`main` is protected.) +1. Be on another branch. (`main` is protected.) 2. **Bump the package version:** Multiple packages need to be bumped to the same version. For this purpose there exist [node](https://nodejs.org/en) and [bun](https://bun.sh/) scripts which do this automatically: diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..5f90a33 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 j&s-soft GmbH + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From 885c7a36cdd68376df4c2fb85bd4dfcc2519a0cf Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Fri, 8 Aug 2025 19:00:22 +0200 Subject: [PATCH 08/17] docs: fix example, add usage and add a note regarding missing apple provider --- README.md | 18 ++++++ example/.gitignore | 5 ++ example/README.md | 11 +--- example/bun.lockb | Bin 3141 -> 0 bytes example/index.ts | 17 +++--- example/package-lock.json | 114 -------------------------------------- example/package.json | 2 +- 7 files changed, 35 insertions(+), 132 deletions(-) delete mode 100644 example/bun.lockb delete mode 100644 example/package-lock.json diff --git a/README.md b/README.md index 0c7115c..38a8885 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,26 @@ > [!WARNING] > Currently crypto-layer errors are not correctly mapped to javascript errors. (See [#Debugging]) +> [!NOTE] +> MacOS and IOS providers are currently not included, as they'd require the nodejs addon to be signed. + ## Usage +`crypto-layer-node` implements the [TypeScript API of `rust-crypto` / `crypto-layer`](https://github.com/nmshd/rust-crypto/tree/main/ts-types). +For documentation regarding the API head to [`rust-crypto`s documentation](https://github.com/nmshd/rust-crypto). +(Currently no version of `rust-crypto` is released. Thus there is no build of the docs on docs.rs). + +### Installation + +```sh +npm i @nmshd/rs-crypto-types +npm i @nmshd/rs-crypto-node +``` + +### Example + +Have a look at the example in [`./example`](./example/index.ts). + ## Development && Building && Debugging For development docs or for docs on how to build the project yourself see [`DEVELOPMENT.md`](./DEVELOPMENT.md). diff --git a/example/.gitignore b/example/.gitignore index b36da39..fdb4fd7 100644 --- a/example/.gitignore +++ b/example/.gitignore @@ -1,5 +1,10 @@ # Based on https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore +# lock files (they get in the way of pulling the latest version of `@nmshd/rs-crypto-types`) + +package-lock.json +bun.lockb + index.js # Logs diff --git a/example/README.md b/example/README.md index 0e49425..3d60d23 100644 --- a/example/README.md +++ b/example/README.md @@ -1,13 +1,8 @@ -# cal-node-example +# `crypto-layer-node` Example -To install dependencies: +Install dependencies and run the example (be sure to compile the nodejs addon beforehand): -```bash +```sh npm i -``` - -To run: - -```bash npm run tests ``` diff --git a/example/bun.lockb b/example/bun.lockb deleted file mode 100644 index 406de338e7ca89620a94b50d5ad5e47907364e76..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3141 zcmd5;3s6*L6uyhg!zB@j9wU;A2u;G?eY51QOBhX)n8;&DUgfghT`ug4doRyQmKkdh zX#x{LG#Sz46$*|_M#E_Fm=c}994DwCdPrhsnNG|!K>vUD{;)NPXwBf6`RCmK?)kp| z{O6p#=L7|cb7@MPL0ZIwB~O@a8L)eA470BQPXeG* zfL;o86Q>UW4M^=m9)>*xG_Ymup0LO4pYct0JLmRPSB#|O)~i1oFO>RTTYaRzrm!yS zB3UU;c`Kx2{nJaWn!bs++K=jj?O~yB5E+2xKM9Nilr><51AibNTwY);L=avNjMYx~ z;DvyJ4Z@!U&kBHt5q1S@8CVMugueoe*8#jA&>*h&?0*=zbQHkDvtjO_UWlOc3jtok z;bAeL_Y38K_Au^CI4nFL?%g`KAU~Oa;T@Z>L=AJ zhrfFA{T?S?=Xmlxj}vDaN={Ip2kVlDJtgPb_y11n4;HVgic^d}R^8K>F;v<5Xwd1h zo{gKDzUw&E+~K`4>zMEJ4f+q#0)vj*O-{Tp-bncM-H|2R5;TqOFZKSg`RaHPe{gkw z??ib>@j-3Kz$&$udT7|3XAan#J=qgl9F{J%N9Wor!tGFi~{Wi5J!x68`Q3MOS@(^Sb@w_fezEzKLy% z9(#P~M@i7bBXYma(${CAhntKi!gpOK`x{b&m@nJbPu=wQA=3h?g`18|ZFqC{4#2xu zg5r+!{rItn?%$8Qi-l?9zC}Hp7HDWnkCPUf(V0v*>bQ6!MG#t{Od_PoBEo726Dou{ z6KS+q4WK`=GCkuExPf)}D@W+TwOfHES1!{6+#MKTzTo!({+D6iAx8vv9Wn_nmEjR+u0V4F_$2~Y;!?@KVAeX^$AlnY zaP~m61i&b9Svao1O1T?;I(t*+l+uJbkD&193K)X2=u8O=MOutnp>!??5wk&HXgzz{ z*+2c>qxM$#!GR3ETRw6`^GiTZCqvT&1=!NR5SGLnVkXU;Pdg)&=XnKQ)03PBt=t3# zY5>GrdZ%z>dYwsRv2G_sM1jt1GZ9RojiB`uX=9#YAH`q_%w!lFy-qBq2qQ@|R3UD$ znX_ozN*Tp-Mq&{(6~V|$6*yxof;*OC9{8*chi2_r4!H_)aP-hY?lGU9hi=ve(B;!2 zHlcFJb9W3p0-)GXI7-BEi(JcgQcvFXBF<)j#(67ZYedP0giWR+f%CXDmjggGw*f>d MTn2f#dVJv2Uv7LybpQYW diff --git a/example/index.ts b/example/index.ts index d61b043..14b9961 100644 --- a/example/index.ts +++ b/example/index.ts @@ -9,7 +9,7 @@ import { exit } from "process"; console.log("Providers: ", getAllProviders()); -let providerConfig: ProviderConfig = { +const providerConfig: ProviderConfig = { max_security_level: "Software", min_security_level: "Software", supported_asym_spec: ["P256"], @@ -17,14 +17,13 @@ let providerConfig: ProviderConfig = { supported_hashes: ["Sha2_256", "Sha2_384"], }; -let providerImplConfig: ProviderImplConfig = { +const providerImplConfig: ProviderImplConfig = { additional_config: [ { FileStoreConfig: { db_dir: "./db" } }, - { StorageConfigPass: "1234" }, ], }; -let provider = await createProvider(providerConfig, providerImplConfig); +const provider = await createProvider(providerConfig, providerImplConfig); if (!provider) { console.log("Failed creating provider."); @@ -34,7 +33,7 @@ if (!provider) { console.log("Provider initialized: ", await provider.providerName()); console.log("Capabilities: ", await provider.getCapabilities()); -let keypairspec: KeyPairSpec = { +const keyPairSpec: KeyPairSpec = { asym_spec: "P256", cipher: null, signing_hash: "Sha2_224", @@ -44,22 +43,22 @@ let keypairspec: KeyPairSpec = { console.log("Creating KeyPair"); -let keypair = (await provider.createKeyPair(keypairspec)) as KeyPairHandle; +const keyPair = (await provider.createKeyPair(keyPairSpec)) as KeyPairHandle; console.log("Created KeyPair"); -let data = Uint8Array.from([1, 2, 3, 4]); +const data = Uint8Array.from([1, 2, 3, 4]); console.log("Data: ", data); -let signature = await keypair.signData(data); +const signature = await keyPair.signData(data); console.log("Signature: ", signature); try { console.log( "Verified: ", - (await keypair.verifySignature(data, signature)) ? "OK" : "FAILURE", + (await keyPair.verifySignature(data, signature)) ? "OK" : "FAILURE", ); } catch (e) { console.log("Error while verifying:\n", e); diff --git a/example/package-lock.json b/example/package-lock.json deleted file mode 100644 index c893f52..0000000 --- a/example/package-lock.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "name": "cal-node-example", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "cal-node-example", - "dependencies": { - "@nmshd/rs-crypto-types": "^0.1.0", - "crypto-layer-node": "file:..", - "crypto-layer-ts-types": "file:../../ts-types" - }, - "devDependencies": { - "@types/bun": "latest" - }, - "peerDependencies": { - "typescript": "^5.0.0" - } - }, - "..": { - "version": "0.1.0", - "license": "MIT", - "dependencies": { - "@neon-rs/load": "^0.1.73", - "@nmshd/rs-crypto-types": "^0.1.0" - }, - "devDependencies": { - "@jest/globals": "^29.7.0", - "@neon-rs/cli": "^0.1.73", - "@tsconfig/node20": "^20.1.4", - "@types/jest": "^29.5.14", - "@types/node": "^20.11.16", - "jest": "^29.7.0", - "ts-jest": "^29.2.5", - "typescript": "^5.3.3" - } - }, - "../../ts-types": { - "name": "crypto-layer-ts-types", - "version": "0.1.0", - "license": "MIT", - "devDependencies": { - "@types/node": "^22.9.1", - "typescript": "^5.6.3" - } - }, - "node_modules/@nmshd/rs-crypto-types": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@nmshd/rs-crypto-types/-/rs-crypto-types-0.1.0.tgz", - "integrity": "sha512-48z9KGVzJb9D4UFA2Iqba2d07txWlJIQyRWpeomEeP8jHYWERlB/fSCPaMaWbrgwPhuu/JwHmvKaW6+7DLNKxA==", - "license": "MIT" - }, - "node_modules/@types/bun": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/@types/bun/-/bun-1.1.14.tgz", - "integrity": "sha512-opVYiFGtO2af0dnWBdZWlioLBoxSdDO5qokaazLhq8XQtGZbY4pY3/JxY8Zdf/hEwGubbp7ErZXoN1+h2yesxA==", - "dev": true, - "license": "MIT", - "dependencies": { - "bun-types": "1.1.37" - } - }, - "node_modules/@types/node": { - "version": "20.12.14", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "node_modules/@types/ws": { - "version": "8.5.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/bun-types": { - "version": "1.1.37", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "~20.12.8", - "@types/ws": "~8.5.10" - } - }, - "node_modules/crypto-layer-node": { - "resolved": "..", - "link": true - }, - "node_modules/crypto-layer-ts-types": { - "resolved": "../../ts-types", - "link": true - }, - "node_modules/typescript": { - "version": "5.7.2", - "license": "Apache-2.0", - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/undici-types": { - "version": "5.26.5", - "dev": true, - "license": "MIT" - } - } -} diff --git a/example/package.json b/example/package.json index 2a7e094..8cb2135 100644 --- a/example/package.json +++ b/example/package.json @@ -12,7 +12,7 @@ "typescript": "^5.0.0" }, "dependencies": { - "@nmshd/rs-crypto-types": "^0.1.0", + "@nmshd/rs-crypto-types": "*", "crypto-layer-node": "file:.." } } From 905c423c965d670a942efa22f006a5ebd0e6482e Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Fri, 8 Aug 2025 19:11:19 +0200 Subject: [PATCH 09/17] docs: updated project description to current projects goal --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 38a8885..d8335b3 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,11 @@ [![NPM Version](https://img.shields.io/npm/v/%40nmshd%2Frs-crypto-node)](https://www.npmjs.com/package/@nmshd/rs-crypto-node) -**Crypto Layer TS interface for nodejs.** +**Node.js Addon providing TypeScript bindings for `rust-crypto` / `crypto-layer`.** + +This is a Node.js Addon built with [Neon](https://github.com/neon-bindings) that implements +the TypeScript bindings for [`rust-crypto` / `crypto-layer`](https://github.com/nmshd/rust-crypto). +The TypeScript interface definitions are provided by the [`@nmshd/rs-crypto-types`](https://github.com/nmshd/rust-crypto/tree/main/ts-types) package. > [!WARNING] > Currently crypto-layer errors are not correctly mapped to javascript errors. (See [#Debugging]) From 0279d6b9c06cea7f987a197eaa1a1556cd7555d5 Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Fri, 8 Aug 2025 19:13:04 +0200 Subject: [PATCH 10/17] docs: fixed description in package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5196c8f..00842bc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@nmshd/rs-crypto-node", "version": "0.15.0", - "description": "crypto layer ts interface for nodejs", + "description": "Node.js Addon providing TypeScript bindings for rust-crypto (crypto-layer).", "homepage": "https://enmeshed.eu", "repository": "github:nmshd/crypto-layer-node", "license": "MIT", From 166610f22f4b6ff0005ca79029e2e514eff255d1 Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Fri, 8 Aug 2025 19:17:12 +0200 Subject: [PATCH 11/17] build: add update command --- DEVELOPMENT.md | 4 ++++ package.json | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index aa2cc8b..969e9f0 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -93,6 +93,10 @@ RUST_LOG=info RUST_BACKTRACE=full npm test Bump the version of this package and the versions of the subpackages. +#### `npm run update` + +Update rust and npm dependencies. + ## Project Layout The directory structure of this project is: diff --git a/package.json b/package.json index 00842bc..4c5d96c 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "version": "neon bump --binaries platforms && git add .", "bump:patch": "node scripts/update-version.node.mjs patch", "bump:minor": "node scripts/update-version.node.mjs minor", - "bump:major": "node scripts/update-version.node.mjs major" + "bump:major": "node scripts/update-version.node.mjs major", + "update": "cargo update && npm update" }, "exports": { ".": { From f7fec1650e77dec74ae31fc46c877275a7be5a1f Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Fri, 8 Aug 2025 20:57:55 +0200 Subject: [PATCH 12/17] chore: updated versions of dependencies --- Cargo.lock | 225 +++++++++++-- package-lock.json | 823 +++++++++++++++++++++++----------------------- package.json | 3 + 3 files changed, 617 insertions(+), 434 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 166adee..8b487fe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -190,9 +190,9 @@ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "cc" -version = "1.2.30" +version = "1.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deec109607ca693028562ed836a5f1c4b8bd77755c4e132fc5ce11b0b6211ae7" +checksum = "2352e5597e9c544d5e6d9c95190d5d27738ade584fa8db0a16e130e5c2b5296e" dependencies = [ "shlex", ] @@ -371,7 +371,7 @@ dependencies = [ [[package]] name = "crypto-layer" version = "0.1.0" -source = "git+https://github.com/nmshd/rust-crypto.git#c96a86eff27576760fca9076b37e070ba2c4195f" +source = "git+https://github.com/nmshd/rust-crypto.git#2562f01e1798bd8c91c429b4e2f7e045831dfcc7" dependencies = [ "anyhow", "argon2", @@ -387,9 +387,12 @@ dependencies = [ "nanoid", "p256", "pollster", + "r2d2", + "r2d2_sqlite", "ring", "rmp-serde", "robusta_jni", + "rusqlite_migration", "security-framework", "security-framework-sys", "serde", @@ -575,9 +578,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "5.4.0" +version = "5.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae" +checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" dependencies = [ "concurrent-queue", "parking", @@ -604,6 +607,18 @@ dependencies = [ "once_cell", ] +[[package]] +name = "fallible-iterator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" + +[[package]] +name = "fallible-streaming-iterator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" + [[package]] name = "fastrand" version = "2.3.0" @@ -632,6 +647,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + [[package]] name = "fs2" version = "0.4.3" @@ -656,9 +677,9 @@ checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" -version = "2.6.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5edaec856126859abb19ed65f39e90fea3a9574b9707f13539acf4abf7eb532" +checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" dependencies = [ "futures-core", "pin-project-lite", @@ -726,6 +747,24 @@ dependencies = [ "subtle", ] +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash", +] + +[[package]] +name = "hashlink" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" +dependencies = [ + "hashbrown", +] + [[package]] name = "heck" version = "0.5.0" @@ -758,9 +797,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "indenter" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" +checksum = "964de6e86d545b246d84badc0fef527924ace5134f30641c203ef52ba83f58d5" [[package]] name = "inout" @@ -864,7 +903,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" dependencies = [ "cfg-if", - "windows-targets 0.53.2", + "windows-targets 0.53.3", +] + +[[package]] +name = "libsqlite3-sys" +version = "0.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "133c182a6a2c87864fe97778797e46c7e999672690dc9fa3ee8e241aa4a9c13f" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", ] [[package]] @@ -1106,7 +1156,17 @@ checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", "lock_api", - "parking_lot_core", + "parking_lot_core 0.8.6", +] + +[[package]] +name = "parking_lot" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" +dependencies = [ + "lock_api", + "parking_lot_core 0.9.11", ] [[package]] @@ -1118,11 +1178,24 @@ dependencies = [ "cfg-if", "instant", "libc", - "redox_syscall", + "redox_syscall 0.2.16", "smallvec", "winapi", ] +[[package]] +name = "parking_lot_core" +version = "0.9.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.5.17", + "smallvec", + "windows-targets 0.52.6", +] + [[package]] name = "password-hash" version = "0.5.0" @@ -1176,6 +1249,12 @@ dependencies = [ "spki", ] +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + [[package]] name = "pollster" version = "0.4.0" @@ -1258,6 +1337,28 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" +[[package]] +name = "r2d2" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51de85fb3fb6524929c8a2eb85e6b6d363de4e8c48f9e2c2eac4944abc181c93" +dependencies = [ + "log", + "parking_lot 0.12.4", + "scheduled-thread-pool", +] + +[[package]] +name = "r2d2_sqlite" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63417e83dc891797eea3ad379f52a5986da4bca0d6ef28baf4d14034dd111b0c" +dependencies = [ + "r2d2", + "rusqlite", + "uuid", +] + [[package]] name = "rand" version = "0.8.5" @@ -1326,6 +1427,15 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.5.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" +dependencies = [ + "bitflags 2.9.1", +] + [[package]] name = "regex" version = "1.11.1" @@ -1443,11 +1553,35 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "rusqlite" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "165ca6e57b20e1351573e3729b958bc62f0e48025386970b6e4d29e7a7e71f3f" +dependencies = [ + "bitflags 2.9.1", + "fallible-iterator", + "fallible-streaming-iterator", + "hashlink", + "libsqlite3-sys", + "smallvec", +] + +[[package]] +name = "rusqlite_migration" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fc9767ae49274bafd3e55be9d30405a033b7a59548327d87fd4971fbb58e264" +dependencies = [ + "log", + "rusqlite", +] + [[package]] name = "rustc-demangle" -version = "0.1.25" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[package]] name = "rustc_version" @@ -1458,6 +1592,12 @@ dependencies = [ "semver", ] +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + [[package]] name = "ryu" version = "1.0.20" @@ -1473,6 +1613,15 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "scheduled-thread-pool" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cbc66816425a074528352f5789333ecff06ca41b36b0b0efdfbb29edc391a19" +dependencies = [ + "parking_lot 0.12.4", +] + [[package]] name = "scopeguard" version = "1.2.0" @@ -1495,9 +1644,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" +checksum = "80fb1d92c5028aa318b4b8bd7302a5bfcf48be96a37fc6fc790f806b0004ee0c" dependencies = [ "bitflags 2.9.1", "core-foundation", @@ -1550,9 +1699,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.141" +version = "1.0.142" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b9eff21ebe718216c6ec64e1d9ac57087aad11efc64e32002bce4a0d4c03d3" +checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7" dependencies = [ "itoa", "memchr", @@ -1608,9 +1757,9 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "sled" @@ -1625,7 +1774,7 @@ dependencies = [ "fxhash", "libc", "log", - "parking_lot", + "parking_lot 0.11.2", ] [[package]] @@ -1762,9 +1911,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.46.1" +version = "1.47.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" dependencies = [ "backtrace", "io-uring", @@ -1873,12 +2022,30 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" +[[package]] +name = "uuid" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" +dependencies = [ + "getrandom 0.3.3", + "js-sys", + "rand 0.9.2", + "wasm-bindgen", +] + [[package]] name = "valuable" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + [[package]] name = "version_check" version = "0.9.5" @@ -1918,6 +2085,7 @@ checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", + "rustversion", "wasm-bindgen-macro", ] @@ -1998,6 +2166,12 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + [[package]] name = "windows-sys" version = "0.52.0" @@ -2034,10 +2208,11 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.53.2" +version = "0.53.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" +checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" dependencies = [ + "windows-link", "windows_aarch64_gnullvm 0.53.0", "windows_aarch64_msvc 0.53.0", "windows_i686_gnu 0.53.0", diff --git a/package-lock.json b/package-lock.json index af12864..ad67c49 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,10 +30,10 @@ "typescript-eslint": "^8.25.0" }, "optionalDependencies": { - "@nmshd/rs-crypto-node-darwin-arm64": "0.14.0", - "@nmshd/rs-crypto-node-darwin-x64": "0.14.0", - "@nmshd/rs-crypto-node-linux-x64-gnu": "0.14.0", - "@nmshd/rs-crypto-node-win32-x64-msvc": "0.14.0" + "@nmshd/rs-crypto-node-darwin-arm64": "0.15.0", + "@nmshd/rs-crypto-node-darwin-x64": "0.15.0", + "@nmshd/rs-crypto-node-linux-x64-gnu": "0.15.0", + "@nmshd/rs-crypto-node-win32-x64-msvc": "0.15.0" } }, "node_modules/@ampproject/remapping": { @@ -51,24 +51,24 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", - "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "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, "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.25.9", + "@babel/helper-validator-identifier": "^7.27.1", "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" + "picocolors": "^1.1.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.26.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.8.tgz", - "integrity": "sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.0.tgz", + "integrity": "sha512-60X7qkglvrap8mn1lh2ebxXdZYtUcpd7gsmy9kLaBJ4i/WdY8PqTSdxyA8qraikqKQK5C1KRBKXqznrVapyNaw==", "dev": true, "license": "MIT", "engines": { @@ -76,22 +76,22 @@ } }, "node_modules/@babel/core": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.10.tgz", - "integrity": "sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.0.tgz", + "integrity": "sha512-UlLAnTPrFdNGoFtbSXwcGFQBtQZJCNjaN6hQNP3UPvuNXT1i82N26KL3dZeIpNalWywr9IuQuncaAfUaS1g6sQ==", "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.10", - "@babel/helper-compilation-targets": "^7.26.5", - "@babel/helper-module-transforms": "^7.26.0", - "@babel/helpers": "^7.26.10", - "@babel/parser": "^7.26.10", - "@babel/template": "^7.26.9", - "@babel/traverse": "^7.26.10", - "@babel/types": "^7.26.10", + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.0", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-module-transforms": "^7.27.3", + "@babel/helpers": "^7.27.6", + "@babel/parser": "^7.28.0", + "@babel/template": "^7.27.2", + "@babel/traverse": "^7.28.0", + "@babel/types": "^7.28.0", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -107,16 +107,16 @@ } }, "node_modules/@babel/generator": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.0.tgz", - "integrity": "sha512-VybsKvpiN1gU1sdMZIp7FcqphVVKEwcuj02x73uvcHE0PTihx1nlBcowYWhDwjpoAXRv43+gDzyggGnn1XZhVw==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.0.tgz", + "integrity": "sha512-lJjzvrbEeWrhB4P3QBsH7tey117PjLZnDbLiQEKjQ/fNJTjuq4HSqgFA+UNSwZT8D7dxxbnuSBMsa1lrWzKlQg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.27.0", - "@babel/types": "^7.27.0", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", + "@babel/parser": "^7.28.0", + "@babel/types": "^7.28.0", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" }, "engines": { @@ -124,14 +124,14 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.0.tgz", - "integrity": "sha512-LVk7fbXml0H2xH34dFzKQ7TDZ2G4/rVTOrq9V+icbbadjbVxxeFeDsNHv2SrZeWoA+6ZiTyWYWtScEIW07EAcA==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", + "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.26.8", - "@babel/helper-validator-option": "^7.25.9", + "@babel/compat-data": "^7.27.2", + "@babel/helper-validator-option": "^7.27.1", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" @@ -140,30 +140,40 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-module-imports": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", - "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", + "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", "dev": true, "license": "MIT", "dependencies": { - "@babel/traverse": "^7.25.9", - "@babel/types": "^7.25.9" + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", - "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.3.tgz", + "integrity": "sha512-dSOvYwvyLsWBeIRyOeHXp5vPj5l1I011r52FM1+r1jCERv+aFXYk4whgQccYEGYxK2H3ZAIA8nuPkQ0HaUo3qg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-module-imports": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9", - "@babel/traverse": "^7.25.9" + "@babel/helper-module-imports": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1", + "@babel/traverse": "^7.27.3" }, "engines": { "node": ">=6.9.0" @@ -173,9 +183,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.26.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.26.5.tgz", - "integrity": "sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz", + "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==", "dev": true, "license": "MIT", "engines": { @@ -183,9 +193,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", - "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", + "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, "license": "MIT", "engines": { @@ -193,9 +203,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", - "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "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, "license": "MIT", "engines": { @@ -203,9 +213,9 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", - "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", "dev": true, "license": "MIT", "engines": { @@ -213,27 +223,27 @@ } }, "node_modules/@babel/helpers": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.0.tgz", - "integrity": "sha512-U5eyP/CTFPuNE3qk+WZMxFkp/4zUzdceQlfzf7DdGdhp+Fezd7HD+i8Y24ZuTMKX3wQBld449jijbGq6OdGNQg==", + "version": "7.28.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.2.tgz", + "integrity": "sha512-/V9771t+EgXz62aCcyofnQhGM8DQACbRhvzKFsXKC9QM+5MadF8ZmIm0crDMaz3+o0h0zXfJnd4EhbYbxsrcFw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.27.0", - "@babel/types": "^7.27.0" + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.2" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.0.tgz", - "integrity": "sha512-iaepho73/2Pz7w2eMS0Q5f83+0RKI7i4xmiYeBmDzfRVbQtTOG7Ts0S4HzJVsTMGI9keU8rNfuZr8DKfSt7Yyg==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.0.tgz", + "integrity": "sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.27.0" + "@babel/types": "^7.28.0" }, "bin": { "parser": "bin/babel-parser.js" @@ -298,13 +308,13 @@ } }, "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz", - "integrity": "sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz", + "integrity": "sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -340,13 +350,13 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz", - "integrity": "sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz", + "integrity": "sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -466,13 +476,13 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz", - "integrity": "sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz", + "integrity": "sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.9" + "@babel/helper-plugin-utils": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -482,58 +492,48 @@ } }, "node_modules/@babel/template": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.0.tgz", - "integrity": "sha512-2ncevenBqXI6qRMukPlXwHKHchC7RyMuu4xv5JBXRfOGVcTy1mXCD12qrp7Jsoxll1EV3+9sE4GugBVRjT2jFA==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.26.2", - "@babel/parser": "^7.27.0", - "@babel/types": "^7.27.0" + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.0.tgz", - "integrity": "sha512-19lYZFzYVQkkHkl4Cy4WrAVcqBkgvV2YM2TU3xG6DIwO7O3ecbDPfW3yM3bjAGcqcQHi+CCtjMR3dIEHxsd6bA==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.0.tgz", + "integrity": "sha512-mGe7UK5wWyh0bKRfupsUchrQGqvDbZDbKJw+kcRGSmdHVYrv+ltd0pnpDTVpiTqnaBru9iEvA8pz8W46v0Amwg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.27.0", - "@babel/parser": "^7.27.0", - "@babel/template": "^7.27.0", - "@babel/types": "^7.27.0", - "debug": "^4.3.1", - "globals": "^11.1.0" + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.0", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.28.0", + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.0", + "debug": "^4.3.1" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/traverse/node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/types": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.0.tgz", - "integrity": "sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg==", + "version": "7.28.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.2.tgz", + "integrity": "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9" + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1" }, "engines": { "node": ">=6.9.0" @@ -687,9 +687,9 @@ ] }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.6.1.tgz", - "integrity": "sha512-KTsJMmobmbrFLe3LDh0PC2FXpcSYJt/MLjlkh/9LEnmKYLSYmT/0EW9JWANjeoemiuZrmogti0tW5Ch+qNUYDw==", + "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, "license": "MIT", "dependencies": { @@ -744,9 +744,9 @@ } }, "node_modules/@eslint/config-helpers": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.0.tgz", - "integrity": "sha512-ViuymvFmcJi04qdZeDc2whTHryouGcDlaxPqarTD0ZE10ISpxGUVZGZDx4w01upyIynL3iu6IXH2bS1NhclQMw==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.1.tgz", + "integrity": "sha512-xR93k9WhrDYpXHORXpxVL5oHj3Era7wo6k/Wd8/IsQNnZUTzkGS29lyn3nAT05v6ltUuTFVCCYDEGfy2Or/sPA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -754,9 +754,9 @@ } }, "node_modules/@eslint/core": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.1.tgz", - "integrity": "sha512-bkOp+iumZCCbt1K1CmWf0R9pM5yKpDv+ZXtvSyQpudrI9kuFLp+bM2WOPXImuD/ceQuaa8f5pj93Y7zyECIGNA==", + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz", + "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -804,9 +804,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.31.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.31.0.tgz", - "integrity": "sha512-LOm5OVt7D4qiKCqoiPbA7LWmI+tbw1VbTUowBcUMgQSuM6poJufkFkYDcQpo5KfgD39TnNySV26QjOh7VFpSyw==", + "version": "9.32.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.32.0.tgz", + "integrity": "sha512-BBpRFZK3eX6uMLKz8WxFOBIFFcGFJ/g8XuwjTHCqHROSIsopI+ddn/d5Cfh36+7+e5edVS8dbSHnBNhrLEX0zg==", "dev": true, "license": "MIT", "engines": { @@ -827,13 +827,13 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.4.tgz", - "integrity": "sha512-Ul5l+lHEcw3L5+k8POx6r74mxEYKG5kOb6Xpy2gCRW6zweT6TEhAf8vhxGgjhqrd/VO/Dirhsb+1hNpD1ue9hw==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz", + "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@eslint/core": "^0.15.1", + "@eslint/core": "^0.15.2", "levn": "^0.4.1" }, "engines": { @@ -893,9 +893,9 @@ } }, "node_modules/@humanwhocodes/retry": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.2.tgz", - "integrity": "sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", "dev": true, "license": "Apache-2.0", "engines": { @@ -1316,18 +1316,14 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", - "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.12.tgz", + "integrity": "sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" } }, "node_modules/@jridgewell/resolve-uri": { @@ -1340,27 +1336,17 @@ "node": ">=6.0.0" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.4.tgz", + "integrity": "sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==", "dev": true, "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "version": "0.3.29", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.29.tgz", + "integrity": "sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1397,9 +1383,9 @@ "license": "MIT" }, "node_modules/@nmshd/rs-crypto-node-darwin-arm64": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@nmshd/rs-crypto-node-darwin-arm64/-/rs-crypto-node-darwin-arm64-0.14.0.tgz", - "integrity": "sha512-GM0wnInGFd+9dyO/RUpk7AQzmjca0VBzlTM/SSRNObDcx7Riwl9kccp7UwTVnM3YVGybnyot1nOI+LXYfrUbCw==", + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@nmshd/rs-crypto-node-darwin-arm64/-/rs-crypto-node-darwin-arm64-0.15.0.tgz", + "integrity": "sha512-exxrPpyl2B5DOnomIWlL2TnrYwIhI1IUb5SsT0g1hvtgCQQ5Gt6InvhjqQzsI2rkb067MxUAzEmSA3mSyE8jvA==", "cpu": [ "arm64" ], @@ -1410,9 +1396,9 @@ ] }, "node_modules/@nmshd/rs-crypto-node-darwin-x64": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@nmshd/rs-crypto-node-darwin-x64/-/rs-crypto-node-darwin-x64-0.14.0.tgz", - "integrity": "sha512-3bF8eDkug4LPrFfIxqOqubpMm4M9vyBYE3HgXfbWDHHz0iRSxwGPvwBzyXes2V/HMRpYKjqG5XQdeSOjuMemGw==", + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@nmshd/rs-crypto-node-darwin-x64/-/rs-crypto-node-darwin-x64-0.15.0.tgz", + "integrity": "sha512-uR5pBiGAkzUGhl9CZ5T+0xYD6JKeP9d7rBF0RE/yPo3zoV8qSoKC5ClWzJoxoLhxYSzLGcSYF6Mcmk7P+JKaqw==", "cpu": [ "x64" ], @@ -1423,9 +1409,9 @@ ] }, "node_modules/@nmshd/rs-crypto-node-linux-x64-gnu": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@nmshd/rs-crypto-node-linux-x64-gnu/-/rs-crypto-node-linux-x64-gnu-0.14.0.tgz", - "integrity": "sha512-FMi4nMGiiWmzF39ZJOj1AhyZ5MAv4PsotZpRJiIZ1rkNOnTOeQSDj//85GXXv4i715TBJwLSp3eelkt+9xlqkw==", + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@nmshd/rs-crypto-node-linux-x64-gnu/-/rs-crypto-node-linux-x64-gnu-0.15.0.tgz", + "integrity": "sha512-JBpqHPY+cy4PW/a0MRYeRI4CgVSfm8wblVYpJiii3ptBZu7dNKlVDpaBBfipxLCBpNOevLurT+uOAJ1wIN543w==", "cpu": [ "x64" ], @@ -1436,9 +1422,9 @@ ] }, "node_modules/@nmshd/rs-crypto-node-win32-x64-msvc": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@nmshd/rs-crypto-node-win32-x64-msvc/-/rs-crypto-node-win32-x64-msvc-0.14.0.tgz", - "integrity": "sha512-09+Ov2Z30n3YUkHvcpf2bYJlV8GYesOaS3dWNCRAiseGmqduIWp/GQZZvAUHWslHhGKpT84fXy6HO5j8HrtOLg==", + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@nmshd/rs-crypto-node-win32-x64-msvc/-/rs-crypto-node-win32-x64-msvc-0.15.0.tgz", + "integrity": "sha512-smTyI+SsmnSLqLk+e2cq3rmLaiZlNXXdRyH1bsb2CQyeXMYwlNjnW8+HnnvY3fsrmYzstL+394qegF6I5AwdNw==", "cpu": [ "x64" ], @@ -1449,9 +1435,9 @@ ] }, "node_modules/@nmshd/rs-crypto-types": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@nmshd/rs-crypto-types/-/rs-crypto-types-0.12.0.tgz", - "integrity": "sha512-YlbsPb9TaMl30BinVTvt1a7vEj8ALtpEnKQJWkphu00JBOoyV/2uWTJCMVkYbBji62YKOQCXaehdQn3rx7jzOQ==", + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@nmshd/rs-crypto-types/-/rs-crypto-types-0.12.1.tgz", + "integrity": "sha512-tNcFwArHTLlFpeVdFuErSsIqa3xrc5PLmQeU453VLAI13UrG8wBh7Z+Wz29YWZFQtM1P4AcOnhzkhV6cRlZn9w==", "license": "MIT", "dependencies": { "typia": "^8.0.3" @@ -1529,9 +1515,9 @@ } }, "node_modules/@tsconfig/node20": { - "version": "20.1.5", - "resolved": "https://registry.npmjs.org/@tsconfig/node20/-/node20-20.1.5.tgz", - "integrity": "sha512-Vm8e3WxDTqMGPU4GATF9keQAIy1Drd7bPwlgzKJnZtoOsTm1tduUTbDjg0W5qERvGuxPI2h9RbMufH0YdfBylA==", + "version": "20.1.6", + "resolved": "https://registry.npmjs.org/@tsconfig/node20/-/node20-20.1.6.tgz", + "integrity": "sha512-sz+Hqx9zwZDpZIV871WSbUzSqNIsXzghZydypnfgzPKLltVJfkINfUeTct31n/tTSa9ZE1ZOfKdRre1uHHquYQ==", "dev": true, "license": "MIT" }, @@ -1571,19 +1557,19 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.7.tgz", - "integrity": "sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.20.7" + "@babel/types": "^7.28.2" } }, "node_modules/@types/estree": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", - "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", "dev": true, "license": "MIT" }, @@ -1643,13 +1629,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.17.30", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.30.tgz", - "integrity": "sha512-7zf4YyHA+jvBNfVrk2Gtvs6x7E8V+YDW05bNfG2XkWDJfYRXrTiP/DsB2zSYTaHX0bGIujTBQdMVAhb+j7mwpg==", + "version": "20.19.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.10.tgz", + "integrity": "sha512-iAFpG6DokED3roLSP0K+ybeDdIX6Bc0Vd3mLW5uDqThPWtNos3E+EqOM11mPQHKzfWHqEBuLjIlsBQQ8CsISmQ==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.19.2" + "undici-types": "~6.21.0" } }, "node_modules/@types/stack-utils": { @@ -1677,21 +1663,21 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.31.0.tgz", - "integrity": "sha512-evaQJZ/J/S4wisevDvC1KFZkPzRetH8kYZbkgcTRyql3mcKsf+ZFDV1BVWUGTCAW5pQHoqn5gK5b8kn7ou9aFQ==", + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.39.0.tgz", + "integrity": "sha512-bhEz6OZeUR+O/6yx9Jk6ohX6H9JSFTaiY0v9/PuKT3oGK0rn0jNplLmyFUGV+a9gfYnVNwGDwS/UkLIuXNb2Rw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.31.0", - "@typescript-eslint/type-utils": "8.31.0", - "@typescript-eslint/utils": "8.31.0", - "@typescript-eslint/visitor-keys": "8.31.0", + "@typescript-eslint/scope-manager": "8.39.0", + "@typescript-eslint/type-utils": "8.39.0", + "@typescript-eslint/utils": "8.39.0", + "@typescript-eslint/visitor-keys": "8.39.0", "graphemer": "^1.4.0", - "ignore": "^5.3.1", + "ignore": "^7.0.0", "natural-compare": "^1.4.0", - "ts-api-utils": "^2.0.1" + "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1701,22 +1687,32 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "@typescript-eslint/parser": "^8.39.0", "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" } }, "node_modules/@typescript-eslint/parser": { - "version": "8.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.31.0.tgz", - "integrity": "sha512-67kYYShjBR0jNI5vsf/c3WG4u+zDnCTHTPqVMQguffaWWFs7artgwKmfwdifl+r6XyM5LYLas/dInj2T0SgJyw==", + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.39.0.tgz", + "integrity": "sha512-g3WpVQHngx0aLXn6kfIYCZxM6rRJlWzEkVpqEFLT3SgEDsp9cpCbxxgwnE504q4H+ruSDh/VGS6nqZIDynP+vg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.31.0", - "@typescript-eslint/types": "8.31.0", - "@typescript-eslint/typescript-estree": "8.31.0", - "@typescript-eslint/visitor-keys": "8.31.0", + "@typescript-eslint/scope-manager": "8.39.0", + "@typescript-eslint/types": "8.39.0", + "@typescript-eslint/typescript-estree": "8.39.0", + "@typescript-eslint/visitor-keys": "8.39.0", "debug": "^4.3.4" }, "engines": { @@ -1728,18 +1724,40 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.39.0.tgz", + "integrity": "sha512-CTzJqaSq30V/Z2Og9jogzZt8lJRR5TKlAdXmWgdu4hgcC9Kww5flQ+xFvMxIBWVNdxJO7OifgdOK4PokMIWPew==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.39.0", + "@typescript-eslint/types": "^8.39.0", + "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/@typescript-eslint/scope-manager": { - "version": "8.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.31.0.tgz", - "integrity": "sha512-knO8UyF78Nt8O/B64i7TlGXod69ko7z6vJD9uhSlm0qkAbGeRUSudcm0+K/4CrRjrpiHfBCjMWlc08Vav1xwcw==", + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.39.0.tgz", + "integrity": "sha512-8QOzff9UKxOh6npZQ/4FQu4mjdOCGSdO3p44ww0hk8Vu+IGbg0tB/H1LcTARRDzGCC8pDGbh2rissBuuoPgH8A==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.31.0", - "@typescript-eslint/visitor-keys": "8.31.0" + "@typescript-eslint/types": "8.39.0", + "@typescript-eslint/visitor-keys": "8.39.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1749,17 +1767,35 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.39.0.tgz", + "integrity": "sha512-Fd3/QjmFV2sKmvv3Mrj8r6N8CryYiCS8Wdb/6/rgOXAWGcFuc+VkQuG28uk/4kVNVZBQuuDHEDUpo/pQ32zsIQ==", + "dev": true, + "license": "MIT", + "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/@typescript-eslint/type-utils": { - "version": "8.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.31.0.tgz", - "integrity": "sha512-DJ1N1GdjI7IS7uRlzJuEDCgDQix3ZVYVtgeWEyhyn4iaoitpMBX6Ndd488mXSx0xah/cONAkEaYyylDyAeHMHg==", + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.39.0.tgz", + "integrity": "sha512-6B3z0c1DXVT2vYA9+z9axjtc09rqKUPRmijD5m9iv8iQpHBRYRMBcgxSiKTZKm6FwWw1/cI4v6em35OsKCiN5Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.31.0", - "@typescript-eslint/utils": "8.31.0", + "@typescript-eslint/types": "8.39.0", + "@typescript-eslint/typescript-estree": "8.39.0", + "@typescript-eslint/utils": "8.39.0", "debug": "^4.3.4", - "ts-api-utils": "^2.0.1" + "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1770,13 +1806,13 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/types": { - "version": "8.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.31.0.tgz", - "integrity": "sha512-Ch8oSjVyYyJxPQk8pMiP2FFGYatqXQfQIaMp+TpuuLlDachRWpUAeEu1u9B/v/8LToehUIWyiKcA/w5hUFRKuQ==", + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.39.0.tgz", + "integrity": "sha512-ArDdaOllnCj3yn/lzKn9s0pBQYmmyme/v1HbGIGB0GB/knFI3fWMHloC+oYTJW46tVbYnGKTMDK4ah1sC2v0Kg==", "dev": true, "license": "MIT", "engines": { @@ -1788,20 +1824,22 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.31.0.tgz", - "integrity": "sha512-xLmgn4Yl46xi6aDSZ9KkyfhhtnYI15/CvHbpOy/eR5NWhK/BK8wc709KKwhAR0m4ZKRP7h07bm4BWUYOCuRpQQ==", + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.39.0.tgz", + "integrity": "sha512-ndWdiflRMvfIgQRpckQQLiB5qAKQ7w++V4LlCHwp62eym1HLB/kw7D9f2e8ytONls/jt89TEasgvb+VwnRprsw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.31.0", - "@typescript-eslint/visitor-keys": "8.31.0", + "@typescript-eslint/project-service": "8.39.0", + "@typescript-eslint/tsconfig-utils": "8.39.0", + "@typescript-eslint/types": "8.39.0", + "@typescript-eslint/visitor-keys": "8.39.0", "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.0.1" + "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1811,7 +1849,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { @@ -1841,9 +1879,9 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, "license": "ISC", "bin": { @@ -1854,16 +1892,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.31.0.tgz", - "integrity": "sha512-qi6uPLt9cjTFxAb1zGNgTob4x9ur7xC6mHQJ8GwEzGMGE9tYniublmJaowOJ9V2jUzxrltTPfdG2nKlWsq0+Ww==", + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.39.0.tgz", + "integrity": "sha512-4GVSvNA0Vx1Ktwvf4sFE+exxJ3QGUorQG1/A5mRfRNZtkBT2xrA/BCO2H0eALx/PnvCS6/vmYwRdDA41EoffkQ==", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.31.0", - "@typescript-eslint/types": "8.31.0", - "@typescript-eslint/typescript-estree": "8.31.0" + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.39.0", + "@typescript-eslint/types": "8.39.0", + "@typescript-eslint/typescript-estree": "8.39.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1874,18 +1912,18 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.31.0.tgz", - "integrity": "sha512-QcGHmlRHWOl93o64ZUMNewCdwKGU6WItOU52H0djgNmn1EOrhVudrDzXz4OycCRSCPwFCDrE2iIt5vmuUdHxuQ==", + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.39.0.tgz", + "integrity": "sha512-ldgiJ+VAhQCfIjeOgu8Kj5nSxds0ktPOSO9p4+0VDH2R2pLvQraaM5Oen2d7NxzMCm+Sn/vJT+mv2H5u6b/3fA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.31.0", - "eslint-visitor-keys": "^4.2.0" + "@typescript-eslint/types": "8.39.0", + "eslint-visitor-keys": "^4.2.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2001,13 +2039,6 @@ "integrity": "sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==", "license": "MIT" }, - "node_modules/async": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", - "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", - "dev": true, - "license": "MIT" - }, "node_modules/babel-jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", @@ -2081,9 +2112,9 @@ } }, "node_modules/babel-preset-current-node-syntax": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", - "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz", + "integrity": "sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==", "dev": true, "license": "MIT", "dependencies": { @@ -2104,7 +2135,7 @@ "@babel/plugin-syntax-top-level-await": "^7.14.5" }, "peerDependencies": { - "@babel/core": "^7.0.0" + "@babel/core": "^7.0.0 || ^8.0.0-0" } }, "node_modules/babel-preset-jest": { @@ -2187,9 +2218,9 @@ } }, "node_modules/browserslist": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", - "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", + "version": "4.25.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.1.tgz", + "integrity": "sha512-KGj0KoOMXLpSNkkEI6Z6mShmQy0bc1I+T7K9N81k4WWMrfz+6fQ6es80B/YLAeRoKvjYE1YSHHOW1qe9xIVzHw==", "dev": true, "funding": [ { @@ -2207,10 +2238,10 @@ ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001688", - "electron-to-chromium": "^1.5.73", + "caniuse-lite": "^1.0.30001726", + "electron-to-chromium": "^1.5.173", "node-releases": "^2.0.19", - "update-browserslist-db": "^1.1.1" + "update-browserslist-db": "^1.1.3" }, "bin": { "browserslist": "cli.js" @@ -2294,9 +2325,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001715", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001715.tgz", - "integrity": "sha512-7ptkFGMm2OAOgvZpwgA4yjQ5SQbrNVGdRjzH0pBdy1Fasvcr+KAeECmbCAECzTuDuoX0FCY8KzUxjf9+9kfZEw==", + "version": "1.0.30001733", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001733.tgz", + "integrity": "sha512-e4QKw/O2Kavj2VQTKZWrwzkt3IxOmIlU6ajRb6LP64LHpBo1J67k2Hi4Vu/TgJWsNtynurfS0uK3MaUTCPfu5Q==", "dev": true, "funding": [ { @@ -2563,9 +2594,9 @@ } }, "node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2581,9 +2612,9 @@ } }, "node_modules/dedent": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", - "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.6.0.tgz", + "integrity": "sha512-F1Z+5UCFpmQUzJa11agbyPVMbpgT/qA3/SKyJ1jyBgm7dUcUEa8v9JwDkerSQXfakBwFljIxhOJqGkjUwZ9FSA==", "dev": true, "license": "MIT", "peerDependencies": { @@ -2653,26 +2684,10 @@ "node": ">=4" } }, - "node_modules/ejs": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", - "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "jake": "^10.8.5" - }, - "bin": { - "ejs": "bin/cli.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/electron-to-chromium": { - "version": "1.5.141", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.141.tgz", - "integrity": "sha512-qS+qH9oqVYc1ooubTiB9l904WVyM6qNYxtOEEGReoZXw3xlqeYdFr5GclNzbkAufWgwWLEPoDi3d9MoRwwIjGw==", + "version": "1.5.199", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.199.tgz", + "integrity": "sha512-3gl0S7zQd88kCAZRO/DnxtBKuhMO4h0EaQIN3YgZfV6+pW+5+bf2AdQeHNESCoaQqo/gjGVYEf2YM4O5HJQqpQ==", "dev": true, "license": "ISC" }, @@ -2729,9 +2744,9 @@ } }, "node_modules/eslint": { - "version": "9.31.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.31.0.tgz", - "integrity": "sha512-QldCVh/ztyKJJZLr4jXNUByx3gR+TDYZCRXEktiZoUR3PGy4qCmSbkxcIle8GEwGpb5JBZazlaJ/CxLidXdEbQ==", + "version": "9.32.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.32.0.tgz", + "integrity": "sha512-LSehfdpgMeWcTZkWZVIJl+tkZ2nuSkyyB9C27MZqFWXuph7DvaowgcTvKqxvpLW1JZIk8PN7hFY3Rj9LQ7m7lg==", "dev": true, "license": "MIT", "dependencies": { @@ -2741,8 +2756,8 @@ "@eslint/config-helpers": "^0.3.0", "@eslint/core": "^0.15.0", "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.31.0", - "@eslint/plugin-kit": "^0.3.1", + "@eslint/js": "9.32.0", + "@eslint/plugin-kit": "^0.3.4", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", @@ -2960,18 +2975,6 @@ "node": ">=4" } }, - "node_modules/external-editor/node_modules/tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "license": "MIT", - "dependencies": { - "os-tmpdir": "~1.0.2" - }, - "engines": { - "node": ">=0.6.0" - } - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -3080,39 +3083,6 @@ "node": ">=16.0.0" } }, - "node_modules/filelist": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", - "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "minimatch": "^5.0.1" - } - }, - "node_modules/filelist/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/filelist/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -3275,9 +3245,9 @@ } }, "node_modules/globals": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-16.0.0.tgz", - "integrity": "sha512-iInW14XItCXET01CQFqudPOWP2jYMl7T+QRQT+UNcR/iQncN/F0UNpgd76iFkBPgNQb4+X3LV9tLJYzwh+Gl3A==", + "version": "16.3.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-16.3.0.tgz", + "integrity": "sha512-bqWEnJ1Nt3neqx2q5SFfGS8r/ahumIakg3HcwtNlrVlwXIeNumWn/c7Pn/wKzGhf6SaW6H6uWXLqC30STCMchQ==", "dev": true, "license": "MIT", "engines": { @@ -3301,6 +3271,28 @@ "dev": true, "license": "MIT" }, + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "dev": true, + "license": "MIT", + "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", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -3626,9 +3618,9 @@ } }, "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, "license": "ISC", "bin": { @@ -3682,25 +3674,6 @@ "node": ">=8" } }, - "node_modules/jake": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", - "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "async": "^3.2.3", - "chalk": "^4.0.2", - "filelist": "^1.0.4", - "minimatch": "^3.1.2" - }, - "bin": { - "jake": "bin/cli.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", @@ -4184,9 +4157,9 @@ } }, "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, "license": "ISC", "bin": { @@ -4298,9 +4271,9 @@ } }, "node_modules/jiti": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.4.2.tgz", - "integrity": "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.5.1.tgz", + "integrity": "sha512-twQoecYPiVA5K/h6SxtORw/Bs3ar+mLUtoPSc7iMXzQzK8d7eJ/R09wmTwAjiamETn1cXYPGfNnu7DMoHgu12w==", "dev": true, "license": "MIT", "bin": { @@ -4511,9 +4484,9 @@ } }, "node_modules/make-dir/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, "license": "ISC", "bin": { @@ -4593,6 +4566,16 @@ "node": "*" } }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -4613,6 +4596,13 @@ "dev": true, "license": "MIT" }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "license": "MIT" + }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -4716,15 +4706,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -5530,10 +5511,9 @@ "license": "MIT" }, "node_modules/tmp": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", - "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", - "dev": true, + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.4.tgz", + "integrity": "sha512-UdiSoX6ypifLmrfQ/XfiawN6hkjSBpCjhKxxZcWlUUmoXLaCKQU0bx4HF/tdDK2uzRuchf1txGvrWBzYREssoQ==", "license": "MIT", "engines": { "node": ">=14.14" @@ -5583,21 +5563,20 @@ } }, "node_modules/ts-jest": { - "version": "29.3.2", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.3.2.tgz", - "integrity": "sha512-bJJkrWc6PjFVz5g2DGCNUo8z7oFEYaz1xP1NpeDU7KNLMWPpEyV8Chbpkn8xjzgRDpQhnGMyvyldoL7h8JXyug==", + "version": "29.4.1", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.1.tgz", + "integrity": "sha512-SaeUtjfpg9Uqu8IbeDKtdaS0g8lS6FT6OzM3ezrDfErPJPHNDo/Ey+VFGP1bQIDfagYDLyRpd7O15XpG1Es2Uw==", "dev": true, "license": "MIT", "dependencies": { "bs-logger": "^0.2.6", - "ejs": "^3.1.10", "fast-json-stable-stringify": "^2.1.0", - "jest-util": "^29.0.0", + "handlebars": "^4.7.8", "json5": "^2.2.3", "lodash.memoize": "^4.1.2", "make-error": "^1.3.6", - "semver": "^7.7.1", - "type-fest": "^4.39.1", + "semver": "^7.7.2", + "type-fest": "^4.41.0", "yargs-parser": "^21.1.1" }, "bin": { @@ -5608,10 +5587,11 @@ }, "peerDependencies": { "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/transform": "^29.0.0", - "@jest/types": "^29.0.0", - "babel-jest": "^29.0.0", - "jest": "^29.0.0", + "@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": { @@ -5629,13 +5609,16 @@ }, "esbuild": { "optional": true + }, + "jest-util": { + "optional": true } } }, "node_modules/ts-jest/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, "license": "ISC", "bin": { @@ -5646,9 +5629,9 @@ } }, "node_modules/ts-jest/node_modules/type-fest": { - "version": "4.40.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.40.0.tgz", - "integrity": "sha512-ABHZ2/tS2JkvH1PEjxFDTUWC8dB5OsIGZP4IFLhR293GqT5Y5qB1WwL2kMPYhQW9DVgVD8Hd7I8gjwPIf5GFkw==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { @@ -5713,15 +5696,16 @@ } }, "node_modules/typescript-eslint": { - "version": "8.31.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.31.0.tgz", - "integrity": "sha512-u+93F0sB0An8WEAPtwxVhFby573E8ckdjwUUQUj9QA4v8JAvgtoDdIyYR3XFwFHq2W1KJ1AurwJCO+w+Y1ixyQ==", + "version": "8.39.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.39.0.tgz", + "integrity": "sha512-lH8FvtdtzcHJCkMOKnN73LIn6SLTpoojgJqDAxPm1jCR14eWSGPX8ul/gggBdPMk/d5+u9V854vTYQ8T5jF/1Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.31.0", - "@typescript-eslint/parser": "8.31.0", - "@typescript-eslint/utils": "8.31.0" + "@typescript-eslint/eslint-plugin": "8.39.0", + "@typescript-eslint/parser": "8.39.0", + "@typescript-eslint/typescript-estree": "8.39.0", + "@typescript-eslint/utils": "8.39.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -5732,7 +5716,7 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/typia": { @@ -5756,10 +5740,24 @@ "typescript": ">=4.8.0 <5.9.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, + "license": "BSD-2-Clause", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "dev": true, "license": "MIT" }, @@ -5870,6 +5868,13 @@ "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, + "license": "MIT" + }, "node_modules/wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", diff --git a/package.json b/package.json index 4c5d96c..44a6302 100644 --- a/package.json +++ b/package.json @@ -72,5 +72,8 @@ "@nmshd/rs-crypto-node-darwin-x64": "0.15.0", "@nmshd/rs-crypto-node-linux-x64-gnu": "0.15.0", "@nmshd/rs-crypto-node-win32-x64-msvc": "0.15.0" + }, + "overrides": { + "tmp": "^0.2.4" } } From a8d57d54bdd3c5d01e5d087805d79808dea8ac8e Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Mon, 11 Aug 2025 15:49:12 +0200 Subject: [PATCH 13/17] fix: test teardown colliding with new sqlite db --- jest.config.js | 10 +++----- package-lock.json | 11 --------- package.json | 3 +-- tests/common.ts | 37 ++++++++++++++++++++++++---- tests/dh-exchange.test.ts | 21 ++++++++++------ tests/factory.test.ts | 46 ++++++++++++++++++++++------------- tests/key-handle.test.ts | 21 ++++++++++------ tests/key-pair-handle.test.ts | 24 +++++++++--------- tests/provider.test.ts | 21 ++++++++++------ 9 files changed, 118 insertions(+), 76 deletions(-) diff --git a/jest.config.js b/jest.config.js index e570814..b85327e 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,8 +1,6 @@ /** @type {import('ts-jest').JestConfigWithTsJest} **/ -module.exports = { - testEnvironment: "node", - transform: { - "^.+.tsx?$": ["ts-jest", {}], - }, - testPathIgnorePatterns: ["/node_modules/", "/example/", "/lib/"], +export const testEnvironment = "node"; +export const transform = { + "^.+.tsx?$": ["ts-jest", {}], }; +export const testPathIgnorePatterns = ["/node_modules/", "/example/", "/lib/"]; diff --git a/package-lock.json b/package-lock.json index ad67c49..00aa460 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,6 @@ "jest": "^29.7.0", "jiti": "^2.4.2", "prettier": "3.5.3", - "tmp-promise": "^3.0.3", "ts-jest": "^29.2.5", "typescript": "^5.3.3", "typescript-eslint": "^8.25.0" @@ -5519,16 +5518,6 @@ "node": ">=14.14" } }, - "node_modules/tmp-promise": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/tmp-promise/-/tmp-promise-3.0.3.tgz", - "integrity": "sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "tmp": "^0.2.0" - } - }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", diff --git a/package.json b/package.json index 44a6302..ca95248 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "author": "j&s-soft AG", "main": "./lib/index.cjs", "scripts": { - "test": "tsc &&jest", + "test": "tsc && npx --node-options=\"--expose-gc\" jest", "cargo-build": "tsc &&cargo build --message-format=json-render-diagnostics > cargo.log", "cross-build": "tsc &&cross build --message-format=json-render-diagnostics > cross.log", "postcargo-build": "neon dist --name crypto-layer-node < cargo.log", @@ -58,7 +58,6 @@ "jest": "^29.7.0", "jiti": "^2.4.2", "prettier": "3.5.3", - "tmp-promise": "^3.0.3", "ts-jest": "^29.2.5", "typescript": "^5.3.3", "typescript-eslint": "^8.25.0" diff --git a/tests/common.ts b/tests/common.ts index 9046a76..1853134 100644 --- a/tests/common.ts +++ b/tests/common.ts @@ -1,9 +1,36 @@ -import { dir, DirectoryResult } from "tmp-promise"; +import { mkdtemp } from "node:fs/promises"; +import { join } from "node:path"; +import { tmpdir } from "node:os"; +import { existsSync, rmSync } from "node:fs"; + +// Add global.gc type declaration for Node.js --expose-gc flag +declare global { + var gc: NodeJS.GCFunction | undefined; +} export const SOFTWARE_PROVIDER_NAME = "SoftwareProvider"; -export async function testDir(): Promise { - return await dir({ - unsafeCleanup: true, - }); +export async function setupDbDir(): Promise { + return await mkdtemp(join(tmpdir(), "crypto-layer-node-tests-")); +} + +export function teardownDbDir(path: string | undefined): void { + if (path !== undefined && existsSync(path) && path !== "/") { + rmSync(path, { recursive: true, force: true }); + } +} + +/** + * Starts garbage collection with a lengthy time out. + * + * This is strictly necessary, as as long as a provider is not destroyed the sqlite file lock is not released + * and thus the temporary directories cannot be deleted. + */ +export async function gcAllAndWait() { + if (global.gc) { + for (let i = 0; i < 2; i++) { + global.gc(); + await new Promise((resolve) => setTimeout(resolve, 300)); + } + } } diff --git a/tests/dh-exchange.test.ts b/tests/dh-exchange.test.ts index 58b9816..27d73f3 100644 --- a/tests/dh-exchange.test.ts +++ b/tests/dh-exchange.test.ts @@ -8,7 +8,12 @@ import { } from "@nmshd/rs-crypto-types"; import { createProviderFromName } from "../lib/index.cjs"; -import { SOFTWARE_PROVIDER_NAME, testDir } from "./common"; +import { + gcAllAndWait, + setupDbDir, + SOFTWARE_PROVIDER_NAME, + teardownDbDir, +} from "./common"; function checkIfKeySpecIsDerivedFromKeyPairSpec( keySpec: KeySpec, @@ -21,15 +26,13 @@ function checkIfKeySpecIsDerivedFromKeyPairSpec( describe("test dh exchange", () => { let provider: Provider; - let cleanup: () => Promise; - let path: string; + let dbDirPath: string; beforeAll(async () => { - const folder = await testDir(); - path = folder.path; - cleanup = folder.cleanup; + dbDirPath = await setupDbDir(); + const providerImplConfigWithFileStore: ProviderImplConfig = { - additional_config: [{ FileStoreConfig: { db_dir: path } }], + additional_config: [{ FileStoreConfig: { db_dir: dbDirPath } }], }; const provider_or_null = await createProviderFromName( SOFTWARE_PROVIDER_NAME, @@ -42,7 +45,9 @@ describe("test dh exchange", () => { }); afterAll(async () => { - if (cleanup) await cleanup(); + (provider as unknown) = null; + await gcAllAndWait(); + teardownDbDir(dbDirPath); }); const spec: KeyPairSpec = { diff --git a/tests/factory.test.ts b/tests/factory.test.ts index 8f58898..4c518da 100644 --- a/tests/factory.test.ts +++ b/tests/factory.test.ts @@ -13,7 +13,12 @@ import { getProviderCapabilities, } from "../lib/index.cjs"; -import { SOFTWARE_PROVIDER_NAME, testDir } from "./common"; +import { + gcAllAndWait, + setupDbDir, + SOFTWARE_PROVIDER_NAME, + teardownDbDir, +} from "./common"; import { assertKeyHandle, assertProvider, @@ -29,6 +34,25 @@ describe("test provider factory methods", () => { supported_hashes: ["Sha2_256"], }; + let dbDirPath: string | undefined; + + beforeEach(async () => { + dbDirPath = await setupDbDir(); + }); + + const dbPathsToClean: string[] = []; + + afterEach(() => { + dbPathsToClean.push(dbDirPath!); + }); + + afterAll(async () => { + await gcAllAndWait(); + for (const dir of dbPathsToClean) { + teardownDbDir(dir); + } + }); + test("get provider names", async () => { const provider_arr = await getAllProviders(); expect(provider_arr).toBeTruthy(); @@ -40,9 +64,8 @@ describe("test provider factory methods", () => { }); test("create provider from config with file store", async () => { - const { path, cleanup } = await testDir(); const providerImplConfigWithFileStore: ProviderImplConfig = { - additional_config: [{ FileStoreConfig: { db_dir: path } }], + additional_config: [{ FileStoreConfig: { db_dir: dbDirPath! } }], }; const provider = await createProvider( providerConfig, @@ -53,16 +76,14 @@ describe("test provider factory methods", () => { expect(provider?.providerName()).resolves.toEqual( SOFTWARE_PROVIDER_NAME, ); - await cleanup(); }); test("create software provider from name with file store", async () => { - const { path, cleanup } = await testDir(); const providerImplConfigWithFileStore: ProviderImplConfig = { additional_config: [ { FileStoreConfig: { - db_dir: path, + db_dir: dbDirPath!, }, }, ], @@ -76,7 +97,6 @@ describe("test provider factory methods", () => { expect(provider?.providerName()).resolves.toEqual( SOFTWARE_PROVIDER_NAME, ); - await cleanup(); }); test("test get provider capabilities", async () => { @@ -96,8 +116,6 @@ describe("test provider factory methods", () => { }); test("create software provider secured via a key handle", async () => { - const { path, cleanup } = await testDir(); - const temporaryProviderConfig: ProviderImplConfig = { additional_config: [], }; @@ -123,7 +141,7 @@ describe("test provider factory methods", () => { { StorageConfigSymmetricEncryption: masterKey }, { FileStoreConfig: { - db_dir: path, + db_dir: dbDirPath!, }, }, ], @@ -156,13 +174,9 @@ describe("test provider factory methods", () => { const keyHandle = await securedProvider.loadKey(id); assertKeyHandle(keyHandle); } - - await cleanup(); }); test("create software provider validated through a key pair handle", async () => { - const { path, cleanup } = await testDir(); - const temporaryProviderConfig: ProviderImplConfig = { additional_config: [], }; @@ -190,7 +204,7 @@ describe("test provider factory methods", () => { { StorageConfigDSA: signingKey }, { FileStoreConfig: { - db_dir: path, + db_dir: dbDirPath!, }, }, ], @@ -223,7 +237,5 @@ describe("test provider factory methods", () => { const keyHandle = await securedProvider.loadKey(id); assertKeyHandle(keyHandle); } - - await cleanup(); }); }); diff --git a/tests/key-handle.test.ts b/tests/key-handle.test.ts index ad1f019..71ba4a4 100644 --- a/tests/key-handle.test.ts +++ b/tests/key-handle.test.ts @@ -3,20 +3,23 @@ import { test, expect, describe } from "@jest/globals"; import { ProviderImplConfig, Provider, KeySpec } from "@nmshd/rs-crypto-types"; import { createProviderFromName } from "../lib/index.cjs"; -import { SOFTWARE_PROVIDER_NAME, testDir } from "./common"; +import { + gcAllAndWait, + setupDbDir, + SOFTWARE_PROVIDER_NAME, + teardownDbDir, +} from "./common"; import { assertKeyHandle } from "@nmshd/rs-crypto-types/checks"; describe("test key handle methods", () => { let provider: Provider; - let cleanup: () => Promise; - let path: string; + let dbDirPath: string; beforeAll(async () => { - const folder = await testDir(); - path = folder.path; - cleanup = folder.cleanup; + dbDirPath = await setupDbDir(); + const providerImplConfigWithFileStore: ProviderImplConfig = { - additional_config: [{ FileStoreConfig: { db_dir: path } }], + additional_config: [{ FileStoreConfig: { db_dir: dbDirPath } }], }; const provider_or_null = await createProviderFromName( SOFTWARE_PROVIDER_NAME, @@ -29,7 +32,9 @@ describe("test key handle methods", () => { }); afterAll(async () => { - if (cleanup) await cleanup(); + (provider as unknown) = null; + await gcAllAndWait(); + teardownDbDir(dbDirPath); }); const spec: KeySpec = { diff --git a/tests/key-pair-handle.test.ts b/tests/key-pair-handle.test.ts index 3bbef1a..d993362 100644 --- a/tests/key-pair-handle.test.ts +++ b/tests/key-pair-handle.test.ts @@ -7,19 +7,22 @@ import { } from "@nmshd/rs-crypto-types"; import { createProviderFromName } from "../lib/index.cjs"; -import { SOFTWARE_PROVIDER_NAME, testDir } from "./common"; +import { + gcAllAndWait, + setupDbDir, + SOFTWARE_PROVIDER_NAME, + teardownDbDir, +} from "./common"; describe("test key pair handle methods", () => { let provider: Provider; - let cleanup: () => Promise; - let path: string; + let dbDirPath: string; beforeAll(async () => { - const folder = await testDir(); - path = folder.path; - cleanup = folder.cleanup; + dbDirPath = await setupDbDir(); + const providerImplConfigWithFileStore: ProviderImplConfig = { - additional_config: [{ FileStoreConfig: { db_dir: path } }], + additional_config: [{ FileStoreConfig: { db_dir: dbDirPath } }], }; const provider_or_null = await createProviderFromName( SOFTWARE_PROVIDER_NAME, @@ -32,10 +35,9 @@ describe("test key pair handle methods", () => { }); afterAll(async () => { - if (cleanup) { - await cleanup(); - console.log("cleanup comp"); - } + (provider as unknown) = null; + await gcAllAndWait(); + teardownDbDir(dbDirPath); }); const spec: KeyPairSpec = { diff --git a/tests/provider.test.ts b/tests/provider.test.ts index 9b5e649..4da7e9c 100644 --- a/tests/provider.test.ts +++ b/tests/provider.test.ts @@ -10,7 +10,12 @@ import { import { createProviderFromName } from "../lib/index.cjs"; -import { SOFTWARE_PROVIDER_NAME, testDir } from "./common"; +import { + gcAllAndWait, + setupDbDir, + SOFTWARE_PROVIDER_NAME, + teardownDbDir, +} from "./common"; import { assertKeyHandle, assertSpec, @@ -20,15 +25,13 @@ import { describe("test provider methods", () => { let provider: Provider; - let cleanup: () => Promise; - let path: string; + let dbDirPath: string; beforeAll(async () => { - const folder = await testDir(); - path = folder.path; - cleanup = folder.cleanup; + dbDirPath = await setupDbDir(); + const providerImplConfigWithFileStore: ProviderImplConfig = { - additional_config: [{ FileStoreConfig: { db_dir: path } }], + additional_config: [{ FileStoreConfig: { db_dir: dbDirPath } }], }; const provider_or_null = await createProviderFromName( SOFTWARE_PROVIDER_NAME, @@ -41,7 +44,9 @@ describe("test provider methods", () => { }); afterAll(async () => { - if (cleanup) await cleanup(); + (provider as unknown) = null; + await gcAllAndWait(); + teardownDbDir(dbDirPath); }); test("create aes gcm ephemeral key", async () => { From 09fbb72e99241b177f86f920371f05281737cf83 Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Mon, 11 Aug 2025 18:21:59 +0200 Subject: [PATCH 14/17] chore: bumped rust dependencies --- Cargo.lock | 101 +++++------------------------------------------------ 1 file changed, 9 insertions(+), 92 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8b487fe..49e6aed 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -371,7 +371,7 @@ dependencies = [ [[package]] name = "crypto-layer" version = "0.1.0" -source = "git+https://github.com/nmshd/rust-crypto.git#2562f01e1798bd8c91c429b4e2f7e045831dfcc7" +source = "git+https://github.com/nmshd/rust-crypto.git#e3d79e1e80efb431e9acc1d69f7927cc9d2b1bc8" dependencies = [ "anyhow", "argon2", @@ -387,11 +387,10 @@ dependencies = [ "nanoid", "p256", "pollster", - "r2d2", - "r2d2_sqlite", "ring", "rmp-serde", "robusta_jni", + "rusqlite", "rusqlite_migration", "security-framework", "security-framework-sys", @@ -892,9 +891,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.174" +version = "0.2.175" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" +checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" [[package]] name = "libloading" @@ -1156,17 +1155,7 @@ checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", "lock_api", - "parking_lot_core 0.8.6", -] - -[[package]] -name = "parking_lot" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" -dependencies = [ - "lock_api", - "parking_lot_core 0.9.11", + "parking_lot_core", ] [[package]] @@ -1178,24 +1167,11 @@ dependencies = [ "cfg-if", "instant", "libc", - "redox_syscall 0.2.16", + "redox_syscall", "smallvec", "winapi", ] -[[package]] -name = "parking_lot_core" -version = "0.9.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.5.17", - "smallvec", - "windows-targets 0.52.6", -] - [[package]] name = "password-hash" version = "0.5.0" @@ -1315,9 +1291,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.95" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +checksum = "beef09f85ae72cea1ef96ba6870c51e6382ebfa4f0e85b643459331f3daa5be0" dependencies = [ "unicode-ident", ] @@ -1337,28 +1313,6 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" -[[package]] -name = "r2d2" -version = "0.8.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51de85fb3fb6524929c8a2eb85e6b6d363de4e8c48f9e2c2eac4944abc181c93" -dependencies = [ - "log", - "parking_lot 0.12.4", - "scheduled-thread-pool", -] - -[[package]] -name = "r2d2_sqlite" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63417e83dc891797eea3ad379f52a5986da4bca0d6ef28baf4d14034dd111b0c" -dependencies = [ - "r2d2", - "rusqlite", - "uuid", -] - [[package]] name = "rand" version = "0.8.5" @@ -1427,15 +1381,6 @@ dependencies = [ "bitflags 1.3.2", ] -[[package]] -name = "redox_syscall" -version = "0.5.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" -dependencies = [ - "bitflags 2.9.1", -] - [[package]] name = "regex" version = "1.11.1" @@ -1592,12 +1537,6 @@ dependencies = [ "semver", ] -[[package]] -name = "rustversion" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" - [[package]] name = "ryu" version = "1.0.20" @@ -1613,15 +1552,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "scheduled-thread-pool" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cbc66816425a074528352f5789333ecff06ca41b36b0b0efdfbb29edc391a19" -dependencies = [ - "parking_lot 0.12.4", -] - [[package]] name = "scopeguard" version = "1.2.0" @@ -1774,7 +1704,7 @@ dependencies = [ "fxhash", "libc", "log", - "parking_lot 0.11.2", + "parking_lot", ] [[package]] @@ -2022,18 +1952,6 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" -[[package]] -name = "uuid" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" -dependencies = [ - "getrandom 0.3.3", - "js-sys", - "rand 0.9.2", - "wasm-bindgen", -] - [[package]] name = "valuable" version = "0.1.1" @@ -2085,7 +2003,6 @@ checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", - "rustversion", "wasm-bindgen-macro", ] From 322125992a7bf1c606c45f13a7829d64a0488450 Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Mon, 11 Aug 2025 18:23:23 +0200 Subject: [PATCH 15/17] chore: bump version to 0.16.0 --- package-lock.json | 4 ++-- package.json | 12 ++++++------ platforms/darwin-arm64/package.json | 2 +- platforms/darwin-x64/package.json | 2 +- platforms/linux-arm64-gnu/package.json | 2 +- platforms/linux-x64-gnu/package.json | 2 +- platforms/win32-x64-msvc/package.json | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 00aa460..29bb7de 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@nmshd/rs-crypto-node", - "version": "0.15.0", + "version": "0.16.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@nmshd/rs-crypto-node", - "version": "0.15.0", + "version": "0.16.0", "license": "MIT", "dependencies": { "@neon-rs/load": "^0.1.73", diff --git a/package.json b/package.json index ca95248..846769a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nmshd/rs-crypto-node", - "version": "0.15.0", + "version": "0.16.0", "description": "Node.js Addon providing TypeScript bindings for rust-crypto (crypto-layer).", "homepage": "https://enmeshed.eu", "repository": "github:nmshd/crypto-layer-node", @@ -67,12 +67,12 @@ "@nmshd/rs-crypto-types": "^0.12.0" }, "optionalDependencies": { - "@nmshd/rs-crypto-node-darwin-arm64": "0.15.0", - "@nmshd/rs-crypto-node-darwin-x64": "0.15.0", - "@nmshd/rs-crypto-node-linux-x64-gnu": "0.15.0", - "@nmshd/rs-crypto-node-win32-x64-msvc": "0.15.0" + "@nmshd/rs-crypto-node-darwin-arm64": "0.16.0", + "@nmshd/rs-crypto-node-darwin-x64": "0.16.0", + "@nmshd/rs-crypto-node-linux-x64-gnu": "0.16.0", + "@nmshd/rs-crypto-node-win32-x64-msvc": "0.16.0" }, "overrides": { "tmp": "^0.2.4" } -} +} \ No newline at end of file diff --git a/platforms/darwin-arm64/package.json b/platforms/darwin-arm64/package.json index a627366..63459fc 100644 --- a/platforms/darwin-arm64/package.json +++ b/platforms/darwin-arm64/package.json @@ -2,7 +2,7 @@ "name": "@nmshd/rs-crypto-node-darwin-arm64", "description": "Prebuilt binary package for `rs-crypto-node` on `darwin-arm64`.", "repository": "github:nmshd/crypto-layer-node", - "version": "0.15.0", + "version": "0.16.0", "os": [ "darwin" ], diff --git a/platforms/darwin-x64/package.json b/platforms/darwin-x64/package.json index 41e9917..48f97c9 100644 --- a/platforms/darwin-x64/package.json +++ b/platforms/darwin-x64/package.json @@ -2,7 +2,7 @@ "name": "@nmshd/rs-crypto-node-darwin-x64", "description": "Prebuilt binary package for `rs-layer-ts` on `darwin-x64`.", "repository": "github:nmshd/crypto-layer-node", - "version": "0.15.0", + "version": "0.16.0", "os": [ "darwin" ], diff --git a/platforms/linux-arm64-gnu/package.json b/platforms/linux-arm64-gnu/package.json index 0485537..9af4481 100644 --- a/platforms/linux-arm64-gnu/package.json +++ b/platforms/linux-arm64-gnu/package.json @@ -2,7 +2,7 @@ "name": "@nmshd/rs-crypto-node-linux-arm64-gnu", "description": "Prebuilt binary package for `rs-layer-ts` on `linux-arm64-gnu`.", "repository": "github:nmshd/crypto-layer-node", - "version": "0.15.0", + "version": "0.16.0", "os": [ "linux" ], diff --git a/platforms/linux-x64-gnu/package.json b/platforms/linux-x64-gnu/package.json index 5cc7203..69953bf 100644 --- a/platforms/linux-x64-gnu/package.json +++ b/platforms/linux-x64-gnu/package.json @@ -2,7 +2,7 @@ "name": "@nmshd/rs-crypto-node-linux-x64-gnu", "description": "Prebuilt binary package for `rs-layer-ts` on `linux-x64-gnu`.", "repository": "github:nmshd/crypto-layer-node", - "version": "0.15.0", + "version": "0.16.0", "os": [ "linux" ], diff --git a/platforms/win32-x64-msvc/package.json b/platforms/win32-x64-msvc/package.json index 5f8b9cc..2e354c0 100644 --- a/platforms/win32-x64-msvc/package.json +++ b/platforms/win32-x64-msvc/package.json @@ -2,7 +2,7 @@ "name": "@nmshd/rs-crypto-node-win32-x64-msvc", "description": "Prebuilt binary package for `rs-layer-ts` on `win32-x64-msvc`.", "repository": "github:nmshd/crypto-layer-node", - "version": "0.15.0", + "version": "0.16.0", "os": [ "win32" ], From 678381ef2429fd246691667cab38d06da771c9b3 Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Mon, 11 Aug 2025 18:24:12 +0200 Subject: [PATCH 16/17] docs: removed superflous example --- DEVELOPMENT.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 969e9f0..7871c83 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -161,8 +161,6 @@ node-plugin/ If you are on powershell and have [ripgrep](https://github.com/BurntSushi/ripgrep) installed: ```pwsh - git checkout main - git pull $CAL_NODE_VERSION = rg '^.*\"version\"\:\s*\"(?[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,})\".*$' .\package.json -r '$version' git tag -s "v$CAL_NODE_VERSION" git push origin "v$CAL_NODE_VERSION" @@ -170,8 +168,6 @@ node-plugin/ Or on bash: ```bash - git checkout main - git pull CAL_NODE_VERSION=$(grep -o '"version": "[0-9]\+\.[0-9]\+\.[0-9]\+"' package.json | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+') git tag -s "v$CAL_NODE_VERSION" git push origin "v$CAL_NODE_VERSION" From 066b75943fe88f9c1443889c4b6069546faddd22 Mon Sep 17 00:00:00 2001 From: Adam McKellar Date: Mon, 11 Aug 2025 18:34:59 +0200 Subject: [PATCH 17/17] docs: added note regarding sqlite --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index d8335b3..36fd3ae 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,11 @@ The TypeScript interface definitions are provided by the [`@nmshd/rs-crypto-type > [!WARNING] > Currently crypto-layer errors are not correctly mapped to javascript errors. (See [#Debugging]) +> [!WARNING] +> The key metadata storage uses sqlite. This means multiple processes may use the same database. +> But this also means that the file lock on a database is not released very fast. +> Deleting a database might not be immediately possible after dropping a provider. + > [!NOTE] > MacOS and IOS providers are currently not included, as they'd require the nodejs addon to be signed.