@ntlab/sipd-agr 3.2.0 → 3.3.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/app/index.js +13 -7
- package/main.js +2 -1
- package/package.json +1 -1
package/app/index.js
CHANGED
|
@@ -66,20 +66,26 @@ class App {
|
|
|
66
66
|
}
|
|
67
67
|
const works = sipd.getWorks();
|
|
68
68
|
if (works) {
|
|
69
|
-
sipd.works(works,
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
sipd.works(works, {
|
|
70
|
+
callback(next) {
|
|
71
|
+
setTimeout(() => next(), 500);
|
|
72
|
+
}
|
|
73
|
+
})
|
|
74
|
+
.then(() => {
|
|
72
75
|
sipd.app.showMessage('Information', 'The process has been completed! :)');
|
|
73
76
|
console.log('Done');
|
|
74
|
-
})
|
|
77
|
+
})
|
|
78
|
+
.catch(err => {
|
|
79
|
+
process.exitCode = 2;
|
|
75
80
|
if (err) {
|
|
76
|
-
console.
|
|
81
|
+
console.error(err);
|
|
77
82
|
} else {
|
|
78
|
-
console.
|
|
83
|
+
console.error('Unknown error, aborting!!!');
|
|
79
84
|
}
|
|
80
85
|
});
|
|
81
86
|
} else {
|
|
82
|
-
|
|
87
|
+
process.exitCode = 1;
|
|
88
|
+
console.error('Unknown mode %s!!!', this.config.mode);
|
|
83
89
|
}
|
|
84
90
|
}
|
|
85
91
|
|
package/main.js
CHANGED
|
@@ -29,7 +29,7 @@ const App = require('./app');
|
|
|
29
29
|
const Cmd = require('@ntlab/ntlib/cmd');
|
|
30
30
|
|
|
31
31
|
if (!Cmd.parse() || (Cmd.get('help') && usage())) {
|
|
32
|
-
process.exit();
|
|
32
|
+
process.exit(process.exitCode !== undefined ? null : 1);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
(function run() {
|
|
@@ -43,5 +43,6 @@ function usage() {
|
|
|
43
43
|
console.log('Options:');
|
|
44
44
|
console.log(Cmd.dump());
|
|
45
45
|
console.log('');
|
|
46
|
+
process.exitCode = 0;
|
|
46
47
|
return true;
|
|
47
48
|
}
|
package/package.json
CHANGED