From 2a850ed0511033ffa88b450643d79bb47ae18693 Mon Sep 17 00:00:00 2001 From: Brandon Keiji Date: Fri, 18 Apr 2025 16:14:20 -0700 Subject: [PATCH] fix: add --build flag to tsc commands (#40) --- packages/cli/package.json | 2 +- packages/cli/src/gemini.ts | 6 +++++- packages/server/package.json | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index 85ccb87a..9e91d607 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -5,7 +5,7 @@ "type": "module", "main": "src/gemini.js", "scripts": { - "build": "tsc && cp package.json README.md ../../LICENSE dist/ && touch dist/.last_build", + "build": "tsc --build && cp package.json README.md ../../LICENSE dist/ && touch dist/.last_build", "clean": "rm -rf dist", "start": "node dist/gemini.js", "debug": "node --inspect-brk dist/gemini.js", diff --git a/packages/cli/src/gemini.ts b/packages/cli/src/gemini.ts index 9a9c3ed2..e080fd1b 100644 --- a/packages/cli/src/gemini.ts +++ b/packages/cli/src/gemini.ts @@ -12,6 +12,10 @@ import { WriteFileTool } from './tools/write-file.tool.js'; import { WebFetchTool } from './tools/web-fetch.tool.js'; import { globalConfig } from './config/config.js'; +// TODO(b/411707095): remove. left here as an example of how to pull in inter-package deps +import { helloServer } from '@gemini-code/server'; +helloServer(); + async function main() { // Configure tools registerTools(globalConfig.getTargetDir()); @@ -25,7 +29,7 @@ async function main() { } // --- Global Unhandled Rejection Handler --- -process.on('unhandledRejection', (reason, _) => { +process.on('unhandledRejection', (reason, promise) => { // Check if this is the known 429 ClientError that sometimes escapes // this is a workaround for a specific issue with the way we are calling gemini // where a 429 error is thrown but not caught, causing an unhandled rejection diff --git a/packages/server/package.json b/packages/server/package.json index 3781aa5a..8afc1c71 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -5,7 +5,7 @@ "type": "module", "main": "src/index.js", "scripts": { - "build": "tsc && cp package.json dist/", + "build": "tsc --build && cp package.json dist/", "clean": "rm -rf dist", "lint": "eslint . --ext .ts,.tsx", "format": "prettier --write ."