lunel-cli 0.1.111 → 0.1.112
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/dist/index.js +17 -50
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -192,55 +192,6 @@ function maybeFinalizeTunnel(tunnelId) {
|
|
|
192
192
|
}
|
|
193
193
|
}, PROXY_TUNNEL_LINGER_MS);
|
|
194
194
|
}
|
|
195
|
-
// Popular development server ports to scan on connect
|
|
196
|
-
const DEV_PORTS = [
|
|
197
|
-
1234, // Parcel
|
|
198
|
-
1313, // Hugo
|
|
199
|
-
2000, // Deno (alt)
|
|
200
|
-
3000, // Next.js / CRA / Remix / Express
|
|
201
|
-
3001, // Next.js (alt)
|
|
202
|
-
3002, // Dev server (alt)
|
|
203
|
-
3003, // Dev server (alt)
|
|
204
|
-
3333, // AdonisJS / Nitro
|
|
205
|
-
4000, // Gatsby / Redwood
|
|
206
|
-
4200, // Angular CLI
|
|
207
|
-
4321, // Astro
|
|
208
|
-
4173, // Vite preview
|
|
209
|
-
4444, // Selenium
|
|
210
|
-
4567, // Sinatra
|
|
211
|
-
5000, // Flask / Sails.js
|
|
212
|
-
5001, // Flask (alt)
|
|
213
|
-
5173, // Vite
|
|
214
|
-
5174, // Vite (alt)
|
|
215
|
-
5175, // Vite (alt)
|
|
216
|
-
5500, // Live Server (VS Code)
|
|
217
|
-
5555, // Prisma Studio
|
|
218
|
-
6006, // Storybook
|
|
219
|
-
7000, // Hapi
|
|
220
|
-
7070, // Dev server
|
|
221
|
-
7777, // Dev server
|
|
222
|
-
8000, // Django / Laravel / Gatsby
|
|
223
|
-
8001, // Django (alt)
|
|
224
|
-
8008, // Dev server
|
|
225
|
-
8010, // Dev server
|
|
226
|
-
8080, // Vue CLI / Webpack Dev Server / Spring Boot
|
|
227
|
-
8081, // Metro Bundler
|
|
228
|
-
8082, // Dev server (alt)
|
|
229
|
-
8100, // Ionic
|
|
230
|
-
8200, // Vault
|
|
231
|
-
8443, // HTTPS dev server
|
|
232
|
-
8787, // Wrangler (Cloudflare Workers)
|
|
233
|
-
8888, // Jupyter Notebook
|
|
234
|
-
8899, // Dev server
|
|
235
|
-
9000, // PHP / SonarQube
|
|
236
|
-
9090, // Prometheus / Cockpit
|
|
237
|
-
9200, // Elasticsearch
|
|
238
|
-
9229, // Node.js debugger
|
|
239
|
-
9292, // Rack (Ruby)
|
|
240
|
-
10000, // Webmin
|
|
241
|
-
19006, // Expo web
|
|
242
|
-
24678, // Vite HMR WebSocket
|
|
243
|
-
];
|
|
244
195
|
function parseExtraPortsFromArgs(args) {
|
|
245
196
|
const values = [];
|
|
246
197
|
for (let i = 0; i < args.length; i++) {
|
|
@@ -928,6 +879,16 @@ async function handleGitCheckout(payload) {
|
|
|
928
879
|
}
|
|
929
880
|
return { branch };
|
|
930
881
|
}
|
|
882
|
+
async function handleGitDeleteBranch(payload) {
|
|
883
|
+
const branch = payload.branch;
|
|
884
|
+
if (!branch)
|
|
885
|
+
throw Object.assign(new Error("branch is required"), { code: "EINVAL" });
|
|
886
|
+
const result = await runGit(["branch", "-d", branch]);
|
|
887
|
+
if (result.code !== 0) {
|
|
888
|
+
throw Object.assign(new Error(result.stderr || "git branch delete failed"), { code: "EGIT" });
|
|
889
|
+
}
|
|
890
|
+
return { branch };
|
|
891
|
+
}
|
|
931
892
|
async function handleGitPull() {
|
|
932
893
|
const result = await runGit(["pull"]);
|
|
933
894
|
if (result.code !== 0) {
|
|
@@ -2008,7 +1969,10 @@ async function handleHttpRequest(payload) {
|
|
|
2008
1969
|
// ============================================================================
|
|
2009
1970
|
async function scanDevPorts() {
|
|
2010
1971
|
const openPorts = [];
|
|
2011
|
-
const scanPorts = Array.from(
|
|
1972
|
+
const scanPorts = Array.from(trackedProxyPorts).sort((a, b) => a - b);
|
|
1973
|
+
if (scanPorts.length === 0) {
|
|
1974
|
+
return openPorts;
|
|
1975
|
+
}
|
|
2012
1976
|
const checks = scanPorts.map((port) => {
|
|
2013
1977
|
return new Promise((resolve) => {
|
|
2014
1978
|
let finished = false;
|
|
@@ -2541,6 +2505,9 @@ async function processMessage(message) {
|
|
|
2541
2505
|
case "checkout":
|
|
2542
2506
|
result = await handleGitCheckout(payload);
|
|
2543
2507
|
break;
|
|
2508
|
+
case "deleteBranch":
|
|
2509
|
+
result = await handleGitDeleteBranch(payload);
|
|
2510
|
+
break;
|
|
2544
2511
|
case "pull":
|
|
2545
2512
|
result = await handleGitPull();
|
|
2546
2513
|
break;
|