diff --git a/.gitignore b/.gitignore index 7ea1d8d3..7f2eb0d1 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ web-build/ expo-env.d.ts .metro-health-check* .DS_Store +.vercel diff --git a/bun.lockb b/bun.lockb index 3694be04..c1ab9f4d 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 27dd300b..47e6eb47 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "test:eslint": "eslint --max-warnings=0 ." }, "workspaces": [ + "pomelo", "webauthn" ], "engines": { diff --git a/pomelo/.gitignore b/pomelo/.gitignore new file mode 100644 index 00000000..a6c7c285 --- /dev/null +++ b/pomelo/.gitignore @@ -0,0 +1 @@ +*.js diff --git a/pomelo/api/opa.ts b/pomelo/api/opa.ts new file mode 100644 index 00000000..df2b8cd1 --- /dev/null +++ b/pomelo/api/opa.ts @@ -0,0 +1,7 @@ +import type { VercelRequest, VercelResponse } from "@vercel/node"; + +export const runtime = "nodejs"; + +export default function opa(request: VercelRequest, response: VercelResponse) { + return response.status(200).end("opa"); +} diff --git a/pomelo/package.json b/pomelo/package.json new file mode 100644 index 00000000..9a361a1a --- /dev/null +++ b/pomelo/package.json @@ -0,0 +1,15 @@ +{ + "name": "@exactly/pomelo", + "type": "module", + "scripts": { + "build": "tsc" + }, + "dependencies": { + "@vercel/node": "^3.0.11" + }, + "devDependencies": { + "@types/node": "^20.10.4", + "typescript": "^5.3.3", + "vercel": "^32.6.1" + } +} diff --git a/pomelo/tsconfig.json b/pomelo/tsconfig.json new file mode 100644 index 00000000..4589845c --- /dev/null +++ b/pomelo/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "lib": ["ESNext"], + "target": "ESNext", + "outDir": "public", + "module": "NodeNext", + "moduleResolution": "NodeNext", + "noUncheckedIndexedAccess": true, + "resolveJsonModule": true, + "esModuleInterop": true, + "skipLibCheck": true, + "pretty": true, + "strict": true + } +} diff --git a/pomelo/vercel.json b/pomelo/vercel.json new file mode 100644 index 00000000..0c95e9e7 --- /dev/null +++ b/pomelo/vercel.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://openapi.vercel.sh/vercel.json", + "installCommand": "curl -fsSL https://bun.sh/install | bash && export PATH=\"$HOME/.bun/bin:$PATH\" && which bun && bun install --frozen-lockfile", + "buildCommand": "bun -v && which bun && bun run build" +}