@karmaniverous/jeeves-watcher 0.6.8 → 0.6.9
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.
|
@@ -1993,11 +1993,16 @@ function mergeAndValidateConfig(currentConfig, submittedPartial) {
|
|
|
1993
1993
|
function wrapHandler(fn, logger, label) {
|
|
1994
1994
|
return async (request, reply) => {
|
|
1995
1995
|
try {
|
|
1996
|
-
|
|
1996
|
+
const result = await fn(request, reply);
|
|
1997
|
+
if (!reply.sent) {
|
|
1998
|
+
void reply.send(result);
|
|
1999
|
+
}
|
|
1997
2000
|
}
|
|
1998
2001
|
catch (error) {
|
|
1999
2002
|
logger.error({ err: normalizeError(error) }, `${label} failed`);
|
|
2000
|
-
|
|
2003
|
+
if (!reply.sent) {
|
|
2004
|
+
void reply.status(500).send({ error: 'Internal server error' });
|
|
2005
|
+
}
|
|
2001
2006
|
}
|
|
2002
2007
|
};
|
|
2003
2008
|
}
|
|
@@ -3098,7 +3103,7 @@ const CONFIG_WATCH_DEFAULTS = {
|
|
|
3098
3103
|
/** Default API values. */
|
|
3099
3104
|
const API_DEFAULTS = {
|
|
3100
3105
|
host: '127.0.0.1',
|
|
3101
|
-
port:
|
|
3106
|
+
port: 1936,
|
|
3102
3107
|
};
|
|
3103
3108
|
/** Default logging values. */
|
|
3104
3109
|
const LOGGING_DEFAULTS = {
|
|
@@ -5684,7 +5689,7 @@ async function runApiCommand(options) {
|
|
|
5684
5689
|
/** Default API host for CLI commands. */
|
|
5685
5690
|
const DEFAULT_HOST = '127.0.0.1';
|
|
5686
5691
|
/** Default API port for CLI commands. */
|
|
5687
|
-
const DEFAULT_PORT = '
|
|
5692
|
+
const DEFAULT_PORT = '1936';
|
|
5688
5693
|
|
|
5689
5694
|
/**
|
|
5690
5695
|
* @module cli/jeeves-watcher/withApiOptions
|
package/dist/index.js
CHANGED
|
@@ -1684,11 +1684,16 @@ function mergeAndValidateConfig(currentConfig, submittedPartial) {
|
|
|
1684
1684
|
function wrapHandler(fn, logger, label) {
|
|
1685
1685
|
return async (request, reply) => {
|
|
1686
1686
|
try {
|
|
1687
|
-
|
|
1687
|
+
const result = await fn(request, reply);
|
|
1688
|
+
if (!reply.sent) {
|
|
1689
|
+
void reply.send(result);
|
|
1690
|
+
}
|
|
1688
1691
|
}
|
|
1689
1692
|
catch (error) {
|
|
1690
1693
|
logger.error({ err: normalizeError(error) }, `${label} failed`);
|
|
1691
|
-
|
|
1694
|
+
if (!reply.sent) {
|
|
1695
|
+
void reply.status(500).send({ error: 'Internal server error' });
|
|
1696
|
+
}
|
|
1692
1697
|
}
|
|
1693
1698
|
};
|
|
1694
1699
|
}
|
|
@@ -3095,7 +3100,7 @@ const CONFIG_WATCH_DEFAULTS = {
|
|
|
3095
3100
|
/** Default API values. */
|
|
3096
3101
|
const API_DEFAULTS = {
|
|
3097
3102
|
host: '127.0.0.1',
|
|
3098
|
-
port:
|
|
3103
|
+
port: 1936,
|
|
3099
3104
|
};
|
|
3100
3105
|
/** Default logging values. */
|
|
3101
3106
|
const LOGGING_DEFAULTS = {
|
package/package.json
CHANGED