pidnap 0.0.0-dev.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/README.md ADDED
@@ -0,0 +1,45 @@
1
+ # pidnap
2
+
3
+ Process manager with init-system capabilities for tasks, cron jobs, and long-running processes.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pnpm install
9
+ ```
10
+
11
+ ## Run
12
+
13
+ ```bash
14
+ pidnap init -c pidnap.config.ts
15
+ ```
16
+
17
+ ## CLI
18
+
19
+ ```bash
20
+ pidnap status
21
+ pidnap processes list
22
+ pidnap processes add -n api --definition '{"command":"node","args":["server.js"]}'
23
+ pidnap processes restart api
24
+ pidnap crons list
25
+ pidnap tasks list
26
+ pidnap tasks remove task-1
27
+ ```
28
+
29
+ ## Architecture
30
+
31
+ - CLI: `src/cli.ts` loads config, starts RPC server, boots manager
32
+ - Core: `src/manager.ts` orchestrates tasks, crons, and restarting processes
33
+ - Runtime: `src/lazy-process.ts` executes processes; `src/restarting-process.ts` handles restarts
34
+ - Scheduling: `src/cron-process.ts` manages cron jobs with retry/queue
35
+ - Env: `src/env-manager.ts` loads `.env` + watches for reloads
36
+ - API: `src/api/contract.ts` defines ORPC contract, `src/api/server.ts` implements it
37
+
38
+ ## Development
39
+
40
+ ```bash
41
+ pnpm run typecheck
42
+ pnpm run lint
43
+ pnpm run format
44
+ pnpm test
45
+ ```
package/dist/cli.d.mts ADDED
@@ -0,0 +1 @@
1
+ export { };