@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colyseus/tools",
3
- "version": "0.16.5",
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/ws-transport": "^0.16.5",
56
- "@colyseus/uwebsockets-transport": "^0.16.8"
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",
@@ -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
- const pm2 = require('pm2');
11
- const fs = require('fs');
12
- const cst = require('pm2/constants');
13
- const io = require('@pm2/io');
14
- const path = require('path');
15
- const shared = require('./shared');
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
- const pm2 = require('pm2');
2
- const os = require('os');
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
- module.exports = {
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
- const pm2 = require('pm2');
3
- const fs = require('fs');
4
- const path = require('path');
5
- const shared = require('./pm2/shared');
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
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const fs = require('fs');
4
- const net = require('net');
5
- const pm2 = require('pm2');
3
+ import fs from 'fs';
4
+ import net from 'net';
5
+ import pm2 from 'pm2';
6
6
 
7
7
  const COLYSEUS_CLOUD_URL = `${process.env.ENDPOINT}/vultr/stats`;
8
8
 
package/system-boot.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const os = require('os');
4
- const fs = require('fs');
5
- const { execSync } = require('child_process');
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';