From 9c593bd986673572c2a6fe94fad1991fe0e84f1e Mon Sep 17 00:00:00 2001 From: gaku1023 <89888424+gaku1023@users.noreply.github.com> Date: Mon, 7 Apr 2025 20:36:55 +0900 Subject: [PATCH] =?UTF-8?q?better-auth=E3=81=A7=E3=81=AEgoogle=E8=AA=8D?= =?UTF-8?q?=E8=A8=BC=E5=AE=9F=E8=A3=85=E3=82=92=E3=81=97=E3=81=9F=E3=81=8B?= =?UTF-8?q?=E3=81=A3=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 5 + app/app.css | 13 +- app/components/AccountMenu.tsx | 30 +- app/components/AddIdeaButton.tsx | 8 +- app/components/Login.css | 68 --- app/components/Login.tsx | 31 -- app/components/Register.css | 104 ---- app/components/Register.tsx | 38 -- app/components/SearchBar.tsx | 22 +- app/components/index.tsx | 0 app/components/mindmap.css | 4 +- app/lib/auth-client.ts | 3 + database/schema.ts | 77 ++- drizzle.config.ts | 18 +- drizzle/0000_flimsy_bullseye.sql | 13 - drizzle/0001_blushing_daimon_hellstrom.sql | 20 - drizzle/meta/0000_snapshot.json | 89 --- drizzle/meta/0001_snapshot.json | 141 ----- drizzle/meta/_journal.json | 20 - load-context.ts | 34 +- package.json | 117 ++-- pnpm-lock.yaml | 611 ++++++++++++++++++++- server/auth/auth.ts | 24 + server/data/idea.ts | 18 +- server/data/tag.ts | 12 +- server/idea.ts | 2 +- server/index.ts | 17 + tsconfig.cloudflare.json | 60 +- tsconfig.json | 24 +- tsconfig.node.json | 34 +- worker-configuration.d.ts | 2 +- worker.ts | 8 +- wrangler.toml | 2 +- 33 files changed, 906 insertions(+), 763 deletions(-) delete mode 100644 app/components/Login.css delete mode 100644 app/components/Login.tsx delete mode 100644 app/components/Register.css delete mode 100644 app/components/Register.tsx delete mode 100644 app/components/index.tsx create mode 100644 app/lib/auth-client.ts delete mode 100644 drizzle/0000_flimsy_bullseye.sql delete mode 100644 drizzle/0001_blushing_daimon_hellstrom.sql delete mode 100644 drizzle/meta/0000_snapshot.json delete mode 100644 drizzle/meta/0001_snapshot.json delete mode 100644 drizzle/meta/_journal.json create mode 100644 server/auth/auth.ts diff --git a/.gitignore b/.gitignore index 23d60ef..f119bc3 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,8 @@ # Editor *.code-workspace + +.env +.dev.vars + +.drizzle \ No newline at end of file diff --git a/app/app.css b/app/app.css index 4332701..e6e663e 100644 --- a/app/app.css +++ b/app/app.css @@ -3,15 +3,16 @@ @plugin "@tailwindcss/typography"; @theme { - --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif, - "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif, + "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", + "Noto Color Emoji"; } html, body { - @apply bg-white dark:bg-gray-950; + @apply bg-white dark:bg-gray-950; - @media (prefers-color-scheme: dark) { - color-scheme: dark; - } + @media (prefers-color-scheme: dark) { + color-scheme: dark; + } } diff --git a/app/components/AccountMenu.tsx b/app/components/AccountMenu.tsx index eab23e7..9eb5a18 100644 --- a/app/components/AccountMenu.tsx +++ b/app/components/AccountMenu.tsx @@ -1,27 +1,33 @@ -import { useState } from 'react'; +import { useState } from "react"; +import { authClient } from "../lib/auth-client"; export const AccountMenu = () => { const [isOpen, setIsOpen] = useState(false); + const handleLogin = async () => { + await authClient.signIn.social({ + provider: "google", + callbackURL: "/api/auth/callback/google", + }); + }; + return ( -
-
- {/* アバター(クリックでメニュー表示) */} +
+
+ {/* ログインボタン */} - {/* メニュー */} + {/* メニュー - ログイン後に表示 */}
  • -
