ports-manager 1.0.0 โ 1.1.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/.claude/settings.json +12 -0
- package/README.md +278 -276
- package/package.json +8 -37
- package/src/cli.js +248 -278
- package/src/config.js +13 -20
- package/src/cors.js +95 -55
- package/src/detect.js +301 -114
- package/src/index.js +10 -9
- package/src/leases.js +130 -0
- package/src/preflight.js +214 -0
- package/src/process-manager.js +187 -97
- package/src/runtime.js +228 -121
- package/src/wiring.js +366 -0
- package/bridge/src/extension.ts +0 -96
- package/bridge/src/server.ts +0 -185
- package/dist/bridge/src/extension.js +0 -133
- package/dist/bridge/src/extension.js.map +0 -1
- package/dist/bridge/src/server.js +0 -202
- package/dist/bridge/src/server.js.map +0 -1
- package/src/bridge-client.js +0 -81
- package/src/ide.js +0 -107
- package/tsconfig.bridge.json +0 -18
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(curl -s -m 8 \"http://localhost:3002/api/v1/health\")",
|
|
5
|
+
"Bash(curl -s -m 8 -o /dev/null -w \"http status %{http_code}\\\\n\" \"http://localhost:3002/qc-api/x\")",
|
|
6
|
+
"Bash(cp -r C:/Users/saada/AppData/Local/Temp/claude/c--Programming-ports-manager/e29f8f20-13f0-4ba0-aa60-d1a97f9d89fe/scratchpad/demo C:/Users/saada/AppData/Local/Temp/claude/c--Programming-ports-manager/e29f8f20-13f0-4ba0-aa60-d1a97f9d89fe/scratchpad/demo2)",
|
|
7
|
+
"Bash(sed -i 's/demo backend on/demo2 backend on/' C:/Users/saada/AppData/Local/Temp/claude/c--Programming-ports-manager/e29f8f20-13f0-4ba0-aa60-d1a97f9d89fe/scratchpad/demo2/backend/src/index.js)",
|
|
8
|
+
"Bash(grep -vE \"^\\\\[Frontend\\\\] *$\")",
|
|
9
|
+
"Bash(curl -s -m 8 \"http://localhost:3004/api/v1/health\")"
|
|
10
|
+
]
|
|
11
|
+
}
|
|
12
|
+
}
|
package/README.md
CHANGED
|
@@ -1,276 +1,278 @@
|
|
|
1
|
-
# ๐ฆ Ports Manager
|
|
2
|
-
|
|
3
|
-
<p align="center">
|
|
4
|
-
<strong>
|
|
5
|
-
</p>
|
|
6
|
-
|
|
7
|
-
<p align="center">
|
|
8
|
-
<img alt="Node.js 18+" src="https://img.shields.io/badge/Node.js-18%2B-339933?logo=node.js&logoColor=white">
|
|
9
|
-
<img alt="License MIT" src="https://img.shields.io/badge/license-MIT-blue">
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
files
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
and
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
--
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
</
|
|
1
|
+
# ๐ฆ Ports Manager
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<strong>Run several MERN projects at once โ each on ports that are actually free, with the frontend wired to wherever the backend landed.</strong>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<img alt="Node.js 18+" src="https://img.shields.io/badge/Node.js-18%2B-339933?logo=node.js&logoColor=white">
|
|
9
|
+
<img alt="License MIT" src="https://img.shields.io/badge/license-MIT-blue">
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Why Ports Manager?
|
|
15
|
+
|
|
16
|
+
Running a second project when `3000` and `5000` are already busy usually means editing
|
|
17
|
+
`vite.config.ts`, editing `.env`, and adding a new origin to your CORS allowlist โ every
|
|
18
|
+
time. Ports Manager does that for you, for the duration of the run, without touching your
|
|
19
|
+
source files.
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
cd my-project
|
|
23
|
+
npx ports-manager
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
Root: C:\work\my-project
|
|
28
|
+
Backend: express / npm run dev / port 5001
|
|
29
|
+
Frontend: vite / npm run dev / port 5175
|
|
30
|
+
Wiring: vite dev proxy retargeted to backend 5001
|
|
31
|
+
CORS: not needed (same origin)
|
|
32
|
+
Open: http://localhost:5175
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Start the same project again โ or a different one โ and the second run steps aside:
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
Backend: express / npm run dev / port 3000 (5001 busy)
|
|
39
|
+
Frontend: vite / npm run dev / port 3001 (5175 busy)
|
|
40
|
+
Wiring: vite dev proxy retargeted to backend 3000
|
|
41
|
+
Open: http://localhost:3001
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
What it does:
|
|
45
|
+
|
|
46
|
+
- ๐ Detects your `frontend` + `backend` or `client` + `server`
|
|
47
|
+
- ๐ฆ Checks the dev binaries exist **before** starting, and installs them if they don't
|
|
48
|
+
- ๐ฏ Prefers each project's own port, falls back only when it is taken
|
|
49
|
+
- ๐ Rewrites the frontend's dev proxy so `/api` reaches the relocated backend
|
|
50
|
+
- ๐ก๏ธ Sets the CORS origin variables your backend already reads
|
|
51
|
+
- ๐งน Stops both process trees cleanly on `Ctrl+C`
|
|
52
|
+
|
|
53
|
+
No application source file is modified. The only file written is a temporary Vite config
|
|
54
|
+
next to your own, named per process and deleted when the run ends. If you want it out of
|
|
55
|
+
version control entirely, add this to `.gitignore`:
|
|
56
|
+
|
|
57
|
+
```gitignore
|
|
58
|
+
.ports-manager.*.vite.config.mjs
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Install
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npm install --global ports-manager
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Or run it without installing:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npx ports-manager
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Quick start
|
|
74
|
+
|
|
75
|
+
Your project should look like one of these:
|
|
76
|
+
|
|
77
|
+
```text
|
|
78
|
+
my-project/
|
|
79
|
+
โโโ frontend/ # or client/
|
|
80
|
+
โ โโโ package.json
|
|
81
|
+
โโโ backend/ # or server/
|
|
82
|
+
โโโ package.json
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Run Ports Manager from `my-project`, not from inside either child. It prefers
|
|
86
|
+
`npm run dev` and falls back to `npm start`.
|
|
87
|
+
|
|
88
|
+
## How the wiring works
|
|
89
|
+
|
|
90
|
+
Moving the backend is the easy half. The half that breaks apps is everything that still
|
|
91
|
+
points at the old port. Ports Manager picks the best available strategy:
|
|
92
|
+
|
|
93
|
+
| Frontend | Strategy | Result |
|
|
94
|
+
|---|---|---|
|
|
95
|
+
| Vite with a `server.proxy` | Generates a config extending yours with the proxy target repointed | Same origin, native HMR, no extra port |
|
|
96
|
+
| CRA, Next.js, generic | Same-origin reverse proxy in front of both services | One URL serves the app and `/api` |
|
|
97
|
+
| No proxy anywhere | Sets the API env var your source actually references | Cross-origin, CORS variables injected |
|
|
98
|
+
|
|
99
|
+
The proxy rewrite is deliberately narrow. Given this config:
|
|
100
|
+
|
|
101
|
+
```ts
|
|
102
|
+
proxy: {
|
|
103
|
+
'/api': { target: 'http://localhost:5001' }, // your backend
|
|
104
|
+
'/qc-api': { target: 'http://localhost:5000' } // some other service
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
only `/api` is repointed, because only it targets the backend's own port. `/qc-api` is
|
|
109
|
+
left alone, and both decisions are printed at startup.
|
|
110
|
+
|
|
111
|
+
## CORS
|
|
112
|
+
|
|
113
|
+
When the browser talks to a single origin โ the Vite proxy or the same-origin proxy โ
|
|
114
|
+
there is no CORS to fix, and Ports Manager says so rather than pretending to act.
|
|
115
|
+
|
|
116
|
+
When requests really are cross-origin, it scans your backend for the origin variables it
|
|
117
|
+
already reads (`CORS_ORIGIN`, `ALLOWED_ORIGINS`, `CLIENT_URL`, `FRONTEND_URL`, and
|
|
118
|
+
similar) and sets those to the frontend's origin for the run. Only names your code
|
|
119
|
+
references are set. An existing value in `.env` is extended, not replaced:
|
|
120
|
+
|
|
121
|
+
```text
|
|
122
|
+
CORS: injecting CORS_ORIGIN=https://app.example.com,http://localhost:3001
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
If your backend reads no recognizable variable, `--force-cors` preloads a shim that
|
|
126
|
+
applies CORS headers at response-send time, overriding whatever the app set:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
npx ports-manager --force-cors
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
> [!WARNING]
|
|
133
|
+
> The shim is intentionally permissive and meant only for local development.
|
|
134
|
+
|
|
135
|
+
## Missing dependencies
|
|
136
|
+
|
|
137
|
+
A dev script naming a binary that was never installed used to fail with a bare
|
|
138
|
+
`'vite' is not recognized as an internal or external command`. Ports Manager now resolves
|
|
139
|
+
every binary a dev script needs before spawning anything, and installs with the package
|
|
140
|
+
manager your lockfile implies (npm, pnpm, yarn, or bun):
|
|
141
|
+
|
|
142
|
+
```text
|
|
143
|
+
frontend: dependencies not installed
|
|
144
|
+
[frontend] running `npm install` in C:\work\my-project\frontend
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Prefer to do it yourself:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
npx ports-manager --no-install
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
```text
|
|
154
|
+
dependencies are missing and --no-install was given
|
|
155
|
+
frontend: `vite` not found in C:\work\my-project\frontend
|
|
156
|
+
fix: cd C:\work\my-project\frontend && npm install
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Running several projects at once
|
|
160
|
+
|
|
161
|
+
Ports are held open from the moment they are chosen until the child processes start, so a
|
|
162
|
+
second instance launched at the same moment cannot pick the same one. Each instance also
|
|
163
|
+
records its ports in `~/.ports-manager/leases.json`, keyed by pid, so concurrent runs
|
|
164
|
+
avoid each other; entries whose process has exited are pruned automatically.
|
|
165
|
+
|
|
166
|
+
## Common recipes
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
# Preview without installing or starting anything
|
|
170
|
+
npx ports-manager --dry-run
|
|
171
|
+
|
|
172
|
+
# Custom folder names
|
|
173
|
+
npx ports-manager --frontend-dir apps/web --backend-dir apps/api
|
|
174
|
+
|
|
175
|
+
# Restrict the search range and keep some ports free
|
|
176
|
+
npx ports-manager --range 4100-4900 --ban 4200,4300
|
|
177
|
+
|
|
178
|
+
# Pin one side
|
|
179
|
+
npx ports-manager --backend-port 5001
|
|
180
|
+
|
|
181
|
+
# Force the same-origin proxy even for Vite
|
|
182
|
+
npx ports-manager --proxy --api-prefix /api
|
|
183
|
+
|
|
184
|
+
# Let the backend come up first
|
|
185
|
+
npx ports-manager --wait-for-backend
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## Supported stacks
|
|
189
|
+
|
|
190
|
+
| Role | Detected | Port strategy |
|
|
191
|
+
|---|---|---|
|
|
192
|
+
| Frontend | Vite | `--port` + `--strictPort`, plus a generated config |
|
|
193
|
+
| Frontend | Create React App | `PORT` environment variable |
|
|
194
|
+
| Frontend | Next.js | `-p` argument |
|
|
195
|
+
| Backend | Express, Koa, Fastify, NestJS | `PORT` environment variable |
|
|
196
|
+
| Either | Generic Node project | `PORT` environment variable |
|
|
197
|
+
|
|
198
|
+
The natural port is read from `.env`, then the dev script, then `vite.config.*`, then a
|
|
199
|
+
schema default such as `PORT: z.coerce.number().default(5001)` โ so a backend that reads
|
|
200
|
+
its port through a config module is handled correctly.
|
|
201
|
+
|
|
202
|
+
Backends must honour `PORT`. Rather than guessing from a static scan, Ports Manager
|
|
203
|
+
watches whether the port is actually bound and tells you if it was not:
|
|
204
|
+
|
|
205
|
+
```text
|
|
206
|
+
[Ports Manager] Backend never bound port 5001.
|
|
207
|
+
It may ignore the PORT environment variable. Set PORT in the backend .env,
|
|
208
|
+
or pin it with --backend-port 5001.
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## Configuration
|
|
212
|
+
|
|
213
|
+
Create `ports-manager.config.json` in the project root:
|
|
214
|
+
|
|
215
|
+
```json
|
|
216
|
+
{
|
|
217
|
+
"pairs": [["frontend", "backend"], ["client", "server"]],
|
|
218
|
+
"portRange": [3000, 5999],
|
|
219
|
+
"bannedPorts": [],
|
|
220
|
+
"apiPrefix": "/api",
|
|
221
|
+
"install": true,
|
|
222
|
+
"cors": true,
|
|
223
|
+
"proxy": null,
|
|
224
|
+
"env": {
|
|
225
|
+
"frontend": { "CUSTOM_API_URL": "http://127.0.0.1:{backendPort}" }
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
`proxy` accepts `true` (always), `false` (never), or `null` (use it only when the
|
|
231
|
+
frontend cannot proxy for itself). Environment values may use `{frontendPort}`,
|
|
232
|
+
`{backendPort}`, `{proxyPort}`, and `{apiPrefix}`. CLI flags override the file.
|
|
233
|
+
|
|
234
|
+
## CLI reference
|
|
235
|
+
|
|
236
|
+
```text
|
|
237
|
+
--frontend-dir PATH Override frontend/client directory
|
|
238
|
+
--backend-dir PATH Override backend/server directory
|
|
239
|
+
--frontend-port PORT Pin the frontend port
|
|
240
|
+
--backend-port PORT Pin the backend port
|
|
241
|
+
--proxy-port PORT Pin the same-origin proxy port
|
|
242
|
+
--range MIN-MAX Port search range (default 3000-5999)
|
|
243
|
+
--ban PORTS Never use these comma-separated ports
|
|
244
|
+
--proxy / --no-proxy Force or forbid same-origin proxy mode
|
|
245
|
+
--api-prefix PATH Path routed to the backend (default /api)
|
|
246
|
+
--no-install Fail instead of installing missing dependencies
|
|
247
|
+
--no-cors Do not inject backend CORS origin variables
|
|
248
|
+
--force-cors Also preload a response-time CORS shim
|
|
249
|
+
--no-cors-credentials Shim omits Access-Control-Allow-Credentials
|
|
250
|
+
--wait-for-backend[=MS] Wait for the backend before starting the frontend
|
|
251
|
+
--config PATH Explicit JSON config
|
|
252
|
+
--dry-run Show the plan without installing or starting anything
|
|
253
|
+
--version, -v Show version and author
|
|
254
|
+
--help, -h Show all options
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
## Limitations
|
|
258
|
+
|
|
259
|
+
- Next.js has no `--config` flag, so its rewrites cannot be retargeted; it uses the
|
|
260
|
+
same-origin proxy or env wiring instead.
|
|
261
|
+
- CRA reads `proxy` from `package.json`, which cannot be overridden per run, so it also
|
|
262
|
+
uses the same-origin proxy.
|
|
263
|
+
- Framework and natural-port detection are heuristics; pin a port when they guess wrong.
|
|
264
|
+
- Monorepos and workspace layouts beyond a single `frontend`/`backend` pair are untested.
|
|
265
|
+
|
|
266
|
+
## Development
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
npm install
|
|
270
|
+
npm test
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
<p align="center">
|
|
276
|
+
Built by <strong>Muhammad Saad Amin</strong> โ <strong>SENODROOM</strong><br>
|
|
277
|
+
Released under the MIT License.
|
|
278
|
+
</p>
|
package/package.json
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ports-manager",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"displayName": "Ports Manager",
|
|
5
|
-
"publisher": "SENODROOM",
|
|
3
|
+
"version": "1.1.0",
|
|
6
4
|
"author": "Muhammad Saad Amin",
|
|
7
|
-
"description": "
|
|
8
|
-
"main": "./
|
|
5
|
+
"description": "Run paired frontend/backend projects on free ports, with the frontend automatically wired to wherever the backend landed and CORS handled for you.",
|
|
6
|
+
"main": "./src/index.js",
|
|
9
7
|
"exports": {
|
|
10
8
|
".": "./src/index.js"
|
|
11
9
|
},
|
|
@@ -14,57 +12,30 @@
|
|
|
14
12
|
},
|
|
15
13
|
"type": "commonjs",
|
|
16
14
|
"engines": {
|
|
17
|
-
"node": ">=18"
|
|
18
|
-
"vscode": "^1.85.0"
|
|
19
|
-
},
|
|
20
|
-
"categories": [
|
|
21
|
-
"Other"
|
|
22
|
-
],
|
|
23
|
-
"activationEvents": [
|
|
24
|
-
"onStartupFinished"
|
|
25
|
-
],
|
|
26
|
-
"contributes": {
|
|
27
|
-
"commands": [
|
|
28
|
-
{
|
|
29
|
-
"command": "ports-manager.stopAll",
|
|
30
|
-
"title": "Ports Manager: Stop All Managed Terminals"
|
|
31
|
-
}
|
|
32
|
-
]
|
|
15
|
+
"node": ">=18"
|
|
33
16
|
},
|
|
34
17
|
"scripts": {
|
|
35
|
-
"
|
|
36
|
-
"test": "npm run test:cli && npm run test:bridge",
|
|
37
|
-
"test:cli": "node --test test/core.test.js test/cors.integration.test.js test/process.integration.test.js",
|
|
38
|
-
"test:bridge": "npm run compile:bridge && node --test dist/bridge/test/server.test.js",
|
|
39
|
-
"package:vsix": "npm run compile:bridge && vsce package --allow-missing-repository",
|
|
40
|
-
"package:ovsx": "npm run package:vsix",
|
|
41
|
-
"publish:ovsx": "ovsx publish",
|
|
42
|
-
"prepack": "npm run compile:bridge",
|
|
18
|
+
"test": "node --test test/core.test.js test/wiring.test.js test/cors.integration.test.js test/process.integration.test.js",
|
|
43
19
|
"start": "node bin/ports-manager.js"
|
|
44
20
|
},
|
|
45
21
|
"dependencies": {
|
|
46
22
|
"chalk": "^4.1.2",
|
|
47
23
|
"cosmiconfig": "^9.0.0",
|
|
48
|
-
"jsonc-parser": "^3.3.1",
|
|
49
24
|
"tree-kill": "^1.2.2"
|
|
50
25
|
},
|
|
51
26
|
"optionalDependencies": {
|
|
52
27
|
"http-proxy-middleware": "^3.0.5"
|
|
53
28
|
},
|
|
54
29
|
"devDependencies": {
|
|
55
|
-
"@types/node": "^22.10.0"
|
|
56
|
-
"@types/vscode": "^1.85.0",
|
|
57
|
-
"@vscode/vsce": "^3.2.2",
|
|
58
|
-
"ovsx": "^0.10.1",
|
|
59
|
-
"typescript": "^5.7.2"
|
|
30
|
+
"@types/node": "^22.10.0"
|
|
60
31
|
},
|
|
61
32
|
"keywords": [
|
|
62
33
|
"ports",
|
|
63
34
|
"mern",
|
|
64
35
|
"cli",
|
|
65
|
-
"vscode",
|
|
66
|
-
"cursor",
|
|
67
36
|
"cors",
|
|
37
|
+
"vite",
|
|
38
|
+
"proxy",
|
|
68
39
|
"dev-server"
|
|
69
40
|
],
|
|
70
41
|
"license": "MIT",
|