diff --git a/package-lock.json b/package-lock.json index 2e12404..d2b9b8e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -148,6 +148,29 @@ } } }, + "node_modules/@anolilab/semantic-release-preset/node_modules/@semantic-release/commit-analyzer": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/@semantic-release/commit-analyzer/-/commit-analyzer-13.0.0.tgz", + "integrity": "sha512-KtXWczvTAB1ZFZ6B4O+w8HkfYm/OgQb1dUGNFZtDgQ0csggrmkq8sTxhd+lwGF8kMb59/RnG9o4Tn7M/I8dQ9Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "conventional-changelog-angular": "^8.0.0", + "conventional-changelog-writer": "^8.0.0", + "conventional-commits-filter": "^5.0.0", + "conventional-commits-parser": "^6.0.0", + "debug": "^4.0.0", + "import-from-esm": "^1.0.3", + "lodash-es": "^4.17.21", + "micromatch": "^4.0.2" + }, + "engines": { + "node": ">=20.8.1" + }, + "peerDependencies": { + "semantic-release": ">=20.1.0" + } + }, "node_modules/@anolilab/semantic-release-preset/node_modules/@semantic-release/error": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@semantic-release/error/-/error-4.0.0.tgz", @@ -260,6 +283,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@anolilab/semantic-release-preset/node_modules/import-from-esm": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/import-from-esm/-/import-from-esm-1.3.4.tgz", + "integrity": "sha512-7EyUlPFC0HOlBDpUFGfYstsU7XHxZJKAAMzCT8wZ0hMW7b+hG51LIKTDcsgtz8Pu6YC0HqRVbX+rVUtsGMUKvg==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.3.4", + "import-meta-resolve": "^4.0.0" + }, + "engines": { + "node": ">=16.20" + } + }, "node_modules/@anolilab/semantic-release-preset/node_modules/indent-string": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", @@ -273,6 +310,30 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@asamuzakjp/css-color": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-2.8.2.tgz", + "integrity": "sha512-RtWv9jFN2/bLExuZgFFZ0I3pWWeezAHGgrmjqGGWclATl1aDe3yhCUaI0Ilkp6OCk9zX7+FjvDasEX8Q9Rxc5w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@csstools/css-calc": "^2.1.1", + "@csstools/css-color-parser": "^3.0.7", + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3", + "lru-cache": "^11.0.2" + } + }, + "node_modules/@asamuzakjp/css-color/node_modules/lru-cache": { + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.2.tgz", + "integrity": "sha512-123qHRfJBmo2jXDbo/a5YOQrJoHF/GNQTLzQ5+IdK5pWpceK17yRc6ozlWd25FxvGKQbIUs91fDFkXmDHTKcyA==", + "dev": true, + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, "node_modules/@babel/code-frame": { "version": "7.26.2", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", @@ -543,6 +604,7 @@ "dev": true, "license": "MIT", "optional": true, + "peer": true, "engines": { "node": ">=0.1.90" } @@ -571,6 +633,121 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@csstools/color-helpers": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-5.0.1.tgz", + "integrity": "sha512-MKtmkA0BX87PKaO1NFRTFH+UnkgnmySQOvNxJubsadusqPEC2aJ9MOQiMceZJJ6oitUl/i0L6u0M1IrmAOmgBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT-0", + "engines": { + "node": ">=18" + } + }, + "node_modules/@csstools/css-calc": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-2.1.1.tgz", + "integrity": "sha512-rL7kaUnTkL9K+Cvo2pnCieqNpTKgQzy5f+N+5Iuko9HAoasP+xgprVh7KN/MaJVvVL1l0EzQq2MoqBHKSrDrag==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3" + } + }, + "node_modules/@csstools/css-color-parser": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-3.0.7.tgz", + "integrity": "sha512-nkMp2mTICw32uE5NN+EsJ4f5N+IGFeCFu4bGpiKgb2Pq/7J/MpyLBeQ5ry4KKtRFZaYs6sTmcMYrSRIyj5DFKA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "dependencies": { + "@csstools/color-helpers": "^5.0.1", + "@csstools/css-calc": "^2.1.1" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3" + } + }, + "node_modules/@csstools/css-parser-algorithms": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.4.tgz", + "integrity": "sha512-Up7rBoV77rv29d3uKHUIVubz1BTcgyUK72IvCQAbfbMv584xHcGKCKbWh7i8hPrRJ7qU4Y8IO3IY9m+iTB7P3A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-tokenizer": "^3.0.3" + } + }, + "node_modules/@csstools/css-tokenizer": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.3.tgz", + "integrity": "sha512-UJnjoFsmxfKUdNYdWgOB0mWUypuLvAfQPH1+pyvRJs6euowbFkFC6P13w1l8mJyi3vxYMxc9kld5jZEGRQs6bw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/@emnapi/core": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.3.1.tgz", @@ -619,9 +796,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", - "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.2.tgz", + "integrity": "sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==", "cpu": [ "ppc64" ], @@ -631,14 +808,15 @@ "os": [ "aix" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", - "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.2.tgz", + "integrity": "sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==", "cpu": [ "arm" ], @@ -648,14 +826,15 @@ "os": [ "android" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", - "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.2.tgz", + "integrity": "sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==", "cpu": [ "arm64" ], @@ -665,14 +844,15 @@ "os": [ "android" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", - "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.2.tgz", + "integrity": "sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==", "cpu": [ "x64" ], @@ -682,8 +862,9 @@ "os": [ "android" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/darwin-arm64": { @@ -703,9 +884,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", - "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.2.tgz", + "integrity": "sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==", "cpu": [ "x64" ], @@ -715,14 +896,15 @@ "os": [ "darwin" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", - "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.2.tgz", + "integrity": "sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==", "cpu": [ "arm64" ], @@ -732,14 +914,15 @@ "os": [ "freebsd" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", - "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.2.tgz", + "integrity": "sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==", "cpu": [ "x64" ], @@ -749,14 +932,15 @@ "os": [ "freebsd" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", - "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.2.tgz", + "integrity": "sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==", "cpu": [ "arm" ], @@ -766,14 +950,15 @@ "os": [ "linux" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", - "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.2.tgz", + "integrity": "sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==", "cpu": [ "arm64" ], @@ -783,14 +968,15 @@ "os": [ "linux" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", - "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.2.tgz", + "integrity": "sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==", "cpu": [ "ia32" ], @@ -800,14 +986,15 @@ "os": [ "linux" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", - "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.2.tgz", + "integrity": "sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==", "cpu": [ "loong64" ], @@ -817,14 +1004,15 @@ "os": [ "linux" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", - "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.2.tgz", + "integrity": "sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==", "cpu": [ "mips64el" ], @@ -834,14 +1022,15 @@ "os": [ "linux" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", - "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.2.tgz", + "integrity": "sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==", "cpu": [ "ppc64" ], @@ -851,14 +1040,15 @@ "os": [ "linux" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", - "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.2.tgz", + "integrity": "sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==", "cpu": [ "riscv64" ], @@ -868,14 +1058,15 @@ "os": [ "linux" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", - "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.2.tgz", + "integrity": "sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==", "cpu": [ "s390x" ], @@ -885,14 +1076,15 @@ "os": [ "linux" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", - "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.2.tgz", + "integrity": "sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==", "cpu": [ "x64" ], @@ -902,14 +1094,33 @@ "os": [ "linux" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.24.2.tgz", + "integrity": "sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "peer": true, + "engines": { + "node": ">=18" } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", - "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.2.tgz", + "integrity": "sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==", "cpu": [ "x64" ], @@ -919,14 +1130,33 @@ "os": [ "netbsd" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.2.tgz", + "integrity": "sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "peer": true, + "engines": { + "node": ">=18" } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", - "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.2.tgz", + "integrity": "sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==", "cpu": [ "x64" ], @@ -936,14 +1166,15 @@ "os": [ "openbsd" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", - "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.2.tgz", + "integrity": "sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==", "cpu": [ "x64" ], @@ -953,14 +1184,15 @@ "os": [ "sunos" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", - "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.2.tgz", + "integrity": "sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==", "cpu": [ "arm64" ], @@ -970,14 +1202,15 @@ "os": [ "win32" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", - "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.2.tgz", + "integrity": "sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==", "cpu": [ "ia32" ], @@ -987,14 +1220,15 @@ "os": [ "win32" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", - "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.2.tgz", + "integrity": "sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==", "cpu": [ "x64" ], @@ -1004,20 +1238,21 @@ "os": [ "win32" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@gerrit0/mini-shiki": { - "version": "1.24.4", - "resolved": "https://registry.npmjs.org/@gerrit0/mini-shiki/-/mini-shiki-1.24.4.tgz", - "integrity": "sha512-YEHW1QeAg6UmxEmswiQbOVEg1CW22b1XUD/lNTliOsu0LD0wqoyleFMnmbTp697QE0pcadQiR5cVtbbAPncvpw==", + "version": "1.26.1", + "resolved": "https://registry.npmjs.org/@gerrit0/mini-shiki/-/mini-shiki-1.26.1.tgz", + "integrity": "sha512-gHFUvv9f1fU2Piou/5Y7Sx5moYxcERbC7CXc6rkDLQTUBg5Dgg9L4u29/nHqfoQ3Y9R0h0BcOhd14uOEZIBP7Q==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/engine-oniguruma": "^1.24.2", - "@shikijs/types": "^1.24.2", - "@shikijs/vscode-textmate": "^9.3.1" + "@shikijs/engine-oniguruma": "^1.26.1", + "@shikijs/types": "^1.26.1", + "@shikijs/vscode-textmate": "^10.0.1" } }, "node_modules/@hutson/parse-repository-url": { @@ -1859,9 +2094,9 @@ } }, "node_modules/@nx/devkit": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-20.3.0.tgz", - "integrity": "sha512-u9oRd2F33DLNWPbzpYGW7xuMEYUAOwO9DLP9nGYpxbZXy6Z4AdoKeqhN+KBTyg8+DyQGuKUSEXcWriDyLLgcHw==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-20.3.1.tgz", + "integrity": "sha512-Z6VdBg5GRu2Vg9FpeQJY+zQ1TvBoMWk8cTCZOf8J6myjoWYbksRfpWfNIvEk9OUsEMhpg98vxH2Cc8JR1zfiew==", "dev": true, "license": "MIT", "dependencies": { @@ -1895,9 +2130,9 @@ } }, "node_modules/@nx/nx-darwin-arm64": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-20.3.0.tgz", - "integrity": "sha512-9PqSe1Sh7qNqA4GL0cZH0t3S0EZzb2Xn14XY9au7yf0+eoxyag1oETjjULrxLeUmSoXW2hDxzNtoqKFE9zF07Q==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-20.3.1.tgz", + "integrity": "sha512-bx++T9/8l4PK1yDTxPnROT7RG8CkWGkxKC0D7xlS/YQzE7CelDfgNYu0Bd7upZF4gafW2Uz3dd3j6WhvZLxbbg==", "cpu": [ "arm64" ], @@ -1912,9 +2147,9 @@ } }, "node_modules/@nx/nx-darwin-x64": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-20.3.0.tgz", - "integrity": "sha512-gsGGhJVvi5QZVVTZie5sNMo1zOAU+A2edm6DGegObdFRLV41Ju/Yrm/gTaSp4yUtywd3UU4S/30C/nI2c55adA==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-20.3.1.tgz", + "integrity": "sha512-elg2GiSivMHU1iLFYZ+FojM2V/FmTlC8e5FKM6nZ+bIqeoBoJm8Rxxe/kEtcsPdvjj+YiKSmXOP9s45DJb9WWw==", "cpu": [ "x64" ], @@ -1929,9 +2164,9 @@ } }, "node_modules/@nx/nx-freebsd-x64": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-20.3.0.tgz", - "integrity": "sha512-DiymYZBBu0upbiskdfn9KRyoXdyvKohezJiV3j4VkeRE8KR2p04NgwRQviDFbeD1cjWrDy9wk8y+G5PabLlqAA==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-20.3.1.tgz", + "integrity": "sha512-1iKZOCcU7bVAC2kdoukfJ7AOTLBhm69+vPff3HCJQ0DI/5ZbmiaPeBMsAVFtJ0jFGix8yYIhgvtXgDEfbXXRFQ==", "cpu": [ "x64" ], @@ -1946,9 +2181,9 @@ } }, "node_modules/@nx/nx-linux-arm-gnueabihf": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-20.3.0.tgz", - "integrity": "sha512-Aksx66e8jmt/4rGJ/5z34SWXbPcYr9Ht52UonEeuCdQdoEvAOs7yBUbllYOjIcUsfZikEyZgvqfiQslsggSJdQ==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-20.3.1.tgz", + "integrity": "sha512-LAteJ1/mWYdvj7zpXuWRUq1lvUiV6YVXCdFK3+7lDW+qvW3bb5zzUwbVDAF/pPeTjBrsdHDzSWOCLm/LKtYtMw==", "cpu": [ "arm" ], @@ -1963,9 +2198,9 @@ } }, "node_modules/@nx/nx-linux-arm64-gnu": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-20.3.0.tgz", - "integrity": "sha512-Y5wmYEwF1bl014Ps8QjagI911VbViQSFHSTVOCNSObdAzig9E5o6NOkoWe+doT1UZLrrInnlkrggQUsbtdKjOg==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-20.3.1.tgz", + "integrity": "sha512-2Qf+6NcAeODELyJR+V9hjC9kl2DwJTdI7Bw+BuiyXftfPHvZ86P//FC8kPjNaJCEEm/ZStP6Jcb1zlp4Eo2wBw==", "cpu": [ "arm64" ], @@ -1980,9 +2215,9 @@ } }, "node_modules/@nx/nx-linux-arm64-musl": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-20.3.0.tgz", - "integrity": "sha512-yGcIkmImyOMfPkQSYH2EVjPmFE0VkLcO71Bbkpr3RlJ1N/vjYxsGbdnqPiBb8Wshib/hmwpiMHf/yzQtKH0SQw==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-20.3.1.tgz", + "integrity": "sha512-8S8jlN6GFQpRakZ2ZVWq6eFnLVrEObIaxnYD0QMbsMf+qiedDJt+cDh1xebcPRvgpSgJVlJ8P6hun5+K/FiQDQ==", "cpu": [ "arm64" ], @@ -1997,9 +2232,9 @@ } }, "node_modules/@nx/nx-linux-x64-gnu": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-20.3.0.tgz", - "integrity": "sha512-nkA2DLI+rpmiuiy7dyXP4l9s7dgHkQWDX7lG1XltiT41RzAReJF1h8qBE6XrsAYE1CtI76DRWVphnc93+iZr+A==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-20.3.1.tgz", + "integrity": "sha512-qC2On2qwYCtn/Kt8epvUn0H3NY6zG9yYhiNjkm6RvVTDmvogFQ4gtfiWSRP/EnabCRqM8FACDIO/ws5CnRBX+Q==", "cpu": [ "x64" ], @@ -2014,9 +2249,9 @@ } }, "node_modules/@nx/nx-linux-x64-musl": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-20.3.0.tgz", - "integrity": "sha512-sPMtTt9iTrCmFEIp9Qv27UX9PeL1aqKck2dz2TAFbXKVtF6+djOdTcNnTYw45KIP6izcUcOXXAq4G0QSQE7CLg==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-20.3.1.tgz", + "integrity": "sha512-KKwHSfV1PEKW82eJ8vxZTPepoaLbaXH/aI0VOKZbBO4ytGyGUr9wFuWPsyo06rK7qtSD7w9bN7xpiBGQk0QTsg==", "cpu": [ "x64" ], @@ -2031,9 +2266,9 @@ } }, "node_modules/@nx/nx-win32-arm64-msvc": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-20.3.0.tgz", - "integrity": "sha512-ppfNa/8OfpWA9o26Pz3vArN4ulAC+Hx70/ghPRCP7ed1Mb3Z6yR2Ry9KfBRImbqajvuAExM0TePKMGq9LCdXmg==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-20.3.1.tgz", + "integrity": "sha512-YujkXXHn9rhtwZRDxiaxSPOMX7JkfGmXAFdyEfxhE3Dc/HjFgI+xJZ478/atttR7DWIwGpQJVLpbFWbFFpoNNg==", "cpu": [ "arm64" ], @@ -2048,9 +2283,9 @@ } }, "node_modules/@nx/nx-win32-x64-msvc": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-20.3.0.tgz", - "integrity": "sha512-8FOejZ4emtLSVn3pYWs4PIc3n4//qMbwMDPVxmPE8us3ir91Qh0bzr5zRj7Q8sEdSgvneXRXqtBp2grY2KMJsw==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-20.3.1.tgz", + "integrity": "sha512-Os8iCamvHhE5noQKFE9D9xkiI529918tufTYmEhJ9ZmLU/ybVA0We6r7gXjYzdNfA3DtwfGXvNvUpy3u+pZXOg==", "cpu": [ "x64" ], @@ -2075,17 +2310,17 @@ } }, "node_modules/@octokit/core": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.2.tgz", - "integrity": "sha512-hEb7Ma4cGJGEUNOAVmyfdB/3WirWMg5hDuNFVejGEDFqupeOysLc2sG6HJxY2etBp5YQu5Wtxwi020jS9xlUwg==", + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.3.tgz", + "integrity": "sha512-z+j7DixNnfpdToYsOutStDgeRzJSMnbj8T1C/oQjB6Aa+kRfNjs/Fn7W6c8bmlt6mfy3FkgeKBRnDjxQow5dow==", "dev": true, "license": "MIT", "dependencies": { "@octokit/auth-token": "^5.0.0", - "@octokit/graphql": "^8.0.0", - "@octokit/request": "^9.0.0", - "@octokit/request-error": "^6.0.1", - "@octokit/types": "^13.0.0", + "@octokit/graphql": "^8.1.2", + "@octokit/request": "^9.1.4", + "@octokit/request-error": "^6.1.6", + "@octokit/types": "^13.6.2", "before-after-hook": "^3.0.2", "universal-user-agent": "^7.0.0" }, @@ -2123,9 +2358,9 @@ } }, "node_modules/@octokit/openapi-types": { - "version": "22.2.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-22.2.0.tgz", - "integrity": "sha512-QBhVjcUa9W7Wwhm6DBFu6ZZ+1/t/oYxqc2tp81Pi41YNuJinbFRx8B133qVOrAaBbF7D/m0Et6f9/pZt9Rc+tg==", + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz", + "integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g==", "dev": true, "license": "MIT" }, @@ -2137,13 +2372,13 @@ "license": "MIT" }, "node_modules/@octokit/plugin-paginate-rest": { - "version": "11.3.6", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.3.6.tgz", - "integrity": "sha512-zcvqqf/+TicbTCa/Z+3w4eBJcAxCFymtc0UAIsR3dEVoNilWld4oXdscQ3laXamTszUZdusw97K8+DrbFiOwjw==", + "version": "11.4.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.4.0.tgz", + "integrity": "sha512-ttpGck5AYWkwMkMazNCZMqxKqIq1fJBNxBfsFwwfyYKTf914jKkLF0POMS3YkPBwp5g1c2Y4L79gDz01GhSr1g==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/types": "^13.6.2" + "@octokit/types": "^13.7.0" }, "engines": { "node": ">= 18" @@ -2196,14 +2431,14 @@ } }, "node_modules/@octokit/plugin-retry": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-7.1.2.tgz", - "integrity": "sha512-XOWnPpH2kJ5VTwozsxGurw+svB2e61aWlmk5EVIYZPwFK5F9h4cyPyj9CIKRyMXMHSwpIsI3mPOdpMmrRhe7UQ==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-7.1.3.tgz", + "integrity": "sha512-8nKOXvYWnzv89gSyIvgFHmCBAxfQAOPRlkacUHL9r5oWtp5Whxl8Skb2n3ACZd+X6cYijD6uvmrQuPH/UCL5zQ==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/request-error": "^6.0.0", - "@octokit/types": "^13.0.0", + "@octokit/request-error": "^6.1.6", + "@octokit/types": "^13.6.2", "bottleneck": "^2.15.3" }, "engines": { @@ -2214,20 +2449,20 @@ } }, "node_modules/@octokit/plugin-throttling": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-9.3.2.tgz", - "integrity": "sha512-FqpvcTpIWFpMMwIeSoypoJXysSAQ3R+ALJhXXSG1HTP3YZOIeLmcNcimKaXxTcws+Sh6yoRl13SJ5r8sXc1Fhw==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-9.4.0.tgz", + "integrity": "sha512-IOlXxXhZA4Z3m0EEYtrrACkuHiArHLZ3CvqWwOez/pURNqRuwfoFlTPbN5Muf28pzFuztxPyiUiNwz8KctdZaQ==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/types": "^13.0.0", + "@octokit/types": "^13.7.0", "bottleneck": "^2.15.3" }, "engines": { "node": ">= 18" }, "peerDependencies": { - "@octokit/core": "^6.0.0" + "@octokit/core": "^6.1.3" } }, "node_modules/@octokit/request": { @@ -2434,13 +2669,13 @@ "license": "MIT" }, "node_modules/@octokit/types": { - "version": "13.6.2", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.6.2.tgz", - "integrity": "sha512-WpbZfZUcZU77DrSW4wbsSgTPfKcp286q3ItaIgvSbBpZJlu6mnYXAkjZz6LVZPXkEvLIM8McanyZejKTYUHipA==", + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.7.0.tgz", + "integrity": "sha512-BXfRP+3P3IN6fd4uF3SniaHKOO4UXWBfkdR3vA8mIvaoO/wLjGN5qivUtW0QRitBHHMcfC41SLhNVYIZZE+wkA==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/openapi-types": "^22.2.0" + "@octokit/openapi-types": "^23.0.1" } }, "node_modules/@pkgjs/parseargs": { @@ -2568,9 +2803,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.29.1.tgz", - "integrity": "sha512-ssKhA8RNltTZLpG6/QNkCSge+7mBQGUqJRisZ2MDQcEGaK93QESEgWK2iOpIDZ7k9zPVkG5AS3ksvD5ZWxmItw==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.30.1.tgz", + "integrity": "sha512-pSWY+EVt3rJ9fQ3IqlrEUtXh3cGqGtPDH1FQlNZehO2yYxCHEX1SPsz1M//NXwYfbTlcKr9WObLnJX9FsS9K1Q==", "cpu": [ "arm" ], @@ -2582,9 +2817,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.29.1.tgz", - "integrity": "sha512-CaRfrV0cd+NIIcVVN/jx+hVLN+VRqnuzLRmfmlzpOzB87ajixsN/+9L5xNmkaUUvEbI5BmIKS+XTwXsHEb65Ew==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.30.1.tgz", + "integrity": "sha512-/NA2qXxE3D/BRjOJM8wQblmArQq1YoBVJjrjoTSBS09jgUisq7bqxNHJ8kjCHeV21W/9WDGwJEWSN0KQ2mtD/w==", "cpu": [ "arm64" ], @@ -2596,9 +2831,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.29.1.tgz", - "integrity": "sha512-2ORr7T31Y0Mnk6qNuwtyNmy14MunTAMx06VAPI6/Ju52W10zk1i7i5U3vlDRWjhOI5quBcrvhkCHyF76bI7kEw==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.30.1.tgz", + "integrity": "sha512-r7FQIXD7gB0WJ5mokTUgUWPl0eYIH0wnxqeSAhuIwvnnpjdVB8cRRClyKLQr7lgzjctkbp5KmswWszlwYln03Q==", "cpu": [ "arm64" ], @@ -2610,9 +2845,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.29.1.tgz", - "integrity": "sha512-j/Ej1oanzPjmN0tirRd5K2/nncAhS9W6ICzgxV+9Y5ZsP0hiGhHJXZ2JQ53iSSjj8m6cRY6oB1GMzNn2EUt6Ng==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.30.1.tgz", + "integrity": "sha512-x78BavIwSH6sqfP2xeI1hd1GpHL8J4W2BXcVM/5KYKoAD3nNsfitQhvWSw+TFtQTLZ9OmlF+FEInEHyubut2OA==", "cpu": [ "x64" ], @@ -2624,9 +2859,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.29.1.tgz", - "integrity": "sha512-91C//G6Dm/cv724tpt7nTyP+JdN12iqeXGFM1SqnljCmi5yTXriH7B1r8AD9dAZByHpKAumqP1Qy2vVNIdLZqw==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.30.1.tgz", + "integrity": "sha512-HYTlUAjbO1z8ywxsDFWADfTRfTIIy/oUlfIDmlHYmjUP2QRDTzBuWXc9O4CXM+bo9qfiCclmHk1x4ogBjOUpUQ==", "cpu": [ "arm64" ], @@ -2638,9 +2873,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.29.1.tgz", - "integrity": "sha512-hEioiEQ9Dec2nIRoeHUP6hr1PSkXzQaCUyqBDQ9I9ik4gCXQZjJMIVzoNLBRGet+hIUb3CISMh9KXuCcWVW/8w==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.30.1.tgz", + "integrity": "sha512-1MEdGqogQLccphhX5myCJqeGNYTNcmTyaic9S7CG3JhwuIByJ7J05vGbZxsizQthP1xpVx7kd3o31eOogfEirw==", "cpu": [ "x64" ], @@ -2652,9 +2887,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.29.1.tgz", - "integrity": "sha512-Py5vFd5HWYN9zxBv3WMrLAXY3yYJ6Q/aVERoeUFwiDGiMOWsMs7FokXihSOaT/PMWUty/Pj60XDQndK3eAfE6A==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.30.1.tgz", + "integrity": "sha512-PaMRNBSqCx7K3Wc9QZkFx5+CX27WFpAMxJNiYGAXfmMIKC7jstlr32UhTgK6T07OtqR+wYlWm9IxzennjnvdJg==", "cpu": [ "arm" ], @@ -2666,9 +2901,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.29.1.tgz", - "integrity": "sha512-RiWpGgbayf7LUcuSNIbahr0ys2YnEERD4gYdISA06wa0i8RALrnzflh9Wxii7zQJEB2/Eh74dX4y/sHKLWp5uQ==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.30.1.tgz", + "integrity": "sha512-B8Rcyj9AV7ZlEFqvB5BubG5iO6ANDsRKlhIxySXcF1axXYUyqwBok+XZPgIYGBgs7LDXfWfifxhw0Ik57T0Yug==", "cpu": [ "arm" ], @@ -2680,9 +2915,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.29.1.tgz", - "integrity": "sha512-Z80O+taYxTQITWMjm/YqNoe9d10OX6kDh8X5/rFCMuPqsKsSyDilvfg+vd3iXIqtfmp+cnfL1UrYirkaF8SBZA==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.30.1.tgz", + "integrity": "sha512-hqVyueGxAj3cBKrAI4aFHLV+h0Lv5VgWZs9CUGqr1z0fZtlADVV1YPOij6AhcK5An33EXaxnDLmJdQikcn5NEw==", "cpu": [ "arm64" ], @@ -2694,9 +2929,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.29.1.tgz", - "integrity": "sha512-fOHRtF9gahwJk3QVp01a/GqS4hBEZCV1oKglVVq13kcK3NeVlS4BwIFzOHDbmKzt3i0OuHG4zfRP0YoG5OF/rA==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.30.1.tgz", + "integrity": "sha512-i4Ab2vnvS1AE1PyOIGp2kXni69gU2DAUVt6FSXeIqUCPIR3ZlheMW3oP2JkukDfu3PsexYRbOiJrY+yVNSk9oA==", "cpu": [ "arm64" ], @@ -2708,9 +2943,9 @@ ] }, "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.29.1.tgz", - "integrity": "sha512-5a7q3tnlbcg0OodyxcAdrrCxFi0DgXJSoOuidFUzHZ2GixZXQs6Tc3CHmlvqKAmOs5eRde+JJxeIf9DonkmYkw==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.30.1.tgz", + "integrity": "sha512-fARcF5g296snX0oLGkVxPmysetwUk2zmHcca+e9ObOovBR++9ZPOhqFUM61UUZ2EYpXVPN1redgqVoBB34nTpQ==", "cpu": [ "loong64" ], @@ -2722,9 +2957,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.29.1.tgz", - "integrity": "sha512-9b4Mg5Yfz6mRnlSPIdROcfw1BU22FQxmfjlp/CShWwO3LilKQuMISMTtAu/bxmmrE6A902W2cZJuzx8+gJ8e9w==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.30.1.tgz", + "integrity": "sha512-GLrZraoO3wVT4uFXh67ElpwQY0DIygxdv0BNW9Hkm3X34wu+BkqrDrkcsIapAY+N2ATEbvak0XQ9gxZtCIA5Rw==", "cpu": [ "ppc64" ], @@ -2736,9 +2971,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.29.1.tgz", - "integrity": "sha512-G5pn0NChlbRM8OJWpJFMX4/i8OEU538uiSv0P6roZcbpe/WfhEO+AT8SHVKfp8qhDQzaz7Q+1/ixMy7hBRidnQ==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.30.1.tgz", + "integrity": "sha512-0WKLaAUUHKBtll0wvOmh6yh3S0wSU9+yas923JIChfxOaaBarmb/lBKPF0w/+jTVozFnOXJeRGZ8NvOxvk/jcw==", "cpu": [ "riscv64" ], @@ -2750,9 +2985,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.29.1.tgz", - "integrity": "sha512-WM9lIkNdkhVwiArmLxFXpWndFGuOka4oJOZh8EP3Vb8q5lzdSCBuhjavJsw68Q9AKDGeOOIHYzYm4ZFvmWez5g==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.30.1.tgz", + "integrity": "sha512-GWFs97Ruxo5Bt+cvVTQkOJ6TIx0xJDD/bMAOXWJg8TCSTEK8RnFeOeiFTxKniTc4vMIaWvCplMAFBt9miGxgkA==", "cpu": [ "s390x" ], @@ -2764,9 +2999,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.29.1.tgz", - "integrity": "sha512-87xYCwb0cPGZFoGiErT1eDcssByaLX4fc0z2nRM6eMtV9njAfEE6OW3UniAoDhX4Iq5xQVpE6qO9aJbCFumKYQ==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.30.1.tgz", + "integrity": "sha512-UtgGb7QGgXDIO+tqqJ5oZRGHsDLO8SlpE4MhqpY9Llpzi5rJMvrK6ZGhsRCST2abZdBqIBeXW6WPD5fGK5SDwg==", "cpu": [ "x64" ], @@ -2777,9 +3012,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.29.1.tgz", - "integrity": "sha512-xufkSNppNOdVRCEC4WKvlR1FBDyqCSCpQeMMgv9ZyXqqtKBfkw1yfGMTUTs9Qsl6WQbJnsGboWCp7pJGkeMhKA==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.30.1.tgz", + "integrity": "sha512-V9U8Ey2UqmQsBT+xTOeMzPzwDzyXmnAoO4edZhL7INkwQcaW1Ckv3WJX3qrrp/VHaDkEWIBWhRwP47r8cdrOow==", "cpu": [ "x64" ], @@ -2791,9 +3026,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.29.1.tgz", - "integrity": "sha512-F2OiJ42m77lSkizZQLuC+jiZ2cgueWQL5YC9tjo3AgaEw+KJmVxHGSyQfDUoYR9cci0lAywv2Clmckzulcq6ig==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.30.1.tgz", + "integrity": "sha512-WabtHWiPaFF47W3PkHnjbmWawnX/aE57K47ZDT1BXTS5GgrBUEpvOzq0FI0V/UYzQJgdb8XlhVNH8/fwV8xDjw==", "cpu": [ "arm64" ], @@ -2805,9 +3040,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.29.1.tgz", - "integrity": "sha512-rYRe5S0FcjlOBZQHgbTKNrqxCBUmgDJem/VQTCcTnA2KCabYSWQDrytOzX7avb79cAAweNmMUb/Zw18RNd4mng==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.30.1.tgz", + "integrity": "sha512-pxHAU+Zv39hLUTdQQHUVHf4P+0C47y/ZloorHpzs2SXMRqeAWmGghzAhfOlzFHHwjvgokdFAhC4V+6kC1lRRfw==", "cpu": [ "ia32" ], @@ -2819,9 +3054,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.29.1.tgz", - "integrity": "sha512-+10CMg9vt1MoHj6x1pxyjPSMjHTIlqs8/tBztXvPAx24SKs9jwVnKqHJumlH/IzhaPUaj3T6T6wfZr8okdXaIg==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.30.1.tgz", + "integrity": "sha512-D6qjsXGcvhTjv0kI4fU8tUuBDF/Ueee4SVX79VfNDXZa64TfCW1Slkb6Z7O1p7vflqZjcmOVdZlqf8gvJxc6og==", "cpu": [ "x64" ], @@ -2859,9 +3094,9 @@ } }, "node_modules/@semantic-release/commit-analyzer": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/@semantic-release/commit-analyzer/-/commit-analyzer-13.0.0.tgz", - "integrity": "sha512-KtXWczvTAB1ZFZ6B4O+w8HkfYm/OgQb1dUGNFZtDgQ0csggrmkq8sTxhd+lwGF8kMb59/RnG9o4Tn7M/I8dQ9Q==", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@semantic-release/commit-analyzer/-/commit-analyzer-13.0.1.tgz", + "integrity": "sha512-wdnBPHKkr9HhNhXOhZD5a2LNl91+hs8CC2vsAVYxtZH3y0dV3wKn+uZSN61rdJQZ8EGxzWB3inWocBHV9+u/CQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2870,7 +3105,7 @@ "conventional-commits-filter": "^5.0.0", "conventional-commits-parser": "^6.0.0", "debug": "^4.0.0", - "import-from-esm": "^1.0.3", + "import-from-esm": "^2.0.0", "lodash-es": "^4.17.21", "micromatch": "^4.0.2" }, @@ -3313,9 +3548,9 @@ } }, "node_modules/@semantic-release/release-notes-generator": { - "version": "14.0.2", - "resolved": "https://registry.npmjs.org/@semantic-release/release-notes-generator/-/release-notes-generator-14.0.2.tgz", - "integrity": "sha512-ur2l2tVLBfX3fSEO2rCy2X6Kzg5S7BHGqdwTHvJrpWp4mOEN7W4K/2kWAjvfAlwMenEKjMnDIhBbxxjnP0S9hw==", + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/@semantic-release/release-notes-generator/-/release-notes-generator-14.0.3.tgz", + "integrity": "sha512-XxAZRPWGwO5JwJtS83bRdoIhCiYIx8Vhr+u231pQAsdFIAbm19rSVJLdnBN+Avvk7CKvNQE/nJ4y7uqKH6WTiw==", "dev": true, "license": "MIT", "dependencies": { @@ -3325,7 +3560,7 @@ "conventional-commits-parser": "^6.0.0", "debug": "^4.0.0", "get-stream": "^7.0.0", - "import-from-esm": "^1.0.3", + "import-from-esm": "^2.0.0", "into-stream": "^7.0.0", "lodash-es": "^4.17.21", "read-package-up": "^11.0.0" @@ -3350,31 +3585,31 @@ } }, "node_modules/@shikijs/engine-oniguruma": { - "version": "1.24.4", - "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.24.4.tgz", - "integrity": "sha512-Do2ry6flp2HWdvpj2XOwwa0ljZBRy15HKZITzPcNIBOGSeprnA8gOooA/bLsSPuy8aJBa+Q/r34dMmC3KNL/zw==", + "version": "1.26.1", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.26.1.tgz", + "integrity": "sha512-F5XuxN1HljLuvfXv7d+mlTkV7XukC1cawdtOo+7pKgPD83CAB1Sf8uHqP3PK0u7njFH0ZhoXE1r+0JzEgAQ+kg==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/types": "1.24.4", - "@shikijs/vscode-textmate": "^9.3.1" + "@shikijs/types": "1.26.1", + "@shikijs/vscode-textmate": "^10.0.1" } }, "node_modules/@shikijs/types": { - "version": "1.24.4", - "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-1.24.4.tgz", - "integrity": "sha512-0r0XU7Eaow0PuDxuWC1bVqmWCgm3XqizIaT7SM42K03vc69LGooT0U8ccSR44xP/hGlNx4FKhtYpV+BU6aaKAA==", + "version": "1.26.1", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-1.26.1.tgz", + "integrity": "sha512-d4B00TKKAMaHuFYgRf3L0gwtvqpW4hVdVwKcZYbBfAAQXspgkbWqnFfuFl3MDH6gLbsubOcr+prcnsqah3ny7Q==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/vscode-textmate": "^9.3.1", + "@shikijs/vscode-textmate": "^10.0.1", "@types/hast": "^3.0.4" } }, "node_modules/@shikijs/vscode-textmate": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-9.3.1.tgz", - "integrity": "sha512-79QfK1393x9Ho60QFyLti+QfdJzRQCVLFb97kOIV7Eo9vQU/roINgk7m24uv0a7AUvN//RDH36FLjjK48v0s9g==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.1.tgz", + "integrity": "sha512-fTIQwLF+Qhuws31iw7Ncl1R3HUDtGwIipiJ9iU+UsDUwMhegFcQKQHd51nZjb7CArq0MvON8rbgCGQYWHUKAdg==", "dev": true, "license": "MIT" }, @@ -3543,6 +3778,7 @@ "os": [ "darwin" ], + "peer": true, "engines": { "node": ">=10" } @@ -3560,6 +3796,7 @@ "os": [ "darwin" ], + "peer": true, "engines": { "node": ">=10" } @@ -3577,6 +3814,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -3594,6 +3832,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -3611,6 +3850,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -3628,6 +3868,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -3645,6 +3886,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -3662,6 +3904,7 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": ">=10" } @@ -3679,6 +3922,7 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": ">=10" } @@ -3696,6 +3940,7 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": ">=10" } @@ -3990,9 +4235,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.17.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.11.tgz", - "integrity": "sha512-Ept5glCK35R8yeyIeYlRIZtX6SLRyqMhOFTgj5SOkMpLTdw3SEHI9fHx60xaUZ+V1aJxQJODE+7/j5ocZydYTg==", + "version": "20.17.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.12.tgz", + "integrity": "sha512-vo/wmBgMIiEA23A/knMfn/cf37VnuF52nZh5ZoW0GWt4e4sxNquibrMRJ7UQsA06+MBx9r/H1jsI9grYjQCQlw==", "dev": true, "license": "MIT", "dependencies": { @@ -4086,6 +4331,7 @@ "dev": true, "license": "MIT", "optional": true, + "peer": true, "dependencies": { "@types/node": "*" } @@ -4737,9 +4983,9 @@ } }, "node_modules/archiver-utils/node_modules/readable-stream": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.6.0.tgz", - "integrity": "sha512-cbAdYt0VcnpN2Bekq7PU+k363ZRsPwJoEEJOEtSJQlJXzwaxt3FIo/uL+KeDSGIjJqtkwyge4KQgD2S2kd+CQw==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz", + "integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==", "dev": true, "license": "MIT", "dependencies": { @@ -4785,9 +5031,9 @@ } }, "node_modules/archiver/node_modules/readable-stream": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.6.0.tgz", - "integrity": "sha512-cbAdYt0VcnpN2Bekq7PU+k363ZRsPwJoEEJOEtSJQlJXzwaxt3FIo/uL+KeDSGIjJqtkwyge4KQgD2S2kd+CQw==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz", + "integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==", "dev": true, "license": "MIT", "dependencies": { @@ -4976,12 +5222,13 @@ "license": "MIT" }, "node_modules/bare-events": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.5.0.tgz", - "integrity": "sha512-/E8dDe9dsbLyh2qrZ64PEPadOQ0F4gbl1sUJOrmph7xOiIxfY8vwab/4bFLh4Y88/Hk/ujKcrQKc+ps0mv873A==", + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.5.3.tgz", + "integrity": "sha512-pCO3aoRJ0MBiRMu8B7vUga0qL3L7gO1+SW7ku6qlSsMLwuhaawnuvZDyzJY/kyC63Un0XAB0OPUcfF1eTO/V+Q==", "dev": true, "license": "Apache-2.0", - "optional": true + "optional": true, + "peer": true }, "node_modules/bare-fs": { "version": "2.3.5", @@ -4990,6 +5237,7 @@ "dev": true, "license": "Apache-2.0", "optional": true, + "peer": true, "dependencies": { "bare-events": "^2.0.0", "bare-path": "^2.0.0", @@ -5002,7 +5250,8 @@ "integrity": "sha512-z3UiI2yi1mK0sXeRdc4O1Kk8aOa/e+FNWZcTiPB/dfTWyLypuE99LibgRaQki914Jq//yAWylcAt+mknKdixRQ==", "dev": true, "license": "Apache-2.0", - "optional": true + "optional": true, + "peer": true }, "node_modules/bare-path": { "version": "2.1.3", @@ -5011,6 +5260,7 @@ "dev": true, "license": "Apache-2.0", "optional": true, + "peer": true, "dependencies": { "bare-os": "^2.1.0" } @@ -5022,6 +5272,7 @@ "dev": true, "license": "Apache-2.0", "optional": true, + "peer": true, "dependencies": { "streamx": "^2.21.0" } @@ -5193,9 +5444,9 @@ } }, "node_modules/browserslist": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.3.tgz", - "integrity": "sha512-1CPmv8iobE2fyRMV97dAcMVegvvWKxmq94hkLiAkUGwKVTyDLw33K+ZxiFrREKmmps4rIw6grcCFCnTMSZ/YiA==", + "version": "4.24.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", + "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", "dev": true, "funding": [ { @@ -5370,9 +5621,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001690", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001690.tgz", - "integrity": "sha512-5ExiE3qQN6oF8Clf8ifIDcMRCRE/dMGcETG/XGMD8/XiXm6HXQgQTh1yZYLXXpSOsEUlJm1Xr7kGULZTuGtP/w==", + "version": "1.0.30001692", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001692.tgz", + "integrity": "sha512-A95VKan0kdtrsnMubMKxEKUKImOPSuCpYgxSQBo036P5YYgVIcOYJEgt/txJWqObiRQeISNCfef9nvlQ0vbV7A==", "dev": true, "funding": [ { @@ -5916,9 +6167,9 @@ } }, "node_modules/compress-commons/node_modules/readable-stream": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.6.0.tgz", - "integrity": "sha512-cbAdYt0VcnpN2Bekq7PU+k363ZRsPwJoEEJOEtSJQlJXzwaxt3FIo/uL+KeDSGIjJqtkwyge4KQgD2S2kd+CQw==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz", + "integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==", "dev": true, "license": "MIT", "dependencies": { @@ -6990,9 +7241,9 @@ } }, "node_modules/crc32-stream/node_modules/readable-stream": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.6.0.tgz", - "integrity": "sha512-cbAdYt0VcnpN2Bekq7PU+k363ZRsPwJoEEJOEtSJQlJXzwaxt3FIo/uL+KeDSGIjJqtkwyge4KQgD2S2kd+CQw==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz", + "integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==", "dev": true, "license": "MIT", "dependencies": { @@ -7152,18 +7403,26 @@ } }, "node_modules/cssstyle": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.1.0.tgz", - "integrity": "sha512-h66W1URKpBS5YMI/V8PyXvTMFT8SupJ1IzoIV8IeBC/ji8WVmrO8dGlTi+2dh6whmdk6BiKJLD/ZBkhWbcg6nA==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.2.1.tgz", + "integrity": "sha512-9+vem03dMXG7gDmZ62uqmRiMRNtinIZ9ZyuF6BdxzfOD+FdN5hretzynkn0ReS2DO2GSw76RWHs0UmJPI2zUjw==", "dev": true, "license": "MIT", "dependencies": { - "rrweb-cssom": "^0.7.1" + "@asamuzakjp/css-color": "^2.8.2", + "rrweb-cssom": "^0.8.0" }, "engines": { "node": ">=18" } }, + "node_modules/cssstyle/node_modules/rrweb-cssom": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.8.0.tgz", + "integrity": "sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==", + "dev": true, + "license": "MIT" + }, "node_modules/csstype": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", @@ -7511,9 +7770,9 @@ } }, "node_modules/domutils": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.1.tgz", - "integrity": "sha512-xWXmuRnN9OMP6ptPd2+H0cCbcYBULa5YDTbMm/2lvkWvNA3O4wcW+GvzooqBuNM8yy6pl3VIAeJTUUWUbfI5Fw==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz", + "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -7722,9 +7981,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.76", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.76.tgz", - "integrity": "sha512-CjVQyG7n7Sr+eBXE86HIulnL5N8xZY1sgmOPGuq/F0Rr0FJq63lg0kEtOIDfZBk44FnDLf6FUJ+dsJcuiUDdDQ==", + "version": "1.5.79", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.79.tgz", + "integrity": "sha512-nYOxJNxQ9Om4EC88BE4pPoNI8xwSFf8pU/BAeOl4Hh/b/i6V4biTAzwV7pXi3ARKeoYO5JZKMIXTryXSVer5RA==", "dev": true, "license": "ISC" }, @@ -8029,42 +8288,45 @@ } }, "node_modules/esbuild": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", - "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.2.tgz", + "integrity": "sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==", "dev": true, "hasInstallScript": true, "license": "MIT", + "peer": true, "bin": { "esbuild": "bin/esbuild" }, "engines": { - "node": ">=12" + "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.21.5", - "@esbuild/android-arm": "0.21.5", - "@esbuild/android-arm64": "0.21.5", - "@esbuild/android-x64": "0.21.5", - "@esbuild/darwin-arm64": "0.21.5", - "@esbuild/darwin-x64": "0.21.5", - "@esbuild/freebsd-arm64": "0.21.5", - "@esbuild/freebsd-x64": "0.21.5", - "@esbuild/linux-arm": "0.21.5", - "@esbuild/linux-arm64": "0.21.5", - "@esbuild/linux-ia32": "0.21.5", - "@esbuild/linux-loong64": "0.21.5", - "@esbuild/linux-mips64el": "0.21.5", - "@esbuild/linux-ppc64": "0.21.5", - "@esbuild/linux-riscv64": "0.21.5", - "@esbuild/linux-s390x": "0.21.5", - "@esbuild/linux-x64": "0.21.5", - "@esbuild/netbsd-x64": "0.21.5", - "@esbuild/openbsd-x64": "0.21.5", - "@esbuild/sunos-x64": "0.21.5", - "@esbuild/win32-arm64": "0.21.5", - "@esbuild/win32-ia32": "0.21.5", - "@esbuild/win32-x64": "0.21.5" + "@esbuild/aix-ppc64": "0.24.2", + "@esbuild/android-arm": "0.24.2", + "@esbuild/android-arm64": "0.24.2", + "@esbuild/android-x64": "0.24.2", + "@esbuild/darwin-arm64": "0.24.2", + "@esbuild/darwin-x64": "0.24.2", + "@esbuild/freebsd-arm64": "0.24.2", + "@esbuild/freebsd-x64": "0.24.2", + "@esbuild/linux-arm": "0.24.2", + "@esbuild/linux-arm64": "0.24.2", + "@esbuild/linux-ia32": "0.24.2", + "@esbuild/linux-loong64": "0.24.2", + "@esbuild/linux-mips64el": "0.24.2", + "@esbuild/linux-ppc64": "0.24.2", + "@esbuild/linux-riscv64": "0.24.2", + "@esbuild/linux-s390x": "0.24.2", + "@esbuild/linux-x64": "0.24.2", + "@esbuild/netbsd-arm64": "0.24.2", + "@esbuild/netbsd-x64": "0.24.2", + "@esbuild/openbsd-arm64": "0.24.2", + "@esbuild/openbsd-x64": "0.24.2", + "@esbuild/sunos-x64": "0.24.2", + "@esbuild/win32-arm64": "0.24.2", + "@esbuild/win32-ia32": "0.24.2", + "@esbuild/win32-x64": "0.24.2" } }, "node_modules/esbuild-node-externals": { @@ -8134,9 +8396,9 @@ } }, "node_modules/esbuild/node_modules/@esbuild/darwin-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", - "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.2.tgz", + "integrity": "sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==", "cpu": [ "arm64" ], @@ -8146,8 +8408,9 @@ "os": [ "darwin" ], + "peer": true, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/escalade": { @@ -8383,10 +8646,20 @@ } }, "node_modules/fast-content-type-parse": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-2.0.0.tgz", - "integrity": "sha512-fCqg/6Sps8tqk8p+kqyKqYfOF0VjPNYrqpLiqNl0RBKmD80B080AJWVV6EkSkscjToNExcXg1+Mfzftrx6+iSA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-2.0.1.tgz", + "integrity": "sha512-nGqtvLrj5w0naR6tDPfB4cUmYCqouzyQiz6C5y/LtcDllJdrcc6WaWW6iXyIIOErTa/XRybj28aasdn4LkVk6Q==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], "license": "MIT" }, "node_modules/fast-deep-equal": { @@ -8404,9 +8677,9 @@ "license": "MIT" }, "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dev": true, "license": "MIT", "dependencies": { @@ -8414,7 +8687,7 @@ "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "micromatch": "^4.0.8" }, "engines": { "node": ">=8.6.0" @@ -9906,9 +10179,9 @@ "license": "MIT" }, "node_modules/htmlfy": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/htmlfy/-/htmlfy-0.5.0.tgz", - "integrity": "sha512-/g4imybF9k7eJT+VEsjtpx1i3BHYxFxv6/RS0Lf8veh1+pw0HzAEndGTdjvrlVRqUSu7YurJZkfnLXpVZ2yrEw==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/htmlfy/-/htmlfy-0.5.1.tgz", + "integrity": "sha512-nb66M9g0zKrvmR3kk/WOM+5tOT3DzO1yJ4yEJXsz2zfZ3gXiCTrlGvbc4lQzTZyylJj7at+XSVDxFvAVH6J6tQ==", "dev": true, "license": "MIT" }, @@ -10069,9 +10342,9 @@ } }, "node_modules/import-from-esm": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/import-from-esm/-/import-from-esm-1.3.4.tgz", - "integrity": "sha512-7EyUlPFC0HOlBDpUFGfYstsU7XHxZJKAAMzCT8wZ0hMW7b+hG51LIKTDcsgtz8Pu6YC0HqRVbX+rVUtsGMUKvg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-from-esm/-/import-from-esm-2.0.0.tgz", + "integrity": "sha512-YVt14UZCgsX1vZQ3gKjkWVdBdHQ6eu3MPU1TBgL1H5orXe2+jWD006WCPPtOuwlQm10NuzOW5WawiF1Q9veW8g==", "dev": true, "license": "MIT", "dependencies": { @@ -10079,7 +10352,7 @@ "import-meta-resolve": "^4.0.0" }, "engines": { - "node": ">=16.20" + "node": ">=18.20" } }, "node_modules/import-local": { @@ -15469,9 +15742,9 @@ "license": "MIT" }, "node_modules/nx": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/nx/-/nx-20.3.0.tgz", - "integrity": "sha512-Nzi4k7tV22zwO2iBLk+pHxorLEWPJpPrVCACtz0SQ63j/LiAgfhoqruJO+VU+V+E9qdyPsvmqIL/Iaf/GRQlqA==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/nx/-/nx-20.3.1.tgz", + "integrity": "sha512-pO48DoQAwVKBEF7/od3bc1tHBYfafgiuS/hHX3yGmhpWW58baIlxMWFp6QY9+A9Q0R+26pd6AEGnE7d1f7+i/g==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -15516,16 +15789,16 @@ "nx-cloud": "bin/nx-cloud.js" }, "optionalDependencies": { - "@nx/nx-darwin-arm64": "20.3.0", - "@nx/nx-darwin-x64": "20.3.0", - "@nx/nx-freebsd-x64": "20.3.0", - "@nx/nx-linux-arm-gnueabihf": "20.3.0", - "@nx/nx-linux-arm64-gnu": "20.3.0", - "@nx/nx-linux-arm64-musl": "20.3.0", - "@nx/nx-linux-x64-gnu": "20.3.0", - "@nx/nx-linux-x64-musl": "20.3.0", - "@nx/nx-win32-arm64-msvc": "20.3.0", - "@nx/nx-win32-x64-msvc": "20.3.0" + "@nx/nx-darwin-arm64": "20.3.1", + "@nx/nx-darwin-x64": "20.3.1", + "@nx/nx-freebsd-x64": "20.3.1", + "@nx/nx-linux-arm-gnueabihf": "20.3.1", + "@nx/nx-linux-arm64-gnu": "20.3.1", + "@nx/nx-linux-arm64-musl": "20.3.1", + "@nx/nx-linux-x64-gnu": "20.3.1", + "@nx/nx-linux-x64-musl": "20.3.1", + "@nx/nx-win32-arm64-msvc": "20.3.1", + "@nx/nx-win32-x64-msvc": "20.3.1" }, "peerDependencies": { "@swc-node/register": "^1.8.0", @@ -16922,9 +17195,9 @@ } }, "node_modules/read-package-up/node_modules/type-fest": { - "version": "4.31.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.31.0.tgz", - "integrity": "sha512-yCxltHW07Nkhv/1F6wWBr8kz+5BGMfP+RbRSYFnegVb0qV/UMT0G0ElBloPVerqn4M2ZV80Ir1FtCcYv1cT6vQ==", + "version": "4.32.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.32.0.tgz", + "integrity": "sha512-rfgpoi08xagF3JSdtJlCwMq9DGNDE0IMh3Mkpc1wUypg9vPi786AiqeBBKcqvIkq42azsBM85N490fyZjeUftw==", "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { @@ -17168,9 +17441,9 @@ } }, "node_modules/read-pkg/node_modules/type-fest": { - "version": "4.31.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.31.0.tgz", - "integrity": "sha512-yCxltHW07Nkhv/1F6wWBr8kz+5BGMfP+RbRSYFnegVb0qV/UMT0G0ElBloPVerqn4M2ZV80Ir1FtCcYv1cT6vQ==", + "version": "4.32.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.32.0.tgz", + "integrity": "sha512-rfgpoi08xagF3JSdtJlCwMq9DGNDE0IMh3Mkpc1wUypg9vPi786AiqeBBKcqvIkq42azsBM85N490fyZjeUftw==", "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { @@ -17478,9 +17751,9 @@ } }, "node_modules/rollup": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.29.1.tgz", - "integrity": "sha512-RaJ45M/kmJUzSWDs1Nnd5DdV4eerC98idtUOVr6FfKcgxqvjwHmxc5upLF9qZU9EpsVzzhleFahrT3shLuJzIw==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.30.1.tgz", + "integrity": "sha512-mlJ4glW020fPuLi7DkM/lN97mYEZGWeqBnrljzN0gs7GLctqX3lNWxKQ7Gl712UAX+6fog/L3jh4gb7R6aVi3w==", "dev": true, "license": "MIT", "dependencies": { @@ -17494,25 +17767,25 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.29.1", - "@rollup/rollup-android-arm64": "4.29.1", - "@rollup/rollup-darwin-arm64": "4.29.1", - "@rollup/rollup-darwin-x64": "4.29.1", - "@rollup/rollup-freebsd-arm64": "4.29.1", - "@rollup/rollup-freebsd-x64": "4.29.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.29.1", - "@rollup/rollup-linux-arm-musleabihf": "4.29.1", - "@rollup/rollup-linux-arm64-gnu": "4.29.1", - "@rollup/rollup-linux-arm64-musl": "4.29.1", - "@rollup/rollup-linux-loongarch64-gnu": "4.29.1", - "@rollup/rollup-linux-powerpc64le-gnu": "4.29.1", - "@rollup/rollup-linux-riscv64-gnu": "4.29.1", - "@rollup/rollup-linux-s390x-gnu": "4.29.1", - "@rollup/rollup-linux-x64-gnu": "4.29.1", - "@rollup/rollup-linux-x64-musl": "4.29.1", - "@rollup/rollup-win32-arm64-msvc": "4.29.1", - "@rollup/rollup-win32-ia32-msvc": "4.29.1", - "@rollup/rollup-win32-x64-msvc": "4.29.1", + "@rollup/rollup-android-arm-eabi": "4.30.1", + "@rollup/rollup-android-arm64": "4.30.1", + "@rollup/rollup-darwin-arm64": "4.30.1", + "@rollup/rollup-darwin-x64": "4.30.1", + "@rollup/rollup-freebsd-arm64": "4.30.1", + "@rollup/rollup-freebsd-x64": "4.30.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.30.1", + "@rollup/rollup-linux-arm-musleabihf": "4.30.1", + "@rollup/rollup-linux-arm64-gnu": "4.30.1", + "@rollup/rollup-linux-arm64-musl": "4.30.1", + "@rollup/rollup-linux-loongarch64-gnu": "4.30.1", + "@rollup/rollup-linux-powerpc64le-gnu": "4.30.1", + "@rollup/rollup-linux-riscv64-gnu": "4.30.1", + "@rollup/rollup-linux-s390x-gnu": "4.30.1", + "@rollup/rollup-linux-x64-gnu": "4.30.1", + "@rollup/rollup-linux-x64-musl": "4.30.1", + "@rollup/rollup-win32-arm64-msvc": "4.30.1", + "@rollup/rollup-win32-ia32-msvc": "4.30.1", + "@rollup/rollup-win32-x64-msvc": "4.30.1", "fsevents": "~2.3.2" } }, @@ -17615,9 +17888,9 @@ } }, "node_modules/semantic-release": { - "version": "24.2.0", - "resolved": "https://registry.npmjs.org/semantic-release/-/semantic-release-24.2.0.tgz", - "integrity": "sha512-fQfn6e/aYToRtVJYKqneFM1Rg3KP2gh3wSWtpYsLlz6uaPKlISrTzvYAFn+mYWo07F0X1Cz5ucU89AVE8X1mbg==", + "version": "24.2.1", + "resolved": "https://registry.npmjs.org/semantic-release/-/semantic-release-24.2.1.tgz", + "integrity": "sha512-z0/3cutKNkLQ4Oy0HTi3lubnjTsdjjgOqmxdPjeYWe6lhFqUPfwslZxRHv3HDZlN4MhnZitb9SLihDkZNxOXfQ==", "dev": true, "license": "MIT", "dependencies": { @@ -17637,7 +17910,7 @@ "git-log-parser": "^1.2.0", "hook-std": "^3.0.0", "hosted-git-info": "^8.0.0", - "import-from-esm": "^1.3.1", + "import-from-esm": "^2.0.0", "lodash-es": "^4.17.21", "marked": "^12.0.0", "marked-terminal": "^7.0.0", @@ -18951,22 +19224,22 @@ } }, "node_modules/tldts": { - "version": "6.1.70", - "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.70.tgz", - "integrity": "sha512-/W1YVgYVJd9ZDjey5NXadNh0mJXkiUMUue9Zebd0vpdo1sU+H4zFFTaJ1RKD4N6KFoHfcXy6l+Vu7bh+bdWCzA==", + "version": "6.1.71", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.71.tgz", + "integrity": "sha512-LQIHmHnuzfZgZWAf2HzL83TIIrD8NhhI0DVxqo9/FdOd4ilec+NTNZOlDZf7EwrTNoutccbsHjvWHYXLAtvxjw==", "dev": true, "license": "MIT", "dependencies": { - "tldts-core": "^6.1.70" + "tldts-core": "^6.1.71" }, "bin": { "tldts": "bin/cli.js" } }, "node_modules/tldts-core": { - "version": "6.1.70", - "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.70.tgz", - "integrity": "sha512-RNnIXDB1FD4T9cpQRErEqw6ZpjLlGdMOitdV+0xtbsnwr4YFka1zpc7D4KD+aAn8oSG5JyFrdasZTE04qDE9Yg==", + "version": "6.1.71", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.71.tgz", + "integrity": "sha512-LRbChn2YRpic1KxY+ldL1pGXN/oVvKfCVufwfVzEQdFYNo39uF7AJa/WXdo+gYO7PTvdfkCPCed6Hkvz/kR7jg==", "dev": true, "license": "MIT" }, @@ -19011,9 +19284,9 @@ } }, "node_modules/tough-cookie": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.0.0.tgz", - "integrity": "sha512-FRKsF7cz96xIIeMZ82ehjC3xW2E+O2+v11udrDYewUbszngYhsGa8z6YUMMzO9QJZzzyd0nGGXnML/TReX6W8Q==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.1.0.tgz", + "integrity": "sha512-rvZUv+7MoBYTiDmFPBrhL7Ujx9Sk+q9wwm22x8c8T5IJaR+Wsyc7TNxbVxo84kZoRJZZMazowFLqpankBEQrGg==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -19227,9 +19500,9 @@ } }, "node_modules/typedoc-plugin-markdown": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.4.0.tgz", - "integrity": "sha512-4207DYcxJGWQRrEVTza7XkIo7ldhuEzJBaZO6dX5ogUGlvWeRTo4uiN+R1F11ttJGh4toLtxrpoi2wTTP+nEwA==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.4.1.tgz", + "integrity": "sha512-fx23nSCvewI9IR8lzIYtzDphETcgTDuxKcmHKGD4lo36oexC+B1k4NaCOY58Snqb4OlE8OXDAGVcQXYYuLRCNw==", "dev": true, "license": "MIT", "engines": { @@ -19281,9 +19554,9 @@ } }, "node_modules/typescript": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", - "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", + "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -19495,9 +19768,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", - "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz", + "integrity": "sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg==", "dev": true, "funding": [ { @@ -19516,7 +19789,7 @@ "license": "MIT", "dependencies": { "escalade": "^3.2.0", - "picocolors": "^1.1.0" + "picocolors": "^1.1.1" }, "bin": { "update-browserslist-db": "cli.js" @@ -19571,9 +19844,9 @@ "license": "MIT" }, "node_modules/uuid": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.0.3.tgz", - "integrity": "sha512-d0z310fCWv5dJwnX1Y/MncBAqGMKEzlBb1AOf7z9K8ALnd0utBX/msg/fA0+sbyN1ihbMsLhrBlnl1ak7Wa0rg==", + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.0.4.tgz", + "integrity": "sha512-IzL6VtTTYcAhA/oghbFJ1Dkmqev+FpQWnCBaKq/gUluLxliWvO8DPFWfIviRmYbtaavtSQe4WBL++rFjdcGWEg==", "dev": true, "funding": [ "https://github.com/sponsors/broofa", @@ -19734,1117 +20007,1282 @@ "vite": "^2 || ^3 || ^4 || ^5 || ^6" } }, - "node_modules/vitest": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.6.0.tgz", - "integrity": "sha512-H5r/dN06swuFnzNFhq/dnz37bPXnq8xB2xB5JOVk8K09rUtoeNN+LHWkoQ0A/i3hvbUKKcCei9KpbxqHMLhLLA==", + "node_modules/vite/node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@vitest/expect": "1.6.0", - "@vitest/runner": "1.6.0", - "@vitest/snapshot": "1.6.0", - "@vitest/spy": "1.6.0", - "@vitest/utils": "1.6.0", - "acorn-walk": "^8.3.2", - "chai": "^4.3.10", - "debug": "^4.3.4", - "execa": "^8.0.1", - "local-pkg": "^0.5.0", - "magic-string": "^0.30.5", - "pathe": "^1.1.1", - "picocolors": "^1.0.0", - "std-env": "^3.5.0", - "strip-literal": "^2.0.0", - "tinybench": "^2.5.1", - "tinypool": "^0.8.3", - "vite": "^5.0.0", - "vite-node": "1.6.0", - "why-is-node-running": "^2.2.2" - }, - "bin": { - "vitest": "vitest.mjs" - }, + "optional": true, + "os": [ + "aix" + ], "engines": { - "node": "^18.0.0 || >=20.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "@edge-runtime/vm": "*", - "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "1.6.0", - "@vitest/ui": "1.6.0", - "happy-dom": "*", - "jsdom": "*" - }, - "peerDependenciesMeta": { - "@edge-runtime/vm": { - "optional": true - }, - "@types/node": { - "optional": true - }, - "@vitest/browser": { - "optional": true - }, - "@vitest/ui": { - "optional": true - }, - "happy-dom": { - "optional": true - }, - "jsdom": { - "optional": true - } + "node": ">=12" } }, - "node_modules/vitest/node_modules/execa": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", - "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", + "node_modules/vite/node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^8.0.1", - "human-signals": "^5.0.0", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", - "signal-exit": "^4.1.0", - "strip-final-newline": "^3.0.0" - }, + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=16.17" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" + "node": ">=12" } }, - "node_modules/vitest/node_modules/get-stream": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", - "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "node_modules/vite/node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=12" } }, - "node_modules/vitest/node_modules/human-signals": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", - "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "node_modules/vite/node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], "dev": true, - "license": "Apache-2.0", + "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=16.17.0" + "node": ">=12" } }, - "node_modules/vitest/node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "node_modules/vite/node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" } }, - "node_modules/vitest/node_modules/mimic-fn": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "node_modules/vite/node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], "engines": { "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/vitest/node_modules/npm-run-path": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", - "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", + "node_modules/vite/node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "path-key": "^4.0.0" - }, + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=12" } }, - "node_modules/vitest/node_modules/onetime": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "node_modules/vite/node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "mimic-fn": "^4.0.0" - }, + "optional": true, + "os": [ + "freebsd" + ], "engines": { "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/vitest/node_modules/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "node_modules/vite/node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/vitest/node_modules/strip-final-newline": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "node_modules/vite/node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/w3c-xmlserializer": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", - "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", + "node_modules/vite/node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], "dev": true, "license": "MIT", - "dependencies": { - "xml-name-validator": "^5.0.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=18" + "node": ">=12" } }, - "node_modules/wait-port": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/wait-port/-/wait-port-1.1.0.tgz", - "integrity": "sha512-3e04qkoN3LxTMLakdqeWth8nih8usyg+sf1Bgdf9wwUkp05iuK1eSY/QpLvscT/+F/gA89+LpUmmgBtesbqI2Q==", + "node_modules/vite/node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], "dev": true, "license": "MIT", - "dependencies": { - "chalk": "^4.1.2", - "commander": "^9.3.0", - "debug": "^4.3.4" - }, - "bin": { - "wait-port": "bin/wait-port.js" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=10" + "node": ">=12" } }, - "node_modules/wait-port/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/vite/node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], "dev": true, "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "node": ">=12" } }, - "node_modules/walk-up-path": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-3.0.1.tgz", - "integrity": "sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA==", + "node_modules/vite/node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], "dev": true, - "license": "ISC" + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } }, - "node_modules/wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "node_modules/vite/node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], "dev": true, "license": "MIT", - "dependencies": { - "defaults": "^1.0.3" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, - "node_modules/web-streams-polyfill": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", - "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", + "node_modules/vite/node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">= 8" + "node": ">=12" } }, - "node_modules/webdriver": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/webdriver/-/webdriver-9.5.0.tgz", - "integrity": "sha512-w57Cb+N9VjSoYEFosytqDrICF3W5GqP0ldxiUMrhwaGSe2CfqE666CyRhy533Y3oYg1gZvVMc7jq6CMbfSBoTg==", + "node_modules/vite/node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@types/node": "^20.1.0", - "@types/ws": "^8.5.3", - "@wdio/config": "9.5.0", - "@wdio/logger": "9.4.4", - "@wdio/protocols": "9.4.4", - "@wdio/types": "9.5.0", - "@wdio/utils": "9.5.0", - "deepmerge-ts": "^7.0.3", - "undici": "^6.20.1", - "ws": "^8.8.0" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=18.20.0" + "node": ">=12" } }, - "node_modules/webdriverio": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/webdriverio/-/webdriverio-9.5.0.tgz", - "integrity": "sha512-74QK4lDH5zkD/oEO/zHs2GqjrTj/d012+4zuZKAIqAnO46E+um50gw4AMmNp7Bc5xcGdU9CoB5EGDMpt2Fwf9g==", + "node_modules/vite/node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@types/node": "^20.11.30", - "@types/sinonjs__fake-timers": "^8.1.5", - "@wdio/config": "9.5.0", - "@wdio/logger": "9.4.4", - "@wdio/protocols": "9.4.4", - "@wdio/repl": "9.4.4", - "@wdio/types": "9.5.0", - "@wdio/utils": "9.5.0", - "archiver": "^7.0.1", - "aria-query": "^5.3.0", - "cheerio": "^1.0.0-rc.12", - "css-shorthand-properties": "^1.1.1", - "css-value": "^0.0.1", - "grapheme-splitter": "^1.0.4", - "htmlfy": "^0.5.0", - "import-meta-resolve": "^4.0.0", - "is-plain-obj": "^4.1.0", - "jszip": "^3.10.1", - "lodash.clonedeep": "^4.5.0", - "lodash.zip": "^4.2.0", - "minimatch": "^9.0.3", - "query-selector-shadow-dom": "^1.0.1", - "resq": "^1.11.0", - "rgb2hex": "0.2.5", - "serialize-error": "^11.0.3", - "urlpattern-polyfill": "^10.0.0", - "webdriver": "9.5.0" - }, + "optional": true, + "os": [ + "netbsd" + ], "engines": { - "node": ">=18.20.0" - }, - "peerDependencies": { - "puppeteer-core": "^22.3.0" - }, - "peerDependenciesMeta": { - "puppeteer-core": { - "optional": true - } + "node": ">=12" } }, - "node_modules/webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "node_modules/vite/node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], "dev": true, - "license": "BSD-2-Clause", + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], "engines": { "node": ">=12" } }, - "node_modules/whatwg-encoding": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", - "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", + "node_modules/vite/node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "iconv-lite": "0.6.3" - }, + "optional": true, + "os": [ + "sunos" + ], "engines": { - "node": ">=18" + "node": ">=12" } }, - "node_modules/whatwg-encoding/node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "node_modules/vite/node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=0.10.0" + "node": ">=12" } }, - "node_modules/whatwg-mimetype": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", - "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", + "node_modules/vite/node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=18" + "node": ">=12" } }, - "node_modules/whatwg-url": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.1.0.tgz", - "integrity": "sha512-jlf/foYIKywAt3x/XWKZ/3rz8OSJPiWktjmk891alJUEjiVxKX9LEO92qH3hv4aJ0mN3MWPvGMCy8jQi95xK4w==", + "node_modules/vite/node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "tr46": "^5.0.0", - "webidl-conversions": "^7.0.0" - }, + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=18" + "node": ">=12" } }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "node_modules/vite/node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, + "hasInstallScript": true, + "license": "MIT", "bin": { - "node-which": "bin/node-which" + "esbuild": "bin/esbuild" }, "engines": { - "node": ">= 8" + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" } }, - "node_modules/why-is-node-running": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", - "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "node_modules/vitest": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.6.0.tgz", + "integrity": "sha512-H5r/dN06swuFnzNFhq/dnz37bPXnq8xB2xB5JOVk8K09rUtoeNN+LHWkoQ0A/i3hvbUKKcCei9KpbxqHMLhLLA==", "dev": true, "license": "MIT", "dependencies": { - "siginfo": "^2.0.0", - "stackback": "0.0.2" + "@vitest/expect": "1.6.0", + "@vitest/runner": "1.6.0", + "@vitest/snapshot": "1.6.0", + "@vitest/spy": "1.6.0", + "@vitest/utils": "1.6.0", + "acorn-walk": "^8.3.2", + "chai": "^4.3.10", + "debug": "^4.3.4", + "execa": "^8.0.1", + "local-pkg": "^0.5.0", + "magic-string": "^0.30.5", + "pathe": "^1.1.1", + "picocolors": "^1.0.0", + "std-env": "^3.5.0", + "strip-literal": "^2.0.0", + "tinybench": "^2.5.1", + "tinypool": "^0.8.3", + "vite": "^5.0.0", + "vite-node": "1.6.0", + "why-is-node-running": "^2.2.2" }, "bin": { - "why-is-node-running": "cli.js" + "vitest": "vitest.mjs" }, "engines": { - "node": ">=8" + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/node": "^18.0.0 || >=20.0.0", + "@vitest/browser": "1.6.0", + "@vitest/ui": "1.6.0", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } } }, - "node_modules/wide-align": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", - "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "node_modules/vitest/node_modules/execa": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "string-width": "^1.0.2 || 2 || 3 || 4" - } - }, - "node_modules/wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", - "dev": true, - "license": "MIT" + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } }, - "node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "node_modules/vitest/node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", "dev": true, "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "engines": { + "node": ">=16" }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/vitest/node_modules/human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "dev": true, + "license": "Apache-2.0", "engines": { - "node": ">=8" + "node": ">=16.17.0" } }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "node_modules/vitest/node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", "dev": true, "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, "engines": { - "node": ">=10" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "node_modules/vitest/node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", "dev": true, - "license": "ISC" + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "node_modules/write-file-atomic": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", - "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", + "node_modules/vitest/node_modules/npm-run-path": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^4.0.1" + "path-key": "^4.0.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/write-json-file": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/write-json-file/-/write-json-file-3.2.0.tgz", - "integrity": "sha512-3xZqT7Byc2uORAatYiP3DHUUAVEkNOswEWNs9H5KXiicRTvzYzYqKjYc4G7p+8pltvAw641lVByKVtMpf+4sYQ==", + "node_modules/vitest/node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", "dev": true, "license": "MIT", "dependencies": { - "detect-indent": "^5.0.0", - "graceful-fs": "^4.1.15", - "make-dir": "^2.1.0", - "pify": "^4.0.1", - "sort-keys": "^2.0.0", - "write-file-atomic": "^2.4.2" + "mimic-fn": "^4.0.0" }, "engines": { - "node": ">=6" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/write-json-file/node_modules/detect-indent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", - "integrity": "sha512-rlpvsxUtM0PQvy9iZe640/IWwWYyBsTApREbA1pHOpmOUIl9MkP/U4z7vTtg4Oaojvqhxt7sdufnT0EzGaR31g==", + "node_modules/vitest/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=4" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/write-json-file/node_modules/make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "node_modules/vitest/node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/w3c-xmlserializer": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", + "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", "dev": true, "license": "MIT", "dependencies": { - "pify": "^4.0.1", - "semver": "^5.6.0" + "xml-name-validator": "^5.0.0" }, "engines": { - "node": ">=6" + "node": ">=18" } }, - "node_modules/write-json-file/node_modules/pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "node_modules/wait-port": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/wait-port/-/wait-port-1.1.0.tgz", + "integrity": "sha512-3e04qkoN3LxTMLakdqeWth8nih8usyg+sf1Bgdf9wwUkp05iuK1eSY/QpLvscT/+F/gA89+LpUmmgBtesbqI2Q==", "dev": true, "license": "MIT", + "dependencies": { + "chalk": "^4.1.2", + "commander": "^9.3.0", + "debug": "^4.3.4" + }, + "bin": { + "wait-port": "bin/wait-port.js" + }, "engines": { - "node": ">=6" + "node": ">=10" } }, - "node_modules/write-json-file/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "node_modules/wait-port/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/write-json-file/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "node_modules/walk-up-path": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-3.0.1.tgz", + "integrity": "sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA==", "dev": true, "license": "ISC" }, - "node_modules/write-json-file/node_modules/write-file-atomic": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", - "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" + "defaults": "^1.0.3" } }, - "node_modules/write-pkg": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/write-pkg/-/write-pkg-4.0.0.tgz", - "integrity": "sha512-v2UQ+50TNf2rNHJ8NyWttfm/EJUBWMJcx6ZTYZr6Qp52uuegWw/lBkCtCbnYZEmPRNL61m+u67dAmGxo+HTULA==", + "node_modules/web-streams-polyfill": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", + "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", "dev": true, "license": "MIT", - "dependencies": { - "sort-keys": "^2.0.0", - "type-fest": "^0.4.1", - "write-json-file": "^3.2.0" - }, "engines": { - "node": ">=8" + "node": ">= 8" } }, - "node_modules/write-pkg/node_modules/type-fest": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.4.1.tgz", - "integrity": "sha512-IwzA/LSfD2vC1/YDYMv/zHP4rDF1usCwllsDpbolT3D4fUepIO7f9K70jjmUewU/LmGUKJcwcVtDCpnKk4BPMw==", + "node_modules/webdriver": { + "version": "9.5.1", + "resolved": "https://registry.npmjs.org/webdriver/-/webdriver-9.5.1.tgz", + "integrity": "sha512-uVQJtk1fLoi8ITmIo5jVpzUb7KMILPptB7uMKBumQJpVxjehz3xi0RGcnscSBuKhi59wkPJ3I5BOvomxQUG8Vw==", "dev": true, - "license": "(MIT OR CC0-1.0)", + "license": "MIT", + "dependencies": { + "@types/node": "^20.1.0", + "@types/ws": "^8.5.3", + "@wdio/config": "9.5.0", + "@wdio/logger": "9.4.4", + "@wdio/protocols": "9.4.4", + "@wdio/types": "9.5.0", + "@wdio/utils": "9.5.0", + "deepmerge-ts": "^7.0.3", + "undici": "^6.20.1", + "ws": "^8.8.0" + }, "engines": { - "node": ">=6" + "node": ">=18.20.0" } }, - "node_modules/ws": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", - "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "node_modules/webdriverio": { + "version": "9.5.2", + "resolved": "https://registry.npmjs.org/webdriverio/-/webdriverio-9.5.2.tgz", + "integrity": "sha512-DywYiJmNRXPu0kKh2PaBCx6Omie4seIdfMh8Adq+pM9LxvMXOYCxMx8Q23Piqv2NTgCbqYND5lWLkiCuxIDIMw==", "dev": true, "license": "MIT", + "dependencies": { + "@types/node": "^20.11.30", + "@types/sinonjs__fake-timers": "^8.1.5", + "@wdio/config": "9.5.0", + "@wdio/logger": "9.4.4", + "@wdio/protocols": "9.4.4", + "@wdio/repl": "9.4.4", + "@wdio/types": "9.5.0", + "@wdio/utils": "9.5.0", + "archiver": "^7.0.1", + "aria-query": "^5.3.0", + "cheerio": "^1.0.0-rc.12", + "css-shorthand-properties": "^1.1.1", + "css-value": "^0.0.1", + "grapheme-splitter": "^1.0.4", + "htmlfy": "^0.5.0", + "import-meta-resolve": "^4.0.0", + "is-plain-obj": "^4.1.0", + "jszip": "^3.10.1", + "lodash.clonedeep": "^4.5.0", + "lodash.zip": "^4.2.0", + "minimatch": "^9.0.3", + "query-selector-shadow-dom": "^1.0.1", + "resq": "^1.11.0", + "rgb2hex": "0.2.5", + "serialize-error": "^11.0.3", + "urlpattern-polyfill": "^10.0.0", + "webdriver": "9.5.1" + }, "engines": { - "node": ">=10.0.0" + "node": ">=18.20.0" }, "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" + "puppeteer-core": "^22.3.0" }, "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { + "puppeteer-core": { "optional": true } } }, - "node_modules/xml-name-validator": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", - "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", + "node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", "dev": true, - "license": "Apache-2.0", + "license": "BSD-2-Clause", "engines": { - "node": ">=18" + "node": ">=12" } }, - "node_modules/xmlchars": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", - "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "node_modules/whatwg-encoding": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=18" + } }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "node_modules/whatwg-encoding/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, "engines": { - "node": ">=0.4" + "node": ">=0.10.0" } }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "node_modules/whatwg-mimetype": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", "dev": true, - "license": "ISC", + "license": "MIT", "engines": { - "node": ">=10" + "node": ">=18" } }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "node_modules/whatwg-url": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.1.0.tgz", + "integrity": "sha512-jlf/foYIKywAt3x/XWKZ/3rz8OSJPiWktjmk891alJUEjiVxKX9LEO92qH3hv4aJ0mN3MWPvGMCy8jQi95xK4w==", "dev": true, - "license": "ISC" + "license": "MIT", + "dependencies": { + "tr46": "^5.0.0", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=18" + } }, - "node_modules/yaml": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", - "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, "bin": { - "yaml": "bin.mjs" + "node-which": "bin/node-which" }, "engines": { - "node": ">= 14" + "node": ">= 8" } }, - "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", "dev": true, "license": "MIT", "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" }, "engines": { - "node": ">=12" + "node": ">=8" } }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "node_modules/wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", "dev": true, "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "node_modules/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", - "dev": true, - "license": "MIT", "dependencies": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" + "string-width": "^1.0.2 || 2 || 3 || 4" } }, - "node_modules/yauzl/node_modules/buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } + "license": "MIT" }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/yoctocolors": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/yoctocolors/-/yoctocolors-2.1.1.tgz", - "integrity": "sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ==", + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "license": "ISC" }, - "node_modules/zip-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-6.0.1.tgz", - "integrity": "sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==", + "node_modules/write-file-atomic": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", + "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "archiver-utils": "^5.0.0", - "compress-commons": "^6.0.2", - "readable-stream": "^4.0.0" + "imurmurhash": "^0.1.4", + "signal-exit": "^4.0.1" }, "engines": { - "node": ">= 14" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/zip-stream/node_modules/readable-stream": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.6.0.tgz", - "integrity": "sha512-cbAdYt0VcnpN2Bekq7PU+k363ZRsPwJoEEJOEtSJQlJXzwaxt3FIo/uL+KeDSGIjJqtkwyge4KQgD2S2kd+CQw==", + "node_modules/write-json-file": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/write-json-file/-/write-json-file-3.2.0.tgz", + "integrity": "sha512-3xZqT7Byc2uORAatYiP3DHUUAVEkNOswEWNs9H5KXiicRTvzYzYqKjYc4G7p+8pltvAw641lVByKVtMpf+4sYQ==", "dev": true, "license": "MIT", "dependencies": { - "abort-controller": "^3.0.0", - "buffer": "^6.0.3", - "events": "^3.3.0", - "process": "^0.11.10", - "string_decoder": "^1.3.0" + "detect-indent": "^5.0.0", + "graceful-fs": "^4.1.15", + "make-dir": "^2.1.0", + "pify": "^4.0.1", + "sort-keys": "^2.0.0", + "write-file-atomic": "^2.4.2" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=6" } }, - "node_modules/zip-stream/node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "node_modules/write-json-file/node_modules/detect-indent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", + "integrity": "sha512-rlpvsxUtM0PQvy9iZe640/IWwWYyBsTApREbA1pHOpmOUIl9MkP/U4z7vTtg4Oaojvqhxt7sdufnT0EzGaR31g==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=4" + } }, - "node_modules/zip-stream/node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "node_modules/write-json-file/node_modules/make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", "dev": true, "license": "MIT", "dependencies": { - "safe-buffer": "~5.2.0" + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=6" } }, - "packages/ridb": { - "name": "@trust0/ridb", - "version": "1.0.9-rc.3", - "license": "Apache-2.0", - "devDependencies": { - "@babel/types": "^7.26.3", - "@esbuild-plugins/node-resolve": "^0.2.2", - "@semantic-release/changelog": "^6.0.3", - "@semantic-release/commit-analyzer": "^13.0.0", - "@semantic-release/exec": "^6.0.3", - "@semantic-release/git": "^10.0.1", - "@semantic-release/github": "^10.3.5", - "@semantic-release/npm": "^12.0.1", - "@semantic-release/release-notes-generator": "^14.0.2", - "@trust0/ridb-core": "1.0.0", - "@trust0/ridb-testing": "^0.0.1", - "@types/node": "^20.14.2", - "@vitest/browser": "^1.6.0", - "@vitest/coverage-istanbul": "^1.6.0", - "@vitest/ui": "^1.6.0", - "dts-bundle-generator": "^9.5.0", - "esbuild": "0.21.5", - "esbuild-plugin-wasm": "^1.1.0", - "esbuild-plugin-wasm-pack": "^1.1.0", - "jsdom": "^24.1.3", - "semantic-release": "^24.2.0", - "ts-node": "^10.9.2", - "typescript": "^5.4.5", - "uuid": "^11.0.3", - "vite": "^5.0.0", - "vite-plugin-top-level-await": "^1.4.1", - "vite-plugin-wasm": "^3.3.0", - "vitest": "^1.6.0", - "webdriverio": "^9.0.9" - }, + "node_modules/write-json-file/node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "license": "MIT", "engines": { - "node": ">=20" - }, - "optionalDependencies": { - "@esbuild/darwin-arm64": "0.15.18", - "@rollup/rollup-linux-x64-gnu": "^4.24.0" + "node": ">=6" } }, - "packages/ridb-core": { - "name": "@trust0/ridb-core", - "version": "1.0.0" + "node_modules/write-json-file/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, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } }, - "packages/ridb-level": { - "name": "@trust0/ridb-level", - "version": "1.0.9", - "license": "Apache-2.0", - "devDependencies": { - "@esbuild-plugins/node-resolve": "^0.2.2", - "@semantic-release/changelog": "^6.0.3", - "@semantic-release/commit-analyzer": "^13.0.0", - "@semantic-release/exec": "^6.0.3", - "@semantic-release/git": "^10.0.1", - "@semantic-release/github": "^10.3.5", - "@semantic-release/npm": "^12.0.1", - "@semantic-release/release-notes-generator": "^14.0.2", - "@trust0/ridb": "1.0.9-rc.2", - "@trust0/ridb-testing": "^0.0.1", - "@types/node": "^20.14.2", - "@vitest/browser": "^1.6.0", - "@vitest/coverage-istanbul": "^1.6.0", - "@vitest/ui": "^1.6.0", - "classic-level": "^2.0.0", - "esbuild": "0.21.5", - "esbuild-plugin-wasm": "^1.1.0", - "esbuild-plugin-wasm-pack": "^1.1.0", - "jsdom": "^24.1.3", - "semantic-release": "^24.2.0", - "ts-node": "^10.9.2", - "typescript": "^5.4.5", - "uuid": "^11.0.3", - "vite": "^5.0.0", - "vite-plugin-top-level-await": "^1.4.1", - "vite-plugin-wasm": "^3.3.0", - "vitest": "^1.6.0", - "webdriverio": "^9.0.9" + "node_modules/write-json-file/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/write-json-file/node_modules/write-file-atomic": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", + "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, + "node_modules/write-pkg": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/write-pkg/-/write-pkg-4.0.0.tgz", + "integrity": "sha512-v2UQ+50TNf2rNHJ8NyWttfm/EJUBWMJcx6ZTYZr6Qp52uuegWw/lBkCtCbnYZEmPRNL61m+u67dAmGxo+HTULA==", + "dev": true, + "license": "MIT", + "dependencies": { + "sort-keys": "^2.0.0", + "type-fest": "^0.4.1", + "write-json-file": "^3.2.0" }, "engines": { - "node": ">=20" - }, - "optionalDependencies": { - "@esbuild/darwin-arm64": "0.15.18", - "@rollup/rollup-linux-x64-gnu": "^4.24.0" - }, - "peerDependencies": { - "@trust0/ridb": "1.0.9-rc.3", - "classic-level": "^2.0.0" + "node": ">=8" } }, - "packages/ridb-level/node_modules/@trust0/ridb": { - "version": "1.0.9-rc.2", - "resolved": "https://registry.npmjs.org/@trust0/ridb/-/ridb-1.0.9-rc.2.tgz", - "integrity": "sha512-A75g607866XSdsLQmN5BRuk4cDh+XLT/9291KR2Siv0zMFqB7A6gTIfoCjU2GQZi/5/bcV0tB4H0QtvElaTntg==", + "node_modules/write-pkg/node_modules/type-fest": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.4.1.tgz", + "integrity": "sha512-IwzA/LSfD2vC1/YDYMv/zHP4rDF1usCwllsDpbolT3D4fUepIO7f9K70jjmUewU/LmGUKJcwcVtDCpnKk4BPMw==", "dev": true, - "license": "Apache-2.0", + "license": "(MIT OR CC0-1.0)", "engines": { - "node": ">=20" - }, - "optionalDependencies": { - "@esbuild/darwin-arm64": "0.15.18", - "@rollup/rollup-linux-x64-gnu": "^4.24.0" + "node": ">=6" } }, - "packages/ridb-level/node_modules/jsdom": { - "version": "24.1.3", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-24.1.3.tgz", - "integrity": "sha512-MyL55p3Ut3cXbeBEG7Hcv0mVM8pp8PBNWxRqchZnSfAiES1v1mRnMeFfaHWIPULpwsYfvO+ZmMZz5tGCnjzDUQ==", + "node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", "dev": true, "license": "MIT", - "dependencies": { - "cssstyle": "^4.0.1", - "data-urls": "^5.0.0", - "decimal.js": "^10.4.3", - "form-data": "^4.0.0", - "html-encoding-sniffer": "^4.0.0", - "http-proxy-agent": "^7.0.2", - "https-proxy-agent": "^7.0.5", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.12", - "parse5": "^7.1.2", - "rrweb-cssom": "^0.7.1", - "saxes": "^6.0.0", - "symbol-tree": "^3.2.4", - "tough-cookie": "^4.1.4", - "w3c-xmlserializer": "^5.0.0", - "webidl-conversions": "^7.0.0", - "whatwg-encoding": "^3.1.1", - "whatwg-mimetype": "^4.0.0", - "whatwg-url": "^14.0.0", - "ws": "^8.18.0", - "xml-name-validator": "^5.0.0" - }, "engines": { - "node": ">=18" + "node": ">=10.0.0" }, "peerDependencies": { - "canvas": "^2.11.2" + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { - "canvas": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { "optional": true } } }, - "packages/ridb-level/node_modules/tough-cookie": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", - "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", + "node_modules/xml-name-validator": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", + "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" - }, + "license": "Apache-2.0", "engines": { - "node": ">=6" + "node": ">=18" } }, - "packages/ridb-level/node_modules/universalify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", - "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "node_modules/xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4.0.0" + "license": "MIT" + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4" } }, - "packages/ridb-react": { - "name": "@trust0/ridb-react", - "version": "1.0.0", - "devDependencies": { - "@testing-library/dom": "^10.4.0", - "@testing-library/jest-dom": "^6.6.3", - "@testing-library/react": "^16.1.0", - "@trust0/ridb": "1.0.9-rc.3", - "@types/react": "^18.2.8", - "@types/react-dom": "^18.2.4", - "@vitejs/plugin-react-swc": "^3.7.2", - "esbuild-node-externals": "^1.16.0", - "esbuild-plugin-glob": "^2.2.3", - "jsdom": "^25.0.1", - "react": "^18.3.1", - "react-dom": "^18.3.1", - "typescript": "^5.7.2", - "vite": "^5.0.0", - "vitest": "^1.6.0" + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + }, + "node_modules/yaml": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", + "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", + "dev": true, + "license": "ISC", + "bin": { + "yaml": "bin.mjs" }, - "peerDependencies": { - "@trust0/ridb": "1.0.9-rc.3", - "react": "^18.3.1", - "react-dom": "^18.3.1" + "engines": { + "node": ">= 14" } }, - "packages/ridb/node_modules/jsdom": { - "version": "24.1.3", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-24.1.3.tgz", - "integrity": "sha512-MyL55p3Ut3cXbeBEG7Hcv0mVM8pp8PBNWxRqchZnSfAiES1v1mRnMeFfaHWIPULpwsYfvO+ZmMZz5tGCnjzDUQ==", + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, "license": "MIT", "dependencies": { - "cssstyle": "^4.0.1", - "data-urls": "^5.0.0", - "decimal.js": "^10.4.3", - "form-data": "^4.0.0", - "html-encoding-sniffer": "^4.0.0", - "http-proxy-agent": "^7.0.2", - "https-proxy-agent": "^7.0.5", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.12", - "parse5": "^7.1.2", - "rrweb-cssom": "^0.7.1", - "saxes": "^6.0.0", - "symbol-tree": "^3.2.4", - "tough-cookie": "^4.1.4", - "w3c-xmlserializer": "^5.0.0", - "webidl-conversions": "^7.0.0", - "whatwg-encoding": "^3.1.1", - "whatwg-mimetype": "^4.0.0", - "whatwg-url": "^14.0.0", - "ws": "^8.18.0", - "xml-name-validator": "^5.0.0" + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" }, "engines": { - "node": ">=18" + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, + "node_modules/yauzl/node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" }, - "peerDependencies": { - "canvas": "^2.11.2" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yoctocolors": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/yoctocolors/-/yoctocolors-2.1.1.tgz", + "integrity": "sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "packages/ridb/node_modules/tough-cookie": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", - "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", + "node_modules/zip-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-6.0.1.tgz", + "integrity": "sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==", "dev": true, - "license": "BSD-3-Clause", + "license": "MIT", "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" + "archiver-utils": "^5.0.0", + "compress-commons": "^6.0.2", + "readable-stream": "^4.0.0" }, "engines": { - "node": ">=6" + "node": ">= 14" } }, - "packages/ridb/node_modules/universalify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", - "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "node_modules/zip-stream/node_modules/readable-stream": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz", + "integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==", "dev": true, "license": "MIT", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, "engines": { - "node": ">= 4.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "packages/testing": { - "name": "@trust0/ridb-testing", - "version": "0.0.1", + "node_modules/zip-stream/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/zip-stream/node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "packages/ridb": { + "name": "@trust0/ridb", + "version": "1.1.0", + "license": "Apache-2.0", "devDependencies": { + "@babel/types": "^7.26.3", "@esbuild-plugins/node-resolve": "^0.2.2", "@semantic-release/changelog": "^6.0.3", "@semantic-release/commit-analyzer": "^13.0.0", @@ -20853,11 +21291,13 @@ "@semantic-release/github": "^10.3.5", "@semantic-release/npm": "^12.0.1", "@semantic-release/release-notes-generator": "^14.0.2", - "@trust0/ridb": "^1.0.9-rc.3", + "@trust0/ridb-core": "1.1.0", + "@trust0/ridb-testing": "^0.0.1", "@types/node": "^20.14.2", "@vitest/browser": "^1.6.0", "@vitest/coverage-istanbul": "^1.6.0", "@vitest/ui": "^1.6.0", + "dts-bundle-generator": "^9.5.0", "esbuild": "0.21.5", "esbuild-plugin-wasm": "^1.1.0", "esbuild-plugin-wasm-pack": "^1.1.0", @@ -20872,11 +21312,1550 @@ "vitest": "^1.6.0", "webdriverio": "^9.0.9" }, + "engines": { + "node": ">=20" + }, "optionalDependencies": { "@esbuild/darwin-arm64": "0.15.18", "@rollup/rollup-linux-x64-gnu": "^4.24.0" } }, + "packages/ridb-core": { + "name": "@trust0/ridb-core", + "version": "1.1.0" + }, + "packages/ridb-level": { + "name": "@trust0/ridb-level", + "version": "1.1.0", + "license": "Apache-2.0", + "devDependencies": { + "@esbuild-plugins/node-resolve": "^0.2.2", + "@semantic-release/changelog": "^6.0.3", + "@semantic-release/commit-analyzer": "^13.0.0", + "@semantic-release/exec": "^6.0.3", + "@semantic-release/git": "^10.0.1", + "@semantic-release/github": "^10.3.5", + "@semantic-release/npm": "^12.0.1", + "@semantic-release/release-notes-generator": "^14.0.2", + "@trust0/ridb": "1.1.0", + "@trust0/ridb-testing": "^0.0.1", + "@types/node": "^20.14.2", + "@vitest/browser": "^1.6.0", + "@vitest/coverage-istanbul": "^1.6.0", + "@vitest/ui": "^1.6.0", + "classic-level": "^2.0.0", + "esbuild": "0.21.5", + "esbuild-plugin-wasm": "^1.1.0", + "esbuild-plugin-wasm-pack": "^1.1.0", + "jsdom": "^24.1.3", + "semantic-release": "^24.2.0", + "ts-node": "^10.9.2", + "typescript": "^5.4.5", + "uuid": "^11.0.3", + "vite": "^5.0.0", + "vite-plugin-top-level-await": "^1.4.1", + "vite-plugin-wasm": "^3.3.0", + "vitest": "^1.6.0", + "webdriverio": "^9.0.9" + }, + "engines": { + "node": ">=20" + }, + "optionalDependencies": { + "@esbuild/darwin-arm64": "0.15.18", + "@rollup/rollup-linux-x64-gnu": "^4.24.0" + }, + "peerDependencies": { + "@trust0/ridb": "1.1.0", + "classic-level": "^2.0.0" + } + }, + "packages/ridb-level/node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb-level/node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb-level/node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb-level/node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb-level/node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb-level/node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb-level/node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb-level/node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb-level/node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb-level/node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb-level/node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb-level/node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb-level/node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb-level/node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb-level/node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb-level/node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb-level/node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb-level/node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb-level/node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb-level/node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb-level/node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb-level/node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb-level/node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "packages/ridb-level/node_modules/esbuild/node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb-level/node_modules/jsdom": { + "version": "24.1.3", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-24.1.3.tgz", + "integrity": "sha512-MyL55p3Ut3cXbeBEG7Hcv0mVM8pp8PBNWxRqchZnSfAiES1v1mRnMeFfaHWIPULpwsYfvO+ZmMZz5tGCnjzDUQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "cssstyle": "^4.0.1", + "data-urls": "^5.0.0", + "decimal.js": "^10.4.3", + "form-data": "^4.0.0", + "html-encoding-sniffer": "^4.0.0", + "http-proxy-agent": "^7.0.2", + "https-proxy-agent": "^7.0.5", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.12", + "parse5": "^7.1.2", + "rrweb-cssom": "^0.7.1", + "saxes": "^6.0.0", + "symbol-tree": "^3.2.4", + "tough-cookie": "^4.1.4", + "w3c-xmlserializer": "^5.0.0", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^3.1.1", + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0", + "ws": "^8.18.0", + "xml-name-validator": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "canvas": "^2.11.2" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } + } + }, + "packages/ridb-level/node_modules/tough-cookie": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, + "engines": { + "node": ">=6" + } + }, + "packages/ridb-level/node_modules/universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, + "packages/ridb-react": { + "name": "@trust0/ridb-react", + "version": "1.1.0", + "devDependencies": { + "@testing-library/dom": "^10.4.0", + "@testing-library/jest-dom": "^6.6.3", + "@testing-library/react": "^16.1.0", + "@trust0/ridb": "1.1.0", + "@types/react": "^18.2.8", + "@types/react-dom": "^18.2.4", + "@vitejs/plugin-react-swc": "^3.7.2", + "esbuild-node-externals": "^1.16.0", + "esbuild-plugin-glob": "^2.2.3", + "jsdom": "^25.0.1", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "typescript": "^5.7.2", + "vite": "^5.0.0", + "vitest": "^1.6.0" + }, + "peerDependencies": { + "@trust0/ridb": "1.1.0", + "react": "^18.3.1", + "react-dom": "^18.3.1" + } + }, + "packages/ridb/node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb/node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb/node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb/node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb/node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb/node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb/node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb/node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb/node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb/node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb/node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb/node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb/node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb/node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb/node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb/node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb/node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb/node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb/node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb/node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb/node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb/node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb/node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "packages/ridb/node_modules/esbuild/node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "packages/ridb/node_modules/jsdom": { + "version": "24.1.3", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-24.1.3.tgz", + "integrity": "sha512-MyL55p3Ut3cXbeBEG7Hcv0mVM8pp8PBNWxRqchZnSfAiES1v1mRnMeFfaHWIPULpwsYfvO+ZmMZz5tGCnjzDUQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "cssstyle": "^4.0.1", + "data-urls": "^5.0.0", + "decimal.js": "^10.4.3", + "form-data": "^4.0.0", + "html-encoding-sniffer": "^4.0.0", + "http-proxy-agent": "^7.0.2", + "https-proxy-agent": "^7.0.5", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.12", + "parse5": "^7.1.2", + "rrweb-cssom": "^0.7.1", + "saxes": "^6.0.0", + "symbol-tree": "^3.2.4", + "tough-cookie": "^4.1.4", + "w3c-xmlserializer": "^5.0.0", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^3.1.1", + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0", + "ws": "^8.18.0", + "xml-name-validator": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "canvas": "^2.11.2" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } + } + }, + "packages/ridb/node_modules/tough-cookie": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, + "engines": { + "node": ">=6" + } + }, + "packages/ridb/node_modules/universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, + "packages/testing": { + "name": "@trust0/ridb-testing", + "version": "0.0.1", + "devDependencies": { + "@esbuild-plugins/node-resolve": "^0.2.2", + "@semantic-release/changelog": "^6.0.3", + "@semantic-release/commit-analyzer": "^13.0.0", + "@semantic-release/exec": "^6.0.3", + "@semantic-release/git": "^10.0.1", + "@semantic-release/github": "^10.3.5", + "@semantic-release/npm": "^12.0.1", + "@semantic-release/release-notes-generator": "^14.0.2", + "@trust0/ridb": "^1.0.9-rc.3", + "@types/node": "^20.14.2", + "@vitest/browser": "^1.6.0", + "@vitest/coverage-istanbul": "^1.6.0", + "@vitest/ui": "^1.6.0", + "esbuild": "0.21.5", + "esbuild-plugin-wasm": "^1.1.0", + "esbuild-plugin-wasm-pack": "^1.1.0", + "jsdom": "^24.1.3", + "semantic-release": "^24.2.0", + "ts-node": "^10.9.2", + "typescript": "^5.4.5", + "uuid": "^11.0.3", + "vite": "^5.0.0", + "vite-plugin-top-level-await": "^1.4.1", + "vite-plugin-wasm": "^3.3.0", + "vitest": "^1.6.0", + "webdriverio": "^9.0.9" + }, + "optionalDependencies": { + "@esbuild/darwin-arm64": "0.15.18", + "@rollup/rollup-linux-x64-gnu": "^4.24.0" + } + }, + "packages/testing/node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "packages/testing/node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "packages/testing/node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "packages/testing/node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "packages/testing/node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "packages/testing/node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "packages/testing/node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "packages/testing/node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/testing/node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/testing/node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/testing/node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/testing/node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/testing/node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/testing/node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/testing/node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/testing/node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "packages/testing/node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "packages/testing/node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "packages/testing/node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "packages/testing/node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "packages/testing/node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "packages/testing/node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "packages/testing/node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "packages/testing/node_modules/esbuild/node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, "packages/testing/node_modules/jsdom": { "version": "24.1.3", "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-24.1.3.tgz", diff --git a/packages/ridb-core/CHANGELOG.md b/packages/ridb-core/CHANGELOG.md index 9749a36..35f8fb6 100644 --- a/packages/ridb-core/CHANGELOG.md +++ b/packages/ridb-core/CHANGELOG.md @@ -1,3 +1,17 @@ +## @trust0/ridb-core [1.2.0-rc.1](https://github.com/trust0-project/RIDB/compare/@trust0/ridb-core@1.1.0...@trust0/ridb-core@1.2.0-rc.1) (2025-01-26) + +### Features + +* add inmemory count advanced indexing ([a43b945](https://github.com/trust0-project/RIDB/commit/a43b94555481b6aa1dce726849f0320a0becabd3)) +* advanced indexing ([1a26e79](https://github.com/trust0-project/RIDB/commit/1a26e798a541762f1876184187f9d9ccd1f72f96)) + +### Bug Fixes + +* cargo version [skip ci] ([ed82dee](https://github.com/trust0-project/RIDB/commit/ed82dee851f40bd16acbbdc6f4326cfdbc2530cf)) +* implement indexing in InMemory, IndexDB, find and count methods ([fe41c7c](https://github.com/trust0-project/RIDB/commit/fe41c7c0d7929369bf0c7d817ae7ee7c131ced97)) +* improve docs ([e3439f5](https://github.com/trust0-project/RIDB/commit/e3439f52212021506d2d0f78ee3dedc8dd395623)) +* testing ([60b5f76](https://github.com/trust0-project/RIDB/commit/60b5f76918822aa28bf369e0def67e273080e1ec)) + ## @trust0/ridb-core [1.1.0](https://github.com/trust0-project/RIDB/compare/@trust0/ridb-core@1.0.0...@trust0/ridb-core@1.1.0) (2025-01-01) ### Features diff --git a/packages/ridb-core/Cargo.lock b/packages/ridb-core/Cargo.lock index 8311ae3..44edd22 100644 --- a/packages/ridb-core/Cargo.lock +++ b/packages/ridb-core/Cargo.lock @@ -118,30 +118,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "chacha20" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", -] - -[[package]] -name = "chacha20poly1305" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" -dependencies = [ - "aead", - "chacha20", - "cipher", - "poly1305", - "zeroize", -] - [[package]] name = "cipher" version = "0.4.4" @@ -150,7 +126,6 @@ checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ "crypto-common 0.1.6", "inout", - "zeroize", ] [[package]] @@ -430,17 +405,6 @@ dependencies = [ "hmac", ] -[[package]] -name = "poly1305" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" -dependencies = [ - "cpufeatures", - "opaque-debug", - "universal-hash", -] - [[package]] name = "polyval" version = "0.6.2" @@ -531,12 +495,11 @@ dependencies = [ [[package]] name = "ridb-core" -version = "1.0.0" +version = "1.1.0" dependencies = [ "aes-gcm", "argon2", "base64", - "chacha20poly1305", "console", "console_error_panic_hook", "getrandom", @@ -892,9 +855,3 @@ dependencies = [ "quote", "syn", ] - -[[package]] -name = "zeroize" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" diff --git a/packages/ridb-core/Cargo.toml b/packages/ridb-core/Cargo.toml index 6941184..efd465d 100644 --- a/packages/ridb-core/Cargo.toml +++ b/packages/ridb-core/Cargo.toml @@ -17,11 +17,10 @@ serde = { version = "1.0.195", features = ["derive"] } serde-wasm-bindgen = "0.6.3" console = "0.15.8" serde_json = "1.0.111" -web-sys = { version = "0.3.69", features = ["Storage","IdbTransaction", "IdbVersionChangeEvent", "IdbObjectStoreParameters", "Event", "DomException", "IdbCursor", "IdbKeyRange", "IdbObjectStore", "IdbRequest", "IdbTransactionMode", "IdbOpenDbRequest", "console", "Window", "Request", "Response", "IdbDatabase", "IdbFactory", "DomStringList"] } +web-sys = { version = "0.3.69", features = ["Storage", "IdbTransaction", "IdbVersionChangeEvent", "IdbObjectStoreParameters","IdbIndexParameters", "Event", "DomException", "IdbCursor", "IdbKeyRange", "IdbObjectStore", "IdbRequest", "IdbTransactionMode", "IdbOpenDbRequest", "console", "Window", "Request", "Response", "IdbDatabase", "IdbFactory", "DomStringList", "IdbIndex"] } wasm-bindgen-test = {version="^0.3.42"} sha2 = "0.11.0-pre.4" base64 = "0.22.1" -chacha20poly1305 = { version = "0.10.1", features = ["std"] } rand = "0.9.0-alpha.2" getrandom = { version = "0.2", features = ["js"] } parking_lot = "0.12" diff --git a/packages/ridb-core/package.json b/packages/ridb-core/package.json index fac822d..fac3a04 100644 --- a/packages/ridb-core/package.json +++ b/packages/ridb-core/package.json @@ -5,7 +5,7 @@ "publishConfig": { "access": "public" }, - "version": "1.1.0", + "version": "1.2.0-rc.1", "main": "./pkg/ridb_core.js", "types": "./pkg/ridb_core.d.ts", "sideEffects": [ diff --git a/packages/ridb-core/src/collection/mod.rs b/packages/ridb-core/src/collection/mod.rs index c7c9e06..cc13be4 100644 --- a/packages/ridb-core/src/collection/mod.rs +++ b/packages/ridb-core/src/collection/mod.rs @@ -103,7 +103,7 @@ export class Collection { #[derive(Clone)] pub struct Collection { pub(crate) name: String, - pub(crate) storage: Storage, + pub(crate) storage: Storage } #[wasm_bindgen] @@ -121,7 +121,7 @@ impl Collection { ) -> Collection { Collection { name, - storage, + storage } } @@ -140,22 +140,19 @@ impl Collection { /// Finds and returns all documents in the collection. /// - /// This function is asynchronous and returns a `Schema` representing + /// This function is asynchronous and returns a `JsValue` representing /// the documents found in the collection. #[wasm_bindgen] - pub async fn find(&mut self, query: JsValue) -> Result { - let result = match self.storage.internal.find(&self.name, query).await { - Ok(docs) => { - docs - }, - Err(e) => { - return Err(js_sys::Error::new(&format!("Failed to find documents: {:?}", e)).into()) - } - }; + pub async fn find(&mut self, query_js: JsValue) -> Result { + // No index available, perform a regular find + let docs = self.storage.find( + &self.name, + query_js + ).await?; - // Convert the result to a JavaScript array - let array = js_sys::Array::from(&result); - let processed_array = js_sys::Array::new(); + // Process and return the result + let array = js_sys::Array::from(&docs); + let processed_array = js_sys::Array::new(); // Iterate over each document in the array for item in array.iter() { @@ -164,7 +161,11 @@ impl Collection { processed_array.push(&processed_item); } - Ok(processed_array.into()) + Ok( + JsValue::from( + processed_array + ) + ) } /// counts and returns all documents in the collection. @@ -172,8 +173,8 @@ impl Collection { /// This function is asynchronous and returns a `Schema` representing /// the documents found in the collection. #[wasm_bindgen] - pub async fn count(&self, query: JsValue) -> Result { - match self.storage.internal.count(&self.name, query).await { + pub async fn count(&self, query_js: JsValue) -> Result { + match self.storage.count(&self.name, query_js).await { Ok(count) => Ok(count), Err(e) => Err(js_sys::Error::new(&format!("Failed to count documents: {:?}", e)).into()) } @@ -184,7 +185,7 @@ impl Collection { /// This function is asynchronous. #[wasm_bindgen(js_name="findById")] pub async fn find_by_id(&self, primary_key: JsValue) -> Result{ - let document = match self.storage.internal.find_document_by_id(&self.name, primary_key ).await { + let document = match self.storage.find_document_by_id(&self.name, primary_key ).await { Ok(doc) => doc, Err(e) => return Err(js_sys::Error::new(&format!("Failed to find document by ID: {:?}", e)).into()) }; diff --git a/packages/ridb-core/src/database/mod.rs b/packages/ridb-core/src/database/mod.rs index c2e6dc6..d9ebc8f 100644 --- a/packages/ridb-core/src/database/mod.rs +++ b/packages/ridb-core/src/database/mod.rs @@ -1,6 +1,6 @@ use std::collections::HashMap; use js_sys::{Array, Object, Reflect}; -use wasm_bindgen::{ JsCast, JsValue}; +use wasm_bindgen::{JsCast, JsValue}; use wasm_bindgen::prelude::wasm_bindgen; use crate::collection::Collection; use crate::error::RIDBError; @@ -145,26 +145,26 @@ pub struct Database { #[wasm_bindgen] impl Database { + #[wasm_bindgen(js_name = "start")] pub async fn start(&mut self) -> Result { - Logger::log(&"Starting the database...".into()); + Logger::debug("DB", &"Starting the database...".into()); if !self.started { let res = self.storage.internal.start().await?; self.started = true; - Logger::log(&"Database started successfully.".into()); - return Ok(res); + Logger::debug("DB", &"Database started successfully.".into()); + Ok(res) + } else { + Ok(JsValue::from_str("Database already started")) } - return Ok( - JsValue::from_str("Database already started") - ); } #[wasm_bindgen(js_name = "close")] pub async fn close(mut self) -> Result { - Logger::debug(&"Closing the database...".into()); + Logger::debug("DB",&"Closing the database...".into()); let res = self.storage.internal.close().await; self.started = false; - Logger::debug(&"Database closed successfully.".into()); + Logger::debug("DB",&"Database closed successfully.".into()); res } @@ -173,7 +173,6 @@ impl Database { self.started } - /// Retrieves the collections in the database. /// /// This function returns an `Object` containing the collections. @@ -183,29 +182,22 @@ impl Database { /// * `Result` - A result containing an `Object` with the collections or an error. #[wasm_bindgen(getter)] pub fn collections(&self) -> Result { - Logger::debug(&"Retrieving collections...".into()); - let mut collections: HashMap = HashMap::new(); + Logger::debug("DB",&"Retrieving collections...".into()); + let object = Object::new(); for (key, _) in self.storage.schemas.iter() { - Logger::debug(&format!("Processing collection: {}", key).into()); + Logger::debug("DB",&format!("Processing collection: {}", key).into()); let storage = self.storage.clone(); let collection = Collection::from( key.clone(), storage ); - collections.insert( - key.clone(), - collection - ); - } - let object = Object::new(); - for (key, collection) in collections { Reflect::set( &object, &JsValue::from_str(key.as_str()), &JsValue::from(collection) ).map_err(|e| JsValue::from(RIDBError::from(e)))?; } - Logger::debug(&"Collections retrieved successfully.".into()); + Logger::debug("DB",&"Collections retrieved successfully.".into()); Ok(object) } @@ -219,43 +211,15 @@ impl Database { password: Option, storage: Option ) -> Result { - Logger::debug(&format!("Creating database: {}", db_name).into()); - let storage: StorageExternal = if let Some(storage) = storage { - Logger::debug(&"Using provided storage.".into()); - storage.into() - } else { - Logger::debug(&"Creating InMemory storage.".into()); - JsValue::from(InMemory::create(db_name, schemas_js.clone()).await?).into() - }; - - - let vec_plugins_js: Vec = module.apply(plugins)?; - Logger::debug(&"Plugins applied.".into()); - let mut vec_plugins: Vec = vec_plugins_js.into_iter() - .map(|plugin| plugin.unchecked_into::()) - .collect(); - - Logger::debug(&"Adding defaults plugin.".into()); - vec_plugins.push(DefaultsPlugin::new()?.base.clone()); - - Logger::debug(&"Adding migration plugin.".into()); - vec_plugins.push(MigrationPlugin::new()?.base.clone()); - - Logger::debug(&"Adding integrity plugin.".into()); - vec_plugins.push(IntegrityPlugin::new()?.base.clone()); - - if let Some(pass) = password { - Logger::debug(&"Adding encryption plugin.".into()); - let encryption = EncryptionPlugin::new(pass)?; - vec_plugins.push(encryption.base.clone()); - } + Logger::debug("DB",&format!("Creating database: {}", db_name).into()); let mut schemas: HashMap = HashMap::new(); let mut migrations: HashMap = HashMap::new(); let keys = Object::keys(&schemas_js.clone()).into_iter(); + for collection in keys { let collection_string: String = collection.as_string().ok_or("Invalid collection name")?; - Logger::debug(&format!("Processing schema for collection: {}", collection_string).into()); + Logger::debug("DB",&format!("Processing schema for collection: {}", collection_string).into()); let schema_type = Reflect::get(&schemas_js.clone(), &collection)?; let schema = Schema::create(schema_type)?; let migration = Reflect::get(&migrations_js.clone(), &collection)?; @@ -266,7 +230,7 @@ impl Database { .map_err(|e| RIDBError::from(e))?; if function.is_undefined() { - Logger::debug(&format!("Migration path undefined for collection: {}, version: {}", collection_string, version).into()); + Logger::debug("DB",&format!("Migration path undefined for collection: {}, version: {}", collection_string, version).into()); return Err( JsValue::from( format!("Required Schema {} migration path {} to not be undefined", collection_string, version) @@ -275,11 +239,44 @@ impl Database { } } - schemas.insert(collection_string.clone(), schema); - migrations.insert(collection_string, migration); + schemas.insert(collection_string.clone(), schema.clone()); + migrations.insert(collection_string.clone(), migration); + + } + + + let storage: StorageExternal = if let Some(storage) = storage { + Logger::debug("DB",&"Using provided storage.".into()); + storage.into() + } else { + Logger::debug("DB",&"Creating InMemory storage.".into()); + JsValue::from(InMemory::create(db_name, schemas_js.clone()).await?).into() + }; + + let vec_plugins_js: Vec = module.apply(plugins)?; + Logger::debug("DB",&"Plugins applied.".into()); + let mut vec_plugins: Vec = vec_plugins_js.into_iter() + .map(|plugin| plugin.unchecked_into::()) + .collect(); + + Logger::debug("DB",&"Adding defaults plugin.".into()); + vec_plugins.push(DefaultsPlugin::new()?.base.clone()); + + Logger::debug("DB",&"Adding migration plugin.".into()); + vec_plugins.push(MigrationPlugin::new()?.base.clone()); + + Logger::debug("DB",&"Adding integrity plugin.".into()); + vec_plugins.push(IntegrityPlugin::new()?.base.clone()); + + if let Some(pass) = password { + Logger::debug("DB",&"Adding encryption plugin.".into()); + let encryption = EncryptionPlugin::new(pass)?; + vec_plugins.push(encryption.base.clone()); } - Logger::debug(&"Creating storage with schemas and migrations.".into()); + + + Logger::debug("DB",&"Creating storage with schemas and migrations.".into()); let mounted_storage = Storage::create( schemas, migrations, @@ -287,10 +284,10 @@ impl Database { storage.clone() ).map_err(|e| JsValue::from(RIDBError::from(e)))?; - Logger::debug(&"Database created successfully.".into()); + Logger::debug("DB",&"Database created successfully.".into()); let db = Database { storage:mounted_storage, started: false }; - storage.start().await.unwrap(); + storage.start().await?; Ok(db) } diff --git a/packages/ridb-core/src/lib.rs b/packages/ridb-core/src/lib.rs index b1a8d36..cf576f2 100644 --- a/packages/ridb-core/src/lib.rs +++ b/packages/ridb-core/src/lib.rs @@ -1,3 +1,5 @@ +#![allow(dead_code)] + use wasm_bindgen::prelude::*; use wasm_bindgen::JsValue; use std::panic; @@ -76,17 +78,23 @@ mod logger { pub struct Logger; impl Logger { - pub fn log(message: &JsValue) { - Logger::log_1(message); + pub fn log(component: &str, message: &JsValue) { + if crate::is_debug_mode() { + Logger::log_1(component, message); + } } - pub fn debug(message: &JsValue) { + pub fn debug(component: &str, message: &JsValue) { if crate::is_debug_mode() { - Logger::log_1(message); + Logger::log_1(component, message); } } - fn log_1(message: &JsValue) { - console::log_1(message); + fn log_1(component: &str, message: &JsValue) { + console::log_1( + &JsValue::from( + format!("[{}] {:?}", component, message) + ) + ); } } } \ No newline at end of file diff --git a/packages/ridb-core/src/operation/mod.rs b/packages/ridb-core/src/operation/mod.rs index 4ed6f12..87d1f6b 100644 --- a/packages/ridb-core/src/operation/mod.rs +++ b/packages/ridb-core/src/operation/mod.rs @@ -1,7 +1,5 @@ -use serde_wasm_bindgen::to_value; use wasm_bindgen::JsValue; use wasm_bindgen::prelude::wasm_bindgen; -use crate::error::RIDBError; #[wasm_bindgen(typescript_custom_section)] const TS_APPEND_CONTENT: &'static str = r#" @@ -26,10 +24,8 @@ export type Operation = { */ data: Doc, - /** - * An array of indexes related to the operation. - */ - indexes: Array + primaryKeyField?: string, + primaryKey?: string } "#; @@ -43,8 +39,10 @@ pub struct Operation { pub(crate) op_type: OpType, /// The data involved in the operation. pub(crate) data: JsValue, - /// The indexes related to the operation. - pub(crate) indexes: Vec + /// The primary key field of the current collection + pub(crate) primary_key_field: Option, + /// The primary key value of the current data + pub(crate) primary_key: Option } #[derive(Debug, Clone)] @@ -96,14 +94,55 @@ impl Operation { self.data.clone() } - /// Retrieves the indexes related to the operation. + /// Retrieves the primary key field of the current collection. /// /// # Returns /// - /// * `Result` - A result containing the indexes as a `JsValue` or an error. - #[wasm_bindgen(getter)] - pub fn indexes(&self) -> Result { - to_value(&self.indexes.clone()) - .map_err(|e| JsValue::from(RIDBError::from(e))) + /// * `Option` - The primary key field of the current collection. + #[wasm_bindgen(getter, js_name="primaryKeyField")] + pub fn primary_key_field(&self) -> JsValue { + let primary_key_field = self.primary_key_field.clone(); + if primary_key_field.is_some() { + JsValue::from( + primary_key_field.unwrap() + ) + } else { + JsValue::undefined() + } + } + + /// Retrieves the primary key value of the current data. + /// + /// # Returns + /// + /// * `Option` - The primary key value of the current data. + #[wasm_bindgen(getter, js_name="primaryKey")] + pub fn primary_key(&self) -> JsValue { + let primary_key = self.primary_key.clone(); + if primary_key.is_some() { + JsValue::from( + primary_key.unwrap() + ) + } else { + JsValue::undefined() + } + } + + #[wasm_bindgen(getter, js_name="primaryKeyIndex")] + pub fn primary_key_index(&self) -> Result { + match &self.primary_key_field { + Some(primary_key_field) => Ok( + format!( + "pk_{}_{}", + self.collection, + &primary_key_field + ) + ), + None => Err( + JsValue::from( + format!("Unable to create default index, Primary Key not available in current OP") + ) + ), + } } } diff --git a/packages/ridb-core/src/plugin/defaults/mod.rs b/packages/ridb-core/src/plugin/defaults/mod.rs index 7faefb3..bf0e1b6 100644 --- a/packages/ridb-core/src/plugin/defaults/mod.rs +++ b/packages/ridb-core/src/plugin/defaults/mod.rs @@ -20,12 +20,12 @@ impl DefaultsPlugin { let plugin_clone1 = plugin.clone(); let create_hook = Closure::wrap(Box::new(move |schema, _migration, document| { // Add logging for debugging - Logger::debug(&"Creating document with defaults".into()); + Logger::debug("DefaultsPlugin", &"Creating document with defaults".into()); let result = plugin_clone1.clone().add_defaults(schema, document); if result.is_ok() { - Logger::debug(&"Document created successfully".into()); + Logger::debug("DefaultsPlugin", &"Document created successfully".into()); } else { - Logger::debug(&"Failed to create document".into()); + Logger::debug("DefaultsPlugin", &"Failed to create document".into()); } result }) as Box Result>); @@ -36,7 +36,7 @@ impl DefaultsPlugin { pub(crate) fn add_defaults(&self, schema: JsValue, document: JsValue) -> Result { - Logger::debug(&"Adding defaults to document".into()); + Logger::debug("DefaultsPlugin", &"Adding defaults to document".into()); let schema = Schema::create(schema)?; let properties = schema.properties.clone(); @@ -45,7 +45,7 @@ impl DefaultsPlugin { if current_value.is_null() || current_value.is_undefined() { let has_default = prop.default.is_some(); if has_default { - Logger::debug(&format!("Setting default for key: {}", key).into()); + Logger::debug("DefaultsPlugin",&format!("Setting default for key: {}", key).into()); Reflect::set( &document, &JsValue::from_str(&key), @@ -54,7 +54,7 @@ impl DefaultsPlugin { } } } - Logger::debug(&"Defaults added successfully".into()); + Logger::debug("DefaultsPlugin",&"Defaults added successfully".into()); Ok(document) } diff --git a/packages/ridb-core/src/query/mod.rs b/packages/ridb-core/src/query/mod.rs index aea8846..c7791d8 100644 --- a/packages/ridb-core/src/query/mod.rs +++ b/packages/ridb-core/src/query/mod.rs @@ -28,8 +28,8 @@ export type QueryType = Partial<{ > }> & LogicalOperators | LogicalOperators[]; export class Query { - constructor(query: QueryType, schema:Schema) - readonly query: QueryType + constructor(query: QueryType, schema:Schema); + readonly query: QueryType; } //test "#; @@ -38,7 +38,7 @@ export class Query { #[wasm_bindgen(skip_typescript)] pub struct Query { pub(crate) query: JsValue, - pub(crate) schema: Schema, + pub(crate) schema: Schema } #[wasm_bindgen] @@ -55,57 +55,113 @@ impl Query { Ok(normalized_query) } - fn normalize_query(&self, query: &JsValue) -> Result { - // Ensure query is an object - if !query.is_object() { - return Err(JsValue::from_str("Query must be an object")); - } - - // Separate attributes and logical operators - let obj = Object::from(query.clone()); - let keys = Object::keys(&obj); - let conditions = Array::new(); - - for i in 0..keys.length() { - let key = keys.get(i).as_string().unwrap_or_default(); - let value = Reflect::get(query, &JsValue::from_str(&key))?; + /// Returns the schema properties (fields) that are used in the query. + /// The query may contain operators like $and, $or, $gt, $lt, etc. + pub fn get_properties(&self) -> Result, JsValue> { + let mut properties = Vec::new(); - if key == "$and" || key == "$or" { - // Process the logical operator recursively - if !Array::is_array(&value) { - return Err(JsValue::from_str(&format!("{} must be an array", key))); + fn collect_properties(value: &JsValue, props: &mut Vec) -> Result<(), JsValue> { + if value.is_array() { + // Process array elements + let arr = Array::from(value); + for i in 0..arr.length() { + let elem = arr.get(i); + collect_properties(&elem, props)?; } - let arr = Array::from(&value); - let processed_arr = Array::new(); + } else if value.is_object() { + // Process object properties + let obj = Object::from(value.clone()); + let keys = Object::keys(&obj); + for i in 0..keys.length() { + let key = keys.get(i).as_string().unwrap_or_default(); + let val = Reflect::get(&obj, &JsValue::from(&key))?; - for i in 0..arr.length() { - let item = arr.get(i); - let normalized_item = self.normalize_query(&item)?; - processed_arr.push(&normalized_item); + if key.starts_with('$') { + // Operator: process value recursively + collect_properties(&val, props)?; + } else { + // Property name: add if not already present + if !props.contains(&key) { + props.push(key.clone()); + } + // Process value recursively + collect_properties(&val, props)?; + } } + } + // Non-object and non-array values are ignored + Ok(()) + } - let operator_condition = Object::new(); - Reflect::set(&operator_condition, &JsValue::from_str(&key), &processed_arr)?; + collect_properties(&self.get_query()?, &mut properties)?; + Ok(properties) + } - // Add the operator condition to conditions - conditions.push(&operator_condition); + fn normalize_query(&self, query: &JsValue) -> Result { + // 1) If it's an array, normalize each item and wrap them into an $and + if query.is_array() { + let arr = Array::from(query); + let conditions = Array::new(); + for i in 0..arr.length() { + let item = arr.get(i); + let normalized_item = self.normalize_query(&item)?; + conditions.push(&normalized_item); + } + // If there is exactly 1 element, just return that element + if conditions.length() == 1 { + Ok(conditions.get(0)) } else { - // Attribute: wrap it into a condition object - let condition = Object::new(); - Reflect::set(&condition, &JsValue::from_str(&key), &value)?; - conditions.push(&condition); + // Otherwise wrap them in $and + let result = Object::new(); + Reflect::set(&result, &JsValue::from_str("$and"), &conditions)?; + Ok(result.into()) } } + // 2) Otherwise, ensure it is an object + else if query.is_object() { + let obj = Object::from(query.clone()); + let keys = Object::keys(&obj); + let conditions = Array::new(); + + for i in 0..keys.length() { + let key = keys.get(i).as_string().unwrap_or_default(); + let value = Reflect::get(query, &JsValue::from_str(&key))?; - // Wrap conditions into $and if there are multiple conditions - if conditions.length() == 1 { - // Only one condition, return it directly - Ok(conditions.get(0)) + if key == "$and" || key == "$or" { + // Process the logical operator array + if !Array::is_array(&value) { + return Err(JsValue::from_str(&format!("{} must be an array", key))); + } + let arr = Array::from(&value); + let processed_arr = Array::new(); + for j in 0..arr.length() { + let item = arr.get(j); + let normalized_item = self.normalize_query(&item)?; + processed_arr.push(&normalized_item); + } + + let operator_condition = Object::new(); + Reflect::set(&operator_condition, &JsValue::from_str(&key), &processed_arr)?; + conditions.push(&operator_condition); + } else { + // Normal field condition + let condition = Object::new(); + Reflect::set(&condition, &JsValue::from_str(&key), &value)?; + conditions.push(&condition); + } + } + + // Wrap conditions into $and if there are multiple + if conditions.length() == 1 { + Ok(conditions.get(0)) + } else { + let result = Object::new(); + Reflect::set(&result, &JsValue::from_str("$and"), &conditions)?; + Ok(result.into()) + } } else { - // Multiple conditions, wrap into $and - let result = Object::new(); - Reflect::set(&result, &JsValue::from_str("$and"), &conditions)?; - Ok(result.into()) + // If it's neither an array nor an object, reject + Err(JsValue::from_str("Query must be an object or an array at the top level")) } } @@ -113,7 +169,7 @@ impl Query { self.process_query(&self.query) } - fn extract_properties(&self, properties_jsvalue: &JsValue) -> Result, JsValue> { + fn extract_schema_properties(&self, properties_jsvalue: &JsValue) -> Result, JsValue> { if !properties_jsvalue.is_object() { return Err(JsValue::from_str("Properties is not an object")); } @@ -135,24 +191,18 @@ impl Query { Ok(properties) } - fn process_query(&self, query: &JsValue) -> Result { - // Get properties from the schema + pub fn process_query(&self, query: &JsValue) -> Result { let properties_jsvalue = self.schema.get_properties()?; - - // Extract properties and their types from the properties_jsvalue - let properties = self.extract_properties(&properties_jsvalue)?; - + let properties = self.extract_schema_properties(&properties_jsvalue)?; if !query.is_object() { return Err(JsValue::from_str("Query must be an object")); } let result = Object::new(); let keys = Object::keys(&Object::from(query.clone())); - for i in 0..keys.length() { let key = keys.get(i).as_string().unwrap_or_default(); let value = Reflect::get(query, &JsValue::from_str(&key))?; if key == "$and" || key == "$or" { - // Handle logical operators if !Array::is_array(&value) { return Err(JsValue::from_str(&format!("{} must be an array", key))); } @@ -165,17 +215,26 @@ impl Query { } Reflect::set(&result, &JsValue::from_str(&key), &processed_arr)?; } else { - // Check if key is a valid property if let Some(property_type) = properties.get(&key) { - // Process the value let processed_value = self.process_value(&value, property_type)?; Reflect::set(&result, &JsValue::from_str(&key), &processed_value)?; + } else if properties.get("id").is_some() && self.schema.clone().indexes.is_some() { + if let Some(property_type) = properties.get("id") { + let processed_value = self.process_value(&value, property_type)?; + Reflect::set(&result, &JsValue::from_str(&key), &processed_value)?; + } else { + return Err(JsValue::from_str(&format!("Invalid property: {} does not exist", key))); + } } else { - return Err(JsValue::from_str(&format!("Invalid property: {}", key))); + return Err(JsValue::from_str(&format!("Invalid property: {} does not exist", key))); } } } - Ok(result.into()) + Ok( + JsValue::from( + result + ) + ) } fn process_value(&self, value: &JsValue, property_type: &str) -> Result { @@ -252,155 +311,393 @@ impl Query { }, } } + + /// Returns the value of a property from the (normalized) query by its name. + /// This will scan the normalized query structure (including arrays, $and/$or blocks, etc.) + /// to find the first occurrence of the given property name and return its corresponding value. + /// + /// If not found, an error is returned. + /// + /// Example: + /// let val = query.get("age")?; + /// // val is a JsValue that might be a number, string, boolean, array, or object (e.g., { "$gt": 30 }) + #[wasm_bindgen(js_name = "get")] + pub fn get(&self, property_name: &str) -> Result { + let normalized = self.get_query()?; + match Self::find_property_value(&normalized, property_name) { + Some(val) => Ok(val), + None => Err(JsValue::from_str(&format!( + "Property '{}' not found in query", + property_name + ))), + } + } } +impl Query { + /// Recursively searches the (already normalized) query structure for the first occurrence + /// of a given property name. Returns Some(JsValue) if found, otherwise None. + fn find_property_value(value: &JsValue, property_name: &str) -> Option { + if value.is_array() { + // For arrays (e.g. $and/$or arrays), check each element + let arr = Array::from(value); + for i in 0..arr.length() { + let elem = arr.get(i); + if let Some(val) = Self::find_property_value(&elem, property_name) { + return Some(val); + } + } + } else if value.is_object() { + // For objects, check each key + let obj = Object::from(value.clone()); + let keys = Object::keys(&obj); + + for i in 0..keys.length() { + let key = keys.get(i).as_string().unwrap_or_default(); + let val = Reflect::get(&obj, &JsValue::from_str(&key)).ok()?; + + // Our property name matches this key + if key == property_name { + // Return the matched value immediately. + return Some(val); + } + + // If it's an operator or a nested object, recurse + if key.starts_with('$') || val.is_object() || val.is_array() { + if let Some(v) = Self::find_property_value(&val, property_name) { + return Some(v); + } + } + } + } + // If it's neither an array nor an object (or we didn't find anything), return None + None + } +} #[wasm_bindgen_test] -fn test_query_parse_valid() { +fn test_get_properties_simple_fields() { let schema_str = r#"{ "version": 1, - "primaryKey": "id", + "primaryKey":"id", "type": "object", + "primaryKey":"id", "properties": { - "id": { "type": "string", "maxLength": 60 }, - "name": { "type": "string" }, - "age": { "type": "number" } + "id": { "type": "string" }, + "age": { "type": "number" }, + "name": { "type": "string" } } }"#; - let query_str = r#"{ - "id":"12345", - "name": "John", - "age": { "$gt": 30 } + let schema_value = JSON::parse(schema_str).unwrap(); + let schema = Schema::create(schema_value).unwrap(); + // Test with simple fields without any operators + let query_json = r#" + { + "name": "John Doe", + "age": 30 } "#; - let schema_value = JSON::parse(&schema_str).unwrap(); - let schema_js_value = schema_value; - let schema = Schema::create( - schema_js_value - ).expect("Could not create schema"); - let query_js_value = JSON::parse(query_str).expect("QueryValue"); - let query = Query::new( - query_js_value, schema).expect("could not create q"); - let result = query.parse(); - assert!(result.is_ok()); + let query_js = JSON::parse(query_json).unwrap(); + let query = Query::new(query_js, schema).unwrap(); + let props = query.get_properties().unwrap(); + + let mut expected_props = vec!["name", "age"]; + expected_props.sort(); + let mut props_sorted = props.clone(); + props_sorted.sort(); + + assert_eq!(props_sorted, expected_props); } #[wasm_bindgen_test] -fn test_query_parse_invalid_property() { - let schema_str = r#" - { +fn test_get_properties_with_operators() { + let schema_str = r#"{ "version": 1, - "primaryKey": "id", "type": "object", + "primaryKey":"id", "properties": { - "id": { "type": "string", "maxLength": 60 }, - "name": { "type": "string" } + "id": { "type": "string" }, + "price": { "type": "number" }, + "stock": { "type": "number" } } + }"#; + let schema_value = JSON::parse(schema_str).unwrap(); + let schema = Schema::create(schema_value).unwrap(); + // Test with operators like $gt, $lt + let query_json = r#" + { + "price": { "$gt": 100 }, + "stock": { "$lt": 50 } } "#; - let query_str = r#" + let query_js = JSON::parse(query_json).unwrap(); + let query = Query::new(query_js, schema).unwrap(); + let props = query.get_properties().unwrap(); + + let mut expected_props = vec!["price", "stock"]; + expected_props.sort(); + let mut props_sorted = props.clone(); + props_sorted.sort(); + + assert_eq!(props_sorted, expected_props); +} + +#[wasm_bindgen_test] +fn test_get_properties_with_logical_operators() { + let schema_str = r#"{ + "version": 1, + "type": "object", + "primaryKey":"id", + "properties": { + "id": { "type": "string" }, + "category": { "type": "string" }, + "available": { "type": "boolean" }, + "brand": { "type": "string" } + } + }"#; + let schema_value = JSON::parse(schema_str).unwrap(); + let schema = Schema::create(schema_value).unwrap(); + // Test with logical operators like $and, $or + let query_json = r#" { - "nonexistent": "value" + "$and": [ + { "category": "electronics" }, + { "available": true } + ], + "$or": [ + { "brand": "BrandA" }, + { "brand": "BrandB" } + ] } "#; - let schema_value = JSON::parse(&schema_str).unwrap(); - let schema_js_value = schema_value; - let schema = Schema::create(schema_js_value).unwrap(); + let query_js = JSON::parse(query_json).unwrap(); + let query = Query::new(query_js, schema).unwrap(); + let props = query.get_properties().unwrap(); - let query = Query::new(JSON::parse(query_str).unwrap(), schema).unwrap(); - let result = query.parse(); - assert!(result.is_err()); - assert_eq!( - result.err().unwrap().as_string().unwrap(), - "Invalid property: nonexistent" - ); + let mut expected_props = vec!["category", "available", "brand"]; + expected_props.sort(); + let mut props_sorted = props.clone(); + props_sorted.sort(); + + assert_eq!(props_sorted, expected_props); } #[wasm_bindgen_test] -fn test_query_parse_invalid_type() { - let schema_str = r#" - { +fn test_get_properties_nested_operators() { + let schema_str = r#"{ "version": 1, - "primaryKey": "id", "type": "object", + "primaryKey":"id", "properties": { - "age": { "type": "number" } + "id": { "type": "string" }, + "age": { "type": "number" }, + "status": { "type": "string" }, + "membership": { "type": "string" } + } + }"#; + let schema_value = JSON::parse(schema_str).unwrap(); + let schema = Schema::create(schema_value).unwrap(); + // Test with nested operators + let query_json = r#" + { + "status": "active", + "details": { + "$and": [ + { "age": { "$gt": 18 } }, + { "membership": { "$ne": "basic" } } + ] } } "#; - let query_str = r#" + let query_js = JSON::parse(query_json).unwrap(); + let query = Query::new(query_js, schema).unwrap(); + let props = query.get_properties().unwrap(); + + let mut expected_props = vec!["status", "details", "age", "membership"]; + expected_props.sort(); + let mut props_sorted = props.clone(); + props_sorted.sort(); + + assert_eq!(props_sorted, expected_props); +} + +#[wasm_bindgen_test] +fn test_get_properties_array_values() { + let schema_str = r#"{ + "version": 1, + "type": "object", + "primaryKey":"id", + "properties": { + "id": { "type": "string" }, + "tags": { "type": "string" }, + "ratings": { "type": "number" } + } + }"#; + let schema_value = JSON::parse(schema_str).unwrap(); + let schema = Schema::create(schema_value).unwrap(); + // Test properties with array values + let query_json = r#" { - "age": "thirty" + "tags": ["new", "sale", "popular"], + "ratings": { "$in": [4, 5] } } "#; - let schema_value = JSON::parse(&schema_str).unwrap(); - let schema_js_value = schema_value; - let schema = Schema::create(schema_js_value).unwrap(); - let query = Query::new(JSON::parse(query_str).unwrap(), schema).unwrap(); - let result = query.parse(); - assert!(result.is_err()); - assert_eq!( - result.err().unwrap().as_string().unwrap(), - "Expected a number" - ); + let query_js = JSON::parse(query_json).unwrap(); + let query = Query::new(query_js, schema).unwrap(); + let props = query.get_properties().unwrap(); + + let mut expected_props = vec!["tags", "ratings"]; + expected_props.sort(); + let mut props_sorted = props.clone(); + props_sorted.sort(); + + assert_eq!(props_sorted, expected_props); } #[wasm_bindgen_test] -fn test_query_parse_logical_operators() { - let schema_str = r#" - { +fn test_get_properties_empty_query() { + let schema_str = r#"{ "version": 1, - "primaryKey": "id", "type": "object", + "primaryKey":"id", "properties": { - "name": { "type": "string" }, - "age": { "type": "number" } + "id": { "type": "string" }, + "tags": { "type": "string" }, + "ratings": { "type": "number" } + } + }"#; + let schema_value = JSON::parse(schema_str).unwrap(); + let schema = Schema::create(schema_value).unwrap(); + + // Test with an empty query + let query_json = "{}"; + let query_js = JSON::parse(query_json).unwrap(); + let query = Query::new(query_js, schema).unwrap(); + let props = query.get_properties().unwrap(); + + let expected_props: Vec = Vec::new(); + assert_eq!(props, expected_props); +} + +#[wasm_bindgen_test] +fn test_get_properties_deeply_nested() { + let schema_str = r#"{ + "version": 1, + "type": "object", + "primaryKey":"id", + "properties": { + "id": { "type": "string" }, + "level1": { + "type": "object", + "properties": { + "level2": { + "type":"object", + "properties": { + "level3": { + "type":"object", + "properties": { + "field1": { "type": "string"}, + "field2": { "type": "string"} + } + } + } + } + } + } + } + }"#; + let schema_value = JSON::parse(schema_str).unwrap(); + let schema = Schema::create(schema_value).unwrap(); + // Test with deeply nested query + let query_json = r#" + { + "level1": { + "level2": { + "level3": { + "$and": [ + { "field1": { "$eq": "value1" } }, + { "field2": { "$ne": "value2" } } + ] + } + } } } "#; - let query_str = r#" + let query_js = JSON::parse(query_json).unwrap(); + let query = Query::new(query_js, schema).unwrap(); + let props = query.get_properties().unwrap(); + let mut expected_props = vec!["level1", "level2", "level3", "field1", "field2"]; + expected_props.sort(); + let mut props_sorted = props.clone(); + props_sorted.sort(); + + assert_eq!(props_sorted, expected_props); +} + +#[wasm_bindgen_test] +fn test_get_properties_with_multiple_same_props() { + let schema_str = r#"{ + "version": 1, + "type": "object", + "primaryKey":"id", + "properties": { + "id": { "type": "string" }, + "name": { "type": "string" } + } + }"#; + let schema_value = JSON::parse(schema_str).unwrap(); + let schema = Schema::create(schema_value).unwrap(); + // Test query where the same property appears multiple times + let query_json = r#" { - "$and": [ - { "name": "Alice" }, - { "age": { "$gte": 25 } } + "name": "Alice", + "$or": [ + { "name": "Bob" }, + { "name": "Charlie" } ] } "#; - let schema_value = JSON::parse(&schema_str).unwrap(); - let schema_js_value = schema_value; - let schema = Schema::create(schema_js_value).unwrap(); - let query = Query::new(JSON::parse(query_str).unwrap(), schema).unwrap(); - let result = query.parse(); - assert!(result.is_ok()); + let query_js = JSON::parse(query_json).unwrap(); + let query = Query::new(query_js, schema).unwrap(); + let props = query.get_properties().unwrap(); + + let expected_props = vec!["name"]; + + assert_eq!(props, expected_props); } #[wasm_bindgen_test] -fn test_query_parse_invalid_operator() { - let schema_str = r#" - { +fn test_get_properties_with_array_at_top_level() { + let schema_str = r#"{ "version": 1, - "primaryKey": "id", "type": "object", + "primaryKey":"id", "properties": { + "id": { "type": "string" }, + "name": { "type": "string" }, "age": { "type": "number" } } - } - "#; - let query_str = r#" - { - "age": { "$unknown": 30 } - } + }"#; + let schema_value = JSON::parse(schema_str).unwrap(); + let schema = Schema::create(schema_value).unwrap(); + // Test query where the top-level query is an array + let query_json = r#" + [ + { "name": "Alice" }, + { "name": "Bob" }, + { "age": { "$gt": 25 } } + ] "#; - let schema_value = JSON::parse(&schema_str).unwrap(); - let schema_js_value = schema_value; - let schema = Schema::create(schema_js_value).unwrap(); - let query = Query::new(JSON::parse(query_str).unwrap(), schema).unwrap(); - let result = query.parse(); - assert!(result.is_err()); - assert_eq!( - result.err().unwrap().as_string().unwrap(), - "Invalid operator: $unknown" - ); + let query_js = JSON::parse(query_json).unwrap(); + let query = Query::new(query_js, schema).unwrap(); + let props = query.get_properties().unwrap(); + + let mut expected_props = vec!["name", "age"]; + expected_props.sort(); + let mut props_sorted = props.clone(); + props_sorted.sort(); + + assert_eq!(props_sorted, expected_props); } #[wasm_bindgen_test] @@ -410,7 +707,9 @@ fn test_query_parse_operator_wrong_type() { "version": 1, "primaryKey": "id", "type": "object", + "primaryKey":"id", "properties": { + "id": { "type": "string" }, "age": { "type": "number" } } } @@ -420,10 +719,12 @@ fn test_query_parse_operator_wrong_type() { "age": { "$gt": "thirty" } } "#; - let schema_value = JSON::parse(&schema_str).unwrap(); - let schema_js_value = schema_value; - let schema = Schema::create(schema_js_value).unwrap(); - let query = Query::new(JSON::parse(query_str).unwrap(), schema).unwrap(); + let schema_value = JSON::parse(schema_str).unwrap(); + let schema = Schema::create(schema_value).unwrap(); + + let query_js_value = JSON::parse(query_str).unwrap(); + let query = Query::new(query_js_value, schema).unwrap(); + let result = query.parse(); assert!(result.is_err()); assert_eq!( @@ -439,7 +740,9 @@ fn test_query_parse_in_operator() { "version": 1, "primaryKey": "id", "type": "object", + "primaryKey":"id", "properties": { + "id": { "type": "string" }, "status": { "type": "string" } } } @@ -449,10 +752,12 @@ fn test_query_parse_in_operator() { "status": { "$in": ["active", "pending"] } } "#; - let schema_value = JSON::parse(&schema_str).unwrap(); - let schema_js_value = schema_value; - let schema = Schema::create(schema_js_value).unwrap(); - let query = Query::new(JSON::parse(query_str).unwrap(), schema).unwrap(); + let schema_value = JSON::parse(schema_str).unwrap(); + let schema = Schema::create(schema_value).unwrap(); + + let query_js_value = JSON::parse(query_str).unwrap(); + let query = Query::new(query_js_value, schema).unwrap(); + let result = query.parse(); assert!(result.is_ok()); } @@ -464,7 +769,9 @@ fn test_query_parse_in_operator_wrong_type() { "version": 1, "primaryKey": "id", "type": "object", + "primaryKey":"id", "properties": { + "id": { "type": "string" }, "age": { "type": "number" } } } @@ -474,10 +781,12 @@ fn test_query_parse_in_operator_wrong_type() { "age": { "$in": ["thirty", "forty"] } } "#; - let schema_value = JSON::parse(&schema_str).unwrap(); - let schema_js_value = schema_value; - let schema = Schema::create(schema_js_value).unwrap(); - let query = Query::new(JSON::parse(query_str).unwrap(), schema).unwrap(); + let schema_value = JSON::parse(schema_str).unwrap(); + let schema = Schema::create(schema_value).unwrap(); + + let query_js_value = JSON::parse(query_str).unwrap(); + let query = Query::new(query_js_value, schema).unwrap(); + let result = query.parse(); assert!(result.is_err()); assert_eq!( @@ -490,8 +799,8 @@ fn test_query_parse_in_operator_wrong_type() { fn test_query_get_query_normalization_simple_attributes() { let schema_str = r#"{ "version": 1, - "primaryKey": "id", "type": "object", + "primaryKey":"id", "properties": { "id": { "type": "string" }, "name": { "type": "string" } @@ -503,6 +812,7 @@ fn test_query_get_query_normalization_simple_attributes() { }"#; let schema_value = JSON::parse(schema_str).unwrap(); let schema = Schema::create(schema_value).unwrap(); + let query_value = JSON::parse(query_str).unwrap(); let query = Query::new(query_value, schema).unwrap(); @@ -525,8 +835,8 @@ fn test_query_get_query_normalization_simple_attributes() { fn test_query_get_query_normalization_with_logical_operator() { let schema_str = r#"{ "version": 1, - "primaryKey": "id", "type": "object", + "primaryKey":"id", "properties": { "id": { "type": "string" }, "age": { "type": "number" } @@ -541,6 +851,7 @@ fn test_query_get_query_normalization_with_logical_operator() { }"#; let schema_value = JSON::parse(schema_str).unwrap(); let schema = Schema::create(schema_value).unwrap(); + let query_value = JSON::parse(query_str).unwrap(); let query = Query::new(query_value, schema).unwrap(); @@ -568,9 +879,10 @@ fn test_query_get_query_normalization_with_logical_operator() { fn test_query_get_query_normalization_nested_logical_operators() { let schema_str = r#"{ "version": 1, - "primaryKey": "id", "type": "object", + "primaryKey":"id", "properties": { + "id": { "type": "string" }, "status": { "type": "string" }, "age": { "type": "number" }, "role": { "type": "string" } @@ -589,6 +901,7 @@ fn test_query_get_query_normalization_nested_logical_operators() { }"#; let schema_value = JSON::parse(schema_str).unwrap(); let schema = Schema::create(schema_value).unwrap(); + let query_value = JSON::parse(query_str).unwrap(); let query = Query::new(query_value, schema).unwrap(); @@ -616,9 +929,10 @@ fn test_query_get_query_normalization_nested_logical_operators() { fn test_query_get_query_normalization_only_logical_operator() { let schema_str = r#"{ "version": 1, - "primaryKey": "id", "type": "object", + "primaryKey":"id", "properties": { + "id": { "type": "string" }, "age": { "type": "number" }, "score": { "type": "number" } } @@ -631,6 +945,7 @@ fn test_query_get_query_normalization_only_logical_operator() { }"#; let schema_value = JSON::parse(schema_str).unwrap(); let schema = Schema::create(schema_value).unwrap(); + let query_value = JSON::parse(query_str).unwrap(); let query = Query::new(query_value, schema).unwrap(); @@ -653,9 +968,10 @@ fn test_query_get_query_normalization_only_logical_operator() { fn test_query_get_query_normalization_complex_mixed() { let schema_str = r#"{ "version": 1, - "primaryKey": "id", "type": "object", + "primaryKey":"id", "properties": { + "id": { "type": "string" }, "name": { "type": "string" }, "age": { "type": "number" }, "city": { "type": "string" }, @@ -676,6 +992,7 @@ fn test_query_get_query_normalization_complex_mixed() { }"#; let schema_value = JSON::parse(schema_str).unwrap(); let schema = Schema::create(schema_value).unwrap(); + let query_value = JSON::parse(query_str).unwrap(); let query = Query::new(query_value, schema).unwrap(); @@ -708,15 +1025,41 @@ fn test_query_get_query_normalization_complex_mixed() { fn test_query_parse_empty_query() { let schema_str = r#"{ "version": 1, - "primaryKey": "id", "type": "object", + "primaryKey":"id", "properties": { "id": { "type": "string" } } }"#; let query_str = "{}"; let schema = Schema::create(JSON::parse(schema_str).unwrap()).unwrap(); - let query = Query::new(JSON::parse(query_str).unwrap(), schema).unwrap(); + + let query_js_value = JSON::parse(query_str).unwrap(); + let query = Query::new(query_js_value, schema).unwrap(); + + let result = query.parse(); + assert!(result.is_ok()); +} + +#[wasm_bindgen_test] +fn test_query_parse_age_query() { + let schema_str = r#"{ + "version": 1, + "type": "object", + "primaryKey":"id", + "properties": { + "id": { "type": "string" }, + "age": { "type": "number" } + } + }"#; + let query_str = r#"{ + "age":25 + }"#; + let schema = Schema::create(JSON::parse(schema_str).unwrap()).unwrap(); + + let query_js_value = JSON::parse(query_str).unwrap(); + let query = Query::new(query_js_value, schema).unwrap(); + let result = query.parse(); assert!(result.is_ok()); } @@ -725,14 +1068,17 @@ fn test_query_parse_empty_query() { fn test_query_parse_non_object_query() { let schema_str = r#"{ "version": 1, - "primaryKey": "id", "type": "object", + "primaryKey":"id", "properties": { "id": { "type": "string" } } }"#; let schema = Schema::create(JSON::parse(schema_str).unwrap()).unwrap(); - let query = Query::new(JsValue::from_str("not an object"), schema).unwrap(); + + let query_js_value = JsValue::from_str("not an object"); + let query = Query::new(query_js_value, schema).unwrap(); + let result = query.parse(); assert!(result.is_err()); assert_eq!( @@ -745,9 +1091,10 @@ fn test_query_parse_non_object_query() { fn test_query_parse_multiple_operators() { let schema_str = r#"{ "version": 1, - "primaryKey": "id", "type": "object", + "primaryKey":"id", "properties": { + "id": { "type": "string" }, "age": { "type": "number" } } }"#; @@ -755,7 +1102,10 @@ fn test_query_parse_multiple_operators() { "age": { "$gt": 20, "$lt": 30 } }"#; let schema = Schema::create(JSON::parse(schema_str).unwrap()).unwrap(); - let query = Query::new(JSON::parse(query_str).unwrap(), schema).unwrap(); + + let query_js_value = JSON::parse(query_str).unwrap(); + let query = Query::new(query_js_value, schema).unwrap(); + let result = query.parse(); assert!(result.is_ok()); } @@ -764,9 +1114,10 @@ fn test_query_parse_multiple_operators() { fn test_query_parse_invalid_in_operator() { let schema_str = r#"{ "version": 1, - "primaryKey": "id", "type": "object", + "primaryKey":"id", "properties": { + "id": { "type": "string" }, "status": { "type": "string" } } }"#; @@ -774,7 +1125,10 @@ fn test_query_parse_invalid_in_operator() { "status": { "$in": "not-an-array" } }"#; let schema = Schema::create(JSON::parse(schema_str).unwrap()).unwrap(); - let query = Query::new(JSON::parse(query_str).unwrap(), schema).unwrap(); + + let query_js_value = JSON::parse(query_str).unwrap(); + let query = Query::new(query_js_value, schema).unwrap(); + let result = query.parse(); assert!(result.is_err()); assert_eq!( @@ -787,8 +1141,8 @@ fn test_query_parse_invalid_in_operator() { fn test_query_parse_empty_logical_operators() { let schema_str = r#"{ "version": 1, - "primaryKey": "id", "type": "object", + "primaryKey":"id", "properties": { "id": { "type": "string" } } @@ -797,7 +1151,10 @@ fn test_query_parse_empty_logical_operators() { "$and": [] }"#; let schema = Schema::create(JSON::parse(schema_str).unwrap()).unwrap(); - let query = Query::new(JSON::parse(query_str).unwrap(), schema).unwrap(); + + let query_js_value = JSON::parse(query_str).unwrap(); + let query = Query::new(query_js_value, schema).unwrap(); + let result = query.parse(); assert!(result.is_ok()); -} +} \ No newline at end of file diff --git a/packages/ridb-core/src/schema/mod.rs b/packages/ridb-core/src/schema/mod.rs index d37db92..ed48ac7 100644 --- a/packages/ridb-core/src/schema/mod.rs +++ b/packages/ridb-core/src/schema/mod.rs @@ -44,7 +44,18 @@ export type SchemaType = { /** * Represents a schema, including its definition and related methods. - * + * You may be trying to build a storage, in any other can u won't need access tho this class. + * Check this example + * + * ```typescript + * class MyStorage extends extends BaseStorage { + * example() { + * const schema: Schema = this.getSchema("mySchema") + * } + * } + * ``` + * You alwayswill have access to getSchema through the Storage class. + * * @template T - The schema type. */ export class Schema { @@ -436,4 +447,3 @@ fn test_invalid_schema() { assert!(result.is_err()); } - diff --git a/packages/ridb-core/src/storage/internals/base_storage.rs b/packages/ridb-core/src/storage/internals/base_storage.rs index 4854118..21d3844 100644 --- a/packages/ridb-core/src/storage/internals/base_storage.rs +++ b/packages/ridb-core/src/storage/internals/base_storage.rs @@ -3,6 +3,8 @@ use std::collections::HashMap; use js_sys::{Object, Reflect}; use wasm_bindgen::JsValue; use wasm_bindgen::prelude::wasm_bindgen; +use crate::schema::property::Property; +use crate::schema::property_type::PropertyType; use crate::schema::Schema; use super::core::CoreStorage; @@ -24,13 +26,11 @@ export class BaseStorage extends StorageIntern SchemasCreate > >; - constructor( dbName: string, schemas: Schemas, options?: BaseStorageOptions ); - readonly dbName: string; readonly schemas: Record>; readonly options: BaseStorageOptions; @@ -41,10 +41,10 @@ export class BaseStorage extends StorageIntern findDocumentById(collectionName: keyof Schemas, id: string): Promise | null | undefined>; find(collectionName: keyof Schemas, query: QueryType): Promise[]>; write(op: Operation): Promise>; - getOption(name: string): string | boolean | number | undefined; getSchema(name: string): Schema; - + //Call addIndexSchemas if you need extra indexing schemas for your database + addIndexSchemas(): null } "#; @@ -91,6 +91,98 @@ impl BaseStorage { Ok(base_storage) } + fn get_index_schemas(&mut self) -> Result, JsValue> { + let mut new_schemas: HashMap = HashMap::new(); + for (collection_name, schema) in self.clone().schemas.into_iter() { + if schema.indexes.is_some() { + let indexes = schema.indexes.unwrap(); + for index in indexes { + let index_name = format!( + "idx_{}_{}", + &collection_name, + index + ); + let property_type = schema.properties.get(&index).unwrap().property_type; + let item_type = schema.properties.get(&schema.primary_key).unwrap().property_type; + let empty_vec: Vec = Vec::new(); + let mut properties:HashMap = HashMap::new(); + properties.insert( + "id".to_string(), + Property { + property_type, + items:None, + max_items: None, + min_length: None, + min_items: None, + properties: None, + default: None, + required: None, + max_length: None, + } + ); + properties.insert( + "items".to_string(), + Property { + property_type: PropertyType::Array, + items:Some( + Box::from( + Property { + property_type: item_type, + items: None, + max_items: None, + min_length: None, + min_items: None, + properties: None, + default: None, + required: None, + max_length: None, + } + ) + ), + max_items: None, + min_length: None, + min_items: None, + properties: None, + default: None, + required: None, + max_length: None, + } + ); + + let index_schema = Schema { + version: 0, + indexes: Some(empty_vec.clone()), + encrypted: Some(empty_vec.clone()), + primary_key: "id".to_string(), + schema_type: "object".to_string(), + properties, + }; + + new_schemas.insert( + index_name, + index_schema + ); + + } + } + } + Ok( + new_schemas + ) + } + + #[wasm_bindgen(js_name = addIndexSchemas)] + pub fn add_index_schemas(&mut self) -> Result { + let index_schemas = self.get_index_schemas()?; + for (collection_name, schema) in index_schemas.into_iter() { + self.schemas.insert( + collection_name, + schema + ); + } + Ok(JsValue::null()) + } + #[wasm_bindgen(js_name = getOption)] pub fn get_option(&self, name: String) -> Result { let value = Reflect::get( diff --git a/packages/ridb-core/src/storage/internals/core.rs b/packages/ridb-core/src/storage/internals/core.rs index c1de26d..eede4fe 100644 --- a/packages/ridb-core/src/storage/internals/core.rs +++ b/packages/ridb-core/src/storage/internals/core.rs @@ -1,7 +1,8 @@ use js_sys::{Array, Object, Reflect}; use wasm_bindgen::{prelude::wasm_bindgen, JsValue}; - +use crate::operation::Operation; use crate::query::Query; +use crate::schema::Schema; #[wasm_bindgen(typescript_custom_section)] const TS_APPEND_CONTENT: &'static str = r#" @@ -12,13 +13,12 @@ export class CoreStorage { * @returns {boolean} */ matchesQuery(document: any, query: Query): boolean; + getPrimaryKeyTyped(value: any): string | number; + getIndexes(schema: Schema, op: Operation): string[]; } "#; - - - #[derive(Debug, Clone)] #[wasm_bindgen(skip_typescript)] pub struct CoreStorage { @@ -34,8 +34,8 @@ impl CoreStorage { } - #[wasm_bindgen(js_name = getPrimaryKey)] - pub fn get_primary_key(&self, value:JsValue) -> Result { + #[wasm_bindgen(js_name = getPrimaryKeyTyped)] + pub fn get_primary_key_typed(&self, value:JsValue) -> Result { if value.is_undefined() || value.is_null() { return Err(JsValue::from_str("Document must contain a primary key")); } @@ -49,6 +49,33 @@ impl CoreStorage { } + #[wasm_bindgen(js_name = getIndexes)] + pub fn schema_indexes( + &self, + schema: &Schema, + op: &Operation + ) -> Result, JsValue> { + let primary_key = schema.primary_key.clone(); + + let mut indexes = schema.indexes.clone() + .unwrap_or_default() + .into_iter() + .map(|index| format!("idx_{}_{}", op.collection, index)) + .collect::>(); + + let primary_index_name = format!("pk_{}_{}", op.collection, &primary_key); + + if !indexes.contains(&primary_index_name) { + indexes.push(primary_index_name.clone()); + } + + Ok( + indexes + ) + + } + + #[wasm_bindgen(js_name = matchesQuery)] pub fn document_matches_query( &self, @@ -56,6 +83,10 @@ impl CoreStorage { query: &Query ) -> Result { + if !document.is_object() { + return Ok(false); + } + let user_query = query.get_query()?; let keys = Object::keys(&Object::from(user_query.clone())); @@ -79,6 +110,7 @@ impl CoreStorage { } } return Ok(true); + } else if key == "$or" { // $or operator: at least one condition must be true if !Array::is_array(&value) { @@ -94,12 +126,9 @@ impl CoreStorage { } } return Ok(false); - } else { - // Attribute condition - let doc_value = Reflect::get(document, &JsValue::from_str(&key)) - .map_err(|e| JsValue::from(format!("Failed to get the document key, err {:?}", e)))?; - let matches = self.evaluate_condition(&doc_value, &value)?; + } else { + let matches = self.evaluate_condition(document, key, &value)?; if !matches { return Ok(false); } @@ -108,47 +137,53 @@ impl CoreStorage { Ok(true) } - fn evaluate_condition(&self, doc_value: &JsValue, condition: &JsValue) -> Result { + fn get_cmp(&self, key: String) -> Result bool>, JsValue> { + match key.as_str() { + "$gt" => Ok(Box::new(|a, b| a > b)), + "$gte" => Ok(Box::new(|a, b| a >= b)), + "$lt" => Ok(Box::new(|a, b| a < b)), + "$lte" => Ok(Box::new(|a, b| a <= b)), + _ => Err(JsValue::from_str(&format!("Unsupported comparator: {}", key))), + } + } + + fn evaluate_condition( + &self, + document: &JsValue, + condition_key: String, + condition: &JsValue + ) -> Result { + let document_field = Reflect::get(document, &JsValue::from(condition_key.clone()))?; + if condition.is_object() && !Array::is_array(condition) { // Condition is an object with operators let keys = Object::keys(&Object::from(condition.clone())); for i in 0..keys.length() { let key = keys.get(i).as_string().unwrap_or_default(); - let value = Reflect::get(condition, &JsValue::from_str(&key))?; + let condition_value = Reflect::get(condition, &JsValue::from_str(&key.clone()))?; + match key.as_str() { - "$gt" => { - let res = self.compare_values(doc_value, &value, |a:f64, b:f64| a > b)?; - if !res { - return Ok(false); - } - } - "$gte" => { - let res = self.compare_values(doc_value, &value, |a:f64, b:f64| a >= b)?; - if !res { - return Ok(false); - } - } - "$lt" => { - let res = self.compare_values(doc_value, &value, |a:f64, b:f64| a < b)?; - if !res { - return Ok(false); - } - } - "$lte" => { - let res = self.compare_values(doc_value, &value, |a:f64, b:f64| a <= b)?; + "$gt" | "$gte" | "$lt" | "$lte" => { + let cmp = self.get_cmp(key)?; + let res = self.compare_values( + &document_field, + condition_key.clone(), + &condition_value, + cmp + )?; if !res { return Ok(false); } } "$in" => { - if !Array::is_array(&value) { + if !Array::is_array(&condition_value) { return Err(JsValue::from_str("$in value must be an array")); } - let arr = Array::from(&value); + let arr = Array::from(&condition_value); let mut found = false; for j in 0..arr.length() { let item = arr.get(j); - if self.values_equal(doc_value, &item)? { + if self.values_equal(&document_field, &item)? { found = true; break; } @@ -158,20 +193,23 @@ impl CoreStorage { } } _ => { - return Err(JsValue::from_str(&format!("Unsupported operator: {}", key))); + return Err(JsValue::from_str( + &format!("Unsupported operator: {}", key) + )); } - } + }; } Ok(true) } else { // Direct value comparison - self.values_equal(doc_value, condition) + self.values_equal(&document_field, condition) } } fn compare_values( &self, doc_value: &JsValue, + cond_key: String, cond_value: &JsValue, cmp: F, ) -> Result @@ -180,20 +218,37 @@ impl CoreStorage { { let doc_num = doc_value .as_f64() - .ok_or_else(|| JsValue::from_str("Document value is not a number"))?; + .ok_or_else(|| JsValue::from( + format!( + "Document key ({:?}) is not a number but {:?} instead", + cond_key, + doc_value + ) + ))?; + let cond_num = cond_value .as_f64() - .ok_or_else(|| JsValue::from_str("Condition value is not a number"))?; - Ok(cmp(doc_num, cond_num)) + .ok_or_else(|| JsValue::from( + format!( + "Condition key ({:?}) is not a number but {:?} instead", + cond_key, + cond_value + ) + ))?; + + let valid = cmp(doc_num, cond_num); + Ok( + valid + ) } - fn values_equal(&self, doc_value: &JsValue, cond_value: &JsValue) -> Result { - if doc_value.is_string() && cond_value.is_string() { - Ok(doc_value.as_string() == cond_value.as_string()) - } else if doc_value.as_f64().is_some() { - Ok(doc_value.as_f64() == cond_value.as_f64()) - } else if doc_value.is_truthy() || cond_value.is_falsy() { - Ok(doc_value.as_bool() == cond_value.as_bool()) + fn values_equal(&self, document: &JsValue, cond_value: &JsValue) -> Result { + if document.is_string() && cond_value.is_string() { + Ok(document.as_string() == cond_value.as_string()) + } else if document.as_f64().is_some() { + Ok(document.as_f64() == cond_value.as_f64()) + } else if document.is_truthy() || cond_value.is_falsy() { + Ok(document.as_bool() == cond_value.as_bool()) } else { Ok(false) } diff --git a/packages/ridb-core/src/storage/mod.rs b/packages/ridb-core/src/storage/mod.rs index e02d11f..aed4efc 100644 --- a/packages/ridb-core/src/storage/mod.rs +++ b/packages/ridb-core/src/storage/mod.rs @@ -1,5 +1,5 @@ use std::collections::HashMap; -use js_sys::Reflect; +use js_sys::{Reflect}; use serde_wasm_bindgen::to_value; use wasm_bindgen::{JsCast, JsValue}; @@ -19,7 +19,7 @@ pub(crate) enum HookType { /// Represents the storage system containing a map of internal storages. pub struct Storage { /// A map where the key is a string and the value is an instance of `Internals`. - pub(crate) internal: StorageExternal, + pub internal: StorageExternal, pub(crate) plugins: Vec, pub(crate) schemas: HashMap, pub(crate) migrations: HashMap @@ -170,44 +170,71 @@ impl Storage { } } - pub(crate) async fn write(&self, collection_name: &str, document_without_pk: JsValue) -> Result { - // Move all the preparation logic before the async operation + pub(crate) async fn write( + &self, + collection_name: &str, + document_without_pk: JsValue, + ) -> Result { + + Logger::debug("Storage-Write", &JsValue::from( + &format!("\n -------------------------------\n\n Starting write operation for collection '{}'", collection_name) + )); + + // Prepare the schema and primary key let schema = self.get_schema(collection_name)?; let primary_key = schema.primary_key.clone(); - let indexes = schema.indexes.clone(); - let document = self.ensure_primary_key(collection_name, document_without_pk)?; - schema.validate_document(document.clone())?; - - let operation = { - let indexes = match indexes { - Some(mut existing) => { - existing.push(primary_key.clone()); - existing - }, - _ => { - let mut new_index: Vec = Vec::new(); - new_index.push(primary_key.clone()); - new_index - } - }; - let pk = Reflect::get(&document, &JsValue::from_str(primary_key.as_str())) - .map_err(|e| JsValue::from(RIDBError::from(e)))?; - // Find existing document - let existing = self.find_document_by_id(collection_name, pk).await?; - let op_type = if existing.is_null() | existing.is_undefined() { OpType::CREATE } else { OpType::UPDATE }; + let document = self.ensure_primary_key(collection_name, document_without_pk)?; + let pk_value = Reflect::get( + &document, + &JsValue::from_str(&primary_key) + )?; + + let existing_document = self.find_document_by_id( + collection_name, + pk_value.clone() + ).await?; + + let op_type = if existing_document.is_null() || existing_document.is_undefined() { + OpType::CREATE + } else { + OpType::UPDATE + }; - Operation { - collection: collection_name.to_string(), - op_type, - data: document, - indexes, - } + // Create and perform the main write operation + let operation = Operation { + collection: collection_name.to_string(), + op_type, + data: document.clone(), + primary_key_field: Some(primary_key.clone()), + primary_key: Some(pk_value) }; - // Perform the actual write operation - self.internal.write(operation).await - .map_err(|e| JsValue::from(RIDBError::from(e))) + Logger::debug("Storage-Write",&JsValue::from( + &format!("Performing main write operation: {:?}", operation) + )); + + let document = self + .internal + .write(operation) + .await?; + + Logger::debug("Storage-Write",&JsValue::from( + &format!("Write operation completed successfully for collection '{}' \n -------------------------------\n\n", collection_name) + )); + + Ok(document) + + } + + pub(crate) async fn find(&self, collection_name: &str, query: JsValue) -> Result{ + //TODO: Use indexes for more efficient document finding + self.internal.find(collection_name, query).await + } + + pub(crate) async fn count(&self, collection_name: &str, query: JsValue) -> Result{ + //TODO: Use indexes for more efficient counting + self.internal.count(collection_name, query).await } pub(crate) async fn find_document_by_id(&self, collection_name: &str, primary_key: JsValue) -> Result{ @@ -221,45 +248,41 @@ impl Storage { } pub(crate) async fn remove(&self, collection_name: &str, primary_key: JsValue) -> Result { - Logger::debug(&JsValue::from(&format!( + Logger::debug("Storage-Remove",&JsValue::from(&format!( "Starting remove operation for collection: {}, primary_key: {:?}", collection_name, primary_key ))); let result = self.find_document_by_id(collection_name, primary_key.clone()).await?; - let schema = self.get_schema(collection_name)?; - Logger::debug(&JsValue::from(&format!( + Logger::debug("Storage-Remove",&JsValue::from(&format!( "Found document for removal: {:?}", result ))); if result.is_undefined() | result.is_null() { - Logger::debug(&JsValue::from( + Logger::debug("Storage-Remove",&JsValue::from( "Remove operation failed: Document not found" )); Err(JsValue::from_str("Invalid primary key value")) } else { - let index_name = format!("pk_{}_{}", collection_name, schema.primary_key); - let op = Operation { collection: collection_name.to_string(), op_type: OpType::DELETE, data: primary_key.clone(), - indexes: vec![ - index_name - ], + primary_key: None, + primary_key_field: None }; - Logger::debug(&JsValue::from(&format!( + Logger::debug("Storage-Remove",&JsValue::from(&format!( "DELETE OPERATION {:?} ", op ))); let result = self.internal.write(op).await; match &result { - Ok(_) => Logger::debug(&JsValue::from("Remove operation completed successfully")), - Err(e) => Logger::debug(&JsValue::from(&format!("Remove operation failed: {:?}", e))), + Ok(_) => Logger::debug("Storage-Remove",&JsValue::from("Remove operation completed successfully")), + Err(e) => Logger::debug("Storage-Remove",&JsValue::from(&format!("Remove operation failed: {:?}", e))), } result.map_err(|e| JsValue::from(RIDBError::from(e))) diff --git a/packages/ridb-core/src/storages/indexdb/mod.rs b/packages/ridb-core/src/storages/indexdb/mod.rs index 0941d3e..fe6025c 100644 --- a/packages/ridb-core/src/storages/indexdb/mod.rs +++ b/packages/ridb-core/src/storages/indexdb/mod.rs @@ -1,5 +1,4 @@ use js_sys::{Array, Object, Promise, Reflect}; -use serde_wasm_bindgen::to_value; use wasm_bindgen::{JsCast, JsValue}; use wasm_bindgen::prelude::{wasm_bindgen, Closure}; use wasm_bindgen_futures::JsFuture; @@ -8,13 +7,13 @@ use crate::query::Query; use crate::storage::internals::base_storage::BaseStorage; use crate::storage::internals::core::CoreStorage; use crate::operation::{OpType, Operation}; -use web_sys::{IdbDatabase, IdbOpenDbRequest, IdbRequest}; +use web_sys::{IdbDatabase, IdbObjectStore, IdbOpenDbRequest, IdbRequest}; use std::sync::Arc; use parking_lot::Mutex; use std::collections::HashMap; use std::sync::Weak; use lazy_static::lazy_static; - +use crate::schema::Schema; use super::base::Storage; #[wasm_bindgen(typescript_custom_section)] @@ -60,7 +59,6 @@ impl Drop for IndexDB { async fn idb_request_result(request: IdbRequest) -> Result { let promise = Promise::new(&mut |resolve, reject| { - let reject2 = reject.clone(); let success_callback = Closure::once(Box::new(move |event: web_sys::Event| { let request: IdbRequest = event.target() @@ -98,41 +96,7 @@ async fn idb_request_result(request: IdbRequest) -> Result { impl Storage for IndexDB { async fn write(&self, op: &Operation) -> Result { let store_name = &op.collection; - - let store_names = self.db.object_store_names(); - let stores: Vec = (0..store_names.length()) - .filter_map(|i| { - let store = store_names.get(i)?; - Some(store.as_str().to_string()) - }) - .collect(); - Logger::debug(&JsValue::from_str(&format!( - "Available stores: {:?}, Attempting to access: {}", - stores, store_name - ))); - - let transaction = match self.db.transaction_with_str_and_mode( - store_name, - web_sys::IdbTransactionMode::Readwrite, - ) { - Ok(t) => t, - Err(e) => { - web_sys::console::error_1(&JsValue::from_str(&format!( - "Failed to create transaction for store '{}': {:?}", - store_name, e - ))); - return Err(JsValue::from_str(&format!( - "Failed to access store '{}'. Available stores: {:?}", - store_name, stores - ))); - } - }; - - let store = match transaction.object_store(store_name) { - Ok(s) => s, - Err(e) => return Err(e), - }; - + let store = self.get_store(store_name)?; let schema = self.base.schemas.get(op.collection.as_str()).ok_or_else(|| JsValue::from_str("Collection not found"))?; match op.op_type { @@ -152,7 +116,6 @@ impl Storage for IndexDB { // Store the document and wait for completion let request = store.put_with_key(&document, &pk_value)?; idb_request_result(request).await?; - Ok(document.clone()) }, OpType::DELETE => { @@ -161,95 +124,26 @@ impl Storage for IndexDB { return Err(JsValue::from_str("Primary key value is required for delete operation")); } - // Delete the document and wait for completion + // Delete the document using the primary key let request = store.delete(&pk_value)?; - let promise = Promise::new(&mut |resolve, reject| { - let onsucess = Closure::once(Box::new(move |_event: web_sys::Event| { - resolve.call1(&JsValue::undefined(), &JsValue::from_str("Document deleted")).unwrap(); - })); - - let onerror = Closure::once(Box::new(move |e: web_sys::Event| { - reject.call1(&JsValue::undefined(), &e).unwrap(); - })); - - request.set_onsuccess(Some(onsucess.as_ref().unchecked_ref())); - request.set_onerror(Some(onerror.as_ref().unchecked_ref())); - onsucess.forget(); - onerror.forget(); - }); - - JsFuture::from(promise).await + idb_request_result(request).await?; + + Ok(JsValue::from_str("Document deleted")) }, _ => Err(JsValue::from_str("Unsupported operation type")), } } async fn find(&self, collection_name: &str, query: Query) -> Result { - let store_name = collection_name; - - let store_names = self.db.object_store_names(); - let stores: Vec = (0..store_names.length()) - .filter_map(|i| { - let store = store_names.get(i)?; - Some(store.as_str().to_string()) - }) - .collect(); - - let transaction = match self.db.transaction_with_str(store_name) { - Ok(t) => t, - Err(e) => { - web_sys::console::error_1(&JsValue::from_str(&format!( - "Failed to create transaction for store '{}': {:?}", - store_name, e - ))); - return Err(JsValue::from_str(&format!( - "Failed to access store '{}'. Available stores: {:?}", - store_name, stores - ))); - } - }; - - let store = transaction.object_store(store_name)?; - - let normalized_query = query.parse()?; - let request = store.get_all()?; - let normalized_query = normalized_query.clone(); - let promise = Promise::new(&mut |resolve, _reject| { - let value = normalized_query.clone(); - let value_query = Query::new( - value.clone(), - query.schema.clone() - ).unwrap(); - - let core = self.core.clone(); - let onsucess = Closure::once(Box::new(move |event: web_sys::Event| { - let request: IdbRequest = event.target().unwrap().dyn_into().unwrap(); - let result = request.result().unwrap(); - // Filter documents based on query - let filtered = Array::new(); - - - if !result.is_undefined() && !result.is_null() { - let documents = Array::from(&result); - - for i in 0..documents.length() { - let doc = documents.get(i); - if let Ok(matches) = core.document_matches_query(&doc, &value_query) { - if matches { - filtered.push(&doc); - } - } - } - } - - resolve.call1(&JsValue::undefined(), &filtered).unwrap(); - })); - - request.set_onsuccess(Some(onsucess.as_ref().unchecked_ref())); - onsucess.forget(); - }); + Logger::debug( + "IndexDB-Find", + &JsValue::from(format!("Find method {}", collection_name)), + ); - JsFuture::from(promise).await + let filtered_docs = self + .collect_documents_for_query(collection_name, query) + .await?; + Ok(filtered_docs.into()) } async fn find_document_by_id(&self, collection_name: &str, primary_key_value: JsValue) -> Result { @@ -258,96 +152,55 @@ impl Storage for IndexDB { return Err(JsValue::from_str("Primary key value is required")); } - let transaction = self.db.transaction_with_str(store_name)?; - let store = transaction.object_store(store_name)?; - - Logger::debug(&JsValue::from(&format!("Finding document with primary key: {:?}", primary_key_value))); + let store = self.get_store(store_name)?; + + Logger::debug("IndexDB-Find-By-Id", &JsValue::from(&format!("Finding document with primary key: {:?}", primary_key_value))); let request = store.get(&primary_key_value)?; - + let result = idb_request_result(request).await?; if result.is_undefined() || result.is_null() { - Logger::debug(&JsValue::from("Document not found")); + Logger::debug("IndexDB-Find-By-Id",&JsValue::from("Document not found")); Ok(JsValue::undefined()) } else { - Logger::debug(&JsValue::from("Document found")); + Logger::debug("IndexDB-Find-By-Id",&JsValue::from("Document found")); Ok(result) } } - async fn count(&self,collection_name: &str, query: Query) -> Result { - let store_name = collection_name; - let transaction = self.db.transaction_with_str(store_name)?; - let store = transaction.object_store(store_name)?; - - let normalized_query = query.parse()?; - let request = store.get_all()?; - let normalized_query = normalized_query.clone(); - let promise = Promise::new(&mut |resolve, _reject| { - let value = normalized_query.clone(); - let value_query = Query::new( - value.clone(), - query.schema.clone() - ).unwrap(); - - let core = self.core.clone(); - let onsucess = Closure::once(Box::new(move |event: web_sys::Event| { - let request: IdbRequest = event.target().unwrap().dyn_into().unwrap(); - let result = request.result().unwrap(); - let documents = Array::from(&result); - - let mut count = 0; - for i in 0..documents.length() { - let doc = documents.get(i); - if let Ok(matches) = core.document_matches_query(&doc, &value_query) { - if matches { - count += 1; - } - } - } - - resolve.call1(&JsValue::undefined(), &JsValue::from_f64(count as f64)).unwrap(); - })); - - request.set_onsuccess(Some(onsucess.as_ref().unchecked_ref())); - onsucess.forget(); - }); - - JsFuture::from(promise).await + async fn count(&self, collection_name: &str, query: Query) -> Result { + let filtered_docs = self + .collect_documents_for_query(collection_name, query) + .await?; + Ok(JsValue::from_f64(filtered_docs.length() as f64)) } async fn close(&mut self) -> Result { // Wait for any pending transactions to complete - let store_names = self.db.object_store_names(); - let stores: Vec = (0..store_names.length()) - .filter_map(|i| { - let store = store_names.get(i)?; - Some(store.as_str().to_string()) - }) - .collect(); + let stores: Vec = self.get_stores(); // Create a read transaction for each store to ensure all operations are complete for store_name in stores { let transaction = self.db.transaction_with_str(&store_name)?; - + // Wait for the transaction to complete let promise = Promise::new(&mut |resolve, reject| { let oncomplete = Closure::once(Box::new(move |_: web_sys::Event| { resolve.call0(&JsValue::undefined()).unwrap(); })); - + let onerror = Closure::once(Box::new(move |e| { reject.call1(&JsValue::undefined(), &e).unwrap(); })); - + transaction.set_oncomplete(Some(oncomplete.as_ref().unchecked_ref())); transaction.set_onerror(Some(onerror.as_ref().unchecked_ref())); - + oncomplete.forget(); onerror.forget(); }); - + JsFuture::from(promise).await?; } @@ -365,12 +218,7 @@ impl Storage for IndexDB { if test_store.is_some() { let store_name = test_store.unwrap(); if let Err(_) = self.db.transaction_with_str(&store_name) { - // Database is closed, need to reopen - let schemas_js = Object::new(); - for (collection, schema) in self.base.schemas.iter() { - let _ = Reflect::set(&schemas_js, &JsValue::from_str(collection), &to_value(&schema)?); - } - let db = create_database(&self.base.name, &schemas_js).await?; + let db = create_database(&self.base.name, &self.base.schemas).await?; // Update the pool with new connection POOL.store_connection(self.base.name.clone(), Arc::downgrade(&db)); self.db = (*db).clone(); @@ -380,25 +228,27 @@ impl Storage for IndexDB { Ok(JsValue::from_str("IndexDB database already started")) } - + } + } -async fn create_database(name: &str, schemas_js: &Object) -> Result, JsValue> { +async fn create_database(name: &str, schemas: &HashMap) -> Result, JsValue> { let window = web_sys::window().ok_or_else(|| JsValue::from_str("No window object"))?; let idb = window.indexed_db()?.ok_or_else(|| JsValue::from_str("IndexedDB not available"))?; - + let version = 1; let db_request = idb.open_with_u32(name, version)?; // Clone keys before entering the Promise - let keys_array = Object::keys(schemas_js); - let keys_vec: Vec = (0..keys_array.length()) - .filter_map(|i| keys_array.get(i).as_string()) + + let keys_vec: Vec = schemas.keys() + .map(|k| k.to_string()) .collect(); - + let db = JsFuture::from(Promise::new(&mut |resolve, reject| { let keys = keys_vec.clone(); + let schemas_clone = schemas.clone(); let onupgradeneeded = Closure::once(Box::new(move |event: web_sys::Event| { let db: IdbDatabase = event.target() .unwrap() @@ -408,11 +258,40 @@ async fn create_database(name: &str, schemas_js: &Object) -> Result Result Result { + let store = self.get_store(collection_name)?; + let schema = self + .base + .schemas + .get(collection_name) + .ok_or_else(|| JsValue::from_str("Collection not found"))?; + + let core = self.core.clone(); + let normalized_query = query.parse()?; + let should_use_index = can_use_single_index_lookup(&query, schema)?; + + // Attempt to do an indexed lookup if there's a suitable single index + let documents = if let Some(index_name) = should_use_index { + + let index_value = query.get(index_name.as_str())?; + if let Ok(index) = store.index(&index_name) { + // If index_value is an array, fetch documents for each key and merge + if Array::is_array(&index_value) { + let key_array = Array::from(&index_value); + let merged_docs = Array::new(); + + for i in 0..key_array.length() { + let key = key_array.get(i); + + let request = match index.get_all_with_key(&key) { + Ok(r) => r, + // Fallback to store.get_all on error + Err(_) => store.get_all()?, + }; + + let result = idb_request_result(request).await?; + if !result.is_undefined() && !result.is_null() { + let docs = Array::from(&result); + for j in 0..docs.length() { + merged_docs.push(&docs.get(j)); + } + } + } + merged_docs + } else { + // Single key fetch + let request = match index.get_all_with_key(&index_value) { + Ok(r) => r, + Err(_) => store.get_all()?, + }; + let result = idb_request_result(request).await?; + if result.is_undefined() || result.is_null() { + Array::new() + } else { + Array::from(&result) + } + } + } else { + // If we couldn't get the index, return all documents + let result = idb_request_result(store.get_all()?).await?; + if result.is_undefined() || result.is_null() { + Array::new() + } else { + Array::from(&result) + } + } + } else { + // If no single index is usable, fetch all documents + let result = idb_request_result(store.get_all()?).await?; + if result.is_undefined() || result.is_null() { + Array::new() + } else { + Array::from(&result) + } + }; + + // Filter the documents according to any additional query requirements + let value_query = Query::new(normalized_query.clone(), query.schema.clone())?; + let filtered = Array::new(); + for i in 0..documents.length() { + let doc = documents.get(i); + if let Ok(matches) = core.document_matches_query(&doc, &value_query) { + if matches { + filtered.push(&doc); + } + } + } + + Ok(filtered) + } + + pub fn get_stores(&self) -> Vec { + let store_names = self.db.object_store_names(); + let stores: Vec = (0..store_names.length()) + .filter_map(|i| { + let store = store_names.get(i)?; + Some(store.as_str().to_string()) + }) + .collect(); + stores + } + pub fn get_store(&self, store_name: &str) -> Result{ + let stores = self.get_stores(); + let transaction = match self.db.transaction_with_str_and_mode( + store_name, + web_sys::IdbTransactionMode::Readwrite, + ) { + Ok(t) => t, + Err(_e) => { + return Err(JsValue::from_str(&format!( + "Failed to access store '{}'. Available stores: {:?}", + store_name, stores + ))); + } + }; + let store = match transaction.object_store(store_name) { + Ok(s) => s, + Err(e) => return Err(e), + }; + Ok( + store + ) + } #[wasm_bindgen] pub async fn create(name: &str, schemas_js: Object) -> Result { let base = BaseStorage::new( @@ -454,18 +459,16 @@ impl IndexDB { schemas_js.clone(), None )?; - - // Try to get existing connection from pool let db = match POOL.get_connection(name) { Some(db) => db, None => { // Create new connection if none exists - let db = create_database(name, &schemas_js).await?; + let db = create_database(name, &base.schemas).await?; POOL.store_connection(name.to_string(), Arc::downgrade(&db)); db } }; - + //base.add_index_schemas()?; Ok(IndexDB { base, core: CoreStorage {}, @@ -482,8 +485,13 @@ impl IndexDB { #[wasm_bindgen(js_name = "find")] pub async fn find_js(&self, collection_name: &str, query: JsValue) -> Result { - let schema = self.base.schemas.get(collection_name).ok_or_else(|| JsValue::from_str("Collection not found"))?; - self.find(collection_name, Query::new(query, schema.clone())?).await + let schema = self + .base + .schemas + .get(collection_name) + .ok_or_else(|| JsValue::from_str("Collection not found"))?; + self.find(collection_name, Query::new(query, schema.clone())?) + .await } #[wasm_bindgen(js_name = "findDocumentById")] @@ -493,8 +501,13 @@ impl IndexDB { #[wasm_bindgen(js_name = "count")] pub async fn count_js(&self, collection_name: &str, query: JsValue) -> Result { - let schema = self.base.schemas.get(collection_name).ok_or_else(|| JsValue::from_str("Collection not found"))?; - self.count(collection_name, Query::new(query, schema.clone())?).await + let schema = self + .base + .schemas + .get(collection_name) + .ok_or_else(|| JsValue::from_str("Collection not found"))?; + self.count(collection_name, Query::new(query, schema.clone())?) + .await } #[wasm_bindgen(js_name = "close")] @@ -559,13 +572,54 @@ impl IndexDBPool { } } +// Add this extension trait +trait IdbDatabaseExt { + fn is_closed(&self) -> bool; +} + +impl IdbDatabaseExt for IdbDatabase { + fn is_closed(&self) -> bool { + // Attempt to start a dummy transaction to see if the database is closed + match self.transaction_with_str("__non_existent_store__") { + Ok(_) => false, + Err(_) => true, + } + } +} + +fn can_use_single_index_lookup( + query: &Query, + schema: &Schema +) -> Result, JsValue> { + let fields = query.get_properties()?; + let schema_indexes = &schema.indexes; + if let Some(indexes) = schema_indexes { + for index in indexes { + if fields.contains(index) { + return Ok( + Some( + index.clone() + ) + ) + } + } + } + Ok( + None + ) +} + + + + + #[cfg(test)] mod tests { use super::*; use serde_json::Value; use wasm_bindgen_test::*; - - // Configure tests to run in browser + + #[cfg(feature = "browser")] wasm_bindgen_test_configure!(run_in_browser); fn json_str_to_js_value(json_str: &str) -> Result { @@ -616,10 +670,10 @@ mod tests { let schema_str = "{ \"version\": 1, \"primaryKey\": \"id\", \"type\": \"object\", \"properties\": { \"id\": { \"type\": \"string\", \"maxLength\": 60 } } }"; let schema = json_str_to_js_value(schema_str).unwrap(); Reflect::set(&schemas_obj, &JsValue::from_str("demo"), &schema).unwrap(); - + let db = IndexDB::create("test_db", schemas_obj).await; assert!(db.is_ok()); - + // Clean up db.unwrap().close().await.unwrap(); } @@ -639,7 +693,7 @@ mod tests { }"#; let schema = json_str_to_js_value(schema_str).unwrap(); Reflect::set(&schemas_obj, &JsValue::from_str("demo"), &schema).unwrap(); - + let mut db = IndexDB::create("test_db_create", schemas_obj).await.unwrap(); // Create a new item @@ -651,7 +705,8 @@ mod tests { collection: "demo".to_string(), op_type: OpType::CREATE, data: new_item.clone().into(), - indexes: vec![], + primary_key_field: Some("id".to_string()), + primary_key: Some(JsValue::from("1234")) }; // Test successful creation @@ -691,7 +746,7 @@ mod tests { }"#; let schema = json_str_to_js_value(schema_str).unwrap(); Reflect::set(&schemas_obj, &JsValue::from_str("demo"), &schema).unwrap(); - + let mut db = IndexDB::create("test_db_find", schemas_obj).await.unwrap(); // Create test documents @@ -712,7 +767,8 @@ mod tests { collection: "demo".to_string(), op_type: OpType::CREATE, data: item, - indexes: vec![], + primary_key_field: Some("id".to_string()), + primary_key: Some(JsValue::from("1234")) }; db.write(&create_op).await.unwrap(); } @@ -722,10 +778,10 @@ mod tests { "status": "active", "age": { "$gt": 30 } }"#).unwrap(); - + let result = db.find_js("demo", query_value).await.unwrap(); let result_array = Array::from(&result); - + assert_eq!(result_array.length(), 1); let first_doc = result_array.get(0); assert_eq!( @@ -752,7 +808,7 @@ mod tests { }"#; let schema = json_str_to_js_value(schema_str).unwrap(); Reflect::set(&schemas_obj, &JsValue::from_str("demo"), &schema).unwrap(); - + let mut db = IndexDB::create("test_db_count", schemas_obj).await.unwrap(); // Create test documents @@ -769,11 +825,16 @@ mod tests { ]; for item in items { + let primary_key = Reflect::get( + &item, + &JsValue::from_str("id") + ).unwrap(); let create_op = Operation { collection: "demo".to_string(), op_type: OpType::CREATE, data: item, - indexes: vec![], + primary_key_field: Some("id".to_string()), + primary_key: Some(primary_key) }; db.write(&create_op).await.unwrap(); } @@ -782,7 +843,7 @@ mod tests { let query_value = json_str_to_js_value(r#"{ "status": "active" }"#).unwrap(); - + let result = db.count_js("demo", query_value).await.unwrap(); assert_eq!(result.as_f64().unwrap(), 2.0); @@ -794,7 +855,7 @@ mod tests { async fn test_indexdb_multiple_collections() { // Create schemas for two collections let schemas_obj = Object::new(); - + // Schema for users collection let users_schema = json_str_to_js_value(r#"{ "version": 1, @@ -806,7 +867,7 @@ mod tests { "email": { "type": "string" } } }"#).unwrap(); - + // Schema for products collection let products_schema = json_str_to_js_value(r#"{ "version": 1, @@ -818,10 +879,10 @@ mod tests { "price": { "type": "number" } } }"#).unwrap(); - + Reflect::set(&schemas_obj, &JsValue::from_str("users"), &users_schema).unwrap(); Reflect::set(&schemas_obj, &JsValue::from_str("products"), &products_schema).unwrap(); - + let mut db = IndexDB::create("test_db_multiple_collections", schemas_obj).await.unwrap(); // Insert data only into users collection @@ -835,14 +896,15 @@ mod tests { collection: "users".to_string(), op_type: OpType::CREATE, data: user, - indexes: vec![], + primary_key_field: Some("id".to_string()), + primary_key: Some(JsValue::from("1")) }; - + db.write(&create_op).await.unwrap(); // Query the empty products collection let empty_query = json_str_to_js_value("{}").unwrap(); - + // Find all products (should be empty) let products_result = db.find_js("products", empty_query.clone()).await.unwrap(); let products_array = Array::from(&products_result); @@ -856,19 +918,3 @@ mod tests { db.close().await.unwrap(); } } - -// Add this extension trait -trait IdbDatabaseExt { - fn is_closed(&self) -> bool; -} - -impl IdbDatabaseExt for IdbDatabase { - fn is_closed(&self) -> bool { - // Attempt to start a dummy transaction to see if the database is closed - match self.transaction_with_str("__non_existent_store__") { - Ok(_) => false, - Err(_) => true, - } - } -} - diff --git a/packages/ridb-core/src/storages/inmemory/mod.rs b/packages/ridb-core/src/storages/inmemory/mod.rs index 8d10b3d..aca7ef2 100644 --- a/packages/ridb-core/src/storages/inmemory/mod.rs +++ b/packages/ridb-core/src/storages/inmemory/mod.rs @@ -1,4 +1,4 @@ -use std::collections::HashMap; +use std::collections::{HashMap, HashSet}; use js_sys::{Array, Object, Reflect}; use wasm_bindgen::JsValue; use wasm_bindgen::prelude::wasm_bindgen; @@ -45,97 +45,212 @@ pub struct InMemory { impl Storage for InMemory { - - - async fn write(&self, op: &Operation) -> Result { - - let schema = self.base.schemas.get(op.collection.as_str()).ok_or_else(|| JsValue::from_str("Collection not found"))?; - let primary_key = schema.primary_key.clone(); - let index_name = format!("pk_{}_{}", op.collection, primary_key); + Logger::log( + "InMemory::write", + &JsValue::from_str(&format!( + "Write operation started. Collection: '{}', OpType: '{:?}', Primary Key Field: '{:?}'", + op.collection, op.op_type, op.primary_key_field + )) + ); - Logger::debug(&JsValue::from(&format!("Attempting to acquire write lock for index: {}", index_name))); + let schema = self.base.schemas + .get(op.collection.as_str()) + .ok_or_else(|| { + let msg = "Collection not found".to_string(); + Logger::log( + "InMemory::write", + &JsValue::from_str(&format!("Error: {}", msg)) + ); + JsValue::from_str(&msg) + })?; - let mut index_guard = self.by_index.write().map_err(|_| JsValue::from_str("Failed to acquire write lock"))?; - let index = index_guard - .entry(index_name.clone()) - .or_insert_with(HashMap::new); + let primary_key = schema.primary_key.clone(); + let index_name = format!( + "pk_{}_{}", + op.collection, + primary_key.clone() + ); + let mut index_guard = self.by_index.write().map_err(|_| { + let msg = "Failed to acquire write lock".to_string(); + Logger::log( + "InMemory::write", + &JsValue::from_str(&format!("Error: {}", msg)) + ); + JsValue::from_str(&msg) + })?; + match op.op_type { OpType::CREATE | OpType::UPDATE => { let document = op.data.clone(); - - // Extract primary key let pk_value = Reflect::get(&document, &JsValue::from_str(&primary_key)) - .map_err(|e| JsValue::from_str(&format!("Failed to get primary key: {:?}", e)))?; - - let pk_str = self.core.get_primary_key(pk_value)?; - - Logger::debug(&JsValue::from(&format!("Primary key extracted: {}", pk_str))); - + .map_err(|e| { + let msg = format!("Failed to get primary key: {:?}", e); + Logger::log("InMemory::write", &JsValue::from_str(&format!("Error: {}", msg))); + JsValue::from_str(&msg) + })?; + let pk_str = self.core.get_primary_key_typed(pk_value.clone())?; match op.op_type { OpType::CREATE => { - Logger::debug(&JsValue::from(&format!("Creating document with primary key: {}", pk_str))); + Logger::log( + "InMemory::write", + &JsValue::from_str(&format!("CREATE operation for primary key: '{}'", pk_str)) + ); + { + let pk_map = index_guard + .entry(index_name.clone()) + .or_insert_with(HashMap::new); + if pk_map.contains_key(&pk_str) { + let msg = "Document with this primary key already exists".to_string(); + Logger::log( + "InMemory::write", + &JsValue::from_str(&format!("Error: {}", msg)) + ); + return Err(JsValue::from_str(&msg)); + } + pk_map.insert(pk_str.clone(), document.clone()); + } - if index.contains_key(&pk_str) { - Logger::debug(&JsValue::from("Document with this primary key already exists")); - return Err(JsValue::from_str("Document with this primary key already exists")); + let primary_index_name = op.primary_key_index()?; + let indexed_fields = schema.clone().indexes.unwrap_or(Vec::new()); + for indexed_field in indexed_fields { + let collection_name = format!("idx_{}_{}", op.collection, indexed_field); + if collection_name == primary_index_name { + continue; + } + let indexed_value = Reflect::get( + &document, + &JsValue::from(indexed_field.clone()) + )?; + + if !indexed_value.is_null() && !indexed_value.is_undefined() { + let indexed_value_str = indexed_value + .as_string() + .unwrap_or_else(|| { + indexed_value.as_f64().map(|num| num.to_string()).unwrap_or_default() + }); + + let collection_index = index_guard + .entry(collection_name.clone()) + .or_insert_with(HashMap::new); + + let existing_entry = collection_index.get(&indexed_value_str); + let new_index_items = if let Some(existing_entry) = existing_entry { + let items_val = Reflect::get( + existing_entry, + &JsValue::from_str("items") + ).unwrap_or_else(|_| JsValue::from(js_sys::Array::new())); + js_sys::Array::from(&items_val) + } else { + js_sys::Array::new() + }; + + new_index_items.push(&pk_value.clone()); + + let item = js_sys::Object::new(); + Reflect::set( + &item, + &JsValue::from("id"), + &JsValue::from_str(&indexed_value_str) + )?; + Reflect::set( + &item, + &JsValue::from("items"), + &JsValue::from(&new_index_items) + )?; + + collection_index.insert( + indexed_value_str, + JsValue::from(&item) + ); + } } - - index.insert(pk_str.clone(), document.clone()); - Logger::debug(&JsValue::from(&format!("Document created with primary key: {}", pk_str))); + Logger::log( + "InMemory::write", + &JsValue::from_str("CREATE operation completed successfully.") + ); Ok(document) } OpType::UPDATE => { - Logger::debug(&JsValue::from(&format!("Updating document with primary key: {}", pk_str))); + Logger::log( + "InMemory::write", + &JsValue::from_str(&format!("UPDATE operation for primary key: '{}'", pk_str)) + ); + + let index = index_guard + .entry(index_name.clone()) + .or_insert_with(HashMap::new); if !index.contains_key(&pk_str) { - Logger::debug(&JsValue::from("Document with this primary key does not exist")); - return Err(JsValue::from_str("Document with this primary key does not exist")); + let msg = "Document with this primary key does not exist".to_string(); + Logger::log("InMemory::write", &JsValue::from_str(&format!("Error: {}", msg))); + return Err(JsValue::from_str(&msg)); } - index.insert(pk_str.clone(), document.clone()); - Logger::debug(&JsValue::from(&format!("Document updated with primary key: {}", pk_str))); + Logger::log("InMemory::write", &JsValue::from_str("UPDATE operation completed successfully.")); Ok(document) } - _ => Err(JsValue::from_str("Unsupported operation type for this data")) + _ => { + let msg = "Unsupported operation type for this data".to_string(); + Logger::log("InMemory::write", &JsValue::from_str(&format!("Error: {}", msg))); + Err(JsValue::from_str(&msg)) + } } } OpType::DELETE => { - Logger::debug(&JsValue::from(&format!("Deleting document with primary key: {}", primary_key))); - - let pk_str = self.core.get_primary_key(op.data.clone())?; - - if index.remove(&pk_str).is_some() { - Logger::debug(&JsValue::from(&format!("Document deleted with primary key: {}", pk_str))); - Ok(JsValue::from_str("Document deleted")) + Logger::log( + "InMemory::write", + &JsValue::from_str("DELETE operation") + ); + let pk_str = self.core.get_primary_key_typed(op.data.clone())?; + if let Some(index) = index_guard.get_mut(&index_name) { + if index.remove(&pk_str).is_some() { + Logger::log("InMemory::write", &JsValue::from_str("DELETE operation completed successfully.")); + Ok(JsValue::from_str("Document deleted")) + } else { + let msg = "Document with this primary key does not exist".to_string(); + Logger::log("InMemory::write", &JsValue::from_str(&format!("Error: {}", msg))); + Err(JsValue::from_str(&msg)) + } } else { - Logger::debug(&JsValue::from("Document with this primary key does not exist")); - Err(JsValue::from_str("Document with this primary key does not exist")) + let msg = "Document with this primary key does not exist".to_string(); + Logger::log("InMemory::write", &JsValue::from_str(&format!("Error: {}", msg))); + Err(JsValue::from_str(&msg)) } } - _ => Err(JsValue::from_str("Unsupported operation type")) + _ => { + let msg = "Unsupported operation type".to_string(); + Logger::log("InMemory::write", &JsValue::from_str(&format!("Error: {}", msg))); + Err(JsValue::from_str(&msg)) + } } } async fn find(&self, collection_name: &str, query: Query) -> Result { - let schema = self.base.schemas.get(collection_name).ok_or_else(|| JsValue::from_str("Collection not found"))?; - let normalized_query = query.parse()?; - let results = Array::new(); - let primary_key = schema.primary_key.clone(); - let index_name = format!("pk_{}_{}", collection_name, primary_key); + Logger::log( + "InMemory::find", + &JsValue::from_str(&format!( + "Find called for collection '{}', query: {:?}", + collection_name, + query + )) + ); + let documents = self.get_matching_documents(collection_name, &query).await?; + let results_array = Array::new(); - if let Some(index) = self.by_index.read().unwrap().get(&index_name) { - for (_pk, doc) in index.iter() { - let item_query: Query = Query::new(normalized_query.clone(), schema.clone())?; - let matches = self.core.document_matches_query(doc, &item_query)?; - if matches { - results.push(doc); - } - } + for doc in documents { + results_array.push(&doc); } - Ok(results.into()) + Logger::log( + "InMemory::find", + &JsValue::from_str(&format!( + "Find completed. Number of documents found: {}", + results_array.length() + )) + ); + Ok(JsValue::from(results_array)) } async fn find_document_by_id( @@ -143,132 +258,320 @@ impl Storage for InMemory { collection_name: &str, primary_key_value: JsValue, ) -> Result { - let schema = self.base.schemas.get(collection_name).ok_or_else(|| JsValue::from_str("Collection not found"))?; - let primary_key = schema.primary_key.clone(); - let index_name = format!("pk_{}_{}", collection_name, primary_key); - - Logger::debug( - &JsValue::from( - &format!("finding indes pk_{}_{}", collection_name, primary_key) - ) + Logger::log( + "InMemory::find_document_by_id", + &JsValue::from_str(&format!( + "Find document by ID called for collection '{}'.", + collection_name + )) ); + let schema = self.base.schemas.get(collection_name).ok_or_else(|| { + let msg = format!("Collection {} not found in findDocumentById", collection_name); + Logger::log( + "InMemory::find_document_by_id", + &JsValue::from_str(&format!("Error: {}", msg)) + ); + JsValue::from(msg) + })?; + let primary_key = schema.primary_key.clone(); - // Convert primary key value to string - let pk_str = self.core.get_primary_key(primary_key_value)?; + let index_name = if collection_name.starts_with("idx_") { + collection_name.to_string() + } else { + format!("pk_{}_{}", collection_name, primary_key) + }; - // Retrieve the index if let Some(index) = self.by_index.read().unwrap().get(&index_name) { + let pk_str = self.core.get_primary_key_typed(primary_key_value.clone())?; if let Some(doc) = index.get(&pk_str) { + Logger::log( + "InMemory::find_document_by_id", + &JsValue::from_str("Document found.") + ); return Ok(doc.clone()); } } - + Logger::log( + "InMemory::find_document_by_id", + &JsValue::from_str("Document not found.") + ); Ok(JsValue::undefined()) } async fn count(&self, collection_name: &str, query: Query) -> Result { - let schema = self.base.schemas.get(collection_name).ok_or_else(|| JsValue::from_str("Collection not found"))?; - let normalized_query = query.parse()?; - let mut count = 0; - - let primary_key = schema.primary_key.clone(); - let index_name = format!("pk_{}_{}", collection_name, primary_key); - - if let Some(index) = self.by_index.read().unwrap().get(&index_name) { - for (_pk, doc) in index.iter() { - let item_query: Query = Query::new(normalized_query.clone(), schema.clone())?; - let matches = self.core.document_matches_query(doc, &item_query)?; - if matches { - count += 1; - } - } - } - - Ok(JsValue::from_f64(count as f64)) + Logger::log( + "InMemory::count", + &JsValue::from_str(&format!( + "Count called for collection '{}', query: {:?}", + collection_name, + query + )) + ); + let documents = self.get_matching_documents(collection_name, &query).await?; + Logger::log( + "InMemory::count", + &JsValue::from_str(&format!( + "Count completed. Number of documents matching: {}", + documents.len() + )) + ); + Ok(JsValue::from_f64(documents.len() as f64)) } async fn close(&mut self) -> Result { - // Clear all data from the storage and reset internal state + Logger::log( + "InMemory::close", + &JsValue::from_str("Close operation called.") + ); let mut index_guard = self.by_index.write() - .map_err(|_| JsValue::from_str("Failed to acquire write lock"))?; + .map_err(|_| { + let msg = "Failed to acquire write lock".to_string(); + Logger::log( + "InMemory::close", + &JsValue::from_str(&format!("Error: {}", msg)) + ); + JsValue::from_str(&msg) + })?; index_guard.clear(); - // Reset any other internal states if necessary self.started = false; + Logger::log( + "InMemory::close", + &JsValue::from_str("In-memory database closed and reset.") + ); Ok(JsValue::from_str("In-memory database closed and reset")) } async fn start(&mut self) -> Result { - // Reinitialize any internal states if necessary + Logger::log( + "InMemory::start", + &JsValue::from_str("Start operation called.") + ); if self.started { + Logger::log( + "InMemory::start", + &JsValue::from_str("In-memory database already started.") + ); return Ok(JsValue::from_str("In-memory database already started")); } self.started = true; + Logger::log( + "InMemory::start", + &JsValue::from_str("In-memory database started.") + ); Ok(JsValue::from_str("In-memory database started")) } - } #[wasm_bindgen] impl InMemory { + /// Shared logic to gather all documents matching a given query from a specific collection. + /// This version retrieves document IDs from each matching index and intersects them before + /// performing a final document filter based on the full query. + async fn get_matching_documents( + &self, + collection_name: &str, + query: &Query + ) -> Result, JsValue> { + Logger::log( + "InMemory::get_matching_documents", + &JsValue::from_str(&format!( + "Called with collection_name='{}', query={:?}", + collection_name, + query + )) + ); + + let read_lock = self.by_index.read() + .map_err(|_| JsValue::from_str("Failed to acquire read lock"))?; + + let schema = self.base.schemas + .get(collection_name) + .ok_or_else(|| { + let msg = format!("Collection '{}' not found", collection_name); + Logger::log( + "InMemory::get_matching_documents", + &JsValue::from_str(&format!("Error: {}", msg)) + ); + JsValue::from(msg) + })?; + + let primary_key = schema.primary_key.clone(); + let mut matched_docs = Vec::new(); + + // Identify any query properties that have an index + let query_properties_with_index: Vec = query + .clone() + .get_properties()? + .into_iter() + .filter(|key| { + let index_table = format!("idx_{}_{}", collection_name, key); + read_lock.get(&index_table).is_some() + }) + .collect(); + + Logger::log( + "InMemory::get_matching_documents", + &JsValue::from_str(&format!( + "Indexed properties in use: {:?}", + query_properties_with_index + )) + ); + + // If no indexed fields match the query, do a full table scan. + // Otherwise, gather an intersection of document IDs from all relevant indexes. + if query_properties_with_index.is_empty() { + Logger::log( + "InMemory::get_matching_documents", + &JsValue::from_str("No indexed fields match. Performing full table scan.") + ); + let table_name = format!("pk_{}_{}", collection_name, primary_key); + if let Some(documents) = read_lock.get(&table_name) { + for (_, document) in documents.iter() { + let matches = self.core.document_matches_query(document, query)?; + if matches { + matched_docs.push(document.clone()); + } + } + } + } else { + // For each indexed property, gather a set of all doc IDs that match that single index. + let mut doc_id_sets: Vec> = Vec::new(); + + for indexed_property in &query_properties_with_index { + let index_table_name = format!("idx_{}_{}", collection_name, indexed_property); + let mut this_index_doc_ids = HashSet::new(); + + if let Some(index_document) = read_lock.get(&index_table_name) { + // For each index entry, gather the relevant document primary keys + for idx_value in index_document.values() { + let index_items = Reflect::get(idx_value, &JsValue::from_str("items")) + .unwrap_or_else(|_| JsValue::from(Array::new())); + let document_ids = Array::from(&index_items); + + for document_id_js in document_ids.iter() { + if let Some(document_id_str) = document_id_js.as_string() { + this_index_doc_ids.insert(document_id_str); + } + } + } + } + doc_id_sets.push(this_index_doc_ids); + } + + // Intersect all sets to ensure the documents match *all* indexed query parts. + // If there's only one set, the intersection is just that set. + let mut intersection_ids = if let Some(first_set) = doc_id_sets.clone().into_iter().next() { + first_set + } else { + HashSet::new() + }; + + // Intersect with the remaining sets + for set in doc_id_sets.clone().into_iter() { + intersection_ids = intersection_ids + .intersection(&set) + .cloned() + .collect::>(); + } + + // Now fetch the actual documents from the primary-key table + // and do a final match against the full query conditions. + let table_name = format!("pk_{}_{}", collection_name, primary_key); + if let Some(pk_map) = read_lock.get(&table_name) { + for doc_id in intersection_ids { + if let Some(doc) = pk_map.get(&doc_id) { + if self.core.document_matches_query(doc, query)? { + matched_docs.push(doc.clone()); + } + } + } + } + } + + Logger::log( + "InMemory::get_matching_documents", + &JsValue::from_str(&format!( + "Found {} matching documents.", + matched_docs.len() + )) + ); + + Ok(matched_docs) + } #[wasm_bindgen] pub async fn create(name: &str, schemas_js: Object) -> Result { + Logger::log( + "InMemory::create", + &JsValue::from_str(&format!( + "Creating a new InMemory instance with DB name '{}'", + name + )) + ); let base_res = BaseStorage::new( name.to_string(), schemas_js, None ); - match base_res { - Ok(base) => Ok( - InMemory { - base, - by_index: RwLock::new(HashMap::new()), - core: CoreStorage {}, - started: false, - } - ), - Err(e) => Err(e) - } - } - #[wasm_bindgen(getter)] - pub fn by_index(&self) -> Result { - let guard = self.by_index.read().map_err(|_| JsValue::from_str("Failed to acquire read lock"))?; - let outer_obj = Object::new(); - for (outer_key, inner_map) in &*guard { - let inner_obj = Object::new(); - for (inner_key, value) in inner_map { - Reflect::set(&inner_obj, &JsValue::from_str(inner_key), value) - .map_err(|_| { - JsValue::from_str("Failed to set inner object property") - })?; + match base_res { + Ok(mut base) => { + //Adds extra index schemas + base.add_index_schemas()?; + Logger::log( + "InMemory::create", + &JsValue::from_str("Successfully created BaseStorage and added index schemas.") + ); + Ok( + InMemory { + base, + by_index: RwLock::new(HashMap::new()), + core: CoreStorage {}, + started: false, + } + ) + }, + Err(e) => { + Logger::log( + "InMemory::create", + &JsValue::from_str(&format!( + "Error creating BaseStorage: {:?}", + e + )) + ); + Err(e) } - Reflect::set( - &outer_obj, - &JsValue::from_str(outer_key), - &JsValue::from(inner_obj), - ).map_err(|_| { - JsValue::from_str("Failed to set outer object property") - })?; } - Ok(JsValue::from(outer_obj)) } #[wasm_bindgen(js_name = "write")] pub async fn write_js(&self, op: &Operation) -> Result { + Logger::log( + "InMemory::write_js", + &JsValue::from_str("write_js called.") + ); self.write(op).await } #[wasm_bindgen(js_name = "find")] - pub async fn find_js(&self, collection_name: &str, query: JsValue) -> Result { - let schema = self.base.schemas.get(collection_name).ok_or_else(|| JsValue::from_str("Collection not found"))?; - self.find(collection_name, Query::new(query, schema.clone())?).await + pub async fn find_js(&self, collection_name: &str, query_js: JsValue) -> Result { + Logger::log( + "InMemory::find_js", + &JsValue::from_str(&format!( + "find_js called for collection '{}'", + collection_name + )) + ); + let schema = self.base.schemas.get(collection_name) + .ok_or_else(|| JsValue::from( format!("Collection {} not found in find", collection_name)))?; + let query = Query::new(query_js.clone(), schema.clone())?; + self.find(collection_name, query.clone()).await } #[wasm_bindgen(js_name = "findDocumentById")] @@ -277,24 +580,48 @@ impl InMemory { collection_name: &str, primary_key: JsValue, ) -> Result { + Logger::log( + "InMemory::find_document_by_id_js", + &JsValue::from_str(&format!( + "findDocumentById called for collection '{}'", + collection_name + )) + ); self.find_document_by_id(collection_name, primary_key).await } #[wasm_bindgen(js_name = "count")] - pub async fn count_js(&self, collection_name: &str, query: JsValue) -> Result { - let schema = self.base.schemas.get(collection_name).ok_or_else(|| JsValue::from_str("Collection not found"))?; - self.count(collection_name, Query::new(query, schema.clone())?).await + pub async fn count_js(&self, collection_name: &str, query_js: JsValue) -> Result { + Logger::log( + "InMemory::count_js", + &JsValue::from_str(&format!( + "count_js called for collection '{}'", + collection_name + )) + ); + let schema = self.base.schemas.get(collection_name).ok_or_else(|| JsValue::from( format!("Collection {} not found in count", collection_name)))?; + let query = Query::new(query_js, schema.clone())?; + self.count(collection_name, query).await } #[wasm_bindgen(js_name = "close")] pub async fn close_js(&mut self) -> Result { + Logger::log( + "InMemory::close_js", + &JsValue::from_str("close_js called.") + ); self.close().await } #[wasm_bindgen(js_name = "start")] pub async fn start_js(&mut self) -> Result { + Logger::log( + "InMemory::start_js", + &JsValue::from_str("start_js called.") + ); self.start().await } + } #[cfg(test)] @@ -336,7 +663,7 @@ mod tests { Value::Object(obj) => { let js_obj = Object::new(); for (key, value) in obj { - js_sys::Reflect::set( + Reflect::set( &js_obj, &JsValue::from_str(key), &value_to_js_value(value), @@ -386,7 +713,9 @@ mod tests { collection: "demo".to_string(), op_type: OpType::CREATE, data: new_item.clone().into(), - indexes: vec![], + primary_key_field: Some("id".to_string()), + primary_key: Some(JsValue::from_str("id")) + }; // Test successful creation @@ -411,7 +740,8 @@ mod tests { collection: "demo".to_string(), op_type: OpType::CREATE, data: new_item.into(), - indexes: vec![], + primary_key_field: Some("id".to_string()), + primary_key: Some(JsValue::from_str("1234")) }; let duplicate_result = inmem.write(&duplicate_op).await; @@ -451,11 +781,18 @@ mod tests { ]; for item in items { + + let primary_key = Reflect::get( + &item, + &JsValue::from_str("id") + ).unwrap(); + let create_op = Operation { collection: "demo".to_string(), op_type: OpType::CREATE, data: item, - indexes: vec![], + primary_key_field: Some("id".to_string()), + primary_key: Some(primary_key) }; inmem.write(&create_op).await.unwrap(); } @@ -509,11 +846,16 @@ mod tests { ]; for item in items { + let primary_key = Reflect::get( + &item, + &JsValue::from_str("id") + ).unwrap(); let create_op = Operation { collection: "demo".to_string(), op_type: OpType::CREATE, data: item, - indexes: vec![], + primary_key_field: Some("id".to_string()), + primary_key: Some(primary_key) }; inmem.write(&create_op).await.unwrap(); } @@ -572,7 +914,8 @@ mod tests { collection: "users".to_string(), op_type: OpType::CREATE, data: user, - indexes: vec![], + primary_key_field: Some("id".to_string()), + primary_key: Some(JsValue::from("1")) }; inmem.write(&create_op).await.unwrap(); @@ -617,7 +960,8 @@ mod tests { collection: "demo".to_string(), op_type: OpType::CREATE, data: new_item, - indexes: vec![], + primary_key_field: Some("id".to_string()), + primary_key: Some(JsValue::from("1")) }; inmem.write(&op).await.unwrap(); diff --git a/packages/ridb-level/CHANGELOG.md b/packages/ridb-level/CHANGELOG.md index 28350a7..8756d80 100644 --- a/packages/ridb-level/CHANGELOG.md +++ b/packages/ridb-level/CHANGELOG.md @@ -1,3 +1,10 @@ +## @trust0/ridb-level [1.1.1-rc.1](https://github.com/trust0-project/RIDB/compare/@trust0/ridb-level@1.1.0...@trust0/ridb-level@1.1.1-rc.1) (2025-01-26) + + +### Dependencies + +* **@trust0/ridb:** upgraded to 1.2.0-rc.1 + ## @trust0/ridb-level [1.1.0](https://github.com/trust0-project/RIDB/compare/@trust0/ridb-level@1.0.9...@trust0/ridb-level@1.1.0) (2025-01-01) ### Features diff --git a/packages/ridb-level/package.json b/packages/ridb-level/package.json index 31eedcb..f782157 100644 --- a/packages/ridb-level/package.json +++ b/packages/ridb-level/package.json @@ -1,6 +1,6 @@ { "name": "@trust0/ridb-level", - "version": "1.1.0", + "version": "1.1.1-rc.1", "description": "Level DB wrapper for @trust0/ridb.", "main": "./build/index.js", "types": "./build/index.d.ts", @@ -57,14 +57,14 @@ "vite-plugin-wasm": "^3.3.0", "vitest": "^1.6.0", "webdriverio": "^9.0.9", - "@trust0/ridb": "1.1.0", + "@trust0/ridb": "1.2.0-rc.1", "vite": "^5.0.0", "classic-level": "^2.0.0", "@trust0/ridb-testing": "^0.0.1" }, "peerDependencies": { "classic-level": "^2.0.0", - "@trust0/ridb": "1.1.0" + "@trust0/ridb": "1.2.0-rc.1" }, "optionalDependencies": { "@esbuild/darwin-arm64": "0.15.18", diff --git a/packages/ridb-react/CHANGELOG.md b/packages/ridb-react/CHANGELOG.md index aa7df79..c9b60c6 100644 --- a/packages/ridb-react/CHANGELOG.md +++ b/packages/ridb-react/CHANGELOG.md @@ -1,3 +1,10 @@ +## @trust0/ridb-react [1.1.1-rc.1](https://github.com/trust0-project/RIDB/compare/@trust0/ridb-react@1.1.0...@trust0/ridb-react@1.1.1-rc.1) (2025-01-26) + + +### Dependencies + +* **@trust0/ridb:** upgraded to 1.2.0-rc.1 + ## @trust0/ridb-react [1.1.0](https://github.com/trust0-project/RIDB/compare/@trust0/ridb-react@1.0.0...@trust0/ridb-react@1.1.0) (2025-01-01) ### Features diff --git a/packages/ridb-react/package.json b/packages/ridb-react/package.json index e619654..071f567 100644 --- a/packages/ridb-react/package.json +++ b/packages/ridb-react/package.json @@ -1,7 +1,7 @@ { "name": "@trust0/ridb-react", "description": "React bindings for RIDB.", - "version": "1.1.0", + "version": "1.1.1-rc.1", "author": "elribonazo@gmail.com", "repository": { "type": "git", @@ -37,10 +37,10 @@ "typescript": "^5.7.2", "vite": "^5.0.0", "vitest": "^1.6.0", - "@trust0/ridb": "1.1.0" + "@trust0/ridb": "1.2.0-rc.1" }, "peerDependencies": { - "@trust0/ridb": "1.1.0", + "@trust0/ridb": "1.2.0-rc.1", "react": "^18.3.1", "react-dom": "^18.3.1" }, diff --git a/packages/ridb/CHANGELOG.md b/packages/ridb/CHANGELOG.md index 21ff057..566d8f7 100644 --- a/packages/ridb/CHANGELOG.md +++ b/packages/ridb/CHANGELOG.md @@ -1,3 +1,19 @@ +## @trust0/ridb [1.2.0-rc.1](https://github.com/trust0-project/RIDB/compare/@trust0/ridb@1.1.0...@trust0/ridb@1.2.0-rc.1) (2025-01-26) + +### Features + +* advanced indexing ([1a26e79](https://github.com/trust0-project/RIDB/commit/1a26e798a541762f1876184187f9d9ccd1f72f96)) + +### Bug Fixes + +* documentation ([fbba7c0](https://github.com/trust0-project/RIDB/commit/fbba7c09852cd1fcf72abefa308419d401f835c7)) +* implement indexing in InMemory, IndexDB, find and count methods ([fe41c7c](https://github.com/trust0-project/RIDB/commit/fe41c7c0d7929369bf0c7d817ae7ee7c131ced97)) + + +### Dependencies + +* **@trust0/ridb-core:** upgraded to 1.2.0-rc.1 + ## @trust0/ridb [1.1.0](https://github.com/trust0-project/RIDB/compare/@trust0/ridb@1.0.8...@trust0/ridb@1.1.0) (2025-01-01) ### Features diff --git a/packages/ridb/package.json b/packages/ridb/package.json index 3542699..c3a4a80 100644 --- a/packages/ridb/package.json +++ b/packages/ridb/package.json @@ -1,6 +1,6 @@ { "name": "@trust0/ridb", - "version": "1.1.0", + "version": "1.2.0-rc.1", "description": "Dependency free wasm db encrypted and secure database wrapper for web and nodejs.", "main": "./build/index.js", "types": "./build/index.d.ts", @@ -43,7 +43,7 @@ "@semantic-release/npm": "^12.0.1", "@semantic-release/release-notes-generator": "^14.0.2", "@trust0/ridb-testing": "^0.0.1", - "@trust0/ridb-core": "1.1.0", + "@trust0/ridb-core": "1.2.0-rc.1", "@types/node": "^20.14.2", "@vitest/browser": "^1.6.0", "@vitest/coverage-istanbul": "^1.6.0", diff --git a/packages/ridb/src/index.ts b/packages/ridb/src/index.ts index 00a1440..ab220f9 100644 --- a/packages/ridb/src/index.ts +++ b/packages/ridb/src/index.ts @@ -13,22 +13,9 @@ * * *

