From 51f76700b2aa72a3e8e0250d431627064310f0aa Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Fri, 10 Feb 2023 15:06:02 +0100 Subject: [PATCH] :package: Update cuid to cuid2 --- apps/builder/package.json | 2 +- apps/builder/src/components/TableList.tsx | 4 +- .../src/components/VariableSearchInput.tsx | 4 +- .../src/features/analytics/analytics.spec.ts | 4 +- .../src/features/billing/billing.spec.ts | 10 +-- .../blocks/bubbles/audio/audio.spec.ts | 4 +- .../blocks/bubbles/embed/embed.spec.ts | 6 +- .../blocks/bubbles/image/image.spec.ts | 10 +-- .../bubbles/textBubble/textBubble.spec.ts | 4 +- .../blocks/bubbles/video/video.spec.ts | 10 +-- .../blocks/inputs/buttons/buttons.spec.ts | 6 +- .../features/blocks/inputs/date/date.spec.ts | 4 +- .../inputs/emailInput/emailInput.spec.ts | 4 +- .../inputs/fileUpload/fileUpload.spec.ts | 6 +- .../blocks/inputs/number/number.spec.ts | 4 +- .../blocks/inputs/payment/payment.spec.ts | 4 +- .../blocks/inputs/phone/phone.spec.ts | 4 +- .../blocks/inputs/rating/rating.spec.ts | 4 +- .../blocks/inputs/textInput/textInput.spec.ts | 4 +- .../features/blocks/inputs/url/url.spec.ts | 4 +- .../integrations/chatwoot/chatwoot.spec.ts | 4 +- .../googleAnalytics/googleAnalytics.spec.ts | 4 +- .../googleSheets/googleSheets.spec.ts | 8 +-- .../sendEmail/queries/sendEmail.spec.ts | 4 +- .../integrations/webhook/webhook.spec.ts | 6 +- .../components/ConditionItemNode.tsx | 4 +- .../blocks/logic/condition/condition.spec.ts | 4 +- .../blocks/logic/redirect/redirect.spec.ts | 4 +- .../blocks/logic/script/script.spec.ts | 4 +- .../logic/setVariable/setVariable.spec.ts | 4 +- .../logic/typebotLink/typebotLink.spec.ts | 6 +- .../features/blocks/logic/wait/wait.spec.ts | 4 +- .../collaboration/collaboration.spec.ts | 14 ++-- .../customDomains/customDomains.spec.ts | 6 +- .../features/dashboard/api/parseNewTypebot.ts | 6 +- .../src/features/dashboard/dashboard.spec.ts | 4 +- .../dashboard/queries/importTypebotQuery.ts | 6 +- .../src/features/editor/editor.spec.ts | 14 ++-- .../TypebotProvider/actions/blocks.ts | 6 +- .../TypebotProvider/actions/edges.ts | 4 +- .../TypebotProvider/actions/groups.ts | 4 +- .../TypebotProvider/actions/items.ts | 8 +-- .../src/features/graph/components/Graph.tsx | 4 +- apps/builder/src/features/graph/utils.ts | 10 +-- .../src/features/publish/publish.spec.ts | 6 +- apps/builder/src/features/publish/utils.ts | 4 +- .../src/features/results/results.spec.ts | 4 +- .../src/features/settings/settings.spec.ts | 10 +-- apps/builder/src/features/theme/theme.spec.ts | 6 +- .../src/features/workspace/workspaces.spec.ts | 6 +- apps/builder/src/pages/api/auth/adapter.ts | 4 +- apps/viewer/package.json | 2 +- .../inputs/fileUpload/fileUpload.spec.ts | 8 +-- .../inputs/fileUpload/fileUploadV2.spec.ts | 8 +-- .../integrations/chatwoot/chatwoot.spec.ts | 4 +- .../integrations/chatwoot/chatwootV2.spec.ts | 4 +- .../integrations/sendEmail/sendEmail.spec.ts | 4 +- .../sendEmail/sendEmailV2.spec.ts | 4 +- .../integrations/webhook/webhook.spec.ts | 4 +- .../integrations/webhook/webhookV2.spec.ts | 4 +- apps/viewer/src/features/chat/chat.spec.ts | 6 +- .../src/features/results/results.spec.ts | 6 +- .../src/features/results/resultsV2.spec.ts | 4 +- .../src/features/settings/settings.spec.ts | 12 ++-- .../src/features/settings/settingsV2.spec.ts | 12 ++-- apps/viewer/src/features/usage/usage.spec.ts | 14 ++-- .../viewer/src/features/usage/usageV2.spec.ts | 14 ++-- .../src/features/variables/variables.spec.ts | 4 +- .../features/variables/variablesV2.spec.ts | 4 +- package.json | 2 +- packages/bot-engine/tsup.config.js | 2 +- .../integrations/googleSheets/schemas.ts | 10 +-- packages/models/package.json | 2 +- packages/utils/package.json | 2 +- packages/utils/playwright/databaseActions.ts | 8 +-- packages/utils/playwright/databaseHelpers.ts | 4 +- pnpm-lock.yaml | 72 ++++++++++--------- 77 files changed, 254 insertions(+), 250 deletions(-) diff --git a/apps/builder/package.json b/apps/builder/package.json index bd63f19373..dd5b3218c5 100644 --- a/apps/builder/package.json +++ b/apps/builder/package.json @@ -57,7 +57,7 @@ "canvas-confetti": "1.6.0", "chakra-react-select": "^4.4.3", "codemirror": "6.0.1", - "cuid": "3.0.0", + "@paralleldrive/cuid2": "2.0.1", "deep-object-diff": "1.1.9", "dequal": "2.0.3", "emails": "workspace:*", diff --git a/apps/builder/src/components/TableList.tsx b/apps/builder/src/components/TableList.tsx index 8f4c2ab8c1..0d7c807d76 100644 --- a/apps/builder/src/components/TableList.tsx +++ b/apps/builder/src/components/TableList.tsx @@ -1,6 +1,6 @@ import { Box, Button, Fade, Flex, IconButton, Stack } from '@chakra-ui/react' import { TrashIcon, PlusIcon } from '@/components/icons' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import React, { useState } from 'react' type ItemWithId = T & { id: string } @@ -32,7 +32,7 @@ export const TableList = ({ const [showDeleteIndex, setShowDeleteIndex] = useState(null) const createItem = () => { - const id = cuid() + const id = createId() const newItem = { id } as ItemWithId setItems([...items, newItem]) onItemsChange([...items, newItem]) diff --git a/apps/builder/src/components/VariableSearchInput.tsx b/apps/builder/src/components/VariableSearchInput.tsx index 6b8380d1f5..a5d1826ec8 100644 --- a/apps/builder/src/components/VariableSearchInput.tsx +++ b/apps/builder/src/components/VariableSearchInput.tsx @@ -15,7 +15,7 @@ import { } from '@chakra-ui/react' import { EditIcon, PlusIcon, TrashIcon } from '@/components/icons' import { useTypebot } from '@/features/editor/providers/TypebotProvider/TypebotProvider' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { Variable } from 'models' import React, { useState, useRef, ChangeEvent, useEffect } from 'react' import { byId, isDefined, isNotDefined } from 'utils' @@ -90,7 +90,7 @@ export const VariableSearchInput = ({ const handleCreateNewVariableClick = () => { if (!inputValue || inputValue === '') return - const id = 'v' + cuid() + const id = 'v' + createId() onSelectVariable({ id, name: inputValue }) createVariable({ id, name: inputValue }) inputRef.current?.blur() diff --git a/apps/builder/src/features/analytics/analytics.spec.ts b/apps/builder/src/features/analytics/analytics.spec.ts index 5a6414433e..bd3456dfad 100644 --- a/apps/builder/src/features/analytics/analytics.spec.ts +++ b/apps/builder/src/features/analytics/analytics.spec.ts @@ -1,6 +1,6 @@ import { getTestAsset } from '@/test/utils/playwright' import test, { expect } from '@playwright/test' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { importTypebotInDatabase, injectFakeResults, @@ -8,7 +8,7 @@ import { import { starterWorkspaceId } from 'utils/playwright/databaseSetup' test('analytics are not available for non-pro workspaces', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await importTypebotInDatabase( getTestAsset('typebots/results/submissionHeader.json'), { diff --git a/apps/builder/src/features/billing/billing.spec.ts b/apps/builder/src/features/billing/billing.spec.ts index 5a6c8ae092..d0b92f2394 100644 --- a/apps/builder/src/features/billing/billing.spec.ts +++ b/apps/builder/src/features/billing/billing.spec.ts @@ -3,7 +3,7 @@ import { createClaimableCustomPlan, } from '@/test/utils/databaseActions' import test, { expect } from '@playwright/test' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { Plan } from 'db' import { createTypebots, @@ -12,10 +12,10 @@ import { injectFakeResults, } from 'utils/playwright/databaseActions' -const usageWorkspaceId = cuid() -const usageTypebotId = cuid() -const planChangeWorkspaceId = cuid() -const enterpriseWorkspaceId = cuid() +const usageWorkspaceId = createId() +const usageTypebotId = createId() +const planChangeWorkspaceId = createId() +const enterpriseWorkspaceId = createId() test.beforeAll(async () => { await createWorkspaces([ diff --git a/apps/builder/src/features/blocks/bubbles/audio/audio.spec.ts b/apps/builder/src/features/blocks/bubbles/audio/audio.spec.ts index 2ab0c646f8..840ed19ce4 100644 --- a/apps/builder/src/features/blocks/bubbles/audio/audio.spec.ts +++ b/apps/builder/src/features/blocks/bubbles/audio/audio.spec.ts @@ -2,7 +2,7 @@ import test, { expect } from '@playwright/test' import { createTypebots } from 'utils/playwright/databaseActions' import { parseDefaultGroupWithBlock } from 'utils/playwright/databaseHelpers' import { BubbleBlockType, defaultAudioBubbleContent } from 'models' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { getTestAsset } from '@/test/utils/playwright' import { typebotViewer } from 'utils/playwright/testHelpers' @@ -10,7 +10,7 @@ const audioSampleUrl = 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3' test('should work as expected', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, diff --git a/apps/builder/src/features/blocks/bubbles/embed/embed.spec.ts b/apps/builder/src/features/blocks/bubbles/embed/embed.spec.ts index 46a9cf3b53..580a7225cf 100644 --- a/apps/builder/src/features/blocks/bubbles/embed/embed.spec.ts +++ b/apps/builder/src/features/blocks/bubbles/embed/embed.spec.ts @@ -1,6 +1,6 @@ import test, { expect } from '@playwright/test' import { BubbleBlockType, defaultEmbedBubbleContent } from 'models' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { createTypebots } from 'utils/playwright/databaseActions' import { parseDefaultGroupWithBlock } from 'utils/playwright/databaseHelpers' import { typebotViewer } from 'utils/playwright/testHelpers' @@ -11,7 +11,7 @@ const siteSrc = 'https://app.cal.com/baptistearno/15min' test.describe.parallel('Embed bubble block', () => { test.describe('Content settings', () => { test('should import and parse embed correctly', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, @@ -31,7 +31,7 @@ test.describe.parallel('Embed bubble block', () => { test.describe('Preview', () => { test('should display embed correctly', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, diff --git a/apps/builder/src/features/blocks/bubbles/image/image.spec.ts b/apps/builder/src/features/blocks/bubbles/image/image.spec.ts index a2b18ef1c5..119fd089b0 100644 --- a/apps/builder/src/features/blocks/bubbles/image/image.spec.ts +++ b/apps/builder/src/features/blocks/bubbles/image/image.spec.ts @@ -2,7 +2,7 @@ import test, { expect } from '@playwright/test' import { createTypebots } from 'utils/playwright/databaseActions' import { parseDefaultGroupWithBlock } from 'utils/playwright/databaseHelpers' import { BubbleBlockType, defaultImageBubbleContent } from 'models' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { typebotViewer } from 'utils/playwright/testHelpers' import { getTestAsset } from '@/test/utils/playwright' @@ -12,7 +12,7 @@ const unsplashImageSrc = test.describe.parallel('Image bubble block', () => { test.describe('Content settings', () => { test('should upload image file correctly', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, @@ -34,7 +34,7 @@ test.describe.parallel('Image bubble block', () => { }) test('should import image link correctly', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, @@ -57,7 +57,7 @@ test.describe.parallel('Image bubble block', () => { }) test('should import gifs correctly', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, @@ -102,7 +102,7 @@ test.describe.parallel('Image bubble block', () => { test.describe('Preview', () => { test('should display correctly', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, diff --git a/apps/builder/src/features/blocks/bubbles/textBubble/textBubble.spec.ts b/apps/builder/src/features/blocks/bubbles/textBubble/textBubble.spec.ts index f2c6fbb96b..2db4ba0aa7 100644 --- a/apps/builder/src/features/blocks/bubbles/textBubble/textBubble.spec.ts +++ b/apps/builder/src/features/blocks/bubbles/textBubble/textBubble.spec.ts @@ -2,12 +2,12 @@ import test, { expect } from '@playwright/test' import { createTypebots } from 'utils/playwright/databaseActions' import { parseDefaultGroupWithBlock } from 'utils/playwright/databaseHelpers' import { BubbleBlockType, defaultTextBubbleContent } from 'models' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { typebotViewer } from 'utils/playwright/testHelpers' test.describe('Text bubble block', () => { test('rich text features should work', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, diff --git a/apps/builder/src/features/blocks/bubbles/video/video.spec.ts b/apps/builder/src/features/blocks/bubbles/video/video.spec.ts index da4e313683..f0a95def01 100644 --- a/apps/builder/src/features/blocks/bubbles/video/video.spec.ts +++ b/apps/builder/src/features/blocks/bubbles/video/video.spec.ts @@ -6,7 +6,7 @@ import { defaultVideoBubbleContent, VideoBubbleContentType, } from 'models' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { typebotViewer } from 'utils/playwright/testHelpers' const videoSrc = @@ -17,7 +17,7 @@ const vimeoVideoSrc = 'https://vimeo.com/649301125' test.describe.parallel('Video bubble block', () => { test.describe('Content settings', () => { test('should import video url correctly', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, @@ -41,7 +41,7 @@ test.describe.parallel('Video bubble block', () => { test.describe('Preview', () => { test('should display video correctly', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, @@ -63,7 +63,7 @@ test.describe.parallel('Video bubble block', () => { }) test('should display youtube video correctly', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, @@ -87,7 +87,7 @@ test.describe.parallel('Video bubble block', () => { }) test('should display vimeo video correctly', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, diff --git a/apps/builder/src/features/blocks/inputs/buttons/buttons.spec.ts b/apps/builder/src/features/blocks/inputs/buttons/buttons.spec.ts index 9f99596641..3ec721fedd 100644 --- a/apps/builder/src/features/blocks/inputs/buttons/buttons.spec.ts +++ b/apps/builder/src/features/blocks/inputs/buttons/buttons.spec.ts @@ -5,13 +5,13 @@ import { } from 'utils/playwright/databaseActions' import { parseDefaultGroupWithBlock } from 'utils/playwright/databaseHelpers' import { defaultChoiceInputOptions, InputBlockType, ItemType } from 'models' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { typebotViewer } from 'utils/playwright/testHelpers' import { getTestAsset } from '@/test/utils/playwright' test.describe.parallel('Buttons input block', () => { test('can edit button items', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, @@ -75,7 +75,7 @@ test.describe.parallel('Buttons input block', () => { }) test('Variable buttons should work', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await importTypebotInDatabase( getTestAsset('typebots/inputs/variableButton.json'), { diff --git a/apps/builder/src/features/blocks/inputs/date/date.spec.ts b/apps/builder/src/features/blocks/inputs/date/date.spec.ts index fefc173ff9..0301a42486 100644 --- a/apps/builder/src/features/blocks/inputs/date/date.spec.ts +++ b/apps/builder/src/features/blocks/inputs/date/date.spec.ts @@ -3,11 +3,11 @@ import { createTypebots } from 'utils/playwright/databaseActions' import { parseDefaultGroupWithBlock } from 'utils/playwright/databaseHelpers' import { defaultDateInputOptions, InputBlockType } from 'models' import { typebotViewer } from 'utils/playwright/testHelpers' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' test.describe('Date input block', () => { test('options should work', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, diff --git a/apps/builder/src/features/blocks/inputs/emailInput/emailInput.spec.ts b/apps/builder/src/features/blocks/inputs/emailInput/emailInput.spec.ts index 40bd17b418..01b2966c75 100644 --- a/apps/builder/src/features/blocks/inputs/emailInput/emailInput.spec.ts +++ b/apps/builder/src/features/blocks/inputs/emailInput/emailInput.spec.ts @@ -3,11 +3,11 @@ import { createTypebots } from 'utils/playwright/databaseActions' import { parseDefaultGroupWithBlock } from 'utils/playwright/databaseHelpers' import { defaultEmailInputOptions, InputBlockType } from 'models' import { typebotViewer } from 'utils/playwright/testHelpers' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' test.describe('Email input block', () => { test('options should work', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, diff --git a/apps/builder/src/features/blocks/inputs/fileUpload/fileUpload.spec.ts b/apps/builder/src/features/blocks/inputs/fileUpload/fileUpload.spec.ts index 4bcf3bc179..de6f095481 100644 --- a/apps/builder/src/features/blocks/inputs/fileUpload/fileUpload.spec.ts +++ b/apps/builder/src/features/blocks/inputs/fileUpload/fileUpload.spec.ts @@ -3,14 +3,14 @@ import { createTypebots } from 'utils/playwright/databaseActions' import { parseDefaultGroupWithBlock } from 'utils/playwright/databaseHelpers' import { defaultFileInputOptions, InputBlockType } from 'models' import { typebotViewer } from 'utils/playwright/testHelpers' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { freeWorkspaceId } from 'utils/playwright/databaseSetup' import { getTestAsset } from '@/test/utils/playwright' test.describe.configure({ mode: 'parallel' }) test('options should work', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, @@ -59,7 +59,7 @@ test('options should work', async ({ page }) => { test.describe('Free workspace', () => { test("shouldn't be able to publish typebot", async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, diff --git a/apps/builder/src/features/blocks/inputs/number/number.spec.ts b/apps/builder/src/features/blocks/inputs/number/number.spec.ts index 892d246916..7580848135 100644 --- a/apps/builder/src/features/blocks/inputs/number/number.spec.ts +++ b/apps/builder/src/features/blocks/inputs/number/number.spec.ts @@ -3,11 +3,11 @@ import { createTypebots } from 'utils/playwright/databaseActions' import { parseDefaultGroupWithBlock } from 'utils/playwright/databaseHelpers' import { defaultNumberInputOptions, InputBlockType } from 'models' import { typebotViewer } from 'utils/playwright/testHelpers' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' test.describe('Number input block', () => { test('options should work', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, diff --git a/apps/builder/src/features/blocks/inputs/payment/payment.spec.ts b/apps/builder/src/features/blocks/inputs/payment/payment.spec.ts index b0bcb3e415..df1cfa097b 100644 --- a/apps/builder/src/features/blocks/inputs/payment/payment.spec.ts +++ b/apps/builder/src/features/blocks/inputs/payment/payment.spec.ts @@ -2,13 +2,13 @@ import test, { expect } from '@playwright/test' import { createTypebots } from 'utils/playwright/databaseActions' import { parseDefaultGroupWithBlock } from 'utils/playwright/databaseHelpers' import { defaultPaymentInputOptions, InputBlockType } from 'models' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { typebotViewer } from 'utils/playwright/testHelpers' import { stripePaymentForm } from '@/test/utils/selectorUtils' test.describe('Payment input block', () => { test('Can configure Stripe account', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, diff --git a/apps/builder/src/features/blocks/inputs/phone/phone.spec.ts b/apps/builder/src/features/blocks/inputs/phone/phone.spec.ts index b882b596fc..774feaa5bd 100644 --- a/apps/builder/src/features/blocks/inputs/phone/phone.spec.ts +++ b/apps/builder/src/features/blocks/inputs/phone/phone.spec.ts @@ -3,11 +3,11 @@ import { createTypebots } from 'utils/playwright/databaseActions' import { parseDefaultGroupWithBlock } from 'utils/playwright/databaseHelpers' import { defaultPhoneInputOptions, InputBlockType } from 'models' import { typebotViewer } from 'utils/playwright/testHelpers' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' test.describe('Phone input block', () => { test('options should work', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, diff --git a/apps/builder/src/features/blocks/inputs/rating/rating.spec.ts b/apps/builder/src/features/blocks/inputs/rating/rating.spec.ts index dbe896272a..1520afb437 100644 --- a/apps/builder/src/features/blocks/inputs/rating/rating.spec.ts +++ b/apps/builder/src/features/blocks/inputs/rating/rating.spec.ts @@ -3,7 +3,7 @@ import { createTypebots } from 'utils/playwright/databaseActions' import { parseDefaultGroupWithBlock } from 'utils/playwright/databaseHelpers' import { defaultRatingInputOptions, InputBlockType } from 'models' import { typebotViewer } from 'utils/playwright/testHelpers' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' const boxSvg = `` test('options should work', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, diff --git a/apps/builder/src/features/blocks/inputs/textInput/textInput.spec.ts b/apps/builder/src/features/blocks/inputs/textInput/textInput.spec.ts index 41907780b1..575f9b3d8f 100644 --- a/apps/builder/src/features/blocks/inputs/textInput/textInput.spec.ts +++ b/apps/builder/src/features/blocks/inputs/textInput/textInput.spec.ts @@ -3,11 +3,11 @@ import { createTypebots } from 'utils/playwright/databaseActions' import { parseDefaultGroupWithBlock } from 'utils/playwright/databaseHelpers' import { defaultTextInputOptions, InputBlockType } from 'models' import { typebotViewer } from 'utils/playwright/testHelpers' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' test.describe.parallel('Text input block', () => { test('options should work', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, diff --git a/apps/builder/src/features/blocks/inputs/url/url.spec.ts b/apps/builder/src/features/blocks/inputs/url/url.spec.ts index 826bf787d3..229ed7f84b 100644 --- a/apps/builder/src/features/blocks/inputs/url/url.spec.ts +++ b/apps/builder/src/features/blocks/inputs/url/url.spec.ts @@ -3,11 +3,11 @@ import { createTypebots } from 'utils/playwright/databaseActions' import { parseDefaultGroupWithBlock } from 'utils/playwright/databaseHelpers' import { defaultUrlInputOptions, InputBlockType } from 'models' import { typebotViewer } from 'utils/playwright/testHelpers' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' test.describe('Url input block', () => { test('options should work', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, diff --git a/apps/builder/src/features/blocks/integrations/chatwoot/chatwoot.spec.ts b/apps/builder/src/features/blocks/integrations/chatwoot/chatwoot.spec.ts index 7253c2f9a3..c64af89441 100644 --- a/apps/builder/src/features/blocks/integrations/chatwoot/chatwoot.spec.ts +++ b/apps/builder/src/features/blocks/integrations/chatwoot/chatwoot.spec.ts @@ -1,10 +1,10 @@ import test, { expect } from '@playwright/test' import { createTypebots } from 'utils/playwright/databaseActions' import { parseDefaultGroupWithBlock } from 'utils/playwright/databaseHelpers' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { defaultChatwootOptions, IntegrationBlockType } from 'models' -const typebotId = cuid() +const typebotId = createId() const chatwootTestWebsiteToken = 'tueXiiqEmrWUCZ4NUyoR7nhE' diff --git a/apps/builder/src/features/blocks/integrations/googleAnalytics/googleAnalytics.spec.ts b/apps/builder/src/features/blocks/integrations/googleAnalytics/googleAnalytics.spec.ts index 99d2d0dfbb..0e66dee810 100644 --- a/apps/builder/src/features/blocks/integrations/googleAnalytics/googleAnalytics.spec.ts +++ b/apps/builder/src/features/blocks/integrations/googleAnalytics/googleAnalytics.spec.ts @@ -2,11 +2,11 @@ import test from '@playwright/test' import { createTypebots } from 'utils/playwright/databaseActions' import { parseDefaultGroupWithBlock } from 'utils/playwright/databaseHelpers' import { defaultGoogleAnalyticsOptions, IntegrationBlockType } from 'models' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' test.describe('Google Analytics block', () => { test('its configuration should work', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, diff --git a/apps/builder/src/features/blocks/integrations/googleSheets/googleSheets.spec.ts b/apps/builder/src/features/blocks/integrations/googleSheets/googleSheets.spec.ts index ef3179fba0..817fd73769 100644 --- a/apps/builder/src/features/blocks/integrations/googleSheets/googleSheets.spec.ts +++ b/apps/builder/src/features/blocks/integrations/googleSheets/googleSheets.spec.ts @@ -1,12 +1,12 @@ import test, { expect, Page } from '@playwright/test' import { importTypebotInDatabase } from 'utils/playwright/databaseActions' import { typebotViewer } from 'utils/playwright/testHelpers' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { getTestAsset } from '@/test/utils/playwright' test.describe.parallel('Google sheets integration', () => { test('Insert row should work', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await importTypebotInDatabase( getTestAsset('typebots/integrations/googleSheets.json'), { @@ -55,7 +55,7 @@ test.describe.parallel('Google sheets integration', () => { }) test('Update row should work', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await importTypebotInDatabase( getTestAsset('typebots/integrations/googleSheets.json'), { @@ -104,7 +104,7 @@ test.describe.parallel('Google sheets integration', () => { }) test('Get row should work', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await importTypebotInDatabase( getTestAsset('typebots/integrations/googleSheetsGet.json'), { diff --git a/apps/builder/src/features/blocks/integrations/sendEmail/queries/sendEmail.spec.ts b/apps/builder/src/features/blocks/integrations/sendEmail/queries/sendEmail.spec.ts index 1ad81413b6..96ab8cc9af 100644 --- a/apps/builder/src/features/blocks/integrations/sendEmail/queries/sendEmail.spec.ts +++ b/apps/builder/src/features/blocks/integrations/sendEmail/queries/sendEmail.spec.ts @@ -1,10 +1,10 @@ import test, { expect } from '@playwright/test' import { importTypebotInDatabase } from 'utils/playwright/databaseActions' import { typebotViewer } from 'utils/playwright/testHelpers' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { getTestAsset } from '@/test/utils/playwright' -const typebotId = cuid() +const typebotId = createId() test.describe('Send email block', () => { test('its configuration should work', async ({ page }) => { diff --git a/apps/builder/src/features/blocks/integrations/webhook/webhook.spec.ts b/apps/builder/src/features/blocks/integrations/webhook/webhook.spec.ts index d40e416ff1..89818f8e75 100644 --- a/apps/builder/src/features/blocks/integrations/webhook/webhook.spec.ts +++ b/apps/builder/src/features/blocks/integrations/webhook/webhook.spec.ts @@ -4,13 +4,13 @@ import { importTypebotInDatabase, } from 'utils/playwright/databaseActions' import { HttpMethod } from 'models' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { getTestAsset } from '@/test/utils/playwright' import { apiToken } from 'utils/playwright/databaseSetup' test.describe('Builder', () => { test('easy configuration should work', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await importTypebotInDatabase( getTestAsset('typebots/integrations/easyConfigWebhook.json'), { @@ -31,7 +31,7 @@ test.describe('Builder', () => { }) test('its configuration should work', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await importTypebotInDatabase( getTestAsset('typebots/integrations/webhook.json'), { diff --git a/apps/builder/src/features/blocks/logic/condition/components/ConditionItemNode.tsx b/apps/builder/src/features/blocks/logic/condition/components/ConditionItemNode.tsx index 084665dd40..739484babc 100644 --- a/apps/builder/src/features/blocks/logic/condition/components/ConditionItemNode.tsx +++ b/apps/builder/src/features/blocks/logic/condition/components/ConditionItemNode.tsx @@ -28,7 +28,7 @@ import { byId, isNotDefined } from 'utils' import { PlusIcon } from '@/components/icons' import { ConditionItemForm } from './ConditionItemForm' import { useGraph } from '@/features/graph' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' type Props = { item: ConditionItem @@ -55,7 +55,7 @@ export const ConditionItemNode = ({ item, isMouseOver, indices }: Props) => { const handlePlusClick = (event: React.MouseEvent) => { event.stopPropagation() const itemIndex = indices.itemIndex + 1 - const newItemId = cuid() + const newItemId = createId() createItem( { blockId: item.blockId, diff --git a/apps/builder/src/features/blocks/logic/condition/condition.spec.ts b/apps/builder/src/features/blocks/logic/condition/condition.spec.ts index 89aa4ab43b..924220fe69 100644 --- a/apps/builder/src/features/blocks/logic/condition/condition.spec.ts +++ b/apps/builder/src/features/blocks/logic/condition/condition.spec.ts @@ -1,10 +1,10 @@ import test, { expect } from '@playwright/test' import { typebotViewer } from 'utils/playwright/testHelpers' import { importTypebotInDatabase } from 'utils/playwright/databaseActions' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { getTestAsset } from '@/test/utils/playwright' -const typebotId = cuid() +const typebotId = createId() test.describe('Condition block', () => { test('its configuration should work', async ({ page }) => { diff --git a/apps/builder/src/features/blocks/logic/redirect/redirect.spec.ts b/apps/builder/src/features/blocks/logic/redirect/redirect.spec.ts index 1cbc66eaef..ec88fc6884 100644 --- a/apps/builder/src/features/blocks/logic/redirect/redirect.spec.ts +++ b/apps/builder/src/features/blocks/logic/redirect/redirect.spec.ts @@ -1,10 +1,10 @@ import test, { expect } from '@playwright/test' import { typebotViewer } from 'utils/playwright/testHelpers' import { importTypebotInDatabase } from 'utils/playwright/databaseActions' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { getTestAsset } from '@/test/utils/playwright' -const typebotId = cuid() +const typebotId = createId() test.describe('Redirect block', () => { test('its configuration should work', async ({ page, context }) => { diff --git a/apps/builder/src/features/blocks/logic/script/script.spec.ts b/apps/builder/src/features/blocks/logic/script/script.spec.ts index 6fefebac36..f35720f2bc 100644 --- a/apps/builder/src/features/blocks/logic/script/script.spec.ts +++ b/apps/builder/src/features/blocks/logic/script/script.spec.ts @@ -1,10 +1,10 @@ import test, { expect } from '@playwright/test' import { typebotViewer } from 'utils/playwright/testHelpers' import { importTypebotInDatabase } from 'utils/playwright/databaseActions' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { getTestAsset } from '@/test/utils/playwright' -const typebotId = cuid() +const typebotId = createId() test.describe('Script block', () => { test('script should trigger', async ({ page }) => { diff --git a/apps/builder/src/features/blocks/logic/setVariable/setVariable.spec.ts b/apps/builder/src/features/blocks/logic/setVariable/setVariable.spec.ts index abcd697145..ceab0f8a82 100644 --- a/apps/builder/src/features/blocks/logic/setVariable/setVariable.spec.ts +++ b/apps/builder/src/features/blocks/logic/setVariable/setVariable.spec.ts @@ -1,10 +1,10 @@ import test, { expect } from '@playwright/test' import { typebotViewer } from 'utils/playwright/testHelpers' import { importTypebotInDatabase } from 'utils/playwright/databaseActions' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { getTestAsset } from '@/test/utils/playwright' -const typebotId = cuid() +const typebotId = createId() test.describe('Set variable block', () => { test('its configuration should work', async ({ page }) => { diff --git a/apps/builder/src/features/blocks/logic/typebotLink/typebotLink.spec.ts b/apps/builder/src/features/blocks/logic/typebotLink/typebotLink.spec.ts index 09c0f1731b..9d02744fc6 100644 --- a/apps/builder/src/features/blocks/logic/typebotLink/typebotLink.spec.ts +++ b/apps/builder/src/features/blocks/logic/typebotLink/typebotLink.spec.ts @@ -1,12 +1,12 @@ import test, { expect } from '@playwright/test' import { typebotViewer } from 'utils/playwright/testHelpers' import { importTypebotInDatabase } from 'utils/playwright/databaseActions' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { getTestAsset } from '@/test/utils/playwright' test('should be configurable', async ({ page }) => { - const typebotId = cuid() - const linkedTypebotId = cuid() + const typebotId = createId() + const linkedTypebotId = createId() await importTypebotInDatabase( getTestAsset('typebots/logic/linkTypebots/1.json'), { id: typebotId, name: 'My link typebot 1' } diff --git a/apps/builder/src/features/blocks/logic/wait/wait.spec.ts b/apps/builder/src/features/blocks/logic/wait/wait.spec.ts index 7821fee6ee..7ea19f68a0 100644 --- a/apps/builder/src/features/blocks/logic/wait/wait.spec.ts +++ b/apps/builder/src/features/blocks/logic/wait/wait.spec.ts @@ -1,10 +1,10 @@ import test, { expect } from '@playwright/test' import { typebotViewer } from 'utils/playwright/testHelpers' import { importTypebotInDatabase } from 'utils/playwright/databaseActions' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { getTestAsset } from '@/test/utils/playwright' -const typebotId = cuid() +const typebotId = createId() test.describe('Wait block', () => { test('wait should trigger', async ({ page }) => { diff --git a/apps/builder/src/features/collaboration/collaboration.spec.ts b/apps/builder/src/features/collaboration/collaboration.spec.ts index f62f974a40..d04e7cbd07 100644 --- a/apps/builder/src/features/collaboration/collaboration.spec.ts +++ b/apps/builder/src/features/collaboration/collaboration.spec.ts @@ -1,5 +1,5 @@ import test, { expect } from '@playwright/test' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { CollaborationType, Plan, WorkspaceRole } from 'db' import prisma from '@/lib/prisma' import { InputBlockType, defaultTextInputOptions } from 'models' @@ -13,8 +13,8 @@ import { createFolder } from '@/test/utils/databaseActions' test.describe('Typebot owner', () => { test('Can invite collaborators', async ({ page }) => { - const typebotId = cuid() - const guestWorkspaceId = cuid() + const typebotId = createId() + const guestWorkspaceId = createId() await prisma.workspace.create({ data: { id: guestWorkspaceId, @@ -66,8 +66,8 @@ test.describe('Typebot owner', () => { test.describe('Guest with read access', () => { test('should have shared typebots displayed', async ({ page }) => { - const typebotId = cuid() - const guestWorkspaceId = cuid() + const typebotId = createId() + const guestWorkspaceId = createId() await prisma.workspace.create({ data: { id: guestWorkspaceId, @@ -124,8 +124,8 @@ test.describe('Guest with read access', () => { test.describe('Guest with write access', () => { test('should have shared typebots displayed', async ({ page }) => { - const typebotId = cuid() - const guestWorkspaceId = cuid() + const typebotId = createId() + const guestWorkspaceId = createId() await prisma.workspace.create({ data: { id: guestWorkspaceId, diff --git a/apps/builder/src/features/customDomains/customDomains.spec.ts b/apps/builder/src/features/customDomains/customDomains.spec.ts index 12c5fa7a35..aeac653534 100644 --- a/apps/builder/src/features/customDomains/customDomains.spec.ts +++ b/apps/builder/src/features/customDomains/customDomains.spec.ts @@ -1,12 +1,12 @@ import test, { expect } from '@playwright/test' import { InputBlockType, defaultTextInputOptions } from 'models' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { createTypebots } from 'utils/playwright/databaseActions' import { parseDefaultGroupWithBlock } from 'utils/playwright/databaseHelpers' import { starterWorkspaceId } from 'utils/playwright/databaseSetup' test('should be able to connect custom domain', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, @@ -43,7 +43,7 @@ test('should be able to connect custom domain', async ({ page }) => { test.describe('Starter workspace', () => { test("Add my domain shouldn't be available", async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, diff --git a/apps/builder/src/features/dashboard/api/parseNewTypebot.ts b/apps/builder/src/features/dashboard/api/parseNewTypebot.ts index 92a8908ebf..76c1521b05 100644 --- a/apps/builder/src/features/dashboard/api/parseNewTypebot.ts +++ b/apps/builder/src/features/dashboard/api/parseNewTypebot.ts @@ -1,4 +1,4 @@ -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { defaultSettings, defaultTheme, @@ -33,8 +33,8 @@ export const parseNewTypebot = ({ ownerAvatarUrl?: string isBrandingEnabled?: boolean }): NewTypebotProps => { - const startGroupId = cuid() - const startBlockId = cuid() + const startGroupId = createId() + const startBlockId = createId() const startBlock: StartBlock = { groupId: startGroupId, id: startBlockId, diff --git a/apps/builder/src/features/dashboard/dashboard.spec.ts b/apps/builder/src/features/dashboard/dashboard.spec.ts index 8b38d90da3..76b008a9c3 100644 --- a/apps/builder/src/features/dashboard/dashboard.spec.ts +++ b/apps/builder/src/features/dashboard/dashboard.spec.ts @@ -1,7 +1,7 @@ import { createFolders } from '@/test/utils/databaseActions' import { deleteButtonInConfirmDialog } from '@/test/utils/selectorUtils' import test, { expect } from '@playwright/test' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { createTypebots } from 'utils/playwright/databaseActions' test('folders navigation should work', async ({ page }) => { @@ -47,7 +47,7 @@ test('folders and typebots should be deletable', async ({ page }) => { }) test('folders and typebots should be movable', async ({ page }) => { - const droppableFolderId = cuid() + const droppableFolderId = createId() await createFolders([{ id: droppableFolderId, name: 'Droppable folder' }]) await createTypebots([{ name: 'Draggable typebot' }]) await page.goto('/typebots') diff --git a/apps/builder/src/features/dashboard/queries/importTypebotQuery.ts b/apps/builder/src/features/dashboard/queries/importTypebotQuery.ts index 449f764824..c444466ec0 100644 --- a/apps/builder/src/features/dashboard/queries/importTypebotQuery.ts +++ b/apps/builder/src/features/dashboard/queries/importTypebotQuery.ts @@ -1,5 +1,5 @@ import { duplicateWebhookQueries } from '@/features/blocks/integrations/webhook' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { Plan, Prisma } from 'db' import { ChoiceInputBlock, @@ -50,7 +50,7 @@ const duplicateTypebot = ( .filter(isWebhookBlock) .map((s) => ({ id: s.webhookId })) ) - const id = cuid() + const id = createId() return { typebot: { ...typebot, @@ -131,6 +131,6 @@ const duplicateTypebot = ( const generateOldNewIdsMapping = (itemWithId: { id: string }[]) => { const idsMapping: Map = new Map() - itemWithId.forEach((item) => idsMapping.set(item.id, cuid())) + itemWithId.forEach((item) => idsMapping.set(item.id, createId())) return idsMapping } diff --git a/apps/builder/src/features/editor/editor.spec.ts b/apps/builder/src/features/editor/editor.spec.ts index 93eff013cc..4e24996834 100644 --- a/apps/builder/src/features/editor/editor.spec.ts +++ b/apps/builder/src/features/editor/editor.spec.ts @@ -1,6 +1,6 @@ import test, { expect } from '@playwright/test' import { defaultTextInputOptions, InputBlockType } from 'models' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { createTypebots, importTypebotInDatabase, @@ -17,7 +17,7 @@ import { getTestAsset } from '@/test/utils/playwright' test.describe.configure({ mode: 'parallel' }) test('Edges connection should work', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, @@ -68,7 +68,7 @@ test('Edges connection should work', async ({ page }) => { expect(total).toBe(1) }) test('Drag and drop blocks and items should work', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await importTypebotInDatabase( getTestAsset('typebots/editor/buttonsDnd.json'), { @@ -120,7 +120,7 @@ test('Drag and drop blocks and items should work', async ({ page }) => { ) }) test('Undo / Redo and Zoom buttons should work', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, @@ -162,7 +162,7 @@ test('Undo / Redo and Zoom buttons should work', async ({ page }) => { }) test('Rename and icon change should work', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, @@ -189,7 +189,7 @@ test('Rename and icon change should work', async ({ page }) => { }) test('Preview from group should work', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await importTypebotInDatabase( getTestAsset('typebots/editor/previewFromGroup.json'), { @@ -214,7 +214,7 @@ test('Preview from group should work', async ({ page }) => { }) test('Published typebot menu should work', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, diff --git a/apps/builder/src/features/editor/providers/TypebotProvider/actions/blocks.ts b/apps/builder/src/features/editor/providers/TypebotProvider/actions/blocks.ts index a9f0022606..73af8c759a 100644 --- a/apps/builder/src/features/editor/providers/TypebotProvider/actions/blocks.ts +++ b/apps/builder/src/features/editor/providers/TypebotProvider/actions/blocks.ts @@ -9,7 +9,7 @@ import { WritableDraft } from 'immer/dist/types/types-external' import { SetTypebot } from '../TypebotProvider' import produce from 'immer' import { cleanUpEdgeDraft, deleteEdgeDraft } from './edges' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { byId, isWebhookBlock, blockHasItems } from 'utils' import { duplicateItemDraft } from './items' import { parseNewBlock } from '@/features/graph/utils' @@ -141,7 +141,7 @@ const moveBlockToGroup = ( export const duplicateBlockDraft = (groupId: string) => (block: Block): Block => { - const blockId = cuid() + const blockId = createId() if (blockHasItems(block)) return { ...block, @@ -155,7 +155,7 @@ export const duplicateBlockDraft = ...block, groupId, id: blockId, - webhookId: cuid(), + webhookId: createId(), outgoingEdgeId: undefined, } return { diff --git a/apps/builder/src/features/editor/providers/TypebotProvider/actions/edges.ts b/apps/builder/src/features/editor/providers/TypebotProvider/actions/edges.ts index 69542e55f3..1fde400ed2 100644 --- a/apps/builder/src/features/editor/providers/TypebotProvider/actions/edges.ts +++ b/apps/builder/src/features/editor/providers/TypebotProvider/actions/edges.ts @@ -10,7 +10,7 @@ import { WritableDraft } from 'immer/dist/types/types-external' import { SetTypebot } from '../TypebotProvider' import { produce } from 'immer' import { byId, isDefined, blockHasItems } from 'utils' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' export type EdgesActions = { createEdge: (edge: Omit) => void @@ -24,7 +24,7 @@ export const edgesAction = (setTypebot: SetTypebot): EdgesActions => ({ produce(typebot, (typebot) => { const newEdge = { ...edge, - id: cuid(), + id: createId(), } removeExistingEdge(typebot, edge) typebot.edges.push(newEdge) diff --git a/apps/builder/src/features/editor/providers/TypebotProvider/actions/groups.ts b/apps/builder/src/features/editor/providers/TypebotProvider/actions/groups.ts index e59390cb9f..aa1be181ef 100644 --- a/apps/builder/src/features/editor/providers/TypebotProvider/actions/groups.ts +++ b/apps/builder/src/features/editor/providers/TypebotProvider/actions/groups.ts @@ -1,4 +1,4 @@ -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { produce } from 'immer' import { Group, DraggableBlock, DraggableBlockType, BlockIndices } from 'models' import { SetTypebot } from '../TypebotProvider' @@ -56,7 +56,7 @@ const groupsActions = (setTypebot: SetTypebot): GroupsActions => ({ setTypebot((typebot) => produce(typebot, (typebot) => { const group = typebot.groups[groupIndex] - const id = cuid() + const id = createId() const newGroup: Group = { ...group, title: `${group.title} copy`, diff --git a/apps/builder/src/features/editor/providers/TypebotProvider/actions/items.ts b/apps/builder/src/features/editor/providers/TypebotProvider/actions/items.ts index 55556d5001..294687931f 100644 --- a/apps/builder/src/features/editor/providers/TypebotProvider/actions/items.ts +++ b/apps/builder/src/features/editor/providers/TypebotProvider/actions/items.ts @@ -12,7 +12,7 @@ import { SetTypebot } from '../TypebotProvider' import produce from 'immer' import { cleanUpEdgeDraft } from './edges' import { byId, blockHasItems } from 'utils' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { WritableDraft } from 'immer/dist/types/types-external' type NewItem = Pick & Partial @@ -34,7 +34,7 @@ const createItem = ( if (item.type === ItemType.CONDITION) { const newItem = { ...item, - id: 'id' in item && item.id ? item.id : cuid(), + id: 'id' in item && item.id ? item.id : createId(), content: item.content ?? defaultConditionContent, } block.items.splice(itemIndex, 0, newItem) @@ -46,7 +46,7 @@ const createItem = ( if (item.type === ItemType.BUTTON) { const newItem = { ...item, - id: 'id' in item && item.id ? item.id : cuid(), + id: 'id' in item && item.id ? item.id : createId(), content: item.content, } block.items.splice(itemIndex, 0, newItem) @@ -122,7 +122,7 @@ const itemsAction = (setTypebot: SetTypebot): ItemsActions => ({ const duplicateItemDraft = (blockId: string) => (item: Item) => ({ ...item, - id: cuid(), + id: createId(), blockId, outgoingEdgeId: undefined, }) diff --git a/apps/builder/src/features/graph/components/Graph.tsx b/apps/builder/src/features/graph/components/Graph.tsx index 22e138d47f..56c261d310 100644 --- a/apps/builder/src/features/graph/components/Graph.tsx +++ b/apps/builder/src/features/graph/components/Graph.tsx @@ -12,7 +12,7 @@ import { useTypebot } from '@/features/editor' import { DraggableBlockType, PublicTypebot, Typebot } from 'models' import { useDebounce } from 'use-debounce' import GraphElements from './GraphElements' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { useUser } from '@/features/account' import { ZoomButtons } from './ZoomButtons' import { AnswersCount } from '@/features/analytics' @@ -96,7 +96,7 @@ export const Graph = ({ { x: e.clientX, y: e.clientY }, graphPosition ) - const id = cuid() + const id = createId() updateGroupCoordinates(id, coordinates) createGroup({ id, diff --git a/apps/builder/src/features/graph/utils.ts b/apps/builder/src/features/graph/utils.ts index 7e9d593844..7c662af97e 100644 --- a/apps/builder/src/features/graph/utils.ts +++ b/apps/builder/src/features/graph/utils.ts @@ -48,7 +48,7 @@ import { } from './providers' import { roundCorners } from 'svg-round-corners' import { AnchorsPositionProps } from './components/Edges/Edge' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { isBubbleBlockType, blockTypeHasOption, @@ -359,7 +359,7 @@ export const parseNewBlock = ( type: DraggableBlockType, groupId: string ): DraggableBlock => { - const id = cuid() + const id = createId() return { id, groupId, @@ -368,7 +368,7 @@ export const parseNewBlock = ( options: blockTypeHasOption(type) ? parseDefaultBlockOptions(type) : undefined, - webhookId: blockTypeHasWebhook(type) ? cuid() : undefined, + webhookId: blockTypeHasWebhook(type) ? createId() : undefined, items: blockTypeHasItems(type) ? parseDefaultItems(type, id) : undefined, } as DraggableBlock } @@ -379,11 +379,11 @@ const parseDefaultItems = ( ): Item[] => { switch (type) { case InputBlockType.CHOICE: - return [{ id: cuid(), blockId, type: ItemType.BUTTON }] + return [{ id: createId(), blockId, type: ItemType.BUTTON }] case LogicBlockType.CONDITION: return [ { - id: cuid(), + id: createId(), blockId, type: ItemType.CONDITION, content: defaultConditionContent, diff --git a/apps/builder/src/features/publish/publish.spec.ts b/apps/builder/src/features/publish/publish.spec.ts index db0d6ce030..801c19f480 100644 --- a/apps/builder/src/features/publish/publish.spec.ts +++ b/apps/builder/src/features/publish/publish.spec.ts @@ -1,12 +1,12 @@ import test, { expect } from '@playwright/test' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { defaultTextInputOptions, InputBlockType } from 'models' import { createTypebots } from 'utils/playwright/databaseActions' import { parseDefaultGroupWithBlock } from 'utils/playwright/databaseHelpers' test('should not be able to submit taken url ID', async ({ page }) => { - const takenTypebotId = cuid() - const typebotId = cuid() + const takenTypebotId = createId() + const typebotId = createId() await createTypebots([ { id: takenTypebotId, diff --git a/apps/builder/src/features/publish/utils.ts b/apps/builder/src/features/publish/utils.ts index ac5f40e676..f827494fd7 100644 --- a/apps/builder/src/features/publish/utils.ts +++ b/apps/builder/src/features/publish/utils.ts @@ -1,4 +1,4 @@ -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { PublicTypebot, Typebot } from 'models' import { dequal } from 'dequal' import { omit } from 'utils' @@ -31,7 +31,7 @@ export const parsePublicTypebotToTypebot = ( export const parseTypebotToPublicTypebot = ( typebot: Typebot ): PublicTypebot => ({ - id: cuid(), + id: createId(), typebotId: typebot.id, groups: typebot.groups, edges: typebot.edges, diff --git a/apps/builder/src/features/results/results.spec.ts b/apps/builder/src/features/results/results.spec.ts index e903d6ff43..9d8281b893 100644 --- a/apps/builder/src/features/results/results.spec.ts +++ b/apps/builder/src/features/results/results.spec.ts @@ -1,7 +1,7 @@ import { getTestAsset } from '@/test/utils/playwright' import { deleteButtonInConfirmDialog } from '@/test/utils/selectorUtils' import test, { expect, Page } from '@playwright/test' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { readFileSync } from 'fs' import { parse } from 'papaparse' import { @@ -9,7 +9,7 @@ import { injectFakeResults, } from 'utils/playwright/databaseActions' -const typebotId = cuid() +const typebotId = createId() test.beforeEach(async () => { await importTypebotInDatabase( diff --git a/apps/builder/src/features/settings/settings.spec.ts b/apps/builder/src/features/settings/settings.spec.ts index f9facb585b..d7de15f7e4 100644 --- a/apps/builder/src/features/settings/settings.spec.ts +++ b/apps/builder/src/features/settings/settings.spec.ts @@ -1,6 +1,6 @@ import { getTestAsset } from '@/test/utils/playwright' import test, { expect } from '@playwright/test' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { defaultTextInputOptions } from 'models' import { importTypebotInDatabase } from 'utils/playwright/databaseActions' import { freeWorkspaceId } from 'utils/playwright/databaseSetup' @@ -9,7 +9,7 @@ import { typebotViewer } from 'utils/playwright/testHelpers' test.describe.parallel('Settings page', () => { test.describe('General', () => { test('should reflect change in real-time', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await importTypebotInDatabase(getTestAsset('typebots/settings.json'), { id: typebotId, }) @@ -47,7 +47,7 @@ test.describe.parallel('Settings page', () => { test.describe('Typing emulation', () => { test('should be fillable', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await importTypebotInDatabase(getTestAsset('typebots/settings.json'), { id: typebotId, }) @@ -68,7 +68,7 @@ test.describe.parallel('Settings page', () => { test('should be fillable', async ({ page }) => { const favIconUrl = 'https://www.baptistearno.com/favicon.png' const imageUrl = 'https://www.baptistearno.com/images/site-preview.png' - const typebotId = cuid() + const typebotId = createId() await importTypebotInDatabase(getTestAsset('typebots/settings.json'), { id: typebotId, }) @@ -114,7 +114,7 @@ test.describe.parallel('Settings page', () => { test.describe('Free workspace', () => { test("can't remove branding", async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await importTypebotInDatabase(getTestAsset('typebots/settings.json'), { id: typebotId, workspaceId: freeWorkspaceId, diff --git a/apps/builder/src/features/theme/theme.spec.ts b/apps/builder/src/features/theme/theme.spec.ts index bad9d8d987..5fcb0cc652 100644 --- a/apps/builder/src/features/theme/theme.spec.ts +++ b/apps/builder/src/features/theme/theme.spec.ts @@ -1,6 +1,6 @@ import { getTestAsset } from '@/test/utils/playwright' import test, { expect } from '@playwright/test' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { importTypebotInDatabase } from 'utils/playwright/databaseActions' import { typebotViewer } from 'utils/playwright/testHelpers' @@ -12,7 +12,7 @@ const guestAvatarUrl = test.describe.parallel('Theme page', () => { test.describe('General', () => { test('should reflect change in real-time', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() const chatContainer = typebotViewer(page).locator( '[data-testid="container"]' ) @@ -165,7 +165,7 @@ test.describe.parallel('Theme page', () => { test.describe('Custom CSS', () => { test('should reflect change in real-time', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await importTypebotInDatabase(getTestAsset('typebots/theme.json'), { id: typebotId, }) diff --git a/apps/builder/src/features/workspace/workspaces.spec.ts b/apps/builder/src/features/workspace/workspaces.spec.ts index ca814a1253..e548432fc9 100644 --- a/apps/builder/src/features/workspace/workspaces.spec.ts +++ b/apps/builder/src/features/workspace/workspaces.spec.ts @@ -1,5 +1,5 @@ import test, { expect } from '@playwright/test' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { defaultTextInputOptions, InputBlockType } from 'models' import { createTypebots } from 'utils/playwright/databaseActions' import { @@ -9,8 +9,8 @@ import { import { parseDefaultGroupWithBlock } from 'utils/playwright/databaseHelpers' import { mockSessionResponsesToOtherUser } from 'utils/playwright/testHelpers' -const proTypebotId = cuid() -const starterTypebotId = cuid() +const proTypebotId = createId() +const starterTypebotId = createId() test.beforeAll(async () => { await createTypebots([ diff --git a/apps/builder/src/pages/api/auth/adapter.ts b/apps/builder/src/pages/api/auth/adapter.ts index 831c465271..59724e9056 100644 --- a/apps/builder/src/pages/api/auth/adapter.ts +++ b/apps/builder/src/pages/api/auth/adapter.ts @@ -1,7 +1,7 @@ // Forked from https://github.com/nextauthjs/adapters/blob/main/packages/prisma/src/index.ts import { PrismaClient, Prisma, WorkspaceRole, Session } from 'db' import type { Adapter, AdapterUser } from 'next-auth/adapters' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { got } from 'got' import { generateId } from 'utils' import { parseWorkspaceDefaultPlan } from '@/features/workspace' @@ -14,7 +14,7 @@ import { export function CustomAdapter(p: PrismaClient): Adapter { return { createUser: async (data: Omit) => { - const user = { id: cuid(), email: data.email as string } + const user = { id: createId(), email: data.email as string } const { invitations, workspaceInvitations } = await getNewUserInvitations( p, user.email diff --git a/apps/viewer/package.json b/apps/viewer/package.json index 38a305881f..4269141168 100644 --- a/apps/viewer/package.json +++ b/apps/viewer/package.json @@ -20,7 +20,7 @@ "aws-sdk": "2.1304.0", "bot-engine": "workspace:*", "cors": "2.8.5", - "cuid": "3.0.0", + "@paralleldrive/cuid2": "2.0.1", "db": "workspace:*", "google-spreadsheet": "3.3.0", "got": "12.5.3", diff --git a/apps/viewer/src/features/blocks/inputs/fileUpload/fileUpload.spec.ts b/apps/viewer/src/features/blocks/inputs/fileUpload/fileUpload.spec.ts index c8e2b59e81..297f0e0950 100644 --- a/apps/viewer/src/features/blocks/inputs/fileUpload/fileUpload.spec.ts +++ b/apps/viewer/src/features/blocks/inputs/fileUpload/fileUpload.spec.ts @@ -1,5 +1,5 @@ import test, { expect } from '@playwright/test' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { parse } from 'papaparse' import { readFileSync } from 'fs' import { isDefined } from 'utils' @@ -15,7 +15,7 @@ import { Plan } from 'db' const THREE_GIGABYTES = 3 * 1024 * 1024 * 1024 test('should work as expected', async ({ page, browser }) => { - const typebotId = cuid() + const typebotId = createId() await importTypebotInDatabase(getTestAsset('typebots/fileUpload.json'), { id: typebotId, publicId: `${typebotId}-public`, @@ -79,8 +79,8 @@ test('should work as expected', async ({ page, browser }) => { }) test.describe('Storage limit is reached', () => { - const typebotId = cuid() - const workspaceId = cuid() + const typebotId = createId() + const workspaceId = createId() test.beforeAll(async () => { await createWorkspaces([{ id: workspaceId, plan: Plan.STARTER }]) diff --git a/apps/viewer/src/features/blocks/inputs/fileUpload/fileUploadV2.spec.ts b/apps/viewer/src/features/blocks/inputs/fileUpload/fileUploadV2.spec.ts index 8dfc4fc2c3..1526d095e8 100644 --- a/apps/viewer/src/features/blocks/inputs/fileUpload/fileUploadV2.spec.ts +++ b/apps/viewer/src/features/blocks/inputs/fileUpload/fileUploadV2.spec.ts @@ -1,5 +1,5 @@ import test, { expect } from '@playwright/test' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { parse } from 'papaparse' import { readFileSync } from 'fs' import { isDefined } from 'utils' @@ -14,7 +14,7 @@ import { Plan } from 'db' const THREE_GIGABYTES = 3 * 1024 * 1024 * 1024 test('should work as expected', async ({ page, browser }) => { - const typebotId = cuid() + const typebotId = createId() await importTypebotInDatabase(getTestAsset('typebots/fileUpload.json'), { id: typebotId, publicId: `${typebotId}-public`, @@ -76,8 +76,8 @@ test('should work as expected', async ({ page, browser }) => { }) test.describe('Storage limit is reached', () => { - const typebotId = cuid() - const workspaceId = cuid() + const typebotId = createId() + const workspaceId = createId() test.beforeAll(async () => { await createWorkspaces([{ id: workspaceId, plan: Plan.STARTER }]) diff --git a/apps/viewer/src/features/blocks/integrations/chatwoot/chatwoot.spec.ts b/apps/viewer/src/features/blocks/integrations/chatwoot/chatwoot.spec.ts index f222555fc8..26df441d78 100644 --- a/apps/viewer/src/features/blocks/integrations/chatwoot/chatwoot.spec.ts +++ b/apps/viewer/src/features/blocks/integrations/chatwoot/chatwoot.spec.ts @@ -1,11 +1,11 @@ import test, { expect } from '@playwright/test' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { createTypebots } from 'utils/playwright/databaseActions' import { parseDefaultGroupWithBlock } from 'utils/playwright/databaseHelpers' import { defaultChatwootOptions, IntegrationBlockType } from 'models' import { typebotViewer } from 'utils/playwright/testHelpers' -const typebotId = cuid() +const typebotId = createId() const chatwootTestWebsiteToken = 'tueXiiqEmrWUCZ4NUyoR7nhE' diff --git a/apps/viewer/src/features/blocks/integrations/chatwoot/chatwootV2.spec.ts b/apps/viewer/src/features/blocks/integrations/chatwoot/chatwootV2.spec.ts index 00c2921503..fee2996c13 100644 --- a/apps/viewer/src/features/blocks/integrations/chatwoot/chatwootV2.spec.ts +++ b/apps/viewer/src/features/blocks/integrations/chatwoot/chatwootV2.spec.ts @@ -1,10 +1,10 @@ import test, { expect } from '@playwright/test' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { createTypebots } from 'utils/playwright/databaseActions' import { parseDefaultGroupWithBlock } from 'utils/playwright/databaseHelpers' import { defaultChatwootOptions, IntegrationBlockType } from 'models' -const typebotId = cuid() +const typebotId = createId() const chatwootTestWebsiteToken = 'tueXiiqEmrWUCZ4NUyoR7nhE' diff --git a/apps/viewer/src/features/blocks/integrations/sendEmail/sendEmail.spec.ts b/apps/viewer/src/features/blocks/integrations/sendEmail/sendEmail.spec.ts index 9b8d613b34..b7be76a757 100644 --- a/apps/viewer/src/features/blocks/integrations/sendEmail/sendEmail.spec.ts +++ b/apps/viewer/src/features/blocks/integrations/sendEmail/sendEmail.spec.ts @@ -1,6 +1,6 @@ import test, { expect } from '@playwright/test' import { createSmtpCredentials } from '../../../../test/utils/databaseActions' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { SmtpCredentialsData } from 'models' import { importTypebotInDatabase } from 'utils/playwright/databaseActions' import { typebotViewer } from 'utils/playwright/testHelpers' @@ -27,7 +27,7 @@ test.beforeAll(async () => { }) test('should send an email', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await importTypebotInDatabase(getTestAsset('typebots/sendEmail.json'), { id: typebotId, publicId: `${typebotId}-public`, diff --git a/apps/viewer/src/features/blocks/integrations/sendEmail/sendEmailV2.spec.ts b/apps/viewer/src/features/blocks/integrations/sendEmail/sendEmailV2.spec.ts index 2a72e4dca6..be3fbdccb6 100644 --- a/apps/viewer/src/features/blocks/integrations/sendEmail/sendEmailV2.spec.ts +++ b/apps/viewer/src/features/blocks/integrations/sendEmail/sendEmailV2.spec.ts @@ -1,6 +1,6 @@ import test, { expect } from '@playwright/test' import { createSmtpCredentials } from '../../../../test/utils/databaseActions' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { SmtpCredentialsData } from 'models' import { importTypebotInDatabase } from 'utils/playwright/databaseActions' import { getTestAsset } from '@/test/utils/playwright' @@ -26,7 +26,7 @@ test.beforeAll(async () => { }) test('should send an email', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await importTypebotInDatabase(getTestAsset('typebots/sendEmail.json'), { id: typebotId, publicId: `${typebotId}-public`, diff --git a/apps/viewer/src/features/blocks/integrations/webhook/webhook.spec.ts b/apps/viewer/src/features/blocks/integrations/webhook/webhook.spec.ts index 0250058790..f7f089ff31 100644 --- a/apps/viewer/src/features/blocks/integrations/webhook/webhook.spec.ts +++ b/apps/viewer/src/features/blocks/integrations/webhook/webhook.spec.ts @@ -1,5 +1,5 @@ import test, { expect } from '@playwright/test' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { HttpMethod, Typebot } from 'models' import { createWebhook, @@ -12,7 +12,7 @@ import { apiToken } from 'utils/playwright/databaseSetup' import { getTestAsset } from '@/test/utils/playwright' test.describe('Bot', () => { - const typebotId = cuid() + const typebotId = createId() test.beforeEach(async () => { await importTypebotInDatabase(getTestAsset('typebots/webhook.json'), { diff --git a/apps/viewer/src/features/blocks/integrations/webhook/webhookV2.spec.ts b/apps/viewer/src/features/blocks/integrations/webhook/webhookV2.spec.ts index 393fced4dc..3bb02f29eb 100644 --- a/apps/viewer/src/features/blocks/integrations/webhook/webhookV2.spec.ts +++ b/apps/viewer/src/features/blocks/integrations/webhook/webhookV2.spec.ts @@ -1,5 +1,5 @@ import test, { expect } from '@playwright/test' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { HttpMethod } from 'models' import { createWebhook, @@ -9,7 +9,7 @@ import { } from 'utils/playwright/databaseActions' import { getTestAsset } from '@/test/utils/playwright' -const typebotId = cuid() +const typebotId = createId() test.beforeEach(async () => { await importTypebotInDatabase(getTestAsset('typebots/webhook.json'), { diff --git a/apps/viewer/src/features/chat/chat.spec.ts b/apps/viewer/src/features/chat/chat.spec.ts index 8c2461e7b5..c32e1fb4f5 100644 --- a/apps/viewer/src/features/chat/chat.spec.ts +++ b/apps/viewer/src/features/chat/chat.spec.ts @@ -1,6 +1,6 @@ import { getTestAsset } from '@/test/utils/playwright' import test, { expect } from '@playwright/test' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import prisma from '@/lib/prisma' import { HttpMethod, SendMessageInput } from 'models' import { @@ -16,7 +16,7 @@ test.afterEach(async () => { }) test('API chat execution should work on preview bot', async ({ request }) => { - const typebotId = cuid() + const typebotId = createId() const publicId = `${typebotId}-public` await importTypebotInDatabase(getTestAsset('typebots/chat/main.json'), { id: typebotId, @@ -52,7 +52,7 @@ test('API chat execution should work on preview bot', async ({ request }) => { }) test('API chat execution should work on published bot', async ({ request }) => { - const typebotId = cuid() + const typebotId = createId() const publicId = `${typebotId}-public` await importTypebotInDatabase(getTestAsset('typebots/chat/main.json'), { id: typebotId, diff --git a/apps/viewer/src/features/results/results.spec.ts b/apps/viewer/src/features/results/results.spec.ts index ddbbfa269c..16f9876eb3 100644 --- a/apps/viewer/src/features/results/results.spec.ts +++ b/apps/viewer/src/features/results/results.spec.ts @@ -1,6 +1,6 @@ import { getTestAsset } from '@/test/utils/playwright' import test, { expect } from '@playwright/test' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { importTypebotInDatabase, injectFakeResults, @@ -9,7 +9,7 @@ import { apiToken } from 'utils/playwright/databaseSetup' import { typebotViewer } from 'utils/playwright/testHelpers' test('Big groups should work as expected', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await importTypebotInDatabase(getTestAsset('typebots/hugeGroup.json'), { id: typebotId, publicId: `${typebotId}-public`, @@ -32,7 +32,7 @@ test('Big groups should work as expected', async ({ page }) => { }) test('can list results with API', async ({ request }) => { - const typebotId = cuid() + const typebotId = createId() await importTypebotInDatabase(getTestAsset('typebots/api.json'), { id: typebotId, }) diff --git a/apps/viewer/src/features/results/resultsV2.spec.ts b/apps/viewer/src/features/results/resultsV2.spec.ts index c7d5b54682..6e573494ab 100644 --- a/apps/viewer/src/features/results/resultsV2.spec.ts +++ b/apps/viewer/src/features/results/resultsV2.spec.ts @@ -1,10 +1,10 @@ import { getTestAsset } from '@/test/utils/playwright' import test, { expect } from '@playwright/test' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { importTypebotInDatabase } from 'utils/playwright/databaseActions' test('Big groups should work as expected', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await importTypebotInDatabase(getTestAsset('typebots/hugeGroup.json'), { id: typebotId, publicId: `${typebotId}-public`, diff --git a/apps/viewer/src/features/settings/settings.spec.ts b/apps/viewer/src/features/settings/settings.spec.ts index f5beb72e52..ed65d00565 100644 --- a/apps/viewer/src/features/settings/settings.spec.ts +++ b/apps/viewer/src/features/settings/settings.spec.ts @@ -1,5 +1,5 @@ import test, { expect } from '@playwright/test' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { defaultSettings, defaultTextInputOptions, @@ -11,7 +11,7 @@ import { parseDefaultGroupWithBlock } from 'utils/playwright/databaseHelpers' import { typebotViewer } from 'utils/playwright/testHelpers' test('Result should be in storage by default', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, @@ -37,7 +37,7 @@ test('Result should be in storage by default', async ({ page }) => { test.describe('Create result on page refresh enabled', () => { test('should work', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, @@ -80,7 +80,7 @@ test.describe('Create result on page refresh enabled', () => { }) test('Hide query params', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, @@ -108,7 +108,7 @@ test('Hide query params', async ({ page }) => { }) test('Show close message', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, @@ -124,7 +124,7 @@ test('Show close message', async ({ page }) => { }) test('Should correctly parse metadata', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() const googleTagManagerId = 'GTM-M72NXKB' const customMetadata: Metadata = { description: 'My custom description', diff --git a/apps/viewer/src/features/settings/settingsV2.spec.ts b/apps/viewer/src/features/settings/settingsV2.spec.ts index 299374502f..b482a956e4 100644 --- a/apps/viewer/src/features/settings/settingsV2.spec.ts +++ b/apps/viewer/src/features/settings/settingsV2.spec.ts @@ -1,5 +1,5 @@ import test, { expect } from '@playwright/test' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { defaultSettings, defaultTextInputOptions, @@ -10,7 +10,7 @@ import { createTypebots, updateTypebot } from 'utils/playwright/databaseActions' import { parseDefaultGroupWithBlock } from 'utils/playwright/databaseHelpers' test('Result should be overwritten on page refresh', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, @@ -39,7 +39,7 @@ test('Result should be overwritten on page refresh', async ({ page }) => { test.describe('Create result on page refresh enabled', () => { test('should work', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, @@ -74,7 +74,7 @@ test.describe('Create result on page refresh enabled', () => { }) test('Hide query params', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, @@ -102,7 +102,7 @@ test('Hide query params', async ({ page }) => { }) test('Show close message', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await createTypebots([ { id: typebotId, @@ -118,7 +118,7 @@ test('Show close message', async ({ page }) => { }) test('Should correctly parse metadata', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() const customMetadata: Metadata = { description: 'My custom description', title: 'Custom title', diff --git a/apps/viewer/src/features/usage/usage.spec.ts b/apps/viewer/src/features/usage/usage.spec.ts index 72133f4a9a..f01e2a548f 100644 --- a/apps/viewer/src/features/usage/usage.spec.ts +++ b/apps/viewer/src/features/usage/usage.spec.ts @@ -1,6 +1,6 @@ import { getTestAsset } from '@/test/utils/playwright' import test, { expect } from '@playwright/test' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { Plan } from 'db' import { defaultSettings } from 'models' import { @@ -12,8 +12,8 @@ import { typebotViewer } from 'utils/playwright/testHelpers' test('should not start if chat limit is reached', async ({ page, context }) => { await test.step('Free plan', async () => { - const workspaceId = cuid() - const typebotId = cuid() + const workspaceId = createId() + const typebotId = createId() await createWorkspaces([{ id: workspaceId, plan: Plan.FREE }]) await importTypebotInDatabase(getTestAsset('typebots/fileUpload.json'), { id: typebotId, @@ -28,8 +28,8 @@ test('should not start if chat limit is reached', async ({ page, context }) => { }) await test.step('Lifetime plan', async () => { - const workspaceId = cuid() - const typebotId = cuid() + const workspaceId = createId() + const typebotId = createId() await createWorkspaces([{ id: workspaceId, plan: Plan.LIFETIME }]) await importTypebotInDatabase(getTestAsset('typebots/fileUpload.json'), { id: typebotId, @@ -44,8 +44,8 @@ test('should not start if chat limit is reached', async ({ page, context }) => { }) await test.step('Custom plan', async () => { - const workspaceId = cuid() - const typebotId = cuid() + const workspaceId = createId() + const typebotId = createId() await createWorkspaces([ { id: workspaceId, plan: Plan.CUSTOM, customChatsLimit: 1000 }, ]) diff --git a/apps/viewer/src/features/usage/usageV2.spec.ts b/apps/viewer/src/features/usage/usageV2.spec.ts index 0e411f69a4..c8e39af231 100644 --- a/apps/viewer/src/features/usage/usageV2.spec.ts +++ b/apps/viewer/src/features/usage/usageV2.spec.ts @@ -1,6 +1,6 @@ import { getTestAsset } from '@/test/utils/playwright' import test, { expect } from '@playwright/test' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { Plan } from 'db' import { defaultSettings } from 'models' import { @@ -11,8 +11,8 @@ import { test('should not start if chat limit is reached', async ({ page, context }) => { await test.step('Free plan', async () => { - const workspaceId = cuid() - const typebotId = cuid() + const workspaceId = createId() + const typebotId = createId() await createWorkspaces([{ id: workspaceId, plan: Plan.FREE }]) await importTypebotInDatabase(getTestAsset('typebots/fileUpload.json'), { id: typebotId, @@ -27,8 +27,8 @@ test('should not start if chat limit is reached', async ({ page, context }) => { }) await test.step('Lifetime plan', async () => { - const workspaceId = cuid() - const typebotId = cuid() + const workspaceId = createId() + const typebotId = createId() await createWorkspaces([{ id: workspaceId, plan: Plan.LIFETIME }]) await importTypebotInDatabase(getTestAsset('typebots/fileUpload.json'), { id: typebotId, @@ -41,8 +41,8 @@ test('should not start if chat limit is reached', async ({ page, context }) => { }) await test.step('Custom plan', async () => { - const workspaceId = cuid() - const typebotId = cuid() + const workspaceId = createId() + const typebotId = createId() await createWorkspaces([ { id: workspaceId, plan: Plan.CUSTOM, customChatsLimit: 1000 }, ]) diff --git a/apps/viewer/src/features/variables/variables.spec.ts b/apps/viewer/src/features/variables/variables.spec.ts index 665ab6bff8..9372df3576 100644 --- a/apps/viewer/src/features/variables/variables.spec.ts +++ b/apps/viewer/src/features/variables/variables.spec.ts @@ -1,11 +1,11 @@ import { getTestAsset } from '@/test/utils/playwright' import test, { expect } from '@playwright/test' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { importTypebotInDatabase } from 'utils/playwright/databaseActions' import { typebotViewer } from 'utils/playwright/testHelpers' test('should correctly be injected', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await importTypebotInDatabase( getTestAsset('typebots/predefinedVariables.json'), { id: typebotId, publicId: `${typebotId}-public` } diff --git a/apps/viewer/src/features/variables/variablesV2.spec.ts b/apps/viewer/src/features/variables/variablesV2.spec.ts index 758e05b440..b0a4fe2359 100644 --- a/apps/viewer/src/features/variables/variablesV2.spec.ts +++ b/apps/viewer/src/features/variables/variablesV2.spec.ts @@ -1,10 +1,10 @@ import { getTestAsset } from '@/test/utils/playwright' import test, { expect } from '@playwright/test' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { importTypebotInDatabase } from 'utils/playwright/databaseActions' test('should correctly be injected', async ({ page }) => { - const typebotId = cuid() + const typebotId = createId() await importTypebotInDatabase( getTestAsset('typebots/predefinedVariables.json'), { id: typebotId, publicId: `${typebotId}-public` } diff --git a/package.json b/package.json index f9671f4b60..f4023c2f48 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "cross-env": "7.0.3", "cz-emoji": "1.3.2-canary.2", "husky": "^8.0.3", - "turbo": "1.7.0" + "turbo": "1.7.4" }, "config": { "commitizen": { diff --git a/packages/bot-engine/tsup.config.js b/packages/bot-engine/tsup.config.js index 8b1306fa13..a8b59738d8 100644 --- a/packages/bot-engine/tsup.config.js +++ b/packages/bot-engine/tsup.config.js @@ -9,5 +9,5 @@ export default defineConfig((options) => ({ loader: { '.css': 'text', }, - external: ['cuid'], + external: ['@paralleldrive/cuid2'], })) diff --git a/packages/models/features/blocks/integrations/googleSheets/schemas.ts b/packages/models/features/blocks/integrations/googleSheets/schemas.ts index 31948359d9..17daa0e90d 100644 --- a/packages/models/features/blocks/integrations/googleSheets/schemas.ts +++ b/packages/models/features/blocks/integrations/googleSheets/schemas.ts @@ -1,6 +1,6 @@ import { z } from 'zod' import { ComparisonOperators, LogicalOperator } from '../../logic/condition' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { IntegrationBlockType } from '../enums' import { GoogleSheetsAction } from './enums' import { blockBaseSchema } from '../../baseSchemas' @@ -76,13 +76,13 @@ export const defaultGoogleSheetsGetOptions: GoogleSheetsGetOptions = { action: GoogleSheetsAction.GET, cellsToExtract: [ { - id: cuid(), + id: createId(), }, ], filter: { comparisons: [ { - id: cuid(), + id: createId(), }, ], logicalOperator: LogicalOperator.AND, @@ -93,7 +93,7 @@ export const defaultGoogleSheetsInsertOptions: GoogleSheetsInsertRowOptions = { action: GoogleSheetsAction.INSERT_ROW, cellsToInsert: [ { - id: cuid(), + id: createId(), }, ], } @@ -102,7 +102,7 @@ export const defaultGoogleSheetsUpdateOptions: GoogleSheetsUpdateRowOptions = { action: GoogleSheetsAction.UPDATE_ROW, cellsToUpsert: [ { - id: cuid(), + id: createId(), }, ], } diff --git a/packages/models/package.json b/packages/models/package.json index 689e4a936e..4bbbe9b11a 100644 --- a/packages/models/package.json +++ b/packages/models/package.json @@ -9,7 +9,7 @@ "zod": "3.20.2" }, "devDependencies": { - "cuid": "3.0.0", + "@paralleldrive/cuid2": "2.0.1", "db": "workspace:*", "next": "13.1.6", "tsconfig": "workspace:*", diff --git a/packages/utils/package.json b/packages/utils/package.json index 08a5451e29..b6594f4422 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -9,7 +9,7 @@ "@playwright/test": "1.30.0", "@types/nodemailer": "6.4.7", "aws-sdk": "2.1304.0", - "cuid": "3.0.0", + "@paralleldrive/cuid2": "2.0.1", "db": "workspace:*", "dotenv": "16.0.3", "models": "workspace:*", diff --git a/packages/utils/playwright/databaseActions.ts b/packages/utils/playwright/databaseActions.ts index 67b33907b8..1c02b08bd2 100644 --- a/packages/utils/playwright/databaseActions.ts +++ b/packages/utils/playwright/databaseActions.ts @@ -1,5 +1,5 @@ import { Plan, Prisma, PrismaClient, User, Workspace, WorkspaceRole } from 'db' -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { Typebot, Webhook } from 'models' import { readFileSync } from 'fs' import { proWorkspaceId, userId } from './databaseSetup' @@ -25,7 +25,7 @@ export const injectFakeResults = async ({ isChronological, fakeStorage, }: CreateFakeResultsProps) => { - const resultIdPrefix = customResultIdPrefix ?? cuid() + const resultIdPrefix = customResultIdPrefix ?? createId() await prisma.result.createMany({ data: [ ...Array.from(Array(count)).map((_, idx) => { @@ -115,7 +115,7 @@ export const deleteWebhooks = async (webhookIds: string[]) => { } export const createWorkspaces = async (workspaces: Partial[]) => { - const workspaceIds = workspaces.map((workspace) => workspace.id ?? cuid()) + const workspaceIds = workspaces.map((workspace) => workspace.id ?? createId()) await prisma.workspace.createMany({ data: workspaces.map((workspace, index) => ({ id: workspaceIds[index], @@ -166,7 +166,7 @@ export const createWebhook = async ( export const createTypebots = async (partialTypebots: Partial[]) => { const typebotsWithId = partialTypebots.map((typebot) => { - const typebotId = typebot.id ?? cuid() + const typebotId = typebot.id ?? createId() return { ...typebot, id: typebotId, diff --git a/packages/utils/playwright/databaseHelpers.ts b/packages/utils/playwright/databaseHelpers.ts index c9010fb0a0..7f6e4c79a4 100644 --- a/packages/utils/playwright/databaseHelpers.ts +++ b/packages/utils/playwright/databaseHelpers.ts @@ -1,4 +1,4 @@ -import cuid from 'cuid' +import { createId } from '@paralleldrive/cuid2' import { Block, defaultChoiceInputOptions, @@ -15,7 +15,7 @@ import { proWorkspaceId } from './databaseSetup' export const parseTestTypebot = ( partialTypebot: Partial ): Typebot => ({ - id: cuid(), + id: createId(), workspaceId: proWorkspaceId, folderId: null, name: 'My typebot', diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2c590b428a..1b2c76e0a4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,12 +7,12 @@ importers: cross-env: 7.0.3 cz-emoji: 1.3.2-canary.2 husky: ^8.0.3 - turbo: 1.7.0 + turbo: 1.7.4 devDependencies: cross-env: 7.0.3 cz-emoji: 1.3.2-canary.2 husky: 8.0.3 - turbo: 1.7.0 + turbo: 1.7.4 apps/builder: specifiers: @@ -40,6 +40,7 @@ importers: '@giphy/react-components': 6.5.2 '@googleapis/drive': 4.0.1 '@lezer/css': ^1.1.1 + '@paralleldrive/cuid2': 2.0.1 '@playwright/test': 1.30.0 '@sentry/nextjs': 7.36.0 '@stripe/stripe-js': 1.46.0 @@ -76,7 +77,6 @@ importers: canvas-confetti: 1.6.0 chakra-react-select: ^4.4.3 codemirror: 6.0.1 - cuid: 3.0.0 db: workspace:* deep-object-diff: 1.1.9 dequal: 2.0.3 @@ -149,6 +149,7 @@ importers: '@giphy/react-components': 6.5.2_57czaiyk6rdr5iy5tfs5pior4u '@googleapis/drive': 4.0.1 '@lezer/css': 1.1.1 + '@paralleldrive/cuid2': 2.0.1 '@sentry/nextjs': 7.36.0_next@13.1.6+react@18.2.0 '@stripe/stripe-js': 1.46.0 '@tanstack/react-query': 4.24.4_biqbaboplfbrettd7655fr4n2y @@ -171,7 +172,6 @@ importers: canvas-confetti: 1.6.0 chakra-react-select: 4.4.3_alpyulvd3cwjobv54jo7ctrw7u codemirror: 6.0.1_@lezer+common@1.0.2 - cuid: 3.0.0 deep-object-diff: 1.1.9 dequal: 2.0.3 emails: link:../../packages/emails @@ -353,6 +353,7 @@ importers: specifiers: '@babel/preset-env': 7.20.2 '@faire/mjml-react': 3.1.0 + '@paralleldrive/cuid2': 2.0.1 '@playwright/test': 1.30.0 '@sentry/nextjs': 7.36.0 '@trpc/server': 10.9.0 @@ -369,7 +370,6 @@ importers: aws-sdk: 2.1304.0 bot-engine: workspace:* cors: 2.8.5 - cuid: 3.0.0 db: workspace:* dotenv: 16.0.3 emails: workspace:* @@ -397,6 +397,7 @@ importers: utils: workspace:* zod: 3.20.2 dependencies: + '@paralleldrive/cuid2': 2.0.1 '@sentry/nextjs': 7.36.0_next@13.1.6+react@18.2.0 '@trpc/server': 10.9.0 '@typebot.io/js': link:../../packages/js @@ -404,7 +405,6 @@ importers: aws-sdk: 2.1304.0 bot-engine: link:../../packages/bot-engine cors: 2.8.5 - cuid: 3.0.0 db: link:../../packages/db google-spreadsheet: 3.3.0 got: 12.5.3 @@ -630,7 +630,7 @@ importers: packages/models: specifiers: - cuid: 3.0.0 + '@paralleldrive/cuid2': 2.0.1 db: workspace:* next: 13.1.6 tsconfig: workspace:* @@ -639,7 +639,7 @@ importers: dependencies: zod: 3.20.2 devDependencies: - cuid: 3.0.0 + '@paralleldrive/cuid2': 2.0.1 db: link:../db next: 13.1.6_biqbaboplfbrettd7655fr4n2y tsconfig: link:../tsconfig @@ -751,10 +751,10 @@ importers: packages/utils: specifiers: + '@paralleldrive/cuid2': 2.0.1 '@playwright/test': 1.30.0 '@types/nodemailer': 6.4.7 aws-sdk: 2.1304.0 - cuid: 3.0.0 db: workspace:* dotenv: 16.0.3 models: workspace:* @@ -763,10 +763,10 @@ importers: tsconfig: workspace:* typescript: 4.9.4 devDependencies: + '@paralleldrive/cuid2': 2.0.1 '@playwright/test': 1.30.0 '@types/nodemailer': 6.4.7 aws-sdk: 2.1304.0 - cuid: 3.0.0 db: link:../db dotenv: 16.0.3 models: link:../models @@ -6034,6 +6034,9 @@ packages: requiresBuild: true optional: true + /@noble/hashes/1.2.0: + resolution: {integrity: sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==} + /@nodelib/fs.scandir/2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -6056,6 +6059,11 @@ packages: resolution: {integrity: sha512-MSAs9t3Go7GUkMhpKC44T58DJ5KGk2vBo+h1cqQeqlMfdGkxaVB78ZWpv9gYi/g2fa4sopag9gJsNvS8XGgWJA==} dev: false + /@paralleldrive/cuid2/2.0.1: + resolution: {integrity: sha512-fi9nN5kCPGv9pcKQjk9g3riSTVcwR5TCFAGPUStbR61b1nXZ07GvxeoyStELKsJDCji1lwuUiUwLtagNTBllQA==} + dependencies: + '@noble/hashes': 1.2.0 + /@pkgr/utils/2.3.1: resolution: {integrity: sha512-wfzX8kc1PMyUILA+1Z/EqoE4UCXGy0iRGMhPwdfae1+f0OXlLqCk+By+aMzgJBzR9AzS4CDizioG6Ss1gvAFJw==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} @@ -10129,10 +10137,6 @@ packages: /csstype/3.1.1: resolution: {integrity: sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==} - /cuid/3.0.0: - resolution: {integrity: sha512-WZYYkHdIDnaxdeP8Misq3Lah5vFjJwGuItJuV+tvMafosMzw0nF297T7mrm8IOWiPJkV6gc7sa8pzx27+w25Zg==} - deprecated: Cuid and other k-sortable and non-cryptographic ids (Ulid, ObjectId, KSUID, all UUIDs) are all insecure. Use @paralleldrive/cuid2 instead. - /cz-emoji/1.3.2-canary.2: resolution: {integrity: sha512-XVH9N3P5sepyCRZGVqXJcEkVHT9dPcgBipTmZgkeQUhOJEtaGy0hakMcNdaq1d7N0ZwWVEnsCIs2m/NgLT+SaA==} engines: {node: '>=4'} @@ -19448,65 +19452,65 @@ packages: fsevents: 2.3.2 dev: true - /turbo-darwin-64/1.7.0: - resolution: {integrity: sha512-hSGAueSf5Ko8J67mpqjpt9FsP6ePn1nMcl7IVPoJq5dHsgX3anCP/BPlexJ502bNK+87DDyhQhJ/LPSJXKrSYQ==} + /turbo-darwin-64/1.7.4: + resolution: {integrity: sha512-ZyYrQlUl8K/mYN1e6R7bEhPPYjMakz0DYMaexkyD7TAijQtWmTSd4a+I7VknOYNEssnUZ/v41GU3gPV1JAzxxQ==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-darwin-arm64/1.7.0: - resolution: {integrity: sha512-BLLOW5W6VZxk5+0ZOj5AO1qjM0P5isIgjbEuyAl8lHZ4s9antUbY4CtFrspT32XxPTYoDl4UjviPMcSsbcl3WQ==} + /turbo-darwin-arm64/1.7.4: + resolution: {integrity: sha512-CKIXg9uqp1a+Yeq/c4U0alPOqvwLUq5SBZf1PGYhGqJsfG0fRBtJfkUjHuBsuJIOGXg8rCmcGSWGIsIF6fqYuw==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-linux-64/1.7.0: - resolution: {integrity: sha512-aw2qxmfZa+kT87SB3GNUoFimqEPzTlzlRqhPgHuAAT6Uf0JHnmebPt4K+ZPtDNl5yfVmtB05bhHPqw+5QV97Yg==} + /turbo-linux-64/1.7.4: + resolution: {integrity: sha512-RIUl4RUFFyzD2T024vL7509Ygwcw+SEa8NOwPfaN6TtJHK7RZV/SBP3fLNVOptG9WRLnOWX3OvsLMbiOqDLLyA==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-linux-arm64/1.7.0: - resolution: {integrity: sha512-AJEx2jX+zO5fQtJpO3r6uhTabj4oSA5ZhB7zTs/rwu/XqoydsvStA4X8NDW4poTbOjF7DcSHizqwi04tSMzpJw==} + /turbo-linux-arm64/1.7.4: + resolution: {integrity: sha512-Bg65F0AjYYYxqE6RPf2H5TIGuA/EyWMeGOATHVSZOWAbYcnG3Ly03GZii8AHnUi7ntWBdjwvXf/QbOS1ayNB6A==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-windows-64/1.7.0: - resolution: {integrity: sha512-ewj7PPv2uxqv0r31hgnBa3E5qwUu7eyVRP5M1gB/TJXfSHduU79gbxpKCyxIZv2fL/N2/3U7EPOQPSZxBAoljA==} + /turbo-windows-64/1.7.4: + resolution: {integrity: sha512-rTaV50XZ2BRxRHOHqt1UsWfeDmYLbn8UKE6g2D2ED+uW+kmnTvR9s01nmlGWd2sAuWcRYQyQ2V+O09VfKPKcQw==} cpu: [x64] os: [win32] requiresBuild: true dev: true optional: true - /turbo-windows-arm64/1.7.0: - resolution: {integrity: sha512-LzjOUzveWkvTD0jP8DBMYiAnYemmydsvqxdSmsUapHHJkl6wKZIOQNSO7pxsy+9XM/1/+0f9Y9F9ZNl5lePTEA==} + /turbo-windows-arm64/1.7.4: + resolution: {integrity: sha512-h8sxdKPvHTnWUPtwnYszFMmSO0P/iUUwmYY9n7iYThA71zSao28UeZ0H0Gw75cY3MPjvkjn2C4EBAUGPjuZJLw==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /turbo/1.7.0: - resolution: {integrity: sha512-cwympNwQNnQZ/TffBd8yT0i0O10Cf/hlxccCYgUcwhcGEb9rDjE5thDbHoHw1hlJQUF/5ua7ERJe7Zr0lNE/ww==} + /turbo/1.7.4: + resolution: {integrity: sha512-8RLedDoUL0kkVKWEZ/RMM70BvKLyDFen06QuKKhYC2XNOfNKqFDqzIdcY/vGick869bNIWalChoy4O07k0HLsA==} hasBin: true requiresBuild: true optionalDependencies: - turbo-darwin-64: 1.7.0 - turbo-darwin-arm64: 1.7.0 - turbo-linux-64: 1.7.0 - turbo-linux-arm64: 1.7.0 - turbo-windows-64: 1.7.0 - turbo-windows-arm64: 1.7.0 + turbo-darwin-64: 1.7.4 + turbo-darwin-arm64: 1.7.4 + turbo-linux-64: 1.7.4 + turbo-linux-arm64: 1.7.4 + turbo-windows-64: 1.7.4 + turbo-windows-arm64: 1.7.4 dev: true /type-check/0.3.2: