@drocketxx/pm2me 1.1.7 → 1.1.9

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.
@@ -1,9 +1,11 @@
1
1
  import { JSONFilePreset } from 'lowdb/node';
2
2
  import path from 'path';
3
3
  import { fileURLToPath } from 'url';
4
+ import os from 'os';
4
5
 
5
6
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
6
- const dbPath = process.env.PM2ME_DB_PATH || path.join(__dirname, 'database.json');
7
+ const homeDir = path.join(os.homedir(), '.pm2me');
8
+ const dbPath = process.env.PM2ME_DB_PATH || path.join(homeDir, 'database.json');
7
9
 
8
10
  const defaultData = {
9
11
  apps: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drocketxx/pm2me",
3
- "version": "1.1.7",
3
+ "version": "1.1.9",
4
4
  "description": "PM2 Deployment and Management System — Web UI for PM2 process management",
5
5
  "type": "module",
6
6
  "main": "backend/app.js",
@@ -1,137 +0,0 @@
1
- {
2
- "apps": [
3
- {
4
- "id": "1772390496632",
5
- "name": "PM2Me-test-main",
6
- "branch": "main",
7
- "buildScript": "npm i\nnpm run build",
8
- "npmScript": "start",
9
- "customScript": "dist/server.js",
10
- "autoSync": true,
11
- "zeroDowntime": true,
12
- "repoUrl": "https://github.com/drocketxx/PM2Me-test.git",
13
- "token": "GHP_TOKEN_HERE",
14
- "env": {
15
- "PORT": "6666"
16
- },
17
- "pm2Script": "dist/server.js",
18
- "pm2Args": null,
19
- "ecosystemFile": null,
20
- "status": "running",
21
- "pipelineState": "online",
22
- "commitHash": "8e509cd3cce8017a492fceb2e2e23317be479496",
23
- "commitMessage": "1.0.17",
24
- "lastSuccessfulCommitHash": "8e509cd3cce8017a492fceb2e2e23317be479496",
25
- "lastSuccessfulCommitMessage": "1.0.17",
26
- "lastSuccessfulPm2Script": "dist/server.js",
27
- "lastSuccessfulEnv": {
28
- "PORT": "6666"
29
- },
30
- "rollbackOccurred": false,
31
- "failedCommitHash": null,
32
- "failedCommitMessage": null
33
- },
34
- {
35
- "id": "1772390845434",
36
- "name": "PM2Me-test-uat",
37
- "branch": "uat",
38
- "buildScript": "npm i\nnpm run build",
39
- "npmScript": "start",
40
- "customScript": "dist/server.js",
41
- "autoSync": true,
42
- "zeroDowntime": true,
43
- "repoUrl": "https://github.com/drocketxx/PM2Me-test.git",
44
- "token": "GHP_TOKEN_HERE",
45
- "env": {},
46
- "pm2Script": "dist/server.js",
47
- "pm2Args": null,
48
- "ecosystemFile": null,
49
- "status": "running",
50
- "pipelineState": "online",
51
- "commitHash": "03ecc2f177ac4e65f85ff2eec91ffcb660ce9122",
52
- "commitMessage": "1.0.18",
53
- "lastSuccessfulCommitHash": "03ecc2f177ac4e65f85ff2eec91ffcb660ce9122",
54
- "lastSuccessfulCommitMessage": "1.0.18",
55
- "lastSuccessfulPm2Script": "dist/server.js",
56
- "lastSuccessfulEnv": {},
57
- "rollbackOccurred": false,
58
- "failedCommitHash": null,
59
- "failedCommitMessage": null
60
- }
61
- ],
62
- "settings": {
63
- "webhookSecret": "",
64
- "discordWebhook": "",
65
- "telegramBotToken": "",
66
- "telegramChatId": "",
67
- "appsPath": "C:\\pm2me\\apps"
68
- },
69
- "githubAccounts": [
70
- {
71
- "id": "63402180",
72
- "username": "drocketxx",
73
- "avatarUrl": "https://avatars.githubusercontent.com/u/63402180?v=4",
74
- "token": "GHP_TOKEN_HERE"
75
- }
76
- ],
77
- "admin": {
78
- "passwordHash": "$2b$10$4I1c1f.hWjmsi/d0SWbC/epnB6oEcfEMtm.ez9GoTo3h7.auXQAj6"
79
- },
80
- "webhookLogs": [
81
- {
82
- "id": "459349e8-75c6-4cfc-bb05-c15442f86c20",
83
- "timestamp": "2026-03-01T19:37:37.553Z",
84
- "eventType": "push",
85
- "deliveryId": "1955aa92-15a6-11f1-8e42-562c8de9bdc5",
86
- "repository": "drocketxx/PM2Me-test",
87
- "status": "success",
88
- "details": "Triggered deployment for 1 apps: PM2Me-test-uat"
89
- },
90
- {
91
- "id": "364afb63-982a-4693-98f5-4bc44eb917ea",
92
- "timestamp": "2026-03-01T19:37:00.986Z",
93
- "eventType": "push",
94
- "deliveryId": "0387c3d0-15a6-11f1-9f43-387b304df192",
95
- "repository": "drocketxx/PM2Me-test",
96
- "status": "ignored",
97
- "details": "No matching apps for repo: https://github.com/drocketxx/pm2me-test, branch: uat"
98
- },
99
- {
100
- "id": "e96362a9-7280-43be-95ba-bfbb44e0d496",
101
- "timestamp": "2026-03-01T19:36:37.040Z",
102
- "eventType": "push",
103
- "deliveryId": "f528a16a-15a5-11f1-9e94-5067faf57385",
104
- "repository": "drocketxx/PM2Me-test",
105
- "status": "success",
106
- "details": "Triggered deployment for 1 apps: PM2Me-test-main"
107
- },
108
- {
109
- "id": "9ee2f546-7e12-4a94-869c-5eaa9cf9805a",
110
- "timestamp": "2026-03-01T19:14:45.159Z",
111
- "eventType": "push",
112
- "deliveryId": "e75d3a6c-15a2-11f1-91be-e0507efe6648",
113
- "repository": "drocketxx/PM2Me-test",
114
- "status": "ignored",
115
- "details": "No matching apps for repo: https://github.com/drocketxx/pm2me-test, branch: main"
116
- },
117
- {
118
- "id": "3d5cfe6f-20d4-4fd9-846b-2bf6f49b3412",
119
- "timestamp": "2026-03-01T19:12:02.545Z",
120
- "eventType": "ping",
121
- "deliveryId": "test-delivery-id-1772392322532",
122
- "repository": "unknown",
123
- "status": "success",
124
- "details": "Webhook ping received and verified"
125
- },
126
- {
127
- "id": "76a79aea-f76c-4101-bc64-ea3b7f719c08",
128
- "timestamp": "2026-03-01T19:09:46.461Z",
129
- "eventType": "push",
130
- "deliveryId": "3546a6ba-15a2-11f1-82f1-454c16bf29fe",
131
- "repository": "drocketxx/PM2Me-test",
132
- "status": "ignored",
133
- "details": "No matching apps for repo: https://github.com/drocketxx/pm2me-test, branch: main"
134
- }
135
- ],
136
- "setupComplete": true
137
- }