2
0

build: 📦️ Update packages

This commit is contained in:
Baptiste Arnaud
2022-02-14 18:04:23 +01:00
parent bdfd7ac1bc
commit e7d1f5d674
15 changed files with 312 additions and 119 deletions

View File

@@ -7,11 +7,11 @@
"types": "dist/index.d.ts",
"dependencies": {
"db": "*",
"fast-equals": "^2.0.4",
"fast-equals": "^3.0.0",
"models": "*",
"qs": "^6.10.3",
"react-frame-component": "5.2.2-alpha.0",
"react-phone-number-input": "^3.1.45",
"react-phone-number-input": "^3.1.46",
"react-scroll": "^1.8.4",
"react-transition-group": "^4.4.2",
"utils": "*"
@@ -21,23 +21,23 @@
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.1.3",
"@rollup/plugin-typescript": "^8.3.0",
"@types/react": "^17.0.38",
"@types/react": "^17.0.39",
"@types/react-phone-number-input": "^3.0.13",
"@types/react-scroll": "^1.8.3",
"@types/react-transition-group": "^4.4.4",
"autoprefixer": "^10.4.2",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.5",
"rollup": "^2.66.1",
"postcss": "^8.4.6",
"rollup": "^2.67.2",
"rollup-plugin-dts": "^4.1.0",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-terser": "^7.0.2",
"tailwindcss": "^3.0.17",
"tailwindcss": "^3.0.22",
"typescript": "^4.5.5",
"@typescript-eslint/eslint-plugin": "^5.10.1",
"@typescript-eslint/eslint-plugin": "^5.11.0",
"eslint": "<8.0.0",
"eslint-config-next": "12.0.9",
"eslint-config-next": "12.0.10",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-prettier": "^4.0.0"

View File

@@ -15,9 +15,10 @@
"scripts": {
"dev": "dotenv -e ../../apps/builder/.env.local yarn prisma db push && yarn start:sutdio ",
"start:sutdio": "dotenv -e ../../apps/builder/.env.local -v BROWSER=none yarn prisma studio",
"build": "yarn migration:push",
"build": "yarn migration:deploy",
"migration:push": "dotenv -e ../../apps/builder/.env.local yarn prisma db push",
"migration:create": "dotenv -e ../../apps/builder/.env.local yarn prisma migrate dev",
"migration:reset": "dotenv -e ../../apps/builder/.env.local yarn prisma migrate reset"
"migration:reset": "dotenv -e ../../apps/builder/.env.local yarn prisma migrate reset",
"migration:deploy": "yarn prisma migrate deploy"
}
}

View File

