@colyseus/tools 0.16.17 → 0.17.0
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/build/index.js +79 -53
- package/build/index.js.map +3 -3
- package/build/index.mjs +76 -44
- package/build/index.mjs.map +2 -2
- package/build/loadenv.js +5 -4
- package/build/loadenv.js.map +2 -2
- package/build/loadenv.mjs +1 -1
- package/build/loadenv.mjs.map +2 -2
- package/build/src/index.d.ts +31 -0
- package/package.json +16 -13
- package/pm2/post-deploy-agent.js +18 -47
- package/pm2/shared.js +7 -94
- package/post-deploy.js +4 -8
- package/report-stats.js +0 -56
- package/system-boot.js +0 -83
- package/build/index.d.ts +0 -20
- package/pm2/ActionMethods.js +0 -47
- /package/build/{loadenv.d.ts → src/loadenv.d.ts} +0 -0
package/pm2/ActionMethods.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Monkey-patch for PM2's ActionMethods.js
|
|
3
|
-
* Adds custom methods like updateProcessConfig without modifying the original file.
|
|
4
|
-
*/
|
|
5
|
-
'use strict';
|
|
6
|
-
|
|
7
|
-
const Utility = require('../Utility');
|
|
8
|
-
|
|
9
|
-
// Import the original ActionMethods module
|
|
10
|
-
const originalActionMethods = require('./ActionMethods_orig.js');
|
|
11
|
-
|
|
12
|
-
module.exports = function(God) {
|
|
13
|
-
// Apply original ActionMethods
|
|
14
|
-
originalActionMethods(God);
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Update process configuration without restart.
|
|
18
|
-
* Merges opts.env.current_conf into proc.pm2_env.
|
|
19
|
-
* @method updateProcessConfig
|
|
20
|
-
* @param {Object} opts - { id: pm_id, env: { current_conf: { ... } } }
|
|
21
|
-
* @param {Function} cb
|
|
22
|
-
*/
|
|
23
|
-
God.updateProcessConfig = function updateProcessConfig(opts, cb) {
|
|
24
|
-
var id = opts.id;
|
|
25
|
-
|
|
26
|
-
if (typeof(id) === 'undefined')
|
|
27
|
-
return cb(God.logAndGenerateError('opts.id not passed to updateProcessConfig', opts));
|
|
28
|
-
if (!(id in God.clusters_db))
|
|
29
|
-
return cb(God.logAndGenerateError('Process id unknown'), {});
|
|
30
|
-
|
|
31
|
-
const proc = God.clusters_db[id];
|
|
32
|
-
|
|
33
|
-
if (!proc || !proc.pm2_env)
|
|
34
|
-
return cb(God.logAndGenerateError('Process not found or missing pm2_env'), {});
|
|
35
|
-
|
|
36
|
-
// Merge env into pm2_env.env
|
|
37
|
-
if (opts.env) {
|
|
38
|
-
Utility.extend(proc.pm2_env, opts.env);
|
|
39
|
-
Utility.extend(proc.pm2_env.env, opts.env); // why both?
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// Merge current_conf directly into pm2_env
|
|
43
|
-
Utility.extendExtraConfig(proc, opts);
|
|
44
|
-
|
|
45
|
-
return cb(null, Utility.clone(proc.pm2_env));
|
|
46
|
-
};
|
|
47
|
-
};
|
|
File without changes
|