@appland/appmap 3.185.0 → 3.185.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 +14 -0
- package/built/rpc/explain/location.js +30 -12
- package/built/rpc/explain/location.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@appland/appmap-v3.185.2](https://github.com/getappmap/appmap-js/compare/@appland/appmap-v3.185.1...@appland/appmap-v3.185.2) (2025-02-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Update @appland/navie to v1.42.1 ([cb9ac3f](https://github.com/getappmap/appmap-js/commit/cb9ac3f00296ea1e0a5484d1086e3b1e4bfd64a4))
|
|
7
|
+
|
|
8
|
+
# [@appland/appmap-v3.185.1](https://github.com/getappmap/appmap-js/compare/@appland/appmap-v3.185.0...@appland/appmap-v3.185.1) (2025-02-09)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* Normalize Windows path locations ([d385771](https://github.com/getappmap/appmap-js/commit/d385771d3c80cfc95ea5b38b8bfd52ba1842e551))
|
|
14
|
+
|
|
1
15
|
# [@appland/appmap-v3.185.0](https://github.com/getappmap/appmap-js/compare/@appland/appmap-v3.184.0...@appland/appmap-v3.185.0) (2025-02-05)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const node_console_1 = require("node:console");
|
|
4
|
+
const node_os_1 = require("node:os");
|
|
5
|
+
function normalizePath(location) {
|
|
6
|
+
if ((0, node_os_1.platform)() !== 'win32')
|
|
7
|
+
return location;
|
|
8
|
+
// This fixes up a few issues observed with Windows paths:
|
|
9
|
+
// 1. Leading slashes can be present in the path. This is likely an artifact of how the path is
|
|
10
|
+
// constructed in the client (e.g., via a file scheme URI).
|
|
11
|
+
// 2. Drive letters are down cased. Again, likely due to file URIs.
|
|
12
|
+
// 3. Path separators are normalized to backslashes.
|
|
13
|
+
//
|
|
14
|
+
// These cases originate from both JetBrains and VSCode. It'd be better to fix them at the source,
|
|
15
|
+
// though fixing it here leaves no room for version mismatches.
|
|
16
|
+
return location
|
|
17
|
+
.replace(/\//g, '\\')
|
|
18
|
+
.replace(/^(\\+)?(\w:)/, (_, __, driveLetter) => driveLetter.toUpperCase());
|
|
19
|
+
}
|
|
4
20
|
class Location {
|
|
5
21
|
constructor(path, lineRange) {
|
|
6
22
|
this.path = path;
|
|
@@ -37,18 +53,20 @@ class Location {
|
|
|
37
53
|
return this.lineRange ? `${this.path}:${this.lineRange}` : this.path;
|
|
38
54
|
}
|
|
39
55
|
static parse(location) {
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
56
|
+
const normalizedLocation = normalizePath(location);
|
|
57
|
+
const match = normalizedLocation.match(/^(.+?)(?::(\d+)(?:-(\d+)?)?)?$/);
|
|
58
|
+
if (!match) {
|
|
59
|
+
// This should never happen. `normalizedLocation` would need to be empty.
|
|
60
|
+
return new Location(normalizedLocation);
|
|
61
|
+
}
|
|
62
|
+
const [, filePath, start, end] = match;
|
|
63
|
+
const startValid = start && !Number.isNaN(parseInt(start, 10));
|
|
64
|
+
if (startValid) {
|
|
65
|
+
const endValid = end && !Number.isNaN(parseInt(end, 10));
|
|
66
|
+
const range = endValid ? `${start}-${end}` : start;
|
|
67
|
+
return new Location(filePath, range);
|
|
68
|
+
}
|
|
69
|
+
return new Location(filePath);
|
|
52
70
|
}
|
|
53
71
|
}
|
|
54
72
|
exports.default = Location;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"location.js","sourceRoot":"","sources":["../../../src/rpc/explain/location.ts"],"names":[],"mappings":";;AAAA,+CAAoC;
|
|
1
|
+
{"version":3,"file":"location.js","sourceRoot":"","sources":["../../../src/rpc/explain/location.ts"],"names":[],"mappings":";;AAAA,+CAAoC;AACpC,qCAAmC;AAEnC,SAAS,aAAa,CAAC,QAAgB;IACrC,IAAI,IAAA,kBAAQ,GAAE,KAAK,OAAO;QAAE,OAAO,QAAQ,CAAC;IAE5C,0DAA0D;IAC1D,+FAA+F;IAC/F,8DAA8D;IAC9D,mEAAmE;IACnE,oDAAoD;IACpD,EAAE;IACF,kGAAkG;IAClG,+DAA+D;IAC/D,OAAO,QAAQ;SACZ,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC;SACpB,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,WAAmB,EAAE,EAAE,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC;AACxF,CAAC;AAED,MAAqB,QAAQ;IAC3B,YAAmB,IAAY,EAAS,SAAkB;QAAvC,SAAI,GAAJ,IAAI,CAAQ;QAAS,cAAS,GAAT,SAAS,CAAS;IAAG,CAAC;IAE9D,OAAO,CAAC,QAAgB;QACtB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACnB,IAAI,QAAQ,CAAC,MAAM,GAAG,SAAS,EAAE;gBAC/B,kDAAkD;gBAClD,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBACnC,IAAI,KAAK,GAAG,CAAC,CAAC;gBACd,IAAI,CAAC,GAAG,CAAC,CAAC;gBACV,OAAO,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;oBAC5B,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;oBAC7B,IAAI,KAAK,GAAG,SAAS;wBAAE,MAAM;iBAC9B;gBACD,IAAI,CAAC,KAAK,CAAC;oBAAE,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CAAC;QACvC,MAAM,UAAU,GAAG,KAAK,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;QAC/D,IAAI,UAAU,EAAE;YACd,MAAM,QAAQ,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC;YACzD,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;YACnD,OAAO,IAAI,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;SACtC;QACD,OAAO,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;CACF;AAlDD,2BAkDC;AAED,8DAA8D;AAC9D,kDAAkD;AAClD,MAAM,SAAS,GAAG,KAAM,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appland/appmap",
|
|
3
|
-
"version": "3.185.
|
|
3
|
+
"version": "3.185.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"bin": "built/cli.js",
|
|
6
6
|
"engines": {
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"@appland/components": "^4.12.0",
|
|
91
91
|
"@appland/diagrams": "^1.8.0",
|
|
92
92
|
"@appland/models": "^2.10.2",
|
|
93
|
-
"@appland/navie": "^1.
|
|
93
|
+
"@appland/navie": "^1.42.1",
|
|
94
94
|
"@appland/openapi": "^1.8.0",
|
|
95
95
|
"@appland/rpc": "^1.13.0",
|
|
96
96
|
"@appland/scanner": "^1.86.0",
|