From 0ae71766e0ff86a756f23ccbdf232b53451eb55a Mon Sep 17 00:00:00 2001 From: Manoj Dasari Date: Fri, 28 Feb 2025 17:31:51 +0530 Subject: [PATCH] feat:(db)/added projects schema --- apps/services/package.json | 3 +- apps/services/src/index.ts | 12 +- apps/services/types.d.ts | 5 + .../migrations/0002_curvy_blazing_skull.sql | 20 ++ .../migrations/meta/0002_snapshot.json | 130 +++++++++++++ .../db/drizzle/migrations/meta/_journal.json | 7 + packages/db/src/db/schema.ts | 28 ++- packages/types/.gitignore | 175 +++++++++++++++++ packages/types/package.json | 17 ++ packages/types/src/index.ts | 13 ++ packages/types/tsconfig.json | 3 + pnpm-lock.yaml | 182 ++++++++++++++++++ 12 files changed, 589 insertions(+), 6 deletions(-) create mode 100644 apps/services/types.d.ts create mode 100644 packages/db/drizzle/migrations/0002_curvy_blazing_skull.sql create mode 100644 packages/db/drizzle/migrations/meta/0002_snapshot.json create mode 100644 packages/types/.gitignore create mode 100644 packages/types/package.json create mode 100644 packages/types/src/index.ts create mode 100644 packages/types/tsconfig.json diff --git a/apps/services/package.json b/apps/services/package.json index 2ef2375..e209810 100644 --- a/apps/services/package.json +++ b/apps/services/package.json @@ -21,8 +21,9 @@ "typescript": "^5.7.3" }, "dependencies": { - "@repo/typescript-config": "workspace:*", + "@clerk/express": "^1.3.50", "@repo/db": "workspace:*", + "@repo/typescript-config": "workspace:*", "dotenv": "^16.4.7", "ts-node": "^10.9.2", "zod": "^3.24.2" diff --git a/apps/services/src/index.ts b/apps/services/src/index.ts index a88bc16..44b9f87 100644 --- a/apps/services/src/index.ts +++ b/apps/services/src/index.ts @@ -1,13 +1,21 @@ import express from "express"; import cors from "cors"; +import dotenv from "dotenv"; import { db } from "@repo/db/client"; import { user } from "@repo/db/user"; +dotenv.config(); + const app = express(); -const PORT = 3001; +const PORT = process.env.PORT || 3001; -app.use(cors()); app.use(express.json()); +app.use(cors({ + origin: ["http://localhost:3000"], + credentials: true, + methods: ["POST", "PUT", "GET", "DELETE", "OPTIONS"], + allowedHeaders: ["Content-Type", "Authorization"] +})); //^ TODO: database connection is failing - fix this //^ TODO: port mapping config failing - fix this diff --git a/apps/services/types.d.ts b/apps/services/types.d.ts new file mode 100644 index 0000000..7490422 --- /dev/null +++ b/apps/services/types.d.ts @@ -0,0 +1,5 @@ +declare namespace Express { + interface Request { + userId?: string; + } +} \ No newline at end of file diff --git a/packages/db/drizzle/migrations/0002_curvy_blazing_skull.sql b/packages/db/drizzle/migrations/0002_curvy_blazing_skull.sql new file mode 100644 index 0000000..caf28b9 --- /dev/null +++ b/packages/db/drizzle/migrations/0002_curvy_blazing_skull.sql @@ -0,0 +1,20 @@ +CREATE TABLE "projects" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "project_name" varchar(255) NOT NULL, + "url" varchar NOT NULL, + "private" boolean NOT NULL, + "user_id" integer +); +--> statement-breakpoint +CREATE TABLE "users" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "username" varchar(255) NOT NULL, + "email" varchar(255) NOT NULL, + "password" text NOT NULL, + "created_at" timestamp DEFAULT now() NOT NULL, + "updated_at" timestamp DEFAULT now() NOT NULL, + CONSTRAINT "users_username_unique" UNIQUE("username"), + CONSTRAINT "users_email_unique" UNIQUE("email") +); +--> statement-breakpoint +DROP TABLE "user" CASCADE; \ No newline at end of file diff --git a/packages/db/drizzle/migrations/meta/0002_snapshot.json b/packages/db/drizzle/migrations/meta/0002_snapshot.json new file mode 100644 index 0000000..24ebfdc --- /dev/null +++ b/packages/db/drizzle/migrations/meta/0002_snapshot.json @@ -0,0 +1,130 @@ +{ + "id": "fb307380-5200-441c-bc8c-ad262458853d", + "prevId": "58eb7d31-18ee-4256-b85a-6ff80d9a69ea", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.projects": { + "name": "projects", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "project_name": { + "name": "project_name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "private": { + "name": "private", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "username": { + "name": "username", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "users_username_unique": { + "name": "users_username_unique", + "nullsNotDistinct": false, + "columns": [ + "username" + ] + }, + "users_email_unique": { + "name": "users_email_unique", + "nullsNotDistinct": false, + "columns": [ + "email" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": {}, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/packages/db/drizzle/migrations/meta/_journal.json b/packages/db/drizzle/migrations/meta/_journal.json index 4627839..e348602 100644 --- a/packages/db/drizzle/migrations/meta/_journal.json +++ b/packages/db/drizzle/migrations/meta/_journal.json @@ -15,6 +15,13 @@ "when": 1740570184049, "tag": "0001_white_dreaming_celestial", "breakpoints": true + }, + { + "idx": 2, + "version": "7", + "when": 1740742872789, + "tag": "0002_curvy_blazing_skull", + "breakpoints": true } ] } \ No newline at end of file diff --git a/packages/db/src/db/schema.ts b/packages/db/src/db/schema.ts index 846eb7e..aae6956 100644 --- a/packages/db/src/db/schema.ts +++ b/packages/db/src/db/schema.ts @@ -1,17 +1,39 @@ +import { relations } from "drizzle-orm"; import { pgTable, text, uuid, varchar, - timestamp + timestamp, + boolean, + integer } from "drizzle-orm/pg-core"; -export const user = pgTable('user', { +export const users = pgTable('users', { id: uuid("id").primaryKey().defaultRandom(), username: varchar("username", { length: 255 }).unique().notNull(), email: varchar("email", { length: 255 }).unique().notNull(), password: text("password").notNull(), createdAt: timestamp("created_at", { mode: "string" }).notNull().defaultNow(), updatedAt: timestamp("updated_at", { mode: "string" }).notNull().defaultNow(), -}) \ No newline at end of file +}); + +export const userRelations = relations(users, ({ many }) => ({ + projects: many(projects), +})); + +export const projects = pgTable('projects', { + id: uuid("id").primaryKey().defaultRandom(), + project_name: varchar("project_name", { length: 255 }).notNull(), + url: varchar("url").notNull(), + private: boolean("private").notNull(), + authorId: integer("user_id") +}); + +export const projectRelations = relations(projects, ({ one }) => ({ + user: one(users, { + fields: [projects.authorId], + references: [users.id] + }), +})); \ No newline at end of file diff --git a/packages/types/.gitignore b/packages/types/.gitignore new file mode 100644 index 0000000..ce007ac --- /dev/null +++ b/packages/types/.gitignore @@ -0,0 +1,175 @@ +# Based on https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore + +# Logs + +logs +_.log +npm-debug.log_ +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Caches + +.cache + +# Diagnostic reports (https://nodejs.org/api/report.html) + +report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json + +# Runtime data + +pids +_.pid +_.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover + +lib-cov + +# Coverage directory used by tools like istanbul + +coverage +*.lcov + +# nyc test coverage + +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) + +.grunt + +# Bower dependency directory (https://bower.io/) + +bower_components + +# node-waf configuration + +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) + +build/Release + +# Dependency directories + +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) + +web_modules/ + +# TypeScript cache + +*.tsbuildinfo + +# Optional npm cache directory + +.npm + +# Optional eslint cache + +.eslintcache + +# Optional stylelint cache + +.stylelintcache + +# Microbundle cache + +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history + +.node_repl_history + +# Output of 'npm pack' + +*.tgz + +# Yarn Integrity file + +.yarn-integrity + +# dotenv environment variable files + +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) + +.parcel-cache + +# Next.js build output + +.next +out + +# Nuxt.js build / generate output + +.nuxt +dist + +# Gatsby files + +# Comment in the public line in if your project uses Gatsby and not Next.js + +# https://nextjs.org/blog/next-9-1#public-directory-support + +# public + +# vuepress build output + +.vuepress/dist + +# vuepress v2.x temp and cache directory + +.temp + +# Docusaurus cache and generated files + +.docusaurus + +# Serverless directories + +.serverless/ + +# FuseBox cache + +.fusebox/ + +# DynamoDB Local files + +.dynamodb/ + +# TernJS port file + +.tern-port + +# Stores VSCode versions used for testing VSCode extensions + +.vscode-test + +# yarn v2 + +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +# IntelliJ based IDEs +.idea + +# Finder (MacOS) folder config +.DS_Store \ No newline at end of file diff --git a/packages/types/package.json b/packages/types/package.json new file mode 100644 index 0000000..2ec7780 --- /dev/null +++ b/packages/types/package.json @@ -0,0 +1,17 @@ +{ + "name": "types", + "version": "1.0.0", + "main": "index.js", + "type": "module", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "dependencies": { + "@repo/typescript-config": "workspace:*", + "zod": "^3.24.2" + }, + "keywords": [], + "author": "", + "license": "ISC", + "description": "" +} diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts new file mode 100644 index 0000000..38f7dd5 --- /dev/null +++ b/packages/types/src/index.ts @@ -0,0 +1,13 @@ +import { z } from "zod"; + +export const UserTypeSchema = z.object({ + username: z.string(), + email: z.string().email(), + password: z.string().max(100).min(10), +}) + +export const ProjectTypeSchema = z.object({ + name: z.string(), + url: z.string().url(), + private: z.boolean() +}) \ No newline at end of file diff --git a/packages/types/tsconfig.json b/packages/types/tsconfig.json new file mode 100644 index 0000000..82e73be --- /dev/null +++ b/packages/types/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "@repo/typescript-config/base.json" +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 382307c..79b819f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,6 +20,9 @@ importers: apps/services: dependencies: + '@clerk/express': + specifier: ^1.3.50 + version: 1.3.50(express@4.21.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0) '@repo/db': specifier: workspace:* version: link:../../packages/db @@ -162,6 +165,15 @@ importers: specifier: ^8.23.0 version: 8.23.0(eslint@9.20.0)(typescript@5.7.3) + packages/types: + dependencies: + '@repo/typescript-config': + specifier: workspace:* + version: link:../typescript-config + zod: + specifier: ^3.24.2 + version: 3.24.2 + packages/typescript-config: {} packages/ui: @@ -210,6 +222,32 @@ packages: '@better-fetch/fetch@1.1.12': resolution: {integrity: sha512-B3bfloI/2UBQWIATRN6qmlORrvx3Mp0kkNjmXLv0b+DtbtR+pP4/I5kQA/rDUv+OReLywCCldf6co4LdDmh8JA==} + '@clerk/backend@1.24.3': + resolution: {integrity: sha512-kKdIAm4E/gazigdg/9uVrbwRl1Wnv+YYlZwTbb2U8y/XKMSiItjo0IaXAv3pF5j7gRxAVwcsnncQheqBOTNwNg==} + engines: {node: '>=18.17.0'} + + '@clerk/express@1.3.50': + resolution: {integrity: sha512-MlQ9Fjm2ruEXFilKBfQkoo0hJPgwdolhnNO+e1B5zuzRKYRUtGtY3fAeoI0tkzuYtoDhxTXr95/IoZFNqiJQBA==} + engines: {node: '>=18.17.0'} + peerDependencies: + express: ^4.17.0 || ^5.0.0 + + '@clerk/shared@3.0.0': + resolution: {integrity: sha512-c5TUTMrir4yrxdQh2xiILowFvHZydBIuX1tFOKKWQZsNqlFYXbbeUHDxEIcxvb4uarGSiuEzVsx6S2hT2ZBCQQ==} + engines: {node: '>=18.17.0'} + peerDependencies: + react: ^18.0.0 || ^19.0.0 || ^19.0.0-0 + react-dom: ^18.0.0 || ^19.0.0 || ^19.0.0-0 + peerDependenciesMeta: + react: + optional: true + react-dom: + optional: true + + '@clerk/types@4.47.0': + resolution: {integrity: sha512-xB/gqMq6cq6/47ymKs0WaaxKEFPzlvbSgJTLFIfnPMnFSNwYE4WVgVh6geFx6qWr3z588JDDZkJskBHZlgPmQQ==} + engines: {node: '>=18.17.0'} + '@cspotcode/source-map-support@0.8.1': resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} @@ -1346,6 +1384,10 @@ packages: resolution: {integrity: sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==} engines: {node: '>= 0.6'} + cookie@1.0.2: + resolution: {integrity: sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==} + engines: {node: '>=18'} + core-js-pure@3.40.0: resolution: {integrity: sha512-AtDzVIgRrmRKQai62yuSIN5vNiQjcJakJb4fbhVw3ehxx7Lohphvw9SGNWKhLFqSxC4ilD0g/L1huAYFQU3Q6A==} @@ -1429,6 +1471,10 @@ packages: resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} engines: {node: '>= 0.8'} + dequal@2.0.3: + resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} + engines: {node: '>=6'} + destroy@1.2.0: resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} @@ -1452,6 +1498,9 @@ packages: dot-case@2.1.1: resolution: {integrity: sha512-HnM6ZlFqcajLsyudHq7LeeLDr2rFAVYtDv/hV5qchQEidSck8j9OPUsXY9KwJv/lHMtYlX4DjRQqwFYa+0r8Ug==} + dot-case@3.0.4: + resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} + dotenv@16.0.3: resolution: {integrity: sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==} engines: {node: '>=12'} @@ -1849,6 +1898,9 @@ packages: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} + glob-to-regexp@0.4.1: + resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} + glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} deprecated: Glob versions prior to v9 are no longer supported @@ -2141,6 +2193,10 @@ packages: jose@5.10.0: resolution: {integrity: sha512-s+3Al/p9g32Iq+oqXxkW//7jk2Vig6FF1CFqzVXoTUXt2qz89YWbL+OwS17NFYEvxC35n0FKeGO2LGYSxeM2Gg==} + js-cookie@3.0.5: + resolution: {integrity: sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==} + engines: {node: '>=14'} + js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -2209,6 +2265,9 @@ packages: lower-case@1.1.4: resolution: {integrity: sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA==} + lower-case@2.0.2: + resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} + lru-cache@7.18.3: resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} engines: {node: '>=12'} @@ -2216,6 +2275,10 @@ packages: make-error@1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + map-obj@4.3.0: + resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} + engines: {node: '>=8'} + math-intrinsics@1.1.0: resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} engines: {node: '>= 0.4'} @@ -2329,6 +2392,9 @@ packages: no-case@2.3.2: resolution: {integrity: sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==} + no-case@3.0.4: + resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} + node-plop@0.26.3: resolution: {integrity: sha512-Cov028YhBZ5aB7MdMWJEmwyBig43aGL5WT4vdoB28Oitau1zZAcHUn8Sgfk9HM33TqhtLJ9PlM/O0Mv+QpV/4Q==} engines: {node: '>=8.9.4'} @@ -2725,6 +2791,13 @@ packages: snake-case@2.1.0: resolution: {integrity: sha512-FMR5YoPFwOLuh4rRz92dywJjyKYZNLpMn1R5ujVpIYkbA9p01fq8RMg0FkO4M+Yobt4MjHeLTJVm5xFFBHSV2Q==} + snake-case@3.0.4: + resolution: {integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==} + + snakecase-keys@8.0.1: + resolution: {integrity: sha512-Sj51kE1zC7zh6TDlNNz0/Jn1n5HiHdoQErxO8jLtnyrkJW/M5PrI7x05uDgY3BO7OUQYKCvmeMurW6BPUdwEOw==} + engines: {node: '>=18'} + socks-proxy-agent@8.0.5: resolution: {integrity: sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==} engines: {node: '>= 14'} @@ -2751,6 +2824,9 @@ packages: resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} engines: {node: '>= 0.8'} + std-env@3.8.0: + resolution: {integrity: sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==} + streamsearch@1.1.0: resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} engines: {node: '>=10.0.0'} @@ -2825,6 +2901,11 @@ packages: swap-case@1.1.2: resolution: {integrity: sha512-BAmWG6/bx8syfc6qXPprof3Mn5vQgf5dwdUNJhsNqU9WdPt5P+ES/wQ5bxfijy8zwZgZZHslC3iAsxsuQMCzJQ==} + swr@2.3.2: + resolution: {integrity: sha512-RosxFpiabojs75IwQ316DGoDRmOqtiAj0tg8wCcbEu4CiLZBs/a9QNtHV7TUfDXmmlgqij/NqzKq/eLelyv9xA==} + peerDependencies: + react: ^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} @@ -2872,6 +2953,9 @@ packages: tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + tslib@2.4.1: + resolution: {integrity: sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==} + tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} @@ -2922,6 +3006,10 @@ packages: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} + type-fest@4.35.0: + resolution: {integrity: sha512-2/AwEFQDFEy30iOLjrvHDIH7e4HEWH+f1Yl1bI5XMqzuoCUqwYCdxachgsgv0og/JdVZUhbfjcJAoHj5L1753A==} + engines: {node: '>=16'} + type-is@1.6.18: resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} engines: {node: '>= 0.6'} @@ -2989,6 +3077,11 @@ packages: uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + use-sync-external-store@1.4.0: + resolution: {integrity: sha512-9WXSPC5fMv61vaupRkCKCxsPxBocVnwakBEkMIHHpkTTg6icbJtg6jzgtLDm4bl3cSHAca52rYWih0k4K3PfHw==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} @@ -3074,6 +3167,44 @@ snapshots: '@better-fetch/fetch@1.1.12': {} + '@clerk/backend@1.24.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@clerk/shared': 3.0.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@clerk/types': 4.47.0 + cookie: 1.0.2 + snakecase-keys: 8.0.1 + tslib: 2.4.1 + transitivePeerDependencies: + - react + - react-dom + + '@clerk/express@1.3.50(express@4.21.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@clerk/backend': 1.24.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@clerk/shared': 3.0.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + '@clerk/types': 4.47.0 + express: 4.21.2 + tslib: 2.4.1 + transitivePeerDependencies: + - react + - react-dom + + '@clerk/shared@3.0.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + dependencies: + '@clerk/types': 4.47.0 + dequal: 2.0.3 + glob-to-regexp: 0.4.1 + js-cookie: 3.0.5 + std-env: 3.8.0 + swr: 2.3.2(react@19.0.0) + optionalDependencies: + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + + '@clerk/types@4.47.0': + dependencies: + csstype: 3.1.3 + '@cspotcode/source-map-support@0.8.1': dependencies: '@jridgewell/trace-mapping': 0.3.9 @@ -4090,6 +4221,8 @@ snapshots: cookie@0.7.1: {} + cookie@1.0.2: {} + core-js-pure@3.40.0: {} cors@2.8.5: @@ -4176,6 +4309,8 @@ snapshots: depd@2.0.0: {} + dequal@2.0.3: {} + destroy@1.2.0: {} detect-libc@2.0.3: @@ -4195,6 +4330,11 @@ snapshots: dependencies: no-case: 2.3.2 + dot-case@3.0.4: + dependencies: + no-case: 3.0.4 + tslib: 2.8.1 + dotenv@16.0.3: {} dotenv@16.4.7: {} @@ -4742,6 +4882,8 @@ snapshots: dependencies: is-glob: 4.0.3 + glob-to-regexp@0.4.1: {} + glob@7.2.3: dependencies: fs.realpath: 1.0.0 @@ -5064,6 +5206,8 @@ snapshots: jose@5.10.0: {} + js-cookie@3.0.5: {} + js-tokens@4.0.0: {} js-yaml@4.1.0: @@ -5131,10 +5275,16 @@ snapshots: lower-case@1.1.4: {} + lower-case@2.0.2: + dependencies: + tslib: 2.8.1 + lru-cache@7.18.3: {} make-error@1.3.6: {} + map-obj@4.3.0: {} + math-intrinsics@1.1.0: {} media-typer@0.3.0: {} @@ -5223,6 +5373,11 @@ snapshots: dependencies: lower-case: 1.1.4 + no-case@3.0.4: + dependencies: + lower-case: 2.0.2 + tslib: 2.8.1 + node-plop@0.26.3: dependencies: '@babel/runtime-corejs3': 7.26.7 @@ -5722,6 +5877,17 @@ snapshots: dependencies: no-case: 2.3.2 + snake-case@3.0.4: + dependencies: + dot-case: 3.0.4 + tslib: 2.8.1 + + snakecase-keys@8.0.1: + dependencies: + map-obj: 4.3.0 + snake-case: 3.0.4 + type-fest: 4.35.0 + socks-proxy-agent@8.0.5: dependencies: agent-base: 7.1.3 @@ -5748,6 +5914,8 @@ snapshots: statuses@2.0.1: {} + std-env@3.8.0: {} + streamsearch@1.1.0: {} string-width@4.2.3: @@ -5834,6 +6002,12 @@ snapshots: lower-case: 1.1.4 upper-case: 1.1.3 + swr@2.3.2(react@19.0.0): + dependencies: + dequal: 2.0.3 + react: 19.0.0 + use-sync-external-store: 1.4.0(react@19.0.0) + through@2.3.8: {} tinycolor2@1.6.0: {} @@ -5900,6 +6074,8 @@ snapshots: tslib@1.14.1: {} + tslib@2.4.1: {} + tslib@2.8.1: {} tsx@4.19.3: @@ -5942,6 +6118,8 @@ snapshots: type-fest@0.21.3: {} + type-fest@4.35.0: {} + type-is@1.6.18: dependencies: media-typer: 0.3.0 @@ -6025,6 +6203,10 @@ snapshots: dependencies: punycode: 2.3.1 + use-sync-external-store@1.4.0(react@19.0.0): + dependencies: + react: 19.0.0 + util-deprecate@1.0.2: {} utils-merge@1.0.1: {}