🐛 (embed) Make sure env.ts is not bundled in js embed lib

This commit is contained in:
Baptiste Arnaud
2023-08-29 14:52:44 +02:00
parent 5b20f414c8
commit da4005e160
19 changed files with 1813 additions and 68 deletions

View File

@@ -1,5 +1,6 @@
import { Variable, WebhookResponse } from '@typebot.io/schemas'
import { getViewerUrl, sendRequest } from '@typebot.io/lib'
import { sendRequest } from '@typebot.io/lib'
import { getViewerUrl } from '@typebot.io/lib/getViewerUrl'
export const executeWebhook = (
typebotId: string,

View File

@@ -1,7 +1,7 @@
import { authenticatedProcedure } from '@/helpers/server/trpc'
import { z } from 'zod'
import got, { HTTPError } from 'got'
import { getViewerUrl } from '@typebot.io/lib'
import { getViewerUrl } from '@typebot.io/lib/getViewerUrl'
import prisma from '@/lib/prisma'
import { TRPCError } from '@trpc/server'

View File

@@ -18,7 +18,7 @@ import {
Text,
Stack,
} from '@chakra-ui/react'
import { getViewerUrl } from '@typebot.io/lib'
import { getViewerUrl } from '@typebot.io/lib/getViewerUrl'
import { ModalProps } from '../EmbedButton'
export const FlutterFlowModal = ({

View File

@@ -1,6 +1,6 @@
import { FlexProps } from '@chakra-ui/react'
import { useTypebot } from '@/features/editor/providers/TypebotProvider'
import { getViewerUrl } from '@typebot.io/lib'
import { getViewerUrl } from '@typebot.io/lib/getViewerUrl'
import { CodeEditor } from '@/components/inputs/CodeEditor'
import prettier from 'prettier/standalone'
import parserHtml from 'prettier/parser-html'

View File

@@ -18,7 +18,7 @@ import {
Text,
Stack,
} from '@chakra-ui/react'
import { getViewerUrl } from '@typebot.io/lib'
import { getViewerUrl } from '@typebot.io/lib/getViewerUrl'
import { ModalProps } from '../EmbedButton'
export const NotionModal = ({

View File

@@ -40,7 +40,8 @@ import {
InputRightElement,
} from '@chakra-ui/react'
import { env } from '@typebot.io/env'
import { getViewerUrl, isEmpty, isNotEmpty } from '@typebot.io/lib/utils'
import { isEmpty, isNotEmpty } from '@typebot.io/lib/utils'
import { getViewerUrl } from '@typebot.io/lib/getViewerUrl'
import React, { useState } from 'react'
const steps = [

View File

@@ -12,7 +12,7 @@ import {
import { useState } from 'react'
import { StandardSettings } from '../../../settings/StandardSettings'
import { isCloudProdInstance } from '@/helpers/isCloudProdInstance'
import { getViewerUrl } from '@typebot.io/lib'
import { getViewerUrl } from '@typebot.io/lib/getViewerUrl'
type Props = {
publicId: string

View File

@@ -1,7 +1,8 @@
import { BotProps } from '@typebot.io/nextjs'
import parserBabel from 'prettier/parser-babel'
import prettier from 'prettier/standalone'
import { getViewerUrl, isDefined } from '@typebot.io/lib'
import { isDefined } from '@typebot.io/lib'
import { getViewerUrl } from '@typebot.io/lib/getViewerUrl'
import { Typebot } from '@typebot.io/schemas'
import { isCloudProdInstance } from '@/helpers/isCloudProdInstance'
import packageJson from '../../../../../../../../packages/embeds/js/package.json'

View File

@@ -1,7 +1,7 @@
import { Seo } from '@/components/Seo'
import { Flex } from '@chakra-ui/react'
import { Standard } from '@typebot.io/nextjs'
import { getViewerUrl } from '@typebot.io/lib'
import { getViewerUrl } from '@typebot.io/lib/getViewerUrl'
import { SettingsSideMenu } from './SettingsSideMenu'
import { TypebotHeader } from '@/features/editor/components/TypebotHeader'
import { useTypebot } from '@/features/editor/providers/TypebotProvider'