@appland/appmap 3.44.1 → 3.44.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/CHANGELOG.md +7 -0
- package/built/cmds/runCommand.js +4 -14
- package/built/cmds/runCommand.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [@appland/appmap-v3.44.2](https://github.com/getappmap/appmap-js/compare/@appland/appmap-v3.44.1...@appland/appmap-v3.44.2) (2022-10-10)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* fix broken CLI tests ([92c6372](https://github.com/getappmap/appmap-js/commit/92c637206dc8edaa61c4542a217d66a932364455))
|
|
7
|
+
|
|
1
8
|
# [@appland/appmap-v3.44.1](https://github.com/getappmap/appmap-js/compare/@appland/appmap-v3.44.0...@appland/appmap-v3.44.1) (2022-10-10)
|
|
2
9
|
|
|
3
10
|
|
package/built/cmds/runCommand.js
CHANGED
|
@@ -7,25 +7,15 @@ const errors_1 = require("./errors");
|
|
|
7
7
|
const utils_1 = require("../utils");
|
|
8
8
|
const userInteraction_1 = __importDefault(require("./userInteraction"));
|
|
9
9
|
const chalk_1 = __importDefault(require("chalk"));
|
|
10
|
-
const yargs_1 = __importDefault(require("yargs"));
|
|
11
10
|
const exitCode_1 = require("./record/types/exitCode");
|
|
12
11
|
const telemetry_1 = __importDefault(require("../telemetry"));
|
|
13
|
-
async function invokeCommand() { }
|
|
14
|
-
function flushTelemetry(exitCode, err) {
|
|
15
|
-
telemetry_1.default.flush(() => {
|
|
16
|
-
// @types/yargs defines:
|
|
17
|
-
// exit(code: number, err: Error): void;
|
|
18
|
-
// but in the implementation, err appears to be optional.
|
|
19
|
-
yargs_1.default.exit(exitCode, err);
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
12
|
async function runCommand(commandPrefix, fn) {
|
|
23
13
|
try {
|
|
24
14
|
const ret = await fn();
|
|
25
15
|
telemetry_1.default.sendEvent({
|
|
26
16
|
name: `${commandPrefix}:exit-ok`,
|
|
27
17
|
});
|
|
28
|
-
|
|
18
|
+
process.exitCode = 0;
|
|
29
19
|
return ret;
|
|
30
20
|
}
|
|
31
21
|
catch (err) {
|
|
@@ -37,7 +27,7 @@ async function runCommand(commandPrefix, fn) {
|
|
|
37
27
|
error: err.message,
|
|
38
28
|
},
|
|
39
29
|
});
|
|
40
|
-
|
|
30
|
+
process.exitCode = exitCode_1.ExitCode.Error;
|
|
41
31
|
}
|
|
42
32
|
else if (err instanceof errors_1.AbortError) {
|
|
43
33
|
telemetry_1.default.sendEvent({
|
|
@@ -46,7 +36,7 @@ async function runCommand(commandPrefix, fn) {
|
|
|
46
36
|
error: err.message,
|
|
47
37
|
},
|
|
48
38
|
});
|
|
49
|
-
|
|
39
|
+
process.exitCode = exitCode_1.ExitCode.Quit;
|
|
50
40
|
}
|
|
51
41
|
else if (err instanceof Error) {
|
|
52
42
|
telemetry_1.default.sendEvent({
|
|
@@ -63,7 +53,7 @@ async function runCommand(commandPrefix, fn) {
|
|
|
63
53
|
userInteraction_1.default.error(`An error occurred: ${err.toString().split('\n')[0]}`);
|
|
64
54
|
userInteraction_1.default.error(`Try re-running the command with the ${chalk_1.default.red('verbose')} flag (${chalk_1.default.red('-v')}).`);
|
|
65
55
|
}
|
|
66
|
-
|
|
56
|
+
process.exitCode = exitCode_1.ExitCode.Error;
|
|
67
57
|
}
|
|
68
58
|
else {
|
|
69
59
|
// You'll wind up here if the object thrown wasn't an instance of Error. An obvious way this
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runCommand.js","sourceRoot":"","sources":["../../src/cmds/runCommand.ts"],"names":[],"mappings":";;;;;AAAA,qCAAuD;AACvD,oCAAmC;AACnC,wEAAmC;AACnC,kDAA0B;AAC1B,
|
|
1
|
+
{"version":3,"file":"runCommand.js","sourceRoot":"","sources":["../../src/cmds/runCommand.ts"],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