chore: update package licences and migration script

This commit is contained in:
Henry
2025-05-29 23:18:25 +01:00
parent 9d467529e1
commit 14f55e5939
18 changed files with 37 additions and 64 deletions

View File

@@ -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",

View File

@@ -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"],
});

View File

@@ -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",

View File

@@ -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;

View File

@@ -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",

View File

@@ -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);
});

View File

@@ -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",

View File

@@ -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" }}
>

View File

@@ -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" }}
>

View File

@@ -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",

View File

@@ -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",