vona-cli-set-api 1.1.158 → 1.1.159
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/dist/index.js +17 -3
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -874,7 +874,8 @@ class CliBinDev extends BeanCliBase {
|
|
|
874
874
|
}
|
|
875
875
|
async _run(projectPath, _modulesMeta) {
|
|
876
876
|
let closed = false;
|
|
877
|
-
|
|
877
|
+
let crashError;
|
|
878
|
+
return new Promise((resolve, reject) => {
|
|
878
879
|
nodemon({
|
|
879
880
|
script: '.vona/bootstrap.ts',
|
|
880
881
|
cwd: projectPath,
|
|
@@ -886,9 +887,22 @@ class CliBinDev extends BeanCliBase {
|
|
|
886
887
|
watch: ['packages-utils', 'packages-vona', './src'],
|
|
887
888
|
ignore: ['**/node_modules/**', '**/dist/**', '**/test/**/*.test.ts', 'src/backend/play/**', 'src/backend/typing/**', '**/src/config/errors.ts', '**/src/config/locale/*.ts', '**/src/config/config.ts', '**/src/config/constants.ts', '**/src/types/**', '**/src/controller/*.ts(x)?', '**/src/model/*.ts', '**/src/service/*.ts', '**/src/bean/*.*.ts', '**/src/dto/*.ts(x)?', '**/src/entity/*.ts(x)?']
|
|
888
889
|
});
|
|
889
|
-
nodemon.on('
|
|
890
|
+
nodemon.on('crash', () => {
|
|
891
|
+
if (closed) return;
|
|
890
892
|
closed = true;
|
|
891
|
-
|
|
893
|
+
// nodemon emits crash without an error payload; the child already logged the cause.
|
|
894
|
+
crashError = new Error('Development server crashed; see the startup error above');
|
|
895
|
+
// Let nodemon finish processing the child exit before stopping its watchers.
|
|
896
|
+
setImmediate(() => nodemon.emit('quit'));
|
|
897
|
+
}).on('quit', () => {
|
|
898
|
+
closed = true;
|
|
899
|
+
if (crashError) {
|
|
900
|
+
// The programmatic quit event does not close watchers; reset before propagating
|
|
901
|
+
// the failure to the CLI's error handler, which exits the process immediately.
|
|
902
|
+
nodemon.reset(() => reject(crashError));
|
|
903
|
+
} else {
|
|
904
|
+
resolve(undefined);
|
|
905
|
+
}
|
|
892
906
|
}).on('restart', files => {
|
|
893
907
|
if (closed) {
|
|
894
908
|
// force exit
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vona-cli-set-api",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"gitHead": "
|
|
3
|
+
"version": "1.1.159",
|
|
4
|
+
"gitHead": "47e1e55106b7c76f6545c8ba474f23d9be830453",
|
|
5
5
|
"description": "vona cli-set-api",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"framework",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"ts-node-maintained": "^10.9.6",
|
|
78
78
|
"urllib": "^4.9.0",
|
|
79
79
|
"uuid": "^11.1.0",
|
|
80
|
-
"vona-core": "^5.1.
|
|
80
|
+
"vona-core": "^5.1.45",
|
|
81
81
|
"why-is-node-running": "^3.2.2",
|
|
82
82
|
"yargs-parser": "^22.0.0"
|
|
83
83
|
}
|