🚧 Use TS project references
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { TRPCError } from '@trpc/server'
|
||||
import { isDefined, isNotDefined, isNotEmpty } from '@typebot.io/lib/utils'
|
||||
import { isDefined, isNotDefined } from '@typebot.io/lib/utils'
|
||||
import { getSession } from '../queries/getSession'
|
||||
import { continueBotFlow } from '../continueBotFlow'
|
||||
import { filterPotentiallySensitiveLogs } from '../logs/filterPotentiallySensitiveLogs'
|
||||
|
||||
@@ -7,7 +7,6 @@ import { isDefined } from '@typebot.io/lib'
|
||||
import { filterChoiceItems } from './filterChoiceItems'
|
||||
import { deepParseVariables } from '@typebot.io/variables/deepParseVariables'
|
||||
import { transformVariablesToList } from '@typebot.io/variables/transformVariablesToList'
|
||||
import { updateVariablesInSession } from '@typebot.io/variables/updateVariablesInSession'
|
||||
|
||||
export const injectVariableValuesInButtonsInputBlock =
|
||||
(state: SessionState) =>
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
import {
|
||||
Block,
|
||||
Credentials,
|
||||
SessionState,
|
||||
TypebotInSession,
|
||||
} from '@typebot.io/schemas'
|
||||
import { Block, SessionState, TypebotInSession } from '@typebot.io/schemas'
|
||||
import {
|
||||
ChatCompletionOpenAIOptions,
|
||||
OpenAICredentials,
|
||||
@@ -176,6 +171,3 @@ const getNextBlock =
|
||||
)
|
||||
: connectedGroup?.blocks.at(0)
|
||||
}
|
||||
|
||||
const isCredentialsV2 = (credentials: Pick<Credentials, 'iv'>) =>
|
||||
credentials.iv.length === 24
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { DefaultBotNotificationEmail, render } from '@typebot.io/emails'
|
||||
import {
|
||||
AnswerInSessionState,
|
||||
ChatLog,
|
||||
@@ -20,6 +19,8 @@ import prisma from '@typebot.io/lib/prisma'
|
||||
import { parseVariables } from '@typebot.io/variables/parseVariables'
|
||||
import { defaultSendEmailOptions } from '@typebot.io/schemas/features/blocks/integrations/sendEmail/constants'
|
||||
import { parseAnswers } from '@typebot.io/results/parseAnswers'
|
||||
import { DefaultBotNotificationEmail } from '@typebot.io/emails/src/emails/DefaultBotNotificationEmail'
|
||||
import { render } from '@typebot.io/emails/src/index'
|
||||
|
||||
export const sendEmailSuccessDescription = 'Email successfully sent'
|
||||
export const sendEmailErrorDescription = 'Email not sent'
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { User } from '@typebot.io/prisma'
|
||||
import {
|
||||
Block,
|
||||
PublicTypebot,
|
||||
|
||||
@@ -28,11 +28,11 @@ import { env } from '@typebot.io/env'
|
||||
import { TRPCError } from '@trpc/server'
|
||||
import { ExecuteIntegrationResponse, ExecuteLogicResponse } from './types'
|
||||
import { createId } from '@paralleldrive/cuid2'
|
||||
import {
|
||||
BubbleBlockWithDefinedContent,
|
||||
parseBubbleBlock,
|
||||
} from './parseBubbleBlock'
|
||||
import { BubbleBlockType } from '@typebot.io/schemas/features/blocks/bubbles/constants'
|
||||
import {
|
||||
parseBubbleBlock,
|
||||
BubbleBlockWithDefinedContent,
|
||||
} from '@typebot.io/logic/parseBubbleBlock'
|
||||
|
||||
type ContextProps = {
|
||||
version: 1 | 2
|
||||
|
||||
@@ -206,6 +206,3 @@ const getNextBlock =
|
||||
)
|
||||
: connectedGroup?.blocks.at(0)
|
||||
}
|
||||
|
||||
const isCredentialsV2 = (credentials: { iv: string }) =>
|
||||
credentials.iv.length === 24
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
"version": "1.0.0",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"private": true,
|
||||
"main": "./index.ts",
|
||||
"types": "./index.ts",
|
||||
"dependencies": {
|
||||
"@paralleldrive/cuid2": "2.2.1",
|
||||
"@planetscale/database": "1.8.0",
|
||||
@@ -17,7 +15,6 @@
|
||||
"@typebot.io/prisma": "workspace:*",
|
||||
"@typebot.io/results": "workspace:*",
|
||||
"@typebot.io/schemas": "workspace:*",
|
||||
"@typebot.io/tsconfig": "workspace:*",
|
||||
"@typebot.io/variables": "workspace:*",
|
||||
"@udecode/plate-common": "30.4.5",
|
||||
"ai": "3.3.15",
|
||||
|
||||
@@ -41,7 +41,6 @@ import { IntegrationBlockType } from '@typebot.io/schemas/features/blocks/integr
|
||||
import { VisitedEdge } from '@typebot.io/prisma'
|
||||
import { env } from '@typebot.io/env'
|
||||
import { getFirstEdgeId } from './getFirstEdgeId'
|
||||
import { Reply } from './types'
|
||||
import {
|
||||
defaultGuestAvatarIsEnabled,
|
||||
defaultHostAvatarIsEnabled,
|
||||
|
||||
@@ -1,9 +1,43 @@
|
||||
{
|
||||
"extends": "@typebot.io/tsconfig/base.json",
|
||||
"include": ["**/*.ts", "**/*.tsx"],
|
||||
"exclude": ["node_modules"],
|
||||
"extends": "../tsconfig/base.json",
|
||||
"include": [
|
||||
"**/*.ts",
|
||||
"**/*.tsx"
|
||||
],
|
||||
"compilerOptions": {
|
||||
"jsx": "preserve",
|
||||
"lib": ["ES2021"]
|
||||
}
|
||||
"outDir": "dist"
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
"path": "../emails"
|
||||
},
|
||||
{
|
||||
"path": "../env"
|
||||
},
|
||||
{
|
||||
"path": "../forge/core"
|
||||
},
|
||||
{
|
||||
"path": "../forge/repository"
|
||||
},
|
||||
{
|
||||
"path": "../lib"
|
||||
},
|
||||
{
|
||||
"path": "../logic"
|
||||
},
|
||||
{
|
||||
"path": "../prisma"
|
||||
},
|
||||
{
|
||||
"path": "../results"
|
||||
},
|
||||
{
|
||||
"path": "../schemas"
|
||||
},
|
||||
{
|
||||
"path": "../variables"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user