From e583fc91ae146ad9f6f8136f0e508d1ac2b25845 Mon Sep 17 00:00:00 2001 From: Kevin Ingersoll Date: Tue, 27 Aug 2024 15:12:56 +0100 Subject: [PATCH] refactor(cli): register labels as tags (#3063) --- packages/cli/package.json | 1 + packages/cli/src/deploy/deploy.ts | 20 +-- .../cli/src/deploy/ensureResourceLabels.ts | 66 --------- packages/cli/src/deploy/ensureResourceTags.ts | 70 +++++++++ packages/cli/src/deploy/getRecord.ts | 46 ++++++ packages/cli/src/runDeploy.ts | 8 +- .../protocol-parser/src/exports/internal.ts | 1 + .../protocol-parser/src/getKeyTuple.test.ts | 53 +++++++ packages/protocol-parser/src/getKeyTuple.ts | 19 +++ pnpm-lock.yaml | 139 +++++++++--------- 10 files changed, 276 insertions(+), 147 deletions(-) delete mode 100644 packages/cli/src/deploy/ensureResourceLabels.ts create mode 100644 packages/cli/src/deploy/ensureResourceTags.ts create mode 100644 packages/cli/src/deploy/getRecord.ts create mode 100644 packages/protocol-parser/src/getKeyTuple.test.ts create mode 100644 packages/protocol-parser/src/getKeyTuple.ts diff --git a/packages/cli/package.json b/packages/cli/package.json index 35c3475523..c012614bf3 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -39,6 +39,7 @@ "test:ci": "pnpm run test" }, "dependencies": { + "@ark/util": "catalog:", "@aws-sdk/client-kms": "^3.556.0", "@latticexyz/abi-ts": "workspace:*", "@latticexyz/common": "workspace:*", diff --git a/packages/cli/src/deploy/deploy.ts b/packages/cli/src/deploy/deploy.ts index 3befb5f21a..cb50f94e45 100644 --- a/packages/cli/src/deploy/deploy.ts +++ b/packages/cli/src/deploy/deploy.ts @@ -1,4 +1,4 @@ -import { Account, Address, Chain, Client, Hex, Transport } from "viem"; +import { Account, Address, Chain, Client, Hex, Transport, stringToHex } from "viem"; import { ensureDeployer } from "./ensureDeployer"; import { deployWorld } from "./deployWorld"; import { ensureTables } from "./ensureTables"; @@ -15,7 +15,7 @@ import { ensureContractsDeployed } from "./ensureContractsDeployed"; import { randomBytes } from "crypto"; import { ensureWorldFactory } from "./ensureWorldFactory"; import { Table } from "@latticexyz/config"; -import { ensureResourceLabels } from "./ensureResourceLabels"; +import { ensureResourceTags } from "./ensureResourceTags"; type DeployOptions = { client: Client; @@ -90,14 +90,10 @@ export async function deploy({ throw new Error(`Unsupported World version: ${worldDeploy.worldVersion}`); } - const resources = [ - ...tables.map((table) => ({ resourceId: table.tableId, label: table.label })), - ...systems.map((system) => ({ resourceId: system.systemId, label: system.label })), - ]; const namespaceTxs = await ensureNamespaceOwner({ client, worldDeploy, - resourceIds: resources.map(({ resourceId }) => resourceId), + resourceIds: [...tables.map(({ tableId }) => tableId), ...systems.map(({ systemId }) => systemId)], }); debug("waiting for all namespace registration transactions to confirm"); @@ -129,13 +125,17 @@ export async function deploy({ worldDeploy, modules, }); - const labelTxs = await ensureResourceLabels({ + + const tableTags = tables.map(({ tableId: resourceId, label }) => ({ resourceId, tag: "label", value: label })); + + const tagTxs = await ensureResourceTags({ client, worldDeploy, - resources, + tags: tableTags, + valueToHex: stringToHex, }); - const txs = [...tableTxs, ...systemTxs, ...functionTxs, ...moduleTxs, ...labelTxs]; + const txs = [...tableTxs, ...systemTxs, ...functionTxs, ...moduleTxs, ...tagTxs]; // wait for each tx separately/serially, because parallelizing results in RPC errors debug("waiting for all transactions to confirm"); diff --git a/packages/cli/src/deploy/ensureResourceLabels.ts b/packages/cli/src/deploy/ensureResourceLabels.ts deleted file mode 100644 index 16ad8eb410..0000000000 --- a/packages/cli/src/deploy/ensureResourceLabels.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { Hex, Client, Transport, Chain, Account, stringToHex, BaseError, hexToString } from "viem"; -import { WorldDeploy } from "./common"; -import { debug } from "./debug"; -import { hexToResource, writeContract } from "@latticexyz/common"; -import { isDefined } from "@latticexyz/common/utils"; -import metadataConfig from "@latticexyz/world-module-metadata/mud.config"; -import metadataAbi from "@latticexyz/world-module-metadata/out/IMetadataSystem.sol/IMetadataSystem.abi.json" assert { type: "json" }; -import { getTableValue } from "./getTableValue"; - -type LabeledResource = { - readonly resourceId: Hex; - readonly label: string; -}; - -export async function ensureResourceLabels({ - client, - worldDeploy, - resources, -}: { - readonly client: Client; - readonly worldDeploy: WorldDeploy; - readonly resources: readonly LabeledResource[]; -}): Promise { - const currentLabels = await Promise.all( - resources.map(async (resource) => { - const { value } = await getTableValue({ - client, - worldDeploy, - table: metadataConfig.tables.metadata__ResourceTag, - key: { resource: resource.resourceId, tag: stringToHex("label", { size: 32 }) }, - }); - return hexToString(value); - }), - ); - - const resourcesToSet = resources.filter((resource, i) => resource.label !== currentLabels[i]); - if (resourcesToSet.length === 0) { - return []; - } - - debug("setting", resources.length, "resource labels"); - return ( - await Promise.all( - resourcesToSet.map(async ({ resourceId, label }) => { - const resource = hexToResource(resourceId); - // TODO: move to resourceToDebugString - const resourceString = `${resource.type}:${resource.namespace}:${resource.name}`; - debug(`setting resource label for ${resourceString} to ${label}`); - try { - return await writeContract(client, { - chain: client.chain ?? null, - address: worldDeploy.address, - abi: metadataAbi, - // TODO: replace with batchCall (https://github.com/latticexyz/mud/issues/1645) - functionName: "metadata__setResourceTag", - args: [resourceId, stringToHex("label", { size: 32 }), stringToHex(label)], - }); - } catch (error) { - debug( - `failed to set resource label for ${resourceString}, skipping\n ${error instanceof BaseError ? error.shortMessage : error}`, - ); - } - }), - ) - ).filter(isDefined); -} diff --git a/packages/cli/src/deploy/ensureResourceTags.ts b/packages/cli/src/deploy/ensureResourceTags.ts new file mode 100644 index 0000000000..56e83372d9 --- /dev/null +++ b/packages/cli/src/deploy/ensureResourceTags.ts @@ -0,0 +1,70 @@ +import { Hex, Client, Transport, Chain, Account, stringToHex, BaseError } from "viem"; +import { WorldDeploy } from "./common"; +import { debug } from "./debug"; +import { hexToResource, writeContract } from "@latticexyz/common"; +import { identity, isDefined } from "@latticexyz/common/utils"; +import metadataConfig from "@latticexyz/world-module-metadata/mud.config"; +import metadataAbi from "@latticexyz/world-module-metadata/out/IMetadataSystem.sol/IMetadataSystem.abi.json" assert { type: "json" }; +import { getRecord } from "./getRecord"; + +export type ResourceTag = { + resourceId: Hex; + tag: string; + value: value; +}; + +export async function ensureResourceTags({ + client, + worldDeploy, + tags, + valueToHex = identity, +}: { + readonly client: Client; + readonly worldDeploy: WorldDeploy; + readonly tags: readonly ResourceTag[]; +} & (value extends Hex + ? { readonly valueToHex?: (value: value) => Hex } + : { readonly valueToHex: (value: value) => Hex })): Promise { + const pendingTags = ( + await Promise.all( + tags.map(async (tag) => { + const { value } = await getRecord({ + client, + worldDeploy, + table: metadataConfig.tables.metadata__ResourceTag, + key: { resource: tag.resourceId, tag: stringToHex(tag.tag, { size: 32 }) }, + }); + if (value === valueToHex(tag.value)) return; + return tag; + }), + ) + ).filter(isDefined); + + if (pendingTags.length === 0) return []; + + debug("setting", pendingTags.length, "resource tags"); + return ( + await Promise.all( + pendingTags.map(async (tag) => { + const resource = hexToResource(tag.resourceId); + // TODO: move to resourceToDebugString + const resourceString = `${resource.type}:${resource.namespace}:${resource.name}`; + debug(`tagging ${resourceString} with ${tag.tag}: ${JSON.stringify(tag.value)}`); + try { + return await writeContract(client, { + chain: client.chain ?? null, + address: worldDeploy.address, + abi: metadataAbi, + // TODO: replace with batchCall (https://github.com/latticexyz/mud/issues/1645) + functionName: "metadata__setResourceTag", + args: [tag.resourceId, stringToHex(tag.tag, { size: 32 }), valueToHex(tag.value)], + }); + } catch (error) { + debug( + `failed to set resource tag for ${resourceString}, skipping\n ${error instanceof BaseError ? error.shortMessage : error}`, + ); + } + }), + ) + ).filter(isDefined); +} diff --git a/packages/cli/src/deploy/getRecord.ts b/packages/cli/src/deploy/getRecord.ts new file mode 100644 index 0000000000..60541bd4fe --- /dev/null +++ b/packages/cli/src/deploy/getRecord.ts @@ -0,0 +1,46 @@ +import { + decodeValueArgs, + getKeySchema, + getKeyTuple, + getSchemaPrimitives, + getSchemaTypes, + getValueSchema, +} from "@latticexyz/protocol-parser/internal"; +import { WorldDeploy, worldAbi } from "./common"; +import { Client, Hex } from "viem"; +import { readContract } from "viem/actions"; +import { Table } from "@latticexyz/config"; +import { mapObject } from "@latticexyz/common/utils"; +import { show } from "@ark/util"; + +export async function getRecord({ + client, + worldDeploy, + table, + key, +}: { + readonly client: Client; + readonly worldDeploy: WorldDeploy; + readonly table: table; + readonly key: getSchemaPrimitives>; +}): Promise>> { + const [staticData, encodedLengths, dynamicData] = (await readContract(client, { + blockNumber: worldDeploy.stateBlock, + address: worldDeploy.address, + abi: worldAbi, + functionName: "getRecord", + args: [table.tableId, getKeyTuple(table, key)], + // TODO: remove cast once https://github.com/wevm/viem/issues/2125 is resolved + // has something to do function overloads and TS having a hard time inferring which args to use + })) as [Hex, Hex, Hex]; + const record = { + ...key, + ...decodeValueArgs(getSchemaTypes(getValueSchema(table)), { + staticData, + encodedLengths, + dynamicData, + }), + }; + // return in schema order + return mapObject(table.schema, (value, key) => record[key as never]) as never; +} diff --git a/packages/cli/src/runDeploy.ts b/packages/cli/src/runDeploy.ts index 36e63e5505..1dc7be3cb8 100644 --- a/packages/cli/src/runDeploy.ts +++ b/packages/cli/src/runDeploy.ts @@ -91,6 +91,10 @@ export async function runDeploy(opts: DeployOptions): Promise { }); const modules = await configToModules(config, outDir); + const tables = Object.values(config.namespaces) + .flatMap((namespace) => Object.values(namespace.tables)) + .filter((table) => !table.deploy.disabled); + const account = await (async () => { if (opts.kms) { const keyId = process.env.AWS_KMS_KEY_ID; @@ -129,10 +133,6 @@ export async function runDeploy(opts: DeployOptions): Promise { console.log("Deploying from", client.account.address); - const tables = Object.values(config.namespaces) - .flatMap((namespace) => Object.values(namespace.tables)) - .filter((table) => !table.deploy.disabled); - const startTime = Date.now(); const worldDeploy = await deploy({ deployerAddress: opts.deployerAddress as Hex | undefined, diff --git a/packages/protocol-parser/src/exports/internal.ts b/packages/protocol-parser/src/exports/internal.ts index 80e3d54bd0..88fe58411d 100644 --- a/packages/protocol-parser/src/exports/internal.ts +++ b/packages/protocol-parser/src/exports/internal.ts @@ -28,6 +28,7 @@ export * from "../valueSchemaToHex"; export * from "../getFieldIndex"; export * from "../getKeySchema"; +export * from "../getKeyTuple"; export * from "../getValueSchema"; export * from "../getSchemaTypes"; export * from "../getSchemaPrimitives"; diff --git a/packages/protocol-parser/src/getKeyTuple.test.ts b/packages/protocol-parser/src/getKeyTuple.test.ts new file mode 100644 index 0000000000..1e90e1d9b6 --- /dev/null +++ b/packages/protocol-parser/src/getKeyTuple.test.ts @@ -0,0 +1,53 @@ +import { describe, expect, it } from "vitest"; +import { getKeyTuple } from "./getKeyTuple"; +import { Table } from "@latticexyz/config"; + +type PartialTable = Pick; + +describe("getKeyTuple", () => { + it("can encode bool key tuple", () => { + const table = { + schema: { id: { type: "bool", internalType: "bool" } }, + key: ["id"], + } as const satisfies PartialTable; + + expect(getKeyTuple(table, { id: false })).toStrictEqual([ + "0x0000000000000000000000000000000000000000000000000000000000000000", + ]); + expect(getKeyTuple(table, { id: true })).toStrictEqual([ + "0x0000000000000000000000000000000000000000000000000000000000000001", + ]); + }); + + it("can encode complex key tuple", () => { + const table = { + schema: { + a: { type: "uint256", internalType: "uint256" }, + b: { type: "int32", internalType: "int32" }, + c: { type: "bytes16", internalType: "bytes16" }, + d: { type: "address", internalType: "address" }, + e: { type: "bool", internalType: "bool" }, + f: { type: "int8", internalType: "int8" }, + }, + key: ["a", "b", "c", "d", "e", "f"], + } as const satisfies PartialTable; + + expect( + getKeyTuple(table, { + a: 42n, + b: -42, + c: "0x12340000000000000000000000000000", + d: "0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF", + e: true, + f: 3, + }), + ).toStrictEqual([ + "0x000000000000000000000000000000000000000000000000000000000000002a", + "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd6", + "0x1234000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000ffffffffffffffffffffffffffffffffffffffff", + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000003", + ]); + }); +}); diff --git a/packages/protocol-parser/src/getKeyTuple.ts b/packages/protocol-parser/src/getKeyTuple.ts new file mode 100644 index 0000000000..17c6ab0237 --- /dev/null +++ b/packages/protocol-parser/src/getKeyTuple.ts @@ -0,0 +1,19 @@ +import { Hex, encodeAbiParameters } from "viem"; +import { getSchemaPrimitives } from "./getSchemaPrimitives"; +import { getKeySchema } from "./getKeySchema"; +import { Table } from "@latticexyz/config"; + +type PartialTable = Pick; + +export type getKeyTuple
= { + [i in keyof key]: Hex; +}; + +export function getKeyTuple( + table: table, + key: getSchemaPrimitives>, +): getKeyTuple
{ + return table.key.map((fieldName) => + encodeAbiParameters([table.schema[fieldName]], [key[fieldName as never]]), + ) as never; +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dbc39ae942..983dfb60ef 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -113,7 +113,7 @@ importers: version: 6.7.0(postcss@8.4.31)(typescript@5.4.2) vitest: specifier: 0.34.6 - version: 0.34.6(jsdom@22.1.0) + version: 0.34.6(jsdom@22.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.31.6) packages/block-logs-stream: dependencies: @@ -141,10 +141,13 @@ importers: version: 6.7.0(postcss@8.4.31)(typescript@5.4.2) vitest: specifier: 0.34.6 - version: 0.34.6(jsdom@22.1.0) + version: 0.34.6(jsdom@22.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.31.6) packages/cli: dependencies: + '@ark/util': + specifier: 'catalog:' + version: 0.2.2 '@aws-sdk/client-kms': specifier: ^3.556.0 version: 3.556.0 @@ -277,7 +280,7 @@ importers: version: 3.12.6 vitest: specifier: 0.34.6 - version: 0.34.6(jsdom@22.1.0) + version: 0.34.6(jsdom@22.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.31.6) packages/common: dependencies: @@ -329,7 +332,7 @@ importers: version: 6.7.0(postcss@8.4.31)(typescript@5.4.2) vitest: specifier: 0.34.6 - version: 0.34.6(jsdom@22.1.0) + version: 0.34.6(jsdom@22.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.31.6) packages/config: dependencies: @@ -443,7 +446,7 @@ importers: version: 6.7.0(postcss@8.4.23)(typescript@5.4.2) vitest: specifier: 0.34.6 - version: 0.34.6(jsdom@22.1.0) + version: 0.34.6(jsdom@22.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.31.6) packages/explorer: dependencies: @@ -634,7 +637,7 @@ importers: version: 3.12.6 vitest: specifier: 0.34.6 - version: 0.34.6(jsdom@22.1.0) + version: 0.34.6(jsdom@22.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.31.6) packages/gas-report: dependencies: @@ -680,7 +683,7 @@ importers: version: 6.7.0(postcss@8.4.31)(typescript@5.4.2) vitest: specifier: 0.34.6 - version: 0.34.6(jsdom@22.1.0) + version: 0.34.6(jsdom@22.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.31.6) packages/protocol-parser: dependencies: @@ -705,7 +708,7 @@ importers: version: 6.7.0(postcss@8.4.31)(typescript@5.4.2) vitest: specifier: 0.34.6 - version: 0.34.6(jsdom@22.1.0) + version: 0.34.6(jsdom@22.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.31.6) packages/query: dependencies: @@ -733,7 +736,7 @@ importers: version: 6.7.0(postcss@8.4.31)(typescript@5.4.2) vitest: specifier: 0.34.6 - version: 0.34.6(jsdom@22.1.0) + version: 0.34.6(jsdom@22.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.31.6) packages/react: dependencies: @@ -764,7 +767,7 @@ importers: version: 18.2.22 '@vitejs/plugin-react': specifier: ^4.0.0 - version: 4.0.0(vite@4.3.6(@types/node@20.12.12)) + version: 4.0.0(vite@4.3.6(@types/node@20.12.12)(terser@5.31.6)) eslint-plugin-react: specifier: 7.31.11 version: 7.31.11(eslint@8.57.0) @@ -782,10 +785,10 @@ importers: version: 6.7.0(postcss@8.4.31)(typescript@5.4.2) vite: specifier: ^4.3.6 - version: 4.3.6(@types/node@20.12.12) + version: 4.3.6(@types/node@20.12.12)(terser@5.31.6) vitest: specifier: 0.34.6 - version: 0.34.6(jsdom@22.1.0) + version: 0.34.6(jsdom@22.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.31.6) packages/recs: dependencies: @@ -813,7 +816,7 @@ importers: version: 29.5.0(@types/node@18.15.11) ts-jest: specifier: ^29.0.5 - version: 29.0.5(@babel/core@7.21.4)(@jest/types@29.5.0)(babel-jest@29.5.0(@babel/core@7.21.4))(jest@29.5.0(@types/node@18.15.11))(typescript@5.4.2) + version: 29.0.5(@babel/core@7.21.4)(@jest/types@29.6.3)(babel-jest@29.5.0(@babel/core@7.21.4))(jest@29.5.0(@types/node@18.15.11))(typescript@5.4.2) tsup: specifier: ^6.7.0 version: 6.7.0(postcss@8.4.31)(typescript@5.4.2) @@ -844,7 +847,7 @@ importers: version: 6.7.0(postcss@8.4.31)(typescript@5.4.2) vitest: specifier: 0.34.6 - version: 0.34.6(jsdom@22.1.0) + version: 0.34.6(jsdom@22.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.31.6) packages/solhint-config-mud: devDependencies: @@ -924,7 +927,7 @@ importers: version: 3.12.6 vitest: specifier: 0.34.6 - version: 0.34.6(jsdom@22.1.0) + version: 0.34.6(jsdom@22.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.31.6) packages/store-indexer: dependencies: @@ -1039,7 +1042,7 @@ importers: version: 3.12.6 vitest: specifier: 0.34.6 - version: 0.34.6(jsdom@22.1.0) + version: 0.34.6(jsdom@22.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.31.6) packages/store-sync: dependencies: @@ -1136,7 +1139,7 @@ importers: version: 6.7.0(postcss@8.4.31)(typescript@5.4.2) vitest: specifier: 0.34.6 - version: 0.34.6(jsdom@22.1.0) + version: 0.34.6(jsdom@22.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.31.6) packages/utils: dependencies: @@ -1158,7 +1161,7 @@ importers: version: 29.5.0(@types/node@20.12.12) ts-jest: specifier: ^29.0.5 - version: 29.0.5(@babel/core@7.21.4)(@jest/types@29.5.0)(babel-jest@29.5.0(@babel/core@7.21.4))(jest@29.5.0(@types/node@20.12.12))(typescript@5.4.2) + version: 29.0.5(@babel/core@7.21.4)(@jest/types@29.6.3)(babel-jest@29.5.0(@babel/core@7.21.4))(jest@29.5.0(@types/node@20.12.12))(typescript@5.4.2) tsup: specifier: ^6.7.0 version: 6.7.0(postcss@8.4.31)(typescript@5.4.2) @@ -1237,7 +1240,7 @@ importers: version: 3.12.6 vitest: specifier: 0.34.6 - version: 0.34.6(jsdom@22.1.0) + version: 0.34.6(jsdom@22.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.31.6) packages/world-module-metadata: dependencies: @@ -1277,7 +1280,7 @@ importers: version: 3.12.6 vitest: specifier: 0.34.6 - version: 0.34.6(jsdom@22.1.0) + version: 0.34.6(jsdom@22.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.31.6) packages/world-modules: dependencies: @@ -1338,7 +1341,7 @@ importers: version: 3.12.6 vitest: specifier: 0.34.6 - version: 0.34.6(jsdom@22.1.0) + version: 0.34.6(jsdom@22.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.31.6) test/mock-game-contracts: devDependencies: @@ -1386,7 +1389,7 @@ importers: version: 2.19.8(bufferutil@4.0.8)(typescript@5.4.2)(utf-8-validate@5.0.10)(zod@3.23.8) vite: specifier: ^4.2.1 - version: 4.3.6(@types/node@20.12.12) + version: 4.3.6(@types/node@20.12.12)(terser@5.31.6) packages: @@ -11273,7 +11276,7 @@ snapshots: '@babel/helper-plugin-utils': 7.24.8 debug: 4.3.4 lodash.debounce: 4.0.8 - resolve: 1.22.2 + resolve: 1.22.8 transitivePeerDependencies: - supports-color @@ -11482,7 +11485,7 @@ snapshots: dependencies: '@babel/core': 7.21.4 '@babel/helper-create-class-features-plugin': 7.25.0(@babel/core@7.21.4) - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.24.8 transitivePeerDependencies: - supports-color @@ -11495,13 +11498,13 @@ snapshots: '@babel/plugin-proposal-nullish-coalescing-operator@7.18.6(@babel/core@7.21.4)': dependencies: '@babel/core': 7.21.4 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.21.4) '@babel/plugin-proposal-optional-chaining@7.21.0(@babel/core@7.21.4)': dependencies: '@babel/core': 7.21.4 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.24.8 '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.21.4) transitivePeerDependencies: @@ -11534,7 +11537,7 @@ snapshots: '@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.21.4)': dependencies: '@babel/core': 7.21.4 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-export-default-from@7.24.7(@babel/core@7.21.4)': dependencies: @@ -12121,7 +12124,7 @@ snapshots: dependencies: '@babel/core': 7.21.4 '@babel/helper-plugin-utils': 7.24.8 - '@babel/types': 7.21.4 + '@babel/types': 7.25.2 esutils: 2.0.3 '@babel/preset-typescript@7.24.7(@babel/core@7.21.4)': @@ -14303,7 +14306,7 @@ snapshots: '@babel/plugin-transform-sticky-regex': 7.24.7(@babel/core@7.21.4) '@babel/plugin-transform-typescript': 7.25.2(@babel/core@7.21.4) '@babel/plugin-transform-unicode-regex': 7.24.7(@babel/core@7.21.4) - '@babel/template': 7.20.7 + '@babel/template': 7.25.0 '@react-native/babel-plugin-codegen': 0.75.2(@babel/preset-env@7.25.3(@babel/core@7.21.4)) babel-plugin-transform-flow-enums: 0.0.2(@babel/core@7.21.4) react-refresh: 0.14.0 @@ -14313,7 +14316,7 @@ snapshots: '@react-native/codegen@0.75.2(@babel/preset-env@7.25.3(@babel/core@7.21.4))': dependencies: - '@babel/parser': 7.21.4 + '@babel/parser': 7.25.3 '@babel/preset-env': 7.25.3(@babel/core@7.21.4) glob: 7.2.3 hermes-parser: 0.22.0 @@ -14336,7 +14339,7 @@ snapshots: metro: 0.80.10(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) metro-config: 0.80.10(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) metro-core: 0.80.10 - node-fetch: 2.6.9(encoding@0.1.13) + node-fetch: 2.7.0(encoding@0.1.13) querystring: 0.2.1 readline: 1.3.0 transitivePeerDependencies: @@ -14357,7 +14360,7 @@ snapshots: chromium-edge-launcher: 0.2.0 connect: 3.7.0 debug: 2.6.9 - node-fetch: 2.6.9(encoding@0.1.13) + node-fetch: 2.7.0(encoding@0.1.13) nullthrows: 1.1.1 open: 7.4.2 selfsigned: 2.4.1 @@ -15255,13 +15258,13 @@ snapshots: - debug - utf-8-validate - '@vitejs/plugin-react@4.0.0(vite@4.3.6(@types/node@20.12.12))': + '@vitejs/plugin-react@4.0.0(vite@4.3.6(@types/node@20.12.12)(terser@5.31.6))': dependencies: '@babel/core': 7.21.4 '@babel/plugin-transform-react-jsx-self': 7.21.0(@babel/core@7.21.4) '@babel/plugin-transform-react-jsx-source': 7.19.6(@babel/core@7.21.4) react-refresh: 0.14.0 - vite: 4.3.6(@types/node@20.12.12) + vite: 4.3.6(@types/node@20.12.12)(terser@5.31.6) transitivePeerDependencies: - supports-color @@ -15794,7 +15797,7 @@ snapshots: are-we-there-yet@3.0.1: dependencies: delegates: 1.0.0 - readable-stream: 3.6.0 + readable-stream: 3.6.2 arg@5.0.2: {} @@ -16104,7 +16107,7 @@ snapshots: dependencies: buffer: 5.7.1 inherits: 2.0.4 - readable-stream: 3.6.0 + readable-stream: 3.6.2 bn.js@4.12.0: {} @@ -18818,7 +18821,7 @@ snapshots: jest-message-util@29.7.0: dependencies: - '@babel/code-frame': 7.21.4 + '@babel/code-frame': 7.24.7 '@jest/types': 29.6.3 '@types/stack-utils': 2.0.1 chalk: 4.1.2 @@ -19061,7 +19064,7 @@ snapshots: jscodeshift@0.14.0(@babel/preset-env@7.25.3(@babel/core@7.21.4)): dependencies: '@babel/core': 7.21.4 - '@babel/parser': 7.21.4 + '@babel/parser': 7.25.3 '@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.21.4) '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6(@babel/core@7.21.4) '@babel/plugin-proposal-optional-chaining': 7.21.0(@babel/core@7.21.4) @@ -19169,7 +19172,7 @@ snapshots: dependencies: node-addon-api: 2.0.2 node-gyp-build: 4.8.1 - readable-stream: 3.6.0 + readable-stream: 3.6.2 keygrip@1.1.0: dependencies: @@ -19593,13 +19596,13 @@ snapshots: metro-runtime@0.80.10: dependencies: - '@babel/runtime': 7.21.0 + '@babel/runtime': 7.25.0 flow-enums-runtime: 0.0.6 metro-source-map@0.80.10: dependencies: - '@babel/traverse': 7.21.4 - '@babel/types': 7.21.4 + '@babel/traverse': 7.25.3 + '@babel/types': 7.25.2 flow-enums-runtime: 0.0.6 invariant: 2.2.4 metro-symbolicate: 0.80.10 @@ -19625,9 +19628,9 @@ snapshots: metro-transform-plugins@0.80.10: dependencies: '@babel/core': 7.21.4 - '@babel/generator': 7.21.4 - '@babel/template': 7.20.7 - '@babel/traverse': 7.21.4 + '@babel/generator': 7.25.0 + '@babel/template': 7.25.0 + '@babel/traverse': 7.25.3 flow-enums-runtime: 0.0.6 nullthrows: 1.1.1 transitivePeerDependencies: @@ -19636,9 +19639,9 @@ snapshots: metro-transform-worker@0.80.10(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10): dependencies: '@babel/core': 7.21.4 - '@babel/generator': 7.21.4 - '@babel/parser': 7.21.4 - '@babel/types': 7.21.4 + '@babel/generator': 7.25.0 + '@babel/parser': 7.25.3 + '@babel/types': 7.25.2 flow-enums-runtime: 0.0.6 metro: 0.80.10(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) metro-babel-transformer: 0.80.10 @@ -19656,13 +19659,13 @@ snapshots: metro@0.80.10(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10): dependencies: - '@babel/code-frame': 7.21.4 + '@babel/code-frame': 7.24.7 '@babel/core': 7.21.4 - '@babel/generator': 7.21.4 - '@babel/parser': 7.21.4 - '@babel/template': 7.20.7 - '@babel/traverse': 7.21.4 - '@babel/types': 7.21.4 + '@babel/generator': 7.25.0 + '@babel/parser': 7.25.3 + '@babel/template': 7.25.0 + '@babel/traverse': 7.25.3 + '@babel/types': 7.25.2 accepts: 1.3.8 chalk: 4.1.2 ci-info: 2.0.0 @@ -19691,7 +19694,7 @@ snapshots: metro-transform-plugins: 0.80.10 metro-transform-worker: 0.80.10(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) mime-types: 2.1.35 - node-fetch: 2.6.9(encoding@0.1.13) + node-fetch: 2.7.0(encoding@0.1.13) nullthrows: 1.1.1 serialize-error: 2.1.0 source-map: 0.5.7 @@ -20877,7 +20880,7 @@ snapshots: regenerator-transform@0.15.2: dependencies: - '@babel/runtime': 7.21.0 + '@babel/runtime': 7.25.0 regexp.prototype.flags@1.4.3: dependencies: @@ -21774,7 +21777,7 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-jest@29.0.5(@babel/core@7.21.4)(@jest/types@29.5.0)(babel-jest@29.5.0(@babel/core@7.21.4))(jest@29.5.0(@types/node@18.15.11))(typescript@5.4.2): + ts-jest@29.0.5(@babel/core@7.21.4)(@jest/types@29.6.3)(babel-jest@29.5.0(@babel/core@7.21.4))(jest@29.5.0(@types/node@18.15.11))(typescript@5.4.2): dependencies: bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 @@ -21788,10 +21791,10 @@ snapshots: yargs-parser: 21.1.1 optionalDependencies: '@babel/core': 7.21.4 - '@jest/types': 29.5.0 + '@jest/types': 29.6.3 babel-jest: 29.5.0(@babel/core@7.21.4) - ts-jest@29.0.5(@babel/core@7.21.4)(@jest/types@29.5.0)(babel-jest@29.5.0(@babel/core@7.21.4))(jest@29.5.0(@types/node@20.12.12))(typescript@5.4.2): + ts-jest@29.0.5(@babel/core@7.21.4)(@jest/types@29.6.3)(babel-jest@29.5.0(@babel/core@7.21.4))(jest@29.5.0(@types/node@20.12.12))(typescript@5.4.2): dependencies: bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 @@ -21805,7 +21808,7 @@ snapshots: yargs-parser: 21.1.1 optionalDependencies: '@babel/core': 7.21.4 - '@jest/types': 29.5.0 + '@jest/types': 29.6.3 babel-jest: 29.5.0(@babel/core@7.21.4) tsconfig-paths@3.15.0: @@ -22159,14 +22162,14 @@ snapshots: - utf-8-validate - zod - vite-node@0.34.6(@types/node@18.15.11): + vite-node@0.34.6(@types/node@18.15.11)(terser@5.31.6): dependencies: cac: 6.7.14 debug: 4.3.4 mlly: 1.5.0 pathe: 1.1.2 picocolors: 1.0.0 - vite: 4.3.6(@types/node@18.15.11) + vite: 4.3.6(@types/node@18.15.11)(terser@5.31.6) transitivePeerDependencies: - '@types/node' - less @@ -22176,7 +22179,7 @@ snapshots: - supports-color - terser - vite@4.3.6(@types/node@18.15.11): + vite@4.3.6(@types/node@18.15.11)(terser@5.31.6): dependencies: esbuild: 0.17.17 postcss: 8.4.23 @@ -22184,8 +22187,9 @@ snapshots: optionalDependencies: '@types/node': 18.15.11 fsevents: 2.3.3 + terser: 5.31.6 - vite@4.3.6(@types/node@20.12.12): + vite@4.3.6(@types/node@20.12.12)(terser@5.31.6): dependencies: esbuild: 0.17.17 postcss: 8.4.23 @@ -22193,8 +22197,9 @@ snapshots: optionalDependencies: '@types/node': 20.12.12 fsevents: 2.3.3 + terser: 5.31.6 - vitest@0.34.6(jsdom@22.1.0): + vitest@0.34.6(jsdom@22.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(terser@5.31.6): dependencies: '@types/chai': 4.3.5 '@types/chai-subset': 1.3.3 @@ -22217,8 +22222,8 @@ snapshots: strip-literal: 1.3.0 tinybench: 2.6.0 tinypool: 0.7.0 - vite: 4.3.6(@types/node@18.15.11) - vite-node: 0.34.6(@types/node@18.15.11) + vite: 4.3.6(@types/node@18.15.11)(terser@5.31.6) + vite-node: 0.34.6(@types/node@18.15.11)(terser@5.31.6) why-is-node-running: 2.2.2 optionalDependencies: jsdom: 22.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)