source-map-explorer 2.5.2 → 2.5.3
Sign up to get free protection for your applications and to get access to all the features.
- package/bin/cli.d.ts +5 -5
- package/lib/api.d.ts +4 -4
- package/lib/app-error.d.ts +39 -39
- package/lib/coverage.d.ts +4 -4
- package/lib/explore.d.ts +8 -8
- package/lib/helpers.d.ts +11 -11
- package/lib/html.d.ts +18 -18
- package/lib/index.d.ts +4 -4
- package/lib/output.d.ts +3 -3
- package/lib/tsconfig.tsbuildinfo +3379 -0
- package/package.json +3 -3
package/bin/cli.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
#!/usr/bin/env node
|
2
|
-
import type { ErrorContext } from '../lib/app-error';
|
3
|
-
export declare function logError(message: string | ErrorContext, error?: Error): void;
|
4
|
-
export declare function logWarn(message: string): void;
|
5
|
-
export declare function logInfo(message: string): void;
|
1
|
+
#!/usr/bin/env node
|
2
|
+
import type { ErrorContext } from '../lib/app-error';
|
3
|
+
export declare function logError(message: string | ErrorContext, error?: Error): void;
|
4
|
+
export declare function logWarn(message: string): void;
|
5
|
+
export declare function logInfo(message: string): void;
|
package/lib/api.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { Bundle, BundlesAndFileTokens, ExploreOptions, ExploreResult } from './types';
|
2
|
-
export declare function explore(bundlesAndFileTokens: BundlesAndFileTokens, options?: ExploreOptions): Promise<ExploreResult>;
|
3
|
-
export declare function getBundles(fileTokens: string[]): Bundle[];
|
4
|
-
export declare function getBundleName(bundle: Bundle): string;
|
1
|
+
import type { Bundle, BundlesAndFileTokens, ExploreOptions, ExploreResult } from './types';
|
2
|
+
export declare function explore(bundlesAndFileTokens: BundlesAndFileTokens, options?: ExploreOptions): Promise<ExploreResult>;
|
3
|
+
export declare function getBundles(fileTokens: string[]): Bundle[];
|
4
|
+
export declare function getBundleName(bundle: Bundle): string;
|
package/lib/app-error.d.ts
CHANGED
@@ -1,39 +1,39 @@
|
|
1
|
-
/// <reference types="node" />
|
2
|
-
import type { ErrorCode } from './types';
|
3
|
-
export declare class AppError extends Error {
|
4
|
-
code?: ErrorCode;
|
5
|
-
cause?: Error;
|
6
|
-
constructor(errorContext: ErrorContext, error?: NodeJS.ErrnoException);
|
7
|
-
}
|
8
|
-
export declare const SOURCE_MAP_INFO_URL = "https://github.com/danvk/source-map-explorer/blob/master/README.md#generating-source-maps";
|
9
|
-
interface CommonErrorContext {
|
10
|
-
code: 'NoBundles' | 'NoSourceMap' | 'CannotSaveFile' | 'CannotCreateTempFile' | 'CannotOpenCoverageFile' | 'NoCoverageMatches' | 'Unknown';
|
11
|
-
}
|
12
|
-
interface OneSourceSourceMapErrorContext {
|
13
|
-
code: 'OneSourceSourceMap';
|
14
|
-
filename: string;
|
15
|
-
}
|
16
|
-
interface UnmappedBytesErrorContext {
|
17
|
-
code: 'UnmappedBytes';
|
18
|
-
totalBytes: number;
|
19
|
-
unmappedBytes: number;
|
20
|
-
}
|
21
|
-
interface InvalidMappingLineErrorContext {
|
22
|
-
code: 'InvalidMappingLine';
|
23
|
-
generatedLine: number;
|
24
|
-
maxLine: number;
|
25
|
-
}
|
26
|
-
interface InvalidMappingColumnErrorContext {
|
27
|
-
code: 'InvalidMappingColumn';
|
28
|
-
generatedLine: number;
|
29
|
-
generatedColumn: number;
|
30
|
-
maxColumn: number;
|
31
|
-
}
|
32
|
-
interface CannotOpenTempFileErrorContext {
|
33
|
-
code: 'CannotOpenTempFile';
|
34
|
-
error: Buffer;
|
35
|
-
tempFile: string;
|
36
|
-
}
|
37
|
-
export declare type ErrorContext = CommonErrorContext | OneSourceSourceMapErrorContext | UnmappedBytesErrorContext | InvalidMappingLineErrorContext | InvalidMappingColumnErrorContext | CannotOpenTempFileErrorContext;
|
38
|
-
export declare function getErrorMessage(context: ErrorContext): string;
|
39
|
-
export {};
|
1
|
+
/// <reference types="node" />
|
2
|
+
import type { ErrorCode } from './types';
|
3
|
+
export declare class AppError extends Error {
|
4
|
+
code?: ErrorCode;
|
5
|
+
cause?: Error;
|
6
|
+
constructor(errorContext: ErrorContext, error?: NodeJS.ErrnoException);
|
7
|
+
}
|
8
|
+
export declare const SOURCE_MAP_INFO_URL = "https://github.com/danvk/source-map-explorer/blob/master/README.md#generating-source-maps";
|
9
|
+
interface CommonErrorContext {
|
10
|
+
code: 'NoBundles' | 'NoSourceMap' | 'CannotSaveFile' | 'CannotCreateTempFile' | 'CannotOpenCoverageFile' | 'NoCoverageMatches' | 'Unknown';
|
11
|
+
}
|
12
|
+
interface OneSourceSourceMapErrorContext {
|
13
|
+
code: 'OneSourceSourceMap';
|
14
|
+
filename: string;
|
15
|
+
}
|
16
|
+
interface UnmappedBytesErrorContext {
|
17
|
+
code: 'UnmappedBytes';
|
18
|
+
totalBytes: number;
|
19
|
+
unmappedBytes: number;
|
20
|
+
}
|
21
|
+
interface InvalidMappingLineErrorContext {
|
22
|
+
code: 'InvalidMappingLine';
|
23
|
+
generatedLine: number;
|
24
|
+
maxLine: number;
|
25
|
+
}
|
26
|
+
interface InvalidMappingColumnErrorContext {
|
27
|
+
code: 'InvalidMappingColumn';
|
28
|
+
generatedLine: number;
|
29
|
+
generatedColumn: number;
|
30
|
+
maxColumn: number;
|
31
|
+
}
|
32
|
+
interface CannotOpenTempFileErrorContext {
|
33
|
+
code: 'CannotOpenTempFile';
|
34
|
+
error: Buffer;
|
35
|
+
tempFile: string;
|
36
|
+
}
|
37
|
+
export declare type ErrorContext = CommonErrorContext | OneSourceSourceMapErrorContext | UnmappedBytesErrorContext | InvalidMappingLineErrorContext | InvalidMappingColumnErrorContext | CannotOpenTempFileErrorContext;
|
38
|
+
export declare function getErrorMessage(context: ErrorContext): string;
|
39
|
+
export {};
|
package/lib/coverage.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { Bundle, ColumnsRange, MappingRange, FileDataMap } from './types';
|
2
|
-
export declare function addCoverageRanges(bundles: Bundle[], coverageFilename?: string): Bundle[];
|
3
|
-
export declare function setCoveredSizes(line: string, files: FileDataMap, mappingRanges: MappingRange[], coveredRanges: ColumnsRange[]): FileDataMap;
|
4
|
-
export declare function getColorByPercent(percent: number): string;
|
1
|
+
import type { Bundle, ColumnsRange, MappingRange, FileDataMap } from './types';
|
2
|
+
export declare function addCoverageRanges(bundles: Bundle[], coverageFilename?: string): Bundle[];
|
3
|
+
export declare function setCoveredSizes(line: string, files: FileDataMap, mappingRanges: MappingRange[], coveredRanges: ColumnsRange[]): FileDataMap;
|
4
|
+
export declare function getColorByPercent(percent: number): string;
|
package/lib/explore.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
import type { Bundle, ExploreBundleResult, ExploreOptions, FileDataMap } from './types';
|
2
|
-
export declare const UNMAPPED_KEY = "[unmapped]";
|
3
|
-
export declare const SOURCE_MAP_COMMENT_KEY = "[sourceMappingURL]";
|
4
|
-
export declare const NO_SOURCE_KEY = "[no source]";
|
5
|
-
export declare const EOL_KEY = "[EOLs]";
|
6
|
-
export declare const SPECIAL_FILENAMES: string[];
|
7
|
-
export declare function exploreBundle(bundle: Bundle, options: ExploreOptions): Promise<ExploreBundleResult>;
|
8
|
-
export declare function adjustSourcePaths(fileSizeMap: FileDataMap, options: ExploreOptions): FileDataMap;
|
1
|
+
import type { Bundle, ExploreBundleResult, ExploreOptions, FileDataMap } from './types';
|
2
|
+
export declare const UNMAPPED_KEY = "[unmapped]";
|
3
|
+
export declare const SOURCE_MAP_COMMENT_KEY = "[sourceMappingURL]";
|
4
|
+
export declare const NO_SOURCE_KEY = "[no source]";
|
5
|
+
export declare const EOL_KEY = "[EOLs]";
|
6
|
+
export declare const SPECIAL_FILENAMES: string[];
|
7
|
+
export declare function exploreBundle(bundle: Bundle, options: ExploreOptions): Promise<ExploreBundleResult>;
|
8
|
+
export declare function adjustSourcePaths(fileSizeMap: FileDataMap, options: ExploreOptions): FileDataMap;
|
package/lib/helpers.d.ts
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
/// <reference types="node" />
|
2
|
-
import type { MappingRange } from './types';
|
3
|
-
export declare function getFileContent(file: Buffer | string): string;
|
4
|
-
export declare function formatBytes(bytes: number, decimals?: number): string;
|
5
|
-
export declare function formatPercent(value: number, total: number, fractionDigits?: number): string;
|
6
|
-
export declare function getCommonPathPrefix(paths: string[]): string;
|
7
|
-
export declare function getFirstRegexMatch(regex: RegExp, string: string): string | null;
|
8
|
-
export declare function detectEOL(content: string): string;
|
9
|
-
export declare function getOccurrencesCount(subString: string, string: string): number;
|
10
|
-
export declare function isEOLAtPosition(string: string, [line, column]: [number, number]): boolean;
|
11
|
-
export declare function mergeRanges(ranges: MappingRange[]): MappingRange[];
|
1
|
+
/// <reference types="node" />
|
2
|
+
import type { MappingRange } from './types';
|
3
|
+
export declare function getFileContent(file: Buffer | string): string;
|
4
|
+
export declare function formatBytes(bytes: number, decimals?: number): string;
|
5
|
+
export declare function formatPercent(value: number, total: number, fractionDigits?: number): string;
|
6
|
+
export declare function getCommonPathPrefix(paths: string[]): string;
|
7
|
+
export declare function getFirstRegexMatch(regex: RegExp, string: string): string | null;
|
8
|
+
export declare function detectEOL(content: string): string;
|
9
|
+
export declare function getOccurrencesCount(subString: string, string: string): number;
|
10
|
+
export declare function isEOLAtPosition(string: string, [line, column]: [number, number]): boolean;
|
11
|
+
export declare function mergeRanges(ranges: MappingRange[]): MappingRange[];
|
package/lib/html.d.ts
CHANGED
@@ -1,18 +1,18 @@
|
|
1
|
-
import type { ExploreOptions, ExploreBundleResult, FileDataMap } from './types';
|
2
|
-
export declare function generateHtml(exploreResults: ExploreBundleResult[], options: ExploreOptions): string;
|
3
|
-
export declare function makeMergedTreeDataMap(treeData: WebTreeData[]): WebTreeData;
|
4
|
-
interface WebTreeMapNode {
|
5
|
-
name: string;
|
6
|
-
data: {
|
7
|
-
$area: number;
|
8
|
-
coveredSize?: number;
|
9
|
-
backgroundColor?: string;
|
10
|
-
};
|
11
|
-
children?: WebTreeMapNode[];
|
12
|
-
}
|
13
|
-
export interface WebTreeData {
|
14
|
-
name: string;
|
15
|
-
data: WebTreeMapNode;
|
16
|
-
}
|
17
|
-
export declare function getWebTreeMapData(files: FileDataMap): WebTreeMapNode;
|
18
|
-
export {};
|
1
|
+
import type { ExploreOptions, ExploreBundleResult, FileDataMap } from './types';
|
2
|
+
export declare function generateHtml(exploreResults: ExploreBundleResult[], options: ExploreOptions): string;
|
3
|
+
export declare function makeMergedTreeDataMap(treeData: WebTreeData[]): WebTreeData;
|
4
|
+
interface WebTreeMapNode {
|
5
|
+
name: string;
|
6
|
+
data: {
|
7
|
+
$area: number;
|
8
|
+
coveredSize?: number;
|
9
|
+
backgroundColor?: string;
|
10
|
+
};
|
11
|
+
children?: WebTreeMapNode[];
|
12
|
+
}
|
13
|
+
export interface WebTreeData {
|
14
|
+
name: string;
|
15
|
+
data: WebTreeMapNode;
|
16
|
+
}
|
17
|
+
export declare function getWebTreeMapData(files: FileDataMap): WebTreeMapNode;
|
18
|
+
export {};
|
package/lib/index.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { explore } from './api';
|
2
|
-
export { UNMAPPED_KEY, SOURCE_MAP_COMMENT_KEY, NO_SOURCE_KEY } from './explore';
|
3
|
-
export { explore };
|
4
|
-
export default explore;
|
1
|
+
import { explore } from './api';
|
2
|
+
export { UNMAPPED_KEY, SOURCE_MAP_COMMENT_KEY, NO_SOURCE_KEY } from './explore';
|
3
|
+
export { explore };
|
4
|
+
export default explore;
|
package/lib/output.d.ts
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
import type { ExploreBundleResult, ExploreOptions, ExploreResult } from './types';
|
2
|
-
export declare function formatOutput(results: ExploreBundleResult[], options: ExploreOptions): string | undefined;
|
3
|
-
export declare function saveOutputToFile(result: ExploreResult, options: ExploreOptions): void;
|
1
|
+
import type { ExploreBundleResult, ExploreOptions, ExploreResult } from './types';
|
2
|
+
export declare function formatOutput(results: ExploreBundleResult[], options: ExploreOptions): string | undefined;
|
3
|
+
export declare function saveOutputToFile(result: ExploreResult, options: ExploreOptions): void;
|