♻️ Re-organize workspace folders

This commit is contained in:
Baptiste Arnaud
2023-03-15 08:35:16 +01:00
parent 25c367901f
commit cbc8194f19
987 changed files with 2716 additions and 2770 deletions

View File

@@ -1,7 +1,7 @@
import { PrismaClient } from 'db'
import { PrismaClient } from '@typebot.io/prisma'
import { promptAndSetEnvironment } from './utils'
import { Result } from 'models'
import { isDefined, isNotDefined } from 'utils'
import { Result } from '@typebot.io/schemas'
import { isDefined, isNotDefined } from '@typebot.io/lib'
let progress = 0

View File

@@ -1,4 +1,4 @@
import { PrismaClient } from 'db'
import { PrismaClient } from '@typebot.io/prisma'
import { promptAndSetEnvironment } from './utils'
const prisma = new PrismaClient()

View File

@@ -1,4 +1,4 @@
import { PrismaClient } from 'db'
import { PrismaClient } from '@typebot.io/prisma'
import { writeFileSync } from 'fs'
import {
Block,
@@ -11,8 +11,8 @@ import {
publicTypebotSchema,
Theme,
Typebot,
} from 'models'
import { isDefined, isNotDefined } from 'utils'
} from '@typebot.io/schemas'
import { isDefined, isNotDefined } from '@typebot.io/lib'
import { promptAndSetEnvironment } from './utils'
import { detailedDiff } from 'deep-object-diff'

View File

@@ -1,5 +1,5 @@
{
"name": "scripts",
"name": "@typebot.io/scripts",
"version": "1.0.0",
"main": "index.js",
"license": "AGPL-3.0-or-later",
@@ -17,16 +17,16 @@
"devDependencies": {
"@types/node": "18.15.3",
"@types/prompts": "2.4.3",
"db": "workspace:*",
"@typebot.io/prisma": "workspace:*",
"deep-object-diff": "1.1.9",
"emails": "workspace:*",
"@typebot.io/emails": "workspace:*",
"got": "12.6.0",
"models": "workspace:*",
"@typebot.io/schemas": "workspace:*",
"prompts": "2.4.2",
"stripe": "11.14.0",
"tsx": "3.12.5",
"typescript": "4.9.5",
"utils": "workspace:*",
"@typebot.io/lib": "workspace:*",
"zod": "3.21.4"
}
}

View File

@@ -1,6 +1,6 @@
import { PrismaClient } from 'db'
import { PrismaClient } from '@typebot.io/prisma'
import { promptAndSetEnvironment } from './utils'
import { groupSchema } from 'models'
import { groupSchema } from '@typebot.io/schemas'
import { readFileSync, writeFileSync } from 'fs'
import { exit } from 'process'

View File

@@ -1,8 +1,8 @@
import { PrismaClient, WorkspaceRole } from 'db'
import { isDefined } from 'utils'
import { PrismaClient, WorkspaceRole } from '@typebot.io/prisma'
import { isDefined } from '@typebot.io/lib'
import { promptAndSetEnvironment } from './utils'
import { TelemetryEvent } from 'models/features/telemetry'
import { sendTelemetryEvents } from 'utils/telemetry/sendTelemetryEvent'
import { TelemetryEvent } from '@typebot.io/schemas/features/telemetry'
import { sendTelemetryEvents } from '@typebot.io/lib/telemetry/sendTelemetryEvent'
const prisma = new PrismaClient()

View File

@@ -1,4 +1,4 @@
import { Plan, PrismaClient } from 'db'
import { Plan, PrismaClient } from '@typebot.io/prisma'
import Stripe from 'stripe'
import { promptAndSetEnvironment } from './utils'

View File

@@ -1,6 +1,6 @@
import { join } from 'path'
import prompts from 'prompts'
import { isEmpty } from 'utils'
import { isEmpty } from '@typebot.io/lib'
export const promptAndSetEnvironment = async (
skipPrompt?: 'local' | 'staging' | 'production'