bgrun 3.12.10 → 3.12.12
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/README.md +2 -2
- package/dashboard/app/api/config/[name]/route.ts +1 -1
- package/dashboard/app/api/debug/route.ts +1 -1
- package/dashboard/app/api/dependencies/route.ts +40 -40
- package/dashboard/app/api/deploy/[name]/route.ts +1 -1
- package/dashboard/app/api/deploy-all/route.ts +25 -25
- package/dashboard/app/api/deps/route.ts +3 -3
- package/dashboard/app/api/guard/route.ts +1 -1
- package/dashboard/app/api/guard-all/route.ts +1 -1
- package/dashboard/app/api/guard-events/route.ts +4 -4
- package/dashboard/app/api/history/route.ts +105 -105
- package/dashboard/app/api/logs/[name]/route.ts +100 -100
- package/dashboard/app/api/logs/rotate/route.ts +2 -2
- package/dashboard/app/api/next-port/route.ts +32 -32
- package/dashboard/app/api/processes/[name]/route.ts +2 -2
- package/dashboard/app/api/processes/route.ts +4 -4
- package/dashboard/app/api/restart/[name]/route.ts +2 -2
- package/dashboard/app/api/start/route.ts +2 -2
- package/dashboard/app/api/stop/[name]/route.ts +2 -2
- package/dashboard/app/api/templates/route.ts +46 -46
- package/dashboard/app/api/version/route.ts +1 -1
- package/dist/api.js +94 -67
- package/dist/deploy.js +1373 -0
- package/dist/deps.js +1004 -0
- package/dist/index.js +224 -224
- package/dist/log-rotation.js +95 -0
- package/dist/server.js +1488 -0
- package/package.json +3 -3
- package/src/api.ts +59 -6
- package/src/build.ts +8 -1
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bgrun",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.12",
|
|
4
4
|
"description": "bgrun — A lightweight process manager for Bun",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "./
|
|
6
|
+
"main": "./dist/api.js",
|
|
7
7
|
"exports": {
|
|
8
|
-
".": "./
|
|
8
|
+
".": "./dist/api.js"
|
|
9
9
|
},
|
|
10
10
|
"bin": {
|
|
11
11
|
"bgrun": "dist/index.js"
|
package/src/api.ts
CHANGED
|
@@ -23,7 +23,31 @@ export type { Process } from './db'
|
|
|
23
23
|
export type { CommandOptions } from './types'
|
|
24
24
|
|
|
25
25
|
// --- Database Operations ---
|
|
26
|
-
export {
|
|
26
|
+
export {
|
|
27
|
+
db,
|
|
28
|
+
getAllProcesses,
|
|
29
|
+
getProcess,
|
|
30
|
+
insertProcess,
|
|
31
|
+
removeProcess,
|
|
32
|
+
removeProcessByName,
|
|
33
|
+
removeAllProcesses,
|
|
34
|
+
updateProcessPid,
|
|
35
|
+
updateProcessEnv,
|
|
36
|
+
getAllTemplates,
|
|
37
|
+
saveTemplate,
|
|
38
|
+
deleteTemplate,
|
|
39
|
+
getProcessHistory,
|
|
40
|
+
getRecentHistory,
|
|
41
|
+
addHistoryEntry,
|
|
42
|
+
getDependencyGraph,
|
|
43
|
+
addDependency,
|
|
44
|
+
removeDependency,
|
|
45
|
+
getStartOrder,
|
|
46
|
+
retryDatabaseOperation,
|
|
47
|
+
getDbInfo,
|
|
48
|
+
dbPath,
|
|
49
|
+
bgrHome,
|
|
50
|
+
} from './db'
|
|
27
51
|
|
|
28
52
|
// --- Process Operations ---
|
|
29
53
|
export {
|
|
@@ -40,7 +64,8 @@ export {
|
|
|
40
64
|
getHomeDir,
|
|
41
65
|
isWindows,
|
|
42
66
|
getProcessBatchResources,
|
|
43
|
-
getProcessMemory
|
|
67
|
+
getProcessMemory,
|
|
68
|
+
reconcileProcessPids,
|
|
44
69
|
} from './platform'
|
|
45
70
|
|
|
46
71
|
// --- High-Level Commands ---
|
|
@@ -50,14 +75,42 @@ export { handleRun } from './commands/run'
|
|
|
50
75
|
export { getVersion, calculateRuntime, parseEnvString, validateDirectory } from './utils'
|
|
51
76
|
|
|
52
77
|
// --- Default Export (namespace style) ---
|
|
53
|
-
import {
|
|
54
|
-
|
|
78
|
+
import {
|
|
79
|
+
db,
|
|
80
|
+
getAllProcesses,
|
|
81
|
+
getProcess,
|
|
82
|
+
insertProcess,
|
|
83
|
+
removeProcess,
|
|
84
|
+
removeProcessByName,
|
|
85
|
+
removeAllProcesses,
|
|
86
|
+
updateProcessPid,
|
|
87
|
+
updateProcessEnv,
|
|
88
|
+
getAllTemplates,
|
|
89
|
+
saveTemplate,
|
|
90
|
+
deleteTemplate,
|
|
91
|
+
getProcessHistory,
|
|
92
|
+
getRecentHistory,
|
|
93
|
+
addHistoryEntry,
|
|
94
|
+
getDependencyGraph,
|
|
95
|
+
addDependency,
|
|
96
|
+
removeDependency,
|
|
97
|
+
getStartOrder,
|
|
98
|
+
retryDatabaseOperation,
|
|
99
|
+
getDbInfo,
|
|
100
|
+
dbPath,
|
|
101
|
+
bgrHome,
|
|
102
|
+
} from './db'
|
|
103
|
+
import { isProcessRunning, terminateProcess, readFileTail, getProcessPorts, findChildPid, findPidByPort, getShellCommand, killProcessOnPort, waitForPortFree, ensureDir, getHomeDir, isWindows, getProcessBatchResources, getProcessMemory, reconcileProcessPids } from './platform'
|
|
55
104
|
import { handleRun } from './commands/run'
|
|
56
105
|
import { getVersion, calculateRuntime, parseEnvString, validateDirectory } from './utils'
|
|
57
106
|
|
|
58
107
|
export default {
|
|
59
|
-
getAllProcesses, getProcess, insertProcess, removeProcess, removeProcessByName, removeAllProcesses,
|
|
60
|
-
|
|
108
|
+
db, getAllProcesses, getProcess, insertProcess, removeProcess, removeProcessByName, removeAllProcesses,
|
|
109
|
+
updateProcessPid, updateProcessEnv, getAllTemplates, saveTemplate, deleteTemplate,
|
|
110
|
+
getProcessHistory, getRecentHistory, addHistoryEntry,
|
|
111
|
+
getDependencyGraph, addDependency, removeDependency, getStartOrder,
|
|
112
|
+
retryDatabaseOperation, getDbInfo, dbPath, bgrHome,
|
|
113
|
+
isProcessRunning, terminateProcess, readFileTail, getProcessPorts, findChildPid, findPidByPort, getShellCommand, killProcessOnPort, waitForPortFree, ensureDir, getHomeDir, isWindows, getProcessBatchResources, getProcessMemory, reconcileProcessPids,
|
|
61
114
|
handleRun,
|
|
62
115
|
getVersion, calculateRuntime, parseEnvString, validateDirectory,
|
|
63
116
|
}
|
package/src/build.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
console.log("Starting build process for bgrun...");
|
|
2
2
|
|
|
3
|
-
const entrypoints = [
|
|
3
|
+
const entrypoints = [
|
|
4
|
+
'./src/index.ts',
|
|
5
|
+
'./src/api.ts',
|
|
6
|
+
'./src/server.ts',
|
|
7
|
+
'./src/deploy.ts',
|
|
8
|
+
'./src/deps.ts',
|
|
9
|
+
'./src/log-rotation.ts',
|
|
10
|
+
];
|
|
4
11
|
const result = await Bun.build({
|
|
5
12
|
entrypoints,
|
|
6
13
|
outdir: './dist',
|