From db3875c1d6e258cdf7ecc42d8db2776f33204dce Mon Sep 17 00:00:00 2001 From: Timothee Legros Date: Wed, 11 Sep 2024 15:47:56 +0300 Subject: [PATCH 1/9] decode db content script init --- packages/commonwealth/package.json | 5 +- .../commonwealth/scripts/decode-db-content.ts | 352 ++++++++++++++++++ pnpm-lock.yaml | 14 + 3 files changed, 369 insertions(+), 2 deletions(-) create mode 100644 packages/commonwealth/scripts/decode-db-content.ts diff --git a/packages/commonwealth/package.json b/packages/commonwealth/package.json index ac18a842452..56f8d38891f 100644 --- a/packages/commonwealth/package.json +++ b/packages/commonwealth/package.json @@ -156,6 +156,7 @@ "buffer": "^6.0.3", "cheerio": "1.0.0-rc.3", "clsx": "^1.2.1", + "commonwealth-mdxeditor": "^0.0.3", "compression": "^1.7.4", "connect-session-sequelize": "^7.1.1", "cookie-parser": "^1.4.4", @@ -211,6 +212,7 @@ "process": "^0.11.10", "protobufjs": "^6.1.13", "quill": "^1.3.7", + "quill-delta-to-markdown": "^0.6.0", "quill-image-drop-and-paste": "^1.0.4", "quill-magic-url": "^4.2.0", "quill-mention": "^2.2.7", @@ -259,8 +261,7 @@ "web3-validator": "2.0.5", "yargs": "^17.7.2", "zod": "^3.22.4", - "zustand": "^4.3.8", - "commonwealth-mdxeditor": "^0.0.3" + "zustand": "^4.3.8" }, "devDependencies": { "@ethersproject/keccak256": "5.7.0", diff --git a/packages/commonwealth/scripts/decode-db-content.ts b/packages/commonwealth/scripts/decode-db-content.ts new file mode 100644 index 00000000000..d8f83448553 --- /dev/null +++ b/packages/commonwealth/scripts/decode-db-content.ts @@ -0,0 +1,352 @@ +import { dispose, logger } from '@hicommonwealth/core'; +import { models } from '@hicommonwealth/model'; +import { deltaToMarkdown } from 'quill-delta-to-markdown'; +import { LOCK, Op, QueryTypes } from 'sequelize'; + +const log = logger(import.meta); +const THREAD_BATCH_SIZE = 1_000; +const queryCase = 'WHEN id = ? THEN ?'; + +function decodeContent(content: string) { + // decode if URI encoded + let decodedContent: string; + try { + decodedContent = decodeURIComponent(content); + } catch { + decodedContent = content; + } + + // convert to Markdown if Quill Delta format + let rawMarkdown: string; + try { + const delta = JSON.parse(decodedContent); + if ('ops' in delta) { + rawMarkdown = deltaToMarkdown(delta.ops); + } else { + rawMarkdown = delta; + } + } catch (e) { + rawMarkdown = decodedContent; + } + + return rawMarkdown; +} + +async function decodeThreads(lastId: number = 0) { + let lastThreadId = lastId; + while (true) { + const transaction = await models.sequelize.transaction(); + try { + const threads = await models.Thread.findAll({ + attributes: ['id', 'title', 'body'], + where: { + id: { + [Op.gt]: lastThreadId, + }, + }, + order: [['id', 'ASC']], + limit: THREAD_BATCH_SIZE, + lock: LOCK.UPDATE, + transaction, + }); + if (threads.length === 0) { + await transaction.rollback(); + break; + } + + lastThreadId = threads.at(-1)!.id!; + + let queryTitleCases = ''; + let queryBodyCases = ''; + const titleReplacements: (number | string)[] = []; + const bodyReplacements: (number | string)[] = []; + const threadIds: number[] = []; + for (const { id, title, body } of threads) { + if (titleReplacements.length > 0) { + queryTitleCases += ',\n'; + queryBodyCases += ',\n'; + } + const decodedTitle = decodeContent(title); + queryTitleCases += queryCase; + titleReplacements.push(id!, decodedTitle); + + const decodedBody = body ? decodeContent(body) : ''; + queryBodyCases += queryCase; + bodyReplacements.push(id!, decodedBody); + + threadIds.push(id!); + } + + if (threadIds.length > 0) { + await models.sequelize.query( + ` + UPDATE "Threads" + SET title = CASE + ${queryTitleCases} + END, + body = CASE + ${queryBodyCases} + END + WHERE id IN (?); + `, + { + replacements: [ + ...titleReplacements, + ...bodyReplacements, + threadIds, + ], + type: QueryTypes.BULKUPDATE, + transaction, + }, + ); + } + await transaction.commit(); + log.info( + `Successfully decoded comments ${threads[0].id} to ${threads.at(-1)!.id}`, + ); + } catch (e) { + await transaction.rollback(); + } + } +} + +async function decodeThreadVersionHistory(lastId: number = 0) { + let lastVersionHistoryId = lastId; + while (true) { + const transaction = await models.sequelize.transaction(); + try { + const threads = await models.ThreadVersionHistory.findAll({ + attributes: ['id', 'body'], + where: { + id: { + [Op.gt]: lastVersionHistoryId, + }, + }, + order: [['id', 'ASC']], + limit: THREAD_BATCH_SIZE, + lock: LOCK.UPDATE, + transaction, + }); + + if (threads.length === 0) { + await transaction.rollback(); + break; + } + + lastVersionHistoryId = threads.at(-1)!.id!; + + let queryCases = ''; + const replacements: (number | string)[] = []; + const threadVersionIds: number[] = []; + for (const { id, body } of threads) { + const decodedBody = decodeContent(body); + if (body === decodedBody) continue; + if (replacements.length > 0) queryCases += ',\n'; + queryCases += queryCase; + replacements.push(id!, decodedBody); + threadVersionIds.push(id!); + } + + if (replacements.length > 0) { + await models.sequelize.query( + ` + UPDATE "ThreadVersionHistories" + SET body = CASE + ${queryCases} + END + WHERE id IN (?); + `, + { + replacements: [...replacements, threadVersionIds], + type: QueryTypes.BULKUPDATE, + transaction, + }, + ); + } + await transaction.commit(); + log.info( + `Successfully decoded comments ${threads[0].id} to ${threads.at(-1)!.id}`, + ); + } catch (e) { + await transaction.rollback(); + } + } +} + +async function decodeCommentVersionHistory(lastId: number = 0) { + let lastCommentVersionId = lastId; + while (true) { + const transaction = await models.sequelize.transaction(); + try { + const comments = await models.CommentVersionHistory.findAll({ + attributes: ['id', 'text'], + where: { + id: { + [Op.gt]: lastCommentVersionId, + }, + }, + order: [['id', 'ASC']], + limit: THREAD_BATCH_SIZE, + lock: LOCK.UPDATE, + transaction, + }); + + if (comments.length === 0) { + await transaction.rollback(); + break; + } + + lastCommentVersionId = comments.at(-1)!.id!; + + let queryCases = ''; + const replacements: (number | string)[] = []; + const commentVersionIds: number[] = []; + for (const { id, text } of comments) { + const decodedBody = decodeContent(text); + if (text === decodedBody) continue; + if (replacements.length > 0) queryCases += ',\n'; + queryCases += queryCase; + replacements.push(id!, decodedBody); + commentVersionIds.push(id!); + } + + if (replacements.length > 0) { + await models.sequelize.query( + ` + UPDATE "CommentVersionHistories" + SET text = CASE + ${queryCases} + END + WHERE id IN (?); + `, + { + replacements: [...replacements, commentVersionIds], + type: QueryTypes.BULKUPDATE, + transaction, + }, + ); + } + await transaction.commit(); + log.info( + 'Successfully decoded comment version histories' + + ` ${comments[0].id} to ${comments.at(-1)!.id}`, + ); + } catch (e) { + await transaction.rollback(); + } + } +} + +async function decodeComments(lastId: number = 0) { + let lastCommentId = lastId; + while (true) { + const transaction = await models.sequelize.transaction(); + try { + const comments = await models.Comment.findAll({ + attributes: ['id', 'text'], + where: { + id: { + [Op.gt]: lastCommentId, + }, + }, + order: [['id', 'ASC']], + limit: THREAD_BATCH_SIZE, + lock: LOCK.UPDATE, + transaction, + }); + + if (comments.length === 0) { + await transaction.rollback(); + break; + } + + lastCommentId = comments.at(-1)!.id!; + + let queryCases = ''; + const replacements: (number | string)[] = []; + const commentIds: number[] = []; + for (const { id, text } of comments) { + const decodedBody = decodeContent(text); + if (text === decodedBody) continue; + if (replacements.length > 0) queryCases += ',\n'; + queryCases += queryCase; + replacements.push(id!, decodedBody); + commentIds.push(id!); + } + + if (replacements.length > 0) { + await models.sequelize.query( + ` + UPDATE "Comments" + SET text = CASE + ${queryCases} + END + WHERE id IN (?); + `, + { + replacements: [...replacements, commentIds], + type: QueryTypes.BULKUPDATE, + transaction, + }, + ); + } + await transaction.commit(); + log.info( + `Successfully decoded comments ${comments[0].id} to ${comments.at(-1)!.id}`, + ); + } catch (e) { + await transaction.rollback(); + } + } +} + +async function main() { + const acceptedArgs = [ + 'threads', + 'thread-versions', + 'comments', + 'comment-versions', + ]; + if (!acceptedArgs.includes(process.argv[2])) { + log.error(`Must provide one of: ${JSON.stringify(acceptedArgs)}`); + } + + let lastId = 0; + if (process.argv[3]) { + lastId = parseInt(process.argv[3]); + } + + switch (process.argv[2]) { + case 'threads': + await decodeThreads(lastId); + log.info('Thread decoding finished.'); + break; + case 'thread-versions': + await decodeThreadVersionHistory(lastId); + log.info('Thread version history decoding finished.'); + break; + case 'comments': + await decodeComments(lastId); + log.info('Comment decoding finished.'); + break; + case 'comment-versions': + await decodeCommentVersionHistory(lastId); + log.info('Comment version history decoding finished'); + break; + default: + log.error('Invalid argument!'); + } +} + +if (import.meta.url.endsWith(process.argv[1])) { + main() + .then(() => { + // eslint-disable-next-line @typescript-eslint/no-floating-promises + dispose()('EXIT', true); + }) + .catch((err) => { + console.error(err); + // eslint-disable-next-line @typescript-eslint/no-floating-promises + dispose()('ERROR', true); + }); +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7db9e1eda06..b63f840766f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1261,6 +1261,9 @@ importers: quill: specifier: ^1.3.6 version: 1.3.7 + quill-delta-to-markdown: + specifier: ^0.6.0 + version: 0.6.0 quill-image-drop-and-paste: specifier: ^1.0.4 version: 1.3.0 @@ -20188,6 +20191,13 @@ packages: } engines: { node: '>=8' } + quill-delta-to-markdown@0.6.0: + resolution: + { + integrity: sha512-GwNMwSvXsH8G2o6EhvoTnIwEcN8RMbtklSjuyXYdPAXAhseMiQfehngcTwVZCz/3Fn4iu1CxlpLIKoBA9AjgdQ==, + } + engines: { node: '>=6.4.0' } + quill-delta@3.6.3: resolution: { @@ -39973,6 +39983,10 @@ snapshots: quick-lru@4.0.1: {} + quill-delta-to-markdown@0.6.0: + dependencies: + lodash: 4.17.21 + quill-delta@3.6.3: dependencies: deep-equal: 1.1.2 From fd61f82f7b2e44920653b326f705e707a32df681 Mon Sep 17 00:00:00 2001 From: Timothee Legros Date: Wed, 11 Sep 2024 16:43:11 +0300 Subject: [PATCH 2/9] script fixes --- .../commonwealth/scripts/decode-db-content.ts | 48 ++++++++++--------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/packages/commonwealth/scripts/decode-db-content.ts b/packages/commonwealth/scripts/decode-db-content.ts index d8f83448553..b257929b4c9 100644 --- a/packages/commonwealth/scripts/decode-db-content.ts +++ b/packages/commonwealth/scripts/decode-db-content.ts @@ -1,11 +1,11 @@ import { dispose, logger } from '@hicommonwealth/core'; import { models } from '@hicommonwealth/model'; import { deltaToMarkdown } from 'quill-delta-to-markdown'; -import { LOCK, Op, QueryTypes } from 'sequelize'; +import { Op, QueryTypes } from 'sequelize'; const log = logger(import.meta); -const THREAD_BATCH_SIZE = 1_000; -const queryCase = 'WHEN id = ? THEN ?'; +const BATCH_SIZE = 10; +const queryCase = 'WHEN id = ? THEN ? '; function decodeContent(content: string) { // decode if URI encoded @@ -29,7 +29,7 @@ function decodeContent(content: string) { rawMarkdown = decodedContent; } - return rawMarkdown; + return rawMarkdown.trim(); } async function decodeThreads(lastId: number = 0) { @@ -45,8 +45,8 @@ async function decodeThreads(lastId: number = 0) { }, }, order: [['id', 'ASC']], - limit: THREAD_BATCH_SIZE, - lock: LOCK.UPDATE, + limit: BATCH_SIZE, + lock: transaction.LOCK.UPDATE, transaction, }); if (threads.length === 0) { @@ -62,10 +62,6 @@ async function decodeThreads(lastId: number = 0) { const bodyReplacements: (number | string)[] = []; const threadIds: number[] = []; for (const { id, title, body } of threads) { - if (titleReplacements.length > 0) { - queryTitleCases += ',\n'; - queryBodyCases += ',\n'; - } const decodedTitle = decodeContent(title); queryTitleCases += queryCase; titleReplacements.push(id!, decodedTitle); @@ -102,10 +98,13 @@ async function decodeThreads(lastId: number = 0) { } await transaction.commit(); log.info( - `Successfully decoded comments ${threads[0].id} to ${threads.at(-1)!.id}`, + 'Successfully decoded threads' + + ` ${threads[0].id} to ${threads.at(-1)!.id}`, ); } catch (e) { + log.error('Failed to update', e); await transaction.rollback(); + break; } } } @@ -123,8 +122,8 @@ async function decodeThreadVersionHistory(lastId: number = 0) { }, }, order: [['id', 'ASC']], - limit: THREAD_BATCH_SIZE, - lock: LOCK.UPDATE, + limit: BATCH_SIZE, + lock: transaction.LOCK.UPDATE, transaction, }); @@ -141,7 +140,6 @@ async function decodeThreadVersionHistory(lastId: number = 0) { for (const { id, body } of threads) { const decodedBody = decodeContent(body); if (body === decodedBody) continue; - if (replacements.length > 0) queryCases += ',\n'; queryCases += queryCase; replacements.push(id!, decodedBody); threadVersionIds.push(id!); @@ -165,10 +163,13 @@ async function decodeThreadVersionHistory(lastId: number = 0) { } await transaction.commit(); log.info( - `Successfully decoded comments ${threads[0].id} to ${threads.at(-1)!.id}`, + 'Successfully decoded thread version histories ' + + `${threads[0].id} to ${threads.at(-1)!.id}`, ); } catch (e) { + log.error('Failed to update', e); await transaction.rollback(); + break; } } } @@ -186,8 +187,8 @@ async function decodeCommentVersionHistory(lastId: number = 0) { }, }, order: [['id', 'ASC']], - limit: THREAD_BATCH_SIZE, - lock: LOCK.UPDATE, + limit: BATCH_SIZE, + lock: transaction.LOCK.UPDATE, transaction, }); @@ -204,7 +205,6 @@ async function decodeCommentVersionHistory(lastId: number = 0) { for (const { id, text } of comments) { const decodedBody = decodeContent(text); if (text === decodedBody) continue; - if (replacements.length > 0) queryCases += ',\n'; queryCases += queryCase; replacements.push(id!, decodedBody); commentVersionIds.push(id!); @@ -232,7 +232,9 @@ async function decodeCommentVersionHistory(lastId: number = 0) { ` ${comments[0].id} to ${comments.at(-1)!.id}`, ); } catch (e) { + log.error('Failed to update', e); await transaction.rollback(); + break; } } } @@ -250,8 +252,8 @@ async function decodeComments(lastId: number = 0) { }, }, order: [['id', 'ASC']], - limit: THREAD_BATCH_SIZE, - lock: LOCK.UPDATE, + limit: BATCH_SIZE, + lock: transaction.LOCK.UPDATE, transaction, }); @@ -268,7 +270,6 @@ async function decodeComments(lastId: number = 0) { for (const { id, text } of comments) { const decodedBody = decodeContent(text); if (text === decodedBody) continue; - if (replacements.length > 0) queryCases += ',\n'; queryCases += queryCase; replacements.push(id!, decodedBody); commentIds.push(id!); @@ -292,10 +293,13 @@ async function decodeComments(lastId: number = 0) { } await transaction.commit(); log.info( - `Successfully decoded comments ${comments[0].id} to ${comments.at(-1)!.id}`, + 'Successfully decoded comments' + + ` ${comments[0].id} to ${comments.at(-1)!.id}`, ); } catch (e) { + log.error('Failed to update', e); await transaction.rollback(); + break; } } } From 03002c5c4c905cfde8d214c8bb66e66c56318661 Mon Sep 17 00:00:00 2001 From: Timothee Legros Date: Wed, 11 Sep 2024 17:01:14 +0300 Subject: [PATCH 3/9] include deleted threads/comments --- packages/commonwealth/scripts/decode-db-content.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/commonwealth/scripts/decode-db-content.ts b/packages/commonwealth/scripts/decode-db-content.ts index b257929b4c9..27a909155a4 100644 --- a/packages/commonwealth/scripts/decode-db-content.ts +++ b/packages/commonwealth/scripts/decode-db-content.ts @@ -48,6 +48,7 @@ async function decodeThreads(lastId: number = 0) { limit: BATCH_SIZE, lock: transaction.LOCK.UPDATE, transaction, + paranoid: false, }); if (threads.length === 0) { await transaction.rollback(); @@ -255,6 +256,7 @@ async function decodeComments(lastId: number = 0) { limit: BATCH_SIZE, lock: transaction.LOCK.UPDATE, transaction, + paranoid: false, }); if (comments.length === 0) { From ca3a8e1a9538141df5976f7f251eb0cc2498fd72 Mon Sep 17 00:00:00 2001 From: Timothee Legros Date: Wed, 11 Sep 2024 17:39:24 +0300 Subject: [PATCH 4/9] fix thread/comment viewing --- libs/shared/src/utils.ts | 8 ++++++++ .../commonwealth/client/scripts/models/Comment.ts | 3 ++- packages/commonwealth/client/scripts/models/Thread.ts | 11 +---------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/libs/shared/src/utils.ts b/libs/shared/src/utils.ts index 5b1b9147835..fb4982bf7d1 100644 --- a/libs/shared/src/utils.ts +++ b/libs/shared/src/utils.ts @@ -308,3 +308,11 @@ export function getWebhookDestination(webhookUrl = ''): string { return destination; } + +export function getDecodedString(str: string) { + try { + return decodeURIComponent(str); + } catch (err) { + return str; + } +} diff --git a/packages/commonwealth/client/scripts/models/Comment.ts b/packages/commonwealth/client/scripts/models/Comment.ts index 4c67a0d7f62..a7a6ea0d974 100644 --- a/packages/commonwealth/client/scripts/models/Comment.ts +++ b/packages/commonwealth/client/scripts/models/Comment.ts @@ -1,3 +1,4 @@ +import { getDecodedString } from '@hicommonwealth/shared'; import type momentType from 'moment'; import moment, { Moment } from 'moment'; import AddressInfo from './AddressInfo'; @@ -64,7 +65,7 @@ export class Comment { const versionHistory = CommentVersionHistories; this.communityId = community_id; this.author = Address?.address || author; - this.text = deleted_at?.length > 0 ? '[deleted]' : decodeURIComponent(text); + this.text = deleted_at?.length > 0 ? '[deleted]' : getDecodedString(text); this.plaintext = deleted_at?.length > 0 ? '[deleted]' : plaintext; this.versionHistory = versionHistory; this.threadId = thread_id; diff --git a/packages/commonwealth/client/scripts/models/Thread.ts b/packages/commonwealth/client/scripts/models/Thread.ts index 6e662c6a507..45c920241a8 100644 --- a/packages/commonwealth/client/scripts/models/Thread.ts +++ b/packages/commonwealth/client/scripts/models/Thread.ts @@ -4,7 +4,7 @@ import { ContestManager, ContestScore, } from '@hicommonwealth/schemas'; -import { ProposalType } from '@hicommonwealth/shared'; +import { ProposalType, getDecodedString } from '@hicommonwealth/shared'; import { UserProfile, addressToUserProfile } from 'models/MinimumProfile'; import moment, { Moment } from 'moment'; import { z } from 'zod'; @@ -14,15 +14,6 @@ import Topic from './Topic'; import type { IUniqueId } from './interfaces'; import type { ThreadKind, ThreadStage } from './types'; -function getDecodedString(str: string) { - try { - return decodeURIComponent(str); - } catch (err) { - console.error(`Could not decode str: "${str}"`); - return str; - } -} - function processAssociatedContests( associatedContests?: AssociatedContest[] | null, contestActions?: ContestActionT[] | null, From 568e17e731812e3790d2d797960f04405936e1af Mon Sep 17 00:00:00 2001 From: Timothee Legros Date: Wed, 11 Sep 2024 18:09:14 +0300 Subject: [PATCH 5/9] fix thread/comment creation/editing --- libs/model/package.json | 1 + .../src/comment/CreateComment.command.ts | 5 +- libs/model/src/thread/CreateThread.command.ts | 4 +- libs/model/src/utils/decodeContent.ts | 27 + libs/model/src/utils/index.ts | 1 + .../state/api/comments/createComment.ts | 2 +- .../scripts/state/api/comments/editComment.ts | 2 +- .../scripts/state/api/threads/createThread.ts | 4 +- .../scripts/state/api/threads/editThread.ts | 4 +- packages/commonwealth/package.json | 1 - pnpm-lock.yaml | 644 +++++++++++++----- 11 files changed, 523 insertions(+), 172 deletions(-) create mode 100644 libs/model/src/utils/decodeContent.ts diff --git a/libs/model/package.json b/libs/model/package.json index 07828a26579..c26cb5268cc 100644 --- a/libs/model/package.json +++ b/libs/model/package.json @@ -47,6 +47,7 @@ "node-fetch": "2", "node-object-hash": "^3.0.0", "pg": "^8.11.3", + "quill-delta-to-markdown": "^0.6.0", "sequelize": "^6.32.1", "umzug": "^3.7.0", "uuid": "^9.0.1", diff --git a/libs/model/src/comment/CreateComment.command.ts b/libs/model/src/comment/CreateComment.command.ts index 0a93333b6d4..1bb77fe1f1a 100644 --- a/libs/model/src/comment/CreateComment.command.ts +++ b/libs/model/src/comment/CreateComment.command.ts @@ -1,5 +1,5 @@ import { EventNames, InvalidState, type Command } from '@hicommonwealth/core'; -import { getCommentSearchVector } from '@hicommonwealth/model'; +import { decodeContent, getCommentSearchVector } from '@hicommonwealth/model'; import * as schemas from '@hicommonwealth/schemas'; import { models } from '../database'; import { isAuthorized, type AuthContext } from '../middleware'; @@ -10,7 +10,6 @@ import { emitMentions, parseUserMentions, quillToPlain, - sanitizeQuillText, uniqueMentions, } from '../utils'; import { getCommentDepth } from '../utils/getCommentDepth'; @@ -53,7 +52,7 @@ export function CreateComment(): Command< throw new InvalidState(CreateCommentErrors.NestingTooDeep); } - const text = sanitizeQuillText(payload.text); + const text = decodeContent(payload.text); const plaintext = quillToPlain(text); const mentions = uniqueMentions(parseUserMentions(text)); diff --git a/libs/model/src/thread/CreateThread.command.ts b/libs/model/src/thread/CreateThread.command.ts index 85fdc438644..ad829ad1727 100644 --- a/libs/model/src/thread/CreateThread.command.ts +++ b/libs/model/src/thread/CreateThread.command.ts @@ -17,10 +17,10 @@ import { mustBeAuthorized } from '../middleware/guards'; import { getThreadSearchVector } from '../models/thread'; import { tokenBalanceCache } from '../services'; import { + decodeContent, emitMentions, parseUserMentions, quillToPlain, - sanitizeQuillText, uniqueMentions, } from '../utils'; @@ -112,7 +112,7 @@ export function CreateThread(): Command< checkContestLimits(activeContestManagers, actor.address!); } - const body = sanitizeQuillText(payload.body); + const body = decodeContent(payload.body); const plaintext = kind === 'discussion' ? quillToPlain(body) : body; const mentions = uniqueMentions(parseUserMentions(body)); diff --git a/libs/model/src/utils/decodeContent.ts b/libs/model/src/utils/decodeContent.ts new file mode 100644 index 00000000000..cd26725de4c --- /dev/null +++ b/libs/model/src/utils/decodeContent.ts @@ -0,0 +1,27 @@ +// @ts-expect-error quill-delta-to-markdown doesn't have types +import { deltaToMarkdown } from 'quill-delta-to-markdown'; + +export function decodeContent(content: string) { + // decode if URI encoded + let decodedContent: string; + try { + decodedContent = decodeURIComponent(content); + } catch { + decodedContent = content; + } + + // convert to Markdown if Quill Delta format + let rawMarkdown: string; + try { + const delta = JSON.parse(decodedContent); + if ('ops' in delta) { + rawMarkdown = deltaToMarkdown(delta.ops); + } else { + rawMarkdown = delta; + } + } catch (e) { + rawMarkdown = decodedContent; + } + + return rawMarkdown.trim(); +} diff --git a/libs/model/src/utils/index.ts b/libs/model/src/utils/index.ts index 5cd5465f3c2..fbc7ab03523 100644 --- a/libs/model/src/utils/index.ts +++ b/libs/model/src/utils/index.ts @@ -1,3 +1,4 @@ +export * from './decodeContent'; export * from './denormalizedCountUtils'; export * from './getDelta'; export * from './parseUserMentions'; diff --git a/packages/commonwealth/client/scripts/state/api/comments/createComment.ts b/packages/commonwealth/client/scripts/state/api/comments/createComment.ts index 7de2fdb66c7..10c976e8200 100644 --- a/packages/commonwealth/client/scripts/state/api/comments/createComment.ts +++ b/packages/commonwealth/client/scripts/state/api/comments/createComment.ts @@ -36,7 +36,7 @@ export const buildCreateCommentInput = async ({ return { thread_id: threadId, parent_id: parentCommentId ?? undefined, - text: encodeURIComponent(unescapedText), + text: unescapedText, ...toCanvasSignedDataApiArgs(canvasSignedData), }; }; diff --git a/packages/commonwealth/client/scripts/state/api/comments/editComment.ts b/packages/commonwealth/client/scripts/state/api/comments/editComment.ts index a285b6c4e7a..f8c8c8613a8 100644 --- a/packages/commonwealth/client/scripts/state/api/comments/editComment.ts +++ b/packages/commonwealth/client/scripts/state/api/comments/editComment.ts @@ -38,7 +38,7 @@ export const buildUpdateCommentInput = async ({ author_community_id: communityId, comment_id: commentId, community_id: communityId, - text: encodeURIComponent(updatedBody), + text: updatedBody, jwt: userStore.getState().jwt, ...toCanvasSignedDataApiArgs(canvasSignedData), }; diff --git a/packages/commonwealth/client/scripts/state/api/threads/createThread.ts b/packages/commonwealth/client/scripts/state/api/threads/createThread.ts index 1c2d6e705d6..c5c25c45a03 100644 --- a/packages/commonwealth/client/scripts/state/api/threads/createThread.ts +++ b/packages/commonwealth/client/scripts/state/api/threads/createThread.ts @@ -41,8 +41,8 @@ export const buildCreateThreadInput = async ({ return { community_id: communityId, topic_id: topic.id, - title: encodeURIComponent(title), - body: encodeURIComponent(body ?? ''), + title: title, + body: body ?? '', kind, stage, url, diff --git a/packages/commonwealth/client/scripts/state/api/threads/editThread.ts b/packages/commonwealth/client/scripts/state/api/threads/editThread.ts index ec41143be8f..c2f5451b7d2 100644 --- a/packages/commonwealth/client/scripts/state/api/threads/editThread.ts +++ b/packages/commonwealth/client/scripts/state/api/threads/editThread.ts @@ -84,8 +84,8 @@ const editThread = async ({ jwt: userStore.getState().jwt, // for edit profile ...(url && { url }), - ...(newBody && { body: encodeURIComponent(newBody) }), - ...(newTitle && { title: encodeURIComponent(newTitle) }), + ...(newBody && { body: newBody }), + ...(newTitle && { title: newTitle }), ...(authorProfile && { author: JSON.stringify(authorProfile) }), // for editing thread locked status ...(readOnly !== undefined && { locked: readOnly }), diff --git a/packages/commonwealth/package.json b/packages/commonwealth/package.json index 56f8d38891f..6d9e87a1226 100644 --- a/packages/commonwealth/package.json +++ b/packages/commonwealth/package.json @@ -212,7 +212,6 @@ "process": "^0.11.10", "protobufjs": "^6.1.13", "quill": "^1.3.7", - "quill-delta-to-markdown": "^0.6.0", "quill-image-drop-and-paste": "^1.0.4", "quill-magic-url": "^4.2.0", "quill-mention": "^2.2.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b63f840766f..965f24db9e5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -724,6 +724,9 @@ importers: pg: specifier: ^8.11.3 version: 8.11.5 + quill-delta-to-markdown: + specifier: ^0.6.0 + version: 0.6.0 sequelize: specifier: ^6.32.1 version: 6.37.3(pg@8.11.5) @@ -1026,10 +1029,10 @@ importers: version: 1.91.8(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@tanstack/react-query': specifier: ^4.29.7 - version: 4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + version: 4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) '@tanstack/react-query-devtools': specifier: ^4.29.7 - version: 4.36.1(@tanstack/react-query@4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 4.36.1(@tanstack/react-query@4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@tanstack/react-table': specifier: ^8.9.7 version: 8.16.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -1044,7 +1047,7 @@ importers: version: 10.45.2(@trpc/server@10.45.2) '@trpc/react-query': specifier: ^10.45.1 - version: 10.45.2(@tanstack/react-query@4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1))(@trpc/client@10.45.2(@trpc/server@10.45.2))(@trpc/server@10.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 10.45.2(@tanstack/react-query@4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1))(@trpc/client@10.45.2(@trpc/server@10.45.2))(@trpc/server@10.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@types/react-helmet-async': specifier: ^1.0.3 version: 1.0.3(react@18.3.1) @@ -1261,9 +1264,6 @@ importers: quill: specifier: ^1.3.6 version: 1.3.7 - quill-delta-to-markdown: - specifier: ^0.6.0 - version: 0.6.0 quill-image-drop-and-paste: specifier: ^1.0.4 version: 1.3.0 @@ -1278,7 +1278,7 @@ importers: version: 18.3.1 react-beautiful-dnd: specifier: ^13.1.1 - version: 13.1.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + version: 13.1.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) react-device-detect: specifier: ^2.2.3 version: 2.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -2004,13 +2004,6 @@ packages: } engines: { node: '>=6.9.0' } - '@babel/generator@7.24.5': - resolution: - { - integrity: sha512-x32i4hEXvr+iI0NEoEfDKzlemF8AmtOP8CcrRaEcpzysWuoEb1KknpcvMsHKPONoKZiDuItklgWhB18xEhr9PA==, - } - engines: { node: '>=6.9.0' } - '@babel/generator@7.25.6': resolution: { @@ -2079,20 +2072,6 @@ packages: } engines: { node: '>=6.9.0' } - '@babel/helper-function-name@7.23.0': - resolution: - { - integrity: sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==, - } - engines: { node: '>=6.9.0' } - - '@babel/helper-hoist-variables@7.22.5': - resolution: - { - integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==, - } - engines: { node: '>=6.9.0' } - '@babel/helper-member-expression-to-functions@7.24.8': resolution: { @@ -2114,15 +2093,6 @@ packages: } engines: { node: '>=6.9.0' } - '@babel/helper-module-transforms@7.24.5': - resolution: - { - integrity: sha512-9GxeY8c2d2mdQUP1Dye0ks3VDyIMS98kt/llQ2nUId8IsWqTF0l1LkSX0/uP7l7MCDrzXS009Hyhe2gzTiGW8A==, - } - engines: { node: '>=6.9.0' } - peerDependencies: - '@babel/core': ^7.0.0 - '@babel/helper-module-transforms@7.25.2': resolution: { @@ -2164,13 +2134,6 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-simple-access@7.24.5': - resolution: - { - integrity: sha512-uH3Hmf5q5n7n8mz7arjUlDOCbttY/DW4DYhE6FUsjKJ/oYC1kQQUvwEQWxRwUpX9qQKRXeqLwWxrqilMrf32sQ==, - } - engines: { node: '>=6.9.0' } - '@babel/helper-simple-access@7.24.7': resolution: { @@ -2185,13 +2148,6 @@ packages: } engines: { node: '>=6.9.0' } - '@babel/helper-split-export-declaration@7.24.5': - resolution: - { - integrity: sha512-5CHncttXohrHk8GWOFCcCl4oRD9fKosWlIRgWm4ql9VYioKm52Mk2xsmoohvm7f3JoiLSM5ZgJuRaf5QZZYd3Q==, - } - engines: { node: '>=6.9.0' } - '@babel/helper-string-parser@7.24.1': resolution: { @@ -3189,13 +3145,6 @@ packages: } engines: { node: '>=6.9.0' } - '@babel/traverse@7.24.5': - resolution: - { - integrity: sha512-7aaBLeDQ4zYcUFDUD41lJc1fG8+5IU9DaNSJAgal866FGvmD5EbWQgnEC6kO1gGLsX0esNkfnJSndbTXA3r7UA==, - } - engines: { node: '>=6.9.0' } - '@babel/traverse@7.25.6': resolution: { @@ -21090,6 +21039,7 @@ packages: { integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==, } + deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true ripemd160-min@0.0.6: @@ -25406,7 +25356,7 @@ snapshots: '@babel/code-frame@7.24.7': dependencies: '@babel/highlight': 7.24.7 - picocolors: 1.0.0 + picocolors: 1.0.1 '@babel/compat-data@7.24.4': {} @@ -25415,15 +25365,15 @@ snapshots: '@babel/core@7.24.5': dependencies: '@ampproject/remapping': 2.3.0 - '@babel/code-frame': 7.24.2 - '@babel/generator': 7.24.5 - '@babel/helper-compilation-targets': 7.23.6 - '@babel/helper-module-transforms': 7.24.5(@babel/core@7.24.5) + '@babel/code-frame': 7.24.7 + '@babel/generator': 7.25.6 + '@babel/helper-compilation-targets': 7.25.2 + '@babel/helper-module-transforms': 7.25.2(@babel/core@7.24.5) '@babel/helpers': 7.24.5 - '@babel/parser': 7.24.5 - '@babel/template': 7.24.0 - '@babel/traverse': 7.24.5 - '@babel/types': 7.24.5 + '@babel/parser': 7.25.6 + '@babel/template': 7.25.0 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 convert-source-map: 2.0.0 debug: 4.3.5 gensync: 1.0.0-beta.2 @@ -25432,13 +25382,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/generator@7.24.5': - dependencies: - '@babel/types': 7.24.5 - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 - jsesc: 2.5.2 - '@babel/generator@7.25.6': dependencies: '@babel/types': 7.25.6 @@ -25486,6 +25429,13 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/helper-create-regexp-features-plugin@7.25.2': + dependencies: + '@babel/helper-annotate-as-pure': 7.24.7 + regexpu-core: 5.3.2 + semver: 6.3.1 + optional: true + '@babel/helper-create-regexp-features-plugin@7.25.2(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 @@ -25493,6 +25443,17 @@ snapshots: regexpu-core: 5.3.2 semver: 6.3.1 + '@babel/helper-define-polyfill-provider@0.6.2': + dependencies: + '@babel/helper-compilation-targets': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 + debug: 4.3.5 + lodash.debounce: 4.0.8 + resolve: 1.22.8 + transitivePeerDependencies: + - supports-color + optional: true + '@babel/helper-define-polyfill-provider@0.6.2(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 @@ -25506,15 +25467,6 @@ snapshots: '@babel/helper-environment-visitor@7.22.20': {} - '@babel/helper-function-name@7.23.0': - dependencies: - '@babel/template': 7.24.0 - '@babel/types': 7.24.5 - - '@babel/helper-hoist-variables@7.22.5': - dependencies: - '@babel/types': 7.24.5 - '@babel/helper-member-expression-to-functions@7.24.8': dependencies: '@babel/traverse': 7.25.6 @@ -25533,15 +25485,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-module-transforms@7.24.5(@babel/core@7.24.5)': - dependencies: - '@babel/core': 7.24.5 - '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-module-imports': 7.24.3 - '@babel/helper-simple-access': 7.24.5 - '@babel/helper-split-export-declaration': 7.24.5 - '@babel/helper-validator-identifier': 7.24.5 - '@babel/helper-module-transforms@7.25.2(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 @@ -25558,6 +25501,15 @@ snapshots: '@babel/helper-plugin-utils@7.24.8': {} + '@babel/helper-remap-async-to-generator@7.25.0': + dependencies: + '@babel/helper-annotate-as-pure': 7.24.7 + '@babel/helper-wrap-function': 7.25.0 + '@babel/traverse': 7.25.6 + transitivePeerDependencies: + - supports-color + optional: true + '@babel/helper-remap-async-to-generator@7.25.0(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 @@ -25576,10 +25528,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-simple-access@7.24.5': - dependencies: - '@babel/types': 7.24.5 - '@babel/helper-simple-access@7.24.7': dependencies: '@babel/traverse': 7.25.6 @@ -25594,10 +25542,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-split-export-declaration@7.24.5': - dependencies: - '@babel/types': 7.24.5 - '@babel/helper-string-parser@7.24.1': {} '@babel/helper-string-parser@7.24.8': {} @@ -25620,9 +25564,9 @@ snapshots: '@babel/helpers@7.24.5': dependencies: - '@babel/template': 7.24.0 - '@babel/traverse': 7.24.5 - '@babel/types': 7.24.5 + '@babel/template': 7.25.0 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 transitivePeerDependencies: - supports-color @@ -25638,7 +25582,7 @@ snapshots: '@babel/helper-validator-identifier': 7.24.7 chalk: 2.4.2 js-tokens: 4.0.0 - picocolors: 1.0.0 + picocolors: 1.0.1 '@babel/parser@7.24.5': dependencies: @@ -25683,6 +25627,16 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-proposal-async-generator-functions@7.20.7': + dependencies: + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-plugin-utils': 7.24.8 + '@babel/helper-remap-async-to-generator': 7.25.0 + '@babel/plugin-syntax-async-generators': 7.8.4 + transitivePeerDependencies: + - supports-color + optional: true + '@babel/plugin-proposal-async-generator-functions@7.20.7(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 @@ -25701,12 +25655,24 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-proposal-export-default-from@7.24.7': + dependencies: + '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-export-default-from': 7.24.7 + optional: true + '@babel/plugin-proposal-export-default-from@7.24.7(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-export-default-from': 7.24.7(@babel/core@7.24.5) + '@babel/plugin-proposal-logical-assignment-operators@7.20.7': + dependencies: + '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4 + optional: true + '@babel/plugin-proposal-logical-assignment-operators@7.20.7(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 @@ -25719,12 +25685,27 @@ snapshots: '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.24.5) + '@babel/plugin-proposal-numeric-separator@7.18.6': + dependencies: + '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-numeric-separator': 7.10.4 + optional: true + '@babel/plugin-proposal-numeric-separator@7.18.6(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.24.5) + '@babel/plugin-proposal-object-rest-spread@7.20.7': + dependencies: + '@babel/compat-data': 7.25.4 + '@babel/helper-compilation-targets': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-object-rest-spread': 7.8.3 + '@babel/plugin-transform-parameters': 7.24.7 + optional: true + '@babel/plugin-proposal-object-rest-spread@7.20.7(@babel/core@7.24.5)': dependencies: '@babel/compat-data': 7.24.4 @@ -25734,6 +25715,12 @@ snapshots: '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.24.5) '@babel/plugin-transform-parameters': 7.24.7(@babel/core@7.24.5) + '@babel/plugin-proposal-optional-catch-binding@7.18.6': + dependencies: + '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-optional-catch-binding': 7.8.3 + optional: true + '@babel/plugin-proposal-optional-catch-binding@7.18.6(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 @@ -25753,6 +25740,11 @@ snapshots: dependencies: '@babel/core': 7.24.5 + '@babel/plugin-syntax-async-generators@7.8.4': + dependencies: + '@babel/helper-plugin-utils': 7.24.8 + optional: true + '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 @@ -25768,11 +25760,21 @@ snapshots: '@babel/core': 7.24.5 '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-dynamic-import@7.8.3': + dependencies: + '@babel/helper-plugin-utils': 7.24.8 + optional: true + '@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-export-default-from@7.24.7': + dependencies: + '@babel/helper-plugin-utils': 7.24.8 + optional: true + '@babel/plugin-syntax-export-default-from@7.24.7(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 @@ -25813,6 +25815,11 @@ snapshots: '@babel/core': 7.24.5 '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-logical-assignment-operators@7.10.4': + dependencies: + '@babel/helper-plugin-utils': 7.24.8 + optional: true + '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 @@ -25823,16 +25830,31 @@ snapshots: '@babel/core': 7.24.5 '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-numeric-separator@7.10.4': + dependencies: + '@babel/helper-plugin-utils': 7.24.8 + optional: true + '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-object-rest-spread@7.8.3': + dependencies: + '@babel/helper-plugin-utils': 7.24.8 + optional: true + '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-optional-catch-binding@7.8.3': + dependencies: + '@babel/helper-plugin-utils': 7.24.8 + optional: true + '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 @@ -25843,6 +25865,11 @@ snapshots: '@babel/core': 7.24.5 '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-private-property-in-object@7.14.5': + dependencies: + '@babel/helper-plugin-utils': 7.24.8 + optional: true + '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 @@ -25864,6 +25891,11 @@ snapshots: '@babel/helper-create-regexp-features-plugin': 7.25.2(@babel/core@7.24.5) '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-transform-arrow-functions@7.24.7': + dependencies: + '@babel/helper-plugin-utils': 7.24.8 + optional: true + '@babel/plugin-transform-arrow-functions@7.24.7(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 @@ -25879,6 +25911,15 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-async-to-generator@7.24.7': + dependencies: + '@babel/helper-module-imports': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 + '@babel/helper-remap-async-to-generator': 7.25.0 + transitivePeerDependencies: + - supports-color + optional: true + '@babel/plugin-transform-async-to-generator@7.24.7(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 @@ -25893,6 +25934,11 @@ snapshots: '@babel/core': 7.24.5 '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-transform-block-scoping@7.25.0': + dependencies: + '@babel/helper-plugin-utils': 7.24.8 + optional: true + '@babel/plugin-transform-block-scoping@7.25.0(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 @@ -25915,6 +25961,18 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-classes@7.25.4': + dependencies: + '@babel/helper-annotate-as-pure': 7.24.7 + '@babel/helper-compilation-targets': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 + '@babel/helper-replace-supers': 7.25.0(@babel/core@7.24.5) + '@babel/traverse': 7.25.6 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + optional: true + '@babel/plugin-transform-classes@7.25.4(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 @@ -25927,12 +25985,23 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-computed-properties@7.24.7': + dependencies: + '@babel/helper-plugin-utils': 7.24.8 + '@babel/template': 7.25.0 + optional: true + '@babel/plugin-transform-computed-properties@7.24.7(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 '@babel/helper-plugin-utils': 7.24.8 '@babel/template': 7.25.0 + '@babel/plugin-transform-destructuring@7.24.8': + dependencies: + '@babel/helper-plugin-utils': 7.24.8 + optional: true + '@babel/plugin-transform-destructuring@7.24.8(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 @@ -25989,6 +26058,15 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-function-name@7.25.1': + dependencies: + '@babel/helper-compilation-targets': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 + '@babel/traverse': 7.25.6 + transitivePeerDependencies: + - supports-color + optional: true + '@babel/plugin-transform-function-name@7.25.1(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 @@ -26004,6 +26082,11 @@ snapshots: '@babel/helper-plugin-utils': 7.24.8 '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.24.5) + '@babel/plugin-transform-literals@7.25.2': + dependencies: + '@babel/helper-plugin-utils': 7.24.8 + optional: true + '@babel/plugin-transform-literals@7.25.2(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 @@ -26055,6 +26138,12 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-named-capturing-groups-regex@7.24.7': + dependencies: + '@babel/helper-create-regexp-features-plugin': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 + optional: true + '@babel/plugin-transform-named-capturing-groups-regex@7.24.7(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 @@ -26109,11 +26198,24 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-parameters@7.24.7': + dependencies: + '@babel/helper-plugin-utils': 7.24.8 + optional: true + '@babel/plugin-transform-parameters@7.24.7(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-transform-private-methods@7.25.4': + dependencies: + '@babel/helper-create-class-features-plugin': 7.25.4(@babel/core@7.24.5) + '@babel/helper-plugin-utils': 7.24.8 + transitivePeerDependencies: + - supports-color + optional: true + '@babel/plugin-transform-private-methods@7.25.4(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 @@ -26122,6 +26224,16 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-private-property-in-object@7.24.7': + dependencies: + '@babel/helper-annotate-as-pure': 7.24.7 + '@babel/helper-create-class-features-plugin': 7.25.4(@babel/core@7.24.5) + '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-private-property-in-object': 7.14.5 + transitivePeerDependencies: + - supports-color + optional: true + '@babel/plugin-transform-private-property-in-object@7.24.7(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 @@ -26137,21 +26249,47 @@ snapshots: '@babel/core': 7.24.5 '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-transform-react-display-name@7.24.7': + dependencies: + '@babel/helper-plugin-utils': 7.24.8 + optional: true + '@babel/plugin-transform-react-display-name@7.24.7(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-transform-react-jsx-self@7.24.7': + dependencies: + '@babel/helper-plugin-utils': 7.24.8 + optional: true + '@babel/plugin-transform-react-jsx-self@7.24.7(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-transform-react-jsx-source@7.24.7': + dependencies: + '@babel/helper-plugin-utils': 7.24.8 + optional: true + '@babel/plugin-transform-react-jsx-source@7.24.7(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-transform-react-jsx@7.25.2': + dependencies: + '@babel/helper-annotate-as-pure': 7.24.7 + '@babel/helper-module-imports': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.24.5) + '@babel/types': 7.25.6 + transitivePeerDependencies: + - supports-color + optional: true + '@babel/plugin-transform-react-jsx@7.25.2(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 @@ -26174,6 +26312,18 @@ snapshots: '@babel/core': 7.24.5 '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-transform-runtime@7.25.4': + dependencies: + '@babel/helper-module-imports': 7.24.7 + '@babel/helper-plugin-utils': 7.24.8 + babel-plugin-polyfill-corejs2: 0.4.11 + babel-plugin-polyfill-corejs3: 0.10.6 + babel-plugin-polyfill-regenerator: 0.6.2 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + optional: true + '@babel/plugin-transform-runtime@7.25.4(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 @@ -26186,11 +26336,24 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-shorthand-properties@7.24.7': + dependencies: + '@babel/helper-plugin-utils': 7.24.8 + optional: true + '@babel/plugin-transform-shorthand-properties@7.24.7(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-transform-spread@7.24.7': + dependencies: + '@babel/helper-plugin-utils': 7.24.8 + '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 + transitivePeerDependencies: + - supports-color + optional: true + '@babel/plugin-transform-spread@7.24.7(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 @@ -26199,6 +26362,11 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-sticky-regex@7.24.7': + dependencies: + '@babel/helper-plugin-utils': 7.24.8 + optional: true + '@babel/plugin-transform-sticky-regex@7.24.7(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 @@ -26236,6 +26404,12 @@ snapshots: '@babel/helper-create-regexp-features-plugin': 7.25.2(@babel/core@7.24.5) '@babel/helper-plugin-utils': 7.24.8 + '@babel/plugin-transform-unicode-regex@7.24.7': + dependencies: + '@babel/helper-create-regexp-features-plugin': 7.25.2 + '@babel/helper-plugin-utils': 7.24.8 + optional: true + '@babel/plugin-transform-unicode-regex@7.24.7(@babel/core@7.24.5)': dependencies: '@babel/core': 7.24.5 @@ -26394,21 +26568,6 @@ snapshots: '@babel/parser': 7.25.6 '@babel/types': 7.25.6 - '@babel/traverse@7.24.5': - dependencies: - '@babel/code-frame': 7.24.2 - '@babel/generator': 7.24.5 - '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-function-name': 7.23.0 - '@babel/helper-hoist-variables': 7.22.5 - '@babel/helper-split-export-declaration': 7.24.5 - '@babel/parser': 7.24.5 - '@babel/types': 7.24.5 - debug: 4.3.5 - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - '@babel/traverse@7.25.6': dependencies: '@babel/code-frame': 7.24.7 @@ -30365,7 +30524,7 @@ snapshots: nocache: 3.0.4 pretty-format: 26.6.2 serve-static: 1.15.0 - ws: 7.5.9(bufferutil@4.0.8)(utf-8-validate@5.0.10) + ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - encoding @@ -30419,6 +30578,14 @@ snapshots: '@react-native/assets-registry@0.74.81': {} + '@react-native/babel-plugin-codegen@0.74.81': + dependencies: + '@react-native/codegen': 0.74.81 + transitivePeerDependencies: + - '@babel/preset-env' + - supports-color + optional: true + '@react-native/babel-plugin-codegen@0.74.81(@babel/preset-env@7.25.4(@babel/core@7.24.5))': dependencies: '@react-native/codegen': 0.74.81(@babel/preset-env@7.25.4(@babel/core@7.24.5)) @@ -30426,6 +30593,55 @@ snapshots: - '@babel/preset-env' - supports-color + '@react-native/babel-preset@0.74.81': + dependencies: + '@babel/plugin-proposal-async-generator-functions': 7.20.7 + '@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.24.5) + '@babel/plugin-proposal-export-default-from': 7.24.7 + '@babel/plugin-proposal-logical-assignment-operators': 7.20.7 + '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6(@babel/core@7.24.5) + '@babel/plugin-proposal-numeric-separator': 7.18.6 + '@babel/plugin-proposal-object-rest-spread': 7.20.7 + '@babel/plugin-proposal-optional-catch-binding': 7.18.6 + '@babel/plugin-proposal-optional-chaining': 7.21.0(@babel/core@7.24.5) + '@babel/plugin-syntax-dynamic-import': 7.8.3 + '@babel/plugin-syntax-export-default-from': 7.24.7 + '@babel/plugin-syntax-flow': 7.24.7(@babel/core@7.24.5) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.24.5) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.24.5) + '@babel/plugin-transform-arrow-functions': 7.24.7 + '@babel/plugin-transform-async-to-generator': 7.24.7 + '@babel/plugin-transform-block-scoping': 7.25.0 + '@babel/plugin-transform-classes': 7.25.4 + '@babel/plugin-transform-computed-properties': 7.24.7 + '@babel/plugin-transform-destructuring': 7.24.8 + '@babel/plugin-transform-flow-strip-types': 7.25.2(@babel/core@7.24.5) + '@babel/plugin-transform-function-name': 7.25.1 + '@babel/plugin-transform-literals': 7.25.2 + '@babel/plugin-transform-modules-commonjs': 7.24.8(@babel/core@7.24.5) + '@babel/plugin-transform-named-capturing-groups-regex': 7.24.7 + '@babel/plugin-transform-parameters': 7.24.7 + '@babel/plugin-transform-private-methods': 7.25.4 + '@babel/plugin-transform-private-property-in-object': 7.24.7 + '@babel/plugin-transform-react-display-name': 7.24.7 + '@babel/plugin-transform-react-jsx': 7.25.2 + '@babel/plugin-transform-react-jsx-self': 7.24.7 + '@babel/plugin-transform-react-jsx-source': 7.24.7 + '@babel/plugin-transform-runtime': 7.25.4 + '@babel/plugin-transform-shorthand-properties': 7.24.7 + '@babel/plugin-transform-spread': 7.24.7 + '@babel/plugin-transform-sticky-regex': 7.24.7 + '@babel/plugin-transform-typescript': 7.25.2(@babel/core@7.24.5) + '@babel/plugin-transform-unicode-regex': 7.24.7 + '@babel/template': 7.25.0 + '@react-native/babel-plugin-codegen': 0.74.81 + babel-plugin-transform-flow-enums: 0.0.2 + react-refresh: 0.14.2 + transitivePeerDependencies: + - '@babel/preset-env' + - supports-color + optional: true + '@react-native/babel-preset@0.74.81(@babel/core@7.24.5)(@babel/preset-env@7.25.4(@babel/core@7.24.5))': dependencies: '@babel/core': 7.24.5 @@ -30475,6 +30691,19 @@ snapshots: - '@babel/preset-env' - supports-color + '@react-native/codegen@0.74.81': + dependencies: + '@babel/parser': 7.25.6 + glob: 7.2.3 + hermes-parser: 0.19.1 + invariant: 2.2.4 + jscodeshift: 0.14.0 + mkdirp: 0.5.6 + nullthrows: 1.1.1 + transitivePeerDependencies: + - supports-color + optional: true + '@react-native/codegen@0.74.81(@babel/preset-env@7.25.4(@babel/core@7.24.5))': dependencies: '@babel/parser': 7.24.5 @@ -30510,6 +30739,29 @@ snapshots: - supports-color - utf-8-validate + '@react-native/community-cli-plugin@0.74.81(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + dependencies: + '@react-native-community/cli-server-api': 13.6.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@react-native-community/cli-tools': 13.6.4 + '@react-native/dev-middleware': 0.74.81(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@react-native/metro-babel-transformer': 0.74.81 + chalk: 4.1.2 + execa: 5.1.1 + metro: 0.80.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) + metro-config: 0.80.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) + metro-core: 0.80.10 + node-fetch: 2.7.0 + querystring: 0.2.1 + readline: 1.3.0 + transitivePeerDependencies: + - '@babel/core' + - '@babel/preset-env' + - bufferutil + - encoding + - supports-color + - utf-8-validate + optional: true + '@react-native/debugger-frontend@0.74.81': {} '@react-native/dev-middleware@0.74.81(bufferutil@4.0.8)(utf-8-validate@5.0.10)': @@ -30537,6 +30789,16 @@ snapshots: '@react-native/js-polyfills@0.74.81': {} + '@react-native/metro-babel-transformer@0.74.81': + dependencies: + '@react-native/babel-preset': 0.74.81 + hermes-parser: 0.19.1 + nullthrows: 1.1.1 + transitivePeerDependencies: + - '@babel/preset-env' + - supports-color + optional: true + '@react-native/metro-babel-transformer@0.74.81(@babel/core@7.24.5)(@babel/preset-env@7.25.4(@babel/core@7.24.5))': dependencies: '@babel/core': 7.24.5 @@ -30558,12 +30820,12 @@ snapshots: optionalDependencies: '@types/react': 18.3.1 - '@react-native/virtualized-lists@0.74.81(@types/react@18.3.1)(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)': + '@react-native/virtualized-lists@0.74.81(@types/react@18.3.1)(react-native@0.74.0(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)': dependencies: invariant: 2.2.4 nullthrows: 1.1.1 react: 18.3.1 - react-native: 0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) + react-native: 0.74.0(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) optionalDependencies: '@types/react': 18.3.1 optional: true @@ -31580,10 +31842,10 @@ snapshots: - '@types/react' - react-dom - '@tanstack/react-query-devtools@4.36.1(@tanstack/react-query@4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@tanstack/react-query-devtools@4.36.1(@tanstack/react-query@4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@tanstack/match-sorter-utils': 8.15.1 - '@tanstack/react-query': 4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + '@tanstack/react-query': 4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) superjson: 1.13.3 @@ -31598,14 +31860,14 @@ snapshots: react-dom: 18.3.1(react@18.3.1) react-native: 0.74.0(@babel/core@7.24.5)(@babel/preset-env@7.25.4(@babel/core@7.24.5))(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) - '@tanstack/react-query@4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)': + '@tanstack/react-query@4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)': dependencies: '@tanstack/query-core': 4.36.1 react: 18.3.1 use-sync-external-store: 1.2.2(react@18.3.1) optionalDependencies: react-dom: 18.3.1(react@18.3.1) - react-native: 0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) + react-native: 0.74.0(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) '@tanstack/react-store@0.3.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -31713,9 +31975,9 @@ snapshots: dependencies: '@trpc/server': 10.45.2 - '@trpc/react-query@10.45.2(@tanstack/react-query@4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1))(@trpc/client@10.45.2(@trpc/server@10.45.2))(@trpc/server@10.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@trpc/react-query@10.45.2(@tanstack/react-query@4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1))(@trpc/client@10.45.2(@trpc/server@10.45.2))(@trpc/server@10.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@tanstack/react-query': 4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + '@tanstack/react-query': 4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) '@trpc/client': 10.45.2(@trpc/server@10.45.2) '@trpc/server': 10.45.2 react: 18.3.1 @@ -33715,20 +33977,20 @@ snapshots: axios@0.21.4: dependencies: - follow-redirects: 1.15.6(debug@4.3.4) + follow-redirects: 1.15.6 transitivePeerDependencies: - debug axios@0.27.2: dependencies: - follow-redirects: 1.15.6(debug@4.3.4) + follow-redirects: 1.15.6 form-data: 4.0.0 transitivePeerDependencies: - debug axios@1.6.8: dependencies: - follow-redirects: 1.15.6(debug@4.3.4) + follow-redirects: 1.15.6 form-data: 4.0.0 proxy-from-env: 1.1.0 transitivePeerDependencies: @@ -33753,6 +34015,15 @@ snapshots: cosmiconfig: 7.1.0 resolve: 1.22.8 + babel-plugin-polyfill-corejs2@0.4.11: + dependencies: + '@babel/compat-data': 7.25.4 + '@babel/helper-define-polyfill-provider': 0.6.2 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + optional: true + babel-plugin-polyfill-corejs2@0.4.11(@babel/core@7.24.5): dependencies: '@babel/compat-data': 7.24.4 @@ -33762,6 +34033,14 @@ snapshots: transitivePeerDependencies: - supports-color + babel-plugin-polyfill-corejs3@0.10.6: + dependencies: + '@babel/helper-define-polyfill-provider': 0.6.2 + core-js-compat: 3.38.1 + transitivePeerDependencies: + - supports-color + optional: true + babel-plugin-polyfill-corejs3@0.10.6(@babel/core@7.24.5): dependencies: '@babel/core': 7.24.5 @@ -33770,6 +34049,13 @@ snapshots: transitivePeerDependencies: - supports-color + babel-plugin-polyfill-regenerator@0.6.2: + dependencies: + '@babel/helper-define-polyfill-provider': 0.6.2 + transitivePeerDependencies: + - supports-color + optional: true + babel-plugin-polyfill-regenerator@0.6.2(@babel/core@7.24.5): dependencies: '@babel/core': 7.24.5 @@ -33777,6 +34063,13 @@ snapshots: transitivePeerDependencies: - supports-color + babel-plugin-transform-flow-enums@0.0.2: + dependencies: + '@babel/plugin-syntax-flow': 7.24.7(@babel/core@7.24.5) + transitivePeerDependencies: + - '@babel/core' + optional: true + babel-plugin-transform-flow-enums@0.0.2(@babel/core@7.24.5): dependencies: '@babel/plugin-syntax-flow': 7.24.7(@babel/core@7.24.5) @@ -34524,7 +34817,7 @@ snapshots: connect-session-sequelize@7.1.7(sequelize@6.37.3(pg@8.11.5)): dependencies: - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 sequelize: 6.37.3(pg@8.11.5) transitivePeerDependencies: - supports-color @@ -34811,6 +35104,10 @@ snapshots: dependencies: ms: 2.0.0 + debug@4.3.4: + dependencies: + ms: 2.1.2 + debug@4.3.4(supports-color@8.1.1): dependencies: ms: 2.1.2 @@ -36260,6 +36557,8 @@ snapshots: transitivePeerDependencies: - encoding + follow-redirects@1.15.6: {} + follow-redirects@1.15.6(debug@4.3.4): optionalDependencies: debug: 4.3.4(supports-color@8.1.1) @@ -36808,7 +37107,7 @@ snapshots: http-proxy@1.18.1: dependencies: eventemitter3: 4.0.7 - follow-redirects: 1.15.6(debug@4.3.4) + follow-redirects: 1.15.6 requires-port: 1.0.0 transitivePeerDependencies: - debug @@ -37421,7 +37720,7 @@ snapshots: jest-message-util@29.7.0: dependencies: - '@babel/code-frame': 7.24.2 + '@babel/code-frame': 7.24.7 '@jest/types': 29.6.3 '@types/stack-utils': 2.0.3 chalk: 4.1.2 @@ -37509,6 +37808,31 @@ snapshots: jsc-safe-url@0.2.4: {} + jscodeshift@0.14.0: + dependencies: + '@babel/core': 7.24.5 + '@babel/parser': 7.25.6 + '@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.24.5) + '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6(@babel/core@7.24.5) + '@babel/plugin-proposal-optional-chaining': 7.21.0(@babel/core@7.24.5) + '@babel/plugin-transform-modules-commonjs': 7.24.8(@babel/core@7.24.5) + '@babel/preset-flow': 7.24.7(@babel/core@7.24.5) + '@babel/preset-typescript': 7.24.7(@babel/core@7.24.5) + '@babel/register': 7.24.6(@babel/core@7.24.5) + babel-core: 7.0.0-bridge.0(@babel/core@7.24.5) + chalk: 4.1.2 + flow-parser: 0.245.0 + graceful-fs: 4.2.11 + micromatch: 4.0.5 + neo-async: 2.6.2 + node-dir: 0.1.17 + recast: 0.21.5 + temp: 0.8.4 + write-file-atomic: 2.4.3 + transitivePeerDependencies: + - supports-color + optional: true + jscodeshift@0.14.0(@babel/preset-env@7.25.4(@babel/core@7.24.5)): dependencies: '@babel/core': 7.24.5 @@ -38264,8 +38588,8 @@ snapshots: metro-source-map@0.80.10: dependencies: - '@babel/traverse': 7.24.5 - '@babel/types': 7.24.5 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 flow-enums-runtime: 0.0.6 invariant: 2.2.4 metro-symbolicate: 0.80.10 @@ -38291,9 +38615,9 @@ snapshots: metro-transform-plugins@0.80.10: dependencies: '@babel/core': 7.24.5 - '@babel/generator': 7.24.5 - '@babel/template': 7.24.0 - '@babel/traverse': 7.24.5 + '@babel/generator': 7.25.6 + '@babel/template': 7.25.0 + '@babel/traverse': 7.25.6 flow-enums-runtime: 0.0.6 nullthrows: 1.1.1 transitivePeerDependencies: @@ -38302,9 +38626,9 @@ snapshots: metro-transform-worker@0.80.10(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: '@babel/core': 7.24.5 - '@babel/generator': 7.24.5 - '@babel/parser': 7.24.5 - '@babel/types': 7.24.5 + '@babel/generator': 7.25.6 + '@babel/parser': 7.25.6 + '@babel/types': 7.25.6 flow-enums-runtime: 0.0.6 metro: 0.80.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) metro-babel-transformer: 0.80.10 @@ -38322,13 +38646,13 @@ snapshots: metro@0.80.10(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: - '@babel/code-frame': 7.24.2 + '@babel/code-frame': 7.24.7 '@babel/core': 7.24.5 - '@babel/generator': 7.24.5 - '@babel/parser': 7.24.5 - '@babel/template': 7.24.0 - '@babel/traverse': 7.24.5 - '@babel/types': 7.24.5 + '@babel/generator': 7.25.6 + '@babel/parser': 7.25.6 + '@babel/template': 7.25.0 + '@babel/traverse': 7.25.6 + '@babel/types': 7.25.6 accepts: 1.3.8 chalk: 4.1.2 ci-info: 2.0.0 @@ -40080,7 +40404,7 @@ snapshots: lodash.flow: 3.5.0 pure-color: 1.3.0 - react-beautiful-dnd@13.1.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1): + react-beautiful-dnd@13.1.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1): dependencies: '@babel/runtime': 7.24.5 css-box-model: 1.2.1 @@ -40088,7 +40412,7 @@ snapshots: raf-schd: 4.0.3 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - react-redux: 7.2.9(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + react-redux: 7.2.9(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) redux: 4.2.1 use-memo-one: 1.1.3(react@18.3.1) transitivePeerDependencies: @@ -40103,7 +40427,7 @@ snapshots: react-devtools-core@5.3.1(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: shell-quote: 1.8.1 - ws: 7.5.9(bufferutil@4.0.8)(utf-8-validate@5.0.10) + ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - utf-8-validate @@ -40261,19 +40585,19 @@ snapshots: - supports-color - utf-8-validate - react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10): + react-native@0.74.0(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10): dependencies: '@jest/create-cache-key-function': 29.7.0 '@react-native-community/cli': 13.6.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@react-native-community/cli-platform-android': 13.6.4 '@react-native-community/cli-platform-ios': 13.6.4 '@react-native/assets-registry': 0.74.81 - '@react-native/codegen': 0.74.81(@babel/preset-env@7.25.4(@babel/core@7.24.5)) - '@react-native/community-cli-plugin': 0.74.81(@babel/core@7.24.5)(@babel/preset-env@7.25.4(@babel/core@7.24.5))(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@react-native/codegen': 0.74.81 + '@react-native/community-cli-plugin': 0.74.81(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@react-native/gradle-plugin': 0.74.81 '@react-native/js-polyfills': 0.74.81 '@react-native/normalize-colors': 0.74.81 - '@react-native/virtualized-lists': 0.74.81(@types/react@18.3.1)(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + '@react-native/virtualized-lists': 0.74.81(@types/react@18.3.1)(react-native@0.74.0(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) abort-controller: 3.0.0 anser: 1.4.10 ansi-regex: 5.0.1 @@ -40336,7 +40660,7 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - react-redux@7.2.9(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1): + react-redux@7.2.9(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1): dependencies: '@babel/runtime': 7.24.5 '@types/react-redux': 7.1.33 @@ -40347,7 +40671,7 @@ snapshots: react-is: 17.0.2 optionalDependencies: react-dom: 18.3.1(react@18.3.1) - react-native: 0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) + react-native: 0.74.0(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) react-refresh@0.14.2: {} @@ -40932,7 +41256,7 @@ snapshots: dependencies: '@types/debug': 4.1.12 '@types/validator': 13.11.9 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 dottie: 2.0.6 inflection: 1.13.4 lodash: 4.17.21 @@ -41512,7 +41836,7 @@ snapshots: dependencies: component-emitter: 1.3.1 cookiejar: 2.1.4 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 fast-safe-stringify: 2.1.1 form-data: 3.0.1 formidable: 1.2.6 @@ -41690,7 +42014,7 @@ snapshots: terser@5.31.0: dependencies: '@jridgewell/source-map': 0.3.6 - acorn: 8.11.3 + acorn: 8.12.1 commander: 2.20.3 source-map-support: 0.5.21 From 08966c7e40da45a5c304416f19dfc204b06491b2 Mon Sep 17 00:00:00 2001 From: Timothee Legros Date: Wed, 11 Sep 2024 18:15:40 +0300 Subject: [PATCH 6/9] fix thread/comment creation/editing --- .../src/comment/UpdateComment.command.ts | 4 +-- .../commonwealth/scripts/decode-db-content.ts | 28 +------------------ .../server_threads_methods/update_thread.ts | 9 +++--- 3 files changed, 8 insertions(+), 33 deletions(-) diff --git a/libs/model/src/comment/UpdateComment.command.ts b/libs/model/src/comment/UpdateComment.command.ts index d7033940731..8b8ac69bee0 100644 --- a/libs/model/src/comment/UpdateComment.command.ts +++ b/libs/model/src/comment/UpdateComment.command.ts @@ -4,11 +4,11 @@ import { models } from '../database'; import { isAuthorized, type AuthContext } from '../middleware'; import { mustBeAuthorized } from '../middleware/guards'; import { + decodeContent, emitMentions, findMentionDiff, parseUserMentions, quillToPlain, - sanitizeQuillText, uniqueMentions, } from '../utils'; @@ -37,7 +37,7 @@ export function UpdateComment(): Command< }); if (currentVersion?.text !== payload.text) { - const text = sanitizeQuillText(payload.text); + const text = decodeContent(payload.text); const plaintext = quillToPlain(text); const mentions = findMentionDiff( parseUserMentions(currentVersion?.text), diff --git a/packages/commonwealth/scripts/decode-db-content.ts b/packages/commonwealth/scripts/decode-db-content.ts index 27a909155a4..1ff2145278f 100644 --- a/packages/commonwealth/scripts/decode-db-content.ts +++ b/packages/commonwealth/scripts/decode-db-content.ts @@ -1,37 +1,11 @@ import { dispose, logger } from '@hicommonwealth/core'; -import { models } from '@hicommonwealth/model'; -import { deltaToMarkdown } from 'quill-delta-to-markdown'; +import { decodeContent, models } from '@hicommonwealth/model'; import { Op, QueryTypes } from 'sequelize'; const log = logger(import.meta); const BATCH_SIZE = 10; const queryCase = 'WHEN id = ? THEN ? '; -function decodeContent(content: string) { - // decode if URI encoded - let decodedContent: string; - try { - decodedContent = decodeURIComponent(content); - } catch { - decodedContent = content; - } - - // convert to Markdown if Quill Delta format - let rawMarkdown: string; - try { - const delta = JSON.parse(decodedContent); - if ('ops' in delta) { - rawMarkdown = deltaToMarkdown(delta.ops); - } else { - rawMarkdown = delta; - } - } catch (e) { - rawMarkdown = decodedContent; - } - - return rawMarkdown.trim(); -} - async function decodeThreads(lastId: number = 0) { let lastThreadId = lastId; while (true) { diff --git a/packages/commonwealth/server/controllers/server_threads_methods/update_thread.ts b/packages/commonwealth/server/controllers/server_threads_methods/update_thread.ts index eca7e1144f8..89311c04760 100644 --- a/packages/commonwealth/server/controllers/server_threads_methods/update_thread.ts +++ b/packages/commonwealth/server/controllers/server_threads_methods/update_thread.ts @@ -7,6 +7,7 @@ import { ThreadAttributes, ThreadInstance, UserInstance, + decodeContent, emitMentions, findMentionDiff, parseUserMentions, @@ -246,7 +247,7 @@ export async function __updateThread( { thread_id: threadId!, address: address.address, - body, + body: decodeContent(body), timestamp: new Date(), }, { @@ -487,12 +488,12 @@ async function setThreadAttributes( if (thread.kind === 'discussion' && (!body || !body.trim())) { throw new AppError(Errors.NoBody); } - toUpdate.body = body; + toUpdate.body = decodeContent(body); toUpdate.plaintext = (() => { try { - return renderQuillDeltaToText(JSON.parse(decodeURIComponent(body))); + return renderQuillDeltaToText(JSON.parse(body)); } catch (e) { - return decodeURIComponent(body); + return body; } })(); } From e3be54cbbd6af55a54cfd428042e7ad803af3f16 Mon Sep 17 00:00:00 2001 From: Timothee Legros Date: Fri, 13 Sep 2024 15:25:15 +0300 Subject: [PATCH 7/9] fix lockfile --- pnpm-lock.yaml | 317 +++++++++++++++++++------------------------------ 1 file changed, 120 insertions(+), 197 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1a615fd7da8..762173857f8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -172,7 +172,7 @@ importers: version: 3.7.0(@swc/helpers@0.5.5)(vite@5.2.12(@types/node@20.12.10)(sass@1.77.0)(terser@5.31.0)) '@vitest/coverage-istanbul': specifier: ^1.6.0 - version: 1.6.0(vitest@1.6.0(@types/node@20.12.10)(jsdom@24.0.0(bufferutil@4.0.8)(utf-8-validate@6.0.3))(sass@1.77.0)(terser@5.31.0)) + version: 1.6.0(vitest@1.6.0(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.77.0)(terser@5.31.0)) chai: specifier: ^4.3.6 version: 4.4.1 @@ -310,7 +310,7 @@ importers: version: 4.3.2(typescript@5.4.5)(vite@5.2.12(@types/node@20.12.10)(sass@1.77.0)(terser@5.31.0)) vitest: specifier: ^1.6.0 - version: 1.6.0(@types/node@20.12.10)(jsdom@24.0.0(bufferutil@4.0.8)(utf-8-validate@6.0.3))(sass@1.77.0)(terser@5.31.0) + version: 1.6.0(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.77.0)(terser@5.31.0) wait-on: specifier: ^7.2.0 version: 7.2.0 @@ -504,7 +504,7 @@ importers: version: 6.11.4 web3: specifier: ^4.7.0 - version: 4.8.0(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10) + version: 4.8.0(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.6) web3-core: specifier: ^4.3.2 version: 4.3.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -550,7 +550,7 @@ importers: version: 16.4.5 ethers: specifier: 5.7.2 - version: 5.7.2(bufferutil@4.0.8)(utf-8-validate@6.0.3) + version: 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) lodash: specifier: ^4.17.21 version: 4.17.21 @@ -724,6 +724,9 @@ importers: pg: specifier: ^8.11.3 version: 8.11.5 + quill-delta-to-markdown: + specifier: ^0.6.0 + version: 0.6.0 sequelize: specifier: ^6.32.1 version: 6.37.3(pg@8.11.5) @@ -1032,10 +1035,10 @@ importers: version: 1.91.8(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@tanstack/react-query': specifier: ^4.29.7 - version: 4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@babel/preset-env@7.25.4(@babel/core@7.24.5))(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + version: 4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) '@tanstack/react-query-devtools': specifier: ^4.29.7 - version: 4.36.1(@tanstack/react-query@4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@babel/preset-env@7.25.4(@babel/core@7.24.5))(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 4.36.1(@tanstack/react-query@4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@tanstack/react-table': specifier: ^8.9.7 version: 8.16.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -1050,7 +1053,7 @@ importers: version: 10.45.2(@trpc/server@10.45.2) '@trpc/react-query': specifier: ^10.45.1 - version: 10.45.2(@tanstack/react-query@4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@babel/preset-env@7.25.4(@babel/core@7.24.5))(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1))(@trpc/client@10.45.2(@trpc/server@10.45.2))(@trpc/server@10.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 10.45.2(@tanstack/react-query@4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1))(@trpc/client@10.45.2(@trpc/server@10.45.2))(@trpc/server@10.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@types/react-helmet-async': specifier: ^1.0.3 version: 1.0.3(react@18.3.1) @@ -1281,7 +1284,7 @@ importers: version: 18.3.1 react-beautiful-dnd: specifier: ^13.1.1 - version: 13.1.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@babel/preset-env@7.25.4(@babel/core@7.24.5))(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + version: 13.1.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) react-device-detect: specifier: ^2.2.3 version: 2.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -20101,6 +20104,13 @@ packages: } engines: { node: '>=8' } + quill-delta-to-markdown@0.6.0: + resolution: + { + integrity: sha512-GwNMwSvXsH8G2o6EhvoTnIwEcN8RMbtklSjuyXYdPAXAhseMiQfehngcTwVZCz/3Fn4iu1CxlpLIKoBA9AjgdQ==, + } + engines: { node: '>=6.4.0' } + quill-delta@3.6.3: resolution: { @@ -24825,7 +24835,7 @@ snapshots: '@aws-sdk/client-sso-oidc': 3.577.0(@aws-sdk/client-sts@3.577.0) '@aws-sdk/client-sts': 3.577.0 '@aws-sdk/core': 3.576.0 - '@aws-sdk/credential-provider-node': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0))(@aws-sdk/client-sts@3.577.0) + '@aws-sdk/credential-provider-node': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0)(@aws-sdk/client-sts@3.577.0) '@aws-sdk/middleware-bucket-endpoint': 3.577.0 '@aws-sdk/middleware-expect-continue': 3.577.0 '@aws-sdk/middleware-flexible-checksums': 3.577.0 @@ -24886,7 +24896,7 @@ snapshots: '@aws-crypto/sha256-js': 3.0.0 '@aws-sdk/client-sts': 3.577.0 '@aws-sdk/core': 3.576.0 - '@aws-sdk/credential-provider-node': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0))(@aws-sdk/client-sts@3.577.0) + '@aws-sdk/credential-provider-node': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0)(@aws-sdk/client-sts@3.577.0) '@aws-sdk/middleware-host-header': 3.577.0 '@aws-sdk/middleware-logger': 3.577.0 '@aws-sdk/middleware-recursion-detection': 3.577.0 @@ -24975,7 +24985,7 @@ snapshots: '@aws-crypto/sha256-js': 3.0.0 '@aws-sdk/client-sso-oidc': 3.577.0(@aws-sdk/client-sts@3.577.0) '@aws-sdk/core': 3.576.0 - '@aws-sdk/credential-provider-node': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0))(@aws-sdk/client-sts@3.577.0) + '@aws-sdk/credential-provider-node': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0)(@aws-sdk/client-sts@3.577.0) '@aws-sdk/middleware-host-header': 3.577.0 '@aws-sdk/middleware-logger': 3.577.0 '@aws-sdk/middleware-recursion-detection': 3.577.0 @@ -25043,12 +25053,12 @@ snapshots: '@smithy/util-stream': 3.0.1 tslib: 2.6.2 - '@aws-sdk/credential-provider-ini@3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0))(@aws-sdk/client-sts@3.577.0)': + '@aws-sdk/credential-provider-ini@3.577.0(@aws-sdk/client-sso-oidc@3.577.0)(@aws-sdk/client-sts@3.577.0)': dependencies: '@aws-sdk/client-sts': 3.577.0 '@aws-sdk/credential-provider-env': 3.577.0 '@aws-sdk/credential-provider-process': 3.577.0 - '@aws-sdk/credential-provider-sso': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0)) + '@aws-sdk/credential-provider-sso': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0) '@aws-sdk/credential-provider-web-identity': 3.577.0(@aws-sdk/client-sts@3.577.0) '@aws-sdk/types': 3.577.0 '@smithy/credential-provider-imds': 3.0.0 @@ -25060,13 +25070,13 @@ snapshots: - '@aws-sdk/client-sso-oidc' - aws-crt - '@aws-sdk/credential-provider-node@3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0))(@aws-sdk/client-sts@3.577.0)': + '@aws-sdk/credential-provider-node@3.577.0(@aws-sdk/client-sso-oidc@3.577.0)(@aws-sdk/client-sts@3.577.0)': dependencies: '@aws-sdk/credential-provider-env': 3.577.0 '@aws-sdk/credential-provider-http': 3.577.0 - '@aws-sdk/credential-provider-ini': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0))(@aws-sdk/client-sts@3.577.0) + '@aws-sdk/credential-provider-ini': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0)(@aws-sdk/client-sts@3.577.0) '@aws-sdk/credential-provider-process': 3.577.0 - '@aws-sdk/credential-provider-sso': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0)) + '@aws-sdk/credential-provider-sso': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0) '@aws-sdk/credential-provider-web-identity': 3.577.0(@aws-sdk/client-sts@3.577.0) '@aws-sdk/types': 3.577.0 '@smithy/credential-provider-imds': 3.0.0 @@ -25087,10 +25097,10 @@ snapshots: '@smithy/types': 3.0.0 tslib: 2.6.2 - '@aws-sdk/credential-provider-sso@3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0))': + '@aws-sdk/credential-provider-sso@3.577.0(@aws-sdk/client-sso-oidc@3.577.0)': dependencies: '@aws-sdk/client-sso': 3.577.0 - '@aws-sdk/token-providers': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0)) + '@aws-sdk/token-providers': 3.577.0(@aws-sdk/client-sso-oidc@3.577.0) '@aws-sdk/types': 3.577.0 '@smithy/property-provider': 3.0.0 '@smithy/shared-ini-file-loader': 3.0.0 @@ -25238,7 +25248,7 @@ snapshots: '@smithy/types': 3.0.0 tslib: 2.6.2 - '@aws-sdk/token-providers@3.577.0(@aws-sdk/client-sso-oidc@3.577.0(@aws-sdk/client-sts@3.577.0))': + '@aws-sdk/token-providers@3.577.0(@aws-sdk/client-sso-oidc@3.577.0)': dependencies: '@aws-sdk/client-sso-oidc': 3.577.0(@aws-sdk/client-sts@3.577.0) '@aws-sdk/types': 3.577.0 @@ -27325,32 +27335,6 @@ snapshots: - bufferutil - utf-8-validate - '@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@6.0.3)': - dependencies: - '@ethersproject/abstract-provider': 5.7.0 - '@ethersproject/abstract-signer': 5.7.0 - '@ethersproject/address': 5.7.0 - '@ethersproject/base64': 5.7.0 - '@ethersproject/basex': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/constants': 5.7.0 - '@ethersproject/hash': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/networks': 5.7.1 - '@ethersproject/properties': 5.7.0 - '@ethersproject/random': 5.7.0 - '@ethersproject/rlp': 5.7.0 - '@ethersproject/sha2': 5.7.0 - '@ethersproject/strings': 5.7.0 - '@ethersproject/transactions': 5.7.0 - '@ethersproject/web': 5.7.1 - bech32: 1.1.4 - ws: 7.4.6(bufferutil@4.0.8)(utf-8-validate@6.0.3) - transitivePeerDependencies: - - bufferutil - - utf-8-validate - '@ethersproject/random@5.7.0': dependencies: '@ethersproject/bytes': 5.7.0 @@ -30417,6 +30401,16 @@ snapshots: optionalDependencies: '@types/react': 18.3.1 + '@react-native/virtualized-lists@0.74.81(@types/react@18.3.1)(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)': + dependencies: + invariant: 2.2.4 + nullthrows: 1.1.1 + react: 18.3.1 + react-native: 0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) + optionalDependencies: + '@types/react': 18.3.1 + optional: true + '@redis/bloom@1.0.2(@redis/client@1.2.0)': dependencies: '@redis/client': 1.2.0 @@ -31429,10 +31423,10 @@ snapshots: - '@types/react' - react-dom - '@tanstack/react-query-devtools@4.36.1(@tanstack/react-query@4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@babel/preset-env@7.25.4(@babel/core@7.24.5))(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@tanstack/react-query-devtools@4.36.1(@tanstack/react-query@4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@tanstack/match-sorter-utils': 8.15.1 - '@tanstack/react-query': 4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@babel/preset-env@7.25.4(@babel/core@7.24.5))(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + '@tanstack/react-query': 4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) superjson: 1.13.3 @@ -31447,6 +31441,15 @@ snapshots: react-dom: 18.3.1(react@18.3.1) react-native: 0.74.0(@babel/core@7.24.5)(@babel/preset-env@7.25.4(@babel/core@7.24.5))(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) + '@tanstack/react-query@4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1)': + dependencies: + '@tanstack/query-core': 4.36.1 + react: 18.3.1 + use-sync-external-store: 1.2.2(react@18.3.1) + optionalDependencies: + react-dom: 18.3.1(react@18.3.1) + react-native: 0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) + '@tanstack/react-store@0.3.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@tanstack/store': 0.3.1 @@ -31553,9 +31556,9 @@ snapshots: dependencies: '@trpc/server': 10.45.2 - '@trpc/react-query@10.45.2(@tanstack/react-query@4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@babel/preset-env@7.25.4(@babel/core@7.24.5))(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1))(@trpc/client@10.45.2(@trpc/server@10.45.2))(@trpc/server@10.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@trpc/react-query@10.45.2(@tanstack/react-query@4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1))(@trpc/client@10.45.2(@trpc/server@10.45.2))(@trpc/server@10.45.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: - '@tanstack/react-query': 4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@babel/preset-env@7.25.4(@babel/core@7.24.5))(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + '@tanstack/react-query': 4.36.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) '@trpc/client': 10.45.2(@trpc/server@10.45.2) '@trpc/server': 10.45.2 react: 18.3.1 @@ -32234,7 +32237,7 @@ snapshots: transitivePeerDependencies: - '@swc/helpers' - '@vitest/coverage-istanbul@1.6.0(vitest@1.6.0(@types/node@20.12.10)(jsdom@24.0.0(bufferutil@4.0.8)(utf-8-validate@6.0.3))(sass@1.77.0)(terser@5.31.0))': + '@vitest/coverage-istanbul@1.6.0(vitest@1.6.0(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.77.0)(terser@5.31.0))': dependencies: debug: 4.3.4(supports-color@8.1.1) istanbul-lib-coverage: 3.2.2 @@ -32245,7 +32248,7 @@ snapshots: magicast: 0.3.4 picocolors: 1.0.0 test-exclude: 6.0.0 - vitest: 1.6.0(@types/node@20.12.10)(jsdom@24.0.0(bufferutil@4.0.8)(utf-8-validate@6.0.3))(sass@1.77.0)(terser@5.31.0) + vitest: 1.6.0(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.77.0)(terser@5.31.0) transitivePeerDependencies: - supports-color @@ -35672,42 +35675,6 @@ snapshots: - bufferutil - utf-8-validate - ethers@5.7.2(bufferutil@4.0.8)(utf-8-validate@6.0.3): - dependencies: - '@ethersproject/abi': 5.7.0 - '@ethersproject/abstract-provider': 5.7.0 - '@ethersproject/abstract-signer': 5.7.0 - '@ethersproject/address': 5.7.0 - '@ethersproject/base64': 5.7.0 - '@ethersproject/basex': 5.7.0 - '@ethersproject/bignumber': 5.7.0 - '@ethersproject/bytes': 5.7.0 - '@ethersproject/constants': 5.7.0 - '@ethersproject/contracts': 5.7.0 - '@ethersproject/hash': 5.7.0 - '@ethersproject/hdnode': 5.7.0 - '@ethersproject/json-wallets': 5.7.0 - '@ethersproject/keccak256': 5.7.0 - '@ethersproject/logger': 5.7.0 - '@ethersproject/networks': 5.7.1 - '@ethersproject/pbkdf2': 5.7.0 - '@ethersproject/properties': 5.7.0 - '@ethersproject/providers': 5.7.2(bufferutil@4.0.8)(utf-8-validate@6.0.3) - '@ethersproject/random': 5.7.0 - '@ethersproject/rlp': 5.7.0 - '@ethersproject/sha2': 5.7.0 - '@ethersproject/signing-key': 5.7.0 - '@ethersproject/solidity': 5.7.0 - '@ethersproject/strings': 5.7.0 - '@ethersproject/transactions': 5.7.0 - '@ethersproject/units': 5.7.0 - '@ethersproject/wallet': 5.7.0 - '@ethersproject/web': 5.7.1 - '@ethersproject/wordlists': 5.7.0 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - ethers@6.12.1(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: '@adraffy/ens-normalize': 1.10.1 @@ -37405,7 +37372,7 @@ snapshots: dependencies: jsdom: 24.0.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - jsdom@24.0.0(bufferutil@4.0.8)(utf-8-validate@5.0.10): + jsdom@24.0.0: dependencies: cssstyle: 4.0.1 data-urls: 5.0.0 @@ -37426,14 +37393,15 @@ snapshots: whatwg-encoding: 3.1.1 whatwg-mimetype: 4.0.0 whatwg-url: 14.0.0 - ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.3) xml-name-validator: 5.0.0 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate + optional: true - jsdom@24.0.0(bufferutil@4.0.8)(utf-8-validate@6.0.3): + jsdom@24.0.0(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: cssstyle: 4.0.1 data-urls: 5.0.0 @@ -37454,13 +37422,12 @@ snapshots: whatwg-encoding: 3.1.1 whatwg-mimetype: 4.0.0 whatwg-url: 14.0.0 - ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.3) + ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) xml-name-validator: 5.0.0 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - optional: true jsesc@0.5.0: {} @@ -39846,6 +39813,10 @@ snapshots: quick-lru@4.0.1: {} + quill-delta-to-markdown@0.6.0: + dependencies: + lodash: 4.17.21 + quill-delta@3.6.3: dependencies: deep-equal: 1.1.2 @@ -39939,7 +39910,7 @@ snapshots: lodash.flow: 3.5.0 pure-color: 1.3.0 - react-beautiful-dnd@13.1.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@babel/preset-env@7.25.4(@babel/core@7.24.5))(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1): + react-beautiful-dnd@13.1.1(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1): dependencies: '@babel/runtime': 7.24.5 css-box-model: 1.2.1 @@ -39947,7 +39918,7 @@ snapshots: raf-schd: 4.0.3 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - react-redux: 7.2.9(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@babel/preset-env@7.25.4(@babel/core@7.24.5))(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + react-redux: 7.2.9(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) redux: 4.2.1 use-memo-one: 1.1.3(react@18.3.1) transitivePeerDependencies: @@ -40120,6 +40091,57 @@ snapshots: - supports-color - utf-8-validate + react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10): + dependencies: + '@jest/create-cache-key-function': 29.7.0 + '@react-native-community/cli': 13.6.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@react-native-community/cli-platform-android': 13.6.4 + '@react-native-community/cli-platform-ios': 13.6.4 + '@react-native/assets-registry': 0.74.81 + '@react-native/codegen': 0.74.81(@babel/preset-env@7.25.4(@babel/core@7.24.5)) + '@react-native/community-cli-plugin': 0.74.81(@babel/core@7.24.5)(@babel/preset-env@7.25.4(@babel/core@7.24.5))(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@react-native/gradle-plugin': 0.74.81 + '@react-native/js-polyfills': 0.74.81 + '@react-native/normalize-colors': 0.74.81 + '@react-native/virtualized-lists': 0.74.81(@types/react@18.3.1)(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1) + abort-controller: 3.0.0 + anser: 1.4.10 + ansi-regex: 5.0.1 + base64-js: 1.5.1 + chalk: 4.1.2 + event-target-shim: 5.0.1 + flow-enums-runtime: 0.0.6 + invariant: 2.2.4 + jest-environment-node: 29.7.0 + jsc-android: 250231.0.0 + memoize-one: 5.2.1 + metro-runtime: 0.80.10 + metro-source-map: 0.80.10 + mkdirp: 0.5.6 + nullthrows: 1.1.1 + pretty-format: 26.6.2 + promise: 8.3.0 + react: 18.3.1 + react-devtools-core: 5.3.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + react-refresh: 0.14.2 + react-shallow-renderer: 16.15.0(react@18.3.1) + regenerator-runtime: 0.13.11 + scheduler: 0.24.0-canary-efb381bbf-20230505 + stacktrace-parser: 0.1.10 + whatwg-fetch: 3.6.20 + ws: 6.2.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + yargs: 17.7.2 + optionalDependencies: + '@types/react': 18.3.1 + transitivePeerDependencies: + - '@babel/core' + - '@babel/preset-env' + - bufferutil + - encoding + - supports-color + - utf-8-validate + optional: true + react-popper-tooltip@4.4.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@babel/runtime': 7.24.5 @@ -40144,7 +40166,7 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - react-redux@7.2.9(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@babel/preset-env@7.25.4(@babel/core@7.24.5))(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1): + react-redux@7.2.9(react-dom@18.3.1(react@18.3.1))(react-native@0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10))(react@18.3.1): dependencies: '@babel/runtime': 7.24.5 '@types/react-redux': 7.1.33 @@ -40155,7 +40177,7 @@ snapshots: react-is: 17.0.2 optionalDependencies: react-dom: 18.3.1(react@18.3.1) - react-native: 0.74.0(@babel/core@7.24.5)(@babel/preset-env@7.25.4(@babel/core@7.24.5))(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) + react-native: 0.74.0(@babel/core@7.24.5)(@types/react@18.3.1)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) react-refresh@0.14.2: {} @@ -42282,7 +42304,7 @@ snapshots: sass: 1.77.0 terser: 5.31.0 - vitest@1.6.0(@types/node@20.12.10)(jsdom@24.0.0(bufferutil@4.0.8)(utf-8-validate@6.0.3))(sass@1.77.0)(terser@5.31.0): + vitest@1.6.0(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.77.0)(terser@5.31.0): dependencies: '@vitest/expect': 1.6.0 '@vitest/runner': 1.6.0 @@ -42306,7 +42328,7 @@ snapshots: why-is-node-running: 2.2.2 optionalDependencies: '@types/node': 20.12.10 - jsdom: 24.0.0(bufferutil@4.0.8)(utf-8-validate@6.0.3) + jsdom: 24.0.0 transitivePeerDependencies: - less - lightningcss @@ -42497,22 +42519,6 @@ snapshots: web3-utils: 4.2.3 web3-validator: 2.0.5 - web3-eth-contract@4.4.0(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10): - dependencies: - web3-core: 4.3.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - web3-errors: 1.1.4 - web3-eth: 4.6.0(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10) - web3-eth-abi: 4.2.1(typescript@5.4.5)(zod@3.23.6) - web3-types: 1.6.0 - web3-utils: 4.2.3 - web3-validator: 2.0.5 - transitivePeerDependencies: - - bufferutil - - encoding - - typescript - - utf-8-validate - - zod - web3-eth-contract@4.4.0(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.6): dependencies: web3-core: 4.3.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -42545,24 +42551,6 @@ snapshots: - utf-8-validate - zod - web3-eth-ens@4.2.0(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10): - dependencies: - '@adraffy/ens-normalize': 1.10.1 - web3-core: 4.3.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - web3-errors: 1.1.4 - web3-eth: 4.6.0(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10) - web3-eth-contract: 4.4.0(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10) - web3-net: 4.0.7(bufferutil@4.0.8)(utf-8-validate@5.0.10) - web3-types: 1.6.0 - web3-utils: 4.2.3 - web3-validator: 2.0.5 - transitivePeerDependencies: - - bufferutil - - encoding - - typescript - - utf-8-validate - - zod - web3-eth-ens@4.2.0(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.6): dependencies: '@adraffy/ens-normalize': 1.10.1 @@ -42611,21 +42599,6 @@ snapshots: web3-utils: 4.2.3 web3-validator: 2.0.5 - web3-eth-personal@4.0.8(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10): - dependencies: - web3-core: 4.3.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - web3-eth: 4.6.0(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10) - web3-rpc-methods: 1.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - web3-types: 1.6.0 - web3-utils: 4.2.3 - web3-validator: 2.0.5 - transitivePeerDependencies: - - bufferutil - - encoding - - typescript - - utf-8-validate - - zod - web3-eth-personal@4.0.8(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.6): dependencies: web3-core: 4.3.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -42656,26 +42629,6 @@ snapshots: - utf-8-validate - zod - web3-eth@4.6.0(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10): - dependencies: - setimmediate: 1.0.5 - web3-core: 4.3.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - web3-errors: 1.1.4 - web3-eth-abi: 4.2.1(typescript@5.4.5)(zod@3.23.6) - web3-eth-accounts: 4.1.2 - web3-net: 4.0.7(bufferutil@4.0.8)(utf-8-validate@5.0.10) - web3-providers-ws: 4.0.7(bufferutil@4.0.8)(utf-8-validate@5.0.10) - web3-rpc-methods: 1.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - web3-types: 1.6.0 - web3-utils: 4.2.3 - web3-validator: 2.0.5 - transitivePeerDependencies: - - bufferutil - - encoding - - typescript - - utf-8-validate - - zod - web3-eth@4.6.0(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.6): dependencies: setimmediate: 1.0.5 @@ -42844,31 +42797,6 @@ snapshots: web3-types: 1.6.0 zod: 3.23.6 - web3@4.8.0(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10): - dependencies: - web3-core: 4.3.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) - web3-errors: 1.1.4 - web3-eth: 4.6.0(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10) - web3-eth-abi: 4.2.1(typescript@5.4.5)(zod@3.23.6) - web3-eth-accounts: 4.1.2 - web3-eth-contract: 4.4.0(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10) - web3-eth-ens: 4.2.0(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10) - web3-eth-iban: 4.0.7 - web3-eth-personal: 4.0.8(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10) - web3-net: 4.0.7(bufferutil@4.0.8)(utf-8-validate@5.0.10) - web3-providers-http: 4.1.0 - web3-providers-ws: 4.0.7(bufferutil@4.0.8)(utf-8-validate@5.0.10) - web3-rpc-methods: 1.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) - web3-types: 1.6.0 - web3-utils: 4.2.3 - web3-validator: 2.0.5 - transitivePeerDependencies: - - bufferutil - - encoding - - typescript - - utf-8-validate - - zod - web3@4.8.0(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.6): dependencies: web3-core: 4.3.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -43092,11 +43020,6 @@ snapshots: bufferutil: 4.0.8 utf-8-validate: 5.0.10 - ws@7.4.6(bufferutil@4.0.8)(utf-8-validate@6.0.3): - optionalDependencies: - bufferutil: 4.0.8 - utf-8-validate: 6.0.3 - ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10): optionalDependencies: bufferutil: 4.0.8 From 301f106f6d6bc695ad47eef197de7cdfcdae2b75 Mon Sep 17 00:00:00 2001 From: Timothee Legros Date: Mon, 16 Sep 2024 12:34:08 +0300 Subject: [PATCH 8/9] remove comment --- .../client/scripts/state/api/comments/editComment.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/commonwealth/client/scripts/state/api/comments/editComment.ts b/packages/commonwealth/client/scripts/state/api/comments/editComment.ts index f8c8c8613a8..f126911fa38 100644 --- a/packages/commonwealth/client/scripts/state/api/comments/editComment.ts +++ b/packages/commonwealth/client/scripts/state/api/comments/editComment.ts @@ -65,8 +65,6 @@ const useEditCommentMutation = ({ onSuccess: async (updatedComment) => { // @ts-expect-error StrictNullChecks const comment = new Comment(updatedComment); - console.log({ comment, updatedComment }); - // update fetch comments query state with updated comment const key = [ApiEndpoints.FETCH_COMMENTS, communityId, threadId]; queryClient.cancelQueries({ queryKey: key }); From a5653e718377072fc6c46c492b62be59297203f2 Mon Sep 17 00:00:00 2001 From: Timothee Legros Date: Mon, 16 Sep 2024 12:34:46 +0300 Subject: [PATCH 9/9] lockfile resolution --- pnpm-lock.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 256b499ea9d..1dccd7e961d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -724,6 +724,9 @@ importers: pg: specifier: ^8.11.3 version: 8.11.5 + quill-delta-to-markdown: + specifier: ^0.6.0 + version: 0.6.0 sequelize: specifier: ^6.32.1 version: 6.37.3(pg@8.11.5) @@ -20138,6 +20141,13 @@ packages: } engines: { node: '>=8' } + quill-delta-to-markdown@0.6.0: + resolution: + { + integrity: sha512-GwNMwSvXsH8G2o6EhvoTnIwEcN8RMbtklSjuyXYdPAXAhseMiQfehngcTwVZCz/3Fn4iu1CxlpLIKoBA9AjgdQ==, + } + engines: { node: '>=6.4.0' } + quill-delta@3.6.3: resolution: { @@ -39881,6 +39891,10 @@ snapshots: quick-lru@4.0.1: {} + quill-delta-to-markdown@0.6.0: + dependencies: + lodash: 4.17.21 + quill-delta@3.6.3: dependencies: deep-equal: 1.1.2