From 6cbef73be5ea32dd23f74f6305b7fc14bea17d22 Mon Sep 17 00:00:00 2001 From: Ermal Kaleci Date: Sun, 3 Mar 2024 21:42:26 +0100 Subject: [PATCH] move some RPC methods into core (#676) * move some RPC methods to core * update provider handlers * fix docs --- package.json | 2 +- .../chopsticks/src/plugins/new-block/index.ts | 1 - .../src/plugins/set-block-build-mode/index.ts | 1 - .../chopsticks/src/plugins/set-head/index.ts | 1 - .../plugins/set-runtime-log-level/index.ts | 1 - .../src/plugins/set-storage/index.ts | 1 - .../src/plugins/time-travel/index.ts | 1 - packages/chopsticks/src/plugins/types.ts | 7 - packages/chopsticks/src/rpc/index.ts | 6 +- packages/chopsticks/src/types.ts | 1 + packages/core/src/chopsticks-provider.ts | 6 +- packages/core/src/rpc/dev/index.ts | 24 ++ .../rpc.ts => core/src/rpc/dev/new-block.ts} | 10 +- .../src/rpc/dev/set-block-build-mode.ts} | 5 +- .../rpc.ts => core/src/rpc/dev/set-head.ts} | 7 +- .../src/rpc/dev/set-runtime-log-level.ts} | 4 +- .../src/rpc/dev/set-storage.ts} | 5 +- .../src/rpc/dev/time-travel.ts} | 5 +- packages/core/src/rpc/index.ts | 6 +- packages/core/src/rpc/shared.ts | 6 + yarn.lock | 358 ++++++++++++------ 21 files changed, 303 insertions(+), 155 deletions(-) delete mode 100644 packages/chopsticks/src/plugins/new-block/index.ts delete mode 100644 packages/chopsticks/src/plugins/set-block-build-mode/index.ts delete mode 100644 packages/chopsticks/src/plugins/set-head/index.ts delete mode 100644 packages/chopsticks/src/plugins/set-runtime-log-level/index.ts delete mode 100644 packages/chopsticks/src/plugins/set-storage/index.ts delete mode 100644 packages/chopsticks/src/plugins/time-travel/index.ts create mode 100644 packages/core/src/rpc/dev/index.ts rename packages/{chopsticks/src/plugins/new-block/rpc.ts => core/src/rpc/dev/new-block.ts} (93%) rename packages/{chopsticks/src/plugins/set-block-build-mode/rpc.ts => core/src/rpc/dev/set-block-build-mode.ts} (81%) rename packages/{chopsticks/src/plugins/set-head/rpc.ts => core/src/rpc/dev/set-head.ts} (84%) rename packages/{chopsticks/src/plugins/set-runtime-log-level/rpc.ts => core/src/rpc/dev/set-runtime-log-level.ts} (83%) rename packages/{chopsticks/src/plugins/set-storage/rpc.ts => core/src/rpc/dev/set-storage.ts} (82%) rename packages/{chopsticks/src/plugins/time-travel/rpc.ts => core/src/rpc/dev/time-travel.ts} (76%) diff --git a/package.json b/package.json index 2c6c01c0..8b7df22e 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "typescript": "^5.3.3", "unplugin-swc": "^1.4.4", "vite-tsconfig-paths": "^4.3.1", - "vitepress": "^1.0.0-rc.40", + "vitepress": "^1.0.0-rc.44", "vitest": "^1.2.1", "wasm-pack": "^0.12.1" } diff --git a/packages/chopsticks/src/plugins/new-block/index.ts b/packages/chopsticks/src/plugins/new-block/index.ts deleted file mode 100644 index d1e0e360..00000000 --- a/packages/chopsticks/src/plugins/new-block/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './rpc.js' diff --git a/packages/chopsticks/src/plugins/set-block-build-mode/index.ts b/packages/chopsticks/src/plugins/set-block-build-mode/index.ts deleted file mode 100644 index d1e0e360..00000000 --- a/packages/chopsticks/src/plugins/set-block-build-mode/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './rpc.js' diff --git a/packages/chopsticks/src/plugins/set-head/index.ts b/packages/chopsticks/src/plugins/set-head/index.ts deleted file mode 100644 index d1e0e360..00000000 --- a/packages/chopsticks/src/plugins/set-head/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './rpc.js' diff --git a/packages/chopsticks/src/plugins/set-runtime-log-level/index.ts b/packages/chopsticks/src/plugins/set-runtime-log-level/index.ts deleted file mode 100644 index d1e0e360..00000000 --- a/packages/chopsticks/src/plugins/set-runtime-log-level/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './rpc.js' diff --git a/packages/chopsticks/src/plugins/set-storage/index.ts b/packages/chopsticks/src/plugins/set-storage/index.ts deleted file mode 100644 index d1e0e360..00000000 --- a/packages/chopsticks/src/plugins/set-storage/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './rpc.js' diff --git a/packages/chopsticks/src/plugins/time-travel/index.ts b/packages/chopsticks/src/plugins/time-travel/index.ts deleted file mode 100644 index d1e0e360..00000000 --- a/packages/chopsticks/src/plugins/time-travel/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './rpc.js' diff --git a/packages/chopsticks/src/plugins/types.ts b/packages/chopsticks/src/plugins/types.ts index 6723c4bb..9b766a29 100644 --- a/packages/chopsticks/src/plugins/types.ts +++ b/packages/chopsticks/src/plugins/types.ts @@ -1,12 +1,5 @@ -export { rpc as newBlock } from './new-block/index.js' export { rpc as dryRun } from './dry-run/index.js' -export { rpc as setBlockBuildMode } from './set-block-build-mode/index.js' -export { rpc as setHead } from './set-head/index.js' -export { rpc as setRuntimeLogLevel } from './set-runtime-log-level/index.js' -export { rpc as setStorage } from './set-storage/index.js' -export { rpc as timeTravel } from './time-travel/index.js' export { rpc as runBlock } from './run-block/index.js' -export type { NewBlockParams } from './new-block/index.js' export type { DryRunParams } from './dry-run/index.js' export type { RunBlockParams } from './run-block/index.js' diff --git a/packages/chopsticks/src/rpc/index.ts b/packages/chopsticks/src/rpc/index.ts index 352d90aa..1d760e29 100644 --- a/packages/chopsticks/src/rpc/index.ts +++ b/packages/chopsticks/src/rpc/index.ts @@ -3,8 +3,8 @@ import { Handlers, ResponseError, SubscriptionManager, + allHandlers as coreHandlers, defaultLogger, - substrate, } from '@acala-network/chopsticks-core' import { loadRpcPlugin, rpcPluginMethods } from '../plugins/index.js' @@ -12,11 +12,11 @@ import { loadRpcPlugin, rpcPluginMethods } from '../plugins/index.js' const rpcLogger = defaultLogger.child({ name: 'rpc' }) const allHandlers: Handlers = { - ...substrate, + ...coreHandlers, rpc_methods: async () => Promise.resolve({ version: 1, - methods: [...Object.keys(allHandlers), ...rpcPluginMethods], + methods: [...Object.keys(allHandlers), ...rpcPluginMethods].sort(), }), } diff --git a/packages/chopsticks/src/types.ts b/packages/chopsticks/src/types.ts index 519812a2..21051e96 100644 --- a/packages/chopsticks/src/types.ts +++ b/packages/chopsticks/src/types.ts @@ -18,4 +18,5 @@ export type { Handler, } from '@acala-network/chopsticks-core' export * from '@acala-network/chopsticks-core/rpc/substrate/index.js' +export * as DevRPC from '@acala-network/chopsticks-core/rpc/dev/index.js' export * from './plugins/types.js' diff --git a/packages/core/src/chopsticks-provider.ts b/packages/core/src/chopsticks-provider.ts index 4252cecf..d48ee79b 100644 --- a/packages/core/src/chopsticks-provider.ts +++ b/packages/core/src/chopsticks-provider.ts @@ -7,17 +7,13 @@ import { } from '@polkadot/rpc-provider/types' import { Blockchain } from './blockchain/index.js' -import { Context, Handlers, allHandlers } from './rpc/index.js' import { Database } from './database.js' +import { Handlers, allHandlers } from './rpc/index.js' import { defaultLogger } from './logger.js' import { setup } from './setup.js' const providerHandlers: Handlers = { ...allHandlers, - dev_newBlock: async (context: Context, _params: any, _subscriptionManager: any) => { - const block = await context.chain.newBlock() - return block.hash - }, } const logger = defaultLogger.child({ name: '[Chopsticks provider]' }) diff --git a/packages/core/src/rpc/dev/index.ts b/packages/core/src/rpc/dev/index.ts new file mode 100644 index 00000000..b9908456 --- /dev/null +++ b/packages/core/src/rpc/dev/index.ts @@ -0,0 +1,24 @@ +import { dev_newBlock } from './new-block.js' +import { dev_setBlockBuildMode } from './set-block-build-mode.js' +import { dev_setHead } from './set-head.js' +import { dev_setRuntimeLogLevel } from './set-runtime-log-level.js' +import { dev_setStorage } from './set-storage.js' +import { dev_timeTravel } from './time-travel.js' + +const handlers = { + dev_newBlock, + dev_setBlockBuildMode, + dev_setHead, + dev_setRuntimeLogLevel, + dev_setStorage, + dev_timeTravel, +} + +export default handlers + +export * from './new-block.js' +export * from './set-block-build-mode.js' +export * from './set-head.js' +export * from './set-runtime-log-level.js' +export * from './set-storage.js' +export * from './time-travel.js' diff --git a/packages/chopsticks/src/plugins/new-block/rpc.ts b/packages/core/src/rpc/dev/new-block.ts similarity index 93% rename from packages/chopsticks/src/plugins/new-block/rpc.ts rename to packages/core/src/rpc/dev/new-block.ts index 3f0d6c1c..93f1004d 100644 --- a/packages/chopsticks/src/plugins/new-block/rpc.ts +++ b/packages/core/src/rpc/dev/new-block.ts @@ -1,8 +1,8 @@ -import { Context, ResponseError } from '@acala-network/chopsticks-core' +import { Context, ResponseError, zHex } from '../shared.js' +import { HexString } from '@polkadot/util/types' import { z } from 'zod' import { defaultLogger } from '../../logger.js' -import { zHex } from '../../schema/index.js' const schema = z.object({ count: z.number().optional(), @@ -105,13 +105,13 @@ export interface NewBlockParams { * await ws.send('dev_newBlock', [{ count: 2, unsafeBlockHeight: 100000001 }]) * ``` */ -export const rpc = async (context: Context, [params]: [NewBlockParams]) => { +export const dev_newBlock = async (context: Context, [params]: [NewBlockParams]) => { const { count, to, hrmp, ump, dmp, transactions, unsafeBlockHeight } = schema.parse(params || {}) const now = context.chain.head.number const diff = to ? to - now : count const finalCount = diff !== undefined ? Math.max(diff, 1) : 1 - let finalHash: string | undefined + let finalHash: HexString | undefined if (unsafeBlockHeight !== undefined && unsafeBlockHeight <= now) { throw new ResponseError(1, 'unsafeBlockHeight must be greater than current block height') } @@ -132,5 +132,5 @@ export const rpc = async (context: Context, [params]: [NewBlockParams]) => { finalHash = block.hash } - return finalHash + return finalHash! } diff --git a/packages/chopsticks/src/plugins/set-block-build-mode/rpc.ts b/packages/core/src/rpc/dev/set-block-build-mode.ts similarity index 81% rename from packages/chopsticks/src/plugins/set-block-build-mode/rpc.ts rename to packages/core/src/rpc/dev/set-block-build-mode.ts index 84812333..7ad7d2e1 100644 --- a/packages/chopsticks/src/plugins/set-block-build-mode/rpc.ts +++ b/packages/core/src/rpc/dev/set-block-build-mode.ts @@ -1,4 +1,5 @@ -import { BuildBlockMode, Context, ResponseError } from '@acala-network/chopsticks-core' +import { BuildBlockMode } from '../../blockchain/txpool.js' +import { Context, ResponseError } from '../shared.js' import { defaultLogger } from '../../logger.js' /** @@ -19,7 +20,7 @@ import { defaultLogger } from '../../logger.js' * await ws.send('dev_setBlockBuildMode', [BuildBlockMode.Instant]) * ``` */ -export const rpc = async (context: Context, [mode]: [BuildBlockMode]) => { +export const dev_setBlockBuildMode = async (context: Context, [mode]: [BuildBlockMode]) => { defaultLogger.debug({ mode: BuildBlockMode[mode] }, 'dev_setBlockBuildMode') if (BuildBlockMode[mode] === undefined) { diff --git a/packages/chopsticks/src/plugins/set-head/rpc.ts b/packages/core/src/rpc/dev/set-head.ts similarity index 84% rename from packages/chopsticks/src/plugins/set-head/rpc.ts rename to packages/core/src/rpc/dev/set-head.ts index fddd8978..25c64ab5 100644 --- a/packages/chopsticks/src/plugins/set-head/rpc.ts +++ b/packages/core/src/rpc/dev/set-head.ts @@ -1,8 +1,7 @@ -import { Block, Context, ResponseError } from '@acala-network/chopsticks-core' +import { Block } from '../../blockchain/block.js' +import { Context, ResponseError, zHash } from '../shared.js' import { z } from 'zod' -import { zHash } from '../../schema/index.js' - const schema = zHash.or(z.number()) type Params = z.infer @@ -21,7 +20,7 @@ type Params = z.infer * await ws.send('dev_setHead', [1000000]) * ``` */ -export const rpc = async (context: Context, [params]: [Params]) => { +export const dev_setHead = async (context: Context, [params]: [Params]) => { const hashOrNumber = schema.parse(params) let block: Block | undefined if (typeof hashOrNumber === 'number') { diff --git a/packages/chopsticks/src/plugins/set-runtime-log-level/rpc.ts b/packages/core/src/rpc/dev/set-runtime-log-level.ts similarity index 83% rename from packages/chopsticks/src/plugins/set-runtime-log-level/rpc.ts rename to packages/core/src/rpc/dev/set-runtime-log-level.ts index 3c22b983..321244c1 100644 --- a/packages/chopsticks/src/plugins/set-runtime-log-level/rpc.ts +++ b/packages/core/src/rpc/dev/set-runtime-log-level.ts @@ -1,4 +1,4 @@ -import { Context, ResponseError } from '@acala-network/chopsticks-core' +import { Context, ResponseError } from '../shared.js' import { defaultLogger } from '../../logger.js' /** @@ -16,7 +16,7 @@ import { defaultLogger } from '../../logger.js' * await ws.send('dev_setRuntimeLogLevel', [1]) * ``` */ -export const rpc = async (context: Context, [runtimeLogLevel]: [number]) => { +export const dev_setRuntimeLogLevel = async (context: Context, [runtimeLogLevel]: [number]) => { defaultLogger.debug({ runtimeLogLevel }, 'dev_setRuntimeLogLevel') if (typeof runtimeLogLevel !== 'number') { diff --git a/packages/chopsticks/src/plugins/set-storage/rpc.ts b/packages/core/src/rpc/dev/set-storage.ts similarity index 82% rename from packages/chopsticks/src/plugins/set-storage/rpc.ts rename to packages/core/src/rpc/dev/set-storage.ts index 2e39aff4..a74c9889 100644 --- a/packages/chopsticks/src/plugins/set-storage/rpc.ts +++ b/packages/core/src/rpc/dev/set-storage.ts @@ -1,6 +1,7 @@ -import { Context, ResponseError, StorageValues, setStorage } from '@acala-network/chopsticks-core' +import { Context, ResponseError } from '../shared.js' import { HexString } from '@polkadot/util/types' +import { StorageValues, setStorage } from '../../utils/set-storage.js' import { defaultLogger } from '../../logger.js' /** @@ -29,7 +30,7 @@ import { defaultLogger } from '../../logger.js' * ``` */ -export const rpc = async (context: Context, params: [StorageValues, HexString?]) => { +export const dev_setStorage = async (context: Context, params: [StorageValues, HexString?]) => { const [values, blockHash] = params const hash = await setStorage(context.chain, values, blockHash).catch((error) => { throw new ResponseError(1, error.toString()) diff --git a/packages/chopsticks/src/plugins/time-travel/rpc.ts b/packages/core/src/rpc/dev/time-travel.ts similarity index 76% rename from packages/chopsticks/src/plugins/time-travel/rpc.ts rename to packages/core/src/rpc/dev/time-travel.ts index d51271d5..8f0f2122 100644 --- a/packages/chopsticks/src/plugins/time-travel/rpc.ts +++ b/packages/core/src/rpc/dev/time-travel.ts @@ -1,4 +1,5 @@ -import { Context, ResponseError, timeTravel } from '@acala-network/chopsticks-core' +import { Context, ResponseError } from '../shared.js' +import { timeTravel } from '../../utils/time-travel.js' /** * Travel to a specific time. @@ -15,7 +16,7 @@ import { Context, ResponseError, timeTravel } from '@acala-network/chopsticks-co * await ws.send('dev_timeTravel', ['Jan 1, 2023']) * ``` */ -export const rpc = async (context: Context, [date]: [string | number]) => { +export const dev_timeTravel = async (context: Context, [date]: [string | number]) => { const timestamp = typeof date === 'string' ? Date.parse(date) : date if (Number.isNaN(timestamp)) throw new ResponseError(1, 'Invalid date') await timeTravel(context.chain, timestamp) diff --git a/packages/core/src/rpc/index.ts b/packages/core/src/rpc/index.ts index 72c57008..8ef78d1e 100644 --- a/packages/core/src/rpc/index.ts +++ b/packages/core/src/rpc/index.ts @@ -1,15 +1,17 @@ import { Handlers } from './shared.js' +import dev from './dev/index.js' import substrate from './substrate/index.js' export const allHandlers: Handlers = { ...substrate, + ...dev, rpc_methods: async () => Promise.resolve({ version: 1, - methods: [...Object.keys(allHandlers)], + methods: Object.keys(allHandlers).sort(), }), } -export { default as substrate } from './substrate/index.js' +export { substrate, dev } export { ResponseError } from './shared.js' export type { Context, SubscriptionManager, Handler, Handlers } from './shared.js' diff --git a/packages/core/src/rpc/shared.ts b/packages/core/src/rpc/shared.ts index 634e7a0e..cd8bf8f9 100644 --- a/packages/core/src/rpc/shared.ts +++ b/packages/core/src/rpc/shared.ts @@ -1,8 +1,14 @@ +import { HexString } from '@polkadot/util/types' +import { z } from 'zod' + import { Blockchain } from '../blockchain/index.js' import { defaultLogger } from '../logger.js' export const logger = defaultLogger.child({ name: 'rpc' }) +export const zHex = z.custom((val: any) => /^0x\w+$/.test(val)) +export const zHash = z.string().length(66).and(zHex) + export class ResponseError extends Error { code: number diff --git a/yarn.lock b/yarn.lock index 781e80fc..a0e4b08a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -517,6 +517,15 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:^7.23.9": + version: 7.24.0 + resolution: "@babel/parser@npm:7.24.0" + bin: + parser: ./bin/babel-parser.js + checksum: 10c0/77593d0b9de9906823c4d653bb6cda1c7593837598516330f655f70cba6224a37def7dbe5b4dad0038482d407d8d209eb8be5f48ca9a13357d769f829c5adb8e + languageName: node + linkType: hard + "@babel/plugin-transform-react-jsx-self@npm:^7.23.3": version: 7.23.3 resolution: "@babel/plugin-transform-react-jsx-self@npm:7.23.3" @@ -1963,6 +1972,22 @@ __metadata: languageName: node linkType: hard +"@shikijs/core@npm:1.1.7, @shikijs/core@npm:^1.1.5": + version: 1.1.7 + resolution: "@shikijs/core@npm:1.1.7" + checksum: 10c0/ee59b88d4c81422792651c0ca52ff378c3035f9d1e4907b58c1d6da06fad02d530775a2e6f43bb033832cd3d2a5f69c9aa4eb5b6b05311396acc503f15442f37 + languageName: node + linkType: hard + +"@shikijs/transformers@npm:^1.1.5": + version: 1.1.7 + resolution: "@shikijs/transformers@npm:1.1.7" + dependencies: + shiki: "npm:1.1.7" + checksum: 10c0/be2794c35ba6d57da11e3ed509d714dd4533c2658c31182df61a7a6d38d94847564a1ae1acb9ce22dfc08702702769647ec545ba04053de8361d5019227be876 + languageName: node + linkType: hard + "@sinclair/typebox@npm:^0.27.8": version: 0.27.8 resolution: "@sinclair/typebox@npm:0.27.8" @@ -2640,13 +2665,13 @@ __metadata: languageName: node linkType: hard -"@vitejs/plugin-vue@npm:^5.0.3": - version: 5.0.3 - resolution: "@vitejs/plugin-vue@npm:5.0.3" +"@vitejs/plugin-vue@npm:^5.0.4": + version: 5.0.4 + resolution: "@vitejs/plugin-vue@npm:5.0.4" peerDependencies: vite: ^5.0.0 vue: ^3.2.25 - checksum: 10c0/b03f9bd0bb5f75f133ec25599802c4563f85860fb5cd2774372988ae18727150d7aa2f7de97aa3f2100e362013942a95cbed5b53a0c0e31b84e7c85b6944a65b + checksum: 10c0/2e65900ff41037a013ef40351aa2fb68ee1963da461795b4e3d01fc4a0226c65e9ca4bc39941dc163f883773bcd80744ee0f1f96ecc2f46fae1a4cd71c741308 languageName: node linkType: hard @@ -2744,109 +2769,135 @@ __metadata: languageName: node linkType: hard -"@vue/compiler-core@npm:3.4.15": - version: 3.4.15 - resolution: "@vue/compiler-core@npm:3.4.15" +"@vue/compiler-core@npm:3.4.21": + version: 3.4.21 + resolution: "@vue/compiler-core@npm:3.4.21" dependencies: - "@babel/parser": "npm:^7.23.6" - "@vue/shared": "npm:3.4.15" + "@babel/parser": "npm:^7.23.9" + "@vue/shared": "npm:3.4.21" entities: "npm:^4.5.0" estree-walker: "npm:^2.0.2" source-map-js: "npm:^1.0.2" - checksum: 10c0/151dd9c1a4fae826c53ec60536d14298266baf81f8ed1729b1cbcd082d06410234ee951336c5f43aeaf00febafc0fdd7f82934d747a052b7435be0c2e89b8f2e + checksum: 10c0/3ee871b95e17948d10375093c8dd3265923f844528a24ac67512c201ddb9b628021c010565f3e50f2e551b217c502e80a7901384f616a977a04f81e68c64a37c languageName: node linkType: hard -"@vue/compiler-dom@npm:3.4.15": - version: 3.4.15 - resolution: "@vue/compiler-dom@npm:3.4.15" +"@vue/compiler-dom@npm:3.4.21": + version: 3.4.21 + resolution: "@vue/compiler-dom@npm:3.4.21" dependencies: - "@vue/compiler-core": "npm:3.4.15" - "@vue/shared": "npm:3.4.15" - checksum: 10c0/d9339ca83f4e2e8fe21435c278e28b8551650d6ab09f0df1ba4afe983b4d692e07d753e70738dffee71e0d04af000eaafd7efebb8c4de5981b2e756ce03c3719 + "@vue/compiler-core": "npm:3.4.21" + "@vue/shared": "npm:3.4.21" + checksum: 10c0/b4a1099eddacded2663d12388b48088ca0be0d8969a070476f49e4e65da9b22851fc897cc693662b178e7e7fdee98fcf9ea3617a1f626c3a1b2089815cb1264e languageName: node linkType: hard -"@vue/compiler-sfc@npm:3.4.15": - version: 3.4.15 - resolution: "@vue/compiler-sfc@npm:3.4.15" +"@vue/compiler-sfc@npm:3.4.21": + version: 3.4.21 + resolution: "@vue/compiler-sfc@npm:3.4.21" dependencies: - "@babel/parser": "npm:^7.23.6" - "@vue/compiler-core": "npm:3.4.15" - "@vue/compiler-dom": "npm:3.4.15" - "@vue/compiler-ssr": "npm:3.4.15" - "@vue/shared": "npm:3.4.15" + "@babel/parser": "npm:^7.23.9" + "@vue/compiler-core": "npm:3.4.21" + "@vue/compiler-dom": "npm:3.4.21" + "@vue/compiler-ssr": "npm:3.4.21" + "@vue/shared": "npm:3.4.21" estree-walker: "npm:^2.0.2" - magic-string: "npm:^0.30.5" - postcss: "npm:^8.4.33" + magic-string: "npm:^0.30.7" + postcss: "npm:^8.4.35" source-map-js: "npm:^1.0.2" - checksum: 10c0/8643f2b6114927034195c06e13b872d186e3b5ae8e84041ea697932613cdd6e848e9253ecf4cfb13302b81a120906e0673b0adf97d07a5e1a731b96aa43f3f75 + checksum: 10c0/8d9a6ee07a9c542528f09b7a99e5d40e9752dca39251994e4309cb6121997c47db6818be75555aa69fb4f0bd54820bc7675c0c6e2ea5afe339f09d40890d26a9 + languageName: node + linkType: hard + +"@vue/compiler-ssr@npm:3.4.21": + version: 3.4.21 + resolution: "@vue/compiler-ssr@npm:3.4.21" + dependencies: + "@vue/compiler-dom": "npm:3.4.21" + "@vue/shared": "npm:3.4.21" + checksum: 10c0/bae2b76f8619f258a90e2964cdcebef44aa240ae64be6bb08227f3404239c66f3d77fb25b88a809d9b29063a2f0f423595c8be8e5f7c80dc8337da2aad4f6fdc languageName: node linkType: hard -"@vue/compiler-ssr@npm:3.4.15": - version: 3.4.15 - resolution: "@vue/compiler-ssr@npm:3.4.15" +"@vue/devtools-api@npm:^7.0.14": + version: 7.0.16 + resolution: "@vue/devtools-api@npm:7.0.16" dependencies: - "@vue/compiler-dom": "npm:3.4.15" - "@vue/shared": "npm:3.4.15" - checksum: 10c0/c71c4df64c1df81f0b0e0e99236135a3e3989ba5d6204eb3c0fac804f7a927a0eb6f6ea67f96df63263ba3667f3a833adb20d76866236124befdf7652ca7a8cd + "@vue/devtools-kit": "npm:^7.0.16" + checksum: 10c0/2fcf19af9af60dc33c15b52de147b6801ca2fd3e9cd85657b70f8cc2866c599cb635c898788f390ad20a7c5d0e796db5d705baf5c890a19302129b73af552023 languageName: node linkType: hard -"@vue/devtools-api@npm:^6.5.1": - version: 6.5.1 - resolution: "@vue/devtools-api@npm:6.5.1" - checksum: 10c0/d28b00a64df2c5b3351f74ad28ec7fe65e9ee6e20e585c0130ae6ab74b7e616d4eda3b3e82d39ad391e959be4bbb7aa7221d8253bbca1f3021ad07d4430095f9 +"@vue/devtools-kit@npm:^7.0.16": + version: 7.0.16 + resolution: "@vue/devtools-kit@npm:7.0.16" + dependencies: + "@vue/devtools-shared": "npm:^7.0.16" + hookable: "npm:^5.5.3" + mitt: "npm:^3.0.1" + perfect-debounce: "npm:^1.0.0" + speakingurl: "npm:^14.0.1" + peerDependencies: + vue: ^3.0.0 + checksum: 10c0/04eb6b32139e7b9c30fbbde93f6512f1298673794af04f9a35c79c63d3b83631e82387a81742bc8040523e15ae81605fd636a16af7991d4f5d59f9d667257b0d languageName: node linkType: hard -"@vue/reactivity@npm:3.4.15": - version: 3.4.15 - resolution: "@vue/reactivity@npm:3.4.15" +"@vue/devtools-shared@npm:^7.0.16": + version: 7.0.16 + resolution: "@vue/devtools-shared@npm:7.0.16" dependencies: - "@vue/shared": "npm:3.4.15" - checksum: 10c0/2eb51e6f642817d5078ebc36ae5b0f94712403448f26794bedbefd05ec23f229dcf7b2512e609170b9d31e1c80bd17c5ff40cc9f82e50d6f0d41c3d542955d01 + rfdc: "npm:^1.3.1" + checksum: 10c0/d5da64c7aa5f2221d2b6db7c0d9f1605f430f3d11f0f654d7a2b121a36d1ac06b24e9aabfc095c09dc0b5175602b57c86932768510a3f813128e35b2cd2440b5 languageName: node linkType: hard -"@vue/runtime-core@npm:3.4.15": - version: 3.4.15 - resolution: "@vue/runtime-core@npm:3.4.15" +"@vue/reactivity@npm:3.4.21": + version: 3.4.21 + resolution: "@vue/reactivity@npm:3.4.21" dependencies: - "@vue/reactivity": "npm:3.4.15" - "@vue/shared": "npm:3.4.15" - checksum: 10c0/f8784c2b65bb8bec705a0e1723f7b47079604c1d1c075497af6f303f81fa5e228d3ca56da2fac3e6e303a42ab26febfcc7a3be5b932a3c0a2f588f1256b9af38 + "@vue/shared": "npm:3.4.21" + checksum: 10c0/9296ba12dc87bed7c056801a8cbff215ff4245404078186188f3c549a075f159acc7eeaf876a949450d22fc1c99a5b9f1818b4c0f828feaaf25273476ff4244b languageName: node linkType: hard -"@vue/runtime-dom@npm:3.4.15": - version: 3.4.15 - resolution: "@vue/runtime-dom@npm:3.4.15" +"@vue/runtime-core@npm:3.4.21": + version: 3.4.21 + resolution: "@vue/runtime-core@npm:3.4.21" dependencies: - "@vue/runtime-core": "npm:3.4.15" - "@vue/shared": "npm:3.4.15" + "@vue/reactivity": "npm:3.4.21" + "@vue/shared": "npm:3.4.21" + checksum: 10c0/9d57aaf24b33c21f4b632c1efca3baac6af420676e2f3ef0d79f0efd606617d1be56f2bd345afb1960a5603f2f5f48bbb80535403cd526f3bbba1322f823ce5b + languageName: node + linkType: hard + +"@vue/runtime-dom@npm:3.4.21": + version: 3.4.21 + resolution: "@vue/runtime-dom@npm:3.4.21" + dependencies: + "@vue/runtime-core": "npm:3.4.21" + "@vue/shared": "npm:3.4.21" csstype: "npm:^3.1.3" - checksum: 10c0/e9202ca15481e72dce4f2dce2c29401afc82ee89e7f01f2989cee2a94d7689b75139e900717e3c8bfb59b741f403051a02664b5784e5389a49d639f919e234c4 + checksum: 10c0/29ad38e1c9c6286bb7dfbc3d1830b03f73f870183f9e9d81e6dbc11a71f6ff7ec2a0428832d678d8ed9e8722a98580202597adde57dcc3b47f848abb7b8d16c2 languageName: node linkType: hard -"@vue/server-renderer@npm:3.4.15": - version: 3.4.15 - resolution: "@vue/server-renderer@npm:3.4.15" +"@vue/server-renderer@npm:3.4.21": + version: 3.4.21 + resolution: "@vue/server-renderer@npm:3.4.21" dependencies: - "@vue/compiler-ssr": "npm:3.4.15" - "@vue/shared": "npm:3.4.15" + "@vue/compiler-ssr": "npm:3.4.21" + "@vue/shared": "npm:3.4.21" peerDependencies: - vue: 3.4.15 - checksum: 10c0/43f86060774b8fa7331c672c564402ec58363642f0457147492b7b69c44fb1c26515968dc72d2ca0be053e838e9c2cf8f274356f982bb2bf9e886b1f4916ecaf + vue: 3.4.21 + checksum: 10c0/3ff91392473cea8d85a11e8315bf378fd0cb4b5e4f650acad3b1bc672ceb3a0e29d22d4860186b06697b72a8ab544d67ba7969e77fed07a402c3528f90c764ed languageName: node linkType: hard -"@vue/shared@npm:3.4.15": - version: 3.4.15 - resolution: "@vue/shared@npm:3.4.15" - checksum: 10c0/eddcc1c82e8e550d9f3d622e33fd841c0c3b5c6f04f21f1cb10d3415068daabac0746279c88031861183d75d7a082fb599eec9201757d457de177d86989a9bc7 +"@vue/shared@npm:3.4.21": + version: 3.4.21 + resolution: "@vue/shared@npm:3.4.21" + checksum: 10c0/79cba4228c3c1769ba8024302d7dbebf6ed1b77fb2e7a69e635cdebaa1c18b409e9c27ce27ccbe3a98e702a7e2dae1b87754d87f0b29adfe2a8f9e1e7c7899d5 languageName: node linkType: hard @@ -3740,7 +3791,7 @@ __metadata: typescript: "npm:^5.3.3" unplugin-swc: "npm:^1.4.4" vite-tsconfig-paths: "npm:^4.3.1" - vitepress: "npm:^1.0.0-rc.40" + vitepress: "npm:^1.0.0-rc.44" vitest: "npm:^1.2.1" wasm-pack: "npm:^0.12.1" languageName: unknown @@ -5640,6 +5691,13 @@ __metadata: languageName: node linkType: hard +"hookable@npm:^5.5.3": + version: 5.5.3 + resolution: "hookable@npm:5.5.3" + checksum: 10c0/275f4cc84d27f8d48c5a5cd5685b6c0fea9291be9deea5bff0cfa72856ed566abde1dcd8cb1da0f9a70b4da3d7ec0d60dc3554c4edbba647058cc38816eced3d + languageName: node + linkType: hard + "html-escaper@npm:^2.0.0": version: 2.0.2 resolution: "html-escaper@npm:2.0.2" @@ -6370,6 +6428,15 @@ __metadata: languageName: node linkType: hard +"magic-string@npm:^0.30.7": + version: 0.30.7 + resolution: "magic-string@npm:0.30.7" + dependencies: + "@jridgewell/sourcemap-codec": "npm:^1.4.15" + checksum: 10c0/d1d949f7a53c37c6e685f4ea7b2b151c2fe0cc5af8f1f979ecba916f7d60d58f35309aaf4c8b09ce1aef7c160b957be39a38b52b478a91650750931e4ddd5daf + languageName: node + linkType: hard + "magicast@npm:^0.3.3": version: 0.3.3 resolution: "magicast@npm:0.3.3" @@ -6705,6 +6772,13 @@ __metadata: languageName: node linkType: hard +"mitt@npm:^3.0.1": + version: 3.0.1 + resolution: "mitt@npm:3.0.1" + checksum: 10c0/3ab4fdecf3be8c5255536faa07064d05caa3dd332bd318ff02e04621f7b3069ca1de9106cfe8e7ced675abfc2bec2ce4c4ef321c4a1bb1fb29df8ae090741913 + languageName: node + linkType: hard + "mkdirp-classic@npm:^0.5.2, mkdirp-classic@npm:^0.5.3": version: 0.5.3 resolution: "mkdirp-classic@npm:0.5.3" @@ -7327,6 +7401,13 @@ __metadata: languageName: node linkType: hard +"perfect-debounce@npm:^1.0.0": + version: 1.0.0 + resolution: "perfect-debounce@npm:1.0.0" + checksum: 10c0/e2baac416cae046ef1b270812cf9ccfb0f91c04ea36ac7f5b00bc84cb7f41bdbba087c0ab21b4e02a7ef3a1f1f6db399f137cecec46868bd7d8d88c2a9ee431f + languageName: node + linkType: hard + "picocolors@npm:^1.0.0": version: 1.0.0 resolution: "picocolors@npm:1.0.0" @@ -7445,7 +7526,7 @@ __metadata: languageName: node linkType: hard -"postcss@npm:^8.4.32, postcss@npm:^8.4.33": +"postcss@npm:^8.4.32": version: 8.4.33 resolution: "postcss@npm:8.4.33" dependencies: @@ -7456,6 +7537,17 @@ __metadata: languageName: node linkType: hard +"postcss@npm:^8.4.35": + version: 8.4.35 + resolution: "postcss@npm:8.4.35" + dependencies: + nanoid: "npm:^3.3.7" + picocolors: "npm:^1.0.0" + source-map-js: "npm:^1.0.2" + checksum: 10c0/e8dd04e48001eb5857abc9475365bf08f4e508ddf9bc0b8525449a95d190f10d025acebc5b56ac2e94b3c7146790e4ae78989bb9633cb7ee20d1cc9b7dc909b2 + languageName: node + linkType: hard + "preact@npm:^10.0.0": version: 10.17.1 resolution: "preact@npm:10.17.1" @@ -7875,6 +7967,13 @@ __metadata: languageName: node linkType: hard +"rfdc@npm:^1.3.1": + version: 1.3.1 + resolution: "rfdc@npm:1.3.1" + checksum: 10c0/69f65e3ed30970f8055fac9fbbef9ce578800ca19554eab1dcbffe73a4b8aef536bc4248313889cf25e3b4e38b212c721eabe30856575bf2b2bc3d90f8ba93ef + languageName: node + linkType: hard + "rimraf@npm:^3.0.2": version: 3.0.2 resolution: "rimraf@npm:3.0.2" @@ -8164,6 +8263,15 @@ __metadata: languageName: node linkType: hard +"shiki@npm:1.1.7, shiki@npm:^1.1.5": + version: 1.1.7 + resolution: "shiki@npm:1.1.7" + dependencies: + "@shikijs/core": "npm:1.1.7" + checksum: 10c0/536f8dec961d7938f6d3a63dd6be64be082b56c1433380eda0a82cb57b5789759097947d9ef1726e521d4054a6fe2b73639e94bedaccea2044fa640667167501 + languageName: node + linkType: hard + "shiki@npm:^0.14.7": version: 0.14.7 resolution: "shiki@npm:0.14.7" @@ -8176,31 +8284,6 @@ __metadata: languageName: node linkType: hard -"shikiji-core@npm:0.10.0, shikiji-core@npm:^0.10.0": - version: 0.10.0 - resolution: "shikiji-core@npm:0.10.0" - checksum: 10c0/910fff4bed1b49d1d834f4236030e47de5e883119047d23802c526bddf8bdc3b7af7e59092028d73e1290747e7808985af5aaaecc89b3e891f695da556603a73 - languageName: node - linkType: hard - -"shikiji-transformers@npm:^0.10.0": - version: 0.10.0 - resolution: "shikiji-transformers@npm:0.10.0" - dependencies: - shikiji: "npm:0.10.0" - checksum: 10c0/e304d9ceb199e87e7c2fea6430d3a400030d6685a2a306211b2d56e3cc5fb64711b571496bd29c501bc91e347c453c3edec4942be13fa687184ac8679dfc86da - languageName: node - linkType: hard - -"shikiji@npm:0.10.0, shikiji@npm:^0.10.0": - version: 0.10.0 - resolution: "shikiji@npm:0.10.0" - dependencies: - shikiji-core: "npm:0.10.0" - checksum: 10c0/2075c81f7e4aba5555d115f18ceb64c597f19868a7a068c50bdbe61f0bceb6daa34d82aa11aa62e2a99230c3c5f261fbe9881a387a59ea3278b902b25f4c317e - languageName: node - linkType: hard - "side-channel@npm:^1.0.4": version: 1.0.4 resolution: "side-channel@npm:1.0.4" @@ -8372,6 +8455,13 @@ __metadata: languageName: node linkType: hard +"speakingurl@npm:^14.0.1": + version: 14.0.1 + resolution: "speakingurl@npm:14.0.1" + checksum: 10c0/1de1d1b938a7c4d9e79593ff7a26d312ec04a7c3234ca40b7f9b8106daf74ea9d2110a077f5db97ecf3762b83069e3ccbf9694431b51d4fcfd863f0b3333c342 + languageName: node + linkType: hard + "split2@npm:^4.0.0": version: 4.2.0 resolution: "split2@npm:4.2.0" @@ -9269,7 +9359,7 @@ __metadata: languageName: node linkType: hard -"vite@npm:^5.0.0, vite@npm:^5.0.12": +"vite@npm:^5.0.0": version: 5.0.12 resolution: "vite@npm:5.0.12" dependencies: @@ -9309,28 +9399,68 @@ __metadata: languageName: node linkType: hard -"vitepress@npm:^1.0.0-rc.40": - version: 1.0.0-rc.40 - resolution: "vitepress@npm:1.0.0-rc.40" +"vite@npm:^5.1.3": + version: 5.1.4 + resolution: "vite@npm:5.1.4" + dependencies: + esbuild: "npm:^0.19.3" + fsevents: "npm:~2.3.3" + postcss: "npm:^8.4.35" + rollup: "npm:^4.2.0" + peerDependencies: + "@types/node": ^18.0.0 || >=20.0.0 + less: "*" + lightningcss: ^1.21.0 + sass: "*" + stylus: "*" + sugarss: "*" + terser: ^5.4.0 + dependenciesMeta: + fsevents: + optional: true + peerDependenciesMeta: + "@types/node": + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + bin: + vite: bin/vite.js + checksum: 10c0/8f04c8bed33f266bde27f432412456a3b893b51fe1857f0b8cd259100b376c1393a7927db1dd6344a4376baed72ed179ec5b0428aef2ae8508f1f28f95acb908 + languageName: node + linkType: hard + +"vitepress@npm:^1.0.0-rc.44": + version: 1.0.0-rc.44 + resolution: "vitepress@npm:1.0.0-rc.44" dependencies: "@docsearch/css": "npm:^3.5.2" "@docsearch/js": "npm:^3.5.2" + "@shikijs/core": "npm:^1.1.5" + "@shikijs/transformers": "npm:^1.1.5" "@types/markdown-it": "npm:^13.0.7" - "@vitejs/plugin-vue": "npm:^5.0.3" - "@vue/devtools-api": "npm:^6.5.1" + "@vitejs/plugin-vue": "npm:^5.0.4" + "@vue/devtools-api": "npm:^7.0.14" "@vueuse/core": "npm:^10.7.2" "@vueuse/integrations": "npm:^10.7.2" focus-trap: "npm:^7.5.4" mark.js: "npm:8.11.1" minisearch: "npm:^6.3.0" - shikiji: "npm:^0.10.0" - shikiji-core: "npm:^0.10.0" - shikiji-transformers: "npm:^0.10.0" - vite: "npm:^5.0.12" - vue: "npm:^3.4.15" + shiki: "npm:^1.1.5" + vite: "npm:^5.1.3" + vue: "npm:^3.4.19" peerDependencies: markdown-it-mathjax3: ^4.3.2 - postcss: ^8.4.33 + postcss: ^8.4.35 peerDependenciesMeta: markdown-it-mathjax3: optional: true @@ -9338,7 +9468,7 @@ __metadata: optional: true bin: vitepress: bin/vitepress.js - checksum: 10c0/ced1a600b2e580ec9b431a02829c301435d5e8b6bc5b0be4ad47a5da9ba0a358b3073c4c76ee197ac11ca1c4bee91d818e4f04b852eff44961e3c25690cb48df + checksum: 10c0/41df791d34d4ee2ad8a274ad951604d5d40cd6eec3983a62d7060bf3002aa68686438592207058c078373f5e3b51120d3c142857dcae086836791eb06e39076c languageName: node linkType: hard @@ -9423,21 +9553,21 @@ __metadata: languageName: node linkType: hard -"vue@npm:^3.4.15": - version: 3.4.15 - resolution: "vue@npm:3.4.15" +"vue@npm:^3.4.19": + version: 3.4.21 + resolution: "vue@npm:3.4.21" dependencies: - "@vue/compiler-dom": "npm:3.4.15" - "@vue/compiler-sfc": "npm:3.4.15" - "@vue/runtime-dom": "npm:3.4.15" - "@vue/server-renderer": "npm:3.4.15" - "@vue/shared": "npm:3.4.15" + "@vue/compiler-dom": "npm:3.4.21" + "@vue/compiler-sfc": "npm:3.4.21" + "@vue/runtime-dom": "npm:3.4.21" + "@vue/server-renderer": "npm:3.4.21" + "@vue/shared": "npm:3.4.21" peerDependencies: typescript: "*" peerDependenciesMeta: typescript: optional: true - checksum: 10c0/7410135553f38d390ece3d5edcb6e2c158c3717e002a4e0766a95f6054f0ab7a8ce69000f5e29ff41f631f3cc7211123fbe34ab591b43b14f4af77c4ac01d116 + checksum: 10c0/70806fdfe2f34387dd043403f3cf0946f43216090832c2a0be06e88d6feabba28a0aa05dc75777a1cb1aa770b24c015206519a20752faf0f6ed4d9b7568f0400 languageName: node linkType: hard