@colyseus/tools 0.16.5 → 0.16.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 +3 -3
- package/pm2/post-deploy-agent.js +6 -6
- package/pm2/shared.js +4 -4
- package/post-deploy.js +4 -4
- package/report-stats.js +3 -3
- package/system-boot.js +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@colyseus/tools",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.6",
|
|
4
4
|
"description": "Simplify the development and production settings for your Colyseus project.",
|
|
5
5
|
"input": "./src/index.ts",
|
|
6
6
|
"main": "./build/index.js",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"@types/dotenv": "^8.2.0",
|
|
53
53
|
"uwebsockets-express": "^1.1.10",
|
|
54
54
|
"@colyseus/core": "^0.16.17",
|
|
55
|
-
"@colyseus/
|
|
56
|
-
"@colyseus/
|
|
55
|
+
"@colyseus/uwebsockets-transport": "^0.16.8",
|
|
56
|
+
"@colyseus/ws-transport": "^0.16.5"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"@colyseus/core": "0.16.x",
|
package/pm2/post-deploy-agent.js
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
* - Old processes are asynchronously and gracefully stopped.
|
|
8
8
|
* - The rest of the processes are spawned/reactivated.
|
|
9
9
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
import pm2 from 'pm2';
|
|
11
|
+
import fs from 'fs';
|
|
12
|
+
import cst from 'pm2/constants';
|
|
13
|
+
import io from '@pm2/io';
|
|
14
|
+
import path from 'path';
|
|
15
|
+
import shared from './shared';
|
|
16
16
|
|
|
17
17
|
const opts = { env: process.env.NODE_ENV || "production", };
|
|
18
18
|
let config = undefined;
|
package/pm2/shared.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import pm2 from 'pm2';
|
|
2
|
+
import os from 'os';
|
|
3
3
|
|
|
4
4
|
const NAMESPACE = 'cloud';
|
|
5
5
|
const MAX_ACTIVE_PROCESSES = os.cpus().length;
|
|
@@ -55,7 +55,7 @@ async function getAppConfig(ecosystemFilePath) {
|
|
|
55
55
|
return config;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
export default {
|
|
59
59
|
/**
|
|
60
60
|
* Constants
|
|
61
61
|
*/
|
|
@@ -70,4 +70,4 @@ module.exports = {
|
|
|
70
70
|
*/
|
|
71
71
|
listApps,
|
|
72
72
|
getAppConfig,
|
|
73
|
-
}
|
|
73
|
+
};
|
package/post-deploy.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import pm2 from 'pm2';
|
|
3
|
+
import fs from 'fs';
|
|
4
|
+
import path from 'path';
|
|
5
|
+
import shared from './pm2/shared';
|
|
6
6
|
|
|
7
7
|
const opts = { env: process.env.NODE_ENV || "production", };
|
|
8
8
|
|
package/report-stats.js
CHANGED
package/system-boot.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import os from 'os';
|
|
4
|
+
import fs from 'fs';
|
|
5
|
+
import { execSync } from 'child_process';
|
|
6
6
|
|
|
7
7
|
const NGINX_LIMITS_CONFIG_FILE = '/etc/nginx/colyseus_limits.conf';
|
|
8
8
|
const LIMITS_CONF_FILE = '/etc/security/limits.d/colyseus.conf';
|