chore: update package licences and migration script
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
"default": "./src/openapi.ts"
|
||||
}
|
||||
},
|
||||
"license": "MIT",
|
||||
"license": "GPL-3.0",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"clean": "git clean -xdf .cache .turbo dist node_modules",
|
||||
|
||||
@@ -6,7 +6,7 @@ export const openApiDocument = generateOpenApiDocument(appRouter, {
|
||||
title: "Kan API",
|
||||
description: "OpenAPI compliant REST API",
|
||||
version: "1.0.0",
|
||||
baseUrl: `${process.env.WEBSITE_URL}/api/v1`,
|
||||
baseUrl: `${process.env.NEXT_PUBLIC_BASE_URL}/api/v1`,
|
||||
docsUrl: "docs.kan.bn",
|
||||
tags: ["Auth", "Users", "Boards", "Lists", "Cards", "Labels", "Imports"],
|
||||
});
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"license": "MIT",
|
||||
"license": "GPL-3.0",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"clean": "git clean -xdf .cache .turbo dist node_modules",
|
||||
|
||||
@@ -5,17 +5,10 @@ export default {
|
||||
out: "./migrations",
|
||||
dialect: "postgresql",
|
||||
dbCredentials: {
|
||||
host: process.env.POSTGRES_HOST ?? "localhost",
|
||||
port: process.env.POSTGRES_PORT
|
||||
? parseInt(process.env.POSTGRES_PORT)
|
||||
: 5432,
|
||||
user: process.env.POSTGRES_USER,
|
||||
password: process.env.POSTGRES_PASSWORD,
|
||||
database: process.env.POSTGRES_DATABASE ?? "postgres",
|
||||
ssl: true,
|
||||
url: process.env.POSTGRES_URL ?? "",
|
||||
ssl: process.env.NODE_ENV === "production" ? true : false,
|
||||
},
|
||||
migrations: {
|
||||
prefix: "timestamp",
|
||||
},
|
||||
// tablesFilter: ["kan_*"],
|
||||
} satisfies Config;
|
||||
|
||||
@@ -25,13 +25,14 @@
|
||||
"default": "./src/repository/*.ts"
|
||||
}
|
||||
},
|
||||
"license": "MIT",
|
||||
"license": "GPL-3.0",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"clean": "git clean -xdf .cache .turbo dist node_modules",
|
||||
"dev": "tsc",
|
||||
"format": "prettier --check . --ignore-path ../../.gitignore",
|
||||
"lint": "eslint",
|
||||
"migrate": "pnpm with-env drizzle-kit migrate",
|
||||
"push": "pnpm with-env drizzle-kit push",
|
||||
"studio": "pnpm with-env drizzle-kit studio",
|
||||
"typecheck": "tsc --noEmit --emitDeclarationOnly false",
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
import "dotenv/config";
|
||||
|
||||
import { drizzle } from "drizzle-orm/postgres-js";
|
||||
import { migrate } from "drizzle-orm/postgres-js/migrator";
|
||||
import postgres from "postgres";
|
||||
|
||||
const postgresUrl = process.env.POSTGRES_URL;
|
||||
if (!postgresUrl) {
|
||||
throw new Error("POSTGRES_URL environment variable is not set");
|
||||
}
|
||||
|
||||
const migrationClient = postgres(postgresUrl, { max: 1 });
|
||||
console.log("Starting database migration...");
|
||||
|
||||
migrate(drizzle(migrationClient), {
|
||||
migrationsFolder: "./migrations",
|
||||
})
|
||||
.then(() => {
|
||||
console.log("✅ Database migration completed successfully");
|
||||
process.exit(0);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("❌ Migration failed:");
|
||||
console.error(error);
|
||||
process.exit(1);
|
||||
});
|
||||
@@ -11,8 +11,9 @@
|
||||
},
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"license": "MIT",
|
||||
"license": "GPL-3.0",
|
||||
"scripts": {
|
||||
"dev": "tsc",
|
||||
"run:dev": "email dev",
|
||||
"export": "email export",
|
||||
"build": "tsc",
|
||||
|
||||
@@ -3,12 +3,11 @@ import { Button } from "@react-email/button";
|
||||
import { Container } from "@react-email/container";
|
||||
import { Head } from "@react-email/head";
|
||||
import { Heading } from "@react-email/heading";
|
||||
import { Html } from "@react-email/html";
|
||||
import { Hr } from "@react-email/hr";
|
||||
import { Html } from "@react-email/html";
|
||||
import { Link } from "@react-email/link";
|
||||
import { Preview } from "@react-email/preview";
|
||||
import { Text } from "@react-email/text";
|
||||
|
||||
import * as React from "react";
|
||||
|
||||
export const JoinWorkspaceTemplate = ({
|
||||
@@ -91,7 +90,7 @@ export const JoinWorkspaceTemplate = ({
|
||||
/>
|
||||
<Text style={{ color: "#7e7e7e" }}>
|
||||
<Link
|
||||
href={process.env.WEBSITE_URL}
|
||||
href={process.env.NEXT_PUBLIC_BASE_URL}
|
||||
target="_blank"
|
||||
style={{ color: "#7e7e7e", textDecoration: "underline" }}
|
||||
>
|
||||
|
||||
@@ -3,12 +3,11 @@ import { Button } from "@react-email/button";
|
||||
import { Container } from "@react-email/container";
|
||||
import { Head } from "@react-email/head";
|
||||
import { Heading } from "@react-email/heading";
|
||||
import { Html } from "@react-email/html";
|
||||
import { Hr } from "@react-email/hr";
|
||||
import { Html } from "@react-email/html";
|
||||
import { Link } from "@react-email/link";
|
||||
import { Preview } from "@react-email/preview";
|
||||
import { Text } from "@react-email/text";
|
||||
|
||||
import * as React from "react";
|
||||
|
||||
export const MagicLinkTemplate = ({
|
||||
@@ -91,7 +90,7 @@ export const MagicLinkTemplate = ({
|
||||
/>
|
||||
<Text style={{ color: "#7e7e7e" }}>
|
||||
<Link
|
||||
href={process.env.WEBSITE_URL}
|
||||
href={process.env.NEXT_PUBLIC_BASE_URL}
|
||||
target="_blank"
|
||||
style={{ color: "#7e7e7e", textDecoration: "underline" }}
|
||||
>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
"default": "./src/constants/index.ts"
|
||||
}
|
||||
},
|
||||
"license": "MIT",
|
||||
"license": "GPL-3.0",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"clean": "git clean -xdf .cache .turbo dist node_modules",
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"license": "MIT",
|
||||
"license": "GPL-3.0",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"clean": "git clean -xdf .cache .turbo dist node_modules",
|
||||
|
||||
Reference in New Issue
Block a user