@remotex-labs/xmap 2.1.0 → 3.0.1
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/README.md +9 -4
- package/dist/cjs/formatter.component.js +5 -0
- package/dist/cjs/formatter.component.js.map +8 -0
- package/dist/cjs/highlighter.component.js +2 -0
- package/dist/cjs/highlighter.component.js.map +8 -0
- package/dist/cjs/index.js +3 -7
- package/dist/cjs/index.js.map +5 -5
- package/dist/cjs/parser.component.js +3 -0
- package/dist/cjs/parser.component.js.map +8 -0
- package/dist/components/base64.component.d.ts +58 -14
- package/dist/components/formatter.component.d.ts +37 -35
- package/dist/components/highlighter.component.d.ts +8 -10
- package/dist/components/interfaces/{formatter.interface.d.ts → formatter-component.interface.d.ts} +27 -9
- package/dist/components/interfaces/parse-component.interface.d.ts +52 -0
- package/dist/components/parser.component.d.ts +6 -2
- package/dist/esm/formatter.component.js +5 -0
- package/dist/esm/formatter.component.js.map +8 -0
- package/dist/esm/highlighter.component.js +2 -0
- package/dist/esm/highlighter.component.js.map +8 -0
- package/dist/esm/index.js +3 -7
- package/dist/esm/index.js.map +5 -5
- package/dist/esm/parser.component.js +3 -0
- package/dist/esm/parser.component.js.map +8 -0
- package/dist/index.d.ts +1 -7
- package/dist/providers/mapping.provider.d.ts +2 -2
- package/dist/services/interfaces/source-service.interface.d.ts +139 -0
- package/dist/services/source.service.d.ts +2 -2
- package/package.json +34 -12
- package/dist/components/interfaces/parse.interface.d.ts +0 -32
- package/dist/services/interfaces/source.interface.d.ts +0 -53
- /package/dist/components/interfaces/{highlighter.interface.d.ts → highlighter-component.interface.d.ts} +0 -0
- /package/dist/providers/interfaces/{mapping.interface.d.ts → mapping-provider.interface.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
7
7
|
"author": "Garefild",
|
|
8
|
-
"version": "
|
|
8
|
+
"version": "3.0.1",
|
|
9
9
|
"license": "Mozilla Public License Version 2.0",
|
|
10
10
|
"description": "A library with a sourcemap parser and TypeScript code formatter for the CLI",
|
|
11
11
|
"homepage": "https://github.com/remotex-lab/xMap",
|
|
@@ -34,17 +34,39 @@
|
|
|
34
34
|
"engines": {
|
|
35
35
|
"node": ">=18"
|
|
36
36
|
},
|
|
37
|
+
"typesVersions": {
|
|
38
|
+
"*": {
|
|
39
|
+
"parser.component": [
|
|
40
|
+
"./dist/components/parser.component.d.ts"
|
|
41
|
+
],
|
|
42
|
+
"formatter.component": [
|
|
43
|
+
"./dist/components/formatter.component.d.ts"
|
|
44
|
+
],
|
|
45
|
+
"highlighter.component": [
|
|
46
|
+
"./dist/components/highlighter.component.d.ts"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
},
|
|
37
50
|
"exports": {
|
|
38
|
-
"./package.json": "./package.json",
|
|
39
51
|
".": {
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
52
|
+
"types": "./dist/index.d.ts",
|
|
53
|
+
"require": "./dist/cjs/index.js",
|
|
54
|
+
"default": "./dist/esm/index.js"
|
|
55
|
+
},
|
|
56
|
+
"./parser.component": {
|
|
57
|
+
"types": "./dist/components/parser.component.d.ts",
|
|
58
|
+
"require": "./dist/cjs/parser.component.js",
|
|
59
|
+
"default": "./dist/esm/parser.component.js"
|
|
60
|
+
},
|
|
61
|
+
"./formatter.component": {
|
|
62
|
+
"types": "./dist/components/formatter.component.d.ts",
|
|
63
|
+
"require": "./dist/cjs/formatter.component.js",
|
|
64
|
+
"default": "./dist/esm/formatter.component.js"
|
|
65
|
+
},
|
|
66
|
+
"./highlighter.component": {
|
|
67
|
+
"types": "./dist/components/highlighter.component.d.ts",
|
|
68
|
+
"require": "./dist/cjs/highlighter.component.js",
|
|
69
|
+
"default": "./dist/esm/highlighter.component.js"
|
|
48
70
|
}
|
|
49
71
|
},
|
|
50
72
|
"files": [
|
|
@@ -65,11 +87,11 @@
|
|
|
65
87
|
"devDependencies": {
|
|
66
88
|
"jest": "^29.7.0",
|
|
67
89
|
"eslint": "^9.22.0",
|
|
68
|
-
"typescript-eslint": "^8.
|
|
90
|
+
"typescript-eslint": "^8.27.0",
|
|
69
91
|
"eslint-plugin-tsdoc": "^0.4.0",
|
|
70
92
|
"@swc/jest": "^0.2.37",
|
|
71
93
|
"@types/jest": "^29.5.14",
|
|
72
|
-
"@types/node": "^22.13.
|
|
94
|
+
"@types/node": "^22.13.11",
|
|
73
95
|
"@remotex-labs/xbuild": "^1.5.3"
|
|
74
96
|
},
|
|
75
97
|
"dependencies": {
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Represents a parsed stack frame from an error stack trace
|
|
3
|
-
*
|
|
4
|
-
* @see ParsedStackTrace
|
|
5
|
-
* @since 2.1.0
|
|
6
|
-
*/
|
|
7
|
-
export interface StackFrame {
|
|
8
|
-
source: string;
|
|
9
|
-
fileName: string | null;
|
|
10
|
-
lineNumber: number | null;
|
|
11
|
-
columnNumber: number | null;
|
|
12
|
-
functionName: string | null;
|
|
13
|
-
isEval: boolean;
|
|
14
|
-
evalOrigin?: {
|
|
15
|
-
fileName: string | null;
|
|
16
|
-
lineNumber: number | null;
|
|
17
|
-
columnNumber: number | null;
|
|
18
|
-
functionName: string | null;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Represents a fully parsed error stack trace with structured information
|
|
23
|
-
*
|
|
24
|
-
* @see StackFrame
|
|
25
|
-
* @since 2.1.0
|
|
26
|
-
*/
|
|
27
|
-
export interface ParsedStackTrace {
|
|
28
|
-
name: string;
|
|
29
|
-
message: string;
|
|
30
|
-
stack: StackFrame[];
|
|
31
|
-
rawStack: string;
|
|
32
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Represents a source map structure used for mapping code within a file
|
|
3
|
-
* to its original source. Source maps are essential for debugging minified
|
|
4
|
-
* or transpiled code, as they allow developers to trace back to the
|
|
5
|
-
* original source files and understand the context of the code execution.
|
|
6
|
-
*
|
|
7
|
-
* @interface SourceMapInterface
|
|
8
|
-
* @property file - The generated file's name that the source map is associated with.
|
|
9
|
-
* This property is optional and may be null if not specified.
|
|
10
|
-
* @property names - An array of variable/function names that are present in the original source.
|
|
11
|
-
* These names help in mapping the original code context during debugging.
|
|
12
|
-
* @property version - The version of the source map specification.
|
|
13
|
-
* This should be set to `3` for the standard source map version.
|
|
14
|
-
* @property sources - An array of URLs or paths to the original source files.
|
|
15
|
-
* These sources are used to locate the original code that corresponds to the generated code.
|
|
16
|
-
* @property mappings - A VLQ (Variable-Length Quantity) encoded string that describes how to map the
|
|
17
|
-
* generated code back to the original source code. This property is crucial for the correct functioning of the source map.
|
|
18
|
-
* @property sourceRoot - An optional root URL for the sources.
|
|
19
|
-
* It can be used to specify a base path for resolving the sources, which may be null if not applicable.
|
|
20
|
-
* @property sourcesContent - An optional array containing the content of the original source files.
|
|
21
|
-
* This property can be useful when the original files are not available at runtime.
|
|
22
|
-
*/
|
|
23
|
-
export interface SourceMapInterface {
|
|
24
|
-
file?: string | null;
|
|
25
|
-
names: Array<string>;
|
|
26
|
-
version: number;
|
|
27
|
-
sources: Array<string>;
|
|
28
|
-
mappings: string;
|
|
29
|
-
sourceRoot?: string | null;
|
|
30
|
-
sourcesContent?: Array<string>;
|
|
31
|
-
}
|
|
32
|
-
export interface PositionInterface {
|
|
33
|
-
name: string | null;
|
|
34
|
-
line: number;
|
|
35
|
-
column: number;
|
|
36
|
-
source: string;
|
|
37
|
-
sourceRoot: string | null;
|
|
38
|
-
sourceIndex: number;
|
|
39
|
-
generatedLine: number;
|
|
40
|
-
generatedColumn: number;
|
|
41
|
-
}
|
|
42
|
-
export interface PositionWithContentInterface extends PositionInterface {
|
|
43
|
-
sourcesContent: string;
|
|
44
|
-
}
|
|
45
|
-
export interface PositionWithCodeInterface extends PositionInterface {
|
|
46
|
-
code: string;
|
|
47
|
-
endLine: number;
|
|
48
|
-
startLine: number;
|
|
49
|
-
}
|
|
50
|
-
export interface SourceOptionsInterface {
|
|
51
|
-
linesAfter?: number;
|
|
52
|
-
linesBefore?: number;
|
|
53
|
-
}
|
|
File without changes
|
/package/dist/providers/interfaces/{mapping.interface.d.ts → mapping-provider.interface.d.ts}
RENAMED
|
File without changes
|