@appland/appmap 3.133.0 → 3.134.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 +13 -0
- package/built/cmds/index/index.js +3 -3
- package/built/cmds/index/index.js.map +1 -1
- package/built/cmds/index/rpc.js +18 -7
- package/built/cmds/index/rpc.js.map +1 -1
- package/built/cmds/navie/help.js +122 -0
- package/built/cmds/navie/help.js.map +1 -0
- package/built/docs/CLA Instructions.pdf +0 -0
- package/built/docs/Code of Conduct for Contributors.pdf +0 -0
- package/built/docs/analysis/rules-reference.html +27 -0
- package/built/docs/appmap-overview.md +54 -0
- package/built/docs/community.md +27 -0
- package/built/docs/diagrams/dependency-map.md +63 -0
- package/built/docs/diagrams/flamegraph.md +91 -0
- package/built/docs/diagrams/how-it-works.md +60 -0
- package/built/docs/diagrams/index.md +20 -0
- package/built/docs/diagrams/sequence-diagram.md +75 -0
- package/built/docs/diagrams/trace-view.md +55 -0
- package/built/docs/guides/configuring-analysis.md +157 -0
- package/built/docs/guides/handling-large-appmaps.md +43 -0
- package/built/docs/guides/index.md +17 -0
- package/built/docs/guides/openapi.md +104 -0
- package/built/docs/guides/reading-sql-in-appmaps.md +67 -0
- package/built/docs/guides/refine-appmaps.md +186 -0
- package/built/docs/guides/reverse-engineering.md +375 -0
- package/built/docs/guides/runtime-code-review.md +108 -0
- package/built/docs/integrations/atlassian-compass.md +24 -0
- package/built/docs/integrations/atlassian-confluence.md +50 -0
- package/built/docs/integrations/docker.md +108 -0
- package/built/docs/integrations/github-actions.md +24 -0
- package/built/docs/integrations/index.md +17 -0
- package/built/docs/integrations/plantuml.md +65 -0
- package/built/docs/integrations/postman.md +29 -0
- package/built/docs/integrations/readme.md +38 -0
- package/built/docs/integrations/smartbear-swaggerhub.md +125 -0
- package/built/docs/navie/bring-your-own-key.md +98 -0
- package/built/docs/navie/demo.md +49 -0
- package/built/docs/navie/how-navie-works.md +26 -0
- package/built/docs/navie/how-to-use-navie.md +152 -0
- package/built/docs/navie/index.md +20 -0
- package/built/docs/reference/analysis-labels.md +48 -0
- package/built/docs/reference/analysis-rules.md +60 -0
- package/built/docs/reference/appmap-agent-js.md +215 -0
- package/built/docs/reference/appmap-client-cli.md +527 -0
- package/built/docs/reference/appmap-gradle-plugin.md +140 -0
- package/built/docs/reference/appmap-java.md +310 -0
- package/built/docs/reference/appmap-maven-plugin.md +163 -0
- package/built/docs/reference/appmap-node.md +185 -0
- package/built/docs/reference/appmap-python.md +395 -0
- package/built/docs/reference/appmap-ruby.md +514 -0
- package/built/docs/reference/github-action.md +164 -0
- package/built/docs/reference/index.md +23 -0
- package/built/docs/reference/jetbrains.md +119 -0
- package/built/docs/reference/license-key-install.md +73 -0
- package/built/docs/reference/remote-recording-api.md +97 -0
- package/built/docs/reference/uninstalling-appmap.md +109 -0
- package/built/docs/reference/vscode.md +125 -0
- package/built/docs/setup-appmap-in-ci/example-projects.md +20 -0
- package/built/docs/setup-appmap-in-ci/how-it-works.md +42 -0
- package/built/docs/setup-appmap-in-ci/in-circleci.md +422 -0
- package/built/docs/setup-appmap-in-ci/in-github-actions.md +176 -0
- package/built/docs/setup-appmap-in-ci/index.md +21 -0
- package/built/docs/setup-appmap-in-ci/matrix-builds.md +224 -0
- package/built/docs/setup-appmap-in-ci/troubleshooting.md +70 -0
- package/built/docs/setup-appmap-in-your-code-editor/add-appmap-to-your-code-editor.md +43 -0
- package/built/docs/setup-appmap-in-your-code-editor/appmap-analysis.md +76 -0
- package/built/docs/setup-appmap-in-your-code-editor/generate-appmaps-from-tests.md +92 -0
- package/built/docs/setup-appmap-in-your-code-editor/generate-appmaps-with-remote-recording.md +111 -0
- package/built/docs/setup-appmap-in-your-code-editor/generate-appmaps-with-request-recording.md +79 -0
- package/built/docs/setup-appmap-in-your-code-editor/how-appmap-works.md +165 -0
- package/built/docs/setup-appmap-in-your-code-editor/index.md +23 -0
- package/built/docs/setup-appmap-in-your-code-editor/navigating-appmaps.md +58 -0
- package/built/docs/setup-appmap-in-your-code-editor/navigating-code-objects.md +66 -0
- package/built/docs/unused_for_now_index.html +11 -0
- package/built/rpc/appmap/stats.js +1 -1
- package/built/rpc/appmap/stats.js.map +1 -1
- package/built/rpc/explain/explain.js +6 -1
- package/built/rpc/explain/explain.js.map +1 -1
- package/built/rpc/explain/navie/navie-local.js +6 -2
- package/built/rpc/explain/navie/navie-local.js.map +1 -1
- package/built/rpc/explain/navie/navie-remote.js +5 -1
- package/built/rpc/explain/navie/navie-remote.js.map +1 -1
- package/package.json +3 -3
package/built/docs/setup-appmap-in-your-code-editor/generate-appmaps-with-request-recording.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: docs
|
|
3
|
+
title: Docs - AppMap in your Code Editor
|
|
4
|
+
name: Generate AppMaps with Request Recording
|
|
5
|
+
setup-appmap-ide: true
|
|
6
|
+
redirect_from: [/docs/your-first-15-minutes-with-appmap/streaming-appmaps-with-request-recording]
|
|
7
|
+
step: 5
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Generate AppMaps with Request Recording
|
|
11
|
+
|
|
12
|
+
You can configure your application to record an AppMap of each HTTP server request.
|
|
13
|
+
|
|
14
|
+
Some characteristics of request recording include:
|
|
15
|
+
|
|
16
|
+
* **Named for the route** The name of each AppMap contains the HTTP request method and path, so you can see at a glance what request AppMap contains.
|
|
17
|
+
* **Sortable by timestamp** In the AppMap extension, requests AppMaps are sorted by timestamp, with newest AppMaps at the top. So you can see a chronology of
|
|
18
|
+
the requests that your app is serving.
|
|
19
|
+
|
|
20
|
+
For details on requests recording, see:
|
|
21
|
+
|
|
22
|
+
- [Requests recording - Ruby](/docs/reference/appmap-ruby#requests-recording)
|
|
23
|
+
- [Requests recording - Python](/docs/reference/appmap-python#requests-recording)
|
|
24
|
+
- [Requests recording - Java](/docs/reference/appmap-java#requests-recording)
|
|
25
|
+
|
|
26
|
+
{% include vimeo.html id='916048527' %}
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
**In this video**
|
|
31
|
+
We enable automatic recording of a Ruby on Rails application and stream AppMaps into VS Code for each request as we interact with our application. Now available for Ruby on Rails applications, you can generate AppMaps for each request automatically by simply running your application locally and interacting or making API requests.
|
|
32
|
+
|
|
33
|
+
**Links mentioned**
|
|
34
|
+
[Rails Sample Application](https://github.com/land-of-apps/solidus-demo)
|
|
35
|
+
[Early Access to AppMap Analysis](/appmap-analysis)
|
|
36
|
+
[Requests Recording](/docs/recording-methods.html#requests-recording)
|
|
37
|
+
[Requests Recording in Rails](/docs/reference/appmap-ruby#requests-recording)
|
|
38
|
+
[Requests Recording in Python](/docs/reference/appmap-python#requests-recording)
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Follow along
|
|
43
|
+
|
|
44
|
+
In this tutorial we are going to show you the latest way to generate AppMaps for your application, streaming AppMaps for each request.
|
|
45
|
+
|
|
46
|
+
This feature is currently available for [Ruby on Rails](/docs/reference/appmap-ruby#requests-recording), as well as [Python](/docs/reference/appmap-python#requests-recording) applications that use Django or Flask.
|
|
47
|
+
|
|
48
|
+
## Install AppMap agent
|
|
49
|
+
|
|
50
|
+
You can add AppMap to your project now by simply clicking the automated installer. This automatically adds the AppMap libraries to your project and will run your projects’ package manager such as Bundler, Pip, Poetry, and others.
|
|
51
|
+
|
|
52
|
+
<img class="video-screenshot" src="/assets/img/docs/first-fifteen-minutes/streaming-appmap-1.webp"/>
|
|
53
|
+
|
|
54
|
+
You could also skip the automated installer and add this to the top of your Gemfile in this Rails example.
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
# This must be the first gem listed
|
|
58
|
+
gem 'appmap', group: %i[test development]
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
With AppMap installed in this project, we can now start recording. You can record AppMaps by running your test cases, or by starting a remote recording of a user interaction. But now you can simply just start your project and AppMap will automatically record every request as it happens.
|
|
62
|
+
|
|
63
|
+
I will now start my rails application, this is our AppMap merch store based on the open source project Solidus. You will see AppMap is enabled by default for the development environment.
|
|
64
|
+
|
|
65
|
+
<img class="video-screenshot" src="/assets/img/docs/first-fifteen-minutes/streaming-appmap-2.webp"/>
|
|
66
|
+
|
|
67
|
+
I can now interact with my application and AppMaps will start to stream into my code editor. We’ll highlight HTTP server requests, SQL Queries, and highlight important AppMaps.
|
|
68
|
+
|
|
69
|
+
I can then open these AppMaps to see which packages and functions interact with my database for example.
|
|
70
|
+
|
|
71
|
+
And of course, AppMap will be continually alerting on performance and security issues for this project with AppMap Analysis.
|
|
72
|
+
|
|
73
|
+
<img class="video-screenshot" src="/assets/img/docs/first-fifteen-minutes/streaming-appmap-3.webp"/>
|
|
74
|
+
|
|
75
|
+
With that we find an [authorization happening before authentication](/docs/reference/analysis-rules#authz-before-authn). This is the #1 security flaw on the OWASP Top Ten - and no other tool can detect it.
|
|
76
|
+
|
|
77
|
+
<img class="video-screenshot" src="/assets/img/docs/first-fifteen-minutes/streaming-appmap-4.webp"/>
|
|
78
|
+
|
|
79
|
+
Head over to [the Get AppMap page](/get-appmap) to get started with our VS Code or JetBrains extension and add AppMap to your project today.
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: docs
|
|
3
|
+
setup-appmap-ide: true
|
|
4
|
+
title: Docs - AppMap in your Code Editor
|
|
5
|
+
step: 1
|
|
6
|
+
name: How AppMap Works
|
|
7
|
+
redirect_from: [/docs/your-first-15-minutes-with-appmap/what-is-appmap,/docs/your-first-15-minutes-with-appmap/ideal-projects,/docs/your-first-15-minutes-with-appmap/appmap-analysis,/docs/guides/how-appmap-works]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# How AppMap Works
|
|
11
|
+
|
|
12
|
+
- [Language "agent"](#language-agent)
|
|
13
|
+
- [appmap.yml configuration](#appmapyml-configuration)
|
|
14
|
+
- [Recording methods](#recording-methods)
|
|
15
|
+
- [About AppMap files](#about-appmap-files)
|
|
16
|
+
- [Running in containers](#running-in-containers)
|
|
17
|
+
- [Viewing AppMap diagrams](#viewing-appmap-diagrams)
|
|
18
|
+
|
|
19
|
+
## Language “agent”
|
|
20
|
+
|
|
21
|
+
The AppMap process begins with the AppMap recording agent. This “agent” is a language-specific library - agents are available for Java, Python, Ruby and Node.js (Beta). You add the agent as a dependency of your project in the normal manner - via Maven, Gradle, Pip, Bundler, Yarn, etc. Then you configure your application to load the agent when the application runs.
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
<table class="table table-striped table-bordered">
|
|
25
|
+
<tr>
|
|
26
|
+
<th>Java</th>
|
|
27
|
+
<th>Python</th>
|
|
28
|
+
<th>Ruby</th>
|
|
29
|
+
<th>Node.js</th>
|
|
30
|
+
</tr>
|
|
31
|
+
<tr>
|
|
32
|
+
<td><code>-javaagent</code> JVM option </td>
|
|
33
|
+
<td>Django environment </td>
|
|
34
|
+
<td><code>test</code> and/or <code>development</code> bundle</td>
|
|
35
|
+
<td><code>npx appmap-node <i>yourapp</i></code></td>
|
|
36
|
+
</tr>
|
|
37
|
+
<tr>
|
|
38
|
+
<td>Gradle plugin</td>
|
|
39
|
+
<td>Flask environment </td>
|
|
40
|
+
<td></td>
|
|
41
|
+
<td></td>
|
|
42
|
+
</tr>
|
|
43
|
+
<tr>
|
|
44
|
+
<td>Maven plugin</td>
|
|
45
|
+
<td></td>
|
|
46
|
+
<td></td>
|
|
47
|
+
<td></td>
|
|
48
|
+
</tr>
|
|
49
|
+
</table>
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
_Running application code with the AppMap agent enabled_
|
|
54
|
+
|
|
55
|
+
AppMap is designed to record and display the code internals of your project, along with important I/O operations. Here’s a comparison of AppMap with other runtime code tools:
|
|
56
|
+
|
|
57
|
+
<table class="table table-striped table-bordered">
|
|
58
|
+
<tr>
|
|
59
|
+
<th></th>
|
|
60
|
+
<th>AppMap </th>
|
|
61
|
+
<th>Profiler</th>
|
|
62
|
+
<th>Exception reporter</th>
|
|
63
|
+
<th>Debugger</th>
|
|
64
|
+
<th>APM / Telemetry</th>
|
|
65
|
+
</tr>
|
|
66
|
+
<tr>
|
|
67
|
+
<td>Primary focus</td>
|
|
68
|
+
<td>Your code<br> Parameters and return values<br> I/O<br> Log statements<br> Execution stack<br> Timing data<br> Exceptions</td>
|
|
69
|
+
<td>All code (your code + dependencies)<br> Execution stack<br> Timing data</td>
|
|
70
|
+
<td>Exceptions<br> Execution stack </td>
|
|
71
|
+
<td>All code<br> Parameters and return values<br> Execution stack<br> Exceptions</td>
|
|
72
|
+
<td>I/O<br> Log statements<br> Timing data<br> Your code (limited)</td>
|
|
73
|
+
</tr>
|
|
74
|
+
<tr>
|
|
75
|
+
<td>Environment</td>
|
|
76
|
+
<td>development, test, staging, CI</td>
|
|
77
|
+
<td>development, staging </td>
|
|
78
|
+
<td>staging, production</td>
|
|
79
|
+
<td>development</td>
|
|
80
|
+
<td>production</td>
|
|
81
|
+
</tr>
|
|
82
|
+
</table>
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
To summarize, AppMap is designed primarily to record _full details of your code_, including _parameters and return values_, as well as _I/O_ (especially _SQL_ and _HTTP client requests_), it includes _log statements_, the _execution stack_, _timing information_, and _exceptions_. It captures all of this with minimal configuration. It’s designed primarily for non-production environments.
|
|
86
|
+
|
|
87
|
+
## appmap.yml configuration
|
|
88
|
+
When you start your app with the AppMap agent enabled, it reads a configuration file called appmap.yml. This file serves several basic purposes. It tells the AppMap agent:
|
|
89
|
+
|
|
90
|
+
* Which code to record
|
|
91
|
+
* Where to write the AppMaps.
|
|
92
|
+
|
|
93
|
+
And it also tells other AppMap tools:
|
|
94
|
+
* The project name
|
|
95
|
+
* The language name
|
|
96
|
+
* Where the AppMaps are located
|
|
97
|
+
|
|
98
|
+
**Note:** In most environments, a default appmap.yml will be auto-generated by the AppMap agent if none exists.
|
|
99
|
+
|
|
100
|
+
### Specifying which code to record
|
|
101
|
+
To get started, you just provide the top-level package names or directories containing the code you want to record. For a non-compiled language like Ruby, Python, or Node.js, it’s a directory list like `[ app]` or `[ src, lib ]`. For Java, it’s a package prefix like `org.mycorp`.
|
|
102
|
+
|
|
103
|
+
Going beyond this basic, initial configuration, you have fine-grained control over which code to record. You can choose to record selected dependency libraries or packages. You can also include or exclude specific packages, classes and/or functions. And you can apply custom “labels” to any function, in order to organize the code into functional groups and to facilitate reasoning and analysis.
|
|
104
|
+
|
|
105
|
+
## Recording methods
|
|
106
|
+
The AppMap agent can be enabled in any environment, and configured to record selected code. There are several variants of this basic model that are commonly used to acquire AppMaps for specific use cases.
|
|
107
|
+
|
|
108
|
+
### Test case recording
|
|
109
|
+
AppMap provides specialized support for recording test cases. When you run your test cases in a supported framework (there are many - see the [language agent reference](/docs/reference) for details), a separate AppMap is created for each test case. Test case AppMaps have some distinct features:
|
|
110
|
+
|
|
111
|
+
* Each AppMap file is named for the test case, and stored in a folder called `$appmap_dir/$test_framework`
|
|
112
|
+
* The test framework name and version are stored in the AppMap.
|
|
113
|
+
* The test case name, file name and line number are stored in the AppMap.
|
|
114
|
+
* The test status (`succeeded` or `failed`) and any test failure message are stored in the AppMap.
|
|
115
|
+
|
|
116
|
+
Recording the test suite of an application is a good way to quickly obtain a lot of data about an application. And because test cases work the same way for each build, recording test cases is also a good way to compare the behavior of application code across versions.
|
|
117
|
+
|
|
118
|
+
### Requests recording
|
|
119
|
+
For web applications, AppMap can be configured to record an AppMap for each HTTP server request handled by the app. This is a great way to collect data interactively. Just start the application with the AppMap language agent enabled, and start interacting with the app - manually, or using QA scripts or an API testing tool like Postman. AppMaps are generated continuously as the application handles requests.
|
|
120
|
+
|
|
121
|
+
### Remote recording
|
|
122
|
+
Remote recording is similar to requests recording, in that:
|
|
123
|
+
* It’s for web applications
|
|
124
|
+
* It makes AppMaps as the application handles requests
|
|
125
|
+
|
|
126
|
+
But unlike requests recording, you control the boundaries of the AppMap, each AppMap can contain more than one HTTP server request, and it will also contain non-HTTP activity such as background jobs. To start a remote recording, you send an HTTP command to the AppMap agent running inside your application’s web stack to start recording. From that point on, everything that happens inside the application is recorded, until you send the “stop” command.
|
|
127
|
+
|
|
128
|
+
### Code block recording
|
|
129
|
+
Some language agents enable you to make an AppMap by adding a simple code snippet to your code. This gives you total control over what’s recorded. The only downside of this is that you need access to the source code - which is not required by other recording methods.
|
|
130
|
+
|
|
131
|
+
### Process recording
|
|
132
|
+
Process recording is something of a last resort, when other recording methods aren’t available. When you run your application with process recording enabled, _everything_ that happens in the code (as configured by the appmap.yml) is recorded, from process startup to shutdown.
|
|
133
|
+
|
|
134
|
+
## About AppMap files
|
|
135
|
+
AppMaps are ordinary JSON files. As you record AppMaps with test case recording, requests recording, or process recording, these JSON files are generated and written to the filesystem. The default location for these AppMaps is `tmp/appmap`, relative to the process working directory. Be sure that you know that the working directory of the application server is! You’ll need to know this to find your AppMaps.
|
|
136
|
+
|
|
137
|
+
When you use remote recording, the HTTP “stop” command responds with the AppMap in the response payload. It’s up to the client to decide where to write the file. For example, you can start and stop a remote recording using cURL, and write the output of the “stop” command to a file of your choosing.
|
|
138
|
+
|
|
139
|
+
When you use code block recording, it’s up to you in your code snippet to write the AppMap to a file. Naturally, you can direct the data anywhere you please.
|
|
140
|
+
|
|
141
|
+
AppMap files conform to the [AppMap specification](https://github.com/getappmap/appmap), which is freely available on GitHub.
|
|
142
|
+
|
|
143
|
+
## Running in containers
|
|
144
|
+
You can make AppMaps while running your application in a container. From the AppMap standpoint, there is really no difference between running in a container and running in any other environment. There are just a couple of basic considerations:
|
|
145
|
+
* The AppMap file will be written to the filesystem of the container. To make it available to the host, you should either use a volume mount to the `$appmap_dir` (typically, `tmp/appmap`), or copy the AppMaps out of the container after the recording is complete.
|
|
146
|
+
* If you are using remote recording, your application web port should be exposed to the host, so that you can send the HTTP start and stop commands. You’ll need this anyway, in order to access your application’s web UI or API from the host.
|
|
147
|
+
|
|
148
|
+
## Viewing AppMap diagrams
|
|
149
|
+
AppMap includes open-source UI tools to display AppMap data as visual diagrams. Built-in diagrams include:
|
|
150
|
+
|
|
151
|
+
* Dependency map
|
|
152
|
+
* Sequence diagram
|
|
153
|
+
* Trace view
|
|
154
|
+
* Flame graph
|
|
155
|
+
|
|
156
|
+
These diagrams are integrated together in the AppMap UI, and fully interactive. The data can be organized, selected, and filtered by the user. This makes the user interface much better suited for code investigation than a static diagram image. It’s also much more scalable, because the diagrams can be tuned to reveal specific information and hide extraneous data.
|
|
157
|
+
|
|
158
|
+
### IDE extensions
|
|
159
|
+
The AppMap extensions for VSCode and JetBrains include a file association for AppMap data. Just click on an AppMap file, and it will be opened graphically in the code editor. The diagram is fully linked to source code within the IDE.
|
|
160
|
+
|
|
161
|
+
### Hosting an AppMap viewer
|
|
162
|
+
The AppMap diagrams are published as an open source library on [NPM](https://www.npmjs.com/package/@appland/appmap). If you want to provide a centralized service to open AppMap diagrams in the browser, you can just serve [appmap.html](https://www.npmjs.com/package/@appland/appmap?activeTab=code) from any web server. Provide a URL to the AppMap data using the `appmap` parameter - for example: `http://myappmapserver/appmap.html?appmap=https://<appmap-url>`.
|
|
163
|
+
|
|
164
|
+
### Exporting AppMap data
|
|
165
|
+
The AppMap sequence diagram can be exported to SVG or PlantUML. Consult the [diagrams reference](/docs/diagrams/sequence-diagrams.html) for details.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: docs
|
|
3
|
+
title: Docs - AppMap in your Code Editor
|
|
4
|
+
toc: true
|
|
5
|
+
redirect_from: [/docs/your-first-15-minutes-with-appmap/, /docs/code-editor-extensions/,/docs/code-editor-extensions/appmap-for-vs-code, /docs/code-editor-extensions/appmap-for-jetbrains]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# Set Up AppMap in your Code Editor
|
|
10
|
+
|
|
11
|
+
<p class="alert alert-info">
|
|
12
|
+
If at any point you would like some help, <a href="/slack">join us in Slack</a>!
|
|
13
|
+
You'll find the AppMap team there, along with other AppMap users.
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
* [How AppMap Works](/docs/setup-appmap-in-your-code-editor/how-appmap-works)
|
|
17
|
+
* [Add AppMap to your Code Editor](/docs/setup-appmap-in-your-code-editor/add-appmap-to-your-code-editor)
|
|
18
|
+
* [Generate AppMaps from Tests](/docs/setup-appmap-in-your-code-editor/generate-appmaps-from-tests)
|
|
19
|
+
* [Generate AppMaps with Remote Recording](/docs/setup-appmap-in-your-code-editor/generate-appmaps-with-remote-recording)
|
|
20
|
+
* [Generate AppMaps with Request Recording](/docs/setup-appmap-in-your-code-editor/generate-appmaps-with-request-recording)
|
|
21
|
+
* [Navigating AppMaps](/docs/setup-appmap-in-your-code-editor/navigating-appmaps)
|
|
22
|
+
* [Navigating Code Objects](/docs/setup-appmap-in-your-code-editor/navigating-code-objects)
|
|
23
|
+
* [Runtime Analysis](/docs/setup-appmap-in-your-code-editor/appmap-analysis)
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: docs
|
|
3
|
+
title: Docs - AppMap in your Code Editor
|
|
4
|
+
name: Navigating AppMaps
|
|
5
|
+
setup-appmap-ide: true
|
|
6
|
+
step: 6
|
|
7
|
+
redirect_from: [/docs/your-first-15-minutes-with-appmap/navigating-appmaps]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Navigating AppMaps
|
|
11
|
+
|
|
12
|
+
{% include vimeo.html id='916048549' %}
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
**In this video**
|
|
17
|
+
We walk through how to navigate within your AppMaps. We'll dive into the various sections of the AppMap view, such as the dependency view and the trace view. And we'll show you how to better understand your code execution by traversing your AppMap and how to link back to your code
|
|
18
|
+
|
|
19
|
+
**Links mentioned**
|
|
20
|
+
[Rails Sample Application](https://github.com/land-of-apps/sample_app_6th_ed/tree/codespaces-devcontainer)
|
|
21
|
+
[Appland VS Code and JetBrains Extension](https://appmap.io/get-appmap)
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Follow along
|
|
26
|
+
|
|
27
|
+
Welcome to AppMap. If you’ve been following along this tutorial, you should have AppMaps generated from either your [test cases](/docs/your-first-15-minutes-with-appmap/generate-appmaps-with-tests.html) or from a [remote recording](/docs/your-first-15-minutes-with-appmap/generate-appmaps-with-remote-recording.html). This tutorial assumes you have at least one AppMap created, but ideally more than one. As always you can clone this [sample project repository from Github](https://github.com/land-of-apps/sample_app_6th_ed/tree/codespaces-devcontainer) and follow along.
|
|
28
|
+
|
|
29
|
+
In this tutorial, we are going to dive into our AppMaps, show you how to navigate them and how to connect an AppMap back to your code.
|
|
30
|
+
|
|
31
|
+
We’ll start by opening the AppMap extension installed in our VS Code editor. You’ll see a listing of all your AppMaps in your left hand column. From here, we can select on an AppMap to open it.
|
|
32
|
+
|
|
33
|
+
<img class="video-screenshot" src="/assets/img/docs/first-fifteen-minutes/appmap-view.webp"/>
|
|
34
|
+
|
|
35
|
+
There are 3 main sections to an AppMap. The left hand column will show you HTTP requests, labels, either automatically generated by AppMap or manually extended via simple code comments within your code base, a list of all the packages, classes, functions, and SQL queries associated with this AppMap.
|
|
36
|
+
|
|
37
|
+
You can search across all of these code objects within this AppMap in the search bar and you can click the link to open the test case that generated this AppMap.
|
|
38
|
+
|
|
39
|
+
## Dependency View
|
|
40
|
+
|
|
41
|
+
In the right hand section, you’ll see the Dependency view which shows a visual representation between the code objects, functions, and SQL queries. Click on the “information” icon to see a full legend for the code objects and data values.
|
|
42
|
+
|
|
43
|
+
<img class="video-screenshot" src="/assets/img/docs/first-fifteen-minutes/appmap-legend.webp"/>
|
|
44
|
+
|
|
45
|
+
In the top section, you’ll see a filter icon, click on this icon to help you declutter and focus your AppMap, which is particularly useful for larger and more complex maps. You can hide any unlabeled function, or hide specific packages, classes, or functions. For example, if I wanted to hide all of my logging functions from this AppMap, I can simply search for the `package:logger` and hide this from my view.
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
<img class="video-screenshot" src="/assets/img/docs/first-fifteen-minutes/appmap-filter-view.webp"/>
|
|
49
|
+
|
|
50
|
+
## Trace View
|
|
51
|
+
|
|
52
|
+
If we click on one of the classes, such as `LoggedInHelper`, and select on the function, we can click on the event and go to the trace view of this AppMap.
|
|
53
|
+
|
|
54
|
+
The trace view shows a hierarchical tree structure of what happened within that particular web request. If I keep clicking on `caller` i will get to the root which is the http server request. I can see the controller and the return status.
|
|
55
|
+
|
|
56
|
+
<img class="video-screenshot" src="/assets/img/docs/first-fifteen-minutes/appmap-trace-view.webp"/>
|
|
57
|
+
|
|
58
|
+
I can see the values of the variables, parameters, and return values as the code traversed this test case.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: docs
|
|
3
|
+
title: Docs - AppMap in your Code Editor
|
|
4
|
+
name: Navigating Code Objects
|
|
5
|
+
setup-appmap-ide: true
|
|
6
|
+
step: 7
|
|
7
|
+
redirect_from: [/docs/your-first-15-minutes-with-appmap/navigating-code-objects]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Navigating Code Objects
|
|
11
|
+
{% include vimeo.html id='916048582' %}
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
**In this video**
|
|
16
|
+
Dive into the Code objects view, a high level view of code functions, HTTP requests, and SQL queries across the entire set of your AppMaps and learn how to locate and navigate to an AppMap from code reference pins on your code functions.
|
|
17
|
+
|
|
18
|
+
**Links mentioned**
|
|
19
|
+
[Rails Sample Application](https://github.com/land-of-apps/sample_app_6th_ed/tree/codespaces-devcontainer)
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
## Follow along
|
|
23
|
+
|
|
24
|
+
Welcome to AppMap, In this tutorial we will be diving into advanced navigation of AppMaps - the Code Objects view. We’ll answer the question, “What if I have a lot of AppMaps and I don’t know where exactly to look?”
|
|
25
|
+
|
|
26
|
+
In this view, we collect all the different code functions and HTTP server requests and SQL queries all into one list. Every request, query, and function call that occurs anywhere in the whole set of AppMaps will be in this list.
|
|
27
|
+
|
|
28
|
+
## Code Objects View
|
|
29
|
+
|
|
30
|
+
There are three sections to the Code Objects view. The first section is the Code view, this will show packages, classes, and functions, it will show the framework code as well as my code, essentially everything present within your Appmaps. We can click on a function to navigate directly to the code. In this example, I’ll navigate to my Application controllers, and view the Microposts controller. This will take me directly to the code for this function. This is a great way to see more comprehensively what you have across your code base.
|
|
31
|
+
|
|
32
|
+
<img class="video-screenshot" src="/assets/img/docs/first-fifteen-minutes/code-objects-view.webp"/>
|
|
33
|
+
|
|
34
|
+
## HTTP Routes List
|
|
35
|
+
|
|
36
|
+
In the HTTP Service request list, you can see basically a mini spec file showing you what routes are available across all of your AppMaps.
|
|
37
|
+
|
|
38
|
+
If this route only exists in a single AppMap, you’ll be taken directly to the AppMap for this request, but if the route exists in multiple AppMaps you’ll get a VScode picker to choose which one to open.
|
|
39
|
+
|
|
40
|
+
Here is this route, and here it is shown in a trace view, and you’ll see the status code for that is 302 which is a redirect.
|
|
41
|
+
|
|
42
|
+
<img class="video-screenshot" src="/assets/img/docs/first-fifteen-minutes/code-objects-trace-view.webp"/>
|
|
43
|
+
|
|
44
|
+
## SQL Query List
|
|
45
|
+
|
|
46
|
+
The final section of Code Objects is a list of all the SQL queries across your AppMaps. Just like before, if you click into it and it is unique across your AppMap set then you’ll be sent directly to the AppMap or the quick picker will prompt you to open one.
|
|
47
|
+
|
|
48
|
+
The code view is a handy way to navigate your code base, similar to the file view you’d get in VS Code except this code view will only show the code that participated in your test case recordings or remote recordings.
|
|
49
|
+
|
|
50
|
+
But it’s more common to simply be navigating within the code itself. So what if you want to get to AppMaps from within the code?
|
|
51
|
+
|
|
52
|
+
## Opening AppMaps from code object names
|
|
53
|
+
|
|
54
|
+
The command “Open code object in AppMap” can be used to find an open all the AppMaps that contain a particular code object (package, class, or function name).
|
|
55
|
+
|
|
56
|
+
<img class="video-screenshot" src="/assets/img/docs/first-fifteen-minutes/code-object-command-palette.webp"/>
|
|
57
|
+
|
|
58
|
+
To get here in VS Code open the command palette.
|
|
59
|
+
|
|
60
|
+
On Mac:
|
|
61
|
+
`Shift + Command + P`
|
|
62
|
+
|
|
63
|
+
On Windows/Linux:
|
|
64
|
+
`Ctrl + Shift + P`
|
|
65
|
+
|
|
66
|
+
I can then search for the `UsersController#show` function - if it's in a single AppMap I’ll get taken directly to that AppMap. If it exists in more than one you’ll get the quick picker to choose which one you want.
|
|
@@ -32,7 +32,7 @@ async function getAppmapStats(config) {
|
|
|
32
32
|
await (0, utils_1.processNamedFiles)(appmapDir, 'canonical.sqlTables.json', collectStrings(tables));
|
|
33
33
|
await (0, utils_1.processNamedFiles)(appmapDir, 'metadata.json', async () => numAppMaps++);
|
|
34
34
|
return {
|
|
35
|
-
name: config.name,
|
|
35
|
+
name: config.name || config.directory,
|
|
36
36
|
directory: config.directory,
|
|
37
37
|
packages: Array.from(packages).sort(),
|
|
38
38
|
classes: Array.from(classes).sort(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stats.js","sourceRoot":"","sources":["../../../src/rpc/appmap/stats.ts"],"names":[],"mappings":";;;;;;AAAA,sCAAyC;AAEzC,uCAAgD;AAChD,0CAAuC;AACvC,qEAA4E;AAC5E,+BAA4B;AAY5B,KAAK,UAAU,cAAc,CAAC,MAAiC;;IAC7D,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;IACnC,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;IAClC,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAC;IACjC,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAC;IACjC,IAAI,UAAU,GAAG,CAAC,CAAC;IAEnB,MAAM,SAAS,GAAG,IAAA,WAAI,EAAC,MAAM,CAAC,SAAS,EAAE,MAAA,MAAM,CAAC,UAAU,mCAAI,YAAY,CAAC,CAAC;IAC5E,MAAM,cAAc,GAAG,CAAC,MAAmB,EAAqC,EAAE;QAChF,OAAO,KAAK,EAAE,IAAY,EAAiB,EAAE;YAC3C,KAAK,MAAM,KAAK,IAAI,I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AAQ,CAAC,CAAC;gBAC/B,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC;gBAC7B,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC;gBAC3B,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;gBACpC,GAAG,CAAC,UAAU,IAAI,UAAU,CAAC;gBAE7B,OAAO,GAAG,CAAC;YACb,CAAC,EACD;gBACE,QAAQ,EAAE,EAAE;gBACZ,OAAO,EAAE,EAAE;gBACX,MAAM,EAAE,EAAE;gBACV,MAAM,EAAE,EAAE;gBACV,UAAU,EAAE,CAAC;aACiB,CACjC,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC;AA5BD,sCA4BC;AAED,SAAgB,aAAa;IAI3B,OAAO;QACL,IAAI,EAAE,eAAS,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM;QAC/B,KAAK,CAAC,OAAO;YACX,MAAM,KAAK,GAAG,MAAM,YAAY,EAAE,CAAC;YACnC,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,iCACtB,IAAI,KACP,SAAS,EAAE,SAAS,IACpB,CAAC,CAAC;QACN,CAAC;KACF,CAAC;AACJ,CAAC;AAdD,sCAcC"}
|
|
@@ -13,6 +13,7 @@ const rpc_2 = require("../rpc");
|
|
|
13
13
|
const collectContext_1 = __importDefault(require("./collectContext"));
|
|
14
14
|
const configuration_1 = __importDefault(require("../configuration"));
|
|
15
15
|
const projectInfo_1 = __importDefault(require("../../cmds/navie/projectInfo"));
|
|
16
|
+
const help_1 = __importDefault(require("../../cmds/navie/help"));
|
|
16
17
|
const searchStatusByUserMessageId = new Map();
|
|
17
18
|
exports.DEFAULT_TOKEN_LIMIT = 8000;
|
|
18
19
|
class Explain extends events_1.default {
|
|
@@ -88,6 +89,9 @@ class Explain extends events_1.default {
|
|
|
88
89
|
projectInfoContext() {
|
|
89
90
|
return (0, projectInfo_1.default)();
|
|
90
91
|
}
|
|
92
|
+
helpContext(data) {
|
|
93
|
+
return (0, help_1.default)(data);
|
|
94
|
+
}
|
|
91
95
|
}
|
|
92
96
|
exports.Explain = Explain;
|
|
93
97
|
async function explain(navieProvider, question, codeSelection, appmaps, threadId) {
|
|
@@ -117,7 +121,8 @@ async function explain(navieProvider, question, codeSelection, appmaps, threadId
|
|
|
117
121
|
};
|
|
118
122
|
const contextProvider = async (data) => invokeContextFunction(data);
|
|
119
123
|
const projectInfoProvider = async (data) => invokeContextFunction(data);
|
|
120
|
-
const
|
|
124
|
+
const helpProvider = async (data) => invokeContextFunction(data);
|
|
125
|
+
const navie = navieProvider(threadId, contextProvider, projectInfoProvider, helpProvider);
|
|
121
126
|
return new Promise((resolve, reject) => {
|
|
122
127
|
let isFirst = true;
|
|
123
128
|
const first = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"explain.js","sourceRoot":"","sources":["../../../src/rpc/explain/explain.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,oDAA4B;AAC5B,oDAAkC;AAClC,sCAA0C;AAC1C,qCAA+B;AAE/B,gCAA8C;AAC9C,sEAA8C;AAG9C,qEAA6C;AAC7C,+EAA+D;
|
|
1
|
+
{"version":3,"file":"explain.js","sourceRoot":"","sources":["../../../src/rpc/explain/explain.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,oDAA4B;AAC5B,oDAAkC;AAClC,sCAA0C;AAC1C,qCAA+B;AAE/B,gCAA8C;AAC9C,sEAA8C;AAG9C,qEAA6C;AAC7C,+EAA+D;AAC/D,iEAAgD;AAEhD,MAAM,2BAA2B,GAAG,IAAI,GAAG,EAA4C,CAAC;AAiB3E,QAAA,mBAAmB,GAAG,IAAI,CAAC;AAExC,MAAa,OAAQ,SAAQ,gBAAY;IACvC,YACS,WAAqB,EACrB,QAAgB,EAChB,aAAiC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AAC,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,GAAU,EAAE,EAAE,CAAC,KAAK,EAAE,IAAI,MAAM,CAAC,cAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC/F,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,cAAc,GAEqD,CACvE,aAA6B,EAC7B,EAAE;IACF,OAAO;QACL,IAAI,EAAE,gBAAU,CAAC,mBAAmB;QACpC,OAAO,EAAE,KAAK,EAAE,OAAkC,EAAE,EAAE,CACpD,MAAM,OAAO,CACX,aAAa,EACb,OAAO,CAAC,QAAQ,EAChB,OAAO,CAAC,aAAa,EACrB,OAAO,CAAC,OAAO,EACf,OAAO,CAAC,QAAQ,CACjB;KACJ,CAAC;AACJ,CAAC,CAAC;AAiBO,wCAAc;AAfvB,MAAM,oBAAoB,GAGtB,GAAG,EAAE;IACP,OAAO;QACL,IAAI,EAAE,gBAAU,CAAC,yBAAyB;QAC1C,OAAO,EAAE,KAAK,EAAE,OAAwC,EAAE,EAAE;YAC1D,MAAM,YAAY,GAAG,2BAA2B,CAAC,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;YAC5E,IAAI,CAAC,YAAY;gBACf,MAAM,IAAI,cAAQ,CAAC,GAAG,EAAE,6BAA6B,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;YAChF,OAAO,YAAY,CAAC;QACtB,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEuB,oDAAoB"}
|
|
@@ -62,13 +62,17 @@ const OPTION_SETTERS = {
|
|
|
62
62
|
modelName: (explainOptions, value) => {
|
|
63
63
|
explainOptions.modelName = String(value);
|
|
64
64
|
},
|
|
65
|
+
explainMode: (explainOptions, value) => {
|
|
66
|
+
explainOptions.agentMode = value;
|
|
67
|
+
},
|
|
65
68
|
};
|
|
66
69
|
class LocalNavie extends events_1.default {
|
|
67
|
-
constructor(threadId, contextProvider, projectInfoProvider) {
|
|
70
|
+
constructor(threadId, contextProvider, projectInfoProvider, helpProvider) {
|
|
68
71
|
super();
|
|
69
72
|
this.threadId = threadId;
|
|
70
73
|
this.contextProvider = contextProvider;
|
|
71
74
|
this.projectInfoProvider = projectInfoProvider;
|
|
75
|
+
this.helpProvider = helpProvider;
|
|
72
76
|
this.explainOptions = new navie_1.Explain.ExplainOptions();
|
|
73
77
|
if (threadId) {
|
|
74
78
|
(0, console_1.log)(`[local-navie] Continuing thread ${threadId}`);
|
|
@@ -101,7 +105,7 @@ class LocalNavie extends events_1.default {
|
|
|
101
105
|
};
|
|
102
106
|
const history = await this.history.restoreMessages();
|
|
103
107
|
this.history.saveMessage({ content: question, role: 'user' });
|
|
104
|
-
const explainFn = (0, navie_1.explain)(clientRequest, this.contextProvider, this.projectInfoProvider, this.explainOptions, history);
|
|
108
|
+
const explainFn = (0, navie_1.explain)(clientRequest, this.contextProvider, this.projectInfoProvider, this.helpProvider, this.explainOptions, history);
|
|
105
109
|
explainFn.on('event', (event) => this.emit('event', event));
|
|
106
110
|
const response = new Array();
|
|
107
111
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navie-local.js","sourceRoot":"","sources":["../../../../src/rpc/explain/navie/navie-local.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA8B;AAC9B,oDAAkC;AAClC,0CAAkE;AAClE,mCAAoC;AACpC,+BAA4B;AAC5B,2BAA6B;AAC7B,
|
|
1
|
+
{"version":3,"file":"navie-local.js","sourceRoot":"","sources":["../../../../src/rpc/explain/navie/navie-local.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA8B;AAC9B,oDAAkC;AAClC,0CAAkE;AAClE,mCAAoC;AACpC,+BAA4B;AAC5B,2BAA6B;AAC7B,0CAAuF;AAKvF,MAAM,YAAY;IAChB,YAA4B,QAAgB;QAAhB,aAAQ,GAAR,QAAQ,CAAQ;IAAG,CAAC;IAEhD,KAAK,CAAC,WAAW,CAAC,OAAgB;QAChC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vB,aAAa,EACb,IAAI,CAAC,eAAe,EACpB,IAAI,CAAC,mBAAmB,EACxB,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,cAAc,EACnB,OAAO,CACR,CAAC;QACF,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;QAC5D,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAU,CAAC;;YACrC,KAA0B,eAAA,KAAA,cAAA,SAAS,CAAC,OAAO,EAAE,CAAA,IAAA;gBAAnB,cAAmB;gBAAnB,WAAmB;;oBAAlC,MAAM,KAAK,KAAA,CAAA;oBACpB,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBACrB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;;;;;aAC3B;;;;;;;;;QACD,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;QAC5E,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACxB,CAAC;CACF;AA9DD,6BA8DC"}
|
|
@@ -8,11 +8,12 @@ const events_1 = __importDefault(require("events"));
|
|
|
8
8
|
const client_1 = require("@appland/client");
|
|
9
9
|
const utils_1 = require("../../../utils");
|
|
10
10
|
class RemoteNavie extends events_1.default {
|
|
11
|
-
constructor(threadId, contextProvider, projectInfoProvider) {
|
|
11
|
+
constructor(threadId, contextProvider, projectInfoProvider, helpProvider) {
|
|
12
12
|
super();
|
|
13
13
|
this.threadId = threadId;
|
|
14
14
|
this.contextProvider = contextProvider;
|
|
15
15
|
this.projectInfoProvider = projectInfoProvider;
|
|
16
|
+
this.helpProvider = helpProvider;
|
|
16
17
|
}
|
|
17
18
|
setOption(key, _value) {
|
|
18
19
|
throw new Error(`RemoteNavie does not support option '${key}'`);
|
|
@@ -36,6 +37,9 @@ class RemoteNavie extends events_1.default {
|
|
|
36
37
|
if (data.type === 'projectInfo') {
|
|
37
38
|
return ((await self.projectInfoProvider(data)) || {});
|
|
38
39
|
}
|
|
40
|
+
if (data.type === 'help') {
|
|
41
|
+
return (await self.helpProvider(data)) || {};
|
|
42
|
+
}
|
|
39
43
|
else {
|
|
40
44
|
(0, console_1.warn)(`Unhandled context request type: ${data.type}`);
|
|
41
45
|
// A response is required from this function.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navie-remote.js","sourceRoot":"","sources":["../../../../src/rpc/explain/navie/navie-remote.ts"],"names":[],"mappings":";;;;;AAAA,qCAA+B;AAC/B,oDAAkC;AAElC,4CAAqC;AACrC,0CAAyC;AAIzC,MAAqB,WAAY,SAAQ,gBAAY;IACnD,YACS,QAA4B,EAC3B,eAAwC,EACxC,mBAAoD;
|
|
1
|
+
{"version":3,"file":"navie-remote.js","sourceRoot":"","sources":["../../../../src/rpc/explain/navie/navie-remote.ts"],"names":[],"mappings":";;;;;AAAA,qCAA+B;AAC/B,oDAAkC;AAElC,4CAAqC;AACrC,0CAAyC;AAIzC,MAAqB,WAAY,SAAQ,gBAAY;IACnD,YACS,QAA4B,EAC3B,eAAwC,EACxC,mBAAoD,EACpD,YAA+B;QAEvC,KAAK,EAAE,CAAC;QALD,aAAQ,GAAR,QAAQ,CAAoB;QAC3B,oBAAe,GAAf,eAAe,CAAyB;QACxC,wBAAmB,GAAnB,mBAAmB,CAAiC;QACpD,iBAAY,GAAZ,YAAY,CAAmB;IAGzC,CAAC;IAED,SAAS,CAAC,GAAW,EAAE,MAAuB;QAC5C,MAAM,IAAI,KAAK,CAAC,wCAAwC,GAAG,GAAG,CAAC,CAAC;IAClE,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,QAAgB,EAAE,aAAiC;QAC3D,MAAM,IAAI,GAAG,IAAI,CAAC;QAClB,CACE,MAAM,WAAE,CA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CAAC,CAAC;YACxB,CAAC;YACD,OAAO,CAAC,GAAU;gBAChB,IAAI,IAAA,eAAO,GAAE;oBAAE,IAAA,cAAI,EAAC,6BAA6B,GAAG,EAAE,CAAC,CAAC;gBACxD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;YAC1B,CAAC;SACF,CAAC,CACH,CAAC,WAAW,CACX,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,EACpD,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,CAC7C,CAAC;IACJ,CAAC;CACF;AAjED,8BAiEC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appland/appmap",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.134.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"bin": "built/cli.js",
|
|
6
6
|
"engines": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"pre-commit": "lint-staged",
|
|
20
20
|
"test": "jest --filter=./tests/testFilter.js",
|
|
21
21
|
"test:binary": "jest -c tests/binary/jest.config.js",
|
|
22
|
-
"build": "tsc && yarn build:html",
|
|
22
|
+
"build": "tsc && yarn build:html && yarn build:doc",
|
|
23
23
|
"watch": "tsc --watch",
|
|
24
24
|
"build:html": "ts-node esbuild.html.ts",
|
|
25
25
|
"build:doc": "rsync -av --delete ../../docs built/",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@types/tmp": "^0.2.3",
|
|
52
52
|
"@types/validator": "^13.7.10",
|
|
53
53
|
"@types/w3c-xmlserializer": "^2.0.2",
|
|
54
|
-
"appmap-node": "^2.
|
|
54
|
+
"appmap-node": "^2.19.1",
|
|
55
55
|
"esbuild": "0.19.8",
|
|
56
56
|
"eslint": "^7.25.0",
|
|
57
57
|
"eslint-config-airbnb-base": "^14.2.1",
|