-
- ); -}; diff --git a/app/components/SearchBar.tsx b/app/components/SearchBar.tsx index e070097..84ea859 100644 --- a/app/components/SearchBar.tsx +++ b/app/components/SearchBar.tsx @@ -1,28 +1,28 @@ -import { useState } from 'react'; -import { HiOutlineSearch } from 'react-icons/hi'; +import { useState } from "react"; +import { HiOutlineSearch } from "react-icons/hi"; export const SearchBar = () => { - const [query, setQuery] = useState(''); + const [query, setQuery] = useState(""); const handleSearch = (e: React.FormEvent) => { e.preventDefault(); - console.log('検索クエリ:', query); // とりあえずconsole.logしとく + console.log("検索クエリ:", query); // とりあえずconsole.logしとく }; return ( -
+
setQuery(e.target.value)} - className='bg-transparent outline-none w-full text-white placeholder-gray-400' + className="bg-transparent outline-none w-full text-white placeholder-gray-400" /> -
diff --git a/app/components/index.tsx b/app/components/index.tsx deleted file mode 100644 index e69de29..0000000 diff --git a/app/components/mindmap.css b/app/components/mindmap.css index fed1877..cf74845 100644 --- a/app/components/mindmap.css +++ b/app/components/mindmap.css @@ -1,4 +1,4 @@ .sigma-container { - width: 99%; - height: 99%; + width: 99%; + height: 99%; } diff --git a/app/lib/auth-client.ts b/app/lib/auth-client.ts new file mode 100644 index 0000000..f1012dd --- /dev/null +++ b/app/lib/auth-client.ts @@ -0,0 +1,3 @@ +import { createAuthClient } from "better-auth/react"; + +export const authClient = createAuthClient(); diff --git a/database/schema.ts b/database/schema.ts index 79403a4..5f014a6 100644 --- a/database/schema.ts +++ b/database/schema.ts @@ -1,35 +1,70 @@ -import { relations } from "drizzle-orm"; import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core"; -export const userTable = sqliteTable("user", { - id: integer().notNull().primaryKey({ autoIncrement: true }), - iconUrl: text(), - name: text().notNull(), - bio: text().notNull(), +export const user = sqliteTable("user", { + id: text("id").primaryKey(), + name: text("name").notNull(), + email: text("email").notNull().unique(), + emailVerified: integer("email_verified", { mode: "boolean" }).notNull(), + image: text("image"), + createdAt: integer("created_at", { mode: "timestamp" }).notNull(), + updatedAt: integer("updated_at", { mode: "timestamp" }).notNull(), }); -export const userRelations = relations(userTable, ({ many }) => ({ - ideas: many(ideaTable), -})); +export const session = sqliteTable("session", { + id: text("id").primaryKey(), + expiresAt: integer("expires_at", { mode: "timestamp" }).notNull(), + token: text("token").notNull().unique(), + createdAt: integer("created_at", { mode: "timestamp" }).notNull(), + updatedAt: integer("updated_at", { mode: "timestamp" }).notNull(), + ipAddress: text("ip_address"), + userAgent: text("user_agent"), + userId: text("user_id") + .notNull() + .references(() => user.id, { onDelete: "cascade" }), +}); -export const ideaTable = sqliteTable("idea", { - id: integer().notNull().primaryKey({ autoIncrement: true }), - authorId: integer() +export const account = sqliteTable("account", { + id: text("id").primaryKey(), + accountId: text("account_id").notNull(), + providerId: text("provider_id").notNull(), + userId: text("user_id") + .notNull() + .references(() => user.id, { onDelete: "cascade" }), + accessToken: text("access_token"), + refreshToken: text("refresh_token"), + idToken: text("id_token"), + accessTokenExpiresAt: integer("access_token_expires_at", { + mode: "timestamp", + }), + refreshTokenExpiresAt: integer("refresh_token_expires_at", { + mode: "timestamp", + }), + scope: text("scope"), + password: text("password"), + createdAt: integer("created_at", { mode: "timestamp" }).notNull(), + updatedAt: integer("updated_at", { mode: "timestamp" }).notNull(), +}); + +export const verification = sqliteTable("verification", { + id: text("id").primaryKey(), + identifier: text("identifier").notNull(), + value: text("value").notNull(), + expiresAt: integer("expires_at", { mode: "timestamp" }).notNull(), + createdAt: integer("created_at", { mode: "timestamp" }), + updatedAt: integer("updated_at", { mode: "timestamp" }), +}); + +export const idea = sqliteTable("idea", { + id: integer().primaryKey({ autoIncrement: true }), + authorId: text() .notNull() - .references(() => userTable.id), + .references(() => user.id), name: text().notNull(), description: text().notNull(), tagIds: text({ mode: "json" }).$type().notNull().default([]), }); -export const ideaReations = relations(ideaTable, ({ one }) => ({ - author: one(userTable, { - fields: [ideaTable.authorId], - references: [userTable.id], - }), -})); - -export const tagTable = sqliteTable("tag", { +export const tag = sqliteTable("tag", { id: integer().notNull().primaryKey({ autoIncrement: true }), name: text().notNull().unique(), }); diff --git a/drizzle.config.ts b/drizzle.config.ts index 0e8ad72..06adea1 100644 --- a/drizzle.config.ts +++ b/drizzle.config.ts @@ -1,13 +1,13 @@ import type { Config } from "drizzle-kit"; export default { - out: "./drizzle", - schema: "./database/schema.ts", - dialect: "sqlite", - driver: "d1-http", - dbCredentials: { - databaseId: "your-database-id", - accountId: process.env.CLOUDFLARE_ACCOUNT_ID!, - token: process.env.CLOUDFLARE_TOKEN!, - }, + out: "./.drizzle", + schema: "./database/schema.ts", + dialect: "sqlite", + driver: "d1-http", + dbCredentials: { + databaseId: "your-database-id", + accountId: process.env.CLOUDFLARE_ACCOUNT_ID!, + token: process.env.CLOUDFLARE_TOKEN!, + }, } satisfies Config; diff --git a/drizzle/0000_flimsy_bullseye.sql b/drizzle/0000_flimsy_bullseye.sql deleted file mode 100644 index 8962dbb..0000000 --- a/drizzle/0000_flimsy_bullseye.sql +++ /dev/null @@ -1,13 +0,0 @@ -CREATE TABLE `idea` ( - `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, - `name` text NOT NULL, - `description` text NOT NULL, - `tagIds` text DEFAULT '[]' -); ---> statement-breakpoint -CREATE TABLE `tag` ( - `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, - `name` text NOT NULL -); ---> statement-breakpoint -CREATE UNIQUE INDEX `tag_name_unique` ON `tag` (`name`); \ No newline at end of file diff --git a/drizzle/0001_blushing_daimon_hellstrom.sql b/drizzle/0001_blushing_daimon_hellstrom.sql deleted file mode 100644 index b118ff2..0000000 --- a/drizzle/0001_blushing_daimon_hellstrom.sql +++ /dev/null @@ -1,20 +0,0 @@ -CREATE TABLE `user` ( - `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, - `name` text NOT NULL, - `bio` text NOT NULL -); ---> statement-breakpoint -PRAGMA foreign_keys=OFF;--> statement-breakpoint -CREATE TABLE `__new_idea` ( - `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, - `authorId` integer NOT NULL, - `name` text NOT NULL, - `description` text NOT NULL, - `tagIds` text DEFAULT '[]' NOT NULL, - FOREIGN KEY (`authorId`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE no action -); ---> statement-breakpoint -INSERT INTO `__new_idea`("id", "authorId", "name", "description", "tagIds") SELECT "id", "authorId", "name", "description", "tagIds" FROM `idea`;--> statement-breakpoint -DROP TABLE `idea`;--> statement-breakpoint -ALTER TABLE `__new_idea` RENAME TO `idea`;--> statement-breakpoint -PRAGMA foreign_keys=ON; \ No newline at end of file diff --git a/drizzle/meta/0000_snapshot.json b/drizzle/meta/0000_snapshot.json deleted file mode 100644 index 708bb2c..0000000 --- a/drizzle/meta/0000_snapshot.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "version": "6", - "dialect": "sqlite", - "id": "5401569a-e4ff-4644-b021-de94dfd37232", - "prevId": "00000000-0000-0000-0000-000000000000", - "tables": { - "idea": { - "name": "idea", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "autoincrement": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tagIds": { - "name": "tagIds", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false, - "default": "'[]'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "tag": { - "name": "tag", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "autoincrement": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "tag_name_unique": { - "name": "tag_name_unique", - "columns": [ - "name" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - } - }, - "views": {}, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "internal": { - "indexes": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0001_snapshot.json b/drizzle/meta/0001_snapshot.json deleted file mode 100644 index 34de8bf..0000000 --- a/drizzle/meta/0001_snapshot.json +++ /dev/null @@ -1,141 +0,0 @@ -{ - "version": "6", - "dialect": "sqlite", - "id": "2802471a-561f-4de7-96bb-ffbce9c1ca1f", - "prevId": "5401569a-e4ff-4644-b021-de94dfd37232", - "tables": { - "idea": { - "name": "idea", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "autoincrement": true - }, - "authorId": { - "name": "authorId", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tagIds": { - "name": "tagIds", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false, - "default": "'[]'" - } - }, - "indexes": {}, - "foreignKeys": { - "idea_authorId_user_id_fk": { - "name": "idea_authorId_user_id_fk", - "tableFrom": "idea", - "tableTo": "user", - "columnsFrom": [ - "authorId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "tag": { - "name": "tag", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "autoincrement": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": { - "tag_name_unique": { - "name": "tag_name_unique", - "columns": [ - "name" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - }, - "user": { - "name": "user", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "autoincrement": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "bio": { - "name": "bio", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "checkConstraints": {} - } - }, - "views": {}, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "internal": { - "indexes": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/_journal.json b/drizzle/meta/_journal.json deleted file mode 100644 index 9156a9d..0000000 --- a/drizzle/meta/_journal.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "version": "7", - "dialect": "sqlite", - "entries": [ - { - "idx": 0, - "version": "6", - "when": 1743482087714, - "tag": "0000_flimsy_bullseye", - "breakpoints": true - }, - { - "idx": 1, - "version": "6", - "when": 1743744022966, - "tag": "0001_blushing_daimon_hellstrom", - "breakpoints": true - } - ] -} \ No newline at end of file diff --git a/load-context.ts b/load-context.ts index a9bca3b..8fb2014 100644 --- a/load-context.ts +++ b/load-context.ts @@ -1,32 +1,32 @@ -import { drizzle, type DrizzleD1Database } from "drizzle-orm/d1"; -import * as schema from "./database/schema"; import type { ExecutionContext } from "@cloudflare/workers-types"; +import { type DrizzleD1Database, drizzle } from "drizzle-orm/d1"; import type { AppLoadContext } from "react-router"; +import * as schema from "./database/schema"; declare global { - interface CloudflareEnvironment extends Env {} + interface CloudflareEnvironment extends Env {} } declare module "react-router" { - export interface AppLoadContext { - cloudflare: { - env: CloudflareEnvironment; - ctx: Omit; - }; - db: DrizzleD1Database; - } + export interface AppLoadContext { + cloudflare: { + env: CloudflareEnvironment; + ctx: Omit; + }; + db: DrizzleD1Database; + } } type GetLoadContextArgs = { - request: Request; - context: Pick; + request: Request; + context: Pick; }; export function getLoadContext({ context }: GetLoadContextArgs) { - const db = drizzle(context.cloudflare.env.DB, { schema }); + const db = drizzle(context.cloudflare.env.DB, { schema }); - return { - cloudflare: context.cloudflare, - db, - }; + return { + cloudflare: context.cloudflare, + db, + }; } diff --git a/package.json b/package.json index 1888d8e..6601ef5 100644 --- a/package.json +++ b/package.json @@ -1,57 +1,64 @@ { - "name": "inw", - "private": true, - "type": "module", - "scripts": { - "build": "react-router build", - "db:generate": "dotenv -- drizzle-kit generate", - "db:migrate": "wrangler d1 migrations apply --local DB", - "db:migrate-production": "dotenv -- drizzle-kit migrate", - "deploy": "pnpm run build && wrangler deploy", - "dev": "react-router dev", - "start": "wrangler dev", - "typecheck": "wrangler types && react-router typegen && tsc -b" - }, - "dependencies": { - "@hono/zod-validator": "^0.4.3", - "@react-router/node": "^7.4.1", - "@react-router/serve": "^7.4.1", - "@react-sigma/core": "^5.0.2", - "@react-sigma/layout-core": "^5.0.2", - "@react-sigma/layout-force": "^5.0.2", - "@tailwindcss/typography": "^0.5.16", - "cloudflare": "link:@hono/vite-dev-server/cloudflare", - "drizzle-orm": "~0.36.4", - "graphology": "^0.25.4", - "graphology-layout-forceatlas2": "^0.10.1", - "graphology-types": "^0.24.8", - "hono": "^4.7.5", - "hono-react-router-adapter": "^0.6.5", - "isbot": "^5.1.25", - "react": "^19.1.0", - "react-dom": "^19.1.0", - "react-icons": "^5.5.0", - "react-markdown": "^10.1.0", - "react-router": "^7.4.1", - "sigma": "^3.0.1", - "unstorage": "^1.15.0", - "zod": "^3.24.2" - }, - "devDependencies": { - "@cloudflare/workers-types": "^4.20250327.0", - "@hono/vite-dev-server": "^0.19.0", - "@react-router/dev": "^7.4.1", - "@tailwindcss/vite": "^4.0.17", - "@types/node": "^20.17.29", - "@types/react": "^19.0.12", - "@types/react-dom": "^19.0.4", - "daisyui": "^5.0.9", - "dotenv-cli": "^7.4.4", - "drizzle-kit": "~0.28.1", - "tailwindcss": "^4.0.17", - "typescript": "^5.8.2", - "vite": "^5.4.16", - "vite-tsconfig-paths": "^5.1.4", - "wrangler": "^3.114.3" - } + "name": "inw", + "private": true, + "type": "module", + "scripts": { + "build": "react-router build", + "db:generate": "dotenv -- drizzle-kit generate", + "db:migrate": "wrangler d1 migrations apply --local DB", + "db:migrate-production": "dotenv -- drizzle-kit migrate", + "deploy": "pnpm run build && wrangler deploy", + "dev": "react-router dev", + "start": "wrangler dev", + "typecheck": "wrangler types && react-router typegen && tsc -b" + }, + "dependencies": { + "@auth/core": "^0.38.0", + "@auth/drizzle-adapter": "^1.8.0", + "@hono/zod-validator": "^0.4.3", + "@react-router/node": "^7.4.1", + "@react-router/serve": "^7.4.1", + "@react-sigma/core": "^5.0.2", + "@react-sigma/layout-core": "^5.0.2", + "@react-sigma/layout-force": "^5.0.2", + "@tailwindcss/typography": "^0.5.16", + "better-auth": "^1.2.5", + "better-sqlite3": "^11.9.1", + "cloudflare": "link:@hono/vite-dev-server/cloudflare", + "drizzle-orm": "^0.41.0", + "graphology": "^0.25.4", + "graphology-layout-forceatlas2": "^0.10.1", + "graphology-types": "^0.24.8", + "hono": "^4.7.5", + "hono-react-router-adapter": "^0.6.5", + "hono-sessions": "^0.7.2", + "isbot": "^5.1.25", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "react-icons": "^5.5.0", + "react-markdown": "^10.1.0", + "react-router": "^7.4.1", + "sigma": "^3.0.1", + "sqlite-core@0.35.0": "link:drizzle-orm/sqlite-core@0.35.0", + "unstorage": "^1.15.0", + "zod": "^3.24.2" + }, + "devDependencies": { + "@cloudflare/workers-types": "^4.20250327.0", + "@hono/vite-dev-server": "^0.19.0", + "@react-router/dev": "^7.4.1", + "@tailwindcss/vite": "^4.0.17", + "@types/better-sqlite3": "^7.6.13", + "@types/node": "^20.17.29", + "@types/react": "^19.0.12", + "@types/react-dom": "^19.0.4", + "daisyui": "^5.0.9", + "dotenv-cli": "^7.4.4", + "drizzle-kit": "^0.30.6", + "tailwindcss": "^4.0.17", + "typescript": "^5.8.2", + "vite": "^5.4.16", + "vite-tsconfig-paths": "^5.1.4", + "wrangler": "^3.114.3" + } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ecb8d5a..6cf42b2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,12 @@ importers: .: dependencies: + '@auth/core': + specifier: ^0.38.0 + version: 0.38.0 + '@auth/drizzle-adapter': + specifier: ^1.8.0 + version: 1.8.0 '@hono/zod-validator': specifier: ^0.4.3 version: 0.4.3(hono@4.7.5)(zod@3.24.2) @@ -29,12 +35,18 @@ importers: '@tailwindcss/typography': specifier: ^0.5.16 version: 0.5.16(tailwindcss@4.0.17) + better-auth: + specifier: ^1.2.5 + version: 1.2.5(typescript@5.8.2) + better-sqlite3: + specifier: ^11.9.1 + version: 11.9.1 cloudflare: specifier: link:@hono/vite-dev-server/cloudflare version: link:@hono/vite-dev-server/cloudflare drizzle-orm: - specifier: ~0.36.4 - version: 0.36.4(@cloudflare/workers-types@4.20250327.0)(@types/react@19.0.12)(react@19.1.0) + specifier: ^0.41.0 + version: 0.41.0(@cloudflare/workers-types@4.20250327.0)(@types/better-sqlite3@7.6.13)(better-sqlite3@11.9.1)(gel@2.0.2)(kysely@0.27.6) graphology: specifier: ^0.25.4 version: 0.25.4(graphology-types@0.24.8) @@ -50,6 +62,9 @@ importers: hono-react-router-adapter: specifier: ^0.6.5 version: 0.6.5(hono@4.7.5)(miniflare@4.20250321.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(typescript@5.8.2)(wrangler@3.114.3(@cloudflare/workers-types@4.20250327.0)) + hono-sessions: + specifier: ^0.7.2 + version: 0.7.2 isbot: specifier: ^5.1.25 version: 5.1.25 @@ -71,6 +86,9 @@ importers: sigma: specifier: ^3.0.1 version: 3.0.1(graphology-types@0.24.8) + sqlite-core@0.35.0: + specifier: link:drizzle-orm/sqlite-core@0.35.0 + version: link:drizzle-orm/sqlite-core@0.35.0 unstorage: specifier: ^1.15.0 version: 1.15.0 @@ -90,6 +108,9 @@ importers: '@tailwindcss/vite': specifier: ^4.0.17 version: 4.0.17(vite@5.4.16(@types/node@20.17.29)(lightningcss@1.29.2)) + '@types/better-sqlite3': + specifier: ^7.6.13 + version: 7.6.13 '@types/node': specifier: ^20.17.29 version: 20.17.29 @@ -106,8 +127,8 @@ importers: specifier: ^7.4.4 version: 7.4.4 drizzle-kit: - specifier: ~0.28.1 - version: 0.28.1 + specifier: ^0.30.6 + version: 0.30.6 tailwindcss: specifier: ^4.0.17 version: 4.0.17 @@ -130,6 +151,23 @@ packages: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} + '@auth/core@0.38.0': + resolution: {integrity: sha512-ClHl44x4cY3wfJmHLpW+XrYqED0fZIzbHmwbExltzroCjR5ts3DLTWzADRba8mJFYZ8JIEJDa+lXnGl0E9Bl7Q==} + peerDependencies: + '@simplewebauthn/browser': ^9.0.1 + '@simplewebauthn/server': ^9.0.2 + nodemailer: ^6.8.0 + peerDependenciesMeta: + '@simplewebauthn/browser': + optional: true + '@simplewebauthn/server': + optional: true + nodemailer: + optional: true + + '@auth/drizzle-adapter@1.8.0': + resolution: {integrity: sha512-cxApE0h5WcyDsgGix9hzmWmCz0qxvmMJexAOQmI6R/YXYxrZ/mKBKu0BlfgQBR6z2XvNWl4wbEGchwSenSCksQ==} + '@babel/code-frame@7.26.2': resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} engines: {node: '>=6.9.0'} @@ -265,6 +303,12 @@ packages: resolution: {integrity: sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg==} engines: {node: '>=6.9.0'} + '@better-auth/utils@0.2.4': + resolution: {integrity: sha512-ayiX87Xd5sCHEplAdeMgwkA0FgnXsEZBgDn890XHHwSWNqqRZDYOq3uj2Ei2leTv1I2KbG5HHn60Ah1i2JWZjQ==} + + '@better-fetch/fetch@1.1.18': + resolution: {integrity: sha512-rEFOE1MYIsBmoMJtQbl32PGHHXuG2hDxvEd7rUHE0vCBoFQVSDqaVs9hkZEtHCxRoY+CljXKFCOuJ8uxqw1LcA==} + '@cloudflare/kv-asset-handler@0.3.4': resolution: {integrity: sha512-YLPHc8yASwjNkmcDMQMY35yiWjoKAKnhUbPRszBRS0YgH+IXtsMp61j+yTcnCE3oO2DgP0U3iejLC8FTtKDC8Q==} engines: {node: '>=16.13'} @@ -913,6 +957,9 @@ packages: resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} engines: {node: '>=14'} + '@hexagon/base64@1.1.28': + resolution: {integrity: sha512-lhqDEAvWixy3bZ+UOYbPwUbBkwBq5C1LAJ/xPC8Oi+lL54oyakv/npbA0aU2hgCsx/1NUd4IBvV03+aUBWxerw==} + '@hono/node-server@1.14.0': resolution: {integrity: sha512-YUCxJwgHRKSqjrdTk9e4VMGKN27MK5r4+MGPyZTgKH+IYbK+KtYbHeOcPGJ91KGGD6RIQiz2dAHxvjauNhOS8g==} engines: {node: '>=18.14.1'} @@ -1081,9 +1128,19 @@ packages: '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + '@levischuck/tiny-cbor@0.2.11': + resolution: {integrity: sha512-llBRm4dT4Z89aRsm6u2oEZ8tfwL/2l6BwpZ7JcyieouniDECM5AqNgr/y08zalEIvW3RSK4upYyybDcmjXqAow==} + '@mjackson/node-fetch-server@0.2.0': resolution: {integrity: sha512-EMlH1e30yzmTpGLQjlFmaDAjyOeZhng1/XCd7DExR8PNAnG/G1tyruZxEoUe11ClnwGhGrtsdnyyUx1frSzjng==} + '@noble/ciphers@0.6.0': + resolution: {integrity: sha512-mIbq/R9QXk5/cTfESb1OKtyFnk7oc1Om/8onA1158K9/OZUQFDEVy55jVTato+xmp3XX6F6Qh0zz0Nc1AxAlRQ==} + + '@noble/hashes@1.7.1': + resolution: {integrity: sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ==} + engines: {node: ^14.21.3 || >=16} + '@npmcli/git@4.1.0': resolution: {integrity: sha512-9hwoB3gStVfa0N31ymBmrX+GuDGdVA/QWShZVqE0HK2Af+7QGGrCTbZia/SW0ImUTjTne7SP91qxDmtXvDHRPQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -1096,6 +1153,27 @@ packages: resolution: {integrity: sha512-gGq0NJkIGSwdbUt4yhdF8ZrmkGKVz9vAdVzpOfnom+V8PLSmSOVhZwbNvZZS1EYcJN5hzzKBxmmVVAInM6HQLg==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + '@panva/hkdf@1.2.1': + resolution: {integrity: sha512-6oclG6Y3PiDFcoyk8srjLfVKyMfVCKJ27JwNPViuXziFpmdz+MZnZN/aKY0JGXgYuO/VghU0jcOAZgWXZ1Dmrw==} + + '@peculiar/asn1-android@2.3.16': + resolution: {integrity: sha512-a1viIv3bIahXNssrOIkXZIlI2ePpZaNmR30d4aBL99mu2rO+mT9D6zBsp7H6eROWGtmwv0Ionp5olJurIo09dw==} + + '@peculiar/asn1-ecc@2.3.15': + resolution: {integrity: sha512-/HtR91dvgog7z/WhCVdxZJ/jitJuIu8iTqiyWVgRE9Ac5imt2sT/E4obqIVGKQw7PIy+X6i8lVBoT6wC73XUgA==} + + '@peculiar/asn1-rsa@2.3.15': + resolution: {integrity: sha512-p6hsanvPhexRtYSOHihLvUUgrJ8y0FtOM97N5UEpC+VifFYyZa0iZ5cXjTkZoDwxJ/TTJ1IJo3HVTB2JJTpXvg==} + + '@peculiar/asn1-schema@2.3.15': + resolution: {integrity: sha512-QPeD8UA8axQREpgR5UTAfu2mqQmm97oUqahDtNdBcfj3qAnoXzFdQW+aNf/tD2WVXF8Fhmftxoj0eMIT++gX2w==} + + '@peculiar/asn1-x509@2.3.15': + resolution: {integrity: sha512-0dK5xqTqSLaxv1FHXIcd4Q/BZNuopg+u1l23hT9rOmQ1g4dNtw0g/RnEi+TboB0gOwGtrWn269v27cMgchFIIg==} + + '@petamoriken/float16@3.9.2': + resolution: {integrity: sha512-VgffxawQde93xKxT3qap3OH+meZf7VaSB5Sqd4Rqc+FP5alWbpOyan/7tRbOAvynjpG3GpdtAuGU/NdhQpmrog==} + '@pkgjs/parseargs@0.11.0': resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} @@ -1261,6 +1339,13 @@ packages: cpu: [x64] os: [win32] + '@simplewebauthn/browser@13.1.0': + resolution: {integrity: sha512-WuHZ/PYvyPJ9nxSzgHtOEjogBhwJfC8xzYkPC+rR/+8chl/ft4ngjiK8kSU5HtRJfczupyOh33b25TjYbvwAcg==} + + '@simplewebauthn/server@13.1.1': + resolution: {integrity: sha512-1hsLpRHfSuMB9ee2aAdh0Htza/X3f4djhYISrggqGe3xopNjOcePiSDkDDoPzDYaaMCrbqGP1H2TYU7bgL9PmA==} + engines: {node: '>=20.0.0'} + '@tailwindcss/node@4.0.17': resolution: {integrity: sha512-LIdNwcqyY7578VpofXyqjH6f+3fP4nrz7FBLki5HpzqjYfXdF2m/eW18ZfoKePtDGg90Bvvfpov9d2gy5XVCbg==} @@ -1344,6 +1429,9 @@ packages: peerDependencies: vite: ^5.2.0 || ^6 + '@types/better-sqlite3@7.6.13': + resolution: {integrity: sha512-NMv9ASNARoKksWtsq/SHakpYAYnhBrQgGD8zkLYk/jaK8jUGn08CfEdTRgYhMypUQAfzSP8W6gNLe0q19/t4VA==} + '@types/cookie@0.6.0': resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} @@ -1430,6 +1518,10 @@ packages: as-table@1.0.55: resolution: {integrity: sha512-xvsWESUJn0JN421Xb9MQw6AsMHRCUknCe0Wjlxvjud80mU4E6hQf1A6NzQKcYNmYw62MfzEtXc+badstZP3JpQ==} + asn1js@3.0.6: + resolution: {integrity: sha512-UOCGPYbl0tv8+006qks/dTgV9ajs97X2p0FAbyS2iyCRrmLSRolDaHdp+v/CLgnzHc3fVB+CwYiUmei7ndFcgA==} + engines: {node: '>=12.0.0'} + babel-dead-code-elimination@1.0.10: resolution: {integrity: sha512-DV5bdJZTzZ0zn0DC24v3jD7Mnidh6xhKa4GfKCbq3sfW8kaWhDdZjP3i81geA8T33tdYqWKw4D3fVv0CwEgKVA==} @@ -1443,10 +1535,28 @@ packages: balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + basic-auth@2.0.1: resolution: {integrity: sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==} engines: {node: '>= 0.8'} + better-auth@1.2.5: + resolution: {integrity: sha512-Tz2aKImkvaT7P9qHQ67Vhw/Slo6zpvE0jG7GoDQM+dd5tWuC3lP0OGjjWkNCZdToVlWB193i5nSHeZT90sFqEw==} + + better-call@1.0.7: + resolution: {integrity: sha512-p5kEthErx3HsW9dCCvvEx+uuEdncn0ZrlqrOG3TkR1aVYgynpwYbTVU90nY8/UwfMhROzqZWs8vryainSQxrNg==} + + better-sqlite3@11.9.1: + resolution: {integrity: sha512-Ba0KR+Fzxh2jDRhdg6TSH0SJGzb8C0aBY4hR8w8madIdIzzC6Y1+kx5qR6eS1Z+Gy20h6ZU28aeyg0z1VIrShQ==} + + bindings@1.5.0: + resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==} + + bl@4.1.0: + resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} + blake3-wasm@2.1.5: resolution: {integrity: sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g==} @@ -1465,6 +1575,9 @@ packages: buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + buffer@5.7.1: + resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + bytes@3.1.2: resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} engines: {node: '>= 0.8'} @@ -1507,6 +1620,9 @@ packages: resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} engines: {node: '>= 14.16.0'} + chownr@1.1.4: + resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} + color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} @@ -1606,6 +1722,10 @@ packages: decode-named-character-reference@1.1.0: resolution: {integrity: sha512-Wy+JTSbFThEOXQIR2L6mxJvEs+veIzpmqD7ynWxMXGpnk3smkHQOp6forLdHsKpAMW9iJpaBBIxz285t1n1C3w==} + decompress-response@6.0.0: + resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} + engines: {node: '>=10'} + dedent@1.5.3: resolution: {integrity: sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==} peerDependencies: @@ -1614,6 +1734,10 @@ packages: babel-plugin-macros: optional: true + deep-extend@0.6.0: + resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} + engines: {node: '>=4.0.0'} + defu@6.1.4: resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} @@ -1651,15 +1775,15 @@ packages: resolution: {integrity: sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==} engines: {node: '>=12'} - drizzle-kit@0.28.1: - resolution: {integrity: sha512-JimOV+ystXTWMgZkLHYHf2w3oS28hxiH1FR0dkmJLc7GHzdGJoJAQtQS5DRppnabsRZwE2U1F6CuezVBgmsBBQ==} + drizzle-kit@0.30.6: + resolution: {integrity: sha512-U4wWit0fyZuGuP7iNmRleQyK2V8wCuv57vf5l3MnG4z4fzNTjY/U13M8owyQ5RavqvqxBifWORaR3wIUzlN64g==} hasBin: true - drizzle-orm@0.36.4: - resolution: {integrity: sha512-1OZY3PXD7BR00Gl61UUOFihslDldfH4NFRH2MbP54Yxi0G/PKn4HfO65JYZ7c16DeP3SpM3Aw+VXVG9j6CRSXA==} + drizzle-orm@0.41.0: + resolution: {integrity: sha512-7A4ZxhHk9gdlXmTdPj/lREtP+3u8KvZ4yEN6MYVxBzZGex5Wtdc+CWSbu7btgF6TB0N+MNPrvW7RKBbxJchs/Q==} peerDependencies: '@aws-sdk/client-rds-data': '>=3' - '@cloudflare/workers-types': '>=3' + '@cloudflare/workers-types': '>=4' '@electric-sql/pglite': '>=0.2.0' '@libsql/client': '>=0.10.0' '@libsql/client-wasm': '>=0.10.0' @@ -1671,20 +1795,19 @@ packages: '@tidbcloud/serverless': '*' '@types/better-sqlite3': '*' '@types/pg': '*' - '@types/react': '>=18' '@types/sql.js': '*' '@vercel/postgres': '>=0.8.0' '@xata.io/client': '*' better-sqlite3: '>=7' bun-types: '*' expo-sqlite: '>=14.0.0' + gel: '>=2' knex: '*' kysely: '*' mysql2: '>=2' pg: '>=8' postgres: '>=3' prisma: '*' - react: '>=18' sql.js: '>=1' sqlite3: '>=5' peerDependenciesMeta: @@ -1714,8 +1837,6 @@ packages: optional: true '@types/pg': optional: true - '@types/react': - optional: true '@types/sql.js': optional: true '@vercel/postgres': @@ -1728,6 +1849,8 @@ packages: optional: true expo-sqlite: optional: true + gel: + optional: true knex: optional: true kysely: @@ -1740,8 +1863,6 @@ packages: optional: true prisma: optional: true - react: - optional: true sql.js: optional: true sqlite3: @@ -1774,10 +1895,17 @@ packages: resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} engines: {node: '>= 0.8'} + end-of-stream@1.4.4: + resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} + enhanced-resolve@5.18.1: resolution: {integrity: sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==} engines: {node: '>=10.13.0'} + env-paths@3.0.0: + resolution: {integrity: sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + err-code@2.0.3: resolution: {integrity: sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==} @@ -1853,6 +1981,10 @@ packages: resolution: {integrity: sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw==} engines: {node: '>=6'} + expand-template@2.0.3: + resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==} + engines: {node: '>=6'} + express@4.21.2: resolution: {integrity: sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==} engines: {node: '>= 0.10.0'} @@ -1863,6 +1995,9 @@ packages: extend@3.0.2: resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} + file-uri-to-path@1.0.0: + resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} + finalhandler@1.3.1: resolution: {integrity: sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==} engines: {node: '>= 0.8'} @@ -1879,6 +2014,9 @@ packages: resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} + fs-constants@1.0.0: + resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} + fs-extra@10.1.0: resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} engines: {node: '>=12'} @@ -1891,6 +2029,11 @@ packages: function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + gel@2.0.2: + resolution: {integrity: sha512-XTKpfNR9HZOw+k0Bl04nETZjuP5pypVAXsZADSdwr3EtyygTTe1RqvftU2FjGu7Tp9e576a9b/iIOxWrRBxMiQ==} + engines: {node: '>= 18.0.0'} + hasBin: true + gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} @@ -1913,6 +2056,9 @@ packages: get-tsconfig@4.10.0: resolution: {integrity: sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==} + github-from-package@0.0.0: + resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==} + glob-to-regexp@0.4.1: resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} @@ -1980,6 +2126,9 @@ packages: peerDependencies: hono: '*' + hono-sessions@0.7.2: + resolution: {integrity: sha512-QuoDqovzibnIYK0E3G7Pfoe63mYsyY8WgR1wmAuRDWpxpIglDVxShBn4VveFC+VGZummY407XeImoJhUpGcJMg==} + hono@4.7.5: resolution: {integrity: sha512-fDOK5W2C1vZACsgLONigdZTRZxuBqFtcKh7bUQ5cVSbwI2RWjloJDcgFOVzbQrlI6pCmhlTsVYZ7zpLj4m4qMQ==} engines: {node: '>=16.9.0'} @@ -1999,6 +2148,9 @@ packages: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} + ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + import-fresh@3.3.1: resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} engines: {node: '>=6'} @@ -2006,6 +2158,9 @@ packages: inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + ini@1.3.8: + resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} + inline-style-parser@0.2.4: resolution: {integrity: sha512-0aO8FkhNZlj/ZIbNi7Lxxr12obT7cL1moPfE4tg1LkX7LlLfC6DeX4l2ZEud1ukP9jNQyNnfzQVqwbwmAATY4Q==} @@ -2053,6 +2208,10 @@ packages: isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + isexe@3.1.1: + resolution: {integrity: sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==} + engines: {node: '>=16'} + jackspeak@3.4.3: resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} @@ -2060,6 +2219,12 @@ packages: resolution: {integrity: sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==} hasBin: true + jose@5.10.0: + resolution: {integrity: sha512-s+3Al/p9g32Iq+oqXxkW//7jk2Vig6FF1CFqzVXoTUXt2qz89YWbL+OwS17NFYEvxC35n0FKeGO2LGYSxeM2Gg==} + + jose@6.0.10: + resolution: {integrity: sha512-skIAxZqcMkOrSwjJvplIPYrlXGpxTPnro2/QWTDCxAdWQrSTV5/KqspMWmi5WAx5+ULswASJiZ0a+1B/Lxt9cw==} + js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -2083,6 +2248,10 @@ packages: jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + kysely@0.27.6: + resolution: {integrity: sha512-FIyV/64EkKhJmjgC0g2hygpBv5RNWVPyNCqSAD7eTCv6eFWNIi4PN1UvdSJGicN/o35bnevgis4Y0UDC0qi8jQ==} + engines: {node: '>=14.0.0'} + lightningcss-darwin-arm64@1.29.2: resolution: {integrity: sha512-cK/eMabSViKn/PG8U/a7aCorpeKLMlK0bQeNHmdb7qUnBkNPnL+oV5DjJUo0kqWsJUapZsM4jCfYItbqBDvlcA==} engines: {node: '>= 12.0.0'} @@ -2302,6 +2471,10 @@ packages: engines: {node: '>=10.0.0'} hasBin: true + mimic-response@3.1.0: + resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} + engines: {node: '>=10'} + miniflare@3.20250310.1: resolution: {integrity: sha512-c9QPrgBUFzjL4pYvW6GIUw+NqeYlZGVHASKJqjIXB1WVsl14nYfpfHphYK8tluKaBqwA9NFyO5dC2zatJkC/mA==} engines: {node: '>=16.13'} @@ -2323,6 +2496,9 @@ packages: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} + mkdirp-classic@0.5.3: + resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==} + morgan@1.10.0: resolution: {integrity: sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==} engines: {node: '>= 0.8.0'} @@ -2342,6 +2518,13 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + nanostores@0.11.4: + resolution: {integrity: sha512-k1oiVNN4hDK8NcNERSZLQiMfRzEGtfnvZvdBvey3SQbgn8Dcrk0h1I6vpxApjb10PFUflZrgJ2WEZyJQ+5v7YQ==} + engines: {node: ^18.0.0 || >=20.0.0} + + napi-build-utils@2.0.0: + resolution: {integrity: sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==} + negotiator@0.6.3: resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} engines: {node: '>= 0.6'} @@ -2350,6 +2533,10 @@ packages: resolution: {integrity: sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==} engines: {node: '>= 0.6'} + node-abi@3.74.0: + resolution: {integrity: sha512-c5XK0MjkGBrQPGYG24GBADZud0NCbznxNx0ZkS+ebUTrmV1qTDxPxSL8zEAPURXSbLRWVexxmP4986BziahL5w==} + engines: {node: '>=10'} + node-fetch-native@1.6.6: resolution: {integrity: sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ==} @@ -2383,6 +2570,9 @@ packages: resolution: {integrity: sha512-1dKY+86/AIiq1tkKVD3l0WI+Gd3vkknVGAggsFeBkTvbhMQ1OND/LKkYv4JtXPKUJ8bOTCyLiqEg2P6QNdK+Gg==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + oauth4webapi@3.4.0: + resolution: {integrity: sha512-5lcbectYuzQHvh0Ni7Epvc13sMVq7BxWUlHEYHaNko64OA1hcats0Huq30vZjqCZULcVE/PZxAGGPansfRAWKQ==} + object-inspect@1.13.4: resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} engines: {node: '>= 0.4'} @@ -2408,6 +2598,9 @@ packages: resolution: {integrity: sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==} engines: {node: '>= 0.8'} + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + package-json-from-dist@1.0.1: resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} @@ -2468,6 +2661,19 @@ packages: resolution: {integrity: sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==} engines: {node: ^10 || ^12 || >=14} + preact-render-to-string@6.5.11: + resolution: {integrity: sha512-ubnauqoGczeGISiOh6RjX0/cdaF8v/oDXIjO85XALCQjwQP+SB4RDXXtvZ6yTYSjG+PC1QRP2AhPgCEsM2EvUw==} + peerDependencies: + preact: '>=10' + + preact@10.24.3: + resolution: {integrity: sha512-Z2dPnBnMUfyQfSQ+GBdsGa16hz35YmLmtTLhM169uW944hYL6xzTYkJjC07j+Wosz733pMWx0fgON3JNw1jJQA==} + + prebuild-install@7.1.3: + resolution: {integrity: sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==} + engines: {node: '>=10'} + hasBin: true + prettier@2.8.8: resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} engines: {node: '>=10.13.0'} @@ -2499,6 +2705,16 @@ packages: resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} engines: {node: '>= 0.10'} + pump@3.0.2: + resolution: {integrity: sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==} + + pvtsutils@1.3.6: + resolution: {integrity: sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg==} + + pvutils@1.1.3: + resolution: {integrity: sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==} + engines: {node: '>=6.0.0'} + qs@6.13.0: resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==} engines: {node: '>=0.6'} @@ -2514,6 +2730,10 @@ packages: resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==} engines: {node: '>= 0.8'} + rc@1.2.8: + resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} + hasBin: true + react-dom@19.1.0: resolution: {integrity: sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g==} peerDependencies: @@ -2548,6 +2768,10 @@ packages: resolution: {integrity: sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==} engines: {node: '>=0.10.0'} + readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + readdirp@4.1.2: resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} engines: {node: '>= 14.18.0'} @@ -2592,6 +2816,9 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + rou3@0.5.1: + resolution: {integrity: sha512-OXMmJ3zRk2xeXFGfA3K+EOPHC5u7RDFG7lIOx0X1pdnhUkI8MdVrbV+sNsD80ElpUZ+MRHdyxPnFthq9VHs8uQ==} + safe-buffer@5.1.2: resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} @@ -2639,6 +2866,10 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} + shell-quote@1.8.2: + resolution: {integrity: sha512-AzqKpGKjrj7EM6rKVQEPpB288oCfnrEIuyoT9cyF4nmGa7V8Zk6f7RRqYisX8X9m+Q7bd632aZW4ky7EhbQztA==} + engines: {node: '>= 0.4'} + side-channel-list@1.0.0: resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==} engines: {node: '>= 0.4'} @@ -2662,6 +2893,12 @@ packages: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} + simple-concat@1.0.1: + resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} + + simple-get@4.0.1: + resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==} + simple-swizzle@0.2.2: resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} @@ -2717,6 +2954,9 @@ packages: resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} engines: {node: '>=12'} + string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + stringify-entities@4.0.4: resolution: {integrity: sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==} @@ -2728,6 +2968,10 @@ packages: resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} engines: {node: '>=12'} + strip-json-comments@2.0.1: + resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} + engines: {node: '>=0.10.0'} + style-to-js@1.1.16: resolution: {integrity: sha512-/Q6ld50hKYPH3d/r6nr117TZkHR0w0kGGIVfpG9N6D8NymRPM9RqCUv4pRpJ62E5DqOYx2AFpbZMyCPnjQCnOw==} @@ -2745,6 +2989,13 @@ packages: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} + tar-fs@2.1.2: + resolution: {integrity: sha512-EsaAXwxmx8UB7FRKqeozqEPop69DXcmYwTQwXvyAPF352HJsPdkVhvTaDPYqfNgruveJIJy3TA2l+2zj8LJIJA==} + + tar-stream@2.2.0: + resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} + engines: {node: '>=6'} + toidentifier@1.0.1: resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} engines: {node: '>=0.6'} @@ -2768,6 +3019,9 @@ packages: tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + tunnel-agent@0.6.0: + resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} + turbo-stream@2.4.0: resolution: {integrity: sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g==} @@ -2906,6 +3160,14 @@ packages: typescript: optional: true + valibot@1.0.0-beta.15: + resolution: {integrity: sha512-BKy8XosZkDHWmYC+cJG74LBzP++Gfntwi33pP3D3RKztz2XV9jmFWnkOi21GoqARP8wAWARwhV6eTr1JcWzjGw==} + peerDependencies: + typescript: '>=5' + peerDependenciesMeta: + typescript: + optional: true + validate-npm-package-license@3.0.4: resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} @@ -2977,6 +3239,11 @@ packages: engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} hasBin: true + which@4.0.0: + resolution: {integrity: sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==} + engines: {node: ^16.13.0 || >=18.0.0} + hasBin: true + workerd@1.20250310.0: resolution: {integrity: sha512-bAaZ9Bmts3mArbIrXYAtr+ZRsAJAAUEsCtvwfBavIYXaZ5sgdEOJBEiBbvsHp6CsVObegOM85tIWpYLpbTxQrQ==} engines: {node: '>=16'} @@ -3005,6 +3272,9 @@ packages: resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} engines: {node: '>=12'} + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + ws@8.18.0: resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} engines: {node: '>=10.0.0'} @@ -3043,6 +3313,22 @@ snapshots: '@jridgewell/gen-mapping': 0.3.8 '@jridgewell/trace-mapping': 0.3.25 + '@auth/core@0.38.0': + dependencies: + '@panva/hkdf': 1.2.1 + jose: 6.0.10 + oauth4webapi: 3.4.0 + preact: 10.24.3 + preact-render-to-string: 6.5.11(preact@10.24.3) + + '@auth/drizzle-adapter@1.8.0': + dependencies: + '@auth/core': 0.38.0 + transitivePeerDependencies: + - '@simplewebauthn/browser' + - '@simplewebauthn/server' + - nodemailer + '@babel/code-frame@7.26.2': dependencies: '@babel/helper-validator-identifier': 7.25.9 @@ -3237,6 +3523,13 @@ snapshots: '@babel/helper-string-parser': 7.25.9 '@babel/helper-validator-identifier': 7.25.9 + '@better-auth/utils@0.2.4': + dependencies: + typescript: 5.8.2 + uncrypto: 0.1.3 + + '@better-fetch/fetch@1.1.18': {} + '@cloudflare/kv-asset-handler@0.3.4': dependencies: mime: 3.0.0 @@ -3582,6 +3875,8 @@ snapshots: '@fastify/busboy@2.1.1': {} + '@hexagon/base64@1.1.28': {} + '@hono/node-server@1.14.0(hono@4.7.5)': dependencies: hono: 4.7.5 @@ -3715,8 +4010,14 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 + '@levischuck/tiny-cbor@0.2.11': {} + '@mjackson/node-fetch-server@0.2.0': {} + '@noble/ciphers@0.6.0': {} + + '@noble/hashes@1.7.1': {} + '@npmcli/git@4.1.0': dependencies: '@npmcli/promise-spawn': 6.0.2 @@ -3746,6 +4047,43 @@ snapshots: dependencies: which: 3.0.1 + '@panva/hkdf@1.2.1': {} + + '@peculiar/asn1-android@2.3.16': + dependencies: + '@peculiar/asn1-schema': 2.3.15 + asn1js: 3.0.6 + tslib: 2.8.1 + + '@peculiar/asn1-ecc@2.3.15': + dependencies: + '@peculiar/asn1-schema': 2.3.15 + '@peculiar/asn1-x509': 2.3.15 + asn1js: 3.0.6 + tslib: 2.8.1 + + '@peculiar/asn1-rsa@2.3.15': + dependencies: + '@peculiar/asn1-schema': 2.3.15 + '@peculiar/asn1-x509': 2.3.15 + asn1js: 3.0.6 + tslib: 2.8.1 + + '@peculiar/asn1-schema@2.3.15': + dependencies: + asn1js: 3.0.6 + pvtsutils: 1.3.6 + tslib: 2.8.1 + + '@peculiar/asn1-x509@2.3.15': + dependencies: + '@peculiar/asn1-schema': 2.3.15 + asn1js: 3.0.6 + pvtsutils: 1.3.6 + tslib: 2.8.1 + + '@petamoriken/float16@3.9.2': {} + '@pkgjs/parseargs@0.11.0': optional: true @@ -3912,6 +4250,18 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.38.0': optional: true + '@simplewebauthn/browser@13.1.0': {} + + '@simplewebauthn/server@13.1.1': + dependencies: + '@hexagon/base64': 1.1.28 + '@levischuck/tiny-cbor': 0.2.11 + '@peculiar/asn1-android': 2.3.16 + '@peculiar/asn1-ecc': 2.3.15 + '@peculiar/asn1-rsa': 2.3.15 + '@peculiar/asn1-schema': 2.3.15 + '@peculiar/asn1-x509': 2.3.15 + '@tailwindcss/node@4.0.17': dependencies: enhanced-resolve: 5.18.1 @@ -3981,6 +4331,10 @@ snapshots: tailwindcss: 4.0.17 vite: 5.4.16(@types/node@20.17.29)(lightningcss@1.29.2) + '@types/better-sqlite3@7.6.13': + dependencies: + '@types/node': 20.17.29 + '@types/cookie@0.6.0': {} '@types/debug@4.1.12': @@ -4056,6 +4410,12 @@ snapshots: dependencies: printable-characters: 1.0.42 + asn1js@3.0.6: + dependencies: + pvtsutils: 1.3.6 + pvutils: 1.1.3 + tslib: 2.8.1 + babel-dead-code-elimination@1.0.10: dependencies: '@babel/core': 7.26.10 @@ -4076,10 +4436,52 @@ snapshots: balanced-match@1.0.2: {} + base64-js@1.5.1: {} + basic-auth@2.0.1: dependencies: safe-buffer: 5.1.2 + better-auth@1.2.5(typescript@5.8.2): + dependencies: + '@better-auth/utils': 0.2.4 + '@better-fetch/fetch': 1.1.18 + '@noble/ciphers': 0.6.0 + '@noble/hashes': 1.7.1 + '@simplewebauthn/browser': 13.1.0 + '@simplewebauthn/server': 13.1.1 + better-call: 1.0.7 + defu: 6.1.4 + jose: 5.10.0 + kysely: 0.27.6 + nanostores: 0.11.4 + valibot: 1.0.0-beta.15(typescript@5.8.2) + zod: 3.24.2 + transitivePeerDependencies: + - typescript + + better-call@1.0.7: + dependencies: + '@better-fetch/fetch': 1.1.18 + rou3: 0.5.1 + set-cookie-parser: 2.7.1 + uncrypto: 0.1.3 + + better-sqlite3@11.9.1: + dependencies: + bindings: 1.5.0 + prebuild-install: 7.1.3 + + bindings@1.5.0: + dependencies: + file-uri-to-path: 1.0.0 + + bl@4.1.0: + dependencies: + buffer: 5.7.1 + inherits: 2.0.4 + readable-stream: 3.6.2 + blake3-wasm@2.1.5: {} body-parser@1.20.3: @@ -4112,6 +4514,11 @@ snapshots: buffer-from@1.1.2: {} + buffer@5.7.1: + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + bytes@3.1.2: {} cac@6.7.14: {} @@ -4145,6 +4552,8 @@ snapshots: dependencies: readdirp: 4.1.2 + chownr@1.1.4: {} + color-convert@2.0.1: dependencies: color-name: 1.1.4 @@ -4238,10 +4647,16 @@ snapshots: dependencies: character-entities: 2.0.2 + decompress-response@6.0.0: + dependencies: + mimic-response: 3.1.0 + dedent@1.5.3(babel-plugin-macros@3.1.0): optionalDependencies: babel-plugin-macros: 3.1.0 + deep-extend@0.6.0: {} + defu@6.1.4: {} depd@2.0.0: {} @@ -4269,20 +4684,23 @@ snapshots: dotenv@16.4.7: {} - drizzle-kit@0.28.1: + drizzle-kit@0.30.6: dependencies: '@drizzle-team/brocli': 0.10.2 '@esbuild-kit/esm-loader': 2.6.5 esbuild: 0.19.12 esbuild-register: 3.6.0(esbuild@0.19.12) + gel: 2.0.2 transitivePeerDependencies: - supports-color - drizzle-orm@0.36.4(@cloudflare/workers-types@4.20250327.0)(@types/react@19.0.12)(react@19.1.0): + drizzle-orm@0.41.0(@cloudflare/workers-types@4.20250327.0)(@types/better-sqlite3@7.6.13)(better-sqlite3@11.9.1)(gel@2.0.2)(kysely@0.27.6): optionalDependencies: '@cloudflare/workers-types': 4.20250327.0 - '@types/react': 19.0.12 - react: 19.1.0 + '@types/better-sqlite3': 7.6.13 + better-sqlite3: 11.9.1 + gel: 2.0.2 + kysely: 0.27.6 dunder-proto@1.0.1: dependencies: @@ -4304,11 +4722,17 @@ snapshots: encodeurl@2.0.0: {} + end-of-stream@1.4.4: + dependencies: + once: 1.4.0 + enhanced-resolve@5.18.1: dependencies: graceful-fs: 4.2.11 tapable: 2.2.1 + env-paths@3.0.0: {} + err-code@2.0.3: {} error-ex@1.3.2: @@ -4451,6 +4875,8 @@ snapshots: exit-hook@2.2.1: {} + expand-template@2.0.3: {} + express@4.21.2: dependencies: accepts: 1.3.8 @@ -4491,6 +4917,8 @@ snapshots: extend@3.0.2: {} + file-uri-to-path@1.0.0: {} + finalhandler@1.3.1: dependencies: debug: 2.6.9 @@ -4512,6 +4940,8 @@ snapshots: fresh@0.5.2: {} + fs-constants@1.0.0: {} + fs-extra@10.1.0: dependencies: graceful-fs: 4.2.11 @@ -4523,6 +4953,17 @@ snapshots: function-bind@1.1.2: {} + gel@2.0.2: + dependencies: + '@petamoriken/float16': 3.9.2 + debug: 4.4.0 + env-paths: 3.0.0 + semver: 7.7.1 + shell-quote: 1.8.2 + which: 4.0.0 + transitivePeerDependencies: + - supports-color + gensync@1.0.0-beta.2: {} get-intrinsic@1.3.0: @@ -4554,6 +4995,8 @@ snapshots: dependencies: resolve-pkg-maps: 1.0.0 + github-from-package@0.0.0: {} + glob-to-regexp@0.4.1: {} glob@10.4.5: @@ -4652,6 +5095,11 @@ snapshots: - typescript - wrangler + hono-sessions@0.7.2: + dependencies: + hono: 4.7.5 + iron-webcrypto: 1.2.1 + hono@4.7.5: {} hosted-git-info@6.1.3: @@ -4672,6 +5120,8 @@ snapshots: dependencies: safer-buffer: 2.1.2 + ieee754@1.2.1: {} + import-fresh@3.3.1: dependencies: parent-module: 1.0.1 @@ -4680,6 +5130,8 @@ snapshots: inherits@2.0.4: {} + ini@1.3.8: {} + inline-style-parser@0.2.4: {} ipaddr.js@1.9.1: {} @@ -4715,6 +5167,8 @@ snapshots: isexe@2.0.0: {} + isexe@3.1.1: {} + jackspeak@3.4.3: dependencies: '@isaacs/cliui': 8.0.2 @@ -4723,6 +5177,10 @@ snapshots: jiti@2.4.2: {} + jose@5.10.0: {} + + jose@6.0.10: {} + js-tokens@4.0.0: {} jsesc@3.0.2: {} @@ -4740,6 +5198,8 @@ snapshots: optionalDependencies: graceful-fs: 4.2.11 + kysely@0.27.6: {} + lightningcss-darwin-arm64@1.29.2: optional: true @@ -5052,6 +5512,8 @@ snapshots: mime@3.0.0: {} + mimic-response@3.1.0: {} + miniflare@3.20250310.1: dependencies: '@cspotcode/source-map-support': 0.8.1 @@ -5095,6 +5557,8 @@ snapshots: minipass@7.1.2: {} + mkdirp-classic@0.5.3: {} + morgan@1.10.0: dependencies: basic-auth: 2.0.1 @@ -5113,10 +5577,18 @@ snapshots: nanoid@3.3.11: {} + nanostores@0.11.4: {} + + napi-build-utils@2.0.0: {} + negotiator@0.6.3: {} negotiator@0.6.4: {} + node-abi@3.74.0: + dependencies: + semver: 7.7.1 + node-fetch-native@1.6.6: {} node-mock-http@1.0.0: {} @@ -5152,6 +5624,8 @@ snapshots: npm-package-arg: 10.1.0 semver: 7.7.1 + oauth4webapi@3.4.0: {} + object-inspect@1.13.4: {} obliterator@2.0.5: {} @@ -5174,6 +5648,10 @@ snapshots: on-headers@1.0.2: {} + once@1.4.0: + dependencies: + wrappy: 1.0.2 + package-json-from-dist@1.0.1: {} parent-module@1.0.1: @@ -5237,6 +5715,27 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 + preact-render-to-string@6.5.11(preact@10.24.3): + dependencies: + preact: 10.24.3 + + preact@10.24.3: {} + + prebuild-install@7.1.3: + dependencies: + detect-libc: 2.0.3 + expand-template: 2.0.3 + github-from-package: 0.0.0 + minimist: 1.2.8 + mkdirp-classic: 0.5.3 + napi-build-utils: 2.0.0 + node-abi: 3.74.0 + pump: 3.0.2 + rc: 1.2.8 + simple-get: 4.0.1 + tar-fs: 2.1.2 + tunnel-agent: 0.6.0 + prettier@2.8.8: {} printable-characters@1.0.42: {} @@ -5257,6 +5756,17 @@ snapshots: forwarded: 0.2.0 ipaddr.js: 1.9.1 + pump@3.0.2: + dependencies: + end-of-stream: 1.4.4 + once: 1.4.0 + + pvtsutils@1.3.6: + dependencies: + tslib: 2.8.1 + + pvutils@1.1.3: {} + qs@6.13.0: dependencies: side-channel: 1.1.0 @@ -5272,6 +5782,13 @@ snapshots: iconv-lite: 0.4.24 unpipe: 1.0.0 + rc@1.2.8: + dependencies: + deep-extend: 0.6.0 + ini: 1.3.8 + minimist: 1.2.8 + strip-json-comments: 2.0.1 + react-dom@19.1.0(react@19.1.0): dependencies: react: 19.1.0 @@ -5313,6 +5830,12 @@ snapshots: react@19.1.0: {} + readable-stream@3.6.2: + dependencies: + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + readdirp@4.1.2: {} regenerator-runtime@0.14.1: @@ -5389,6 +5912,8 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.38.0 fsevents: 2.3.3 + rou3@0.5.1: {} + safe-buffer@5.1.2: {} safe-buffer@5.2.1: {} @@ -5465,6 +5990,8 @@ snapshots: shebang-regex@3.0.0: {} + shell-quote@1.8.2: {} + side-channel-list@1.0.0: dependencies: es-errors: 1.3.0 @@ -5502,6 +6029,14 @@ snapshots: signal-exit@4.1.0: {} + simple-concat@1.0.1: {} + + simple-get@4.0.1: + dependencies: + decompress-response: 6.0.0 + once: 1.4.0 + simple-concat: 1.0.1 + simple-swizzle@0.2.2: dependencies: is-arrayish: 0.3.2 @@ -5557,6 +6092,10 @@ snapshots: emoji-regex: 9.2.2 strip-ansi: 7.1.0 + string_decoder@1.3.0: + dependencies: + safe-buffer: 5.2.1 + stringify-entities@4.0.4: dependencies: character-entities-html4: 2.1.0 @@ -5570,6 +6109,8 @@ snapshots: dependencies: ansi-regex: 6.1.0 + strip-json-comments@2.0.1: {} + style-to-js@1.1.16: dependencies: style-to-object: 1.0.8 @@ -5585,6 +6126,21 @@ snapshots: tapable@2.2.1: {} + tar-fs@2.1.2: + dependencies: + chownr: 1.1.4 + mkdirp-classic: 0.5.3 + pump: 3.0.2 + tar-stream: 2.2.0 + + tar-stream@2.2.0: + dependencies: + bl: 4.1.0 + end-of-stream: 1.4.4 + fs-constants: 1.0.0 + inherits: 2.0.4 + readable-stream: 3.6.2 + toidentifier@1.0.1: {} trim-lines@3.0.1: {} @@ -5595,8 +6151,11 @@ snapshots: optionalDependencies: typescript: 5.8.2 - tslib@2.8.1: - optional: true + tslib@2.8.1: {} + + tunnel-agent@0.6.0: + dependencies: + safe-buffer: 5.2.1 turbo-stream@2.4.0: {} @@ -5689,6 +6248,10 @@ snapshots: optionalDependencies: typescript: 5.8.2 + valibot@1.0.0-beta.15(typescript@5.8.2): + optionalDependencies: + typescript: 5.8.2 + validate-npm-package-license@3.0.4: dependencies: spdx-correct: 3.2.0 @@ -5755,6 +6318,10 @@ snapshots: dependencies: isexe: 2.0.0 + which@4.0.0: + dependencies: + isexe: 3.1.1 + workerd@1.20250310.0: optionalDependencies: '@cloudflare/workerd-darwin-64': 1.20250310.0 @@ -5804,6 +6371,8 @@ snapshots: string-width: 5.1.2 strip-ansi: 7.1.0 + wrappy@1.0.2: {} + ws@8.18.0: {} yallist@3.1.1: {} diff --git a/server/auth/auth.ts b/server/auth/auth.ts new file mode 100644 index 0000000..9601c77 --- /dev/null +++ b/server/auth/auth.ts @@ -0,0 +1,24 @@ +import { betterAuth } from "better-auth"; +import { drizzleAdapter } from "better-auth/adapters/drizzle"; +import { drizzle } from "drizzle-orm/d1"; +import type { Context } from "hono"; + +import * as schema from "../../database/schema"; + +export const auth = async (c: Context) => { + const db = drizzle(c.env.DB, { schema, logger: true }); + + return betterAuth({ + database: drizzleAdapter(db, { + provider: "sqlite", + schema, + }), + socialProviders: { + google: { + clientId: c.env.GOOGLE_CLIENT_ID, + clientSecret: c.env.GOOGLE_CLIENT_SECRET, + redirectUri: "http://localhost:5173/api/auth/callback/google", + }, + }, + }); +}; diff --git a/server/data/idea.ts b/server/data/idea.ts index f1171f7..41fb5c4 100644 --- a/server/data/idea.ts +++ b/server/data/idea.ts @@ -1,5 +1,5 @@ import { eq, like } from "drizzle-orm"; -import { ideaTable } from "~/database/schema"; +import { idea } from "~/database/schema"; import type { Database } from "../"; import type { TagData, TagDataManager } from "./tag"; import type { UserData } from "./user"; @@ -37,8 +37,8 @@ export class IdeaDataManager { } async get(id: number): Promise { - const result = await this.db.query.ideaTable.findFirst({ - where: eq(ideaTable.id, id), + const result = await this.db.query.idea.findFirst({ + where: eq(idea.id, id), with: { author: true }, }); if (!result) return; @@ -47,8 +47,8 @@ export class IdeaDataManager { } async getByTag(tagId: number): Promise { - const result = await this.db.query.ideaTable.findMany({ - where: like(ideaTable.tagIds, `%${tagId}%`), + const result = await this.db.query.idea.findMany({ + where: like(idea.tagIds, `%${tagId}%`), with: { author: true }, }); @@ -62,7 +62,7 @@ export class IdeaDataManager { async set(value: { name: string; - authorId: number; + authorId: string; description: string; tags: string[]; }): Promise<{ id: number; tags: TagData[] }> { @@ -80,7 +80,7 @@ export class IdeaDataManager { } const data = await this.db - .insert(ideaTable) + .insert(idea) .values({ tagIds: tags.map(tag => tag.id), ...value, @@ -92,8 +92,8 @@ export class IdeaDataManager { async delete(id: number): Promise { const result = await this.db - .delete(ideaTable) - .where(eq(ideaTable.id, id)) + .delete(idea) + .where(eq(idea.id, id)) .limit(1) .returning(); diff --git a/server/data/tag.ts b/server/data/tag.ts index a1f7a47..30254bf 100644 --- a/server/data/tag.ts +++ b/server/data/tag.ts @@ -1,6 +1,6 @@ import { asc, eq } from "drizzle-orm"; import type { Storage, StorageValue } from "unstorage"; -import { tagTable } from "~/database/schema"; +import { tag } from "~/database/schema"; import type { Database } from "../"; export interface TagData { @@ -38,15 +38,15 @@ export class TagDataManager { } async getMultiple(page: number, n: number): Promise { - return await this.db.query.tagTable.findMany({ - orderBy: [asc(tagTable.id)], + return await this.db.query.tag.findMany({ + orderBy: [asc(tag.id)], limit: n, offset: n * (page - 1), }); } async set(name: string): Promise { - const row = await this.db.insert(tagTable).values({ name }).returning(); + const row = await this.db.insert(tag).values({ name }).returning(); const stringId = row[0].id.toString(); await this.nameKv.set(stringId, name); @@ -61,8 +61,8 @@ export class TagDataManager { if (name) { await this.db - .delete(tagTable) - .where(eq(tagTable.id, id)) + .delete(tag) + .where(eq(tag.id, id)) .limit(1) .returning(); await this.nameKv.remove(stringId); diff --git a/server/idea.ts b/server/idea.ts index bdc4932..b201c86 100644 --- a/server/idea.ts +++ b/server/idea.ts @@ -45,7 +45,7 @@ const route = idea z.object({ name: z.string().max(100), description: z.string().max(2000), - authorId: z.number(), + authorId: z.string(), tags: z.array(z.string().max(100)).max(30), }), ), diff --git a/server/index.ts b/server/index.ts index 0a4df3f..2b43c75 100644 --- a/server/index.ts +++ b/server/index.ts @@ -1,8 +1,10 @@ import { type DrizzleD1Database, drizzle } from "drizzle-orm/d1"; import { Hono } from "hono"; +import { cors } from "hono/cors"; import { createStorage } from "unstorage"; import cloudflareKVBindingDriver from "unstorage/drivers/cloudflare-kv-binding"; import * as schema from "../database/schema"; +import { auth } from "./auth/auth"; import { DataManager } from "./data"; import { IdeaDataManager } from "./data/idea"; import { TagDataManager } from "./data/tag"; @@ -19,6 +21,21 @@ export type Env = { export type Database = DrizzleD1Database; const app = new Hono().basePath("/api"); +app.use( + cors({ + origin: "http://localhost:5173", + allowHeaders: ["Content-Type", "Authorization"], + allowMethods: ["POST", "GET", "OPTIONS"], + credentials: true, + }), +); + +app.on(["POST", "GET"], "/auth/*", async c => { + console.log(`認証エンドポイントへのアクセス: ${c.req.method} ${c.req.url}`); + const authInstance = await auth(c); + return await authInstance.handler(c.req.raw); +}); + app.use(async (c, next) => { const db = drizzle(c.env.DB, { schema }); const tagNameKv = createStorage({ diff --git a/tsconfig.cloudflare.json b/tsconfig.cloudflare.json index ea07df5..f5fb4fe 100644 --- a/tsconfig.cloudflare.json +++ b/tsconfig.cloudflare.json @@ -1,32 +1,32 @@ { - "extends": "./tsconfig.json", - "include": [ - ".react-router/types/**/*", - "app/**/*", - "app/**/.server/**/*", - "app/**/.client/**/*", - "server/**/*", - "database/**/*", - "workers/**/*", - "load-context.ts", - "worker-configuration.d.ts" - ], - "compilerOptions": { - "composite": true, - "strict": true, - "lib": ["DOM", "DOM.Iterable", "ES2022"], - "types": ["@cloudflare/workers-types", "node", "vite/client"], - "target": "ES2022", - "module": "ES2022", - "moduleResolution": "bundler", - "jsx": "react-jsx", - "baseUrl": ".", - "rootDirs": [".", "./.react-router/types"], - "paths": { - "~/database/*": ["./database/*"], - "~/*": ["./app/*"] - }, - "esModuleInterop": true, - "resolveJsonModule": true, - } + "extends": "./tsconfig.json", + "include": [ + ".react-router/types/**/*", + "app/**/*", + "app/**/.server/**/*", + "app/**/.client/**/*", + "server/**/*", + "database/**/*", + "workers/**/*", + "load-context.ts", + "worker-configuration.d.ts" + ], + "compilerOptions": { + "composite": true, + "strict": true, + "lib": ["DOM", "DOM.Iterable", "ES2022"], + "types": ["@cloudflare/workers-types", "node", "vite/client"], + "target": "ES2022", + "module": "ES2022", + "moduleResolution": "bundler", + "jsx": "react-jsx", + "baseUrl": ".", + "rootDirs": [".", "./.react-router/types"], + "paths": { + "~/database/*": ["./database/*"], + "~/*": ["./app/*"] + }, + "esModuleInterop": true, + "resolveJsonModule": true + } } diff --git a/tsconfig.json b/tsconfig.json index d7ce9e4..0715a71 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,14 +1,14 @@ { - "files": [], - "references": [ - { "path": "./tsconfig.node.json" }, - { "path": "./tsconfig.cloudflare.json" } - ], - "compilerOptions": { - "checkJs": true, - "verbatimModuleSyntax": true, - "skipLibCheck": true, - "strict": true, - "noEmit": true - } + "files": [], + "references": [ + { "path": "./tsconfig.node.json" }, + { "path": "./tsconfig.cloudflare.json" } + ], + "compilerOptions": { + "checkJs": true, + "verbatimModuleSyntax": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true + } } diff --git a/tsconfig.node.json b/tsconfig.node.json index d04147d..8f63fd7 100644 --- a/tsconfig.node.json +++ b/tsconfig.node.json @@ -1,19 +1,19 @@ { - "extends": "./tsconfig.json", - "include": [ - "tailwind.config.ts", - "vite.config.ts", - "database/**/*", - "load-context.ts", - "worker-configuration.d.ts" - ], - "compilerOptions": { - "composite": true, - "strict": true, - "types": ["node"], - "lib": ["ES2022"], - "target": "ES2022", - "module": "ES2022", - "moduleResolution": "bundler" - } + "extends": "./tsconfig.json", + "include": [ + "tailwind.config.ts", + "vite.config.ts", + "database/**/*", + "load-context.ts", + "worker-configuration.d.ts" + ], + "compilerOptions": { + "composite": true, + "strict": true, + "types": ["node"], + "lib": ["ES2022"], + "target": "ES2022", + "module": "ES2022", + "moduleResolution": "bundler" + } } diff --git a/worker-configuration.d.ts b/worker-configuration.d.ts index 0dd9f7a..dd7205a 100644 --- a/worker-configuration.d.ts +++ b/worker-configuration.d.ts @@ -1,5 +1,5 @@ // Generated by Wrangler by running `wrangler types` interface Env { - DB: D1Database; + DB: D1Database; } diff --git a/worker.ts b/worker.ts index d7359a9..ee519dd 100644 --- a/worker.ts +++ b/worker.ts @@ -1,5 +1,5 @@ -import handle from 'hono-react-router-adapter/cloudflare-workers' -import * as build from './build/server' -import server from './server' +import handle from "hono-react-router-adapter/cloudflare-workers"; +import * as build from "./build/server"; +import server from "./server"; -export default handle(build, server) +export default handle(build, server); diff --git a/wrangler.toml b/wrangler.toml index 4d5c249..72ff23e 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -9,7 +9,7 @@ assets = { directory = "./build/client/" } binding = "DB" database_name = "inw" database_id = "007cf749-c9d3-4080-b9f4-c2caf2e63987" -migrations_dir = "drizzle" +migrations_dir = ".drizzle" [[kv_namespaces]] binding = "tag"