From 4d819cb20a21ceb772c85d10f1ab115ea4b19990 Mon Sep 17 00:00:00 2001 From: julienmalard Date: Sat, 20 Jan 2024 17:30:32 -0500 Subject: [PATCH] Update tests, actions and README --- .aegir.js | 34 +- .../requ-te-de-fonctionnalit-.md | 20 - .../ISSUE_TEMPLATE/signaler-un-probl-me.md | 34 -- .github/workflows/npm-publish-next.yml | 25 + .github/workflows/npm-publish.yml | 21 + .github/workflows/{tests.yml => run-test.yml} | 8 +- README.md | 52 +- package.json | 16 +- pnpm-lock.yaml | 577 +----------------- test/ordered-keyvalue.spec.ts | 40 +- 10 files changed, 97 insertions(+), 730 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/requ-te-de-fonctionnalit-.md delete mode 100644 .github/ISSUE_TEMPLATE/signaler-un-probl-me.md create mode 100644 .github/workflows/npm-publish-next.yml create mode 100644 .github/workflows/npm-publish.yml rename .github/workflows/{tests.yml => run-test.yml} (85%) diff --git a/.aegir.js b/.aegir.js index 1506c0e..2e4fb8c 100644 --- a/.aegir.js +++ b/.aegir.js @@ -1,38 +1,6 @@ -import path, { dirname } from "path"; -import { fileURLToPath } from "url"; -import { createRequire } from "module"; - -const require = createRequire(import.meta.url); - -const __dirname = dirname(fileURLToPath(import.meta.url)); - -// https://github.com/node-webrtc/node-webrtc/issues/636#issuecomment-774171409 -process.on("beforeExit", (code) => process.exit(code)); - // https://github.com/ipfs/aegir/blob/master/md/migration-to-v31.md const esbuild = { - // this will inject all the named exports from 'node-globals.js' as globals - inject: [path.join(__dirname, "./scripts/node-globals.js")], - external: ["fs", "path", "os", "chokidar", "url", "zlib", "rimraf"], - plugins: [ - { - name: "node built ins", // this will make the bundler resolve node builtins to the respective browser polyfill - setup(build) { - build.onResolve({ filter: /^stream$/ }, () => { - return { path: require.resolve("stream-browserify") }; - }); - build.onResolve({ filter: /^os$/ }, () => { - return { path: require.resolve("os-browserify") }; - }); - build.onResolve({ filter: /^crypto$/ }, () => { - return { path: require.resolve("crypto-browserify") }; - }); - build.onResolve({ filter: /^fs/ }, () => { - return { path: require.resolve("browserify-fs") }; - }); - }, - }, - ], + external: ["rimraf"], }; /** @type {import('aegir').PartialOptions} */ diff --git a/.github/ISSUE_TEMPLATE/requ-te-de-fonctionnalit-.md b/.github/ISSUE_TEMPLATE/requ-te-de-fonctionnalit-.md deleted file mode 100644 index 515c8f2..0000000 --- a/.github/ISSUE_TEMPLATE/requ-te-de-fonctionnalit-.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Requête de fonctionnalité -about: Proposer une nouvelle idée -title: '' -labels: '' -assignees: '' - ---- - -**Votre suggestion est-elle liée à un problème spécifique ? Veuillez décrire ci-dessous :** -Une explication claire, nette et précise du problème. Par exemple, "cela me frustre lorsque [...]" - -**Décrire la solution telle que vous l'envisagez** -Une description claire et précise du comportement que vous préfériez voir. - -**Décrire les alternatives** -Une brève description des solutions alternatives que vous avez considéré (si applicable). - -**Contexte additionnel** -Vous pouvez ajouter d'autres informations ou même des prises d'écran si vous le souhaitez. diff --git a/.github/ISSUE_TEMPLATE/signaler-un-probl-me.md b/.github/ISSUE_TEMPLATE/signaler-un-probl-me.md deleted file mode 100644 index 86fcf54..0000000 --- a/.github/ISSUE_TEMPLATE/signaler-un-probl-me.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -name: Signaler un problème -about: Signalez-le et nous y travaillerons -title: '' -labels: '' -assignees: '' - ---- - -**Décrire le problème** -Une description claire, nette et précise du problème. - -**Comment le reproduire** -Instructions détaillées pour reproduire le problème. - -**Comportement attendu** -Une brève description du comportement auquel vous vous attendez. - -**Prises d'écran** -Si cela s'applique, incluez des prises d'écran du problème. - -**Pour ordinateurs :** - - SO: [p. ex. iOS, Windows 11, Linux, ...] - - Navigateur [p.ex. firefox, brave, chrome, safari] - - Version [p. ex. 22] - -**Pour téléphones intelligents :** - - Dispositig: [p. ex. iPhone6] - - SO: [p. ex. iOS8.1] - - Navigateur [p.ex. firefox, brave, chrome, safari] - - Version [p. ex. 22] - -**Contexte additionnel** -Inclure toute autre information utile. diff --git a/.github/workflows/npm-publish-next.yml b/.github/workflows/npm-publish-next.yml new file mode 100644 index 0000000..9c9f4fc --- /dev/null +++ b/.github/workflows/npm-publish-next.yml @@ -0,0 +1,25 @@ +--- +name: Node.js Package (next tag) + +on: + push: + branches: + - main + +jobs: + publish-npm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 'lts/*' + registry-url: https://registry.npmjs.org/ + - run: pnpm install + - run: pnpm test + - run: | + pnpm version prerelease --no-git-tag-version \ + --preid=`git rev-parse --short HEAD` + pnpm publish --tag next + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} \ No newline at end of file diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..aaecb3c --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,21 @@ +--- +name: Node.js Package + +on: + push: + tags: + - 'v*' + +jobs: + publish-npm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 'lts/*' + registry-url: https://registry.npmjs.org/ + - run: pnpm install + - run: pnpm release + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/run-test.yml similarity index 85% rename from .github/workflows/tests.yml rename to .github/workflows/run-test.yml index 394725c..5d303a2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/run-test.yml @@ -1,4 +1,4 @@ -name: Orbit-db Kuiper tests +name: orbit-db-ordered-keyvalue tests on: push: branches: @@ -7,14 +7,14 @@ on: branches: - main jobs: - tests-et-couverture: + test-node: name: Node.js test runs-on: ubuntu-latest steps: - name: Préparation de Node.js uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 21 - name: Installer pnpm uses: pnpm/action-setup@v2.4.0 @@ -28,7 +28,7 @@ jobs: run: pnpm install --lockfile=false - name: Vérifier les tests - run: pnpm test + run: pnpm test:node - name: Envoyer couverture à Codecov uses: codecov/codecov-action@v3 diff --git a/README.md b/README.md index 62779ad..75a0cb3 100644 --- a/README.md +++ b/README.md @@ -1,61 +1,27 @@ -# Kuiper -Additional database types for orbit-db. +# @orbitdb/ordered-keyvalue-db +Ordered keyvalue database type for orbit-db. -[![Orbit-db Kuiper tests](https://github.com/reseau-constellation/orbit-db-kuiper/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/reseau-constellation/orbit-db-kuiper/actions/workflows/tests.yml) -[![codecov](https://codecov.io/gh/reseau-constellation/orbit-db-kuiper/graph/badge.svg?token=7OZK4BJDej)](https://codecov.io/gh/reseau-constellation/orbit-db-kuiper) +[![Tests](https://github.com/orbitdb/ordered-keyvalue/actions/workflows/run-test.yml/badge.svg?branch=main)](https://github.com/orbitdb/ordered-keyvalue/actions/workflows/tests.yml) +[![codecov](https://codecov.io/gh/orbitdb/ordered-keyvalue/graph/badge.svg?token=7OZK4BJDej)](https://codecov.io/gh/orbitdb/ordered-keyvalue) ## Installation ``` -$ pnpm add @constl/orbit-db-kuiper +$ pnpm add @orbitdb/ordered-keyvalue ``` ## Introduction -`Kuiper` brings additional database types to `orbit-db`. - -* `Feed`: For those feeling nostalgic for orbit-db v.0.x. But honestly, you're probably better off with a `KeyValue` or a `Set`. -* `Set`: Like `Feed`, but each value can only be present once. Works for primitive types as well as more complex objects. -* `OrderedKeyValue`: A `KeyValue` database where you can move entries around. Ideal for situations where order is important (e.g., lists of tabs in a spreadsheet, etc.). +A `KeyValue` database where you can move entries around. Ideal for situations where order is important (e.g., lists of tabs in a spreadsheet, etc.). ## Examples -### Set -As simple example with `Set`: ```ts import { createOrbit } from "@orbitdb/core"; -import { registerAll } from "@constl/orbit-db-kuiper"; +import { registerOrderedKeyValue } from "@orbitdb/ordered-keyvalue"; -// Register Kuiper database types. IMPORTANT - must call before creating orbit instance ! -registerAll(); +// Register database type. IMPORTANT - must call before creating orbit instance ! +registerOrderedKeyValue(); const orbit = await createOrbit({ ipfs }) -const db = await orbit.open({ type: "set" }); - -await db.add(1); -await db.add(2); - -const all = await db.all(); // [1, 2] - -await db.add(1); -await db.all() // Yay !! Still [1, 2] -``` - -### Feed -```ts -const db = await orbit.open({ type: "feed" }); - -await db.add({ a: 1, b: "c" }); - -const all = await db.all(); // [{ value: { a: 1, b: "c" }, hash: "..." }] - -await db.add({ a: 1, b: "c" }); -await db.all(); -// [{ value: { a: 1, b: "c" }, hash: "..." }, { value: { a: 1, b: "c" }, hash: "..." }] -``` - -### OrderedKeyValue - -```ts - const db = await orbit.open({ type: "ordered-keyvalue" }); await db.put("a", "some value"); diff --git a/package.json b/package.json index 9330040..6c77507 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@orbitdb/ordered-keyvalue", + "name": "@orbitdb/ordered-keyvalue-db", "version": "1.0.0", "description": "Ordered keyvalue database type for orbit-db.", "author": "Julien Jean Malard-Adam", @@ -17,7 +17,9 @@ "scripts": { "clean": "rimraf dist", "compile": "pnpm updateVersion && pnpm format && pnpm clean && pnpm tspc -p tsconfig.build.json", - "test": "pnpm compile && pnpm aegir test -t node --cov -- --exit", + "test": "pnpm test:node && pnpm test:browser", + "test:node": "pnpm compile && pnpm aegir test -t node --cov -- --exit", + "test:browser": "pnpm compile && pnpm aegir test -t browser --cov -- --exit", "format": "pnpm prettier --ignore-path .gitignore --write \"**/*.+(js|ts|json)\" && pnpm eslint --ext .js,.ts src", "release": "pnpm test && (git commit -a -m 'version' || true) && pnpm publish", "updateVersion": "pnpm genversion --es6 --semi src/version.ts" @@ -36,7 +38,6 @@ "@libp2p/identify": "^1.0.11", "@libp2p/webrtc": "^4.0.16", "@libp2p/websockets": "^8.0.12", - "@types/fs-extra": "^11.0.4", "@types/mocha": "^10.0.6", "@types/uuid": "^9.0.7", "@typescript-eslint/eslint-plugin": "^6.19.0", @@ -44,22 +45,17 @@ "aegir": "^42.2.2", "blockstore-core": "^4.3.10", "blockstore-level": "^1.1.7", - "browserify-fs": "^1.0.0", - "buffer": "^6.0.3", - "crypto-browserify": "^3.12.0", "eslint": "^8.56.0", "eslint-config-prettier": "^9.1.0", - "fs-extra": "^11.2.0", "genversion": "^3.2.0", "libp2p": "^1.2.0", "mocha": "^10.2.0", - "os-browserify": "^0.3.0", "prettier": "^3.2.4", - "process": "^0.11.10", "rimraf": "^5.0.5", "ts-patch": "^3.1.2", "typescript": "^5.3.3", - "typescript-transform-paths": "^3.4.6" + "typescript-transform-paths": "^3.4.6", + "wherearewe": "^2.0.1" }, "jest": { "transform": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 29a783c..743fcb7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,22 +4,13 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false -overrides: - iso-constants: git+https://github.com/inverted-capital/iso-constants.git#patch-1 - dependencies: '@orbitdb/core': specifier: ^2.0.1 version: 2.0.1 - events: - specifier: ^3.3.0 - version: 3.3.0 helia: specifier: ^3.0.1 version: 3.0.1(react-native@0.73.2) - uuid: - specifier: ^9.0.1 - version: 9.0.1 devDependencies: '@chainsafe/libp2p-gossipsub': @@ -49,9 +40,6 @@ devDependencies: '@libp2p/websockets': specifier: ^8.0.12 version: 8.0.12 - '@types/fs-extra': - specifier: ^11.0.4 - version: 11.0.4 '@types/mocha': specifier: ^10.0.6 version: 10.0.6 @@ -73,24 +61,12 @@ devDependencies: blockstore-level: specifier: ^1.1.7 version: 1.1.7 - browserify-fs: - specifier: ^1.0.0 - version: 1.0.0 - buffer: - specifier: ^6.0.3 - version: 6.0.3 - crypto-browserify: - specifier: ^3.12.0 - version: 3.12.0 eslint: specifier: ^8.56.0 version: 8.56.0 eslint-config-prettier: specifier: ^9.1.0 version: 9.1.0(eslint@8.56.0) - fs-extra: - specifier: ^11.2.0 - version: 11.2.0 genversion: specifier: ^3.2.0 version: 3.2.0 @@ -100,15 +76,9 @@ devDependencies: mocha: specifier: ^10.2.0 version: 10.2.0 - os-browserify: - specifier: ^0.3.0 - version: 0.3.0 prettier: specifier: ^3.2.4 version: 3.2.4 - process: - specifier: ^0.11.10 - version: 0.11.10 rimraf: specifier: ^5.0.5 version: 5.0.5 @@ -121,6 +91,9 @@ devDependencies: typescript-transform-paths: specifier: ^3.4.6 version: 3.4.6(typescript@5.3.3) + wherearewe: + specifier: ^2.0.1 + version: 2.0.1 packages: @@ -1575,6 +1548,8 @@ packages: uint8arraylist: 2.4.8 uint8arrays: 5.0.1 wherearewe: 2.0.1 + transitivePeerDependencies: + - supports-color /@chainsafe/libp2p-noise@15.0.0: resolution: {integrity: sha512-O8Y/WVU4J/qrnG72jwVhbmdXiBzv1dT9B3PMClCRmZ9z/5vVPEGRVXE/SVYeGF3bNuBTLoh+F+GaKG/9UHlMhg==} @@ -2410,6 +2385,8 @@ packages: protons-runtime: 5.2.2 uint8arraylist: 2.4.8 uint8arrays: 5.0.1 + transitivePeerDependencies: + - supports-color /@libp2p/crypto@4.0.1: resolution: {integrity: sha512-lKGbX8TvQt4JbqlttdexEz2VtYJnTwY31kVBDQviwt0pMF+6Uy2hzNnEQ1FHZBwnow8BIlyb6UevHfgyOFlnkw==} @@ -3006,6 +2983,8 @@ packages: p-queue: 8.0.1 timeout-abort-controller: 3.0.0 uint8arrays: 5.0.1 + transitivePeerDependencies: + - supports-color dev: false /@phenomnomnominal/tsquery@5.0.1(typescript@5.3.3): @@ -3665,13 +3644,6 @@ packages: '@types/node': 20.11.5 dev: false - /@types/fs-extra@11.0.4: - resolution: {integrity: sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==} - dependencies: - '@types/jsonfile': 6.1.4 - '@types/node': 20.11.5 - dev: true - /@types/http-cache-semantics@4.0.4: resolution: {integrity: sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==} dev: true @@ -3697,12 +3669,6 @@ packages: resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true - /@types/jsonfile@6.1.4: - resolution: {integrity: sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==} - dependencies: - '@types/node': 20.11.5 - dev: true - /@types/keyv@3.1.4: resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} dependencies: @@ -4216,12 +4182,6 @@ packages: module-error: 1.0.2 queue-microtask: 1.2.3 - /abstract-leveldown@0.12.4: - resolution: {integrity: sha512-TOod9d5RDExo6STLMGa+04HGkl+TlMfbDnTyN93/ETJ9DpQ0DaYLqcMZlbXvdc4W3vVo1Qrl+WhSp8zvDsJ+jA==} - dependencies: - xtend: 3.0.0 - dev: true - /accepts@1.3.8: resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} engines: {node: '>= 0.6'} @@ -4664,15 +4624,6 @@ packages: /asap@2.0.6: resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==} - /asn1.js@5.4.1: - resolution: {integrity: sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==} - dependencies: - bn.js: 4.12.0 - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - safer-buffer: 2.1.2 - dev: true - /asn1js@3.0.5: resolution: {integrity: sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==} engines: {node: '>=12.0.0'} @@ -4798,12 +4749,6 @@ packages: engines: {node: '>=8'} dev: true - /bl@0.8.2: - resolution: {integrity: sha512-pfqikmByp+lifZCS0p6j6KreV6kNU6Apzpm2nKOk+94cZb/jvle55+JxWiByUQ0Wo/+XnDXEy5MxxKMb6r0VIw==} - dependencies: - readable-stream: 1.0.34 - dev: true - /bl@4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} dependencies: @@ -4852,14 +4797,6 @@ packages: engines: {node: '>=10.0.0'} dev: true - /bn.js@4.12.0: - resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==} - dev: true - - /bn.js@5.2.1: - resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} - dev: true - /boolean@3.2.0: resolution: {integrity: sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==} requiresBuild: true @@ -4888,10 +4825,6 @@ packages: dependencies: fill-range: 7.0.1 - /brorand@1.1.0: - resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} - dev: true - /browser-level@1.0.1: resolution: {integrity: sha512-XECYKJ+Dbzw0lbydyQuJzwNXtOpbMSq737qxJN11sIRTErOMShvDpbzTlgju7orJKvx4epULolZAuJGLzCmWRQ==} dependencies: @@ -4908,64 +4841,6 @@ packages: resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} dev: true - /browserify-aes@1.2.0: - resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} - dependencies: - buffer-xor: 1.0.3 - cipher-base: 1.0.4 - create-hash: 1.2.0 - evp_bytestokey: 1.0.3 - inherits: 2.0.4 - safe-buffer: 5.2.1 - dev: true - - /browserify-cipher@1.0.1: - resolution: {integrity: sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==} - dependencies: - browserify-aes: 1.2.0 - browserify-des: 1.0.2 - evp_bytestokey: 1.0.3 - dev: true - - /browserify-des@1.0.2: - resolution: {integrity: sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==} - dependencies: - cipher-base: 1.0.4 - des.js: 1.1.0 - inherits: 2.0.4 - safe-buffer: 5.2.1 - dev: true - - /browserify-fs@1.0.0: - resolution: {integrity: sha512-8LqHRPuAEKvyTX34R6tsw4bO2ro6j9DmlYBhiYWHRM26Zv2cBw1fJOU0NeUQ0RkXkPn/PFBjhA0dm4AgaBurTg==} - dependencies: - level-filesystem: 1.2.0 - level-js: 2.2.4 - levelup: 0.18.6 - dev: true - - /browserify-rsa@4.1.0: - resolution: {integrity: sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==} - dependencies: - bn.js: 5.2.1 - randombytes: 2.1.0 - dev: true - - /browserify-sign@4.2.2: - resolution: {integrity: sha512-1rudGyeYY42Dk6texmv7c4VcQ0EsvVbLwZkA+AQB7SxvXxmcD93jcHie8bzecJ+ChDlmAm2Qyu0+Ccg5uhZXCg==} - engines: {node: '>= 4'} - dependencies: - bn.js: 5.2.1 - browserify-rsa: 4.1.0 - create-hash: 1.2.0 - create-hmac: 1.1.7 - elliptic: 6.5.4 - inherits: 2.0.4 - parse-asn1: 5.1.6 - readable-stream: 3.6.2 - safe-buffer: 5.2.1 - dev: true - /browserslist@4.22.2: resolution: {integrity: sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -4988,10 +4863,6 @@ packages: /buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - /buffer-xor@1.0.3: - resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} - dev: true - /buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} dependencies: @@ -5311,13 +5182,6 @@ packages: resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} - /cipher-base@1.0.4: - resolution: {integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==} - dependencies: - inherits: 2.0.4 - safe-buffer: 5.2.1 - dev: true - /classic-level@1.3.0: resolution: {integrity: sha512-iwFAJQYtqRTRM0F6L8h4JCt00ZSGdOyqh7yVrhhjrOpFhmBjNlRUey64MCiyo6UmQHMJ+No3c81nujPv+n9yrg==} engines: {node: '>=12'} @@ -5426,10 +5290,6 @@ packages: mimic-response: 1.0.1 dev: true - /clone@0.1.19: - resolution: {integrity: sha512-IO78I0y6JcSpEPHzK4obKdsL7E7oLdRVDVOLwr2Hkbjsb+Eoz0dxW6tef0WizoKu0gLC4oZSZuEF4U2K6w1WQw==} - dev: true - /clone@1.0.4: resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} engines: {node: '>=0.8'} @@ -5522,16 +5382,6 @@ packages: /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - /concat-stream@1.6.2: - resolution: {integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==} - engines: {'0': node >= 0.8} - dependencies: - buffer-from: 1.1.2 - inherits: 2.0.4 - readable-stream: 2.3.8 - typedarray: 0.0.6 - dev: true - /config-chain@1.1.13: resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} dependencies: @@ -5688,34 +5538,6 @@ packages: p-map: 6.0.0 dev: true - /create-ecdh@4.0.4: - resolution: {integrity: sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==} - dependencies: - bn.js: 4.12.0 - elliptic: 6.5.4 - dev: true - - /create-hash@1.2.0: - resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} - dependencies: - cipher-base: 1.0.4 - inherits: 2.0.4 - md5.js: 1.3.5 - ripemd160: 2.0.2 - sha.js: 2.4.11 - dev: true - - /create-hmac@1.1.7: - resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==} - dependencies: - cipher-base: 1.0.4 - create-hash: 1.2.0 - inherits: 2.0.4 - ripemd160: 2.0.2 - safe-buffer: 5.2.1 - sha.js: 2.4.11 - dev: true - /create-require@1.1.1: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} dev: true @@ -5739,22 +5561,6 @@ packages: shebang-command: 2.0.0 which: 2.0.2 - /crypto-browserify@3.12.0: - resolution: {integrity: sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==} - dependencies: - browserify-cipher: 1.0.1 - browserify-sign: 4.2.2 - create-ecdh: 4.0.4 - create-hash: 1.2.0 - create-hmac: 1.1.7 - diffie-hellman: 5.0.3 - inherits: 2.0.4 - pbkdf2: 3.1.2 - public-encrypt: 4.0.3 - randombytes: 2.1.0 - randomfill: 1.0.4 - dev: true - /crypto-random-string@2.0.0: resolution: {integrity: sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==} engines: {node: '>=8'} @@ -5916,12 +5722,6 @@ packages: engines: {node: '>=10'} dev: true - /deferred-leveldown@0.2.0: - resolution: {integrity: sha512-+WCbb4+ez/SZ77Sdy1iadagFiVzMB89IKOBhglgnUkVxOxRWmmFsz8UDSNWh4Rhq+3wr/vMFlYj+rdEwWUDdng==} - dependencies: - abstract-leveldown: 0.12.4 - dev: true - /define-data-property@1.1.1: resolution: {integrity: sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==} engines: {node: '>= 0.4'} @@ -6022,13 +5822,6 @@ packages: engines: {node: '>=6'} dev: true - /des.js@1.1.0: - resolution: {integrity: sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==} - dependencies: - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - dev: true - /destroy@1.2.0: resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} @@ -6082,14 +5875,6 @@ packages: engines: {node: '>=0.3.1'} dev: true - /diffie-hellman@5.0.3: - resolution: {integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==} - dependencies: - bn.js: 4.12.0 - miller-rabin: 4.0.1 - randombytes: 2.1.0 - dev: true - /dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -6186,18 +5971,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /elliptic@6.5.4: - resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} - dependencies: - bn.js: 4.12.0 - brorand: 1.1.0 - hash.js: 1.1.7 - hmac-drbg: 1.0.1 - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - minimalistic-crypto-utils: 1.0.1 - dev: true - /email-addresses@5.0.0: resolution: {integrity: sha512-4OIPYlA6JXqtVn8zpHpGiI7vE6EQOAg16aGnDMIAlZVinnoZ8208tW1hAbjWydgN/4PLTT9q+O1K6AH/vALJGw==} dev: true @@ -6257,13 +6030,6 @@ packages: /err-code@3.0.1: resolution: {integrity: sha512-GiaH0KJUewYok+eeY05IIgjtAe4Yltygk9Wqp1V5yVWLdhf0hYZchRjNIT9bb0mSwRcIusT3cx7PJUf3zEIfUA==} - /errno@0.1.8: - resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==} - hasBin: true - dependencies: - prr: 1.0.1 - dev: true - /error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} dependencies: @@ -6894,13 +6660,6 @@ packages: resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} engines: {node: '>=0.8.x'} - /evp_bytestokey@1.0.3: - resolution: {integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==} - dependencies: - md5.js: 1.3.5 - safe-buffer: 5.2.1 - dev: true - /execa@4.1.0: resolution: {integrity: sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==} engines: {node: '>=10'} @@ -7219,10 +6978,6 @@ packages: is-callable: 1.2.7 dev: true - /foreach@2.0.6: - resolution: {integrity: sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==} - dev: true - /foreground-child@2.0.0: resolution: {integrity: sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==} engines: {node: '>=8.0.0'} @@ -7325,12 +7080,6 @@ packages: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} dev: true - /fwd-stream@1.0.4: - resolution: {integrity: sha512-q2qaK2B38W07wfPSQDKMiKOD5Nzv2XyuvQlrmh1q0pxyHNanKHq8lwQ6n9zHucAwA5EbzRJKEgds2orn88rYTg==} - dependencies: - readable-stream: 1.0.34 - dev: true - /gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} @@ -7690,22 +7439,6 @@ packages: has-symbols: 1.0.3 dev: true - /hash-base@3.1.0: - resolution: {integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==} - engines: {node: '>=4'} - dependencies: - inherits: 2.0.4 - readable-stream: 3.6.2 - safe-buffer: 5.2.1 - dev: true - - /hash.js@1.1.7: - resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} - dependencies: - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - dev: true - /hasha@5.2.2: resolution: {integrity: sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==} engines: {node: '>=8'} @@ -7801,14 +7534,6 @@ packages: dependencies: source-map: 0.7.4 - /hmac-drbg@1.0.1: - resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} - dependencies: - hash.js: 1.1.7 - minimalistic-assert: 1.0.1 - minimalistic-crypto-utils: 1.0.1 - dev: true - /homedir-polyfill@1.0.3: resolution: {integrity: sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==} engines: {node: '>=0.10.0'} @@ -7904,10 +7629,6 @@ packages: engines: {node: '>=16.17.0'} dev: true - /idb-wrapper@1.7.2: - resolution: {integrity: sha512-zfNREywMuf0NzDo9mVsL0yegjsirJxHpKHvWcyRozIqQy89g0a3U+oBPOCN4cc0oCiOuYgZHimzaW/R46G1Mpg==} - dev: true - /ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} @@ -7976,10 +7697,6 @@ packages: engines: {node: '>=18'} dev: true - /indexof@0.0.1: - resolution: {integrity: sha512-i0G7hLJ1z0DE8dsqJa2rycj9dBmNKgXBvotXtZYXakU9oivfB9Uj2ZBC27qqef2U58/ZLwalxa1X/RDCdkHtVg==} - dev: true - /inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} dependencies: @@ -8287,10 +8004,6 @@ packages: engines: {node: '>=8'} dev: true - /is-object@0.1.2: - resolution: {integrity: sha512-GkfZZlIZtpkFrqyAXPQSRBMsaHAw+CgoKe2HXAkjd/sfoI9+hS8PT4wg2rJxdQyUKr7N2vHJbg7/jQtE5l5vBQ==} - dev: true - /is-observable@1.1.0: resolution: {integrity: sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA==} engines: {node: '>=4'} @@ -8435,14 +8148,6 @@ packages: dependencies: is-docker: 2.2.1 - /is@0.2.7: - resolution: {integrity: sha512-ajQCouIvkcSnl2iRdK70Jug9mohIHVX9uKpoWnl115ov0R5mzBvRrXxrnHbsA+8AdwCwc/sfw7HXmd4I5EJBdQ==} - dev: true - - /isarray@0.0.1: - resolution: {integrity: sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==} - dev: true - /isarray@1.0.0: resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} @@ -8450,10 +8155,6 @@ packages: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} dev: true - /isbuffer@0.0.0: - resolution: {integrity: sha512-xU+NoHp+YtKQkaM2HsQchYn0sltxMxew0HavMfHbjnucBoTSGbw745tL+Z7QBANleWM1eEQMenEpi174mIeS4g==} - dev: true - /isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} @@ -8931,70 +8632,6 @@ packages: engines: {node: '>=6'} dev: true - /level-blobs@0.1.7: - resolution: {integrity: sha512-n0iYYCGozLd36m/Pzm206+brIgXP8mxPZazZ6ZvgKr+8YwOZ8/PPpYC5zMUu2qFygRN8RO6WC/HH3XWMW7RMVg==} - dependencies: - level-peek: 1.0.6 - once: 1.4.0 - readable-stream: 1.1.14 - dev: true - - /level-filesystem@1.2.0: - resolution: {integrity: sha512-PhXDuCNYpngpxp3jwMT9AYBMgOvB6zxj3DeuIywNKmZqFj2djj9XfT2XDVslfqmo0Ip79cAd3SBy3FsfOZPJ1g==} - dependencies: - concat-stream: 1.6.2 - errno: 0.1.8 - fwd-stream: 1.0.4 - level-blobs: 0.1.7 - level-peek: 1.0.6 - level-sublevel: 5.2.3 - octal: 1.0.0 - once: 1.4.0 - xtend: 2.2.0 - dev: true - - /level-fix-range@1.0.2: - resolution: {integrity: sha512-9llaVn6uqBiSlBP+wKiIEoBa01FwEISFgHSZiyec2S0KpyLUkGR4afW/FCZ/X8y+QJvzS0u4PGOlZDdh1/1avQ==} - dev: true - - /level-fix-range@2.0.0: - resolution: {integrity: sha512-WrLfGWgwWbYPrHsYzJau+5+te89dUbENBg3/lsxOs4p2tYOhCHjbgXxBAj4DFqp3k/XBwitcRXoCh8RoCogASA==} - dependencies: - clone: 0.1.19 - dev: true - - /level-hooks@4.5.0: - resolution: {integrity: sha512-fxLNny/vL/G4PnkLhWsbHnEaRi+A/k8r5EH/M77npZwYL62RHi2fV0S824z3QdpAk6VTgisJwIRywzBHLK4ZVA==} - dependencies: - string-range: 1.2.2 - dev: true - - /level-js@2.2.4: - resolution: {integrity: sha512-lZtjt4ZwHE00UMC1vAb271p9qzg8vKlnDeXfIesH3zL0KxhHRDjClQLGLWhyR0nK4XARnd4wc/9eD1ffd4PshQ==} - dependencies: - abstract-leveldown: 0.12.4 - idb-wrapper: 1.7.2 - isbuffer: 0.0.0 - ltgt: 2.2.1 - typedarray-to-buffer: 1.0.4 - xtend: 2.1.2 - dev: true - - /level-peek@1.0.6: - resolution: {integrity: sha512-TKEzH5TxROTjQxWMczt9sizVgnmJ4F3hotBI48xCTYvOKd/4gA/uY0XjKkhJFo6BMic8Tqjf6jFMLWeg3MAbqQ==} - dependencies: - level-fix-range: 1.0.2 - dev: true - - /level-sublevel@5.2.3: - resolution: {integrity: sha512-tO8jrFp+QZYrxx/Gnmjawuh1UBiifpvKNAcm4KCogesWr1Nm2+ckARitf+Oo7xg4OHqMW76eAqQ204BoIlscjA==} - dependencies: - level-fix-range: 2.0.0 - level-hooks: 4.5.0 - string-range: 1.2.2 - xtend: 2.0.6 - dev: true - /level-supports@4.0.1: resolution: {integrity: sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA==} engines: {node: '>=12'} @@ -9013,18 +8650,6 @@ packages: browser-level: 1.0.1 classic-level: 1.3.0 - /levelup@0.18.6: - resolution: {integrity: sha512-uB0auyRqIVXx+hrpIUtol4VAPhLRcnxcOsd2i2m6rbFIDarO5dnrupLOStYYpEcu8ZT087Z9HEuYw1wjr6RL6Q==} - dependencies: - bl: 0.8.2 - deferred-leveldown: 0.2.0 - errno: 0.1.8 - prr: 0.0.0 - readable-stream: 1.0.34 - semver: 2.3.2 - xtend: 3.0.0 - dev: true - /leven@3.1.0: resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} engines: {node: '>=6'} @@ -9300,10 +8925,6 @@ packages: inherits: 2.0.4 dev: false - /ltgt@2.2.1: - resolution: {integrity: sha512-AI2r85+4MquTw9ZYqabu4nMwy9Oftlfa/e/52t9IjtfG+mGBbTNdAoZ3RQKLHR6r0wQnwZnPIEh/Ya6XTWAKNA==} - dev: true - /lunr@2.3.9: resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} dev: true @@ -9405,14 +9026,6 @@ packages: '@arr/every': 1.0.1 dev: true - /md5.js@1.3.5: - resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} - dependencies: - hash-base: 3.1.0 - inherits: 2.0.4 - safe-buffer: 5.2.1 - dev: true - /mdast-util-find-and-replace@3.0.1: resolution: {integrity: sha512-SG21kZHGC3XRTSUhtofZkBzZTJNM5ecCi0SK2IMKmSXR8vO3peL+kb1O0z7Zl83jKtutG4k5Wv/W7V3/YHvzPA==} dependencies: @@ -10092,14 +9705,6 @@ packages: braces: 3.0.2 picomatch: 2.3.1 - /miller-rabin@4.0.1: - resolution: {integrity: sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==} - hasBin: true - dependencies: - bn.js: 4.12.0 - brorand: 1.1.0 - dev: true - /mime-db@1.52.0: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} engines: {node: '>= 0.6'} @@ -10153,14 +9758,6 @@ packages: engines: {node: '>=4'} dev: true - /minimalistic-assert@1.0.1: - resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} - dev: true - - /minimalistic-crypto-utils@1.0.1: - resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} - dev: true - /minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: @@ -10727,19 +10324,6 @@ packages: define-properties: 1.2.1 dev: true - /object-keys@0.2.0: - resolution: {integrity: sha512-XODjdR2pBh/1qrjPcbSeSgEtKbYo7LqYNq64/TPuCf7j9SfDD3i21yatKoIy39yIWNvVM59iutfQQpCv1RfFzA==} - deprecated: Please update to the latest object-keys - dependencies: - foreach: 2.0.6 - indexof: 0.0.1 - is: 0.2.7 - dev: true - - /object-keys@0.4.0: - resolution: {integrity: sha512-ncrLw+X55z7bkl5PnUvHwFK9FcGuFYo9gtjws2XtSzL+aZ8tm830P60WJ0dSmFVaSalWieW5MD7kEdnXda9yJw==} - dev: true - /object-keys@1.1.1: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} engines: {node: '>= 0.4'} @@ -10786,10 +10370,6 @@ packages: resolution: {integrity: sha512-JI1vB0u3pZjoQKOK1ROWzp0ygxSi7Yb0iR+7UNsw4/Zn4cQ0P3R7XL38zac/Dy2tEA7Lg88/wIJTjF8vYXZ0uw==} engines: {node: '>=16.0.0', npm: '>=7.0.0'} - /octal@1.0.0: - resolution: {integrity: sha512-nnda7W8d+A3vEIY+UrDQzzboPf1vhs4JYVhff5CDkq9QNoZY7Xrxeo/htox37j9dZf7yNHevZzqtejWgy1vCqQ==} - dev: true - /on-finished@2.3.0: resolution: {integrity: sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==} engines: {node: '>= 0.8'} @@ -10884,10 +10464,6 @@ packages: strip-ansi: 7.1.0 dev: true - /os-browserify@0.3.0: - resolution: {integrity: sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==} - dev: true - /os-tmpdir@1.0.2: resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} engines: {node: '>=0.10.0'} @@ -11099,16 +10675,6 @@ packages: path-platform: 0.11.15 dev: true - /parse-asn1@5.1.6: - resolution: {integrity: sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==} - dependencies: - asn1.js: 5.4.1 - browserify-aes: 1.2.0 - evp_bytestokey: 1.0.3 - pbkdf2: 3.1.2 - safe-buffer: 5.2.1 - dev: true - /parse-json@4.0.0: resolution: {integrity: sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==} engines: {node: '>=4'} @@ -11238,17 +10804,6 @@ packages: resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} dev: true - /pbkdf2@3.1.2: - resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==} - engines: {node: '>=0.12'} - dependencies: - create-hash: 1.2.0 - create-hmac: 1.1.7 - ripemd160: 2.0.2 - safe-buffer: 5.2.1 - sha.js: 2.4.11 - dev: true - /pend@1.2.0: resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} dev: true @@ -11542,25 +11097,6 @@ packages: uint8arraylist: 2.4.8 uint8arrays: 5.0.1 - /prr@0.0.0: - resolution: {integrity: sha512-LmUECmrW7RVj6mDWKjTXfKug7TFGdiz9P18HMcO4RHL+RW7MCOGNvpj5j47Rnp6ne6r4fZ2VzyUWEpKbg+tsjQ==} - dev: true - - /prr@1.0.1: - resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} - dev: true - - /public-encrypt@4.0.3: - resolution: {integrity: sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==} - dependencies: - bn.js: 4.12.0 - browserify-rsa: 4.1.0 - create-hash: 1.2.0 - parse-asn1: 5.1.6 - randombytes: 2.1.0 - safe-buffer: 5.2.1 - dev: true - /pump@3.0.0: resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} dependencies: @@ -11611,13 +11147,6 @@ packages: safe-buffer: 5.2.1 dev: true - /randomfill@1.0.4: - resolution: {integrity: sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==} - dependencies: - randombytes: 2.1.0 - safe-buffer: 5.2.1 - dev: true - /range-parser@1.2.1: resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} engines: {node: '>= 0.6'} @@ -11817,24 +11346,6 @@ packages: mute-stream: 0.0.8 dev: true - /readable-stream@1.0.34: - resolution: {integrity: sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==} - dependencies: - core-util-is: 1.0.3 - inherits: 2.0.4 - isarray: 0.0.1 - string_decoder: 0.10.31 - dev: true - - /readable-stream@1.1.14: - resolution: {integrity: sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==} - dependencies: - core-util-is: 1.0.3 - inherits: 2.0.4 - isarray: 0.0.1 - string_decoder: 0.10.31 - dev: true - /readable-stream@2.3.8: resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} dependencies: @@ -12089,13 +11600,6 @@ packages: glob: 10.3.10 dev: true - /ripemd160@2.0.2: - resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==} - dependencies: - hash-base: 3.1.0 - inherits: 2.0.4 - dev: true - /roarr@2.15.4: resolution: {integrity: sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==} engines: {node: '>=8.0'} @@ -12160,10 +11664,6 @@ packages: is-regex: 1.1.4 dev: true - /safer-buffer@2.1.2: - resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - dev: true - /sanitize-filename@1.6.3: resolution: {integrity: sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==} dependencies: @@ -12234,11 +11734,6 @@ packages: engines: {node: '>=12'} dev: true - /semver@2.3.2: - resolution: {integrity: sha512-abLdIKCosKfpnmhS52NCTjO4RiLspDfsn37prjzGrp9im5DPJOgh82Os92vtwGh6XdQryKI/7SREZnV+aqiXrA==} - hasBin: true - dev: true - /semver@5.7.2: resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true @@ -12330,14 +11825,6 @@ packages: /setprototypeof@1.2.0: resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} - /sha.js@2.4.11: - resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} - hasBin: true - dependencies: - inherits: 2.0.4 - safe-buffer: 5.2.1 - dev: true - /shallow-clone@3.0.1: resolution: {integrity: sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==} engines: {node: '>=8'} @@ -12611,10 +12098,6 @@ packages: get-iterator: 1.0.2 dev: false - /string-range@1.2.2: - resolution: {integrity: sha512-tYft6IFi8SjplJpxCUxyqisD3b+R2CSkomrtJYCkvuf1KuCAWgz7YXt4O0jip7efpfCemwHEzTEAO8EuOYgh3w==} - dev: true - /string-width@1.0.2: resolution: {integrity: sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==} engines: {node: '>=0.10.0'} @@ -12683,10 +12166,6 @@ packages: es-abstract: 1.22.3 dev: true - /string_decoder@0.10.31: - resolution: {integrity: sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==} - dev: true - /string_decoder@1.1.1: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} dependencies: @@ -13231,20 +12710,12 @@ packages: is-typed-array: 1.1.12 dev: true - /typedarray-to-buffer@1.0.4: - resolution: {integrity: sha512-vjMKrfSoUDN8/Vnqitw2FmstOfuJ73G6CrSEKnf11A6RmasVxHqfeBcnTb6RsL4pTMuV5Zsv9IiHRphMZyckUw==} - dev: true - /typedarray-to-buffer@3.1.5: resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} dependencies: is-typedarray: 1.0.0 dev: true - /typedarray@0.0.6: - resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} - dev: true - /typedoc-plugin-mdn-links@3.1.12(typedoc@0.25.7): resolution: {integrity: sha512-B6GLXAq2kL7crem0uJYAN7uMmbBZdf+znUanwk/u6gQQFKveUSzCZrtO9pb0ZIe2uCv1T60XDfcO+bTm7R18aw==} peerDependencies: @@ -13497,11 +12968,6 @@ packages: hasBin: true dev: true - /uuid@9.0.1: - resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} - hasBin: true - dev: false - /v8-compile-cache-lib@3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} dev: true @@ -13755,31 +13221,6 @@ packages: engines: {node: '>=4.0'} dev: false - /xtend@2.0.6: - resolution: {integrity: sha512-fOZg4ECOlrMl+A6Msr7EIFcON1L26mb4NY5rurSkOex/TWhazOrg6eXD/B0XkuiYcYhQDWLXzQxLMVJ7LXwokg==} - engines: {node: '>=0.4'} - dependencies: - is-object: 0.1.2 - object-keys: 0.2.0 - dev: true - - /xtend@2.1.2: - resolution: {integrity: sha512-vMNKzr2rHP9Dp/e1NQFnLQlwlhp9L/LfvnsVdHxN1f+uggyVI3i08uD14GPvCToPkdsRfyPqIyYGmIk58V98ZQ==} - engines: {node: '>=0.4'} - dependencies: - object-keys: 0.4.0 - dev: true - - /xtend@2.2.0: - resolution: {integrity: sha512-SLt5uylT+4aoXxXuwtQp5ZnMMzhDb1Xkg4pEqc00WUJCQifPfV9Ub1VrNhp9kXkrjZD2I2Hl8WnjP37jzZLPZw==} - engines: {node: '>=0.4'} - dev: true - - /xtend@3.0.0: - resolution: {integrity: sha512-sp/sT9OALMjRW1fKDlPeuSZlDQpkqReA0pyJukniWbTGoEKefHxhGJynE3PNhUMlcM8qWIjPwecwCw4LArS5Eg==} - engines: {node: '>=0.4'} - dev: true - /xtend@4.0.2: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} engines: {node: '>=0.4'} diff --git a/test/ordered-keyvalue.spec.ts b/test/ordered-keyvalue.spec.ts index 7e46a20..d143dbe 100644 --- a/test/ordered-keyvalue.spec.ts +++ b/test/ordered-keyvalue.spec.ts @@ -1,14 +1,15 @@ -import { deepStrictEqual, strictEqual, notStrictEqual } from "assert"; import { type Helia } from "helia"; -import { rimraf } from "rimraf"; +import { Identities, Identity, KeyStore, KeyStoreType } from "@orbitdb/core"; import OrderedKeyValue, { OrderedKeyValueDatabaseType, } from "@/ordered-keyvalue.js"; +import { DBElements } from "@/types.js"; import { createTestHelia } from "./config.js"; -import { Identities, Identity, KeyStore, KeyStoreType } from "@orbitdb/core"; +import { isBrowser } from "wherearewe"; import { expect } from "aegir/chai"; -import { DBElements } from "@/types.js"; + +const rimrafImport = import("rimraf"); const keysPath = "./testkeys"; @@ -38,9 +39,12 @@ describe("OrderedKeyValue Database", () => { await keystore.close(); } - await rimraf(keysPath); - await rimraf("./orbitdb"); - await rimraf("./ipfsOKV"); + if (!isBrowser) { + const { rimraf } = await rimrafImport; + await rimraf(keysPath); + await rimraf("./orbitdb"); + await rimraf("./ipfsOKV"); + } }); describe("Creating an Ordered KeyValue database", () => { @@ -60,8 +64,8 @@ describe("OrderedKeyValue Database", () => { }); it("creates an ordered-keyvalue store", async () => { - strictEqual(db.address.toString(), databaseId); - strictEqual(db.type, "ordered-keyvalue"); + expect(db.address.toString()).to.equal(databaseId); + expect(db.type).to.equal("ordered-keyvalue"); }); it("returns 0 items when it's a fresh database", async () => { @@ -70,7 +74,7 @@ describe("OrderedKeyValue Database", () => { all.unshift(item); } - strictEqual(all.length, 0); + expect(all.length).to.equal(0); }); }); @@ -356,7 +360,7 @@ describe("OrderedKeyValue Database", () => { all.unshift(pair); } - deepStrictEqual(all, keyvalue); + expect(all).to.deep.equal(keyvalue); }); }); @@ -377,8 +381,8 @@ describe("OrderedKeyValue Database", () => { }); it("has an iterator function", async () => { - notStrictEqual(db.iterator, undefined); - strictEqual(typeof db.iterator, "function"); + expect(db.iterator).to.not.be.undefined(); + expect(typeof db.iterator).to.equal("function"); }); it("returns no values when the database is empty", async () => { @@ -386,7 +390,7 @@ describe("OrderedKeyValue Database", () => { for await (const { hash, value, key } of db.iterator()) { all.unshift({ hash, value, key }); } - strictEqual(all.length, 0); + expect(all.length).to.equal(0); }); it("returns all values when the database is not empty", async () => { @@ -410,7 +414,7 @@ describe("OrderedKeyValue Database", () => { all.unshift({ hash, value, position }); position++; } - strictEqual(all.length, 5); + expect(all.length).to.equal(5); }); it("returns only the amount of values given as a parameter", async () => { @@ -419,7 +423,7 @@ describe("OrderedKeyValue Database", () => { for await (const { hash, value } of db.iterator({ amount })) { all.unshift({ hash, value }); } - strictEqual(all.length, amount); + expect(all.length).to.equal(amount); }); it("returns only two values if amount given as a parameter is 2", async () => { @@ -428,7 +432,7 @@ describe("OrderedKeyValue Database", () => { for await (const { hash, value } of db.iterator({ amount })) { all.unshift({ hash, value }); } - strictEqual(all.length, amount); + expect(all.length).to.equal(amount); }); it("returns only one value if amount given as a parameter is 1", async () => { @@ -437,7 +441,7 @@ describe("OrderedKeyValue Database", () => { for await (const { hash, value } of db.iterator({ amount })) { all.unshift({ hash, value }); } - strictEqual(all.length, amount); + expect(all.length).to.equal(amount); }); }); });