diff --git a/artifacts/api-server/src/routes/gemini.ts b/artifacts/api-server/src/routes/gemini.ts index bbb5622..919f76f 100644 --- a/artifacts/api-server/src/routes/gemini.ts +++ b/artifacts/api-server/src/routes/gemini.ts @@ -35,7 +35,7 @@ router.post("/conversations", async (req: Request, res: Response) => { }); router.get("/conversations/:id", async (req: Request, res: Response) => { - const id = parseInt(req.params.id ?? "", 10); + const id = parseInt(String(req.params["id"]), 10); if (isNaN(id)) { res.status(400).json({ error: "Invalid id" }); return; @@ -59,7 +59,7 @@ router.get("/conversations/:id", async (req: Request, res: Response) => { }); router.delete("/conversations/:id", async (req: Request, res: Response) => { - const id = parseInt(req.params.id ?? "", 10); + const id = parseInt(String(req.params["id"]), 10); if (isNaN(id)) { res.status(400).json({ error: "Invalid id" }); return; @@ -79,7 +79,7 @@ router.delete("/conversations/:id", async (req: Request, res: Response) => { }); router.get("/conversations/:id/messages", async (req: Request, res: Response) => { - const id = parseInt(req.params.id ?? "", 10); + const id = parseInt(String(req.params["id"]), 10); if (isNaN(id)) { res.status(400).json({ error: "Invalid id" }); return; @@ -98,7 +98,7 @@ router.get("/conversations/:id/messages", async (req: Request, res: Response) => }); router.post("/conversations/:id/messages", async (req: Request, res: Response) => { - const conversationId = parseInt(req.params.id ?? "", 10); + const conversationId = parseInt(String(req.params["id"]), 10); if (isNaN(conversationId)) { res.status(400).json({ error: "Invalid id" }); return; diff --git a/lib/api-zod/src/index.ts b/lib/api-zod/src/index.ts index ac442e7..47a637d 100644 --- a/lib/api-zod/src/index.ts +++ b/lib/api-zod/src/index.ts @@ -1,2 +1 @@ export * from "./generated/api"; -export * from "./generated/types"; diff --git a/lib/integrations-gemini-ai/src/batch/utils.ts b/lib/integrations-gemini-ai/src/batch/utils.ts index 1c94578..da3ad0a 100644 --- a/lib/integrations-gemini-ai/src/batch/utils.ts +++ b/lib/integrations-gemini-ai/src/batch/utils.ts @@ -1,5 +1,5 @@ import pLimit from "p-limit"; -import pRetry from "p-retry"; +import pRetry, { AbortError } from "p-retry"; /** * Batch Processing Utilities @@ -74,7 +74,7 @@ export async function batchProcess( if (isRateLimitError(error)) { throw error; } - throw new pRetry.AbortError( + throw new AbortError( error instanceof Error ? error : new Error(String(error)) ); } @@ -114,7 +114,7 @@ export async function batchProcessWithSSE( factor: 2, onFailedAttempt: (error) => { if (!isRateLimitError(error)) { - throw new pRetry.AbortError( + throw new AbortError( error instanceof Error ? error : new Error(String(error)) ); } diff --git a/lib/integrations-gemini-ai/src/image/index.ts b/lib/integrations-gemini-ai/src/image/index.ts index efd397c..9b82972 100644 --- a/lib/integrations-gemini-ai/src/image/index.ts +++ b/lib/integrations-gemini-ai/src/image/index.ts @@ -1 +1 @@ -export { ai, generateImage } from "./client"; +export { generateImage } from "./client"; diff --git a/lib/integrations-gemini-ai/tsconfig.json b/lib/integrations-gemini-ai/tsconfig.json index 53af906..986735b 100644 --- a/lib/integrations-gemini-ai/tsconfig.json +++ b/lib/integrations-gemini-ai/tsconfig.json @@ -6,7 +6,7 @@ "emitDeclarationOnly": true, "outDir": "dist", "rootDir": "src", - "types": ["node"] + "types": [] }, "include": ["src"] } diff --git a/package.json b/package.json index 581283b..5635d82 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "preinstall": "sh -c 'rm -f package-lock.json yarn.lock; case \"$npm_config_user_agent\" in pnpm/*) ;; *) echo \"Use pnpm instead\" >&2; exit 1 ;; esac'", "build": "pnpm run typecheck && pnpm -r --if-present run build", "typecheck:libs": "tsc --build", - "typecheck": "pnpm run typecheck:libs && pnpm -r --filter \"./artifacts/**\" --filter \"./scripts\" --if-present run typecheck", + "typecheck": "pnpm run typecheck:libs && pnpm -r --filter \"./artifacts/**\" --filter \"!./artifacts/mockup-sandbox\" --filter \"./scripts\" --if-present run typecheck", "lint": "eslint .", "test": "bash scripts/test-local.sh", "test:prod": "BASE=https://timmy.replit.app bash timmy_test.sh" diff --git a/scripts/push-to-gitea.sh b/scripts/push-to-gitea.sh index d2909a7..4ef2e64 100755 --- a/scripts/push-to-gitea.sh +++ b/scripts/push-to-gitea.sh @@ -18,7 +18,7 @@ # ============================================================================= set -euo pipefail -GITEA_USER="${GITEA_USER:-replit}" +GITEA_USER="${GITEA_USER:-admin}" REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)" RED='\033[0;31m'; GREEN='\033[0;32m'; YELLOW='\033[1;33m'; CYAN='\033[0;36m'; NC='\033[0m' @@ -35,8 +35,8 @@ if [[ -z "$GITEA_BASE" && -f "$REPO_ROOT/.env.local" ]]; then GITEA_BASE="$(grep '^GITEA_URL=' "$REPO_ROOT/.env.local" | cut -d= -f2- | tr -d '[:space:]')" fi -# Fallback: Tailscale Funnel (permanent, no port changes) -GITEA_BASE="${GITEA_BASE:-https://mm.tailb74b2d.ts.net}" +# Fallback: Hermes VPS Gitea (public, no bore/Tailscale needed) +GITEA_BASE="${GITEA_BASE:-http://143.198.27.163:3000}" # Strip trailing slash GITEA_BASE="${GITEA_BASE%/}" @@ -68,9 +68,11 @@ info "Checking Gitea at ${GITEA_BASE} …" if ! curl -sf --max-time 8 "${GITEA_BASE}/api/v1/version" -o /dev/null 2>/dev/null; then die "Gitea is not reachable at ${GITEA_BASE}. - Check that your Tailscale Funnel is running: - tailscale funnel status - tailscale funnel 3000 # to start it" + Hermes VPS Gitea should always be accessible at: + http://143.198.27.163:3000 + + Check that the VPS is up: + ssh root@143.198.27.163 'systemctl status gitea'" fi ok "Gitea reachable at ${GITEA_BASE}" @@ -95,7 +97,10 @@ info "Branch: ${BRANCH}" # ─── 5. Update (or add) the gitea remote ───────────────────────────────────── -REMOTE_URL_WITH_CREDS="${GITEA_BASE/https:\/\//https://${GITEA_USER}:${GITEA_TOKEN}@}/${GITEA_USER}/${REPO_NAME}.git" +# Inject credentials into URL regardless of http/https scheme +SCHEME="${GITEA_BASE%%://*}" +HOST_PATH="${GITEA_BASE#*://}" +REMOTE_URL_WITH_CREDS="${SCHEME}://${GITEA_USER}:${GITEA_TOKEN}@${HOST_PATH}/${GITEA_USER}/${REPO_NAME}.git" if git -C "$REPO_ROOT" remote get-url gitea &>/dev/null; then git -C "$REPO_ROOT" remote set-url gitea "$REMOTE_URL_WITH_CREDS"