From b75b2abd7b6c17065d770d32713338bbc23f473f Mon Sep 17 00:00:00 2001 From: Allen Muncy Date: Fri, 5 May 2023 13:34:39 -0400 Subject: [PATCH 01/16] Add custom pin function option --- package.json | 2 +- src/defaultPinFunction.ts | 52 +++++++++++++++++++++++++++++++++++ src/ipfs-http-client-setup.ts | 10 ------- src/main.ts | 2 +- src/prepare.ts | 51 ++-------------------------------- src/resolve.ts | 2 +- src/setup.ts | 22 +++++++++++++++ 7 files changed, 79 insertions(+), 62 deletions(-) create mode 100644 src/defaultPinFunction.ts delete mode 100644 src/ipfs-http-client-setup.ts create mode 100644 src/setup.ts diff --git a/package.json b/package.json index 7bd14e6..2772c2f 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "build:esbuild": "esbuild src/main.ts --bundle --minify --external:node:* --sourcemap=external --outfile=dist/esbuild/main.js --format=esm && node ./node_modules/add-js-extension/dist/bin.js ./dist/esm --once", "build:dev": "esbuild src/main.ts --bundle --outfile=dist/esbuild/main.js --format=esm --sourcemap=inline", "build:watch": "esbuild src/main.ts --bundle --watch --outfile=dist/esbuild/main.js --format=esm && node ./node_modules/add-js-extension/dist/bin.js ./dist/esm --once", - "build:all": "npm run build:esm && npm run build:cjs && npm run build:esbuild && ./fixup.sh", + "build:all": "npm run build:esm && npm run build:cjs && npm run build:esbuild && sh ./fixup.sh", "prepublishOnly": "npm run build:all" }, "devDependencies": { diff --git a/src/defaultPinFunction.ts b/src/defaultPinFunction.ts new file mode 100644 index 0000000..c5dc3c9 --- /dev/null +++ b/src/defaultPinFunction.ts @@ -0,0 +1,52 @@ +import * as IPFS from "ipfs-http-client"; +type FileContent = Uint8Array; +// ipfs.add all supports these: +// May add support later. +// | String +// | Iterable +// | AsyncIterable +// | ReadableStream; + +export async function defaultPin(content: FileContent, _name: string | null = null) { + const ipfs = await IPFS.create(); + + const pinningServices = await ipfs.pin.remote.service.ls(); + + const hasRemotePinningService = pinningServices.length > 0; + + if (!hasRemotePinningService) { + const noPinningService = "No remote pinning service connected."; + throw noPinningService; + } else { + let path = ""; + if (_name) { + path = `/${_name}`; + } + + const res = await ipfs.add( + { content, path }, + { wrapWithDirectory: path !== "" } + ); + const { cid } = res; + await ipfs.pin.remote + .add(cid, { + service: pinningServices[0].service, + name: "Tableland Upload", + }) + .catch((err: any) => { + const message: string = err.message; + if (message.includes("DUPLICATE_OBJECT")) { + console.log( + "Good news; that CID is already pinned to your pinning service." + ); + return; + } + throw err; + }); + + return { + cid: cid.toV1().toString(), + pinned: true + } + } +} diff --git a/src/ipfs-http-client-setup.ts b/src/ipfs-http-client-setup.ts deleted file mode 100644 index 9660eee..0000000 --- a/src/ipfs-http-client-setup.ts +++ /dev/null @@ -1,10 +0,0 @@ -import * as IPFS from "ipfs-http-client"; -import { IPFSHTTPClient } from "ipfs-http-client/types/src/types"; - -let globalIpfsClient = IPFS.create(); - -function optionalSetup(ipfsClient: IPFSHTTPClient) { - globalIpfsClient = ipfsClient; -} - -export { optionalSetup, globalIpfsClient }; diff --git a/src/main.ts b/src/main.ts index 4ca35de..3918672 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,3 +1,3 @@ export { prepare } from "./prepare.js"; export { resolve } from "./resolve.js"; -export { optionalSetup } from "./ipfs-http-client-setup.js"; +export { optionalSetup } from "./setup.js"; diff --git a/src/prepare.ts b/src/prepare.ts index e5481bf..be240ee 100644 --- a/src/prepare.ts +++ b/src/prepare.ts @@ -1,4 +1,4 @@ -import { globalIpfsClient } from "./ipfs-http-client-setup.js"; +import { globalPinFunction } from "./setup.js"; function zip(firstArray: string[], secondArray: string[]) { let str = ""; @@ -13,54 +13,7 @@ function zip(firstArray: string[], secondArray: string[]) { return str; } -type FileContent = Uint8Array; -// ipfs.add all supports these: -// May add support later. -// | String -// | Iterable -// | AsyncIterable -// | ReadableStream; -async function sendToPinned(content: FileContent, _name = null) { - const ipfs = await globalIpfsClient; - - const pinningServices = await ipfs.pin.remote.service.ls(); - - const hasRemotePinningService = pinningServices.length > 0; - - if (!hasRemotePinningService) { - const noPinningService = "No remote pinning service connected."; - throw noPinningService; - } else { - let path = ""; - if (_name) { - path = `/${_name}`; - } - - const res = await ipfs.add( - { content, path }, - { wrapWithDirectory: path !== "" } - ); - const { cid } = res; - await ipfs.pin.remote - .add(cid, { - service: pinningServices[0].service, - name: "Tableland Upload", - }) - .catch((err: any) => { - const message: string = err.message; - if (message.includes("DUPLICATE_OBJECT")) { - console.log( - "Good news; that CID is already pinned to your pinning service." - ); - return; - } - throw err; - }); - - return cid.toV1().toString(); - } -} // If you want to save a string to IPFS, simply encode it // Do this using `new TextEncoder().encode("Your string here")` @@ -71,7 +24,7 @@ async function prepare(strings: TemplateStringsArray, ...values: any[]) { let res = value; switch (true) { case value instanceof Uint8Array: - res = await sendToPinned(value); + res = await globalPinFunction(value, null); break; } return res; diff --git a/src/resolve.ts b/src/resolve.ts index c31a3f7..d2e52bb 100644 --- a/src/resolve.ts +++ b/src/resolve.ts @@ -1,4 +1,4 @@ -import { globalIpfsClient } from "./ipfs-http-client-setup.js"; +import { globalIpfsClient } from "./setup.js"; // New type definitions interface ResultRow { diff --git a/src/setup.ts b/src/setup.ts new file mode 100644 index 0000000..7bc1708 --- /dev/null +++ b/src/setup.ts @@ -0,0 +1,22 @@ +import { defaultPin } from "./defaultPinFunction"; + +let globalPinFunction: Pin = defaultPin; + +interface Pin { + (content: Uint8Array, _name: string | null): Promise<{ + cid: string, + pinned: boolean + }>; +} + + +interface SetupOptions { + pin?: Pin +} + +function setup(options: SetupOptions) { + if(options.pin) + globalPinFunction = options.pin; +} + +export { setup, globalPinFunction }; From aa4d7730265f77301ef3713eaae353e554f4b628 Mon Sep 17 00:00:00 2001 From: Allen Muncy Date: Fri, 5 May 2023 13:43:40 -0400 Subject: [PATCH 02/16] Global IPFS client, always assumes local --- src/main.ts | 2 +- src/prepare.ts | 2 +- src/setup.ts | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main.ts b/src/main.ts index 3918672..3efad05 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,3 +1,3 @@ export { prepare } from "./prepare.js"; export { resolve } from "./resolve.js"; -export { optionalSetup } from "./setup.js"; +export { setup } from "./setup.js"; diff --git a/src/prepare.ts b/src/prepare.ts index be240ee..0fe49ed 100644 --- a/src/prepare.ts +++ b/src/prepare.ts @@ -27,7 +27,7 @@ async function prepare(strings: TemplateStringsArray, ...values: any[]) { res = await globalPinFunction(value, null); break; } - return res; + return res.cid; }); const processedValues = await Promise.all(prom); diff --git a/src/setup.ts b/src/setup.ts index 7bc1708..77fb121 100644 --- a/src/setup.ts +++ b/src/setup.ts @@ -1,6 +1,8 @@ import { defaultPin } from "./defaultPinFunction"; +import * as IPFS from 'ipfs-http-client'; let globalPinFunction: Pin = defaultPin; +let globalIpfsClient = IPFS.create(); interface Pin { (content: Uint8Array, _name: string | null): Promise<{ @@ -19,4 +21,4 @@ function setup(options: SetupOptions) { globalPinFunction = options.pin; } -export { setup, globalPinFunction }; +export { setup, globalPinFunction, globalIpfsClient }; From 763ad439a0a9a58c1f555a86f3e5b8b66b1f3723 Mon Sep 17 00:00:00 2001 From: Allen Muncy Date: Fri, 5 May 2023 13:52:26 -0400 Subject: [PATCH 03/16] Fix linting error --- src/setup.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/setup.ts b/src/setup.ts index 77fb121..665b2ba 100644 --- a/src/setup.ts +++ b/src/setup.ts @@ -1,9 +1,6 @@ import { defaultPin } from "./defaultPinFunction"; import * as IPFS from 'ipfs-http-client'; -let globalPinFunction: Pin = defaultPin; -let globalIpfsClient = IPFS.create(); - interface Pin { (content: Uint8Array, _name: string | null): Promise<{ cid: string, @@ -11,6 +8,8 @@ interface Pin { }>; } +let globalPinFunction: Pin = defaultPin; +const globalIpfsClient = IPFS.create(); interface SetupOptions { pin?: Pin From 13606f8faeeaf40e868a1e4e01574bcda30a5b6c Mon Sep 17 00:00:00 2001 From: Allen Muncy Date: Fri, 5 May 2023 13:59:37 -0400 Subject: [PATCH 04/16] Fix tests --- src/setup.ts | 7 +++++-- test/prepare.test.ts | 13 +++++++++++-- test/resolve.test.ts | 6 ++++-- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/setup.ts b/src/setup.ts index 665b2ba..2c70a28 100644 --- a/src/setup.ts +++ b/src/setup.ts @@ -9,13 +9,16 @@ interface Pin { } let globalPinFunction: Pin = defaultPin; -const globalIpfsClient = IPFS.create(); +let globalIpfsClient = IPFS.create(); interface SetupOptions { - pin?: Pin + pin?: Pin, + ipfsClient: IPFS.IPFSHTTPClient } function setup(options: SetupOptions) { + if(options.ipfsClient) + globalIpfsClient = options.ipfsClient if(options.pin) globalPinFunction = options.pin; } diff --git a/test/prepare.test.ts b/test/prepare.test.ts index 8b72587..cd15b4d 100644 --- a/test/prepare.test.ts +++ b/test/prepare.test.ts @@ -1,6 +1,6 @@ import { describe, test } from "mocha"; import { assert } from "sinon"; -import { optionalSetup } from "../src/ipfs-http-client-setup.js"; +import { setup } from "../src/setup"; import { prepare } from '../src/main'; import { ipfs } from './mocks'; import fetch, { Headers, Request, Response } from "node-fetch"; @@ -15,7 +15,16 @@ if (!globalThis.fetch) { describe('prepare', () => { before(() => { - optionalSetup(ipfs() as any); + setup({ + ipfsClient: ipfs() as any, + pin: async (content) => { + console.log(content) + return { + cid: "ipfs://bafy", + pinned: true + } + } + }); }); test("should prepare the test", async () => { diff --git a/test/resolve.test.ts b/test/resolve.test.ts index d51adb2..cad2e8f 100644 --- a/test/resolve.test.ts +++ b/test/resolve.test.ts @@ -1,6 +1,6 @@ import { describe, test } from "mocha"; import { assert } from "sinon"; -import { optionalSetup } from "../src/ipfs-http-client-setup.js"; +import { setup } from "../src/setup"; import { resolve } from '../src/main'; import { ipfs } from './mocks'; import fetch, { Headers, Request, Response } from "node-fetch"; @@ -15,7 +15,9 @@ if (!globalThis.fetch) { describe('resolve', () => { before(() => { - optionalSetup(ipfs() as any); + setup({ + ipfsClient:ipfs() as any + }); }); test("Should resolve to value", async () => { From 53608e5995388ab660d4aae89d937571221ca196 Mon Sep 17 00:00:00 2001 From: Allen Muncy Date: Fri, 5 May 2023 19:58:20 -0400 Subject: [PATCH 05/16] Generic JETI instead of IPFS specific --- README.md | 4 +- package-lock.json | 56 +++++++++++++++++++++++++- package.json | 4 ++ src/defaultPinFunction.ts | 52 ------------------------ src/main.ts | 7 ++-- src/prepare.ts | 37 ----------------- src/process.ts | 58 +++++++++++++++++++++++++++ src/process/encryptExample.ts | 15 +++++++ src/process/pinContentToIpfs.ts | 70 +++++++++++++++++++++++++++++++++ src/process/truncate.ts | 15 +++++++ src/resolve.ts | 47 ---------------------- src/setup.ts | 26 ------------ 12 files changed, 222 insertions(+), 169 deletions(-) delete mode 100644 src/defaultPinFunction.ts delete mode 100644 src/prepare.ts create mode 100644 src/process.ts create mode 100644 src/process/encryptExample.ts create mode 100644 src/process/pinContentToIpfs.ts create mode 100644 src/process/truncate.ts delete mode 100644 src/resolve.ts delete mode 100644 src/setup.ts diff --git a/README.md b/README.md index cf93240..c1f5e21 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# @tableland/jeti (JavaScript Extension for Tableland and IPFS) +# @tableland/jeti (JavaScript Extension for Tableland Integrations) [![Lint and test](https://github.com/tablelandnetwork/js-tableland/actions/workflows/lint-and-test.yml/badge.svg)](https://github.com/tablelandnetwork/js-tableland/actions/workflows/lint-and-test.yml) [![GitHub package.json version](https://img.shields.io/github/package-json/v/tablelandnetwork/js-tableland.svg)](./package.json) @@ -11,7 +11,7 @@ This library is only compatible with version 3 of `@tableland/sdk`. # Table of Contents -- [@tableland/jeti (JavaScript Extension for Tableland and IPFS)](#tablelandjeti-javascript-extension-for-tableland-and-ipfs) +- [@tableland/jeti (JavaScript Extension for Tableland Integrations)](#tablelandjeti-javascript-extension-for-tableland-integrations) - [Table of Contents](#table-of-contents) - [Background](#background) - [Install](#install) diff --git a/package-lock.json b/package-lock.json index 14a5205..88177df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,24 +1,28 @@ { "name": "@tableland/jeti", - "version": "0.0.5", + "version": "0.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@tableland/jeti", - "version": "0.0.5", + "version": "0.0.0", "license": "MIT", "dependencies": { "@tableland/sdk": "^4.1.0", "@types/sinon": "^10.0.14", "add-js-extension": "^1.0.4", + "crypto-js": "^4.1.1", + "cryptr": "^6.2.0", "esbuild": "^0.17.18", "eslint": "^8.39.0", "ipfs-http-client": "^56.0.3", "node-fetch": "^3.3.1", + "simple-crypto-js": "2.3.1", "ts-node": "^10.9.1" }, "devDependencies": { + "@types/crypto-js": "^4.1.1", "@types/mocha": "^9.0.0", "@typescript-eslint/eslint-plugin": "^5.59.1", "@typescript-eslint/parser": "^5.59.1", @@ -1622,6 +1626,12 @@ "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==" }, + "node_modules/@types/crypto-js": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-4.1.1.tgz", + "integrity": "sha512-BG7fQKZ689HIoc5h+6D2Dgq1fABRa0RbBWKBd9SP/MVRVXROflpm5fhwyATX5duFmbStzyzyycPB8qUYKDH3NA==", + "dev": true + }, "node_modules/@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", @@ -2398,6 +2408,16 @@ "node": ">= 8" } }, + "node_modules/crypto-js": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz", + "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" + }, + "node_modules/cryptr": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/cryptr/-/cryptr-6.2.0.tgz", + "integrity": "sha512-jYi8SxvOFebTT7EYOABiPpHKY6lwWaP9IVcvT/aIVJUVoFdzTgi0ySPCL78q1ig8w2kwfXFCZACXoCXaye57aw==" + }, "node_modules/dag-jose": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/dag-jose/-/dag-jose-1.0.0.tgz", @@ -5222,6 +5242,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/simple-crypto-js": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/simple-crypto-js/-/simple-crypto-js-2.3.1.tgz", + "integrity": "sha512-v1k0/nDQ71Gm/wuOUpMEFCCItQp3cZycauT8n3v1HqIqr8cuxaBuU5dbAsrxRGQ8GqhA1hynbfuFJ5NNqOI8ww==", + "dependencies": { + "crypto-js": "^4.0.0" + } + }, "node_modules/sinon": { "version": "15.0.4", "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.0.4.tgz", @@ -6837,6 +6865,12 @@ "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==" }, + "@types/crypto-js": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-4.1.1.tgz", + "integrity": "sha512-BG7fQKZ689HIoc5h+6D2Dgq1fABRa0RbBWKBd9SP/MVRVXROflpm5fhwyATX5duFmbStzyzyycPB8qUYKDH3NA==", + "dev": true + }, "@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", @@ -7375,6 +7409,16 @@ "which": "^2.0.1" } }, + "crypto-js": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz", + "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" + }, + "cryptr": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/cryptr/-/cryptr-6.2.0.tgz", + "integrity": "sha512-jYi8SxvOFebTT7EYOABiPpHKY6lwWaP9IVcvT/aIVJUVoFdzTgi0ySPCL78q1ig8w2kwfXFCZACXoCXaye57aw==" + }, "dag-jose": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/dag-jose/-/dag-jose-1.0.0.tgz", @@ -9438,6 +9482,14 @@ "object-inspect": "^1.9.0" } }, + "simple-crypto-js": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/simple-crypto-js/-/simple-crypto-js-2.3.1.tgz", + "integrity": "sha512-v1k0/nDQ71Gm/wuOUpMEFCCItQp3cZycauT8n3v1HqIqr8cuxaBuU5dbAsrxRGQ8GqhA1hynbfuFJ5NNqOI8ww==", + "requires": { + "crypto-js": "^4.0.0" + } + }, "sinon": { "version": "15.0.4", "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.0.4.tgz", diff --git a/package.json b/package.json index 2772c2f..c87f9e7 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "prepublishOnly": "npm run build:all" }, "devDependencies": { + "@types/crypto-js": "^4.1.1", "@types/mocha": "^9.0.0", "@typescript-eslint/eslint-plugin": "^5.59.1", "@typescript-eslint/parser": "^5.59.1", @@ -66,10 +67,13 @@ "@tableland/sdk": "^4.1.0", "@types/sinon": "^10.0.14", "add-js-extension": "^1.0.4", + "crypto-js": "^4.1.1", + "cryptr": "^6.2.0", "esbuild": "^0.17.18", "eslint": "^8.39.0", "ipfs-http-client": "^56.0.3", "node-fetch": "^3.3.1", + "simple-crypto-js": "2.3.1", "ts-node": "^10.9.1" }, "contributors": [ diff --git a/src/defaultPinFunction.ts b/src/defaultPinFunction.ts deleted file mode 100644 index c5dc3c9..0000000 --- a/src/defaultPinFunction.ts +++ /dev/null @@ -1,52 +0,0 @@ -import * as IPFS from "ipfs-http-client"; -type FileContent = Uint8Array; -// ipfs.add all supports these: -// May add support later. -// | String -// | Iterable -// | AsyncIterable -// | ReadableStream; - -export async function defaultPin(content: FileContent, _name: string | null = null) { - const ipfs = await IPFS.create(); - - const pinningServices = await ipfs.pin.remote.service.ls(); - - const hasRemotePinningService = pinningServices.length > 0; - - if (!hasRemotePinningService) { - const noPinningService = "No remote pinning service connected."; - throw noPinningService; - } else { - let path = ""; - if (_name) { - path = `/${_name}`; - } - - const res = await ipfs.add( - { content, path }, - { wrapWithDirectory: path !== "" } - ); - const { cid } = res; - await ipfs.pin.remote - .add(cid, { - service: pinningServices[0].service, - name: "Tableland Upload", - }) - .catch((err: any) => { - const message: string = err.message; - if (message.includes("DUPLICATE_OBJECT")) { - console.log( - "Good news; that CID is already pinned to your pinning service." - ); - return; - } - throw err; - }); - - return { - cid: cid.toV1().toString(), - pinned: true - } - } -} diff --git a/src/main.ts b/src/main.ts index 3efad05..42b86b5 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,3 +1,4 @@ -export { prepare } from "./prepare.js"; -export { resolve } from "./resolve.js"; -export { setup } from "./setup.js"; +export { default as createProcess } from "./process.js"; +export { pinToLocal, pinToProvider } from "./process/pinContentToIpfs.js"; +export { default as truncate } from "./process/truncate.js"; +export { default as encrypt } from "./process/encryptExample.js"; diff --git a/src/prepare.ts b/src/prepare.ts deleted file mode 100644 index 0fe49ed..0000000 --- a/src/prepare.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { globalPinFunction } from "./setup.js"; - -function zip(firstArray: string[], secondArray: string[]) { - let str = ""; - for (let i = 0; i < firstArray.length; i++) { - if (secondArray[i]) { - str += firstArray[i] + secondArray[i]; - } else { - str += firstArray[i]; - } - } - - return str; -} - - - -// If you want to save a string to IPFS, simply encode it -// Do this using `new TextEncoder().encode("Your string here")` -async function prepare(strings: TemplateStringsArray, ...values: any[]) { - const strings2 = Array.from(strings); - - const prom = values.map(async (value): Promise => { - let res = value; - switch (true) { - case value instanceof Uint8Array: - res = await globalPinFunction(value, null); - break; - } - return res.cid; - }); - - const processedValues = await Promise.all(prom); - return zip(strings2, processedValues); -} - -export { prepare }; diff --git a/src/process.ts b/src/process.ts new file mode 100644 index 0000000..271f95e --- /dev/null +++ b/src/process.ts @@ -0,0 +1,58 @@ +function zip(firstArray: string[], secondArray: string[]) { + let str = ""; + for (let i = 0; i < firstArray.length; i++) { + if (secondArray[i]) { + str += firstArray[i] + secondArray[i]; + } else { + str += firstArray[i]; + } + } + + return str; +} + +export interface RowObject { + [key: string]: string | number; +} + +export default function createProcess(customProcessor: Function, resolver: Function) { + const prepare = async function prepare(strings: TemplateStringsArray, ...values: any[]) { + const strings2 = Array.from(strings); + + const prom = values.map(async (value): Promise => { + const result = await customProcessor(value); + if(typeof(result) !== 'string') { + throw new Error("Defined process function resulted in content that is not a string."); + } + return result; + }); + + const processedValues = await Promise.all(prom); + return zip(strings2, processedValues); + } + + prepare.resolve = async function resolve(resultSet: [], keysToResolve: string[]) { + + const resultsRequests = resultSet.map(async (row: Record) => { + const resolvedRow: RowObject = {}; + for (const key in row) { + if (keysToResolve.includes(key)) { + const value = row[key]; + resolvedRow[key] = await resolver(value); + } else { + resolvedRow[key] = row[key]; + } + } + return resolvedRow; + }); + + return await Promise.all(resultsRequests); + } + return prepare; +} + + + + + +export { createProcess }; diff --git a/src/process/encryptExample.ts b/src/process/encryptExample.ts new file mode 100644 index 0000000..95b54e0 --- /dev/null +++ b/src/process/encryptExample.ts @@ -0,0 +1,15 @@ +// Example with configuration +import CryptoJS from "crypto-js"; +import createProcess from "../process"; + +export default (secret: string) => { + const encrypt = (value: string) => { + return CryptoJS.AES.encrypt(value, secret).toString();; + } + + const decrypt = (value: string) => { + return CryptoJS.AES.decrypt(value, secret).toString(CryptoJS.enc.Utf8); + } + + return createProcess(encrypt, decrypt) +}; diff --git a/src/process/pinContentToIpfs.ts b/src/process/pinContentToIpfs.ts new file mode 100644 index 0000000..fb45638 --- /dev/null +++ b/src/process/pinContentToIpfs.ts @@ -0,0 +1,70 @@ +import * as IPFS from "ipfs-http-client"; +import createProcess from "../process"; +type FileContent = Uint8Array; + +async function pinToLocalBase(content: FileContent) { + return await pin(content); +} + +async function pinToProviderBase(content: FileContent) { + // TODO: Allow passing in the provider's endpoint + return await pin(content, 'provider'); +} + +async function pin(content: FileContent, where = 'local') { + + + if(typeof content === 'string') return content; + const ipfs = await IPFS.create(); + + const pinningServices = await ipfs.pin.remote.service.ls(); + + const hasRemotePinningService = pinningServices.length > 0; + + if (!hasRemotePinningService) { + const noPinningService = "No remote pinning service connected."; + throw noPinningService; + } else { + const path = ""; + + + const res = await ipfs.add( + { content, path }, + { wrapWithDirectory: path !== "" } + ); + const { cid } = res; + + if(where === 'local') { + await ipfs.pin.add(cid); + } else { + await ipfs.pin + .remote + .add(cid, { + service: pinningServices[0].service, + name: "Tableland Upload", + }) + .catch((err: any) => { + const message: string = err.message; + if (message.includes("DUPLICATE_OBJECT")) { + console.log( + "Good news; that CID is already pinned to your pinning service." + ); + return; + } + throw err; + }); + } + + return cid.toV1().toString(); + + } +} + +async function resolveCid(cid: string) { + const ipfsClient = await IPFS.create(); + const res = await ipfsClient.get(cid); + return res; +} + +export const pinToLocal = createProcess(pinToLocalBase, resolveCid); +export const pinToProvider = createProcess(pinToProviderBase, resolveCid); diff --git a/src/process/truncate.ts b/src/process/truncate.ts new file mode 100644 index 0000000..ecae8f1 --- /dev/null +++ b/src/process/truncate.ts @@ -0,0 +1,15 @@ +import createProcess from "../process"; + +async function truncate(value: string) { + if(typeof(value)!=="string") { + throw new Error("Can't truncate things that aren't strings"); + } + return value.slice(0, 10); +} + +async function detruncate(value: string) { + return value + "..." + "Yo, truncating is lossy, so you can't get the original back."; +} + +export default createProcess(truncate, detruncate); + diff --git a/src/resolve.ts b/src/resolve.ts deleted file mode 100644 index d2e52bb..0000000 --- a/src/resolve.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { globalIpfsClient } from "./setup.js"; - -// New type definitions -interface ResultRow { - [key: string]: string | number; -} - -interface ResultSet { - [index: number]: ResultRow; -} - -interface IPFSResolveResultRow { - [key: string]: string | number | AsyncIterable; -} - -interface IPFSResolveResultSet { - [index: number]: IPFSResolveResultRow; -} - -// Updated function -async function resolve( - resultSet: ResultSet, - columnsToResolve: string[] -): Promise { - const ipfs = await globalIpfsClient; - const resolveColumnNames: Set = new Set(columnsToResolve); - - const resolveSet: IPFSResolveResultSet = {}; - - for (const index in resultSet) { - const row = resultSet[index]; - const resolvingRow: IPFSResolveResultRow = {}; - - for (const key in row) { - if (resolveColumnNames.has(key)) { - resolvingRow[key] = await ipfs.cat(row[key] as any); - } else { - resolvingRow[key] = row[key]; - } - } - - resolveSet[index] = resolvingRow; - } - - return resolveSet; -} -export { resolve }; diff --git a/src/setup.ts b/src/setup.ts deleted file mode 100644 index 2c70a28..0000000 --- a/src/setup.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { defaultPin } from "./defaultPinFunction"; -import * as IPFS from 'ipfs-http-client'; - -interface Pin { - (content: Uint8Array, _name: string | null): Promise<{ - cid: string, - pinned: boolean - }>; -} - -let globalPinFunction: Pin = defaultPin; -let globalIpfsClient = IPFS.create(); - -interface SetupOptions { - pin?: Pin, - ipfsClient: IPFS.IPFSHTTPClient -} - -function setup(options: SetupOptions) { - if(options.ipfsClient) - globalIpfsClient = options.ipfsClient - if(options.pin) - globalPinFunction = options.pin; -} - -export { setup, globalPinFunction, globalIpfsClient }; From 93cf507d70b3957671dc3b50df90eff7cb3c84fa Mon Sep 17 00:00:00 2001 From: Allen Muncy Date: Thu, 11 May 2023 13:24:55 -0400 Subject: [PATCH 06/16] Fix tests --- src/process.ts | 2 +- test/creatProcess.test.ts | 41 +++++++++++++++++++++++++++++++++++++++ test/prepare.test.ts | 37 ----------------------------------- test/resolve.test.ts | 31 ----------------------------- 4 files changed, 42 insertions(+), 69 deletions(-) create mode 100644 test/creatProcess.test.ts delete mode 100644 test/prepare.test.ts delete mode 100644 test/resolve.test.ts diff --git a/src/process.ts b/src/process.ts index 271f95e..50656d6 100644 --- a/src/process.ts +++ b/src/process.ts @@ -31,7 +31,7 @@ export default function createProcess(customProcessor: Function, resolver: Funct return zip(strings2, processedValues); } - prepare.resolve = async function resolve(resultSet: [], keysToResolve: string[]) { + prepare.resolve = async function resolve(resultSet: RowObject[], keysToResolve: string[]) { const resultsRequests = resultSet.map(async (row: Record) => { const resolvedRow: RowObject = {}; diff --git a/test/creatProcess.test.ts b/test/creatProcess.test.ts new file mode 100644 index 0000000..55bbfc8 --- /dev/null +++ b/test/creatProcess.test.ts @@ -0,0 +1,41 @@ +import { describe, test } from "mocha"; +import { assert } from "sinon"; +import { createProcess } from "../src/main"; +import fetch, { Headers, Request, Response } from "node-fetch"; + +if (!globalThis.fetch) { + (globalThis as any).fetch = fetch; + (globalThis as any).Headers = Headers; + (globalThis as any).Request = Request; + (globalThis as any).Response = Response; +} + +describe('prepare', () => { + + + test("Should create process which converts to and resolves base 64 strings", async () => { + + + + const b64 = createProcess((value: string) => {return btoa(value)}, (cell: string | number) => {return atob(cell.toString())}) + + const createdStatement = await b64`INSERT INTO table (message, recipient) VALUES ('${'Hello World'}', '${'John Doe'}');`; + + assert.match(createdStatement, "INSERT INTO table (message, recipient) VALUES ('SGVsbG8gV29ybGQ=', 'Sm9obiBEb2U=');"); + + const resultSet = [ + { column: "SGVsbG8gV29ybGQ=", otherColumn: "SGVsbG8gV29ybGQ=" }, + { column: "Sm9obiBEb2U=", otherColumn: "Sm9obiBEb2U=" } + ]; + + const resultFromResolver = await b64.resolve(resultSet, ["column"]); + + assert.match(resultFromResolver[0].column, "Hello World"); + assert.match(resultFromResolver[0].otherColumn, "SGVsbG8gV29ybGQ="); + assert.match(resultFromResolver[1].column, "John Doe"); + assert.match(resultFromResolver[1].otherColumn, "Sm9obiBEb2U="); + + + }); + +}); diff --git a/test/prepare.test.ts b/test/prepare.test.ts deleted file mode 100644 index cd15b4d..0000000 --- a/test/prepare.test.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { describe, test } from "mocha"; -import { assert } from "sinon"; -import { setup } from "../src/setup"; -import { prepare } from '../src/main'; -import { ipfs } from './mocks'; -import fetch, { Headers, Request, Response } from "node-fetch"; - -if (!globalThis.fetch) { - (globalThis as any).fetch = fetch; - (globalThis as any).Headers = Headers; - (globalThis as any).Request = Request; - (globalThis as any).Response = Response; -} - -describe('prepare', () => { - - before(() => { - setup({ - ipfsClient: ipfs() as any, - pin: async (content) => { - console.log(content) - return { - cid: "ipfs://bafy", - pinned: true - } - } - }); - }); - - test("should prepare the test", async () => { - - const createdStatement = await prepare`INSERT INTO table (column) VALUES ('${Uint8Array.from([0])}');`; - - assert.match(createdStatement, "INSERT INTO table (column) VALUES ('ipfs://bafy');"); - }); - -}); diff --git a/test/resolve.test.ts b/test/resolve.test.ts deleted file mode 100644 index cad2e8f..0000000 --- a/test/resolve.test.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { describe, test } from "mocha"; -import { assert } from "sinon"; -import { setup } from "../src/setup"; -import { resolve } from '../src/main'; -import { ipfs } from './mocks'; -import fetch, { Headers, Request, Response } from "node-fetch"; - -if (!globalThis.fetch) { - (globalThis as any).fetch = fetch; - (globalThis as any).Headers = Headers; - (globalThis as any).Request = Request; - (globalThis as any).Response = Response; -} - -describe('resolve', () => { - - before(() => { - setup({ - ipfsClient:ipfs() as any - }); - }); - - test("Should resolve to value", async () => { - - const resultFromResolver = await resolve([ - { column: "ipfs://bafy" } - ], ["column"]); - - assert.match(resultFromResolver[0].column, Uint8Array.from([0, 1, 5])); - }); -}); From ca565ed9b925bf1638e209c063c7cb61ff03ccdb Mon Sep 17 00:00:00 2001 From: Allen Muncy Date: Thu, 11 May 2023 13:58:21 -0400 Subject: [PATCH 07/16] Test encrypt process --- src/process/encryptExample.ts | 2 +- ...tProcess.test.ts => createProcess.test.ts} | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) rename test/{creatProcess.test.ts => createProcess.test.ts} (64%) diff --git a/src/process/encryptExample.ts b/src/process/encryptExample.ts index 95b54e0..5000dbb 100644 --- a/src/process/encryptExample.ts +++ b/src/process/encryptExample.ts @@ -4,7 +4,7 @@ import createProcess from "../process"; export default (secret: string) => { const encrypt = (value: string) => { - return CryptoJS.AES.encrypt(value, secret).toString();; + return CryptoJS.AES.encrypt(value, secret).toString(); } const decrypt = (value: string) => { diff --git a/test/creatProcess.test.ts b/test/createProcess.test.ts similarity index 64% rename from test/creatProcess.test.ts rename to test/createProcess.test.ts index 55bbfc8..cae0887 100644 --- a/test/creatProcess.test.ts +++ b/test/createProcess.test.ts @@ -1,6 +1,6 @@ import { describe, test } from "mocha"; import { assert } from "sinon"; -import { createProcess } from "../src/main"; +import { createProcess, encrypt } from "../src/main"; import fetch, { Headers, Request, Response } from "node-fetch"; if (!globalThis.fetch) { @@ -34,7 +34,22 @@ describe('prepare', () => { assert.match(resultFromResolver[0].otherColumn, "SGVsbG8gV29ybGQ="); assert.match(resultFromResolver[1].column, "John Doe"); assert.match(resultFromResolver[1].otherColumn, "Sm9obiBEb2U="); - + + }); + + test("Built in encrypt example encrypts and decrypts", async () => { + const encyptor = encrypt("symetric-secret"); + + const createdStatement = await encyptor`INSERT INTO table (message, recipient) VALUES ('${'Hello World'}', '${'John Doe'}');`; + const [world, john] = createdStatement.matchAll(/U2FsdGVkX[0-9a-zA-Z\/+=]+/g); + assert.match(createdStatement, `INSERT INTO table (message, recipient) VALUES ('${world}', '${john}');`); + + const results = await encyptor.resolve([ + { message: world.toString(), recipient: john.toString() } + ], ["message", "recipient"]); + + assert.match(results[0].message, "Hello World"); + assert.match(results[0].recipient, "John Doe"); }); From de8f543a92f437e76ac92f17a27f0b1140aff888 Mon Sep 17 00:00:00 2001 From: Allen Muncy Date: Thu, 11 May 2023 16:24:34 -0400 Subject: [PATCH 08/16] Use parser to validate strings --- package.json | 1 + src/process.ts | 13 ++++++++++++- test/createProcess.test.ts | 8 ++++---- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index c87f9e7..391a311 100644 --- a/package.json +++ b/package.json @@ -65,6 +65,7 @@ }, "dependencies": { "@tableland/sdk": "^4.1.0", + "@tableland/sqlparser": "^1.0.6", "@types/sinon": "^10.0.14", "add-js-extension": "^1.0.4", "crypto-js": "^4.1.1", diff --git a/src/process.ts b/src/process.ts index 50656d6..71ce8b7 100644 --- a/src/process.ts +++ b/src/process.ts @@ -1,3 +1,5 @@ +import { init } from "@tableland/sqlparser"; + function zip(firstArray: string[], secondArray: string[]) { let str = ""; for (let i = 0; i < firstArray.length; i++) { @@ -8,6 +10,8 @@ function zip(firstArray: string[], secondArray: string[]) { } } + + return str; } @@ -16,11 +20,13 @@ export interface RowObject { } export default function createProcess(customProcessor: Function, resolver: Function) { + init(); const prepare = async function prepare(strings: TemplateStringsArray, ...values: any[]) { const strings2 = Array.from(strings); const prom = values.map(async (value): Promise => { const result = await customProcessor(value); + if(typeof(result) !== 'string') { throw new Error("Defined process function resulted in content that is not a string."); } @@ -28,7 +34,12 @@ export default function createProcess(customProcessor: Function, resolver: Funct }); const processedValues = await Promise.all(prom); - return zip(strings2, processedValues); + const statementAfterProcessing = zip(strings2, processedValues); + + // This is only to validate + await global.sqlparser.normalize(statementAfterProcessing); + + return statementAfterProcessing; } prepare.resolve = async function resolve(resultSet: RowObject[], keysToResolve: string[]) { diff --git a/test/createProcess.test.ts b/test/createProcess.test.ts index cae0887..f6932b8 100644 --- a/test/createProcess.test.ts +++ b/test/createProcess.test.ts @@ -19,9 +19,9 @@ describe('prepare', () => { const b64 = createProcess((value: string) => {return btoa(value)}, (cell: string | number) => {return atob(cell.toString())}) - const createdStatement = await b64`INSERT INTO table (message, recipient) VALUES ('${'Hello World'}', '${'John Doe'}');`; + const createdStatement = await b64`INSERT INTO table_1_1 (message, recipient) VALUES ('${'Hello World'}', '${'John Doe'}');`; - assert.match(createdStatement, "INSERT INTO table (message, recipient) VALUES ('SGVsbG8gV29ybGQ=', 'Sm9obiBEb2U=');"); + assert.match(createdStatement, "INSERT INTO table_1_1 (message, recipient) VALUES ('SGVsbG8gV29ybGQ=', 'Sm9obiBEb2U=');"); const resultSet = [ { column: "SGVsbG8gV29ybGQ=", otherColumn: "SGVsbG8gV29ybGQ=" }, @@ -40,9 +40,9 @@ describe('prepare', () => { test("Built in encrypt example encrypts and decrypts", async () => { const encyptor = encrypt("symetric-secret"); - const createdStatement = await encyptor`INSERT INTO table (message, recipient) VALUES ('${'Hello World'}', '${'John Doe'}');`; + const createdStatement = await encyptor`INSERT INTO table_31337_1 (message, recipient) VALUES ('${'Hello World'}', '${'John Doe'}');`; const [world, john] = createdStatement.matchAll(/U2FsdGVkX[0-9a-zA-Z\/+=]+/g); - assert.match(createdStatement, `INSERT INTO table (message, recipient) VALUES ('${world}', '${john}');`); + assert.match(createdStatement, `INSERT INTO table_31337_1 (message, recipient) VALUES ('${world}', '${john}');`); const results = await encyptor.resolve([ { message: world.toString(), recipient: john.toString() } From 8ca5f4d3b800d0dd62029a569cbb17d249060c0f Mon Sep 17 00:00:00 2001 From: Allen Muncy Date: Thu, 11 May 2023 16:42:37 -0400 Subject: [PATCH 09/16] Pin crypto to version --- package-lock.json | 55 ++++++++++++----------------------------------- package.json | 4 +--- 2 files changed, 15 insertions(+), 44 deletions(-) diff --git a/package-lock.json b/package-lock.json index dfe9f66..e92e221 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,15 +10,14 @@ "license": "MIT", "dependencies": { "@tableland/sdk": "^4.1.0", + "@tableland/sqlparser": "^1.0.6", "@types/sinon": "^10.0.14", "add-js-extension": "^1.0.4", - "crypto-js": "^4.1.1", - "cryptr": "^6.2.0", + "crypto-js": "3.1.9-1", "esbuild": "^0.17.18", "eslint": "^8.39.0", "ipfs-http-client": "^56.0.3", "node-fetch": "^3.3.1", - "simple-crypto-js": "2.3.1", "ts-node": "^10.9.1" }, "devDependencies": { @@ -1602,9 +1601,9 @@ } }, "node_modules/@tableland/sqlparser": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@tableland/sqlparser/-/sqlparser-1.0.5.tgz", - "integrity": "sha512-dotXZulYNKdxLNbGkenQGAjuQfuXFRcxUqtt8ffyoNG3n6llUVOnTVXWjcSL0B36kMSVul7XpfKSQkGOa13awg==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@tableland/sqlparser/-/sqlparser-1.0.6.tgz", + "integrity": "sha512-fSoR4hslQqcvkjU0JvRG70fWEVOsbJc8177LqaHC2r2DDC2328Kho/t+aeG5qho4gvSuZckDcKEgeCugD1m5Mg==" }, "node_modules/@tsconfig/node10": { "version": "1.0.9", @@ -2409,14 +2408,9 @@ } }, "node_modules/crypto-js": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz", - "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" - }, - "node_modules/cryptr": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/cryptr/-/cryptr-6.2.0.tgz", - "integrity": "sha512-jYi8SxvOFebTT7EYOABiPpHKY6lwWaP9IVcvT/aIVJUVoFdzTgi0ySPCL78q1ig8w2kwfXFCZACXoCXaye57aw==" + "version": "3.1.9-1", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.9-1.tgz", + "integrity": "sha512-W93aKztssqf29OvUlqfikzGyYbD1rpkXvGP9IQ1JchLY3bxaLXZSWYbwrtib2vk8DobrDzX7PIXcDWHp0B6Ymw==" }, "node_modules/dag-jose": { "version": "1.0.0", @@ -5242,14 +5236,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/simple-crypto-js": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/simple-crypto-js/-/simple-crypto-js-2.3.1.tgz", - "integrity": "sha512-v1k0/nDQ71Gm/wuOUpMEFCCItQp3cZycauT8n3v1HqIqr8cuxaBuU5dbAsrxRGQ8GqhA1hynbfuFJ5NNqOI8ww==", - "dependencies": { - "crypto-js": "^4.0.0" - } - }, "node_modules/sinon": { "version": "15.0.4", "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.0.4.tgz", @@ -6841,9 +6827,9 @@ } }, "@tableland/sqlparser": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@tableland/sqlparser/-/sqlparser-1.0.5.tgz", - "integrity": "sha512-dotXZulYNKdxLNbGkenQGAjuQfuXFRcxUqtt8ffyoNG3n6llUVOnTVXWjcSL0B36kMSVul7XpfKSQkGOa13awg==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@tableland/sqlparser/-/sqlparser-1.0.6.tgz", + "integrity": "sha512-fSoR4hslQqcvkjU0JvRG70fWEVOsbJc8177LqaHC2r2DDC2328Kho/t+aeG5qho4gvSuZckDcKEgeCugD1m5Mg==" }, "@tsconfig/node10": { "version": "1.0.9", @@ -7410,14 +7396,9 @@ } }, "crypto-js": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz", - "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" - }, - "cryptr": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/cryptr/-/cryptr-6.2.0.tgz", - "integrity": "sha512-jYi8SxvOFebTT7EYOABiPpHKY6lwWaP9IVcvT/aIVJUVoFdzTgi0ySPCL78q1ig8w2kwfXFCZACXoCXaye57aw==" + "version": "3.1.9-1", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.9-1.tgz", + "integrity": "sha512-W93aKztssqf29OvUlqfikzGyYbD1rpkXvGP9IQ1JchLY3bxaLXZSWYbwrtib2vk8DobrDzX7PIXcDWHp0B6Ymw==" }, "dag-jose": { "version": "1.0.0", @@ -9482,14 +9463,6 @@ "object-inspect": "^1.9.0" } }, - "simple-crypto-js": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/simple-crypto-js/-/simple-crypto-js-2.3.1.tgz", - "integrity": "sha512-v1k0/nDQ71Gm/wuOUpMEFCCItQp3cZycauT8n3v1HqIqr8cuxaBuU5dbAsrxRGQ8GqhA1hynbfuFJ5NNqOI8ww==", - "requires": { - "crypto-js": "^4.0.0" - } - }, "sinon": { "version": "15.0.4", "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.0.4.tgz", diff --git a/package.json b/package.json index 391a311..44f9a2c 100644 --- a/package.json +++ b/package.json @@ -68,13 +68,11 @@ "@tableland/sqlparser": "^1.0.6", "@types/sinon": "^10.0.14", "add-js-extension": "^1.0.4", - "crypto-js": "^4.1.1", - "cryptr": "^6.2.0", + "crypto-js": "3.1.9-1", "esbuild": "^0.17.18", "eslint": "^8.39.0", "ipfs-http-client": "^56.0.3", "node-fetch": "^3.3.1", - "simple-crypto-js": "2.3.1", "ts-node": "^10.9.1" }, "contributors": [ From eaf68a5a69f11998ead6c8af927d4fc582a63ac6 Mon Sep 17 00:00:00 2001 From: Allen Muncy Date: Thu, 11 May 2023 16:56:32 -0400 Subject: [PATCH 10/16] Remove unneeded escape character --- test/createProcess.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/createProcess.test.ts b/test/createProcess.test.ts index f6932b8..78ab2a5 100644 --- a/test/createProcess.test.ts +++ b/test/createProcess.test.ts @@ -41,7 +41,7 @@ describe('prepare', () => { const encyptor = encrypt("symetric-secret"); const createdStatement = await encyptor`INSERT INTO table_31337_1 (message, recipient) VALUES ('${'Hello World'}', '${'John Doe'}');`; - const [world, john] = createdStatement.matchAll(/U2FsdGVkX[0-9a-zA-Z\/+=]+/g); + const [world, john] = createdStatement.matchAll(/U2FsdGVkX[0-9a-zA-Z/+=]+/g); assert.match(createdStatement, `INSERT INTO table_31337_1 (message, recipient) VALUES ('${world}', '${john}');`); const results = await encyptor.resolve([ From 0d9fa4aafbcdab1664a49b428973ed6dae9c65d7 Mon Sep 17 00:00:00 2001 From: Allen Muncy Date: Thu, 11 May 2023 17:01:53 -0400 Subject: [PATCH 11/16] Remove parser --- src/process.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/process.ts b/src/process.ts index 71ce8b7..98da8c8 100644 --- a/src/process.ts +++ b/src/process.ts @@ -1,5 +1,3 @@ -import { init } from "@tableland/sqlparser"; - function zip(firstArray: string[], secondArray: string[]) { let str = ""; for (let i = 0; i < firstArray.length; i++) { @@ -20,7 +18,6 @@ export interface RowObject { } export default function createProcess(customProcessor: Function, resolver: Function) { - init(); const prepare = async function prepare(strings: TemplateStringsArray, ...values: any[]) { const strings2 = Array.from(strings); @@ -36,9 +33,6 @@ export default function createProcess(customProcessor: Function, resolver: Funct const processedValues = await Promise.all(prom); const statementAfterProcessing = zip(strings2, processedValues); - // This is only to validate - await global.sqlparser.normalize(statementAfterProcessing); - return statementAfterProcessing; } From c1282d5755f1661c8a49e401b1f953fa3439f636 Mon Sep 17 00:00:00 2001 From: Allen Muncy Date: Thu, 11 May 2023 17:58:13 -0400 Subject: [PATCH 12/16] Change export names --- src/main.ts | 4 ++-- src/process.ts | 4 ++-- src/process/pinContentToIpfs.ts | 6 +++--- src/process/{encryptExample.ts => symetricEncrypt.ts} | 4 ++-- src/process/truncate.ts | 4 ++-- test/createProcess.test.ts | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) rename src/process/{encryptExample.ts => symetricEncrypt.ts} (79%) diff --git a/src/main.ts b/src/main.ts index 42b86b5..2e0ea05 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,4 +1,4 @@ -export { default as createProcess } from "./process.js"; +export { default as createProcessor } from "./process.js"; export { pinToLocal, pinToProvider } from "./process/pinContentToIpfs.js"; export { default as truncate } from "./process/truncate.js"; -export { default as encrypt } from "./process/encryptExample.js"; +export { default as symetricEncrypt } from "./process/symetricEncrypt.js"; diff --git a/src/process.ts b/src/process.ts index 98da8c8..ed11074 100644 --- a/src/process.ts +++ b/src/process.ts @@ -17,7 +17,7 @@ export interface RowObject { [key: string]: string | number; } -export default function createProcess(customProcessor: Function, resolver: Function) { +export default function createProcessor(customProcessor: Function, resolver: Function) { const prepare = async function prepare(strings: TemplateStringsArray, ...values: any[]) { const strings2 = Array.from(strings); @@ -60,4 +60,4 @@ export default function createProcess(customProcessor: Function, resolver: Funct -export { createProcess }; +export { createProcessor }; diff --git a/src/process/pinContentToIpfs.ts b/src/process/pinContentToIpfs.ts index fb45638..15e2a2d 100644 --- a/src/process/pinContentToIpfs.ts +++ b/src/process/pinContentToIpfs.ts @@ -1,5 +1,5 @@ import * as IPFS from "ipfs-http-client"; -import createProcess from "../process"; +import createProcessor from "../process"; type FileContent = Uint8Array; async function pinToLocalBase(content: FileContent) { @@ -66,5 +66,5 @@ async function resolveCid(cid: string) { return res; } -export const pinToLocal = createProcess(pinToLocalBase, resolveCid); -export const pinToProvider = createProcess(pinToProviderBase, resolveCid); +export const pinToLocal = createProcessor(pinToLocalBase, resolveCid); +export const pinToProvider = createProcessor(pinToProviderBase, resolveCid); diff --git a/src/process/encryptExample.ts b/src/process/symetricEncrypt.ts similarity index 79% rename from src/process/encryptExample.ts rename to src/process/symetricEncrypt.ts index 5000dbb..d92c4fe 100644 --- a/src/process/encryptExample.ts +++ b/src/process/symetricEncrypt.ts @@ -1,6 +1,6 @@ // Example with configuration import CryptoJS from "crypto-js"; -import createProcess from "../process"; +import createProcessor from "../process"; export default (secret: string) => { const encrypt = (value: string) => { @@ -11,5 +11,5 @@ export default (secret: string) => { return CryptoJS.AES.decrypt(value, secret).toString(CryptoJS.enc.Utf8); } - return createProcess(encrypt, decrypt) + return createProcessor(encrypt, decrypt) }; diff --git a/src/process/truncate.ts b/src/process/truncate.ts index ecae8f1..cec5be9 100644 --- a/src/process/truncate.ts +++ b/src/process/truncate.ts @@ -1,4 +1,4 @@ -import createProcess from "../process"; +import createProcessor from "../process"; async function truncate(value: string) { if(typeof(value)!=="string") { @@ -11,5 +11,5 @@ async function detruncate(value: string) { return value + "..." + "Yo, truncating is lossy, so you can't get the original back."; } -export default createProcess(truncate, detruncate); +export default createProcessor(truncate, detruncate); diff --git a/test/createProcess.test.ts b/test/createProcess.test.ts index 78ab2a5..80de707 100644 --- a/test/createProcess.test.ts +++ b/test/createProcess.test.ts @@ -1,6 +1,6 @@ import { describe, test } from "mocha"; import { assert } from "sinon"; -import { createProcess, encrypt } from "../src/main"; +import { createProcessor, encrypt } from "../src/main"; import fetch, { Headers, Request, Response } from "node-fetch"; if (!globalThis.fetch) { @@ -17,7 +17,7 @@ describe('prepare', () => { - const b64 = createProcess((value: string) => {return btoa(value)}, (cell: string | number) => {return atob(cell.toString())}) + const b64 = createProcessor((value: string) => {return btoa(value)}, (cell: string | number) => {return atob(cell.toString())}) const createdStatement = await b64`INSERT INTO table_1_1 (message, recipient) VALUES ('${'Hello World'}', '${'John Doe'}');`; From f9d900f5705ad302c4f2211764e41eb6e3ad7941 Mon Sep 17 00:00:00 2001 From: Allen Muncy Date: Thu, 11 May 2023 18:03:17 -0400 Subject: [PATCH 13/16] Add prettier --- .github/ISSUE_TEMPLATE.md | 2 -- .mocharc.json | 8 ++--- .prettierignore | 3 ++ .prettierrc.json | 4 +++ .vscode/tasks.json | 6 ++-- README.md | 2 +- package-lock.json | 20 +++++++++++ package.json | 6 +++- src/process.ts | 38 +++++++++++---------- src/process/pinContentToIpfs.ts | 17 ++++------ src/process/symetricEncrypt.ts | 8 ++--- src/process/truncate.ts | 9 +++-- test/createProcess.test.ts | 58 ++++++++++++++++++------------- test/mocks.ts | 60 ++++++++++++++++----------------- tsconfig.cjs.json | 6 ++-- tsconfig.json | 17 +++------- 16 files changed, 144 insertions(+), 120 deletions(-) create mode 100644 .prettierignore create mode 100644 .prettierrc.json diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 70578ff..ea72c1c 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,9 +1,7 @@ ## Expected Behavior - ## Actual Behavior - ## Steps to Reproduce the Problem 1. diff --git a/.mocharc.json b/.mocharc.json index 5ac6028..99a87a8 100644 --- a/.mocharc.json +++ b/.mocharc.json @@ -1,11 +1,7 @@ { - "extensions": [ - "ts" - ], + "extensions": ["ts"], "spec": "test/*.test.ts", - "file": [ - "test/setup.ts" - ], + "file": ["test/setup.ts"], "loader": "ts-node/esm", "node-option": [ "experimental-specifier-resolution=node", diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..0e75fe5 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +node_modules +dist +coverage diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..3329e0c --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,4 @@ +{ + "semi": true, + "trailingComma": "es5" +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 5f0f050..a050c42 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,6 +1,6 @@ { - "version": "2.0.0", - "tasks": [ + "version": "2.0.0", + "tasks": [ { "type": "npm", "script": "build", @@ -24,4 +24,4 @@ "detail": "jest" } ] -} \ No newline at end of file +} diff --git a/README.md b/README.md index c1f5e21..0d02d20 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ async function handleRequest(request: Request): Promise { // 'row' now contains the actual content as an AsyncIterator of a UINT8Array return new Response(JSON.stringify({ rows, columns }), { - headers: { "content-type": "application/json" } + headers: { "content-type": "application/json" }, }); } ``` diff --git a/package-lock.json b/package-lock.json index e92e221..8c926e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "eslint": "^8.39.0", "ipfs-http-client": "^56.0.3", "node-fetch": "^3.3.1", + "prettier": "^2.8.8", "ts-node": "^10.9.1" }, "devDependencies": { @@ -4907,6 +4908,20 @@ "node": ">= 0.8.0" } }, + "node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/protobufjs": { "version": "6.11.3", "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz", @@ -9245,6 +9260,11 @@ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==" }, + "prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==" + }, "protobufjs": { "version": "6.11.3", "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz", diff --git a/package.json b/package.json index 44f9a2c..e0ab312 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,10 @@ "build:dev": "esbuild src/main.ts --bundle --outfile=dist/esbuild/main.js --format=esm --sourcemap=inline", "build:watch": "esbuild src/main.ts --bundle --watch --outfile=dist/esbuild/main.js --format=esm && node ./node_modules/add-js-extension/dist/bin.js ./dist/esm --once", "build:all": "npm run build:esm && npm run build:cjs && npm run build:esbuild && sh ./fixup.sh", - "prepublishOnly": "npm run build:all" + "prepublishOnly": "npm run build:all", + "prettier": "prettier \"**/*.{ts,json,md}\" --check", + "prettier:fix": "npm run prettier -- --write", + "format": "npm run prettier:fix && npm run lint:fix" }, "devDependencies": { "@types/crypto-js": "^4.1.1", @@ -73,6 +76,7 @@ "eslint": "^8.39.0", "ipfs-http-client": "^56.0.3", "node-fetch": "^3.3.1", + "prettier": "^2.8.8", "ts-node": "^10.9.1" }, "contributors": [ diff --git a/src/process.ts b/src/process.ts index ed11074..512df30 100644 --- a/src/process.ts +++ b/src/process.ts @@ -8,8 +8,6 @@ function zip(firstArray: string[], secondArray: string[]) { } } - - return str; } @@ -17,27 +15,37 @@ export interface RowObject { [key: string]: string | number; } -export default function createProcessor(customProcessor: Function, resolver: Function) { - const prepare = async function prepare(strings: TemplateStringsArray, ...values: any[]) { +export default function createProcessor( + customProcessor: Function, + resolver: Function +) { + const prepare = async function prepare( + strings: TemplateStringsArray, + ...values: any[] + ) { const strings2 = Array.from(strings); - + const prom = values.map(async (value): Promise => { const result = await customProcessor(value); - - if(typeof(result) !== 'string') { - throw new Error("Defined process function resulted in content that is not a string."); + + if (typeof result !== "string") { + throw new Error( + "Defined process function resulted in content that is not a string." + ); } return result; }); - + const processedValues = await Promise.all(prom); const statementAfterProcessing = zip(strings2, processedValues); return statementAfterProcessing; - } - - prepare.resolve = async function resolve(resultSet: RowObject[], keysToResolve: string[]) { + }; + prepare.resolve = async function resolve( + resultSet: RowObject[], + keysToResolve: string[] + ) { const resultsRequests = resultSet.map(async (row: Record) => { const resolvedRow: RowObject = {}; for (const key in row) { @@ -52,12 +60,8 @@ export default function createProcessor(customProcessor: Function, resolver: Fun }); return await Promise.all(resultsRequests); - } + }; return prepare; } - - - - export { createProcessor }; diff --git a/src/process/pinContentToIpfs.ts b/src/process/pinContentToIpfs.ts index 15e2a2d..fc21c7f 100644 --- a/src/process/pinContentToIpfs.ts +++ b/src/process/pinContentToIpfs.ts @@ -8,13 +8,11 @@ async function pinToLocalBase(content: FileContent) { async function pinToProviderBase(content: FileContent) { // TODO: Allow passing in the provider's endpoint - return await pin(content, 'provider'); + return await pin(content, "provider"); } -async function pin(content: FileContent, where = 'local') { - - - if(typeof content === 'string') return content; +async function pin(content: FileContent, where = "local") { + if (typeof content === "string") return content; const ipfs = await IPFS.create(); const pinningServices = await ipfs.pin.remote.service.ls(); @@ -27,18 +25,16 @@ async function pin(content: FileContent, where = 'local') { } else { const path = ""; - - const res = await ipfs.add( + const res = await ipfs.add( { content, path }, { wrapWithDirectory: path !== "" } ); const { cid } = res; - if(where === 'local') { + if (where === "local") { await ipfs.pin.add(cid); } else { - await ipfs.pin - .remote + await ipfs.pin.remote .add(cid, { service: pinningServices[0].service, name: "Tableland Upload", @@ -56,7 +52,6 @@ async function pin(content: FileContent, where = 'local') { } return cid.toV1().toString(); - } } diff --git a/src/process/symetricEncrypt.ts b/src/process/symetricEncrypt.ts index d92c4fe..941cd0e 100644 --- a/src/process/symetricEncrypt.ts +++ b/src/process/symetricEncrypt.ts @@ -5,11 +5,11 @@ import createProcessor from "../process"; export default (secret: string) => { const encrypt = (value: string) => { return CryptoJS.AES.encrypt(value, secret).toString(); - } - + }; + const decrypt = (value: string) => { return CryptoJS.AES.decrypt(value, secret).toString(CryptoJS.enc.Utf8); - } + }; - return createProcessor(encrypt, decrypt) + return createProcessor(encrypt, decrypt); }; diff --git a/src/process/truncate.ts b/src/process/truncate.ts index cec5be9..a431737 100644 --- a/src/process/truncate.ts +++ b/src/process/truncate.ts @@ -1,15 +1,18 @@ import createProcessor from "../process"; async function truncate(value: string) { - if(typeof(value)!=="string") { + if (typeof value !== "string") { throw new Error("Can't truncate things that aren't strings"); } return value.slice(0, 10); } async function detruncate(value: string) { - return value + "..." + "Yo, truncating is lossy, so you can't get the original back."; + return ( + value + + "..." + + "Yo, truncating is lossy, so you can't get the original back." + ); } export default createProcessor(truncate, detruncate); - diff --git a/test/createProcess.test.ts b/test/createProcess.test.ts index 80de707..9dd31cd 100644 --- a/test/createProcess.test.ts +++ b/test/createProcess.test.ts @@ -10,22 +10,28 @@ if (!globalThis.fetch) { (globalThis as any).Response = Response; } -describe('prepare', () => { - - +describe("prepare", () => { test("Should create process which converts to and resolves base 64 strings", async () => { - - - - const b64 = createProcessor((value: string) => {return btoa(value)}, (cell: string | number) => {return atob(cell.toString())}) - - const createdStatement = await b64`INSERT INTO table_1_1 (message, recipient) VALUES ('${'Hello World'}', '${'John Doe'}');`; - - assert.match(createdStatement, "INSERT INTO table_1_1 (message, recipient) VALUES ('SGVsbG8gV29ybGQ=', 'Sm9obiBEb2U=');"); - - const resultSet = [ + const b64 = createProcessor( + (value: string) => { + return btoa(value); + }, + (cell: string | number) => { + return atob(cell.toString()); + } + ); + + const createdStatement = + await b64`INSERT INTO table_1_1 (message, recipient) VALUES ('${"Hello World"}', '${"John Doe"}');`; + + assert.match( + createdStatement, + "INSERT INTO table_1_1 (message, recipient) VALUES ('SGVsbG8gV29ybGQ=', 'Sm9obiBEb2U=');" + ); + + const resultSet = [ { column: "SGVsbG8gV29ybGQ=", otherColumn: "SGVsbG8gV29ybGQ=" }, - { column: "Sm9obiBEb2U=", otherColumn: "Sm9obiBEb2U=" } + { column: "Sm9obiBEb2U=", otherColumn: "Sm9obiBEb2U=" }, ]; const resultFromResolver = await b64.resolve(resultSet, ["column"]); @@ -34,23 +40,27 @@ describe('prepare', () => { assert.match(resultFromResolver[0].otherColumn, "SGVsbG8gV29ybGQ="); assert.match(resultFromResolver[1].column, "John Doe"); assert.match(resultFromResolver[1].otherColumn, "Sm9obiBEb2U="); - }); test("Built in encrypt example encrypts and decrypts", async () => { const encyptor = encrypt("symetric-secret"); - const createdStatement = await encyptor`INSERT INTO table_31337_1 (message, recipient) VALUES ('${'Hello World'}', '${'John Doe'}');`; - const [world, john] = createdStatement.matchAll(/U2FsdGVkX[0-9a-zA-Z/+=]+/g); - assert.match(createdStatement, `INSERT INTO table_31337_1 (message, recipient) VALUES ('${world}', '${john}');`); - - const results = await encyptor.resolve([ - { message: world.toString(), recipient: john.toString() } - ], ["message", "recipient"]); + const createdStatement = + await encyptor`INSERT INTO table_31337_1 (message, recipient) VALUES ('${"Hello World"}', '${"John Doe"}');`; + const [world, john] = createdStatement.matchAll( + /U2FsdGVkX[0-9a-zA-Z/+=]+/g + ); + assert.match( + createdStatement, + `INSERT INTO table_31337_1 (message, recipient) VALUES ('${world}', '${john}');` + ); + + const results = await encyptor.resolve( + [{ message: world.toString(), recipient: john.toString() }], + ["message", "recipient"] + ); assert.match(results[0].message, "Hello World"); assert.match(results[0].recipient, "John Doe"); - }); - }); diff --git a/test/mocks.ts b/test/mocks.ts index b2569c8..f8199e5 100644 --- a/test/mocks.ts +++ b/test/mocks.ts @@ -1,33 +1,31 @@ -export const ipfs = () => { return { - add: async () => { - return { - cid: { - toV1: () => { - return { - toString: () => { - return "ipfs://bafy" - } - } - } - }, - } - }, - cat: (arg1: any) => { - if(arg1==="ipfs://bafy") { - return Uint8Array.from([0, 1, 5]); - } - return Uint8Array.from([1]); - - }, - pin: { - remote: { - add: async () => { - - }, - service: { - ls: () => [0] +export const ipfs = () => { + return { + add: async () => { + return { + cid: { + toV1: () => { + return { + toString: () => { + return "ipfs://bafy"; + }, + }; + }, + }, + }; + }, + cat: (arg1: any) => { + if (arg1 === "ipfs://bafy") { + return Uint8Array.from([0, 1, 5]); } - } - } -} + return Uint8Array.from([1]); + }, + pin: { + remote: { + add: async () => {}, + service: { + ls: () => [0], + }, + }, + }, + }; }; diff --git a/tsconfig.cjs.json b/tsconfig.cjs.json index 54b7866..700b8be 100644 --- a/tsconfig.cjs.json +++ b/tsconfig.cjs.json @@ -4,7 +4,5 @@ "outDir": "./dist/cjs/", "module": "commonjs" }, - "exclude": [ - "test/**/**" - ] -} \ No newline at end of file + "exclude": ["test/**/**"] +} diff --git a/tsconfig.json b/tsconfig.json index e3d40cc..922948d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,21 +19,12 @@ "experimentalDecorators": true, "sourceMap": true, "outDir": "./dist/esm/", - "types": [ - "node", - "mocha" - ], - "lib": [ - "ES6", - "DOM", - ] + "types": ["node", "mocha"], + "lib": ["ES6", "DOM"] }, "include": [ - "src/**/*.ts", + "src/**/*.ts" // "test/setupTest.ts" ], - "exclude": [ - "node_modules", - "**/*.test.ts" - ] + "exclude": ["node_modules", "**/*.test.ts"] } From e896bb20d924e40596e34298f844c546c04e664f Mon Sep 17 00:00:00 2001 From: Allen Muncy Date: Thu, 11 May 2023 18:05:46 -0400 Subject: [PATCH 14/16] Add eslint --- package-lock.json | 575 ++++++++++++---------------------------------- package.json | 8 +- 2 files changed, 155 insertions(+), 428 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8c926e4..c05855c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,8 @@ "add-js-extension": "^1.0.4", "crypto-js": "3.1.9-1", "esbuild": "^0.17.18", - "eslint": "^8.39.0", + "eslint": "^8.40.0", + "eslint-plugin-import": "^2.27.5", "ipfs-http-client": "^56.0.3", "node-fetch": "^3.3.1", "prettier": "^2.8.8", @@ -24,8 +25,8 @@ "devDependencies": { "@types/crypto-js": "^4.1.1", "@types/mocha": "^9.0.0", - "@typescript-eslint/eslint-plugin": "^5.59.1", - "@typescript-eslint/parser": "^5.59.1", + "@typescript-eslint/eslint-plugin": "^5.59.5", + "@typescript-eslint/parser": "^5.59.5", "eslint-config-prettier": "^8.8.0", "eslint-config-standard": "^17.0.0", "mocha": "^10.0.0", @@ -626,13 +627,13 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz", - "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", + "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.5.1", + "espree": "^9.5.2", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -662,9 +663,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.39.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.39.0.tgz", - "integrity": "sha512-kf9RB0Fg7NZfap83B3QOqOGg9QmD9yBudqQXzzOtn3i4y7ZUXe5ONeW34Gwi+TxhH4mvj72R1Zc300KUMa9Bng==", + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.40.0.tgz", + "integrity": "sha512-ElyB54bJIhXQYVKjDSvCkPO1iU1tSAeVQJbllWJq1XQSmmA4dgFk8CbiBGpiOPxleE48vDogxCtmMYku4HSVLA==", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } @@ -1641,9 +1642,7 @@ "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", - "dev": true, - "peer": true + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==" }, "node_modules/@types/long": { "version": "4.0.2", @@ -1672,9 +1671,9 @@ "integrity": "sha512-CTO/wa8x+rZU626cL2BlbCDzydgnFNgc19h4YvizpTO88MFQxab8wqisxaofQJ/9bLGugRdWIuX/TbIs6VVF6g==" }, "node_modules/@types/semver": { - "version": "7.3.13", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", - "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", + "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", "dev": true }, "node_modules/@types/sinon": { @@ -1691,15 +1690,15 @@ "integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.59.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.1.tgz", - "integrity": "sha512-AVi0uazY5quFB9hlp2Xv+ogpfpk77xzsgsIEWyVS7uK/c7MZ5tw7ZPbapa0SbfkqE0fsAMkz5UwtgMLVk2BQAg==", + "version": "5.59.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.5.tgz", + "integrity": "sha512-feA9xbVRWJZor+AnLNAr7A8JRWeZqHUf4T9tlP+TN04b05pFVhO5eN7/O93Y/1OUlLMHKbnJisgDURs/qvtqdg==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.59.1", - "@typescript-eslint/type-utils": "5.59.1", - "@typescript-eslint/utils": "5.59.1", + "@typescript-eslint/scope-manager": "5.59.5", + "@typescript-eslint/type-utils": "5.59.5", + "@typescript-eslint/utils": "5.59.5", "debug": "^4.3.4", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", @@ -1725,14 +1724,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.59.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.1.tgz", - "integrity": "sha512-nzjFAN8WEu6yPRDizIFyzAfgK7nybPodMNFGNH0M9tei2gYnYszRDqVA0xlnRjkl7Hkx2vYrEdb6fP2a21cG1g==", + "version": "5.59.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.5.tgz", + "integrity": "sha512-NJXQC4MRnF9N9yWqQE2/KLRSOLvrrlZb48NGVfBa+RuPMN6B7ZcK5jZOvhuygv4D64fRKnZI4L4p8+M+rfeQuw==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.59.1", - "@typescript-eslint/types": "5.59.1", - "@typescript-eslint/typescript-estree": "5.59.1", + "@typescript-eslint/scope-manager": "5.59.5", + "@typescript-eslint/types": "5.59.5", + "@typescript-eslint/typescript-estree": "5.59.5", "debug": "^4.3.4" }, "engines": { @@ -1752,13 +1751,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.59.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.1.tgz", - "integrity": "sha512-mau0waO5frJctPuAzcxiNWqJR5Z8V0190FTSqRw1Q4Euop6+zTwHAf8YIXNwDOT29tyUDrQ65jSg9aTU/H0omA==", + "version": "5.59.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.5.tgz", + "integrity": "sha512-jVecWwnkX6ZgutF+DovbBJirZcAxgxC0EOHYt/niMROf8p4PwxxG32Qdhj/iIQQIuOflLjNkxoXyArkcIP7C3A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.59.1", - "@typescript-eslint/visitor-keys": "5.59.1" + "@typescript-eslint/types": "5.59.5", + "@typescript-eslint/visitor-keys": "5.59.5" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1769,13 +1768,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.59.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.1.tgz", - "integrity": "sha512-ZMWQ+Oh82jWqWzvM3xU+9y5U7MEMVv6GLioM3R5NJk6uvP47kZ7YvlgSHJ7ERD6bOY7Q4uxWm25c76HKEwIjZw==", + "version": "5.59.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.5.tgz", + "integrity": "sha512-4eyhS7oGym67/pSxA2mmNq7X164oqDYNnZCUayBwJZIRVvKpBCMBzFnFxjeoDeShjtO6RQBHBuwybuX3POnDqg==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.59.1", - "@typescript-eslint/utils": "5.59.1", + "@typescript-eslint/typescript-estree": "5.59.5", + "@typescript-eslint/utils": "5.59.5", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -1796,9 +1795,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.59.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.1.tgz", - "integrity": "sha512-dg0ICB+RZwHlysIy/Dh1SP+gnXNzwd/KS0JprD3Lmgmdq+dJAJnUPe1gNG34p0U19HvRlGX733d/KqscrGC1Pg==", + "version": "5.59.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.5.tgz", + "integrity": "sha512-xkfRPHbqSH4Ggx4eHRIO/eGL8XL4Ysb4woL8c87YuAo8Md7AUjyWKa9YMwTL519SyDPrfEgKdewjkxNCVeJW7w==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1809,13 +1808,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.59.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.1.tgz", - "integrity": "sha512-lYLBBOCsFltFy7XVqzX0Ju+Lh3WPIAWxYpmH/Q7ZoqzbscLiCW00LeYCdsUnnfnj29/s1WovXKh2gwCoinHNGA==", + "version": "5.59.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.5.tgz", + "integrity": "sha512-+XXdLN2CZLZcD/mO7mQtJMvCkzRfmODbeSKuMY/yXbGkzvA9rJyDY5qDYNoiz2kP/dmyAxXquL2BvLQLJFPQIg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.59.1", - "@typescript-eslint/visitor-keys": "5.59.1", + "@typescript-eslint/types": "5.59.5", + "@typescript-eslint/visitor-keys": "5.59.5", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1836,17 +1835,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.59.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.1.tgz", - "integrity": "sha512-MkTe7FE+K1/GxZkP5gRj3rCztg45bEhsd8HYjczBuYm+qFHP5vtZmjx3B0yUCDotceQ4sHgTyz60Ycl225njmA==", + "version": "5.59.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.5.tgz", + "integrity": "sha512-sCEHOiw+RbyTii9c3/qN74hYDPNORb8yWCoPLmB7BIflhplJ65u2PBpdRla12e3SSTJ2erRkPjz7ngLHhUegxA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.59.1", - "@typescript-eslint/types": "5.59.1", - "@typescript-eslint/typescript-estree": "5.59.1", + "@typescript-eslint/scope-manager": "5.59.5", + "@typescript-eslint/types": "5.59.5", + "@typescript-eslint/typescript-estree": "5.59.5", "eslint-scope": "^5.1.1", "semver": "^7.3.7" }, @@ -1884,12 +1883,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.59.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.1.tgz", - "integrity": "sha512-6waEYwBTCWryx0VJmP7JaM4FpipLsFl9CvYf2foAE8Qh/Y0s+bxWysciwOs0LTBED4JCaNxTZ5rGadB14M6dwA==", + "version": "5.59.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.5.tgz", + "integrity": "sha512-qL+Oz+dbeBRTeyJTIy0eniD3uvqU7x+y1QceBismZ41hd4aBSRh8UAw4pZP0+XzLuPZmx4raNMq/I+59W2lXKA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.59.1", + "@typescript-eslint/types": "5.59.5", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -2027,8 +2026,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", - "dev": true, - "peer": true, "dependencies": { "call-bind": "^1.0.2", "is-array-buffer": "^3.0.1" @@ -2041,8 +2038,6 @@ "version": "3.1.6", "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", - "dev": true, - "peer": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -2070,8 +2065,6 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", - "dev": true, - "peer": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -2089,8 +2082,6 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", - "dev": true, - "peer": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -2108,8 +2099,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", - "dev": true, - "peer": true, "engines": { "node": ">= 0.4" }, @@ -2240,8 +2229,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "peer": true, "dependencies": { "function-bind": "^1.1.1", "get-intrinsic": "^1.0.2" @@ -2488,8 +2475,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", - "dev": true, - "peer": true, "dependencies": { "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" @@ -2595,8 +2580,6 @@ "version": "1.21.2", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.2.tgz", "integrity": "sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==", - "dev": true, - "peer": true, "dependencies": { "array-buffer-byte-length": "^1.0.0", "available-typed-arrays": "^1.0.5", @@ -2644,8 +2627,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", - "dev": true, - "peer": true, "dependencies": { "get-intrinsic": "^1.1.3", "has": "^1.0.3", @@ -2659,8 +2640,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", - "dev": true, - "peer": true, "dependencies": { "has": "^1.0.3" } @@ -2669,8 +2648,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "peer": true, "dependencies": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", @@ -2739,14 +2716,14 @@ } }, "node_modules/eslint": { - "version": "8.39.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.39.0.tgz", - "integrity": "sha512-mwiok6cy7KTW7rBpo05k6+p4YVZByLNjAZ/ACB9DRCu4YDRwjXI01tWHp6KAUWelsBetTxKK/2sHB0vdS8Z2Og==", + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.40.0.tgz", + "integrity": "sha512-bvR+TsP9EHL3TqNtj9sCNJVAFK3fBN8Q7g5waghxyRsPLIMwL73XSKnZFK0hk/O2ANC+iAoq6PWMQ+IfBAJIiQ==", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.2", - "@eslint/js": "8.39.0", + "@eslint/eslintrc": "^2.0.3", + "@eslint/js": "8.40.0", "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -2757,8 +2734,8 @@ "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.2.0", - "eslint-visitor-keys": "^3.4.0", - "espree": "^9.5.1", + "eslint-visitor-keys": "^3.4.1", + "espree": "^9.5.2", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -2836,8 +2813,6 @@ "version": "0.3.7", "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", - "dev": true, - "peer": true, "dependencies": { "debug": "^3.2.7", "is-core-module": "^2.11.0", @@ -2848,8 +2823,6 @@ "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "peer": true, "dependencies": { "ms": "^2.1.1" } @@ -2858,8 +2831,6 @@ "version": "2.8.0", "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", - "dev": true, - "peer": true, "dependencies": { "debug": "^3.2.7" }, @@ -2876,8 +2847,6 @@ "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "peer": true, "dependencies": { "ms": "^2.1.1" } @@ -2932,8 +2901,6 @@ "version": "2.27.5", "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz", "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==", - "dev": true, - "peer": true, "dependencies": { "array-includes": "^3.1.6", "array.prototype.flat": "^1.3.1", @@ -2962,8 +2929,6 @@ "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "peer": true, "dependencies": { "ms": "^2.1.1" } @@ -2972,8 +2937,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "peer": true, "dependencies": { "esutils": "^2.0.2" }, @@ -2985,8 +2948,6 @@ "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "peer": true, "bin": { "semver": "bin/semver.js" } @@ -3075,9 +3036,9 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", - "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -3111,13 +3072,13 @@ } }, "node_modules/espree": { - "version": "9.5.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", - "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==", + "version": "9.5.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", + "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", "dependencies": { "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.0" + "eslint-visitor-keys": "^3.4.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -3344,8 +3305,6 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, - "peer": true, "dependencies": { "is-callable": "^1.1.3" } @@ -3382,16 +3341,12 @@ "node_modules/function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true, - "peer": true + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, "node_modules/function.prototype.name": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", - "dev": true, - "peer": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.3", @@ -3409,8 +3364,6 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, - "peer": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -3427,8 +3380,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", - "dev": true, - "peer": true, "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", @@ -3447,8 +3398,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "dev": true, - "peer": true, "dependencies": { "call-bind": "^1.0.2", "get-intrinsic": "^1.1.1" @@ -3502,8 +3451,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", - "dev": true, - "peer": true, "dependencies": { "define-properties": "^1.1.3" }, @@ -3538,8 +3485,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, - "peer": true, "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -3556,8 +3501,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "peer": true, "dependencies": { "function-bind": "^1.1.1" }, @@ -3569,8 +3512,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true, - "peer": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -3587,8 +3528,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, - "peer": true, "dependencies": { "get-intrinsic": "^1.1.1" }, @@ -3600,8 +3539,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", - "dev": true, - "peer": true, "engines": { "node": ">= 0.4" }, @@ -3613,8 +3550,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, - "peer": true, "engines": { "node": ">= 0.4" }, @@ -3626,8 +3561,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, - "peer": true, "dependencies": { "has-symbols": "^1.0.2" }, @@ -3760,8 +3693,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", - "dev": true, - "peer": true, "dependencies": { "get-intrinsic": "^1.2.0", "has": "^1.0.3", @@ -3910,8 +3841,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", - "dev": true, - "peer": true, "dependencies": { "call-bind": "^1.0.2", "get-intrinsic": "^1.2.0", @@ -3925,8 +3854,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "peer": true, "dependencies": { "has-bigints": "^1.0.1" }, @@ -3949,8 +3876,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "peer": true, "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -3966,8 +3891,6 @@ "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, - "peer": true, "engines": { "node": ">= 0.4" }, @@ -3979,8 +3902,6 @@ "version": "2.12.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz", "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==", - "dev": true, - "peer": true, "dependencies": { "has": "^1.0.3" }, @@ -3992,8 +3913,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "peer": true, "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -4051,8 +3970,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", - "dev": true, - "peer": true, "engines": { "node": ">= 0.4" }, @@ -4072,8 +3989,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "dev": true, - "peer": true, "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -4104,8 +4019,6 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "peer": true, "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -4121,8 +4034,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", - "dev": true, - "peer": true, "dependencies": { "call-bind": "^1.0.2" }, @@ -4134,8 +4045,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "peer": true, "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -4150,8 +4059,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "peer": true, "dependencies": { "has-symbols": "^1.0.2" }, @@ -4166,8 +4073,6 @@ "version": "1.1.10", "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", - "dev": true, - "peer": true, "dependencies": { "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", @@ -4198,8 +4103,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "dev": true, - "peer": true, "dependencies": { "call-bind": "^1.0.2" }, @@ -4328,8 +4231,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "peer": true, "dependencies": { "minimist": "^1.2.0" }, @@ -4702,8 +4603,6 @@ "version": "1.12.3", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", - "dev": true, - "peer": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -4712,8 +4611,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "peer": true, "engines": { "node": ">= 0.4" } @@ -4722,8 +4619,6 @@ "version": "4.1.4", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", - "dev": true, - "peer": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -4741,8 +4636,6 @@ "version": "1.1.6", "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", - "dev": true, - "peer": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -4867,9 +4760,7 @@ "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true, - "peer": true + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "node_modules/path-to-regexp": { "version": "1.8.0", @@ -5027,8 +4918,6 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", - "dev": true, - "peer": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", @@ -5066,8 +4955,6 @@ "version": "1.22.2", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", - "dev": true, - "peer": true, "dependencies": { "is-core-module": "^2.11.0", "path-parse": "^1.0.7", @@ -5172,8 +5059,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", - "dev": true, - "peer": true, "dependencies": { "call-bind": "^1.0.2", "get-intrinsic": "^1.1.3", @@ -5240,8 +5125,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "peer": true, "dependencies": { "call-bind": "^1.0.0", "get-intrinsic": "^1.0.2", @@ -5337,8 +5220,6 @@ "version": "1.2.7", "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", - "dev": true, - "peer": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -5355,8 +5236,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", - "dev": true, - "peer": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -5370,8 +5249,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", - "dev": true, - "peer": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -5396,8 +5273,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "peer": true, "engines": { "node": ">=4" } @@ -5431,8 +5306,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "peer": true, "engines": { "node": ">= 0.4" }, @@ -5539,8 +5412,6 @@ "version": "3.14.2", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", - "dev": true, - "peer": true, "dependencies": { "@types/json5": "^0.0.29", "json5": "^1.0.2", @@ -5603,8 +5474,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", - "dev": true, - "peer": true, "dependencies": { "call-bind": "^1.0.2", "for-each": "^0.3.3", @@ -5638,8 +5507,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", - "dev": true, - "peer": true, "dependencies": { "call-bind": "^1.0.2", "has-bigints": "^1.0.2", @@ -5713,8 +5580,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "peer": true, "dependencies": { "is-bigint": "^1.0.1", "is-boolean-object": "^1.1.0", @@ -5730,8 +5595,6 @@ "version": "1.1.9", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", - "dev": true, - "peer": true, "dependencies": { "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", @@ -6204,13 +6067,13 @@ "integrity": "sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ==" }, "@eslint/eslintrc": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz", - "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", + "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.5.1", + "espree": "^9.5.2", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -6230,9 +6093,9 @@ } }, "@eslint/js": { - "version": "8.39.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.39.0.tgz", - "integrity": "sha512-kf9RB0Fg7NZfap83B3QOqOGg9QmD9yBudqQXzzOtn3i4y7ZUXe5ONeW34Gwi+TxhH4mvj72R1Zc300KUMa9Bng==" + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.40.0.tgz", + "integrity": "sha512-ElyB54bJIhXQYVKjDSvCkPO1iU1tSAeVQJbllWJq1XQSmmA4dgFk8CbiBGpiOPxleE48vDogxCtmMYku4HSVLA==" }, "@ethersproject/abi": { "version": "5.7.0", @@ -6881,9 +6744,7 @@ "@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", - "dev": true, - "peer": true + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==" }, "@types/long": { "version": "4.0.2", @@ -6912,9 +6773,9 @@ "integrity": "sha512-CTO/wa8x+rZU626cL2BlbCDzydgnFNgc19h4YvizpTO88MFQxab8wqisxaofQJ/9bLGugRdWIuX/TbIs6VVF6g==" }, "@types/semver": { - "version": "7.3.13", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", - "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", + "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", "dev": true }, "@types/sinon": { @@ -6931,15 +6792,15 @@ "integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==" }, "@typescript-eslint/eslint-plugin": { - "version": "5.59.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.1.tgz", - "integrity": "sha512-AVi0uazY5quFB9hlp2Xv+ogpfpk77xzsgsIEWyVS7uK/c7MZ5tw7ZPbapa0SbfkqE0fsAMkz5UwtgMLVk2BQAg==", + "version": "5.59.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.5.tgz", + "integrity": "sha512-feA9xbVRWJZor+AnLNAr7A8JRWeZqHUf4T9tlP+TN04b05pFVhO5eN7/O93Y/1OUlLMHKbnJisgDURs/qvtqdg==", "dev": true, "requires": { "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.59.1", - "@typescript-eslint/type-utils": "5.59.1", - "@typescript-eslint/utils": "5.59.1", + "@typescript-eslint/scope-manager": "5.59.5", + "@typescript-eslint/type-utils": "5.59.5", + "@typescript-eslint/utils": "5.59.5", "debug": "^4.3.4", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", @@ -6949,53 +6810,53 @@ } }, "@typescript-eslint/parser": { - "version": "5.59.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.1.tgz", - "integrity": "sha512-nzjFAN8WEu6yPRDizIFyzAfgK7nybPodMNFGNH0M9tei2gYnYszRDqVA0xlnRjkl7Hkx2vYrEdb6fP2a21cG1g==", + "version": "5.59.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.5.tgz", + "integrity": "sha512-NJXQC4MRnF9N9yWqQE2/KLRSOLvrrlZb48NGVfBa+RuPMN6B7ZcK5jZOvhuygv4D64fRKnZI4L4p8+M+rfeQuw==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.59.1", - "@typescript-eslint/types": "5.59.1", - "@typescript-eslint/typescript-estree": "5.59.1", + "@typescript-eslint/scope-manager": "5.59.5", + "@typescript-eslint/types": "5.59.5", + "@typescript-eslint/typescript-estree": "5.59.5", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.59.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.1.tgz", - "integrity": "sha512-mau0waO5frJctPuAzcxiNWqJR5Z8V0190FTSqRw1Q4Euop6+zTwHAf8YIXNwDOT29tyUDrQ65jSg9aTU/H0omA==", + "version": "5.59.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.5.tgz", + "integrity": "sha512-jVecWwnkX6ZgutF+DovbBJirZcAxgxC0EOHYt/niMROf8p4PwxxG32Qdhj/iIQQIuOflLjNkxoXyArkcIP7C3A==", "dev": true, "requires": { - "@typescript-eslint/types": "5.59.1", - "@typescript-eslint/visitor-keys": "5.59.1" + "@typescript-eslint/types": "5.59.5", + "@typescript-eslint/visitor-keys": "5.59.5" } }, "@typescript-eslint/type-utils": { - "version": "5.59.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.1.tgz", - "integrity": "sha512-ZMWQ+Oh82jWqWzvM3xU+9y5U7MEMVv6GLioM3R5NJk6uvP47kZ7YvlgSHJ7ERD6bOY7Q4uxWm25c76HKEwIjZw==", + "version": "5.59.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.5.tgz", + "integrity": "sha512-4eyhS7oGym67/pSxA2mmNq7X164oqDYNnZCUayBwJZIRVvKpBCMBzFnFxjeoDeShjtO6RQBHBuwybuX3POnDqg==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "5.59.1", - "@typescript-eslint/utils": "5.59.1", + "@typescript-eslint/typescript-estree": "5.59.5", + "@typescript-eslint/utils": "5.59.5", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.59.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.1.tgz", - "integrity": "sha512-dg0ICB+RZwHlysIy/Dh1SP+gnXNzwd/KS0JprD3Lmgmdq+dJAJnUPe1gNG34p0U19HvRlGX733d/KqscrGC1Pg==", + "version": "5.59.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.5.tgz", + "integrity": "sha512-xkfRPHbqSH4Ggx4eHRIO/eGL8XL4Ysb4woL8c87YuAo8Md7AUjyWKa9YMwTL519SyDPrfEgKdewjkxNCVeJW7w==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.59.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.1.tgz", - "integrity": "sha512-lYLBBOCsFltFy7XVqzX0Ju+Lh3WPIAWxYpmH/Q7ZoqzbscLiCW00LeYCdsUnnfnj29/s1WovXKh2gwCoinHNGA==", + "version": "5.59.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.5.tgz", + "integrity": "sha512-+XXdLN2CZLZcD/mO7mQtJMvCkzRfmODbeSKuMY/yXbGkzvA9rJyDY5qDYNoiz2kP/dmyAxXquL2BvLQLJFPQIg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.59.1", - "@typescript-eslint/visitor-keys": "5.59.1", + "@typescript-eslint/types": "5.59.5", + "@typescript-eslint/visitor-keys": "5.59.5", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -7004,17 +6865,17 @@ } }, "@typescript-eslint/utils": { - "version": "5.59.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.1.tgz", - "integrity": "sha512-MkTe7FE+K1/GxZkP5gRj3rCztg45bEhsd8HYjczBuYm+qFHP5vtZmjx3B0yUCDotceQ4sHgTyz60Ycl225njmA==", + "version": "5.59.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.5.tgz", + "integrity": "sha512-sCEHOiw+RbyTii9c3/qN74hYDPNORb8yWCoPLmB7BIflhplJ65u2PBpdRla12e3SSTJ2erRkPjz7ngLHhUegxA==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.59.1", - "@typescript-eslint/types": "5.59.1", - "@typescript-eslint/typescript-estree": "5.59.1", + "@typescript-eslint/scope-manager": "5.59.5", + "@typescript-eslint/types": "5.59.5", + "@typescript-eslint/typescript-estree": "5.59.5", "eslint-scope": "^5.1.1", "semver": "^7.3.7" }, @@ -7038,12 +6899,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "5.59.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.1.tgz", - "integrity": "sha512-6waEYwBTCWryx0VJmP7JaM4FpipLsFl9CvYf2foAE8Qh/Y0s+bxWysciwOs0LTBED4JCaNxTZ5rGadB14M6dwA==", + "version": "5.59.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.5.tgz", + "integrity": "sha512-qL+Oz+dbeBRTeyJTIy0eniD3uvqU7x+y1QceBismZ41hd4aBSRh8UAw4pZP0+XzLuPZmx4raNMq/I+59W2lXKA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.59.1", + "@typescript-eslint/types": "5.59.5", "eslint-visitor-keys": "^3.3.0" } }, @@ -7141,8 +7002,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", - "dev": true, - "peer": true, "requires": { "call-bind": "^1.0.2", "is-array-buffer": "^3.0.1" @@ -7152,8 +7011,6 @@ "version": "3.1.6", "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", - "dev": true, - "peer": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -7172,8 +7029,6 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", - "dev": true, - "peer": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -7185,8 +7040,6 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", - "dev": true, - "peer": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -7197,9 +7050,7 @@ "available-typed-arrays": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", - "dev": true, - "peer": true + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==" }, "balanced-match": { "version": "1.0.2", @@ -7290,8 +7141,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "peer": true, "requires": { "function-bind": "^1.1.1", "get-intrinsic": "^1.0.2" @@ -7468,8 +7317,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", - "dev": true, - "peer": true, "requires": { "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" @@ -7559,8 +7406,6 @@ "version": "1.21.2", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.2.tgz", "integrity": "sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==", - "dev": true, - "peer": true, "requires": { "array-buffer-byte-length": "^1.0.0", "available-typed-arrays": "^1.0.5", @@ -7602,8 +7447,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", - "dev": true, - "peer": true, "requires": { "get-intrinsic": "^1.1.3", "has": "^1.0.3", @@ -7614,8 +7457,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", - "dev": true, - "peer": true, "requires": { "has": "^1.0.3" } @@ -7624,8 +7465,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "peer": true, "requires": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", @@ -7672,14 +7511,14 @@ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" }, "eslint": { - "version": "8.39.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.39.0.tgz", - "integrity": "sha512-mwiok6cy7KTW7rBpo05k6+p4YVZByLNjAZ/ACB9DRCu4YDRwjXI01tWHp6KAUWelsBetTxKK/2sHB0vdS8Z2Og==", + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.40.0.tgz", + "integrity": "sha512-bvR+TsP9EHL3TqNtj9sCNJVAFK3fBN8Q7g5waghxyRsPLIMwL73XSKnZFK0hk/O2ANC+iAoq6PWMQ+IfBAJIiQ==", "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.2", - "@eslint/js": "8.39.0", + "@eslint/eslintrc": "^2.0.3", + "@eslint/js": "8.40.0", "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -7690,8 +7529,8 @@ "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.2.0", - "eslint-visitor-keys": "^3.4.0", - "espree": "^9.5.1", + "eslint-visitor-keys": "^3.4.1", + "espree": "^9.5.2", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -7754,8 +7593,6 @@ "version": "0.3.7", "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", - "dev": true, - "peer": true, "requires": { "debug": "^3.2.7", "is-core-module": "^2.11.0", @@ -7766,8 +7603,6 @@ "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "peer": true, "requires": { "ms": "^2.1.1" } @@ -7778,8 +7613,6 @@ "version": "2.8.0", "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", - "dev": true, - "peer": true, "requires": { "debug": "^3.2.7" }, @@ -7788,8 +7621,6 @@ "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "peer": true, "requires": { "ms": "^2.1.1" } @@ -7830,8 +7661,6 @@ "version": "2.27.5", "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz", "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==", - "dev": true, - "peer": true, "requires": { "array-includes": "^3.1.6", "array.prototype.flat": "^1.3.1", @@ -7854,8 +7683,6 @@ "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "peer": true, "requires": { "ms": "^2.1.1" } @@ -7864,8 +7691,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "peer": true, "requires": { "esutils": "^2.0.2" } @@ -7873,9 +7698,7 @@ "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "peer": true + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" } } }, @@ -7933,18 +7756,18 @@ } }, "eslint-visitor-keys": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", - "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==" + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==" }, "espree": { - "version": "9.5.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", - "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==", + "version": "9.5.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", + "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", "requires": { "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.0" + "eslint-visitor-keys": "^3.4.1" } }, "esquery": { @@ -8109,8 +7932,6 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, - "peer": true, "requires": { "is-callable": "^1.1.3" } @@ -8137,16 +7958,12 @@ "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true, - "peer": true + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, "function.prototype.name": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", - "dev": true, - "peer": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.3", @@ -8157,9 +7974,7 @@ "functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, - "peer": true + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==" }, "get-caller-file": { "version": "2.0.5", @@ -8170,8 +7985,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", - "dev": true, - "peer": true, "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", @@ -8187,8 +8000,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "dev": true, - "peer": true, "requires": { "call-bind": "^1.0.2", "get-intrinsic": "^1.1.1" @@ -8224,8 +8035,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", - "dev": true, - "peer": true, "requires": { "define-properties": "^1.1.3" } @@ -8248,8 +8057,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, - "peer": true, "requires": { "get-intrinsic": "^1.1.3" } @@ -8263,8 +8070,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "peer": true, "requires": { "function-bind": "^1.1.1" } @@ -8272,9 +8077,7 @@ "has-bigints": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true, - "peer": true + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==" }, "has-flag": { "version": "4.0.0", @@ -8285,8 +8088,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, - "peer": true, "requires": { "get-intrinsic": "^1.1.1" } @@ -8294,23 +8095,17 @@ "has-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", - "dev": true, - "peer": true + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==" }, "has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, - "peer": true + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" }, "has-tostringtag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, - "peer": true, "requires": { "has-symbols": "^1.0.2" } @@ -8405,8 +8200,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", - "dev": true, - "peer": true, "requires": { "get-intrinsic": "^1.2.0", "has": "^1.0.3", @@ -8528,8 +8321,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", - "dev": true, - "peer": true, "requires": { "call-bind": "^1.0.2", "get-intrinsic": "^1.2.0", @@ -8540,8 +8331,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "peer": true, "requires": { "has-bigints": "^1.0.1" } @@ -8558,8 +8347,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "peer": true, "requires": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -8568,16 +8355,12 @@ "is-callable": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, - "peer": true + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==" }, "is-core-module": { "version": "2.12.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz", "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==", - "dev": true, - "peer": true, "requires": { "has": "^1.0.3" } @@ -8586,8 +8369,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "peer": true, "requires": { "has-tostringtag": "^1.0.0" } @@ -8626,9 +8407,7 @@ "is-negative-zero": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", - "dev": true, - "peer": true + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==" }, "is-number": { "version": "7.0.0", @@ -8639,8 +8418,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "dev": true, - "peer": true, "requires": { "has-tostringtag": "^1.0.0" } @@ -8659,8 +8436,6 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "peer": true, "requires": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -8670,8 +8445,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", - "dev": true, - "peer": true, "requires": { "call-bind": "^1.0.2" } @@ -8680,8 +8453,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "peer": true, "requires": { "has-tostringtag": "^1.0.0" } @@ -8690,8 +8461,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "peer": true, "requires": { "has-symbols": "^1.0.2" } @@ -8700,8 +8469,6 @@ "version": "1.1.10", "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", - "dev": true, - "peer": true, "requires": { "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", @@ -8720,8 +8487,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "dev": true, - "peer": true, "requires": { "call-bind": "^1.0.2" } @@ -8831,8 +8596,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "peer": true, "requires": { "minimist": "^1.2.0" } @@ -9113,23 +8876,17 @@ "object-inspect": { "version": "1.12.3", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", - "dev": true, - "peer": true + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==" }, "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "peer": true + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" }, "object.assign": { "version": "4.1.4", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", - "dev": true, - "peer": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -9141,8 +8898,6 @@ "version": "1.1.6", "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", - "dev": true, - "peer": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -9231,9 +8986,7 @@ "path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true, - "peer": true + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "path-to-regexp": { "version": "1.8.0", @@ -9342,8 +9095,6 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", - "dev": true, - "peer": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", @@ -9366,8 +9117,6 @@ "version": "1.22.2", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", - "dev": true, - "peer": true, "requires": { "is-core-module": "^2.11.0", "path-parse": "^1.0.7", @@ -9422,8 +9171,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", - "dev": true, - "peer": true, "requires": { "call-bind": "^1.0.2", "get-intrinsic": "^1.1.3", @@ -9475,8 +9222,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "peer": true, "requires": { "call-bind": "^1.0.0", "get-intrinsic": "^1.0.2", @@ -9555,8 +9300,6 @@ "version": "1.2.7", "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", - "dev": true, - "peer": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -9567,8 +9310,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", - "dev": true, - "peer": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -9579,8 +9320,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", - "dev": true, - "peer": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", @@ -9598,9 +9337,7 @@ "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "peer": true + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==" }, "strip-json-comments": { "version": "3.1.1", @@ -9618,9 +9355,7 @@ "supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "peer": true + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" }, "text-table": { "version": "0.2.0", @@ -9689,8 +9424,6 @@ "version": "3.14.2", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", - "dev": true, - "peer": true, "requires": { "@types/json5": "^0.0.29", "json5": "^1.0.2", @@ -9735,8 +9468,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", - "dev": true, - "peer": true, "requires": { "call-bind": "^1.0.2", "for-each": "^0.3.3", @@ -9760,8 +9491,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", - "dev": true, - "peer": true, "requires": { "call-bind": "^1.0.2", "has-bigints": "^1.0.2", @@ -9823,8 +9552,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "peer": true, "requires": { "is-bigint": "^1.0.1", "is-boolean-object": "^1.1.0", @@ -9837,8 +9564,6 @@ "version": "1.1.9", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", - "dev": true, - "peer": true, "requires": { "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", diff --git a/package.json b/package.json index e0ab312..3c88ae7 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ ], "scripts": { "lint": "eslint src/ --ext .js,.jsx,.ts,.tsx", + "lint:fix": "npm run lint -- --fix", "test": "mocha", "clean": "rm -rf dist build package", "ts-node": "ts-node", @@ -58,8 +59,8 @@ "devDependencies": { "@types/crypto-js": "^4.1.1", "@types/mocha": "^9.0.0", - "@typescript-eslint/eslint-plugin": "^5.59.1", - "@typescript-eslint/parser": "^5.59.1", + "@typescript-eslint/eslint-plugin": "^5.59.5", + "@typescript-eslint/parser": "^5.59.5", "eslint-config-prettier": "^8.8.0", "eslint-config-standard": "^17.0.0", "mocha": "^10.0.0", @@ -73,7 +74,8 @@ "add-js-extension": "^1.0.4", "crypto-js": "3.1.9-1", "esbuild": "^0.17.18", - "eslint": "^8.39.0", + "eslint": "^8.40.0", + "eslint-plugin-import": "^2.27.5", "ipfs-http-client": "^56.0.3", "node-fetch": "^3.3.1", "prettier": "^2.8.8", From fd94fecc1f5b9f0f6eb756da5d654c69ad9e35ee Mon Sep 17 00:00:00 2001 From: Allen Muncy Date: Thu, 11 May 2023 18:08:08 -0400 Subject: [PATCH 15/16] Update tests with new method name --- test/createProcess.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/createProcess.test.ts b/test/createProcess.test.ts index 9dd31cd..1f36fb4 100644 --- a/test/createProcess.test.ts +++ b/test/createProcess.test.ts @@ -1,6 +1,6 @@ import { describe, test } from "mocha"; import { assert } from "sinon"; -import { createProcessor, encrypt } from "../src/main"; +import { createProcessor, symetricEncrypt } from "../src/main"; import fetch, { Headers, Request, Response } from "node-fetch"; if (!globalThis.fetch) { @@ -43,7 +43,7 @@ describe("prepare", () => { }); test("Built in encrypt example encrypts and decrypts", async () => { - const encyptor = encrypt("symetric-secret"); + const encyptor = symetricEncrypt("symetric-secret"); const createdStatement = await encyptor`INSERT INTO table_31337_1 (message, recipient) VALUES ('${"Hello World"}', '${"John Doe"}');`; From 43d35a3ba9ed04fd39a12dfff924f1aded13d9ea Mon Sep 17 00:00:00 2001 From: Joe Wagner Date: Tue, 16 May 2023 10:17:47 -0600 Subject: [PATCH 16/16] Update workflows to match org standards --- .github/workflows/combine-prs.yml | 136 +++++++++++++ .../{deploy-gh-pages.yml => docs.yml} | 22 ++- .github/workflows/lint-and-test.yml | 30 --- .github/workflows/review.yml | 40 ++++ .github/workflows/test.yml | 43 +++++ package-lock.json | 178 +++++++++--------- package.json | 10 +- 7 files changed, 329 insertions(+), 130 deletions(-) create mode 100644 .github/workflows/combine-prs.yml rename .github/workflows/{deploy-gh-pages.yml => docs.yml} (75%) delete mode 100644 .github/workflows/lint-and-test.yml create mode 100644 .github/workflows/review.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/combine-prs.yml b/.github/workflows/combine-prs.yml new file mode 100644 index 0000000..ef950f9 --- /dev/null +++ b/.github/workflows/combine-prs.yml @@ -0,0 +1,136 @@ +name: "Combine PRs" + +# Controls when the action will run - in this case triggered manually +on: + workflow_dispatch: + inputs: + branchPrefix: + description: "Branch prefix to find combinable PRs based on" + required: true + default: "dependabot" + mustBeGreen: + description: "Only combine PRs that are green (status is success)" + required: true + default: "true" + combineBranchName: + description: "Name of the branch to combine PRs into" + required: true + default: "combine-prs-branch" + ignoreLabel: + description: "Exclude PRs with this label" + required: true + default: "nocombine" + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "combine-prs" + combine-prs: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - uses: actions/github-script@v6 + id: create-combined-pr + name: Create Combined PR + with: + github-token: ${{secrets.TEXTILEIO_MACHINE_ACCESS_TOKEN}} + script: | + const pulls = await github.paginate('GET /repos/:owner/:repo/pulls', { + owner: context.repo.owner, + repo: context.repo.repo + }); + let branchesAndPRStrings = []; + let baseBranch = null; + let baseBranchSHA = null; + for (const pull of pulls) { + const branch = pull['head']['ref']; + console.log('Pull for branch: ' + branch); + if (branch.startsWith('${{ github.event.inputs.branchPrefix }}')) { + console.log('Branch matched prefix: ' + branch); + let statusOK = true; + if(${{ github.event.inputs.mustBeGreen }}) { + console.log('Checking green status: ' + branch); + + const checkRuns = await github.request('GET /repos/{owner}/{repo}/commits/{ref}/check-runs', { + owner: context.repo.owner, + repo: context.repo.repo, + ref: branch + }); + for await (const cr of checkRuns.data.check_runs) { + console.log('Validating check conclusion: ' + cr.conclusion); + if(cr.conclusion != 'success') { + console.log('Discarding ' + branch + ' with check conclusion ' + cr.conclusion); + statusOK = false; + } + } + } + console.log('Checking labels: ' + branch); + const labels = pull['labels']; + for(const label of labels) { + const labelName = label['name']; + console.log('Checking label: ' + labelName); + if(labelName == '${{ github.event.inputs.ignoreLabel }}') { + console.log('Discarding ' + branch + ' with label ' + labelName); + statusOK = false; + } + } + if (statusOK) { + console.log('Adding branch to array: ' + branch); + const prString = '#' + pull['number'] + ' ' + pull['title']; + branchesAndPRStrings.push({ branch, prString }); + baseBranch = pull['base']['ref']; + baseBranchSHA = pull['base']['sha']; + } + } + } + if (branchesAndPRStrings.length == 0) { + core.setFailed('No PRs/branches matched criteria'); + return; + } + try { + await github.rest.git.createRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: 'refs/heads/' + '${{ github.event.inputs.combineBranchName }}', + sha: baseBranchSHA + }); + } catch (error) { + console.log(error); + core.setFailed('Failed to create combined branch - maybe a branch by that name already exists?'); + return; + } + + let combinedPRs = []; + let mergeFailedPRs = []; + for(const { branch, prString } of branchesAndPRStrings) { + try { + await github.rest.repos.merge({ + owner: context.repo.owner, + repo: context.repo.repo, + base: '${{ github.event.inputs.combineBranchName }}', + head: branch, + }); + console.log('Merged branch ' + branch); + combinedPRs.push(prString); + } catch (error) { + console.log('Failed to merge branch ' + branch); + mergeFailedPRs.push(prString); + } + } + + console.log('Creating combined PR'); + const combinedPRsString = combinedPRs.join('\n'); + let body = 'โœ… This PR was created by the Combine PRs action by combining the following PRs:\n' + combinedPRsString; + if(mergeFailedPRs.length > 0) { + const mergeFailedPRsString = mergeFailedPRs.join('\n'); + body += '\n\nโš ๏ธ The following PRs were left out due to merge conflicts:\n' + mergeFailedPRsString + } + await github.rest.pulls.create({ + owner: context.repo.owner, + repo: context.repo.repo, + title: 'Combined PR', + head: '${{ github.event.inputs.combineBranchName }}', + base: baseBranch, + body: body + }); diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/docs.yml similarity index 75% rename from .github/workflows/deploy-gh-pages.yml rename to .github/workflows/docs.yml index 53bd31c..21dfd19 100644 --- a/.github/workflows/deploy-gh-pages.yml +++ b/.github/workflows/docs.yml @@ -3,9 +3,15 @@ on: push: branches: - main + +concurrency: + group: docs-${{github.ref}} + cancel-in-progress: true + jobs: docs: runs-on: ubuntu-latest + steps: - name: Checkout ๐Ÿ›Ž๏ธ uses: actions/checkout@v2.3.1 @@ -22,15 +28,19 @@ jobs: ${{ runner.os }}-build- ${{ runner.os }}- - - name: Setup Node Environment โฌข - uses: actions/setup-node@v2 + - name: Setup โฌข + uses: actions/setup-node@v2-beta with: - node-version: 14 + node-version: 18 + + - name: Install ๐Ÿ”ง + run: npm install + + - name: Build ๐Ÿ›  + run: npm run build - - name: Install and Build ๐Ÿ”ง + - name: Docs ๐Ÿ““ run: | - npm install - npm run build:all npm run docs:html touch docs/.nojekyll diff --git a/.github/workflows/lint-and-test.yml b/.github/workflows/lint-and-test.yml deleted file mode 100644 index efb8442..0000000 --- a/.github/workflows/lint-and-test.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Lint and test - -on: - push: - branches: - - main - - staging - pull_request: - -jobs: - build_and_test: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - nodejs: [16, 18] - - steps: - - uses: actions/checkout@v2 - - # https://github.com/actions/setup-node - - uses: actions/setup-node@v2-beta - with: - node-version: ${{ matrix.nodejs }} - - - run: npm install - - run: npm run build:esm - - run: npm test - - run: npm run lint - - run: npm run build:all diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml new file mode 100644 index 0000000..f97f460 --- /dev/null +++ b/.github/workflows/review.yml @@ -0,0 +1,40 @@ +name: Review +on: + push: + branches: + - main + pull_request: + +concurrency: + group: review-${{github.ref}} + cancel-in-progress: true + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout ๐Ÿ›Ž๏ธ + uses: actions/checkout@v2.3.1 + with: + persist-credentials: false + + - name: Cache ๐Ÿ“ฆ + uses: actions/cache@v1 + with: + path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Setup Node Environment โฌข + uses: actions/setup-node@v1 + with: + node-version: 18 + + - name: Install ๐Ÿ”ง + run: npm install + + - name: Lint/Format ๐Ÿ™ˆ + run: npm run prettier && npm run lint diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..1ef278b --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,43 @@ +name: Test +on: + push: + branches: + - main + pull_request: + +concurrency: + group: test-${{github.ref}} + cancel-in-progress: true + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout ๐Ÿ›Ž๏ธ + uses: actions/checkout@v2.3.1 + with: + persist-credentials: false + + - name: Cache ๐Ÿ“ฆ + uses: actions/cache@v1 + with: + path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Setup Node Environment โฌข + uses: actions/setup-node@v1 + with: + node-version: 18 + + - name: Install ๐Ÿ”ง + run: npm install + + - name: Build ๐Ÿ›  + run: npm run build + + - name: Test/Coverage ๐Ÿงช + run: npm test diff --git a/package-lock.json b/package-lock.json index c05855c..10e74a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,9 +24,9 @@ }, "devDependencies": { "@types/crypto-js": "^4.1.1", - "@types/mocha": "^9.0.0", - "@typescript-eslint/eslint-plugin": "^5.59.5", - "@typescript-eslint/parser": "^5.59.5", + "@types/mocha": "^10.0.1", + "@typescript-eslint/eslint-plugin": "^5.59.6", + "@typescript-eslint/parser": "^5.59.6", "eslint-config-prettier": "^8.8.0", "eslint-config-standard": "^17.0.0", "mocha": "^10.0.0", @@ -1660,9 +1660,9 @@ "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==" }, "node_modules/@types/mocha": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", - "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.1.tgz", + "integrity": "sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==", "dev": true }, "node_modules/@types/node": { @@ -1690,15 +1690,15 @@ "integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.59.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.5.tgz", - "integrity": "sha512-feA9xbVRWJZor+AnLNAr7A8JRWeZqHUf4T9tlP+TN04b05pFVhO5eN7/O93Y/1OUlLMHKbnJisgDURs/qvtqdg==", + "version": "5.59.6", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.6.tgz", + "integrity": "sha512-sXtOgJNEuRU5RLwPUb1jxtToZbgvq3M6FPpY4QENxoOggK+UpTxUBpj6tD8+Qh2g46Pi9We87E+eHnUw8YcGsw==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.59.5", - "@typescript-eslint/type-utils": "5.59.5", - "@typescript-eslint/utils": "5.59.5", + "@typescript-eslint/scope-manager": "5.59.6", + "@typescript-eslint/type-utils": "5.59.6", + "@typescript-eslint/utils": "5.59.6", "debug": "^4.3.4", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", @@ -1724,14 +1724,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.59.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.5.tgz", - "integrity": "sha512-NJXQC4MRnF9N9yWqQE2/KLRSOLvrrlZb48NGVfBa+RuPMN6B7ZcK5jZOvhuygv4D64fRKnZI4L4p8+M+rfeQuw==", + "version": "5.59.6", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.6.tgz", + "integrity": "sha512-7pCa6al03Pv1yf/dUg/s1pXz/yGMUBAw5EeWqNTFiSueKvRNonze3hma3lhdsOrQcaOXhbk5gKu2Fludiho9VA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.59.5", - "@typescript-eslint/types": "5.59.5", - "@typescript-eslint/typescript-estree": "5.59.5", + "@typescript-eslint/scope-manager": "5.59.6", + "@typescript-eslint/types": "5.59.6", + "@typescript-eslint/typescript-estree": "5.59.6", "debug": "^4.3.4" }, "engines": { @@ -1751,13 +1751,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.59.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.5.tgz", - "integrity": "sha512-jVecWwnkX6ZgutF+DovbBJirZcAxgxC0EOHYt/niMROf8p4PwxxG32Qdhj/iIQQIuOflLjNkxoXyArkcIP7C3A==", + "version": "5.59.6", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.6.tgz", + "integrity": "sha512-gLbY3Le9Dxcb8KdpF0+SJr6EQ+hFGYFl6tVY8VxLPFDfUZC7BHFw+Vq7bM5lE9DwWPfx4vMWWTLGXgpc0mAYyQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.59.5", - "@typescript-eslint/visitor-keys": "5.59.5" + "@typescript-eslint/types": "5.59.6", + "@typescript-eslint/visitor-keys": "5.59.6" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1768,13 +1768,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.59.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.5.tgz", - "integrity": "sha512-4eyhS7oGym67/pSxA2mmNq7X164oqDYNnZCUayBwJZIRVvKpBCMBzFnFxjeoDeShjtO6RQBHBuwybuX3POnDqg==", + "version": "5.59.6", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.6.tgz", + "integrity": "sha512-A4tms2Mp5yNvLDlySF+kAThV9VTBPCvGf0Rp8nl/eoDX9Okun8byTKoj3fJ52IJitjWOk0fKPNQhXEB++eNozQ==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.59.5", - "@typescript-eslint/utils": "5.59.5", + "@typescript-eslint/typescript-estree": "5.59.6", + "@typescript-eslint/utils": "5.59.6", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -1795,9 +1795,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.59.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.5.tgz", - "integrity": "sha512-xkfRPHbqSH4Ggx4eHRIO/eGL8XL4Ysb4woL8c87YuAo8Md7AUjyWKa9YMwTL519SyDPrfEgKdewjkxNCVeJW7w==", + "version": "5.59.6", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.6.tgz", + "integrity": "sha512-tH5lBXZI7T2MOUgOWFdVNUILsI02shyQvfzG9EJkoONWugCG77NDDa1EeDGw7oJ5IvsTAAGVV8I3Tk2PNu9QfA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1808,13 +1808,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.59.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.5.tgz", - "integrity": "sha512-+XXdLN2CZLZcD/mO7mQtJMvCkzRfmODbeSKuMY/yXbGkzvA9rJyDY5qDYNoiz2kP/dmyAxXquL2BvLQLJFPQIg==", + "version": "5.59.6", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.6.tgz", + "integrity": "sha512-vW6JP3lMAs/Tq4KjdI/RiHaaJSO7IUsbkz17it/Rl9Q+WkQ77EOuOnlbaU8kKfVIOJxMhnRiBG+olE7f3M16DA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.59.5", - "@typescript-eslint/visitor-keys": "5.59.5", + "@typescript-eslint/types": "5.59.6", + "@typescript-eslint/visitor-keys": "5.59.6", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1835,17 +1835,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.59.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.5.tgz", - "integrity": "sha512-sCEHOiw+RbyTii9c3/qN74hYDPNORb8yWCoPLmB7BIflhplJ65u2PBpdRla12e3SSTJ2erRkPjz7ngLHhUegxA==", + "version": "5.59.6", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.6.tgz", + "integrity": "sha512-vzaaD6EXbTS29cVH0JjXBdzMt6VBlv+hE31XktDRMX1j3462wZCJa7VzO2AxXEXcIl8GQqZPcOPuW/Z1tZVogg==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.59.5", - "@typescript-eslint/types": "5.59.5", - "@typescript-eslint/typescript-estree": "5.59.5", + "@typescript-eslint/scope-manager": "5.59.6", + "@typescript-eslint/types": "5.59.6", + "@typescript-eslint/typescript-estree": "5.59.6", "eslint-scope": "^5.1.1", "semver": "^7.3.7" }, @@ -1883,12 +1883,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.59.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.5.tgz", - "integrity": "sha512-qL+Oz+dbeBRTeyJTIy0eniD3uvqU7x+y1QceBismZ41hd4aBSRh8UAw4pZP0+XzLuPZmx4raNMq/I+59W2lXKA==", + "version": "5.59.6", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.6.tgz", + "integrity": "sha512-zEfbFLzB9ETcEJ4HZEEsCR9HHeNku5/Qw1jSS5McYJv5BR+ftYXwFFAH5Al+xkGaZEqowMwl7uoJjQb1YSPF8Q==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.59.5", + "@typescript-eslint/types": "5.59.6", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -6762,9 +6762,9 @@ "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==" }, "@types/mocha": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", - "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.1.tgz", + "integrity": "sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==", "dev": true }, "@types/node": { @@ -6792,15 +6792,15 @@ "integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==" }, "@typescript-eslint/eslint-plugin": { - "version": "5.59.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.5.tgz", - "integrity": "sha512-feA9xbVRWJZor+AnLNAr7A8JRWeZqHUf4T9tlP+TN04b05pFVhO5eN7/O93Y/1OUlLMHKbnJisgDURs/qvtqdg==", + "version": "5.59.6", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.6.tgz", + "integrity": "sha512-sXtOgJNEuRU5RLwPUb1jxtToZbgvq3M6FPpY4QENxoOggK+UpTxUBpj6tD8+Qh2g46Pi9We87E+eHnUw8YcGsw==", "dev": true, "requires": { "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.59.5", - "@typescript-eslint/type-utils": "5.59.5", - "@typescript-eslint/utils": "5.59.5", + "@typescript-eslint/scope-manager": "5.59.6", + "@typescript-eslint/type-utils": "5.59.6", + "@typescript-eslint/utils": "5.59.6", "debug": "^4.3.4", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", @@ -6810,53 +6810,53 @@ } }, "@typescript-eslint/parser": { - "version": "5.59.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.5.tgz", - "integrity": "sha512-NJXQC4MRnF9N9yWqQE2/KLRSOLvrrlZb48NGVfBa+RuPMN6B7ZcK5jZOvhuygv4D64fRKnZI4L4p8+M+rfeQuw==", + "version": "5.59.6", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.6.tgz", + "integrity": "sha512-7pCa6al03Pv1yf/dUg/s1pXz/yGMUBAw5EeWqNTFiSueKvRNonze3hma3lhdsOrQcaOXhbk5gKu2Fludiho9VA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.59.5", - "@typescript-eslint/types": "5.59.5", - "@typescript-eslint/typescript-estree": "5.59.5", + "@typescript-eslint/scope-manager": "5.59.6", + "@typescript-eslint/types": "5.59.6", + "@typescript-eslint/typescript-estree": "5.59.6", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.59.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.5.tgz", - "integrity": "sha512-jVecWwnkX6ZgutF+DovbBJirZcAxgxC0EOHYt/niMROf8p4PwxxG32Qdhj/iIQQIuOflLjNkxoXyArkcIP7C3A==", + "version": "5.59.6", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.6.tgz", + "integrity": "sha512-gLbY3Le9Dxcb8KdpF0+SJr6EQ+hFGYFl6tVY8VxLPFDfUZC7BHFw+Vq7bM5lE9DwWPfx4vMWWTLGXgpc0mAYyQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.59.5", - "@typescript-eslint/visitor-keys": "5.59.5" + "@typescript-eslint/types": "5.59.6", + "@typescript-eslint/visitor-keys": "5.59.6" } }, "@typescript-eslint/type-utils": { - "version": "5.59.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.5.tgz", - "integrity": "sha512-4eyhS7oGym67/pSxA2mmNq7X164oqDYNnZCUayBwJZIRVvKpBCMBzFnFxjeoDeShjtO6RQBHBuwybuX3POnDqg==", + "version": "5.59.6", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.6.tgz", + "integrity": "sha512-A4tms2Mp5yNvLDlySF+kAThV9VTBPCvGf0Rp8nl/eoDX9Okun8byTKoj3fJ52IJitjWOk0fKPNQhXEB++eNozQ==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "5.59.5", - "@typescript-eslint/utils": "5.59.5", + "@typescript-eslint/typescript-estree": "5.59.6", + "@typescript-eslint/utils": "5.59.6", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.59.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.5.tgz", - "integrity": "sha512-xkfRPHbqSH4Ggx4eHRIO/eGL8XL4Ysb4woL8c87YuAo8Md7AUjyWKa9YMwTL519SyDPrfEgKdewjkxNCVeJW7w==", + "version": "5.59.6", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.6.tgz", + "integrity": "sha512-tH5lBXZI7T2MOUgOWFdVNUILsI02shyQvfzG9EJkoONWugCG77NDDa1EeDGw7oJ5IvsTAAGVV8I3Tk2PNu9QfA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.59.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.5.tgz", - "integrity": "sha512-+XXdLN2CZLZcD/mO7mQtJMvCkzRfmODbeSKuMY/yXbGkzvA9rJyDY5qDYNoiz2kP/dmyAxXquL2BvLQLJFPQIg==", + "version": "5.59.6", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.6.tgz", + "integrity": "sha512-vW6JP3lMAs/Tq4KjdI/RiHaaJSO7IUsbkz17it/Rl9Q+WkQ77EOuOnlbaU8kKfVIOJxMhnRiBG+olE7f3M16DA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.59.5", - "@typescript-eslint/visitor-keys": "5.59.5", + "@typescript-eslint/types": "5.59.6", + "@typescript-eslint/visitor-keys": "5.59.6", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -6865,17 +6865,17 @@ } }, "@typescript-eslint/utils": { - "version": "5.59.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.5.tgz", - "integrity": "sha512-sCEHOiw+RbyTii9c3/qN74hYDPNORb8yWCoPLmB7BIflhplJ65u2PBpdRla12e3SSTJ2erRkPjz7ngLHhUegxA==", + "version": "5.59.6", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.6.tgz", + "integrity": "sha512-vzaaD6EXbTS29cVH0JjXBdzMt6VBlv+hE31XktDRMX1j3462wZCJa7VzO2AxXEXcIl8GQqZPcOPuW/Z1tZVogg==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.59.5", - "@typescript-eslint/types": "5.59.5", - "@typescript-eslint/typescript-estree": "5.59.5", + "@typescript-eslint/scope-manager": "5.59.6", + "@typescript-eslint/types": "5.59.6", + "@typescript-eslint/typescript-estree": "5.59.6", "eslint-scope": "^5.1.1", "semver": "^7.3.7" }, @@ -6899,12 +6899,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "5.59.5", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.5.tgz", - "integrity": "sha512-qL+Oz+dbeBRTeyJTIy0eniD3uvqU7x+y1QceBismZ41hd4aBSRh8UAw4pZP0+XzLuPZmx4raNMq/I+59W2lXKA==", + "version": "5.59.6", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.6.tgz", + "integrity": "sha512-zEfbFLzB9ETcEJ4HZEEsCR9HHeNku5/Qw1jSS5McYJv5BR+ftYXwFFAH5Al+xkGaZEqowMwl7uoJjQb1YSPF8Q==", "dev": true, "requires": { - "@typescript-eslint/types": "5.59.5", + "@typescript-eslint/types": "5.59.6", "eslint-visitor-keys": "^3.3.0" } }, diff --git a/package.json b/package.json index 3c88ae7..84aa9bb 100644 --- a/package.json +++ b/package.json @@ -50,17 +50,17 @@ "build:esbuild": "esbuild src/main.ts --bundle --minify --external:node:* --sourcemap=external --outfile=dist/esbuild/main.js --format=esm && node ./node_modules/add-js-extension/dist/bin.js ./dist/esm --once", "build:dev": "esbuild src/main.ts --bundle --outfile=dist/esbuild/main.js --format=esm --sourcemap=inline", "build:watch": "esbuild src/main.ts --bundle --watch --outfile=dist/esbuild/main.js --format=esm && node ./node_modules/add-js-extension/dist/bin.js ./dist/esm --once", - "build:all": "npm run build:esm && npm run build:cjs && npm run build:esbuild && sh ./fixup.sh", - "prepublishOnly": "npm run build:all", + "build": "npm run build:esm && npm run build:cjs && npm run build:esbuild && sh ./fixup.sh", + "prepublishOnly": "npm run build", "prettier": "prettier \"**/*.{ts,json,md}\" --check", "prettier:fix": "npm run prettier -- --write", "format": "npm run prettier:fix && npm run lint:fix" }, "devDependencies": { "@types/crypto-js": "^4.1.1", - "@types/mocha": "^9.0.0", - "@typescript-eslint/eslint-plugin": "^5.59.5", - "@typescript-eslint/parser": "^5.59.5", + "@types/mocha": "^10.0.1", + "@typescript-eslint/eslint-plugin": "^5.59.6", + "@typescript-eslint/parser": "^5.59.6", "eslint-config-prettier": "^8.8.0", "eslint-config-standard": "^17.0.0", "mocha": "^10.0.0",