Merge pull request #70 from atridadl/dev

4.2.0
 Switched to Vite! 💜
This commit is contained in:
Atridad Lahiji 2023-12-15 11:00:16 -07:00 committed by GitHub
commit 8b1e7cecaf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 247 additions and 37 deletions

View file

@ -1,10 +1,6 @@
import { rootAuthLoader } from "@clerk/remix/ssr.server";
import { ClerkApp, ClerkErrorBoundary } from "@clerk/remix";
import type {
LinksFunction,
LoaderFunction,
MetaFunction,
} from "@remix-run/node";
import type { LoaderFunction, MetaFunction } from "@remix-run/node";
import {
Links,
LiveReload,
@ -13,13 +9,10 @@ import {
Scripts,
ScrollRestoration,
} from "@remix-run/react";
import stylesheet from "~/tailwind.css";
import Footer from "./components/Footer";
import Header from "./components/Header";
export const links: LinksFunction = () => [
{ rel: "stylesheet", href: stylesheet },
];
import "./tailwind.css";
export const meta: MetaFunction = () => {
return [

View file

@ -5,6 +5,7 @@ import {
onUserCreatedHandler,
onUserDeletedHandler,
} from "~/services/webhookhelpers.server";
import "dotenv/config";
export async function action({ request, params, context }: ActionFunctionArgs) {
// Get the headers

View file

@ -1,6 +1,7 @@
import { drizzle } from "drizzle-orm/libsql";
import { createClient } from "@libsql/client";
import * as schema from "./schema.server";
import "dotenv/config";
const client = createClient({
url: process.env.DATABASE_URL!,

View file

@ -1,5 +1,6 @@
import { EventEmitter } from "events";
import { publishToChannel, subscribeToChannel } from "./redis.server";
import "dotenv/config";
let emitter: EventEmitter;

View file

@ -1,3 +1,5 @@
import "dotenv/config";
export const isShit = (email: string) => {
if (!process.env.SHIT_LIST) {
return false;

View file

@ -1,4 +1,5 @@
import Redis from "ioredis";
import "dotenv/config";
let cache: Redis | null = null;
let pub: Redis | null = null;

View file

@ -1,6 +1,7 @@
import { eq } from "drizzle-orm";
import { db } from "./db.server";
import { rooms } from "./schema.server";
import "dotenv/config";
export const onUserDeletedHandler = async (userId: string | undefined) => {
if (!userId) {

View file

@ -1,2 +1,2 @@
/// <reference types="@remix-run/dev" />
/// <reference types="@remix-run/node" />
/// <reference types="vite/client" />

View file

@ -1,20 +1,19 @@
{
"name": "sprintpadawan",
"version": "4.1.2",
"version": "4.2.0",
"private": true,
"sideEffects": false,
"type": "module",
"scripts": {
"build": "remix build",
"dev": "remix dev --manual",
"start": "remix-serve ./build/index.js",
"build": "vite build && vite build --ssr",
"dev": "vite dev --force",
"start": "remix-serve ./build/server/index.js",
"typecheck": "tsc"
},
"dependencies": {
"@clerk/remix": "^3.1.11",
"@libsql/client": "0.4.0-pre.5",
"@paralleldrive/cuid2": "^2.2.2",
"@remix-run/css-bundle": "^2.4.0",
"@remix-run/node": "^2.4.0",
"@remix-run/react": "^2.4.0",
"@remix-run/serve": "^2.4.0",
@ -26,7 +25,8 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"remix-utils": "^7.3.0",
"svix": "^1.15.0"
"svix": "^1.15.0",
"dotenv": "^16.3.1"
},
"devDependencies": {
"@flydotio/dockerfile": "^0.4.11",
@ -37,12 +37,13 @@
"autoprefixer": "^10.4.16",
"better-sqlite3": "^9.2.2",
"daisyui": "^4.4.20",
"dotenv": "^16.3.1",
"drizzle-kit": "^0.20.6",
"eslint": "^8.55.0",
"postcss": "^8.4.32",
"tailwindcss": "^3.3.6",
"typescript": "^5.3.3"
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-tsconfig-paths": "^4.2.2"
},
"engines": {
"node": ">=18.0.0"

220
pnpm-lock.yaml generated
View file

@ -14,9 +14,6 @@ dependencies:
'@paralleldrive/cuid2':
specifier: ^2.2.2
version: 2.2.2
'@remix-run/css-bundle':
specifier: ^2.4.0
version: 2.4.0
'@remix-run/node':
specifier: ^2.4.0
version: 2.4.0(typescript@5.3.3)
@ -29,6 +26,9 @@ dependencies:
csv42:
specifier: ^5.0.0
version: 5.0.0
dotenv:
specifier: ^16.3.1
version: 16.3.1
drizzle-orm:
specifier: ^0.29.1
version: 0.29.1(@libsql/client@0.4.0-pre.5)(better-sqlite3@9.2.2)
@ -60,7 +60,7 @@ devDependencies:
version: 0.4.11
'@remix-run/dev':
specifier: ^2.4.0
version: 2.4.0(@remix-run/serve@2.4.0)(typescript@5.3.3)
version: 2.4.0(@remix-run/serve@2.4.0)(typescript@5.3.3)(vite@5.0.10)
'@remix-run/eslint-config':
specifier: ^2.4.0
version: 2.4.0(eslint@8.55.0)(react@18.2.0)(typescript@5.3.3)
@ -79,9 +79,6 @@ devDependencies:
daisyui:
specifier: ^4.4.20
version: 4.4.20(postcss@8.4.32)
dotenv:
specifier: ^16.3.1
version: 16.3.1
drizzle-kit:
specifier: ^0.20.6
version: 0.20.6
@ -97,6 +94,12 @@ devDependencies:
typescript:
specifier: ^5.3.3
version: 5.3.3
vite:
specifier: ^5.0.10
version: 5.0.10
vite-tsconfig-paths:
specifier: ^4.2.2
version: 4.2.2(typescript@5.3.3)(vite@5.0.10)
packages:
@ -1846,12 +1849,7 @@ packages:
dev: true
optional: true
/@remix-run/css-bundle@2.4.0:
resolution: {integrity: sha512-kFFJ5Iek1lNjoiajiqirLGcxTvPdmbIezvKZbJwSO173pZRHr1MlTnLactrYhFmEHNBE6LMN54QXDynl93S+aQ==}
engines: {node: '>=18.0.0'}
dev: false
/@remix-run/dev@2.4.0(@remix-run/serve@2.4.0)(typescript@5.3.3):
/@remix-run/dev@2.4.0(@remix-run/serve@2.4.0)(typescript@5.3.3)(vite@5.0.10):
resolution: {integrity: sha512-qQsZv+uPw8IhAdUwIIaZqnJfgJXLahYuWHFQIcS7kBhr+PdwW6SA3gvmUhnkDrqV+HJdP1bUpwXYGT+vbDQGiQ==}
engines: {node: '>=18.0.0'}
hasBin: true
@ -1922,6 +1920,7 @@ packages:
tar-fs: 2.1.1
tsconfig-paths: 4.2.0
typescript: 5.3.3
vite: 5.0.10
ws: 7.5.9
transitivePeerDependencies:
- '@types/node'
@ -2100,6 +2099,110 @@ packages:
dependencies:
web-streams-polyfill: 3.2.1
/@rollup/rollup-android-arm-eabi@4.9.0:
resolution: {integrity: sha512-+1ge/xmaJpm1KVBuIH38Z94zj9fBD+hp+/5WLaHgyY8XLq1ibxk/zj6dTXaqM2cAbYKq8jYlhHd6k05If1W5xA==}
cpu: [arm]
os: [android]
requiresBuild: true
dev: true
optional: true
/@rollup/rollup-android-arm64@4.9.0:
resolution: {integrity: sha512-im6hUEyQ7ZfoZdNvtwgEJvBWZYauC9KVKq1w58LG2Zfz6zMd8gRrbN+xCVoqA2hv/v6fm9lp5LFGJ3za8EQH3A==}
cpu: [arm64]
os: [android]
requiresBuild: true
dev: true
optional: true
/@rollup/rollup-darwin-arm64@4.9.0:
resolution: {integrity: sha512-u7aTMskN6Dmg1lCT0QJ+tINRt+ntUrvVkhbPfFz4bCwRZvjItx2nJtwJnJRlKMMaQCHRjrNqHRDYvE4mBm3DlQ==}
cpu: [arm64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/@rollup/rollup-darwin-x64@4.9.0:
resolution: {integrity: sha512-8FvEl3w2ExmpcOmX5RJD0yqXcVSOqAJJUJ29Lca29Ik+3zPS1yFimr2fr5JSZ4Z5gt8/d7WqycpgkX9nocijSw==}
cpu: [x64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/@rollup/rollup-linux-arm-gnueabihf@4.9.0:
resolution: {integrity: sha512-lHoKYaRwd4gge+IpqJHCY+8Vc3hhdJfU6ukFnnrJasEBUvVlydP8PuwndbWfGkdgSvZhHfSEw6urrlBj0TSSfg==}
cpu: [arm]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@rollup/rollup-linux-arm64-gnu@4.9.0:
resolution: {integrity: sha512-JbEPfhndYeWHfOSeh4DOFvNXrj7ls9S/2omijVsao+LBPTPayT1uKcK3dHW3MwDJ7KO11t9m2cVTqXnTKpeaiw==}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@rollup/rollup-linux-arm64-musl@4.9.0:
resolution: {integrity: sha512-ahqcSXLlcV2XUBM3/f/C6cRoh7NxYA/W7Yzuv4bDU1YscTFw7ay4LmD7l6OS8EMhTNvcrWGkEettL1Bhjf+B+w==}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@rollup/rollup-linux-riscv64-gnu@4.9.0:
resolution: {integrity: sha512-uwvOYNtLw8gVtrExKhdFsYHA/kotURUmZYlinH2VcQxNCQJeJXnkmWgw2hI9Xgzhgu7J9QvWiq9TtTVwWMDa+w==}
cpu: [riscv64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@rollup/rollup-linux-x64-gnu@4.9.0:
resolution: {integrity: sha512-m6pkSwcZZD2LCFHZX/zW2aLIISyzWLU3hrLLzQKMI12+OLEzgruTovAxY5sCZJkipklaZqPy/2bEEBNjp+Y7xg==}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@rollup/rollup-linux-x64-musl@4.9.0:
resolution: {integrity: sha512-VFAC1RDRSbU3iOF98X42KaVicAfKf0m0OvIu8dbnqhTe26Kh6Ym9JrDulz7Hbk7/9zGc41JkV02g+p3BivOdAg==}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@rollup/rollup-win32-arm64-msvc@4.9.0:
resolution: {integrity: sha512-9jPgMvTKXARz4inw6jezMLA2ihDBvgIU9Ml01hjdVpOcMKyxFBJrn83KVQINnbeqDv0+HdO1c09hgZ8N0s820Q==}
cpu: [arm64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/@rollup/rollup-win32-ia32-msvc@4.9.0:
resolution: {integrity: sha512-WE4pT2kTXQN2bAv40Uog0AsV7/s9nT9HBWXAou8+++MBCnY51QS02KYtm6dQxxosKi1VIz/wZIrTQO5UP2EW+Q==}
cpu: [ia32]
os: [win32]
requiresBuild: true
dev: true
optional: true
/@rollup/rollup-win32-x64-msvc@4.9.0:
resolution: {integrity: sha512-aPP5Q5AqNGuT0tnuEkK/g4mnt3ZhheiXrDIiSVIHN9mcN21OyXDVbEMqmXPE7e2OplNLDkcvV+ZoGJa2ZImFgw==}
cpu: [x64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/@rushstack/eslint-patch@1.6.0:
resolution: {integrity: sha512-2/U3GXA6YiPYQDLGwtGlnNgKYBSwCFIHf8Y9LUY5VATHdtbLlU0Y1R3QoBnT0aB4qv/BEiVVsj7LJXoQCgJ2vA==}
dev: true
@ -3364,7 +3467,6 @@ packages:
/dotenv@16.3.1:
resolution: {integrity: sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==}
engines: {node: '>=12'}
dev: true
/dreamopt@0.8.0:
resolution: {integrity: sha512-vyJTp8+mC+G+5dfgsY+r3ckxlz+QMX40VjPQsZc5gxVAxLmi64TBoVkP54A/pRAXMXsbu2GMMBrZPxNv23waMg==}
@ -4723,6 +4825,10 @@ packages:
slash: 3.0.0
dev: true
/globrex@0.1.2:
resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==}
dev: true
/gopd@1.0.1:
resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==}
dependencies:
@ -7188,6 +7294,27 @@ packages:
fsevents: 2.3.3
dev: true
/rollup@4.9.0:
resolution: {integrity: sha512-bUHW/9N21z64gw8s6tP4c88P382Bq/L5uZDowHlHx6s/QWpjJXivIAbEw6LZthgSvlEizZBfLC4OAvWe7aoF7A==}
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
hasBin: true
optionalDependencies:
'@rollup/rollup-android-arm-eabi': 4.9.0
'@rollup/rollup-android-arm64': 4.9.0
'@rollup/rollup-darwin-arm64': 4.9.0
'@rollup/rollup-darwin-x64': 4.9.0
'@rollup/rollup-linux-arm-gnueabihf': 4.9.0
'@rollup/rollup-linux-arm64-gnu': 4.9.0
'@rollup/rollup-linux-arm64-musl': 4.9.0
'@rollup/rollup-linux-riscv64-gnu': 4.9.0
'@rollup/rollup-linux-x64-gnu': 4.9.0
'@rollup/rollup-linux-x64-musl': 4.9.0
'@rollup/rollup-win32-arm64-msvc': 4.9.0
'@rollup/rollup-win32-ia32-msvc': 4.9.0
'@rollup/rollup-win32-x64-msvc': 4.9.0
fsevents: 2.3.3
dev: true
/run-parallel@1.2.0:
resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==}
dependencies:
@ -7786,6 +7913,19 @@ packages:
resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==}
dev: true
/tsconfck@2.1.2(typescript@5.3.3):
resolution: {integrity: sha512-ghqN1b0puy3MhhviwO2kGF8SeMDNhEbnKxjK7h6+fvY9JAxqvXi8y5NAHSQv687OVboS2uZIByzGd45/YxrRHg==}
engines: {node: ^14.13.1 || ^16 || >=18}
hasBin: true
peerDependencies:
typescript: ^4.3.5 || ^5.0.0
peerDependenciesMeta:
typescript:
optional: true
dependencies:
typescript: 5.3.3
dev: true
/tsconfig-paths@3.15.0:
resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==}
dependencies:
@ -8135,6 +8275,23 @@ packages:
- terser
dev: true
/vite-tsconfig-paths@4.2.2(typescript@5.3.3)(vite@5.0.10):
resolution: {integrity: sha512-dq0FjyxHHDnp0uS3P12WEOX2W7NeuLzX9AWP38D7Zw2CTbFErapwQVlCiT5DMJcVWKQ1MMdTe92PZl/rBQ7qcw==}
peerDependencies:
vite: '*'
peerDependenciesMeta:
vite:
optional: true
dependencies:
debug: 4.3.4
globrex: 0.1.2
tsconfck: 2.1.2(typescript@5.3.3)
vite: 5.0.10
transitivePeerDependencies:
- supports-color
- typescript
dev: true
/vite@4.5.1:
resolution: {integrity: sha512-AXXFaAJ8yebyqzoNB9fu2pHoo/nWX+xZlaRwoeYUxEqBO+Zj4msE5G+BhGBll9lYEKv9Hfks52PAF2X7qDYXQA==}
engines: {node: ^14.18.0 || >=16.0.0}
@ -8170,6 +8327,41 @@ packages:
fsevents: 2.3.3
dev: true
/vite@5.0.10:
resolution: {integrity: sha512-2P8J7WWgmc355HUMlFrwofacvr98DAjoE52BfdbwQtyLH06XKwaL/FMnmKM2crF0iX4MpmMKoDlNCB1ok7zHCw==}
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
peerDependencies:
'@types/node': ^18.0.0 || >=20.0.0
less: '*'
lightningcss: ^1.21.0
sass: '*'
stylus: '*'
sugarss: '*'
terser: ^5.4.0
peerDependenciesMeta:
'@types/node':
optional: true
less:
optional: true
lightningcss:
optional: true
sass:
optional: true
stylus:
optional: true
sugarss:
optional: true
terser:
optional: true
dependencies:
esbuild: 0.19.9
postcss: 8.4.32
rollup: 4.9.0
optionalDependencies:
fsevents: 2.3.3
dev: true
/wcwidth@1.0.1:
resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==}
dependencies:

6
postcss.config.js Normal file
View file

@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};

View file

@ -1,4 +0,0 @@
/** @type {import('@remix-run/dev').AppConfig} */
export default {
ignoredRouteFiles: ["**/.*"],
};

View file

@ -1,5 +1,5 @@
{
"include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"],
"include": ["env.d.ts", "**/*.ts", "**/*.tsx"],
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"isolatedModules": true,

15
vite.config.ts Normal file
View file

@ -0,0 +1,15 @@
import { unstable_vitePlugin as remix } from "@remix-run/dev";
import { installGlobals } from "@remix-run/node";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
installGlobals();
export default defineConfig({
plugins: [
remix({
ignoredRouteFiles: ["**/.*"],
}),
tsconfigPaths(),
],
});