diff --git a/ncc.sh b/ncc.sh deleted file mode 100755 index f008fda1..00000000 --- a/ncc.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash -ncc build node_modules/p-map/index.js -o packages/graz/compiled/p-map/ -m -cp node_modules/p-map/index.d.ts packages/graz/compiled/p-map/ -mv packages/graz/compiled/p-map/index.js packages/graz/compiled/p-map/index.mjs -rm -rf packages/graz/compiled/p-map/package.json diff --git a/package.json b/package.json index 1eef44db..a34e4112 100644 --- a/package.json +++ b/package.json @@ -17,20 +17,30 @@ "graz": "pnpm --dir packages/graz", "create-graz-app": "pnpm --dir packages/create-graz-app", "lint": "turbo run lint", - "prepare": "husky uninstall", + "postinstall": "pnpm -F graz exec tsx src/cli generate", "release": "turbo run build --filter=graz && pnpm publish --filter graz", "release-adapter": "turbo run build --filter=\"graz-adapter-*\" && pnpm publish --filter=\"graz-adapter-*\"", "templates": "pnpm --dir templates/default", "test": "turbo run test" }, "devDependencies": { + "@babel/generator": "^7.22.5", + "@babel/parser": "^7.22.5", + "@babel/traverse": "^7.22.5", + "@babel/types": "^7.22.5", "@strangelovelabs/style-guide": "^2.2.0", + "@types/babel__generator": "^7.6.4", + "@types/babel__traverse": "^7.20.1", + "@types/tiged": "npm:@types/degit@^2.8.3", "@vercel/ncc": "^0.36.1", "eslint": "^8.43.0", - "husky": "^8.0.3", + "globby": "^13.1.4", "p-map": "^6.0.0", "prettier": "^2.8.8", + "quicktype": "^23.0.48", + "tiged": "^2.12.5", "tsup": "^7.0.0", + "tsx": "^3.12.7", "turbo": "^1.10.3", "typescript": "^5.1.3" }, diff --git a/packages/graz/.eslintrc.js b/packages/graz/.eslintrc.js index 8a970e94..7664e31b 100644 --- a/packages/graz/.eslintrc.js +++ b/packages/graz/.eslintrc.js @@ -3,6 +3,6 @@ const { extendEslint } = require("@strangelovelabs/style-guide"); module.exports = extendEslint(["browser-node", "react", "typescript", "tsup"], { - ignorePatterns: ["chains/**", "compiled/**", "dist/**"], + ignorePatterns: ["chains/**", "dist/**", "*_experimental/**"], root: true, }); diff --git a/packages/graz/.gitignore b/packages/graz/.gitignore index 319962b7..355d32fa 100644 --- a/packages/graz/.gitignore +++ b/packages/graz/.gitignore @@ -1,4 +1,7 @@ +/*_experimental/* /chains/* /dist/**/* -!/chains/*.stub -!/dist/**/.gitkeep +/registry/**/* + +!/**/.gitkeep +!/**/*.stub diff --git a/packages/graz/chains/index.js.stub b/packages/graz/chains/index.js.stub deleted file mode 100644 index 64a73d1f..00000000 --- a/packages/graz/chains/index.js.stub +++ /dev/null @@ -1,30 +0,0 @@ -const { defineChainInfo, defineChains } = require("../dist"); - -/* REPLACE_MAINNET_DEFS */ -/* REPLACE_TESTNET_DEFS */ - -const mainnetChains = defineChains({ -/* REPLACE_MAINNET_CHAINS */ -}); - -const mainnetChainsArray = [ -/* REPLACE_MAINNET_CHAINS_ARRAY */ -]; - -const testnetChains = defineChains({ -/* REPLACE_TESTNET_CHAINS */ -}); - -const testnetChainsArray = [ -/* REPLACE_TESTNET_CHAINS_ARRAY */ -]; - -module.exports = { - mainnetChains, - mainnetChainsArray, - testnetChains, - testnetChainsArray, - -/* REPLACE_MAINNET_EXPORTS */ -/* REPLACE_TESTNET_EXPORTS */ -}; diff --git a/packages/graz/chains/index.mjs.stub b/packages/graz/chains/index.mjs.stub deleted file mode 100644 index a7365625..00000000 --- a/packages/graz/chains/index.mjs.stub +++ /dev/null @@ -1,20 +0,0 @@ -import { defineChainInfo, defineChains } from "../dist"; - -/* REPLACE_MAINNET_DEFS */ -/* REPLACE_TESTNET_DEFS */ - -export const mainnetChains = defineChains({ -/* REPLACE_MAINNET_CHAINS */ -}); - -export const mainnetChainsArray = [ -/* REPLACE_MAINNET_CHAINS_ARRAY */ -]; - -export const testnetChains = defineChains({ -/* REPLACE_TESTNET_CHAINS */ -}); - -export const testnetChainsArray = [ -/* REPLACE_TESTNET_CHAINS_ARRAY */ -]; diff --git a/packages/graz/cli.mjs b/packages/graz/cli.mjs deleted file mode 100755 index 7f613618..00000000 --- a/packages/graz/cli.mjs +++ /dev/null @@ -1,219 +0,0 @@ -#!/usr/bin/env node -// @ts-check -import * as fs from "node:fs/promises"; -import * as path from "node:path"; -import { fileURLToPath } from "node:url"; - -import { Bech32Address } from "@keplr-wallet/cosmos"; -import arg from "arg"; -import { createClient, createTestnetClient } from "cosmos-directory-client"; - -import pmap from "./compiled/p-map/index.mjs"; - -const isNumber = (char) => /^\d+$/.test(char); - -const chainNaming = (name) => { - if (isNumber(name[0])) { - return `_${name}`; - } - return name; -}; - -const HELP_MESSAGE = `Usage: graz [options] - -Options: - - -g, --generate Generate chain definitions and export to "graz/chains" - -h, --help Show this help message - -Generate options: - -b, --best Set REST and RPC endpoint to best available nodes instead or first listed ones - -M, --mainnet Generate given mainnet chain paths seperated by commas (e.g. "axelar,cosmoshub,juno") - -T, --testnet Generate given testnet chain paths seperated by commas (e.g. "atlantic,bitcannadev,cheqdtestnet") - --authz Generate only authz compatible chains - -https://github.com/strangelove-ventures/graz -`; - -const args = arg({ - "--generate": Boolean, - "-g": "--generate", - - "--authz": Boolean, - "--best": Boolean, - "--mainnet": String, - "--testnet": String, - "-b": "--best", - "-M": "--mainnet", - "-T": "--testnet", - - "--help": Boolean, - "-h": "--help", -}); - -const cli = async () => { - if (args["--help"]) { - console.log(HELP_MESSAGE); - return; - } - - if (args["--generate"]) { - await generate(); - return; - } - - console.log(HELP_MESSAGE); -}; - -const generate = async () => { - console.log(`⏳\tGenerating chain list from cosmos.directory...`); - if (args["--authz"]) { - console.log(`✍️\tDetected authz flag, generating only compatible chains...`); - } - if (args["--best"]) { - console.log(`💁‍♂️\tDetected best flag, setting REST and RPC endpoints to best latency...`); - } - if (args["--mainnet"] || args["--testnet"]) { - console.log(`🐙\tDetected chain filtering flag, generating only given chain paths...`); - } - - const [mainnetRecord, testnetRecord] = await Promise.all([ - makeRecord(createClient(), { filter: args["--mainnet"] }), - makeRecord(createTestnetClient(), { filter: args["--testnet"] }), - ]); - - const [jsStub, mjsStub] = await Promise.all([ - fs.readFile(chainsDir("index.js.stub"), { encoding: "utf-8" }), - fs.readFile(chainsDir("index.mjs.stub"), { encoding: "utf-8" }), - ]); - - const jsContent = jsStub - .replace("/* REPLACE_MAINNET_DEFS */", makeDefs(mainnetRecord)) - .replace("/* REPLACE_TESTNET_DEFS */", makeDefs(testnetRecord, { testnet: true })) - .replace("/* REPLACE_MAINNET_CHAINS */", makeChainMap(mainnetRecord)) - .replace("/* REPLACE_TESTNET_CHAINS */", makeChainMap(testnetRecord, { testnet: true })) - .replace("/* REPLACE_MAINNET_CHAINS_ARRAY */", makeExports(mainnetRecord)) - .replace("/* REPLACE_TESTNET_CHAINS_ARRAY */", makeExports(testnetRecord, { testnet: true })) - .replace("/* REPLACE_MAINNET_EXPORTS */", makeExports(mainnetRecord)) - .replace("/* REPLACE_TESTNET_EXPORTS */", makeExports(testnetRecord, { testnet: true })) - .replace(/"(.+)":/g, "$1:") - .trim(); - - const mjsContent = mjsStub - .replace("/* REPLACE_MAINNET_DEFS */", makeDefs(mainnetRecord, { mjs: true })) - .replace("/* REPLACE_TESTNET_DEFS */", makeDefs(testnetRecord, { mjs: true, testnet: true })) - .replace("/* REPLACE_MAINNET_CHAINS */", makeChainMap(mainnetRecord)) - .replace("/* REPLACE_TESTNET_CHAINS */", makeChainMap(testnetRecord, { testnet: true })) - .replace("/* REPLACE_MAINNET_CHAINS_ARRAY */", makeExports(mainnetRecord)) - .replace("/* REPLACE_TESTNET_CHAINS_ARRAY */", makeExports(testnetRecord, { testnet: true })) - .replace(/"(.+)":/g, "$1:") - .trim(); - - await Promise.all([ - fs.writeFile(chainsDir("index.js"), jsContent, { encoding: "utf-8" }), - fs.writeFile(chainsDir("index.mjs"), mjsContent.replace('"../dist"', '"../dist/index.mjs"'), { encoding: "utf-8" }), - fs.writeFile(chainsDir("index.ts"), mjsContent, { encoding: "utf-8" }), - ]); - - console.log('✨\tGenerate complete! You can import `mainnetChains` and `testnetChains` from "graz/chains".\n'); -}; - -/** @param {string[]} args */ -const chainsDir = (...args) => path.resolve(path.dirname(fileURLToPath(import.meta.url)), "chains", ...args); - -/** - * @param {Record} record - * @param {Record} opts - */ -const makeChainMap = (record, { testnet = false } = {}) => - Object.keys(record) - .map((k) => ` ${chainNaming(k)}: ${chainNaming(k)},`) - .join("\n"); - -/** - * @param {Record} record - * @param {Record} opts - */ -const makeDefs = (record, { mjs = false, testnet = false } = {}) => - Object.entries(record) - .map(([k, v]) => { - const jsVariable = `${chainNaming(k)}`; - const jsChainInfo = JSON.stringify(v, null, 2); - return `${mjs ? "export " : ""}const ${jsVariable} = defineChainInfo(${jsChainInfo});\n`; - }) - .join(""); - -/** - * @param {Record} record - * @param {Record} opts - */ -const makeExports = (record, { testnet = false } = {}) => - Object.keys(record) - .map((k) => ` ${chainNaming(k)},`) - .join("\n"); - -/** - * @param {import("cosmos-directory-client").DirectoryClient} client - * @param {{ filter?: string }} opts - */ -const makeRecord = async (client, { filter = "" } = {}) => { - const paths = filter - ? filter.split(",").map((path) => ({ path })) - : await client.fetchChains().then((c) => c.chains.map(({ path }) => ({ path }))); - - const chains = await pmap(paths, async (c) => client.fetchChain(c.path).then((x) => x.chain), { concurrency: 4 }); - - /** @type {Record} */ - const record = {}; - - chains.forEach((chain) => { - try { - if (args["--authz"] && !chain.params?.authz) { - return; - } - - const apis = args["--best"] ? chain.best_apis : chain.apis; - if (!apis || !apis.rest?.[0] || !apis.rpc?.[0]) { - throw new Error(`⚠️\t${chain.name} has no REST/RPC endpoints, skipping codegen...`); - } - - if (!chain.assets) { - throw new Error(`⚠️\t${chain.name} has no assets, skipping codegen...`); - } - const mainAsset = chain.assets[0]; - - /** @type{import("@keplr-wallet/types").Currency} */ - const nativeCurrency = { - coinDenom: mainAsset.denom_units[mainAsset.denom_units.length - 1].denom, - coinMinimalDenom: mainAsset.denom_units[0].denom, - coinDecimals: mainAsset.denom_units[mainAsset.denom_units.length - 1].exponent, - coinGeckoId: mainAsset.coingecko_id, - }; - - record[chain.path] = { - chainId: chain.chain_id, - currencies: chain.assets.map((asset) => ({ - coinDenom: asset.denom_units[asset.denom_units.length - 1].denom, - coinMinimalDenom: asset.denom_units[0].denom, - coinDecimals: asset.denom_units[asset.denom_units.length - 1].exponent, - coinGeckoId: asset.coingecko_id, - })), - path: chain.path, - rest: apis.rest[0].address || "", - rpc: apis.rpc[0].address || "", - bech32Config: Bech32Address.defaultBech32Config(chain.bech32_prefix), - chainName: chain.chain_name, - feeCurrencies: [nativeCurrency], - stakeCurrency: nativeCurrency, - bip44: { - coinType: chain.slip44 ?? 0, - }, - }; - } catch (error) { - console.error(error instanceof Error ? error.message : String(error)); - } - }); - return record; -}; - -void cli(); diff --git a/packages/graz/compiled/p-map/index.d.ts b/packages/graz/compiled/p-map/index.d.ts deleted file mode 100644 index e11b2585..00000000 --- a/packages/graz/compiled/p-map/index.d.ts +++ /dev/null @@ -1,121 +0,0 @@ -export type Options = { - /** - Number of concurrently pending promises returned by `mapper`. - - Must be an integer from 1 and up or `Infinity`. - - @default Infinity - */ - readonly concurrency?: number; - - /** - When `true`, the first mapper rejection will be rejected back to the consumer. - - When `false`, instead of stopping when a promise rejects, it will wait for all the promises to settle and then reject with an [`AggregateError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError) containing all the errors from the rejected promises. - - Caveat: When `true`, any already-started async mappers will continue to run until they resolve or reject. In the case of infinite concurrency with sync iterables, *all* mappers are invoked on startup and will continue after the first rejection. [Issue #51](https://github.com/sindresorhus/p-map/issues/51) can be implemented for abort control. - - @default true - */ - readonly stopOnError?: boolean; - - /** - You can abort the promises using [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). - - @example - ``` - import pMap from 'p-map'; - import delay from 'delay'; - - const abortController = new AbortController(); - - setTimeout(() => { - abortController.abort(); - }, 500); - - const mapper = async value => value; - - await pMap([delay(1000), delay(1000)], mapper, {signal: abortController.signal}); - // Throws AbortError (DOMException) after 500 ms. - ``` - */ - readonly signal?: AbortSignal; -}; - -type MaybePromise = T | Promise; - -/** -Function which is called for every item in `input`. Expected to return a `Promise` or value. - -@param element - Iterated element. -@param index - Index of the element in the source array. -*/ -export type Mapper = ( - element: Element, - index: number -) => MaybePromise; - -/** -@param input - Synchronous or asynchronous iterable that is iterated over concurrently, calling the `mapper` function for each element. Each iterated item is `await`'d before the `mapper` is invoked so the iterable may return a `Promise` that resolves to an item. Asynchronous iterables (different from synchronous iterables that return `Promise` that resolves to an item) can be used when the next item may not be ready without waiting for an asynchronous process to complete and/or the end of the iterable may be reached after the asynchronous process completes. For example, reading from a remote queue when the queue has reached empty, or reading lines from a stream. -@param mapper - Function which is called for every item in `input`. Expected to return a `Promise` or value. -@returns A `Promise` that is fulfilled when all promises in `input` and ones returned from `mapper` are fulfilled, or rejects if any of the promises reject. The fulfilled value is an `Array` of the fulfilled values returned from `mapper` in `input` order. - -@example -``` -import pMap from 'p-map'; -import got from 'got'; - -const sites = [ - getWebsiteFromUsername('sindresorhus'), //=> Promise - 'https://avajs.dev', - 'https://github.com' -]; - -const mapper = async site => { - const {requestUrl} = await got.head(site); - return requestUrl; -}; - -const result = await pMap(sites, mapper, {concurrency: 2}); - -console.log(result); -//=> ['https://sindresorhus.com/', 'https://avajs.dev/', 'https://github.com/'] -``` -*/ -export default function pMap( - input: AsyncIterable> | Iterable>, - mapper: Mapper, - options?: Options -): Promise>>; - -/** -Return this value from a `mapper` function to skip including the value in the returned array. - -@example -``` -import pMap, {pMapSkip} from 'p-map'; -import got from 'got'; - -const sites = [ - getWebsiteFromUsername('sindresorhus'), //=> Promise - 'https://avajs.dev', - 'https://example.invalid', - 'https://github.com' -]; - -const mapper = async site => { - try { - const {requestUrl} = await got.head(site); - return requestUrl; - } catch { - return pMapSkip; - } -}; - -const result = await pMap(sites, mapper, {concurrency: 2}); - -console.log(result); -//=> ['https://sindresorhus.com/', 'https://avajs.dev/', 'https://github.com/'] -``` -*/ -export const pMapSkip: unique symbol; diff --git a/packages/graz/compiled/p-map/index.mjs b/packages/graz/compiled/p-map/index.mjs deleted file mode 100644 index 52811fef..00000000 --- a/packages/graz/compiled/p-map/index.mjs +++ /dev/null @@ -1 +0,0 @@ -var e={};(()=>{e.d=(r,t)=>{for(var n in t){if(e.o(t,n)&&!e.o(r,n)){Object.defineProperty(r,n,{enumerable:true,get:t[n]})}}}})();(()=>{e.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r)})();if(typeof e!=="undefined")e.ab=new URL(".",import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/)?1:0,-1)+"/";var r={};e.d(r,{Ud:()=>t,ZP:()=>pMap,_L:()=>AbortError});class AbortError extends Error{constructor(e){super();this.name="AbortError";this.message=e}}const getDOMException=e=>globalThis.DOMException===undefined?new AbortError(e):new DOMException(e);const getAbortedReason=e=>{const r=e.reason===undefined?getDOMException("This operation was aborted."):e.reason;return r instanceof Error?r:getDOMException(r)};async function pMap(e,r,{concurrency:n=Number.POSITIVE_INFINITY,stopOnError:o=true,signal:a}={}){return new Promise(((i,s)=>{if(e[Symbol.iterator]===undefined&&e[Symbol.asyncIterator]===undefined){throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`)}if(typeof r!=="function"){throw new TypeError("Mapper function is required")}if(!((Number.isSafeInteger(n)||n===Number.POSITIVE_INFINITY)&&n>=1)){throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${n}\` (${typeof n})`)}const c=[];const f=[];const u=new Map;let p=false;let l=false;let y=false;let b=0;let d=0;const w=e[Symbol.iterator]===undefined?e[Symbol.asyncIterator]():e[Symbol.iterator]();const reject=e=>{p=true;l=true;s(e)};if(a){if(a.aborted){reject(getAbortedReason(a))}a.addEventListener("abort",(()=>{reject(getAbortedReason(a))}))}const next=async()=>{if(l){return}const e=await w.next();const n=d;d++;if(e.done){y=true;if(b===0&&!l){if(!o&&f.length>0){reject(new AggregateError(f));return}l=true;if(u.size===0){i(c);return}const e=[];for(const[r,n]of c.entries()){if(u.get(r)===t){continue}e.push(n)}i(e)}return}b++;(async()=>{try{const o=await e.value;if(l){return}const a=await r(o,n);if(a===t){u.set(n,a)}c[n]=a;b--;await next()}catch(e){if(o){reject(e)}else{f.push(e);b--;try{await next()}catch(e){reject(e)}}}})()};(async()=>{for(let e=0;e { - abortController.abort(); - }, 500); - - const mapper = async value => value; - - await pMap([delay(1000), delay(1000)], mapper, {signal: abortController.signal}); - // Throws AbortError (DOMException) after 500 ms. - ``` - */ - readonly signal?: AbortSignal; -} - -type MaybePromise = T | Promise; - -/** -Function which is called for every item in `input`. Expected to return a `Promise` or value. - -@param element - Iterated element. -@param index - Index of the element in the source array. -*/ -export type Mapper = ( - element: Element, - index: number -) => MaybePromise; - -/** -@param input - Synchronous or asynchronous iterable that is iterated over concurrently, calling the `mapper` function for each element. Each iterated item is `await`'d before the `mapper` is invoked so the iterable may return a `Promise` that resolves to an item. Asynchronous iterables (different from synchronous iterables that return `Promise` that resolves to an item) can be used when the next item may not be ready without waiting for an asynchronous process to complete and/or the end of the iterable may be reached after the asynchronous process completes. For example, reading from a remote queue when the queue has reached empty, or reading lines from a stream. -@param mapper - Function which is called for every item in `input`. Expected to return a `Promise` or value. -@returns A `Promise` that is fulfilled when all promises in `input` and ones returned from `mapper` are fulfilled, or rejects if any of the promises reject. The fulfilled value is an `Array` of the fulfilled values returned from `mapper` in `input` order. - -@example -``` -import pMap from 'p-map'; -import got from 'got'; - -const sites = [ - getWebsiteFromUsername('sindresorhus'), //=> Promise - 'https://avajs.dev', - 'https://github.com' -]; - -const mapper = async site => { - const {requestUrl} = await got.head(site); - return requestUrl; -}; - -const result = await pMap(sites, mapper, {concurrency: 2}); - -console.log(result); -//=> ['https://sindresorhus.com/', 'https://avajs.dev/', 'https://github.com/'] -``` -*/ -export default function pMap( - input: AsyncIterable> | Iterable>, - mapper: Mapper, - options?: Options -): Promise>>; - -/** -Return this value from a `mapper` function to skip including the value in the returned array. - -@example -``` -import pMap, {pMapSkip} from 'p-map'; -import got from 'got'; - -const sites = [ - getWebsiteFromUsername('sindresorhus'), //=> Promise - 'https://avajs.dev', - 'https://example.invalid', - 'https://github.com' -]; - -const mapper = async site => { - try { - const {requestUrl} = await got.head(site); - return requestUrl; - } catch { - return pMapSkip; - } -}; - -const result = await pMap(sites, mapper, {concurrency: 2}); - -console.log(result); -//=> ['https://sindresorhus.com/', 'https://avajs.dev/', 'https://github.com/'] -``` -*/ -export const pMapSkip: unique symbol; diff --git a/packages/graz/env.d.ts b/packages/graz/env.d.ts index d2496271..43eacc2e 100644 --- a/packages/graz/env.d.ts +++ b/packages/graz/env.d.ts @@ -1,5 +1,11 @@ type KeplrWindow = import("@keplr-wallet/types").Window; +declare namespace NodeJS { + interface ProcessEnv { + readonly GRAZ_REGISTRY_SRC?: string; + } +} + declare interface Window extends KeplrWindow { leap: KeplrWindow["keplr"]; cosmostation: { diff --git a/packages/graz/generate-types b/packages/graz/generate-types new file mode 100755 index 00000000..31d82888 --- /dev/null +++ b/packages/graz/generate-types @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +quicktype \ + --src-lang schema \ + --src registry/*.schema.json \ + --out src/types/registry.ts \ + --alphabetize-properties --no-runtime-typecheck diff --git a/packages/graz/package.json b/packages/graz/package.json index b371ed3a..da21abc0 100644 --- a/packages/graz/package.json +++ b/packages/graz/package.json @@ -10,26 +10,25 @@ "module": "./dist/index.mjs", "types": "./dist/index.d.ts", "bin": { - "graz": "./cli.mjs" + "graz": "./dist/cli/index.mjs" }, "files": [ - "chains/*.stub", - "cli.js", - "compiled/**", - "dist/*.d.ts", - "dist/*.js", - "dist/*.mjs" + "**/*.stub", + "dist/**/*.d.ts", + "dist/**/*.js", + "dist/**/*.mjs" ], "sideEffects": false, "scripts": { "build": "tsup", "clean": "rm -rf dist/*", - "cli": "node cli.mjs", + "cli": "node dist/cli/index.mjs", "dev": "tsup --watch", "lint": "eslint --fix \"src/**/*.{ts,tsx}\"", "prepublishOnly": "pnpm build" }, "dependencies": { + "@clack/prompts": "^0.6.3", "@cosmjs/cosmwasm-stargate": "^0.30.1", "@cosmjs/launchpad": "^0.27.1", "@cosmjs/proto-signing": "^0.30.1", @@ -43,8 +42,8 @@ "@walletconnect/types": "^2.8.1", "@walletconnect/utils": "^2.8.1", "@web3modal/standalone": "^2.4.3", - "arg": "^5.0.2", - "cosmos-directory-client": "0.0.6", + "commander": "^11.0.0", + "esbuild": "^0.18.4", "zustand": "^4.3.8" }, "devDependencies": { diff --git a/packages/graz/src/chains/index.ts b/packages/graz/src/chains/index.ts index 744cf261..fe97a92e 100644 --- a/packages/graz/src/chains/index.ts +++ b/packages/graz/src/chains/index.ts @@ -2,14 +2,6 @@ import type { AppCurrency, ChainInfo } from "@keplr-wallet/types"; import type { Dictionary } from "../types/core"; import type { ChainInfoWithPath } from "../types/keplr"; -import { axelar } from "./mainnet/axelar"; -import { cosmoshub } from "./mainnet/cosmoshub"; -import { juno } from "./mainnet/juno"; -import { osmosis } from "./mainnet/osmosis"; -import { sommelier } from "./mainnet/sommelier"; -import { crescentTestnet } from "./testnet/crescent"; -import { junoTestnet } from "./testnet/juno"; -import { osmosisTestnet } from "./testnet/osmosis"; export interface GrazChain { chainId: string; @@ -97,64 +89,3 @@ export const defineChain = (chain: T): T => { export const defineChainInfo = (chain: T): T => { return chain; }; - -/** - * Provided mainnet chains - * - * @example - * ```ts - * import { connect, mainnetChains } from "graz"; - * connect(mainnetChains.cosmos); - * ``` - * - * @see {@link testnetChains} - * - * @deprecated will be removed in the next version use `generate chain` https://graz.strange.love/docs/generate-chain-info - */ -export const mainnetChains = defineChains({ - axelar, - cosmoshub, - juno, - osmosis, - sommelier, -}); - -/** - * Arary version on {@link mainnetChains} - * - * Try graz cli to generate ChainInfo from https://cosmos.directory/ - * @see https://graz.strange.love/docs/generate-chain-info - * - * @see {@link mainnetChains} - * - * @deprecated will be removed in the next version use `generate chain` https://graz.strange.love/docs/generate-chain-info - */ -export const mainnetChainsArray = [axelar, cosmoshub, juno, osmosis, sommelier]; - -/** - * Provided testnet chains - * - * @example - * ```ts - * import { connect, testnetChains } from "graz"; - * connect(testnetChains.osmosis); - * ``` - * - * @see {@link mainnetChains} - * - * @deprecated will be removed in the next version use `generate chain` https://graz.strange.love/docs/generate-chain-info - */ -export const testnetChains = defineChains({ - crescent: crescentTestnet, - juno: junoTestnet, - osmosis: osmosisTestnet, -}); - -/** - * Arary version on {@link testnetChains} - * - * @see {@link testnetChains} - * - * @deprecated will be removed in the next version use `generate chain` https://graz.strange.love/docs/generate-chain-info - */ -export const testnetChainsArray = [crescentTestnet, junoTestnet, osmosisTestnet]; diff --git a/packages/graz/src/chains/mainnet/axelar.ts b/packages/graz/src/chains/mainnet/axelar.ts deleted file mode 100644 index efd423ef..00000000 --- a/packages/graz/src/chains/mainnet/axelar.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { Bech32Address } from "@keplr-wallet/cosmos"; -import type { AppCurrency, ChainInfo } from "@keplr-wallet/types"; - -const AXL: AppCurrency = { - coinDenom: "axl", - coinMinimalDenom: "uaxl", - coinDecimals: 6, - coinGeckoId: "axelar-network", - coinImageUrl: "https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/axl.png", -}; - -const USDC: AppCurrency = { - coinDenom: "usdc", - coinMinimalDenom: "uusdc", - coinDecimals: 6, - coinGeckoId: "usd-coin", - coinImageUrl: "https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/usdc.png", -}; - -const FRAX: AppCurrency = { - coinDenom: "dai", - coinMinimalDenom: "dai-wei", - coinDecimals: 18, - coinGeckoId: "dai", - coinImageUrl: "https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/dai.png", -}; - -const USDT: AppCurrency = { - coinDenom: "usdt", - coinMinimalDenom: "uusdt", - coinDecimals: 6, - coinGeckoId: "tether", - coinImageUrl: "https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/usdt.png", -}; - -const WETH: AppCurrency = { - coinDenom: "weth-wei", - coinMinimalDenom: "weth", - coinDecimals: 18, - coinGeckoId: "weth", - coinImageUrl: "https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/weth.png", -}; - -const WBTC: AppCurrency = { - coinDenom: "wbtc-satoshi", - coinMinimalDenom: "wbtc", - coinDecimals: 8, - coinGeckoId: "wrapped-bitcoin", - coinImageUrl: "https://raw.githubusercontent.com/cosmos/chain-registry/master/axelar/images/wbtc.png", -}; - -/** - * @see https://github.com/cosmos/chain-registry/blob/master/axelar/assetlist.json - */ -const currencies: AppCurrency[] = [AXL, USDC, FRAX, USDT, WETH, WBTC]; - -/** - * @see https://github.com/cosmos/chain-registry/blob/master/axelar/chain.json - */ -export const axelar: ChainInfo = { - rpc: "https://rpc.axelar.strange.love", - rest: "https://api.axelar.strange.love", - chainId: "axelar-dojo-1", - chainName: "Axelar", - stakeCurrency: AXL, - bip44: { - coinType: 118, - }, - bech32Config: Bech32Address.defaultBech32Config("axelar"), - currencies, - feeCurrencies: currencies, -}; diff --git a/packages/graz/src/chains/mainnet/cosmoshub.ts b/packages/graz/src/chains/mainnet/cosmoshub.ts deleted file mode 100644 index d9bafb61..00000000 --- a/packages/graz/src/chains/mainnet/cosmoshub.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Bech32Address } from "@keplr-wallet/cosmos"; -import type { AppCurrency, ChainInfo } from "@keplr-wallet/types"; - -const ATOM: AppCurrency = { - coinDenom: "atom", - coinMinimalDenom: "uatom", - coinDecimals: 6, - coinGeckoId: "cosmos", - coinImageUrl: "https://raw.githubusercontent.com/cosmos/chain-registry/master/cosmoshub/images/atom.png", -}; - -/** - * @see https://github.com/cosmos/chain-registry/blob/master/cosmoshub/assetlist.json - */ -const currencies: AppCurrency[] = [ATOM]; - -/** - * @see https://github.com/cosmos/chain-registry/blob/master/cosmoshub/chain.json - */ -export const cosmoshub: ChainInfo = { - rpc: "https://rpc.cosmoshub.strange.love", - rest: "https://api.cosmoshub.strange.love", - chainId: "cosmoshub-4", - chainName: "Cosmos Hub", - stakeCurrency: ATOM, - bip44: { - coinType: 118, - }, - bech32Config: Bech32Address.defaultBech32Config("cosmos"), - currencies, - feeCurrencies: currencies, -}; diff --git a/packages/graz/src/chains/mainnet/juno.ts b/packages/graz/src/chains/mainnet/juno.ts deleted file mode 100644 index 04c7536f..00000000 --- a/packages/graz/src/chains/mainnet/juno.ts +++ /dev/null @@ -1,107 +0,0 @@ -import { Bech32Address } from "@keplr-wallet/cosmos"; -import type { AppCurrency, ChainInfo } from "@keplr-wallet/types"; - -const JUNO: AppCurrency = { - coinDenom: "juno", - coinMinimalDenom: "ujuno", - coinDecimals: 6, - coinGeckoId: "juno-network", - coinImageUrl: "https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/juno.png", -}; - -const NETA: AppCurrency = { - coinDenom: "neta", - coinMinimalDenom: "cw20:juno168ctmpyppk90d34p3jjy658zf5a5l3w8wk35wht6ccqj4mr0yv8s4j5awr", - coinDecimals: 6, - coinGeckoId: "neta", - coinImageUrl: "https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/neta.png", -}; - -const MARBLE: AppCurrency = { - coinDenom: "marble", - coinMinimalDenom: "cw20:juno1g2g7ucurum66d42g8k5twk34yegdq8c82858gz0tq2fc75zy7khssgnhjl", - coinDecimals: 3, - coinGeckoId: "marble", - coinImageUrl: "https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/marble.png", -}; - -const HOPE: AppCurrency = { - coinDenom: "hope", - coinMinimalDenom: "cw20:juno1re3x67ppxap48ygndmrc7har2cnc7tcxtm9nplcas4v0gc3wnmvs3s807z", - coinDecimals: 6, - coinGeckoId: "hope-galaxy", - coinImageUrl: "https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/hope.png", -}; - -const RAC: AppCurrency = { - coinDenom: "rac", - coinMinimalDenom: "cw20:juno1r4pzw8f9z0sypct5l9j906d47z998ulwvhvqe5xdwgy8wf84583sxwh0pa", - coinDecimals: 6, - coinGeckoId: "racoon", - coinImageUrl: "https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/rac.png", -}; - -const BLOCK: AppCurrency = { - coinDenom: "block", - coinMinimalDenom: "cw20:juno1y9rf7ql6ffwkv02hsgd4yruz23pn4w97p75e2slsnkm0mnamhzysvqnxaq", - coinDecimals: 6, - coinImageUrl: "https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/block.png", -}; - -const DHK: AppCurrency = { - coinDenom: "dhk", - coinMinimalDenom: "cw20:juno1tdjwrqmnztn2j3sj2ln9xnyps5hs48q3ddwjrz7jpv6mskappjys5czd49", - coinDecimals: 0, - coinImageUrl: "https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/dhk.png", -}; - -const RAW: AppCurrency = { - coinDenom: "raw", - coinMinimalDenom: "cw20:juno15u3dt79t6sxxa3x3kpkhzsy56edaa5a66wvt3kxmukqjz2sx0hes5sn38g", - coinDecimals: 6, - coinImageUrl: "https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/raw.png", - coinGeckoId: "junoswap-raw-dao", -}; - -const ASVT: AppCurrency = { - coinDenom: "asvt", - coinMinimalDenom: "cw20:juno17wzaxtfdw5em7lc94yed4ylgjme63eh73lm3lutp2rhcxttyvpwsypjm4w", - coinDecimals: 6, - coinImageUrl: "https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/asvt.png", -}; - -const HNS: AppCurrency = { - coinDenom: "hns", - coinMinimalDenom: "cw20:juno1ur4jx0sxchdevahep7fwq28yk4tqsrhshdtylz46yka3uf6kky5qllqp4k", - coinDecimals: 6, - coinImageUrl: "https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/hns.svg", -}; - -const JOE: AppCurrency = { - coinDenom: "joe", - coinMinimalDenom: "cw20:juno1n7n7d5088qlzlj37e9mgmkhx6dfgtvt02hqxq66lcap4dxnzdhwqfmgng3", - coinDecimals: 6, - coinImageUrl: "https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/joe.png", -}; - -/** - * @see https://github.com/cosmos/chain-registry/blob/master/juno/assetlist.json - */ -const currencies: AppCurrency[] = [JUNO, NETA, MARBLE, HOPE, RAC, BLOCK, DHK, RAW, ASVT, HNS, JOE]; - -/** - * @see https://github.com/cosmos/chain-registry/blob/master/juno/chain.json - */ -export const juno: ChainInfo = { - rpc: "https://rpc.juno.strange.love", - rest: "https://api.juno.strange.love", - chainId: "juno-1", - chainName: "Juno", - stakeCurrency: JUNO, - bip44: { - coinType: 118, - }, - bech32Config: Bech32Address.defaultBech32Config("juno"), - currencies, - feeCurrencies: currencies, -}; diff --git a/packages/graz/src/chains/mainnet/osmosis.ts b/packages/graz/src/chains/mainnet/osmosis.ts deleted file mode 100644 index 7c8b0ced..00000000 --- a/packages/graz/src/chains/mainnet/osmosis.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Bech32Address } from "@keplr-wallet/cosmos"; -import type { AppCurrency, ChainInfo } from "@keplr-wallet/types"; - -const OSMO: AppCurrency = { - coinDenom: "osmo", - coinMinimalDenom: "uosmo", - coinDecimals: 6, - coinGeckoId: "osmosis", - coinImageUrl: "https://raw.githubusercontent.com/cosmos/chain-registry/master/cosmoshub/images/atom.png", -}; - -const ION: AppCurrency = { - coinDenom: "ion", - coinMinimalDenom: "uion", - coinDecimals: 6, - coinGeckoId: "ion", - coinImageUrl: "https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/ion.png", -}; - -/** - * @see https://github.com/cosmos/chain-registry/blob/master/osmosis/assetlist.json - */ -const currencies: AppCurrency[] = [OSMO, ION]; - -/** - * @see https://github.com/cosmos/chain-registry/blob/master/osmosis/chain.json - */ -export const osmosis: ChainInfo = { - rpc: "https://rpc.osmosis.strange.love", - rest: "https://api.osmosis.strange.love", - chainId: "osmosis-1", - chainName: "Osmosis", - stakeCurrency: OSMO, - bip44: { - coinType: 118, - }, - bech32Config: Bech32Address.defaultBech32Config("osmo"), - currencies, - feeCurrencies: currencies, -}; diff --git a/packages/graz/src/chains/mainnet/sommelier.ts b/packages/graz/src/chains/mainnet/sommelier.ts deleted file mode 100644 index fce73f3b..00000000 --- a/packages/graz/src/chains/mainnet/sommelier.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Bech32Address } from "@keplr-wallet/cosmos"; -import type { AppCurrency, ChainInfo } from "@keplr-wallet/types"; - -const SOMM: AppCurrency = { - coinDenom: "somm", - coinMinimalDenom: "usomm", - coinDecimals: 6, - coinGeckoId: "sommelier", - coinImageUrl: "https://raw.githubusercontent.com/cosmos/chain-registry/master/sommelier/images/somm.png", -}; - -/** - * @see https://github.com/cosmos/chain-registry/blob/master/sommelier/assetlist.json - */ -const currencies: AppCurrency[] = [SOMM]; - -/** - * @see https://github.com/cosmos/chain-registry/blob/master/sommelier/chain.json - */ -export const sommelier: ChainInfo = { - rpc: "https://rpc.sommelier.strange.love", - rest: "https://api.sommelier.strange.love", - chainId: "sommelier-3", - chainName: "Sommelier", - stakeCurrency: SOMM, - bip44: { - coinType: 118, - }, - bech32Config: Bech32Address.defaultBech32Config("somm"), - currencies, - feeCurrencies: currencies, -}; diff --git a/packages/graz/src/chains/testnet/crescent.ts b/packages/graz/src/chains/testnet/crescent.ts deleted file mode 100644 index 23791786..00000000 --- a/packages/graz/src/chains/testnet/crescent.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Bech32Address } from "@keplr-wallet/cosmos"; -import type { AppCurrency, ChainInfo } from "@keplr-wallet/types"; - -const CRE: AppCurrency = { - coinDenom: "CRE", - coinMinimalDenom: "ucre", - coinDecimals: 6, - coinGeckoId: "crescent", - coinImageUrl: "https://raw.githubusercontent.com/crescent-network/asset/main/images/coin/CRE.png", -}; - -const currencies: AppCurrency[] = [CRE]; - -export const crescentTestnet: ChainInfo = { - rpc: "https://testnet-endpoint.crescent.network/rpc/crescent", - rest: "https://testnet-endpoint.crescent.network/api/crescent", - chainId: "mooncat-1-1", - chainName: "Crescent Testnet", - bip44: { - coinType: 118, - }, - bech32Config: Bech32Address.defaultBech32Config("CRE"), - currencies, - feeCurrencies: currencies, - stakeCurrency: CRE, - coinType: 118, -}; diff --git a/packages/graz/src/chains/testnet/juno.ts b/packages/graz/src/chains/testnet/juno.ts deleted file mode 100644 index 8a366d43..00000000 --- a/packages/graz/src/chains/testnet/juno.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Bech32Address } from "@keplr-wallet/cosmos"; -import type { AppCurrency, ChainInfo } from "@keplr-wallet/types"; - -const JUNO: AppCurrency = { - coinDenom: "junox", - coinMinimalDenom: "ujunox", - coinDecimals: 6, - coinGeckoId: "juno-network", - coinImageUrl: "https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/juno.png", -}; - -const currencies: AppCurrency[] = [JUNO]; - -export const junoTestnet: ChainInfo = { - rpc: "https://rpc.uni.junonetwork.io", - rest: "https://api.uni.junonetwork.io", - chainId: "uni-5", - chainName: "Juno Testnet", - stakeCurrency: JUNO, - bip44: { - coinType: 118, - }, - bech32Config: Bech32Address.defaultBech32Config("juno"), - currencies, - feeCurrencies: [JUNO], - coinType: 118, -}; diff --git a/packages/graz/src/chains/testnet/osmosis.ts b/packages/graz/src/chains/testnet/osmosis.ts deleted file mode 100644 index 8b0659fe..00000000 --- a/packages/graz/src/chains/testnet/osmosis.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Bech32Address } from "@keplr-wallet/cosmos"; -import type { AppCurrency, ChainInfo } from "@keplr-wallet/types"; - -const OSMO: AppCurrency = { - coinDenom: "osmo", - coinMinimalDenom: "uosmo", - coinDecimals: 6, - coinGeckoId: "osmosis", - coinImageUrl: "https://dhj8dql1kzq2v.cloudfront.net/white/osmo.png", -}; - -const currencies: AppCurrency[] = [OSMO]; - -export const osmosisTestnet: ChainInfo = { - rpc: "https://testnet-rpc.osmosis.zone", - rest: "https://testnet-rest.osmosis.zone", - chainId: "osmo-test-4", - chainName: "Osmosis Testnet", - stakeCurrency: OSMO, - bip44: { - coinType: 118, - }, - bech32Config: Bech32Address.defaultBech32Config("osmo"), - currencies, - feeCurrencies: [OSMO], - coinType: 118, -}; diff --git a/packages/graz/src/cli/clone-registry.ts b/packages/graz/src/cli/clone-registry.ts new file mode 100644 index 00000000..6ace6a4b --- /dev/null +++ b/packages/graz/src/cli/clone-registry.ts @@ -0,0 +1,10 @@ +import path from "node:path"; + +import tiged from "tiged"; + +export const cloneRegistry = async (src?: string) => { + // eslint-disable-next-line no-param-reassign + src = src || process.env.GRAZ_REGISTRY_SRC || "github:cosmos/chain-registry"; + const emitter = tiged(src, { force: true, mode: "tar" }); + await emitter.clone(path.resolve(__dirname, "../../registry")); +}; diff --git a/packages/graz/src/cli/get-chain-paths.ts b/packages/graz/src/cli/get-chain-paths.ts new file mode 100644 index 00000000..7043c307 --- /dev/null +++ b/packages/graz/src/cli/get-chain-paths.ts @@ -0,0 +1,24 @@ +import path from "node:path"; + +import type { Options as GlobbyOptions } from "globby"; +import { globby } from "globby"; + +export const getChainPaths = async ({ + mainnetFilter: mf, + testnetFilter: tf, +}: { + mainnetFilter?: string[]; + testnetFilter?: string[]; +} = {}) => { + const globOpts: GlobbyOptions = { + cwd: path.resolve(__dirname, "../../registry"), + onlyDirectories: true, + }; + + const [mainnetPaths, testnetPaths] = await Promise.all([ + globby([...(mf && mf.length > 0 ? mf : ["*"]), "!_*", "!testnets"], globOpts), + globby([...(tf && tf.length > 0 ? tf.map((f) => `testnets/${f}`) : ["testnets/*"]), "!testnets/_*"], globOpts), + ]); + + return { mainnetPaths, testnetPaths }; +}; diff --git a/packages/graz/src/cli/index.ts b/packages/graz/src/cli/index.ts new file mode 100644 index 00000000..371f2baa --- /dev/null +++ b/packages/graz/src/cli/index.ts @@ -0,0 +1,83 @@ +// @ts-check + +import fs from "node:fs/promises"; +import os from "node:os"; + +import * as p from "@clack/prompts"; +import { Command } from "commander"; +import type { Format } from "esbuild"; +import pMap from "p-map"; + +import { cloneRegistry } from "./clone-registry"; +import { getChainPaths } from "./get-chain-paths"; +import { makeRootSources } from "./make-root-sources"; +import { makeSources } from "./make-sources"; +import { transpileSources } from "./transpile-sources"; + +const cli = async () => { + const program = new Command(); + + program + .name("graz") + .description("React hooks for Cosmos") + .addHelpText("afterAll", "\nhttps://github.com/strangelove-ventures/graz\n"); + + program + .command("generate") + .description('generate chain definitions and export to "graz/chains"') + .option( + "-R, --registry ", + "specify a custom chain registry namespace (e.g. org/repo, github:org/repo, gitlab:org/repo)", + ) + .option( + "-M, --mainnet ", + 'generate given mainnet chain paths separated by spaces (e.g. "axelar cosmoshub juno")', + ) + .option( + "-T, --testnet ", + 'generate given testnet chain paths separated by spaces (e.g. "atlantic bitcannadev cheqdtestnet")', + ) + .option("--format ", "specify javascript module format: cjs, esm (defaults to cjs)") + .action(async (options) => { + const customRegistry = options.registry as string | undefined; + const mainnetFilter = options.mainnet as string[] | undefined; + const testnetFilter = options.testnet as string[] | undefined; + + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + const jsFormat: Format = options.format === "esm" || options.format === "cjs" ? options.format : "cjs"; + + p.intro("graz generate"); + const s = p.spinner(); + + s.start(`Cloning chain registry`); + await cloneRegistry(customRegistry); + s.stop("Cloned chain registry ✅"); + + s.start("Retrieving chain paths"); + const { mainnetPaths, testnetPaths } = await getChainPaths({ mainnetFilter, testnetFilter }); + s.stop("Retrieved chain paths ✅"); + + s.start("Generating chain sources"); + await fs.rm("chains/", { recursive: true, force: true }); + await pMap([...mainnetPaths, ...testnetPaths], makeSources, { + concurrency: Math.max(1, (os.cpus() || { length: 1 }).length - 1), + }); + s.stop("Generated chain sources ✅"); + + s.start("Generating chain index"); + await makeRootSources({ mainnetPaths, testnetPaths }); + s.stop("Generated chain index ✅"); + + if (jsFormat === "cjs") { + s.start("Transpiling javascript esm sources to cjs"); + await transpileSources("cjs"); + s.stop("Transpiled sources ✅"); + } + + p.outro('Generate complete! You can import `mainnetChains` and `testnetChains` from "graz/chains". 🎉'); + }); + + await program.parseAsync(); +}; + +void cli(); diff --git a/packages/graz/src/cli/make-root-sources.ts b/packages/graz/src/cli/make-root-sources.ts new file mode 100644 index 00000000..deebbbf4 --- /dev/null +++ b/packages/graz/src/cli/make-root-sources.ts @@ -0,0 +1,139 @@ +import fs from "node:fs/promises"; +import path from "node:path"; + +import { CodeGenerator } from "@babel/generator"; +import { parse } from "@babel/parser"; +import traverse from "@babel/traverse"; +import * as t from "@babel/types"; + +interface MakeRootSourcesArgs { + mainnetPaths: string[]; + testnetPaths: string[]; +} + +export const makeRootSources = async ({ mainnetPaths, testnetPaths }: MakeRootSourcesArgs) => { + // eslint-disable-next-line no-param-reassign + testnetPaths = testnetPaths.map((p) => p.replace("testnets/", "")); + + await makeGeneratedJs({ mainnetPaths, testnetPaths }); + await makeGeneratedDts({ mainnetPaths, testnetPaths }); + await makeIndexJs(); + await makeIndexDts(); +}; + +const makeGeneratedJs = async ({ mainnetPaths, testnetPaths }: MakeRootSourcesArgs) => { + const makeGetters = ({ chainPath = "", suffix = "" }) => { + return t.objectMethod( + "get", + t.stringLiteral(chainPath), + [], + t.blockStatement([ + t.returnStatement( + t.memberExpression( + t.callExpression(t.identifier("require"), [t.stringLiteral(`./${chainPath}${suffix}`)]), + t.identifier("default"), + ), + ), + ]), + ); + }; + + const chainsGeneratedStub = await fs.readFile( + path.resolve(__dirname, "../../stubs/chains-generated.js.stub"), + "utf-8", + ); + const chainsGeneratedAst = parse(chainsGeneratedStub, { sourceType: "module" }); + + traverse(chainsGeneratedAst, { + VariableDeclarator: (current) => { + if (t.isIdentifier(current.node.id, { name: "mainnetChains" })) { + current.node.init = t.objectExpression( + mainnetPaths.sort().map((chainPath) => makeGetters({ chainPath, suffix: "/chain" })), + ); + current.skip(); + } + if (t.isIdentifier(current.node.id, { name: "testnetChains" })) { + current.node.init = t.objectExpression( + testnetPaths.sort().map((chainPath) => makeGetters({ chainPath, suffix: "/chain" })), + ); + current.skip(); + } + if (t.isIdentifier(current.node.id, { name: "chains" })) { + current.node.init = t.objectExpression( + [...mainnetPaths, ...testnetPaths].sort().map((chainPath) => makeGetters({ chainPath, suffix: "/chain" })), + ); + current.skip(); + } + if (t.isIdentifier(current.node.id, { name: "mainnetChainInfos" })) { + current.node.init = t.objectExpression(mainnetPaths.sort().map((chainPath) => makeGetters({ chainPath }))); + current.skip(); + } + if (t.isIdentifier(current.node.id, { name: "testnetChainInfos" })) { + current.node.init = t.objectExpression(testnetPaths.sort().map((chainPath) => makeGetters({ chainPath }))); + current.skip(); + } + if (t.isIdentifier(current.node.id, { name: "chainInfos" })) { + current.node.init = t.objectExpression( + [...mainnetPaths, ...testnetPaths].sort().map((chainPath) => makeGetters({ chainPath })), + ); + current.skip(); + } + if (t.isIdentifier(current.node.id, { name: "mainnetChainNames" })) { + current.node.init = t.arrayExpression(mainnetPaths.map((p) => t.stringLiteral(p))); + current.skip(); + } + if (t.isIdentifier(current.node.id, { name: "testnetChainNames" })) { + current.node.init = t.arrayExpression(testnetPaths.map((p) => t.stringLiteral(p))); + current.skip(); + } + if (t.isIdentifier(current.node.id, { name: "chainNames" })) { + current.node.init = t.arrayExpression([...mainnetPaths, ...testnetPaths].map((p) => t.stringLiteral(p))); + current.skip(); + } + }, + }); + + const { code: chainsGeneratedCode } = new CodeGenerator(chainsGeneratedAst).generate(); + await fs.writeFile(path.resolve(__dirname, "../../chains/generated.js"), chainsGeneratedCode, "utf-8"); +}; + +const makeGeneratedDts = async ({ mainnetPaths, testnetPaths }: MakeRootSourcesArgs) => { + const chainsGeneratedDtsStub = await fs.readFile( + path.resolve(__dirname, "../../stubs/chains-generated.d.ts.stub"), + "utf-8", + ); + const chainsGeneratedDtsAst = parse(chainsGeneratedDtsStub, { + sourceType: "module", + plugins: [["typescript", { dts: true }]], + }); + + traverse(chainsGeneratedDtsAst, { + TSTypeAliasDeclaration: (current) => { + if (t.isIdentifier(current.node.id, { name: "MainnetChainName" })) { + current.node.typeAnnotation = t.tsUnionType(mainnetPaths.map((p) => t.tsLiteralType(t.stringLiteral(p)))); + current.skip(); + } + if (t.isIdentifier(current.node.id, { name: "TestnetChainName" })) { + current.node.typeAnnotation = t.tsUnionType(testnetPaths.map((p) => t.tsLiteralType(t.stringLiteral(p)))); + current.skip(); + } + }, + }); + + const { code: chainsGeneratedDtsCode } = new CodeGenerator(chainsGeneratedDtsAst).generate(); + await fs.writeFile(path.resolve(__dirname, "../../chains/generated.d.ts"), chainsGeneratedDtsCode, "utf-8"); +}; + +const makeIndexJs = async () => { + await fs.copyFile( + path.resolve(__dirname, "../../stubs/chains-index.js.stub"), + path.resolve(__dirname, "../../chains/index.js"), + ); +}; + +const makeIndexDts = async () => { + await fs.copyFile( + path.resolve(__dirname, "../../stubs/chains-index.d.ts.stub"), + path.resolve(__dirname, "../../chains/index.d.ts"), + ); +}; diff --git a/packages/graz/src/cli/make-sources.ts b/packages/graz/src/cli/make-sources.ts new file mode 100644 index 00000000..f32ab9f2 --- /dev/null +++ b/packages/graz/src/cli/make-sources.ts @@ -0,0 +1,149 @@ +import fs from "node:fs/promises"; +import path from "node:path"; + +import { CodeGenerator } from "@babel/generator"; +import * as t from "@babel/types"; +import type { ChainInfo } from "@keplr-wallet/types"; + +import { registryToChainInfo } from "../registry/keplr"; +import type { AssetList, Chain } from "../types/registry"; + +export const makeSources = async (chainPath: string) => { + const actualChainPath = chainPath.replace("testnets/", ""); + + await fs.mkdir(path.resolve(__dirname, `../../chains/${actualChainPath}`), { recursive: true }); + + const { assetlist } = await makeAssetlistFiles({ chainPath, actualChainPath }); + const { chain } = await makeChainFiles({ chainPath, actualChainPath }); + await makeChainInfo({ chainPath, actualChainPath, assetlist, chain }); +}; + +interface MakeArgs { + chainPath: string; + actualChainPath: string; +} + +const makeAssetlistFiles = async ({ chainPath, actualChainPath }: MakeArgs) => { + let assetlist: AssetList; + try { + const assetlistContent = await fs.readFile( + path.resolve(__dirname, `../../registry/${chainPath}/assetlist.json`), + "utf-8", + ); + assetlist = JSON.parse(assetlistContent) as AssetList; + } catch { + assetlist = { + assets: [], + chain_name: chainPath, + }; + } + + /** + * chains/[chainPath]/assetlist.js + * ```js + * import { defineAssetList } from "../../dist"; + * export default defineAssetList({ ... }); + * ``` + */ + const assetlistAst = t.program([ + t.importDeclaration( + [t.importSpecifier(t.identifier("defineAssetList"), t.identifier("defineAssetList"))], + t.stringLiteral("../../dist"), + ), + t.exportDefaultDeclaration(t.callExpression(t.identifier("defineAssetList"), [t.valueToNode(assetlist)])), + ]); + + const { code: assetlistCode } = new CodeGenerator(assetlistAst).generate(); + await fs.writeFile( + path.resolve(__dirname, `../../chains/${actualChainPath}/assetlist.js`), + `/* eslint-disable */\n${assetlistCode}`, + "utf-8", + ); + await fs.copyFile( + path.resolve(__dirname, "../../stubs/chain-assetlist.d.ts.stub"), + path.resolve(__dirname, `../../chains/${actualChainPath}/assetlist.d.ts`), + ); + return { assetlist }; +}; + +const makeChainFiles = async ({ chainPath, actualChainPath }: MakeArgs) => { + const chainContent = await fs.readFile(path.resolve(__dirname, `../../registry/${chainPath}/chain.json`), "utf-8"); + const chain = JSON.parse(chainContent) as Chain; + + /** + * chains/[chainPath]/chain.js + * ```js + * import { defineRegistryChain } from "../../dist"; + * export default defineRegistryChain({ ... }); + * ``` + */ + const chainAst = t.program([ + t.importDeclaration( + [t.importSpecifier(t.identifier("defineRegistryChain"), t.identifier("defineRegistryChain"))], + t.stringLiteral("../../dist"), + ), + t.exportDefaultDeclaration(t.callExpression(t.identifier("defineRegistryChain"), [t.valueToNode(chain)])), + ]); + + const { code: chainCode } = new CodeGenerator(chainAst).generate(); + await fs.writeFile( + path.resolve(__dirname, `../../chains/${actualChainPath}/chain.js`), + `/* eslint-disable */\n${chainCode}`, + "utf-8", + ); + await fs.copyFile( + path.resolve(__dirname, "../../stubs/chain-chain.d.ts.stub"), + path.resolve(__dirname, `../../chains/${actualChainPath}/chain.d.ts`), + ); + return { chain }; +}; + +const makeChainInfo = async ({ + chainPath, + actualChainPath, + assetlist, + chain, +}: MakeArgs & { assetlist: AssetList; chain: Chain }) => { + let chainInfo: ChainInfo | undefined; + if (assetlist.assets.length > 0) { + chainInfo = registryToChainInfo({ assetlist, chain }); + } + + /** + * chains/[chainPath]/index.js + * ```js + * import { defineChainInfo } from "../../dist"; + * export default defineChainInfo({ ... }); + * ``` + */ + const indexAst = t.program( + chainInfo + ? [ + t.importDeclaration( + [t.importSpecifier(t.identifier("defineChainInfo"), t.identifier("defineChainInfo"))], + t.stringLiteral("../../dist"), + ), + t.exportDefaultDeclaration(t.callExpression(t.identifier("defineChainInfo"), [t.valueToNode(chainInfo)])), + ] + : [ + t.expressionStatement( + t.callExpression(t.memberExpression(t.identifier("console"), t.identifier("error")), [ + t.stringLiteral(`chain info for '${chain.chain_name}' is not generated due to invalid assetlist`), + ]), + ), + t.exportDefaultDeclaration(t.objectExpression([])), + ], + ); + + const { code: indexCode } = new CodeGenerator(indexAst).generate(); + await fs.writeFile( + path.resolve(__dirname, `../../chains/${actualChainPath}/index.js`), + `/* eslint-disable */\n${indexCode}`, + "utf-8", + ); + await fs.copyFile( + path.resolve(__dirname, "../../stubs/chain-index.d.ts.stub"), + path.resolve(__dirname, `../../chains/${actualChainPath}/index.d.ts`), + ); + return { chainInfo }; +}; diff --git a/packages/graz/src/cli/transpile-sources.ts b/packages/graz/src/cli/transpile-sources.ts new file mode 100644 index 00000000..50de2fd3 --- /dev/null +++ b/packages/graz/src/cli/transpile-sources.ts @@ -0,0 +1,14 @@ +import * as esbuild from "esbuild"; +import { globby } from "globby"; + +export const transpileSources = async (format: esbuild.Format) => { + const paths = await globby(["chains/**/*.js"]); + await esbuild.build({ + allowOverwrite: true, + bundle: false, + entryPoints: [...paths], + format, + outdir: "chains", + treeShaking: true, + }); +}; diff --git a/packages/graz/src/index.ts b/packages/graz/src/index.ts index 201299d3..3ff7ba0e 100644 --- a/packages/graz/src/index.ts +++ b/packages/graz/src/index.ts @@ -14,6 +14,9 @@ export * from "./hooks/methods"; export * from "./hooks/wallet"; export * from "./provider"; export * from "./provider/events"; +export * from "./registry"; +export * from "./registry/keplr"; export * from "./types/core"; export * from "./types/keplr"; +export * from "./types/registry"; export * from "./types/wallet"; diff --git a/packages/graz/src/registry/index.ts b/packages/graz/src/registry/index.ts new file mode 100644 index 00000000..87b40114 --- /dev/null +++ b/packages/graz/src/registry/index.ts @@ -0,0 +1,64 @@ +import type { Asset, AssetList, Chain } from "../types/registry"; + +/** + * Helper function to define chain. + * + * This function does not do anything special else than providing type safety + * when defining chain information. + * + * @example + * ```ts + * import { defineAsset } from "graz"; + * + * const atom = defineAsset({ + * base: "uatom", + * display: "atom", + * symbol: "ATOM", + * ... + * }); + * ``` + */ +export const defineAsset = (asset: T): T => { + return asset; +}; + +/** + * Helper function to define chains asset list. + * + * This function does not do anything special else than providing type safety + * when defining chain information. + * + * @example + * ```ts + * import { defineAssetList } from "graz"; + * + * const assetlist = defineAssetList({ + * chain_name: "cosmoshub", + * assets: [...] + * }); + * ``` + */ +export const defineAssetList = (assetlist: T): T => { + return assetlist; +}; + +/** + * Helper function to define chain with registry compliant type. + * + * This function does not do anything special else than providing type safety + * when defining chain information. + * + * @example + * ```ts + * import { defineRegistryChain } from "graz"; + * + * const cosmoshub = defineRegistryChain({ + * chain_name: "cosmoshub", + * chain_id: "cosmoshub-4", + * ... + * }); + * ``` + */ +export const defineRegistryChain = (chain: T): T => { + return chain; +}; diff --git a/packages/graz/src/registry/keplr.ts b/packages/graz/src/registry/keplr.ts new file mode 100644 index 00000000..6e3ad68b --- /dev/null +++ b/packages/graz/src/registry/keplr.ts @@ -0,0 +1,145 @@ +import { Bech32Address } from "@keplr-wallet/cosmos"; +import type { ChainInfo, Currency, FeeCurrency, WithGasPriceStep } from "@keplr-wallet/types"; +import { satisfies } from "semver"; + +import type { Asset, AssetList, Chain } from "../types/registry"; +import { invariant } from "../utils/invariant"; +import { cleanVer } from "../utils/registry"; + +/** + * Function to convert chain object from registry to Keplr's {@link ChainInfo} object. + * + * Note that every chain generated in `graz/chains` already has {@link ChainInfo}. + * (e.g. `import chainInfo from "graz/chains/cosmoshub"`). + * + * @example + * ```ts + * import { registryToChainInfo } from "graz"; + * + * import chain from "graz/chains/cosmoshub/chain"; + * import assetlist from "graz/chains/cosmoshub/assetlist"; + * + * const chainInfo = registryToChainInfo({ chain, assetlist }); + * const chainInfoFromAsset = registryToChainInfo({ chain, assets: assetlist.assets }); + * ``` + * + */ +export const registryToChainInfo = (args: RegistryToChainInfoArgs): ChainInfo => { + const { + chain, + getRestEndpoint = ({ apis }) => apis?.rest?.[0]?.address ?? "", + getRpcEndpoint = ({ apis }) => apis?.rpc?.[0]?.address ?? "", + } = args; + + const features = []; + // if not specified, we assume stargate + const sdkVer = cleanVer(chain.codebase?.cosmos_sdk_version ?? "0.4"); + // stargate + if (satisfies(sdkVer, ">=0.4")) features.push("stargate"); + // no-legacy-stdTx + if (satisfies(sdkVer, ">=0.43")) features.push("no-legacy-stdTx"); + // until further notice, assume 'ibc-transfer' + features.push("ibc-transfer"); + + // ibc-go + if (satisfies(sdkVer, ">=0.45")) features.push("ibc-go"); + + if (chain.codebase?.cosmwasm_enabled) { + features.push("cosmwasm"); + const wasmVer = cleanVer(chain.codebase.cosmwasm_version ?? "0.24"); + if (satisfies(wasmVer, ">=0.24")) features.push("wasmd_0.24+"); + } + + let assets: Asset[] = []; + if ("assetlists" in args && Array.isArray(args.assetlists)) { + assets = args.assetlists.find((asset) => asset.chain_name === chain.chain_name)?.assets || []; + } + if ("assetlist" in args && Array.isArray(args.assetlist.assets)) { + assets = args.assetlist.assets; + } + if ("assets" in args && Array.isArray(args.assets)) { + assets = args.assets; + } + const feeDenoms = chain.fees?.fee_tokens.map((feeToken) => feeToken.denom) || []; + + /** + * from keplr chain-info.d.ts: + * this is used to set the fee of the transaction. if this field is empty, it just use the default gas price step + * (low: 0.01, average: 0.025, high: 0.04). and, set field's type as primitive number because it is hard to restore + * the prototype after deserialzing if field's type is `dec`. + */ + const gasPriceSteps: Record["gasPriceStep"]> = {}; + for (const feeToken of chain.fees?.fee_tokens || []) { + gasPriceSteps[feeToken.denom] = { + low: feeToken.low_gas_price ?? 0.01, + average: feeToken.average_gas_price ?? 0.025, + high: feeToken.high_gas_price ?? 0.04, + }; + } + + const stakingDenoms = chain.staking?.staking_tokens.map((stakingToken) => stakingToken.denom) || []; + + const currencies = assets.map((currency) => { + const denomUnit = currency.denom_units.reduce((acc, val) => (val.exponent > acc.exponent ? val : acc)); + return { + coinDenom: currency.symbol, + coinMinimalDenom: currency.base, + coinDecimals: denomUnit.exponent, + coinGeckoId: currency.coingecko_id, + coinImageUrl: currency.logo_URIs?.svg ?? currency.logo_URIs?.png, + }; + }); + + const firstCurrency = currencies[0]; + invariant(firstCurrency, `chain '${chain.chain_name}' has no assets`); + + const stakeCurrency = currencies.find((currency) => stakingDenoms.includes(currency.coinDenom)) ?? firstCurrency; + + const feeCurrencies = currencies + // use the fee denoms + .filter((currency) => feeDenoms.includes(currency.coinMinimalDenom)) + .map((feeCurrency) => { + // eslint-disable-next-line no-prototype-builtins + if (!gasPriceSteps.hasOwnProperty(feeCurrency.coinMinimalDenom)) return feeCurrency; + // has gas + const gasPriceStep = gasPriceSteps[feeCurrency.coinMinimalDenom]; + return { ...feeCurrency, gasPriceStep }; + }); + + const feeCurrenciesDefault: FeeCurrency[] = currencies + // use the stake currency + .filter((currency) => stakeCurrency.coinDenom === currency.coinDenom) + .map((feeCurrency) => { + // eslint-disable-next-line no-prototype-builtins + if (!gasPriceSteps.hasOwnProperty(feeCurrency.coinMinimalDenom)) return feeCurrency; + // has gas + const gasPriceStep = gasPriceSteps[feeCurrency.coinMinimalDenom]; + return { ...feeCurrency, gasPriceStep }; + }); + + const chainInfo: ChainInfo = { + rpc: getRpcEndpoint(chain), + rest: getRestEndpoint(chain), + chainId: chain.chain_id, + chainName: chain.pretty_name || "", + bip44: { + coinType: chain.slip44 || 118, + }, + bech32Config: Bech32Address.defaultBech32Config(chain.bech32_prefix), + currencies, + stakeCurrency, + feeCurrencies: feeCurrencies.length !== 0 ? feeCurrencies : feeCurrenciesDefault, + features, + }; + + return chainInfo; +}; + +type MapEndpointGetters = Record<`get${Capitalize}Endpoint`, (chain: Chain) => string>; + +type RegistryToChainInfoArgs = Partial> & + ( + | { chain: Chain; assetlists: AssetList[] } + | { chain: Chain; assetlist: AssetList } + | { chain: Chain; assets: Asset[] } + ); diff --git a/packages/graz/src/types/registry.ts b/packages/graz/src/types/registry.ts new file mode 100644 index 00000000..8f8f21bf --- /dev/null +++ b/packages/graz/src/types/registry.ts @@ -0,0 +1,544 @@ +/** + * Asset lists are a similar mechanism to allow frontends and other UIs to fetch metadata + * associated with Cosmos SDK denoms, especially for assets sent over IBC. + */ +export interface AssetList { + $schema?: string; + assets: Asset[]; + chain_name: string; +} + +export interface Asset { + /** + * [OPTIONAL] The address of the asset. Only required for type_asset : cw20, snip20 + */ + address?: string; + /** + * The base unit of the asset. Must be in denom_units. + */ + base: string; + /** + * [OPTIONAL] The coingecko id to fetch asset data from coingecko v3 api. See + * https://api.coingecko.com/api/v3/coins/list + */ + coingecko_id?: string; + denom_units: DenomUnit[]; + /** + * [OPTIONAL] A short description of the asset + */ + description?: string; + /** + * The human friendly unit of the asset. Must be in denom_units. + */ + display: string; + /** + * [OPTIONAL] IBC Channel between src and dst between chain + */ + ibc?: Ibc; + images?: AssetImage[]; + keywords?: string[]; + logo_URIs?: AssetLogoURIs; + /** + * The project name of the asset. For example Bitcoin. + */ + name: string; + /** + * The symbol of an asset. For example BTC. + */ + symbol: string; + /** + * The origin of the asset, starting with the index, and capturing all transitions in form + * and location. + */ + traces?: Trace[]; + /** + * [OPTIONAL] The potential options for type of asset. By default, assumes sdk.coin + */ + type_asset?: TypeAsset; +} + +export interface DenomUnit { + aliases?: string[]; + denom: string; + exponent: number; +} + +/** + * [OPTIONAL] IBC Channel between src and dst between chain + */ +export interface Ibc { + dst_channel: string; + source_channel: string; + source_denom: string; +} + +export interface AssetImage { + png?: string; + svg?: string; + theme?: Theme; +} + +export interface Theme { + primary_color_hex?: string; +} + +export interface AssetLogoURIs { + png?: string; + svg?: string; +} + +export interface Trace { + chain?: TraceChain; + counterparty: Counterparty; + /** + * The entity offering the service. E.g., 'Gravity Bridge' [Network] or 'Tether' [Company]. + */ + provider?: string; + type: TraceType; +} + +export interface TraceChain { + /** + * The chain's IBC transfer channel(, e.g., 'channel-1'). + */ + channel_id?: string; + /** + * The contract address where the transition takes place, where applicable. E.g., The + * Ethereum contract that locks up the asset while it's minted on another chain. + */ + contract?: string; + /** + * The port/channel/denom input string that generates the 'ibc/...' denom. + */ + path?: string; + /** + * The port used to transfer IBC assets; often 'transfer', but sometimes varies, e.g., for + * outgoing cw20 transfers. + */ + port?: string; +} + +export interface Counterparty { + /** + * The base unit of the asset on its source platform. E.g., when describing ATOM from Cosmos + * Hub, specify 'uatom', NOT 'atom' nor 'ATOM'; base units are unique per platform. + */ + base_denom: string; + /** + * The name of the counterparty chain. (must match exactly the chain name used in the Chain + * Registry) + * + * The chain or platform from which the asset originates. E.g., 'cosmoshub', 'ethereum', + * 'forex', or 'nasdaq' + */ + chain_name: string; + /** + * The counterparty IBC transfer channel(, e.g., 'channel-1'). + */ + channel_id?: string; + /** + * The contract address where the transition takes place, where applicable. E.g., The + * Ethereum contract that locks up the asset while it's minted on another chain. + */ + contract?: string; + /** + * The port used to transfer IBC assets; often 'transfer', but sometimes varies, e.g., for + * outgoing cw20 transfers. + */ + port?: string; +} + +export enum TraceType { + Bridge = "bridge", + Ibc = "ibc", + IbcCw20 = "ibc-cw20", + LiquidStake = "liquid-stake", + Synthetic = "synthetic", + Wrapped = "wrapped", +} + +/** + * [OPTIONAL] The potential options for type of asset. By default, assumes sdk.coin + */ +export enum TypeAsset { + Cw20 = "cw20", + Erc20 = "erc20", + Ics20 = "ics20", + SDKCoin = "sdk.coin", + Snip20 = "snip20", + Snip25 = "snip25", +} + +/** + * Cosmos Chain.json is a metadata file that contains information about a cosmos sdk based + * chain. + */ +export interface Chain { + $schema?: string; + alternative_slip44s?: number[]; + apis?: Apis; + /** + * Used to override the bech32_prefix for specific uses. + */ + bech32_config?: Bech32Config; + /** + * The default prefix for the human-readable part of addresses that identifies the coin + * type. Must be registered with SLIP-0173. E.g., 'cosmos' + */ + bech32_prefix: string; + chain_id: string; + chain_name: string; + codebase?: Codebase; + daemon_name?: string; + explorers?: Explorer[]; + extra_codecs?: ExtraCodec[]; + fees?: Fees; + images?: ChainImage[]; + key_algos?: KeyAlgo[]; + keywords?: string[]; + logo_URIs?: ChainLogoURIs; + network_type?: NetworkType; + node_home?: string; + peers?: Peers; + pretty_name?: string; + slip44?: number; + staking?: Staking; + status?: Status; + update_link?: string; + website?: string; +} + +export interface Apis { + "evm-http-jsonrpc"?: Api[]; + grpc?: Api[]; + "grpc-web"?: Api[]; + rest?: Api[]; + rpc?: Api[]; + wss?: Api[]; +} + +export interface Api { + address: string; + archive?: boolean; + provider?: string; +} + +/** + * Used to override the bech32_prefix for specific uses. + */ +export interface Bech32Config { + /** + * e.g., 'cosmos' + */ + bech32PrefixAccAddr?: string; + /** + * e.g., 'cosmospub' + */ + bech32PrefixAccPub?: string; + /** + * e.g., 'cosmosvalcons' + */ + bech32PrefixConsAddr?: string; + /** + * e.g., 'cosmosvalconspub' + */ + bech32PrefixConsPub?: string; + /** + * e.g., 'cosmosvaloper' + */ + bech32PrefixValAddr?: string; + /** + * e.g., 'cosmosvaloperpub' + */ + bech32PrefixValPub?: string; +} + +export interface Codebase { + binaries?: CodebaseBinaries; + compatible_versions?: string[]; + consensus?: CodebaseConsensus; + cosmos_sdk_version?: string; + cosmwasm_enabled?: boolean; + /** + * Relative path to the cosmwasm directory. ex. $HOME/.juno/data/wasm + */ + cosmwasm_path?: string; + cosmwasm_version?: string; + genesis?: Genesis; + git_repo?: string; + ibc_go_version?: string; + /** + * List of IBC apps (usually corresponding to a ICS standard) which have been enabled on the + * network. + */ + ics_enabled?: ICSEnabled[]; + recommended_version?: string; + versions?: Version[]; +} + +export interface CodebaseBinaries { + "darwin/amd64"?: string; + "darwin/arm64"?: string; + "linux/amd64"?: string; + "linux/arm64"?: string; + "windows/amd64"?: string; +} + +export interface CodebaseConsensus { + type: ConsensusType; + version?: string; +} + +export enum ConsensusType { + Cometbft = "cometbft", + Tendermint = "tendermint", +} + +export interface Genesis { + genesis_url: string; + name?: string; +} + +/** + * IBC app or ICS standard. + */ +export enum ICSEnabled { + Ics201 = "ics20-1", + Ics271 = "ics27-1", + Mauth = "mauth", +} + +export interface Version { + binaries?: VersionBinaries; + compatible_versions?: string[]; + consensus?: VersionConsensus; + cosmos_sdk_version?: string; + cosmwasm_enabled?: boolean; + /** + * Relative path to the cosmwasm directory. ex. $HOME/.juno/data/wasm + */ + cosmwasm_path?: string; + cosmwasm_version?: string; + /** + * Block Height + */ + height?: number; + ibc_go_version?: string; + /** + * List of IBC apps (usually corresponding to a ICS standard) which have been enabled on the + * network. + */ + ics_enabled?: ICSEnabled[]; + /** + * Official Upgrade Name + */ + name: string; + /** + * [Optional] Name of the following version + */ + next_version_name?: string; + /** + * Proposal that will officially signal community acceptance of the upgrade. + */ + proposal?: number; + recommended_version?: string; + /** + * Git Upgrade Tag + */ + tag?: string; +} + +export interface VersionBinaries { + "darwin/amd64"?: string; + "darwin/arm64"?: string; + "linux/amd64"?: string; + "linux/arm64"?: string; + "windows/amd64"?: string; +} + +export interface VersionConsensus { + type: ConsensusType; + version?: string; +} + +export interface Explorer { + account_page?: string; + kind?: string; + tx_page?: string; + url?: string; +} + +export enum ExtraCodec { + Ethermint = "ethermint", + Injective = "injective", +} + +export interface Fees { + fee_tokens: FeeToken[]; +} + +export interface FeeToken { + average_gas_price?: number; + denom: string; + fixed_min_gas_price?: number; + gas_costs?: GasCosts; + high_gas_price?: number; + low_gas_price?: number; +} + +export interface GasCosts { + cosmos_send?: number; + ibc_transfer?: number; +} + +export interface ChainImage { + png?: string; + svg?: string; + theme?: Theme; +} + +export enum KeyAlgo { + Ed25519 = "ed25519", + Ethsecp256K1 = "ethsecp256k1", + Secp256K1 = "secp256k1", + Sr25519 = "sr25519", +} + +export interface ChainLogoURIs { + png?: string; + svg?: string; +} + +export enum NetworkType { + Devnet = "devnet", + Mainnet = "mainnet", + Testnet = "testnet", +} + +export interface Peers { + persistent_peers?: PersistentPeer[]; + seeds?: PersistentPeer[]; +} + +export interface PersistentPeer { + address: string; + id: string; + provider?: string; +} + +export interface Staking { + lock_duration?: LockDuration; + staking_tokens: StakingToken[]; +} + +export interface LockDuration { + /** + * The number of blocks for which the staked tokens are locked. + */ + blocks?: number; + /** + * The approximate time for which the staked tokens are locked. + */ + time?: string; +} + +export interface StakingToken { + denom: string; +} + +export enum Status { + Killed = "killed", + Live = "live", + Upcoming = "upcoming", +} + +export interface IbcDataSchema { + $schema?: string; + chain_1: IbcDataSchemaChain; + chain_2: IbcDataSchemaChain; + channels: Channel[]; +} + +/** + * Top level IBC data pertaining to the chain. `chain_1` and `chain_2` should be in + * alphabetical order. + */ +export interface IbcDataSchemaChain { + chain_name: string; + /** + * The client ID on the corresponding chain representing the other chain's light client. + */ + client_id: string; + /** + * The connection ID on the corresponding chain representing a connection to the other chain. + */ + connection_id: string; +} + +export interface Channel { + chain_1: ChannelChain; + chain_2: ChannelChain; + /** + * Human readable description of the channel. + */ + description?: string; + /** + * Determines if packets from a sending module must be 'ordered' or 'unordered'. + */ + ordering: Ordering; + /** + * Human readable key:value pairs that help describe and distinguish channels. + */ + tags?: Tags; + /** + * IBC Version + */ + version: string; +} + +export interface ChannelChain { + /** + * The channel ID on the corresponding chain's connection representing a channel on the + * other chain. + */ + channel_id: string; + /** + * The IBC port ID which a relevant module binds to on the corresponding chain. + */ + port_id: string; +} + +/** + * Determines if packets from a sending module must be 'ordered' or 'unordered'. + */ +export enum Ordering { + Ordered = "ordered", + Unordered = "unordered", +} + +/** + * Human readable key:value pairs that help describe and distinguish channels. + */ +export interface Tags { + dex?: string; + preferred?: boolean; + /** + * String that helps describe non-dex use cases ex: interchain accounts(ICA). + */ + properties?: string; + status?: Status; + [property: string]: any; +} + +export interface MemoKeysSchema { + $schema?: string; + memo_keys: MemoKey[]; +} + +export interface MemoKey { + description: string; + git_repo: string; + key: string; + memo: Record; + [property: string]: any; +} diff --git a/packages/graz/src/utils/invariant.ts b/packages/graz/src/utils/invariant.ts new file mode 100644 index 00000000..ef58b1ab --- /dev/null +++ b/packages/graz/src/utils/invariant.ts @@ -0,0 +1,11 @@ +// https://github.com/alexreardon/tiny-invariant/blob/master/src/tiny-invariant.ts +// eslint-disable-next-line prefer-arrow-functions/prefer-arrow-functions +export function invariant(condition: any, message?: string | (() => string)): asserts condition { + if (condition) return; + if (process.env.NODE_ENV === "production") throw new Error(prefix); + const provided = typeof message === "function" ? message() : message; + const value = provided ? `${prefix}: ${provided}` : prefix; + throw new Error(value); +} + +const prefix = "Invariant failed"; diff --git a/packages/graz/src/utils/registry.ts b/packages/graz/src/utils/registry.ts new file mode 100644 index 00000000..46c1ddc3 --- /dev/null +++ b/packages/graz/src/utils/registry.ts @@ -0,0 +1,17 @@ +import { valid } from "semver"; + +export const cleanVer = (ver: string) => { + if (!valid(ver)) { + const spaces = ver.split(".").length; + switch (spaces) { + case 1: + return `${ver}.0.0`; + case 2: + return `${ver}.0`; + case 3: + default: + throw new Error("invalid semver"); + } + } + return ver; +}; diff --git a/packages/graz/stubs/chain-assetlist.d.ts.stub b/packages/graz/stubs/chain-assetlist.d.ts.stub new file mode 100644 index 00000000..018617aa --- /dev/null +++ b/packages/graz/stubs/chain-assetlist.d.ts.stub @@ -0,0 +1,4 @@ +/* eslint-disable */ +import type { AssetList } from "../../dist"; +declare const assetlist: AssetList; +export default assetlist; diff --git a/packages/graz/stubs/chain-chain.d.ts.stub b/packages/graz/stubs/chain-chain.d.ts.stub new file mode 100644 index 00000000..54ea45b3 --- /dev/null +++ b/packages/graz/stubs/chain-chain.d.ts.stub @@ -0,0 +1,4 @@ +/* eslint-disable */ +import type { Chain } from "../../dist"; +declare const chain: Chain; +export default chain; diff --git a/packages/graz/stubs/chain-index.d.ts.stub b/packages/graz/stubs/chain-index.d.ts.stub new file mode 100644 index 00000000..65e65abc --- /dev/null +++ b/packages/graz/stubs/chain-index.d.ts.stub @@ -0,0 +1,4 @@ +/* eslint-disable */ +import type { ChainInfo } from "@keplr-wallet/types"; +declare const chainInfo: ChainInfo; +export default chainInfo; diff --git a/packages/graz/stubs/chains-generated.d.ts.stub b/packages/graz/stubs/chains-generated.d.ts.stub new file mode 100644 index 00000000..caa16aea --- /dev/null +++ b/packages/graz/stubs/chains-generated.d.ts.stub @@ -0,0 +1,21 @@ +/* eslint-disable */ +import type { ChainInfo } from "@keplr-wallet/types"; +import type { AssetList, Chain } from "../dist"; +export type MainnetChainName = "REPLACE_MAINNET_CHAIN_NAME"; +export type TestnetChainName = "REPLACE_TESTNET_CHAIN_NAME"; +export type ChainName = MainnetChainName | TestnetChainName; +export interface ChainData { + assetlist: AssetList; + chain: Chain; + chainInfo: ChainInfo; +} +export type ChainDataTuple = T extends readonly [ChainName, ...infer Rest] ? [ChainData, ...ChainDataTuple] : []; +export const mainnetChains: Record; +export const testnetChains: Record; +export const chains: Record; +export const mainnetChainInfos: Record; +export const testnetChainInfos: Record; +export const chainInfos: Record; +export const mainnetChainNames: MainnetChainName[]; +export const testnetChainNames: TestnetChainName[]; +export const chainNames: ChainName[]; diff --git a/packages/graz/stubs/chains-generated.js.stub b/packages/graz/stubs/chains-generated.js.stub new file mode 100644 index 00000000..2ff5999a --- /dev/null +++ b/packages/graz/stubs/chains-generated.js.stub @@ -0,0 +1,9 @@ +export const mainnetChains = {}; +export const testnetChains = {}; +export const chains = {}; +export const mainnetChainInfos = {}; +export const testnetChainInfos = {}; +export const chainInfos = {}; +export const mainnetChainNames = []; +export const testnetChainNames = []; +export const chainNames = []; diff --git a/packages/graz/stubs/chains-index.d.ts.stub b/packages/graz/stubs/chains-index.d.ts.stub new file mode 100644 index 00000000..07f19f51 --- /dev/null +++ b/packages/graz/stubs/chains-index.d.ts.stub @@ -0,0 +1,7 @@ +/* eslint-disable */ +import type { ChainData, ChainDataTuple, ChainName } from "./generated"; +export * from "./generated"; +export const getChainData: (pathOrPaths: T | T[]) => Record; +export const getChainDataArray: ( + pathOrPaths: U, +) => U extends T ? [ChainData] : U extends readonly T[] ? ChainDataTuple : never; diff --git a/packages/graz/stubs/chains-index.js.stub b/packages/graz/stubs/chains-index.js.stub new file mode 100644 index 00000000..24c926b3 --- /dev/null +++ b/packages/graz/stubs/chains-index.js.stub @@ -0,0 +1,38 @@ +/* eslint-disable */ +export * from "./generated"; +export const getChainData = (pathOrPaths) => { + const paths = Array.isArray(pathOrPaths) ? pathOrPaths : [pathOrPaths]; + const chainData = {}; + for (const path of paths) { + chainData[path] = { + get chainInfo() { + return require(`./${path}`).default; + }, + get chain() { + return require(`./${path}/chain`).default; + }, + get assetlist() { + return require(`./${path}/assetlist`).default; + }, + }; + } + return chainData; +}; +export const getChainDataArray = (pathOrPaths) => { + const paths = Array.isArray(pathOrPaths) ? pathOrPaths : [pathOrPaths]; + const chainData = []; + for (const path of paths) { + chainData.push({ + get chainInfo() { + return require(`./${path}`).default; + }, + get chain() { + return require(`./${path}/chain`).default; + }, + get assetlist() { + return require(`./${path}/assetlist`).default; + }, + }); + } + return chainData; +}; diff --git a/packages/graz/tsconfig.json b/packages/graz/tsconfig.json index 5d7629e1..8c37e8a5 100644 --- a/packages/graz/tsconfig.json +++ b/packages/graz/tsconfig.json @@ -1,11 +1,12 @@ { "extends": "@strangelovelabs/style-guide/tsconfig.json", "compilerOptions": { + "downlevelIteration": true, "jsx": "react-jsx", + "module": "Node16", "moduleResolution": "node", - "resolveJsonModule": true, - "module": "Node16" + "resolveJsonModule": true }, - "exclude": ["node_modules"], + "exclude": ["node_modules", "chains"], "include": ["env.d.ts", "**/*.ts", "**/*.tsx"] } diff --git a/packages/graz/tsup.config.ts b/packages/graz/tsup.config.ts index 032aead8..6843bd86 100644 --- a/packages/graz/tsup.config.ts +++ b/packages/graz/tsup.config.ts @@ -1,20 +1,27 @@ import { defineConfig } from "tsup"; -import packageJson from "./package.json"; - -export default defineConfig(({ watch }) => ({ - clean: true, - dts: true, - entry: ["src/*.ts"], - external: [ - ...Object.keys(packageJson.dependencies), - ...Object.keys(packageJson.peerDependencies), - /^@cosmjs\/.*/, - /^@keplr-wallet\/.*/, - ], - format: ["cjs", "esm"], - minify: !watch, - minifyIdentifiers: !watch, - minifySyntax: !watch, - minifyWhitespace: !watch, -})); +export default defineConfig(({ watch }) => [ + { + clean: true, + dts: true, + entry: ["src/*.ts"], + external: [/^@cosmjs\/.*/, /^@keplr-wallet\/.*/], + format: ["cjs", "esm"], + minify: !watch, + treeshake: true, + }, + { + // https://github.com/evanw/esbuild/issues/1921#issuecomment-1491470829 + banner: { + js: `import { createRequire } from "module"; const require = createRequire(import.meta.url);`, + }, + clean: true, + dts: false, + entry: ["src/cli/index.ts"], + format: ["esm"], + minify: !watch, + outDir: "dist/cli/", + shims: true, + treeshake: true, + }, +]); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 55c71317..020f9eee 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,27 +8,57 @@ importers: .: devDependencies: + '@babel/generator': + specifier: ^7.22.5 + version: 7.22.5 + '@babel/parser': + specifier: ^7.22.5 + version: 7.22.5 + '@babel/traverse': + specifier: ^7.22.5 + version: 7.22.5 + '@babel/types': + specifier: ^7.22.5 + version: 7.22.5 '@strangelovelabs/style-guide': specifier: ^2.2.0 version: 2.2.0(eslint@8.43.0)(prettier@2.8.8)(tailwindcss@3.3.2)(typescript@5.1.3) + '@types/babel__generator': + specifier: ^7.6.4 + version: 7.6.4 + '@types/babel__traverse': + specifier: ^7.20.1 + version: 7.20.1 + '@types/tiged': + specifier: npm:@types/degit@^2.8.3 + version: /@types/degit@2.8.3 '@vercel/ncc': specifier: ^0.36.1 version: 0.36.1 eslint: specifier: ^8.43.0 version: 8.43.0 - husky: - specifier: ^8.0.3 - version: 8.0.3 + globby: + specifier: ^13.1.4 + version: 13.1.4 p-map: specifier: ^6.0.0 version: 6.0.0 prettier: specifier: ^2.8.8 version: 2.8.8 + quicktype: + specifier: ^23.0.48 + version: 23.0.48 + tiged: + specifier: ^2.12.5 + version: 2.12.5 tsup: specifier: ^7.0.0 version: 7.0.0(postcss@8.4.24)(typescript@5.1.3) + tsx: + specifier: ^3.12.7 + version: 3.12.7 turbo: specifier: ^1.10.3 version: 1.10.3 @@ -145,7 +175,7 @@ importers: version: 5.1.3 vite: specifier: ^4.3.9 - version: 4.3.9 + version: 4.3.9(@types/node@16.18.36) vite-plugin-node-stdlib-browser: specifier: ^0.2.1 version: 0.2.1(node-stdlib-browser@1.2.0)(vite@4.3.9) @@ -206,6 +236,9 @@ importers: packages/graz: dependencies: + '@clack/prompts': + specifier: ^0.6.3 + version: 0.6.3 '@cosmjs/cosmwasm-stargate': specifier: ^0.30.1 version: 0.30.1 @@ -245,12 +278,12 @@ importers: '@web3modal/standalone': specifier: ^2.4.3 version: 2.4.3(react@18.2.0) - arg: - specifier: ^5.0.2 - version: 5.0.2 - cosmos-directory-client: - specifier: 0.0.6 - version: 0.0.6 + commander: + specifier: ^11.0.0 + version: 11.0.0 + esbuild: + specifier: ^0.18.4 + version: 0.18.4 zustand: specifier: ^4.3.8 version: 4.3.8(react@18.2.0) @@ -346,6 +379,14 @@ importers: packages: + /@75lb/deep-merge@1.1.1: + resolution: {integrity: sha512-xvgv6pkMGBA6GwdyJbNAnDmfAIR/DfWhrj9jgWh3TY7gRm3KO46x/GPjRg6wJ0nOepwqrNxFfojebh0Df4h4Tw==} + engines: {node: '>=12.17'} + dependencies: + lodash.assignwith: 4.2.0 + typical: 7.1.1 + dev: true + /@algolia/autocomplete-core@1.8.2: resolution: {integrity: sha512-mTeshsyFhAqw/ebqNsQpMtbnjr+qVOSKXArEj4K0d7sqc8It1XD0gkASwecm9mF/jlOQ4Z9RNg1HbdA8JPdRwQ==} dependencies: @@ -608,13 +649,6 @@ packages: '@jridgewell/gen-mapping': 0.3.3 '@jridgewell/trace-mapping': 0.3.18 - /@babel/code-frame@7.21.4: - resolution: {integrity: sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/highlight': 7.18.6 - dev: false - /@babel/code-frame@7.22.5: resolution: {integrity: sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==} engines: {node: '>=6.9.0'} @@ -664,15 +698,15 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.2.1 - '@babel/code-frame': 7.21.4 - '@babel/generator': 7.21.9 + '@babel/code-frame': 7.22.5 + '@babel/generator': 7.22.5 '@babel/helper-compilation-targets': 7.21.5(@babel/core@7.21.8) '@babel/helper-module-transforms': 7.21.5 '@babel/helpers': 7.21.5 - '@babel/parser': 7.21.9 + '@babel/parser': 7.22.5 '@babel/template': 7.21.9 - '@babel/traverse': 7.21.5 - '@babel/types': 7.22.3 + '@babel/traverse': 7.22.5 + '@babel/types': 7.22.5 convert-source-map: 1.9.0 debug: 4.3.4 gensync: 1.0.0-beta.2 @@ -687,15 +721,15 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.2.1 - '@babel/code-frame': 7.21.4 - '@babel/generator': 7.22.3 + '@babel/code-frame': 7.22.5 + '@babel/generator': 7.22.5 '@babel/helper-compilation-targets': 7.22.1(@babel/core@7.22.1) '@babel/helper-module-transforms': 7.22.1 '@babel/helpers': 7.22.3 - '@babel/parser': 7.22.3 + '@babel/parser': 7.22.5 '@babel/template': 7.21.9 - '@babel/traverse': 7.22.1 - '@babel/types': 7.22.3 + '@babel/traverse': 7.22.5 + '@babel/types': 7.22.5 convert-source-map: 1.9.0 debug: 4.3.4 gensync: 1.0.0-beta.2 @@ -741,26 +775,6 @@ packages: semver: 6.3.0 dev: true - /@babel/generator@7.21.9: - resolution: {integrity: sha512-F3fZga2uv09wFdEjEQIJxXALXfz0+JaOb7SabvVMmjHxeVTuGW8wgE8Vp1Hd7O+zMTYtcfEISGRzPkeiaPPsvg==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.22.3 - '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.18 - jsesc: 2.5.2 - dev: false - - /@babel/generator@7.22.3: - resolution: {integrity: sha512-C17MW4wlk//ES/CJDL51kPNwl+qiBQyN7b9SKyVp11BLGFeSPoVaHrv+MNt8jwQFhQWowW88z1eeBx3pFz9v8A==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.22.5 - '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.18 - jsesc: 2.5.2 - dev: false - /@babel/generator@7.22.5: resolution: {integrity: sha512-+lcUbnTRhd0jOewtFSedLyiPsD5tswKkbgcezOqqWFUVNEwoUTlpPOBmvhG7OXWLR4jMdv0czPGH5XbflnD1EA==} engines: {node: '>=6.9.0'} @@ -889,13 +903,13 @@ packages: dependencies: '@babel/core': 7.21.8 '@babel/helper-annotate-as-pure': 7.18.6 - '@babel/helper-environment-visitor': 7.21.5 - '@babel/helper-function-name': 7.21.0 + '@babel/helper-environment-visitor': 7.22.5 + '@babel/helper-function-name': 7.22.5 '@babel/helper-member-expression-to-functions': 7.21.5 '@babel/helper-optimise-call-expression': 7.18.6 '@babel/helper-replace-supers': 7.21.5 '@babel/helper-skip-transparent-expression-wrappers': 7.20.0 - '@babel/helper-split-export-declaration': 7.18.6 + '@babel/helper-split-export-declaration': 7.22.5 semver: 6.3.0 transitivePeerDependencies: - supports-color @@ -909,13 +923,13 @@ packages: dependencies: '@babel/core': 7.22.1 '@babel/helper-annotate-as-pure': 7.18.6 - '@babel/helper-environment-visitor': 7.21.5 - '@babel/helper-function-name': 7.21.0 + '@babel/helper-environment-visitor': 7.22.5 + '@babel/helper-function-name': 7.22.5 '@babel/helper-member-expression-to-functions': 7.21.5 '@babel/helper-optimise-call-expression': 7.18.6 '@babel/helper-replace-supers': 7.21.5 '@babel/helper-skip-transparent-expression-wrappers': 7.20.0 - '@babel/helper-split-export-declaration': 7.18.6 + '@babel/helper-split-export-declaration': 7.22.5 semver: 6.3.0 transitivePeerDependencies: - supports-color @@ -977,28 +991,10 @@ packages: - supports-color dev: false - /@babel/helper-environment-visitor@7.21.5: - resolution: {integrity: sha512-IYl4gZ3ETsWocUWgsFZLM5i1BYx9SoemminVEXadgLBa9TdeorzgLKm8wWLA6J1N/kT3Kch8XIk1laNzYoHKvQ==} - engines: {node: '>=6.9.0'} - dev: false - - /@babel/helper-environment-visitor@7.22.1: - resolution: {integrity: sha512-Z2tgopurB/kTbidvzeBrc2To3PUP/9i5MUe+fU6QJCQDyPwSH2oRapkLw3KGECDYSjhQZCNxEvNvZlLw8JjGwA==} - engines: {node: '>=6.9.0'} - dev: false - /@babel/helper-environment-visitor@7.22.5: resolution: {integrity: sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==} engines: {node: '>=6.9.0'} - /@babel/helper-function-name@7.21.0: - resolution: {integrity: sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/template': 7.21.9 - '@babel/types': 7.21.5 - dev: false - /@babel/helper-function-name@7.22.5: resolution: {integrity: sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==} engines: {node: '>=6.9.0'} @@ -1006,13 +1002,6 @@ packages: '@babel/template': 7.22.5 '@babel/types': 7.22.5 - /@babel/helper-hoist-variables@7.18.6: - resolution: {integrity: sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.21.5 - dev: false - /@babel/helper-hoist-variables@7.22.5: resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} engines: {node: '>=6.9.0'} @@ -1030,7 +1019,7 @@ packages: resolution: {integrity: sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.21.5 + '@babel/types': 7.22.5 dev: false /@babel/helper-module-imports@7.22.5: @@ -1043,14 +1032,14 @@ packages: resolution: {integrity: sha512-bI2Z9zBGY2q5yMHoBvJ2a9iX3ZOAzJPm7Q8Yz6YeoUjU/Cvhmi2G4QyTNyPBqqXSgTjUxRg3L0xV45HvkNWWBw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-environment-visitor': 7.21.5 + '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-module-imports': 7.21.4 '@babel/helper-simple-access': 7.21.5 - '@babel/helper-split-export-declaration': 7.18.6 - '@babel/helper-validator-identifier': 7.19.1 - '@babel/template': 7.21.9 - '@babel/traverse': 7.22.1 - '@babel/types': 7.22.3 + '@babel/helper-split-export-declaration': 7.22.5 + '@babel/helper-validator-identifier': 7.22.5 + '@babel/template': 7.22.5 + '@babel/traverse': 7.22.5 + '@babel/types': 7.22.5 transitivePeerDependencies: - supports-color dev: false @@ -1059,11 +1048,11 @@ packages: resolution: {integrity: sha512-dxAe9E7ySDGbQdCVOY/4+UcD8M9ZFqZcZhSPsPacvCG4M+9lwtDDQfI2EoaSvmf7W/8yCBkGU0m7Pvt1ru3UZw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-environment-visitor': 7.22.1 + '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-module-imports': 7.21.4 '@babel/helper-simple-access': 7.21.5 - '@babel/helper-split-export-declaration': 7.18.6 - '@babel/helper-validator-identifier': 7.19.1 + '@babel/helper-split-export-declaration': 7.22.5 + '@babel/helper-validator-identifier': 7.22.5 '@babel/template': 7.22.5 '@babel/traverse': 7.22.5 '@babel/types': 7.22.5 @@ -1115,7 +1104,7 @@ packages: dependencies: '@babel/core': 7.21.8 '@babel/helper-annotate-as-pure': 7.18.6 - '@babel/helper-environment-visitor': 7.21.5 + '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-wrap-function': 7.20.5 '@babel/types': 7.22.5 transitivePeerDependencies: @@ -1130,7 +1119,7 @@ packages: dependencies: '@babel/core': 7.22.1 '@babel/helper-annotate-as-pure': 7.18.6 - '@babel/helper-environment-visitor': 7.21.5 + '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-wrap-function': 7.20.5 '@babel/types': 7.22.5 transitivePeerDependencies: @@ -1141,7 +1130,7 @@ packages: resolution: {integrity: sha512-/y7vBgsr9Idu4M6MprbOVUfH3vs7tsIfnVWv/Ml2xgwvyH6LTngdfbf5AdsKwkJy4zgy1X/kuNrEKvhhK28Yrg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-environment-visitor': 7.21.5 + '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-member-expression-to-functions': 7.21.5 '@babel/helper-optimise-call-expression': 7.18.6 '@babel/template': 7.22.5 @@ -1171,33 +1160,16 @@ packages: '@babel/types': 7.22.5 dev: false - /@babel/helper-split-export-declaration@7.18.6: - resolution: {integrity: sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.22.3 - dev: false - /@babel/helper-split-export-declaration@7.22.5: resolution: {integrity: sha512-thqK5QFghPKWLhAV321lxF95yCg2K3Ob5yw+M3VHWfdia0IkPXUtoLH8x/6Fh486QUvzhb8YOWHChTVen2/PoQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.5 - /@babel/helper-string-parser@7.21.5: - resolution: {integrity: sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w==} - engines: {node: '>=6.9.0'} - dev: false - /@babel/helper-string-parser@7.22.5: resolution: {integrity: sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==} engines: {node: '>=6.9.0'} - /@babel/helper-validator-identifier@7.19.1: - resolution: {integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==} - engines: {node: '>=6.9.0'} - dev: false - /@babel/helper-validator-identifier@7.22.5: resolution: {integrity: sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==} engines: {node: '>=6.9.0'} @@ -1215,7 +1187,7 @@ packages: resolution: {integrity: sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-function-name': 7.21.0 + '@babel/helper-function-name': 7.22.5 '@babel/template': 7.22.5 '@babel/traverse': 7.22.5 '@babel/types': 7.22.5 @@ -1227,9 +1199,9 @@ packages: resolution: {integrity: sha512-BSY+JSlHxOmGsPTydUkPf1MdMQ3M81x5xGCOVgWM3G8XH77sJ292Y2oqcp0CbbgxhqBuI46iUz1tT7hqP7EfgA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/template': 7.21.9 - '@babel/traverse': 7.22.1 - '@babel/types': 7.22.3 + '@babel/template': 7.22.5 + '@babel/traverse': 7.22.5 + '@babel/types': 7.22.5 transitivePeerDependencies: - supports-color dev: false @@ -1255,15 +1227,6 @@ packages: transitivePeerDependencies: - supports-color - /@babel/highlight@7.18.6: - resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-validator-identifier': 7.19.1 - chalk: 2.4.2 - js-tokens: 4.0.0 - dev: false - /@babel/highlight@7.22.5: resolution: {integrity: sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==} engines: {node: '>=6.9.0'} @@ -1272,22 +1235,6 @@ packages: chalk: 2.4.2 js-tokens: 4.0.0 - /@babel/parser@7.21.9: - resolution: {integrity: sha512-q5PNg/Bi1OpGgx5jYlvWZwAorZepEudDMCLtj967aeS7WMont7dUZI46M2XwcIQqvUlMxWfdLFu4S/qSxeUu5g==} - engines: {node: '>=6.0.0'} - hasBin: true - dependencies: - '@babel/types': 7.22.3 - dev: false - - /@babel/parser@7.22.3: - resolution: {integrity: sha512-vrukxyW/ep8UD1UDzOYpTKQ6abgjFoeG6L+4ar9+c5TN9QnlqiOi6QK7LSR5ewm/ERyGkT/Ai6VboNrxhbr9Uw==} - engines: {node: '>=6.0.0'} - hasBin: true - dependencies: - '@babel/types': 7.22.5 - dev: false - /@babel/parser@7.22.5: resolution: {integrity: sha512-DFZMC9LJUG9PLOclRC32G63UXwzqS2koQC8dkx+PLdmt1xSePYpbT/NbsrJy8Q/muXz7o/h/d4A7Fuyixm559Q==} engines: {node: '>=6.0.0'} @@ -1346,7 +1293,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.21.8 - '@babel/helper-environment-visitor': 7.21.5 + '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-plugin-utils': 7.21.5 '@babel/helper-remap-async-to-generator': 7.18.9(@babel/core@7.21.8) '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.21.8) @@ -1361,7 +1308,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.22.1 - '@babel/helper-environment-visitor': 7.21.5 + '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-plugin-utils': 7.21.5 '@babel/helper-remap-async-to-generator': 7.18.9(@babel/core@7.22.1) '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.22.1) @@ -2169,12 +2116,12 @@ packages: '@babel/core': 7.21.8 '@babel/helper-annotate-as-pure': 7.18.6 '@babel/helper-compilation-targets': 7.22.1(@babel/core@7.21.8) - '@babel/helper-environment-visitor': 7.21.5 - '@babel/helper-function-name': 7.21.0 + '@babel/helper-environment-visitor': 7.22.5 + '@babel/helper-function-name': 7.22.5 '@babel/helper-optimise-call-expression': 7.18.6 '@babel/helper-plugin-utils': 7.21.5 '@babel/helper-replace-supers': 7.21.5 - '@babel/helper-split-export-declaration': 7.18.6 + '@babel/helper-split-export-declaration': 7.22.5 globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -2189,12 +2136,12 @@ packages: '@babel/core': 7.22.1 '@babel/helper-annotate-as-pure': 7.18.6 '@babel/helper-compilation-targets': 7.22.1(@babel/core@7.22.1) - '@babel/helper-environment-visitor': 7.21.5 - '@babel/helper-function-name': 7.21.0 + '@babel/helper-environment-visitor': 7.22.5 + '@babel/helper-function-name': 7.22.5 '@babel/helper-optimise-call-expression': 7.18.6 '@babel/helper-plugin-utils': 7.21.5 '@babel/helper-replace-supers': 7.21.5 - '@babel/helper-split-export-declaration': 7.18.6 + '@babel/helper-split-export-declaration': 7.22.5 globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -2208,7 +2155,7 @@ packages: dependencies: '@babel/core': 7.21.8 '@babel/helper-plugin-utils': 7.21.5 - '@babel/template': 7.21.9 + '@babel/template': 7.22.5 dev: false /@babel/plugin-transform-computed-properties@7.21.5(@babel/core@7.22.1): @@ -2219,7 +2166,7 @@ packages: dependencies: '@babel/core': 7.22.1 '@babel/helper-plugin-utils': 7.21.5 - '@babel/template': 7.21.9 + '@babel/template': 7.22.5 dev: false /@babel/plugin-transform-destructuring@7.21.3(@babel/core@7.21.8): @@ -2334,7 +2281,7 @@ packages: dependencies: '@babel/core': 7.21.8 '@babel/helper-compilation-targets': 7.22.1(@babel/core@7.21.8) - '@babel/helper-function-name': 7.21.0 + '@babel/helper-function-name': 7.22.5 '@babel/helper-plugin-utils': 7.21.5 dev: false @@ -2346,7 +2293,7 @@ packages: dependencies: '@babel/core': 7.22.1 '@babel/helper-compilation-targets': 7.22.1(@babel/core@7.22.1) - '@babel/helper-function-name': 7.21.0 + '@babel/helper-function-name': 7.22.5 '@babel/helper-plugin-utils': 7.21.5 dev: false @@ -2451,10 +2398,10 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.21.8 - '@babel/helper-hoist-variables': 7.18.6 + '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-module-transforms': 7.22.1 '@babel/helper-plugin-utils': 7.21.5 - '@babel/helper-validator-identifier': 7.19.1 + '@babel/helper-validator-identifier': 7.22.5 transitivePeerDependencies: - supports-color dev: false @@ -2466,10 +2413,10 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.22.1 - '@babel/helper-hoist-variables': 7.18.6 + '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-module-transforms': 7.22.1 '@babel/helper-plugin-utils': 7.21.5 - '@babel/helper-validator-identifier': 7.19.1 + '@babel/helper-validator-identifier': 7.22.5 transitivePeerDependencies: - supports-color dev: false @@ -2699,7 +2646,7 @@ packages: '@babel/helper-module-imports': 7.21.4 '@babel/helper-plugin-utils': 7.21.5 '@babel/plugin-syntax-jsx': 7.21.4(@babel/core@7.21.8) - '@babel/types': 7.22.3 + '@babel/types': 7.22.5 dev: false /@babel/plugin-transform-react-jsx@7.21.5(@babel/core@7.22.1): @@ -2713,7 +2660,7 @@ packages: '@babel/helper-module-imports': 7.21.4 '@babel/helper-plugin-utils': 7.21.5 '@babel/plugin-syntax-jsx': 7.21.4(@babel/core@7.22.1) - '@babel/types': 7.22.3 + '@babel/types': 7.22.5 dev: false /@babel/plugin-transform-react-pure-annotations@7.18.6(@babel/core@7.21.8): @@ -3048,7 +2995,7 @@ packages: '@babel/plugin-transform-unicode-escapes': 7.21.5(@babel/core@7.21.8) '@babel/plugin-transform-unicode-regex': 7.18.6(@babel/core@7.21.8) '@babel/preset-modules': 0.1.5(@babel/core@7.21.8) - '@babel/types': 7.22.3 + '@babel/types': 7.22.5 babel-plugin-polyfill-corejs2: 0.3.3(@babel/core@7.21.8) babel-plugin-polyfill-corejs3: 0.6.0(@babel/core@7.21.8) babel-plugin-polyfill-regenerator: 0.4.1(@babel/core@7.21.8) @@ -3135,7 +3082,7 @@ packages: '@babel/plugin-transform-unicode-escapes': 7.21.5(@babel/core@7.22.1) '@babel/plugin-transform-unicode-regex': 7.18.6(@babel/core@7.22.1) '@babel/preset-modules': 0.1.5(@babel/core@7.22.1) - '@babel/types': 7.22.3 + '@babel/types': 7.22.5 babel-plugin-polyfill-corejs2: 0.3.3(@babel/core@7.22.1) babel-plugin-polyfill-corejs3: 0.6.0(@babel/core@7.22.1) babel-plugin-polyfill-regenerator: 0.4.1(@babel/core@7.22.1) @@ -3154,7 +3101,7 @@ packages: '@babel/helper-plugin-utils': 7.21.5 '@babel/plugin-proposal-unicode-property-regex': 7.18.6(@babel/core@7.21.8) '@babel/plugin-transform-dotall-regex': 7.18.6(@babel/core@7.21.8) - '@babel/types': 7.22.3 + '@babel/types': 7.22.5 esutils: 2.0.3 dev: false @@ -3167,7 +3114,7 @@ packages: '@babel/helper-plugin-utils': 7.21.5 '@babel/plugin-proposal-unicode-property-regex': 7.18.6(@babel/core@7.22.1) '@babel/plugin-transform-dotall-regex': 7.18.6(@babel/core@7.22.1) - '@babel/types': 7.22.3 + '@babel/types': 7.22.5 esutils: 2.0.3 dev: false @@ -3267,55 +3214,19 @@ packages: /@babel/template@7.21.9: resolution: {integrity: sha512-MK0X5k8NKOuWRamiEfc3KEJiHMTkGZNUjzMipqCGDDc6ijRl/B7RGSKVGncu4Ro/HdyzzY6cmoXuKI2Gffk7vQ==} engines: {node: '>=6.9.0'} - dependencies: - '@babel/code-frame': 7.21.4 - '@babel/parser': 7.22.3 - '@babel/types': 7.22.3 - dev: false - - /@babel/template@7.22.5: - resolution: {integrity: sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==} - engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.22.5 '@babel/parser': 7.22.5 '@babel/types': 7.22.5 - - /@babel/traverse@7.21.5: - resolution: {integrity: sha512-AhQoI3YjWi6u/y/ntv7k48mcrCXmus0t79J9qPNlk/lAsFlCiJ047RmbfMOawySTHtywXhbXgpx/8nXMYd+oFw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/code-frame': 7.21.4 - '@babel/generator': 7.21.9 - '@babel/helper-environment-visitor': 7.21.5 - '@babel/helper-function-name': 7.21.0 - '@babel/helper-hoist-variables': 7.18.6 - '@babel/helper-split-export-declaration': 7.18.6 - '@babel/parser': 7.21.9 - '@babel/types': 7.22.3 - debug: 4.3.4 - globals: 11.12.0 - transitivePeerDependencies: - - supports-color dev: false - /@babel/traverse@7.22.1: - resolution: {integrity: sha512-lAWkdCoUFnmwLBhIRLciFntGYsIIoC6vIbN8zrLPqBnJmPu7Z6nzqnKd7FsxQUNAvZfVZ0x6KdNvNp8zWIOHSQ==} + /@babel/template@7.22.5: + resolution: {integrity: sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==} engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.22.5 - '@babel/generator': 7.22.5 - '@babel/helper-environment-visitor': 7.22.1 - '@babel/helper-function-name': 7.21.0 - '@babel/helper-hoist-variables': 7.18.6 - '@babel/helper-split-export-declaration': 7.18.6 '@babel/parser': 7.22.5 '@babel/types': 7.22.5 - debug: 4.3.4 - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - dev: false /@babel/traverse@7.22.5: resolution: {integrity: sha512-7DuIjPgERaNo6r+PZwItpjCZEa5vyw4eJGufeLxrPdBXBoLcCJCIasvK6pK/9DVNrLZTLFhUGqaC6X/PA007TQ==} @@ -3334,24 +3245,6 @@ packages: transitivePeerDependencies: - supports-color - /@babel/types@7.21.5: - resolution: {integrity: sha512-m4AfNvVF2mVC/F7fDEdH2El3HzUg9It/XsCxZiOTTA3m3qYfcSVSbTfM6Q9xG+hYDniZssYhlXKKUMD5m8tF4Q==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-string-parser': 7.21.5 - '@babel/helper-validator-identifier': 7.19.1 - to-fast-properties: 2.0.0 - dev: false - - /@babel/types@7.22.3: - resolution: {integrity: sha512-P3na3xIQHTKY4L0YOG7pM8M8uoUIB910WQaSiiMCZUC2Cy8XFEQONGABFnHWBa2gpGKODTAJcNhi5Zk0sLRrzg==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-string-parser': 7.21.5 - '@babel/helper-validator-identifier': 7.19.1 - to-fast-properties: 2.0.0 - dev: false - /@babel/types@7.22.5: resolution: {integrity: sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==} engines: {node: '>=6.9.0'} @@ -4436,6 +4329,23 @@ packages: react: 18.2.0 dev: false + /@clack/core@0.3.2: + resolution: {integrity: sha512-FZnsNynwGDIDktx6PEZK1EuCkFpY4ldEX6VYvfl0dqeoLPb9Jpw1xoUXaVcGR8ExmYNm1w2vdGdJkEUYD/2pqg==} + dependencies: + picocolors: 1.0.0 + sisteransi: 1.0.5 + dev: false + + /@clack/prompts@0.6.3: + resolution: {integrity: sha512-AM+kFmAHawpUQv2q9+mcB6jLKxXGjgu/r2EQjEwujgpCdzrST6BJqYw00GRn56/L/Izw5U7ImoLmy00X/r80Pw==} + dependencies: + '@clack/core': 0.3.2 + picocolors: 1.0.0 + sisteransi: 1.0.5 + dev: false + bundledDependencies: + - is-unicode-supported + /@cmfcmf/docusaurus-search-local@1.1.0(@docusaurus/core@2.4.1)(search-insights@2.6.0): resolution: {integrity: sha512-0IVb/aA0IK8ZlktuxmgXmluXfcSpo6Vdd2nG21y1aOH9nVYnPP231Dn0H8Ng9Qf9ronQQCDWHnuWpYOr9rUrEQ==} peerDependencies: @@ -4664,6 +4574,13 @@ packages: resolution: {integrity: sha512-KvvX58MGMWh7xA+N+deCfunkA/ZNDvFLw4YbOmX3f/XBIkqrVY7qlotfy2aNb1kgp6h4B6Yc8YawJPDTfvWX7g==} dev: false + /@cspotcode/source-map-support@0.8.1: + resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/trace-mapping': 0.3.9 + dev: true + /@discoveryjs/json-ext@0.5.7: resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==} engines: {node: '>=10.0.0'} @@ -4706,7 +4623,7 @@ packages: react-dom: ^16.8.4 || ^17.0.0 dependencies: '@babel/core': 7.21.8 - '@babel/generator': 7.21.9 + '@babel/generator': 7.22.5 '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.21.8) '@babel/plugin-transform-runtime': 7.21.4(@babel/core@7.21.8) '@babel/preset-env': 7.21.5(@babel/core@7.21.8) @@ -4714,7 +4631,7 @@ packages: '@babel/preset-typescript': 7.21.5(@babel/core@7.21.8) '@babel/runtime': 7.21.5 '@babel/runtime-corejs3': 7.21.5 - '@babel/traverse': 7.21.5 + '@babel/traverse': 7.22.5 '@docusaurus/cssnano-preset': 2.4.1 '@docusaurus/logger': 2.4.1 '@docusaurus/mdx-loader': 2.4.1(@docusaurus/types@2.4.1)(esbuild@0.18.4)(react-dom@18.2.0)(react@18.2.0) @@ -4822,8 +4739,8 @@ packages: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@babel/parser': 7.21.9 - '@babel/traverse': 7.21.5 + '@babel/parser': 7.22.5 + '@babel/traverse': 7.22.5 '@docusaurus/logger': 2.4.1 '@docusaurus/utils': 2.4.1(@docusaurus/types@2.4.1)(esbuild@0.18.4) '@mdx-js/mdx': 1.6.22 @@ -5575,6 +5492,27 @@ packages: resolution: {integrity: sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==} dev: false + /@esbuild-kit/cjs-loader@2.4.2: + resolution: {integrity: sha512-BDXFbYOJzT/NBEtp71cvsrGPwGAMGRB/349rwKuoxNSiKjPraNNnlK6MIIabViCjqZugu6j+xeMDlEkWdHHJSg==} + dependencies: + '@esbuild-kit/core-utils': 3.1.0 + get-tsconfig: 4.6.0 + dev: true + + /@esbuild-kit/core-utils@3.1.0: + resolution: {integrity: sha512-Uuk8RpCg/7fdHSceR1M6XbSZFSuMrxcePFuGgyvsBn+u339dk5OeL4jv2EojwTN2st/unJGsVm4qHWjWNmJ/tw==} + dependencies: + esbuild: 0.17.19 + source-map-support: 0.5.21 + dev: true + + /@esbuild-kit/esm-loader@2.5.5: + resolution: {integrity: sha512-Qwfvj/qoPbClxCRNuac1Du01r9gvNOT+pMYtJDapfB1eoGN1YlJ1BixLyL9WVENRx5RXgNLdfYdx/CuswlGhMw==} + dependencies: + '@esbuild-kit/core-utils': 3.1.0 + get-tsconfig: 4.6.0 + dev: true + /@esbuild/android-arm64@0.17.19: resolution: {integrity: sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==} engines: {node: '>=12'} @@ -6024,6 +5962,10 @@ packages: '@ethersproject/logger': 5.7.0 dev: false + /@glideapps/ts-necessities@2.1.3: + resolution: {integrity: sha512-q9U8v/n9qbkd2zDYjuX3qtlbl+OIyI9zF+zQhZjfYOE9VMDH7tfcUSJ9p0lXoY3lxmGFne09yi4iiNeQUwV7AA==} + dev: true + /@hapi/hoek@9.3.0: resolution: {integrity: sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==} @@ -6114,6 +6056,13 @@ packages: '@jridgewell/resolve-uri': 3.1.0 '@jridgewell/sourcemap-codec': 1.4.14 + /@jridgewell/trace-mapping@0.3.9: + resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + dependencies: + '@jridgewell/resolve-uri': 3.1.0 + '@jridgewell/sourcemap-codec': 1.4.15 + dev: true + /@keplr-wallet/common@0.12.10: resolution: {integrity: sha512-dIdt5ZKhVJ/lmmvoJTnwqLgR0lBo2Xlgr17LPNwI28LpTgl2ilANn0JfPSOCALhy3ODDaPurZs02o1njRiEq+Q==} dependencies: @@ -6192,6 +6141,23 @@ packages: '@lit-labs/ssr-dom-shim': 1.1.1 dev: false + /@mark.probst/typescript-json-schema@0.55.0: + resolution: {integrity: sha512-jI48mSnRgFQxXiE/UTUCVCpX8lK3wCFKLF1Ss2aEreboKNuLQGt3e0/YFqWVHe/WENxOaqiJvwOz+L/SrN2+qQ==} + hasBin: true + dependencies: + '@types/json-schema': 7.0.12 + '@types/node': 16.18.36 + glob: 7.2.3 + path-equal: 1.2.5 + safe-stable-stringify: 2.4.3 + ts-node: 10.9.1(@types/node@16.18.36)(typescript@4.9.4) + typescript: 4.9.4 + yargs: 17.7.2 + transitivePeerDependencies: + - '@swc/core' + - '@swc/wasm' + dev: true + /@mdx-js/mdx@1.6.22: resolution: {integrity: sha512-AMxuLxPz2j5/6TpF/XSdKpQP1NlG0z11dFOlq+2IP/lSgl11GY8ji6S/rgsViN/L0BDvHvUMruRb7ub+24LUYA==} dependencies: @@ -6956,12 +6922,40 @@ packages: resolution: {integrity: sha512-ffTXxGIP/IRMCjuzHd6M4/HdIrw1bMfC7Bv8hMkTadnePkpe0lG0oDSdbRpSDZb2rQMAgpbWiR10BvxvNYwYrg==} dev: true + /@tsconfig/node10@1.0.9: + resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} + dev: true + + /@tsconfig/node12@1.0.11: + resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} + dev: true + + /@tsconfig/node14@1.0.3: + resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} + dev: true + + /@tsconfig/node16@1.0.4: + resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} + dev: true + /@types/async-retry@1.4.5: resolution: {integrity: sha512-YrdjSD+yQv7h6d5Ip+PMxh3H6ZxKyQk0Ts+PvaNRInxneG9PFVZjFg77ILAN+N6qYf7g4giSJ1l+ZjQ1zeegvA==} dependencies: '@types/retry': 0.12.2 dev: true + /@types/babel__generator@7.6.4: + resolution: {integrity: sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==} + dependencies: + '@babel/types': 7.22.5 + dev: true + + /@types/babel__traverse@7.20.1: + resolution: {integrity: sha512-MitHFXnhtgwsGZWtT68URpOvLN4EREih1u3QtQiN4VdAxWKRVvGCSvw/Qth0M0Qq3pJpnGOu5JaM/ydK7OGbqg==} + dependencies: + '@babel/types': 7.22.5 + dev: true + /@types/body-parser@1.19.2: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: @@ -6994,6 +6988,10 @@ packages: '@types/node': 20.3.1 dev: true + /@types/degit@2.8.3: + resolution: {integrity: sha512-CL7y71j2zaDmtPLD5Xq5S1Gv2dFoHl0/GBZm6s39Mj/ls28L3NzAOqf7H4H0/2TNVMgMjMVf9CAFYSjmXhi3bw==} + dev: true + /@types/eslint-scope@3.7.4: resolution: {integrity: sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==} dependencies: @@ -7115,6 +7113,10 @@ packages: resolution: {integrity: sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==} dev: false + /@types/node@16.18.36: + resolution: {integrity: sha512-8egDX8dE50XyXWH6C6PRCNkTP106DuUrvdrednFouDSmCi7IOvrqr0frznfZaHifHH/3aq/7a7v9N4wdXMqhBQ==} + dev: true + /@types/node@17.0.45: resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} dev: false @@ -7260,6 +7262,10 @@ packages: resolution: {integrity: sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==} dev: false + /@types/urijs@1.19.19: + resolution: {integrity: sha512-FDJNkyhmKLw7uEvTxx5tSXfPeQpO0iy73Ry+PmYZJvQy0QIWX8a7kJ4kLWRf+EbTPJEPDSgPXHaM7pzr5lmvCg==} + dev: true + /@types/validate-npm-package-name@4.0.0: resolution: {integrity: sha512-RpO62vB2lkjEkyLbwTheA2+uwYmtVMWTr/kWRI++UAgVdZqNqdAuIQl/SxBCGeMKfdjWaXPbyhZbiCc4PAj+KA==} dev: true @@ -7425,7 +7431,7 @@ packages: '@babel/plugin-transform-react-jsx-self': 7.22.5(@babel/core@7.22.5) '@babel/plugin-transform-react-jsx-source': 7.22.5(@babel/core@7.22.5) react-refresh: 0.14.0 - vite: 4.3.9 + vite: 4.3.9(@types/node@16.18.36) transitivePeerDependencies: - supports-color dev: true @@ -7768,6 +7774,13 @@ packages: resolution: {integrity: sha512-0j2gZq8HiZ51z4zNnSkF1iSkqlwRDvdH+son3wHdoz+7IUdMN/5Exd4TxMJ+gq2Of1DiXReYLL9qqh2PdQ4wgA==} dev: false + /abort-controller@3.0.0: + resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} + engines: {node: '>=6.5'} + dependencies: + event-target-shim: 5.0.1 + dev: true + /accepts@1.3.8: resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} engines: {node: '>= 0.6'} @@ -7793,7 +7806,6 @@ packages: /acorn-walk@8.2.0: resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} engines: {node: '>=0.4.0'} - dev: false /acorn@8.8.2: resolution: {integrity: sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==} @@ -7805,6 +7817,15 @@ packages: engines: {node: '>= 10.0.0'} dev: false + /agent-base@6.0.2: + resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} + engines: {node: '>= 6.0.0'} + dependencies: + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: true + /aggregate-error@3.1.0: resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} engines: {node: '>=8'} @@ -7891,6 +7912,11 @@ packages: string-width: 4.2.3 dev: false + /ansi-colors@4.1.3: + resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} + engines: {node: '>=6'} + dev: true + /ansi-html-community@0.0.8: resolution: {integrity: sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==} engines: {'0': node >= 0.8.0} @@ -7932,6 +7958,10 @@ packages: normalize-path: 3.0.0 picomatch: 2.3.1 + /arg@4.1.3: + resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} + dev: true + /arg@5.0.2: resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} @@ -7957,6 +7987,16 @@ packages: dequal: 2.0.3 dev: true + /array-back@3.1.0: + resolution: {integrity: sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==} + engines: {node: '>=6'} + dev: true + + /array-back@6.2.2: + resolution: {integrity: sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw==} + engines: {node: '>=12.17'} + dev: true + /array-buffer-byte-length@1.0.0: resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} dependencies: @@ -8389,6 +8429,10 @@ packages: /brorand@1.1.0: resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} + /browser-or-node@2.1.1: + resolution: {integrity: sha512-8CVjaLJGuSKMVTxJ2DpBl5XnlNDiT4cQFeuCJJrvJmts9YrTZDizTX7PjC2s6W4x+MBGZeEY6dGMrF04/6Hgqg==} + dev: true + /browser-resolve@2.0.0: resolution: {integrity: sha512-7sWsQlYL2rGLy2IWm8WL8DCTJvYLc/qlOnsakDac87SOoCd16WLsaAMdCiAqsTNHIe+SXfaqyxyo6THoWqs8WQ==} dependencies: @@ -8503,7 +8547,6 @@ packages: dependencies: base64-js: 1.5.1 ieee754: 1.2.1 - dev: false /builtin-modules@3.3.0: resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} @@ -8640,6 +8683,13 @@ packages: resolution: {integrity: sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg==} dev: false + /chalk-template@0.4.0: + resolution: {integrity: sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==} + engines: {node: '>=12'} + dependencies: + chalk: 4.1.2 + dev: true + /chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} @@ -8783,6 +8833,15 @@ packages: wrap-ansi: 6.2.0 dev: false + /cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + dependencies: + 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==} engines: {node: '>=6'} @@ -8806,6 +8865,10 @@ packages: resolution: {integrity: sha512-jEovNnrhMuqyCcjfEJA56v0Xq8SkIoPKDyaHahwo3POf4qcSXqMYuwNcOTzp74vTsR9Tn08z4MxWqAhcekogkQ==} dev: false + /collection-utils@1.0.1: + resolution: {integrity: sha512-LA2YTIlR7biSpXkKYwwuzGjwL5rjWEZVOSnvdUc7gObvWe4WkjxOpfrdhoP7Hs09YWDVfg0Mal9BpAqLfVEzQg==} + dev: true + /color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: @@ -8831,6 +8894,10 @@ packages: resolution: {integrity: sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==} dev: false + /colorette@1.2.1: + resolution: {integrity: sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==} + dev: true + /colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} dev: false @@ -8844,10 +8911,29 @@ packages: resolution: {integrity: sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==} dev: false + /command-line-args@5.2.1: + resolution: {integrity: sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==} + engines: {node: '>=4.0.0'} + dependencies: + array-back: 3.1.0 + find-replace: 3.0.0 + lodash.camelcase: 4.3.0 + typical: 4.0.0 + dev: true + + /command-line-usage@7.0.1: + resolution: {integrity: sha512-NCyznE//MuTjwi3y84QVUGEOT+P5oto1e1Pk/jFPVdPPfsG03qpTIl3yw6etR+v73d0lXsoojRpvbru2sqePxQ==} + engines: {node: '>=12.20.0'} + dependencies: + array-back: 6.2.2 + chalk-template: 0.4.0 + table-layout: 3.0.2 + typical: 7.1.1 + dev: true + /commander@11.0.0: resolution: {integrity: sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ==} engines: {node: '>=16'} - dev: true /commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} @@ -9054,17 +9140,6 @@ packages: protobufjs: 6.11.3 dev: false - /cosmos-directory-client@0.0.6: - resolution: {integrity: sha512-WIdaQ8uW1vIbYvNnAVunkC6yxTrneJC7VQ5UUQ0kuw8b0C0A39KTIpoQHCfc8tV7o9vF4niwRhdXEdfAgQEsQQ==} - dependencies: - cosmos-directory-types: 0.0.6 - node-fetch-native: 1.2.0 - dev: false - - /cosmos-directory-types@0.0.6: - resolution: {integrity: sha512-9qlQ3kTNTHvhYglTXSnllGqKhrtGB08Weatw56ZqV5OqcmjuZdlY9iMtD00odgQLTEpTSQQL3gFGuqTkGdIDPA==} - dev: false - /create-ecdh@4.0.4: resolution: {integrity: sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==} dependencies: @@ -9101,7 +9176,6 @@ packages: node-fetch: 2.6.11 transitivePeerDependencies: - encoding - dev: false /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} @@ -9540,6 +9614,11 @@ packages: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} dev: true + /diff@4.0.2: + resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} + engines: {node: '>=0.3.1'} + dev: true + /diffie-hellman@5.0.3: resolution: {integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==} dependencies: @@ -9747,6 +9826,13 @@ packages: tapable: 2.2.1 dev: true + /enquirer@2.3.6: + resolution: {integrity: sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==} + engines: {node: '>=8.6'} + dependencies: + ansi-colors: 4.1.3 + dev: true + /entities@2.2.0: resolution: {integrity: sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==} dev: false @@ -10377,6 +10463,11 @@ packages: require-like: 0.1.2 dev: false + /event-target-shim@5.0.1: + resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} + engines: {node: '>=6'} + dev: true + /eventemitter3@4.0.7: resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} dev: false @@ -10611,6 +10702,13 @@ packages: pkg-dir: 4.2.0 dev: false + /find-replace@3.0.0: + resolution: {integrity: sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==} + engines: {node: '>=4.0.0'} + dependencies: + array-back: 3.1.0 + dev: true + /find-root@1.1.0: resolution: {integrity: sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==} dev: false @@ -10703,7 +10801,7 @@ packages: vue-template-compiler: optional: true dependencies: - '@babel/code-frame': 7.21.4 + '@babel/code-frame': 7.22.5 '@types/json-schema': 7.0.11 chalk: 4.1.2 chokidar: 3.5.3 @@ -10771,7 +10869,6 @@ packages: graceful-fs: 4.2.11 jsonfile: 6.1.0 universalify: 2.0.0 - dev: false /fs-extra@9.1.0: resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==} @@ -10821,6 +10918,10 @@ packages: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} dev: true + /fuzzysearch@1.0.3: + resolution: {integrity: sha512-s+kNWQuI3mo9OALw0HJ6YGmMbLqEufCh2nX/zzV5CrICQ/y4AwPxM+6TIiF9ItFCHXFCyM/BfCCmN57NTIJuPg==} + dev: true + /gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} @@ -10828,7 +10929,6 @@ packages: /get-caller-file@2.0.5: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} - dev: false /get-intrinsic@1.1.3: resolution: {integrity: sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==} @@ -10989,6 +11089,10 @@ packages: dependencies: define-properties: 1.2.0 + /globalyzer@0.1.0: + resolution: {integrity: sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==} + dev: true + /globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} @@ -11010,6 +11114,10 @@ packages: merge2: 1.4.1 slash: 4.0.0 + /globrex@0.1.2: + resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} + dev: true + /gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: @@ -11062,6 +11170,12 @@ packages: /graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + /graphql@0.11.7: + resolution: {integrity: sha512-x7uDjyz8Jx+QPbpCFCMQ8lltnQa4p4vSYHx6ADe8rVYRTdsyhCJbvSty5DAsLVmU6cGakl+r8HQYolKHxk/tiw==} + dependencies: + iterall: 1.1.3 + dev: true + /gray-matter@4.0.3: resolution: {integrity: sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==} engines: {node: '>=6.0'} @@ -11385,6 +11499,16 @@ packages: resolution: {integrity: sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==} dev: true + /https-proxy-agent@5.0.0: + resolution: {integrity: sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==} + engines: {node: '>= 6'} + dependencies: + agent-base: 6.0.2 + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: true + /human-signals@2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} @@ -11394,12 +11518,6 @@ packages: engines: {node: '>=14.18.0'} dev: true - /husky@8.0.3: - resolution: {integrity: sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==} - engines: {node: '>=14'} - hasBin: true - dev: true - /iconv-lite@0.4.24: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} @@ -11788,6 +11906,10 @@ packages: resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==} dev: false + /is-url@1.2.4: + resolution: {integrity: sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==} + dev: true + /is-weakref@1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} dependencies: @@ -11845,6 +11967,10 @@ packages: ws: 7.5.9 dev: false + /iterall@1.1.3: + resolution: {integrity: sha512-Cu/kb+4HiNSejAPhSaN1VukdNTTi/r4/e+yykqjlG/IW+1gZH5b4+Bq3whDX4tvbYugta3r8KTMUiqT3fIGxuQ==} + dev: true + /jackspeak@2.2.1: resolution: {integrity: sha512-MXbxovZ/Pm42f6cDIDkl3xpwv1AGwObKwfmjs2nQePiy85tP3fatofl3FC1aBsOtP/6fq5SbtgHwWcMsLP+bDw==} engines: {node: '>=14'} @@ -11906,6 +12032,10 @@ packages: engines: {node: '>=10'} dev: true + /js-base64@3.7.5: + resolution: {integrity: sha512-3MEt5DTINKqfScXKfJFrRbxkrnk2AxPWGBL/ycjz4dK8iqiSJ06UxD8jh8xuh6p10TX4t2+7FsBYVxxQbMg+qA==} + dev: true + /js-sha3@0.8.0: resolution: {integrity: sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==} dev: false @@ -11981,7 +12111,6 @@ packages: universalify: 2.0.0 optionalDependencies: graceful-fs: 4.2.11 - dev: false /jsx-ast-utils@3.3.3: resolution: {integrity: sha512-fYQHZTZ8jSfmWZ0iyzfwiU4WDX4HpHbMCZ3gPlWYiCl3BoeOTsqKBqnTVfH2rYT7eP5c3sVbeSPHnnJOaTrWiw==} @@ -12138,6 +12267,14 @@ packages: dependencies: p-locate: 5.0.0 + /lodash.assignwith@4.2.0: + resolution: {integrity: sha512-ZznplvbvtjK2gMvnQ1BR/zqPFZmS6jbK4p+6Up4xcRYA7yMIwxHCfbTcrYxXKzzqLsQ05eJPVznEW3tuwV7k1g==} + dev: true + + /lodash.camelcase@4.3.0: + resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} + dev: true + /lodash.curry@4.1.1: resolution: {integrity: sha512-/u14pXGviLaweY5JI0IUzgzF2J6Ne8INyzAZjImcryjgkZ+ebruBxy2/JaOOkTqScddcYtakjhSaeemV8lR0tA==} dev: false @@ -12241,6 +12378,10 @@ packages: semver: 6.3.0 dev: false + /make-error@1.3.6: + resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + dev: true + /mark.js@8.11.1: resolution: {integrity: sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==} dev: false @@ -12464,6 +12605,10 @@ packages: resolution: {integrity: sha512-HdKewQEREEJgsWnErClfbFoVebze6rGazxFLU/XUyrII8dORfVszN1V0BMRnQSzcgsNNtkX8DHj3nC6cdWE9YQ==} dev: false + /moment@2.29.4: + resolution: {integrity: sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==} + dev: true + /motion@10.16.2: resolution: {integrity: sha512-p+PurYqfUdcJZvtnmAqu5fJgV2kR0uLFQuBKtLeFVTrYEVllI99tiOTSefVNYuip9ELTEkepIIDftNdze76NAQ==} dependencies: @@ -12475,6 +12620,11 @@ packages: '@motionone/vue': 10.16.2 dev: false + /mri@1.1.6: + resolution: {integrity: sha512-oi1b3MfbyGa7FJMP9GmLTttni5JoICpYBRlq+x5V16fZbLsnL9N3wFqqIm/nIG43FjUFkFh9Epzp/kzUGUnJxQ==} + engines: {node: '>=4'} + dev: true + /mrmime@1.0.1: resolution: {integrity: sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==} engines: {node: '>=10'} @@ -12590,10 +12740,6 @@ packages: lodash: 4.17.21 dev: false - /node-fetch-native@1.2.0: - resolution: {integrity: sha512-5IAMBTl9p6PaAjYCnMv5FmqIF6GcZnawAVnzaCG0rX2aYZJ4CxEkZNtVPuTRug7fL7wyM5BQYTlAzcyMPi6oTQ==} - dev: false - /node-fetch@2.6.11: resolution: {integrity: sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==} engines: {node: 4.x || >=6.0.0} @@ -12604,7 +12750,6 @@ packages: optional: true dependencies: whatwg-url: 5.0.0 - dev: false /node-forge@1.3.1: resolution: {integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==} @@ -12922,6 +13067,10 @@ packages: semver: 6.3.0 dev: false + /pako@0.2.9: + resolution: {integrity: sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==} + dev: true + /pako@1.0.11: resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} dev: true @@ -13010,6 +13159,10 @@ packages: resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} dev: true + /path-equal@1.2.5: + resolution: {integrity: sha512-i73IctDr3F2W+bsOWDyyVm/lqsXO47aY9nsFZUjTT/aljSbkxHxxCoyZ9UUrM8jK0JVod+An+rl48RCsvWM+9g==} + dev: true + /path-exists@3.0.0: resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} engines: {node: '>=4'} @@ -13834,6 +13987,77 @@ packages: engines: {node: '>=10'} dev: true + /quicktype-core@23.0.48: + resolution: {integrity: sha512-t7kjtHa1x5uywwPZH8oJ9EYuFCtEqG3eRSK+G5pkcQ1nTRGblcCkgBX1SVVClhc26DoLCkdfqxacAUEWy4AqVQ==} + dependencies: + '@glideapps/ts-necessities': 2.1.3 + '@types/urijs': 1.19.19 + browser-or-node: 2.1.1 + collection-utils: 1.0.1 + cross-fetch: 3.1.6 + is-url: 1.2.4 + js-base64: 3.7.5 + lodash: 4.17.21 + pako: 1.0.11 + pluralize: 8.0.0 + readable-stream: 4.3.0 + unicode-properties: 1.4.1 + urijs: 1.19.11 + wordwrap: 1.0.0 + yaml: 2.3.1 + transitivePeerDependencies: + - encoding + dev: true + + /quicktype-graphql-input@23.0.48: + resolution: {integrity: sha512-lcr6+eFPqRORqmVQl8Bw7EApRILHP7x/T7awz8sX2FOfVJIs6ECcjD+1nkSbNuokvQZNcbGWUu6TFdT/RpiEJA==} + dependencies: + collection-utils: 1.0.1 + graphql: 0.11.7 + quicktype-core: 23.0.48 + transitivePeerDependencies: + - encoding + dev: true + + /quicktype-typescript-input@23.0.48: + resolution: {integrity: sha512-NuQxjHzpFM5PfloUFi0qF7hhmG+hH1BSVy2oEJZI8JrdmJmAURiEbBHq/Z9X3OHRd/LmgZ1Uff1d8z/7DtzTfw==} + dependencies: + '@mark.probst/typescript-json-schema': 0.55.0 + quicktype-core: 23.0.48 + typescript: 4.9.5 + transitivePeerDependencies: + - '@swc/core' + - '@swc/wasm' + - encoding + dev: true + + /quicktype@23.0.48: + resolution: {integrity: sha512-htxIdD8FmS6fNcFLW7rAC1fLDm2TfCVJpMpmY4M6xbX/yjs7ywi6IKWju3+g40psEpPLuduD02A8YuV0/+Hhpg==} + engines: {node: '>=18.12.0'} + hasBin: true + dependencies: + '@glideapps/ts-necessities': 2.1.3 + chalk: 4.1.2 + collection-utils: 1.0.1 + command-line-args: 5.2.1 + command-line-usage: 7.0.1 + cross-fetch: 3.1.6 + graphql: 0.11.7 + lodash: 4.17.21 + moment: 2.29.4 + quicktype-core: 23.0.48 + quicktype-graphql-input: 23.0.48 + quicktype-typescript-input: 23.0.48 + readable-stream: 4.4.0 + stream-json: 1.7.5 + string-to-stream: 3.0.1 + typescript: 4.9.5 + transitivePeerDependencies: + - '@swc/core' + - '@swc/wasm' + - encoding + dev: true + /randombytes@2.1.0: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} dependencies: @@ -13904,7 +14128,7 @@ packages: typescript: optional: true dependencies: - '@babel/code-frame': 7.21.4 + '@babel/code-frame': 7.22.5 address: 1.2.2 browserslist: 4.21.5 chalk: 4.1.2 @@ -14190,6 +14414,26 @@ packages: string_decoder: 1.3.0 util-deprecate: 1.0.2 + /readable-stream@4.3.0: + resolution: {integrity: sha512-MuEnA0lbSi7JS8XM+WNJlWZkHAAdm7gETHdFK//Q/mChGyj2akEFtdLZh32jSdkWGbRwCW9pn6g3LWDdDeZnBQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + abort-controller: 3.0.0 + buffer: 6.0.3 + events: 3.3.0 + process: 0.11.10 + dev: true + + /readable-stream@4.4.0: + resolution: {integrity: sha512-kDMOq0qLtxV9f/SQv522h8cxZBqNZXuXNyjyezmfAAuribMyVXziljpQ/uQhfE1XLg2/TLTW2DsnoE4VAi/krg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + abort-controller: 3.0.0 + buffer: 6.0.3 + events: 3.3.0 + process: 0.11.10 + dev: true + /readdirp@3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} @@ -14378,7 +14622,6 @@ packages: /require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} - dev: false /require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} @@ -14551,7 +14794,6 @@ packages: /safe-stable-stringify@2.4.3: resolution: {integrity: sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==} engines: {node: '>=10'} - dev: false /safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} @@ -14963,6 +15205,10 @@ packages: readable-stream: 3.6.2 dev: true + /stream-chain@2.2.5: + resolution: {integrity: sha512-1TJmBx6aSWqZ4tx7aTpBDXK0/e2hhcNSTV8+CbFJtDjbb+I1mZ8lHit0Grw9GRT+6JbIrrDd8esncgBi8aBXGA==} + dev: true + /stream-http@3.2.0: resolution: {integrity: sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==} dependencies: @@ -14972,6 +15218,17 @@ packages: xtend: 4.0.2 dev: true + /stream-json@1.7.5: + resolution: {integrity: sha512-NSkoVduGakxZ8a+pTPUlcGEeAGQpWL9rKJhOFCV+J/QtdQUEU5vtBgVg6eJXn8JB8RZvpbJWZGvXkhz70MLWoA==} + dependencies: + stream-chain: 2.2.5 + dev: true + + /stream-read-all@3.0.1: + resolution: {integrity: sha512-EWZT9XOceBPlVJRrYcykW8jyRSZYbkb/0ZK36uLEmoWVO5gxBOnntNTseNzfREsqxqdfEGQrD8SXQ3QWbBmq8A==} + engines: {node: '>=10'} + dev: true + /stream-shift@1.0.1: resolution: {integrity: sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==} dev: false @@ -14986,6 +15243,12 @@ packages: engines: {node: '>=4'} dev: false + /string-to-stream@3.0.1: + resolution: {integrity: sha512-Hl092MV3USJuUCC6mfl9sPzGloA3K5VwdIeJjYIkXY/8K+mUvaeEabWJgArp+xXrsWxCajeT2pc4axbVhIZJyg==} + dependencies: + readable-stream: 3.6.2 + dev: true + /string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -15220,6 +15483,20 @@ packages: tslib: 2.5.3 dev: true + /table-layout@3.0.2: + resolution: {integrity: sha512-rpyNZYRw+/C+dYkcQ3Pr+rLxW4CfHpXjPDnG7lYhdRoUcZTUt+KEsX+94RGp/aVp/MQU35JCITv2T/beY4m+hw==} + engines: {node: '>=12.17'} + hasBin: true + dependencies: + '@75lb/deep-merge': 1.1.1 + array-back: 6.2.2 + command-line-args: 5.2.1 + command-line-usage: 7.0.1 + stream-read-all: 3.0.1 + typical: 7.1.1 + wordwrapjs: 5.1.0 + dev: true + /tailwindcss@3.3.2: resolution: {integrity: sha512-9jPkMiIBXvPc2KywkraqsUfbfj+dHDb+JPWtSJa9MLFdrPyazI7q6WX2sUrm7R9eVR7qqv3Pas7EvQFzxKnI6w==} engines: {node: '>=14.0.0'} @@ -15333,6 +15610,24 @@ packages: resolution: {integrity: sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==} dev: false + /tiged@2.12.5: + resolution: {integrity: sha512-divl34KaEXBUO8N2m5UcMdQZjqLZRzEq+ychP5bNYSGF0JQq1j6m4uF7WuQOCRomlBeu5vJfjkXtyYumijX+bA==} + engines: {node: '>=8.0.0'} + hasBin: true + dependencies: + colorette: 1.2.1 + enquirer: 2.3.6 + fs-extra: 10.1.0 + fuzzysearch: 1.0.3 + https-proxy-agent: 5.0.0 + mri: 1.1.6 + rimraf: 3.0.2 + tar: 6.1.15 + tiny-glob: 0.2.8 + transitivePeerDependencies: + - supports-color + dev: true + /timers-browserify@2.0.12: resolution: {integrity: sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==} engines: {node: '>=0.6.0'} @@ -15340,6 +15635,17 @@ packages: setimmediate: 1.0.5 dev: true + /tiny-glob@0.2.8: + resolution: {integrity: sha512-vkQP7qOslq63XRX9kMswlby99kyO5OvKptw7AMwBVMjXEI7Tb61eoI5DydyEMOseyGS5anDN1VPoVxEvH01q8w==} + dependencies: + globalyzer: 0.1.0 + globrex: 0.1.2 + dev: true + + /tiny-inflate@1.0.3: + resolution: {integrity: sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw==} + dev: true + /tiny-invariant@1.3.1: resolution: {integrity: sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==} dev: false @@ -15396,7 +15702,6 @@ packages: /tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} - dev: false /tr46@1.0.1: resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==} @@ -15426,6 +15731,37 @@ packages: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} dev: true + /ts-node@10.9.1(@types/node@16.18.36)(typescript@4.9.4): + resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 16.18.36 + acorn: 8.8.2 + acorn-walk: 8.2.0 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 4.9.4 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: true + /tsconfig-paths@3.14.2: resolution: {integrity: sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==} dependencies: @@ -15496,6 +15832,17 @@ packages: typescript: 5.1.3 dev: true + /tsx@3.12.7: + resolution: {integrity: sha512-C2Ip+jPmqKd1GWVQDvz/Eyc6QJbGfE7NrR3fx5BpEHMZsEHoIxHL1j+lKdGobr8ovEyqeNkPLSKp6SCSOt7gmw==} + hasBin: true + dependencies: + '@esbuild-kit/cjs-loader': 2.4.2 + '@esbuild-kit/core-utils': 3.1.0 + '@esbuild-kit/esm-loader': 2.5.5 + optionalDependencies: + fsevents: 2.3.2 + dev: true + /tty-browserify@0.0.1: resolution: {integrity: sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==} dev: true @@ -15612,11 +15959,33 @@ packages: resolution: {integrity: sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==} dev: false + /typescript@4.9.4: + resolution: {integrity: sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: true + + /typescript@4.9.5: + resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: true + /typescript@5.1.3: resolution: {integrity: sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==} engines: {node: '>=14.17'} hasBin: true + /typical@4.0.0: + resolution: {integrity: sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==} + engines: {node: '>=8'} + dev: true + + /typical@7.1.1: + resolution: {integrity: sha512-T+tKVNs6Wu7IWiAce5BgMd7OZfNYUndHwc5MknN+UHOudi7sGZzuHdCadllRuqJ3fPtgFtIH9+lt9qRv6lmpfA==} + engines: {node: '>=12.17'} + dev: true + /ua-parser-js@0.7.35: resolution: {integrity: sha512-veRf7dawaj9xaWEu9HoTVn5Pggtc/qj+kqTOFvNiN1l0YdxwC1kvel57UCjThjGa3BHBihE8/UJAHI+uQHmd/g==} dev: false @@ -15661,11 +16030,25 @@ packages: engines: {node: '>=4'} dev: false + /unicode-properties@1.4.1: + resolution: {integrity: sha512-CLjCCLQ6UuMxWnbIylkisbRj31qxHPAurvena/0iwSVbQ2G1VY5/HjV0IRabOEbDHlzZlRdCrD4NhB0JtU40Pg==} + dependencies: + base64-js: 1.5.1 + unicode-trie: 2.0.0 + dev: true + /unicode-property-aliases-ecmascript@2.1.0: resolution: {integrity: sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==} engines: {node: '>=4'} dev: false + /unicode-trie@2.0.0: + resolution: {integrity: sha512-x7bc76x0bm4prf1VLg79uhAzKw8DVboClSN5VxJuQ+LKDOVEW9CdH+VY7SP+vX7xCYQqzzgQpFqz15zeLvAtZQ==} + dependencies: + pako: 0.2.9 + tiny-inflate: 1.0.3 + dev: true + /unified@9.2.0: resolution: {integrity: sha512-vx2Z0vY+a3YoTj8+pttM3tiJHCwY5UFbYdiWrwBEbHmK8pvsPj2rtAX2BFfgXen8T39CJWblWRDT4L5WGXtDdg==} dependencies: @@ -15749,7 +16132,6 @@ packages: /universalify@2.0.0: resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} engines: {node: '>= 10.0.0'} - dev: false /unpipe@1.0.0: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} @@ -15806,6 +16188,10 @@ packages: dependencies: punycode: 2.3.0 + /urijs@1.19.11: + resolution: {integrity: sha512-HXgFDgDommxn5/bIv0cnQZsPhHDA90NPHD6+c/v21U5+Sx5hoP8+dP9IZXBU1gIfvdRfhG8cel9QNPeionfcCQ==} + dev: true + /url-loader@4.1.1(file-loader@6.2.0)(webpack@5.83.1): resolution: {integrity: sha512-3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA==} engines: {node: '>= 10.13.0'} @@ -15940,6 +16326,10 @@ packages: hasBin: true dev: false + /v8-compile-cache-lib@3.0.1: + resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + dev: true + /validate-npm-package-license@3.0.4: resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} dependencies: @@ -16005,12 +16395,12 @@ packages: dependencies: '@rollup/plugin-inject': 5.0.3 node-stdlib-browser: 1.2.0 - vite: 4.3.9 + vite: 4.3.9(@types/node@16.18.36) transitivePeerDependencies: - rollup dev: true - /vite@4.3.9: + /vite@4.3.9(@types/node@16.18.36): resolution: {integrity: sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true @@ -16035,6 +16425,7 @@ packages: terser: optional: true dependencies: + '@types/node': 16.18.36 esbuild: 0.17.19 postcss: 8.4.24 rollup: 3.25.1 @@ -16079,7 +16470,6 @@ packages: /webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} - dev: false /webidl-conversions@4.0.2: resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} @@ -16252,7 +16642,6 @@ packages: dependencies: tr46: 0.0.3 webidl-conversions: 3.0.1 - dev: false /whatwg-url@7.1.0: resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} @@ -16329,6 +16718,15 @@ packages: resolution: {integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==} engines: {node: '>=0.10.0'} + /wordwrap@1.0.0: + resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} + dev: true + + /wordwrapjs@5.1.0: + resolution: {integrity: sha512-JNjcULU2e4KJwUNv6CHgI46UvDGitb6dGryHajXTDiLgg1/RiGoPSDw4kZfYnwGtEXf2ZMeIewDQgFGzkCB2Sg==} + engines: {node: '>=12.17'} + dev: true + /wrap-ansi@6.2.0: resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} engines: {node: '>=8'} @@ -16419,6 +16817,11 @@ packages: resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} dev: false + /y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + dev: true + /yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} @@ -16443,6 +16846,11 @@ packages: decamelize: 1.2.0 dev: false + /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==} engines: {node: '>=8'} @@ -16460,6 +16868,24 @@ packages: yargs-parser: 18.1.3 dev: false + /yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + dependencies: + cliui: 8.0.1 + escalade: 3.1.1 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + dev: true + + /yn@3.1.1: + resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} + engines: {node: '>=6'} + dev: true + /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'}