@colyseus/tools 0.15.48 → 0.15.49

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.15.48",
3
+ "version": "0.15.49",
4
4
  "description": "Colyseus Tools for Production",
5
5
  "input": "./src/index.ts",
6
6
  "main": "./build/index.js",
@@ -79,21 +79,19 @@ function postDeploy(cwd, reply) {
79
79
  });
80
80
  }
81
81
 
82
- console.log("apps[0].pm2_env.pm_cwd =>", apps[0].pm2_env.pm_cwd);
83
- console.log("cwd =>", cwd);
84
-
85
82
  //
86
83
  // detect if cwd has changed, and restart PM2 if it has
87
84
  //
88
85
  if (apps[0].pm2_env.pm_cwd !== cwd) {
89
- console.log("cwd has changed. restarting PM2...");
86
+ console.log("App Root Directory changed. Restarting may take a bit longer...");
90
87
 
91
88
  //
92
89
  // remove all and start again with new cwd
93
90
  //
94
- return pm2.delete(shared.NAMESPACE, function(err) {
91
+ return pm2.delete('all', function (err) {
92
+ logIfError(err);
93
+
95
94
  // start again
96
- // (TODO: make sure CWD is actually changed after this...)
97
95
  pm2.start(config, { ...opts }, (err, result) => {
98
96
  reply({ success: !err, message: err?.message });
99
97
  updateAndSave(err, result);