super-nvm 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +27 -0
- package/README.md +221 -2
- package/bin/install-editors.ps1 +81 -0
- package/bin/nvm-ui.js +13 -0
- package/bin/super-nvm.js +13 -0
- package/out/core/nvm.js +802 -0
- package/out/core/nvm.js.map +1 -0
- package/out/core/types.js +3 -0
- package/out/core/types.js.map +1 -0
- package/out/server/cli.js +56 -0
- package/out/server/cli.js.map +1 -0
- package/out/server/standaloneServer.js +346 -0
- package/out/server/standaloneServer.js.map +1 -0
- package/out/ui/app.js +929 -0
- package/out/ui/index.html +374 -0
- package/out/ui/style.css +932 -0
- package/out/vscode/extension.js +282 -0
- package/out/vscode/extension.js.map +1 -0
- package/out/vscode/statusBar.js +74 -0
- package/out/vscode/statusBar.js.map +1 -0
- package/out/vscode/treeDataProvider.js +118 -0
- package/out/vscode/treeDataProvider.js.map +1 -0
- package/out/vscode/webviewPanel.js +307 -0
- package/out/vscode/webviewPanel.js.map +1 -0
- package/package.json +205 -3
- package/resources/nvm-icon.png +0 -0
- package/resources/nvm-icon.svg +69 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Super NVM Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
### Third-Party Software Attribution & Open-Source Acknowledgements
|
|
14
|
+
|
|
15
|
+
Super NVM is an independent open-source GUI frontend and companion client that interacts with the following open-source projects:
|
|
16
|
+
|
|
17
|
+
1. **NVM for Windows (nvm-windows)**
|
|
18
|
+
- Project: https://github.com/nvm-windows/nvm
|
|
19
|
+
- Author: Corey Butler (Author Software)
|
|
20
|
+
- License: MIT License
|
|
21
|
+
- Relationship: Super NVM provides an graphical interface and taskbar companion for NVM for Windows. It does not replace or bundle closed-source components of nvm-windows.
|
|
22
|
+
|
|
23
|
+
2. **Node.js**
|
|
24
|
+
- Project: https://nodejs.org
|
|
25
|
+
- Organization: OpenJS Foundation
|
|
26
|
+
- License: MIT License / Node.js license terms
|
|
27
|
+
- Relationship: Node.js versions, release feeds, and binary downloads are provided by the official Node.js project.
|
package/README.md
CHANGED
|
@@ -1,3 +1,222 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ⚡ Super NVM — The Modern Visual Node.js Manager for Windows
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+
<img src="resources/nvm-icon.png" width="110" height="110" alt="Super NVM Logo" />
|
|
6
|
+
<br><br>
|
|
7
|
+
|
|
8
|
+

|
|
9
|
+

|
|
10
|
+

|
|
11
|
+

|
|
12
|
+

|
|
13
|
+

