refactor: ♻️ Migrate from short-uuid to cuid lib
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
ENCRYPTION_SECRET=SgVkYp2s5v8y/B?E(H+MbQeThWmZq4t6 #256-bits secret (can be generated here: https://www.allkeysgenerator.com/Random/Security-Encryption-Key-Generator.aspx)
|
||||
NEXT_PUBLIC_VIEWER_URL=http://localhost:3001
|
||||
DATABASE_URL=postgresql://postgres:@localhost:5432/typebot
|
||||
DATABASE_URL=postgresql://postgres:typebot@localhost:5432/typebot
|
||||
|
||||
# For more configuration options check out:
|
||||
https://docs.typebot.io/self-hosting/configuration
|
@ -15,13 +15,14 @@
|
||||
"@sentry/nextjs": "^6.18.2",
|
||||
"bot-engine": "*",
|
||||
"cors": "^2.8.5",
|
||||
"cuid": "^2.1.8",
|
||||
"db": "*",
|
||||
"google-spreadsheet": "^3.2.0",
|
||||
"got": "^12.0.1",
|
||||
"qs": "^6.10.3",
|
||||
"models": "*",
|
||||
"next": "^12.1.0",
|
||||
"nodemailer": "^6.7.2",
|
||||
"qs": "^6.10.3",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"utils": "*"
|
||||
@ -32,8 +33,8 @@
|
||||
"@types/google-spreadsheet": "^3.1.5",
|
||||
"@types/node": "^17.0.21",
|
||||
"@types/nodemailer": "^6.4.4",
|
||||
"@types/react": "^17.0.40",
|
||||
"@types/qs": "^6.9.7",
|
||||
"@types/react": "^17.0.40",
|
||||
"@typescript-eslint/eslint-plugin": "^5.14.0",
|
||||
"eslint": "<8.0.0",
|
||||
"eslint-config-next": "12.1.0",
|
||||
|
@ -2,10 +2,10 @@ import test, { expect } from '@playwright/test'
|
||||
import path from 'path'
|
||||
import { importTypebotInDatabase } from '../services/database'
|
||||
import { typebotViewer } from '../services/selectorUtils'
|
||||
import { generate } from 'short-uuid'
|
||||
import cuid from 'cuid'
|
||||
|
||||
test('should work as expected', async ({ page }) => {
|
||||
const typebotId = generate()
|
||||
const typebotId = cuid()
|
||||
await importTypebotInDatabase(
|
||||
path.join(__dirname, '../fixtures/typebots/hugeBlock.json'),
|
||||
{ id: typebotId, publicId: `${typebotId}-public` }
|
||||
|
@ -1,6 +1,5 @@
|
||||
import test, { expect } from '@playwright/test'
|
||||
import { createTypebots, parseDefaultBlockWithStep } from '../services/database'
|
||||
import { generate } from 'short-uuid'
|
||||
import {
|
||||
defaultSettings,
|
||||
defaultTextInputOptions,
|
||||
@ -8,9 +7,10 @@ import {
|
||||
Metadata,
|
||||
} from 'models'
|
||||
import { typebotViewer } from '../services/selectorUtils'
|
||||
import cuid from 'cuid'
|
||||
|
||||
test('Should correctly parse metadata', async ({ page }) => {
|
||||
const typebotId = generate()
|
||||
const typebotId = cuid()
|
||||
const customMetadata: Metadata = {
|
||||
description: 'My custom description',
|
||||
title: 'Custom title',
|
||||
|
@ -1,10 +1,10 @@
|
||||
import test, { expect } from '@playwright/test'
|
||||
import { createTypebots, parseDefaultBlockWithStep } from '../services/database'
|
||||
import { generate } from 'short-uuid'
|
||||
import cuid from 'cuid'
|
||||
import { defaultSettings, defaultTextInputOptions, InputStepType } from 'models'
|
||||
|
||||
test('Result should be in storage by default', async ({ page }) => {
|
||||
const typebotId = generate()
|
||||
const typebotId = cuid()
|
||||
await createTypebots([
|
||||
{
|
||||
id: typebotId,
|
||||
@ -28,7 +28,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 = generate()
|
||||
const typebotId = cuid()
|
||||
await createTypebots([
|
||||
{
|
||||
id: typebotId,
|
||||
|
Reference in New Issue
Block a user