@@ -0,0 +1,201 @@
-- CreateEnum
CREATE TYPE "Plan" AS ENUM ('FREE', 'PRO', 'LIFETIME', 'OFFERED');
-- CreateTable
CREATE TABLE "Account" (
"id" TEXT NOT NULL,
"userId" TEXT NOT NULL,
"type" TEXT NOT NULL,
"provider" TEXT NOT NULL,
"providerAccountId" TEXT NOT NULL,
"refresh_token" TEXT,
"access_token" TEXT,
"expires_at" INTEGER,
"token_type" TEXT,
"scope" TEXT,
"id_token" TEXT,
"session_state" TEXT,
"oauth_token_secret" TEXT,
"oauth_token" TEXT,
"refresh_token_expires_in" INTEGER,
CONSTRAINT "Account_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "Session" (
"id" TEXT NOT NULL,
"sessionToken" TEXT NOT NULL,
"userId" TEXT NOT NULL,
"expires" TIMESTAMP(3) NOT NULL,
CONSTRAINT "Session_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "User" (
"id" TEXT NOT NULL,
"name" TEXT,
"email" TEXT,
"emailVerified" TIMESTAMP(3),
"image" TEXT,
"plan" "Plan" NOT NULL DEFAULT E'FREE',
"stripeId" TEXT,
CONSTRAINT "User_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "Credentials" (
"id" TEXT NOT NULL,
"ownerId" TEXT NOT NULL,
"data" TEXT NOT NULL,
"name" TEXT NOT NULL,
"type" TEXT NOT NULL,
"iv" TEXT NOT NULL,
CONSTRAINT "Credentials_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "VerificationToken" (
"identifier" TEXT NOT NULL,
"token" TEXT NOT NULL,
"expires" TIMESTAMP(3) NOT NULL
);
-- CreateTable
CREATE TABLE "DashboardFolder" (
"id" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"name" TEXT NOT NULL,
"ownerId" TEXT NOT NULL,
"parentFolderId" TEXT,
CONSTRAINT "DashboardFolder_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "Typebot" (
"id" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"name" TEXT NOT NULL,
"ownerId" TEXT NOT NULL,
"publishedTypebotId" TEXT,
"folderId" TEXT,
"blocks" JSONB[],
"variables" JSONB[],
"edges" JSONB[],
"theme" JSONB NOT NULL,
"settings" JSONB NOT NULL,
"publicId" TEXT,
CONSTRAINT "Typebot_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "PublicTypebot" (
"id" TEXT NOT NULL,
"typebotId" TEXT NOT NULL,
"name" TEXT NOT NULL,
"blocks" JSONB[],
"variables" JSONB[],
"edges" JSONB[],
"theme" JSONB NOT NULL,
"settings" JSONB NOT NULL,
"publicId" TEXT,
CONSTRAINT "PublicTypebot_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "Result" (
"id" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"typebotId" TEXT NOT NULL,
"isCompleted" BOOLEAN NOT NULL,
CONSTRAINT "Result_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "Answer" (
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"resultId" TEXT NOT NULL,
"stepId" TEXT NOT NULL,
"blockId" TEXT NOT NULL,
"content" TEXT NOT NULL
);
-- CreateTable
CREATE TABLE "Coupon" (
"userPropertiesToUpdate" JSONB NOT NULL,
"code" TEXT NOT NULL,
"dateRedeemed" TIMESTAMP(3),
CONSTRAINT "Coupon_pkey" PRIMARY KEY ("code")
);
-- CreateIndex
CREATE UNIQUE INDEX "Account_provider_providerAccountId_key" ON "Account"("provider", "providerAccountId");
-- CreateIndex
CREATE UNIQUE INDEX "Session_sessionToken_key" ON "Session"("sessionToken");
-- CreateIndex
CREATE UNIQUE INDEX "User_email_key" ON "User"("email");
-- CreateIndex
CREATE UNIQUE INDEX "User_stripeId_key" ON "User"("stripeId");
-- CreateIndex
CREATE UNIQUE INDEX "Credentials_name_type_ownerId_key" ON "Credentials"("name", "type", "ownerId");
-- CreateIndex
CREATE UNIQUE INDEX "VerificationToken_token_key" ON "VerificationToken"("token");
-- CreateIndex
CREATE UNIQUE INDEX "VerificationToken_identifier_token_key" ON "VerificationToken"("identifier", "token");
-- CreateIndex
CREATE UNIQUE INDEX "Typebot_publicId_key" ON "Typebot"("publicId");
-- CreateIndex
CREATE UNIQUE INDEX "PublicTypebot_typebotId_key" ON "PublicTypebot"("typebotId");
-- CreateIndex
CREATE UNIQUE INDEX "PublicTypebot_publicId_key" ON "PublicTypebot"("publicId");
-- CreateIndex
CREATE UNIQUE INDEX "Answer_resultId_blockId_stepId_key" ON "Answer"("resultId", "blockId", "stepId");
-- AddForeignKey
ALTER TABLE "Account" ADD CONSTRAINT "Account_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Session" ADD CONSTRAINT "Session_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Credentials" ADD CONSTRAINT "Credentials_ownerId_fkey" FOREIGN KEY ("ownerId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "DashboardFolder" ADD CONSTRAINT "DashboardFolder_ownerId_fkey" FOREIGN KEY ("ownerId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "DashboardFolder" ADD CONSTRAINT "DashboardFolder_parentFolderId_fkey" FOREIGN KEY ("parentFolderId") REFERENCES "DashboardFolder"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Typebot" ADD CONSTRAINT "Typebot_ownerId_fkey" FOREIGN KEY ("ownerId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Typebot" ADD CONSTRAINT "Typebot_folderId_fkey" FOREIGN KEY ("folderId") REFERENCES "DashboardFolder"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "PublicTypebot" ADD CONSTRAINT "PublicTypebot_typebotId_fkey" FOREIGN KEY ("typebotId") REFERENCES "Typebot"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Result" ADD CONSTRAINT "Result_typebotId_fkey" FOREIGN KEY ("typebotId") REFERENCES "Typebot"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Answer" ADD CONSTRAINT "Answer_resultId_fkey" FOREIGN KEY ("resultId") REFERENCES "Result"("id") ON DELETE CASCADE ON UPDATE CASCADE;

View File

@@ -0,0 +1,3 @@
# Please do not edit this file manually
# It should be added in your version-control system (i.e. Git)
provider = "postgresql"

View File

@@ -9,7 +9,7 @@
"typescript": "^4.5.5"
},
"dependencies": {
"next": "^12.0.9",
"next": "^12.0.10",
"db": "*"
},
"scripts": {

View File

@@ -10,14 +10,14 @@
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-node-resolve": "^13.1.3",
"@rollup/plugin-typescript": "^8.3.0",
"rollup": "^2.66.1",
"rollup": "^2.67.2",
"rollup-plugin-dts": "^4.1.0",
"rollup-plugin-peer-deps-external": "^2.2.4",
"typescript": "^4.5.5"
},
"dependencies": {
"models": "*",
"next": "^12.0.9"
"next": "^12.0.10"
},
"scripts": {
"build": "yarn rollup -c",