-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat: add pnpm serve command for code-server development #10964
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
32d34c2
feat: add pnpm serve command for code-server development
mrubens 203a6eb
feat: add serve:rebuild command for quick extension updates
mrubens ad0c516
feat: add --port argument for configurable port (default 9080)
mrubens 1b6b894
feat: add --host argument for Docker/remote access (default 127.0.0.1)
mrubens 466defc
feat: add --auth argument for code-server authentication (password|none)
mrubens 49b7a0a
refactor: separate serve (start) and serve:install (build+install)
mrubens fd0bf50
refactor: simplify serve:install to only build and install extension
roomote 841c0d0
refactor: remove pnpm serve command, keep only serve:install
roomote 289611d
refactor: rename serve:install to code-server:install
roomote 266e047
refactor: rename serve.js to code-server.js to match command name
roomote File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| /** | ||
| * Serve script for Roo Code extension development | ||
| * | ||
| * Usage: | ||
| * pnpm code-server:install # Build and install the extension into code-server | ||
| * | ||
| * After making code changes, run `pnpm code-server:install` again and reload the window | ||
| * (Cmd+Shift+P → "Developer: Reload Window") | ||
| */ | ||
|
|
||
| const { execSync } = require("child_process") | ||
| const path = require("path") | ||
| const os = require("os") | ||
|
|
||
| const RESET = "\x1b[0m" | ||
| const BOLD = "\x1b[1m" | ||
| const GREEN = "\x1b[32m" | ||
| const YELLOW = "\x1b[33m" | ||
| const CYAN = "\x1b[36m" | ||
| const RED = "\x1b[31m" | ||
|
|
||
| // Build vsix to a fixed path in temp directory | ||
| const VSIX_PATH = path.join(os.tmpdir(), "roo-code-serve.vsix") | ||
|
|
||
| function log(message) { | ||
| console.log(`${CYAN}[code-server]${RESET} ${message}`) | ||
| } | ||
|
|
||
| function logSuccess(message) { | ||
| console.log(`${GREEN}✓${RESET} ${message}`) | ||
| } | ||
|
|
||
| function logWarning(message) { | ||
| console.log(`${YELLOW}⚠${RESET} ${message}`) | ||
| } | ||
|
|
||
| function logError(message) { | ||
| console.error(`${RED}✗${RESET} ${message}`) | ||
| } | ||
|
|
||
| async function main() { | ||
| console.log(`\n${BOLD}🔧 Roo Code - Install Extension${RESET}\n`) | ||
|
|
||
| // Build vsix to temp directory | ||
| log(`Building vsix to ${VSIX_PATH}...`) | ||
| try { | ||
| execSync(`pnpm vsix -- --out "${VSIX_PATH}"`, { stdio: "inherit" }) | ||
| logSuccess("Build complete") | ||
| } catch (error) { | ||
| logError("Build failed") | ||
| process.exit(1) | ||
| } | ||
|
|
||
| // Install extension into code-server | ||
| log("Installing extension into code-server...") | ||
| try { | ||
| execSync(`code-server --install-extension "${VSIX_PATH}"`, { stdio: "inherit" }) | ||
| logSuccess("Extension installed") | ||
| } catch (error) { | ||
| logWarning("Extension installation had warnings (this is usually fine)") | ||
| } | ||
|
|
||
| console.log(`\n${GREEN}✓ Extension built and installed.${RESET}`) | ||
| console.log(` If code-server is running, reload the window to pick up changes.`) | ||
| console.log(` (Cmd+Shift+P → "Developer: Reload Window")\n`) | ||
| } | ||
|
|
||
| main().catch((error) => { | ||
| logError(error.message) | ||
| process.exit(1) | ||
| }) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.