diff --git a/.changeset/eighty-windows-arrive.md b/.changeset/eighty-windows-arrive.md new file mode 100644 index 000000000..4d774c599 --- /dev/null +++ b/.changeset/eighty-windows-arrive.md @@ -0,0 +1,32 @@ +--- +"@ckb-lumos/common-scripts": minor +"@ckb-lumos/debugger": minor +"@ckb-lumos/e2e-test": minor +"@ckb-lumos/molecule": minor +"@ckb-lumos/bundler": minor +"@ckb-lumos/helpers": minor +"@ckb-lumos/toolkit": minor +"@ckb-lumos/crypto": minor +"@ckb-lumos/codec": minor +"@ckb-lumos/lumos": minor +"@ckb-lumos/base": minor +"@ckb-lumos/bi": minor +"@ckb-lumos/hd": minor +"@ckb-lumos/ckb-indexer": minor +"@ckb-lumos/config-manager": minor +"@ckb-lumos/experiment-tx-assembler": minor +"@ckb-lumos/hd-cache": minor +"@ckb-lumos/light-client": minor +"@ckb-lumos/rpc": minor +"@ckb-lumos/runner": minor +"@ckb-lumos/testkit": minor +"@ckb-lumos/transaction-manager": minor +"@ckb-lumos/utils": minor +--- + +Making it compatible with the ES module specification, if the `moduleResolution` is NOT `node` in your TypeScript project, please update your import path to the following: + +```diff +-import { moduleName } from '@ckb-lumos/pkgName/lib/fileName' ++import { moduleName } from '@ckb-lumos/pkgName[/exportName]' +``` diff --git a/.eslintrc.js b/.eslintrc.js index 8cee14105..48db51034 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -16,11 +16,13 @@ module.exports = { "SharedArrayBuffer": "readonly" }, "extends": [ - "plugin:import/recommended", + "plugin:import/recommended", "plugin:import/typescript" ], "rules": { "no-var": "error", + "import/no-unresolved": "off", + "import/no-useless-path-segments": "error", "@typescript-eslint/no-unused-vars": [ "error", { diff --git a/.gitignore b/.gitignore index ea9040b33..057cd8383 100644 --- a/.gitignore +++ b/.gitignore @@ -117,6 +117,8 @@ packages/experiment-tx-assembler/lib packages/molecule/lib packages/transaction-manager/lib +packages/*/lib.esm + # knex config packages/sql-indexer/knexfile.ts diff --git a/.prettierignore b/.prettierignore index 040d78a37..c88f6097a 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1,2 @@ -**/test_cases.js \ No newline at end of file +**/test_cases.js +devtools/*/bin diff --git a/babel.config.js b/babel.config.js index da7b834a4..ee3f3d801 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,3 +1,6 @@ +const buildCjs = process.env.MODULE === "cjs"; +const buildEsm = process.env.MODULE === "esm"; + const presets = [ [ "@babel/preset-env", @@ -5,9 +8,16 @@ const presets = [ targets: { chrome: "79", }, + ...(buildEsm ? { modules: false } : {}), }, ], "@babel/preset-typescript", ]; -module.exports = { presets }; +const plugins = [ + buildCjs && "@babel/plugin-proposal-export-namespace-from", + buildCjs && "@babel/plugin-transform-modules-commonjs", + require.resolve("babel-plugin-add-import-extension"), +].filter(Boolean); + +module.exports = { presets, plugins: plugins }; diff --git a/commitlint.config.js b/commitlint.config.js index d3e6b8928..c6b2fc87c 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -22,6 +22,7 @@ const scopeEnumValues = [ "utils", "runner", "e2e-test", + "crypto", ]; const Configuration = { extends: ["@commitlint/config-conventional"], diff --git a/devtools/.gitignore b/devtools/.gitignore new file mode 100644 index 000000000..849db4de5 --- /dev/null +++ b/devtools/.gitignore @@ -0,0 +1,2 @@ +lib +stats.json diff --git a/devtools/bundler/README.md b/devtools/bundler/README.md new file mode 100644 index 000000000..1f291b716 --- /dev/null +++ b/devtools/bundler/README.md @@ -0,0 +1,10 @@ +# Bundler + +A Lumos bundler playground to test, check and analyze the bundled code. + +## Usage + +```bash +npm run bundle-stats +npm run bundle-analyze +``` diff --git a/devtools/bundler/package.json b/devtools/bundler/package.json new file mode 100644 index 000000000..a32d94b0d --- /dev/null +++ b/devtools/bundler/package.json @@ -0,0 +1,31 @@ +{ + "name": "bundler", + "description": "An example bundler for lumos for analysis", + "version": "0.21.0-next.0", + "private": true, + "homepage": "https://github.com/ckb-js/lumos#readme", + "bugs": { + "url": "https://github.com/ckb-js/lumos/issues" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ckb-js/lumos.git" + }, + "license": "MIT", + "author": "", + "scripts": { + "bundle-stats": "webpack --profile --json > stats.json", + "bundle-analyze": "webpack-bundle-analyzer stats.json" + }, + "dependencies": { + "@ckb-lumos/lumos": "canary", + "@types/webpack-bundle-analyzer": "^4.6.0", + "buffer": "^5.6.0", + "fork-ts-checker-webpack-plugin": "^6.4.0", + "ts-loader": "^9.4.3", + "unminified-webpack-plugin": "^3.0.0", + "webpack": "^5.64.1", + "webpack-bundle-analyzer": "^4.9.0", + "webpack-cli": "^4.9.1" + } +} diff --git a/devtools/bundler/src/index.ts b/devtools/bundler/src/index.ts new file mode 100644 index 000000000..5d1b89dd7 --- /dev/null +++ b/devtools/bundler/src/index.ts @@ -0,0 +1 @@ +export * from "@ckb-lumos/lumos"; diff --git a/devtools/bundler/tsconfig.json b/devtools/bundler/tsconfig.json new file mode 100644 index 000000000..310cf31e9 --- /dev/null +++ b/devtools/bundler/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "lib", + "rootDir": "src" + }, + "include": ["src"] +} diff --git a/devtools/bundler/webpack.config.js b/devtools/bundler/webpack.config.js new file mode 100644 index 000000000..7c283abea --- /dev/null +++ b/devtools/bundler/webpack.config.js @@ -0,0 +1,39 @@ +const path = require("path"); +const webpack = require("webpack"); +const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin"); + +module.exports = { + mode: "production", + devtool: "source-map", + entry: { output: "./src/index.ts" }, + output: { + path: path.join(__dirname, "lib"), + filename: "lumos.min.js", + library: "lumos", + libraryTarget: "umd", + globalObject: "this", + }, + module: { + rules: [ + { + test: /\.tsx?$/, + loader: "ts-loader", + options: {}, + }, + ], + }, + resolve: { + extensions: [".ts", ".js", ".json"], + fallback: { + // https://www.npmjs.com/package/buffer#usage + buffer: require.resolve("buffer/"), + path: false, + fs: false, + stream: false, + }, + }, + plugins: [ + new ForkTsCheckerWebpackPlugin({ async: false }), + new webpack.ProvidePlugin({ Buffer: ["buffer", "Buffer"] }), + ], +}; diff --git a/devtools/lumos-build/README.md b/devtools/lumos-build/README.md new file mode 100644 index 000000000..9855c616f --- /dev/null +++ b/devtools/lumos-build/README.md @@ -0,0 +1,31 @@ +# lumos-build + +A package for building ESM and CJS output from a source directory. + +## Quick Start + +``` +lumos-build --esm --cjs --types +``` + +Will build ESM, CJS, and Types output from the `src` directory +and place it in the `lib.esm`, `lib`, and `types` directories respectively. + +## Overview + +``` +lumos-build [args] + +Options: + --help Show help [boolean] + --version Show version number [boolean] + --esm Build ESM output [boolean] [default: false] + --cjs Build CJS output [boolean] [default: false] + --types Build Types output [boolean] [default: false] + --esmOutDir Output directory for ESM build [string] [default: "lib.esm"] + --cjsOutDir Output directory for CJS build [string] [default: "lib"] +``` + +## Contribution + +This package only works with Lumos project, and the [`./bin`](./bin) is committed to the repository since the typescript is hard to used as an executable file. diff --git a/devtools/lumos-build/bin/lumos-build.js b/devtools/lumos-build/bin/lumos-build.js new file mode 100755 index 000000000..3f8f473e0 --- /dev/null +++ b/devtools/lumos-build/bin/lumos-build.js @@ -0,0 +1,68 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const node_child_process_1 = require("node:child_process"); +const node_util_1 = require("node:util"); +const promises_1 = require("node:fs/promises"); +const node_path_1 = require("node:path"); +const yargs_1 = __importDefault(require("yargs/yargs")); +const execAsync = (0, node_util_1.promisify)(node_child_process_1.exec); +const TYPE_TMP_DIR = "_types_tmp"; +async function buildTypes(dirs) { + await execAsync(`tsc --declaration --emitDeclarationOnly --outDir ${TYPE_TMP_DIR}`); + await Promise.all(dirs.map((dir) => (0, promises_1.cp)(TYPE_TMP_DIR, dir, { recursive: true }))); + await (0, promises_1.rm)(TYPE_TMP_DIR, { recursive: true }); +} +// build ESM output, if a package.esm.json exists, use it as package.json +async function buildEsm(outDir) { + await execAsync(`MODULE=esm babel --root-mode upward src --out-dir ${outDir} --extensions .ts -s`); + const packageJson = await (0, promises_1.access)("package.esm.json").then(() => (0, promises_1.readFile)("package.esm.json"), () => JSON.stringify({ type: "module" })); + // mark package.json as module + await (0, promises_1.writeFile)((0, node_path_1.join)(outDir, "package.json"), packageJson); +} +async function main() { + const argv = await (0, yargs_1.default)(process.argv.slice(2)) + .scriptName("lumos-build") + .usage("$0 [args]") + .option("esm", { + type: "boolean", + default: false, + description: "Build ESM output", + }) + .option("cjs", { + type: "boolean", + default: false, + description: "Build CJS output", + }) + .option("types", { + type: "boolean", + default: false, + description: "Build Types output", + }) + .option("esmOutDir", { + type: "string", + default: "lib.esm", + description: "Output directory for ESM build", + }) + .option("cjsOutDir", { + type: "string", + default: "lib", + description: "Output directory for CJS build", + }).argv; + // "build": "run-p build:*", + // "build:types": "tsc --declaration --emitDeclarationOnly", + // "build:js": "MODULE=cjs babel --root-mode upward src --out-dir lib --extensions .ts -s", + // "build:esm": "MODULE=esm babel --root-mode upward src --out-dir lib.esm --extensions .ts -s", + // prettier-ignore + await Promise.all([ + argv.esm && buildEsm(argv.esmOutDir), + argv.cjs && execAsync(`MODULE=cjs babel --root-mode upward src --out-dir ${argv.cjsOutDir} --extensions .ts -s`), + argv.types && buildTypes([ + argv.esm ? argv.esmOutDir : '', + argv.cjs ? argv.cjsOutDir : '' + ].filter(Boolean)) + ].filter(Boolean)); +} +main(); diff --git a/devtools/lumos-build/package.json b/devtools/lumos-build/package.json new file mode 100644 index 000000000..7a0d204d1 --- /dev/null +++ b/devtools/lumos-build/package.json @@ -0,0 +1,41 @@ +{ + "name": "lumos-build", + "private": true, + "version": "0.21.0-next.0", + "description": "Bigint support in lumos", + "author": "", + "homepage": "https://github.com/ckb-js/lumos#readme", + "license": "MIT", + "bin": { + "lumos-build": "./bin/lumos-build.js" + }, + "dependencies": { + "@types/yargs": "^17.0.24", + "yargs": "^17.7.2" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ckb-js/lumos.git" + }, + "scripts": { + "fmt": "prettier --write \"{src,tests,examples}/**/*.ts\" package.json", + "lint": "eslint -c ../../.eslintrc.js \"{src,tests,examples}/**/*.ts\"", + "build": "tsc", + "clean": "rm -rf lib", + "prepublishOnly": "npm run clean && npm run build" + }, + "bugs": { + "url": "https://github.com/ckb-js/lumos/issues" + }, + "ava": { + "extensions": [ + "ts" + ], + "require": [ + "ts-node/register" + ] + }, + "publishConfig": { + "access": "public" + } +} diff --git a/devtools/lumos-build/src/lumos-build.ts b/devtools/lumos-build/src/lumos-build.ts new file mode 100644 index 000000000..ea8583b79 --- /dev/null +++ b/devtools/lumos-build/src/lumos-build.ts @@ -0,0 +1,82 @@ +import { exec } from "node:child_process"; +import { promisify } from "node:util"; +import { cp, rm, writeFile, access, readFile } from "node:fs/promises"; +import { join } from "node:path"; +import yargs from "yargs/yargs"; + +const execAsync = promisify(exec); + +const TYPE_TMP_DIR = "_types_tmp"; + +async function buildTypes(dirs: string[]) { + await execAsync( + `tsc --declaration --emitDeclarationOnly --outDir ${TYPE_TMP_DIR}` + ); + await Promise.all( + dirs.map((dir) => cp(TYPE_TMP_DIR, dir, { recursive: true })) + ); + await rm(TYPE_TMP_DIR, { recursive: true }); +} + +// build ESM output, if a package.esm.json exists, use it as package.json +async function buildEsm(outDir: string) { + await execAsync( + `MODULE=esm babel --root-mode upward src --out-dir ${outDir} --extensions .ts -s` + ); + + const packageJson = await access("package.esm.json").then( + () => readFile("package.esm.json"), + () => JSON.stringify({ type: "module" }) + ); + + // mark package.json as module + await writeFile(join(outDir, "package.json"), packageJson); +} + +async function main() { + const argv = await yargs(process.argv.slice(2)) + .scriptName("lumos-build") + .usage("$0 [args]") + .option("esm", { + type: "boolean", + default: false, + description: "Build ESM output", + }) + .option("cjs", { + type: "boolean", + default: false, + description: "Build CJS output", + }) + .option("types", { + type: "boolean", + default: false, + description: "Build Types output", + }) + .option("esmOutDir", { + type: "string", + default: "lib.esm", + description: "Output directory for ESM build", + }) + .option("cjsOutDir", { + type: "string", + default: "lib", + description: "Output directory for CJS build", + }).argv; + + // "build": "run-p build:*", + // "build:types": "tsc --declaration --emitDeclarationOnly", + // "build:js": "MODULE=cjs babel --root-mode upward src --out-dir lib --extensions .ts -s", + // "build:esm": "MODULE=esm babel --root-mode upward src --out-dir lib.esm --extensions .ts -s", + + // prettier-ignore + await Promise.all([ + argv.esm && buildEsm(argv.esmOutDir), + argv.cjs && execAsync(`MODULE=cjs babel --root-mode upward src --out-dir ${argv.cjsOutDir} --extensions .ts -s`), + argv.types && buildTypes([ + argv.esm ? argv.esmOutDir : '', + argv.cjs ? argv.cjsOutDir : '' + ].filter(Boolean)) + ].filter(Boolean)); +} + +main(); diff --git a/devtools/lumos-build/tsconfig.json b/devtools/lumos-build/tsconfig.json new file mode 100644 index 000000000..44fce329f --- /dev/null +++ b/devtools/lumos-build/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "bin", + "declaration": false, + "declarationMap": false, + "sourceMap": false + }, + "include": ["src"] +} diff --git a/devtools/playground/README.md b/devtools/playground/README.md new file mode 100644 index 000000000..9c3e92bec --- /dev/null +++ b/devtools/playground/README.md @@ -0,0 +1,7 @@ +# Playground + +This is a playground for testing out new features and ideas. + +```shell +npm test -- --verbose +``` diff --git a/devtools/playground/module.test.mjs b/devtools/playground/module.test.mjs new file mode 100644 index 000000000..fe2b8a6b3 --- /dev/null +++ b/devtools/playground/module.test.mjs @@ -0,0 +1,43 @@ +import { createRequire } from "node:module"; +import test from "ava"; +import { minimatch } from "minimatch"; + +const MODULES = [ + "@ckb-lumos/bi", + "@ckb-lumos/codec", + "@ckb-lumos/codec/bytes", + "@ckb-lumos/codec/number", + "@ckb-lumos/toolkit", + "@ckb-lumos/base", + "@ckb-lumos/base/blockchain", + "@ckb-lumos/base/since", + "@ckb-lumos/base/utils", + "@ckb-lumos/rpc", + "@ckb-lumos/rpc/types/api", + "@ckb-lumos/rpc/types/rpc", +]; + +const require = createRequire(import.meta.url); + +MODULES.forEach((module) => { + test(`Resolve esm&cjs from ${module}`, async (t) => { + const resolvedEsm = await import.meta.resolve(module); + const resolvedCjs = require.resolve(module); + + t.true(minimatch(resolvedEsm, `**/lib.esm/**/*.js`)); + t.true(minimatch(resolvedCjs, `**/lib/**/*.js`)); + + const esm = await import(module); + const cjs = require(module); + + const exportedEsm = Object.keys(esm); + const exportedCjs = Object.keys(cjs); + + t.deepEqual( + exportedEsm.sort((a, b) => a.localeCompare(b)), + exportedCjs.sort((a, b) => a.localeCompare(b)) + ); + + t.true(exportedEsm.length > 0); + }); +}); diff --git a/devtools/playground/package.json b/devtools/playground/package.json new file mode 100644 index 000000000..aa44b393a --- /dev/null +++ b/devtools/playground/package.json @@ -0,0 +1,31 @@ +{ + "name": "lumos-playground", + "version": "0.21.0-next.0", + "private": true, + "homepage": "https://github.com/ckb-js/lumos#readme", + "bugs": { + "url": "https://github.com/ckb-js/lumos/issues" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ckb-js/lumos.git" + }, + "license": "MIT", + "author": "homura.dev (https://github.com/homura)", + "scripts": { + "test": "ava --timeout=2m" + }, + "ava": { + "nodeArguments": [ + "--experimental-import-meta-resolve" + ] + }, + "dependencies": { + "@ckb-lumos/base": "workspace:*", + "@ckb-lumos/bi": "workspace:*", + "@ckb-lumos/codec": "workspace:*", + "@ckb-lumos/rpc": "workspace:*", + "@ckb-lumos/toolkit": "workspace:*", + "minimatch": "^9.0.3" + } +} diff --git a/devtools/playground/tsconfig.json b/devtools/playground/tsconfig.json new file mode 100644 index 000000000..44fce329f --- /dev/null +++ b/devtools/playground/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "bin", + "declaration": false, + "declarationMap": false, + "sourceMap": false + }, + "include": ["src"] +} diff --git a/examples/pnpm-lock.yaml b/examples/pnpm-lock.yaml index 6503420a3..b7b1a81ee 100644 --- a/examples/pnpm-lock.yaml +++ b/examples/pnpm-lock.yaml @@ -50,18 +50,12 @@ importers: '@types/blake2b': specifier: ^2.1.0 version: 2.1.0 - '@types/lodash.isequal': - specifier: ^4.5.5 - version: 4.5.5 blake2b: specifier: ^2.1.3 version: 2.1.3 js-xxhash: specifier: ^1.0.4 version: 1.0.4 - lodash.isequal: - specifier: ^4.5.0 - version: 4.5.0 devDependencies: jsbi: specifier: ^4.1.0 @@ -193,6 +187,24 @@ importers: specifier: ^1.1.1 version: 1.1.1 + ../packages/crypto: + dependencies: + '@noble/hashes': + specifier: 1.3.1 + version: 1.3.1 + '@noble/secp256k1': + specifier: 2.0.0 + version: 2.0.0 + '@types/aes-js': + specifier: ^3.1.1 + version: 3.1.2 + browserify-aes: + specifier: ^1.2.0 + version: 1.2.0 + scrypt-js: + specifier: ^3.0.1 + version: 3.0.1 + ../packages/debugger: dependencies: '@ckb-lumos/base': @@ -338,9 +350,15 @@ importers: '@ckb-lumos/bi': specifier: 0.21.0-next.0 version: link:../bi + '@ckb-lumos/codec': + specifier: 0.21.0-next.0 + version: link:../codec + '@ckb-lumos/crypto': + specifier: 0.21.0-next.0 + version: link:../crypto bn.js: - specifier: ^5.1.3 - version: 5.1.3 + specifier: ^4.11.6 + version: 4.12.0 elliptic: specifier: ^6.5.4 version: 6.5.4 @@ -483,15 +501,9 @@ importers: buffer: specifier: ^6.0.3 version: 6.0.3 - crypto-browserify: - specifier: ^3.12.0 - version: 3.12.0 fork-ts-checker-webpack-plugin: specifier: ^6.4.0 version: 6.4.0(typescript@5.0.4)(webpack@5.64.1) - ts-loader: - specifier: ^9.2.6 - version: 9.2.6(typescript@5.0.4)(webpack@5.64.1) unminified-webpack-plugin: specifier: ^3.0.0 version: 3.0.0(webpack@5.64.1) @@ -551,9 +563,6 @@ importers: '@types/nock': specifier: ^11.1.0 version: 11.1.0 - express: - specifier: ^4.18.1 - version: 4.18.2 jest: specifier: ^28.1.3 version: 28.1.3 @@ -679,13 +688,6 @@ importers: immutable: specifier: ^4.3.0 version: 4.3.0 - devDependencies: - '@types/sinon': - specifier: ^10.0.14 - version: 10.0.14 - sinon: - specifier: ^15.0.4 - version: 15.0.4 ../packages/utils: {} @@ -1749,6 +1751,15 @@ packages: dev: true optional: true + /@noble/hashes@1.3.1: + resolution: {integrity: sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==} + engines: {node: '>= 16'} + dev: false + + /@noble/secp256k1@2.0.0: + resolution: {integrity: sha512-rUGBd95e2a45rlmFTqQJYEFA4/gdIARFfuTuTqLglz0PZ6AKyzyXsEZZq7UZn8hZsvaBgpCzKKBJizT2cJERXw==} + dev: false + /@parcel/bundler-default@2.8.0(@parcel/core@2.9.3): resolution: {integrity: sha512-OvDDhxX4LwfGe7lYVMbJMzqNcDk8ydOqNw0Hra9WPgl0m5gju/eVIbDvot3JXp5F96FmV36uCxdODJhKTNoAzQ==} engines: {node: '>= 12.0.0', parcel: ^2.8.0} @@ -3218,6 +3229,10 @@ packages: engines: {node: '>=10.13.0'} dev: true + /@types/aes-js@3.1.2: + resolution: {integrity: sha512-bKms4q1H3YCcLMKvqE9kUefE1TXc9/QhurzMRVqY9Qevodl0Fxyt6GQcUQ4TkmuWLdGQM1xL+yhSUBTJJRfBFA==} + dev: false + /@types/babel__core@7.20.1: resolution: {integrity: sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw==} dependencies: @@ -3418,12 +3433,6 @@ packages: shell-exec: 1.1.2 dev: false - /@types/lodash.isequal@4.5.5: - resolution: {integrity: sha512-4IKbinG7MGP131wRfceK6W4E/Qt3qssEFLF30LnJbjYiSfHGGRU/Io8YxXrZX109ir+iDETC8hw8QsDijukUVg==} - dependencies: - '@types/lodash': 4.14.195 - dev: false - /@types/lodash.uniqby@4.7.7: resolution: {integrity: sha512-sv2g6vkCIvEUsK5/Vq17haoZaisfj2EWW8mP7QWlnKi6dByoNmeuHDDXHR7sabuDqwO4gvU7ModIL22MmnOocg==} dependencies: @@ -3432,6 +3441,7 @@ packages: /@types/lodash@4.14.195: resolution: {integrity: sha512-Hwx9EUgdwf2GLarOjQp5ZH8ZmblzcbTBC2wtQWNKARBSxM9ezRIAUpeDTgoQRAFB0+8CNWXVA9+MaSOzOF3nPg==} + dev: true /@types/mime@1.3.2: resolution: {integrity: sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==} @@ -3749,6 +3759,7 @@ packages: dependencies: mime-types: 2.1.35 negotiator: 0.6.3 + dev: false /acorn-import-assertions@1.9.0(acorn@8.9.0): resolution: {integrity: sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==} @@ -3844,6 +3855,7 @@ packages: /array-flatten@1.1.1: resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} + dev: false /asn1.js@5.4.1: resolution: {integrity: sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==} @@ -4014,6 +4026,7 @@ packages: /bn.js@5.1.3: resolution: {integrity: sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==} + dev: true /body-parser@1.19.0: resolution: {integrity: sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==} @@ -4051,6 +4064,7 @@ packages: unpipe: 1.0.0 transitivePeerDependencies: - supports-color + dev: false /boolbase@1.0.0: resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} @@ -4081,7 +4095,6 @@ packages: evp_bytestokey: 1.0.3 inherits: 2.0.4 safe-buffer: 5.2.1 - dev: true /browserify-cipher@1.0.1: resolution: {integrity: sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==} @@ -4163,7 +4176,6 @@ packages: /buffer-xor@1.0.3: resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} - dev: true /buffer@5.5.0: resolution: {integrity: sha512-9FTEDjLjwoAkEwyMGDjYJQN2gfRgOKBKRfiglhvibGbpeeU/pQn1bJxQqm32OD/AIeEuHxU9roxXxg34Byp/Ww==} @@ -4197,6 +4209,7 @@ packages: /bytes@3.1.2: resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} engines: {node: '>= 0.8'} + dev: false /cacheable-request@2.1.4: resolution: {integrity: sha512-vag0O2LKZ/najSoUwDbVlnlCFvhBE/7mGTY2B5FgCBDcRD+oVV1HYTOwM6JZfMg/hIcM6IwnTZ1uQQL5/X3xIQ==} @@ -4215,6 +4228,7 @@ packages: dependencies: function-bind: 1.1.1 get-intrinsic: 1.2.1 + dev: false /callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} @@ -4291,7 +4305,6 @@ packages: dependencies: inherits: 2.0.4 safe-buffer: 5.2.1 - dev: true /cjs-module-lexer@1.2.3: resolution: {integrity: sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==} @@ -4391,10 +4404,12 @@ packages: engines: {node: '>= 0.6'} dependencies: safe-buffer: 5.2.1 + dev: false /content-type@1.0.5: resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} engines: {node: '>= 0.6'} + dev: false /convert-source-map@1.9.0: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} @@ -4402,10 +4417,12 @@ packages: /cookie-signature@1.0.6: resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} + dev: false /cookie@0.5.0: resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} engines: {node: '>= 0.6'} + dev: false /copy-to-clipboard@3.3.3: resolution: {integrity: sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==} @@ -4457,7 +4474,6 @@ packages: md5.js: 1.3.5 ripemd160: 2.0.2 sha.js: 2.4.11 - dev: true /create-hmac@1.1.7: resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==} @@ -4558,6 +4574,7 @@ packages: optional: true dependencies: ms: 2.0.0 + dev: false /debug@4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} @@ -4660,6 +4677,7 @@ packages: /depd@2.0.0: resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} engines: {node: '>= 0.8'} + dev: false /des.js@1.1.0: resolution: {integrity: sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==} @@ -4671,6 +4689,7 @@ packages: /destroy@1.2.0: resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + dev: false /detect-libc@1.0.3: resolution: {integrity: sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==} @@ -4786,6 +4805,7 @@ packages: /ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} + dev: false /electron-to-chromium@1.4.446: resolution: {integrity: sha512-4Gnw7ztEQ/E0eOt5JWfPn9jjeupfUlKoeW5ETKP9nLdWj+4spFoS3Stj19fqlKIaX28UQs0fNX+uKEyoLCBnkw==} @@ -4814,6 +4834,7 @@ packages: /encodeurl@1.0.2: resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} engines: {node: '>= 0.8'} + dev: false /end-of-stream@1.4.4: resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} @@ -4872,6 +4893,7 @@ packages: /escape-html@1.0.3: resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} + dev: false /escape-string-regexp@1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} @@ -4921,6 +4943,7 @@ packages: /etag@1.8.1: resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} engines: {node: '>= 0.6'} + dev: false /events@3.3.0: resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} @@ -4931,7 +4954,6 @@ packages: dependencies: md5.js: 1.3.5 safe-buffer: 5.2.1 - dev: true /execa@5.1.1: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} @@ -5012,6 +5034,7 @@ packages: vary: 1.1.2 transitivePeerDependencies: - supports-color + dev: false /ext-list@2.2.2: resolution: {integrity: sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==} @@ -5132,6 +5155,7 @@ packages: unpipe: 1.0.0 transitivePeerDependencies: - supports-color + dev: false /find-process@1.4.7: resolution: {integrity: sha512-/U4CYp1214Xrp3u3Fqr9yNynUrr5Le4y0SsJh2lMDDSbpwYSz3M2SMWQC+wqcx79cN8PQtHQIL8KnuY9M66fdg==} @@ -5227,10 +5251,12 @@ packages: /forwarded@0.2.0: resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} engines: {node: '>= 0.6'} + dev: false /fresh@0.5.2: resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} + dev: false /from2@2.3.0: resolution: {integrity: sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==} @@ -5288,6 +5314,7 @@ packages: has: 1.0.3 has-proto: 1.0.1 has-symbols: 1.0.3 + dev: false /get-package-type@0.1.0: resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} @@ -5422,6 +5449,7 @@ packages: /has-proto@1.0.1: resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} engines: {node: '>= 0.4'} + dev: false /has-symbol-support-x@1.4.2: resolution: {integrity: sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==} @@ -5430,6 +5458,7 @@ packages: /has-symbols@1.0.3: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} + dev: false /has-to-string-tag-x@1.4.1: resolution: {integrity: sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==} @@ -5450,7 +5479,6 @@ packages: inherits: 2.0.4 readable-stream: 3.6.2 safe-buffer: 5.2.1 - dev: true /hash.js@1.1.7: resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} @@ -5542,6 +5570,7 @@ packages: setprototypeof: 1.2.0 statuses: 2.0.1 toidentifier: 1.0.1 + dev: false /http-signature@1.2.0: resolution: {integrity: sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==} @@ -5566,6 +5595,7 @@ packages: engines: {node: '>=0.10.0'} dependencies: safer-buffer: 2.1.2 + dev: false /ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} @@ -5637,6 +5667,7 @@ packages: /ipaddr.js@1.9.1: resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} engines: {node: '>= 0.10'} + dev: false /is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} @@ -6544,10 +6575,6 @@ packages: resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} dev: true - /lodash.isequal@4.5.0: - resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} - dev: false - /lodash.uniqby@4.7.0: resolution: {integrity: sha512-e/zcLx6CSbmaEgFHCA7BnoQKyCtKMxnuWrJygbwPs/AIn+IMKl66L8/s+wBUn5LRw2pZx3bUHibiV1b6aTWIww==} dev: true @@ -6620,7 +6647,6 @@ packages: hash-base: 3.1.0 inherits: 2.0.4 safe-buffer: 5.2.1 - dev: true /mdn-data@2.0.14: resolution: {integrity: sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==} @@ -6628,6 +6654,7 @@ packages: /media-typer@0.3.0: resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} + dev: false /memfs@3.5.3: resolution: {integrity: sha512-UERzLsxzllchadvbPs5aolHh65ISpKpM+ccLbOJ8/vvpBKmAWf+la7dXFy7Mr0ySHbdHrFv5kGFCUHHe6GFEmw==} @@ -6638,6 +6665,7 @@ packages: /merge-descriptors@1.0.1: resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==} + dev: false /merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} @@ -6646,6 +6674,7 @@ packages: /methods@1.1.2: resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==} engines: {node: '>= 0.6'} + dev: false /micromatch@4.0.5: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} @@ -6677,6 +6706,7 @@ packages: resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} engines: {node: '>=4'} hasBin: true + dev: false /mimic-fn@2.1.0: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} @@ -6705,12 +6735,14 @@ packages: /ms@2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} + dev: false /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} /ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + dev: false /msgpackr-extract@3.0.2: resolution: {integrity: sha512-SdzXp4kD/Qf8agZ9+iTu6eql0m3kWm1A2y1hkpTeVNENutaB0BwHlSvAIaMxwntmRUAUjon2V4L8Z/njd0Ct8A==} @@ -6779,6 +6811,7 @@ packages: /negotiator@0.6.3: resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} engines: {node: '>= 0.6'} + dev: false /neo-async@2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} @@ -6905,6 +6938,7 @@ packages: /object-inspect@1.12.3: resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} + dev: false /on-finished@2.3.0: resolution: {integrity: sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==} @@ -6918,6 +6952,7 @@ packages: engines: {node: '>= 0.8'} dependencies: ee-first: 1.1.1 + dev: false /once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} @@ -7053,6 +7088,7 @@ packages: /parseurl@1.3.3: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} + dev: false /path-browserify@1.0.0: resolution: {integrity: sha512-Hkavx/nY4/plImrZPHRk2CL9vpOymZLgEbMNX1U0bjcBL7QN9wODxyx0yaMZURSQaUtSEvDrfAvxa9oPb0at9g==} @@ -7077,6 +7113,7 @@ packages: /path-to-regexp@0.1.7: resolution: {integrity: sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==} + dev: false /path-to-regexp@1.8.0: resolution: {integrity: sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==} @@ -7249,6 +7286,7 @@ packages: dependencies: forwarded: 0.2.0 ipaddr.js: 1.9.1 + dev: false /psl@1.9.0: resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} @@ -7282,6 +7320,7 @@ packages: engines: {node: '>=0.6'} dependencies: side-channel: 1.0.4 + dev: false /qs@6.5.3: resolution: {integrity: sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==} @@ -7330,6 +7369,7 @@ packages: /range-parser@1.2.1: resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} engines: {node: '>= 0.6'} + dev: false /raw-body@2.4.0: resolution: {integrity: sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==} @@ -7349,6 +7389,7 @@ packages: http-errors: 2.0.0 iconv-lite: 0.4.24 unpipe: 1.0.0 + dev: false /react-dom@18.2.0(react@18.2.0): resolution: {integrity: sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==} @@ -7433,7 +7474,6 @@ packages: inherits: 2.0.4 string_decoder: 1.3.0 util-deprecate: 1.0.2 - dev: true /readdirp@3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} @@ -7553,7 +7593,6 @@ packages: dependencies: hash-base: 3.1.0 inherits: 2.0.4 - dev: true /rtl-css-js@1.16.1: resolution: {integrity: sha512-lRQgou1mu19e+Ya0LsTvKrVJ5TYUbqCVPAiImX3UfLTenarvPUl1QFdvu5Z3PYmHT9RCcwIfbjRQBntExyj3Zg==} @@ -7647,6 +7686,7 @@ packages: statuses: 2.0.1 transitivePeerDependencies: - supports-color + dev: false /serialize-javascript@6.0.1: resolution: {integrity: sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==} @@ -7664,6 +7704,7 @@ packages: send: 0.18.0 transitivePeerDependencies: - supports-color + dev: false /set-harmonic-interval@1.0.1: resolution: {integrity: sha512-AhICkFV84tBP1aWqPwLZqFvAwqEoVA9kxNMniGEUvzOlm4vLmOFLiTT3UZ6bziJTy4bOVpzWGTfSCbmaayGx8g==} @@ -7676,6 +7717,7 @@ packages: /setprototypeof@1.2.0: resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} + dev: false /sha.js@2.4.11: resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} @@ -7683,7 +7725,6 @@ packages: dependencies: inherits: 2.0.4 safe-buffer: 5.2.1 - dev: true /sha3@2.1.3: resolution: {integrity: sha512-Io53D4o9qOmf3Ow9p/DoGLQiQHhtuR0ulbyambvRSG+OX5yXExk2yYfvjHtb7AtOyk6K6+sPeK/qaowWc/E/GA==} @@ -7735,6 +7776,7 @@ packages: call-bind: 1.0.2 get-intrinsic: 1.2.1 object-inspect: 1.12.3 + dev: false /signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} @@ -7883,6 +7925,7 @@ packages: /statuses@2.0.1: resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} engines: {node: '>= 0.8'} + dev: false /stream-browserify@3.0.0: resolution: {integrity: sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==} @@ -7923,7 +7966,6 @@ packages: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} dependencies: safe-buffer: 5.2.1 - dev: true /strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} @@ -8141,6 +8183,7 @@ packages: /toidentifier@1.0.1: resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} engines: {node: '>=0.6'} + dev: false /tough-cookie@2.5.0: resolution: {integrity: sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==} @@ -8165,21 +8208,6 @@ packages: resolution: {integrity: sha512-Z86EW+fFFh/IFB1fqQ3/+7Zpf9t2ebOAxNI/V6Wo7r5gqiqtxmgTlQ1qbqQcjLKYeSHPTsEmvlJUDg/EuL0uHQ==} dev: false - /ts-loader@9.2.6(typescript@5.0.4)(webpack@5.64.1): - resolution: {integrity: sha512-QMTC4UFzHmu9wU2VHZEmWWE9cUajjfcdcws+Gh7FhiO+Dy0RnR1bNz0YCHqhI0yRowCE9arVnNxYHqELOy9Hjw==} - engines: {node: '>=12.0.0'} - peerDependencies: - typescript: '*' - webpack: ^5.0.0 - dependencies: - chalk: 4.1.2 - enhanced-resolve: 5.15.0 - micromatch: 4.0.5 - semver: 7.5.3 - typescript: 5.0.4 - webpack: 5.64.1(webpack-cli@4.9.1) - dev: true - /tslib@2.3.1: resolution: {integrity: sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==} dev: false @@ -8219,6 +8247,7 @@ packages: dependencies: media-typer: 0.3.0 mime-types: 2.1.35 + dev: false /typescript@5.0.4: resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} @@ -8250,6 +8279,7 @@ packages: /unpipe@1.0.0: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} engines: {node: '>= 0.8'} + dev: false /update-browserslist-db@1.0.11(browserslist@4.21.9): resolution: {integrity: sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==} @@ -8291,6 +8321,7 @@ packages: /utils-merge@1.0.1: resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} engines: {node: '>= 0.4.0'} + dev: false /uuid@3.4.0: resolution: {integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==} @@ -8315,6 +8346,7 @@ packages: /vary@1.1.2: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} + dev: false /verror@1.10.0: resolution: {integrity: sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==} diff --git a/package.json b/package.json index afe1923bf..7a6f940d5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,8 @@ { "private": true, "workspaces": [ - "packages/*" + "packages/*", + "devtools/*" ], "engines": { "node": ">=12.0.0" @@ -23,6 +24,7 @@ "@typescript-eslint/eslint-plugin": "^5.59.2", "@typescript-eslint/parser": "^5.59.2", "ava": "^3.8.2", + "babel-plugin-add-import-extension": "^1.6.0", "c8": "^7.10.0", "eslint": "^8.40.0", "eslint-import-resolver-typescript": "^2.7.0", @@ -30,6 +32,7 @@ "husky": "^7.0.4", "is-ci": "^3.0.1", "lint-staged": "^12.3.5", + "lumos-build": "0.21.0-next.0", "npm-run-all": "^4.1.5", "prettier": "^2.8.8", "shx": "^0.3.4", @@ -46,7 +49,7 @@ "e2e-indexer": "cd packages/ckb-indexer && pnpm run test:e2e", "integration-test": "cd packages/e2e-test && pnpm run test:e2e", "test-coverage": "npx c8 --reporter=cobertura --reporter=html --clean -o coverage pnpm run test", - "build:types": "pnpm run -r build:types", + "build:types": "pnpm run -r build:all && pnpm run -r build:types", "build:js": "pnpm run -r --parallel build:js ", "build": "run-p build:*", "lint": "run-p lint:* && git diff --exit-code", @@ -68,6 +71,10 @@ "eslint -c .eslintrc.next.js --fix", "git add" ], + "devtoos/lumos-build/src/*.ts": [ + "pnpm --filter lumos-build build", + "git add devtools/lumos-build/bin/*" + ], "website/{docs,src}/**/*.{js,ts,md}": [ "prettier --write", "git add" diff --git a/packages/base/package.json b/packages/base/package.json index 3b72d0299..be86df37b 100644 --- a/packages/base/package.json +++ b/packages/base/package.json @@ -5,8 +5,31 @@ "author": "Xuejie Xiao ", "homepage": "https://github.com/ckb-js/lumos#readme", "license": "MIT", - "main": "lib/index.js", - "types": "lib/index.d.ts", + "main": "./lib/index.js", + "types": "./lib/index.d.ts", + "module": "./lib.esm/index.js", + "exports": { + ".": { + "import": "./lib.esm/index.js", + "require": "./lib/index.js", + "types": "./lib/index.d.ts" + }, + "./blockchain": { + "import": "./lib.esm/blockchain.js", + "require": "./lib/blockchain.js", + "types": "./lib/blockchain.d.ts" + }, + "./since": { + "import": "./lib.esm/since.js", + "require": "./lib/since.js", + "types": "./lib/since.d.ts" + }, + "./utils": { + "import": "./lib.esm/utils.js", + "require": "./lib/utils.js", + "types": "./lib/utils.d.ts" + } + }, "engines": { "node": ">=12.0.0" }, @@ -23,12 +46,11 @@ "url": "git+https://github.com/ckb-js/lumos.git" }, "scripts": { - "build": "pnpm run build:types && pnpm run build:js", - "build:types": "tsc --declaration --emitDeclarationOnly", - "build:js": "babel --root-mode upward src --out-dir lib --extensions .ts -s", + "build": "npm run build:all", + "build:all": "lumos-build --types --esm --cjs", "fmt": "prettier --write \"{src,tests,examples}/**/*.ts\" package.json", "lint": "eslint -c ../../.eslintrc.js \"{src,tests,examples}/**/*.ts\"", - "clean": "shx rm -rf lib", + "clean": "shx rm -rf lib lib.esm", "test": "ava **/*.test.{js,ts} --timeout=2m" }, "bugs": { @@ -48,10 +70,8 @@ "@ckb-lumos/codec": "0.21.0-next.3", "@ckb-lumos/toolkit": "0.21.0-next.3", "@types/blake2b": "^2.1.0", - "@types/lodash.isequal": "^4.5.5", "blake2b": "^2.1.3", - "js-xxhash": "^1.0.4", - "lodash.isequal": "^4.5.0" + "js-xxhash": "^1.0.4" }, "devDependencies": { "jsbi": "^4.1.0" diff --git a/packages/base/src/blockchain.ts b/packages/base/src/blockchain.ts index 5f2b90a4f..7d6561c08 100644 --- a/packages/base/src/blockchain.ts +++ b/packages/base/src/blockchain.ts @@ -8,8 +8,9 @@ import { number, molecule, bytes, + BytesCodec, + FixedBytesCodec, } from "@ckb-lumos/codec"; -import { BytesCodec, FixedBytesCodec } from "@ckb-lumos/codec/lib/base"; import type * as api from "./api"; import { BI } from "@ckb-lumos/bi"; @@ -316,7 +317,7 @@ export const CellbaseWitness = table( // TODO make an enhancer for number codecs /** - * from Transantion defined in @ckb-lumos/base/lib/api.d.ts + * from Transaction defined in @ckb-lumos/base * ``` * export interface Transaction { * cellDeps: CellDep[]; @@ -341,7 +342,7 @@ export const CellbaseWitness = table( * witnesses: BytesVec; * } * ``` - * @param data Transantion defined in @ckb-lumos/base/lib/api.d.ts + * @param data Transantion defined in @ckb-lumos/base * @returns TransactionCodecType */ export function transformTransactionCodecType( diff --git a/packages/base/src/utils.ts b/packages/base/src/utils.ts index 770aa2759..004de2ca4 100644 --- a/packages/base/src/utils.ts +++ b/packages/base/src/utils.ts @@ -1,5 +1,4 @@ import blake2b, { Blake2b } from "blake2b"; -import isEqual from "lodash.isequal"; import { xxHash32 } from "js-xxhash"; import { bytes, number, BytesLike } from "@ckb-lumos/codec"; import { BI, BIish } from "@ckb-lumos/bi"; @@ -170,10 +169,6 @@ function assertHexadecimal(debugPath: string, str: string): void { } } -// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types -function isDeepEqual(a: any, b: any): boolean { - return isEqual(a, b); -} // Buffer.from('TYPE_ID') const TYPE_ID_CODE_HASH = "0x00000000000000000000000000000000000000000000000000545950455f4944"; @@ -287,6 +282,5 @@ export { hashCode, assertHexString, assertHexadecimal, - isDeepEqual, generateTypeIdScript, }; diff --git a/packages/base/tests/since.test.js b/packages/base/tests/since.test.js index bfff204a9..d5e049e66 100644 --- a/packages/base/tests/since.test.js +++ b/packages/base/tests/since.test.js @@ -1,7 +1,7 @@ const test = require("ava"); const { BI } = require("@ckb-lumos/bi"); -const { since, utils } = require("../src"); +const { since } = require("../src"); const { parseSinceCompatible, @@ -91,7 +91,11 @@ test.before(() => { test("parsedSince", (t) => { fixtrues.forEach((v) => { const parsed = parseSinceCompatible(v.since); - t.true(utils.isDeepEqual(parsed, v.parsed)); + t.is(parsed.type, v.parsed.type); + t.is(parsed.relative, v.parsed.relative); + BI.isBI(parsed.value) + ? t.true(parsed.value.eq(v.parsed.value)) + : t.deepEqual(parsed.value, v.parsed.value); }); }); diff --git a/packages/bi/package.json b/packages/bi/package.json index 20a4d508b..bba2b7ac9 100644 --- a/packages/bi/package.json +++ b/packages/bi/package.json @@ -2,22 +2,26 @@ "name": "@ckb-lumos/bi", "version": "0.21.0-next.3", "description": "Bigint support in lumos", - "author": "", + "author": "homura.dev (https://github.com/homura)", "homepage": "https://github.com/ckb-js/lumos#readme", "license": "MIT", - "main": "lib/index.js", - "types": "lib/index.d.ts", + "main": "./lib/index.js", + "types": "./lib/index.d.ts", + "module": "./lib.esm/index.js", "engines": { "node": ">=12.0.0" }, - "directories": { - "lib": "lib", - "test": "tests" - }, "files": [ "lib", + "lib.esm", "src" ], + "exports": { + ".": { + "import": "./lib.esm/index.js", + "default": "./lib/index.js" + } + }, "dependencies": { "jsbi": "^4.1.0" }, @@ -29,9 +33,8 @@ "fmt": "prettier --write \"{src,tests,examples}/**/*.ts\" package.json", "lint": "eslint -c ../../.eslintrc.js \"{src,tests,examples}/**/*.ts\"", "test": "ava **/*.test.ts --timeout=2m", - "build": "pnpm run build:types && pnpm run build:js", - "build:types": "tsc --declaration --emitDeclarationOnly", - "build:js": "babel --root-mode upward src --out-dir lib --extensions .ts -s", + "build": "npm run build:all", + "build:all": "lumos-build --types --cjs --esm", "clean": "rm -rf lib" }, "bugs": { diff --git a/packages/ckb-indexer/src/services.ts b/packages/ckb-indexer/src/services.ts index 6448e236a..dab35039d 100644 --- a/packages/ckb-indexer/src/services.ts +++ b/packages/ckb-indexer/src/services.ts @@ -7,8 +7,8 @@ import type * as RPCType from "./rpcType"; import { toSearchKey } from "./resultFormatter"; import { unwrapScriptWrapper } from "./ckbIndexerFilter"; import { ResultFormatter } from "@ckb-lumos/rpc"; -import { RPC as RpcTypes } from "@ckb-lumos/rpc/lib/types/rpc"; -import { CKBComponents } from "@ckb-lumos/rpc/lib/types/api"; +import { RPC as RpcTypes } from "@ckb-lumos/rpc/types/rpc"; +import { CKBComponents } from "@ckb-lumos/rpc/types/api"; const generateSearchKey = (queries: CKBIndexerQueryOptions): SearchKey => { let script: RPCType.Script | undefined = undefined; diff --git a/packages/ckb-indexer/tests/transaction_collector.unit.test.ts b/packages/ckb-indexer/tests/transaction_collector.unit.test.ts index 300eafdaf..67e1407b3 100644 --- a/packages/ckb-indexer/tests/transaction_collector.unit.test.ts +++ b/packages/ckb-indexer/tests/transaction_collector.unit.test.ts @@ -10,7 +10,7 @@ import { } from "./transaction_collector_unit_test_case"; import { SinonStub, stub } from "sinon"; import * as services from "../src/services"; -import { CKBComponents } from "@ckb-lumos/rpc/lib/types/api"; +import { CKBComponents } from "@ckb-lumos/rpc/types/api"; import { CkbIndexer } from "../src/indexer"; import { bytes } from "@ckb-lumos/codec"; diff --git a/packages/codec/README.md b/packages/codec/README.md index e4ac886bd..e9d4a4c6b 100644 --- a/packages/codec/README.md +++ b/packages/codec/README.md @@ -3,7 +3,7 @@ This module provides a set of functions to pack(encode) and unpack(decode) data. ```mermaid -graph TD; +graph TD Uint8Array-->Codec; Codec-->|unpack|JSObject; JSObject-->Codec; @@ -63,7 +63,7 @@ molecule bindings in an easy way. Suppose we want to describe an RGB color, then we can use a tuple3 of uint8 to describe the color -```mol +``` # color-by-tuple3.mol array RGB [Uint8; 3]; @@ -81,7 +81,7 @@ const [r, g, b] = RGB.unpack(buffer); Of course, we could also use a struct to more directly describe rgb separately -```mol +``` # color-by-struct.mol struct RGB { @@ -172,7 +172,7 @@ about how to handle bytes when we want to sign it, if we can combine `WitnessArg with `OmniLockWitnessLock.signature(BytesOpt)`, then it will be easier to do the signing, we can check [the real world OmniLock witness case](./tests/blockchain.test.ts) to see how it works -```mol +``` table WitnessArgs { lock: BytesOpt, // Lock args inputType: BytesOpt, // Type args for input diff --git a/packages/codec/package.json b/packages/codec/package.json index de5bf5785..6c3c6b410 100644 --- a/packages/codec/package.json +++ b/packages/codec/package.json @@ -5,13 +5,36 @@ "author": "", "homepage": "https://github.com/ckb-js/lumos#readme", "license": "MIT", - "main": "lib/index.js", - "types": "lib/index.d.ts", + "main": "./lib/index.js", + "module": "./lib.esm/index.js", + "types": "./lib/index.d.ts", + "exports": { + ".": { + "import": "./lib.esm/index.js", + "default": "./lib/index.js" + }, + "./bytes": { + "import": "./lib.esm/bytes.js", + "types": "./lib/bytes.d.ts", + "default": "./lib/bytes.js" + }, + "./number": { + "import": "./lib.esm/number/index.js", + "types": "./lib/number/index.d.ts", + "default": "./lib/number/index.js" + }, + "./molecule": { + "import": "./lib.esm/molecule/index.js", + "types": "./lib/molecule/index.d.ts", + "default": "./lib/molecule/index.js" + } + }, "engines": { "node": ">=12.0.0" }, "files": [ "lib", + "lib.esm", "src" ], "repository": { @@ -22,9 +45,8 @@ "fmt": "prettier --write \"{src,tests,examples}/**/*.ts\" package.json", "lint": "eslint -c ../../.eslintrc.js \"{src,tests,examples}/**/*.ts\"", "test": "ava **/*.test.ts --timeout=2m", - "build": "pnpm run build:types && pnpm run build:js", - "build:types": "tsc --declaration --declarationMap --emitDeclarationOnly", - "build:js": "babel --root-mode upward src --out-dir lib --extensions .ts -s", + "build": "npm run build:all", + "build:all": "lumos-build --types --cjs --esm", "clean": "rm -rf lib" }, "dependencies": { diff --git a/packages/codec/src/base.ts b/packages/codec/src/base.ts index 31cfd1860..569da857b 100644 --- a/packages/codec/src/base.ts +++ b/packages/codec/src/base.ts @@ -2,15 +2,15 @@ import { assertBufferLength, isObjectLike } from "./utils"; import { bytify } from "./bytes"; -export interface Codec< +export type Codec< Packed, Unpacked, Packable = Unpacked, Unpackable = Packed -> { +> = { pack: (packable: Packable) => Packed; unpack: (unpackable: Unpackable) => Unpacked; -} +}; export type AnyCodec = Codec; @@ -91,7 +91,11 @@ export type FixedBytesCodec = BytesCodec< export function isFixedCodec( codec: BytesCodec ): codec is FixedBytesCodec { - return isObjectLike(codec) && !!codec.__isFixedCodec__; + return ( + isObjectLike(codec) && + "__isFixedCodec__" in codec && + !!codec.__isFixedCodec__ + ); } export function createFixedBytesCodec( diff --git a/packages/codec/src/index.ts b/packages/codec/src/index.ts index 3a329d021..cee88e834 100644 --- a/packages/codec/src/index.ts +++ b/packages/codec/src/index.ts @@ -5,6 +5,10 @@ export type { UnpackParam, BytesLike, AnyCodec, + BytesCodec, + FixedBytesCodec, + Codec, + Fixed, } from "./base"; export { createBytesCodec, createFixedBytesCodec, isFixedCodec } from "./base"; export * from "./high-order"; diff --git a/packages/codec/src/molecule/index.ts b/packages/codec/src/molecule/index.ts index 4f4bb528d..50d0ce302 100644 --- a/packages/codec/src/molecule/index.ts +++ b/packages/codec/src/molecule/index.ts @@ -1,2 +1,9 @@ export { byteOf, byteArrayOf, byteVecOf } from "./helper"; export { table, array, option, struct, vector, union } from "./layout"; + +export type { + OptionCodec, + UnionCodec, + ObjectCodec, + ArrayCodec, +} from "./layout"; diff --git a/packages/codec/src/molecule/layout.ts b/packages/codec/src/molecule/layout.ts index c927f70b2..5b34fbe1a 100644 --- a/packages/codec/src/molecule/layout.ts +++ b/packages/codec/src/molecule/layout.ts @@ -46,10 +46,10 @@ export type ObjectCodec> = BytesCodec< PartialNullable<{ [key in keyof T]: PackParam }> >; -export interface OptionCodec - extends BytesCodec | undefined> { - pack: (packable?: PackParam) => Uint8Array; -} +export type OptionCodec = BytesCodec< + Unpacked | undefined, + Packable | undefined +>; export type ArrayCodec = BytesCodec< Array>, @@ -376,9 +376,11 @@ export function union>( * - if it's not empty, just serialize the inner item (the size is same as the inner item's size). * @param itemCodec */ -export function option(itemCodec: T): OptionCodec { +export function option( + itemCodec: BytesCodec +): OptionCodec { return createBytesCodec({ - pack(obj?) { + pack(obj) { const nullableCodec = createNullableCodec(itemCodec); if (obj !== undefined && obj !== null) { return nullableCodec.pack(obj); diff --git a/packages/codec/tests/test-vector/codecs.ts b/packages/codec/tests/test-vector/codecs.ts index 58dcdfaae..d8ee8861d 100644 --- a/packages/codec/tests/test-vector/codecs.ts +++ b/packages/codec/tests/test-vector/codecs.ts @@ -1,4 +1,4 @@ -import { FixedBytesCodec } from "./../../src/base"; +import { FixedBytesCodec } from "../../src"; import { Uint8 } from "../../src/number"; import { testArray, diff --git a/packages/common-scripts/src/locktime_pool.ts b/packages/common-scripts/src/locktime_pool.ts index 26cbc9b23..4ca523e42 100644 --- a/packages/common-scripts/src/locktime_pool.ts +++ b/packages/common-scripts/src/locktime_pool.ts @@ -45,7 +45,7 @@ const { import { List, Set } from "immutable"; import { getConfig, Config } from "@ckb-lumos/config-manager"; import { secp256k1Blake160Multisig } from "."; -import { parseSinceCompatible } from "@ckb-lumos/base/lib/since"; +import { parseSinceCompatible } from "@ckb-lumos/base/since"; import { BI, BIish } from "@ckb-lumos/bi"; import { CellCollectorConstructor } from "./type"; import { RPC } from "@ckb-lumos/rpc"; diff --git a/packages/common-scripts/src/omnilock.ts b/packages/common-scripts/src/omnilock.ts index b01dc1f77..bd52762c7 100644 --- a/packages/common-scripts/src/omnilock.ts +++ b/packages/common-scripts/src/omnilock.ts @@ -29,12 +29,9 @@ import { option, table, vector, -} from "@ckb-lumos/codec/lib/molecule"; -import { - BytesOpt, - createFixedHexBytesCodec, -} from "@ckb-lumos/codec/lib/blockchain"; -import { bytify, hexify } from "@ckb-lumos/codec/lib/bytes"; +} from "@ckb-lumos/codec/molecule"; +import { BytesOpt, createFixedHexBytesCodec } from "@ckb-lumos/base/blockchain"; +import { bytify, hexify } from "@ckb-lumos/codec/bytes"; const { ScriptValue } = values; export type OmnilockInfo = { diff --git a/packages/common-scripts/tests/omnilock.test.ts b/packages/common-scripts/tests/omnilock.test.ts index 382c6eddd..e7b9a24dd 100644 --- a/packages/common-scripts/tests/omnilock.test.ts +++ b/packages/common-scripts/tests/omnilock.test.ts @@ -1,7 +1,7 @@ import test from "ava"; import { Config } from "@ckb-lumos/config-manager"; import hd from "@ckb-lumos/hd"; -import { computeScriptHash } from "@ckb-lumos/base/lib/utils"; +import { computeScriptHash } from "@ckb-lumos/base/utils"; import { Script } from "@ckb-lumos/base"; import * as helpers from "@ckb-lumos/helpers"; import { CKBDebuggerDownloader } from "@ckb-lumos/debugger"; @@ -9,13 +9,14 @@ import { createTestContext, getDefaultConfig, } from "@ckb-lumos/debugger/lib/context"; -import { hexify } from "@ckb-lumos/codec/lib/bytes"; import { common, omnilock } from "../src"; -import { WitnessArgs } from "@ckb-lumos/codec/lib/blockchain"; +import { WitnessArgs } from "@ckb-lumos/base/blockchain"; import { CellProvider } from "./cell_provider"; import { charlesOmnilockInputs } from "./inputs"; import { bytes } from "@ckb-lumos/codec"; +const { hexify } = bytes; + const downloader = new CKBDebuggerDownloader(); const context = createTestContext(getDefaultConfig()); const ckbConfig: Config = { diff --git a/packages/crypto/.gitignore b/packages/crypto/.gitignore new file mode 100644 index 000000000..a65b41774 --- /dev/null +++ b/packages/crypto/.gitignore @@ -0,0 +1 @@ +lib diff --git a/packages/crypto/README.md b/packages/crypto/README.md new file mode 100644 index 000000000..5f9ee998e --- /dev/null +++ b/packages/crypto/README.md @@ -0,0 +1,20 @@ +# @ckb-lumos/crypto + +Low-level cryptographic primitives for Lumos, works in both Node.js and browsers. The API is compatible with `node:crypto` + +## Usage + +The `package.json` defined the entry point for both Node.js and browsers. You can just import + +```ts +import { createHash } from "@ckb-lumos/crypto"; +``` + +### Manually + +```typescript +// In Node.js +import { createHash } from "@ckb-lumos/crypto"; +// In browsers +import { createHash } from "@ckb-lumos/crypto/lib/crypto-browser"; +``` diff --git a/packages/crypto/package.json b/packages/crypto/package.json new file mode 100644 index 000000000..4c0905690 --- /dev/null +++ b/packages/crypto/package.json @@ -0,0 +1,58 @@ +{ + "name": "@ckb-lumos/crypto", + "version": "0.21.0-next.3", + "description": "Crypto library for Lumos", + "author": "", + "homepage": "https://github.com/ckb-js/lumos#readme", + "license": "MIT", + "browser": "./lib/crypto-browser.js", + "types": "lib/crypto.d.ts", + "main": "./lib/crypto.js", + "sideEffects": false, + "engines": { + "node": ">=12.0.0" + }, + "directories": { + "lib": "lib", + "test": "tests" + }, + "files": [ + "lib", + "src" + ], + "dependencies": { + "@noble/hashes": "1.3.1", + "@noble/secp256k1": "2.0.0", + "@types/aes-js": "^3.1.1", + "browserify-aes": "^1.2.0", + "scrypt-js": "^3.0.1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ckb-js/lumos.git" + }, + "scripts": { + "fmt": "prettier --write \"{src,tests,examples}/**/*.ts\" package.json", + "lint": "eslint -c ../../.eslintrc.js \"{src,tests,examples}/**/*.ts\"", + "build": "npm run build:types && npm run build:js", + "build:types": "tsc --declaration --emitDeclarationOnly", + "build:js": "babel --root-mode upward src --out-dir lib --extensions .ts -s", + "clean": "rm -rf lib", + "prepublishOnly": "npm run clean && npm run build", + "release": "npm publish" + }, + "bugs": { + "url": "https://github.com/ckb-js/lumos/issues" + }, + "ava": { + "extensions": [ + "ts" + ], + "require": [ + "ts-node/register" + ] + }, + "publishConfig": { + "access": "public" + } +} diff --git a/packages/crypto/src/crypto-browser.ts b/packages/crypto/src/crypto-browser.ts new file mode 100644 index 000000000..912c46ab1 --- /dev/null +++ b/packages/crypto/src/crypto-browser.ts @@ -0,0 +1,67 @@ +// eslint-disable-next-line @typescript-eslint/triple-slash-reference +/// +import { hmac } from "@noble/hashes/hmac"; +import { sha512 } from "@noble/hashes/sha512"; +import { sha256 } from "@noble/hashes/sha256"; +import { ripemd160 } from "@noble/hashes/ripemd160"; +// the noble/hashes is not compatible with the https://ethereum.org/en/developers/docs/data-structures-and-encoding/web3-secret-storage/#scrypt +// import { scrypt } from "@noble/hashes/scrypt"; +import { randomBytes as _randomBytes } from "@noble/hashes/utils"; +import { pbkdf2 as _pbkdf2 } from "@noble/hashes/pbkdf2"; +import type { Hash, HashAlgo } from "./types"; +// TODO may replace with the crypto.subtle API +import { + createCipheriv as _createCipheriv, + createDecipheriv as _createDecipheriv, +} from "browserify-aes"; +import { Cipher } from "./types"; + +function _createHash(algorithm: HashAlgo) { + if (algorithm === "sha512") return sha512; + if (algorithm === "sha256") return sha256; + if (algorithm === "ripemd160") return ripemd160; + throw new Error(`Unknown hash algorithm ${algorithm}`); +} + +export function createHash(algorithm: HashAlgo): Hash { + return _createHash(algorithm).create(); +} + +export function createHmac(algorithm: HashAlgo, key: Uint8Array): Hash { + return hmac.create(_createHash(algorithm), key); +} + +export function randomBytes(bytesLen: number): Uint8Array { + return _randomBytes(bytesLen); +} + +export function createCipheriv( + algorithm: string, + key: Uint8Array, + iv: Uint8Array +): Cipher { + return _createCipheriv(algorithm, key, iv); +} + +export function createDecipheriv( + algorithm: string, + key: Uint8Array, + iv: Uint8Array +): Cipher { + return _createDecipheriv(algorithm, key, iv); +} + +export function pbkdf2Sync( + password: Uint8Array, + salt: Uint8Array, + iterations: number, + keyLen: number, + digest: HashAlgo +): Uint8Array { + return _pbkdf2(_createHash(digest), password, salt, { + dkLen: keyLen, + c: iterations, + }); +} + +export { scryptSync, scrypt } from "./scrypt"; diff --git a/packages/crypto/src/crypto.ts b/packages/crypto/src/crypto.ts new file mode 100644 index 000000000..59a8cde88 --- /dev/null +++ b/packages/crypto/src/crypto.ts @@ -0,0 +1,50 @@ +import { + createHmac as _createHmac, + createHash as _createHash, + scryptSync as _scryptSync, + randomBytes as _randomBytes, + createCipheriv as _createCipheriv, + createDecipheriv as _createDecipheriv, + pbkdf2Sync as _pbkdf2Sync, +} from "node:crypto"; +import type { Cipher, Hash, HashAlgo } from "./types"; + +export function createHash(algorithm: HashAlgo): Hash { + return _createHash(algorithm); +} + +export function createHmac(algorithm: HashAlgo, key: Uint8Array): Hash { + return _createHmac(algorithm, key); +} + +export function randomBytes(bytesLen: number): Uint8Array { + return _randomBytes(bytesLen); +} + +export function createCipheriv( + algorithm: string, + key: Uint8Array, + iv: Uint8Array +): Cipher { + return _createCipheriv(algorithm, key, iv); +} + +export function createDecipheriv( + algorithm: string, + key: Uint8Array, + iv: Uint8Array +): Cipher { + return _createDecipheriv(algorithm, key, iv); +} + +export function pbkdf2Sync( + password: Uint8Array, + salt: Uint8Array, + iterations: number, + keyLen: number, + digest: HashAlgo +): Uint8Array { + return _pbkdf2Sync(password, salt, iterations, keyLen, digest); +} + +export { scryptSync, scrypt } from "./scrypt"; diff --git a/packages/crypto/src/scrypt.ts b/packages/crypto/src/scrypt.ts new file mode 100644 index 000000000..118716d17 --- /dev/null +++ b/packages/crypto/src/scrypt.ts @@ -0,0 +1,32 @@ +import { syncScrypt as _scryptSync, scrypt as _scrypt } from "scrypt-js"; +import { ScryptOptions } from "./types"; + +function assertOptions( + options: ScryptOptions +): asserts options is Required { + if (!options.r || !options.p || !options.N) { + throw new Error( + `Invalid scrypt options ${JSON.stringify(options)}, r, p, N are required` + ); + } +} + +export function scryptSync( + password: Uint8Array, + salt: Uint8Array, + dkLen: number, + options: ScryptOptions +): Uint8Array { + assertOptions(options); + return _scryptSync(password, salt, options.N, options.r, options.p, dkLen); +} + +export function scrypt( + password: Uint8Array, + salt: Uint8Array, + dkLen: number, + options: ScryptOptions +): Promise { + assertOptions(options); + return _scrypt(password, salt, options.N, options.r, options.p, dkLen); +} diff --git a/packages/crypto/src/third.d.ts b/packages/crypto/src/third.d.ts new file mode 100644 index 000000000..d0bfa53d8 --- /dev/null +++ b/packages/crypto/src/third.d.ts @@ -0,0 +1,18 @@ +declare module "browserify-aes" { + interface Cipher { + update(data: Uint8Array): Uint8Array; + final(): Uint8Array; + } + + export function createCipheriv( + algorithm: string, + key: Uint8Array, + iv: Uint8Array + ): Cipher; + + export function createDecipheriv( + algorithm: string, + key: Uint8Array, + iv: Uint8Array + ): Cipher; +} diff --git a/packages/crypto/src/types.ts b/packages/crypto/src/types.ts new file mode 100644 index 000000000..7e118a9ae --- /dev/null +++ b/packages/crypto/src/types.ts @@ -0,0 +1,22 @@ +export interface Hash { + update(data: Uint8Array): Hash; + digest(): Uint8Array; +} + +export type HashAlgo = "sha512" | "sha256" | "ripemd160"; + +export type CreateHmac = (algorithm: HashAlgo, bytes: Uint8Array) => Hash; + +export type ScryptOptions = { + // cost factor + N?: number; + // block size + r?: number; + // parallelization + p?: number; +}; + +export interface Cipher { + update(data: Uint8Array): Uint8Array; + final(): Uint8Array; +} diff --git a/packages/crypto/tsconfig.json b/packages/crypto/tsconfig.json new file mode 100644 index 000000000..1b551f4e9 --- /dev/null +++ b/packages/crypto/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "lib" + }, + "include": ["src"] +} diff --git a/packages/crypto/typedoc.json b/packages/crypto/typedoc.json new file mode 100644 index 000000000..f593f276c --- /dev/null +++ b/packages/crypto/typedoc.json @@ -0,0 +1,4 @@ +{ + "extends": ["../../typedoc.base.json"], + "entryPoints": ["src/index.ts"] +} diff --git a/packages/debugger/src/codecs.ts b/packages/debugger/src/codecs.ts index ace556b96..78271f2b0 100644 --- a/packages/debugger/src/codecs.ts +++ b/packages/debugger/src/codecs.ts @@ -1,7 +1,7 @@ -import { struct, vector } from "@ckb-lumos/codec/lib/molecule"; -import { Byte32 } from "@ckb-lumos/base/lib/blockchain"; +import { struct, vector } from "@ckb-lumos/codec/molecule"; +import { Byte32 } from "@ckb-lumos/base/blockchain"; import { createFixedBytesCodec } from "@ckb-lumos/codec"; -import { Uint32 } from "@ckb-lumos/codec/lib/number"; +import { Uint32 } from "@ckb-lumos/codec/number"; import { BI } from "@ckb-lumos/bi"; export const OutPoint = struct( diff --git a/packages/debugger/src/context.ts b/packages/debugger/src/context.ts index 9992244c2..46cb4630f 100644 --- a/packages/debugger/src/context.ts +++ b/packages/debugger/src/context.ts @@ -7,8 +7,8 @@ import { CKBDebuggerDownloader } from "./download"; import { CKBDebugger } from "./executor"; import * as fs from "fs"; import * as path from "path"; -import { hexify } from "@ckb-lumos/codec/lib/bytes"; -import { Uint32 } from "@ckb-lumos/codec/lib/number"; +import { hexify } from "@ckb-lumos/codec/bytes"; +import { Uint32 } from "@ckb-lumos/codec/number"; export function mockOutPoint(): OutPoint { return { diff --git a/packages/debugger/src/loader.ts b/packages/debugger/src/loader.ts index 5b5d6f804..b8dc043aa 100644 --- a/packages/debugger/src/loader.ts +++ b/packages/debugger/src/loader.ts @@ -1,7 +1,7 @@ import { HexString, OutPoint } from "@ckb-lumos/base"; import * as fs from "fs"; -import { ckbHash } from "@ckb-lumos/base/lib/utils"; -import { hexify } from "@ckb-lumos/codec/lib/bytes"; +import { ckbHash } from "@ckb-lumos/base/utils"; +import { hexify } from "@ckb-lumos/codec/bytes"; import { OutPoint as OutPointCodec, OutPointVec } from "./codecs"; export type LoadedCode = { codeHash: HexString; binary: HexString }; diff --git a/packages/debugger/src/parse.ts b/packages/debugger/src/parse.ts index 20f3fa944..955af62bd 100644 --- a/packages/debugger/src/parse.ts +++ b/packages/debugger/src/parse.ts @@ -4,10 +4,10 @@ import { TransactionSkeletonType, } from "@ckb-lumos/helpers"; import { CellDep, HexString } from "@ckb-lumos/base"; -import { bytify } from "@ckb-lumos/codec/lib/bytes"; +import { bytify } from "@ckb-lumos/codec/bytes"; import { OutPointVec } from "./codecs"; import { ParamsFormatter } from "@ckb-lumos/rpc"; -import { RPC } from "@ckb-lumos/rpc/lib/types/rpc"; +import { RPC } from "@ckb-lumos/rpc/types/rpc"; export function parseDebuggerMessage( message: string, diff --git a/packages/debugger/src/types.ts b/packages/debugger/src/types.ts index af27612ce..1e741af17 100644 --- a/packages/debugger/src/types.ts +++ b/packages/debugger/src/types.ts @@ -3,7 +3,7 @@ import { TransactionSkeletonType } from "@ckb-lumos/helpers"; import { Hash, Header, HexString, OutPoint } from "@ckb-lumos/base"; import { CKBDebugger } from "./executor"; import { LocaleCode } from "./context"; -import type { RPC } from "@ckb-lumos/rpc/lib/types/rpc"; +import type { RPC } from "@ckb-lumos/rpc/types/rpc"; export interface ExecuteResult { code: number; diff --git a/packages/debugger/tests/context.test.ts b/packages/debugger/tests/context.test.ts index 24c22d8b2..ae0b00354 100644 --- a/packages/debugger/tests/context.test.ts +++ b/packages/debugger/tests/context.test.ts @@ -3,7 +3,7 @@ import { createCellWithMinimalCapacity, createScriptRegistry, } from "@ckb-lumos/experiment-tx-assembler"; -import { computeScriptHash } from "@ckb-lumos/base/lib/utils"; +import { computeScriptHash } from "@ckb-lumos/base/utils"; import { HexString } from "@ckb-lumos/base"; import { CKBDebugger, CKBDebuggerDownloader, DataLoader } from "../src"; import { TransactionSkeleton } from "@ckb-lumos/helpers"; @@ -14,12 +14,14 @@ import { } from "../src/context"; import { randomBytes } from "crypto"; import { privateKeyToBlake160, signRecoverable } from "@ckb-lumos/hd/lib/key"; -import { hexify } from "@ckb-lumos/codec/lib/bytes"; +import { bytes } from "@ckb-lumos/codec"; import { createP2PKHMessageGroup, parseFromInfo, } from "@ckb-lumos/common-scripts"; -import { WitnessArgs } from "@ckb-lumos/codec/lib/blockchain"; +import { WitnessArgs } from "@ckb-lumos/base/blockchain"; + +const hexify = bytes.hexify; const downloader = new CKBDebuggerDownloader(); const context = createTestContext(getDefaultConfig()); diff --git a/packages/e2e-test/src/utils.ts b/packages/e2e-test/src/utils.ts index 63ae46866..696bc71c0 100644 --- a/packages/e2e-test/src/utils.ts +++ b/packages/e2e-test/src/utils.ts @@ -3,7 +3,9 @@ import { encodeToAddress } from "@ckb-lumos/helpers"; import { randomBytes } from "crypto"; import { key } from "@ckb-lumos/hd"; import { getConfig } from "@ckb-lumos/config-manager"; -import { hexify } from "@ckb-lumos/codec/lib/bytes"; +import { bytes } from "@ckb-lumos/codec"; + +const hexify = bytes.hexify; // secp256k1 private key is 32-bytes length export const generateRandomPrivateKey = (): string => hexify(randomBytes(32)); diff --git a/packages/hd/README.md b/packages/hd/README.md index 264546714..4ea891eb8 100644 --- a/packages/hd/README.md +++ b/packages/hd/README.md @@ -44,7 +44,6 @@ resolve: { buffer: require.resolve('buffer/'), stream: require.resolve('stream-browserify'), path: require.resolve('path-browserify'), - crypto: require.resolve('crypto-browserify'), }, plugins: [ new webpack.ProvidePlugin({ @@ -55,4 +54,4 @@ resolve: { } ``` -You'll need to install `buffer`, `stream-browserify`, `path-browserify` and `crypto-browserify` also. +You'll need to install `buffer`, `stream-browserify`, `path-browserify` also. diff --git a/packages/hd/package.json b/packages/hd/package.json index 48cf70520..f97bf758f 100644 --- a/packages/hd/package.json +++ b/packages/hd/package.json @@ -21,7 +21,9 @@ "dependencies": { "@ckb-lumos/base": "0.21.0-next.3", "@ckb-lumos/bi": "0.21.0-next.3", - "bn.js": "^5.1.3", + "@ckb-lumos/codec": "0.21.0-next.3", + "@ckb-lumos/crypto": "0.21.0-next.3", + "bn.js": "^4.11.6", "elliptic": "^6.5.4", "scrypt-js": "^3.0.1", "sha3": "^2.1.3", @@ -34,11 +36,15 @@ "scripts": { "fmt": "prettier --write \"{src,tests}/**/*.ts\" package.json", "lint": "eslint -c ../../.eslintrc.js \"{src,tests}/**/*.ts\"", - "test": "ava **/*.test.ts --timeout=5m", + "test": "pnpm run test:node && pnpm run test:browser", + "test:node": "ava **/*.test.ts --timeout=5m", + "test:browser": "echo 'export * from \"@ckb-lumos/crypto/lib/crypto-browser\"' > src/crypto.ts && ava **/*.test.ts --timeout=5m && echo 'export * from \"@ckb-lumos/crypto\";' > src/crypto.ts", "build": "pnpm run build:types && pnpm run build:js", "build:types": "tsc --declaration --emitDeclarationOnly", "build:js": "babel --root-mode upward src --out-dir lib --extensions .ts -s", - "clean": "rm -rf lib" + "clean": "rm -rf lib", + "prepublishOnly": "yarn run clean && yarn run build", + "release": "npm publish" }, "bugs": { "url": "https://github.com/ckb-js/lumos/issues" diff --git a/packages/hd/src/crypto.ts b/packages/hd/src/crypto.ts new file mode 100644 index 000000000..c398ab84f --- /dev/null +++ b/packages/hd/src/crypto.ts @@ -0,0 +1 @@ +export * from "@ckb-lumos/crypto"; diff --git a/packages/hd/src/keychain.ts b/packages/hd/src/keychain.ts index 9e65f88b2..dbc202efa 100644 --- a/packages/hd/src/keychain.ts +++ b/packages/hd/src/keychain.ts @@ -1,7 +1,7 @@ -import crypto from "crypto"; import { ec as EC } from "elliptic"; import BN from "bn.js"; import { privateToPublic } from "./key"; +import { createHash, createHmac } from "./crypto"; const ec = new EC("secp256k1"); @@ -12,11 +12,11 @@ export default class Keychain { privateKey: Buffer = EMPTY_BUFFER; publicKey: Buffer = EMPTY_BUFFER; chainCode: Buffer = EMPTY_BUFFER; - index: number = 0; - depth: number = 0; + index = 0; + depth = 0; identifier: Buffer = EMPTY_BUFFER; - fingerprint: number = 0; - parentFingerprint: number = 0; + fingerprint = 0; + parentFingerprint = 0; constructor(privateKey: Buffer, chainCode: Buffer) { this.privateKey = privateKey; @@ -33,11 +33,13 @@ export default class Keychain { } public static fromSeed(seed: Buffer): Keychain { - const i = crypto - .createHmac("sha512", Buffer.from("Bitcoin seed", "utf8")) + const i = createHmac("sha512", Buffer.from("Bitcoin seed", "utf8")) .update(seed) .digest(); - const keychain = new Keychain(i.slice(0, 32), i.slice(32)); + const keychain = new Keychain( + Buffer.from(i.slice(0, 32)), + Buffer.from(i.slice(32)) + ); keychain.calculateFingerprint(); return keychain; } @@ -47,7 +49,7 @@ export default class Keychain { public static fromPublicKey( publicKey: Buffer, chainCode: Buffer, - path: String + path: string ): Keychain { const keychain = new Keychain(EMPTY_BUFFER, chainCode); keychain.publicKey = publicKey; @@ -74,7 +76,9 @@ export default class Keychain { data = Buffer.concat([this.publicKey, indexBuffer]); } - const i = crypto.createHmac("sha512", this.chainCode).update(data).digest(); + const i = Buffer.from( + createHmac("sha512", this.chainCode).update(data).digest() + ); const il = i.slice(0, 32); const ir = i.slice(32); @@ -102,6 +106,7 @@ export default class Keychain { return this; } + // eslint-disable-next-line @typescript-eslint/no-this-alias let bip32: Keychain = this; let entries = path.split("/"); @@ -117,13 +122,13 @@ export default class Keychain { return bip32; } - isNeutered(): Boolean { + isNeutered(): boolean { return this.privateKey === EMPTY_BUFFER; } hash160(data: Buffer): Buffer { - const sha256 = crypto.createHash("sha256").update(data).digest(); - return crypto.createHash("ripemd160").update(sha256).digest(); + const sha256 = createHash("sha256").update(data).digest(); + return Buffer.from(createHash("ripemd160").update(sha256).digest()); } private static privateKeyAdd(privateKey: Buffer, factor: Buffer): Buffer { diff --git a/packages/hd/src/keystore.ts b/packages/hd/src/keystore.ts index f3c2f87c4..6480a2cac 100644 --- a/packages/hd/src/keystore.ts +++ b/packages/hd/src/keystore.ts @@ -1,9 +1,13 @@ -import crypto from "crypto"; import { Keccak } from "sha3"; import { v4 as uuid } from "uuid"; import { ExtendedPrivateKey } from "./extended_key"; import { HexString } from "@ckb-lumos/base"; -import { syncScrypt } from "scrypt-js"; +import { + createCipheriv, + createDecipheriv, + randomBytes, + scryptSync, +} from "./crypto"; export type HexStringWithoutPrefix = string; @@ -123,8 +127,8 @@ export default class Keystore { // Create an empty keystore object that contains empty private key static createEmpty(): Keystore { - const salt: Buffer = crypto.randomBytes(32); - const iv: Buffer = crypto.randomBytes(16); + const salt: Buffer = Buffer.from(randomBytes(32)); + const iv: Buffer = Buffer.from(randomBytes(16)); const kdfparams: KdfParams = { dklen: 32, salt: salt.toString("hex"), @@ -152,8 +156,8 @@ export default class Keystore { password: string, options: { salt?: Buffer; iv?: Buffer } = {} ): Keystore { - const salt: Buffer = options.salt || crypto.randomBytes(32); - const iv: Buffer = options.iv || crypto.randomBytes(16); + const salt: Buffer = options.salt || Buffer.from(randomBytes(32)); + const iv: Buffer = options.iv || Buffer.from(randomBytes(16)); const kdfparams: KdfParams = { dklen: 32, salt: salt.toString("hex"), @@ -162,21 +166,14 @@ export default class Keystore { p: 1, }; const derivedKey: Buffer = Buffer.from( - syncScrypt( - Buffer.from(password), - salt, - kdfparams.n, - kdfparams.r, - kdfparams.p, - kdfparams.dklen - ) + scryptSync(Buffer.from(password), salt, kdfparams.dklen, { + N: kdfparams.n, + r: kdfparams.r, + p: kdfparams.p, + }) ); - const cipher: crypto.Cipher = crypto.createCipheriv( - CIPHER, - derivedKey.slice(0, 16), - iv - ); + const cipher = createCipheriv(CIPHER, derivedKey.slice(0, 16), iv); if (!cipher) { throw new UnsupportedCipher(); } @@ -214,7 +211,7 @@ export default class Keystore { if (Keystore.mac(derivedKey, ciphertext) !== this.crypto.mac) { throw new IncorrectPassword(); } - const decipher = crypto.createDecipheriv( + const decipher = createDecipheriv( this.crypto.cipher, derivedKey.slice(0, 16), Buffer.from(this.crypto.cipherparams.iv, "hex") @@ -240,13 +237,15 @@ export default class Keystore { derivedKey(password: string): Buffer { const { kdfparams } = this.crypto; return Buffer.from( - syncScrypt( + scryptSync( Buffer.from(password), Buffer.from(kdfparams.salt, "hex"), - kdfparams.n, - kdfparams.r, - kdfparams.p, - kdfparams.dklen + kdfparams.dklen, + { + N: kdfparams.n, + r: kdfparams.r, + p: kdfparams.p, + } ) ); } @@ -257,7 +256,7 @@ export default class Keystore { .digest("hex"); } - static scryptOptions(kdfparams: KdfParams): crypto.ScryptOptions { + static scryptOptions(kdfparams: KdfParams): ScryptOptions { return { N: kdfparams.n, r: kdfparams.r, @@ -266,3 +265,13 @@ export default class Keystore { }; } } + +interface ScryptOptions { + cost?: number | undefined; + blockSize?: number | undefined; + parallelization?: number | undefined; + N?: number | undefined; + r?: number | undefined; + p?: number | undefined; + maxmem?: number | undefined; +} diff --git a/packages/hd/src/mnemonic/index.ts b/packages/hd/src/mnemonic/index.ts index 0b3f956a4..11bf7a7b7 100644 --- a/packages/hd/src/mnemonic/index.ts +++ b/packages/hd/src/mnemonic/index.ts @@ -1,6 +1,7 @@ -import crypto from "crypto"; import wordList from "./word_list"; import { HexString } from "@ckb-lumos/base"; +import { createHash, pbkdf2Sync, randomBytes } from "../crypto"; +import { bytes } from "@ckb-lumos/codec"; const RADIX = 2048; const PBKDF2_ROUNDS = 2048; @@ -28,7 +29,7 @@ if (wordList.length !== RADIX) { ); } -function bytesToBinary(bytes: Buffer): string { +function bytesToBinary(bytes: Uint8Array): string { return bytes.reduce((binary, byte) => { return binary + byte.toString(2).padStart(8, "0"); }, ""); @@ -37,57 +38,35 @@ function bytesToBinary(bytes: Buffer): string { function deriveChecksumBits(entropyBuffer: Buffer): string { const ENT = entropyBuffer.length * 8; const CS = ENT / 32; - const hash = crypto.createHash("sha256").update(entropyBuffer).digest(); + const hash = createHash("sha256").update(entropyBuffer).digest(); return bytesToBinary(hash).slice(0, CS); } -function salt(password: string = ""): string { +function salt(password = ""): string { return `mnemonic${password}`; } -export function mnemonicToSeedSync( - mnemonic: string = "", - password: string = "" -): Buffer { +export function mnemonicToSeedSync(mnemonic = "", password = ""): Buffer { const mnemonicBuffer = Buffer.from(mnemonic.normalize("NFKD"), "utf8"); const saltBuffer = Buffer.from(salt(password.normalize("NFKD")), "utf8"); - return crypto.pbkdf2Sync( - mnemonicBuffer, - saltBuffer, - PBKDF2_ROUNDS, - KEY_LEN, - "sha512" + return Buffer.from( + pbkdf2Sync(mnemonicBuffer, saltBuffer, PBKDF2_ROUNDS, KEY_LEN, "sha512") ); } -export function mnemonicToSeed( - mnemonic: string = "", - password: string = "" -): Promise { +export function mnemonicToSeed(mnemonic = "", password = ""): Promise { return new Promise((resolve, reject) => { try { const mnemonicBuffer = Buffer.from(mnemonic.normalize("NFKD"), "utf8"); const saltBuffer = Buffer.from(salt(password.normalize("NFKD")), "utf8"); - crypto.pbkdf2( - mnemonicBuffer, - saltBuffer, - PBKDF2_ROUNDS, - KEY_LEN, - "sha512", - (err, data) => { - if (err) { - reject(err); - } - resolve(data); - } - ); + pbkdf2Sync(mnemonicBuffer, saltBuffer, PBKDF2_ROUNDS, KEY_LEN, "sha512"); } catch (error) { reject(error); } }); } -export function mnemonicToEntropy(mnemonic: string = ""): HexString { +export function mnemonicToEntropy(mnemonic = ""): HexString { const words = mnemonic.normalize("NFKD").split(" "); if (words.length < MIN_WORDS_SIZE) { throw new Error(WORDS_TOO_SHORT); @@ -172,8 +151,7 @@ export function validateMnemonic(mnemonic: string): boolean { // Generate 12 words mnemonic code export function generateMnemonic(): string { const entropySize = 16; - const entropy: HexString = - "0x" + crypto.randomBytes(entropySize).toString("hex"); + const entropy: HexString = bytes.hexify(randomBytes(entropySize)); return entropyToMnemonic(entropy); } diff --git a/packages/helpers/src/address-to-script.ts b/packages/helpers/src/address-to-script.ts index 9cdb2f625..c3005ae87 100644 --- a/packages/helpers/src/address-to-script.ts +++ b/packages/helpers/src/address-to-script.ts @@ -10,7 +10,7 @@ import { Address, Script, blockchain } from "@ckb-lumos/base"; import { bytes } from "@ckb-lumos/codec"; import { getConfig } from "@ckb-lumos/config-manager"; import { bech32, bech32m } from "bech32"; -import { Options } from "./"; +import { Options } from "."; const BECH32_LIMIT = 1023; diff --git a/packages/helpers/src/index.ts b/packages/helpers/src/index.ts index 65cd071f3..a38fa828f 100644 --- a/packages/helpers/src/index.ts +++ b/packages/helpers/src/index.ts @@ -23,7 +23,7 @@ import { } from "./address-to-script"; import { hexToByteArray } from "./utils"; import { validators } from "@ckb-lumos/toolkit"; -import { HashType } from "@ckb-lumos/base/lib/blockchain"; +import { HashType } from "@ckb-lumos/base/blockchain"; const { bytify, hexify } = bytes; export interface Options { diff --git a/packages/light-client/src/rpc.ts b/packages/light-client/src/rpc.ts index 35ed42d2a..e42cab726 100644 --- a/packages/light-client/src/rpc.ts +++ b/packages/light-client/src/rpc.ts @@ -1,5 +1,5 @@ -import { CKBComponents } from "@ckb-lumos/rpc/lib/types/api"; -import { RPC } from "@ckb-lumos/rpc/lib/types/rpc"; +import { CKBComponents } from "@ckb-lumos/rpc/types/api"; +import { RPC } from "@ckb-lumos/rpc/types/rpc"; import { ParamsFormatter, ResultFormatter } from "@ckb-lumos/rpc"; import type { FetchHeaderResult, diff --git a/packages/light-client/src/type.ts b/packages/light-client/src/type.ts index 582d9d596..0c113ddde 100644 --- a/packages/light-client/src/type.ts +++ b/packages/light-client/src/type.ts @@ -1,5 +1,5 @@ -import { CKBComponents } from "@ckb-lumos/rpc/lib/types/api"; -import { RPC } from "@ckb-lumos/rpc/lib/types/rpc"; +import { CKBComponents } from "@ckb-lumos/rpc/types/api"; +import { RPC } from "@ckb-lumos/rpc/types/rpc"; export enum FetchFlag { Fetched = "fetched", diff --git a/packages/lumos/package.json b/packages/lumos/package.json index b9522578e..eb7cfbfec 100644 --- a/packages/lumos/package.json +++ b/packages/lumos/package.json @@ -46,9 +46,7 @@ }, "devDependencies": { "buffer": "^6.0.3", - "crypto-browserify": "^3.12.0", "fork-ts-checker-webpack-plugin": "^6.4.0", - "ts-loader": "^9.2.6", "unminified-webpack-plugin": "^3.0.0", "webpack": "^5.64.1", "webpack-cli": "^4.9.1" diff --git a/packages/lumos/src/index.ts b/packages/lumos/src/index.ts index 82904f19a..ad07c0162 100644 --- a/packages/lumos/src/index.ts +++ b/packages/lumos/src/index.ts @@ -12,7 +12,7 @@ export type { Input, Output, Script, -} from "@ckb-lumos/base/lib/api"; +} from "@ckb-lumos/base"; import { Reader, @@ -35,7 +35,7 @@ export type { HexadecimalRange, PackedDao, PackedSince, -} from "@ckb-lumos/base/lib/primitive"; +} from "@ckb-lumos/base"; export { since, utils } from "@ckb-lumos/base"; export * as config from "@ckb-lumos/config-manager"; diff --git a/packages/lumos/webpack.config.js b/packages/lumos/webpack.config.js index 43c7918e6..032a1d14c 100644 --- a/packages/lumos/webpack.config.js +++ b/packages/lumos/webpack.config.js @@ -32,7 +32,6 @@ module.exports = { fallback: { // https://www.npmjs.com/package/buffer#usage buffer: require.resolve("buffer/"), - crypto: require.resolve("crypto-browserify"), path: false, fs: false, stream: false, diff --git a/packages/molecule/src/codec.ts b/packages/molecule/src/codec.ts index e66a7963a..142c01484 100644 --- a/packages/molecule/src/codec.ts +++ b/packages/molecule/src/codec.ts @@ -3,7 +3,9 @@ import { createBytesCodec, BytesLike, BytesCodec, -} from "@ckb-lumos/codec/lib/base"; + bytes, + number, +} from "@ckb-lumos/codec"; import { array, byteVecOf, @@ -12,11 +14,10 @@ import { table, union, vector, -} from "@ckb-lumos/codec/lib/molecule"; -import { createFixedHexBytesCodec } from "@ckb-lumos/codec/lib/blockchain"; +} from "@ckb-lumos/codec/molecule"; +import { createFixedHexBytesCodec } from "@ckb-lumos/base/blockchain"; import { byte, CodecMap, MolType, MolTypeMap } from "./type"; import { nonNull, toMolTypeMap } from "./utils"; -import { bytes, number } from "@ckb-lumos/codec"; function createHexBytesCodec(): BytesCodec { return createBytesCodec({ diff --git a/packages/molecule/src/type.ts b/packages/molecule/src/type.ts index 72fb83cdd..9ea09f80e 100644 --- a/packages/molecule/src/type.ts +++ b/packages/molecule/src/type.ts @@ -1,4 +1,4 @@ -import { AnyCodec } from "@ckb-lumos/codec/lib/base"; +import { AnyCodec } from "@ckb-lumos/codec"; export const byte = "byte"; export type BaseType = { diff --git a/packages/rpc/package.json b/packages/rpc/package.json index a32063543..3334ef042 100644 --- a/packages/rpc/package.json +++ b/packages/rpc/package.json @@ -5,16 +5,30 @@ "homepage": "https://github.com/ckb-js/lumos#readme", "license": "MIT", "main": "lib/index.js", + "module": "./lib.esm/index.js", "engines": { "node": ">=12.0.0" }, - "directories": { - "lib": "lib", - "test": "__tests__" - }, "files": [ "lib" ], + "exports": { + ".": { + "import": "./lib.esm/index.js", + "require": "./lib/index.js", + "types": "./lib/index.d.ts" + }, + "./types/api": { + "import": "./lib.esm/types/api.js", + "require": "./lib/types/api.js", + "types": "./lib/types/api.d.ts" + }, + "./types/rpc": { + "import": "./lib.esm/types/rpc.js", + "require": "./lib/types/rpc.js", + "types": "./lib/types/rpc.d.ts" + } + }, "publishConfig": { "access": "public" }, @@ -26,13 +40,11 @@ "url": "https://github.com/ckb-js/lumos/issues" }, "scripts": { - "doc": "npx typedoc --out docs --mode modules --includeDeclarations --excludeExternals --ignoreCompilerErrors --theme default", "fmt": "prettier --write \"{src,tests,examples}/**/*.ts\" package.json", "lint": "eslint -c ../../.eslintrc.js \"{src,tests,examples}/**/*.ts\"", "test": "npx jest", - "build": "pnpm run build:types && pnpm run build:js", - "build:types": "tsc --declaration --emitDeclarationOnly", - "build:js": "babel --root-mode upward src --out-dir lib --extensions .ts -s", + "build": "npm run build:all", + "build:all": "lumos-build --types --cjs --esm", "clean": "rm -rf lib" }, "dependencies": { @@ -44,7 +56,6 @@ "devDependencies": { "@types/jest": "^29.4.0", "@types/nock": "^11.1.0", - "express": "^4.18.1", "jest": "^28.1.3", "nock": "^13.2.9" } diff --git a/packages/testkit/src/mock-ckb-jsonrpc.ts b/packages/testkit/src/mock-ckb-jsonrpc.ts index e67ddca87..4bbcde9b9 100644 --- a/packages/testkit/src/mock-ckb-jsonrpc.ts +++ b/packages/testkit/src/mock-ckb-jsonrpc.ts @@ -3,7 +3,7 @@ import express, { Express } from "express"; import bodyParser from "body-parser"; import { blockchain, LocalNode, utils } from "@ckb-lumos/base"; import { bytes } from "@ckb-lumos/codec"; -import { RPC } from "@ckb-lumos/rpc/lib/types/rpc"; +import { RPC } from "@ckb-lumos/rpc/types/rpc"; import TransactionStatus = RPC.TransactionStatus; interface Options { diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index e3940a364..aecd5da12 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -2,8 +2,16 @@ "name": "@ckb-lumos/toolkit", "version": "0.21.0-next.3", "description": "JavaScript toolkits used to build dapps for Nervos CKB", - "main": "lib/index.js", + "main": "./lib/index.js", "types": "types/index.d.ts", + "module": "./lib.esm/index.js", + "exports": { + ".": { + "import": "./lib.esm/index.js", + "types": "./types/index.d.ts", + "default": "./lib/index.js" + } + }, "engines": { "node": ">=12.0.0" }, @@ -16,9 +24,10 @@ "lib" ], "scripts": { - "build": "pnpm run build:js", + "build:all": "pnpm run build:js && pnpm run build:esm", "build:js": "babel -s --plugins @babel/plugin-proposal-export-namespace-from --plugins @babel/plugin-transform-modules-commonjs src --out-dir lib", - "clean": "rm -rf lib", + "build:esm": "shx cp -r ./src lib.esm && shx echo '{\"type\": \"module\"}' > ./lib.esm/package.json", + "clean": "rm -rf lib lib.esm", "test": "ava", "fmt": "prettier --write \"{src,tests}/**/*.js\"", "lint": "eslint -c ../../.eslintrc.js \"{src,tests}/**/*.js\"", diff --git a/packages/toolkit/src/index.js b/packages/toolkit/src/index.js index 1823fc946..0eac21c8b 100644 --- a/packages/toolkit/src/index.js +++ b/packages/toolkit/src/index.js @@ -1,5 +1,4 @@ export { Reader } from "./reader.js"; -export * as normalizers from "./normalizers"; -export * as transformers from "./transformers"; -export * as validators from "./validators"; -export const VERSION = "__development_build__"; +export * as normalizers from "./normalizers.js"; +export * as transformers from "./transformers.js"; +export * as validators from "./validators.js"; diff --git a/packages/toolkit/src/normalizers.js b/packages/toolkit/src/normalizers.js index ea33b619d..b6605b66b 100644 --- a/packages/toolkit/src/normalizers.js +++ b/packages/toolkit/src/normalizers.js @@ -11,7 +11,7 @@ // format. If you are using RPCs or GraphQL to interact with CKB, chances are you // will not need this package. import { BI } from "@ckb-lumos/bi"; -import { Reader } from "./reader"; +import { Reader } from "./reader.js"; /** * @deprecated please follow the {@link https://lumos-website.vercel.app/migrations/migrate-to-v0.19 migration-guide} */ diff --git a/packages/toolkit/src/transformers.js b/packages/toolkit/src/transformers.js index d8c2eaee0..1c16479d8 100644 --- a/packages/toolkit/src/transformers.js +++ b/packages/toolkit/src/transformers.js @@ -16,7 +16,7 @@ // required by CKB. You can also leverage the Reader class we provide as much as // possible. Since Reader class does provide serializeJson methods, transformers // here will transform them to valid hex strings required by CKB. -import * as validators from "./validators"; +import * as validators from "./validators.js"; function invokeSerializeJson(debugPath, value) { if (value instanceof Object && value.serializeJson instanceof Function) { diff --git a/packages/transaction-manager/package.json b/packages/transaction-manager/package.json index b17c5beea..93ded715b 100644 --- a/packages/transaction-manager/package.json +++ b/packages/transaction-manager/package.json @@ -52,9 +52,5 @@ "require": [ "ts-node/register" ] - }, - "devDependencies": { - "@types/sinon": "^10.0.14", - "sinon": "^15.0.4" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a16adc971..dfecbe050 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -56,6 +56,9 @@ importers: ava: specifier: ^3.8.2 version: 3.8.2 + babel-plugin-add-import-extension: + specifier: ^1.6.0 + version: 1.6.0(@babel/core@7.16.7) c8: specifier: ^7.10.0 version: 7.10.0 @@ -77,6 +80,9 @@ importers: lint-staged: specifier: ^12.3.5 version: 12.3.5 + lumos-build: + specifier: 0.21.0-next.0 + version: link:devtools/lumos-build npm-run-all: specifier: ^4.1.5 version: 4.1.5 @@ -99,6 +105,36 @@ importers: specifier: 5.0.4 version: 5.0.4 + devtools/bundler: + dependencies: + '@ckb-lumos/lumos': + specifier: canary + version: link:../../packages/lumos + '@types/webpack-bundle-analyzer': + specifier: ^4.6.0 + version: 4.6.3(webpack-cli@4.9.1) + buffer: + specifier: ^5.6.0 + version: 5.6.0 + fork-ts-checker-webpack-plugin: + specifier: ^6.4.0 + version: 6.5.3(eslint@8.40.0)(typescript@5.0.4)(webpack@5.89.0) + ts-loader: + specifier: ^9.4.3 + version: 9.5.1(typescript@5.0.4)(webpack@5.89.0) + unminified-webpack-plugin: + specifier: ^3.0.0 + version: 3.0.0(webpack@5.89.0) + webpack: + specifier: ^5.64.1 + version: 5.89.0(webpack-cli@4.9.1) + webpack-bundle-analyzer: + specifier: ^4.9.0 + version: 4.10.1 + webpack-cli: + specifier: ^4.9.1 + version: 4.9.1(webpack-bundle-analyzer@4.10.1)(webpack@5.89.0) + devtools/changelog: dependencies: '@changesets/get-github-info': @@ -111,6 +147,36 @@ importers: specifier: ^16.3.1 version: 16.3.1 + devtools/lumos-build: + dependencies: + '@types/yargs': + specifier: ^17.0.24 + version: 17.0.24 + yargs: + specifier: ^17.7.2 + version: 17.7.2 + + devtools/playground: + dependencies: + '@ckb-lumos/base': + specifier: workspace:* + version: link:../../packages/base + '@ckb-lumos/bi': + specifier: workspace:* + version: link:../../packages/bi + '@ckb-lumos/codec': + specifier: workspace:* + version: link:../../packages/codec + '@ckb-lumos/rpc': + specifier: workspace:* + version: link:../../packages/rpc + '@ckb-lumos/toolkit': + specifier: workspace:* + version: link:../../packages/toolkit + minimatch: + specifier: ^9.0.3 + version: 9.0.3 + packages/base: dependencies: '@ckb-lumos/bi': @@ -125,18 +191,12 @@ importers: '@types/blake2b': specifier: ^2.1.0 version: 2.1.0 - '@types/lodash.isequal': - specifier: ^4.5.5 - version: 4.5.5 blake2b: specifier: ^2.1.3 version: 2.1.3 js-xxhash: specifier: ^1.0.4 version: 1.0.4 - lodash.isequal: - specifier: ^4.5.0 - version: 4.5.0 devDependencies: jsbi: specifier: ^4.1.0 @@ -268,6 +328,24 @@ importers: specifier: ^1.1.1 version: 1.1.1 + packages/crypto: + dependencies: + '@noble/hashes': + specifier: 1.3.1 + version: 1.3.1 + '@noble/secp256k1': + specifier: 2.0.0 + version: 2.0.0 + '@types/aes-js': + specifier: ^3.1.1 + version: 3.1.4 + browserify-aes: + specifier: ^1.2.0 + version: 1.2.0 + scrypt-js: + specifier: ^3.0.1 + version: 3.0.1 + packages/debugger: dependencies: '@ckb-lumos/base': @@ -413,9 +491,15 @@ importers: '@ckb-lumos/bi': specifier: 0.21.0-next.3 version: link:../bi + '@ckb-lumos/codec': + specifier: 0.21.0-next.3 + version: link:../codec + '@ckb-lumos/crypto': + specifier: 0.21.0-next.3 + version: link:../crypto bn.js: - specifier: ^5.1.3 - version: 5.1.3 + specifier: ^4.11.6 + version: 4.12.0 elliptic: specifier: ^6.5.4 version: 6.5.4 @@ -561,15 +645,9 @@ importers: buffer: specifier: ^6.0.3 version: 6.0.3 - crypto-browserify: - specifier: ^3.12.0 - version: 3.12.0 fork-ts-checker-webpack-plugin: specifier: ^6.4.0 version: 6.4.0(eslint@8.40.0)(typescript@5.0.4)(webpack@5.64.1) - ts-loader: - specifier: ^9.2.6 - version: 9.2.6(typescript@5.0.4)(webpack@5.64.1) unminified-webpack-plugin: specifier: ^3.0.0 version: 3.0.0(webpack@5.64.1) @@ -626,9 +704,6 @@ importers: '@types/nock': specifier: ^11.1.0 version: 11.1.0 - express: - specifier: ^4.18.1 - version: 4.18.1 jest: specifier: ^28.1.3 version: 28.1.3(@types/node@20.1.0)(ts-node@10.9.1) @@ -751,13 +826,6 @@ importers: immutable: specifier: ^4.3.0 version: 4.3.0 - devDependencies: - '@types/sinon': - specifier: ^10.0.14 - version: 10.0.14 - sinon: - specifier: ^15.0.4 - version: 15.0.4 packages/utils: {} @@ -1369,7 +1437,6 @@ packages: /@babel/helper-plugin-utils@7.22.5: resolution: {integrity: sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==} engines: {node: '>=6.9.0'} - dev: false /@babel/helper-remap-async-to-generator@7.18.9(@babel/core@7.16.7): resolution: {integrity: sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA==} @@ -1892,7 +1959,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.16.7 - '@babel/helper-plugin-utils': 7.21.5 + '@babel/helper-plugin-utils': 7.22.5 dev: true /@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.23.3): @@ -1901,7 +1968,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.3 - '@babel/helper-plugin-utils': 7.21.5 + '@babel/helper-plugin-utils': 7.22.5 dev: false /@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.16.7): @@ -2872,7 +2939,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.23.3 - '@babel/helper-plugin-utils': 7.21.5 + '@babel/helper-plugin-utils': 7.22.5 dev: false /@babel/plugin-transform-react-display-name@7.23.3(@babel/core@7.23.3): @@ -4012,7 +4079,7 @@ packages: update-notifier: 6.0.2 url-loader: 4.1.1(file-loader@6.2.0)(webpack@5.89.0) wait-on: 7.2.0 - webpack: 5.89.0 + webpack: 5.89.0(webpack-cli@4.9.1) webpack-bundle-analyzer: 4.10.1 webpack-dev-server: 4.15.1(webpack@5.89.0) webpack-merge: 5.10.0 @@ -4088,7 +4155,7 @@ packages: unist-util-visit: 5.0.0 url-loader: 4.1.1(file-loader@6.2.0)(webpack@5.89.0) vfile: 6.0.1 - webpack: 5.89.0 + webpack: 5.89.0(webpack-cli@4.9.1) transitivePeerDependencies: - '@docusaurus/types' - '@swc/core' @@ -4145,7 +4212,7 @@ packages: tslib: 2.6.2 unist-util-visit: 5.0.0 utility-types: 3.10.0 - webpack: 5.89.0 + webpack: 5.89.0(webpack-cli@4.9.1) transitivePeerDependencies: - '@parcel/css' - '@swc/core' @@ -4187,7 +4254,7 @@ packages: react-dom: 18.2.0(react@18.2.0) tslib: 2.6.2 utility-types: 3.10.0 - webpack: 5.89.0 + webpack: 5.89.0(webpack-cli@4.9.1) transitivePeerDependencies: - '@parcel/css' - '@swc/core' @@ -4222,7 +4289,7 @@ packages: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) tslib: 2.6.2 - webpack: 5.89.0 + webpack: 5.89.0(webpack-cli@4.9.1) transitivePeerDependencies: - '@parcel/css' - '@swc/core' @@ -4624,7 +4691,7 @@ packages: react-dom: 18.2.0(react@18.2.0) react-helmet-async: 1.3.0(react-dom@18.2.0)(react@18.2.0) utility-types: 3.10.0 - webpack: 5.89.0 + webpack: 5.89.0(webpack-cli@4.9.1) webpack-merge: 5.10.0 transitivePeerDependencies: - '@swc/core' @@ -4689,7 +4756,7 @@ packages: shelljs: 0.8.5 tslib: 2.6.2 url-loader: 4.1.1(file-loader@6.2.0)(webpack@5.89.0) - webpack: 5.89.0 + webpack: 5.89.0(webpack-cli@4.9.1) transitivePeerDependencies: - '@swc/core' - esbuild @@ -5436,6 +5503,15 @@ packages: dev: true optional: true + /@noble/hashes@1.3.1: + resolution: {integrity: sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==} + engines: {node: '>= 16'} + dev: false + + /@noble/secp256k1@2.0.0: + resolution: {integrity: sha512-rUGBd95e2a45rlmFTqQJYEFA4/gdIARFfuTuTqLglz0PZ6AKyzyXsEZZq7UZn8hZsvaBgpCzKKBJizT2cJERXw==} + dev: false + /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -5477,7 +5553,6 @@ packages: /@polka/url@1.0.0-next.21: resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==} - dev: false /@popperjs/core@2.11.7: resolution: {integrity: sha512-Cr4OjIkipTtcXKjAsm8agyleBuDHvxzeBoa1v543lbv1YaIwQjESsVcmjiWiPEbC1FIeHOG/Op9kdCmAmiS3Kw==} @@ -5794,6 +5869,10 @@ packages: '@types/estree': 1.0.1 dev: false + /@types/aes-js@3.1.4: + resolution: {integrity: sha512-v3D66IptpUqh+pHKVNRxY8yvp2ESSZXe0rTzsGdzUhEwag7ljVfgCllkWv2YgiYXDhWFBrEywll4A5JToyTNFA==} + dev: false + /@types/babel__core@7.20.0: resolution: {integrity: sha512-+n8dL/9GWblDO0iU6eZAwEIJVr5DWigtle+Q6HLOrh/pdbXOhOtqzq8VPPE2zvNJzSKY4vH/z3iT3tn0A3ypiQ==} dependencies: @@ -6054,12 +6133,6 @@ packages: shell-exec: 1.0.2 dev: false - /@types/lodash.isequal@4.5.5: - resolution: {integrity: sha512-4IKbinG7MGP131wRfceK6W4E/Qt3qssEFLF30LnJbjYiSfHGGRU/Io8YxXrZX109ir+iDETC8hw8QsDijukUVg==} - dependencies: - '@types/lodash': 4.14.194 - dev: false - /@types/lodash.uniqby@4.7.7: resolution: {integrity: sha512-sv2g6vkCIvEUsK5/Vq17haoZaisfj2EWW8mP7QWlnKi6dByoNmeuHDDXHR7sabuDqwO4gvU7ModIL22MmnOocg==} dependencies: @@ -6283,22 +6356,12 @@ packages: '@types/node': 20.1.0 dev: true - /@types/sinon@10.0.14: - resolution: {integrity: sha512-mn72up6cjaMyMuaPaa/AwKf6WtsSRysQC7wxFkCm1XcOKXPM1z+5Y4H5wjIVBz4gdAkjvZxVVfjA6ba1nHr5WQ==} - dependencies: - '@types/sinonjs__fake-timers': 8.1.2 - dev: true - /@types/sinon@10.0.6: resolution: {integrity: sha512-6EF+wzMWvBNeGrfP3Nx60hhx+FfwSg1JJBLAAP/IdIUq0EYkqCYf70VT3PhuhPX9eLD+Dp+lNdpb/ZeHG8Yezg==} dependencies: '@sinonjs/fake-timers': 7.1.2 dev: true - /@types/sinonjs__fake-timers@8.1.2: - resolution: {integrity: sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==} - dev: true - /@types/sockjs@0.3.33: resolution: {integrity: sha512-f0KEEe05NvUnat+boPTZ0dgaLZ4SfSouXUgv5noUiefG2ajgKjmETo9ZJyuqsl7dfl2aHlLJUiki6B4ZYldiiw==} dependencies: @@ -6325,6 +6388,19 @@ packages: resolution: {integrity: sha512-eQ9qFW/fhfGJF8WKHGEHZEyVWfZxrT+6CLIJGBcZPfxUh/+BnEj+UCGYMlr9qZuX/2AltsvwrGqp0LhEW8D0zQ==} dev: true + /@types/webpack-bundle-analyzer@4.6.3(webpack-cli@4.9.1): + resolution: {integrity: sha512-XYU3m7oRb1tlE8YhwkKLi1xba2buNB9V4VkQtOVTfJuUm/413pE/UCMVcPDFFBwpzGkr9y1WbSEvdPjKVPt0gw==} + dependencies: + '@types/node': 20.9.0 + tapable: 2.2.1 + webpack: 5.89.0(webpack-cli@4.9.1) + transitivePeerDependencies: + - '@swc/core' + - esbuild + - uglify-js + - webpack-cli + dev: false + /@types/ws@8.5.10: resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==} dependencies: @@ -6680,14 +6756,22 @@ packages: webpack-cli: 4.9.1(webpack@5.64.1) dev: true + /@webpack-cli/configtest@1.2.0(webpack-cli@4.9.1)(webpack@5.89.0): + resolution: {integrity: sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==} + peerDependencies: + webpack: 4.x.x || 5.x.x + webpack-cli: 4.x.x + dependencies: + webpack: 5.89.0(webpack-cli@4.9.1) + webpack-cli: 4.9.1(webpack-bundle-analyzer@4.10.1)(webpack@5.89.0) + /@webpack-cli/info@1.5.0(webpack-cli@4.9.1): resolution: {integrity: sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==} peerDependencies: webpack-cli: 4.x.x dependencies: envinfo: 7.8.1 - webpack-cli: 4.9.1(webpack@5.64.1) - dev: true + webpack-cli: 4.9.1(webpack-bundle-analyzer@4.10.1)(webpack@5.89.0) /@webpack-cli/serve@1.7.0(webpack-cli@4.9.1): resolution: {integrity: sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==} @@ -6698,8 +6782,7 @@ packages: webpack-dev-server: optional: true dependencies: - webpack-cli: 4.9.1(webpack@5.64.1) - dev: true + webpack-cli: 4.9.1(webpack-bundle-analyzer@4.10.1)(webpack@5.89.0) /@xtuc/ieee754@1.2.0: resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==} @@ -6728,6 +6811,7 @@ packages: dependencies: mime-types: 2.1.35 negotiator: 0.6.3 + dev: false /acorn-import-assertions@1.8.0(acorn@8.8.2): resolution: {integrity: sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==} @@ -6960,6 +7044,7 @@ packages: /array-flatten@1.1.1: resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} + dev: false /array-flatten@2.1.2: resolution: {integrity: sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==} @@ -7023,15 +7108,6 @@ packages: resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==} dev: false - /asn1.js@5.4.1: - resolution: {integrity: sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==} - dependencies: - bn.js: 4.12.0 - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - safer-buffer: 2.1.2 - dev: true - /asn1@0.2.6: resolution: {integrity: sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==} dependencies: @@ -7067,7 +7143,7 @@ packages: peerDependencies: postcss: ^8.1.0 dependencies: - browserslist: 4.21.5 + browserslist: 4.22.1 caniuse-lite: 1.0.30001486 fraction.js: 4.2.0 normalize-range: 0.1.2 @@ -7191,9 +7267,18 @@ packages: '@babel/core': 7.23.3 find-cache-dir: 4.0.0 schema-utils: 4.0.1 - webpack: 5.89.0 + webpack: 5.89.0(webpack-cli@4.9.1) dev: false + /babel-plugin-add-import-extension@1.6.0(@babel/core@7.16.7): + resolution: {integrity: sha512-JVSQPMzNzN/S4wPRoKQ7+u8PlkV//BPUMnfWVbr63zcE+6yHdU2Mblz10Vf7qe+6Rmu4svF5jG7JxdcPi9VvKg==} + peerDependencies: + '@babel/core': '>=7.0.0' + dependencies: + '@babel/core': 7.16.7 + '@babel/helper-plugin-utils': 7.22.5 + dev: true + /babel-plugin-dynamic-import-node@2.3.3: resolution: {integrity: sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==} dependencies: @@ -7404,9 +7489,7 @@ packages: /bn.js@4.12.0: resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==} - - /bn.js@5.1.3: - resolution: {integrity: sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==} + dev: false /body-parser@1.19.0: resolution: {integrity: sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==} @@ -7426,26 +7509,6 @@ packages: - supports-color dev: false - /body-parser@1.20.0: - resolution: {integrity: sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==} - engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} - dependencies: - bytes: 3.1.2 - content-type: 1.0.5 - debug: 2.6.9 - depd: 2.0.0 - destroy: 1.2.0 - http-errors: 2.0.0 - iconv-lite: 0.4.24 - on-finished: 2.4.1 - qs: 6.10.3 - raw-body: 2.5.1 - type-is: 1.6.18 - unpipe: 1.0.0 - transitivePeerDependencies: - - supports-color - dev: true - /body-parser@1.20.1: resolution: {integrity: sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} @@ -7531,7 +7594,6 @@ packages: resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} dependencies: balanced-match: 1.0.2 - dev: true /braces@3.0.2: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} @@ -7547,6 +7609,7 @@ packages: /brorand@1.1.0: resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} + dev: false /browserify-aes@1.2.0: resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} @@ -7557,45 +7620,7 @@ packages: evp_bytestokey: 1.0.3 inherits: 2.0.4 safe-buffer: 5.2.1 - dev: true - - /browserify-cipher@1.0.1: - resolution: {integrity: sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==} - dependencies: - browserify-aes: 1.2.0 - browserify-des: 1.0.2 - evp_bytestokey: 1.0.3 - dev: true - - /browserify-des@1.0.2: - resolution: {integrity: sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==} - dependencies: - cipher-base: 1.0.4 - des.js: 1.0.1 - inherits: 2.0.4 - safe-buffer: 5.2.1 - dev: true - - /browserify-rsa@4.1.0: - resolution: {integrity: sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==} - dependencies: - bn.js: 5.1.3 - randombytes: 2.1.0 - dev: true - - /browserify-sign@4.2.1: - resolution: {integrity: sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==} - dependencies: - bn.js: 5.1.3 - browserify-rsa: 4.1.0 - create-hash: 1.2.0 - create-hmac: 1.1.7 - elliptic: 6.5.4 - inherits: 2.0.4 - parse-asn1: 5.1.6 - readable-stream: 3.6.2 - safe-buffer: 5.2.1 - dev: true + dev: false /browserslist@4.21.5: resolution: {integrity: sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==} @@ -7606,6 +7631,7 @@ packages: electron-to-chromium: 1.4.385 node-releases: 2.0.10 update-browserslist-db: 1.0.11(browserslist@4.21.5) + dev: true /browserslist@4.22.1: resolution: {integrity: sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==} @@ -7647,7 +7673,7 @@ packages: /buffer-xor@1.0.3: resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} - dev: true + dev: false /buffer@5.6.0: resolution: {integrity: sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==} @@ -7676,6 +7702,7 @@ packages: /bytes@3.1.2: resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} engines: {node: '>= 0.8'} + dev: false /c8@7.10.0: resolution: {integrity: sha512-OAwfC5+emvA6R7pkYFVBTOtI5ruf9DahffGmIqUc9l6wEh0h7iAFP6dt/V9Ioqlr2zW5avX9U9/w1I4alTRHkA==} @@ -7782,7 +7809,7 @@ packages: /caniuse-api@3.0.0: resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==} dependencies: - browserslist: 4.21.5 + browserslist: 4.22.1 caniuse-lite: 1.0.30001486 lodash.memoize: 4.1.2 lodash.uniq: 4.5.0 @@ -7917,7 +7944,7 @@ packages: dependencies: inherits: 2.0.4 safe-buffer: 5.2.1 - dev: true + dev: false /cjs-module-lexer@1.2.2: resolution: {integrity: sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==} @@ -8009,7 +8036,6 @@ packages: string-width: 4.2.3 strip-ansi: 6.0.1 wrap-ansi: 7.0.0 - dev: true /clone-deep@4.0.1: resolution: {integrity: sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==} @@ -8249,10 +8275,12 @@ packages: engines: {node: '>= 0.6'} dependencies: safe-buffer: 5.2.1 + dev: false /content-type@1.0.5: resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} engines: {node: '>= 0.6'} + dev: false /conventional-changelog-angular@5.0.13: resolution: {integrity: sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA==} @@ -8297,10 +8325,12 @@ packages: /cookie-signature@1.0.6: resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} + dev: false /cookie@0.5.0: resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} engines: {node: '>= 0.6'} + dev: false /copy-text-to-clipboard@3.2.0: resolution: {integrity: sha512-RnJFp1XR/LOBDckxTib5Qjr/PMfkatD0MUCQgdpqS8MdKiNUzBjAQBEN6oUy+jW7LI93BBG3DtMB2KOOKpGs2Q==} @@ -8319,7 +8349,7 @@ packages: normalize-path: 3.0.0 schema-utils: 4.0.1 serialize-javascript: 6.0.1 - webpack: 5.89.0 + webpack: 5.89.0(webpack-cli@4.9.1) dev: false /core-js-compat@3.30.2: @@ -8405,13 +8435,6 @@ packages: typescript: 5.0.4 dev: false - /create-ecdh@4.0.4: - resolution: {integrity: sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==} - dependencies: - bn.js: 4.12.0 - elliptic: 6.5.4 - dev: true - /create-hash@1.2.0: resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} dependencies: @@ -8420,18 +8443,7 @@ packages: md5.js: 1.3.5 ripemd160: 2.0.2 sha.js: 2.4.11 - dev: true - - /create-hmac@1.1.7: - resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==} - dependencies: - cipher-base: 1.0.4 - create-hash: 1.2.0 - inherits: 2.0.4 - ripemd160: 2.0.2 - safe-buffer: 5.2.1 - sha.js: 2.4.11 - dev: true + dev: false /create-require@1.1.1: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} @@ -8472,22 +8484,6 @@ packages: shebang-command: 2.0.0 which: 2.0.2 - /crypto-browserify@3.12.0: - resolution: {integrity: sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==} - dependencies: - browserify-cipher: 1.0.1 - browserify-sign: 4.2.1 - create-ecdh: 4.0.4 - create-hash: 1.2.0 - create-hmac: 1.1.7 - diffie-hellman: 5.0.3 - inherits: 2.0.4 - pbkdf2: 3.1.2 - public-encrypt: 4.0.3 - randombytes: 2.1.0 - randomfill: 1.0.4 - dev: true - /crypto-random-string@2.0.0: resolution: {integrity: sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==} engines: {node: '>=8'} @@ -8523,7 +8519,7 @@ packages: postcss-modules-values: 4.0.0(postcss@8.4.31) postcss-value-parser: 4.2.0 semver: 7.5.4 - webpack: 5.89.0 + webpack: 5.89.0(webpack-cli@4.9.1) dev: false /css-minimizer-webpack-plugin@4.2.2(clean-css@5.3.2)(webpack@5.89.0): @@ -8558,7 +8554,7 @@ packages: schema-utils: 4.0.1 serialize-javascript: 6.0.1 source-map: 0.6.1 - webpack: 5.89.0 + webpack: 5.89.0(webpack-cli@4.9.1) dev: false /css-select@4.3.0: @@ -8737,7 +8733,6 @@ packages: /debounce@1.2.1: resolution: {integrity: sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==} - dev: false /debug@2.6.9: resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} @@ -8955,22 +8950,17 @@ packages: /depd@2.0.0: resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} engines: {node: '>= 0.8'} + dev: false /dequal@2.0.3: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} dev: false - /des.js@1.0.1: - resolution: {integrity: sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==} - dependencies: - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - dev: true - /destroy@1.2.0: resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + dev: false /detect-indent@6.1.0: resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} @@ -9033,14 +9023,6 @@ packages: engines: {node: '>=0.3.1'} dev: true - /diffie-hellman@5.0.3: - resolution: {integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==} - dependencies: - bn.js: 4.12.0 - miller-rabin: 4.0.1 - randombytes: 2.1.0 - dev: true - /dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -9191,7 +9173,6 @@ packages: /duplexer@0.1.2: resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} - dev: false /eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} @@ -9205,9 +9186,11 @@ packages: /ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} + dev: false /electron-to-chromium@1.4.385: resolution: {integrity: sha512-L9zlje9bIw0h+CwPQumiuVlfMcV4boxRjFIWDcLfFqTZNbkwOExBzfmswytHawObQX4OUhtNv8gIiB21kOurIg==} + dev: true /electron-to-chromium@1.4.593: resolution: {integrity: sha512-c7+Hhj87zWmdpmjDONbvNKNo24tvmD4mjal1+qqTYTrlF0/sNpAcDlU0Ki84ftA/5yj3BF2QhSGEC0Rky6larg==} @@ -9222,6 +9205,7 @@ packages: inherits: 2.0.4 minimalistic-assert: 1.0.1 minimalistic-crypto-utils: 1.0.1 + dev: false /emittery@0.10.2: resolution: {integrity: sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw==} @@ -9255,6 +9239,7 @@ packages: /encodeurl@1.0.2: resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} engines: {node: '>= 0.8'} + dev: false /end-of-stream@1.4.4: resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} @@ -9301,7 +9286,6 @@ packages: resolution: {integrity: sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==} engines: {node: '>=4'} hasBin: true - dev: true /equal-length@1.0.1: resolution: {integrity: sha512-TK2m7MvWPt/v3dan0BCNp99pytIE5UGrUj7F0KZirNX8xz8fDFUAZfgm8uB5FuQq9u0sMeDocYBfEhsd1nwGoA==} @@ -9400,6 +9384,7 @@ packages: /escape-html@1.0.3: resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} + dev: false /escape-string-regexp@1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} @@ -9690,6 +9675,7 @@ packages: /etag@1.8.1: resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} engines: {node: '>= 0.6'} + dev: false /eval@0.1.8: resolution: {integrity: sha512-EzV94NYKoO09GLXGjXj9JIlXijVck4ONSr5wiCWDvhsvj5jxSrzTmRU/9C1DyB6uToszLs8aifA6NQ7lEQdvFw==} @@ -9717,7 +9703,7 @@ packages: dependencies: md5.js: 1.3.5 safe-buffer: 5.2.1 - dev: true + dev: false /execa@5.1.1: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} @@ -9760,45 +9746,6 @@ packages: jest-util: 29.5.0 dev: true - /express@4.18.1: - resolution: {integrity: sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==} - engines: {node: '>= 0.10.0'} - dependencies: - accepts: 1.3.8 - array-flatten: 1.1.1 - body-parser: 1.20.0 - content-disposition: 0.5.4 - content-type: 1.0.5 - cookie: 0.5.0 - cookie-signature: 1.0.6 - debug: 2.6.9 - depd: 2.0.0 - encodeurl: 1.0.2 - escape-html: 1.0.3 - etag: 1.8.1 - finalhandler: 1.2.0 - fresh: 0.5.2 - http-errors: 2.0.0 - merge-descriptors: 1.0.1 - methods: 1.1.2 - on-finished: 2.4.1 - parseurl: 1.3.3 - path-to-regexp: 0.1.7 - proxy-addr: 2.0.7 - qs: 6.10.3 - range-parser: 1.2.1 - safe-buffer: 5.2.1 - send: 0.18.0 - serve-static: 1.15.0 - setprototypeof: 1.2.0 - statuses: 2.0.1 - type-is: 1.6.18 - utils-merge: 1.0.1 - vary: 1.1.2 - transitivePeerDependencies: - - supports-color - dev: true - /express@4.18.2: resolution: {integrity: sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==} engines: {node: '>= 0.10.0'} @@ -9913,7 +9860,6 @@ packages: /fastest-levenshtein@1.0.16: resolution: {integrity: sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==} engines: {node: '>= 4.9.1'} - dev: true /fastq@1.15.0: resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} @@ -9998,8 +9944,8 @@ packages: webpack: ^4.0.0 || ^5.0.0 dependencies: loader-utils: 2.0.4 - schema-utils: 3.1.2 - webpack: 5.89.0 + schema-utils: 3.3.0 + webpack: 5.89.0(webpack-cli@4.9.1) dev: false /file-type@11.1.0: @@ -10065,6 +10011,7 @@ packages: unpipe: 1.0.0 transitivePeerDependencies: - supports-color + dev: false /find-cache-dir@4.0.0: resolution: {integrity: sha512-9ZonPT4ZAK4a+1pUPVPZJapbi7O5qbbJPdYw/NOQWZZbVLdDTYM3A4R9z/DpAM08IDaFGsvPgiGZ82WEwUDWjg==} @@ -10101,7 +10048,6 @@ packages: dependencies: locate-path: 5.0.0 path-exists: 4.0.0 - dev: true /find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} @@ -10225,7 +10171,7 @@ packages: vue-template-compiler: optional: true dependencies: - '@babel/code-frame': 7.21.4 + '@babel/code-frame': 7.23.4 '@types/json-schema': 7.0.11 chalk: 4.1.2 chokidar: 3.5.3 @@ -10240,7 +10186,7 @@ packages: semver: 7.5.4 tapable: 1.1.3 typescript: 5.0.4 - webpack: 5.89.0 + webpack: 5.89.0(webpack-cli@4.9.1) dev: false /form-data-encoder@2.1.4: @@ -10283,6 +10229,7 @@ packages: /forwarded@0.2.0: resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} engines: {node: '>= 0.6'} + dev: false /fraction.js@4.2.0: resolution: {integrity: sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==} @@ -10291,6 +10238,7 @@ packages: /fresh@0.5.2: resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} + dev: false /from2@2.3.0: resolution: {integrity: sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==} @@ -10389,7 +10337,6 @@ packages: /get-caller-file@2.0.5: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} - dev: true /get-intrinsic@1.2.0: resolution: {integrity: sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==} @@ -10678,7 +10625,6 @@ packages: engines: {node: '>=10'} dependencies: duplexer: 0.1.2 - dev: false /handle-thing@2.0.1: resolution: {integrity: sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==} @@ -10769,13 +10715,14 @@ packages: inherits: 2.0.4 readable-stream: 3.6.2 safe-buffer: 5.2.1 - dev: true + dev: false /hash.js@1.1.7: resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} dependencies: inherits: 2.0.4 minimalistic-assert: 1.0.1 + dev: false /hast-util-from-parse5@8.0.1: resolution: {integrity: sha512-Er/Iixbc7IEa7r/XLtuG52zoqn/b3Xng/w6aZQ0xGVxzhw5xUFxcRqdPzP6yFi/4HBYRaifaI5fQ1RH8n0ZeOQ==} @@ -10907,6 +10854,7 @@ packages: hash.js: 1.1.7 minimalistic-assert: 1.0.1 minimalistic-crypto-utils: 1.0.1 + dev: false /hoist-non-react-statics@3.3.2: resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==} @@ -10994,7 +10942,7 @@ packages: lodash: 4.17.21 pretty-error: 4.0.0 tapable: 2.2.1 - webpack: 5.89.0 + webpack: 5.89.0(webpack-cli@4.9.1) dev: false /htmlparser2@6.1.0: @@ -11056,6 +11004,7 @@ packages: setprototypeof: 1.2.0 statuses: 2.0.1 toidentifier: 1.0.1 + dev: false /http-parser-js@0.5.8: resolution: {integrity: sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==} @@ -11188,7 +11137,6 @@ packages: dependencies: pkg-dir: 4.2.0 resolve-cwd: 3.0.0 - dev: true /imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} @@ -11253,7 +11201,6 @@ packages: /interpret@2.2.0: resolution: {integrity: sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==} engines: {node: '>= 0.10'} - dev: true /into-stream@3.1.0: resolution: {integrity: sha512-TcdjPibTksa1NQximqep2r17ISRiNE9fwlfbg3F8ANdvP5/yrFTew86VcO//jk4QTaMlbjypPBq76HN2zaKfZQ==} @@ -11271,6 +11218,7 @@ packages: /ipaddr.js@1.9.1: resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} engines: {node: '>= 0.10'} + dev: false /ipaddr.js@2.0.1: resolution: {integrity: sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng==} @@ -11505,7 +11453,6 @@ packages: /is-plain-object@5.0.0: resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==} engines: {node: '>=0.10.0'} - dev: false /is-promise@4.0.0: resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==} @@ -12567,7 +12514,6 @@ packages: engines: {node: '>=8'} dependencies: p-locate: 4.1.0 - dev: true /locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} @@ -12605,10 +12551,6 @@ packages: resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} dev: true - /lodash.isequal@4.5.0: - resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} - dev: false - /lodash.islength@4.0.1: resolution: {integrity: sha512-FlJtdcHNU8YEXbzZXYWMEHLkQOpvmlnGr5o2N1iQKB7hNyr6qPkWAe+Ceczz6JYlIzD4AlTD2igvt/2/0Pb3Zw==} dev: true @@ -12803,7 +12745,7 @@ packages: hash-base: 3.1.0 inherits: 2.0.4 safe-buffer: 5.2.1 - dev: true + dev: false /mdast-util-directive@3.0.0: resolution: {integrity: sha512-JUpYOqKI4mM3sZcNxmF/ox04XYFFkNwr0CFlrQIkCwbvH0xzMCqkMqAde9wRd80VAhaUrwFwKm2nxretdT1h7Q==} @@ -13034,6 +12976,7 @@ packages: /media-typer@0.3.0: resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} + dev: false /mem@6.1.1: resolution: {integrity: sha512-Ci6bIfq/UgcxPTYa8dQQ5FY3BzKkT894bwXWXxC/zqs0XgMO2cT20CGkOqda7gZNkmK5VP4x89IGZ6K7hfbn3Q==} @@ -13090,6 +13033,7 @@ packages: /merge-descriptors@1.0.1: resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==} + dev: false /merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} @@ -13101,6 +13045,7 @@ packages: /methods@1.1.2: resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==} engines: {node: '>= 0.6'} + dev: false /micromark-core-commonmark@2.0.0: resolution: {integrity: sha512-jThOz/pVmAYUtkroV3D5c1osFXAMv9e0ypGDOIZuCeAe91/sD6BoE2Sjzt30yuXtwOYUmySOhMas/PVyh02itA==} @@ -13486,14 +13431,6 @@ packages: braces: 3.0.2 picomatch: 2.3.1 - /miller-rabin@4.0.1: - resolution: {integrity: sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==} - hasBin: true - dependencies: - bn.js: 4.12.0 - brorand: 1.1.0 - dev: true - /mime-db@1.33.0: resolution: {integrity: sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==} engines: {node: '>= 0.6'} @@ -13520,6 +13457,7 @@ packages: resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} engines: {node: '>=4'} hasBin: true + dev: false /mimic-fn@2.1.0: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} @@ -13556,14 +13494,16 @@ packages: webpack: ^5.0.0 dependencies: schema-utils: 4.0.1 - webpack: 5.89.0 + webpack: 5.89.0(webpack-cli@4.9.1) dev: false /minimalistic-assert@1.0.1: resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} + dev: false /minimalistic-crypto-utils@1.0.1: resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} + dev: false /minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} @@ -13577,6 +13517,13 @@ packages: brace-expansion: 2.0.1 dev: true + /minimatch@9.0.3: + resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + brace-expansion: 2.0.1 + dev: false + /minimist-options@4.1.0: resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} engines: {node: '>= 6'} @@ -13601,7 +13548,6 @@ packages: /mrmime@1.0.1: resolution: {integrity: sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==} engines: {node: '>=10'} - dev: false /ms@2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} @@ -13654,6 +13600,7 @@ packages: /negotiator@0.6.3: resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} engines: {node: '>= 0.6'} + dev: false /neo-async@2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} @@ -13744,6 +13691,7 @@ packages: /node-releases@2.0.10: resolution: {integrity: sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==} + dev: true /node-releases@2.0.13: resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} @@ -13915,6 +13863,7 @@ packages: engines: {node: '>= 0.8'} dependencies: ee-first: 1.1.1 + dev: false /on-headers@1.0.2: resolution: {integrity: sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==} @@ -13944,7 +13893,6 @@ packages: /opener@1.5.2: resolution: {integrity: sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==} hasBin: true - dev: false /optionator@0.9.1: resolution: {integrity: sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==} @@ -14054,7 +14002,6 @@ packages: engines: {node: '>=8'} dependencies: p-limit: 2.3.0 - dev: true /p-locate@5.0.0: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} @@ -14139,16 +14086,6 @@ packages: dependencies: callsites: 3.1.0 - /parse-asn1@5.1.6: - resolution: {integrity: sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==} - dependencies: - asn1.js: 5.4.1 - browserify-aes: 1.2.0 - evp_bytestokey: 1.0.3 - pbkdf2: 3.1.2 - safe-buffer: 5.2.1 - dev: true - /parse-entities@4.0.1: resolution: {integrity: sha512-SWzvYcSJh4d/SGLIOQfZ/CoNv6BTlI6YEQ7Nj82oDVnRpwe/Z/F1EMx42x3JAOwGBlCjeCH0BRJQbQ/opHL17w==} dependencies: @@ -14204,6 +14141,7 @@ packages: /parseurl@1.3.3: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} + dev: false /pascal-case@3.1.2: resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==} @@ -14247,6 +14185,7 @@ packages: /path-to-regexp@0.1.7: resolution: {integrity: sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==} + dev: false /path-to-regexp@1.8.0: resolution: {integrity: sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==} @@ -14268,17 +14207,6 @@ packages: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} - /pbkdf2@3.1.2: - resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==} - engines: {node: '>=0.12'} - dependencies: - create-hash: 1.2.0 - create-hmac: 1.1.7 - ripemd160: 2.0.2 - safe-buffer: 5.2.1 - sha.js: 2.4.11 - dev: true - /pend@1.2.0: resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} dev: false @@ -14351,7 +14279,6 @@ packages: engines: {node: '>=8'} dependencies: find-up: 4.1.0 - dev: true /pkg-dir@7.0.0: resolution: {integrity: sha512-Ie9z/WINcxxLp27BKOCHGde4ITq9UklYKDzVo1nhk5sqGEXU3FpkwP5GM2voTGJkGd9B3Otl+Q4uwSOeSUtOBA==} @@ -14390,7 +14317,7 @@ packages: peerDependencies: postcss: ^8.2.15 dependencies: - browserslist: 4.21.5 + browserslist: 4.22.1 caniuse-api: 3.0.0 colord: 2.9.3 postcss: 8.4.31 @@ -14403,7 +14330,7 @@ packages: peerDependencies: postcss: ^8.2.15 dependencies: - browserslist: 4.21.5 + browserslist: 4.22.1 postcss: 8.4.31 postcss-value-parser: 4.2.0 dev: false @@ -14465,7 +14392,7 @@ packages: jiti: 1.18.2 postcss: 8.4.31 semver: 7.5.4 - webpack: 5.89.0 + webpack: 5.89.0(webpack-cli@4.9.1) transitivePeerDependencies: - typescript dev: false @@ -14498,7 +14425,7 @@ packages: peerDependencies: postcss: ^8.2.15 dependencies: - browserslist: 4.21.5 + browserslist: 4.22.1 caniuse-api: 3.0.0 cssnano-utils: 3.1.0(postcss@8.4.31) postcss: 8.4.31 @@ -14533,7 +14460,7 @@ packages: peerDependencies: postcss: ^8.2.15 dependencies: - browserslist: 4.21.5 + browserslist: 4.22.1 cssnano-utils: 3.1.0(postcss@8.4.31) postcss: 8.4.31 postcss-value-parser: 4.2.0 @@ -14655,7 +14582,7 @@ packages: peerDependencies: postcss: ^8.2.15 dependencies: - browserslist: 4.21.5 + browserslist: 4.22.1 postcss: 8.4.31 postcss-value-parser: 4.2.0 dev: false @@ -14708,7 +14635,7 @@ packages: peerDependencies: postcss: ^8.2.15 dependencies: - browserslist: 4.21.5 + browserslist: 4.22.1 caniuse-api: 3.0.0 postcss: 8.4.31 dev: false @@ -14920,6 +14847,7 @@ packages: dependencies: forwarded: 0.2.0 ipaddr.js: 1.9.1 + dev: false /proxy-from-env@1.1.0: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} @@ -14933,17 +14861,6 @@ packages: resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} dev: true - /public-encrypt@4.0.3: - resolution: {integrity: sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==} - dependencies: - bn.js: 4.12.0 - browserify-rsa: 4.1.0 - create-hash: 1.2.0 - parse-asn1: 5.1.6 - randombytes: 2.1.0 - safe-buffer: 5.2.1 - dev: true - /pump@3.0.0: resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} dependencies: @@ -14981,13 +14898,6 @@ packages: engines: {node: '>=0.6.0', teleport: '>=0.2.0'} dev: true - /qs@6.10.3: - resolution: {integrity: sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==} - engines: {node: '>=0.6'} - dependencies: - side-channel: 1.0.4 - dev: true - /qs@6.11.0: resolution: {integrity: sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==} engines: {node: '>=0.6'} @@ -15050,13 +14960,6 @@ packages: dependencies: safe-buffer: 5.2.1 - /randomfill@1.0.4: - resolution: {integrity: sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==} - dependencies: - randombytes: 2.1.0 - safe-buffer: 5.2.1 - dev: true - /range-parser@1.2.0: resolution: {integrity: sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A==} engines: {node: '>= 0.6'} @@ -15065,6 +14968,7 @@ packages: /range-parser@1.2.1: resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} engines: {node: '>= 0.6'} + dev: false /raw-body@2.4.0: resolution: {integrity: sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==} @@ -15084,6 +14988,7 @@ packages: http-errors: 2.0.0 iconv-lite: 0.4.24 unpipe: 1.0.0 + dev: false /rc@1.2.8: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} @@ -15125,9 +15030,9 @@ packages: typescript: optional: true dependencies: - '@babel/code-frame': 7.21.4 + '@babel/code-frame': 7.23.4 address: 1.2.2 - browserslist: 4.21.5 + browserslist: 4.22.1 chalk: 4.1.2 cross-spawn: 7.0.3 detect-port-alt: 1.1.6 @@ -15150,7 +15055,7 @@ packages: strip-ansi: 6.0.1 text-table: 0.2.0 typescript: 5.0.4 - webpack: 5.89.0 + webpack: 5.89.0(webpack-cli@4.9.1) transitivePeerDependencies: - eslint - supports-color @@ -15221,7 +15126,7 @@ packages: dependencies: '@babel/runtime': 7.23.4 react-loadable: /@docusaurus/react-loadable@5.5.2(react@18.2.0) - webpack: 5.89.0 + webpack: 5.89.0(webpack-cli@4.9.1) dev: false /react-router-config@5.1.1(react-router@5.3.4)(react@18.2.0): @@ -15380,7 +15285,6 @@ packages: engines: {node: '>= 0.10'} dependencies: resolve: 1.22.2 - dev: true /recursive-readdir@2.2.3: resolution: {integrity: sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA==} @@ -15616,7 +15520,6 @@ packages: /require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} - dev: true /require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} @@ -15644,7 +15547,6 @@ packages: engines: {node: '>=8'} dependencies: resolve-from: 5.0.0 - dev: true /resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} @@ -15653,7 +15555,6 @@ packages: /resolve-from@5.0.0: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} - dev: true /resolve-global@1.0.0: resolution: {integrity: sha512-zFa12V4OLtT5XUX/Q4VLvTfBf+Ok0SPc1FNGM/z9ctUdiU618qwKpWnd0CHs3+RqROfyEg/DhuHbMWYqcgljEw==} @@ -15742,7 +15643,7 @@ packages: dependencies: hash-base: 3.1.0 inherits: 2.0.4 - dev: true + dev: false /rtl-detect@1.0.4: resolution: {integrity: sha512-EBR4I2VDSSYr7PkBmFy04uhycIpDKp+21p/jARYXlCSjQksTBQcJ0HFUPOO79EPPH5JS6VAhiIQbycf0O3JAxQ==} @@ -15811,6 +15712,7 @@ packages: '@types/json-schema': 7.0.11 ajv: 6.12.6 ajv-keywords: 3.5.2(ajv@6.12.6) + dev: true /schema-utils@3.3.0: resolution: {integrity: sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==} @@ -15932,6 +15834,7 @@ packages: statuses: 2.0.1 transitivePeerDependencies: - supports-color + dev: false /serialize-error@2.1.0: resolution: {integrity: sha512-ghgmKt5o4Tly5yEG/UJp8qTd0AN7Xalw4XBtDEKP655B699qMEtra1WlXeE6WIvdEG481JvRxULKsInq/iNysw==} @@ -15981,6 +15884,7 @@ packages: send: 0.18.0 transitivePeerDependencies: - supports-color + dev: false /set-blocking@2.0.0: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} @@ -16000,6 +15904,7 @@ packages: /setprototypeof@1.2.0: resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} + dev: false /sha.js@2.4.11: resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} @@ -16007,7 +15912,7 @@ packages: dependencies: inherits: 2.0.4 safe-buffer: 5.2.1 - dev: true + dev: false /sha3@2.1.3: resolution: {integrity: sha512-Io53D4o9qOmf3Ow9p/DoGLQiQHhtuR0ulbyambvRSG+OX5yXExk2yYfvjHtb7AtOyk6K6+sPeK/qaowWc/E/GA==} @@ -16114,7 +16019,6 @@ packages: '@polka/url': 1.0.0-next.21 mrmime: 1.0.1 totalist: 3.0.1 - dev: false /sisteransi@1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} @@ -16363,6 +16267,7 @@ packages: /statuses@2.0.1: resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} engines: {node: '>= 0.8'} + dev: false /std-env@3.3.3: resolution: {integrity: sha512-Rz6yejtVyWnVjC1RFvNmYL10kgjC49EOghxWn0RFqlCHGFpQx+Xe7yW3I4ceK1SGrWIGMjD5Kbue8W/udkbMJg==} @@ -16560,7 +16465,7 @@ packages: peerDependencies: postcss: ^8.2.15 dependencies: - browserslist: 4.21.5 + browserslist: 4.22.1 postcss: 8.4.31 postcss-selector-parser: 6.0.12 dev: false @@ -16713,10 +16618,10 @@ packages: dependencies: '@jridgewell/trace-mapping': 0.3.18 jest-worker: 27.5.1 - schema-utils: 3.1.2 + schema-utils: 3.3.0 serialize-javascript: 6.0.1 terser: 5.17.1 - webpack: 5.89.0 + webpack: 5.89.0(webpack-cli@4.9.1) /terser@5.17.1: resolution: {integrity: sha512-hVl35zClmpisy6oaoKALOpS0rDYLxRFLHhRuDlEGTKey9qHjS1w9GMORjuwIMt70Wan4lwsLYyWDVnWgF+KUEw==} @@ -16814,11 +16719,11 @@ packages: /toidentifier@1.0.1: resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} engines: {node: '>=0.6'} + dev: false /totalist@3.0.1: resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} engines: {node: '>=6'} - dev: false /tough-cookie@2.5.0: resolution: {integrity: sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==} @@ -16856,20 +16761,21 @@ packages: resolution: {integrity: sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==} dev: false - /ts-loader@9.2.6(typescript@5.0.4)(webpack@5.64.1): - resolution: {integrity: sha512-QMTC4UFzHmu9wU2VHZEmWWE9cUajjfcdcws+Gh7FhiO+Dy0RnR1bNz0YCHqhI0yRowCE9arVnNxYHqELOy9Hjw==} + /ts-loader@9.5.1(typescript@5.0.4)(webpack@5.89.0): + resolution: {integrity: sha512-rNH3sK9kGZcH9dYzC7CewQm4NtxJTjSEVRJ2DyBZR7f8/wcta+iV44UPCXc5+nzDzivKtlzV6c9P4e+oFhDLYg==} engines: {node: '>=12.0.0'} peerDependencies: typescript: '*' webpack: ^5.0.0 dependencies: chalk: 4.1.2 - enhanced-resolve: 5.13.0 + enhanced-resolve: 5.15.0 micromatch: 4.0.5 - semver: 7.5.0 + semver: 7.5.4 + source-map: 0.7.4 typescript: 5.0.4 - webpack: 5.64.1(webpack-cli@4.9.1) - dev: true + webpack: 5.89.0(webpack-cli@4.9.1) + dev: false /ts-node@10.9.1(@types/node@20.1.0)(typescript@4.9.5): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} @@ -17048,6 +16954,7 @@ packages: dependencies: media-typer: 0.3.0 mime-types: 2.1.35 + dev: false /typed-array-length@1.0.4: resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} @@ -17224,9 +17131,19 @@ packages: webpack: 5.64.1(webpack-cli@4.9.1) dev: true + /unminified-webpack-plugin@3.0.0(webpack@5.89.0): + resolution: {integrity: sha512-XUUzicg2OMIrxYYJPfFBXU3wvmQL9SXDY+OCEHTB1FFoy6Im9vfFcO6tz29IUtGc8QdLvyqb0o7ua0YQ4P2+oQ==} + engines: {node: '>=10.0.0'} + peerDependencies: + webpack: ^5.36.2 + dependencies: + webpack: 5.89.0(webpack-cli@4.9.1) + dev: false + /unpipe@1.0.0: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} engines: {node: '>= 0.8'} + dev: false /update-browserslist-db@1.0.11(browserslist@4.21.5): resolution: {integrity: sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==} @@ -17237,6 +17154,7 @@ packages: browserslist: 4.21.5 escalade: 3.1.1 picocolors: 1.0.0 + dev: true /update-browserslist-db@1.0.13(browserslist@4.22.1): resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} @@ -17305,8 +17223,8 @@ packages: file-loader: 6.2.0(webpack@5.89.0) loader-utils: 2.0.4 mime-types: 2.1.35 - schema-utils: 3.1.2 - webpack: 5.89.0 + schema-utils: 3.3.0 + webpack: 5.89.0(webpack-cli@4.9.1) dev: false /url-parse-lax@3.0.0: @@ -17369,6 +17287,7 @@ packages: /utils-merge@1.0.1: resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} engines: {node: '>= 0.4.0'} + dev: false /uuid@3.4.0: resolution: {integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==} @@ -17422,6 +17341,7 @@ packages: /vary@1.1.2: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} + dev: false /verror@1.10.0: resolution: {integrity: sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==} @@ -17529,7 +17449,41 @@ packages: transitivePeerDependencies: - bufferutil - utf-8-validate - dev: false + + /webpack-cli@4.9.1(webpack-bundle-analyzer@4.10.1)(webpack@5.89.0): + resolution: {integrity: sha512-JYRFVuyFpzDxMDB+v/nanUdQYcZtqFPGzmlW4s+UkPMFhSpfRNmf1z4AwYcHJVdvEFAM7FFCQdNTpsBYhDLusQ==} + engines: {node: '>=10.13.0'} + hasBin: true + peerDependencies: + '@webpack-cli/generators': '*' + '@webpack-cli/migrate': '*' + webpack: 4.x.x || 5.x.x + webpack-bundle-analyzer: '*' + webpack-dev-server: '*' + peerDependenciesMeta: + '@webpack-cli/generators': + optional: true + '@webpack-cli/migrate': + optional: true + webpack-bundle-analyzer: + optional: true + webpack-dev-server: + optional: true + dependencies: + '@discoveryjs/json-ext': 0.5.7 + '@webpack-cli/configtest': 1.2.0(webpack-cli@4.9.1)(webpack@5.89.0) + '@webpack-cli/info': 1.5.0(webpack-cli@4.9.1) + '@webpack-cli/serve': 1.7.0(webpack-cli@4.9.1) + colorette: 2.0.20 + commander: 7.2.0 + execa: 5.1.1 + fastest-levenshtein: 1.0.16 + import-local: 3.1.0 + interpret: 2.2.0 + rechoir: 0.7.1 + webpack: 5.89.0(webpack-cli@4.9.1) + webpack-bundle-analyzer: 4.10.1 + webpack-merge: 5.10.0 /webpack-cli@4.9.1(webpack@5.64.1): resolution: {integrity: sha512-JYRFVuyFpzDxMDB+v/nanUdQYcZtqFPGzmlW4s+UkPMFhSpfRNmf1z4AwYcHJVdvEFAM7FFCQdNTpsBYhDLusQ==} @@ -17577,7 +17531,7 @@ packages: mime-types: 2.1.35 range-parser: 1.2.1 schema-utils: 4.0.1 - webpack: 5.89.0 + webpack: 5.89.0(webpack-cli@4.9.1) dev: false /webpack-dev-server@4.15.1(webpack@5.89.0): @@ -17621,7 +17575,7 @@ packages: serve-index: 1.9.1 sockjs: 0.3.24 spdy: 4.0.2 - webpack: 5.89.0 + webpack: 5.89.0(webpack-cli@4.9.1) webpack-dev-middleware: 5.3.3(webpack@5.89.0) ws: 8.13.0 transitivePeerDependencies: @@ -17692,7 +17646,7 @@ packages: - uglify-js dev: true - /webpack@5.89.0: + /webpack@5.89.0(webpack-cli@4.9.1): resolution: {integrity: sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==} engines: {node: '>=10.13.0'} hasBin: true @@ -17709,7 +17663,7 @@ packages: '@webassemblyjs/wasm-parser': 1.11.5 acorn: 8.8.2 acorn-import-assertions: 1.9.0(acorn@8.8.2) - browserslist: 4.21.5 + browserslist: 4.22.1 chrome-trace-event: 1.0.3 enhanced-resolve: 5.15.0 es-module-lexer: 1.2.1 @@ -17725,6 +17679,7 @@ packages: tapable: 2.2.1 terser-webpack-plugin: 5.3.9(webpack@5.89.0) watchpack: 2.4.0 + webpack-cli: 4.9.1(webpack-bundle-analyzer@4.10.1)(webpack@5.89.0) webpack-sources: 3.2.3 transitivePeerDependencies: - '@swc/core' @@ -17741,7 +17696,7 @@ packages: consola: 2.15.3 pretty-time: 1.1.0 std-env: 3.3.3 - webpack: 5.89.0 + webpack: 5.89.0(webpack-cli@4.9.1) dev: false /websocket-driver@0.7.4: @@ -17853,7 +17808,6 @@ packages: ansi-styles: 4.3.0 string-width: 4.2.3 strip-ansi: 6.0.1 - dev: true /wrap-ansi@8.1.0: resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} @@ -17894,7 +17848,6 @@ packages: optional: true utf-8-validate: optional: true - dev: false /ws@8.13.0: resolution: {integrity: sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==} @@ -17938,7 +17891,6 @@ packages: /y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} - dev: true /yallist@2.1.2: resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} @@ -17970,7 +17922,6 @@ packages: /yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} - dev: true /yargs@15.4.1: resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} @@ -18013,7 +17964,6 @@ packages: string-width: 4.2.3 y18n: 5.0.8 yargs-parser: 21.1.1 - dev: true /yauzl@2.10.0: resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} diff --git a/tsconfig.json b/tsconfig.json index 8ec6fc33a..b46e1a8af 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,7 @@ "outDir": "./lib", "types": ["node"], "lib": ["es2020"], - "moduleResolution": "node", + "moduleResolution": "node16", "strict": true, "esModuleInterop": true, "sourceMap": true, diff --git a/typedoc.json b/typedoc.json index 83ba24de0..ba85a9744 100644 --- a/typedoc.json +++ b/typedoc.json @@ -9,7 +9,8 @@ "packages/e2e-test", "packages/testkit", "packages/molecule", - "packages/toolkit" + "packages/toolkit", + "packages/crypto" ], "logLevel": "Verbose", "skipErrorChecking": true, diff --git a/website/docs/migrations/migrate-form-ckb-sdk-utils.md b/website/docs/migrations/migrate-form-ckb-sdk-utils.md index 93c6b41b6..21382529d 100644 --- a/website/docs/migrations/migrate-form-ckb-sdk-utils.md +++ b/website/docs/migrations/migrate-form-ckb-sdk-utils.md @@ -327,7 +327,7 @@ bytes.hexify( ```typescript import { serializeStruct } from "@nervosnetwork/ckb-sdk-utils" -import { fixvec } from "@ckb-lumos/codec/lib/molecule/layout" +import { fixvec } from "@ckb-lumos/codec/molecule" import { number, bytes } from "@ckb-lumos/codec" // before @@ -342,7 +342,7 @@ bytes.hexify(fixvecCodec.pack([0x12])) // 0x0100000012 ```typescript import { serializeDynVec } from "@nervosnetwork/ckb-sdk-utils" -import { dynvec } from "@ckb-lumos/codec/lib/molecule/layout" +import { dynvec } from "@ckb-lumos/codec/molecule" import { bytes, createBytesCodec } from "@ckb-lumos/codec" // before @@ -365,7 +365,7 @@ bytes.hexify(dynvecCodec.pack(["0x02001234", "0x00000000", "0x02000567", "0x0100 ```typescript import { serializeTable } from "@nervosnetwork/ckb-sdk-utils" -import { table } from "@ckb-lumos/codec/lib/molecule/layout" +import { table } from "@ckb-lumos/codec/molecule" import { bytes, number, createBytesCodec } from "@ckb-lumos/codec" // before @@ -390,7 +390,7 @@ bytes.hexify(tableCodec.pack({ f1: "0xab", f2: "0x04030201" })) // 0x110000000c0 ```typescript import { serializeOption } from "@nervosnetwork/ckb-sdk-utils" -import { option } from "@ckb-lumos/codec/lib/molecule/layout" +import { option } from "@ckb-lumos/codec/molecule" import { bytes, createBytesCodec } from "@ckb-lumos/codec" // before diff --git a/website/docs/migrations/migrate-to-esm.md b/website/docs/migrations/migrate-to-esm.md new file mode 100644 index 000000000..67f7926eb --- /dev/null +++ b/website/docs/migrations/migrate-to-esm.md @@ -0,0 +1,26 @@ +# Migrate to ES Modules + +ES module is the modern standard for JavaScript module system. It is supported by all major browsers and Node.js. It is also the default module system for TypeScript. However, Lumos currently only supports CommonJS module system. Supporting ES module will bring the following benefits: + +- native support for ES module to use the [1k+ very common modules](https://github.com/sindresorhus/meta/discussions/15) without transpilation in Lumos +- work well with code splitting and tree shaking + - import only the required code + - improve the cold start time +- avoid users using non-exported APIs + - the `exports` field in `package.json` to specify the entry point of the package + +## How To Migrate + +1. Check all of `@ckb-lumos/.*/lib` imports in your codebase +2. Replace them with `@ckb-lumos/[moduleName]/[subModuleName]` if possible + +If you find there are some missing exports, please open an issue to let us know. + +## I Don't Want To Migrate + +If you don't want to migrate to ES module, you can use the following workaround: + +1. install the [`patch-package`](https://github.com/ds300/patch-package) +2. add the `"postinstall": "patch-package"` script to your `package.json` +3. remove all `exports` fields in `node_modules/@ckb-lumos/*/package.json` +4. run `npx patch-package @ckb-lumos/lumos` or your changed package name diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 36fc0051e..215d3e59d 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -67,7 +67,6 @@ const config = { return { resolve: { fallback: { - crypto: require.resolve("crypto-browserify"), buffer: require.resolve("buffer/"), path: false, fs: false, diff --git a/website/src/components/molecule-parser/DataInput.tsx b/website/src/components/molecule-parser/DataInput.tsx index df606db9c..1e0bd824a 100644 --- a/website/src/components/molecule-parser/DataInput.tsx +++ b/website/src/components/molecule-parser/DataInput.tsx @@ -4,7 +4,7 @@ import Paper from "@mui/material/Paper" import InputLabel from "@mui/material/InputLabel" import { styled } from "@mui/material/styles" import TextareaAutosize from "@mui/material/TextareaAutosize" -import { BytesCodec } from "@ckb-lumos/codec/lib/base" +import { BytesCodec } from "@ckb-lumos/codec" import { SectionContainer } from "./SectionContainer" import { JSONTree } from "react-json-tree" diff --git a/website/src/constants/builtinCodecs.ts b/website/src/constants/builtinCodecs.ts index 49990680b..f93512249 100644 --- a/website/src/constants/builtinCodecs.ts +++ b/website/src/constants/builtinCodecs.ts @@ -1,7 +1,7 @@ import { AnyCodec, number } from "@ckb-lumos/codec" import { blockchain } from "@ckb-lumos/base" import { CodecMap } from "@ckb-lumos/molecule" -import { BIish, BI } from "@ckb-lumos/bi/lib" +import { BIish, BI } from "@ckb-lumos/bi" function enhanceUnpackBIish(codec: AnyCodec, afterUnpack: (arg: BIish) => string) { return {