From 876634f93f1201edc8dc21daeb0f0ef00c3e0487 Mon Sep 17 00:00:00 2001 From: mixmix Date: Fri, 14 Jun 2024 10:13:07 +1200 Subject: [PATCH 1/5] rm databases,iagon --- packages/database/.gitignore | 10 - packages/database/CHANGELOG.md | 501 ------- packages/database/LICENSE | 201 --- packages/database/README.md | 115 -- .../database/coverage/coverage-summary.json | 3 - packages/database/package.json | 66 - packages/database/rollup/rollup.mjs | 5 - packages/database/src/index.ts | 119 -- packages/database/src/types.ts | 26 - packages/database/tests/fixtures.ts | 217 --- packages/database/tests/pluto.test.ts | 1263 ----------------- packages/database/tests/setup.ts | 18 - packages/database/tsconfig.json | 10 - packages/database/vitest.config.ts | 28 - packages/iagon/.gitignore | 4 - packages/iagon/CHANGELOG.md | 9 - packages/iagon/LICENSE | 201 --- packages/iagon/README.md | 5 - packages/iagon/coverage/.tmp/coverage-0.json | 1 - packages/iagon/package.json | 47 - packages/iagon/rollup/rollup.mjs | 5 - packages/iagon/src/IagonStorage/api.ts | 196 --- packages/iagon/src/IagonStorage/index.ts | 65 - packages/iagon/src/IagonStorage/instance.ts | 244 ---- packages/iagon/src/IagonStorage/internals.ts | 183 --- packages/iagon/src/IagonStorage/types.ts | 72 - packages/iagon/src/index.ts | 5 - packages/iagon/tests/init.test.ts | 42 - packages/iagon/tests/setup.ts | 17 - packages/iagon/tsconfig.json | 10 - packages/iagon/vitest.config.ts | 30 - 31 files changed, 3718 deletions(-) delete mode 100644 packages/database/.gitignore delete mode 100644 packages/database/CHANGELOG.md delete mode 100644 packages/database/LICENSE delete mode 100644 packages/database/README.md delete mode 100644 packages/database/coverage/coverage-summary.json delete mode 100644 packages/database/package.json delete mode 100644 packages/database/rollup/rollup.mjs delete mode 100644 packages/database/src/index.ts delete mode 100644 packages/database/src/types.ts delete mode 100644 packages/database/tests/fixtures.ts delete mode 100644 packages/database/tests/pluto.test.ts delete mode 100644 packages/database/tests/setup.ts delete mode 100644 packages/database/tsconfig.json delete mode 100644 packages/database/vitest.config.ts delete mode 100644 packages/iagon/.gitignore delete mode 100644 packages/iagon/CHANGELOG.md delete mode 100644 packages/iagon/LICENSE delete mode 100644 packages/iagon/README.md delete mode 100644 packages/iagon/coverage/.tmp/coverage-0.json delete mode 100644 packages/iagon/package.json delete mode 100644 packages/iagon/rollup/rollup.mjs delete mode 100644 packages/iagon/src/IagonStorage/api.ts delete mode 100644 packages/iagon/src/IagonStorage/index.ts delete mode 100644 packages/iagon/src/IagonStorage/instance.ts delete mode 100644 packages/iagon/src/IagonStorage/internals.ts delete mode 100644 packages/iagon/src/IagonStorage/types.ts delete mode 100644 packages/iagon/src/index.ts delete mode 100644 packages/iagon/tests/init.test.ts delete mode 100644 packages/iagon/tests/setup.ts delete mode 100644 packages/iagon/tsconfig.json delete mode 100644 packages/iagon/vitest.config.ts diff --git a/packages/database/.gitignore b/packages/database/.gitignore deleted file mode 100644 index 37d9a7e8..00000000 --- a/packages/database/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -node_modules -junit.xml -lcov.info -build -.npmrc - -coverage/**/*.html -coverage/**/*.css -coverage/**/*.js -coverage/**/*.png \ No newline at end of file diff --git a/packages/database/CHANGELOG.md b/packages/database/CHANGELOG.md deleted file mode 100644 index 01a23fe1..00000000 --- a/packages/database/CHANGELOG.md +++ /dev/null @@ -1,501 +0,0 @@ -## @pluto-encrypted/database [1.15.6](https://github.com/atala-community-projects/pluto-encrypted/compare/@pluto-encrypted/database@1.15.5...@pluto-encrypted/database@1.15.6) (2024-02-23) - - - - - -### Dependencies - -* **@pluto-encrypted/inmemory:** upgraded to 1.12.3 - -## @pluto-encrypted/database [1.15.5](https://github.com/atala-community-projects/pluto-encrypted/compare/@pluto-encrypted/database@1.15.4...@pluto-encrypted/database@1.15.5) (2024-02-10) - - -### Bug Fixes - -* release db ([1e43c7c](https://github.com/atala-community-projects/pluto-encrypted/commit/1e43c7cf82dce2a5eea21af6b952da55b4ba0bf9)) - -## @pluto-encrypted/database [1.15.4](https://github.com/atala-community-projects/pluto-encrypted/compare/@pluto-encrypted/database@1.15.3...@pluto-encrypted/database@1.15.4) (2024-02-10) - - -### Bug Fixes - -* database and schemas fix for last key index for prism did keys. ([b88fa6e](https://github.com/atala-community-projects/pluto-encrypted/commit/b88fa6ed71a6f44da48129bf5bd7a5222b8d000f)) - -## @pluto-encrypted/database [1.15.3](https://github.com/atala-community-projects/pluto-encrypted/compare/@pluto-encrypted/database@1.15.2...@pluto-encrypted/database@1.15.3) (2024-02-08) - - -### Bug Fixes - -* improve coverage ([9de11a9](https://github.com/atala-community-projects/pluto-encrypted/commit/9de11a9095b6a4c232f78108bea5b3059b591e29)) -* Upgrade SDK to latest version which contains a fix to deserialize the JWT Credential from JTI String. ([e9aa761](https://github.com/atala-community-projects/pluto-encrypted/commit/e9aa7610f263fbe7aecf9786e42a1840c2b9a18d)) - - - - - -### Dependencies - -* **@pluto-encrypted/indexdb:** upgraded to 1.12.2 -* **@pluto-encrypted/inmemory:** upgraded to 1.12.2 -* **@pluto-encrypted/leveldb:** upgraded to 1.12.2 - -## @pluto-encrypted/database [1.13.3](https://github.com/atala-community-projects/pluto-encrypted/compare/@pluto-encrypted/database@1.13.2...@pluto-encrypted/database@1.13.3) (2024-01-10) - - -### Bug Fixes - -* databse fix ([a76aa4a](https://github.com/atala-community-projects/pluto-encrypted/commit/a76aa4ae63fcedce24a56b2803b9a15258ed8895)) - -## @pluto-encrypted/database [1.11.1](https://github.com/atala-community-projects/pluto-encrypted/compare/@pluto-encrypted/database@1.11.0...@pluto-encrypted/database@1.11.1) (2024-01-05) - - -### Bug Fixes - -* port changes ([#73](https://github.com/atala-community-projects/pluto-encrypted/issues/73)) ([d225f3b](https://github.com/atala-community-projects/pluto-encrypted/commit/d225f3b7de907fb6932faff1e7dda4b31d10f6cd)) - -# @pluto-encrypted/database [1.11.0](https://github.com/atala-community-projects/pluto-encrypted/compare/@pluto-encrypted/database@1.10.4...@pluto-encrypted/database@1.11.0) (2024-01-05) - - -### Features - -* database docs update. ([cdd1b8e](https://github.com/atala-community-projects/pluto-encrypted/commit/cdd1b8ed4cd6591919e921b4479b01020b5cdbbd)) - -## @pluto-encrypted/database [1.10.4](https://github.com/atala-community-projects/pluto-encrypted/compare/@pluto-encrypted/database@1.10.3...@pluto-encrypted/database@1.10.4) (2024-01-05) - - - - - -### Dependencies - -* **@pluto-encrypted/indexdb:** upgraded to 1.9.4 -* **@pluto-encrypted/inmemory:** upgraded to 1.9.4 -* **@pluto-encrypted/leveldb:** upgraded to 1.9.4 - -## @pluto-encrypted/database [1.10.3](https://github.com/atala-community-projects/pluto-encrypted/compare/@pluto-encrypted/database@1.10.2...@pluto-encrypted/database@1.10.3) (2024-01-05) - - -### Bug Fixes - -* packages docs ([6f5c375](https://github.com/atala-community-projects/pluto-encrypted/commit/6f5c375f198ac4fb09aa6f15af08881e779a7b0d)) - - - - - -### Dependencies - -* **@pluto-encrypted/encryption:** upgraded to 1.9.3 -* **@pluto-encrypted/indexdb:** upgraded to 1.9.3 -* **@pluto-encrypted/inmemory:** upgraded to 1.9.3 -* **@pluto-encrypted/leveldb:** upgraded to 1.9.3 - -## @pluto-encrypted/database [1.10.2](https://github.com/atala-community-projects/pluto-encrypted/compare/@pluto-encrypted/database@1.10.1...@pluto-encrypted/database@1.10.2) (2024-01-05) - - -### Bug Fixes - -* minor change ([#72](https://github.com/atala-community-projects/pluto-encrypted/issues/72)) ([6895b35](https://github.com/atala-community-projects/pluto-encrypted/commit/6895b35c5f144a4a5282e8afdba8f796837a9bfa)) - - - - - -### Dependencies - -* **@pluto-encrypted/encryption:** upgraded to 1.9.2 -* **@pluto-encrypted/indexdb:** upgraded to 1.9.2 -* **@pluto-encrypted/inmemory:** upgraded to 1.9.2 -* **@pluto-encrypted/leveldb:** upgraded to 1.9.2 - -## @pluto-encrypted/database [1.10.1](https://github.com/atala-community-projects/pluto-encrypted/compare/@pluto-encrypted/database@1.10.0...@pluto-encrypted/database@1.10.1) (2024-01-05) - - -### Bug Fixes - -* pkg author email change. ([1550d5f](https://github.com/atala-community-projects/pluto-encrypted/commit/1550d5f968caac92add817fb79716a6a54ab4bc3)) - - - - - -### Dependencies - -* **@pluto-encrypted/encryption:** upgraded to 1.9.1 -* **@pluto-encrypted/indexdb:** upgraded to 1.9.1 -* **@pluto-encrypted/inmemory:** upgraded to 1.9.1 -* **@pluto-encrypted/leveldb:** upgraded to 1.9.1 - -# @pluto-encrypted/database [1.10.0](https://github.com/atala-community-projects/pluto-encrypted/compare/@pluto-encrypted/database@1.9.0...@pluto-encrypted/database@1.10.0) (2024-01-05) - - -### Features - -* packages ([88e569b](https://github.com/atala-community-projects/pluto-encrypted/commit/88e569b05129d1b0f586f5aded5d8dd645cd285f)) - - - - - -### Dependencies - -* **@pluto-encrypted/encryption:** upgraded to 1.9.0 -* **@pluto-encrypted/indexdb:** upgraded to 1.9.0 -* **@pluto-encrypted/inmemory:** upgraded to 1.9.0 -* **@pluto-encrypted/leveldb:** upgraded to 1.9.0 - -## @pluto-encrypted/database [1.2.15](https://github.com/atala-community-projects/pluto-encrypted/compare/@pluto-encrypted/database@1.2.14...@pluto-encrypted/database@1.2.15) (2024-01-04) - - -### Bug Fixes - -* encrypted change in docs ([#69](https://github.com/atala-community-projects/pluto-encrypted/issues/69)) ([eebfacd](https://github.com/atala-community-projects/pluto-encrypted/commit/eebfacd3b0536600d77e0517a7eb8775826baa82)) - - - - - -### Dependencies - -* **@pluto-encrypted/encryption:** upgraded to 1.2.9 -* **@pluto-encrypted/indexdb:** upgraded to 1.3.12 -* **@pluto-encrypted/inmemory:** upgraded to 1.3.12 -* **@pluto-encrypted/leveldb:** upgraded to 1.3.12 - -## @pluto-encrypted/database [1.2.15-rc.1](https://github.com/atala-community-projects/pluto-encrypted/compare/@pluto-encrypted/database@1.2.14...@pluto-encrypted/database@1.2.15-rc.1) (2024-01-04) - - - - - -### Dependencies - -* **@pluto-encrypted/encryption:** upgraded to 1.2.9-rc.1 -* **@pluto-encrypted/indexdb:** upgraded to 1.3.12-rc.1 -* **@pluto-encrypted/inmemory:** upgraded to 1.3.12-rc.1 -* **@pluto-encrypted/leveldb:** upgraded to 1.3.12-rc.1 - -## @pluto-encrypted/database [1.2.14](https://github.com/atala-community-projects/pluto-encrypted/compare/@pluto-encrypted/database@1.2.13...@pluto-encrypted/database@1.2.14) (2024-01-03) - - - - - -### Dependencies - -* **@pluto-encrypted/indexdb:** upgraded to 1.3.11 -* **@pluto-encrypted/inmemory:** upgraded to 1.3.11 -* **@pluto-encrypted/leveldb:** upgraded to 1.3.11 - -## @pluto-encrypted/database [1.2.13](https://github.com/atala-community-projects/pluto-encrypted/compare/@pluto-encrypted/database@1.2.12...@pluto-encrypted/database@1.2.13) (2024-01-03) - - - - - -### Dependencies - -* **@pluto-encrypted/indexdb:** upgraded to 1.3.10 -* **@pluto-encrypted/inmemory:** upgraded to 1.3.10 -* **@pluto-encrypted/leveldb:** upgraded to 1.3.10 - -## @pluto-encrypted/database [1.2.12](https://github.com/atala-community-projects/pluto-encrypted/compare/@pluto-encrypted/database@1.2.11...@pluto-encrypted/database@1.2.12) (2024-01-03) - - - - - -### Dependencies - -* **@pluto-encrypted/indexdb:** upgraded to 1.3.9 -* **@pluto-encrypted/inmemory:** upgraded to 1.3.9 -* **@pluto-encrypted/leveldb:** upgraded to 1.3.9 - -## @pluto-encrypted/database [1.2.11](https://github.com/atala-community-projects/pluto-encrypted/compare/@pluto-encrypted/database@1.2.10...@pluto-encrypted/database@1.2.11) (2024-01-02) - - -### Bug Fixes - -* package updates and ci ([fb13bb7](https://github.com/atala-community-projects/pluto-encrypted/commit/fb13bb7942568b50b41f0c777fb1173bcd63dd3b)) -* release changes ([781915c](https://github.com/atala-community-projects/pluto-encrypted/commit/781915ccd4443bae3b8716de76929aaf1af3cd3e)) -* versions ([1bf0e2d](https://github.com/atala-community-projects/pluto-encrypted/commit/1bf0e2dbc9fb388f90c494858019af0ac29681da)) - - - - - -### Dependencies - -* **@pluto-encrypted/indexdb:** upgraded to 1.3.8 -* **@pluto-encrypted/inmemory:** upgraded to 1.3.8 -* **@pluto-encrypted/leveldb:** upgraded to 1.3.8 - -## @pluto-encrypted/database [1.2.9](https://github.com/atala-community-projects/pluto-encrypted/compare/@pluto-encrypted/database@1.2.8...@pluto-encrypted/database@1.2.9) (2024-01-01) - - -### Bug Fixes - -* add homepage to all npm packages. ([f0dcd0a](https://github.com/atala-community-projects/pluto-encrypted/commit/f0dcd0a90ff8cf5278de1158a6e90298d25d43c4)) - - - - - -### Dependencies - -* **@pluto-encrypted/indexdb:** upgraded to 1.3.6 -* **@pluto-encrypted/inmemory:** upgraded to 1.3.6 -* **@pluto-encrypted/leveldb:** upgraded to 1.3.6 - -## @pluto-encrypted/database [1.2.8](https://github.com/atala-community-projects/pluto-encrypted/compare/@pluto-encrypted/database@1.2.7...@pluto-encrypted/database@1.2.8) (2024-01-01) - - -### Bug Fixes - -* replace npm package repositories. ([c7c4bb9](https://github.com/atala-community-projects/pluto-encrypted/commit/c7c4bb9e5ab55762ac44bc9caa1b98094088647d)) - - - - - -### Dependencies - -* **@pluto-encrypted/indexdb:** upgraded to 1.3.5 -* **@pluto-encrypted/inmemory:** upgraded to 1.3.5 -* **@pluto-encrypted/leveldb:** upgraded to 1.3.5 - -## @pluto-encrypted/database [1.2.7](https://github.com/elribonazo/pluto-encrypted/compare/@pluto-encrypted/database@1.2.6...@pluto-encrypted/database@1.2.7) (2023-12-23) - - -### Bug Fixes - -* add higher test coverage for storages. ([#68](https://github.com/elribonazo/pluto-encrypted/issues/68)) ([f15979f](https://github.com/elribonazo/pluto-encrypted/commit/f15979fff3c58f04d0eb617eda3a5eb677b1dfa1)) - - - - - -### Dependencies - -* **@pluto-encrypted/indexdb:** upgraded to 1.3.4 -* **@pluto-encrypted/inmemory:** upgraded to 1.3.4 -* **@pluto-encrypted/leveldb:** upgraded to 1.3.4 - -## @pluto-encrypted/database [1.2.6](https://github.com/elribonazo/pluto-encrypted/compare/@pluto-encrypted/database@1.2.5...@pluto-encrypted/database@1.2.6) (2023-12-23) - - -### Bug Fixes - -* docs improvement. ([16f4d56](https://github.com/elribonazo/pluto-encrypted/commit/16f4d569e08e67f3130deee413bb9717b11c2889)) - -## @pluto-encrypted/database [1.2.4](https://github.com/elribonazo/pluto-encrypted/compare/@pluto-encrypted/database@1.2.3...@pluto-encrypted/database@1.2.4) (2023-12-23) - - -### Bug Fixes - -* Improve test coverage for test-suite with most of the needed fea… ([#66](https://github.com/elribonazo/pluto-encrypted/issues/66)) ([b90e406](https://github.com/elribonazo/pluto-encrypted/commit/b90e40670e82808f38b880456ccc0c5505b48757)) - - - - - -### Dependencies - -* **@pluto-encrypted/indexdb:** upgraded to 1.3.2 -* **@pluto-encrypted/inmemory:** upgraded to 1.3.2 -* **@pluto-encrypted/leveldb:** upgraded to 1.3.2 - -## @pluto-encrypted/database [1.2.2](https://github.com/elribonazo/pluto-encrypted/compare/@pluto-encrypted/database@1.2.1...@pluto-encrypted/database@1.2.2) (2023-12-23) - - -### Bug Fixes - -* Correct coverage on all 3 packages ([e18a707](https://github.com/elribonazo/pluto-encrypted/commit/e18a707b49784b6eace13aaa69e8d4fd4526626b)) - - - - - -### Dependencies - -* **@pluto-encrypted/indexdb:** upgraded to 1.3.1 -* **@pluto-encrypted/inmemory:** upgraded to 1.3.1 -* **@pluto-encrypted/leveldb:** upgraded to 1.3.1 - -## @pluto-encrypted/database [1.2.1](https://github.com/elribonazo/pluto-encrypted/compare/@pluto-encrypted/database@1.2.0...@pluto-encrypted/database@1.2.1) (2023-12-23) - - -### Bug Fixes - -* add missing code coverage. ([#65](https://github.com/elribonazo/pluto-encrypted/issues/65)) ([e3ded9a](https://github.com/elribonazo/pluto-encrypted/commit/e3ded9a5a30b01c37d0d42102bc9f03ce8b21f69)) - -## @pluto-encrypted/database [1.1.1](https://github.com/elribonazo/pluto-encrypted/compare/@pluto-encrypted/database@1.1.0...@pluto-encrypted/database@1.1.1) (2023-12-19) - - - - - -### Dependencies - -* **@pluto-encrypted/inmemory:** upgraded to 1.2.1 - -# @pluto-encrypted/database [1.1.0](https://github.com/elribonazo/pluto-encrypted/compare/@pluto-encrypted/database@1.0.23...@pluto-encrypted/database@1.1.0) (2023-12-19) - - -### Features - -* **migrations:** Support migrations across all encrypted storages supported by pluto encrypted ([#63](https://github.com/elribonazo/pluto-encrypted/issues/63)) ([6b609df](https://github.com/elribonazo/pluto-encrypted/commit/6b609df8cf893a269fc0c1f8026db0caa6098ac5)) - - - - - -### Dependencies - -* **@pluto-encrypted/indexdb:** upgraded to 1.2.0 -* **@pluto-encrypted/inmemory:** upgraded to 1.2.0 -* **@pluto-encrypted/leveldb:** upgraded to 1.2.0 - -## @pluto-encrypted/database [1.0.23](https://github.com/elribonazo/pluto-encrypted/compare/@pluto-encrypted/database@1.0.22...@pluto-encrypted/database@1.0.23) (2023-12-19) - - - - - -### Dependencies - -* **@pluto-encrypted/leveldb:** upgraded to 1.1.8 - -## @pluto-encrypted/database [1.0.19](https://github.com/elribonazo/pluto-encrypted/compare/@pluto-encrypted/database@1.0.18...@pluto-encrypted/database@1.0.19) (2023-12-18) - - -### Bug Fixes - -* Improve all package documentation ([2602af4](https://github.com/elribonazo/pluto-encrypted/commit/2602af4f37f97eb2f70d39d79eb3c3e715e7cead)) - - - - - -### Dependencies - -* **@pluto-encrypted/indexdb:** upgraded to 1.1.8 -* **@pluto-encrypted/inmemory:** upgraded to 1.1.7 -* **@pluto-encrypted/leveldb:** upgraded to 1.1.7 - -## @pluto-encrypted/database [1.0.18](https://github.com/elribonazo/pluto-encrypted/compare/@pluto-encrypted/database@1.0.17...@pluto-encrypted/database@1.0.18) (2023-12-17) - - -### Bug Fixes - -* Improve doc generation, export al types and possible external types from other dependencies. ([971241f](https://github.com/elribonazo/pluto-encrypted/commit/971241fd26aca33a0c1b8f01e36c56a9c8a8202c)) - - - - - -### Dependencies - -* **@pluto-encrypted/indexdb:** upgraded to 1.1.7 -* **@pluto-encrypted/inmemory:** upgraded to 1.1.6 -* **@pluto-encrypted/leveldb:** upgraded to 1.1.6 - -## @pluto-encrypted/database [1.0.17](https://github.com/elribonazo/pluto-encrypted/compare/@pluto-encrypted/database@1.0.16...@pluto-encrypted/database@1.0.17) (2023-12-17) - - -### Bug Fixes - -* generate documentation for all the packages in 1 shot. ([3a27f78](https://github.com/elribonazo/pluto-encrypted/commit/3a27f78d122855a353efe814fdb7e48e0222ade2)) - - - - - -### Dependencies - -* **@pluto-encrypted/indexdb:** upgraded to 1.1.6 -* **@pluto-encrypted/inmemory:** upgraded to 1.1.5 -* **@pluto-encrypted/leveldb:** upgraded to 1.1.5 - -## @pluto-encrypted/database [1.0.16](https://github.com/elribonazo/pluto-encrypted/compare/@pluto-encrypted/database@1.0.15...@pluto-encrypted/database@1.0.16) (2023-12-17) - - - - - -### Dependencies - -* **@pluto-encrypted/indexdb:** upgraded to 1.1.5 -* **@pluto-encrypted/inmemory:** upgraded to 1.1.4 -* **@pluto-encrypted/leveldb:** upgraded to 1.1.4 - -## @pluto-encrypted/database [1.0.15](https://github.com/elribonazo/pluto-encrypted/compare/@pluto-encrypted/database@1.0.14...@pluto-encrypted/database@1.0.15) (2023-12-17) - - -### Bug Fixes - -* Remove vulnerable dependencies with unused dev dependency, babel. ([94dcc39](https://github.com/elribonazo/pluto-encrypted/commit/94dcc3948d8c2e1774362fcfcfda0198b78da05c)) - -## @pluto-encrypted/database [1.0.14](https://github.com/elribonazo/pluto-encrypted/compare/@pluto-encrypted/database@1.0.13...@pluto-encrypted/database@1.0.14) (2023-12-17) - - -### Bug Fixes - -* Improve code coverage and set 100 threshold from now on ([#60](https://github.com/elribonazo/pluto-encrypted/issues/60)) ([3bc51e9](https://github.com/elribonazo/pluto-encrypted/commit/3bc51e93b95a14611ea0799f5d7c22bfd69bb21a)) - - - - - -### Dependencies - -* **@pluto-encrypted/indexdb:** upgraded to 1.1.4 -* **@pluto-encrypted/inmemory:** upgraded to 1.1.3 -* **@pluto-encrypted/leveldb:** upgraded to 1.1.3 - -## @pluto-encrypted/database [1.0.13](https://github.com/elribonazo/pluto-encrypted/compare/@pluto-encrypted/database@1.0.12...@pluto-encrypted/database@1.0.13) (2023-12-16) - - -### Bug Fixes - -* rollback pkg versions. ([738e4e9](https://github.com/elribonazo/pluto-encrypted/commit/738e4e9eb0cf6bf8712edf9f44011555b7513605)) -* trigger package update ([72c8d64](https://github.com/elribonazo/pluto-encrypted/commit/72c8d645db13000945b438cb223728c55f910433)) - - - - - -### Dependencies - -* **@pluto-encrypted/indexdb:** upgraded to 1.1.3 -* **@pluto-encrypted/inmemory:** upgraded to 1.1.2 -* **@pluto-encrypted/leveldb:** upgraded to 1.1.2 - -# [@pluto-encrypted/database-v1.0.11](https://github.com/elribonazo/pluto-encrypted/compare/@pluto-encrypted/database-v1.0.10...@pluto-encrypted/database-v1.0.11) (2023-12-16) - - -### Bug Fixes - -* Introducing shared dependencies for db wrappers ([#57](https://github.com/elribonazo/pluto-encrypted/issues/57)) ([393b3bc](https://github.com/elribonazo/pluto-encrypted/commit/393b3bc2cbd811bf45fca7f67bb6704c617ed504)) - -# [@pluto-encrypted/database-v1.0.7](https://github.com/elribonazo/pluto-encrypted/compare/@pluto-encrypted/database-v1.0.6...@pluto-encrypted/database-v1.0.7) (2023-12-16) - - -### Bug Fixes - -* re-enable test coverage report. ([37c94c3](https://github.com/elribonazo/pluto-encrypted/commit/37c94c3562ff180fe592c7c34ddcdb08a42b740b)) - -# [@pluto-encrypted/database-v1.0.6](https://github.com/elribonazo/pluto-encrypted/compare/@pluto-encrypted/database-v1.0.5...@pluto-encrypted/database-v1.0.6) (2023-12-16) - - -### Bug Fixes - -* remove coverage from ignored ([#53](https://github.com/elribonazo/pluto-encrypted/issues/53)) ([0b51989](https://github.com/elribonazo/pluto-encrypted/commit/0b519896bc12001abba3d8db6c9da290c72b0d94)) - -# [@pluto-encrypted/database-v1.0.5](https://github.com/elribonazo/pluto-encrypted/compare/@pluto-encrypted/database-v1.0.4...@pluto-encrypted/database-v1.0.5) (2023-12-16) - - -### Bug Fixes - -* release. ([b21a863](https://github.com/elribonazo/pluto-encrypted/commit/b21a863bedd3258bb0809c963f74a19c511fe8a8)) diff --git a/packages/database/LICENSE b/packages/database/LICENSE deleted file mode 100644 index 216af719..00000000 --- a/packages/database/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright © 2021-2023 Input Output Global - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/packages/database/README.md b/packages/database/README.md deleted file mode 100644 index ce030e09..00000000 --- a/packages/database/README.md +++ /dev/null @@ -1,115 +0,0 @@ -# Pluto-encrypted -Pluto Encrypted is a secure storage wrapper for (IndexDB, InMemory or LevelDB) and [AtalaPrism ](https://input-output-hk.github.io/atala-prism-wallet-sdk-ts/)([Pluto](https://input-output-hk.github.io/atala-prism-wallet-sdk-ts/interfaces/Domain.Pluto.html)) - -## USAGE -To install simply run - -```bash -npm i pluto-encrypted --save -# or with yarnyarn add pluto-encrypted -``` - -## Usage -This package implements Pluto interface and is fully compatible with the Prism Agent (check-compatibility versions), in order to use it just create a database as follows. - -DatabaseName is any string. -Password is a 32 bytes buffer. - -```typescript -import { Database } from 'pluto-encrypted'; -//You can use IndexDB any other storage that is compatible. -import IndexDB from "@pluto-encrypted/indexdb"; -import { - getDefaultCollections, - DIDCollection, - DIDPairCollection, - MediatorCollection, - PrivateKeyColletion, - CredentialCollection, - CredentialRequestMetadataCollection, - LinkSecretColletion, - MessageColletion -} from "@pluto-encrypted/schemas"; -const defaultPassword = new Uint8Array(32).fill(1); -const db = await Database.createEncrypted<{ - dids: DIDCollection; - didpairs: DIDPairCollection; - mediators: MediatorCollection; - privatekeys: PrivateKeyColletion; - credentials: CredentialCollection; - credentialrequestmetadatas: CredentialRequestMetadataCollection; - linksecrets: LinkSecretColletion; - messages: MessageColletion; -}>( - { - name: `my-db`, - encryptionKey: defaultPassword, - storage: IndexDB, - collections: getDefaultCollections() - } -); -const messages = await db.getAllMessages(); -``` - -Backup database into an unencrypted JSON string and restore from backup. -```typescript -import { Database } from 'pluto-encrypted'; -//You can use IndexDB any other storage that is compatible. -import IndexDB from "@pluto-encrypted/indexdb"; -import { - getDefaultCollections, - DIDCollection, - DIDPairCollection, - MediatorCollection, - PrivateKeyColletion, - CredentialCollection, - CredentialRequestMetadataCollection, - LinkSecretColletion, - MessageColletion -} from "@pluto-encrypted/schemas"; -const defaultPassword = new Uint8Array(32).fill(1); -const db = await Database.createEncrypted<{ - dids: DIDCollection; - didpairs: DIDPairCollection; - mediators: MediatorCollection; - privatekeys: PrivateKeyColletion; - credentials: CredentialCollection; - credentialrequestmetadatas: CredentialRequestMetadataCollection; - linksecrets: LinkSecretColletion; - messages: MessageColletion; -}>( - { - name: "my-db", - encryptionKey: defaultPassword, - storage: IndexDB, - collections: getDefaultCollections() - } -); -const backup = await db.backup(); -const restoredDatabase = await Database.createEncrypted<{ - dids: DIDCollection; - didpairs: DIDPairCollection; - mediators: MediatorCollection; - privatekeys: PrivateKeyColletion; - credentials: CredentialCollection; - credentialrequestmetadatas: CredentialRequestMetadataCollection; - linksecrets: LinkSecretColletion; - messages: MessageColletion; -}>( - { - name: "my-db", - encryptionKey: defaultPassword, - storage: IndexDB, - importData: backup, - collections: getDefaultCollections() - } -); -const messages = await restoredDatabase.getAllMessages(); -``` - -If the database is later initialised with the wrong password the "createEncrypted" async function will throw an exception and will not let you decrypt any encrypted content. - -## QA & Documentation -| Statements | Branches | Functions | Lines | -| --------------------------- | ----------------------- | ------------------------- | ----------------- | -| ![Statements](https://img.shields.io/badge/statements-100%25-brightgreen.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-100%25-brightgreen.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-100%25-brightgreen.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-100%25-brightgreen.svg?style=flat) | diff --git a/packages/database/coverage/coverage-summary.json b/packages/database/coverage/coverage-summary.json deleted file mode 100644 index 2d4df372..00000000 --- a/packages/database/coverage/coverage-summary.json +++ /dev/null @@ -1,3 +0,0 @@ -{"total": {"lines":{"total":37,"covered":37,"skipped":0,"pct":100},"statements":{"total":37,"covered":37,"skipped":0,"pct":100},"functions":{"total":6,"covered":6,"skipped":0,"pct":100},"branches":{"total":15,"covered":15,"skipped":0,"pct":100},"branchesTrue":{"total":0,"covered":0,"skipped":0,"pct":"Unknown"}} -,"/home/runner/work/pluto-encrypted/pluto-encrypted/packages/database/src/index.ts": {"lines":{"total":37,"covered":37,"skipped":0,"pct":100},"functions":{"total":6,"covered":6,"skipped":0,"pct":100},"statements":{"total":37,"covered":37,"skipped":0,"pct":100},"branches":{"total":15,"covered":15,"skipped":0,"pct":100}} -} diff --git a/packages/database/package.json b/packages/database/package.json deleted file mode 100644 index f63c2edc..00000000 --- a/packages/database/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "name": "@pluto-encrypted/database", - "version": "1.15.6", - "description": "Encrypted database for Edge Wallet SDK that supports multiple db, IndexDB, LevelDB and InMemory", - "main": "./build/cjs/index.cjs", - "module": "./build/esm/index.mjs", - "types": "./build/index.d.ts", - "exports": { - ".": { - "import": "./build/esm/index.mjs", - "require": "./build/cjs/index.cjs" - } - }, - "homepage": "https://atala-community-projects.github.io/pluto-encrypted", - "publishConfig": { - "access": "public" - }, - "scripts": { - "prepublishOnly": "npm run build", - "clean-packages": "rm -rf node_modules && rm -rf build", - "test": "NODE_ENV=debug npx vitest run tests/*.test.ts --pool threads --poolOptions.threads.singleThread", - "test:watch": "NODE_ENV=debug vitest tests/*.test.ts --pool threads --poolOptions.threads.singleThread", - "test:debug": "NODE_ENV=debug vitest tests/*.test.ts --inspect-brk --pool threads --poolOptions.threads.singleThread", - "build": "rm -rf build && npx rollup -c rollup/rollup.mjs", - "coverage": "npx vitest run --coverage && npx istanbul-badges-readme", - "docs": "npx typedoc --options ./typedoc.markdown.cjs --hideGenerator", - "docs-html": "npx typedoc --options ./typedoc.html.cjs --hideGenerator" - }, - "repository": { - "type": "git", - "url": "https://github.com/atala-community-projects/pluto-encrypted.git" - }, - "author": "elribonazo@gmail.com", - "license": "Apache-2.0", - "peerDependencies": { - "@atala/prism-wallet-sdk": "^4.0.2" - }, - "optionalDependencies": { - "@pluto-encrypted/indexdb": "1.12.2", - "@pluto-encrypted/inmemory": "1.12.3", - "@pluto-encrypted/leveldb": "1.12.2" - }, - "devDependencies": { - "@pluto-encrypted/encryption": "1.11.0", - "@pluto-encrypted/indexdb": "1.12.2", - "@pluto-encrypted/inmemory": "1.12.3", - "@pluto-encrypted/leveldb": "1.12.2", - "@pluto-encrypted/shared": "1.11.3", - "@pluto-encrypted/schemas": "^1.3.5", - "@vitest/coverage-v8": "^1.0.4", - "level": "^6.0.1" - }, - "dependencies": { - "@atala/prism-wallet-sdk": "^4.0.2", - "@pluto-encrypted/encryption": "1.11.0", - "@pluto-encrypted/shared": "1.11.3", - "@pluto-encrypted/schemas": "^1.3.5", - "rxdb": "^14.17.0", - "rxjs": "7.8.1", - "uuid": "^9.0.1" - }, - "files": [ - "build/*" - ], - "gitHead": "6aa4ce8bbb9938fc4c4e790efffa5b902631362c" -} diff --git a/packages/database/rollup/rollup.mjs b/packages/database/rollup/rollup.mjs deleted file mode 100644 index 1278dac6..00000000 --- a/packages/database/rollup/rollup.mjs +++ /dev/null @@ -1,5 +0,0 @@ -import nodePolyfills from "rollup-plugin-polyfill-node"; - -import CreateConfig from "../../../rollup/index.mjs"; - -export default CreateConfig(undefined, []); diff --git a/packages/database/src/index.ts b/packages/database/src/index.ts deleted file mode 100644 index 5aef3f31..00000000 --- a/packages/database/src/index.ts +++ /dev/null @@ -1,119 +0,0 @@ -/** - * @packageDocumentation - * @module database - */ -import { DatabaseBase, ExtractStaticMethods, UnionToIntersection } from '@pluto-encrypted/shared' -import { - CollectionsOfDatabase, - RxCollection, - RxCollectionCreator, - RxDumpDatabase, - RxError, - RxStorage -} from 'rxdb' - -export type * from './types'; - -/** - * Pluto is a storage interface describing storage requirements of the edge agents - * which will be implemented using this SDK. Implement this interface using your - * preferred underlying storage technology, most appropriate for your use case. - */ -export const Database = { - createEncrypted: async function createEncrypted< - Collections extends CollectionsOfDatabase, - >(options: { - name: string; - encryptionKey: Uint8Array; - importData?: RxDumpDatabase; - storage: RxStorage; - autoStart?: boolean; - collections: { - [key in keyof Collections]: RxCollectionCreator; - }; - }) { - try { - const { - collections, - name, - storage, - encryptionKey, - importData, - autoStart = true, - } = options; - - - if (!storage) { - throw new Error('Please provide a valid storage.') - } - - const collectionMap = new Map>(); - - Object.keys(collections).forEach((collectionName) => { - const currentCollection = collections[collectionName]!; - collectionMap.set(collectionName, currentCollection) - }) - - const instance = new DatabaseBase({ - ignoreDuplicate: true, - name, - storage, - password: Buffer.from(encryptionKey).toString('hex') - }) - - if (autoStart) { - await instance.start(collections) - } - - if (importData) { - await instance.db.importJSON(importData) - } - - const currentCollections = instance.db.collections; - const collectionKeys = Object.keys(currentCollections) - const staticMethodModels = collectionKeys.reduce>((statics, collectionName) => { - const currentCollection: RxCollection = instance.getCollection(collectionName); - Object.keys(currentCollection.statics).forEach((staticName) => { - const func = currentCollection.statics[staticName]!; - if (statics.has(staticName)) { - throw new Error(`Static function in model ${collectionName}.${staticName} is duplicated, statics must be unique across al collections.`) - } - statics.set(staticName, func) - }) - return statics - }, new Map()); - - - const proxy = new Proxy & UnionToIntersection>>(instance as any, { - get(target, propAny) { - const prop = String(propAny) - const destination = target[prop] - if (typeof destination === 'function') { - // If the property is a function, return a function that calls it - return function (...args) { - return destination.apply(target, args); - }; - } else { - if (staticMethodModels.has(prop.toString())) { - return staticMethodModels.get(prop.toString()) - } - return destination; - } - }, - }) - - return proxy - } catch (err) { - /* istanbul ignore else */ - if ((err as RxError).code === 'DB1') { - throw new Error('Invalid Authentication') - } else { - /* istanbul ignore next */ - - throw err - } - } - } -} \ No newline at end of file diff --git a/packages/database/src/types.ts b/packages/database/src/types.ts deleted file mode 100644 index aa0d2fab..00000000 --- a/packages/database/src/types.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { PlutoCollections } from '@pluto-encrypted/schemas' -import { type MangoQuery, type MangoQueryNoLimit, type RxCollection, type RxDocument, type RxDumpDatabase, type RxStorage } from 'rxdb/dist/types/types' - -export type NoKeys = { - [P in Exclude]: T[P]; -} - - - -export interface GenericORMType extends RxCollection { - count: (this: RxCollection, query: MangoQuery | undefined) => Promise - findByIds: (this: RxCollection, ids: string[]) => Map - find: (queryObj?: MangoQueryNoLimit | string) => Array> - findOne: (queryObj?: MangoQueryNoLimit | string) => RxDocument | null - remove: (queryObj?: MangoQueryNoLimit | string) => Array> -} - - -export interface createEncryptedOptions { - name: string - encryptionKey: Uint8Array - importData?: RxDumpDatabase - storage: RxStorage -} - - diff --git a/packages/database/tests/fixtures.ts b/packages/database/tests/fixtures.ts deleted file mode 100644 index 42b52a67..00000000 --- a/packages/database/tests/fixtures.ts +++ /dev/null @@ -1,217 +0,0 @@ -import SDK from "@atala/prism-wallet-sdk"; -const { - Ed25519KeyPair, - Ed25519PrivateKey, - Secp256k1KeyPair, - Secp256k1PrivateKey, - X25519KeyPair, - X25519PrivateKey, -} = SDK; - -const secpPrivateKey = new Secp256k1PrivateKey( - new Uint8Array([ - 45, 182, 188, 189, 107, 229, 136, 180, 199, 177, 110, 84, 98, 140, 121, 84, - 107, 105, 179, 139, 14, 174, 177, 63, 173, 141, 7, 118, 161, 192, 192, 221, - ]) -); -export const secp256K1 = new Secp256k1KeyPair( - secpPrivateKey, - secpPrivateKey.publicKey() -); - -const ed25519PrivateKey = new Ed25519PrivateKey( - Buffer.from("JLIJQ5jlkyqtGmtOth6yggJLLC0zuRhUPiBhd1-rGPs", "base64url") -); -export const ed25519 = new Ed25519KeyPair( - ed25519PrivateKey, - ed25519PrivateKey.publicKey() -); - -const x25519PrivateKey = new X25519PrivateKey( - Buffer.from("eHbEtI71XIBIsuQK7XdjZ_ZPnLZb3y4paWoqSoS7BnI", "base64url") -); -export const x25519 = new X25519KeyPair( - x25519PrivateKey, - x25519PrivateKey.publicKey() -); - -export const linkSecret: SDK.Domain.Anoncreds.LinkSecret = - "11713282333014162675185775227133916651856831195832037281552411830422122210216"; - -export const schema: SDK.Domain.Anoncreds.Schema = { - name: "schema name", - version: "1.0", - attrNames: ["name", "age"], - issuerId: "did:web:xyz", -}; - -export const schemaId = "did:web:xyz/resource/schema"; -export const schemas = { [schemaId]: schema }; -export const credDefId = "did:web:xyz/resource/cred-def"; - -export const credOffer: SDK.Domain.Anoncreds.CredentialOffer = { - schema_id: schemaId, - cred_def_id: "did:web:xyz/resource/cred-def", - key_correctness_proof: { - c: "76557819503450570442357976029271303987759136289314846847024757974752606615433", - xz_cap: - "26047879363332547950920668394631678475313752008082689588028385075806198959009721480298642181417611387120760535340960652992598169976318796059443404652478753165940963938026715950444631637055579596396026982943529446772342056118213731997539494790069972362712412848545977350411933491687478962150552753933891241069977903236245408595467016248045708851235686828269686277218325172481148269365738838667311348922929239876501229218854901336077610669087389670091204141817761014674154146755628794442065539896048607369184947340323162627521384048677015174858428761829211514983844416604741456701465732354883642257230400665085164493995639836946749428712602480384130632356640901418646806091518373306556288954289", - xr_cap: [ - [ - "age", - "37523550844923066276917545265534491936001653058431807699727798378094010348017417786213033463012541464861614713651678817589894752131766899552202186956509278956052677681349590167219631006515597935364124683509557223008283580029502931430380055551345019089794453342866634865505293670597130041956152064268604570574775784367900164625667326244382433984825612756021533073304839324299187948682509607641828855308845653725291687712265043071582873816295392972053358963210517456371474273531564989381194134152519027319325114667103082545250397114009229013996244896611333191925354781709243382864211341173108829209135657104587482214147977220885303413739052442209985783183870139853950883453738389448581714672060", - ], - [ - "name", - "40114198290379256041372995441628703701697468212013103904320488156133624512624518776636636679936428767628511100834703945932272277119352677403376670387372871153129929576812118980029243346717913240254947965865744085397369091151556546260636586787167694200525462305016276069215035338546740434877965464035950368040654082423013022634233986285166071269362922845761571385784692708141028444335024777471220924204393976065258643143210131836379590020472238396839577304048276973858344620772092596583905864740719861059017160818497762374044149149314046526512381034705421360416522645565343294048956673555742143144006335123972014910685697417095527968642708567895812407107903351826576984395268441796123152869510", - ], - [ - "master_secret", - "17378775238119039681239435504832690562693139985297581004609697280961799415478395227365074603387798682709917541921746683788459574112268962573229585691444414002163279289000517128970409045422613794886895141511303902319051161040962745971806552893764259050521879639998894425230406084402232911982800786217758930274472277822969507777888869816351683032762867227108504826294469816717150773627310267951901092893045791169831629487768555281136526127037211876008761095116571863850777229858315210904916939671575373966848439177870458227542504890675195429629741131074431032162974747956977739339739205375284664571315097532432745565887768994606184944468164941808835757519277660700337481958408893690556466192208", - ], - ], - }, - nonce: "1155389807945475146571300", - method_name: "anoncreds", -}; - -export const credDef: SDK.Domain.Anoncreds.CredentialDefinition = { - schemaId: schemaId, - issuerId: "did:web:xyz", - type: "CL", - tag: "default-tag", - value: { - primary: { - n: "2138440416314633374591088195063696546043123277066922638020134791602273076278733265198390559999196639059617332341897171969471396384426442263407149455313654361683364983454358134154449737184762832549626365860664862681300853260092245460133629393197506797813510115597160823513332022868942084864264115026443220310847039670437343802177458713870037673612155704946372493840496386886773727466495489416209443026828278038061798339071661238983028310965032474627760641708951476779486574582009667149594572417153818776817059886544993889576267253226541766667935646506220326294624143640755229768275395867260209310406030868988219396673", - s: "375783515905172479678189694439438293124410653823481120500720236836905424414937248674149487774807325687499797860172928285508262280982970486768785344476352731223145346966890620843636512852741061102998942506714117113306492151964896503097722677379824165340858924427501815041684806109662866453098916197117471136063544146802291756839519730104512053670312142976363639936614666586671853469442125677481817693926232925010812196258066027716393514210467312905260647664980944899919627823305269563954240416713003055413714633135095057064137982879242895058862234484222386526805971607419993779687534728535549485529895709794024363544", - r: [ - [ - "name", - "1339792759576954480492376578847792893360328516229286900150133471363186583829749911481667461401130501227404036403509999655715920590906655449568921973193383734895050724786440176443319672836559729173248746986868722909818220919403659226270224677749054849267437090960630699131904219878221761847284501312771606158271185560102808030298570761806506842137173746368720591853713380684958166350096104972264094294658573736651672550243062941442151223970367393394495048879093769466881961496855436604768494279534819818767775118321755604018201554330386132841353338949038092004967328970916219672468954833865033319360866074670007780618", - ], - [ - "master_secret", - "812744365608357986515546951213735794905780531247400654485983675689007345252680783465620382756268298324619070095212727671013163587057960315104611505032391159923993186222992472271453158974000542388378728270352857044809506169036309424352546411124179707638441673291158450401569249553417829367721202384508794163270341742020366880294131562095198464204914661778362000567741892826931098757894984606489166588347686099839472171239690638334264704817162009248984017866176802917792042053625420351082400053844639007943327226933542386763152742005797026693758548721701645341688448869500455939673371665799883665035196100593742820765", - ], - [ - "age", - "1449485663749865112122084718309651799315876369399955386403349647157857267039738681846930133397399422116354888183111371765400737684123480339059046850189555156190164677867617134270296041268333092741226364695203773774260453734976395787415140818149909781659096210986518767963537521355538341046796673590463001432519694523140909453262132434115275751962728302009629278131044645113553957913861064628840202634780565720519420413110235161108122048945955929418529430552412537083201815025931848807079298247150295522314313662791060217650118275501496403633416974085086279896777251419212772606455298376048561561660554033200664561122", - ], - ], - rctxt: - "860911025032267966121537116747511648169210971555331852297327983657139587085942104673653614121933222003762276431341903715802016467096443789060052518852455149260273877263078757890535509188798812965587842763977780248898565717270220023917514653105171642271549164940634714174542454453494892988595340755873769347520154470471770549002457696766440819869518496811070236983222777464118573117519720995323647212086015212164299500917094183811610380285975565511188317704996015410378305078269879189003145417420690660051014495457659387330566369572172736139469523933999250778057312091553667159949004204624608553681313568626037528816", - z: "2121804520854046155333146480946067403536032620048509173296488461620991470957905025190073393533065162826019376175710496819562862443921284310624809586091960645852195207737003870600962592140196338174630044646719556493115513937191171697377398878248566738696903934756282960488248731988728585511385043106689590903854157937005001256453527432445636221995990491062748065236450143241984118701723276135733985922648057616666342802697522278188836392945197544183484607303781398698553490093880903336637463635680300818603734335511536928765778308620191754963249571453280495676312497378814397081522448865551665149984638461990456850881", - }, - }, -}; - -export const credDefs = { [credDefId]: credDef }; - -export const createJWTPayload = ( - id: string, - proof: string, - credentialType: SDK.Domain.CredentialType -) => { - const vc = { - id, - credentialType: credentialType, - type: [credentialType], - aud: ["aud"], - context: ["context"], - credentialSubject: { whatever: "credSubject" }, - evidence: { - id: "evidenceId", - type: "evidenceType", - }, - expirationDate: new Date().toISOString(), - issuanceDate: new Date().toISOString(), - issuer: new SDK.Domain.DID( - "did", - "peer", - "2.Ez6LSms555YhFthn1WV8ciDBpZm86hK9tp83WojJUmxPGk1hZ.Vz6MkmdBjMyB4TS5UbbQw54szm8yvMMf1ftGV2sQVYAxaeWhE.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOiJodHRwczovL21lZGlhdG9yLnJvb3RzaWQuY2xvdWQiLCJhIjpbImRpZGNvbW0vdjIiXX0" - ), - refreshService: { - id: "refreshServiceId", - type: "refreshServiceType", - }, - termsOfUse: { - id: "termsOfUseId", - type: "termsOfUseType", - }, - validFrom: { - id: "validFromId", - type: "validFromType", - }, - validUntil: { - id: "validUntilId", - type: "validUntilType", - }, - credentialSchema: { - id: "credentialSchemaId", - type: "credentialSchemaType", - }, - credentialStatus: { - id: "credentialStatusId", - type: "credentialStatusType", - }, - proof: proof, - }; - - const jwtPayload: any = { - id: "123", - iss: "did:peer:2.issuer", - nbf: 1680615608435, - sub: "did:peer:2.sub", - exp: 1680615608435, - aud: ["aud-json"], - vc: vc, - }; - - return jwtPayload; -}; -export const credRequestMeta: SDK.Domain.Anoncreds.CredentialRequestMeta = { - link_secret_blinding_data: { - v_prime: - "77955816791910907008648197625607251151043985904464685610589268755863823710042524325116894319321593903274621305101429675982328480929558765668395477286044036175023571135951855240427212072392115346223990606637530234412828281763675277786130736667970888577953183545724972075795470500481480587504146888168295548415330994692518385699942377815143595346327569474696881929936106990569016082555989993978175098221779656764883735585641835663445021379504408712254130562797706300716047105206280868009518894051808092685428634143160521444146484478798980767637798519834481411563284127214784285274598304432830695507876151369513892826498610123007743998318639", - }, - nonce: "384669312299348345170475", - link_secret_name: "link-secret-id", -}; - -export const credentialIssued: SDK.Domain.Anoncreds.CredentialIssued = { - schema_id: schemaId, - cred_def_id: "did:web:xyz/resource/cred-def", - values: [ - ["age", { raw: "28", encoded: "28" }], - [ - "name", - { - raw: "john", - encoded: - "68231017646261521938414776289104528029572365316885701689085572319872983785594", - }, - ], - ], - signature: { - p_credential: { - m_2: "90069112451055455821909400594406389902973279602878070870495376996444562816830", - a: "863206875070883508185084882433898034597056397288064150964909699848368101345942320681713420008320908172031366175764418516990530197118497873083108998836069955208560561365885178868957934721121818800195152765722925303482592098299043872531270628211279296662298703380533421005111978188231514326269144788469626292012467891951834985914306479999402596193828005218601831577836972155135721113555056320950898902900812022442212634154104525444865293627714269994627396682813488336112739630599692616934030468341046723507920859605204701140679082157987867742695138146865893004386171114420488126218257552981621418620795971402342420055", - e: "259344723055062059907025491480697571938277889515152306249728583105665800713306759149981690559193987143012367913206299323899696942213235956742930103453519678657228466134629917218519", - v: "8143446409913772255034152121328368039740626498888186354398879911744619763092523700068534155970316639325500748530790803346133400742208591972338832230481355996998878663423674449927007017103519158518841363025981102486265082027859231212785242394349018269859142047237847004466507505310624703221646956096334505927823727535128643408929895721360649486881661653430795374387398186589089307192641017475854047689060015396792244392488752028709889494148392343976206977761336843050968984216787674405343600492400040342034954879243301323597723425634111031850182237417361092482780483169862079554189749933027076569428078736298787846257330215373212181232245606400244542414366394276001432386415321137893700290570865313825552071290779533007084933667485178966714254743589959898887425372871525225305207025738953531478454150168638254081854031392", - }, - }, - signature_correctness_proof: { - se: "471472993450654125094815726148197965574424476578333157254325140782961168825105331051644868767781028679788350834880525043676296586472820693042050052742548830411776592846473749819901073592049502739648801719081538069485917308909817697575396656049685055624390272024518499392129521543088779385005671778669761735194904527436501886256576199999327721691983944094804259738379761906169617912917061639899452266237275643426312858778978574970646335896180734752298062049872360989081844266166354770197707949373253367460986810798494254673065207170398218825977487917435335438139842606666094711078074326163791098396957184806668244832", - c: "99614365014321274953096367476703930366339506406903542322778818757090357462808", - }, -}; - -export const createAnonCredsPayload = () => { - return credentialIssued; -}; - -export const encodeAnonCredsCredential = (cred: object) => { - const json = JSON.stringify(cred); - const encoded = Buffer.from(json); - return encoded; -}; diff --git a/packages/database/tests/pluto.test.ts b/packages/database/tests/pluto.test.ts deleted file mode 100644 index 1a2c4e52..00000000 --- a/packages/database/tests/pluto.test.ts +++ /dev/null @@ -1,1263 +0,0 @@ -import "./setup"; - -import { describe, it, beforeEach, afterEach } from 'vitest'; -import fs from 'fs'; -import path from 'path'; -import { randomUUID } from "crypto"; -import SDK, { JWTCredential } from "@atala/prism-wallet-sdk"; -import * as sinon from "sinon"; -import { RxCollection, RxStorage } from "rxdb"; -import InMemory from "../../inmemory/src"; -import IndexDb from "../../indexdb/src"; -import { createLevelDBStorage } from '../../leveldb/src' - -import * as Fixtures from "./fixtures"; -import { Database } from "../src"; -import { PrivateKeyMethods, LinkSecretSchemaType, LinkSecretStaticMethodTypes, LinkSecretMethodTypes, LinkSecretMethods, LinkSecretSchema, LinkSecretStaticMethods, getDefaultCollections, PlutoCollections, CredentialCollection, CredentialRequestMetadataCollection, DIDCollection, DIDPairCollection, LinkSecretColletion, MediatorCollection, MessageColletion, PrivateKeyColletion, MessageSchemaType, MessageMethodTypes, MessageStaticMethodTypes } from "@pluto-encrypted/schemas"; -import { DatabaseBase, ExtractStaticMethods, UnionToIntersection } from "@pluto-encrypted/shared"; - -const { - AnonCredsCredential, - Apollo, - Castor, - Pollux, -} = SDK; - -const pollux = new Pollux(new Castor(new Apollo())); -const keyData = new Uint8Array(32); -const jwtParts = [ - "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9", - "eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwidHlwZSI6Imp3dCJ9", - "18bn-r7uRWAG4FCFBjxemKvFYPCAoJTOHaHthuXh5nM", -]; -const messageType = "https://didcomm.org/basicmessage/2.0/message"; -const createMessage = ( - from?: SDK.Domain.DID, - to?: SDK.Domain.DID, - direction: SDK.Domain.MessageDirection = SDK.Domain.MessageDirection.SENT -) => { - const message = new SDK.Domain.Message( - "{}", - randomUUID(), - messageType, - from, - to, - [], - undefined, - undefined, - undefined, - undefined, - undefined, - direction - ); - return message; -}; -const defaultPassword = Buffer.from(keyData); - -let sandbox: sinon.SinonSandbox; - -const databaseName = "prism-db"; -const databasePath = path.resolve(process.cwd(), databaseName); - -const storages: RxStorage[] = [ - createLevelDBStorage({ - dbPath: databasePath - }), - InMemory, - IndexDb, -] - -function getStorageDBName(storage: RxStorage) { - if (storage.name === "leveldb") { - return `${databaseName}${randomUUID()}` - } - if (storage.name === "in-memory") { - return databaseName - } - return `${databaseName}${randomUUID()}` -} - -type DefaultCollections = { - dids: DIDCollection; - didpairs: DIDPairCollection; - mediators: MediatorCollection; - privatekeys: PrivateKeyColletion; - credentials: CredentialCollection; - credentialrequestmetadatas: CredentialRequestMetadataCollection; - linksecrets: LinkSecretColletion; - messages: MessageColletion; -} - -describe("Pluto encrypted testing with different storages", () => { - let db: DatabaseBase & UnionToIntersection>; - - let currentDBName: string; - - afterEach(async () => { - // jest.useRealTimers(); - sandbox.restore(); - }); - - beforeEach(async () => { - // jest.useFakeTimers(); - sandbox = sinon.createSandbox(); - }); - - storages.forEach((storage, i) => { - - const storageName = `[${storage.name}]`; - - it(storageName + "Should throw an error if pluto has is startede with a wrong database password", async ({ expect }) => { - const forceDatabaseName = getStorageDBName(storage) - const createDatabase = async (password: Uint8Array) => { - const db = await Database.createEncrypted( - { - name: forceDatabaseName, - encryptionKey: password, - storage: storage, - collections: getDefaultCollections() - } - ); - - await db.getAllPrismDIDs() - const did = SDK.Domain.DID.fromString( - "did:prism:733e594871d7700d35e6116011a08fc11e88ff9d366d8b5571ffc1aa18d249ea:Ct8BCtwBEnQKH2F1dGhlbnRpY2F0aW9uYXV0aGVudGljYXRpb25LZXkQBEJPCglzZWNwMjU2azESIDS5zeYUkLCSAJLI6aLXRTPRxstCLPUEI6TgBrAVCHkwGiDk-ffklrHIFW7pKkT8i-YksXi-XXi5h31czUMaVClcpxJkCg9tYXN0ZXJtYXN0ZXJLZXkQAUJPCglzZWNwMjU2azESIDS5zeYUkLCSAJLI6aLXRTPRxstCLPUEI6TgBrAVCHkwGiDk-ffklrHIFW7pKkT8i-YksXi-XXi5h31czUMaVClcpw" - ); - const privateKey = Fixtures.secp256K1.privateKey; - await db.storePrismDID(did, 0, privateKey, null); - } - - await createDatabase(defaultPassword); - - const keyData2 = keyData; - keyData2[0] = 1; - keyData2[1] = 2; - - await expect(() => createDatabase(keyData2)).rejects.toThrowError(new Error("Invalid Authentication")); - - }); - - - describe(storageName, () => { - - beforeEach(async () => { - currentDBName = getStorageDBName(storage); - db = await Database.createEncrypted( - { - name: currentDBName, - encryptionKey: defaultPassword, - storage: storage, - collections: getDefaultCollections() - } - ); - }); - - afterEach(async () => { - if (db && (storage.name === "in-memory" || storage.name === "leveldb")) { - await db.clear() - } - }) - - it(storageName + "Should throw an error if pluto has not been started", async ({ expect }) => { - const createDatabase = async () => { - const restored = await Database.createEncrypted( - { - name: currentDBName, - encryptionKey: defaultPassword, - storage: storage, - autoStart: false, - collections: getDefaultCollections() - } - ); - - await restored.getAllMediators() - } - - await expect(() => createDatabase()).rejects.toThrowError(new Error("Start Pluto first.")); - }) - - it(storageName + "Should throw an error if pluto has been initialised with no storage.", async ({ expect }) => { - const createDatabase = async () => { - await Database.createEncrypted<{ - dids: DIDCollection; - didpairs: DIDPairCollection; - mediators: MediatorCollection; - privatekeys: PrivateKeyColletion; - credentials: CredentialCollection; - credentialrequestmetadatas: CredentialRequestMetadataCollection; - linksecrets: LinkSecretColletion; - messages: MessageColletion; - }>( - { - name: currentDBName, - encryptionKey: defaultPassword, - storage: undefined as any, - autoStart: false, - collections: getDefaultCollections() - } - ); - } - - await expect(() => createDatabase()).rejects.toThrowError(new Error("Please provide a valid storage.")); - }) - - it(storageName + "Should store a new Prism DID and its privateKeys", async ({ expect }) => { - expect(await db.getPrismLastKeyPathIndex()).toBe(0); - const did = SDK.Domain.DID.fromString( - "did:prism:733e594871d7700d35e6116011a08fc11e88ff9d366d8b5571ffc1aa18d249ea:Ct8BCtwBEnQKH2F1dGhlbnRpY2F0aW9uYXV0aGVudGljYXRpb25LZXkQBEJPCglzZWNwMjU2azESIDS5zeYUkLCSAJLI6aLXRTPRxstCLPUEI6TgBrAVCHkwGiDk-ffklrHIFW7pKkT8i-YksXi-XXi5h31czUMaVClcpxJkCg9tYXN0ZXJtYXN0ZXJLZXkQAUJPCglzZWNwMjU2azESIDS5zeYUkLCSAJLI6aLXRTPRxstCLPUEI6TgBrAVCHkwGiDk-ffklrHIFW7pKkT8i-YksXi-XXi5h31czUMaVClcpw" - ); - const did2 = SDK.Domain.DID.fromString( - "did:prism:733e594871d7700d35e6116011a08fc11e88ff9d366d8b5571ffc1aa18d249ea:Ct8BCtwBEnQKH2F1dGhlbnRpY2F0aW9uYXV0aGVudGljYXRpb25LZXkQBEJPCglzZWNwMjU2azESIDS5zeYUkLCSAJLI6aLXRTPRxstCLPUEI6TgBrAVCHkwGiDk-ffklrHIFW7pKkT8i-YksXi-XXi5h31czUMaVClcpxJkCg9tYXN0ZXJtYXN0ZXJLZXkQAUJPCglzZWNwMjU2azESIDS5zeYUkLCSAJLI6aLXRTPRxstCLPUEI6TgBrAVCHkwGiDk-ffklrHIFW7pKkT8i-YksXi-XXi5h31czUMaVClcpw1" - ); - const did3 = SDK.Domain.DID.fromString( - "did:prism:733e594871d7700d35e6116011a08fc11e88ff9d366d8b5571ffc1aa18d249ea:Ct8BCtwBEnQKH2F1dGhlbnRpY2F0aW9uYXV0aGVudGljYXRpb25LZXkQBEJPCglzZWNwMjU2azESIDS5zeYUkLCSAJLI6aLXRTPRxstCLPUEI6TgBrAVCHkwGiDk-ffklrHIFW7pKkT8i-YksXi-XXi5h31czUMaVClcpxJkCg9tYXN0ZXJtYXN0ZXJLZXkQAUJPCglzZWNwMjU2azESIDS5zeYUkLCSAJLI6aLXRTPRxstCLPUEI6TgBrAVCHkwGiDk-ffklrHIFW7pKkT8i-YksXi-XXi5h31czUMaVClcpw2" - ); - const privateKey = Fixtures.secp256K1.privateKey; - expect(await db.getPrismLastKeyPathIndex()).toBe(0); - - await db.storePrismDID(did, 0, privateKey, null); - expect((await db.getAllPrismDIDs()).length).toBe(1); - expect(await db.getDIDInfoByDID(did)).not.toBe(null); - expect(await db.getPrismDIDKeyPathIndex(did)).toBe(1); - expect(await db.getPrismLastKeyPathIndex()).toBe(1); - await db.storePrismDID(did2, 1, privateKey, null); - expect(await db.getPrismDIDKeyPathIndex(did2)).toBe(2); - expect(await db.getPrismLastKeyPathIndex()).toBe(2); - expect(await db.getPrismDIDKeyPathIndex(did3)).toBe(0); - }); - - it(storageName + "Should throw an exception if a wrong key object from Database is loaded", async ({ expect }) => { - const wrongKey: any = { - keySpecification: [], - toDomainPrivateKey: PrivateKeyMethods.toDomainPrivateKey, - }; - expect(() => { - wrongKey.toDomainPrivateKey(); - }).toThrowError(new Error(`Invalid KeyType undefined`)); - - const wrongKey2: any = { - type: "sds", - keySpecification: [], - toDomainPrivateKey: PrivateKeyMethods.toDomainPrivateKey, - }; - expect(() => { - wrongKey2.toDomainPrivateKey(); - }).toThrowError(new Error(`Invalid KeyType sds`)); - - const wrongKey3: any = { - type: SDK.Domain.KeyTypes.Curve25519, - keySpecification: [], - toDomainPrivateKey: PrivateKeyMethods.toDomainPrivateKey, - }; - expect(() => { - wrongKey3.toDomainPrivateKey(); - }).toThrowError(new Error("Undefined key curve")); - - const wrongKey4: any = { - type: SDK.Domain.KeyTypes.Curve25519, - keySpecification: [ - { - name: SDK.Domain.KeyProperties.curve, - type: "string", - value: "asd", - }, - ], - toDomainPrivateKey: PrivateKeyMethods.toDomainPrivateKey, - }; - expect(() => { - wrongKey4.toDomainPrivateKey(); - }).toThrowError(new Error("Invalid key curve asd")); - - const wrongKey5: any = { - type: SDK.Domain.KeyTypes.Curve25519, - keySpecification: [ - { - name: SDK.Domain.KeyProperties.curve, - type: "string", - value: SDK.Domain.Curve.ED25519, - }, - ], - toDomainPrivateKey: PrivateKeyMethods.toDomainPrivateKey, - }; - expect(() => { - wrongKey5.toDomainPrivateKey(); - }).toThrowError(new Error("Undefined key raw")); - - const correctKey: any = { - type: SDK.Domain.KeyTypes.EC, - keySpecification: [ - { - name: SDK.Domain.KeyProperties.curve, - type: "string", - value: SDK.Domain.Curve.SECP256K1, - }, - { - name: SDK.Domain.KeyProperties.rawKey, - type: "string", - value: Buffer.from(Fixtures.secp256K1.privateKey.raw).toString( - "hex" - ), - }, - ], - toDomainPrivateKey: PrivateKeyMethods.toDomainPrivateKey, - }; - - correctKey.toDomainPrivateKey(); - - const correctKeyWithIndex: any = { - type: SDK.Domain.KeyTypes.EC, - keySpecification: [ - { - name: SDK.Domain.KeyProperties.curve, - type: "string", - value: SDK.Domain.Curve.SECP256K1, - }, - { - name: SDK.Domain.KeyProperties.rawKey, - type: "string", - value: Buffer.from(Fixtures.secp256K1.privateKey.raw).toString( - "hex" - ), - }, - { - name: SDK.Domain.KeyProperties.index, - type: "string", - value: Fixtures.secp256K1.privateKey.index, - }, - { - name: SDK.Domain.KeyProperties.seed, - type: "string", - value: "A12456", - }, - ], - toDomainPrivateKey: PrivateKeyMethods.toDomainPrivateKey, - }; - - correctKeyWithIndex.toDomainPrivateKey(); - - const correctEd25519Key: any = { - type: SDK.Domain.KeyTypes.EC, - keySpecification: [ - { - name: SDK.Domain.KeyProperties.curve, - type: "string", - value: SDK.Domain.Curve.ED25519, - }, - { - name: SDK.Domain.KeyProperties.rawKey, - type: "string", - value: Buffer.from(Fixtures.ed25519.privateKey.raw).toString("hex"), - }, - ], - toDomainPrivateKey: PrivateKeyMethods.toDomainPrivateKey, - }; - - correctEd25519Key.toDomainPrivateKey(); - - const correctX25519Key: any = { - type: SDK.Domain.KeyTypes.Curve25519, - keySpecification: [ - { - name: SDK.Domain.KeyProperties.curve, - type: "string", - value: SDK.Domain.Curve.X25519, - }, - { - name: SDK.Domain.KeyProperties.rawKey, - type: "string", - value: Buffer.from(Fixtures.x25519.privateKey.raw).toString("hex"), - }, - ], - toDomainPrivateKey: PrivateKeyMethods.toDomainPrivateKey, - }; - - correctX25519Key.toDomainPrivateKey(); - }); - - it(storageName + "Should return null when no privateKey is found by its id", async ({ expect }) => { - const did = SDK.Domain.DID.fromString( - "did:prism:733e594871d7700d35e6116011a08fc11e88ff9d366d8b5571ffc1aa18d249ea:Ct8BCtwBEnQKH2F1dGhlbnRpY2F0aW9uYXV0aGVudGljYXRpb25LZXkQBEJPCglzZWNwMjU2azESIDS5zeYUkLCSAJLI6aLXRTPRxstCLPUEI6TgBrAVCHkwGiDk-ffklrHIFW7pKkT8i-YksXi-XXi5h31czUMaVClcpxJkCg9tYXN0ZXJtYXN0ZXJLZXkQAUJPCglzZWNwMjU2azESIDS5zeYUkLCSAJLI6aLXRTPRxstCLPUEI6TgBrAVCHkwGiDk-ffklrHIFW7pKkT8i-YksXi-XXi5h31czUMaVClcpw" - ); - expect(await db.getDIDInfoByDID(did)).toBe(null); - }); - - it(storageName + "Should return null when no privateKey is found by its id", async ({ expect }) => { - expect(await db.getDIDPrivateKeyByID("not fund")).toBe(null); - }); - - it(storageName + "Should return null when no privateKey is found by its did", async ({ expect }) => { - const did = SDK.Domain.DID.fromString( - "did:prism::t8BCtwBEnQKH2F1dGhlbnRpY2F0aW9uYXV0aGVudGljYXRpb25LZXkQBEJPCglzZWNwMjU2azESIDS5zeYUkLCSAJLI6aLXRTPRxstCLPUEI6TgBrAVCHkwGiDk-ffklrHIFW7pKkT8i-YksXi-XXi5h31czUMaVClcpxJkCg9tYXN0ZXJtYXN0ZXJLZXkQAUJPCglzZWNwMjU2azESIDS5zeYUkLCSAJLI6aLXRTPRxstCLPUEI6TgBrAVCHkwGiDk-ffklrHIFW7pKkT8i-YksXi-XXi5h31czUMaVClcpw" - ); - expect((await db.getDIDPrivateKeysByDID(did)).length).toBe(0); - }); - - it(storageName + "Should store a new Prism DID and its privateKeys with privateKeyMetadataId", async ({ expect }) => { - const did = SDK.Domain.DID.fromString( - "did:prism:733e594871d7700d35e6116011a08fc11e88ff9d366d8b5571ffc1aa18d249ea:Ct8BCtwBEnQKH2F1dGhlbnRpY2F0aW9uYXV0aGVudGljYXRpb25LZXkQBEJPCglzZWNwMjU2azESIDS5zeYUkLCSAJLI6aLXRTPRxstCLPUEI6TgBrAVCHkwGiDk-ffklrHIFW7pKkT8i-YksXi-XXi5h31czUMaVClcpxJkCg9tYXN0ZXJtYXN0ZXJLZXkQAUJPCglzZWNwMjU2azESIDS5zeYUkLCSAJLI6aLXRTPRxstCLPUEI6TgBrAVCHkwGiDk-ffklrHIFW7pKkT8i-YksXi-XXi5h31czUMaVClcpw" - ); - const privateKey = Fixtures.secp256K1.privateKey; - await db.storePrismDID(did, 0, privateKey, did.toString()); - expect((await db.getAllPrismDIDs()).length).toBe(1); - }); - - it(storageName + "Should store a new Prism DID and its privateKeys with privateKeyMetadataId and alias", async ({ expect }) => { - const did = SDK.Domain.DID.fromString( - "did:prism:733e594871d7700d35e6116011a08fc11e88ff9d366d8b5571ffc1aa18d249ea:Ct8BCtwBEnQKH2F1dGhlbnRpY2F0aW9uYXV0aGVudGljYXRpb25LZXkQBEJPCglzZWNwMjU2azESIDS5zeYUkLCSAJLI6aLXRTPRxstCLPUEI6TgBrAVCHkwGiDk-ffklrHIFW7pKkT8i-YksXi-XXi5h31czUMaVClcpxJkCg9tYXN0ZXJtYXN0ZXJLZXkQAUJPCglzZWNwMjU2azESIDS5zeYUkLCSAJLI6aLXRTPRxstCLPUEI6TgBrAVCHkwGiDk-ffklrHIFW7pKkT8i-YksXi-XXi5h31czUMaVClcpw" - ); - const privateKey = Fixtures.secp256K1.privateKey; - await db.storePrismDID( - did, - 0, - privateKey, - did.toString(), - "defaultalias" - ); - expect((await db.getAllPrismDIDs()).length).toBe(1); - }); - - it(storageName + "Should store a new Prism DID and its privateKeys and fetch it by its alias", async ({ expect }) => { - const did = SDK.Domain.DID.fromString( - "did:prism:733e594871d7700d35e6116011a08fc11e88ff9d366d8b5571ffc1aa18d249ea:Ct8BCtwBEnQKH2F1dGhlbnRpY2F0aW9uYXV0aGVudGljYXRpb25LZXkQBEJPCglzZWNwMjU2azESIDS5zeYUkLCSAJLI6aLXRTPRxstCLPUEI6TgBrAVCHkwGiDk-ffklrHIFW7pKkT8i-YksXi-XXi5h31czUMaVClcpxJkCg9tYXN0ZXJtYXN0ZXJLZXkQAUJPCglzZWNwMjU2azESIDS5zeYUkLCSAJLI6aLXRTPRxstCLPUEI6TgBrAVCHkwGiDk-ffklrHIFW7pKkT8i-YksXi-XXi5h31czUMaVClcpw" - ); - const alias = "default"; - const privateKey = Fixtures.secp256K1.privateKey; - await db.storePrismDID(did, 0, privateKey, null, alias); - expect((await db.getDIDInfoByAlias(alias)).length).toBe(1); - }); - - it(storageName + "Should store a Message duplicate message", async ({ expect }) => { - const message = createMessage(); - await db.storeMessage(message); - await db.storeMessage(message); - }); - - it(storageName + "Should store a Message and fetch it", async ({ expect }) => { - const message = createMessage(); - await db.storeMessage(message); - const dbMesaage = await db.getMessage(message.id); - expect(dbMesaage).not.toBe(null); - expect(dbMesaage!.id).toBe(message.id); - }); - - it(storageName + "Should store a Message and update it", async ({ expect }) => { - const message = createMessage(); - await db.storeMessage(message); - await db.storeMessage(message); - const dbMesaage = await db.getMessage(message.id); - expect(dbMesaage).not.toBe(null); - expect(dbMesaage!.id).toBe(message.id); - }); - - it(storageName + "Should get all the messages", async ({ expect }) => { - const allMessages = await db.getAllMessages(); - expect(allMessages.length).toBe(0); - }); - - it(storageName + "Should fetch stored messages either by type or by did", async ({ expect }) => { - const from = SDK.Domain.DID.fromString("did:prism:123456"); - const to = SDK.Domain.DID.fromString("did:prism:654321"); - const from2 = SDK.Domain.DID.fromString("did:prism:12345644"); - const to2 = SDK.Domain.DID.fromString("did:prism:65432133"); - - await db.storeMessages([ - createMessage(from, to, SDK.Domain.MessageDirection.RECEIVED), - createMessage(from2, to2, SDK.Domain.MessageDirection.SENT), - ]); - - const byType = await db.getAllMessagesOfType(messageType); - expect(byType.length).toBe(2); - - const byType2 = await db.getAllMessagesOfType(messageType, from); - expect(byType2.length).toBe(1); - - const byType4 = await db.getAllMessagesSent(); - expect(byType4.length).toBe(1); - - const byType5 = await db.getAllMessagesReceived(); - expect(byType5.length).toBe(1); - - const byType6 = await db.getAllMessagesSentTo(to2); - expect(byType6.length).toBe(1); - - const byType7 = await db.getAllMessagesReceivedFrom(from); - expect(byType7.length).toBe(1); - - const byType8 = await db.getAllMessagesByFromToDID(from, to); - expect(byType8.length).toBe(1); - - const byType9 = await db.getAllMessagesByDID(from); - expect(byType9.length).toBe(1); - - const byType10 = await db.getAllMessages(); - expect(byType10.length).toBe(2); - }); - - it(storageName + "Should return null if message is not found by id ", async ({ expect }) => { - const dbMesaage = await db.getMessage("notfound"); - expect(dbMesaage).toBe(null); - }); - - it(storageName + "Should store multiple messages", async ({ expect }) => { - await db.storeMessages([createMessage(), createMessage()]); - }); - - it(storageName + "Should store a peerDID", async ({ expect }) => { - const did = new SDK.Domain.DID( - "did", - "peer", - "2.Ez6LSms555YhFthn1WV8ciDBpZm86hK9tp83WojJUmxPGk1hZ.Vz6MkmdBjMyB4TS5UbbQw54szm8yvMMf1ftGV2sQVYAxaeWhE.SeyJpZCI6Im5ldy1pZCIsInQiOiJkbSIsInMiOiJodHRwczovL21lZGlhdG9yLnJvb3RzaWQuY2xvdWQiLCJhIjpbImRpZGNvbW0vdjIiXX0" - ); - expect((await db.getAllPeerDIDs()).length).toBe(0); - await db.storePeerDID(did, [ - Fixtures.ed25519.privateKey, - Fixtures.x25519.privateKey, - ]); - expect((await db.getAllPeerDIDs()).length).toBe(1); - await db.getDIDInfoByDID(did); - }); - - it(storageName + "Should store a didPair", async ({ expect }) => { - const host = SDK.Domain.DID.fromString("did:prism:123456"); - const receiver = SDK.Domain.DID.fromString("did:prism:654321"); - const name = "example"; - await db.storeDIDPair(host, receiver, name); - }); - - it(storageName + "Should get all the didPairs", async ({ expect }) => { - const host = SDK.Domain.DID.fromString("did:prism:123456"); - const receiver = SDK.Domain.DID.fromString("did:prism:654321"); - const name = "example"; - expect((await db.getAllDidPairs()).length).toBe(0); - await db.storeDIDPair(host, receiver, name); - expect((await db.getAllDidPairs()).length).toBe(1); - }); - - it(storageName + "Should get a did pair by its did", async ({ expect }) => { - const host = SDK.Domain.DID.fromString("did:prism:123456"); - const receiver = SDK.Domain.DID.fromString("did:prism:654321"); - const name = "example"; - await db.storeDIDPair(host, receiver, name); - expect(await db.getPairByDID(host)).not.toBe(null); - }); - - it(storageName + "Should return null when a pair is fetched by a non existing did", async ({ expect }) => { - const notfound = SDK.Domain.DID.fromString("did:prism:65432155555"); - expect(await db.getPairByDID(notfound)).toBe(null); - }); - - it(storageName + "Should get a did pair by its name", async ({ expect }) => { - const host = SDK.Domain.DID.fromString("did:prism:123456"); - const receiver = SDK.Domain.DID.fromString("did:prism:654321"); - const name = "example"; - await db.storeDIDPair(host, receiver, name); - expect(await db.getPairByName(name)).not.toBe(null); - }); - - it(storageName + "Should return null when a pair by name is not found", async ({ expect }) => { - expect(await db.getPairByName("not found")).toBe(null); - }); - - it(storageName + "Should store a mediator", async ({ expect }) => { - const host = SDK.Domain.DID.fromString("did:prism:333333"); - const mediator = SDK.Domain.DID.fromString("did:prism:444444"); - const routing = SDK.Domain.DID.fromString("did:prism:555555"); - expect((await db.getAllMediators()).length).toBe(0); - await db.storeMediator(mediator, host, routing); - - expect((await db.getAllMediators()).length).toBe(1); - }); - - it(storageName + "Should go a backup of all the database and restore it", async ({ expect }) => { - const host = SDK.Domain.DID.fromString("did:prism:333333"); - const mediator = SDK.Domain.DID.fromString("did:prism:444444"); - const routing = SDK.Domain.DID.fromString("did:prism:555555"); - expect((await db.getAllMediators()).length).toBe(0); - await db.storeMediator(mediator, host, routing); - expect((await db.getAllMediators()).length).toBe(1); - const backup = await db.backup(); - - if (db && (storage.name === "in-memory" || storage.name === "leveldb")) { - await db.clear(); - } - - if (storage.name === "leveldb") { - if (fs.existsSync(databasePath)) { - fs.rmdirSync(databasePath, { recursive: true }) - } - } - - const restored = await Database.createEncrypted( - { - name: currentDBName, - encryptionKey: defaultPassword, - importData: backup, - storage: storage, - collections: getDefaultCollections() - } - ); - - expect((await restored.getAllMediators()).length).toBe(1); - }); - - it(storageName + "Should throw an error when an incomplete did is loaded from db", async ({ expect }) => { - const did = SDK.Domain.DID.fromString("did:prism:65432133"); - - await (db as any).db.dids.insert({ - did: did.toString(), - method: did.method, - methodId: did.methodId, - schema: did.schema, - }); - expect(db.getDIDInfoByDID(did)).rejects.toThrowError( - "Imposible to recover PrismDIDInfo without its privateKey data." - ); - }); - - it(storageName + "Should get a privateKey by its ID", async ({ expect }) => { - const did = SDK.Domain.DID.fromString("did:prism:65432133"); - - await (db as any).db.privatekeys.insert({ - id: "123", - did: did.toString(), - type: SDK.Domain.KeyTypes.EC, - keySpecification: [ - { - name: "curve", - value: SDK.Domain.Curve.ED25519, - type: "string", - }, - { - name: "curve", - value: SDK.Domain.Curve.ED25519, - type: "string", - }, - { - name: "raw", - value: new Array(32), - type: "string", - }, - ], - }); - expect(await db.getDIDPrivateKeyByID("123")).toHaveProperty("type"); - }); - - const encodeJWTCredential = (cred: object): string => { - const json = JSON.stringify(cred); - const encoded = Buffer.from(json).toString("base64"); - return `${jwtParts[0]}.${encoded}.${jwtParts[2]}`; - }; - - it(storageName + "Should store and fetch a JWT Credential", async ({ expect }) => { - expect((await db.getAllCredentials()).length).toBe(0); - const jwtPayload = Fixtures.createJWTPayload( - "jwtid", - "proof", - SDK.Domain.CredentialType.JWT - ); - const encoded = encodeJWTCredential(jwtPayload); - - const result = await pollux.parseCredential(Buffer.from(encoded), { - type: SDK.Domain.CredentialType.JWT, - }); - await db.storeCredential(result); - const results = await db.getAllCredentials() - expect(results.length).toBe(1); - }); - - it(storageName + "Should store and fetch a JWT Credential and then generate a proof", async ({ expect }) => { - class PresentationRequest { - /** - * @constructor - * @param type - CredentialType the json is related to - * @param json - the raw value - */ - constructor(type: SDK.Domain.CredentialType.AnonCreds, json: SDK.Domain.Anoncreds.PresentationRequest); - constructor(type: SDK.Domain.CredentialType.JWT, json: any); - constructor( - private readonly type: SDK.Domain.CredentialType, - private readonly json: T - ) { } - - /** - * Type guard that the instance is for the given CredentialType - * - * @param type - * @returns {boolean} - */ - isType(type: SDK.Domain.CredentialType.AnonCreds): this is PresentationRequest; - isType(type: SDK.Domain.CredentialType.JWT): this is PresentationRequest; - isType(target: SDK.Domain.CredentialType) { - return this.type === target; - } - - /** - * Get the raw PresentationRequest JSON - * - * @returns JSON - */ - toJSON(): T { - return this.json; - } - } - - expect((await db.getAllCredentials()).length).toBe(0); - const jwtPayload = Fixtures.createJWTPayload( - "jwtid", - "proof", - SDK.Domain.CredentialType.JWT - ); - const encoded = encodeJWTCredential(jwtPayload); - - const parsedCredential = await pollux.parseCredential(Buffer.from(encoded), { - type: SDK.Domain.CredentialType.JWT, - }); - await db.storeCredential(parsedCredential); - - - const credentials = await db.getAllCredentials() - expect(credentials.length).toBe(1); - - const credential = credentials[0]; - const apollo = new Apollo(); - - const pr = new PresentationRequest(SDK.Domain.CredentialType.JWT, { - "options": { - "challenge": "11c91493-01b3-4c4d-ac36-b336bab5bddf", - "domain": "http://localhost:8000/prism-agent" - }, - "presentation_definition": { - "format": null, - "id": "b2a49475-f8ba-4952-a719-a28e909858fa", - "input_descriptors": [], - "name": null, - "purpose": null - } - }); - const key = apollo.createPrivateKey({ - type: SDK.Domain.KeyTypes.EC, - curve: SDK.Domain.Curve.SECP256K1, - seed: Buffer.from(apollo.createRandomSeed().seed.value).toString('hex') - }); - const did = SDK.Domain.DID.fromString("did:prism:333333"); - const result = await pollux.createPresentationProof(pr as any, credential as any, { - did, - privateKey: key - }); - - expect(result).not.to.be.null; - }) - - - - - - it(storageName + "Should store and fetch a Anoncreds Credential", async ({ expect }) => { - expect((await db.getAllCredentials()).length).toBe(0); - const payload = Fixtures.createAnonCredsPayload(); - const result = new AnonCredsCredential({ - ...payload, - values: { - ...(payload.values.map(([varname, val]) => ({ - [varname]: val, - })) as any), - }, - }); - await db.storeCredential(result); - expect((await db.getAllCredentials()).length).toBe(1); - }); - - it(storageName + "Should store and fetch a link secret by its name", async ({ expect }) => { - const name = "test"; - const secret = "12345"; - await db.storeLinkSecret(secret, name); - expect(await db.getLinkSecret(name)).toBe(secret); - }); - - it(storageName + "Should store and fetch a link secret without params", async ({ expect }) => { - const name = "test"; - const secret = "12345"; - await db.storeLinkSecret(secret, name); - expect(await db.getLinkSecret()).toBe(secret); - }); - - it(storageName + "Should return null when no link secret is found", async ({ expect }) => { - expect(await db.getLinkSecret("notfound")).toBe(null); - }); - - it(storageName + "Should store and fetch credential metadata by link secret name", async ({ expect }) => { - const linkSecretName = "test"; - await db.storeCredentialMetadata( - Fixtures.credRequestMeta, - linkSecretName - ); - expect( - (await db.fetchCredentialMetadata(linkSecretName))?.link_secret_name - ).toBe(linkSecretName); - }); - - it(storageName + "should return null when no credentialMetadata is found by the linkSecretName", async ({ expect }) => { - expect(await db.fetchCredentialMetadata("notfound")).toBe(null); - }); - - it(storageName + "Should throw an error if a non storable credential is stored", async ({ expect }) => { - expect(db.storeCredential({ fail: true } as any)).rejects.toThrowError( - new Error("Credential is not storable") - ); - }); - - it(storageName + "Should throw an error if an unrecoverable key is loaded from DB", async ({ expect }) => { - const payload = Fixtures.createAnonCredsPayload(); - const result = new AnonCredsCredential({ - ...payload, - values: { - ...(payload.values.map(([varname, val]) => ({ - [varname]: val, - })) as any), - }, - }); - result.recoveryId = "demo"; - await db.storeCredential(result); - expect(db.getAllCredentials()).rejects.toThrowError( - new Error("Unsupported key type from db storage") - ); - }); - - it(storageName + "Should be able to request models from database", async ({ expect }) => { - const collectionNames = Object.keys(db.db.collections); - for (let collectionName of collectionNames) { - const collection = db.db.collections[collectionName]; - expect(collection).not.undefined - } - - }) - - it(storageName + "Should be able to request count orm method on all models", async ({ expect }) => { - const collectionNames = Object.keys(db.db.collections); - for (let collectionName of collectionNames) { - const collection = db.db.collections[collectionName]; - const count = await collection.count().exec(); - expect(count).toBe(0) - } - }) - - it(storageName + "Should be able to request findByIds orm method on all models", async ({ expect }) => { - const collectionNames = Object.keys(db.db.collections); - for (let collectionName of collectionNames) { - const collection = db.db.collections[collectionName]; - const count = await collection.findByIds([]).exec(); - expect(count.size).toBe(0) - } - }) - - it(storageName + "Should be able to request find orm method on all models", async ({ expect }) => { - const collectionNames = Object.keys(db.db.collections); - for (let collectionName of collectionNames) { - const collection = db.db.collections[collectionName]; - const results = await collection.find().exec(); - expect(results.length).toBe(0) - } - }) - - it(storageName + "Should be able to request remove orm method on credential model", async ({ expect }) => { - const payload = Fixtures.createAnonCredsPayload(); - const result = new AnonCredsCredential({ - ...payload, - values: { - ...(payload.values.map(([varname, val]) => ({ - [varname]: val, - })) as any), - }, - }); - result.recoveryId = "demo"; - await db.storeCredential(result); - - const storedCredential = await db.db.collections.credentials.findOne({ - selector: { - recoveryId: { - $eq: result.recoveryId - } - } - }).exec(); - - const removed = await storedCredential?.remove() - expect(removed?.deleted).toBe(true) - }); - - it(storageName + "Should run migration once the schema version has changed and user had existing data", async ({ expect }) => { - - const forceDatabaseName = `${databaseName}${randomUUID()}` - const db = await Database.createEncrypted<{ - linksecrets: RxCollection< - LinkSecretSchemaType, - LinkSecretMethodTypes, - LinkSecretStaticMethodTypes - > - }>( - { - name: forceDatabaseName, - encryptionKey: defaultPassword, - storage, - collections: { - linksecrets: getDefaultCollections().linksecrets - } - } - ); - - await db.storeLinkSecret("demo123", "demo321"); - - const migrationDB = await Database.createEncrypted<{ - linksecrets: RxCollection< - LinkSecretSchemaType, - LinkSecretMethodTypes, - LinkSecretStaticMethodTypes - > - }>( - { - name: forceDatabaseName, - encryptionKey: defaultPassword, - storage, - collections: { - linksecrets: { - methods: { - toDomainLinkSecret: function toDomainLinkSecret(this: any) { - return this.secreto; - }, - }, - schema: { - version: 1, - primaryKey: "name", - type: "object", - properties: { - name: { - type: "string", - maxLength: 60, - }, - secreto: { - type: "string", - } - }, - encrypted: ["secreto"], - required: ["name", "secreto"], - }, - migrationStrategies: { - // 1 means, this transforms data from version 0 to version 1 - 1: async function (oldDoc) { - oldDoc.secreto = oldDoc.secret; - delete oldDoc.secret - return oldDoc; - } - }, - statics: LinkSecretStaticMethods - } - } - } - ); - - const linkSecret = await migrationDB.getLinkSecret() - expect(linkSecret).toBe("demo123") - - }); - - it(storageName + "Should run migration once the schema version has changed its primaryKey and user had existing data", async ({ expect }) => { - - const forceDatabaseName = `${databaseName}${randomUUID()}` - const db = await Database.createEncrypted<{ - linksecrets: RxCollection< - LinkSecretSchemaType, - LinkSecretMethodTypes, - LinkSecretStaticMethodTypes - > - }>( - { - name: forceDatabaseName, - encryptionKey: defaultPassword, - storage, - collections: getDefaultCollections() - } - ); - - await db.storeLinkSecret("demo123", "demo321"); - - const migrationDB = await Database.createEncrypted<{ - linksecrets: RxCollection< - LinkSecretSchemaType, - LinkSecretMethodTypes, - LinkSecretStaticMethodTypes - > - }>( - { - name: forceDatabaseName, - encryptionKey: defaultPassword, - storage, - collections: { - linksecrets: { - methods: { - toDomainLinkSecret: function toDomainLinkSecret(this: any) { - return this.secreto; - }, - }, - statics: LinkSecretStaticMethods, - schema: { - version: 1, - primaryKey: "name2", - type: "object", - properties: { - name2: { - type: "string", - maxLength: 60, - }, - secreto: { - type: "string", - } - }, - encrypted: ["secreto"], - required: ["name2", "secreto"], - }, - migrationStrategies: { - // 1 means, this transforms data from version 0 to version 1 - 1: async function (oldDoc) { - oldDoc.secreto = oldDoc.secret; - oldDoc.name2 = oldDoc.name; - delete oldDoc.secret - delete oldDoc.name - return oldDoc; - } - } - } - } - } - ); - - const linkSecret = await migrationDB.getLinkSecret() - expect(linkSecret).toBe("demo123") - - }); - - it(storageName + "Should run migration once the schema version has changed and user had existing data over time, with multiple versions", async ({ expect }) => { - - const forceDatabaseName = `${databaseName}${randomUUID()}` - const db = await Database.createEncrypted( - { - name: forceDatabaseName, - encryptionKey: defaultPassword, - storage, - collections: getDefaultCollections() - } - ); - - await db.storeLinkSecret("demo123", "demo321"); - - const migrationDB = await Database.createEncrypted( - { - name: forceDatabaseName, - encryptionKey: defaultPassword, - storage, - collections: { - ...(getDefaultCollections()), - linksecrets: { - methods: { - toDomainLinkSecret: function toDomainLinkSecret(this: any) { - return this.secreto; - }, - }, - statics: LinkSecretStaticMethods, - schema: { - version: 2, - primaryKey: "test", - type: "object", - properties: { - test: { - type: "string", - maxLength: 60, - }, - secreto: { - type: "string", - } - }, - encrypted: ["secreto"], - required: ["test", "secreto"], - }, - migrationStrategies: { - // 1 means, this transforms data from version 0 to version 1 - 1: async function (oldDoc) { - oldDoc.secreto = oldDoc.secret; - delete oldDoc.secret - return oldDoc; - }, - 2: async function (oldDoc) { - if (!oldDoc.test) { - oldDoc.test = oldDoc.name; - delete oldDoc.name - } - return oldDoc; - } - } - } - } - } - ); - - const linkSecret = await migrationDB.getLinkSecret() - expect(linkSecret).toBe("demo123") - - }); - - it(storageName + "Should allow anyone to add new models to the database", async ({ expect }) => { - const forceDatabaseName = `${databaseName}${randomUUID()}` - - const db = await Database.createEncrypted void } - > - }>( - { - name: forceDatabaseName, - encryptionKey: defaultPassword, - storage, - collections: { - ...getDefaultCollections(), - demo: { - methods: LinkSecretMethods, - schema: LinkSecretSchema, - statics: { - hola: function (demo: boolean, demo2: boolean): void { - throw new Error('Function not implemented.') - } - } - } - } - } - ); - - expect(db.db.collections.credentials).to.not.toBeUndefined(); - expect(db.db.collections.demo).to.not.toBeUndefined(); - expect(db.db.collections.demo.hola).to.not.toBeUndefined(); - - }) - - it(storageName + "Should allow anyone to add new models to the database without using the same models", async ({ expect }) => { - const forceDatabaseName = `${databaseName}${randomUUID()}` - - const db = await Database.createEncrypted void } - > - }>( - { - name: forceDatabaseName, - encryptionKey: defaultPassword, - storage, - collections: { - ...getDefaultCollections(), - demo: { - methods: LinkSecretMethods, - schema: LinkSecretSchema, - statics: { - hola: function (demo: boolean, demo2: boolean): void { - throw new Error('Function not implemented.') - } - } - } - } - } - ); - - expect((db.db.collections as any).privateKeys).toBeUndefined(); - expect(db.db.collections.demo).to.not.toBeUndefined(); - expect(db.db.collections.demo.hola).to.not.toBeUndefined(); - - - }) - - it(storageName + "Should allow anyone to add new models to the database without using the same models", async ({ expect }) => { - const forceDatabaseName = `${databaseName}${randomUUID()}` - - - await expect(() => Database.createEncrypted void } - >; - demo2: RxCollection< - LinkSecretSchemaType, - LinkSecretMethodTypes, - { hola: (demo: boolean, demo2: boolean) => void } - >; - }>( - { - name: forceDatabaseName, - encryptionKey: defaultPassword, - storage, - collections: { - ...getDefaultCollections(), - demo: { - methods: LinkSecretMethods, - schema: LinkSecretSchema, - statics: { - hola: function (demo: boolean, demo2: boolean): void { - throw new Error('Function not implemented.') - } - } - }, - demo2: { - methods: LinkSecretMethods, - schema: LinkSecretSchema, - statics: { - hola: function (demo: boolean, demo2: boolean): void { - throw new Error('Function not implemented.') - } - } - } - } - } - )).rejects.toThrowError(new Error("Static function in model demo2.hola is duplicated, statics must be unique across al collections.")); - - - }) - - it(storageName + "Should allow anyone to add new models to the database without using the same models and the defaultModels won't be available", async ({ expect }) => { - const forceDatabaseName = `${databaseName}${randomUUID()}` - - const db = await Database.createEncrypted<{ - demo: RxCollection< - LinkSecretSchemaType, - LinkSecretMethodTypes, - { hola: (demo: boolean, demo2: boolean) => void } - >; - }>( - { - name: forceDatabaseName, - encryptionKey: defaultPassword, - storage, - collections: { - demo: { - methods: LinkSecretMethods, - schema: LinkSecretSchema, - statics: { - hola: function (demo: boolean, demo2: boolean): void { - throw new Error('Function not implemented.') - } - } - } - } - } - ); - - - expect((db.db.collections as any).credentials).toBeUndefined() - expect(db.db.collections.demo).to.not.toBeUndefined(); - expect(db.db.collections.demo.hola).to.not.toBeUndefined(); - expect(db.hola).to.not.toBeUndefined(); - }) - - }); - }) -}) \ No newline at end of file diff --git a/packages/database/tests/setup.ts b/packages/database/tests/setup.ts deleted file mode 100644 index 8559be2e..00000000 --- a/packages/database/tests/setup.ts +++ /dev/null @@ -1,18 +0,0 @@ -import "fake-indexeddb/auto"; -import { TextEncoder, TextDecoder } from "util"; -import nodeCrypto from "crypto"; -import { RxDBDevModePlugin } from "rxdb/plugins/dev-mode"; -import { addRxPlugin } from "rxdb"; - - -if (process.env.NODE_ENV === "debug") { - addRxPlugin(RxDBDevModePlugin); -} - -Object.defineProperty(globalThis, "crypto", { - value: { - getRandomValues: (arr) => nodeCrypto.getRandomValues(arr), - }, -}); - -Object.assign(global, { TextDecoder, TextEncoder }); diff --git a/packages/database/tsconfig.json b/packages/database/tsconfig.json deleted file mode 100644 index 19742a26..00000000 --- a/packages/database/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "./src", - "declarationDir": "./build", - }, - "include": [ - "src" - ] -} \ No newline at end of file diff --git a/packages/database/vitest.config.ts b/packages/database/vitest.config.ts deleted file mode 100644 index 16c4c803..00000000 --- a/packages/database/vitest.config.ts +++ /dev/null @@ -1,28 +0,0 @@ -/// -import { defineConfig } from 'vite' - -const isCI = process.env.CI === "true"; - -export default defineConfig({ - build: { - minify: 'terser', - terserOptions: { format: { comments: 'all' } }, - }, - test: { - reporters: ['verbose'], // or 'verbose' - coverage: { - provider: 'istanbul', - reporter: isCI ? ['json-summary'] : ['json-summary', "html"], - thresholds: { - branches: 95, - functions: 95, - lines: 95, - statements: 95 - }, - include: [ - 'src/**/*', - ], - }, - - } -}) diff --git a/packages/iagon/.gitignore b/packages/iagon/.gitignore deleted file mode 100644 index cc67e869..00000000 --- a/packages/iagon/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -coverage/**/*.html -coverage/**/*.css -coverage/**/*.js -coverage/**/*.png \ No newline at end of file diff --git a/packages/iagon/CHANGELOG.md b/packages/iagon/CHANGELOG.md deleted file mode 100644 index 182baf5e..00000000 --- a/packages/iagon/CHANGELOG.md +++ /dev/null @@ -1,9 +0,0 @@ -## @pluto-encrypted/iagon [1.0.2](https://github.com/atala-community-projects/pluto-encrypted/compare/@pluto-encrypted/iagon@1.0.1...@pluto-encrypted/iagon@1.0.2) (2024-02-08) - - - - - -### Dependencies - -* **@pluto-encrypted/test-suite:** upgraded to 1.12.1 diff --git a/packages/iagon/LICENSE b/packages/iagon/LICENSE deleted file mode 100644 index 216af719..00000000 --- a/packages/iagon/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright © 2021-2023 Input Output Global - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/packages/iagon/README.md b/packages/iagon/README.md deleted file mode 100644 index 29734505..00000000 --- a/packages/iagon/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# @pluto-encrypted/iagon -This package contains a RXDB compatible wrapper over iagon and can be used as database engine inside @pluto-encrypted package with secure database encryption. - -The package is not yet ready for use, the API initialisation takes too long -breakes the integration with the agent completely. \ No newline at end of file diff --git a/packages/iagon/coverage/.tmp/coverage-0.json b/packages/iagon/coverage/.tmp/coverage-0.json deleted file mode 100644 index 57e75bd8..00000000 --- a/packages/iagon/coverage/.tmp/coverage-0.json +++ /dev/null @@ -1 +0,0 @@ -{"/home/runner/work/pluto-encrypted/pluto-encrypted/packages/iagon/src/IagonStorage/api.ts":{"path":"/home/runner/work/pluto-encrypted/pluto-encrypted/packages/iagon/src/IagonStorage/api.ts","statementMap":{"0":{"start":{"line":5,"column":4},"end":{"line":5,"column":33}},"1":{"start":{"line":6,"column":4},"end":{"line":6,"column":43}},"2":{"start":{"line":9,"column":4},"end":{"line":9,"column":60}},"3":{"start":{"line":12,"column":4},"end":{"line":22,"column":5}},"4":{"start":{"line":13,"column":24},"end":{"line":13,"column":34}},"5":{"start":{"line":14,"column":23},"end":{"line":14,"column":51}},"6":{"start":{"line":15,"column":22},"end":{"line":15,"column":32}},"7":{"start":{"line":16,"column":34},"end":{"line":16,"column":53}},"8":{"start":{"line":17,"column":6},"end":{"line":17,"column":98}},"9":{"start":{"line":18,"column":6},"end":{"line":18,"column":39}},"10":{"start":{"line":20,"column":6},"end":{"line":20,"column":83}},"11":{"start":{"line":21,"column":6},"end":{"line":21,"column":33}},"12":{"start":{"line":25,"column":20},"end":{"line":25,"column":66}},"13":{"start":{"line":26,"column":16},"end":{"line":26,"column":28}},"14":{"start":{"line":27,"column":20},"end":{"line":33,"column":5}},"15":{"start":{"line":34,"column":17},"end":{"line":34,"column":47}},"16":{"start":{"line":35,"column":4},"end":{"line":35,"column":16}},"17":{"start":{"line":38,"column":20},"end":{"line":38,"column":98}},"18":{"start":{"line":39,"column":16},"end":{"line":39,"column":104}},"19":{"start":{"line":40,"column":20},"end":{"line":46,"column":5}},"20":{"start":{"line":47,"column":21},"end":{"line":47,"column":51}},"21":{"start":{"line":48,"column":25},"end":{"line":48,"column":38}},"22":{"start":{"line":49,"column":4},"end":{"line":51,"column":5}},"23":{"start":{"line":50,"column":6},"end":{"line":50,"column":44}},"24":{"start":{"line":52,"column":24},"end":{"line":52,"column":111}},"25":{"start":{"line":53,"column":4},"end":{"line":53,"column":23}},"26":{"start":{"line":56,"column":20},"end":{"line":56,"column":74}},"27":{"start":{"line":57,"column":25},"end":{"line":67,"column":5}},"28":{"start":{"line":68,"column":21},"end":{"line":68,"column":58}},"29":{"start":{"line":69,"column":4},"end":{"line":69,"column":106}},"30":{"start":{"line":72,"column":20},"end":{"line":72,"column":98}},"31":{"start":{"line":73,"column":16},"end":{"line":73,"column":104}},"32":{"start":{"line":74,"column":20},"end":{"line":80,"column":5}},"33":{"start":{"line":81,"column":21},"end":{"line":81,"column":51}},"34":{"start":{"line":82,"column":25},"end":{"line":82,"column":38}},"35":{"start":{"line":83,"column":4},"end":{"line":85,"column":5}},"36":{"start":{"line":84,"column":6},"end":{"line":84,"column":44}},"37":{"start":{"line":86,"column":18},"end":{"line":86,"column":93}},"38":{"start":{"line":87,"column":4},"end":{"line":87,"column":17}},"39":{"start":{"line":90,"column":43},"end":{"line":90,"column":55}},"40":{"start":{"line":91,"column":17},"end":{"line":95,"column":5}},"41":{"start":{"line":96,"column":4},"end":{"line":98,"column":5}},"42":{"start":{"line":97,"column":6},"end":{"line":97,"column":51}},"43":{"start":{"line":99,"column":20},"end":{"line":99,"column":61}},"44":{"start":{"line":100,"column":20},"end":{"line":108,"column":5}},"45":{"start":{"line":109,"column":21},"end":{"line":109,"column":51}},"46":{"start":{"line":110,"column":25},"end":{"line":110,"column":38}},"47":{"start":{"line":111,"column":4},"end":{"line":113,"column":5}},"48":{"start":{"line":112,"column":6},"end":{"line":112,"column":44}},"49":{"start":{"line":114,"column":22},"end":{"line":114,"column":39}},"50":{"start":{"line":115,"column":4},"end":{"line":115,"column":21}},"51":{"start":{"line":118,"column":20},"end":{"line":118,"column":76}},"52":{"start":{"line":119,"column":18},"end":{"line":125,"column":5}},"53":{"start":{"line":126,"column":21},"end":{"line":126,"column":51}},"54":{"start":{"line":127,"column":4},"end":{"line":127,"column":25}},"55":{"start":{"line":130,"column":21},"end":{"line":130,"column":35}},"56":{"start":{"line":131,"column":4},"end":{"line":136,"column":5}},"57":{"start":{"line":132,"column":6},"end":{"line":135,"column":7}},"58":{"start":{"line":133,"column":22},"end":{"line":133,"column":30}},"59":{"start":{"line":134,"column":8},"end":{"line":134,"column":36}},"60":{"start":{"line":137,"column":4},"end":{"line":137,"column":20}},"61":{"start":{"line":140,"column":20},"end":{"line":140,"column":21}},"62":{"start":{"line":141,"column":4},"end":{"line":147,"column":5}},"63":{"start":{"line":142,"column":6},"end":{"line":146,"column":7}},"64":{"start":{"line":143,"column":8},"end":{"line":143,"column":32}},"65":{"start":{"line":145,"column":8},"end":{"line":145,"column":71}},"66":{"start":{"line":148,"column":4},"end":{"line":148,"column":28}},"67":{"start":{"line":151,"column":20},"end":{"line":151,"column":58}},"68":{"start":{"line":152,"column":17},"end":{"line":156,"column":6}},"69":{"start":{"line":157,"column":4},"end":{"line":157,"column":77}},"70":{"start":{"line":158,"column":18},"end":{"line":165,"column":5}},"71":{"start":{"line":166,"column":4},"end":{"line":166,"column":75}},"72":{"start":{"line":167,"column":21},"end":{"line":167,"column":51}},"73":{"start":{"line":168,"column":25},"end":{"line":168,"column":38}},"74":{"start":{"line":169,"column":4},"end":{"line":171,"column":5}},"75":{"start":{"line":170,"column":6},"end":{"line":170,"column":44}},"76":{"start":{"line":172,"column":4},"end":{"line":172,"column":29}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":4,"column":2},"end":{"line":4,"column":3}},"loc":{"start":{"line":4,"column":26},"end":{"line":7,"column":3}},"line":4},"1":{"name":"(anonymous_1)","decl":{"start":{"line":8,"column":2},"end":{"line":8,"column":3}},"loc":{"start":{"line":8,"column":22},"end":{"line":10,"column":3}},"line":8},"2":{"name":"(anonymous_2)","decl":{"start":{"line":11,"column":2},"end":{"line":11,"column":3}},"loc":{"start":{"line":11,"column":28},"end":{"line":23,"column":3}},"line":11},"3":{"name":"(anonymous_3)","decl":{"start":{"line":24,"column":2},"end":{"line":24,"column":3}},"loc":{"start":{"line":24,"column":27},"end":{"line":36,"column":3}},"line":24},"4":{"name":"(anonymous_4)","decl":{"start":{"line":37,"column":2},"end":{"line":37,"column":3}},"loc":{"start":{"line":37,"column":42},"end":{"line":54,"column":3}},"line":37},"5":{"name":"(anonymous_5)","decl":{"start":{"line":55,"column":2},"end":{"line":55,"column":3}},"loc":{"start":{"line":55,"column":25},"end":{"line":70,"column":3}},"line":55},"6":{"name":"(anonymous_6)","decl":{"start":{"line":71,"column":2},"end":{"line":71,"column":3}},"loc":{"start":{"line":71,"column":36},"end":{"line":88,"column":3}},"line":71},"7":{"name":"(anonymous_7)","decl":{"start":{"line":89,"column":2},"end":{"line":89,"column":3}},"loc":{"start":{"line":89,"column":38},"end":{"line":116,"column":3}},"line":89},"8":{"name":"(anonymous_8)","decl":{"start":{"line":117,"column":2},"end":{"line":117,"column":3}},"loc":{"start":{"line":117,"column":44},"end":{"line":128,"column":3}},"line":117},"9":{"name":"(anonymous_9)","decl":{"start":{"line":129,"column":2},"end":{"line":129,"column":3}},"loc":{"start":{"line":129,"column":24},"end":{"line":138,"column":3}},"line":129},"10":{"name":"(anonymous_10)","decl":{"start":{"line":139,"column":2},"end":{"line":139,"column":3}},"loc":{"start":{"line":139,"column":28},"end":{"line":149,"column":3}},"line":139},"11":{"name":"(anonymous_11)","decl":{"start":{"line":150,"column":2},"end":{"line":150,"column":3}},"loc":{"start":{"line":150,"column":44},"end":{"line":173,"column":3}},"line":150}},"branchMap":{"0":{"loc":{"start":{"line":39,"column":16},"end":{"line":39,"column":104}},"type":"cond-expr","locations":[{"start":{"line":39,"column":36},"end":{"line":39,"column":89}},{"start":{"line":39,"column":92},"end":{"line":39,"column":104}}],"line":39},"1":{"loc":{"start":{"line":49,"column":4},"end":{"line":51,"column":5}},"type":"if","locations":[{"start":{"line":49,"column":4},"end":{"line":51,"column":5}},{"start":{},"end":{}}],"line":49},"2":{"loc":{"start":{"line":52,"column":24},"end":{"line":52,"column":111}},"type":"cond-expr","locations":[{"start":{"line":52,"column":77},"end":{"line":52,"column":106}},{"start":{"line":52,"column":109},"end":{"line":52,"column":111}}],"line":52},"3":{"loc":{"start":{"line":52,"column":24},"end":{"line":52,"column":74}},"type":"binary-expr","locations":[{"start":{"line":52,"column":24},"end":{"line":52,"column":41}},{"start":{"line":52,"column":45},"end":{"line":52,"column":74}}],"line":52},"4":{"loc":{"start":{"line":69,"column":23},"end":{"line":69,"column":104}},"type":"cond-expr","locations":[{"start":{"line":69,"column":59},"end":{"line":69,"column":72}},{"start":{"line":69,"column":75},"end":{"line":69,"column":104}}],"line":69},"5":{"loc":{"start":{"line":73,"column":16},"end":{"line":73,"column":104}},"type":"cond-expr","locations":[{"start":{"line":73,"column":36},"end":{"line":73,"column":89}},{"start":{"line":73,"column":92},"end":{"line":73,"column":104}}],"line":73},"6":{"loc":{"start":{"line":83,"column":4},"end":{"line":85,"column":5}},"type":"if","locations":[{"start":{"line":83,"column":4},"end":{"line":85,"column":5}},{"start":{},"end":{}}],"line":83},"7":{"loc":{"start":{"line":86,"column":18},"end":{"line":86,"column":93}},"type":"cond-expr","locations":[{"start":{"line":86,"column":65},"end":{"line":86,"column":88}},{"start":{"line":86,"column":91},"end":{"line":86,"column":93}}],"line":86},"8":{"loc":{"start":{"line":86,"column":18},"end":{"line":86,"column":62}},"type":"binary-expr","locations":[{"start":{"line":86,"column":18},"end":{"line":86,"column":35}},{"start":{"line":86,"column":39},"end":{"line":86,"column":62}}],"line":86},"9":{"loc":{"start":{"line":96,"column":4},"end":{"line":98,"column":5}},"type":"if","locations":[{"start":{"line":96,"column":4},"end":{"line":98,"column":5}},{"start":{},"end":{}}],"line":96},"10":{"loc":{"start":{"line":111,"column":4},"end":{"line":113,"column":5}},"type":"if","locations":[{"start":{"line":111,"column":4},"end":{"line":113,"column":5}},{"start":{},"end":{}}],"line":111},"11":{"loc":{"start":{"line":132,"column":6},"end":{"line":135,"column":7}},"type":"if","locations":[{"start":{"line":132,"column":6},"end":{"line":135,"column":7}},{"start":{},"end":{}}],"line":132},"12":{"loc":{"start":{"line":142,"column":6},"end":{"line":146,"column":7}},"type":"if","locations":[{"start":{"line":142,"column":6},"end":{"line":146,"column":7}},{"start":{"line":144,"column":13},"end":{"line":146,"column":7}}],"line":142},"13":{"loc":{"start":{"line":169,"column":4},"end":{"line":171,"column":5}},"type":"if","locations":[{"start":{"line":169,"column":4},"end":{"line":171,"column":5}},{"start":{},"end":{}}],"line":169}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0},"b":{"0":[0,0],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0]},"inputSourceMap":{"version":3,"sources":["/home/runner/work/pluto-encrypted/pluto-encrypted/packages/iagon/src/IagonStorage/api.ts"],"sourcesContent":["import axios, { AxiosRequestConfig } from 'axios';\n\n\nimport { IagonFile, IagonFolder, IagonInternalParameters, IagonResponse } from \"./types\";\n\nexport class IagonAPI {\n private baseUrl = \"https://gw.iagon.com/\";\n constructor(private parameters: IagonInternalParameters) { }\n\n get iagonPassword() {\n return Buffer.from(this.parameters.password).toString()\n }\n\n private async runRequest | any>(options: AxiosRequestConfig) {\n try {\n const startTime = Date.now();\n const response = await axios.request(options);\n const endTime = Date.now();\n const elapsedMilliseconds = endTime - startTime;\n console.log(`Request \"${options.method}\":\"${options.url}\" took ${elapsedMilliseconds} ms.`);\n return Promise.resolve(response)\n } catch (err) {\n console.error(`Request \"${options.method}\":\"${options.url}\" failed: ${err}`);\n return Promise.reject(err)\n }\n }\n\n async removeFile(fileId: string) {\n const baseUrl = `${this.baseUrl}api/v2/storage/file/${fileId}`;\n const url = `${baseUrl}`\n const options = {\n 'method': 'DELETE',\n 'url': url,\n 'headers': {\n 'x-api-key': this.parameters.apiKey\n }\n };\n const file = await this.runRequest(options)\n return file\n }\n async getDirectories(parentDirectoryId?: string) {\n const baseUrl = `${this.baseUrl}api/v2/storage/directory?visibility=private&listingType=index`\n const url = parentDirectoryId ? `${baseUrl}&parent_directory_id=${parentDirectoryId}` : `${baseUrl}`\n const options = {\n 'method': 'GET',\n 'url': url,\n 'headers': {\n 'x-api-key': this.parameters.apiKey\n }\n };\n\n const response = await this.runRequest>(options)\n\n const jsonResponse = response.data;\n if (!jsonResponse.success) {\n throw new Error(jsonResponse.message)\n }\n\n const directories = jsonResponse.data && jsonResponse.data.directories ? jsonResponse.data.directories : [];\n return directories\n }\n async getFile(options: { parentDirectoryId?: string | undefined; file: IagonFile; }) {\n const baseUrl = `${this.baseUrl}api/v2/storage/parameterized/download`\n var requestOptions = {\n 'method': 'POST',\n 'url': baseUrl,\n 'headers': {\n 'x-api-key': this.parameters.apiKey\n },\n 'data': {\n \"id\": options.file._id,\n \"password\": this.iagonPassword\n }\n };\n const response = await this.runRequest(requestOptions)\n return Buffer.from(typeof response.data === \"string\" ? response.data : JSON.stringify(response.data));\n }\n async getFiles(parentDirectoryId?: string) {\n const baseUrl = `${this.baseUrl}api/v2/storage/directory?visibility=private&listingType=index`\n const url = parentDirectoryId ? `${baseUrl}&parent_directory_id=${parentDirectoryId}` : `${baseUrl}`\n const options = {\n 'method': 'GET',\n 'url': url,\n 'headers': {\n 'x-api-key': this.parameters.apiKey\n }\n };\n const response = await this.runRequest>(options);\n\n const jsonResponse: IagonResponse<{\n directories: IagonFolder[],\n files: IagonFile[]\n }> = response.data;\n\n if (!jsonResponse.success) {\n throw new Error(jsonResponse.message)\n }\n const files = jsonResponse.data && jsonResponse.data.files ? jsonResponse.data.files : [];\n return files\n }\n async createDirectory(queryOptions: { parentDirectoryId?: string, dirName: string }) {\n const { dirName, parentDirectoryId } = queryOptions\n const body: any = {\n \"directory_name\": dirName,\n \"visibility\": \"private\",\n \"index_listing\": true\n }\n\n if (parentDirectoryId) {\n body.parent_directory_id = parentDirectoryId;\n }\n\n const baseUrl = `${this.baseUrl}api/v2/storage/directory`\n const options = {\n 'method': 'POST',\n 'url': baseUrl,\n 'headers': {\n 'Content-Type': 'application/json',\n 'x-api-key': this.parameters.apiKey\n },\n data: JSON.stringify(body)\n };\n\n const response = await this.runRequest>(options)\n const jsonResponse: IagonResponse = response.data;\n if (!jsonResponse.success) {\n throw new Error(jsonResponse.message)\n }\n\n const directory = jsonResponse.data\n return directory\n }\n async removeDirectory(dirname: IagonFolder, recursive: true) {\n const baseUrl = `${this.baseUrl}api/v2/storage/directory/${dirname._id}`\n var options = {\n 'method': 'DELETE',\n 'url': baseUrl,\n 'headers': {\n 'x-api-key': this.parameters.apiKey\n }\n };\n const response = await this.runRequest(options);\n return response.data\n }\n private objectToFormData(obj) {\n const formData = new FormData();\n for (const key in obj) {\n if (obj.hasOwnProperty(key)) {\n const value = obj[key];\n formData.append(key, value);\n }\n }\n return formData;\n }\n private getFormDataSize(formData) {\n let totalSize = 0;\n for (const [key, value] of formData.entries()) {\n if (value instanceof Blob) {\n totalSize += value.size;\n } else {\n totalSize += new TextEncoder().encode(value.toString()).length;\n }\n }\n return totalSize / 1024;\n }\n async uploadFile(dirname: IagonFolder, file: string, contents: Uint8Array) {\n const baseUrl = `${this.baseUrl}api/v2/storage/upload`;\n const body = this.objectToFormData({\n \"visibility\": \"private\",\n \"password\": this.iagonPassword,\n 'directoryId': dirname._id\n });\n body.append(\"file\", new Blob([contents], { type: \"platin/text\" }), file)\n var options = {\n 'method': 'POST',\n 'url': baseUrl,\n 'headers': {\n 'x-api-key': this.parameters.apiKey\n },\n data: body\n };\n console.log(`Uploading aproximately ${this.getFormDataSize(body)} kb`)\n const response = await this.runRequest>(options);\n const jsonResponse: IagonResponse = response.data;\n if (!jsonResponse.success) {\n throw new Error(jsonResponse.message)\n }\n return jsonResponse.data\n }\n}"],"mappings":";AAAA,OAAO,WAAmC;AAKnC,aAAM,SAAS;AAAA,EAElB,YAAoB,YAAqC;AAArC;AADpB,SAAQ,UAAU;AAAA,EACyC;AAAA,EAE3D,IAAI,gBAAgB;AAChB,WAAO,OAAO,KAAK,KAAK,WAAW,QAAQ,EAAE,SAAS;AAAA,EAC1D;AAAA,EAEA,MAAc,WAAsD,SAA6B;AAC7F,QAAI;AACA,YAAM,YAAY,KAAK,IAAI;AAC3B,YAAM,WAAW,MAAM,MAAM,QAAkB,OAAO;AACtD,YAAM,UAAU,KAAK,IAAI;AACzB,YAAM,sBAAsB,UAAU;AACtC,cAAQ,IAAI,YAAY,QAAQ,MAAM,MAAM,QAAQ,GAAG,UAAU,mBAAmB,MAAM;AAC1F,aAAO,QAAQ,QAAQ,QAAQ;AAAA,IACnC,SAAS,KAAK;AACV,cAAQ,MAAM,YAAY,QAAQ,MAAM,MAAM,QAAQ,GAAG,aAAa,GAAG,EAAE;AAC3E,aAAO,QAAQ,OAAO,GAAG;AAAA,IAC7B;AAAA,EACJ;AAAA,EAEA,MAAM,WAAW,QAAgB;AAC7B,UAAM,UAAU,GAAG,KAAK,OAAO,uBAAuB,MAAM;AAC5D,UAAM,MAAM,GAAG,OAAO;AACtB,UAAM,UAAU;AAAA,MACZ,UAAU;AAAA,MACV,OAAO;AAAA,MACP,WAAW;AAAA,QACP,aAAa,KAAK,WAAW;AAAA,MACjC;AAAA,IACJ;AACA,UAAM,OAAO,MAAM,KAAK,WAAW,OAAO;AAC1C,WAAO;AAAA,EACX;AAAA,EACA,MAAM,eAAe,mBAA4B;AAC7C,UAAM,UAAU,GAAG,KAAK,OAAO;AAC/B,UAAM,MAAM,oBAAoB,GAAG,OAAO,wBAAwB,iBAAiB,KAAK,GAAG,OAAO;AAClG,UAAM,UAAU;AAAA,MACZ,UAAU;AAAA,MACV,OAAO;AAAA,MACP,WAAW;AAAA,QACP,aAAa,KAAK,WAAW;AAAA,MACjC;AAAA,IACJ;AAEA,UAAM,WAAW,MAAM,KAAK,WAGxB,OAAO;AAEX,UAAM,eAAe,SAAS;AAC9B,QAAI,CAAC,aAAa,SAAS;AACvB,YAAM,IAAI,MAAM,aAAa,OAAO;AAAA,IACxC;AAEA,UAAM,cAAc,aAAa,QAAQ,aAAa,KAAK,cAAc,aAAa,KAAK,cAAc,CAAC;AAC1G,WAAO;AAAA,EACX;AAAA,EACA,MAAM,QAAQ,SAAuE;AACjF,UAAM,UAAU,GAAG,KAAK,OAAO;AAC/B,QAAI,iBAAiB;AAAA,MACjB,UAAU;AAAA,MACV,OAAO;AAAA,MACP,WAAW;AAAA,QACP,aAAa,KAAK,WAAW;AAAA,MACjC;AAAA,MACA,QAAQ;AAAA,QACJ,MAAM,QAAQ,KAAK;AAAA,QACnB,YAAY,KAAK;AAAA,MACrB;AAAA,IACJ;AACA,UAAM,WAAW,MAAM,KAAK,WAAuB,cAAc;AACjE,WAAO,OAAO,KAAK,OAAO,SAAS,SAAS,WAAW,SAAS,OAAO,KAAK,UAAU,SAAS,IAAI,CAAC;AAAA,EACxG;AAAA,EACA,MAAM,SAAS,mBAA4B;AACvC,UAAM,UAAU,GAAG,KAAK,OAAO;AAC/B,UAAM,MAAM,oBAAoB,GAAG,OAAO,wBAAwB,iBAAiB,KAAK,GAAG,OAAO;AAClG,UAAM,UAAU;AAAA,MACZ,UAAU;AAAA,MACV,OAAO;AAAA,MACP,WAAW;AAAA,QACP,aAAa,KAAK,WAAW;AAAA,MACjC;AAAA,IACJ;AACA,UAAM,WAAW,MAAM,KAAK,WAGxB,OAAO;AAEX,UAAM,eAGD,SAAS;AAEd,QAAI,CAAC,aAAa,SAAS;AACvB,YAAM,IAAI,MAAM,aAAa,OAAO;AAAA,IACxC;AACA,UAAM,QAAQ,aAAa,QAAQ,aAAa,KAAK,QAAQ,aAAa,KAAK,QAAQ,CAAC;AACxF,WAAO;AAAA,EACX;AAAA,EACA,MAAM,gBAAgB,cAA+D;AACjF,UAAM,EAAE,SAAS,kBAAkB,IAAI;AACvC,UAAM,OAAY;AAAA,MACd,kBAAkB;AAAA,MAClB,cAAc;AAAA,MACd,iBAAiB;AAAA,IACrB;AAEA,QAAI,mBAAmB;AACnB,WAAK,sBAAsB;AAAA,IAC/B;AAEA,UAAM,UAAU,GAAG,KAAK,OAAO;AAC/B,UAAM,UAAU;AAAA,MACZ,UAAU;AAAA,MACV,OAAO;AAAA,MACP,WAAW;AAAA,QACP,gBAAgB;AAAA,QAChB,aAAa,KAAK,WAAW;AAAA,MACjC;AAAA,MACA,MAAM,KAAK,UAAU,IAAI;AAAA,IAC7B;AAEA,UAAM,WAAW,MAAM,KAAK,WAAuC,OAAO;AAC1E,UAAM,eAA2C,SAAS;AAC1D,QAAI,CAAC,aAAa,SAAS;AACvB,YAAM,IAAI,MAAM,aAAa,OAAO;AAAA,IACxC;AAEA,UAAM,YAAY,aAAa;AAC/B,WAAO;AAAA,EACX;AAAA,EACA,MAAM,gBAAgB,SAAsB,WAAiB;AACzD,UAAM,UAAU,GAAG,KAAK,OAAO,4BAA4B,QAAQ,GAAG;AACtE,QAAI,UAAU;AAAA,MACV,UAAU;AAAA,MACV,OAAO;AAAA,MACP,WAAW;AAAA,QACP,aAAa,KAAK,WAAW;AAAA,MACjC;AAAA,IACJ;AACA,UAAM,WAAW,MAAM,KAAK,WAAW,OAAO;AAC9C,WAAO,SAAS;AAAA,EACpB;AAAA,EACQ,iBAAiB,KAAK;AAC1B,UAAM,WAAW,IAAI,SAAS;AAC9B,eAAW,OAAO,KAAK;AACnB,UAAI,IAAI,eAAe,GAAG,GAAG;AACzB,cAAM,QAAQ,IAAI,GAAG;AACrB,iBAAS,OAAO,KAAK,KAAK;AAAA,MAC9B;AAAA,IACJ;AACA,WAAO;AAAA,EACX;AAAA,EACQ,gBAAgB,UAAU;AAC9B,QAAI,YAAY;AAChB,eAAW,CAAC,KAAK,KAAK,KAAK,SAAS,QAAQ,GAAG;AAC3C,UAAI,iBAAiB,MAAM;AACvB,qBAAa,MAAM;AAAA,MACvB,OAAO;AACH,qBAAa,IAAI,YAAY,EAAE,OAAO,MAAM,SAAS,CAAC,EAAE;AAAA,MAC5D;AAAA,IACJ;AACA,WAAO,YAAY;AAAA,EACvB;AAAA,EACA,MAAM,WAAW,SAAsB,MAAc,UAAsB;AACvE,UAAM,UAAU,GAAG,KAAK,OAAO;AAC/B,UAAM,OAAO,KAAK,iBAAiB;AAAA,MAC/B,cAAc;AAAA,MACd,YAAY,KAAK;AAAA,MACjB,eAAe,QAAQ;AAAA,IAC3B,CAAC;AACD,SAAK,OAAO,QAAQ,IAAI,KAAK,CAAC,QAAQ,GAAG,EAAE,MAAM,cAAc,CAAC,GAAG,IAAI;AACvE,QAAI,UAAU;AAAA,MACV,UAAU;AAAA,MACV,OAAO;AAAA,MACP,WAAW;AAAA,QACP,aAAa,KAAK,WAAW;AAAA,MACjC;AAAA,MACA,MAAM;AAAA,IACV;AACA,YAAQ,IAAI,0BAA0B,KAAK,gBAAgB,IAAI,CAAC,KAAK;AACrE,UAAM,WAAW,MAAM,KAAK,WAAqC,OAAO;AACxE,UAAM,eAAyC,SAAS;AACxD,QAAI,CAAC,aAAa,SAAS;AACvB,YAAM,IAAI,MAAM,aAAa,OAAO;AAAA,IACxC;AACA,WAAO,aAAa;AAAA,EACxB;AACJ;","names":[]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"08e641d43daae0a113a9957a7468719dea845441"},"/home/runner/work/pluto-encrypted/pluto-encrypted/packages/iagon/src/IagonStorage/instance.ts":{"path":"/home/runner/work/pluto-encrypted/pluto-encrypted/packages/iagon/src/IagonStorage/instance.ts","statementMap":{"0":{"start":{"line":9,"column":4},"end":{"line":9,"column":37}},"1":{"start":{"line":10,"column":4},"end":{"line":10,"column":31}},"2":{"start":{"line":11,"column":4},"end":{"line":11,"column":27}},"3":{"start":{"line":12,"column":4},"end":{"line":12,"column":25}},"4":{"start":{"line":13,"column":4},"end":{"line":13,"column":41}},"5":{"start":{"line":14,"column":4},"end":{"line":14,"column":29}},"6":{"start":{"line":15,"column":4},"end":{"line":15,"column":31}},"7":{"start":{"line":16,"column":4},"end":{"line":16,"column":49}},"8":{"start":{"line":17,"column":4},"end":{"line":17,"column":34}},"9":{"start":{"line":18,"column":4},"end":{"line":18,"column":75}},"10":{"start":{"line":21,"column":21},"end":{"line":21,"column":87}},"11":{"start":{"line":22,"column":26},"end":{"line":22,"column":76}},"12":{"start":{"line":22,"column":52},"end":{"line":22,"column":75}},"13":{"start":{"line":23,"column":22},"end":{"line":23,"column":24}},"14":{"start":{"line":24,"column":4},"end":{"line":29,"column":5}},"15":{"start":{"line":25,"column":26},"end":{"line":25,"column":68}},"16":{"start":{"line":26,"column":18},"end":{"line":26,"column":65}},"17":{"start":{"line":27,"column":17},"end":{"line":27,"column":38}},"18":{"start":{"line":28,"column":6},"end":{"line":28,"column":26}},"19":{"start":{"line":30,"column":4},"end":{"line":30,"column":21}},"20":{"start":{"line":33,"column":22},"end":{"line":33,"column":24}},"21":{"start":{"line":34,"column":4},"end":{"line":45,"column":5}},"22":{"start":{"line":35,"column":23},"end":{"line":35,"column":59}},"23":{"start":{"line":36,"column":6},"end":{"line":44,"column":7}},"24":{"start":{"line":37,"column":8},"end":{"line":39,"column":9}},"25":{"start":{"line":38,"column":10},"end":{"line":38,"column":35}},"26":{"start":{"line":40,"column":24},"end":{"line":40,"column":46}},"27":{"start":{"line":41,"column":8},"end":{"line":43,"column":9}},"28":{"start":{"line":42,"column":10},"end":{"line":42,"column":35}},"29":{"start":{"line":46,"column":4},"end":{"line":46,"column":21}},"30":{"start":{"line":49,"column":33},"end":{"line":49,"column":46}},"31":{"start":{"line":50,"column":21},"end":{"line":50,"column":35}},"32":{"start":{"line":51,"column":25},"end":{"line":51,"column":46}},"33":{"start":{"line":52,"column":17},"end":{"line":52,"column":44}},"34":{"start":{"line":53,"column":18},"end":{"line":53,"column":54}},"35":{"start":{"line":54,"column":26},"end":{"line":54,"column":38}},"36":{"start":{"line":55,"column":25},"end":{"line":58,"column":5}},"37":{"start":{"line":59,"column":28},"end":{"line":59,"column":43}},"38":{"start":{"line":60,"column":20},"end":{"line":60,"column":22}},"39":{"start":{"line":61,"column":4},"end":{"line":65,"column":5}},"40":{"start":{"line":62,"column":6},"end":{"line":62,"column":50}},"41":{"start":{"line":64,"column":6},"end":{"line":64,"column":72}},"42":{"start":{"line":64,"column":53},"end":{"line":64,"column":69}},"43":{"start":{"line":66,"column":37},"end":{"line":74,"column":6}},"44":{"start":{"line":67,"column":6},"end":{"line":73,"column":7}},"45":{"start":{"line":68,"column":8},"end":{"line":68,"column":58}},"46":{"start":{"line":68,"column":40},"end":{"line":68,"column":56}},"47":{"start":{"line":70,"column":8},"end":{"line":72,"column":11}},"48":{"start":{"line":71,"column":10},"end":{"line":71,"column":82}},"49":{"start":{"line":71,"column":57},"end":{"line":71,"column":80}},"50":{"start":{"line":75,"column":4},"end":{"line":85,"column":5}},"51":{"start":{"line":76,"column":6},"end":{"line":76,"column":40}},"52":{"start":{"line":77,"column":6},"end":{"line":77,"column":40}},"53":{"start":{"line":78,"column":6},"end":{"line":82,"column":7}},"54":{"start":{"line":79,"column":8},"end":{"line":79,"column":47}},"55":{"start":{"line":81,"column":8},"end":{"line":81,"column":50}},"56":{"start":{"line":84,"column":6},"end":{"line":84,"column":43}},"57":{"start":{"line":86,"column":22},"end":{"line":86,"column":46}},"58":{"start":{"line":87,"column":24},"end":{"line":87,"column":64}},"59":{"start":{"line":88,"column":4},"end":{"line":90,"column":5}},"60":{"start":{"line":89,"column":6},"end":{"line":89,"column":31}},"61":{"start":{"line":91,"column":20},"end":{"line":95,"column":5}},"62":{"start":{"line":96,"column":27},"end":{"line":96,"column":78}},"63":{"start":{"line":97,"column":4},"end":{"line":97,"column":47}},"64":{"start":{"line":98,"column":4},"end":{"line":98,"column":53}},"65":{"start":{"line":99,"column":4},"end":{"line":101,"column":6}},"66":{"start":{"line":104,"column":19},"end":{"line":104,"column":50}},"67":{"start":{"line":105,"column":4},"end":{"line":108,"column":6}},"68":{"start":{"line":111,"column":4},"end":{"line":111,"column":47}},"69":{"start":{"line":114,"column":4},"end":{"line":114,"column":47}},"70":{"start":{"line":117,"column":4},"end":{"line":117,"column":86}},"71":{"start":{"line":118,"column":4},"end":{"line":118,"column":16}},"72":{"start":{"line":121,"column":4},"end":{"line":121,"column":29}},"73":{"start":{"line":124,"column":4},"end":{"line":124,"column":40}},"74":{"start":{"line":127,"column":4},"end":{"line":127,"column":29}},"75":{"start":{"line":130,"column":4},"end":{"line":130,"column":55}},"76":{"start":{"line":133,"column":4},"end":{"line":133,"column":29}},"77":{"start":{"line":136,"column":41},"end":{"line":136,"column":50}},"78":{"start":{"line":137,"column":22},"end":{"line":137,"column":88}},"79":{"start":{"line":138,"column":4},"end":{"line":143,"column":5}},"80":{"start":{"line":139,"column":26},"end":{"line":139,"column":68}},"81":{"start":{"line":140,"column":20},"end":{"line":140,"column":67}},"82":{"start":{"line":141,"column":24},"end":{"line":141,"column":47}},"83":{"start":{"line":142,"column":6},"end":{"line":142,"column":41}},"84":{"start":{"line":144,"column":4},"end":{"line":144,"column":24}},"85":{"start":{"line":147,"column":24},"end":{"line":147,"column":40}},"86":{"start":{"line":148,"column":16},"end":{"line":151,"column":5}},"87":{"start":{"line":152,"column":22},"end":{"line":152,"column":50}},"88":{"start":{"line":153,"column":18},"end":{"line":153,"column":20}},"89":{"start":{"line":154,"column":4},"end":{"line":169,"column":5}},"90":{"start":{"line":155,"column":24},"end":{"line":155,"column":66}},"91":{"start":{"line":156,"column":31},"end":{"line":156,"column":83}},"92":{"start":{"line":157,"column":6},"end":{"line":168,"column":7}},"93":{"start":{"line":158,"column":8},"end":{"line":160,"column":9}},"94":{"start":{"line":159,"column":10},"end":{"line":159,"column":38}},"95":{"start":{"line":162,"column":8},"end":{"line":166,"column":9}},"96":{"start":{"line":163,"column":10},"end":{"line":163,"column":54}},"97":{"start":{"line":165,"column":10},"end":{"line":165,"column":44}},"98":{"start":{"line":167,"column":8},"end":{"line":167,"column":36}},"99":{"start":{"line":170,"column":24},"end":{"line":176,"column":5}},"100":{"start":{"line":177,"column":4},"end":{"line":177,"column":35}},"101":{"start":{"line":178,"column":27},"end":{"line":178,"column":53}},"102":{"start":{"line":179,"column":4},"end":{"line":184,"column":5}},"103":{"start":{"line":179,"column":17},"end":{"line":179,"column":18}},"104":{"start":{"line":180,"column":23},"end":{"line":180,"column":40}},"105":{"start":{"line":181,"column":20},"end":{"line":181,"column":50}},"106":{"start":{"line":182,"column":6},"end":{"line":182,"column":90}},"107":{"start":{"line":183,"column":6},"end":{"line":183,"column":45}},"108":{"start":{"line":185,"column":27},"end":{"line":185,"column":53}},"109":{"start":{"line":186,"column":4},"end":{"line":191,"column":5}},"110":{"start":{"line":186,"column":17},"end":{"line":186,"column":18}},"111":{"start":{"line":187,"column":23},"end":{"line":187,"column":40}},"112":{"start":{"line":188,"column":20},"end":{"line":188,"column":50}},"113":{"start":{"line":189,"column":6},"end":{"line":189,"column":90}},"114":{"start":{"line":190,"column":6},"end":{"line":190,"column":45}},"115":{"start":{"line":192,"column":4},"end":{"line":203,"column":5}},"116":{"start":{"line":193,"column":24},"end":{"line":193,"column":70}},"117":{"start":{"line":194,"column":6},"end":{"line":197,"column":8}},"118":{"start":{"line":198,"column":22},"end":{"line":198,"column":27}},"119":{"start":{"line":199,"column":6},"end":{"line":201,"column":9}},"120":{"start":{"line":200,"column":8},"end":{"line":200,"column":32}},"121":{"start":{"line":202,"column":6},"end":{"line":202,"column":48}},"122":{"start":{"line":204,"column":4},"end":{"line":204,"column":32}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":8,"column":2},"end":{"line":8,"column":3}},"loc":{"start":{"line":8,"column":86},"end":{"line":19,"column":3}},"line":8},"1":{"name":"(anonymous_1)","decl":{"start":{"line":20,"column":2},"end":{"line":20,"column":3}},"loc":{"start":{"line":20,"column":44},"end":{"line":31,"column":3}},"line":20},"2":{"name":"(anonymous_2)","decl":{"start":{"line":22,"column":42},"end":{"line":22,"column":43}},"loc":{"start":{"line":22,"column":52},"end":{"line":22,"column":75}},"line":22},"3":{"name":"(anonymous_3)","decl":{"start":{"line":32,"column":2},"end":{"line":32,"column":3}},"loc":{"start":{"line":32,"column":60},"end":{"line":47,"column":3}},"line":32},"4":{"name":"(anonymous_4)","decl":{"start":{"line":48,"column":2},"end":{"line":48,"column":3}},"loc":{"start":{"line":48,"column":29},"end":{"line":102,"column":3}},"line":48},"5":{"name":"(anonymous_5)","decl":{"start":{"line":64,"column":42},"end":{"line":64,"column":43}},"loc":{"start":{"line":64,"column":53},"end":{"line":64,"column":69}},"line":64},"6":{"name":"(anonymous_6)","decl":{"start":{"line":66,"column":63},"end":{"line":66,"column":64}},"loc":{"start":{"line":66,"column":74},"end":{"line":74,"column":5}},"line":66},"7":{"name":"(anonymous_7)","decl":{"start":{"line":68,"column":28},"end":{"line":68,"column":29}},"loc":{"start":{"line":68,"column":40},"end":{"line":68,"column":56}},"line":68},"8":{"name":"(anonymous_8)","decl":{"start":{"line":70,"column":26},"end":{"line":70,"column":27}},"loc":{"start":{"line":70,"column":40},"end":{"line":72,"column":9}},"line":70},"9":{"name":"(anonymous_9)","decl":{"start":{"line":71,"column":41},"end":{"line":71,"column":42}},"loc":{"start":{"line":71,"column":57},"end":{"line":71,"column":80}},"line":71},"10":{"name":"(anonymous_10)","decl":{"start":{"line":103,"column":2},"end":{"line":103,"column":3}},"loc":{"start":{"line":103,"column":29},"end":{"line":109,"column":3}},"line":103},"11":{"name":"(anonymous_11)","decl":{"start":{"line":110,"column":2},"end":{"line":110,"column":3}},"loc":{"start":{"line":110,"column":54},"end":{"line":112,"column":3}},"line":110},"12":{"name":"(anonymous_12)","decl":{"start":{"line":113,"column":2},"end":{"line":113,"column":3}},"loc":{"start":{"line":113,"column":46},"end":{"line":115,"column":3}},"line":113},"13":{"name":"(anonymous_13)","decl":{"start":{"line":116,"column":2},"end":{"line":116,"column":3}},"loc":{"start":{"line":116,"column":36},"end":{"line":119,"column":3}},"line":116},"14":{"name":"(anonymous_14)","decl":{"start":{"line":120,"column":2},"end":{"line":120,"column":3}},"loc":{"start":{"line":120,"column":10},"end":{"line":122,"column":3}},"line":120},"15":{"name":"(anonymous_15)","decl":{"start":{"line":123,"column":2},"end":{"line":123,"column":3}},"loc":{"start":{"line":123,"column":17},"end":{"line":125,"column":3}},"line":123},"16":{"name":"(anonymous_16)","decl":{"start":{"line":126,"column":2},"end":{"line":126,"column":3}},"loc":{"start":{"line":126,"column":11},"end":{"line":128,"column":3}},"line":126},"17":{"name":"(anonymous_17)","decl":{"start":{"line":129,"column":2},"end":{"line":129,"column":3}},"loc":{"start":{"line":129,"column":27},"end":{"line":131,"column":3}},"line":129},"18":{"name":"(anonymous_18)","decl":{"start":{"line":132,"column":2},"end":{"line":132,"column":3}},"loc":{"start":{"line":132,"column":45},"end":{"line":134,"column":3}},"line":132},"19":{"name":"(anonymous_19)","decl":{"start":{"line":135,"column":2},"end":{"line":135,"column":3}},"loc":{"start":{"line":135,"column":26},"end":{"line":145,"column":3}},"line":135},"20":{"name":"(anonymous_20)","decl":{"start":{"line":146,"column":2},"end":{"line":146,"column":3}},"loc":{"start":{"line":146,"column":43},"end":{"line":205,"column":3}},"line":146},"21":{"name":"(anonymous_21)","decl":{"start":{"line":199,"column":43},"end":{"line":199,"column":44}},"loc":{"start":{"line":199,"column":54},"end":{"line":201,"column":7}},"line":199}},"branchMap":{"0":{"loc":{"start":{"line":8,"column":72},"end":{"line":8,"column":84}},"type":"default-arg","locations":[{"start":{"line":8,"column":83},"end":{"line":8,"column":84}}],"line":8},"1":{"loc":{"start":{"line":36,"column":6},"end":{"line":44,"column":7}},"type":"if","locations":[{"start":{"line":36,"column":6},"end":{"line":44,"column":7}},{"start":{},"end":{}}],"line":36},"2":{"loc":{"start":{"line":37,"column":8},"end":{"line":39,"column":9}},"type":"if","locations":[{"start":{"line":37,"column":8},"end":{"line":39,"column":9}},{"start":{},"end":{}}],"line":37},"3":{"loc":{"start":{"line":41,"column":8},"end":{"line":43,"column":9}},"type":"if","locations":[{"start":{"line":41,"column":8},"end":{"line":43,"column":9}},{"start":{},"end":{}}],"line":41},"4":{"loc":{"start":{"line":52,"column":17},"end":{"line":52,"column":44}},"type":"cond-expr","locations":[{"start":{"line":52,"column":30},"end":{"line":52,"column":40}},{"start":{"line":52,"column":43},"end":{"line":52,"column":44}}],"line":52},"5":{"loc":{"start":{"line":53,"column":18},"end":{"line":53,"column":54}},"type":"cond-expr","locations":[{"start":{"line":53,"column":32},"end":{"line":53,"column":43}},{"start":{"line":53,"column":46},"end":{"line":53,"column":54}}],"line":53},"6":{"loc":{"start":{"line":61,"column":4},"end":{"line":65,"column":5}},"type":"if","locations":[{"start":{"line":61,"column":4},"end":{"line":65,"column":5}},{"start":{"line":63,"column":11},"end":{"line":65,"column":5}}],"line":61},"7":{"loc":{"start":{"line":67,"column":6},"end":{"line":73,"column":7}},"type":"if","locations":[{"start":{"line":67,"column":6},"end":{"line":73,"column":7}},{"start":{"line":69,"column":13},"end":{"line":73,"column":7}}],"line":67},"8":{"loc":{"start":{"line":75,"column":4},"end":{"line":85,"column":5}},"type":"if","locations":[{"start":{"line":75,"column":4},"end":{"line":85,"column":5}},{"start":{"line":83,"column":11},"end":{"line":85,"column":5}}],"line":75},"9":{"loc":{"start":{"line":78,"column":6},"end":{"line":82,"column":7}},"type":"if","locations":[{"start":{"line":78,"column":6},"end":{"line":82,"column":7}},{"start":{"line":80,"column":13},"end":{"line":82,"column":7}}],"line":78},"10":{"loc":{"start":{"line":88,"column":4},"end":{"line":90,"column":5}},"type":"if","locations":[{"start":{"line":88,"column":4},"end":{"line":90,"column":5}},{"start":{},"end":{}}],"line":88},"11":{"loc":{"start":{"line":88,"column":8},"end":{"line":88,"column":47}},"type":"binary-expr","locations":[{"start":{"line":88,"column":8},"end":{"line":88,"column":20}},{"start":{"line":88,"column":24},"end":{"line":88,"column":47}}],"line":88},"12":{"loc":{"start":{"line":156,"column":31},"end":{"line":156,"column":83}},"type":"binary-expr","locations":[{"start":{"line":156,"column":31},"end":{"line":156,"column":55}},{"start":{"line":156,"column":59},"end":{"line":156,"column":83}}],"line":156},"13":{"loc":{"start":{"line":157,"column":6},"end":{"line":168,"column":7}},"type":"if","locations":[{"start":{"line":157,"column":6},"end":{"line":168,"column":7}},{"start":{"line":161,"column":13},"end":{"line":168,"column":7}}],"line":157},"14":{"loc":{"start":{"line":158,"column":8},"end":{"line":160,"column":9}},"type":"if","locations":[{"start":{"line":158,"column":8},"end":{"line":160,"column":9}},{"start":{},"end":{}}],"line":158},"15":{"loc":{"start":{"line":158,"column":12},"end":{"line":158,"column":87}},"type":"binary-expr","locations":[{"start":{"line":158,"column":12},"end":{"line":158,"column":28}},{"start":{"line":158,"column":32},"end":{"line":158,"column":87}}],"line":158},"16":{"loc":{"start":{"line":162,"column":8},"end":{"line":166,"column":9}},"type":"if","locations":[{"start":{"line":162,"column":8},"end":{"line":166,"column":9}},{"start":{"line":164,"column":15},"end":{"line":166,"column":9}}],"line":162},"17":{"loc":{"start":{"line":162,"column":12},"end":{"line":162,"column":87}},"type":"binary-expr","locations":[{"start":{"line":162,"column":12},"end":{"line":162,"column":28}},{"start":{"line":162,"column":32},"end":{"line":162,"column":87}}],"line":162},"18":{"loc":{"start":{"line":192,"column":4},"end":{"line":203,"column":5}},"type":"if","locations":[{"start":{"line":192,"column":4},"end":{"line":203,"column":5}},{"start":{},"end":{}}],"line":192}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":0,"120":0,"121":0,"122":0},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0},"b":{"0":[0],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0]},"inputSourceMap":{"version":3,"sources":["/home/runner/work/pluto-encrypted/pluto-encrypted/packages/iagon/src/IagonStorage/instance.ts"],"sourcesContent":["import {\n Subject, type Observable\n} from 'rxjs'\n\nimport { RxStorageInstance, StringKeys, RxDocumentData, RxConflictResultionTask, EventBulk, RxStorageChangeEvent, RxStorageDefaultCheckpoint, RxJsonSchema, getPrimaryFieldOfPrimaryKey, BulkWriteRow, RxConflictResultionTaskSolution, RxDocumentDataById, RxStorageBulkWriteResponse, RxStorageCountResult, RxStorageQueryResult, categorizeBulkWriteRows, ensureNotFalsy, now, getQueryMatcher, getSortComparator } from \"rxdb\";\nimport { IagonInternalParameters, IagonStorageInternals } from './types';\nimport { IagonInternals } from './internals';\nimport { QueryMatcher } from 'rxdb/dist/types/types';\nimport { fixTxPipe } from '@pluto-encrypted/shared';\n\n\nexport class IagonStorageInstance<\n RxDocType,\n> implements RxStorageInstance<\n RxDocType,\n IagonStorageInternals,\n IagonInternalParameters,\n RxStorageDefaultCheckpoint\n> {\n public readonly primaryPath: StringKeys>\n\n public isInitialised = false;\n\n public conflictResultionTasks$ = new Subject>()\n public changes$ = new Subject>, RxStorageDefaultCheckpoint>>()\n\n constructor(\n public databaseName: string,\n public internals: IagonInternals,\n public options: Readonly,\n public schema: Readonly>>,\n public collectionName: string,\n public refCount: number = 0\n ) {\n this.primaryPath = getPrimaryFieldOfPrimaryKey(this.schema.primaryKey)\n }\n\n async findDocumentsById(ids: string[], withDeleted: boolean): Promise> {\n const allFiles = await this.internals.sdk.getFiles(this.internals.__dataFolder._id);\n const matchingFiles = allFiles.filter((file) => ids.includes(file.name));\n const documents: RxDocumentDataById = {}\n for (let file of matchingFiles) {\n const fileContent = await this.internals.sdk.getFile({ file: file })\n const doc = JSON.parse(Buffer.from(fileContent).toString());\n const id = doc[this.primaryPath];\n documents[id] = doc;\n }\n return documents\n }\n\n\n private async resolveDocumentIds(ids: string[], selectorKeys: string[], queryMatcher: QueryMatcher>): Promise>> {\n const documents: Array> = [];\n for (let documentId of ids) {\n const document = await this.internals.get(documentId)\n if (document) {\n if (selectorKeys.length <= 0) {\n documents.push(document)\n }\n const matches = queryMatcher(document)\n if (matches) {\n documents.push(document)\n }\n }\n }\n return documents\n }\n\n async query(preparedQuery: any): Promise> {\n const { queryPlan, query } = preparedQuery\n const selector = query.selector\n const selectorKeys = Object.keys(selector)\n const skip = query.skip ? query.skip : 0\n const limit = query.limit ? query.limit : Infinity\n const skipPlusLimit = skip + limit\n const queryMatcher: QueryMatcher> = getQueryMatcher(\n this.schema,\n query\n )\n\n const queryPlanFields: string[] = queryPlan.index\n const indexes: string[] = []\n if (queryPlanFields.length === 1) {\n indexes.push(fixTxPipe(queryPlanFields[0]!))\n } else {\n indexes.push(...queryPlanFields.map(field => fixTxPipe(field)))\n }\n\n const shouldAddCompoundIndexes = this.schema.indexes?.find((index) => {\n if (typeof index === 'string') {\n return indexes.find((index2) => index2 === index)\n } else {\n return index.find((subIndex) => {\n return subIndex === index.find((indexValue) => indexValue === subIndex)\n })\n }\n })\n\n if (shouldAddCompoundIndexes) {\n indexes.splice(0, indexes.length)\n indexes.push(this.collectionName)\n if (typeof shouldAddCompoundIndexes === 'string') {\n indexes.push(shouldAddCompoundIndexes)\n } else {\n indexes.push(...shouldAddCompoundIndexes)\n }\n } else {\n indexes.unshift(this.collectionName)\n }\n\n const indexName: string = `[${indexes.join('+')}]`\n\n const documentIds = await this.internals.getIndex(indexName)\n\n if (!documentIds || documentIds.length <= 0) {\n return { documents: [] }\n }\n\n let documents = await this.resolveDocumentIds(\n documentIds,\n selectorKeys,\n queryMatcher\n )\n\n const sortComparator = getSortComparator(this.schema, preparedQuery.query)\n documents = documents.sort(sortComparator)\n documents = documents.slice(skip, skipPlusLimit)\n return {\n documents\n }\n }\n async count(preparedQuery: any): Promise {\n const result = await this.query(preparedQuery)\n return {\n count: result.documents.length,\n mode: 'fast'\n }\n }\n getAttachmentData(documentId: string, attachmentId: string, digest: string): Promise {\n throw new Error('Method not implemented.');\n }\n getChangedDocumentsSince(limit: number, checkpoint?: any): Promise<{ documents: RxDocumentData[]; checkpoint: any; }> {\n throw new Error('Method not implemented.');\n }\n\n async cleanup(minimumDeletedTime: number): Promise {\n await this.internals.sdk.removeDirectory(this.internals.__collectionFolder, true)\n return true\n }\n close(): Promise {\n return Promise.resolve()\n }\n changeStream(): Observable, any>> {\n return this.changes$.asObservable()\n }\n remove(): Promise {\n return Promise.resolve()\n }\n conflictResultionTasks(): Observable> {\n return this.conflictResultionTasks$.asObservable()\n }\n resolveConflictResultionTask(taskSolution: RxConflictResultionTaskSolution): Promise {\n return Promise.resolve()\n }\n private async getAllDocuments() {\n const allDocuments: Map> = new Map();\n const dataFiles = await this.internals.sdk.getFiles(this.internals.__dataFolder._id);\n for (let file of dataFiles) {\n const fileContent = await this.internals.sdk.getFile({ file });\n const rxDoc: RxDocumentData = JSON.parse(Buffer.from(fileContent).toString())\n const currentId = rxDoc[this.primaryPath] as any;\n allDocuments.set(currentId, rxDoc)\n }\n return allDocuments\n }\n async bulkWrite(documentWrites: BulkWriteRow[], context: string): Promise> {\n const primaryPath = this.primaryPath\n const ret: RxStorageBulkWriteResponse = {\n success: {},\n error: {}\n }\n const documents = await this.getAllDocuments()\n const fixed: BulkWriteRow[] = []\n for (let currentWriteDoc of documentWrites) {\n const currentId = currentWriteDoc.document[this.primaryPath] as any;\n const previousDocument = currentWriteDoc.previous ?? documents.get(currentId)\n if (context === 'data-migrator-delete') {\n if (previousDocument && previousDocument._rev === currentWriteDoc.document._rev) {\n fixed.push(currentWriteDoc)\n }\n } else {\n if (previousDocument && previousDocument._rev !== currentWriteDoc.document._rev) {\n currentWriteDoc.previous = previousDocument\n } else {\n currentWriteDoc.previous = undefined\n }\n fixed.push(currentWriteDoc)\n }\n }\n\n const categorized = categorizeBulkWriteRows(\n this,\n primaryPath as any,\n documents,\n fixed,\n context\n )\n ret.error = categorized.errors\n\n /**\n * Do inserts/updates\n */\n const bulkInsertDocs = categorized.bulkInsertDocs\n for (let i = 0; i < bulkInsertDocs.length; ++i) {\n const writeRow = bulkInsertDocs[i]!\n const docId = writeRow.document[primaryPath]\n await this.internals.bulkPut([writeRow.document], this.collectionName, this.schema)\n ret.success[docId as any] = writeRow.document\n }\n\n const bulkUpdateDocs = categorized.bulkUpdateDocs\n for (let i = 0; i < bulkUpdateDocs.length; ++i) {\n const writeRow = bulkUpdateDocs[i]!\n const docId = writeRow.document[primaryPath]\n await this.internals.bulkPut([writeRow.document], this.collectionName, this.schema)\n ret.success[docId as any] = writeRow.document\n }\n\n if (categorized.eventBulk.events.length > 0) {\n const lastState = ensureNotFalsy(categorized.newestRow).document\n categorized.eventBulk.checkpoint = {\n id: lastState[primaryPath],\n lwt: lastState._meta.lwt\n }\n const endTime = now()\n categorized.eventBulk.events.forEach(event => {\n (event as any).endTime = endTime\n })\n this.changes$.next(categorized.eventBulk)\n }\n\n return Promise.resolve(ret)\n }\n}"],"mappings":";AAAA;AAAA,EACI;AAAA,OACG;AAEP,SAA4J,6BAAwK,yBAAyB,gBAAgB,KAAK,iBAAiB,yBAAyB;AAI5Z,SAAS,iBAAiB;AAGnB,aAAM,qBAOX;AAAA,EAQE,YACW,cACA,WACA,SACA,QACA,gBACA,WAAmB,GAC5B;AANS;AACA;AACA;AACA;AACA;AACA;AAXX,SAAO,gBAAgB;AAEvB,SAAO,0BAA0B,IAAI,QAA4C;AACjF,SAAO,WAAW,IAAI,QAAgG;AAUlH,SAAK,cAAc,4BAA4B,KAAK,OAAO,UAAU;AAAA,EACzE;AAAA,EAEA,MAAM,kBAAkB,KAAe,aAA8D;AACjG,UAAM,WAAW,MAAM,KAAK,UAAU,IAAI,SAAS,KAAK,UAAU,aAAa,GAAG;AAClF,UAAM,gBAAgB,SAAS,OAAO,CAAC,SAAS,IAAI,SAAS,KAAK,IAAI,CAAC;AACvE,UAAM,YAA2C,CAAC;AAClD,aAAS,QAAQ,eAAe;AAC5B,YAAM,cAAc,MAAM,KAAK,UAAU,IAAI,QAAQ,EAAE,KAAW,CAAC;AACnE,YAAM,MAAM,KAAK,MAAM,OAAO,KAAK,WAAW,EAAE,SAAS,CAAC;AAC1D,YAAM,KAAK,IAAI,KAAK,WAAW;AAC/B,gBAAU,EAAE,IAAI;AAAA,IACpB;AACA,WAAO;AAAA,EACX;AAAA,EAGA,MAAc,mBAAmB,KAAe,cAAwB,cAAkG;AACtK,UAAM,YAA8C,CAAC;AACrD,aAAS,cAAc,KAAK;AACxB,YAAM,WAAW,MAAM,KAAK,UAAU,IAAI,UAAU;AACpD,UAAI,UAAU;AACV,YAAI,aAAa,UAAU,GAAG;AAC1B,oBAAU,KAAK,QAAQ;AAAA,QAC3B;AACA,cAAM,UAAU,aAAa,QAAQ;AACrC,YAAI,SAAS;AACT,oBAAU,KAAK,QAAQ;AAAA,QAC3B;AAAA,MACJ;AAAA,IACJ;AACA,WAAO;AAAA,EACX;AAAA,EAEA,MAAM,MAAM,eAA8D;AACtE,UAAM,EAAE,WAAW,MAAM,IAAI;AAC7B,UAAM,WAAW,MAAM;AACvB,UAAM,eAAe,OAAO,KAAK,QAAQ;AACzC,UAAM,OAAO,MAAM,OAAO,MAAM,OAAO;AACvC,UAAM,QAAQ,MAAM,QAAQ,MAAM,QAAQ;AAC1C,UAAM,gBAAgB,OAAO;AAC7B,UAAM,eAAwD;AAAA,MAC1D,KAAK;AAAA,MACL;AAAA,IACJ;AAEA,UAAM,kBAA4B,UAAU;AAC5C,UAAM,UAAoB,CAAC;AAC3B,QAAI,gBAAgB,WAAW,GAAG;AAC9B,cAAQ,KAAK,UAAU,gBAAgB,CAAC,CAAE,CAAC;AAAA,IAC/C,OAAO;AACH,cAAQ,KAAK,GAAG,gBAAgB,IAAI,WAAS,UAAU,KAAK,CAAC,CAAC;AAAA,IAClE;AAEA,UAAM,2BAA2B,KAAK,OAAO,SAAS,KAAK,CAAC,UAAU;AAClE,UAAI,OAAO,UAAU,UAAU;AAC3B,eAAO,QAAQ,KAAK,CAAC,WAAW,WAAW,KAAK;AAAA,MACpD,OAAO;AACH,eAAO,MAAM,KAAK,CAAC,aAAa;AAC5B,iBAAO,aAAa,MAAM,KAAK,CAAC,eAAe,eAAe,QAAQ;AAAA,QAC1E,CAAC;AAAA,MACL;AAAA,IACJ,CAAC;AAED,QAAI,0BAA0B;AAC1B,cAAQ,OAAO,GAAG,QAAQ,MAAM;AAChC,cAAQ,KAAK,KAAK,cAAc;AAChC,UAAI,OAAO,6BAA6B,UAAU;AAC9C,gBAAQ,KAAK,wBAAwB;AAAA,MACzC,OAAO;AACH,gBAAQ,KAAK,GAAG,wBAAwB;AAAA,MAC5C;AAAA,IACJ,OAAO;AACH,cAAQ,QAAQ,KAAK,cAAc;AAAA,IACvC;AAEA,UAAM,YAAoB,IAAI,QAAQ,KAAK,GAAG,CAAC;AAE/C,UAAM,cAAc,MAAM,KAAK,UAAU,SAAS,SAAS;AAE3D,QAAI,CAAC,eAAe,YAAY,UAAU,GAAG;AACzC,aAAO,EAAE,WAAW,CAAC,EAAE;AAAA,IAC3B;AAEA,QAAI,YAAY,MAAM,KAAK;AAAA,MACvB;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAEA,UAAM,iBAAiB,kBAAkB,KAAK,QAAQ,cAAc,KAAK;AACzE,gBAAY,UAAU,KAAK,cAAc;AACzC,gBAAY,UAAU,MAAM,MAAM,aAAa;AAC/C,WAAO;AAAA,MACH;AAAA,IACJ;AAAA,EACJ;AAAA,EACA,MAAM,MAAM,eAAmD;AAC3D,UAAM,SAAS,MAAM,KAAK,MAAM,aAAa;AAC7C,WAAO;AAAA,MACH,OAAO,OAAO,UAAU;AAAA,MACxB,MAAM;AAAA,IACV;AAAA,EACJ;AAAA,EACA,kBAAkB,YAAoB,cAAsB,QAAiC;AACzF,UAAM,IAAI,MAAM,yBAAyB;AAAA,EAC7C;AAAA,EACA,yBAAyB,OAAe,YAAyF;AAC7H,UAAM,IAAI,MAAM,yBAAyB;AAAA,EAC7C;AAAA,EAEA,MAAM,QAAQ,oBAA8C;AACxD,UAAM,KAAK,UAAU,IAAI,gBAAgB,KAAK,UAAU,oBAAoB,IAAI;AAChF,WAAO;AAAA,EACX;AAAA,EACA,QAAuB;AACnB,WAAO,QAAQ,QAAQ;AAAA,EAC3B;AAAA,EACA,eAA4E;AACxE,WAAO,KAAK,SAAS,aAAa;AAAA,EACtC;AAAA,EACA,SAAwB;AACpB,WAAO,QAAQ,QAAQ;AAAA,EAC3B;AAAA,EACA,yBAAyE;AACrE,WAAO,KAAK,wBAAwB,aAAa;AAAA,EACrD;AAAA,EACA,6BAA6B,cAAyE;AAClG,WAAO,QAAQ,QAAQ;AAAA,EAC3B;AAAA,EACA,MAAc,kBAAkB;AAC5B,UAAM,eAAuD,oBAAI,IAAI;AACrE,UAAM,YAAY,MAAM,KAAK,UAAU,IAAI,SAAS,KAAK,UAAU,aAAa,GAAG;AACnF,aAAS,QAAQ,WAAW;AACxB,YAAM,cAAc,MAAM,KAAK,UAAU,IAAI,QAAQ,EAAE,KAAK,CAAC;AAC7D,YAAM,QAAmC,KAAK,MAAM,OAAO,KAAK,WAAW,EAAE,SAAS,CAAC;AACvF,YAAM,YAAY,MAAM,KAAK,WAAW;AACxC,mBAAa,IAAI,WAAW,KAAK;AAAA,IACrC;AACA,WAAO;AAAA,EACX;AAAA,EACA,MAAM,UAAU,gBAA2C,SAAiE;AACxH,UAAM,cAAc,KAAK;AACzB,UAAM,MAA6C;AAAA,MAC/C,SAAS,CAAC;AAAA,MACV,OAAO,CAAC;AAAA,IACZ;AACA,UAAM,YAAY,MAAM,KAAK,gBAAgB;AAC7C,UAAM,QAAmC,CAAC;AAC1C,aAAS,mBAAmB,gBAAgB;AACxC,YAAM,YAAY,gBAAgB,SAAS,KAAK,WAAW;AAC3D,YAAM,mBAAmB,gBAAgB,YAAY,UAAU,IAAI,SAAS;AAC5E,UAAI,YAAY,wBAAwB;AACpC,YAAI,oBAAoB,iBAAiB,SAAS,gBAAgB,SAAS,MAAM;AAC7E,gBAAM,KAAK,eAAe;AAAA,QAC9B;AAAA,MACJ,OAAO;AACH,YAAI,oBAAoB,iBAAiB,SAAS,gBAAgB,SAAS,MAAM;AAC7E,0BAAgB,WAAW;AAAA,QAC/B,OAAO;AACH,0BAAgB,WAAW;AAAA,QAC/B;AACA,cAAM,KAAK,eAAe;AAAA,MAC9B;AAAA,IACJ;AAEA,UAAM,cAAc;AAAA,MAChB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AACA,QAAI,QAAQ,YAAY;AAKxB,UAAM,iBAAiB,YAAY;AACnC,aAAS,IAAI,GAAG,IAAI,eAAe,QAAQ,EAAE,GAAG;AAC5C,YAAM,WAAW,eAAe,CAAC;AACjC,YAAM,QAAQ,SAAS,SAAS,WAAW;AAC3C,YAAM,KAAK,UAAU,QAAQ,CAAC,SAAS,QAAQ,GAAG,KAAK,gBAAgB,KAAK,MAAM;AAClF,UAAI,QAAQ,KAAY,IAAI,SAAS;AAAA,IACzC;AAEA,UAAM,iBAAiB,YAAY;AACnC,aAAS,IAAI,GAAG,IAAI,eAAe,QAAQ,EAAE,GAAG;AAC5C,YAAM,WAAW,eAAe,CAAC;AACjC,YAAM,QAAQ,SAAS,SAAS,WAAW;AAC3C,YAAM,KAAK,UAAU,QAAQ,CAAC,SAAS,QAAQ,GAAG,KAAK,gBAAgB,KAAK,MAAM;AAClF,UAAI,QAAQ,KAAY,IAAI,SAAS;AAAA,IACzC;AAEA,QAAI,YAAY,UAAU,OAAO,SAAS,GAAG;AACzC,YAAM,YAAY,eAAe,YAAY,SAAS,EAAE;AACxD,kBAAY,UAAU,aAAa;AAAA,QAC/B,IAAI,UAAU,WAAW;AAAA,QACzB,KAAK,UAAU,MAAM;AAAA,MACzB;AACA,YAAM,UAAU,IAAI;AACpB,kBAAY,UAAU,OAAO,QAAQ,WAAS;AAC1C,QAAC,MAAc,UAAU;AAAA,MAC7B,CAAC;AACD,WAAK,SAAS,KAAK,YAAY,SAAS;AAAA,IAC5C;AAEA,WAAO,QAAQ,QAAQ,GAAG;AAAA,EAC9B;AACJ;","names":[]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"33de6f28eb18f7d6adba3216a2b63a1fe81d29b3"},"/home/runner/work/pluto-encrypted/pluto-encrypted/packages/iagon/src/IagonStorage/internals.ts":{"path":"/home/runner/work/pluto-encrypted/pluto-encrypted/packages/iagon/src/IagonStorage/internals.ts","statementMap":{"0":{"start":{"line":6,"column":4},"end":{"line":6,"column":29}},"1":{"start":{"line":7,"column":4},"end":{"line":7,"column":45}},"2":{"start":{"line":8,"column":4},"end":{"line":8,"column":40}},"3":{"start":{"line":11,"column":4},"end":{"line":19,"column":7}},"4":{"start":{"line":12,"column":6},"end":{"line":17,"column":7}},"5":{"start":{"line":13,"column":22},"end":{"line":13,"column":96}},"6":{"start":{"line":13,"column":54},"end":{"line":13,"column":95}},"7":{"start":{"line":14,"column":8},"end":{"line":16,"column":9}},"8":{"start":{"line":15,"column":10},"end":{"line":15,"column":23}},"9":{"start":{"line":18,"column":6},"end":{"line":18,"column":65}},"10":{"start":{"line":22,"column":28},"end":{"line":22,"column":59}},"11":{"start":{"line":23,"column":4},"end":{"line":25,"column":5}},"12":{"start":{"line":24,"column":6},"end":{"line":24,"column":54}},"13":{"start":{"line":28,"column":4},"end":{"line":68,"column":5}},"14":{"start":{"line":29,"column":6},"end":{"line":32,"column":7}},"15":{"start":{"line":30,"column":28},"end":{"line":30,"column":67}},"16":{"start":{"line":31,"column":8},"end":{"line":31,"column":44}},"17":{"start":{"line":33,"column":6},"end":{"line":42,"column":7}},"18":{"start":{"line":34,"column":28},"end":{"line":34,"column":84}},"19":{"start":{"line":35,"column":35},"end":{"line":35,"column":143}},"20":{"start":{"line":35,"column":92},"end":{"line":35,"column":135}},"21":{"start":{"line":36,"column":8},"end":{"line":41,"column":9}},"22":{"start":{"line":37,"column":10},"end":{"line":37,"column":55}},"23":{"start":{"line":39,"column":31},"end":{"line":39,"column":136}},"24":{"start":{"line":40,"column":10},"end":{"line":40,"column":49}},"25":{"start":{"line":43,"column":32},"end":{"line":43,"column":90}},"26":{"start":{"line":44,"column":27},"end":{"line":44,"column":142}},"27":{"start":{"line":44,"column":96},"end":{"line":44,"column":134}},"28":{"start":{"line":45,"column":24},"end":{"line":45,"column":136}},"29":{"start":{"line":45,"column":93},"end":{"line":45,"column":128}},"30":{"start":{"line":46,"column":6},"end":{"line":55,"column":7}},"31":{"start":{"line":47,"column":8},"end":{"line":54,"column":9}},"32":{"start":{"line":48,"column":10},"end":{"line":48,"column":44}},"33":{"start":{"line":50,"column":10},"end":{"line":53,"column":13}},"34":{"start":{"line":56,"column":6},"end":{"line":65,"column":7}},"35":{"start":{"line":57,"column":8},"end":{"line":64,"column":9}},"36":{"start":{"line":58,"column":10},"end":{"line":58,"column":40}},"37":{"start":{"line":60,"column":10},"end":{"line":63,"column":13}},"38":{"start":{"line":67,"column":6},"end":{"line":67,"column":33}},"39":{"start":{"line":71,"column":4},"end":{"line":71,"column":47}},"40":{"start":{"line":74,"column":20},"end":{"line":74,"column":44}},"41":{"start":{"line":75,"column":4},"end":{"line":75,"column":32}},"42":{"start":{"line":76,"column":4},"end":{"line":76,"column":78}},"43":{"start":{"line":79,"column":21},"end":{"line":79,"column":67}},"44":{"start":{"line":80,"column":26},"end":{"line":80,"column":72}},"45":{"start":{"line":80,"column":52},"end":{"line":80,"column":71}},"46":{"start":{"line":81,"column":4},"end":{"line":83,"column":5}},"47":{"start":{"line":82,"column":6},"end":{"line":82,"column":42}},"48":{"start":{"line":86,"column":25},"end":{"line":86,"column":55}},"49":{"start":{"line":87,"column":27},"end":{"line":87,"column":84}},"50":{"start":{"line":88,"column":26},"end":{"line":88,"column":66}},"51":{"start":{"line":89,"column":23},"end":{"line":91,"column":6}},"52":{"start":{"line":90,"column":40},"end":{"line":90,"column":55}},"53":{"start":{"line":92,"column":4},"end":{"line":92,"column":90}},"54":{"start":{"line":95,"column":18},"end":{"line":95,"column":64}},"55":{"start":{"line":96,"column":22},"end":{"line":98,"column":6}},"56":{"start":{"line":97,"column":6},"end":{"line":97,"column":31}},"57":{"start":{"line":99,"column":4},"end":{"line":101,"column":5}},"58":{"start":{"line":100,"column":6},"end":{"line":100,"column":18}},"59":{"start":{"line":102,"column":25},"end":{"line":102,"column":68}},"60":{"start":{"line":103,"column":25},"end":{"line":103,"column":73}},"61":{"start":{"line":104,"column":4},"end":{"line":104,"column":24}},"62":{"start":{"line":107,"column":26},"end":{"line":107,"column":107}},"63":{"start":{"line":108,"column":27},"end":{"line":108,"column":48}},"64":{"start":{"line":109,"column":4},"end":{"line":129,"column":5}},"65":{"start":{"line":110,"column":27},"end":{"line":110,"column":40}},"66":{"start":{"line":111,"column":17},"end":{"line":111,"column":49}},"67":{"start":{"line":112,"column":6},"end":{"line":128,"column":7}},"68":{"start":{"line":113,"column":8},"end":{"line":116,"column":9}},"69":{"start":{"line":114,"column":32},"end":{"line":114,"column":82}},"70":{"start":{"line":115,"column":10},"end":{"line":115,"column":56}},"71":{"start":{"line":117,"column":8},"end":{"line":117,"column":79}},"72":{"start":{"line":118,"column":8},"end":{"line":118,"column":48}},"73":{"start":{"line":119,"column":8},"end":{"line":119,"column":33}},"74":{"start":{"line":121,"column":8},"end":{"line":124,"column":9}},"75":{"start":{"line":122,"column":32},"end":{"line":122,"column":82}},"76":{"start":{"line":123,"column":10},"end":{"line":123,"column":52}},"77":{"start":{"line":125,"column":8},"end":{"line":125,"column":75}},"78":{"start":{"line":126,"column":8},"end":{"line":126,"column":44}},"79":{"start":{"line":127,"column":8},"end":{"line":127,"column":36}},"80":{"start":{"line":132,"column":23},"end":{"line":132,"column":70}},"81":{"start":{"line":133,"column":27},"end":{"line":133,"column":78}},"82":{"start":{"line":134,"column":23},"end":{"line":136,"column":6}},"83":{"start":{"line":135,"column":6},"end":{"line":135,"column":47}},"84":{"start":{"line":137,"column":4},"end":{"line":139,"column":5}},"85":{"start":{"line":138,"column":6},"end":{"line":138,"column":16}},"86":{"start":{"line":140,"column":26},"end":{"line":140,"column":70}},"87":{"start":{"line":141,"column":23},"end":{"line":141,"column":72}},"88":{"start":{"line":142,"column":4},"end":{"line":142,"column":22}},"89":{"start":{"line":145,"column":25},"end":{"line":145,"column":55}},"90":{"start":{"line":146,"column":27},"end":{"line":146,"column":84}},"91":{"start":{"line":147,"column":26},"end":{"line":147,"column":66}},"92":{"start":{"line":148,"column":23},"end":{"line":151,"column":8}},"93":{"start":{"line":152,"column":4},"end":{"line":152,"column":90}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":5,"column":2},"end":{"line":5,"column":3}},"loc":{"start":{"line":5,"column":40},"end":{"line":9,"column":3}},"line":5},"1":{"name":"(anonymous_1)","decl":{"start":{"line":10,"column":2},"end":{"line":10,"column":3}},"loc":{"start":{"line":10,"column":37},"end":{"line":20,"column":3}},"line":10},"2":{"name":"(anonymous_2)","decl":{"start":{"line":11,"column":42},"end":{"line":11,"column":43}},"loc":{"start":{"line":11,"column":59},"end":{"line":19,"column":5}},"line":11},"3":{"name":"(anonymous_3)","decl":{"start":{"line":13,"column":39},"end":{"line":13,"column":40}},"loc":{"start":{"line":13,"column":54},"end":{"line":13,"column":95}},"line":13},"4":{"name":"(anonymous_4)","decl":{"start":{"line":21,"column":2},"end":{"line":21,"column":3}},"loc":{"start":{"line":21,"column":24},"end":{"line":26,"column":3}},"line":21},"5":{"name":"(anonymous_5)","decl":{"start":{"line":27,"column":2},"end":{"line":27,"column":3}},"loc":{"start":{"line":27,"column":51},"end":{"line":69,"column":3}},"line":27},"6":{"name":"(anonymous_6)","decl":{"start":{"line":35,"column":77},"end":{"line":35,"column":78}},"loc":{"start":{"line":35,"column":92},"end":{"line":35,"column":135}},"line":35},"7":{"name":"(anonymous_7)","decl":{"start":{"line":44,"column":81},"end":{"line":44,"column":82}},"loc":{"start":{"line":44,"column":96},"end":{"line":44,"column":134}},"line":44},"8":{"name":"(anonymous_8)","decl":{"start":{"line":45,"column":78},"end":{"line":45,"column":79}},"loc":{"start":{"line":45,"column":93},"end":{"line":45,"column":128}},"line":45},"9":{"name":"(anonymous_9)","decl":{"start":{"line":70,"column":2},"end":{"line":70,"column":3}},"loc":{"start":{"line":70,"column":16},"end":{"line":72,"column":3}},"line":70},"10":{"name":"(anonymous_10)","decl":{"start":{"line":73,"column":2},"end":{"line":73,"column":3}},"loc":{"start":{"line":73,"column":32},"end":{"line":77,"column":3}},"line":73},"11":{"name":"(anonymous_11)","decl":{"start":{"line":78,"column":2},"end":{"line":78,"column":3}},"loc":{"start":{"line":78,"column":25},"end":{"line":84,"column":3}},"line":78},"12":{"name":"(anonymous_12)","decl":{"start":{"line":80,"column":42},"end":{"line":80,"column":43}},"loc":{"start":{"line":80,"column":52},"end":{"line":80,"column":71}},"line":80},"13":{"name":"(anonymous_13)","decl":{"start":{"line":85,"column":2},"end":{"line":85,"column":3}},"loc":{"start":{"line":85,"column":42},"end":{"line":93,"column":3}},"line":85},"14":{"name":"(anonymous_14)","decl":{"start":{"line":90,"column":29},"end":{"line":90,"column":30}},"loc":{"start":{"line":90,"column":40},"end":{"line":90,"column":55}},"line":90},"15":{"name":"(anonymous_15)","decl":{"start":{"line":94,"column":2},"end":{"line":94,"column":3}},"loc":{"start":{"line":94,"column":17},"end":{"line":105,"column":3}},"line":94},"16":{"name":"(anonymous_16)","decl":{"start":{"line":96,"column":33},"end":{"line":96,"column":34}},"loc":{"start":{"line":96,"column":43},"end":{"line":98,"column":5}},"line":96},"17":{"name":"(anonymous_17)","decl":{"start":{"line":106,"column":2},"end":{"line":106,"column":3}},"loc":{"start":{"line":106,"column":47},"end":{"line":130,"column":3}},"line":106},"18":{"name":"(anonymous_18)","decl":{"start":{"line":131,"column":2},"end":{"line":131,"column":3}},"loc":{"start":{"line":131,"column":22},"end":{"line":143,"column":3}},"line":131},"19":{"name":"(anonymous_19)","decl":{"start":{"line":134,"column":49},"end":{"line":134,"column":50}},"loc":{"start":{"line":134,"column":64},"end":{"line":136,"column":5}},"line":134},"20":{"name":"(anonymous_20)","decl":{"start":{"line":144,"column":2},"end":{"line":144,"column":3}},"loc":{"start":{"line":144,"column":38},"end":{"line":153,"column":3}},"line":144}},"branchMap":{"0":{"loc":{"start":{"line":5,"column":26},"end":{"line":5,"column":38}},"type":"default-arg","locations":[{"start":{"line":5,"column":37},"end":{"line":5,"column":38}}],"line":5},"1":{"loc":{"start":{"line":12,"column":6},"end":{"line":17,"column":7}},"type":"if","locations":[{"start":{"line":12,"column":6},"end":{"line":17,"column":7}},{"start":{},"end":{}}],"line":12},"2":{"loc":{"start":{"line":14,"column":8},"end":{"line":16,"column":9}},"type":"if","locations":[{"start":{"line":14,"column":8},"end":{"line":16,"column":9}},{"start":{},"end":{}}],"line":14},"3":{"loc":{"start":{"line":29,"column":6},"end":{"line":32,"column":7}},"type":"if","locations":[{"start":{"line":29,"column":6},"end":{"line":32,"column":7}},{"start":{},"end":{}}],"line":29},"4":{"loc":{"start":{"line":33,"column":6},"end":{"line":42,"column":7}},"type":"if","locations":[{"start":{"line":33,"column":6},"end":{"line":42,"column":7}},{"start":{},"end":{}}],"line":33},"5":{"loc":{"start":{"line":35,"column":35},"end":{"line":35,"column":143}},"type":"cond-expr","locations":[{"start":{"line":35,"column":60},"end":{"line":35,"column":136}},{"start":{"line":35,"column":139},"end":{"line":35,"column":143}}],"line":35},"6":{"loc":{"start":{"line":36,"column":8},"end":{"line":41,"column":9}},"type":"if","locations":[{"start":{"line":36,"column":8},"end":{"line":41,"column":9}},{"start":{"line":38,"column":15},"end":{"line":41,"column":9}}],"line":36},"7":{"loc":{"start":{"line":44,"column":27},"end":{"line":44,"column":142}},"type":"cond-expr","locations":[{"start":{"line":44,"column":58},"end":{"line":44,"column":135}},{"start":{"line":44,"column":138},"end":{"line":44,"column":142}}],"line":44},"8":{"loc":{"start":{"line":45,"column":24},"end":{"line":45,"column":136}},"type":"cond-expr","locations":[{"start":{"line":45,"column":55},"end":{"line":45,"column":129}},{"start":{"line":45,"column":132},"end":{"line":45,"column":136}}],"line":45},"9":{"loc":{"start":{"line":46,"column":6},"end":{"line":55,"column":7}},"type":"if","locations":[{"start":{"line":46,"column":6},"end":{"line":55,"column":7}},{"start":{},"end":{}}],"line":46},"10":{"loc":{"start":{"line":47,"column":8},"end":{"line":54,"column":9}},"type":"if","locations":[{"start":{"line":47,"column":8},"end":{"line":54,"column":9}},{"start":{"line":49,"column":15},"end":{"line":54,"column":9}}],"line":47},"11":{"loc":{"start":{"line":56,"column":6},"end":{"line":65,"column":7}},"type":"if","locations":[{"start":{"line":56,"column":6},"end":{"line":65,"column":7}},{"start":{},"end":{}}],"line":56},"12":{"loc":{"start":{"line":57,"column":8},"end":{"line":64,"column":9}},"type":"if","locations":[{"start":{"line":57,"column":8},"end":{"line":64,"column":9}},{"start":{"line":59,"column":15},"end":{"line":64,"column":9}}],"line":57},"13":{"loc":{"start":{"line":99,"column":4},"end":{"line":101,"column":5}},"type":"if","locations":[{"start":{"line":99,"column":4},"end":{"line":101,"column":5}},{"start":{},"end":{}}],"line":99},"14":{"loc":{"start":{"line":107,"column":26},"end":{"line":107,"column":107}},"type":"cond-expr","locations":[{"start":{"line":107,"column":66},"end":{"line":107,"column":83}},{"start":{"line":107,"column":86},"end":{"line":107,"column":107}}],"line":107},"15":{"loc":{"start":{"line":112,"column":6},"end":{"line":128,"column":7}},"type":"if","locations":[{"start":{"line":112,"column":6},"end":{"line":128,"column":7}},{"start":{"line":120,"column":13},"end":{"line":128,"column":7}}],"line":112},"16":{"loc":{"start":{"line":137,"column":4},"end":{"line":139,"column":5}},"type":"if","locations":[{"start":{"line":137,"column":4},"end":{"line":139,"column":5}},{"start":{},"end":{}}],"line":137}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0},"b":{"0":[0],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0]},"inputSourceMap":{"version":3,"sources":["/home/runner/work/pluto-encrypted/pluto-encrypted/packages/iagon/src/IagonStorage/internals.ts"],"sourcesContent":["import {\n RxDocumentData,\n RxDocumentDataById,\n RxJsonSchema\n} from \"rxdb\";\nimport { IagonAPI } from \"./api\";\nimport { IagonFolder, IagonInternalParameters, IagonStorageInternals } from \"./types\";\nimport { getPrivateKeyValue, safeIndexList } from \"@pluto-encrypted/shared\";\n\n\nexport class IagonInternals implements IagonStorageInternals {\n public __databaseFolder!: IagonFolder;\n public __collectionFolder!: IagonFolder;\n public __indexFolder!: IagonFolder;\n public __dataFolder!: IagonFolder;\n public indexes: Map = new Map()\n\n public sdk: IagonAPI;\n\n\n constructor(parameters: IagonInternalParameters, public refCount: number = 0) {\n this.sdk = new IagonAPI(parameters)\n }\n\n async getDBDirectory(databaseName: string) {\n return this.sdk.getDirectories().then((directories) => {\n if (directories.length > 0) {\n const found = directories.find((directory) => directory.directory_name === databaseName)\n if (found) {\n return found;\n }\n }\n return this.sdk.createDirectory({ dirName: databaseName });\n })\n }\n\n private async resetDatabase() {\n const rootDirectories = await this.sdk.getDirectories();\n for (let directory of rootDirectories) {\n await this.sdk.removeDirectory(directory, true)\n }\n }\n\n async initialiseDB(databaseName: string, collectionName: string) {\n try {\n if (!this.__databaseFolder) {\n const databaseDir = await this.getDBDirectory(databaseName);\n this.__databaseFolder = databaseDir;\n }\n\n if (!this.__collectionFolder) {\n const collections = await this.sdk.getDirectories(this.__databaseFolder._id);\n const __collectionFolder = collections.length > 0 ? collections.find((directory) => directory.directory_name === collectionName) : null;\n\n if (__collectionFolder) {\n this.__collectionFolder = __collectionFolder;\n } else {\n const newDirectory = await this.sdk.createDirectory({ parentDirectoryId: this.__databaseFolder._id, dirName: collectionName })\n this.__collectionFolder = newDirectory\n }\n }\n\n const collectionFolders = await this.sdk.getDirectories(this.__collectionFolder._id);\n const indexesFound = collectionFolders.length > 0 ? collectionFolders.find((directory) => directory.directory_name === \"indexes\") : null;\n const dataFound = collectionFolders.length > 0 ? collectionFolders.find((directory) => directory.directory_name === \"data\") : null;\n\n if (!this.__indexFolder) {\n if (indexesFound) {\n this.__indexFolder = indexesFound;\n } else {\n this.__indexFolder = await this.sdk.createDirectory({\n parentDirectoryId: this.__collectionFolder._id,\n dirName: 'indexes'\n })\n }\n }\n\n if (!this.__dataFolder) {\n if (dataFound) {\n this.__dataFolder = dataFound;\n } else {\n this.__dataFolder = await this.sdk.createDirectory({\n parentDirectoryId: this.__collectionFolder._id,\n dirName: 'data'\n })\n }\n }\n\n\n } catch (err) {\n return Promise.reject(err)\n }\n }\n\n\n bulkGet(keys: string[]): Promise> {\n throw new Error(\"Method not implemented.\");\n }\n async addDoc(docId: string, document: RxDocumentData): Promise {\n const jsonDoc = JSON.stringify(document)\n await this.removeDoc(docId)\n await this.sdk.uploadFile(this.__dataFolder, docId, Buffer.from(jsonDoc))\n }\n async removeDoc(docId: string): Promise {\n const allFiles = await this.sdk.getFiles(this.__dataFolder._id);\n const matchingFiles = allFiles.filter((file) => file.name === docId)\n for (let file of matchingFiles) {\n await this.sdk.removeFile(file._id)\n }\n }\n async removeFromIndex(indexName: string, docId: string): Promise {\n const currentIndex = await this.getIndex(indexName)\n const cleanIndexPath = indexName.replace(/\\[(.*)\\]/g, \"$1\").split(\"+\").join(\"/\");\n const indexFilename = `${cleanIndexPath.split(\"/\").join(\"_\")}`;\n const jsonString = JSON.stringify([\n ...currentIndex.filter((index) => index !== docId),\n ])\n await this.sdk.uploadFile(this.__indexFolder, indexFilename, Buffer.from(jsonString))\n }\n async get(key: string): Promise | null> {\n const files = await this.sdk.getFiles(this.__dataFolder._id);\n const fileFound = files.find((file) => {\n return file.name === key;\n })\n if (!fileFound) {\n return null;\n }\n const fileContents = await this.sdk.getFile({ file: fileFound })\n const jsonDocument: RxDocumentData = JSON.parse(Buffer.from(fileContents).toString());\n return jsonDocument\n }\n async bulkPut(items: RxDocumentData[], collectionName: string, schema: RxJsonSchema>): Promise {\n const primaryKeyKey = typeof schema.primaryKey === 'string' ? schema.primaryKey : schema.primaryKey.key\n const saferIndexList = safeIndexList(schema)\n for (const item of items) {\n const shouldDelete = item._deleted\n const id = getPrivateKeyValue(item, schema)\n if (shouldDelete) {\n for (const requiredIndexes of saferIndexList) {\n const requiredIndex = `[${collectionName}+${requiredIndexes.join('+')}]`\n await this.removeFromIndex(requiredIndex, id)\n }\n await this.removeFromIndex(`[${collectionName}+${primaryKeyKey}]`, id)\n await this.removeFromIndex('[all]', id)\n await this.removeDoc(id)\n } else {\n for (const requiredIndexes of saferIndexList) {\n const requiredIndex = `[${collectionName}+${requiredIndexes.join('+')}]`\n await this.updateIndex(requiredIndex, id)\n }\n await this.updateIndex(`[${collectionName}+${primaryKeyKey}]`, id)\n await this.updateIndex('[all]', id)\n await this.addDoc(id, item)\n }\n }\n }\n\n async getIndex(key: string): Promise {\n const indexFiles = await this.sdk.getFiles(this.__indexFolder._id);\n const cleanIndexPath = key.replace(/\\[(.*)\\]/g, \"$1\").split(\"+\").join(\"_\");\n const indexFound = indexFiles.reverse().find((indexFile) => {\n return indexFile.name === cleanIndexPath\n });\n if (!indexFound) {\n return [];\n }\n const indexContents = await this.sdk.getFile({ file: indexFound })\n const jsonParsed: string[] = JSON.parse(Buffer.from(indexContents).toString())\n return jsonParsed\n }\n\n async updateIndex(indexName: string, docId: string) {\n const currentIndex = await this.getIndex(indexName)\n const cleanIndexPath = indexName.replace(/\\[(.*)\\]/g, \"$1\").split(\"+\").join(\"/\");\n const indexFilename = `${cleanIndexPath.split(\"/\").join(\"_\")}`;\n const jsonString = JSON.stringify(Array.from(new Set([\n ...currentIndex,\n docId\n ])))\n await this.sdk.uploadFile(this.__indexFolder, indexFilename, Buffer.from(jsonString))\n }\n\n}\n"],"mappings":";AAKA,SAAS,gBAAgB;AAEzB,SAAS,oBAAoB,qBAAqB;AAG3C,aAAM,eAAsE;AAAA,EAU/E,YAAY,YAA4C,WAAmB,GAAG;AAAtB;AALxD,SAAO,UAAoC,oBAAI,IAAI;AAM/C,SAAK,MAAM,IAAI,SAAS,UAAU;AAAA,EACtC;AAAA,EAEA,MAAM,eAAe,cAAsB;AACvC,WAAO,KAAK,IAAI,eAAe,EAAE,KAAK,CAAC,gBAAgB;AACnD,UAAI,YAAY,SAAS,GAAG;AACxB,cAAM,QAAQ,YAAY,KAAK,CAAC,cAAc,UAAU,mBAAmB,YAAY;AACvF,YAAI,OAAO;AACP,iBAAO;AAAA,QACX;AAAA,MACJ;AACA,aAAO,KAAK,IAAI,gBAAgB,EAAE,SAAS,aAAa,CAAC;AAAA,IAC7D,CAAC;AAAA,EACL;AAAA,EAEA,MAAc,gBAAgB;AAC1B,UAAM,kBAAkB,MAAM,KAAK,IAAI,eAAe;AACtD,aAAS,aAAa,iBAAiB;AACnC,YAAM,KAAK,IAAI,gBAAgB,WAAW,IAAI;AAAA,IAClD;AAAA,EACJ;AAAA,EAEA,MAAM,aAAa,cAAsB,gBAAwB;AAC7D,QAAI;AACA,UAAI,CAAC,KAAK,kBAAkB;AACxB,cAAM,cAAc,MAAM,KAAK,eAAe,YAAY;AAC1D,aAAK,mBAAmB;AAAA,MAC5B;AAEA,UAAI,CAAC,KAAK,oBAAoB;AAC1B,cAAM,cAAc,MAAM,KAAK,IAAI,eAAe,KAAK,iBAAiB,GAAG;AAC3E,cAAM,qBAAqB,YAAY,SAAS,IAAI,YAAY,KAAK,CAAC,cAAc,UAAU,mBAAmB,cAAc,IAAI;AAEnI,YAAI,oBAAoB;AACpB,eAAK,qBAAqB;AAAA,QAC9B,OAAO;AACH,gBAAM,eAAe,MAAM,KAAK,IAAI,gBAAgB,EAAE,mBAAmB,KAAK,iBAAiB,KAAK,SAAS,eAAe,CAAC;AAC7H,eAAK,qBAAqB;AAAA,QAC9B;AAAA,MACJ;AAEA,YAAM,oBAAoB,MAAM,KAAK,IAAI,eAAe,KAAK,mBAAmB,GAAG;AACnF,YAAM,eAAe,kBAAkB,SAAS,IAAI,kBAAkB,KAAK,CAAC,cAAc,UAAU,mBAAmB,SAAS,IAAI;AACpI,YAAM,YAAY,kBAAkB,SAAS,IAAI,kBAAkB,KAAK,CAAC,cAAc,UAAU,mBAAmB,MAAM,IAAI;AAE9H,UAAI,CAAC,KAAK,eAAe;AACrB,YAAI,cAAc;AACd,eAAK,gBAAgB;AAAA,QACzB,OAAO;AACH,eAAK,gBAAgB,MAAM,KAAK,IAAI,gBAAgB;AAAA,YAChD,mBAAmB,KAAK,mBAAmB;AAAA,YAC3C,SAAS;AAAA,UACb,CAAC;AAAA,QACL;AAAA,MACJ;AAEA,UAAI,CAAC,KAAK,cAAc;AACpB,YAAI,WAAW;AACX,eAAK,eAAe;AAAA,QACxB,OAAO;AACH,eAAK,eAAe,MAAM,KAAK,IAAI,gBAAgB;AAAA,YAC/C,mBAAmB,KAAK,mBAAmB;AAAA,YAC3C,SAAS;AAAA,UACb,CAAC;AAAA,QACL;AAAA,MACJ;AAAA,IAGJ,SAAS,KAAK;AACV,aAAO,QAAQ,OAAO,GAAG;AAAA,IAC7B;AAAA,EACJ;AAAA,EAGA,QAAQ,MAAwD;AAC5D,UAAM,IAAI,MAAM,yBAAyB;AAAA,EAC7C;AAAA,EACA,MAAM,OAAO,OAAe,UAAoD;AAC5E,UAAM,UAAU,KAAK,UAAU,QAAQ;AACvC,UAAM,KAAK,UAAU,KAAK;AAC1B,UAAM,KAAK,IAAI,WAAW,KAAK,cAAc,OAAO,OAAO,KAAK,OAAO,CAAC;AAAA,EAC5E;AAAA,EACA,MAAM,UAAU,OAA8B;AAC1C,UAAM,WAAW,MAAM,KAAK,IAAI,SAAS,KAAK,aAAa,GAAG;AAC9D,UAAM,gBAAgB,SAAS,OAAO,CAAC,SAAS,KAAK,SAAS,KAAK;AACnE,aAAS,QAAQ,eAAe;AAC5B,YAAM,KAAK,IAAI,WAAW,KAAK,GAAG;AAAA,IACtC;AAAA,EACJ;AAAA,EACA,MAAM,gBAAgB,WAAmB,OAA8B;AACnE,UAAM,eAAe,MAAM,KAAK,SAAS,SAAS;AAClD,UAAM,iBAAiB,UAAU,QAAQ,aAAa,IAAI,EAAE,MAAM,GAAG,EAAE,KAAK,GAAG;AAC/E,UAAM,gBAAgB,GAAG,eAAe,MAAM,GAAG,EAAE,KAAK,GAAG,CAAC;AAC5D,UAAM,aAAa,KAAK,UAAU;AAAA,MAC9B,GAAG,aAAa,OAAO,CAAC,UAAU,UAAU,KAAK;AAAA,IACrD,CAAC;AACD,UAAM,KAAK,IAAI,WAAW,KAAK,eAAe,eAAe,OAAO,KAAK,UAAU,CAAC;AAAA,EACxF;AAAA,EACA,MAAM,IAAI,KAAwD;AAC9D,UAAM,QAAQ,MAAM,KAAK,IAAI,SAAS,KAAK,aAAa,GAAG;AAC3D,UAAM,YAAY,MAAM,KAAK,CAAC,SAAS;AACnC,aAAO,KAAK,SAAS;AAAA,IACzB,CAAC;AACD,QAAI,CAAC,WAAW;AACZ,aAAO;AAAA,IACX;AACA,UAAM,eAAe,MAAM,KAAK,IAAI,QAAQ,EAAE,MAAM,UAAU,CAAC;AAC/D,UAAM,eAA0C,KAAK,MAAM,OAAO,KAAK,YAAY,EAAE,SAAS,CAAC;AAC/F,WAAO;AAAA,EACX;AAAA,EACA,MAAM,QAAQ,OAAoC,gBAAwB,QAAgE;AACtI,UAAM,gBAAgB,OAAO,OAAO,eAAe,WAAW,OAAO,aAAa,OAAO,WAAW;AACpG,UAAM,iBAAiB,cAAc,MAAM;AAC3C,eAAW,QAAQ,OAAO;AACtB,YAAM,eAAe,KAAK;AAC1B,YAAM,KAAK,mBAAmB,MAAM,MAAM;AAC1C,UAAI,cAAc;AACd,mBAAW,mBAAmB,gBAAgB;AAC1C,gBAAM,gBAAgB,IAAI,cAAc,IAAI,gBAAgB,KAAK,GAAG,CAAC;AACrE,gBAAM,KAAK,gBAAgB,eAAe,EAAE;AAAA,QAChD;AACA,cAAM,KAAK,gBAAgB,IAAI,cAAc,IAAI,aAAa,KAAK,EAAE;AACrE,cAAM,KAAK,gBAAgB,SAAS,EAAE;AACtC,cAAM,KAAK,UAAU,EAAE;AAAA,MAC3B,OAAO;AACH,mBAAW,mBAAmB,gBAAgB;AAC1C,gBAAM,gBAAgB,IAAI,cAAc,IAAI,gBAAgB,KAAK,GAAG,CAAC;AACrE,gBAAM,KAAK,YAAY,eAAe,EAAE;AAAA,QAC5C;AACA,cAAM,KAAK,YAAY,IAAI,cAAc,IAAI,aAAa,KAAK,EAAE;AACjE,cAAM,KAAK,YAAY,SAAS,EAAE;AAClC,cAAM,KAAK,OAAO,IAAI,IAAI;AAAA,MAC9B;AAAA,IACJ;AAAA,EACJ;AAAA,EAEA,MAAM,SAAS,KAAgC;AAC3C,UAAM,aAAa,MAAM,KAAK,IAAI,SAAS,KAAK,cAAc,GAAG;AACjE,UAAM,iBAAiB,IAAI,QAAQ,aAAa,IAAI,EAAE,MAAM,GAAG,EAAE,KAAK,GAAG;AACzE,UAAM,aAAa,WAAW,QAAQ,EAAE,KAAK,CAAC,cAAc;AACxD,aAAO,UAAU,SAAS;AAAA,IAC9B,CAAC;AACD,QAAI,CAAC,YAAY;AACb,aAAO,CAAC;AAAA,IACZ;AACA,UAAM,gBAAgB,MAAM,KAAK,IAAI,QAAQ,EAAE,MAAM,WAAW,CAAC;AACjE,UAAM,aAAuB,KAAK,MAAM,OAAO,KAAK,aAAa,EAAE,SAAS,CAAC;AAC7E,WAAO;AAAA,EACX;AAAA,EAEA,MAAM,YAAY,WAAmB,OAAe;AAChD,UAAM,eAAe,MAAM,KAAK,SAAS,SAAS;AAClD,UAAM,iBAAiB,UAAU,QAAQ,aAAa,IAAI,EAAE,MAAM,GAAG,EAAE,KAAK,GAAG;AAC/E,UAAM,gBAAgB,GAAG,eAAe,MAAM,GAAG,EAAE,KAAK,GAAG,CAAC;AAC5D,UAAM,aAAa,KAAK,UAAU,MAAM,KAAK,oBAAI,IAAI;AAAA,MACjD,GAAG;AAAA,MACH;AAAA,IACJ,CAAC,CAAC,CAAC;AACH,UAAM,KAAK,IAAI,WAAW,KAAK,eAAe,eAAe,OAAO,KAAK,UAAU,CAAC;AAAA,EACxF;AAEJ;","names":[]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"81c19842fad2999ea2ac4f6177c8fec11e25195e"},"/home/runner/work/pluto-encrypted/pluto-encrypted/packages/iagon/src/IagonStorage/index.ts":{"path":"/home/runner/work/pluto-encrypted/pluto-encrypted/packages/iagon/src/IagonStorage/index.ts","statementMap":{"0":{"start":{"line":8,"column":4},"end":{"line":8,"column":29}},"1":{"start":{"line":9,"column":4},"end":{"line":9,"column":24}},"2":{"start":{"line":10,"column":4},"end":{"line":10,"column":43}},"3":{"start":{"line":11,"column":4},"end":{"line":11,"column":54}},"4":{"start":{"line":12,"column":4},"end":{"line":12,"column":22}},"5":{"start":{"line":15,"column":4},"end":{"line":17,"column":5}},"6":{"start":{"line":16,"column":6},"end":{"line":16,"column":118}},"7":{"start":{"line":18,"column":4},"end":{"line":18,"column":20}},"8":{"start":{"line":19,"column":22},"end":{"line":19,"column":70}},"9":{"start":{"line":20,"column":4},"end":{"line":20,"column":77}},"10":{"start":{"line":21,"column":4},"end":{"line":27,"column":6}},"11":{"start":{"line":31,"column":18},"end":{"line":31,"column":46}},"12":{"start":{"line":32,"column":2},"end":{"line":34,"column":5}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":7,"column":2},"end":{"line":7,"column":3}},"loc":{"start":{"line":7,"column":24},"end":{"line":13,"column":3}},"line":7},"1":{"name":"(anonymous_1)","decl":{"start":{"line":14,"column":2},"end":{"line":14,"column":3}},"loc":{"start":{"line":14,"column":38},"end":{"line":28,"column":3}},"line":14},"2":{"name":"createIagonStorage","decl":{"start":{"line":30,"column":16},"end":{"line":30,"column":34}},"loc":{"start":{"line":30,"column":47},"end":{"line":35,"column":1}},"line":30}},"branchMap":{"0":{"loc":{"start":{"line":15,"column":4},"end":{"line":17,"column":5}},"type":"if","locations":[{"start":{"line":15,"column":4},"end":{"line":17,"column":5}},{"start":{},"end":{}}],"line":15}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0},"f":{"0":0,"1":0,"2":0},"b":{"0":[0,0]},"inputSourceMap":{"version":3,"sources":["/home/runner/work/pluto-encrypted/pluto-encrypted/packages/iagon/src/IagonStorage/index.ts"],"sourcesContent":["/**\n * @packageDocumentation\n * @module indexdb\n * @description This is a RXDB IndexDB storage that supports encryption middleware.\n * In order to use this in your pluto-encrypted database you must write the following code:\n * Creating a IndexDB compatible storage is very simple.\n * \n * ```typescript\n * import IndexDB from \"@pluto-encrypted/indexdb\";\n * import { Database } from \"@pluto-encrypted/database\";\n * //default password must be 32 bytes long\n * const defaultPassword = new Uint8Array(32).fill(1);\n * const database = db = await Database.createEncrypted({\n * name: `my-db`,\n * encryptionKey: defaultPassword,\n * storage: IndexDB,\n * });\n * ```\n *\n */\n\nimport { wrappedKeyEncryptionStorage } from '@pluto-encrypted/encryption'\nimport { RxStorage, RxStorageDefaultStatics, RxStorageInstanceCreationParams, newRxError } from 'rxdb'\n\nimport { IagonStorageInstance } from './instance'\nimport { IagonInternalParameters, IagonStorageInternals } from './types'\nimport { IagonInternals } from './internals'\n\nclass IagonStorage<\n RxDocType,\n>{\n public name = \"iagon\"\n public statics = RxStorageDefaultStatics;\n public internalInstance: Map> = new Map()\n public refCount = 0;\n\n constructor(\n private settings: IagonInternalParameters,\n ) { }\n\n async createStorageInstance(params: RxStorageInstanceCreationParams) {\n if (params.schema.keyCompression) {\n throw newRxError('UT5', { args: { databaseName: params.databaseName, collectionName: params.collectionName } })\n }\n this.refCount++;\n\n const internals = new IagonInternals(this.settings, this.refCount)\n await internals.initialiseDB(params.databaseName, params.collectionName)\n\n return new IagonStorageInstance(\n params.databaseName,\n internals,\n params.options,\n params.schema,\n params.collectionName\n );\n }\n}\n\nexport function createIagonStorage(parameters: IagonInternalParameters) {\n const storage: RxStorage = new IagonStorage(parameters)\n return wrappedKeyEncryptionStorage({\n storage: storage\n });\n}\n"],"mappings":";AAqBA,SAAS,mCAAmC;AAC5C,SAAoB,yBAA0D,kBAAkB;AAEhG,SAAS,4BAA4B;AAErC,SAAS,sBAAsB;AAE/B,MAAM,aAEL;AAAA,EAMC,YACU,UACR;AADQ;AANV,SAAO,OAAO;AACd,SAAO,UAAU;AACjB,SAAO,mBAA2D,oBAAI,IAAI;AAC1E,SAAO,WAAW;AAAA,EAId;AAAA,EAEJ,MAAM,sBAAiC,QAAyD;AAC9F,QAAI,OAAO,OAAO,gBAAgB;AAChC,YAAM,WAAW,OAAO,EAAE,MAAM,EAAE,cAAc,OAAO,cAAc,gBAAgB,OAAO,eAAe,EAAE,CAAC;AAAA,IAChH;AACA,SAAK;AAEL,UAAM,YAAY,IAAI,eAAoB,KAAK,UAAU,KAAK,QAAQ;AACtE,UAAM,UAAU,aAAa,OAAO,cAAc,OAAO,cAAc;AAEvE,WAAO,IAAI;AAAA,MACT,OAAO;AAAA,MACP;AAAA,MACA,OAAO;AAAA,MACP,OAAO;AAAA,MACP,OAAO;AAAA,IACT;AAAA,EACF;AACF;AAEO,gBAAS,mBAAmB,YAAqC;AACtE,QAAM,UAA+B,IAAI,aAAkB,UAAU;AACrE,SAAO,4BAA4B;AAAA,IACjC;AAAA,EACF,CAAC;AACH;","names":[]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"4b4ee3ad8c66a5b5920913bc784a96fd056d948e"},"/home/runner/work/pluto-encrypted/pluto-encrypted/packages/iagon/src/IagonStorage/types.ts":{"path":"/home/runner/work/pluto-encrypted/pluto-encrypted/packages/iagon/src/IagonStorage/types.ts","statementMap":{"0":{"start":{"line":2,"column":40},"end":{"line":6,"column":20}},"1":{"start":{"line":3,"column":2},"end":{"line":3,"column":37}},"2":{"start":{"line":4,"column":2},"end":{"line":4,"column":35}},"3":{"start":{"line":5,"column":2},"end":{"line":5,"column":21}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":41},"end":{"line":2,"column":42}},"loc":{"start":{"line":2,"column":58},"end":{"line":6,"column":1}},"line":2}},"branchMap":{"0":{"loc":{"start":{"line":6,"column":3},"end":{"line":6,"column":19}},"type":"binary-expr","locations":[{"start":{"line":6,"column":3},"end":{"line":6,"column":13}},{"start":{"line":6,"column":17},"end":{"line":6,"column":19}}],"line":6}},"s":{"0":1,"1":1,"2":1,"3":1},"f":{"0":1},"b":{"0":[1,1]},"inputSourceMap":{"version":3,"sources":["/home/runner/work/pluto-encrypted/pluto-encrypted/packages/iagon/src/IagonStorage/types.ts"],"sourcesContent":["import { RxDocumentData, RxDocumentDataById, RxJsonSchema } from \"rxdb\"\n\n\n\nexport type IagonInternalParameters = {\n apiKey: string,\n password: Uint8Array\n}\n\nexport enum VISIBILITY {\n private = \"private\",\n public = \"public\"\n}\n\nexport type IagonFolder = {\n __v: number,\n _id: string,\n client_id: string,\n created_at: string,\n directory_name: string,\n index_listing: boolean,\n parent_directory_id: string | null,\n path: string,\n updated_at: string,\n visibility: VISIBILITY\n}\n\nexport type IagonFile = {\n __v: number,\n _id: string,\n availability: string,\n client_id: string,\n createdAt: string,\n file_size_byte_encrypted: 24,\n file_size_byte_native: 0,\n index_listing: boolean,\n name: string,\n parent_directory_id: string | null,\n path: string,\n region: string | null,\n unique_id: string,\n updated_at: string,\n visibility: VISIBILITY\n}\n\nexport type IagonResponse = {\n success: true,\n data: Data\n} | {\n success: false,\n message: string\n}\n\nexport type IagonStorageInternals = {\n __databaseFolder: IagonFolder;\n __collectionFolder: IagonFolder;\n __indexFolder: IagonFolder;\n __dataFolder: IagonFolder;\n refCount: number;\n\n getDBDirectory(databaseName: string): Promise\n initialiseDB(databaseName: string, collectionName: string): Promise\n bulkGet(keys: string[]): Promise>\n\n addDoc(docId: string, document: RxDocumentData): Promise\n removeDoc(docId: string): Promise\n removeFromIndex(indexName: string, docId: string): Promise\n get(key: string): Promise | null>\n getIndex(key: string): Promise\n updateIndex(indexName: string, docId: string): Promise\n bulkPut(items: Array>, collectionName: string, schema: Readonly>>): Promise\n}"],"mappings":";AASO,WAAK,aAAL,kBAAKA,gBAAL;AACH,EAAAA,YAAA,aAAU;AACV,EAAAA,YAAA,YAAS;AAFD,SAAAA;AAAA,GAAA;","names":["VISIBILITY"]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"25efa73b179eb51379945b8f25047f74d34de95b"},"/home/runner/work/pluto-encrypted/pluto-encrypted/packages/iagon/src/index.ts":{"path":"/home/runner/work/pluto-encrypted/pluto-encrypted/packages/iagon/src/index.ts","statementMap":{},"fnMap":{},"branchMap":{},"s":{},"f":{},"b":{},"inputSourceMap":{"version":3,"sources":["/home/runner/work/pluto-encrypted/pluto-encrypted/packages/iagon/src/index.ts"],"sourcesContent":["export * from './IagonStorage/api';\nexport * from './IagonStorage';\nexport * from './IagonStorage/instance';\nexport * from './IagonStorage/internals';\nexport * from './IagonStorage/types';\n"],"mappings":";AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"b16d02aaa4f83c11a0d0383f11d92362546f0208"}} \ No newline at end of file diff --git a/packages/iagon/package.json b/packages/iagon/package.json deleted file mode 100644 index 804991cd..00000000 --- a/packages/iagon/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "@pluto-encrypted/iagon", - "version": "1.0.2", - "description": "Secure Encrypted iagon storage for @pluto-encrypted/database", - "main": "./build/cjs/index.cjs", - "module": "./build/esm/index.mjs", - "types": "./build/index.d.ts", - "exports": { - ".": { - "import": "./build/esm/index.mjs", - "require": "./build/cjs/index.cjs" - } - }, - "private": "true", - "homepage": "https://atala-community-projects.github.io/pluto-encrypted", - "scripts": { - "prepublishOnly": "npm run build", - "clean-packages": "rm -rf node_modules && rm -rf build", - "build": "rm -rf build && npx rollup -c rollup/rollup.mjs", - "coverage": "npx vitest run --coverage && npx istanbul-badges-readme", - "test-local": "NODE_ENV=debug vitest --pool threads --poolOptions.threads.singleThread --run tests/*.test.ts" - }, - "repository": { - "type": "git", - "url": "https://github.com/atala-community-projects/pluto-encrypted.git" - }, - "author": "elribonazo@gmail.com", - "license": "Apache-2.0", - "dependencies": { - "@pluto-encrypted/encryption": "1.11.0", - "@pluto-encrypted/shared": "1.11.3", - "array-push-at-sort-position": "^4.0.1", - "axios": "^1.6.5", - "request": "^2.88.2", - "rxdb": "^14.17.0", - "uuid": "^9.0.1" - }, - "devDependencies": { - "@pluto-encrypted/encryption": "1.11.0", - "@pluto-encrypted/shared": "1.11.3", - "@pluto-encrypted/test-suite": "1.12.1" - }, - "files": [ - "build/*" - ], - "gitHead": "6aa4ce8bbb9938fc4c4e790efffa5b902631362c" -} diff --git a/packages/iagon/rollup/rollup.mjs b/packages/iagon/rollup/rollup.mjs deleted file mode 100644 index 1278dac6..00000000 --- a/packages/iagon/rollup/rollup.mjs +++ /dev/null @@ -1,5 +0,0 @@ -import nodePolyfills from "rollup-plugin-polyfill-node"; - -import CreateConfig from "../../../rollup/index.mjs"; - -export default CreateConfig(undefined, []); diff --git a/packages/iagon/src/IagonStorage/api.ts b/packages/iagon/src/IagonStorage/api.ts deleted file mode 100644 index d099cb98..00000000 --- a/packages/iagon/src/IagonStorage/api.ts +++ /dev/null @@ -1,196 +0,0 @@ -import axios, { AxiosRequestConfig } from 'axios'; - - -import { IagonFile, IagonFolder, IagonInternalParameters, IagonResponse } from "./types"; - -export class IagonAPI { - private baseUrl = "https://gw.iagon.com/"; - constructor(private parameters: IagonInternalParameters) { } - - get iagonPassword() { - return Buffer.from(this.parameters.password).toString() - } - - private async runRequest | any>(options: AxiosRequestConfig) { - try { - const startTime = Date.now(); - const response = await axios.request(options); - const endTime = Date.now(); - const elapsedMilliseconds = endTime - startTime; - console.log(`Request "${options.method}":"${options.url}" took ${elapsedMilliseconds} ms.`); - return Promise.resolve(response) - } catch (err) { - console.error(`Request "${options.method}":"${options.url}" failed: ${err}`); - return Promise.reject(err) - } - } - - async removeFile(fileId: string) { - const baseUrl = `${this.baseUrl}api/v2/storage/file/${fileId}`; - const url = `${baseUrl}` - const options = { - 'method': 'DELETE', - 'url': url, - 'headers': { - 'x-api-key': this.parameters.apiKey - } - }; - const file = await this.runRequest(options) - return file - } - async getDirectories(parentDirectoryId?: string) { - const baseUrl = `${this.baseUrl}api/v2/storage/directory?visibility=private&listingType=index` - const url = parentDirectoryId ? `${baseUrl}&parent_directory_id=${parentDirectoryId}` : `${baseUrl}` - const options = { - 'method': 'GET', - 'url': url, - 'headers': { - 'x-api-key': this.parameters.apiKey - } - }; - - const response = await this.runRequest>(options) - - const jsonResponse = response.data; - if (!jsonResponse.success) { - throw new Error(jsonResponse.message) - } - - const directories = jsonResponse.data && jsonResponse.data.directories ? jsonResponse.data.directories : []; - return directories - } - async getFile(options: { parentDirectoryId?: string | undefined; file: IagonFile; }) { - const baseUrl = `${this.baseUrl}api/v2/storage/parameterized/download` - var requestOptions = { - 'method': 'POST', - 'url': baseUrl, - 'headers': { - 'x-api-key': this.parameters.apiKey - }, - 'data': { - "id": options.file._id, - "password": this.iagonPassword - } - }; - const response = await this.runRequest(requestOptions) - return Buffer.from(typeof response.data === "string" ? response.data : JSON.stringify(response.data)); - } - async getFiles(parentDirectoryId?: string) { - const baseUrl = `${this.baseUrl}api/v2/storage/directory?visibility=private&listingType=index` - const url = parentDirectoryId ? `${baseUrl}&parent_directory_id=${parentDirectoryId}` : `${baseUrl}` - const options = { - 'method': 'GET', - 'url': url, - 'headers': { - 'x-api-key': this.parameters.apiKey - } - }; - const response = await this.runRequest>(options); - - const jsonResponse: IagonResponse<{ - directories: IagonFolder[], - files: IagonFile[] - }> = response.data; - - if (!jsonResponse.success) { - throw new Error(jsonResponse.message) - } - const files = jsonResponse.data && jsonResponse.data.files ? jsonResponse.data.files : []; - return files - } - async createDirectory(queryOptions: { parentDirectoryId?: string, dirName: string }) { - const { dirName, parentDirectoryId } = queryOptions - const body: any = { - "directory_name": dirName, - "visibility": "private", - "index_listing": true - } - - if (parentDirectoryId) { - body.parent_directory_id = parentDirectoryId; - } - - const baseUrl = `${this.baseUrl}api/v2/storage/directory` - const options = { - 'method': 'POST', - 'url': baseUrl, - 'headers': { - 'Content-Type': 'application/json', - 'x-api-key': this.parameters.apiKey - }, - data: JSON.stringify(body) - }; - - const response = await this.runRequest>(options) - const jsonResponse: IagonResponse = response.data; - if (!jsonResponse.success) { - throw new Error(jsonResponse.message) - } - - const directory = jsonResponse.data - return directory - } - async removeDirectory(dirname: IagonFolder, recursive: true) { - const baseUrl = `${this.baseUrl}api/v2/storage/directory/${dirname._id}` - var options = { - 'method': 'DELETE', - 'url': baseUrl, - 'headers': { - 'x-api-key': this.parameters.apiKey - } - }; - const response = await this.runRequest(options); - return response.data - } - private objectToFormData(obj) { - const formData = new FormData(); - for (const key in obj) { - if (obj.hasOwnProperty(key)) { - const value = obj[key]; - formData.append(key, value); - } - } - return formData; - } - private getFormDataSize(formData) { - let totalSize = 0; - for (const [key, value] of formData.entries()) { - if (value instanceof Blob) { - totalSize += value.size; - } else { - totalSize += new TextEncoder().encode(value.toString()).length; - } - } - return totalSize / 1024; - } - async uploadFile(dirname: IagonFolder, file: string, contents: Uint8Array) { - const baseUrl = `${this.baseUrl}api/v2/storage/upload`; - const body = this.objectToFormData({ - "visibility": "private", - "password": this.iagonPassword, - 'directoryId': dirname._id - }); - body.append("file", new Blob([contents], { type: "platin/text" }), file) - var options = { - 'method': 'POST', - 'url': baseUrl, - 'headers': { - 'x-api-key': this.parameters.apiKey - }, - data: body - }; - console.log(`Uploading aproximately ${this.getFormDataSize(body)} kb`) - const response = await this.runRequest>(options); - const jsonResponse: IagonResponse = response.data; - if (!jsonResponse.success) { - throw new Error(jsonResponse.message) - } - return jsonResponse.data - } -} \ No newline at end of file diff --git a/packages/iagon/src/IagonStorage/index.ts b/packages/iagon/src/IagonStorage/index.ts deleted file mode 100644 index 3cacae80..00000000 --- a/packages/iagon/src/IagonStorage/index.ts +++ /dev/null @@ -1,65 +0,0 @@ -/** - * @packageDocumentation - * @module indexdb - * @description This is a RXDB IndexDB storage that supports encryption middleware. - * In order to use this in your pluto-encrypted database you must write the following code: - * Creating a IndexDB compatible storage is very simple. - * - * ```typescript - * import IndexDB from "@pluto-encrypted/indexdb"; - * import { Database } from "@pluto-encrypted/database"; - * //default password must be 32 bytes long - * const defaultPassword = new Uint8Array(32).fill(1); - * const database = db = await Database.createEncrypted({ - * name: `my-db`, - * encryptionKey: defaultPassword, - * storage: IndexDB, - * }); - * ``` - * - */ - -import { wrappedKeyEncryptionStorage } from '@pluto-encrypted/encryption' -import { RxStorage, RxStorageDefaultStatics, RxStorageInstanceCreationParams, newRxError } from 'rxdb' - -import { IagonStorageInstance } from './instance' -import { IagonInternalParameters, IagonStorageInternals } from './types' -import { IagonInternals } from './internals' - -class IagonStorage< - RxDocType, ->{ - public name = "iagon" - public statics = RxStorageDefaultStatics; - public internalInstance: Map> = new Map() - public refCount = 0; - - constructor( - private settings: IagonInternalParameters, - ) { } - - async createStorageInstance(params: RxStorageInstanceCreationParams) { - if (params.schema.keyCompression) { - throw newRxError('UT5', { args: { databaseName: params.databaseName, collectionName: params.collectionName } }) - } - this.refCount++; - - const internals = new IagonInternals(this.settings, this.refCount) - await internals.initialiseDB(params.databaseName, params.collectionName) - - return new IagonStorageInstance( - params.databaseName, - internals, - params.options, - params.schema, - params.collectionName - ); - } -} - -export function createIagonStorage(parameters: IagonInternalParameters) { - const storage: RxStorage = new IagonStorage(parameters) - return wrappedKeyEncryptionStorage({ - storage: storage - }); -} diff --git a/packages/iagon/src/IagonStorage/instance.ts b/packages/iagon/src/IagonStorage/instance.ts deleted file mode 100644 index 20ad3fe6..00000000 --- a/packages/iagon/src/IagonStorage/instance.ts +++ /dev/null @@ -1,244 +0,0 @@ -import { - Subject, type Observable -} from 'rxjs' - -import { RxStorageInstance, StringKeys, RxDocumentData, RxConflictResultionTask, EventBulk, RxStorageChangeEvent, RxStorageDefaultCheckpoint, RxJsonSchema, getPrimaryFieldOfPrimaryKey, BulkWriteRow, RxConflictResultionTaskSolution, RxDocumentDataById, RxStorageBulkWriteResponse, RxStorageCountResult, RxStorageQueryResult, categorizeBulkWriteRows, ensureNotFalsy, now, getQueryMatcher, getSortComparator } from "rxdb"; -import { IagonInternalParameters, IagonStorageInternals } from './types'; -import { IagonInternals } from './internals'; -import { QueryMatcher } from 'rxdb/dist/types/types'; -import { fixTxPipe } from '@pluto-encrypted/shared'; - - -export class IagonStorageInstance< - RxDocType, -> implements RxStorageInstance< - RxDocType, - IagonStorageInternals, - IagonInternalParameters, - RxStorageDefaultCheckpoint -> { - public readonly primaryPath: StringKeys> - - public isInitialised = false; - - public conflictResultionTasks$ = new Subject>() - public changes$ = new Subject>, RxStorageDefaultCheckpoint>>() - - constructor( - public databaseName: string, - public internals: IagonInternals, - public options: Readonly, - public schema: Readonly>>, - public collectionName: string, - public refCount: number = 0 - ) { - this.primaryPath = getPrimaryFieldOfPrimaryKey(this.schema.primaryKey) - } - - async findDocumentsById(ids: string[], withDeleted: boolean): Promise> { - const allFiles = await this.internals.sdk.getFiles(this.internals.__dataFolder._id); - const matchingFiles = allFiles.filter((file) => ids.includes(file.name)); - const documents: RxDocumentDataById = {} - for (let file of matchingFiles) { - const fileContent = await this.internals.sdk.getFile({ file: file }) - const doc = JSON.parse(Buffer.from(fileContent).toString()); - const id = doc[this.primaryPath]; - documents[id] = doc; - } - return documents - } - - - private async resolveDocumentIds(ids: string[], selectorKeys: string[], queryMatcher: QueryMatcher>): Promise>> { - const documents: Array> = []; - for (let documentId of ids) { - const document = await this.internals.get(documentId) - if (document) { - if (selectorKeys.length <= 0) { - documents.push(document) - } - const matches = queryMatcher(document) - if (matches) { - documents.push(document) - } - } - } - return documents - } - - async query(preparedQuery: any): Promise> { - const { queryPlan, query } = preparedQuery - const selector = query.selector - const selectorKeys = Object.keys(selector) - const skip = query.skip ? query.skip : 0 - const limit = query.limit ? query.limit : Infinity - const skipPlusLimit = skip + limit - const queryMatcher: QueryMatcher> = getQueryMatcher( - this.schema, - query - ) - - const queryPlanFields: string[] = queryPlan.index - const indexes: string[] = [] - if (queryPlanFields.length === 1) { - indexes.push(fixTxPipe(queryPlanFields[0]!)) - } else { - indexes.push(...queryPlanFields.map(field => fixTxPipe(field))) - } - - const shouldAddCompoundIndexes = this.schema.indexes?.find((index) => { - if (typeof index === 'string') { - return indexes.find((index2) => index2 === index) - } else { - return index.find((subIndex) => { - return subIndex === index.find((indexValue) => indexValue === subIndex) - }) - } - }) - - if (shouldAddCompoundIndexes) { - indexes.splice(0, indexes.length) - indexes.push(this.collectionName) - if (typeof shouldAddCompoundIndexes === 'string') { - indexes.push(shouldAddCompoundIndexes) - } else { - indexes.push(...shouldAddCompoundIndexes) - } - } else { - indexes.unshift(this.collectionName) - } - - const indexName: string = `[${indexes.join('+')}]` - - const documentIds = await this.internals.getIndex(indexName) - - if (!documentIds || documentIds.length <= 0) { - return { documents: [] } - } - - let documents = await this.resolveDocumentIds( - documentIds, - selectorKeys, - queryMatcher - ) - - const sortComparator = getSortComparator(this.schema, preparedQuery.query) - documents = documents.sort(sortComparator) - documents = documents.slice(skip, skipPlusLimit) - return { - documents - } - } - async count(preparedQuery: any): Promise { - const result = await this.query(preparedQuery) - return { - count: result.documents.length, - mode: 'fast' - } - } - getAttachmentData(documentId: string, attachmentId: string, digest: string): Promise { - throw new Error('Method not implemented.'); - } - getChangedDocumentsSince(limit: number, checkpoint?: any): Promise<{ documents: RxDocumentData[]; checkpoint: any; }> { - throw new Error('Method not implemented.'); - } - - async cleanup(minimumDeletedTime: number): Promise { - await this.internals.sdk.removeDirectory(this.internals.__collectionFolder, true) - return true - } - close(): Promise { - return Promise.resolve() - } - changeStream(): Observable, any>> { - return this.changes$.asObservable() - } - remove(): Promise { - return Promise.resolve() - } - conflictResultionTasks(): Observable> { - return this.conflictResultionTasks$.asObservable() - } - resolveConflictResultionTask(taskSolution: RxConflictResultionTaskSolution): Promise { - return Promise.resolve() - } - private async getAllDocuments() { - const allDocuments: Map> = new Map(); - const dataFiles = await this.internals.sdk.getFiles(this.internals.__dataFolder._id); - for (let file of dataFiles) { - const fileContent = await this.internals.sdk.getFile({ file }); - const rxDoc: RxDocumentData = JSON.parse(Buffer.from(fileContent).toString()) - const currentId = rxDoc[this.primaryPath] as any; - allDocuments.set(currentId, rxDoc) - } - return allDocuments - } - async bulkWrite(documentWrites: BulkWriteRow[], context: string): Promise> { - const primaryPath = this.primaryPath - const ret: RxStorageBulkWriteResponse = { - success: {}, - error: {} - } - const documents = await this.getAllDocuments() - const fixed: BulkWriteRow[] = [] - for (let currentWriteDoc of documentWrites) { - const currentId = currentWriteDoc.document[this.primaryPath] as any; - const previousDocument = currentWriteDoc.previous ?? documents.get(currentId) - if (context === 'data-migrator-delete') { - if (previousDocument && previousDocument._rev === currentWriteDoc.document._rev) { - fixed.push(currentWriteDoc) - } - } else { - if (previousDocument && previousDocument._rev !== currentWriteDoc.document._rev) { - currentWriteDoc.previous = previousDocument - } else { - currentWriteDoc.previous = undefined - } - fixed.push(currentWriteDoc) - } - } - - const categorized = categorizeBulkWriteRows( - this, - primaryPath as any, - documents, - fixed, - context - ) - ret.error = categorized.errors - - /** - * Do inserts/updates - */ - const bulkInsertDocs = categorized.bulkInsertDocs - for (let i = 0; i < bulkInsertDocs.length; ++i) { - const writeRow = bulkInsertDocs[i]! - const docId = writeRow.document[primaryPath] - await this.internals.bulkPut([writeRow.document], this.collectionName, this.schema) - ret.success[docId as any] = writeRow.document - } - - const bulkUpdateDocs = categorized.bulkUpdateDocs - for (let i = 0; i < bulkUpdateDocs.length; ++i) { - const writeRow = bulkUpdateDocs[i]! - const docId = writeRow.document[primaryPath] - await this.internals.bulkPut([writeRow.document], this.collectionName, this.schema) - ret.success[docId as any] = writeRow.document - } - - if (categorized.eventBulk.events.length > 0) { - const lastState = ensureNotFalsy(categorized.newestRow).document - categorized.eventBulk.checkpoint = { - id: lastState[primaryPath], - lwt: lastState._meta.lwt - } - const endTime = now() - categorized.eventBulk.events.forEach(event => { - (event as any).endTime = endTime - }) - this.changes$.next(categorized.eventBulk) - } - - return Promise.resolve(ret) - } -} \ No newline at end of file diff --git a/packages/iagon/src/IagonStorage/internals.ts b/packages/iagon/src/IagonStorage/internals.ts deleted file mode 100644 index 0bbcee40..00000000 --- a/packages/iagon/src/IagonStorage/internals.ts +++ /dev/null @@ -1,183 +0,0 @@ -import { - RxDocumentData, - RxDocumentDataById, - RxJsonSchema -} from "rxdb"; -import { IagonAPI } from "./api"; -import { IagonFolder, IagonInternalParameters, IagonStorageInternals } from "./types"; -import { getPrivateKeyValue, safeIndexList } from "@pluto-encrypted/shared"; - - -export class IagonInternals implements IagonStorageInternals { - public __databaseFolder!: IagonFolder; - public __collectionFolder!: IagonFolder; - public __indexFolder!: IagonFolder; - public __dataFolder!: IagonFolder; - public indexes: Map = new Map() - - public sdk: IagonAPI; - - - constructor(parameters: IagonInternalParameters, public refCount: number = 0) { - this.sdk = new IagonAPI(parameters) - } - - async getDBDirectory(databaseName: string) { - return this.sdk.getDirectories().then((directories) => { - if (directories.length > 0) { - const found = directories.find((directory) => directory.directory_name === databaseName) - if (found) { - return found; - } - } - return this.sdk.createDirectory({ dirName: databaseName }); - }) - } - - private async resetDatabase() { - const rootDirectories = await this.sdk.getDirectories(); - for (let directory of rootDirectories) { - await this.sdk.removeDirectory(directory, true) - } - } - - async initialiseDB(databaseName: string, collectionName: string) { - try { - if (!this.__databaseFolder) { - const databaseDir = await this.getDBDirectory(databaseName); - this.__databaseFolder = databaseDir; - } - - if (!this.__collectionFolder) { - const collections = await this.sdk.getDirectories(this.__databaseFolder._id); - const __collectionFolder = collections.length > 0 ? collections.find((directory) => directory.directory_name === collectionName) : null; - - if (__collectionFolder) { - this.__collectionFolder = __collectionFolder; - } else { - const newDirectory = await this.sdk.createDirectory({ parentDirectoryId: this.__databaseFolder._id, dirName: collectionName }) - this.__collectionFolder = newDirectory - } - } - - const collectionFolders = await this.sdk.getDirectories(this.__collectionFolder._id); - const indexesFound = collectionFolders.length > 0 ? collectionFolders.find((directory) => directory.directory_name === "indexes") : null; - const dataFound = collectionFolders.length > 0 ? collectionFolders.find((directory) => directory.directory_name === "data") : null; - - if (!this.__indexFolder) { - if (indexesFound) { - this.__indexFolder = indexesFound; - } else { - this.__indexFolder = await this.sdk.createDirectory({ - parentDirectoryId: this.__collectionFolder._id, - dirName: 'indexes' - }) - } - } - - if (!this.__dataFolder) { - if (dataFound) { - this.__dataFolder = dataFound; - } else { - this.__dataFolder = await this.sdk.createDirectory({ - parentDirectoryId: this.__collectionFolder._id, - dirName: 'data' - }) - } - } - - - } catch (err) { - return Promise.reject(err) - } - } - - - bulkGet(keys: string[]): Promise> { - throw new Error("Method not implemented."); - } - async addDoc(docId: string, document: RxDocumentData): Promise { - const jsonDoc = JSON.stringify(document) - await this.removeDoc(docId) - await this.sdk.uploadFile(this.__dataFolder, docId, Buffer.from(jsonDoc)) - } - async removeDoc(docId: string): Promise { - const allFiles = await this.sdk.getFiles(this.__dataFolder._id); - const matchingFiles = allFiles.filter((file) => file.name === docId) - for (let file of matchingFiles) { - await this.sdk.removeFile(file._id) - } - } - async removeFromIndex(indexName: string, docId: string): Promise { - const currentIndex = await this.getIndex(indexName) - const cleanIndexPath = indexName.replace(/\[(.*)\]/g, "$1").split("+").join("/"); - const indexFilename = `${cleanIndexPath.split("/").join("_")}`; - const jsonString = JSON.stringify([ - ...currentIndex.filter((index) => index !== docId), - ]) - await this.sdk.uploadFile(this.__indexFolder, indexFilename, Buffer.from(jsonString)) - } - async get(key: string): Promise | null> { - const files = await this.sdk.getFiles(this.__dataFolder._id); - const fileFound = files.find((file) => { - return file.name === key; - }) - if (!fileFound) { - return null; - } - const fileContents = await this.sdk.getFile({ file: fileFound }) - const jsonDocument: RxDocumentData = JSON.parse(Buffer.from(fileContents).toString()); - return jsonDocument - } - async bulkPut(items: RxDocumentData[], collectionName: string, schema: RxJsonSchema>): Promise { - const primaryKeyKey = typeof schema.primaryKey === 'string' ? schema.primaryKey : schema.primaryKey.key - const saferIndexList = safeIndexList(schema) - for (const item of items) { - const shouldDelete = item._deleted - const id = getPrivateKeyValue(item, schema) - if (shouldDelete) { - for (const requiredIndexes of saferIndexList) { - const requiredIndex = `[${collectionName}+${requiredIndexes.join('+')}]` - await this.removeFromIndex(requiredIndex, id) - } - await this.removeFromIndex(`[${collectionName}+${primaryKeyKey}]`, id) - await this.removeFromIndex('[all]', id) - await this.removeDoc(id) - } else { - for (const requiredIndexes of saferIndexList) { - const requiredIndex = `[${collectionName}+${requiredIndexes.join('+')}]` - await this.updateIndex(requiredIndex, id) - } - await this.updateIndex(`[${collectionName}+${primaryKeyKey}]`, id) - await this.updateIndex('[all]', id) - await this.addDoc(id, item) - } - } - } - - async getIndex(key: string): Promise { - const indexFiles = await this.sdk.getFiles(this.__indexFolder._id); - const cleanIndexPath = key.replace(/\[(.*)\]/g, "$1").split("+").join("_"); - const indexFound = indexFiles.reverse().find((indexFile) => { - return indexFile.name === cleanIndexPath - }); - if (!indexFound) { - return []; - } - const indexContents = await this.sdk.getFile({ file: indexFound }) - const jsonParsed: string[] = JSON.parse(Buffer.from(indexContents).toString()) - return jsonParsed - } - - async updateIndex(indexName: string, docId: string) { - const currentIndex = await this.getIndex(indexName) - const cleanIndexPath = indexName.replace(/\[(.*)\]/g, "$1").split("+").join("/"); - const indexFilename = `${cleanIndexPath.split("/").join("_")}`; - const jsonString = JSON.stringify(Array.from(new Set([ - ...currentIndex, - docId - ]))) - await this.sdk.uploadFile(this.__indexFolder, indexFilename, Buffer.from(jsonString)) - } - -} diff --git a/packages/iagon/src/IagonStorage/types.ts b/packages/iagon/src/IagonStorage/types.ts deleted file mode 100644 index 59cfd10c..00000000 --- a/packages/iagon/src/IagonStorage/types.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { RxDocumentData, RxDocumentDataById, RxJsonSchema } from "rxdb" - - - -export type IagonInternalParameters = { - apiKey: string, - password: Uint8Array -} - -export enum VISIBILITY { - private = "private", - public = "public" -} - -export type IagonFolder = { - __v: number, - _id: string, - client_id: string, - created_at: string, - directory_name: string, - index_listing: boolean, - parent_directory_id: string | null, - path: string, - updated_at: string, - visibility: VISIBILITY -} - -export type IagonFile = { - __v: number, - _id: string, - availability: string, - client_id: string, - createdAt: string, - file_size_byte_encrypted: 24, - file_size_byte_native: 0, - index_listing: boolean, - name: string, - parent_directory_id: string | null, - path: string, - region: string | null, - unique_id: string, - updated_at: string, - visibility: VISIBILITY -} - -export type IagonResponse = { - success: true, - data: Data -} | { - success: false, - message: string -} - -export type IagonStorageInternals = { - __databaseFolder: IagonFolder; - __collectionFolder: IagonFolder; - __indexFolder: IagonFolder; - __dataFolder: IagonFolder; - refCount: number; - - getDBDirectory(databaseName: string): Promise - initialiseDB(databaseName: string, collectionName: string): Promise - bulkGet(keys: string[]): Promise> - - addDoc(docId: string, document: RxDocumentData): Promise - removeDoc(docId: string): Promise - removeFromIndex(indexName: string, docId: string): Promise - get(key: string): Promise | null> - getIndex(key: string): Promise - updateIndex(indexName: string, docId: string): Promise - bulkPut(items: Array>, collectionName: string, schema: Readonly>>): Promise -} \ No newline at end of file diff --git a/packages/iagon/src/index.ts b/packages/iagon/src/index.ts deleted file mode 100644 index 64ebaad2..00000000 --- a/packages/iagon/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './IagonStorage/api'; -export * from './IagonStorage'; -export * from './IagonStorage/instance'; -export * from './IagonStorage/internals'; -export * from './IagonStorage/types'; diff --git a/packages/iagon/tests/init.test.ts b/packages/iagon/tests/init.test.ts deleted file mode 100644 index df273f9a..00000000 --- a/packages/iagon/tests/init.test.ts +++ /dev/null @@ -1,42 +0,0 @@ -import "./setup"; - -import { describe, it, beforeEach, afterEach } from 'vitest'; -import { runTestSuite } from '@pluto-encrypted/test-suite'; -import { createIagonStorage } from '../src' - -if (!process.env.IAGON_API_KEY) { - throw new Error("Please add IAGON_API_KEY env var with your IagonAPI") -} - -if (!process.env.IAGON_PW) { - throw new Error("Please add IAGON_PW env var with your IagonAPI") -} - -const iagonStorage = createIagonStorage({ - apiKey: process.env.IAGON_API_KEY, - password: Buffer.from(process.env.IAGON_PW), -}) - -describe("Testing suite", () => { - runTestSuite({ - describe, it, beforeEach, afterEach - }, { - name: 'iagon', - getStorage() { - return iagonStorage - }, - getPerformanceStorage() { - return { - storage: iagonStorage, - description: 'any' - } - }, - hasPersistence: true, - hasMultiInstance: false, - hasAttachments: false, - hasBooleanIndexSupport: false, - async hasEncryption() { - return 'RandomPassword' - } - }) -}) diff --git a/packages/iagon/tests/setup.ts b/packages/iagon/tests/setup.ts deleted file mode 100644 index a6df6e1b..00000000 --- a/packages/iagon/tests/setup.ts +++ /dev/null @@ -1,17 +0,0 @@ -import "fake-indexeddb/auto"; -import { TextEncoder, TextDecoder } from "util"; -import { addRxPlugin } from "rxdb"; -import { RxDBDevModePlugin } from "rxdb/plugins/dev-mode"; -import nodeCrypto from "crypto"; - -if (process.env.NODE_ENV === "debug") { - addRxPlugin(RxDBDevModePlugin); -} - -Object.defineProperty(globalThis, "crypto", { - value: { - getRandomValues: (arr) => nodeCrypto.getRandomValues(arr), - }, -}); - -Object.assign(global, { TextDecoder, TextEncoder }); diff --git a/packages/iagon/tsconfig.json b/packages/iagon/tsconfig.json deleted file mode 100644 index 99c2653a..00000000 --- a/packages/iagon/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "./src", - "declarationDir": "./build", - }, - "include": [ - "src" - ] -} \ No newline at end of file diff --git a/packages/iagon/vitest.config.ts b/packages/iagon/vitest.config.ts deleted file mode 100644 index 21b8c892..00000000 --- a/packages/iagon/vitest.config.ts +++ /dev/null @@ -1,30 +0,0 @@ -/// -import { defineConfig } from 'vite' - -const isCI = process.env.CI === "true"; - -export default defineConfig({ - build: { - minify: 'terser', - terserOptions: { format: { comments: 'all' } }, - }, - test: { - testTimeout: 200000, - hookTimeout: 200000, - reporters: ['verbose'], // or 'verbose' - coverage: { - provider: 'istanbul', - reporter: isCI ? ['json-summary'] : ['json-summary', "html"], - thresholds: { - branches: 50, - functions: 50, - lines: 50, - statements: 50 - }, - include: [ - 'src/**/*', - ], - }, - - } -}) From dd364934de821d0705795b89c467915cd678ac9a Mon Sep 17 00:00:00 2001 From: mixmix Date: Fri, 14 Jun 2024 14:55:27 +1200 Subject: [PATCH 2/5] wip: identify test to fix --- package-lock.json | 2139 ++++++++++++++++---------- package.json | 14 +- packages/indexdb/tests/init.test.ts | 2 +- packages/inmemory/tests/init.test.ts | 2 +- packages/leveldb/tests/init.test.ts | 4 +- 5 files changed, 1348 insertions(+), 813 deletions(-) diff --git a/package-lock.json b/package-lock.json index a7f48ed9..deb6bb73 100644 --- a/package-lock.json +++ b/package-lock.json @@ -48,7 +48,7 @@ "husky": "^7.0.4", "istanbul-badges-readme": "^1.8.5", "jasmine": "^5.1.0", - "lerna": "^8.0.2", + "lerna": "^8.1.3", "mock-aws-s3": "^4.0.2", "nx": "16.8.1", "postcss": "^8.4.31", @@ -2107,13 +2107,13 @@ } }, "node_modules/@lerna/create": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@lerna/create/-/create-8.0.2.tgz", - "integrity": "sha512-AueSlfiYXqEmy9/EIc17mjlaHFuv734dfgVBegyoefIA7hdeoExtsXnACWf8Tw5af6gwyTL3KAp6QQyc1sTuZQ==", + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/@lerna/create/-/create-8.1.3.tgz", + "integrity": "sha512-JFvIYrlvR8Txa8h7VZx8VIQDltukEKOKaZL/muGO7Q/5aE2vjOKHsD/jkWYe/2uFy1xv37ubdx17O1UXQNadPg==", "dev": true, "dependencies": { "@npmcli/run-script": "7.0.2", - "@nx/devkit": ">=17.1.2 < 18", + "@nx/devkit": ">=17.1.2 < 20", "@octokit/plugin-enterprise-rest": "6.0.1", "@octokit/rest": "19.0.11", "byte-size": "8.1.1", @@ -2150,7 +2150,7 @@ "npm-packlist": "5.1.1", "npm-registry-fetch": "^14.0.5", "npmlog": "^6.0.2", - "nx": ">=17.1.2 < 18", + "nx": ">=17.1.2 < 20", "p-map": "4.0.0", "p-map-series": "2.1.0", "p-queue": "6.6.2", @@ -2166,7 +2166,7 @@ "slash": "^3.0.0", "ssri": "^9.0.1", "strong-log-transformer": "2.1.0", - "tar": "6.1.11", + "tar": "6.2.1", "temp-dir": "1.0.0", "upath": "2.0.1", "uuid": "^9.0.0", @@ -2182,22 +2182,57 @@ } }, "node_modules/@lerna/create/node_modules/@nrwl/tao": { - "version": "17.2.8", - "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-17.2.8.tgz", - "integrity": "sha512-Qpk5YKeJ+LppPL/wtoDyNGbJs2MsTi6qyX/RdRrEc8lc4bk6Cw3Oul1qTXCI6jT0KzTz+dZtd0zYD/G7okkzvg==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-19.3.0.tgz", + "integrity": "sha512-MyGYeHbh9O4Tv9xmz3Du+/leY5sKUHaPy4ancfNyShHgYi21hemX0/YYjzzoYHi44D8GzSc1XG2rAuwba7Kilw==", "dev": true, "dependencies": { - "nx": "17.2.8", + "nx": "19.3.0", "tslib": "^2.3.0" }, "bin": { "tao": "index.js" } }, + "node_modules/@lerna/create/node_modules/@nx/devkit": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-19.3.0.tgz", + "integrity": "sha512-Natya5nzvHH0qTOIL1w/EZtwMgDx87Dgz0LgeY7te2fULaNFcj5fVrP+mUKEJZR+NccO7GPumT2RPhuEl9rPnQ==", + "dev": true, + "dependencies": { + "@nrwl/devkit": "19.3.0", + "ejs": "^3.1.7", + "enquirer": "~2.3.6", + "ignore": "^5.0.4", + "minimatch": "9.0.3", + "semver": "^7.5.3", + "tmp": "~0.2.1", + "tslib": "^2.3.0", + "yargs-parser": "21.1.1" + }, + "peerDependencies": { + "nx": ">= 17 <= 20" + } + }, + "node_modules/@lerna/create/node_modules/@nx/devkit/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@lerna/create/node_modules/@nx/nx-darwin-arm64": { - "version": "17.2.8", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-17.2.8.tgz", - "integrity": "sha512-dMb0uxug4hM7tusISAU1TfkDK3ixYmzc1zhHSZwpR7yKJIyKLtUpBTbryt8nyso37AS1yH+dmfh2Fj2WxfBHTg==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-19.3.0.tgz", + "integrity": "sha512-TMTxjrN7Y/UsKFjmz0YfhVItLTGWqvud8cmQchw5NEjdNakfjXk0mREufO5/5PwoiRIsen6MbThoTprLpjOUiQ==", "cpu": [ "arm64" ], @@ -2211,9 +2246,9 @@ } }, "node_modules/@lerna/create/node_modules/@nx/nx-darwin-x64": { - "version": "17.2.8", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-17.2.8.tgz", - "integrity": "sha512-0cXzp1tGr7/6lJel102QiLA4NkaLCkQJj6VzwbwuvmuCDxPbpmbz7HC1tUteijKBtOcdXit1/MEoEU007To8Bw==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-19.3.0.tgz", + "integrity": "sha512-GH2L6ftnzdIs7JEdv7ZPCdbpAdB5sW6NijK07riYZSONzq5fEruD1yDWDkyZbYBb8RTxsparUWJnq8q1qxEPHQ==", "cpu": [ "x64" ], @@ -2227,9 +2262,9 @@ } }, "node_modules/@lerna/create/node_modules/@nx/nx-freebsd-x64": { - "version": "17.2.8", - "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-17.2.8.tgz", - "integrity": "sha512-YFMgx5Qpp2btCgvaniDGdu7Ctj56bfFvbbaHQWmOeBPK1krNDp2mqp8HK6ZKOfEuDJGOYAp7HDtCLvdZKvJxzA==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-19.3.0.tgz", + "integrity": "sha512-1ow7Xku1yyjHviCKsWiuHCAnTd3fD+5O5c+e4DXHVthT8wnadKSotvBIWf38DMbMthl7na82e72OzxcdSbrVqQ==", "cpu": [ "x64" ], @@ -2243,9 +2278,9 @@ } }, "node_modules/@lerna/create/node_modules/@nx/nx-linux-arm-gnueabihf": { - "version": "17.2.8", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-17.2.8.tgz", - "integrity": "sha512-iN2my6MrhLRkVDtdivQHugK8YmR7URo1wU9UDuHQ55z3tEcny7LV3W9NSsY9UYPK/FrxdDfevj0r2hgSSdhnzA==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-19.3.0.tgz", + "integrity": "sha512-mYQMIUvNr2gww8vbg766uk/C1RxoC1fwioeP87bmV5NRUKSzJ8WEJVxAsqc9RGhAOUaNXOgEuKYrMcVhKyIKJQ==", "cpu": [ "arm" ], @@ -2259,9 +2294,9 @@ } }, "node_modules/@lerna/create/node_modules/@nx/nx-linux-arm64-gnu": { - "version": "17.2.8", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-17.2.8.tgz", - "integrity": "sha512-Iy8BjoW6mOKrSMiTGujUcNdv+xSM1DALTH6y3iLvNDkGbjGK1Re6QNnJAzqcXyDpv32Q4Fc57PmuexyysZxIGg==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-19.3.0.tgz", + "integrity": "sha512-rHL3eQ0RHkeAXnhHHu/NIyouN/ykiXvgyNU3TuCd50+2MZcAbjB+Xq3mwL0MwiP+BQuptiE+snTuxFUJp4ZH6A==", "cpu": [ "arm64" ], @@ -2275,9 +2310,9 @@ } }, "node_modules/@lerna/create/node_modules/@nx/nx-linux-arm64-musl": { - "version": "17.2.8", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-17.2.8.tgz", - "integrity": "sha512-9wkAxWzknjpzdofL1xjtU6qPFF1PHlvKCZI3hgEYJDo4mQiatGI+7Ttko+lx/ZMP6v4+Umjtgq7+qWrApeKamQ==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-19.3.0.tgz", + "integrity": "sha512-im0+OgOD6ShpTkI9ZRz7BjzxhQ/Lk3xjYmmCu+PFGmaybEnkNNDFwsgS0iEVKMdWZ/EQoQvJrqOYsX125iIBuQ==", "cpu": [ "arm64" ], @@ -2291,9 +2326,9 @@ } }, "node_modules/@lerna/create/node_modules/@nx/nx-linux-x64-gnu": { - "version": "17.2.8", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-17.2.8.tgz", - "integrity": "sha512-sjG1bwGsjLxToasZ3lShildFsF0eyeGu+pOQZIp9+gjFbeIkd19cTlCnHrOV9hoF364GuKSXQyUlwtFYFR4VTQ==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-19.3.0.tgz", + "integrity": "sha512-k8q/d6WBSXOeUpBq6Mw69yMKL4n9LaX3o4LBNwBkVCEZ8p6s0njwKefLtjwnKlai0g/k5f0NcilU2zTwP/Ex8g==", "cpu": [ "x64" ], @@ -2307,9 +2342,9 @@ } }, "node_modules/@lerna/create/node_modules/@nx/nx-linux-x64-musl": { - "version": "17.2.8", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-17.2.8.tgz", - "integrity": "sha512-QiakXZ1xBCIptmkGEouLHQbcM4klQkcr+kEaz2PlNwy/sW3gH1b/1c0Ed5J1AN9xgQxWspriAONpScYBRgxdhA==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-19.3.0.tgz", + "integrity": "sha512-sahEV99glBlpGKG1TIQ5PkJ0QvpHp69wWsBFK2DKtCETxOtsWqwvIjemxTCXRirTqeHiP7BiR6VWsf2YqqqBdw==", "cpu": [ "x64" ], @@ -2323,9 +2358,9 @@ } }, "node_modules/@lerna/create/node_modules/@nx/nx-win32-arm64-msvc": { - "version": "17.2.8", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-17.2.8.tgz", - "integrity": "sha512-XBWUY/F/GU3vKN9CAxeI15gM4kr3GOBqnzFZzoZC4qJt2hKSSUEWsMgeZtsMgeqEClbi4ZyCCkY7YJgU32WUGA==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-19.3.0.tgz", + "integrity": "sha512-w03gFwLijStmhUji70QJHYo/U16ovybNczxGO7+5TT330X8/y+ihw9FCGHiIcujAjTAE88h0DKGn05WlNqRmfg==", "cpu": [ "arm64" ], @@ -2339,9 +2374,9 @@ } }, "node_modules/@lerna/create/node_modules/@nx/nx-win32-x64-msvc": { - "version": "17.2.8", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-17.2.8.tgz", - "integrity": "sha512-HTqDv+JThlLzbcEm/3f+LbS5/wYQWzb5YDXbP1wi7nlCTihNZOLNqGOkEmwlrR5tAdNHPRpHSmkYg4305W0CtA==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-19.3.0.tgz", + "integrity": "sha512-M7e2zXGfTjH8NLiwqKLdWC9VlfMSQDYlI4/SM4OSpPqhUTfPlRPa+wNKNTG7perKfDXxE9ei8yjocujknXJk/A==", "cpu": [ "x64" ], @@ -2354,14 +2389,16 @@ "node": ">= 10" } }, - "node_modules/@lerna/create/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "node_modules/@lerna/create/node_modules/@zkochan/js-yaml": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/@zkochan/js-yaml/-/js-yaml-0.0.7.tgz", + "integrity": "sha512-nrUSn7hzt7J6JWgWGz78ZYI8wj+gdIJdk0Ynjpp8l+trkn58Uqsf6RYrYkEK+3X18EX+TNdtJI0WxAtc+L84SQ==", "dev": true, "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, "node_modules/@lerna/create/node_modules/chalk": { @@ -2430,20 +2467,21 @@ } }, "node_modules/@lerna/create/node_modules/glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "version": "9.3.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", + "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "minimatch": "^8.0.2", + "minipass": "^4.2.4", + "path-scurry": "^1.6.1" }, "engines": { - "node": "*" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/@lerna/create/node_modules/glob-parent": { @@ -2458,6 +2496,21 @@ "node": ">= 6" } }, + "node_modules/@lerna/create/node_modules/glob/node_modules/minimatch": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz", + "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@lerna/create/node_modules/is-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", @@ -2467,18 +2520,6 @@ "node": ">=8" } }, - "node_modules/@lerna/create/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@lerna/create/node_modules/minimatch": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz", @@ -2491,6 +2532,16 @@ "node": "*" } }, + "node_modules/@lerna/create/node_modules/minimatch/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/@lerna/create/node_modules/minipass": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", @@ -2521,17 +2572,17 @@ } }, "node_modules/@lerna/create/node_modules/nx": { - "version": "17.2.8", - "resolved": "https://registry.npmjs.org/nx/-/nx-17.2.8.tgz", - "integrity": "sha512-rM5zXbuXLEuqQqcjVjClyvHwRJwt+NVImR2A6KFNG40Z60HP6X12wAxxeLHF5kXXTDRU0PFhf/yACibrpbPrAw==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/nx/-/nx-19.3.0.tgz", + "integrity": "sha512-WILWiROUkZWwuPJ12tP24Z0NULPEhxFN9i55/fECuVXYaFtkg6FvEne9C4d4bRqhZPcbrz6WhHnzE3NhdjH7XQ==", "dev": true, "hasInstallScript": true, "dependencies": { - "@nrwl/tao": "17.2.8", + "@nrwl/tao": "19.3.0", "@yarnpkg/lockfile": "^1.1.0", "@yarnpkg/parsers": "3.0.0-rc.46", - "@zkochan/js-yaml": "0.0.6", - "axios": "^1.5.1", + "@zkochan/js-yaml": "0.0.7", + "axios": "^1.6.0", "chalk": "^4.1.0", "cli-cursor": "3.1.0", "cli-spinners": "2.6.1", @@ -2541,18 +2592,18 @@ "enquirer": "~2.3.6", "figures": "3.2.0", "flat": "^5.0.2", + "front-matter": "^4.0.2", "fs-extra": "^11.1.0", - "glob": "7.1.4", "ignore": "^5.0.4", "jest-diff": "^29.4.1", - "js-yaml": "4.1.0", "jsonc-parser": "3.2.0", "lines-and-columns": "~2.0.3", - "minimatch": "3.0.5", + "minimatch": "9.0.3", "node-machine-id": "1.1.12", "npm-run-path": "^4.0.1", "open": "^8.4.0", - "semver": "7.5.3", + "ora": "5.3.0", + "semver": "^7.5.3", "string-width": "^4.2.3", "strong-log-transformer": "^2.1.0", "tar-stream": "~2.2.0", @@ -2567,19 +2618,19 @@ "nx-cloud": "bin/nx-cloud.js" }, "optionalDependencies": { - "@nx/nx-darwin-arm64": "17.2.8", - "@nx/nx-darwin-x64": "17.2.8", - "@nx/nx-freebsd-x64": "17.2.8", - "@nx/nx-linux-arm-gnueabihf": "17.2.8", - "@nx/nx-linux-arm64-gnu": "17.2.8", - "@nx/nx-linux-arm64-musl": "17.2.8", - "@nx/nx-linux-x64-gnu": "17.2.8", - "@nx/nx-linux-x64-musl": "17.2.8", - "@nx/nx-win32-arm64-msvc": "17.2.8", - "@nx/nx-win32-x64-msvc": "17.2.8" + "@nx/nx-darwin-arm64": "19.3.0", + "@nx/nx-darwin-x64": "19.3.0", + "@nx/nx-freebsd-x64": "19.3.0", + "@nx/nx-linux-arm-gnueabihf": "19.3.0", + "@nx/nx-linux-arm64-gnu": "19.3.0", + "@nx/nx-linux-arm64-musl": "19.3.0", + "@nx/nx-linux-x64-gnu": "19.3.0", + "@nx/nx-linux-x64-musl": "19.3.0", + "@nx/nx-win32-arm64-msvc": "19.3.0", + "@nx/nx-win32-x64-msvc": "19.3.0" }, "peerDependencies": { - "@swc-node/register": "^1.6.7", + "@swc-node/register": "^1.8.0", "@swc/core": "^1.3.85" }, "peerDependenciesMeta": { @@ -2591,88 +2642,68 @@ } } }, - "node_modules/@lerna/create/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@lerna/create/node_modules/rimraf": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.4.1.tgz", - "integrity": "sha512-Gk8NlF062+T9CqNGn6h4tls3k6T1+/nXdOcSZVikNVtlRdYpA7wRJJMoXmuvOnLW844rPjdQ7JgXCYM6PPC/og==", + "node_modules/@lerna/create/node_modules/nx/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", "dev": true, "dependencies": { - "glob": "^9.2.0" - }, - "bin": { - "rimraf": "dist/cjs/src/bin.js" + "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=14" + "node": ">=16 || 14 >=14.17" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@lerna/create/node_modules/rimraf/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@lerna/create/node_modules/rimraf/node_modules/glob": { - "version": "9.3.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", - "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==", + "node_modules/@lerna/create/node_modules/ora": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.3.0.tgz", + "integrity": "sha512-zAKMgGXUim0Jyd6CXK9lraBnD3H5yPGBPPOkC23a2BG6hsm4Zu6OQSjQuEtV0BHDf4aKHcUFvJiGRrFuW3MG8g==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "minimatch": "^8.0.2", - "minipass": "^4.2.4", - "path-scurry": "^1.6.1" + "bl": "^4.0.3", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "log-symbols": "^4.0.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@lerna/create/node_modules/rimraf/node_modules/minimatch": { - "version": "8.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz", - "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==", + "node_modules/@lerna/create/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">=8" } }, - "node_modules/@lerna/create/node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "node_modules/@lerna/create/node_modules/rimraf": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.4.1.tgz", + "integrity": "sha512-Gk8NlF062+T9CqNGn6h4tls3k6T1+/nXdOcSZVikNVtlRdYpA7wRJJMoXmuvOnLW844rPjdQ7JgXCYM6PPC/og==", "dev": true, "dependencies": { - "lru-cache": "^6.0.0" + "glob": "^9.2.0" }, "bin": { - "semver": "bin/semver.js" + "rimraf": "dist/cjs/src/bin.js" }, "engines": { - "node": ">=10" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/@lerna/create/node_modules/strip-bom": { @@ -2727,12 +2758,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/@lerna/create/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/@mongodb-js/saslprep": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.3.tgz", @@ -2807,25 +2832,25 @@ } }, "node_modules/@npmcli/agent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-2.2.0.tgz", - "integrity": "sha512-2yThA1Es98orMkpSLVqlDZAMPK3jHJhifP2gnNUdk1754uZ8yI5c+ulCoVG+WlntQA6MzhrURMXjSd9Z7dJ2/Q==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-2.2.2.tgz", + "integrity": "sha512-OrcNPXdpSl9UX7qPVRWbmWMCSXrcDa2M9DvrbOTj7ao1S4PlqVFYv9/yLKMkrJKZ/V5A/kDBC690or307i26Og==", "dev": true, "dependencies": { "agent-base": "^7.1.0", "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.1", "lru-cache": "^10.0.1", - "socks-proxy-agent": "^8.0.1" + "socks-proxy-agent": "^8.0.3" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/@npmcli/agent/node_modules/lru-cache": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.1.0.tgz", - "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==", + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", + "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", "dev": true, "engines": { "node": "14 || >=16.14" @@ -2844,15 +2869,15 @@ } }, "node_modules/@npmcli/git": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-5.0.4.tgz", - "integrity": "sha512-nr6/WezNzuYUppzXRaYu/W4aT5rLxdXqEFupbh6e/ovlYFQ8hpu1UUPV3Ir/YTl+74iXl2ZOMlGzudh9ZPUchQ==", + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-5.0.7.tgz", + "integrity": "sha512-WaOVvto604d5IpdCRV2KjQu8PzkfE96d50CQGKgywXh2GxXmDeUO5EWcBC4V57uFyrNqx83+MewuJh3WTR3xPA==", "dev": true, "dependencies": { "@npmcli/promise-spawn": "^7.0.0", "lru-cache": "^10.0.1", "npm-pick-manifest": "^9.0.0", - "proc-log": "^3.0.0", + "proc-log": "^4.0.0", "promise-inflight": "^1.0.1", "promise-retry": "^2.0.1", "semver": "^7.3.5", @@ -2872,14 +2897,23 @@ } }, "node_modules/@npmcli/git/node_modules/lru-cache": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.1.0.tgz", - "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==", + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", + "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", "dev": true, "engines": { "node": "14 || >=16.14" } }, + "node_modules/@npmcli/git/node_modules/proc-log": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-4.2.0.tgz", + "integrity": "sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/@npmcli/git/node_modules/which": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", @@ -2896,25 +2930,25 @@ } }, "node_modules/@npmcli/installed-package-contents": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.0.2.tgz", - "integrity": "sha512-xACzLPhnfD51GKvTOOuNX2/V4G4mz9/1I2MfDoye9kBM3RYe5g2YbscsaGoTlaWqkxeiapBWyseULVKpSVHtKQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.1.0.tgz", + "integrity": "sha512-c8UuGLeZpm69BryRykLuKRyKFZYJsZSCT4aVY5ds4omyZqJ172ApzgfKJ5eV/r3HgLdUYgFVe54KSFVjKoe27w==", "dev": true, "dependencies": { "npm-bundled": "^3.0.0", "npm-normalize-package-bin": "^3.0.0" }, "bin": { - "installed-package-contents": "lib/index.js" + "installed-package-contents": "bin/index.js" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/@npmcli/installed-package-contents/node_modules/npm-bundled": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.0.tgz", - "integrity": "sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.1.tgz", + "integrity": "sha512-+AvaheE/ww1JEwRHOrn4WHNzOxGtVp+adrg2AeZS/7KuxGUYFuBta98wYpfHBbJp6Tg6j1NKSEVHNcfZzJHQwQ==", "dev": true, "dependencies": { "npm-normalize-package-bin": "^3.0.0" @@ -2942,9 +2976,9 @@ } }, "node_modules/@npmcli/promise-spawn": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-7.0.1.tgz", - "integrity": "sha512-P4KkF9jX3y+7yFUxgcUdDtLy+t4OlDGuEBLNs57AZsfSfg+uV6MLndqGpnl4831ggaEdXwR50XFoZP4VFtHolg==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-7.0.2.tgz", + "integrity": "sha512-xhfYPXoV5Dy4UkY0D+v2KkwvnDfiA/8Mt3sWCGI/hM03NsYIH8ZaG6QzS9x7pje5vHZBZJ2v6VRFVTWACnqcmQ==", "dev": true, "dependencies": { "which": "^4.0.0" @@ -2971,59 +3005,438 @@ "isexe": "^3.1.1" }, "bin": { - "node-which": "bin/which.js" + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/redact": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/redact/-/redact-1.1.0.tgz", + "integrity": "sha512-PfnWuOkQgu7gCbnSsAisaX7hKOdZ4wSAhAzH3/ph5dSGau52kCRrMMGbiSQLwyTZpgldkZ49b0brkOr1AzGBHQ==", + "dev": true, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/run-script": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-7.0.2.tgz", + "integrity": "sha512-Omu0rpA8WXvcGeY6DDzyRoY1i5DkCBkzyJ+m2u7PD6quzb0TvSqdIPOkTn8ZBOj7LbbcbMfZ3c5skwSu6m8y2w==", + "dev": true, + "dependencies": { + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/promise-spawn": "^7.0.0", + "node-gyp": "^10.0.0", + "read-package-json-fast": "^3.0.0", + "which": "^4.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/run-script/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "dev": true, + "engines": { + "node": ">=16" + } + }, + "node_modules/@npmcli/run-script/node_modules/which": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", + "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "dev": true, + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" + } + }, + "node_modules/@nrwl/devkit": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-19.3.0.tgz", + "integrity": "sha512-WRcph/7U37HkTLIRzQ2oburZVfEFkPHJUn7vmo46gCq+N2cAKy3qwONO0RbthhjFIsG94YPXqFWFlV6k4nXpxA==", + "dev": true, + "dependencies": { + "@nx/devkit": "19.3.0" + } + }, + "node_modules/@nrwl/devkit/node_modules/@nrwl/tao": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-19.3.0.tgz", + "integrity": "sha512-MyGYeHbh9O4Tv9xmz3Du+/leY5sKUHaPy4ancfNyShHgYi21hemX0/YYjzzoYHi44D8GzSc1XG2rAuwba7Kilw==", + "dev": true, + "peer": true, + "dependencies": { + "nx": "19.3.0", + "tslib": "^2.3.0" + }, + "bin": { + "tao": "index.js" + } + }, + "node_modules/@nrwl/devkit/node_modules/@nx/devkit": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-19.3.0.tgz", + "integrity": "sha512-Natya5nzvHH0qTOIL1w/EZtwMgDx87Dgz0LgeY7te2fULaNFcj5fVrP+mUKEJZR+NccO7GPumT2RPhuEl9rPnQ==", + "dev": true, + "dependencies": { + "@nrwl/devkit": "19.3.0", + "ejs": "^3.1.7", + "enquirer": "~2.3.6", + "ignore": "^5.0.4", + "minimatch": "9.0.3", + "semver": "^7.5.3", + "tmp": "~0.2.1", + "tslib": "^2.3.0", + "yargs-parser": "21.1.1" + }, + "peerDependencies": { + "nx": ">= 17 <= 20" + } + }, + "node_modules/@nrwl/devkit/node_modules/@nx/nx-darwin-arm64": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-19.3.0.tgz", + "integrity": "sha512-TMTxjrN7Y/UsKFjmz0YfhVItLTGWqvud8cmQchw5NEjdNakfjXk0mREufO5/5PwoiRIsen6MbThoTprLpjOUiQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nrwl/devkit/node_modules/@nx/nx-darwin-x64": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-19.3.0.tgz", + "integrity": "sha512-GH2L6ftnzdIs7JEdv7ZPCdbpAdB5sW6NijK07riYZSONzq5fEruD1yDWDkyZbYBb8RTxsparUWJnq8q1qxEPHQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nrwl/devkit/node_modules/@nx/nx-freebsd-x64": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-19.3.0.tgz", + "integrity": "sha512-1ow7Xku1yyjHviCKsWiuHCAnTd3fD+5O5c+e4DXHVthT8wnadKSotvBIWf38DMbMthl7na82e72OzxcdSbrVqQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "peer": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nrwl/devkit/node_modules/@nx/nx-linux-arm-gnueabihf": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-19.3.0.tgz", + "integrity": "sha512-mYQMIUvNr2gww8vbg766uk/C1RxoC1fwioeP87bmV5NRUKSzJ8WEJVxAsqc9RGhAOUaNXOgEuKYrMcVhKyIKJQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nrwl/devkit/node_modules/@nx/nx-linux-arm64-gnu": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-19.3.0.tgz", + "integrity": "sha512-rHL3eQ0RHkeAXnhHHu/NIyouN/ykiXvgyNU3TuCd50+2MZcAbjB+Xq3mwL0MwiP+BQuptiE+snTuxFUJp4ZH6A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nrwl/devkit/node_modules/@nx/nx-linux-arm64-musl": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-19.3.0.tgz", + "integrity": "sha512-im0+OgOD6ShpTkI9ZRz7BjzxhQ/Lk3xjYmmCu+PFGmaybEnkNNDFwsgS0iEVKMdWZ/EQoQvJrqOYsX125iIBuQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nrwl/devkit/node_modules/@nx/nx-linux-x64-gnu": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-19.3.0.tgz", + "integrity": "sha512-k8q/d6WBSXOeUpBq6Mw69yMKL4n9LaX3o4LBNwBkVCEZ8p6s0njwKefLtjwnKlai0g/k5f0NcilU2zTwP/Ex8g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nrwl/devkit/node_modules/@nx/nx-linux-x64-musl": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-19.3.0.tgz", + "integrity": "sha512-sahEV99glBlpGKG1TIQ5PkJ0QvpHp69wWsBFK2DKtCETxOtsWqwvIjemxTCXRirTqeHiP7BiR6VWsf2YqqqBdw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nrwl/devkit/node_modules/@nx/nx-win32-arm64-msvc": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-19.3.0.tgz", + "integrity": "sha512-w03gFwLijStmhUji70QJHYo/U16ovybNczxGO7+5TT330X8/y+ihw9FCGHiIcujAjTAE88h0DKGn05WlNqRmfg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nrwl/devkit/node_modules/@nx/nx-win32-x64-msvc": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-19.3.0.tgz", + "integrity": "sha512-M7e2zXGfTjH8NLiwqKLdWC9VlfMSQDYlI4/SM4OSpPqhUTfPlRPa+wNKNTG7perKfDXxE9ei8yjocujknXJk/A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nrwl/devkit/node_modules/@zkochan/js-yaml": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/@zkochan/js-yaml/-/js-yaml-0.0.7.tgz", + "integrity": "sha512-nrUSn7hzt7J6JWgWGz78ZYI8wj+gdIJdk0Ynjpp8l+trkn58Uqsf6RYrYkEK+3X18EX+TNdtJI0WxAtc+L84SQ==", + "dev": true, + "peer": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@nrwl/devkit/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "peer": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@nrwl/devkit/node_modules/nx": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/nx/-/nx-19.3.0.tgz", + "integrity": "sha512-WILWiROUkZWwuPJ12tP24Z0NULPEhxFN9i55/fECuVXYaFtkg6FvEne9C4d4bRqhZPcbrz6WhHnzE3NhdjH7XQ==", + "dev": true, + "hasInstallScript": true, + "peer": true, + "dependencies": { + "@nrwl/tao": "19.3.0", + "@yarnpkg/lockfile": "^1.1.0", + "@yarnpkg/parsers": "3.0.0-rc.46", + "@zkochan/js-yaml": "0.0.7", + "axios": "^1.6.0", + "chalk": "^4.1.0", + "cli-cursor": "3.1.0", + "cli-spinners": "2.6.1", + "cliui": "^8.0.1", + "dotenv": "~16.3.1", + "dotenv-expand": "~10.0.0", + "enquirer": "~2.3.6", + "figures": "3.2.0", + "flat": "^5.0.2", + "front-matter": "^4.0.2", + "fs-extra": "^11.1.0", + "ignore": "^5.0.4", + "jest-diff": "^29.4.1", + "jsonc-parser": "3.2.0", + "lines-and-columns": "~2.0.3", + "minimatch": "9.0.3", + "node-machine-id": "1.1.12", + "npm-run-path": "^4.0.1", + "open": "^8.4.0", + "ora": "5.3.0", + "semver": "^7.5.3", + "string-width": "^4.2.3", + "strong-log-transformer": "^2.1.0", + "tar-stream": "~2.2.0", + "tmp": "~0.2.1", + "tsconfig-paths": "^4.1.2", + "tslib": "^2.3.0", + "yargs": "^17.6.2", + "yargs-parser": "21.1.1" + }, + "bin": { + "nx": "bin/nx.js", + "nx-cloud": "bin/nx-cloud.js" }, - "engines": { - "node": "^16.13.0 || >=18.0.0" + "optionalDependencies": { + "@nx/nx-darwin-arm64": "19.3.0", + "@nx/nx-darwin-x64": "19.3.0", + "@nx/nx-freebsd-x64": "19.3.0", + "@nx/nx-linux-arm-gnueabihf": "19.3.0", + "@nx/nx-linux-arm64-gnu": "19.3.0", + "@nx/nx-linux-arm64-musl": "19.3.0", + "@nx/nx-linux-x64-gnu": "19.3.0", + "@nx/nx-linux-x64-musl": "19.3.0", + "@nx/nx-win32-arm64-msvc": "19.3.0", + "@nx/nx-win32-x64-msvc": "19.3.0" + }, + "peerDependencies": { + "@swc-node/register": "^1.8.0", + "@swc/core": "^1.3.85" + }, + "peerDependenciesMeta": { + "@swc-node/register": { + "optional": true + }, + "@swc/core": { + "optional": true + } } }, - "node_modules/@npmcli/run-script": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-7.0.2.tgz", - "integrity": "sha512-Omu0rpA8WXvcGeY6DDzyRoY1i5DkCBkzyJ+m2u7PD6quzb0TvSqdIPOkTn8ZBOj7LbbcbMfZ3c5skwSu6m8y2w==", + "node_modules/@nrwl/devkit/node_modules/ora": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.3.0.tgz", + "integrity": "sha512-zAKMgGXUim0Jyd6CXK9lraBnD3H5yPGBPPOkC23a2BG6hsm4Zu6OQSjQuEtV0BHDf4aKHcUFvJiGRrFuW3MG8g==", "dev": true, + "peer": true, "dependencies": { - "@npmcli/node-gyp": "^3.0.0", - "@npmcli/promise-spawn": "^7.0.0", - "node-gyp": "^10.0.0", - "read-package-json-fast": "^3.0.0", - "which": "^4.0.0" + "bl": "^4.0.3", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "log-symbols": "^4.0.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@npmcli/run-script/node_modules/isexe": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", - "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "node_modules/@nrwl/devkit/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", "dev": true, + "peer": true, "engines": { - "node": ">=16" + "node": ">=4" } }, - "node_modules/@npmcli/run-script/node_modules/which": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", - "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", + "node_modules/@nrwl/devkit/node_modules/tsconfig-paths": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", + "integrity": "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==", "dev": true, + "peer": true, "dependencies": { - "isexe": "^3.1.1" - }, - "bin": { - "node-which": "bin/which.js" + "json5": "^2.2.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" }, "engines": { - "node": "^16.13.0 || >=18.0.0" + "node": ">=6" } }, - "node_modules/@nrwl/devkit": { - "version": "17.2.8", - "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-17.2.8.tgz", - "integrity": "sha512-l2dFy5LkWqSA45s6pee6CoqJeluH+sjRdVnAAQfjLHRNSx6mFAKblyzq5h1f4P0EUCVVVqLs+kVqmNx5zxYqvw==", + "node_modules/@nrwl/devkit/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, + "peer": true, "dependencies": { - "@nx/devkit": "17.2.8" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/@nrwl/tao": { @@ -3039,57 +3452,6 @@ "tao": "index.js" } }, - "node_modules/@nx/devkit": { - "version": "17.2.8", - "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-17.2.8.tgz", - "integrity": "sha512-6LtiQihtZwqz4hSrtT5cCG5XMCWppG6/B8c1kNksg97JuomELlWyUyVF+sxmeERkcLYFaKPTZytP0L3dmCFXaw==", - "dev": true, - "dependencies": { - "@nrwl/devkit": "17.2.8", - "ejs": "^3.1.7", - "enquirer": "~2.3.6", - "ignore": "^5.0.4", - "semver": "7.5.3", - "tmp": "~0.2.1", - "tslib": "^2.3.0" - }, - "peerDependencies": { - "nx": ">= 16 <= 18" - } - }, - "node_modules/@nx/devkit/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@nx/devkit/node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@nx/devkit/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/@nx/nx-darwin-arm64": { "version": "16.8.1", "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-16.8.1.tgz", @@ -3487,18 +3849,10 @@ "node": ">=14" } }, - "node_modules/@pluto-encrypted/database": { - "resolved": "packages/database", - "link": true - }, "node_modules/@pluto-encrypted/encryption": { "resolved": "packages/encryption", "link": true }, - "node_modules/@pluto-encrypted/iagon": { - "resolved": "packages/iagon", - "link": true - }, "node_modules/@pluto-encrypted/indexdb": { "resolved": "packages/indexdb", "link": true @@ -4194,6 +4548,15 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/@sigstore/core": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@sigstore/core/-/core-1.1.0.tgz", + "integrity": "sha512-JzBqdVIyqm2FRQCulY6nbQzMpJJpSiJ8XXWMhtOX9eKgaXXpfNOF53lzQEjIydlStnd/eFtuC1dW4VYdD93oRg==", + "dev": true, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, "node_modules/@sigstore/protobuf-specs": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.2.1.tgz", @@ -4253,22 +4616,22 @@ } }, "node_modules/@sigstore/sign/node_modules/glob": { - "version": "10.3.10", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", - "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", + "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", "dev": true, "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -4301,6 +4664,24 @@ "node": ">= 6" } }, + "node_modules/@sigstore/sign/node_modules/jackspeak": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", + "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/@sigstore/sign/node_modules/lru-cache": { "version": "7.18.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", @@ -4345,6 +4726,30 @@ "node": ">=8" } }, + "node_modules/@sigstore/sign/node_modules/minimatch": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@sigstore/sign/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/@sigstore/sign/node_modules/minipass-collect": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", @@ -4384,9 +4789,9 @@ } }, "node_modules/@sigstore/sign/node_modules/ssri": { - "version": "10.0.5", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", - "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.6.tgz", + "integrity": "sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==", "dev": true, "dependencies": { "minipass": "^7.0.3" @@ -4414,6 +4819,41 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/@sigstore/verify": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@sigstore/verify/-/verify-1.2.1.tgz", + "integrity": "sha512-8iKx79/F73DKbGfRf7+t4dqrc0bRr0thdPrxAtCKWRm/F0tG71i6O1rvlnScncJLLBZHn3h8M3c1BSUAb9yu8g==", + "dev": true, + "dependencies": { + "@sigstore/bundle": "^2.3.2", + "@sigstore/core": "^1.1.0", + "@sigstore/protobuf-specs": "^0.3.2" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/verify/node_modules/@sigstore/bundle": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@sigstore/bundle/-/bundle-2.3.2.tgz", + "integrity": "sha512-wueKWDk70QixNLB363yHc2D2ItTgYiMTdPwK8D9dKQMR3ZQ0c35IxP5xnwQ8cNLoCgCRcHf14kE+CLIvNX1zmA==", + "dev": true, + "dependencies": { + "@sigstore/protobuf-specs": "^0.3.2" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/verify/node_modules/@sigstore/protobuf-specs": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.3.2.tgz", + "integrity": "sha512-c6B0ehIWxMI8wiS/bj6rHMPqeFvngFV7cDU/MY+B16P9Z3Mp9k8L93eYZ7BYzSickzuqAQqAq0V956b3Ju6mLw==", + "dev": true, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, "node_modules/@sinclair/typebox": { "version": "0.27.8", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", @@ -5588,9 +6028,9 @@ "dev": true }, "node_modules/agent-base": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", - "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", "dev": true, "dependencies": { "debug": "^4.3.4" @@ -5628,6 +6068,7 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -5732,6 +6173,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", + "deprecated": "This package is no longer supported.", "dev": true, "dependencies": { "delegates": "^1.0.0", @@ -5917,14 +6359,6 @@ "resolved": "https://registry.npmjs.org/as-typed/-/as-typed-1.3.2.tgz", "integrity": "sha512-94ezeKlKB97OJUyMaU7dQUAB+Cmjlgr4T9/cxCoKaLM4F2HAmuIHm3Q5ClGCsX5PvRwCQehCzAa/6foRFXRbqA==" }, - "node_modules/asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "dependencies": { - "safer-buffer": "~2.1.0" - } - }, "node_modules/assert": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/assert/-/assert-2.1.0.tgz", @@ -5937,14 +6371,6 @@ "util": "^0.12.5" } }, - "node_modules/assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", - "engines": { - "node": ">=0.8" - } - }, "node_modules/assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", @@ -5995,19 +6421,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", - "engines": { - "node": "*" - } - }, - "node_modules/aws4": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", - "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==" - }, "node_modules/axios": { "version": "1.6.5", "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.5.tgz", @@ -6065,19 +6478,6 @@ } ] }, - "node_modules/bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", - "dependencies": { - "tweetnacl": "^0.14.3" - } - }, - "node_modules/bcrypt-pbkdf/node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" - }, "node_modules/bech32": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", @@ -6308,9 +6708,9 @@ } }, "node_modules/cacache": { - "version": "18.0.2", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-18.0.2.tgz", - "integrity": "sha512-r3NU8h/P+4lVUHfeRw1dtgQYar3DZMm4/cm2bZgOvrFC/su7budSOeqh52VJIC4U4iG1WWwV6vRW0znqBvxNuw==", + "version": "18.0.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-18.0.3.tgz", + "integrity": "sha512-qXCd4rh6I07cnDqh8V48/94Tc/WSfj+o3Gn6NZ0aZovS255bUx8O13uKxRFd2eWG0xgsco7+YItQNPaa5E85hg==", "dev": true, "dependencies": { "@npmcli/fs": "^3.1.0", @@ -6331,20 +6731,62 @@ } }, "node_modules/cacache/node_modules/glob": { - "version": "10.3.10", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", - "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", + "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", "dev": true, "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/cacache/node_modules/jackspeak": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", + "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/cacache/node_modules/lru-cache": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", + "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", + "dev": true, + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/cacache/node_modules/minimatch": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, "engines": { "node": ">=16 || 14 >=14.17" }, @@ -6352,19 +6794,19 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/cacache/node_modules/lru-cache": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.1.0.tgz", - "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==", + "node_modules/cacache/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true, "engines": { - "node": "14 || >=16.14" + "node": ">=16 || 14 >=14.17" } }, "node_modules/cacache/node_modules/ssri": { - "version": "10.0.5", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", - "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.6.tgz", + "integrity": "sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==", "dev": true, "dependencies": { "minipass": "^7.0.3" @@ -6459,11 +6901,6 @@ "cdl": "bin/cdl.js" } }, - "node_modules/caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" - }, "node_modules/chai": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.0.tgz", @@ -7335,17 +7772,6 @@ "node": ">=8" } }, - "node_modules/dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", - "dependencies": { - "assert-plus": "^1.0.0" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/date-fns": { "version": "2.30.0", "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", @@ -7807,15 +8233,6 @@ "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true }, - "node_modules/ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", - "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, "node_modules/ecdsa-sig-formatter": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", @@ -7825,9 +8242,9 @@ } }, "node_modules/ejs": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz", - "integrity": "sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==", + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", "dev": true, "dependencies": { "jake": "^10.8.5" @@ -8766,11 +9183,6 @@ "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==", "dev": true }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, "node_modules/external-editor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", @@ -8797,14 +9209,6 @@ "node": ">=0.6.0" } }, - "node_modules/extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", - "engines": [ - "node >=0.6.0" - ] - }, "node_modules/fake-indexeddb": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/fake-indexeddb/-/fake-indexeddb-4.0.2.tgz", @@ -8850,7 +9254,8 @@ "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true }, "node_modules/fast-levenshtein": { "version": "2.0.6", @@ -9213,14 +9618,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", - "engines": { - "node": "*" - } - }, "node_modules/form-data": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", @@ -9269,6 +9666,37 @@ } ] }, + "node_modules/front-matter": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/front-matter/-/front-matter-4.0.2.tgz", + "integrity": "sha512-I8ZuJ/qG92NWX8i5x1Y8qyj3vizhXS31OxjKDu3LKP+7/qBgfIKValiZIEwoVoJKUHlhWtYrktkxV1XsX+pPlg==", + "dev": true, + "dependencies": { + "js-yaml": "^3.13.1" + } + }, + "node_modules/front-matter/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/front-matter/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/fs-constants": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", @@ -9358,6 +9786,7 @@ "version": "4.0.4", "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", + "deprecated": "This package is no longer supported.", "dev": true, "dependencies": { "aproba": "^1.0.3 || ^2.0.0", @@ -9556,14 +9985,6 @@ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" } }, - "node_modules/getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", - "dependencies": { - "assert-plus": "^1.0.0" - } - }, "node_modules/git-log-parser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/git-log-parser/-/git-log-parser-1.2.0.tgz", @@ -9848,27 +10269,6 @@ "uglify-js": "^3.1.4" } }, - "node_modules/har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", - "engines": { - "node": ">=4" - } - }, - "node_modules/har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "deprecated": "this library is no longer supported", - "dependencies": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/hard-rejection": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", @@ -10047,20 +10447,6 @@ "node": ">= 14" } }, - "node_modules/http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", - "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - }, - "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" - } - }, "node_modules/https-proxy-agent": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", @@ -10836,11 +11222,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" - }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -10925,11 +11306,6 @@ "ws": "*" } }, - "node_modules/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" - }, "node_modules/issue-parser": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/issue-parser/-/issue-parser-6.0.0.tgz", @@ -11052,9 +11428,9 @@ } }, "node_modules/jake": { - "version": "10.8.7", - "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.7.tgz", - "integrity": "sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==", + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.1.tgz", + "integrity": "sha512-61btcOHNnLnsOdtLgA5efqQWjnSi/vow5HbI7HMdKKWqvrKR1bLK3BPlJn9gcSaP2ewuamUSMB5XEy76KUIS2w==", "dev": true, "dependencies": { "async": "^3.2.3", @@ -11239,11 +11615,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" - }, "node_modules/jscc": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/jscc/-/jscc-1.1.1.tgz", @@ -11299,15 +11670,11 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, - "node_modules/json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" - }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -11318,7 +11685,8 @@ "node_modules/json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true }, "node_modules/json5": { "version": "2.2.3", @@ -11408,20 +11776,6 @@ "npm": ">=6" } }, - "node_modules/jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - }, - "engines": { - "node": ">=0.6.0" - } - }, "node_modules/just-extend": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-6.2.0.tgz", @@ -11466,14 +11820,14 @@ } }, "node_modules/lerna": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/lerna/-/lerna-8.0.2.tgz", - "integrity": "sha512-nnOIGI5V5Af9gfraNcMVoV1Fry/y7/h3nCQYk0/CMzBYDD+xbNL3DH8+c82AJkNR5ABslmpXjW4DLJ11/1b3CQ==", + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/lerna/-/lerna-8.1.3.tgz", + "integrity": "sha512-Dg/r1dGnRCXKsOUC3lol7o6ggYTA6WWiPQzZJNKqyygn4fzYGuA3Dro2d5677pajaqFnFA72mdCjzSyF16Vi2Q==", "dev": true, "dependencies": { - "@lerna/create": "8.0.2", + "@lerna/create": "8.1.3", "@npmcli/run-script": "7.0.2", - "@nx/devkit": ">=17.1.2 < 18", + "@nx/devkit": ">=17.1.2 < 20", "@octokit/plugin-enterprise-rest": "6.0.1", "@octokit/rest": "19.0.11", "byte-size": "8.1.1", @@ -11516,7 +11870,7 @@ "npm-packlist": "5.1.1", "npm-registry-fetch": "^14.0.5", "npmlog": "^6.0.2", - "nx": ">=17.1.2 < 18", + "nx": ">=17.1.2 < 20", "p-map": "4.0.0", "p-map-series": "2.1.0", "p-pipe": "3.1.0", @@ -11534,7 +11888,7 @@ "slash": "3.0.0", "ssri": "^9.0.1", "strong-log-transformer": "2.1.0", - "tar": "6.1.11", + "tar": "6.2.1", "temp-dir": "1.0.0", "typescript": ">=3 < 6", "upath": "2.0.1", @@ -11566,6 +11920,50 @@ "tao": "index.js" } }, + "node_modules/lerna/node_modules/@nx/devkit": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-19.3.0.tgz", + "integrity": "sha512-Natya5nzvHH0qTOIL1w/EZtwMgDx87Dgz0LgeY7te2fULaNFcj5fVrP+mUKEJZR+NccO7GPumT2RPhuEl9rPnQ==", + "dev": true, + "dependencies": { + "@nrwl/devkit": "19.3.0", + "ejs": "^3.1.7", + "enquirer": "~2.3.6", + "ignore": "^5.0.4", + "minimatch": "9.0.3", + "semver": "^7.5.3", + "tmp": "~0.2.1", + "tslib": "^2.3.0", + "yargs-parser": "21.1.1" + }, + "peerDependencies": { + "nx": ">= 17 <= 20" + } + }, + "node_modules/lerna/node_modules/@nx/devkit/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/lerna/node_modules/@nx/devkit/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/lerna/node_modules/@nx/nx-darwin-arm64": { "version": "17.2.8", "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-17.2.8.tgz", @@ -12404,9 +12802,9 @@ } }, "node_modules/libnpmpublish/node_modules/ssri": { - "version": "10.0.5", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", - "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.6.tgz", + "integrity": "sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==", "dev": true, "dependencies": { "minipass": "^7.0.3" @@ -12684,9 +13082,9 @@ } }, "node_modules/make-fetch-happen": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-13.0.0.tgz", - "integrity": "sha512-7ThobcL8brtGo9CavByQrQi+23aIfgYU++wg4B87AIS8Rb2ZBt/MEaDqzA00Xwv/jUjAjYkLHjVolYuTLKda2A==", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-13.0.1.tgz", + "integrity": "sha512-cKTUFc/rbKUd/9meOvgrpJ2WrNzymt6jfRDdwg5UCnVzv9dTpEj9JS5m3wtziXVCjluIXyL8pcaukYqezIzZQA==", "dev": true, "dependencies": { "@npmcli/agent": "^2.0.0", @@ -12698,6 +13096,7 @@ "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "negotiator": "^0.6.3", + "proc-log": "^4.2.0", "promise-retry": "^2.0.1", "ssri": "^10.0.0" }, @@ -12705,10 +13104,19 @@ "node": "^16.14.0 || >=18.0.0" } }, + "node_modules/make-fetch-happen/node_modules/proc-log": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-4.2.0.tgz", + "integrity": "sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/make-fetch-happen/node_modules/ssri": { - "version": "10.0.5", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", - "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.6.tgz", + "integrity": "sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==", "dev": true, "dependencies": { "minipass": "^7.0.3" @@ -13567,9 +13975,9 @@ } }, "node_modules/node-gyp": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-10.0.1.tgz", - "integrity": "sha512-gg3/bHehQfZivQVfqIyy8wTdSymF9yTyP4CJifK73imyNMU8AIGQE2pUa7dNWfmMeG9cDVF2eehiRMv0LC1iAg==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-10.1.0.tgz", + "integrity": "sha512-B4J5M1cABxPc5PwfjhbV5hoy2DP9p8lFXASnEN6hugXOa61416tnTZ29x9sSwAd0o99XNIcpvDDy1swAExsVKA==", "dev": true, "dependencies": { "env-paths": "^2.2.0", @@ -13602,22 +14010,22 @@ } }, "node_modules/node-gyp/node_modules/glob": { - "version": "10.3.10", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", - "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", + "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", "dev": true, "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -13632,6 +14040,48 @@ "node": ">=16" } }, + "node_modules/node-gyp/node_modules/jackspeak": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", + "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/node-gyp/node_modules/minimatch": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/node-gyp/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/node-gyp/node_modules/which": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", @@ -13660,9 +14110,9 @@ "dev": true }, "node_modules/nopt": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.0.tgz", - "integrity": "sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA==", + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.1.tgz", + "integrity": "sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w==", "dev": true, "dependencies": { "abbrev": "^2.0.0" @@ -13969,9 +14419,9 @@ } }, "node_modules/npm-pick-manifest": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-9.0.0.tgz", - "integrity": "sha512-VfvRSs/b6n9ol4Qb+bDwNGUXutpy76x6MARw/XssevE0TnctIKcmklJZM5Z7nqs5z5aW+0S63pgCNbpkUNNXBg==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-9.0.1.tgz", + "integrity": "sha512-Udm1f0l2nXb3wxDpKjfohwgdFUSV50UVwzEIpDXVsbDMXVIEF81a/i0UhuQbhrPMMmdiq3+YMFLFIRVLs3hxQw==", "dev": true, "dependencies": { "npm-install-checks": "^6.0.0", @@ -13984,9 +14434,9 @@ } }, "node_modules/npm-pick-manifest/node_modules/hosted-git-info": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.1.tgz", - "integrity": "sha512-+K84LB1DYwMHoHSgaOY/Jfhw3ucPmSET5v98Ke/HdNSw4a0UktWzyW1mjhjpuxxTqOOsfWT/7iVshHmVZ4IpOA==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.2.tgz", + "integrity": "sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==", "dev": true, "dependencies": { "lru-cache": "^10.0.1" @@ -13996,9 +14446,9 @@ } }, "node_modules/npm-pick-manifest/node_modules/lru-cache": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.1.0.tgz", - "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==", + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", + "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", "dev": true, "engines": { "node": "14 || >=16.14" @@ -14014,13 +14464,13 @@ } }, "node_modules/npm-pick-manifest/node_modules/npm-package-arg": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-11.0.1.tgz", - "integrity": "sha512-M7s1BD4NxdAvBKUPqqRW957Xwcl/4Zvo8Aj+ANrzvIPzGJZElrH7Z//rSaec2ORcND6FHHLnZeY8qgTpXDMFQQ==", + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-11.0.2.tgz", + "integrity": "sha512-IGN0IAwmhDJwy13Wc8k+4PEbTPhpJnMtfR53ZbOyjkvmEcLS4nCwp6mvMWjS5sUjeiW3mpx6cHmuhKEu9XmcQw==", "dev": true, "dependencies": { "hosted-git-info": "^7.0.0", - "proc-log": "^3.0.0", + "proc-log": "^4.0.0", "semver": "^7.3.5", "validate-npm-package-name": "^5.0.0" }, @@ -14028,6 +14478,15 @@ "node": "^16.14.0 || >=18.0.0" } }, + "node_modules/npm-pick-manifest/node_modules/proc-log": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-4.2.0.tgz", + "integrity": "sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/npm-registry-fetch": { "version": "14.0.5", "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-14.0.5.tgz", @@ -16694,6 +17153,7 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", + "deprecated": "This package is no longer supported.", "dev": true, "dependencies": { "are-we-there-yet": "^3.0.0", @@ -16900,14 +17360,6 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "node_modules/oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "engines": { - "node": "*" - } - }, "node_modules/object-inspect": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", @@ -17332,9 +17784,9 @@ } }, "node_modules/pacote": { - "version": "17.0.5", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-17.0.5.tgz", - "integrity": "sha512-TAE0m20zSDMnchPja9vtQjri19X3pZIyRpm2TJVeI+yU42leJBBDTRYhOcWFsPhaMxf+3iwQkFiKz16G9AEeeA==", + "version": "17.0.7", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-17.0.7.tgz", + "integrity": "sha512-sgvnoUMlkv9xHwDUKjKQFXVyUi8dtJGKp3vg6sYy+TxbDic5RjZCHF3ygv0EJgNRZ2GfRONjlKPUfokJ9lDpwQ==", "dev": true, "dependencies": { "@npmcli/git": "^5.0.0", @@ -17348,11 +17800,11 @@ "npm-packlist": "^8.0.0", "npm-pick-manifest": "^9.0.0", "npm-registry-fetch": "^16.0.0", - "proc-log": "^3.0.0", + "proc-log": "^4.0.0", "promise-retry": "^2.0.1", "read-package-json": "^7.0.0", "read-package-json-fast": "^3.0.0", - "sigstore": "^2.0.0", + "sigstore": "^2.2.0", "ssri": "^10.0.0", "tar": "^6.1.11" }, @@ -17364,39 +17816,51 @@ } }, "node_modules/pacote/node_modules/@sigstore/bundle": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@sigstore/bundle/-/bundle-2.1.0.tgz", - "integrity": "sha512-89uOo6yh/oxaU8AeOUnVrTdVMcGk9Q1hJa7Hkvalc6G3Z3CupWk4Xe9djSgJm9fMkH69s0P0cVHUoKSOemLdng==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@sigstore/bundle/-/bundle-2.3.2.tgz", + "integrity": "sha512-wueKWDk70QixNLB363yHc2D2ItTgYiMTdPwK8D9dKQMR3ZQ0c35IxP5xnwQ8cNLoCgCRcHf14kE+CLIvNX1zmA==", "dev": true, "dependencies": { - "@sigstore/protobuf-specs": "^0.2.1" + "@sigstore/protobuf-specs": "^0.3.2" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, + "node_modules/pacote/node_modules/@sigstore/protobuf-specs": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.3.2.tgz", + "integrity": "sha512-c6B0ehIWxMI8wiS/bj6rHMPqeFvngFV7cDU/MY+B16P9Z3Mp9k8L93eYZ7BYzSickzuqAQqAq0V956b3Ju6mLw==", + "dev": true, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, "node_modules/pacote/node_modules/@sigstore/sign": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@sigstore/sign/-/sign-2.2.0.tgz", - "integrity": "sha512-AAbmnEHDQv6CSfrWA5wXslGtzLPtAtHZleKOgxdQYvx/s76Fk6T6ZVt7w2IGV9j1UrFeBocTTQxaXG2oRrDhYA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@sigstore/sign/-/sign-2.3.2.tgz", + "integrity": "sha512-5Vz5dPVuunIIvC5vBb0APwo7qKA4G9yM48kPWJT+OEERs40md5GoUR1yedwpekWZ4m0Hhw44m6zU+ObsON+iDA==", "dev": true, "dependencies": { - "@sigstore/bundle": "^2.1.0", - "@sigstore/protobuf-specs": "^0.2.1", - "make-fetch-happen": "^13.0.0" + "@sigstore/bundle": "^2.3.2", + "@sigstore/core": "^1.0.0", + "@sigstore/protobuf-specs": "^0.3.2", + "make-fetch-happen": "^13.0.1", + "proc-log": "^4.2.0", + "promise-retry": "^2.0.1" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/pacote/node_modules/@sigstore/tuf": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@sigstore/tuf/-/tuf-2.2.0.tgz", - "integrity": "sha512-KKATZ5orWfqd9ZG6MN8PtCIx4eevWSuGRKQvofnWXRpyMyUEpmrzg5M5BrCpjM+NfZ0RbNGOh5tCz/P2uoRqOA==", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/@sigstore/tuf/-/tuf-2.3.4.tgz", + "integrity": "sha512-44vtsveTPUpqhm9NCrbU8CWLe3Vck2HO1PNLw7RIajbB7xhtn5RBPm1VNSCMwqGYHhDsBJG8gDF0q4lgydsJvw==", "dev": true, "dependencies": { - "@sigstore/protobuf-specs": "^0.2.1", - "tuf-js": "^2.1.0" + "@sigstore/protobuf-specs": "^0.3.2", + "tuf-js": "^2.2.1" }, "engines": { "node": "^16.14.0 || >=18.0.0" @@ -17412,44 +17876,44 @@ } }, "node_modules/pacote/node_modules/@tufjs/models": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tufjs/models/-/models-2.0.0.tgz", - "integrity": "sha512-c8nj8BaOExmZKO2DXhDfegyhSGcG9E/mPN3U13L+/PsoWm1uaGiHHjxqSHQiasDBQwDA3aHuw9+9spYAP1qvvg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@tufjs/models/-/models-2.0.1.tgz", + "integrity": "sha512-92F7/SFyufn4DXsha9+QfKnN03JGqtMFMXgSHbZOo8JG59WkTni7UzAouNQDf7AuP9OAMxVOPQcqG3sB7w+kkg==", "dev": true, "dependencies": { "@tufjs/canonical-json": "2.0.0", - "minimatch": "^9.0.3" + "minimatch": "^9.0.4" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/pacote/node_modules/glob": { - "version": "10.3.10", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", - "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", + "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", "dev": true, "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/pacote/node_modules/hosted-git-info": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.1.tgz", - "integrity": "sha512-+K84LB1DYwMHoHSgaOY/Jfhw3ucPmSET5v98Ke/HdNSw4a0UktWzyW1mjhjpuxxTqOOsfWT/7iVshHmVZ4IpOA==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.2.tgz", + "integrity": "sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==", "dev": true, "dependencies": { "lru-cache": "^10.0.1" @@ -17459,9 +17923,9 @@ } }, "node_modules/pacote/node_modules/ignore-walk": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.4.tgz", - "integrity": "sha512-t7sv42WkwFkyKbivUCglsQW5YWMskWtbEf4MNKX5u/CCWHKSPzN4FtBQGsQZgCLbxOzpVlcbWVK5KB3auIOjSw==", + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.5.tgz", + "integrity": "sha512-VuuG0wCnjhnylG1ABXT3dAuIpTNDs/G8jlpmwXY03fXoXy/8ZK8/T+hMzt8L4WnrLCJgdybqgPagnF/f97cg3A==", "dev": true, "dependencies": { "minimatch": "^9.0.0" @@ -17470,28 +17934,70 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/pacote/node_modules/jackspeak": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", + "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/pacote/node_modules/json-parse-even-better-errors": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.1.tgz", - "integrity": "sha512-aatBvbL26wVUCLmbWdCpeu9iF5wOyWpagiKkInA+kfws3sWdBrTnsvN2CKcyCYyUrc7rebNBlK6+kteg7ksecg==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz", + "integrity": "sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/pacote/node_modules/lru-cache": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", + "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", + "dev": true, + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/pacote/node_modules/minimatch": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/pacote/node_modules/lru-cache": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.1.0.tgz", - "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==", + "node_modules/pacote/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true, "engines": { - "node": "14 || >=16.14" + "node": ">=16 || 14 >=14.17" } }, "node_modules/pacote/node_modules/normalize-package-data": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-6.0.0.tgz", - "integrity": "sha512-UL7ELRVxYBHBgYEtZCXjxuD5vPxnmvMGq0jp/dGPKKrN7tfsBh2IY7TlJ15WWwdjRWD3RJbnsygUurTK3xkPkg==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-6.0.1.tgz", + "integrity": "sha512-6rvCfeRW+OEZagAB4lMLSNuTNYZWLVtKccK79VSTf//yTY5VOCgcpH80O+bZK8Neps7pUnd5G+QlMg1yV/2iZQ==", "dev": true, "dependencies": { "hosted-git-info": "^7.0.0", @@ -17513,13 +18019,13 @@ } }, "node_modules/pacote/node_modules/npm-package-arg": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-11.0.1.tgz", - "integrity": "sha512-M7s1BD4NxdAvBKUPqqRW957Xwcl/4Zvo8Aj+ANrzvIPzGJZElrH7Z//rSaec2ORcND6FHHLnZeY8qgTpXDMFQQ==", + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-11.0.2.tgz", + "integrity": "sha512-IGN0IAwmhDJwy13Wc8k+4PEbTPhpJnMtfR53ZbOyjkvmEcLS4nCwp6mvMWjS5sUjeiW3mpx6cHmuhKEu9XmcQw==", "dev": true, "dependencies": { "hosted-git-info": "^7.0.0", - "proc-log": "^3.0.0", + "proc-log": "^4.0.0", "semver": "^7.3.5", "validate-npm-package-name": "^5.0.0" }, @@ -17540,27 +18046,38 @@ } }, "node_modules/pacote/node_modules/npm-registry-fetch": { - "version": "16.1.0", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-16.1.0.tgz", - "integrity": "sha512-PQCELXKt8Azvxnt5Y85GseQDJJlglTFM9L9U9gkv2y4e9s0k3GVDdOx3YoB6gm2Do0hlkzC39iCGXby+Wve1Bw==", + "version": "16.2.1", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-16.2.1.tgz", + "integrity": "sha512-8l+7jxhim55S85fjiDGJ1rZXBWGtRLi1OSb4Z3BPLObPuIaeKRlPRiYMSHU4/81ck3t71Z+UwDDl47gcpmfQQA==", "dev": true, "dependencies": { + "@npmcli/redact": "^1.1.0", "make-fetch-happen": "^13.0.0", "minipass": "^7.0.2", "minipass-fetch": "^3.0.0", "minipass-json-stream": "^1.0.1", "minizlib": "^2.1.2", "npm-package-arg": "^11.0.0", - "proc-log": "^3.0.0" + "proc-log": "^4.0.0" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, + "node_modules/pacote/node_modules/proc-log": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-4.2.0.tgz", + "integrity": "sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/pacote/node_modules/read-package-json": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-7.0.0.tgz", - "integrity": "sha512-uL4Z10OKV4p6vbdvIXB+OzhInYtIozl/VxUBPgNkBuUi2DeRonnuspmaVAMcrkmfjKGNmRndyQAbE7/AmzGwFg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-7.0.1.tgz", + "integrity": "sha512-8PcDiZ8DXUjLf687Ol4BR8Bpm2umR7vhoZOzNRt+uxD9GpBh/K+CAAALVIiYFknmvlmyg7hM7BSNUXPaCCqd0Q==", + "deprecated": "This package is no longer supported. Please use @npmcli/package-json instead.", "dev": true, "dependencies": { "glob": "^10.2.2", @@ -17573,24 +18090,26 @@ } }, "node_modules/pacote/node_modules/sigstore": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/sigstore/-/sigstore-2.1.0.tgz", - "integrity": "sha512-kPIj+ZLkyI3QaM0qX8V/nSsweYND3W448pwkDgS6CQ74MfhEkIR8ToK5Iyx46KJYRjseVcD3Rp9zAmUAj6ZjPw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/sigstore/-/sigstore-2.3.1.tgz", + "integrity": "sha512-8G+/XDU8wNsJOQS5ysDVO0Etg9/2uA5gR9l4ZwijjlwxBcrU6RPfwi2+jJmbP+Ap1Hlp/nVAaEO4Fj22/SL2gQ==", "dev": true, "dependencies": { - "@sigstore/bundle": "^2.1.0", - "@sigstore/protobuf-specs": "^0.2.1", - "@sigstore/sign": "^2.1.0", - "@sigstore/tuf": "^2.1.0" + "@sigstore/bundle": "^2.3.2", + "@sigstore/core": "^1.0.0", + "@sigstore/protobuf-specs": "^0.3.2", + "@sigstore/sign": "^2.3.2", + "@sigstore/tuf": "^2.3.4", + "@sigstore/verify": "^1.2.1" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, "node_modules/pacote/node_modules/ssri": { - "version": "10.0.5", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", - "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.6.tgz", + "integrity": "sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==", "dev": true, "dependencies": { "minipass": "^7.0.3" @@ -17600,14 +18119,14 @@ } }, "node_modules/pacote/node_modules/tuf-js": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-2.1.0.tgz", - "integrity": "sha512-eD7YPPjVlMzdggrOeE8zwoegUaG/rt6Bt3jwoQPunRiNVzgcCE009UDFJKJjG+Gk9wFu6W/Vi+P5d/5QpdD9jA==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-2.2.1.tgz", + "integrity": "sha512-GwIJau9XaA8nLVbUXsN3IlFi7WmQ48gBUrl3FTkkL/XLu/POhBzfmX9hd33FNMX1qAsfl6ozO1iMmW9NC8YniA==", "dev": true, "dependencies": { - "@tufjs/models": "2.0.0", + "@tufjs/models": "2.0.1", "debug": "^4.3.4", - "make-fetch-happen": "^13.0.0" + "make-fetch-happen": "^13.0.1" }, "engines": { "node": "^16.14.0 || >=18.0.0" @@ -17705,25 +18224,25 @@ "dev": true }, "node_modules/path-scurry": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", - "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, "dependencies": { - "lru-cache": "^9.1.1 || ^10.0.0", + "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.1.0.tgz", - "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==", + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", + "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", "dev": true, "engines": { "node": "14 || >=16.14" @@ -17766,11 +18285,6 @@ "node": ">=6.14" } }, - "node_modules/performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" - }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -18180,12 +18694,33 @@ } }, "node_modules/promzard": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/promzard/-/promzard-1.0.2.tgz", + "integrity": "sha512-2FPputGL+mP3jJ3UZg/Dl9YOkovB7DX0oOr+ck5QbZ5MtORtds8k/BZdn+02peDLI8/YWbmzx34k5fA+fHvCVQ==", + "dev": true, + "dependencies": { + "read": "^3.0.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/promzard/node_modules/mute-stream": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/promzard/-/promzard-1.0.0.tgz", - "integrity": "sha512-KQVDEubSUHGSt5xLakaToDFrSoZhStB8dXLzk2xvwR67gJktrHFvpR63oZgHyK19WKbHFLXJqCPXdVR3aBP8Ig==", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", + "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/promzard/node_modules/read": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/read/-/read-3.0.1.tgz", + "integrity": "sha512-SLBrDU/Srs/9EoWhU5GdbAoxG1GzpQHo/6qiGItaoLJ1thmYpcNIM1qISEUvyHBzfGlWIyd6p2DNi1oV1VmAuw==", "dev": true, "dependencies": { - "read": "^2.0.0" + "mute-stream": "^1.0.0" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" @@ -18244,11 +18779,6 @@ "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", "dev": true }, - "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" - }, "node_modules/pull-cat": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/pull-cat/-/pull-cat-1.1.11.tgz", @@ -18313,14 +18843,6 @@ "teleport": ">=0.2.0" } }, - "node_modules/qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", - "engines": { - "node": ">=0.6" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -18417,6 +18939,7 @@ "version": "6.0.4", "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-6.0.4.tgz", "integrity": "sha512-AEtWXYfopBj2z5N5PbkAOeNHRPUg5q+Nen7QLxV8M2zJq1ym6/lCz3fYNTCXe19puu2d06jfHhrP7v/S2PtMMw==", + "deprecated": "This package is no longer supported. Please use @npmcli/package-json instead.", "dev": true, "dependencies": { "glob": "^10.2.2", @@ -18442,9 +18965,9 @@ } }, "node_modules/read-package-json-fast/node_modules/json-parse-even-better-errors": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.1.tgz", - "integrity": "sha512-aatBvbL26wVUCLmbWdCpeu9iF5wOyWpagiKkInA+kfws3sWdBrTnsvN2CKcyCYyUrc7rebNBlK6+kteg7ksecg==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz", + "integrity": "sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==", "dev": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" @@ -18460,22 +18983,22 @@ } }, "node_modules/read-package-json/node_modules/glob": { - "version": "10.3.10", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", - "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", + "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", "dev": true, "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -18493,10 +19016,28 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/read-package-json/node_modules/jackspeak": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", + "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/read-package-json/node_modules/json-parse-even-better-errors": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.1.tgz", - "integrity": "sha512-aatBvbL26wVUCLmbWdCpeu9iF5wOyWpagiKkInA+kfws3sWdBrTnsvN2CKcyCYyUrc7rebNBlK6+kteg7ksecg==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz", + "integrity": "sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==", "dev": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" @@ -18511,6 +19052,30 @@ "node": ">=12" } }, + "node_modules/read-package-json/node_modules/minimatch": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/read-package-json/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/read-package-json/node_modules/normalize-package-data": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-5.0.0.tgz", @@ -18768,59 +19333,6 @@ "node": ">=14" } }, - "node_modules/request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", - "dependencies": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/request/node_modules/form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" - } - }, - "node_modules/request/node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "bin": { - "uuid": "bin/uuid" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -19545,7 +20057,8 @@ "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "devOptional": true }, "node_modules/schema-utils": { "version": "3.3.0", @@ -20156,22 +20669,22 @@ } }, "node_modules/sigstore/node_modules/glob": { - "version": "10.3.10", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", - "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", + "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", "dev": true, "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -20204,6 +20717,24 @@ "node": ">= 6" } }, + "node_modules/sigstore/node_modules/jackspeak": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", + "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/sigstore/node_modules/lru-cache": { "version": "7.18.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", @@ -20248,6 +20779,30 @@ "node": ">=8" } }, + "node_modules/sigstore/node_modules/minimatch": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sigstore/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/sigstore/node_modules/minipass-collect": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", @@ -20287,9 +20842,9 @@ } }, "node_modules/sigstore/node_modules/ssri": { - "version": "10.0.5", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", - "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.6.tgz", + "integrity": "sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==", "dev": true, "dependencies": { "minipass": "^7.0.3" @@ -20478,12 +21033,12 @@ } }, "node_modules/socks-proxy-agent": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.2.tgz", - "integrity": "sha512-8zuqoLv1aP/66PHF5TqwJ7Czm3Yv32urJQHrVyhD7mmA6d61Zv8cIXQYPTWwmg6qlupnPvs/QKDmfa4P/qct2g==", + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.3.tgz", + "integrity": "sha512-VNegTZKhuGq5vSD6XNKlbqWhyt/40CgoEw8XxD6dhnm8Jq9IEa3nIa4HwnM8XOqU0CdB0BwWVXusqiFXfHB3+A==", "dev": true, "dependencies": { - "agent-base": "^7.0.2", + "agent-base": "^7.1.1", "debug": "^4.3.4", "socks": "^2.7.1" }, @@ -20630,35 +21185,6 @@ "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, - "node_modules/sshpk": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", - "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", - "dependencies": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "bin": { - "sshpk-conv": "bin/sshpk-conv", - "sshpk-sign": "bin/sshpk-sign", - "sshpk-verify": "bin/sshpk-verify" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sshpk/node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" - }, "node_modules/ssri": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", @@ -21003,20 +21529,20 @@ } }, "node_modules/tar": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", - "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", "dev": true, "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", + "minipass": "^5.0.0", "minizlib": "^2.1.1", "mkdirp": "^1.0.3", "yallist": "^4.0.0" }, "engines": { - "node": ">= 10" + "node": ">=10" } }, "node_modules/tar-stream": { @@ -21061,7 +21587,7 @@ "node": ">= 8" } }, - "node_modules/tar/node_modules/minipass": { + "node_modules/tar/node_modules/fs-minipass/node_modules/minipass": { "version": "3.3.6", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", @@ -21073,6 +21599,15 @@ "node": ">=8" } }, + "node_modules/tar/node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/tar/node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", @@ -21398,18 +21933,6 @@ "node": ">=8.0" } }, - "node_modules/tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -21545,22 +22068,22 @@ } }, "node_modules/tuf-js/node_modules/glob": { - "version": "10.3.10", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", - "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", + "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", "dev": true, "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -21593,6 +22116,24 @@ "node": ">= 6" } }, + "node_modules/tuf-js/node_modules/jackspeak": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", + "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/tuf-js/node_modules/lru-cache": { "version": "7.18.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", @@ -21637,6 +22178,30 @@ "node": ">=8" } }, + "node_modules/tuf-js/node_modules/minimatch": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/tuf-js/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/tuf-js/node_modules/minipass-collect": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", @@ -21676,9 +22241,9 @@ } }, "node_modules/tuf-js/node_modules/ssri": { - "version": "10.0.5", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", - "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.6.tgz", + "integrity": "sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==", "dev": true, "dependencies": { "minipass": "^7.0.3" @@ -21693,17 +22258,6 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, "node_modules/tweetnacl": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", @@ -22219,24 +22773,6 @@ "node": ">= 0.10" } }, - "node_modules/verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", - "engines": [ - "node >=0.6.0" - ], - "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "node_modules/verror/node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" - }, "node_modules/vite": { "version": "5.0.12", "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.12.tgz", @@ -23080,6 +23616,7 @@ "packages/database": { "name": "@pluto-encrypted/database", "version": "1.15.5", + "extraneous": true, "license": "Apache-2.0", "dependencies": { "@atala/prism-wallet-sdk": "^4.0.2", @@ -23148,6 +23685,7 @@ "packages/iagon": { "name": "@pluto-encrypted/iagon", "version": "1.0.2", + "extraneous": true, "license": "Apache-2.0", "dependencies": { "@pluto-encrypted/encryption": "1.11.0", @@ -23164,11 +23702,6 @@ "@pluto-encrypted/test-suite": "1.12.1" } }, - "packages/iagon/node_modules/array-push-at-sort-position": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/array-push-at-sort-position/-/array-push-at-sort-position-4.0.1.tgz", - "integrity": "sha512-KdtdxZmp+j6n+jiekMbBRO/TOVP7oEadrJ+M4jB0Oe1VHZHS1Uwzx5lsvFN4juNZtHNA1l1fvcEs/SDmdoXL3w==" - }, "packages/indexdb": { "name": "@pluto-encrypted/indexdb", "version": "1.12.2", @@ -23192,7 +23725,7 @@ }, "packages/inmemory": { "name": "@pluto-encrypted/inmemory", - "version": "1.12.2", + "version": "1.12.3", "license": "Apache-2.0", "dependencies": { "@pluto-encrypted/encryption": "1.11.0", diff --git a/package.json b/package.json index fcb0eab1..20f7aadb 100644 --- a/package.json +++ b/package.json @@ -3,14 +3,14 @@ "version": "0.0.0", "private": "true", "scripts": { - "lint": "npx eslint packages/*/src/**/*.ts --fix", - "clean-packages": "npx lerna run clean-packages && rm -rf node_modules", - "build": "npx lerna run build --stream --include-dependencies", + "lint": "eslint packages/*/src/**/*.ts --fix", + "clean-packages": "lerna run clean-packages && rm -rf node_modules", + "build": "lerna run build --stream --include-dependencies", "build-and-test": "npm run build && npm run test", "dev": "lerna watch --include-dependencies -- npm run build", "dev-test": "lerna watch --include-dependencies -- npm run build-and-test", - "coverage": "npx lerna run --include-dependencies --stream coverage", - "test": "npx lerna run --include-dependencies --stream test", + "coverage": "lerna run --include-dependencies --stream coverage", + "test": "lerna run --include-dependencies test", "docs": "typedoc --options ./typedoc.markdown.cjs ", "docs-html": "typedoc --options ./typedoc.html.cjs ", "release": "npx multi-semantic-release --deps.bump=satisfy --deps.release=inherit" @@ -54,7 +54,7 @@ "husky": "^7.0.4", "istanbul-badges-readme": "^1.8.5", "jasmine": "^5.1.0", - "lerna": "^8.0.2", + "lerna": "^8.1.3", "mock-aws-s3": "^4.0.2", "nx": "16.8.1", "postcss": "^8.4.31", @@ -88,4 +88,4 @@ "dependencies": { "typedoc-plugin-external-module-map": "^2.0.1" } -} \ No newline at end of file +} diff --git a/packages/indexdb/tests/init.test.ts b/packages/indexdb/tests/init.test.ts index 67e79057..bb3f99f1 100644 --- a/packages/indexdb/tests/init.test.ts +++ b/packages/indexdb/tests/init.test.ts @@ -12,7 +12,7 @@ describe("Testing suite", () => { runTestSuite({ describe, it, beforeEach, afterEach }, { - name: 'leveldb', + name: 'my-indexdb', getStorage() { return IndexDB }, diff --git a/packages/inmemory/tests/init.test.ts b/packages/inmemory/tests/init.test.ts index 3e857bf3..cc49c743 100644 --- a/packages/inmemory/tests/init.test.ts +++ b/packages/inmemory/tests/init.test.ts @@ -14,7 +14,7 @@ describe("Testing suite", () => { runTestSuite({ describe, it, beforeEach, afterEach }, { - name: 'inmemory', + name: 'my-inmemory', getStorage() { return InMemory }, diff --git a/packages/leveldb/tests/init.test.ts b/packages/leveldb/tests/init.test.ts index 09304079..658cc83e 100644 --- a/packages/leveldb/tests/init.test.ts +++ b/packages/leveldb/tests/init.test.ts @@ -7,7 +7,6 @@ import { runTestSuite } from '@pluto-encrypted/test-suite'; import { createLevelDBStorage } from '../src' -import { Database } from "../../database/src"; import { getDefaultCollections } from "@pluto-encrypted/schemas"; const keyData = new Uint8Array(32); @@ -24,6 +23,9 @@ describe("Testing suite", () => { if (fs.existsSync("./db2")) { fs.rmdirSync("./db2", { recursive: true }) } + // WIP define a tests which is suitable here + // - remove Database reference + // - figure out functions to run on createLevelDBStorage which are meaningful const db = await Database.createEncrypted( { name: databaseName, From cb464bb61cc400f6634e71bd405fdac48bbf68a5 Mon Sep 17 00:00:00 2001 From: mixmix Date: Fri, 14 Jun 2024 17:00:16 +1200 Subject: [PATCH 3/5] write a test that uses createLevelDBStorage --- packages/leveldb/tests/init.test.ts | 96 +++++++++++++---------------- 1 file changed, 44 insertions(+), 52 deletions(-) diff --git a/packages/leveldb/tests/init.test.ts b/packages/leveldb/tests/init.test.ts index 658cc83e..5908dced 100644 --- a/packages/leveldb/tests/init.test.ts +++ b/packages/leveldb/tests/init.test.ts @@ -1,11 +1,10 @@ -import "./setup"; - import fs from 'fs'; - +import { createRxDatabase } from 'rxdb' import { describe, it, beforeEach, afterEach } from 'vitest'; import { runTestSuite } from '@pluto-encrypted/test-suite'; +import "./setup"; import { createLevelDBStorage } from '../src' import { getDefaultCollections } from "@pluto-encrypted/schemas"; @@ -14,61 +13,54 @@ const keyData = new Uint8Array(32); const databaseName = "prism-db"; const defaultPassword = Buffer.from(keyData); +function clean () { + if (fs.existsSync("./db1")) fs.rmdirSync("./db1", { recursive: true }) + if (fs.existsSync("./db2")) fs.rmdirSync("./db2", { recursive: true }) +} + describe("Testing suite", () => { it('should be able to instanciate multiple databases in the same thread', async ({ expect }) => { - if (fs.existsSync("./db1")) { - fs.rmdirSync("./db1", { recursive: true }) - } - if (fs.existsSync("./db2")) { - fs.rmdirSync("./db2", { recursive: true }) - } - // WIP define a tests which is suitable here - // - remove Database reference - // - figure out functions to run on createLevelDBStorage which are meaningful - const db = await Database.createEncrypted( - { - name: databaseName, - encryptionKey: defaultPassword, - storage: createLevelDBStorage({ - dbPath: "./db1" - }), - collections: getDefaultCollections() - } - ); - - await db.storeLinkSecret("first", "first") - - const db2 = await Database.createEncrypted( - { - name: databaseName, - encryptionKey: defaultPassword, - storage: createLevelDBStorage({ - dbPath: "./db2" - }), - collections: getDefaultCollections() + clean() + + const collections = { + todo: { + schema: { + version: 0, + primaryKey: 'id', + type: 'object', + properties: { + id: { type: 'string', maxLength: 100 }, + name: { type: 'string' }, + }, + required: ['id', 'name'] + } } - ); - - await db2.storeLinkSecret("second", "second") - - const firstLinkSecret = await db.getLinkSecret(); - - const secondLinkSecret = await db2.getLinkSecret(); - - expect(firstLinkSecret).toBe("first") - expect(secondLinkSecret).toBe("second") - - await db.clear() - await db2.clear() + } + const level1 = createLevelDBStorage({ dbPath: "./db1" }) + const db1 = await createRxDatabase({ + name: 'level-1-db', + storage: level1, + password: 'password-1' + }) + await db1.addCollections(collections) + await db1.todo.insert({ id: '1', name: 'milk' }) + const record1 = await db1.todo.findOne('1').exec() + expect(record1._data.name).toBe('milk') + + const level2 = createLevelDBStorage({ dbPath: "./db2" }) + const db2 = await createRxDatabase({ + name: 'level-2-db', + storage: level2, + password: 'password-2' + }) + await db2.addCollections(collections) + await db2.todo.insert({ id: '2', name: 'potatoes' }) + const record2 = await db2.todo.findOne('2').exec() + expect(record2._data.name).toBe('potatoes') - if (fs.existsSync("./db1")) { - fs.rmdirSync("./db1", { recursive: true }) - } - if (fs.existsSync("./db2")) { - fs.rmdirSync("./db2", { recursive: true }) - } + clean() }) describe("Level with dbPath", () => { From 6a1bcd95c3f93b33c0b65cbac88e45abaa0d7886 Mon Sep 17 00:00:00 2001 From: mixmix Date: Fri, 14 Jun 2024 17:12:19 +1200 Subject: [PATCH 4/5] throw lerna test-running out --- package-lock.json | 829 ++++++++++++++++++++++------ package.json | 11 +- packages/leveldb/README.md | 2 +- packages/leveldb/tests/init.test.ts | 10 +- 4 files changed, 663 insertions(+), 189 deletions(-) diff --git a/package-lock.json b/package-lock.json index deb6bb73..1a8c95e1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -50,6 +50,7 @@ "jasmine": "^5.1.0", "lerna": "^8.1.3", "mock-aws-s3": "^4.0.2", + "npm-run-all": "^4.1.5", "nx": "16.8.1", "postcss": "^8.4.31", "prettier": "^2.4.1", @@ -6210,12 +6211,15 @@ "dev": true }, "node_modules/array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", "dependencies": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6325,17 +6329,18 @@ } }, "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", - "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", "dev": true, "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", - "is-array-buffer": "^3.0.2", + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", "is-shared-array-buffer": "^1.0.2" }, "engines": { @@ -6411,9 +6416,12 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -6816,13 +6824,18 @@ } }, "node_modules/call-bind": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", - "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.1", - "set-function-length": "^1.1.1" + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -7772,6 +7785,57 @@ "node": ">=8" } }, + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/date-fns": { "version": "2.30.0", "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", @@ -7951,16 +8015,19 @@ } }, "node_modules/define-data-property": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", - "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "dependencies": { - "get-intrinsic": "^1.2.1", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/define-lazy-prop": { @@ -8467,50 +8534,57 @@ } }, "node_modules/es-abstract": { - "version": "1.22.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", - "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", - "dev": true, - "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "arraybuffer.prototype.slice": "^1.0.2", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.5", - "es-set-tostringtag": "^2.0.1", + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", "es-to-primitive": "^1.2.1", "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.2", - "get-symbol-description": "^1.0.0", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", "globalthis": "^1.0.3", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", "has-symbols": "^1.0.3", - "hasown": "^2.0.0", - "internal-slot": "^1.0.5", - "is-array-buffer": "^3.0.2", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", + "is-shared-array-buffer": "^1.0.3", "is-string": "^1.0.7", - "is-typed-array": "^1.1.12", + "is-typed-array": "^1.1.13", "is-weakref": "^1.0.2", "object-inspect": "^1.13.1", "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.1", - "safe-array-concat": "^1.0.1", - "safe-regex-test": "^1.0.0", - "string.prototype.trim": "^1.2.8", - "string.prototype.trimend": "^1.0.7", - "string.prototype.trimstart": "^1.0.7", - "typed-array-buffer": "^1.0.0", - "typed-array-byte-length": "^1.0.0", - "typed-array-byte-offset": "^1.0.0", - "typed-array-length": "^1.0.4", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.13" + "which-typed-array": "^1.1.15" }, "engines": { "node": ">= 0.4" @@ -8519,6 +8593,25 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-get-iterator": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", @@ -8550,15 +8643,27 @@ "dev": true, "peer": true }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-set-tostringtag": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", - "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", "dev": true, "dependencies": { - "get-intrinsic": "^1.2.2", - "has-tostringtag": "^1.0.0", - "hasown": "^2.0.0" + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" }, "engines": { "node": ">= 0.4" @@ -9865,15 +9970,19 @@ "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==" }, "node_modules/get-intrinsic": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", - "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dependencies": { + "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -9958,13 +10067,14 @@ } }, "node_modules/get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" }, "engines": { "node": ">= 0.4" @@ -10296,20 +10406,20 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", - "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dependencies": { - "get-intrinsic": "^1.2.2" + "es-define-property": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "engines": { "node": ">= 0.4" }, @@ -10329,11 +10439,11 @@ } }, "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dependencies": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -10358,9 +10468,9 @@ } }, "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dependencies": { "function-bind": "^1.1.2" }, @@ -10734,11 +10844,11 @@ } }, "node_modules/internal-slot": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", - "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", "dependencies": { - "get-intrinsic": "^1.2.2", + "es-errors": "^1.3.0", "hasown": "^2.0.0", "side-channel": "^1.0.4" }, @@ -10784,13 +10894,15 @@ } }, "node_modules/is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", "dependencies": { "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -10878,6 +10990,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dev": true, + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-date-object": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", @@ -11012,9 +11139,9 @@ } }, "node_modules/is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", "dev": true, "engines": { "node": ">= 0.4" @@ -11137,11 +11264,14 @@ } }, "node_modules/is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", "dependencies": { - "call-bind": "^1.0.2" + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -11209,11 +11339,11 @@ } }, "node_modules/is-typed-array": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", - "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", "dependencies": { - "which-typed-array": "^1.1.11" + "which-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" @@ -13212,6 +13342,15 @@ "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==" }, + "node_modules/memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "dev": true, + "engines": { + "node": ">= 0.10.0" + } + }, "node_modules/meow": { "version": "8.1.2", "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", @@ -13906,6 +14045,12 @@ "integrity": "sha512-EZSPZB70jiVsivaBLYDCyntd5eH8NTSMOn3rB+HxwdmKThGELLdYv8qVIMWvZEFy9w8ZZpW9h9OB32l1rGtj7g==", "dev": true }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, "node_modules/nise": { "version": "5.1.7", "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.7.tgz", @@ -14734,6 +14879,281 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, + "node_modules/npm-run-all": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", + "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "memorystream": "^0.3.1", + "minimatch": "^3.0.4", + "pidtree": "^0.3.0", + "read-pkg": "^3.0.0", + "shell-quote": "^1.6.1", + "string.prototype.padend": "^3.0.0" + }, + "bin": { + "npm-run-all": "bin/npm-run-all/index.js", + "run-p": "bin/run-p/index.js", + "run-s": "bin/run-s/index.js" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/npm-run-all/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/npm-run-all/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/npm-run-all/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/npm-run-all/node_modules/cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } + }, + "node_modules/npm-run-all/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/npm-run-all/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "node_modules/npm-run-all/node_modules/load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/npm-run-all/node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/npm-run-all/node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "dev": true, + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", + "dev": true, + "dependencies": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/npm-run-all/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dev": true, + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-all/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-all/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-all/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, "node_modules/npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -18302,6 +18722,18 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pidtree": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", + "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", + "dev": true, + "bin": { + "pidtree": "bin/pidtree.js" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/pify": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-5.0.0.tgz", @@ -18584,6 +19016,14 @@ "node": ">=4" } }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/postcss": { "version": "8.4.33", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz", @@ -19306,13 +19746,14 @@ "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" }, "node_modules/regexp.prototype.flags": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", - "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "set-function-name": "^2.0.0" + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" }, "engines": { "node": ">= 0.4" @@ -20009,13 +20450,13 @@ } }, "node_modules/safe-array-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", - "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", "has-symbols": "^1.0.3", "isarray": "^2.0.5" }, @@ -20038,13 +20479,13 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "node_modules/safe-regex-test": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.1.tgz", - "integrity": "sha512-Y5NejJTTliTyY4H7sipGqY+RX5P87i3F7c4Rcepy72nq+mNLhIsD0W4c7kEmduMDQCSqtPsXPlSTsFhh2LQv+g==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", "dev": true, "dependencies": { - "call-bind": "^1.0.5", - "get-intrinsic": "^1.2.2", + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", "is-regex": "^1.1.4" }, "engines": { @@ -20416,14 +20857,16 @@ "dev": true }, "node_modules/set-function-length": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", - "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", "dependencies": { - "define-data-property": "^1.1.1", - "get-intrinsic": "^1.2.1", + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -21318,15 +21761,34 @@ "node": ">=8" } }, + "node_modules/string.prototype.padend": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.6.tgz", + "integrity": "sha512-XZpspuSB7vJWhvJc9DLSlrXl1mcA2BdoY5jjnS135ydXqLoqhs96JjDtCkjJEQHvfqZIp9hBuBMgI589peyx9Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/string.prototype.trim": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", - "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -21336,28 +21798,31 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", - "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", - "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -22296,29 +22761,30 @@ } }, "node_modules/typed-array-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", - "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", - "is-typed-array": "^1.1.10" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" } }, "node_modules/typed-array-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", - "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -22328,16 +22794,17 @@ } }, "node_modules/typed-array-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", - "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -22347,14 +22814,20 @@ } }, "node_modules/typed-array-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -23268,15 +23741,15 @@ } }, "node_modules/which-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", - "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.4", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" diff --git a/package.json b/package.json index 20f7aadb..a50a9b19 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,14 @@ "build-and-test": "npm run build && npm run test", "dev": "lerna watch --include-dependencies -- npm run build", "dev-test": "lerna watch --include-dependencies -- npm run build-and-test", - "coverage": "lerna run --include-dependencies --stream coverage", - "test": "lerna run --include-dependencies test", + "coverage": "run-s coverage:indexdb coverage:inmemory coverage:leveldb", + "coverage:indexdb": "npm --prefix packages/indexdb run coverage", + "coverage:inmemory": "npm --prefix packages/inmemory run coverage", + "coverage:leveldb": "npm --prefix packages/leveldb run coverage", + "test": "run-s test:indexdb test:inmemory test:leveldb", + "test:indexdb": "npm --prefix packages/indexdb run test", + "test:inmemory": "npm --prefix packages/inmemory run test", + "test:leveldb": "npm --prefix packages/leveldb run test", "docs": "typedoc --options ./typedoc.markdown.cjs ", "docs-html": "typedoc --options ./typedoc.html.cjs ", "release": "npx multi-semantic-release --deps.bump=satisfy --deps.release=inherit" @@ -56,6 +62,7 @@ "jasmine": "^5.1.0", "lerna": "^8.1.3", "mock-aws-s3": "^4.0.2", + "npm-run-all": "^4.1.5", "nx": "16.8.1", "postcss": "^8.4.31", "prettier": "^2.4.1", diff --git a/packages/leveldb/README.md b/packages/leveldb/README.md index 4dc6aca6..f73f0ffe 100644 --- a/packages/leveldb/README.md +++ b/packages/leveldb/README.md @@ -28,4 +28,4 @@ const database = db = await Database.createEncrypted( ## QA & Documentation | Statements | Branches | Functions | Lines | | --------------------------- | ----------------------- | ------------------------- | ----------------- | -| ![Statements](https://img.shields.io/badge/statements-92.85%25-brightgreen.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-75%25-red.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-94.11%25-brightgreen.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-94.5%25-brightgreen.svg?style=flat) | +| ![Statements](https://img.shields.io/badge/statements-92.85%25-brightgreen.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-73.52%25-red.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-94.11%25-brightgreen.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-94.5%25-brightgreen.svg?style=flat) | diff --git a/packages/leveldb/tests/init.test.ts b/packages/leveldb/tests/init.test.ts index 5908dced..9613d2b7 100644 --- a/packages/leveldb/tests/init.test.ts +++ b/packages/leveldb/tests/init.test.ts @@ -1,17 +1,11 @@ +import "./setup"; + import fs from 'fs'; import { createRxDatabase } from 'rxdb' import { describe, it, beforeEach, afterEach } from 'vitest'; import { runTestSuite } from '@pluto-encrypted/test-suite'; - -import "./setup"; import { createLevelDBStorage } from '../src' -import { getDefaultCollections } from "@pluto-encrypted/schemas"; - -const keyData = new Uint8Array(32); - -const databaseName = "prism-db"; -const defaultPassword = Buffer.from(keyData); function clean () { if (fs.existsSync("./db1")) fs.rmdirSync("./db1", { recursive: true }) From fb7b91272f079c74909d207a703e820eddfc0479 Mon Sep 17 00:00:00 2001 From: mixmix Date: Fri, 14 Jun 2024 18:28:16 +1200 Subject: [PATCH 5/5] remove database from coverage CI --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index afda106f..4f5f5ea4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,9 +64,8 @@ jobs: with: title: Test Coverage for @pluto-encrypted/database multiple-files: | - @pluto-encrypted/database, packages/database/coverage/coverage-summary.json @pluto-encrypted/indexdb, packages/indexdb/coverage/coverage-summary.json @pluto-encrypted/inmemory, packages/inmemory/coverage/coverage-summary.json @pluto-encrypted/leveldb, packages/leveldb/coverage/coverage-summary.json - \ No newline at end of file +