mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
meh
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
tmp
|
||||
node_modules
|
||||
.env
|
||||
@@ -0,0 +1,18 @@
|
||||
FROM --platform=$BUILDPLATFORM node:22-alpine AS build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV PNPM_HOME="/pnpm"
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
RUN npm i -g corepack@latest
|
||||
RUN corepack enable
|
||||
RUN corepack prepare pnpm@10.0.0 --activate
|
||||
|
||||
ADD ./package.json /app/package.json
|
||||
ADD ./pnpm-lock.yaml /app/pnpm-lock.yaml
|
||||
|
||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
||||
|
||||
ADD ./ /app/
|
||||
|
||||
RUN pnpm run build
|
||||
-1145
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,8 @@
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"dev": "tsx watch src/server.ts",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"build": "rimraf dist && tsup"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
@@ -13,6 +14,8 @@
|
||||
"devDependencies": {
|
||||
"@prisma/client": "^6.10.1",
|
||||
"@types/node": "^24.0.13",
|
||||
"rimraf": "^6.0.1",
|
||||
"tsup": "^8.5.0",
|
||||
"tsx": "^4.20.3",
|
||||
"typescript": "^5.8.3"
|
||||
},
|
||||
|
||||
Generated
+765
File diff suppressed because it is too large
Load Diff
@@ -8,13 +8,22 @@ import { Hono } from 'hono';
|
||||
import { cors } from 'hono/cors';
|
||||
import { HTTPException } from 'hono/http-exception';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { handleChatRequest } from '@/handlers/chat/route';
|
||||
import { handleChatRequest } from './handlers/chat/route';
|
||||
import { getConversation, getConversations } from './handlers/conversation';
|
||||
import { contextStorage } from "hono/context-storage";
|
||||
import { RuntimeContextType } from './lib/ai/mastra/utils/runtime-context';
|
||||
|
||||
const app = new Hono();
|
||||
export type HonoEnv = {
|
||||
Variables: {
|
||||
runtimeContext: RuntimeContextType,
|
||||
}
|
||||
}
|
||||
|
||||
const app = new Hono<HonoEnv>();
|
||||
|
||||
// Middleware
|
||||
app.use('*', cors());
|
||||
app.use(contextStorage());
|
||||
app.onError((err, c) => {
|
||||
if (err instanceof HTTPException) {
|
||||
return err.getResponse();
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
[
|
||||
{
|
||||
"role": "system",
|
||||
"content": "\nYou are Imagine, an AI powered software developer. \nTake the user's request and then call the proceed tool to get it implemented.\n "
|
||||
},
|
||||
{
|
||||
"role": "user",
|
||||
"content": "What is the content of src/App.tsx?"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2017",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"noEmit": false,
|
||||
"outDir": "./dist",
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"jsx": "preserve",
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["src/**/*.ts", "src/**/*.tsx"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { defineConfig } from 'tsup';
|
||||
|
||||
export default defineConfig({
|
||||
entry: ['src/server.ts'],
|
||||
format: ['esm'],
|
||||
target: 'node22',
|
||||
platform: 'node',
|
||||
dts: true,
|
||||
sourcemap: true,
|
||||
clean: true,
|
||||
outDir: 'dist',
|
||||
treeshake: true,
|
||||
tsconfig: 'tsconfig.tsup.json',
|
||||
shims: true,
|
||||
bundle: true,
|
||||
});
|
||||
+2
-1
@@ -12,7 +12,8 @@
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"moduleResolution": "bundler"
|
||||
"moduleResolution": "bundler",
|
||||
"declaration": true,
|
||||
},
|
||||
"references": [
|
||||
{ "path": "./ai-service" }
|
||||
|
||||
Reference in New Issue
Block a user