@drocketxx/pm2me 1.1.10 → 1.1.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.
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/png" href="/icon.png" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>PM2Me</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-I-oE5bOj.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-Bo3lbcQo.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/backend/routes/api.js
CHANGED
|
@@ -955,6 +955,31 @@ router.get('/setup/status', async (req, res) => {
|
|
|
955
955
|
}
|
|
956
956
|
});
|
|
957
957
|
|
|
958
|
+
// GET /api/setup/info — returns server OS and default paths (no auth required)
|
|
959
|
+
router.get('/setup/info', (req, res) => {
|
|
960
|
+
const serverIsWindows = os.platform() === 'win32';
|
|
961
|
+
const defaultPath = serverIsWindows ? 'C:\\pm2me\\apps' : '/opt/pm2me/apps';
|
|
962
|
+
const pathPresets = serverIsWindows
|
|
963
|
+
? ['C:\\pm2me\\apps', 'C:\\Users\\apps', 'D:\\pm2me\\apps']
|
|
964
|
+
: ['/opt/pm2me/apps', '/home/apps', '/var/pm2me/apps'];
|
|
965
|
+
|
|
966
|
+
// Read version from package.json
|
|
967
|
+
let version = 'unknown';
|
|
968
|
+
try {
|
|
969
|
+
const pkgPath = path.resolve(__dirname, '../../package.json');
|
|
970
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
971
|
+
version = pkg.version || 'unknown';
|
|
972
|
+
} catch { }
|
|
973
|
+
|
|
974
|
+
res.json({
|
|
975
|
+
os: serverIsWindows ? 'windows' : 'linux',
|
|
976
|
+
isWindows: serverIsWindows,
|
|
977
|
+
defaultPath,
|
|
978
|
+
pathPresets,
|
|
979
|
+
version
|
|
980
|
+
});
|
|
981
|
+
});
|
|
982
|
+
|
|
958
983
|
// POST /api/setup/complete — no auth required
|
|
959
984
|
router.post('/setup/complete', async (req, res) => {
|
|
960
985
|
try {
|