@appland/appmap 3.40.1 → 3.41.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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [@appland/appmap-v3.41.0](https://github.com/getappmap/appmap-js/compare/@appland/appmap-v3.40.1...@appland/appmap-v3.41.0) (2022-09-27)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* detect architecture mismatch errors in Ruby ([ff775f7](https://github.com/getappmap/appmap-js/commit/ff775f73eb76326ebac57fc9a6de05327cf158d6))
|
|
7
|
+
|
|
1
8
|
# [@appland/appmap-v3.40.1](https://github.com/getappmap/appmap-js/compare/@appland/appmap-v3.40.0...@appland/appmap-v3.40.1) (2022-09-27)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -10,6 +10,8 @@ const errors_1 = require("../errors");
|
|
|
10
10
|
const commandRunner_1 = require("./commandRunner");
|
|
11
11
|
const userInteraction_1 = __importDefault(require("../userInteraction"));
|
|
12
12
|
const agentProcedure_1 = __importDefault(require("./agentProcedure"));
|
|
13
|
+
const telemetry_1 = __importDefault(require("../../telemetry"));
|
|
14
|
+
const commandStruct_1 = __importDefault(require("./commandStruct"));
|
|
13
15
|
class AgentInstallerProcedure extends agentProcedure_1.default {
|
|
14
16
|
async run() {
|
|
15
17
|
const { confirm } = await userInteraction_1.default.prompt({
|
|
@@ -50,27 +52,57 @@ class AgentInstallerProcedure extends agentProcedure_1.default {
|
|
|
50
52
|
useExistingAppMapYml = true;
|
|
51
53
|
}
|
|
52
54
|
}
|
|
53
|
-
userInteraction_1.default.status = 'Installing
|
|
55
|
+
userInteraction_1.default.status = 'Installing AppMap...';
|
|
54
56
|
await this.installer.checkCurrentConfig();
|
|
55
57
|
await this.installer.installAgent();
|
|
56
58
|
await this.verifyProject();
|
|
57
59
|
const appMapYml = this.configPath;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
try {
|
|
61
|
+
if (!useExistingAppMapYml) {
|
|
62
|
+
const initCommand = await this.installer.initCommand();
|
|
63
|
+
const { stdout } = await (0, commandRunner_1.run)(initCommand);
|
|
64
|
+
const json = JSON.parse(stdout);
|
|
65
|
+
fs_1.default.writeFileSync(appMapYml, json.configuration.contents);
|
|
66
|
+
}
|
|
67
|
+
await this.validateProject(useExistingAppMapYml);
|
|
68
|
+
const successMessage = [
|
|
69
|
+
chalk_1.default.green('Success! AppMap has finished installing.'),
|
|
70
|
+
'',
|
|
71
|
+
chalk_1.default.blue('NEXT STEP: Record AppMaps'),
|
|
72
|
+
'',
|
|
73
|
+
'You can consult the AppMap documentation, or continue with the ',
|
|
74
|
+
'instructions provided in the AppMap code editor extension.',
|
|
75
|
+
];
|
|
76
|
+
userInteraction_1.default.success(successMessage.join('\n'));
|
|
77
|
+
}
|
|
78
|
+
catch (e) {
|
|
79
|
+
const error = e;
|
|
80
|
+
if (this.installer.name === 'Bundler' &&
|
|
81
|
+
(error === null || error === void 0 ? void 0 : error.message.includes('but is an incompatible architecture'))) {
|
|
82
|
+
await (0, commandRunner_1.run)(new commandStruct_1.default('gem', ['uninstall', 'appmap', '-x', '--force'], this.path));
|
|
83
|
+
const incompatibleArchitectureMessage = [
|
|
84
|
+
'\n',
|
|
85
|
+
chalk_1.default.bold.red('AppMap Installation Error!'),
|
|
86
|
+
'',
|
|
87
|
+
'Please run the following command in your terminal, then re-run the installer:',
|
|
88
|
+
'',
|
|
89
|
+
chalk_1.default.blue('bundle'),
|
|
90
|
+
'\n',
|
|
91
|
+
];
|
|
92
|
+
telemetry_1.default.sendEvent({
|
|
93
|
+
name: 'install-agent:architecture-mismatch-error',
|
|
94
|
+
properties: {
|
|
95
|
+
error: error === null || error === void 0 ? void 0 : error.message,
|
|
96
|
+
directory: this.path,
|
|
97
|
+
installer: this.installer.name,
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
userInteraction_1.default.error(incompatibleArchitectureMessage.join('\n'));
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
throw e;
|
|
104
|
+
}
|
|
63
105
|
}
|
|
64
|
-
await this.validateProject(useExistingAppMapYml);
|
|
65
|
-
const successMessage = [
|
|
66
|
-
chalk_1.default.green('Success! The AppMap agent has been installed.'),
|
|
67
|
-
'',
|
|
68
|
-
chalk_1.default.blue('NEXT STEP: Record AppMaps'),
|
|
69
|
-
'',
|
|
70
|
-
'You can consult the AppMap documentation, or continue with the ',
|
|
71
|
-
'instructions provided in the AppMap code editor extension.',
|
|
72
|
-
];
|
|
73
|
-
userInteraction_1.default.success(successMessage.join('\n'));
|
|
74
106
|
}
|
|
75
107
|
}
|
|
76
108
|
exports.default = AgentInstallerProcedure;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentInstallerProcedure.js","sourceRoot":"","sources":["../../../src/cmds/agentInstaller/agentInstallerProcedure.ts"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,4CAAoB;AACpB,kDAA0B;AAE1B,sCAAuC;AACvC,mDAAsC;AACtC,yEAAoC;AACpC,sEAA8C;
|
|
1
|
+
{"version":3,"file":"agentInstallerProcedure.js","sourceRoot":"","sources":["../../../src/cmds/agentInstaller/agentInstallerProcedure.ts"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,4CAAoB;AACpB,kDAA0B;AAE1B,sCAAuC;AACvC,mDAAsC;AACtC,yEAAoC;AACpC,sEAA8C;AAC9C,gEAAwC;AACxC,oEAA4C;AAE5C,MAAqB,uBAAwB,SAAQ,wBAAc;IACjE,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,yBAAE,CAAC,MAAM,CAAC;YAClC,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,SAAS;YACf,OAAO,EAAE;gBACP,6DAA6D;gBAC7D,MAAM,IAAI,CAAC,wBAAwB,EAAE;gB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