@10stars/config 15.3.0 → 15.4.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/package.json +5 -5
- package/src/index.ts +25 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@10stars/config",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"bin": {
|
|
6
6
|
"config": "./src/index.ts"
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@10stars/oxlint-plugin-react-hooks": "^1.0.5",
|
|
24
24
|
"@oxc-node/core": "0.1.0",
|
|
25
|
-
"@types/bun": "^1.
|
|
25
|
+
"@types/bun": "^1.3.13",
|
|
26
26
|
"@types/node": "^24.0.0",
|
|
27
27
|
"@types/react": "^19.0.0",
|
|
28
28
|
"husky": "^9.0.0",
|
|
29
|
-
"oxfmt": "^0.
|
|
30
|
-
"oxlint": "^1.
|
|
29
|
+
"oxfmt": "^0.46.0",
|
|
30
|
+
"oxlint": "^1.61.0",
|
|
31
31
|
"oxlint-tsgolint": "^0.21.1",
|
|
32
32
|
"tsx": "^4.21.0",
|
|
33
33
|
"type-fest": "^5.0.0",
|
|
34
|
-
"typescript": "~6.0.
|
|
34
|
+
"typescript": "~6.0.3"
|
|
35
35
|
}
|
|
36
36
|
}
|
package/src/index.ts
CHANGED
|
@@ -165,6 +165,31 @@ Examples:
|
|
|
165
165
|
await runConcurrently(commands)
|
|
166
166
|
},
|
|
167
167
|
},
|
|
168
|
+
killPort: {
|
|
169
|
+
info: `Kill process on port(s)`,
|
|
170
|
+
action: () => {
|
|
171
|
+
const ports = process.argv.slice(3)
|
|
172
|
+
if (!ports.length) {
|
|
173
|
+
console.error(`At least one port required`)
|
|
174
|
+
process.exit(1)
|
|
175
|
+
}
|
|
176
|
+
for (const port of ports) {
|
|
177
|
+
try {
|
|
178
|
+
if (process.platform === "win32") {
|
|
179
|
+
execSync(
|
|
180
|
+
`for /f "tokens=5" %a in ('netstat -aon ^| findstr :${port}') do taskkill /F /PID %a`,
|
|
181
|
+
{ stdio: "inherit" },
|
|
182
|
+
)
|
|
183
|
+
} else {
|
|
184
|
+
execSync(`lsof -ti :${port} | xargs kill -9`, { stdio: "inherit" })
|
|
185
|
+
}
|
|
186
|
+
console.info(`Killed process on port ${port}`)
|
|
187
|
+
} catch {
|
|
188
|
+
console.info(`No process found on port ${port}`)
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
},
|
|
168
193
|
} satisfies Record<string, { info: string; action: () => void | Promise<void> }>
|
|
169
194
|
|
|
170
195
|
export const run = async () => {
|