tiro-notes 0.27.46 → 0.27.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/cli.js CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  // const isDev = false
4
4
  const isDev = process.env.ISDEV
5
-
6
5
  const tHelpers = isDev ? require('../shared.helpers.js') : require(`./shared.helpers.build.js`);
7
6
 
8
7
 
@@ -75,23 +74,23 @@ function getCliArgs () {
75
74
 
76
75
  function startTiroServer (argsObj, cb) {
77
76
  console.log(`Starting Tiro-Notes from CLI with following arguments : ${JSON.stringify(argsObj)}`);
77
+
78
78
  // kill all possible remaining servers of tiro
79
+ tHelpers.killPreviousInstances(() => {
80
+
81
+ // start tiro server, detect success message and get server params
82
+ tHelpers.execCmd('node', [`${__dirname}/server/tiro-server.js`], {
83
+ env: {
84
+ TIRO_PORT: argsObj.port,
85
+ TIRO_HTTPS: argsObj.https
86
+ },
87
+ logName: 'tiroServer',
88
+ onLog: str => {
89
+ tHelpers.checkAndGetTiroConfig(str, {platform: 'cli', cb})
90
+ }
91
+ })
79
92
 
80
- tHelpers.execCmd('sh', ['-c', 'kill $(ps aux | grep tiro-notes | awk \'{print $2}\' )'], {
81
- logName: 'Kill prev tiroServer',
82
- })
83
-
84
- // start tiro server, detect success message and get server params
85
- tHelpers.execCmd('node', [`${__dirname}/server/server.js`], {
86
- env: {
87
- TIRO_PORT: argsObj.port,
88
- TIRO_HTTPS: argsObj.https
89
- },
90
- logName: 'tiroServer',
91
- onLog: str => {
92
- tHelpers.checkAndGetTiroConfig(str, {platform: 'cli', cb})
93
- }
94
- })
93
+ });
95
94
  }
96
95
 
97
96
  const startSshTunnel = (argsObj) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tiro-notes",
3
- "version": "0.27.46",
3
+ "version": "0.27.49",
4
4
  "description": "Tiro Notes CLI to start Tiro Notes from the command line!",
5
5
  "scripts": {
6
6
  "dev": "ISDEV=true node cli.js",