2
0

🚧 Use TS project references

This commit is contained in:
Baptiste Arnaud
2024-08-28 18:09:35 +02:00
parent 0c7d2afd51
commit fdd6cc6fee
627 changed files with 3043 additions and 1696 deletions

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/icon'
import React from 'react'
export const AccessibilityIcon = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/icon'
import React from 'react'
export const ArrowRight = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/icon'
import React from 'react'
export const CalculatorIcon = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/icon'
import React from 'react'
export const CheckCircleIcon = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/icon'
import React from 'react'
import { featherIconsBaseProps } from '.'
export const CheckIcon = (props: IconProps) => (

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/icon'
import React from 'react'
export const ChevronDownIcon = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/icon'
import React from 'react'
export const ChevronRightIcon = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/react'
import React from 'react'
import { featherIconsBaseProps } from './HamburgerIcon'
export const CloseIcon = (props: IconProps) => (

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/icon'
import React from 'react'
export const ConditionIcon = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/icon'
import React from 'react'
export const DoIcon = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/icon'
import React from 'react'
export const DocIcon = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/icon'
import React from 'react'
export const DontIcon = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/icon'
import React from 'react'
export const FolderIcon = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/react'
import React from 'react'
export const GitHubIcon = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/icon'
import React from 'react'
export const featherIconsBaseProps: IconProps = {
fill: 'none',

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/icon'
import React from 'react'
export const Logo = (props: IconProps) => (
<Icon w="50px" h="50px" viewBox="0 0 800 800" {...props}>

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/icon'
import React from 'react'
export const MapIcon = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/icon'
import React from 'react'
export const PeopleCircleIcon = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/icon'
import React from 'react'
export const PersonAddIcon = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/icon'
import React from 'react'
export const QuoteLeftIcon = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/icon'
import React from 'react'
export const ShareIcon = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/react'
import React from 'react'
export const Flare = (props: IconProps & { color: 'blue' | 'orange' }) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/react'
import React from 'react'
export const HandDrawnArrow = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/react'
import React from 'react'
export const AirtableLogo = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/react'
import React from 'react'
export const CalendlyLogo = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/react'
import React from 'react'
export const GmailLogo = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/react'
import React from 'react'
export const GoogleCalendarLogo = (props: IconProps) => (
<Icon xmlns="http://www.w3.org/2000/svg" viewBox="186 38 76 76" {...props}>

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/react'
import React from 'react'
export const GoogleDriveLogo = (props: IconProps) => (
<Icon viewBox="0 0 87.3 78" xmlns="http://www.w3.org/2000/svg" {...props}>

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/react'
import React from 'react'
export const GoogleSheetLogo = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/react'
import React from 'react'
export const HubspotLogo = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/react'
import React from 'react'
export const MailChimpLogo = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/react'
import React from 'react'
export const N8nLogo = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/react'
import React from 'react'
export const NotionLogo = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/react'
import React from 'react'
export const PipedriveLogo = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/react'
import React from 'react'
export const SalesforceLogo = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/react'
import React from 'react'
export const ShopifyLogo = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/react'
import React from 'react'
export const SlackLogo = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/react'
import React from 'react'
export const WebflowLogo = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/react'
import React from 'react'
export const WixLogo = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/react'
import React from 'react'
export const WordpressLogo = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Icon, IconProps } from '@chakra-ui/react'
import React from 'react'
export const ZapierLogo = (props: IconProps) => (
<Icon

View File

@@ -1,5 +1,4 @@
import { Flex, Stack, Heading, Box, Text, Button } from '@chakra-ui/react'
import React from 'react'
import Image from 'next/image'
import builderDndSrc from 'public/images/builder-dnd.png'
import { ArrowRight } from 'assets/icons/ArrowRight'

View File

@@ -1,5 +1,4 @@
import { Flex, Stack, Heading, Box, Text, Button } from '@chakra-ui/react'
import React from 'react'
import Image from 'next/image'
import nativeFeelingSrc from 'public/images/native-feeling.png'
import { ArrowRight } from 'assets/icons/ArrowRight'

View File

@@ -9,7 +9,6 @@ import {
StackProps,
} from '@chakra-ui/react'
import Link from 'next/link'
import React from 'react'
import { BackgroundPolygons } from './Hero/BackgroundPolygons'
type Props = {

View File

@@ -1,5 +1,5 @@
import { IconProps, Text, Flex, VStack } from '@chakra-ui/react'
import React, { useState } from 'react'
import { useState } from 'react'
type FeatureCardProps = {
Icon: (props: IconProps) => JSX.Element

View File

@@ -1,4 +1,3 @@
import React from 'react'
import {
Flex,
Heading,

View File

@@ -1,5 +1,4 @@
import { chakra } from '@chakra-ui/react'
import React from 'react'
type Props = {
baseTop?: string

View File

@@ -16,7 +16,6 @@ import {
GoogleDriveLogo,
N8nLogo,
} from 'assets/logos'
import React from 'react'
const firstRowIcons = [
GmailLogo,

View File

@@ -10,7 +10,7 @@ import {
Checkbox,
Textarea,
} from '@chakra-ui/react'
import React, { useEffect, useState } from 'react'
import { useEffect, useState } from 'react'
import { PublicTypebot } from '@typebot.io/schemas'
import { sendRequest } from '@typebot.io/lib'
import { DontIcon } from 'assets/icons/DontIcon'

View File

@@ -4,7 +4,7 @@ import { ArrowRight } from 'assets/icons/ArrowRight'
import { HandDrawnArrow } from 'assets/illustrations/HandDrawnArrow'
import { PublicTypebot, Typebot } from '@typebot.io/schemas'
import Link from 'next/link'
import React, { useEffect, useRef, useState } from 'react'
import { useEffect, useRef, useState } from 'react'
import { sendRequest } from '@typebot.io/lib'
const nameBlockId = 'shuUtMDMw9P4iAHbz7B5SqJ'

View File

@@ -1,7 +1,6 @@
import { chakra, Tooltip, Text, Button } from '@chakra-ui/react'
import { HelpCircleIcon } from 'assets/icons/HelpCircleIcon'
import Link from 'next/link'
import React from 'react'
import { PricingCard } from './PricingCard'
import { chatsLimits } from '@typebot.io/billing/constants'

View File

@@ -18,7 +18,6 @@ import { CheckIcon } from 'assets/icons/CheckIcon'
import { HelpCircleIcon } from 'assets/icons/HelpCircleIcon'
import { Plan } from '@typebot.io/prisma'
import Link from 'next/link'
import React from 'react'
import { parseNumberWithCommas } from '@typebot.io/lib'
import { chatsLimits, prices, seatsLimits } from '@typebot.io/billing/constants'
import { formatPrice } from '@typebot.io/billing/helpers/formatPrice'

View File

@@ -9,7 +9,6 @@ import {
} from '@chakra-ui/react'
import { HelpCircleIcon } from 'assets/icons/HelpCircleIcon'
import { Plan } from '@typebot.io/prisma'
import React from 'react'
import { PricingCard } from './PricingCard'
import { prices, seatsLimits } from '@typebot.io/billing/constants'

View File

@@ -2,7 +2,6 @@ import { chakra, Tooltip, Text, HStack, Button, Stack } from '@chakra-ui/react'
import { HelpCircleIcon } from 'assets/icons/HelpCircleIcon'
import { Plan } from '@typebot.io/prisma'
import Link from 'next/link'
import React from 'react'
import { PricingCard } from './PricingCard'
import { prices, seatsLimits } from '@typebot.io/billing/constants'

View File

@@ -1,5 +1,4 @@
import { VStack, Heading, Button, Text } from '@chakra-ui/react'
import React from 'react'
export const ArticleCallToAction = () => (
<VStack spacing={6}>

View File

@@ -1,6 +1,6 @@
'use client'
import React, { ReactNode } from 'react'
import { ReactNode } from 'react'
import {
Box,

View File

@@ -1,5 +1,4 @@
import Head from 'next/head'
import React from 'react'
export const SocialMetaTags = ({
title = 'Typebot - Open-source conversational apps builder',

View File

@@ -1,7 +1,7 @@
import { CheckCircleIcon } from 'assets/icons/CheckCircleIcon'
import { CloseIcon } from 'assets/icons/CloseIcon'
import { Td, Text } from '@chakra-ui/react'
import React, { ReactNode } from 'react'
import { ReactNode } from 'react'
export const Yes = (props: { children?: ReactNode }) => (
<Td display={props.children ? 'flex' : ''}>

View File

@@ -1,5 +1,4 @@
import Link, { LinkProps } from 'next/link'
import React from 'react'
import { chakra, HStack, TextProps } from '@chakra-ui/react'
import { ExternalLinkIcon } from 'assets/icons/ExternalLinkIcon'

View File

@@ -227,7 +227,7 @@ module.exports = {
Create a `ChatComponent.tsx` file:
```tsx
import React, { useState } from 'react'
import { useState } from 'react'
const ChatComponent: React.FC = () => {
const [messages, setMessages] = useState<
@@ -501,7 +501,7 @@ app.post('/api/chat', (req, res) => {
Create a `ChatComponent.tsx` in your React src directory:
```tsx
import React, { useState } from 'react'
import { useState } from 'react'
import axios from 'axios'
const ChatComponent: React.FC = () => {

View File

@@ -4,7 +4,12 @@ configureRuntimeEnv()
/** @type {import('next').NextConfig} */
const nextConfig = {
transpilePackages: ['utils', 'models'],
typescript: {
ignoreBuildErrors: true,
},
eslint: {
ignoreDuringBuilds: true,
},
async redirects() {
return [
{

View File

@@ -36,20 +36,17 @@
"@chakra-ui/styled-system": "2.9.2",
"@tailwindcss/typography": "0.5.12",
"@typebot.io/env": "workspace:*",
"@typebot.io/tsconfig": "workspace:*",
"@types/aos": "3.0.4",
"@types/node": "20.4.2",
"@types/react": "18.2.15",
"@types/react": "18.3.4",
"autoprefixer": "10.4.14",
"cross-env": "7.0.3",
"dotenv-cli": "7.4.1",
"eslint": "8.44.0",
"eslint-config-custom": "workspace:*",
"next-runtime-env": "1.6.2",
"next-transpile-modules": "10.0.0",
"postcss": "8.4.26",
"prettier": "3.0.0",
"tailwindcss": "3.3.3",
"typescript": "5.4.5"
"tailwindcss": "3.3.3"
}
}

View File

@@ -1,4 +1,4 @@
import React, { useEffect } from 'react'
import { useEffect } from 'react'
import 'assets/style.css'
import { ChakraProvider } from '@chakra-ui/react'
import 'focus-visible/dist/focus-visible'

View File

@@ -1,7 +1,6 @@
import { Stack, Text, Flex, Heading, List, ListItem } from '@chakra-ui/react'
import { Header } from 'components/common/Header/Header'
import { SocialMetaTags } from 'components/common/SocialMetaTags'
import React from 'react'
import { Footer } from 'components/common/Footer'
import { EndCta } from 'components/Homepage/EndCta'

View File

@@ -1,7 +1,6 @@
import { Stack, Heading } from '@chakra-ui/react'
import { Header } from 'components/common/Header/Header'
import { SocialMetaTags } from 'components/common/SocialMetaTags'
import React from 'react'
const PrivacyPolicies = () => {
return (

View File

@@ -1,16 +1,47 @@
{
"extends": "@typebot.io/tsconfig/nextjs.json",
"extends": "../../../packages/tsconfig/nextjs.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./*"]
"@/*": [
"./*"
]
},
"plugins": [
{
"name": "next"
}
],
"strictNullChecks": true
"strictNullChecks": true,
"noEmit": true
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"]
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"references": [
{
"path": "../../../packages/embeds/nextjs"
},
{
"path": "../../../packages/env"
},
{
"path": "../../../packages/lib"
},
{
"path": "../../../packages/prisma"
},
{
"path": "../../../packages/schemas"
},
{
"path": "../../packages/billing"
}
],
"exclude": [
"node_modules"
]
}

View File

@@ -2,7 +2,6 @@
"name": "@typebot.io/billing",
"version": "1.0.0",
"description": "",
"main": "index.js",
"license": "UNLICENSED",
"private": true,
"scripts": {
@@ -22,7 +21,5 @@
"next": "14.1.0",
"micro": "10.0.1"
},
"devDependencies": {
"@typebot.io/tsconfig": "workspace:*"
}
"devDependencies": {}
}

View File

@@ -1,8 +1,27 @@
{
"extends": "@typebot.io/tsconfig/base.json",
"extends": "../../../packages/tsconfig/base.json",
"include": ["**/*.ts"],
"exclude": ["node_modules"],
"compilerOptions": {
"lib": ["ES2021", "DOM"]
}
"outDir": "dist"
},
"references": [
{
"path": "../../../packages/db-rules"
},
{
"path": "../../../packages/env"
},
{
"path": "../../../packages/lib"
},
{
"path": "../../../packages/prisma"
},
{
"path": "../../../packages/schemas"
},
{
"path": "../../../packages/telemetry"
}
]
}