|
|
14
|
+
|
|
15
|
+
<p align="center">
|
|
16
|
+
<strong>Switch, install, migrate, and inspect Node.js versions with 1 click across VS Code, Cursor, Google Antigravity IDE, WebStorm, and your Windows Taskbar.</strong>
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
[📥 Download Latest Release](../../releases) • [📦 Zero-Prerequisites Architecture](#-zero-prerequisites-architecture) • [🔧 How It Works Without NVM](#-how-it-works-without-nvm-installed) • [🎯 Multi-Editor Setup](#-supported-editors--environments) • [💡 Pain Points Solved](#-the-pain-points-super-nvm-solves) • [🏷️ Attribution & Licensing](#-attribution-origin--ownership-transparency)
|
|
20
|
+
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 💡 The Pain Points Super NVM Solves
|
|
26
|
+
|
|
27
|
+
Windows developers managing multiple Node.js environments frequently face frustrating bottlenecks with command-line tools:
|
|
28
|
+
|
|
29
|
+
| ❌ The Traditional CLI Pain Point | ⚡ The Super NVM Graphical Solution |
|
|
30
|
+
| :--- | :--- |
|
|
31
|
+
| 🔴 **Manual Command Memorization**<br>Constant terminal switching to run `nvm list`, `nvm use <ver>`, and `nvm install <ver>`. | 🟢 **1-Click Version Switcher**<br>Click any installed version card in the visual dashboard or status bar menu to activate it instantly. |
|
|
32
|
+
| 🔴 **Abandoned Global Packages**<br>Installing a new Node version loses all global CLIs (`pnpm`, `yarn`, `turbo`, `nest`, `typescript`). | 🟢 **Global Package Migrator**<br>Inspect packages installed in any previous Node version and migrate them to your active version in 1 click. |
|
|
33
|
+
| 🔴 **Zero Editor Visibility**<br>Editors provide no visual indication of which Node version is currently active system-wide. | 🟢 **Live Status Bar & Activity Bar**<br>Displays `⚡ Node v24.22.1` directly in your editor status bar with a 0.1s quick-pick menu. |
|
|
34
|
+
| 🔴 **Silent Disk Bloat**<br>Unused Node versions and stale release downloads silently consume gigabytes in `%LOCALAPPDATA%`. | 🟢 **Visual Storage & Cache Cleaner**<br>View real-time disk consumption per Node version and purge download caches with a single click. |
|
|
35
|
+
| 🔴 **Workspace Version Mismatches**<br>Running projects with incompatible Node versions causes unexpected build or runtime failures. | 🟢 **Smart Workspace Detection**<br>Detects `.nvmrc`, `.node-version`, or `package.json` engines on project open and prompts or auto-switches. |
|
|
36
|
+
| 🔴 **Locked into Single Editor Ecosystems**<br>Most extensions only work in VS Code, abandoning JetBrains, Sublime, or Neovim users. | 🟢 **Universal Multi-Editor & Desktop Tray**<br>Native extension for **VS Code**, **Cursor**, **Antigravity IDE**, plus a **Windows Taskbar Tray** for all other IDEs. |
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 📦 Zero-Prerequisites Architecture
|
|
41
|
+
|
|
42
|
+
Super NVM is a **completely standalone, self-sufficient Node.js Version Manager for Windows**:
|
|
43
|
+
|
|
44
|
+
* ⚡ **100% Zero-Dependency**: Super NVM operates autonomously out of the box. You **do not need to install NVM for Windows**, Python, Git, or any external CLIs.
|
|
45
|
+
* 🚀 **Built-in Native Engine**: Directly downloads official Node.js releases from [nodejs.org](https://nodejs.org), extracts them on the fly, and manages directory junctions without requiring administrator privileges.
|
|
46
|
+
* 🔄 **Existing NVM Compatible**: If you already have NVM for Windows installed on your PC, Super NVM automatically detects and manages your existing versions alongside native ones.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
### 🔧 How It Works Without NVM Installed
|
|
51
|
+
|
|
52
|
+
A common question is: *"How does Super NVM download, switch, and execute Node.js versions if NVM for Windows is not installed on my PC?"*
|
|
53
|
+
|
|
54
|
+
Super NVM does not depend on the third-party `nvm.exe` binary. Instead, it embeds its own **Native Management Engine** that interacts directly with the Windows filesystem and official Node.js distribution servers:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
[ nodejs.org Releases API ]
|
|
58
|
+
│ (1. Direct HTTPS Download)
|
|
59
|
+
▼
|
|
60
|
+
[ %LOCALAPPDATA%\SuperNVM\versions\v22.12.0 ]
|
|
61
|
+
│
|
|
62
|
+
│ (2. Admin-Free Directory Junction)
|
|
63
|
+
▼
|
|
64
|
+
[ %LOCALAPPDATA%\SuperNVM\current ] ◄──── Added to User PATH (3. Instant CLI availability)
|
|
65
|
+
│
|
|
66
|
+
├─► node.exe (Active Version)
|
|
67
|
+
└─► npm.cmd / npx.cmd
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
#### 1. Direct Official Downloads & Extraction
|
|
71
|
+
When you click **Install** in the Super NVM Dashboard:
|
|
72
|
+
- Super NVM queries `https://nodejs.org/dist/index.json` directly over HTTPS to retrieve verified releases.
|
|
73
|
+
- It streams the official Windows 64-bit binary archive (`node-v<version>-win-x64.zip`) with live progress reporting.
|
|
74
|
+
- It unpacks the distribution directly into:
|
|
75
|
+
```text
|
|
76
|
+
%LOCALAPPDATA%\SuperNVM\versions\v<version>\
|
|
77
|
+
```
|
|
78
|
+
*(Extracted using built-in Windows `tar` or PowerShell `Expand-Archive`, requiring zero extra tools).*
|
|
79
|
+
|
|
80
|
+
#### 2. Admin-Free Version Switching (NTFS Directory Junctions)
|
|
81
|
+
Traditional NVM for Windows creates symlinks inside `C:\Program Files\nodejs`, which triggers Windows UAC security prompts and requires Administrator privileges. Super NVM solves this cleanly:
|
|
82
|
+
- It maintains an NTFS Directory Junction at:
|
|
83
|
+
```text
|
|
84
|
+
%LOCALAPPDATA%\SuperNVM\current
|
|
85
|
+
```
|
|
86
|
+
- Because this link resides inside your user profile directory (`%LOCALAPPDATA%`), Windows allows creating and redirecting junctions **without administrator rights**.
|
|
87
|
+
- Switching Node versions takes only **~0.1 seconds**: Super NVM simply repoints the junction to `%LOCALAPPDATA%\SuperNVM\versions\v<target-version>`.
|
|
88
|
+
|
|
89
|
+
#### 3. Automatic User PATH Configuration
|
|
90
|
+
- On first version activation, Super NVM registers `%LOCALAPPDATA%\SuperNVM\current` into your **User PATH** environment variable via Windows PowerShell (`[Environment]::SetEnvironmentVariable`).
|
|
91
|
+
- Any terminal session—whether PowerShell, Windows Command Prompt, Git Bash, or internal IDE terminals—instantly recognizes `node -v`, `npm -v`, and `npx` without rebooting your computer.
|
|
92
|
+
|
|
93
|
+
#### 4. Editor Extension Self-Hosting
|
|
94
|
+
- In **Google Antigravity IDE**, **Microsoft VS Code**, and **Cursor**, extensions execute inside the editor's embedded runtime (Extension Host).
|
|
95
|
+
- This means you can install Super NVM on a fresh Windows PC that has **no Node.js and no NVM installed whatsoever**, open your IDE, and use Super NVM to download and set up your initial Node version in one click!
|
|
96
|
+
|
|
97
|
+
| Capability | Traditional NVM for Windows | ⚡ Super NVM Native Engine |
|
|
98
|
+
| :--- | :--- | :--- |
|
|
99
|
+
| **Prerequisites** | Requires installing NVM for Windows installer | **None** — 100% self-contained |
|
|
100
|
+
| **Administrator Rights** | Required for switching versions in `Program Files` | **Not required** — user-level NTFS junctions |
|
|
101
|
+
| **Release Downloads** | Limited CLI terminal feedback | Direct HTTPS streaming with visual progress bar |
|
|
102
|
+
| **Editor Status Bar** | None | Live version display + 1-click switch menu |
|
|
103
|
+
| **Global Package Migration** | Manual `npm install -g ...` for each package | 1-click visual selection & automated migration |
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## 🎯 Supported Editors & Environments
|
|
108
|
+
|
|
109
|
+
Super NVM offers unified Node management across your entire development stack:
|
|
110
|
+
|
|
111
|
+
### 1. 🚀 Google Antigravity IDE
|
|
112
|
+
- Install the `.vsix` extension package via:
|
|
113
|
+
```powershell
|
|
114
|
+
& "$env:LOCALAPPDATA\Programs\Antigravity IDE\bin\antigravity-ide.cmd" --install-extension super-nvm-1.0.0.vsix
|
|
115
|
+
```
|
|
116
|
+
- Or run the included `install-all-editors.bat` script to automatically detect Antigravity IDE and install with one click!
|
|
117
|
+
|
|
118
|
+
### 2. 💻 Microsoft Visual Studio Code & Cursor IDE
|
|
119
|
+
- Install via command line:
|
|
120
|
+
```powershell
|
|
121
|
+
code --install-extension super-nvm-1.0.0.vsix
|
|
122
|
+
cursor --install-extension super-nvm-1.0.0.vsix
|
|
123
|
+
```
|
|
124
|
+
- Or install via UI: Extensions (`Ctrl + Shift + X`) ➔ `...` menu ➔ **Install from VSIX...** ➔ Select `super-nvm-1.0.0.vsix`.
|
|
125
|
+
|
|
126
|
+
### 3. 🌊 Windsurf & VSCodium
|
|
127
|
+
- Fully compatible with any VS Code-compatible editor. Run `install-all-editors.bat` to detect and install automatically.
|
|
128
|
+
|
|
129
|
+
### 4. ☕ JetBrains (WebStorm, IntelliJ IDEA, PyCharm), Sublime Text, & Neovim
|
|
130
|
+
- Double-click **`launch-tray.bat`** to enable the **Windows Taskbar Tray Companion**.
|
|
131
|
+
- A discrete Node crest icon will appear in your system notification tray near the Windows clock.
|
|
132
|
+
- **Right-click** the tray icon to switch active Node versions in 0.5 seconds!
|
|
133
|
+
- Because Super NVM updates Windows system symlinks globally, your WebStorm terminal, PowerShell, and Neovim immediately inherit the active Node version.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## 📥 How Users Install From GitHub
|
|
138
|
+
|
|
139
|
+
When you publish this project on GitHub, your users can get started in 3 simple steps:
|
|
140
|
+
|
|
141
|
+
### Method 1: The All-in-One Multi-Editor Installer (Easiest)
|
|
142
|
+
1. Download **`super-nvm-1.0.0.vsix`** and **`install-all-editors.bat`** from the [GitHub Releases](../../releases).
|
|
143
|
+
2. Double-click **`install-all-editors.bat`**.
|
|
144
|
+
3. The script automatically detects **Antigravity IDE**, **VS Code**, **Cursor**, **Windsurf**, and **VSCodium** on the machine and installs Super NVM into all of them at once!
|
|
145
|
+
|
|
146
|
+
### Method 2: Standalone Desktop Web Dashboard + System Tray
|
|
147
|
+
1. Download **`super-nvm-portable.zip`** from [GitHub Releases](../../releases).
|
|
148
|
+
2. Extract to any folder.
|
|
149
|
+
3. Double-click **`launch-ui.bat`** to open the web dashboard (`http://localhost:4321`).
|
|
150
|
+
4. Double-click **`launch-tray.bat`** for right-click taskbar switching.
|
|
151
|
+
|
|
152
|
+
### Method 3: Run from Source
|
|
153
|
+
```bash
|
|
154
|
+
git clone https://github.com/<your-username>/super-nvm.git
|
|
155
|
+
cd super-nvm
|
|
156
|
+
npm install
|
|
157
|
+
npm run compile
|
|
158
|
+
npm start
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## 🚀 Key Features Walkthrough
|
|
164
|
+
|
|
165
|
+
### ⚡ 1-Click Version Switcher
|
|
166
|
+
- View all installed Node versions in clean, modern dark cards.
|
|
167
|
+
- Instantly switch the active Node version without typing commands.
|
|
168
|
+
- Accurate single-active-version tracking backed directly by NVM's system state.
|
|
169
|
+
|
|
170
|
+
### 📦 Remote Releases Explorer
|
|
171
|
+
- Live table of 800+ official Node.js releases fetched securely from nodejs.org.
|
|
172
|
+
- Filter by **LTS** (Jod, Iron, Hydrogen), **All**, or **Security** patches.
|
|
173
|
+
- Click `Install` on any release row to trigger a clean native background install.
|
|
174
|
+
|
|
175
|
+
### 🔄 Global Package Migrator
|
|
176
|
+
- Clicking **Packages** on any Node version lists its globally installed CLIs.
|
|
177
|
+
- Check off the packages you need (`yarn`, `pnpm`, `turbo`, `typescript`) and click **Migrate Selected Packages** to install them into your active Node version automatically.
|
|
178
|
+
|
|
179
|
+
### 🧹 Storage & Disk Cache Cleaner
|
|
180
|
+
- Real-time disk calculation showing the exact space occupied by each installed Node version.
|
|
181
|
+
- 1-click **Clean NVM Cache** button to reclaim gigabytes of temp downloads.
|
|
182
|
+
|
|
183
|
+
### 🔔 Smart Project Auto-Switch
|
|
184
|
+
- Automatically inspects workspaces for `.nvmrc`, `.node-version`, or `package.json` engines.
|
|
185
|
+
- Provides a subtle notification or silent auto-switch when opening project folders.
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## ⌨️ Keyboard Shortcuts
|
|
190
|
+
|
|
191
|
+
Speed up your workflow across VS Code, Cursor, and Google Antigravity IDE:
|
|
192
|
+
|
|
193
|
+
| Shortcut | Action | Scope |
|
|
194
|
+
| :--- | :--- | :--- |
|
|
195
|
+
| <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>S</kbd>, <kbd>N</kbd> | **Open Super NVM Dashboard** | Global in Editor |
|
|
196
|
+
| <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>S</kbd>, <kbd>V</kbd> | **Quick Switch Node Version** | Global in Editor |
|
|
197
|
+
| <kbd>/</kbd> | **Focus Search Filter** | Inside Dashboard |
|
|
198
|
+
| <kbd>Esc</kbd> | **Close Active Dialog / Modal** | Inside Dashboard |
|
|
199
|
+
|
|
200
|
+
*(On macOS, replace <kbd>Ctrl</kbd> with <kbd>Cmd</kbd>)*
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## 🏷️ Attribution, Origin & Ownership Transparency
|
|
205
|
+
|
|
206
|
+
To ensure complete clarity and compliance with all open-source licensing:
|
|
207
|
+
|
|
208
|
+
* **Node.js Releases & Metadata**:
|
|
209
|
+
Release metadata, download links, and Node.js binaries originate from the official [Node.js project](https://nodejs.org) maintained by the OpenJS Foundation under the MIT/Node License.
|
|
210
|
+
* **NVM Compatibility**:
|
|
211
|
+
Super NVM includes its own standalone native engine and also supports optional interoperability with [NVM for Windows](https://github.com/nvm-windows/nvm) by Corey Butler / Author Software (MIT License) if installed on your system.
|
|
212
|
+
* **Super NVM Client Architecture**:
|
|
213
|
+
The user interface, status bar integration, webview dashboard, cross-editor installer scripts, taskbar tray companion, native junction switcher, and package migration logic are original open-source components developed for Super NVM and distributed freely under the [MIT License](LICENSE).
|
|
214
|
+
* **Independence Statement**:
|
|
215
|
+
Super NVM is an independent open-source project. It does not claim trademark ownership of NVM for Windows or Node.js.
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## 📄 License
|
|
220
|
+
|
|
221
|
+
This project is licensed under the [MIT License](LICENSE).
|
|
222
|
+
Feel free to use, modify, distribute, and contribute!
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Super NVM - Universal Multi-Editor Installer
|
|
2
|
+
$ErrorActionPreference = 'SilentlyContinue'
|
|
3
|
+
|
|
4
|
+
$dir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
5
|
+
if (-not $dir) { $dir = $PSScriptRoot }
|
|
6
|
+
if (-not $dir) { $dir = (Get-Location).Path }
|
|
7
|
+
|
|
8
|
+
$candidates = @(
|
|
9
|
+
(Join-Path $dir 'super-nvm-1.0.0.vsix'),
|
|
10
|
+
(Join-Path (Split-Path -Parent $dir) 'super-nvm-1.0.0.vsix'),
|
|
11
|
+
(Join-Path (Get-Location) 'super-nvm-1.0.0.vsix')
|
|
12
|
+
)
|
|
13
|
+
$vsixPath = $null
|
|
14
|
+
foreach ($c in $candidates) {
|
|
15
|
+
if (Test-Path $c) { $vsixPath = $c; break }
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
Clear-Host
|
|
19
|
+
Write-Host "======================================================================" -ForegroundColor Cyan
|
|
20
|
+
Write-Host " Super NVM - Universal Multi-Editor Installer" -ForegroundColor Green
|
|
21
|
+
Write-Host "======================================================================" -ForegroundColor Cyan
|
|
22
|
+
Write-Host ""
|
|
23
|
+
|
|
24
|
+
if (-not $vsixPath) {
|
|
25
|
+
Write-Host "[ERROR] Could not find super-nvm-1.0.0.vsix." -ForegroundColor Red
|
|
26
|
+
Write-Host "Please ensure super-nvm-1.0.0.vsix is in the same folder as this script." -ForegroundColor Yellow
|
|
27
|
+
Write-Host ""
|
|
28
|
+
Read-Host 'Press Enter to exit'
|
|
29
|
+
exit 1
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
Write-Host "Target Package: $vsixPath" -ForegroundColor Gray
|
|
33
|
+
Write-Host "Scanning system for installed development editors..." -ForegroundColor Gray
|
|
34
|
+
Write-Host ""
|
|
35
|
+
|
|
36
|
+
$editors = @(
|
|
37
|
+
@{ Name = "Google Antigravity IDE"; Paths = @( (Join-Path $env:LOCALAPPDATA 'Programs\Antigravity IDE\bin\antigravity-ide.cmd'), (Join-Path $env:ProgramFiles 'Antigravity IDE\bin\antigravity-ide.cmd') ); CliName = "antigravity-ide" },
|
|
38
|
+
@{ Name = "Microsoft Visual Studio Code"; Paths = @( (Join-Path $env:LOCALAPPDATA 'Programs\Microsoft VS Code\bin\code.cmd'), (Join-Path $env:ProgramFiles 'Microsoft VS Code\bin\code.cmd') ); CliName = "code" },
|
|
39
|
+
@{ Name = "Cursor IDE"; Paths = @( (Join-Path $env:LOCALAPPDATA 'Programs\cursor\resources\app\bin\cursor.cmd'), (Join-Path $env:LOCALAPPDATA 'Programs\Cursor\resources\app\bin\cursor.cmd') ); CliName = "cursor" },
|
|
40
|
+
@{ Name = "Windsurf IDE"; Paths = @( (Join-Path $env:LOCALAPPDATA 'Programs\Windsurf\bin\windsurf.cmd') ); CliName = "windsurf" },
|
|
41
|
+
@{ Name = "VSCodium"; Paths = @( (Join-Path $env:LOCALAPPDATA 'Programs\VSCodium\bin\codium.cmd'), (Join-Path $env:ProgramFiles 'VSCodium\bin\codium.cmd') ); CliName = "codium" }
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
$count = 0
|
|
45
|
+
foreach ($e in $editors) {
|
|
46
|
+
$cli = $null
|
|
47
|
+
foreach ($p in $e.Paths) {
|
|
48
|
+
if (Test-Path $p) { $cli = $p; break }
|
|
49
|
+
}
|
|
50
|
+
if (-not $cli) {
|
|
51
|
+
$cmd = Get-Command $e.CliName -ErrorAction SilentlyContinue
|
|
52
|
+
if ($cmd) { $cli = $cmd.Source }
|
|
53
|
+
}
|
|
54
|
+
if ($cli) {
|
|
55
|
+
Write-Host "[FOUND] $($e.Name)" -ForegroundColor Yellow
|
|
56
|
+
Write-Host " Installing Super NVM extension..." -ForegroundColor Gray
|
|
57
|
+
$proc = Start-Process -FilePath $cli -ArgumentList "--install-extension `"$vsixPath`"" -Wait -NoNewWindow -PassThru
|
|
58
|
+
if ($proc.ExitCode -eq 0) {
|
|
59
|
+
Write-Host " [OK] Successfully installed into $($e.Name)!" -ForegroundColor Green
|
|
60
|
+
$count++
|
|
61
|
+
} else {
|
|
62
|
+
Write-Host " [WARN] Installation finished with exit code $($proc.ExitCode)" -ForegroundColor DarkYellow
|
|
63
|
+
}
|
|
64
|
+
Write-Host ""
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
Write-Host "======================================================================" -ForegroundColor Cyan
|
|
69
|
+
if ($count -gt 0) {
|
|
70
|
+
Write-Host "[SUCCESS] Super NVM has been installed into $count editor(s)!" -ForegroundColor Green
|
|
71
|
+
Write-Host "Launch or reload your editor to start managing Node versions with 1 click." -ForegroundColor White
|
|
72
|
+
} else {
|
|
73
|
+
Write-Host "[INFO] No extension-based editors were detected automatically." -ForegroundColor Yellow
|
|
74
|
+
Write-Host "You can manually install the .vsix via your editor Extensions menu." -ForegroundColor White
|
|
75
|
+
}
|
|
76
|
+
Write-Host ""
|
|
77
|
+
Write-Host "For WebStorm, IntelliJ IDEA, PyCharm, Sublime Text, or Neovim:" -ForegroundColor Cyan
|
|
78
|
+
Write-Host "Double-click launch-tray.bat or launch-ui.bat to switch Node versions globally!" -ForegroundColor Gray
|
|
79
|
+
Write-Host "======================================================================" -ForegroundColor Cyan
|
|
80
|
+
Write-Host ""
|
|
81
|
+
Read-Host 'Press Enter to exit'
|
package/bin/nvm-ui.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
|
|
5
|
+
const compiledCli = path.join(__dirname, '..', 'out', 'server', 'cli.js');
|
|
6
|
+
|
|
7
|
+
if (!fs.existsSync(compiledCli)) {
|
|
8
|
+
console.log('Compiling NVM-UI TypeScript sources...');
|
|
9
|
+
const { execSync } = require('child_process');
|
|
10
|
+
execSync('npm run compile', { stdio: 'inherit', cwd: path.join(__dirname, '..') });
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
require(compiledCli);
|
package/bin/super-nvm.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
|
|
5
|
+
const compiledCli = path.join(__dirname, '..', 'out', 'server', 'cli.js');
|
|
6
|
+
|
|
7
|
+
if (!fs.existsSync(compiledCli)) {
|
|
8
|
+
console.log('Compiling Super NVM TypeScript sources...');
|
|
9
|
+
const { execSync } = require('child_process');
|
|
10
|
+
execSync('npm run compile', { stdio: 'inherit', cwd: path.join(__dirname, '..') });
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
require(compiledCli);
|