create-alemonjs 0.0.4 → 0.0.6
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
CHANGED
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"@types/node": "^22",
|
|
23
23
|
"@alemonjs/db": "^0.0.13",
|
|
24
24
|
"@alemonjs/bubble": "^2.1.4",
|
|
25
|
-
"@alemonjs/discord": "^2.1.
|
|
25
|
+
"@alemonjs/discord": "^2.1.7",
|
|
26
26
|
"@alemonjs/onebot": "^2.1.4",
|
|
27
27
|
"@alemonjs/qq-bot": "^2.1.4",
|
|
28
|
-
"alemonjs": "2.1.
|
|
28
|
+
"alemonjs": "2.1.42",
|
|
29
29
|
"jsxp": "1.2.4",
|
|
30
30
|
"tailwindcss": "3",
|
|
31
31
|
"cssnano": "^7",
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
const fs = require('fs');
|
|
2
2
|
const yaml = require('yaml');
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
let pm2 = null;
|
|
5
|
+
try {
|
|
6
|
+
// Read and parse the YAML configuration file
|
|
7
|
+
const data = fs.readFileSync('./alemon.config.yaml', 'utf8');
|
|
8
|
+
const config = yaml.parse(data);
|
|
9
|
+
pm2 = config?.pm2 ?? {};
|
|
10
|
+
}
|
|
11
|
+
catch (error) {
|
|
12
|
+
console.error('Error parsing YAML configuration:', error);
|
|
13
|
+
}
|
|
10
14
|
|
|
11
15
|
/**
|
|
12
16
|
* @type {{ apps: import("pm2").StartOptions[] }}
|
|
13
17
|
*/
|
|
14
|
-
module.exports = pm2
|
|
18
|
+
module.exports = pm2 || {
|
|
19
|
+
apps: []
|
|
20
|
+
}
|