+ *

Introduction

* - * # SDK Rerefence - */ - -// @ts-ignore @ignore -import wasmBuffer from "@trust0/ridb-core/pkg/ridb_core_bg.wasm"; -import { BasePlugin, BaseStorage, Database, MigrationPathsForSchemas, MigrationsParameter, SchemaTypeRecord } from "@trust0/ridb-core"; - -let internal: typeof import("@trust0/ridb-core") | undefined; - -/** - * Represents a RIDB (Rust IndexedDB) instance. - * This is the main class exposed by the RIDB Storage sdk and is used to create a database instance. - * - * ### Usage: - * + * ### Usage * ```typescript * const db = new RIDB( * { @@ -100,11 +87,15 @@ let internal: typeof import("@trust0/ridb-core") | undefined; * * await db.start({dbName: "demo"}) * ``` - * - * @class - * @template T - The type of the schema record. + * # SDK Rerefence */ +// @ts-ignore @ignore +import wasmBuffer from "@trust0/ridb-core/pkg/ridb_core_bg.wasm"; +import { BasePlugin, BaseStorage, Database, MigrationPathsForSchemas, MigrationsParameter, SchemaTypeRecord } from "@trust0/ridb-core"; + +let internal: typeof import("@trust0/ridb-core") | undefined; + type StorageClass = { create: ( name: string, @@ -260,6 +251,7 @@ export class RIDB { if (StorageClass && !StorageClass.create) { throw new Error("Your storage does not have an async create function, please check documentation") } + const storage = StorageClass ? await StorageClass.create(this.dbName, this.schemas, options) : diff --git a/packages/testing/src/test/schemas.test.ts b/packages/testing/src/test/schemas.test.ts index 895a7f2..c7c8004 100644 --- a/packages/testing/src/test/schemas.test.ts +++ b/packages/testing/src/test/schemas.test.ts @@ -30,7 +30,7 @@ export default (platform: string, storages: StoragesType[]) => { dbName, schemas: { demo: { - version: 0, + version: 0 as const, primaryKey: 'id', type: SchemaFieldType.object, properties: { @@ -67,7 +67,7 @@ export default (platform: string, storages: StoragesType[]) => { dbName, schemas: { demo: { - version: 0, + version: 0 as const, primaryKey: 'id', type: SchemaFieldType.object, properties: { @@ -113,7 +113,7 @@ export default (platform: string, storages: StoragesType[]) => { dbName, schemas: { demo2: { - version: 0, + version: 0 as const, primaryKey: 'id', type: SchemaFieldType.object, encrypted: [], @@ -129,7 +129,7 @@ export default (platform: string, storages: StoragesType[]) => { } }, demo: { - version: 0, + version: 0 as const, primaryKey: 'id', type: SchemaFieldType.object, encrypted: ['name'], @@ -188,7 +188,7 @@ export default (platform: string, storages: StoragesType[]) => { dbName, schemas: { demo: { - version: 0, + version: 0 as const, primaryKey: 'id', type: SchemaFieldType.object, properties: { @@ -213,7 +213,7 @@ export default (platform: string, storages: StoragesType[]) => { dbName, schemas: { demo: { - version: 0, + version: 0 as const, primaryKey: 'id', type: SchemaFieldType.object, properties: { @@ -266,7 +266,7 @@ export default (platform: string, storages: StoragesType[]) => { dbName, schemas: { demo: { - version: 0, + version: 0 as const, primaryKey: 'id', type: SchemaFieldType.object, properties: { @@ -322,7 +322,7 @@ export default (platform: string, storages: StoragesType[]) => { dbName, schemas: { demo: { - version: 0, + version: 0 as const, primaryKey: 'id', type: "wrong", properties: {} @@ -341,7 +341,7 @@ export default (platform: string, storages: StoragesType[]) => { dbName, schemas: { demo: { - version: 0, + version: 0 as const, primaryKey: 'id', type: "obiect", properties: { @@ -365,7 +365,7 @@ export default (platform: string, storages: StoragesType[]) => { dbName, schemas: { demo: { - version: 0, + version: 0 as const, primaryKey: 'id', type: "object", properties: { @@ -389,7 +389,7 @@ export default (platform: string, storages: StoragesType[]) => { dbName, schemas: { demo: { - version: 0, + version: 0 as const, primaryKey: 'id', type: "object", properties: { @@ -447,7 +447,7 @@ export default (platform: string, storages: StoragesType[]) => { dbName, schemas: { users: { - version: 0, + version: 0 as const, primaryKey: 'id', type: SchemaFieldType.object, properties: { @@ -462,7 +462,7 @@ export default (platform: string, storages: StoragesType[]) => { } }, posts: { - version: 0, + version: 0 as const, primaryKey: 'id', type: SchemaFieldType.object, properties: { @@ -508,7 +508,7 @@ export default (platform: string, storages: StoragesType[]) => { dbName, schemas: { demo: { - version: 0, + version: 0 as const, primaryKey: 'id', type: SchemaFieldType.object, properties: { @@ -582,7 +582,7 @@ export default (platform: string, storages: StoragesType[]) => { const created = await db.collections.demo.create({ id: "12345", age: 18, - __version: 0 + __version: 0 as const }) expect(created).to.not.be.undefined; @@ -597,7 +597,7 @@ export default (platform: string, storages: StoragesType[]) => { dbName, schemas: { demo: { - version: 0, + version: 0 as const, primaryKey: 'id', type: SchemaFieldType.object, properties: { @@ -627,7 +627,7 @@ export default (platform: string, storages: StoragesType[]) => { dbName, schemas: { demo: { - version: 0, + version: 0 as const, primaryKey: 'id', type: SchemaFieldType.object, properties: { @@ -666,7 +666,7 @@ export default (platform: string, storages: StoragesType[]) => { dbName, schemas: { demo: { - version: 0, + version: 0 as const, primaryKey: 'id', type: SchemaFieldType.object, properties: { @@ -690,7 +690,7 @@ export default (platform: string, storages: StoragesType[]) => { dbName, schemas: { demo: { - version: 0, + version: 0 as const, primaryKey: 'id', type: SchemaFieldType.object, properties: { @@ -717,7 +717,7 @@ export default (platform: string, storages: StoragesType[]) => { dbName, schemas: { demo: { - version: 0, + version: 0 as const, primaryKey: 'id', type: SchemaFieldType.object, properties: { @@ -743,7 +743,7 @@ export default (platform: string, storages: StoragesType[]) => { dbName, schemas: { demo: { - version: 0, + version: 0 as const, primaryKey: 'id', type: SchemaFieldType.object, properties: { @@ -778,7 +778,7 @@ export default (platform: string, storages: StoragesType[]) => { dbName, schemas: { demo: { - version: 0, + version: 0 as const, primaryKey: 'id', type: SchemaFieldType.object, properties: { @@ -807,7 +807,7 @@ export default (platform: string, storages: StoragesType[]) => { dbName, schemas: { demo: { - version: 0, + version: 0 as const, primaryKey: 'id', type: SchemaFieldType.object, properties: { @@ -835,7 +835,7 @@ export default (platform: string, storages: StoragesType[]) => { dbName, schemas: { demo: { - version: 0, + version: 0 as const, primaryKey: 'id', type: SchemaFieldType.object, properties: { @@ -861,7 +861,7 @@ export default (platform: string, storages: StoragesType[]) => { dbName, schemas: { users: { - version: 0, + version: 0 as const, primaryKey: 'id', type: SchemaFieldType.object, properties: { @@ -889,6 +889,235 @@ export default (platform: string, storages: StoragesType[]) => { expect(results.length).to.equal(1); expect(results[0].id).to.equal('u3'); }); + + it('Should create and verify index collections', async () => { + const usersSchema = { + version: 0 as const, + primaryKey: 'id', + type: SchemaFieldType.object, + indexes: ['age'], + properties: { + id: { + type: SchemaFieldType.string, + maxLength: 60 + }, + name: { + type: SchemaFieldType.string, + maxLength: 100 + }, + age: { + type: SchemaFieldType.number + } + } + } + + const db = new RIDB({ + dbName, + schemas: { + users: usersSchema + } + }); + await db.start({ + storageType: storage, + password: "test" + }); + + // Verify main collection exists + expect(db.collections).to.haveOwnProperty("users"); + + // Create a user and verify indexes are maintained + await db.collections.users.create({ + id: "user1", + name: "John Doe", + age: 30 + }); + + await db.collections.users.create({ + id: "user2", + name: "Doe John", + age: 35 + }); + + const usersAge30 = await db.collections.users.find({ + age: 30 + }); + + expect(usersAge30.length).to.eq(1); + + const usersAgeOlderThan20 = await db.collections.users.find({ + age: { $gt: 20 } + }); + + expect(usersAgeOlderThan20.length).to.eq(2); + }); + + it('Should work correctly without indexes', async () => { + const db = new RIDB({ + dbName, + schemas: { + users: { + version: 0 as const, + primaryKey: 'id', + type: SchemaFieldType.object, + properties: { + id: { + type: SchemaFieldType.string, + maxLength: 60 + }, + name: { + type: SchemaFieldType.string, + maxLength: 100 + } + } + } + } as const + }); + + await db.start({ + storageType: storage, + password: "test" + }); + + // Verify main collection exists + expect(db.collections).to.haveOwnProperty("users"); + + // Create a user + const user = await db.collections.users.create({ + id: "user1", + name: "John Doe" + }); + + expect(user).to.not.be.undefined; + expect(user.id).to.eq("user1"); + }); + + it('Should maintain index integrity during CRUD operations', async () => { + const db = new RIDB({ + dbName, + schemas: { + users: { + version: 0 as const, + primaryKey: 'id', + type: SchemaFieldType.object, + indexes: ['name'], + properties: { + id: { + type: SchemaFieldType.string, + maxLength: 60 + }, + name: { + type: SchemaFieldType.string, + maxLength: 100 + } + } + } + } as const + }); + + await db.start({ + storageType: storage, + password: "test" + }); + + // Create + const user = await db.collections.users.create({ + id: "user1", + name: "John Doe" + }); + expect(user).to.not.be.undefined; + + // Update + await db.collections.users.update({ + id: "user1", + name: "Jane Doe" + }); + + // Find by index + const found = await db.collections.users.find({ + name: "Jane Doe" + }); + expect(found.length).to.eq(1); + expect(found[0].id).to.eq("user1"); + + // Delete + await db.collections.users.delete("user1"); + const notFound = await db.collections.users.find({ + name: "Jane Doe" + }); + expect(notFound.length).to.eq(0); + }); + + it('Should correctly count documents using advanced indexing', async () => { + // Define the schema with indexes + const db = new RIDB({ + dbName, + schemas: { + users: { + version: 0 as const, + primaryKey: 'id', + type: SchemaFieldType.object, + indexes: ['age', 'name'], + properties: { + id: { type: SchemaFieldType.string }, + age: { type: SchemaFieldType.number }, + name: { type: SchemaFieldType.string } + } + } + } as const + }); + + await db.start({ + storageType: storage, + password: "test" + }); + + const usersCollection = db.collections.users; + // Insert multiple users with different ages and names + await usersCollection.create({ id: 'u1', age: 25, name: 'Alice' }); + await usersCollection.create({ id: 'u2', age: 30, name: 'Bob' }); + await usersCollection.create({ id: 'u3', age: 35, name: 'Charlie' }); + await usersCollection.create({ id: 'u4', age: 30, name: 'David' }); + await usersCollection.create({ id: 'u5', age: 25, name: 'Eve' }); + const countAndAge25 = await usersCollection.find({ + $and: [ + { age: { $gte: 0 } }, + { age: { $lte: 25 } } + ] + }); + expect(countAndAge25.length).to.eq(2); + + // Use count method with advanced queries utilizing indexes + const countAge25 = await usersCollection.find({ age: 25 }); + expect(countAge25.length).to.eq(2); + + const countAge30 = await usersCollection.count({ age: 30 }); + expect(countAge30).to.eq(2); + + const countNameBob = await usersCollection.count({ name: 'Bob' }); + expect(countNameBob).to.eq(1); + + const countAgeGreaterThan25 = await usersCollection.count({ age: { $gt: 25 } }); + expect(countAgeGreaterThan25).to.eq(3); + + const countAge25OrNameEve = await usersCollection.count({ + $or: [ + { age: 25 }, + { name: 'Eve' } + ] + }); + expect(countAge25OrNameEve).to.eq(2); + + const countComplexQuery = await usersCollection.count({ + $and: [ + { age: { $gte: 30 } }, + { name: 'David' } + ] + }); + expect(countComplexQuery).to.eq(1); // Only 'u3' matches + + // Clean up + await db.close(); + }); }); @@ -901,7 +1130,7 @@ export default (platform: string, storages: StoragesType[]) => { dbName, schemas: { demo: { - version: 0, + version: 0 as const, primaryKey: 'id', type: SchemaFieldType.object, properties: { @@ -945,9 +1174,10 @@ export default (platform: string, storages: StoragesType[]) => { dbName, schemas: { demo: { - version: 0, + version: 0 as const, primaryKey: 'id', type: SchemaFieldType.object, + indexes: ['age'], properties: { id: { type: SchemaFieldType.string }, age: { type: SchemaFieldType.number } @@ -963,23 +1193,22 @@ export default (platform: string, storages: StoragesType[]) => { const collection = db.collections.demo; const testCount = 5000; + const possibleAges = [10, 20, 30, 40, 50, 60, 70, 80, 90]; // Bulk insert for (let i = 0; i < testCount; i++) { + // Cycle through the age array + let age = possibleAges[i % possibleAges.length]; + await collection.create({ id: `doc_${i}`, - age: Math.floor(Math.random() * 100) + age: age }); } // Measure query performance const startTime = performance.now(); - const results = await collection.find({ - $and: [ - { age: { $gte: 30 } }, - { age: { $lte: 50 } } - ] - }); + const results = await collection.find( { age: 30 }); const endTime = performance.now(); const queryTimeMs = (endTime - startTime).toFixed(2); @@ -994,7 +1223,7 @@ export default (platform: string, storages: StoragesType[]) => { dbName, schemas: { demo: { - version: 0, + version: 0 as const, primaryKey: 'id', type: SchemaFieldType.object, properties: { @@ -1018,6 +1247,433 @@ export default (platform: string, storages: StoragesType[]) => { expect(found).toBeUndefined(); }); + + // Step 4: Measure performance queries on multiple indexes with large dataset + it('should measure advanced query performance with multiple indexes on a large dataset', async () => { + // Define the DB with multiple indexes + const db = new RIDB({ + dbName, + schemas: { + perfTest: { + version: 0 as const, + primaryKey: 'id', + type: SchemaFieldType.object, + // Index on multiple fields to test query complexity + indexes: ['category', 'score', 'group'], + properties: { + id: { type: SchemaFieldType.string }, + category: { type: SchemaFieldType.string, maxLength: 20 }, + score: { type: SchemaFieldType.number }, + group: { type: SchemaFieldType.string }, + } + } + } as const + }); + + await db.start({ + storageType: storage, + password: "test" + }); + + const collection = db.collections.perfTest; + + // Insert a large volume of documents + const totalDocs = 10000; + const categories = ['catA', 'catB', 'catC', 'catD']; + const groups = ['group1', 'group2', 'group3']; + + for (let i = 0; i < totalDocs; i++) { + await collection.create({ + id: `doc_${i}`, + category: categories[i % categories.length], + score: Math.floor(Math.random() * 1000), + group: groups[i % groups.length] + }); + } + + // Perform advanced queries using multiple indexed fields + const queryStart = performance.now(); + const results = await collection.find({ + $and: [ + { category: 'catB' }, + { score: { $gte: 500 } }, + { + $or: [ + { group: 'group2' }, + { group: 'group3' } + ] + } + ] + }); + const queryEnd = performance.now(); + + console.log( + `[${platform}][${storage ? 'Typescript' : 'Wasm'} ${name}] ` + + `Advanced query with multiple indexes completed in ${(queryEnd - queryStart).toFixed(2)} ms. Found ${results.length} docs.` + ); + + // Basic checks + expect(results).toBeDefined(); + for (const doc of results) { + expect(doc.category).toBe('catB'); + expect(doc.score).toBeGreaterThanOrEqual(500); + expect(['group2', 'group3']).toContain(doc.group); + } + + await db.close(); + }); + + describe("Index usage with small data sets", () => { + + const docs = [ + { id: "doc1", age: 18, status: "active" }, + { id: "doc2", age: 25, status: "inactive" }, + { id: "doc3", age: 30, status: "active" }, + { id: "doc4", age: 22, status: "pending" }, + { id: "doc5", age: 40, status: "active" }, + { id: "doc6", age: 35, status: "inactive" }, + { id: "doc7", age: 25, status: "pending" }, + { id: "doc8", age: 18, status: "pending" }, + { id: "doc9", age: 45, status: "active" }, + { id: "doc10", age: 28, status: "inactive" }, + ]; + + /** + * 1) $gt condition on an indexed field + */ + it('should retrieve documents with age > 30', async () => { + const db = new RIDB({ + dbName, + schemas: { + smallIndexTest: { + version: 0 as const, + primaryKey: "id", + type: SchemaFieldType.object, + indexes: ["age", "status"], + properties: { + id: { type: SchemaFieldType.string }, + age: { type: SchemaFieldType.number }, + status: { type: SchemaFieldType.string }, + }, + }, + }, + }); + await db.start({ + storageType: storage, + password: "test", + }); + + // Insert test documents + for (const doc of docs) { + await db.collections.smallIndexTest.create(doc); + } + + // Query + const found = await db.collections.smallIndexTest.find({ + age: { $gt: 30 }, + }); + + expect(found.length).to.eq(3); // doc5, doc6, doc9 + const ids = found.map((doc) => doc.id); + expect(ids).to.include.members(["doc5", "doc6", "doc9"]); + + await db.close(); + }); + + /** + * 2) $gte combined with $and + */ + it('should retrieve documents with age >= 25 AND status = "active"', async () => { + const db = new RIDB({ + dbName, + schemas: { + smallIndexTest: { + version: 0 as const, + primaryKey: "id", + type: SchemaFieldType.object, + indexes: ["age", "status"], + properties: { + id: { type: SchemaFieldType.string }, + age: { type: SchemaFieldType.number }, + status: { type: SchemaFieldType.string }, + }, + }, + }, + }); + await db.start({ storageType: storage, password: "test" }); + + for (const doc of docs) { + await db.collections.smallIndexTest.create(doc); + } + + const found = await db.collections.smallIndexTest.find({ + $and: [ + { age: { $gte: 25 } }, + { status: "active" } + ], + }); + + // Should match doc3(30, active), doc5(40, active), doc9(45, active) + expect(found.length).to.eq(3); + const ids = found.map((doc) => doc.id); + expect(ids).to.include.members(["doc3", "doc5", "doc9"]); + + await db.close(); + }); + + /** + * 3) $lt condition + */ + it('should retrieve documents with age < 20', async () => { + const db = new RIDB({ + dbName, + schemas: { + smallIndexTest: { + version: 0 as const, + primaryKey: "id", + type: SchemaFieldType.object, + indexes: ["age", "status"], + properties: { + id: { type: SchemaFieldType.string }, + age: { type: SchemaFieldType.number }, + status: { type: SchemaFieldType.string }, + }, + }, + }, + }); + await db.start({ storageType: storage, password: "test" }); + + for (const doc of docs) { + await db.collections.smallIndexTest.create(doc); + } + + const found = await db.collections.smallIndexTest.find({ + age: { $lt: 20 }, + }); + + // Should match doc1(18, active) and doc8(18, pending) + expect(found.length).to.eq(2); + const ids = found.map((doc) => doc.id); + expect(ids).to.include.members(["doc1", "doc8"]); + + await db.close(); + }); + + /** + * 4) $lte combined with $or + */ + it('should retrieve documents with (age <= 25) OR (status = "pending")', async () => { + const db = new RIDB({ + dbName, + schemas: { + smallIndexTest: { + version: 0 as const, + primaryKey: "id", + type: SchemaFieldType.object, + indexes: ["age", "status"], + properties: { + id: { type: SchemaFieldType.string }, + age: { type: SchemaFieldType.number }, + status: { type: SchemaFieldType.string }, + }, + }, + }, + }); + await db.start({ storageType: storage, password: "test" }); + + for (const doc of docs) { + await db.collections.smallIndexTest.create(doc); + } + + const found = await db.collections.smallIndexTest.find({ + $or: [ + { age: { $lte: 25 } }, + { status: "pending" }, + ], + }); + + // doc1(18,active), doc2(25,inactive), + // doc4(22,pending), doc7(25,pending), + // doc8(18,pending) + expect(found.length).to.eq(5); + const ids = found.map((doc) => doc.id); + expect(ids).to.include.members(["doc1", "doc2", "doc4", "doc7", "doc8"]); + + await db.close(); + }); + + /** + * 5) $in condition + */ + it('should retrieve documents with age in [18, 25, 28]', async () => { + const db = new RIDB({ + dbName, + schemas: { + smallIndexTest: { + version: 0 as const, + primaryKey: "id", + type: SchemaFieldType.object, + indexes: ["age", "status"], + properties: { + id: { type: SchemaFieldType.string }, + age: { type: SchemaFieldType.number }, + status: { type: SchemaFieldType.string }, + }, + }, + }, + }); + await db.start({ storageType: storage, password: "test" }); + + for (const doc of docs) { + await db.collections.smallIndexTest.create(doc); + } + + const found = await db.collections.smallIndexTest.find({ + age: { $in: [18, 25, 28] }, + }); + + // doc1(18,active), doc2(25,inactive), + // doc7(25,pending), doc8(18,pending), + // doc10(28,inactive) + expect(found.length).to.eq(5); + const ids = found.map((doc) => doc.id); + expect(ids).to.include.members(["doc1", "doc2", "doc7", "doc8", "doc10"]); + + await db.close(); + }); + + /** + * 8) $and condition with multiple fields + */ + it('should retrieve documents (age >= 25) AND (status in ["active","pending"])', async () => { + const db = new RIDB({ + dbName, + schemas: { + smallIndexTest: { + version: 0 as const, + primaryKey: "id", + type: SchemaFieldType.object, + indexes: ["age", "status"], + properties: { + id: { type: SchemaFieldType.string }, + age: { type: SchemaFieldType.number }, + status: { type: SchemaFieldType.string }, + }, + }, + }, + }); + await db.start({ storageType: storage, password: "test" }); + + for (const doc of docs) { + await db.collections.smallIndexTest.create(doc); + } + + const found = await db.collections.smallIndexTest.find({ + $and: [ + { age: { $gte: 25 } }, + { status: { $in: ["active", "pending"] } }, + ], + }); + + // Matches doc3(30,active), doc5(40,active), + // doc7(25,pending), doc9(45,active) + expect(found.length).to.eq(4); + const ids = found.map((doc) => doc.id); + expect(ids).to.include.members(["doc3", "doc5", "doc7", "doc9"]); + + await db.close(); + }); + + /** + * 9) $or condition with multiple fields + */ + it('should retrieve documents where (age < 20) OR (status = "pending")', async () => { + const db = new RIDB({ + dbName, + schemas: { + smallIndexTest: { + version: 0 as const, + primaryKey: "id", + type: SchemaFieldType.object, + indexes: ["age", "status"], + properties: { + id: { type: SchemaFieldType.string }, + age: { type: SchemaFieldType.number }, + status: { type: SchemaFieldType.string }, + }, + }, + }, + }); + await db.start({ storageType: storage, password: "test" }); + + for (const doc of docs) { + await db.collections.smallIndexTest.create(doc); + } + + const found = await db.collections.smallIndexTest.find({ + $or: [ + { age: { $lt: 20 } }, + { status: "pending" }, + ], + }); + + // doc1(18,active) => yes + // doc4(22,pending) => yes + // doc7(25,pending) => yes + // doc8(18,pending) => yes + expect(found.length).to.eq(4); + const ids = found.map((doc) => doc.id); + expect(ids).to.include.members(["doc1", "doc4", "doc7", "doc8"]); + + await db.close(); + }); + + /** + * 10) Complex nested condition + */ + it('should retrieve documents with status in ["active","pending"] AND ( age >= 30 OR age < 20 )', async () => { + const db = new RIDB({ + dbName, + schemas: { + smallIndexTest: { + version: 0 as const, + primaryKey: "id", + type: SchemaFieldType.object, + indexes: ["age", "status"], + properties: { + id: { type: SchemaFieldType.string }, + age: { type: SchemaFieldType.number }, + status: { type: SchemaFieldType.string }, + }, + }, + }, + }); + await db.start({ storageType: storage, password: "test" }); + + // Insert test documents + for (const doc of docs) { + await db.collections.smallIndexTest.create(doc); + } + + const found = await db.collections.smallIndexTest.find({ + $and: [ + { status: { $in: ["active", "pending"] } }, + { + $or: [ + { age: { $gte: 30 } }, + { age: { $lt: 20 } }, + ], + }, + ], + }); + expect(found.length).to.eq(5); + const ids = found.map((doc) => doc.id); + expect(ids).to.include.members(["doc1", "doc3", "doc8", "doc9"]); + + await db.close(); + }); + + }); }); }); });