summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package-lock.json3
-rw-r--r--package.json6
-rw-r--r--packages/cli/index.ts7
-rw-r--r--packages/cli/package.json5
-rw-r--r--packages/cli/tsconfig.json4
-rw-r--r--packages/server/index.ts7
-rw-r--r--packages/server/package.json4
-rw-r--r--packages/server/tsconfig.json3
-rw-r--r--tsconfig.json10
9 files changed, 31 insertions, 18 deletions
diff --git a/package-lock.json b/package-lock.json
index a3fa1b2e..18c09048 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -6490,6 +6490,9 @@
"react": "^18.3.1",
"yargs": "^17.7.2"
},
+ "bin": {
+ "cli": "dist/index.js"
+ },
"devDependencies": {
"@types/diff": "^7.0.2",
"@types/dotenv": "^6.1.1",
diff --git a/package.json b/package.json
index a75167db..3adce103 100644
--- a/package.json
+++ b/package.json
@@ -8,10 +8,10 @@
],
"scripts": {
"build": "npm run build --workspaces",
- "clean": "npm run clean --workspaces",
+ "clean": "rm -rf node_modules && npm run clean --workspaces",
"test": "npm run test --workspaces",
- "start": "node ./scripts/check-build-status.js && node node_modules/@gemini-code/cli/dist",
- "debug": "node ./scripts/check-build-status.js && node --inspect-brk node_modules/@gemini-code/cli/dist",
+ "start": "node ./scripts/check-build-status.js && node node_modules/@gemini-code/cli",
+ "debug": "node ./scripts/check-build-status.js && node --inspect-brk node_modules/@gemini-code/cli",
"lint": "eslint . --ext .ts,.tsx",
"typecheck": "tsc --noEmit --jsx react",
"format": "prettier --write .",
diff --git a/packages/cli/index.ts b/packages/cli/index.ts
new file mode 100644
index 00000000..23e21097
--- /dev/null
+++ b/packages/cli/index.ts
@@ -0,0 +1,7 @@
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import './src/gemini.js';
diff --git a/packages/cli/package.json b/packages/cli/package.json
index 3ccdc410..8434ac05 100644
--- a/packages/cli/package.json
+++ b/packages/cli/package.json
@@ -3,9 +3,10 @@
"version": "1.0.0",
"description": "Gemini Code CLI",
"type": "module",
- "main": "src/gemini.js",
+ "main": "dist/index.js",
+ "bin": "dist/index.js",
"scripts": {
- "build": "tsc --build && cp package.json README.md ../../LICENSE dist/ && touch dist/.last_build",
+ "build": "tsc --build && 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/tsconfig.json b/packages/cli/tsconfig.json
index 781be92b..64011bd9 100644
--- a/packages/cli/tsconfig.json
+++ b/packages/cli/tsconfig.json
@@ -2,17 +2,13 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "dist",
- "rootDir": ".",
"jsx": "react",
"lib": ["DOM", "DOM.Iterable", "ES2020"],
- "module": "Node16",
- "target": "ES2020",
"paths": {
"@gemini-code/*": ["./packages/*"]
},
"types": ["node", "vitest/globals"]
},
"exclude": ["node_modules", "dist"],
- "include": ["src"],
"references": [{ "path": "../server" }]
}
diff --git a/packages/server/index.ts b/packages/server/index.ts
new file mode 100644
index 00000000..3e74d6be
--- /dev/null
+++ b/packages/server/index.ts
@@ -0,0 +1,7 @@
+/**
+ * @license
+ * Copyright 2025 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+export * from './src/index.js';
diff --git a/packages/server/package.json b/packages/server/package.json
index a157cd70..7b874858 100644
--- a/packages/server/package.json
+++ b/packages/server/package.json
@@ -3,10 +3,10 @@
"version": "1.0.0",
"description": "Gemini Code Server",
"type": "module",
- "main": "dist/src/index.js",
+ "main": "dist/index.js",
"scripts": {
"start": "node dist/src/index.js",
- "build": "tsc --build && cp package.json dist/",
+ "build": "tsc --build",
"clean": "rm -rf dist",
"lint": "eslint . --ext .ts,.tsx",
"format": "prettier --write .",
diff --git a/packages/server/tsconfig.json b/packages/server/tsconfig.json
index b0b6e067..9e3f1d40 100644
--- a/packages/server/tsconfig.json
+++ b/packages/server/tsconfig.json
@@ -2,10 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "dist",
- "rootDir": ".",
"lib": ["DOM", "DOM.Iterable", "ES2020"],
- "module": "Node16",
- "target": "ES2022",
"composite": true
},
"exclude": ["node_modules", "dist"]
diff --git a/tsconfig.json b/tsconfig.json
index 729009fe..5d59f86a 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -7,11 +7,13 @@
"resolveJsonModule": true,
"sourceMap": true,
"composite": true,
- // MONOREPO STUFF
"incremental": true,
- "target": "ES2020",
- "module": "Node16",
"declaration": true,
- "moduleResolution": "node16"
+ "allowSyntheticDefaultImports": true,
+ "lib": ["ES2023"],
+ "module": "NodeNext",
+ "moduleResolution": "nodenext",
+ "target": "es2022",
+ "types": ["node"]
}
}