@appland/appmap 3.103.0 → 3.105.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 +24 -0
- package/built/cmds/compare/ReportFieldCalculator.js +214 -0
- package/built/cmds/compare/ReportFieldCalculator.js.map +1 -0
- package/built/cmds/compare/SourceDiff.js +60 -0
- package/built/cmds/compare/SourceDiff.js.map +1 -0
- package/built/cmds/compare/buildFailure.js +50 -0
- package/built/cmds/compare/buildFailure.js.map +1 -0
- package/built/cmds/compare/compare.js +11 -6
- package/built/cmds/compare/compare.js.map +1 -1
- package/built/cmds/compare/deleteUnreferencedAppMaps.js +30 -0
- package/built/cmds/compare/deleteUnreferencedAppMaps.js.map +1 -0
- package/built/cmds/compare/prepareOutputDir.js +1 -1
- package/built/cmds/compare/prepareOutputDir.js.map +1 -1
- package/built/cmds/compare/reportChanges.js +71 -0
- package/built/cmds/compare/reportChanges.js.map +1 -0
- package/built/cmds/compare-report/ChangeReport.js +47 -10
- package/built/cmds/compare-report/ChangeReport.js.map +1 -1
- package/built/cmds/compare-report/MarkdownReport.js +4 -1
- package/built/cmds/compare-report/MarkdownReport.js.map +1 -1
- package/built/cmds/compare-report/Preprocessor.js +28 -0
- package/built/cmds/compare-report/Preprocessor.js.map +1 -1
- package/built/cmds/compare-report/ReportSection.js +46 -14
- package/built/cmds/compare-report/ReportSection.js.map +1 -1
- package/built/cmds/compare-report/formatAPILocation.js +18 -0
- package/built/cmds/compare-report/formatAPILocation.js.map +1 -0
- package/built/cmds/compare-report/helpers.js +16 -0
- package/built/cmds/compare-report/helpers.js.map +1 -1
- package/built/diffArchive/ChangeAnalysis.js +232 -0
- package/built/diffArchive/ChangeAnalysis.js.map +1 -0
- package/built/{cmds/compare → diffArchive}/Digests.js +1 -1
- package/built/diffArchive/Digests.js.map +1 -0
- package/built/{cmds/compare → diffArchive}/Paths.js +7 -4
- package/built/diffArchive/Paths.js.map +1 -0
- package/built/diffArchive/RevisionName.js.map +1 -0
- package/built/{cmds/compare → diffArchive}/SequenceDiagramDigest.js +1 -1
- package/built/diffArchive/SequenceDiagramDigest.js.map +1 -0
- package/built/{cmds/compare/DiffLoader.js → diffArchive/SourceDiff.js} +9 -9
- package/built/diffArchive/SourceDiff.js.map +1 -0
- package/built/{cmds/compare → diffArchive}/loadFindings.js +1 -1
- package/built/diffArchive/loadFindings.js.map +1 -0
- package/built/html/appmap.js +93 -93
- package/built/html/appmap.js.map +3 -3
- package/built/html/sequenceDiagram.js +93 -93
- package/built/html/sequenceDiagram.js.map +3 -3
- package/built/lib/ArchiveMetadata.js.map +1 -0
- package/built/lib/normalizeAppMapId.js.map +1 -0
- package/built/lib/resolvePath.js +36 -0
- package/built/lib/resolvePath.js.map +1 -0
- package/package.json +2 -1
- package/resources/change-report/changed-appmaps/details.hbs +3 -3
- package/resources/change-report/failed-tests/details.hbs +3 -2
- package/resources/change-report/findings/details.hbs +2 -6
- package/resources/change-report/new-appmaps/details.hbs +3 -2
- package/resources/change-report/openapi-diff/details.hbs +3 -2
- package/resources/change-report/removed-appmaps/details.hbs +2 -2
- package/resources/change-report/sql-diff/details.hbs +59 -0
- package/resources/change-report/sql-diff/heading.hbs +14 -0
- package/built/cmds/archive/ArchiveMetadata.js.map +0 -1
- package/built/cmds/compare/ChangeReporter.js +0 -476
- package/built/cmds/compare/ChangeReporter.js.map +0 -1
- package/built/cmds/compare/DiffLoader.js.map +0 -1
- package/built/cmds/compare/Digests.js.map +0 -1
- package/built/cmds/compare/Paths.js.map +0 -1
- package/built/cmds/compare/RevisionName.js.map +0 -1
- package/built/cmds/compare/SequenceDiagramDigest.js.map +0 -1
- package/built/cmds/compare/loadFindings.js.map +0 -1
- package/built/cmds/compare-report/normalizeAppMapId.js.map +0 -1
- /package/built/{cmds/compare → diffArchive}/RevisionName.js +0 -0
- /package/built/{cmds/archive → lib}/ArchiveMetadata.js +0 -0
- /package/built/{cmds/compare-report → lib}/normalizeAppMapId.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArchiveMetadata.js","sourceRoot":"","sources":["../../src/lib/ArchiveMetadata.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizeAppMapId.js","sourceRoot":"","sources":["../../src/lib/normalizeAppMapId.ts"],"names":[],"mappings":";;AAAA,qCAA+B;AAE/B,SAAwB,iBAAiB,CAAC,EAAU;IAClD,IAAI,YAAY,GAAG,EAAE,CAAC;IACtB,IAAI,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,YAAY,GAAG,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAClF,IAAI,YAAY,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE;QACzC,IAAA,cAAI,EAAC,aAAa,EAAE,wCAAwC,CAAC,CAAC;QAC9D,YAAY,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;KAClE;IACD,OAAO,YAAY,CAAC;AACtB,CAAC;AARD,oCAQC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolvePath = void 0;
|
|
4
|
+
const path_1 = require("path");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
const glob_1 = require("glob");
|
|
7
|
+
const util_1 = require("util");
|
|
8
|
+
/**
|
|
9
|
+
* Resolve a path to an actual file that exists within the working directory.
|
|
10
|
+
* If the languageName is Java, the directory tree will be searched for the path. This is
|
|
11
|
+
* because Java files are organized into a directory structure that matches the package
|
|
12
|
+
* names, but the root of that directory structure is not known.
|
|
13
|
+
* If there are multiple matching files, the shortest path is returned.
|
|
14
|
+
*/
|
|
15
|
+
async function resolvePath(path, languageName) {
|
|
16
|
+
// Normalize absolute path to relative path, if the path is within the source tree.
|
|
17
|
+
if (path.startsWith(process.cwd()))
|
|
18
|
+
path = path.slice(process.cwd().length + 1);
|
|
19
|
+
// Discard paths that are outside the source tree.
|
|
20
|
+
if ((0, path_1.isAbsolute)(path))
|
|
21
|
+
return;
|
|
22
|
+
// Return the path if it exists.
|
|
23
|
+
if (await (0, utils_1.exists)(path))
|
|
24
|
+
return path;
|
|
25
|
+
// Search for the path if the language is Java.
|
|
26
|
+
if (!languageName)
|
|
27
|
+
return;
|
|
28
|
+
if (languageName.toLowerCase() === 'java') {
|
|
29
|
+
const matches = (await (0, util_1.promisify)(glob_1.glob)(`**/${path}`)).sort((a, b) => a.length - b.length);
|
|
30
|
+
if (matches.length === 0)
|
|
31
|
+
return;
|
|
32
|
+
return matches[0];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.resolvePath = resolvePath;
|
|
36
|
+
//# sourceMappingURL=resolvePath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolvePath.js","sourceRoot":"","sources":["../../src/lib/resolvePath.ts"],"names":[],"mappings":";;;AAAA,+BAAkC;AAClC,oCAAkC;AAClC,+BAA4B;AAC5B,+BAAiC;AAEjC;;;;;;GAMG;AACI,KAAK,UAAU,WAAW,CAC/B,IAAY,EACZ,YAAqB;IAErB,mFAAmF;IACnF,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;QAAE,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAEhF,kDAAkD;IAClD,IAAI,IAAA,iBAAU,EAAC,IAAI,CAAC;QAAE,OAAO;IAE7B,gCAAgC;IAChC,IAAI,MAAM,IAAA,cAAM,EAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAEpC,+CAA+C;IAC/C,IAAI,CAAC,YAAY;QAAE,OAAO;IAE1B,IAAI,YAAY,CAAC,WAAW,EAAE,KAAK,MAAM,EAAE;QACzC,MAAM,OAAO,GAAG,CAAC,MAAM,IAAA,gBAAS,EAAC,WAAI,CAAC,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC;QAC1F,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO;QAEjC,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;KACnB;AACH,CAAC;AAtBD,kCAsBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appland/appmap",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.105.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"bin": "built/cli.js",
|
|
6
6
|
"engines": {
|
|
@@ -122,6 +122,7 @@
|
|
|
122
122
|
"ps-node": "^0.1.6",
|
|
123
123
|
"read-pkg-up": "^7.0.1",
|
|
124
124
|
"semver": "^7.3.5",
|
|
125
|
+
"sql-formatter": "^4.0.2",
|
|
125
126
|
"strip-ansi": "^6.0.0",
|
|
126
127
|
"validator": "^13.7.0",
|
|
127
128
|
"w3c-xmlserializer": "^2.0.0",
|
|
@@ -12,13 +12,13 @@ Review changes
|
|
|
12
12
|
```
|
|
13
13
|
{{{@key}}}
|
|
14
14
|
```
|
|
15
|
-
|
|
16
15
|
{{#each this}}
|
|
17
|
-
|
|
16
|
+
|
|
17
|
+
[{{name}}]({{ appmap_diff_url . }})
|
|
18
18
|
{{/each}}
|
|
19
19
|
{{/each}}
|
|
20
|
-
|
|
21
20
|
{{#if pruned}}
|
|
21
|
+
|
|
22
22
|
Because there are many changed AppMaps, some of them are not listed in this report.
|
|
23
23
|
{{/if}}
|
|
24
24
|
</details>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<p/>
|
|
11
11
|
|
|
12
12
|
<!-- testLocation -->
|
|
13
|
-
|
|
13
|
+
{{ source_link testLocation }} failed with error:
|
|
14
14
|
|
|
15
15
|
{{#if failureMessage}}
|
|
16
16
|
<!-- failureMessage -->
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
<!-- failureLocation -->
|
|
23
23
|
{{#if failureLocation}}
|
|
24
|
-
The error occurred at
|
|
24
|
+
The error occurred at {{ source_link failureLocation }}:
|
|
25
25
|
{{/if}}
|
|
26
26
|
|
|
27
27
|
{{#if testSnippet}}
|
|
@@ -52,6 +52,7 @@ The error occurred at [{{failureLocation}}]({{ source_url failureLocation }}):
|
|
|
52
52
|
|
|
53
53
|
{{/each}}
|
|
54
54
|
{{#if pruned}}
|
|
55
|
+
|
|
55
56
|
Because there are many failed tests, some of them are not listed in this report.
|
|
56
57
|
{{/if}}
|
|
57
58
|
{{/if}}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
{{#*inline "finding-stack" }}
|
|
2
2
|
{{#with stack }}
|
|
3
3
|
{{#each this }}
|
|
4
|
-
|
|
5
|
-
- [{{this}}]({{ source_url this }})
|
|
6
|
-
{{else}}
|
|
7
|
-
- {{ this }}
|
|
8
|
-
{{/if}}
|
|
4
|
+
- {{ source_link this }}
|
|
9
5
|
{{/each}}
|
|
10
6
|
{{/with}}
|
|
11
7
|
|
|
@@ -29,7 +25,7 @@
|
|
|
29
25
|
|
|
30
26
|
##### View in AppMap
|
|
31
27
|
|
|
32
|
-
- [Full AppMap »]({{
|
|
28
|
+
- [Full AppMap »]({{ appmap_url_with_finding 'head' appmap finding.hash_v2 }})
|
|
33
29
|
{{#if appmap.changed}}
|
|
34
30
|
- [Sequence diagram diff »]({{ appmap_diff_url appmap }})
|
|
35
31
|
{{/if}}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{{#if newAppMaps.length }}
|
|
2
2
|
<h2 id="new-appmaps">⭐ New AppMaps</h2>
|
|
3
|
-
{{#each newAppMaps}}
|
|
4
3
|
|
|
5
|
-
|
|
4
|
+
{{#each newAppMaps}}
|
|
6
5
|
|
|
6
|
+
[{{appmap_title this}}]({{ appmap_url 'head' this }}){{#if metadata.source_location }} from {{ source_link metadata.source_location }}{{/if}}
|
|
7
7
|
{{/each}}
|
|
8
8
|
{{#if pruned}}
|
|
9
|
+
|
|
9
10
|
Because there are many new AppMaps, some of them are not listed in this report.
|
|
10
11
|
{{/if}}
|
|
11
12
|
{{/if}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{{#*inline "api-change"}}
|
|
2
|
-
{{title}}
|
|
2
|
+
{{title}} `{{location}}`
|
|
3
3
|
{{~/inline}}
|
|
4
4
|
{{#if openapiDiff.differenceCount}}
|
|
5
5
|
<h2 id="openapi-changes">🔄 API changes</h2>
|
|
@@ -35,11 +35,12 @@
|
|
|
35
35
|
- {{> api-change }}
|
|
36
36
|
{{/each}}
|
|
37
37
|
{{/if}}
|
|
38
|
-
|
|
39
38
|
{{#if pruned}}
|
|
39
|
+
|
|
40
40
|
Because there are many OpenAPI changes, some of them are not listed in this report,
|
|
41
41
|
and the full diff has not been printed either.
|
|
42
42
|
{{else}}
|
|
43
|
+
|
|
43
44
|
<details>
|
|
44
45
|
<summary>
|
|
45
46
|
Detailed OpenAPI diff
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
<h2 id="removed-appmaps">✖️ Removed AppMaps</h2>
|
|
3
3
|
{{#each removedAppMaps}}
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
[{{appmap_title this}}]({{ appmap_url 'base' this }})
|
|
7
6
|
{{/each}}
|
|
8
7
|
{{#if pruned}}
|
|
8
|
+
|
|
9
9
|
Because there are many removed AppMaps, some of them are not listed in this report.
|
|
10
10
|
{{/if}}
|
|
11
11
|
{{/if}}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{{#with sqlDiff }}
|
|
2
|
+
{{~#if (length newQueries newTables) }}
|
|
3
|
+
<h2 id="sql-changes">🔍 SQL changes</h2>
|
|
4
|
+
|
|
5
|
+
{{#if (length newQueries) }}
|
|
6
|
+
### New queries ({{ length newQueries }})
|
|
7
|
+
|
|
8
|
+
{{#each newQueries}}
|
|
9
|
+
|
|
10
|
+
<details>
|
|
11
|
+
<summary>
|
|
12
|
+
<code>{{{ words query 5 }}}</code> {{#if (length sourceLocations) }} at {{ source_link_html (first sourceLocations) }}{{/if}}
|
|
13
|
+
</summary>
|
|
14
|
+
|
|
15
|
+
```sql
|
|
16
|
+
{{{ query }}}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
{{#if ( gt (length sourceLocations) 1 ) }}
|
|
20
|
+
|
|
21
|
+
All source locations:
|
|
22
|
+
|
|
23
|
+
{{#each sourceLocations}}
|
|
24
|
+
* {{ source_link this }}
|
|
25
|
+
{{/each}}
|
|
26
|
+
{{/if}}
|
|
27
|
+
|
|
28
|
+
{{#with (first appmaps) }}
|
|
29
|
+
{{#if sourceDiff}}
|
|
30
|
+
**Related code changes**
|
|
31
|
+
|
|
32
|
+
```diff
|
|
33
|
+
{{{ sourceDiff }}}
|
|
34
|
+
```
|
|
35
|
+
{{/if}}
|
|
36
|
+
{{/with}}
|
|
37
|
+
|
|
38
|
+
Occurs in {{ length appmaps }} {{ pluralize (length appmaps) 'AppMap' }}:
|
|
39
|
+
|
|
40
|
+
| Name | Source location | AppMap diagram | Diff diagram |
|
|
41
|
+
| --- | --- | --- | ---|
|
|
42
|
+
{{#each appmaps }}
|
|
43
|
+
| {{ metadata.name }} | {{ source_link metadata.source_location }} | [Full AppMap »]({{ appmap_url 'head' @this }}) | [Sequence diagram diff »]({{ appmap_diff_url @this }}) |
|
|
44
|
+
{{/each}}
|
|
45
|
+
</details>
|
|
46
|
+
{{/each}}
|
|
47
|
+
{{/if}}
|
|
48
|
+
|
|
49
|
+
{{#if (length newTables) }}
|
|
50
|
+
### Added tables
|
|
51
|
+
|
|
52
|
+
{{#each newTables}}`{{@this}}` {{/each}}
|
|
53
|
+
{{/if}}
|
|
54
|
+
|
|
55
|
+
{{#if sqlDiff.pruned}}
|
|
56
|
+
Because there are many SQL changes, some of them are not listed in this report.
|
|
57
|
+
{{/if}}
|
|
58
|
+
{{/if}}
|
|
59
|
+
{{/with}}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{{#with sqlDiff }}
|
|
2
|
+
| {{ section_link 'SQL changes' 'sql-changes' (length newQueries newTables) }} |
|
|
3
|
+
{{~#if (length newQueries newTables) }}
|
|
4
|
+
:mag:
|
|
5
|
+
{{~#if (length newQueries) }}
|
|
6
|
+
{{ length newQueries }} new queries
|
|
7
|
+
{{~/if}}
|
|
8
|
+
{{~#if (length newTables) }}
|
|
9
|
+
{{~#if (length newQueries) }}, {{/if}}
|
|
10
|
+
{{ length newTables }} new tables
|
|
11
|
+
{{~/if}}
|
|
12
|
+
{{~else}} :zero: No SQL changes
|
|
13
|
+
{{~/if}} |
|
|
14
|
+
{{~/with}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ArchiveMetadata.js","sourceRoot":"","sources":["../../../src/cmds/archive/ArchiveMetadata.ts"],"names":[],"mappings":""}
|