mythix 2.8.0 → 2.8.2

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": "mythix",
3
- "version": "2.8.0",
3
+ "version": "2.8.2",
4
4
  "description": "Mythix is a NodeJS web-app framework",
5
5
  "main": "src/index",
6
6
  "scripts": {
@@ -253,7 +253,7 @@ function defineCommand(_commandName, definer, _parent) {
253
253
  applicationConfig = Nife.extend(true, { cli: true, httpServer: false, autoReload: false, logger: { level: Logger.LEVEL_WARN }, runTasks: false }, applicationConfig);
254
254
 
255
255
  if (!applicationConfig)
256
- applicationConfig = { cli: true, ttpServer: false, autoReload: false, logger: { level: Logger.LEVEL_WARN }, runTasks: false };
256
+ applicationConfig = { cli: true, httpServer: false, autoReload: false, logger: { level: Logger.LEVEL_WARN }, runTasks: false };
257
257
 
258
258
  let doStartApplication = (applicationConfig.autoStart !== false);
259
259
 
@@ -708,6 +708,15 @@ module.exports = defineCommand('deploy', ({ Parent }) => {
708
708
  if (typeof target.finalizeDeploy === 'function')
709
709
  return await target.finalizeDeploy.call(this, target, deployConfig);
710
710
 
711
+ // Finally, upon success, swap the "current" symlink to
712
+ // point to the new deploy
713
+ let deployLocation = this.joinUnixPath(decodeURIComponent(target.pathname), '' + deployConfig.version);
714
+ let currentLinkLocation = this.joinUnixPath(decodeURIComponent(target.pathname), 'current');
715
+ await this.executeRemoteCommands(target, deployConfig, [
716
+ { command: 'rm', args: [ '-f', `"${currentLinkLocation}"` ] },
717
+ { command: 'ln', args: [ '-s', `"${deployLocation}"`, `"${currentLinkLocation}"` ] },
718
+ ]);
719
+
711
720
  if (target.index === 0) {
712
721
  let targetLocation = `"${decodeURIComponent(target.pathname)}/current"`;
713
722
 
@@ -720,15 +729,6 @@ module.exports = defineCommand('deploy', ({ Parent }) => {
720
729
  ]);
721
730
  }
722
731
 
723
- // Finally, upon success, swap the "current" symlink to
724
- // point to the new deploy
725
- let deployLocation = this.joinUnixPath(decodeURIComponent(target.pathname), '' + deployConfig.version);
726
- let currentLinkLocation = this.joinUnixPath(decodeURIComponent(target.pathname), 'current');
727
- await this.executeRemoteCommands(target, deployConfig, [
728
- { command: 'rm', args: [ '-f', `"${currentLinkLocation}"` ] },
729
- { command: 'ln', args: [ '-s', `"${deployLocation}"`, `"${currentLinkLocation}"` ] },
730
- ]);
731
-
732
732
  // Cleanup old deploy versions
733
733
  await this.cleanupOldDeployVersions(target, deployConfig);
734
734