metro-source-map 0.83.3 → 0.83.4
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/package.json +6 -7
- package/src/B64Builder.js +5 -1
- package/src/BundleBuilder.js.flow +2 -2
- package/src/Consumer/AbstractConsumer.js +5 -1
- package/src/Consumer/AbstractConsumer.js.flow +2 -2
- package/src/Consumer/DelegatingConsumer.js +5 -1
- package/src/Consumer/DelegatingConsumer.js.flow +2 -2
- package/src/Consumer/MappingsConsumer.js +5 -1
- package/src/Consumer/MappingsConsumer.js.flow +4 -4
- package/src/Consumer/SectionsConsumer.js +5 -1
- package/src/Consumer/SectionsConsumer.js.flow +1 -1
- package/src/Consumer/constants.js.flow +1 -1
- package/src/Consumer/createConsumer.js +5 -1
- package/src/Consumer/createConsumer.js.flow +1 -1
- package/src/Consumer/index.js +5 -1
- package/src/Consumer/normalizeSourcePath.js +5 -1
- package/src/Consumer/search.js.flow +1 -1
- package/src/Consumer/types.js.flow +3 -3
- package/src/Generator.js +5 -1
- package/src/Generator.js.flow +3 -3
- package/src/composeSourceMaps.js +5 -1
- package/src/composeSourceMaps.js.flow +2 -2
- package/src/encode.js.flow +1 -1
- package/src/generateFunctionMap.js +35 -26
- package/src/generateFunctionMap.js.flow +4 -9
- package/src/source-map.js +5 -1
- package/src/source-map.js.flow +12 -12
- package/src/B64Builder.d.ts +0 -47
- package/src/BundleBuilder.d.ts +0 -43
- package/src/Consumer/AbstractConsumer.d.ts +0 -37
- package/src/Consumer/DelegatingConsumer.d.ts +0 -47
- package/src/Consumer/MappingsConsumer.d.ts +0 -43
- package/src/Consumer/SectionsConsumer.d.ts +0 -40
- package/src/Consumer/constants.d.ts +0 -39
- package/src/Consumer/createConsumer.d.ts +0 -15
- package/src/Consumer/index.d.ts +0 -16
- package/src/Consumer/normalizeSourcePath.d.ts +0 -15
- package/src/Consumer/positionMath.d.ts +0 -25
- package/src/Consumer/search.d.ts +0 -15
- package/src/Consumer/types.d.ts +0 -57
- package/src/Generator.d.ts +0 -107
- package/src/composeSourceMaps.d.ts +0 -16
- package/src/encode.d.ts +0 -66
- package/src/generateFunctionMap.d.ts +0 -45
- package/src/source-map.d.ts +0 -155
package/src/source-map.d.ts
DELETED
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @format
|
|
8
|
-
* @oncall react_native
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import type {IConsumer} from './Consumer/types';
|
|
12
|
-
|
|
13
|
-
import {BundleBuilder, createIndexMap} from './BundleBuilder';
|
|
14
|
-
import composeSourceMaps from './composeSourceMaps';
|
|
15
|
-
import Consumer from './Consumer';
|
|
16
|
-
import normalizeSourcePath from './Consumer/normalizeSourcePath';
|
|
17
|
-
import {
|
|
18
|
-
functionMapBabelPlugin,
|
|
19
|
-
generateFunctionMap,
|
|
20
|
-
} from './generateFunctionMap';
|
|
21
|
-
import Generator from './Generator';
|
|
22
|
-
|
|
23
|
-
export type {IConsumer};
|
|
24
|
-
type GeneratedCodeMapping = [number, number];
|
|
25
|
-
type SourceMapping = [number, number, number, number];
|
|
26
|
-
type SourceMappingWithName = [number, number, number, number, string];
|
|
27
|
-
export type MetroSourceMapSegmentTuple =
|
|
28
|
-
| SourceMappingWithName
|
|
29
|
-
| SourceMapping
|
|
30
|
-
| GeneratedCodeMapping;
|
|
31
|
-
export type HermesFunctionOffsets = {
|
|
32
|
-
[$$Key$$: number]: ReadonlyArray<number>;
|
|
33
|
-
};
|
|
34
|
-
export type FBSourcesArray = ReadonlyArray<null | undefined | FBSourceMetadata>;
|
|
35
|
-
export type FBSourceMetadata = [null | undefined | FBSourceFunctionMap];
|
|
36
|
-
export type FBSourceFunctionMap = {
|
|
37
|
-
readonly names: ReadonlyArray<string>;
|
|
38
|
-
readonly mappings: string;
|
|
39
|
-
};
|
|
40
|
-
export type BabelSourceMapSegment = Readonly<{
|
|
41
|
-
generated: Readonly<{column: number; line: number}>;
|
|
42
|
-
original?: Readonly<{column: number; line: number}>;
|
|
43
|
-
source?: null | undefined | string;
|
|
44
|
-
name?: null | undefined | string;
|
|
45
|
-
}>;
|
|
46
|
-
export type FBSegmentMap = {[id: string]: MixedSourceMap};
|
|
47
|
-
export type BasicSourceMap = {
|
|
48
|
-
readonly file?: string;
|
|
49
|
-
readonly mappings: string;
|
|
50
|
-
readonly names: Array<string>;
|
|
51
|
-
readonly sourceRoot?: string;
|
|
52
|
-
readonly sources: Array<string>;
|
|
53
|
-
readonly sourcesContent?: Array<null | undefined | string>;
|
|
54
|
-
readonly version: number;
|
|
55
|
-
readonly x_facebook_offsets?: Array<number>;
|
|
56
|
-
readonly x_metro_module_paths?: Array<string>;
|
|
57
|
-
readonly x_facebook_sources?: FBSourcesArray;
|
|
58
|
-
readonly x_facebook_segments?: FBSegmentMap;
|
|
59
|
-
readonly x_hermes_function_offsets?: HermesFunctionOffsets;
|
|
60
|
-
readonly x_google_ignoreList?: Array<number>;
|
|
61
|
-
};
|
|
62
|
-
export type IndexMapSection = {
|
|
63
|
-
map: IndexMap | BasicSourceMap;
|
|
64
|
-
offset: {line: number; column: number};
|
|
65
|
-
};
|
|
66
|
-
export type IndexMap = {
|
|
67
|
-
readonly file?: string;
|
|
68
|
-
readonly mappings?: void;
|
|
69
|
-
readonly sourcesContent?: void;
|
|
70
|
-
readonly sections: Array<IndexMapSection>;
|
|
71
|
-
readonly version: number;
|
|
72
|
-
readonly x_facebook_offsets?: Array<number>;
|
|
73
|
-
readonly x_metro_module_paths?: Array<string>;
|
|
74
|
-
readonly x_facebook_sources?: void;
|
|
75
|
-
readonly x_facebook_segments?: FBSegmentMap;
|
|
76
|
-
readonly x_hermes_function_offsets?: HermesFunctionOffsets;
|
|
77
|
-
readonly x_google_ignoreList?: void;
|
|
78
|
-
};
|
|
79
|
-
export type MixedSourceMap = IndexMap | BasicSourceMap;
|
|
80
|
-
/**
|
|
81
|
-
* Creates a source map from modules with "raw mappings", i.e. an array of
|
|
82
|
-
* tuples with either 2, 4, or 5 elements:
|
|
83
|
-
* generated line, generated column, source line, source line, symbol name.
|
|
84
|
-
* Accepts an `offsetLines` argument in case modules' code is to be offset in
|
|
85
|
-
* the resulting bundle, e.g. by some prefix code.
|
|
86
|
-
*/
|
|
87
|
-
declare function fromRawMappings(
|
|
88
|
-
modules: ReadonlyArray<{
|
|
89
|
-
readonly map: null | undefined | ReadonlyArray<MetroSourceMapSegmentTuple>;
|
|
90
|
-
readonly functionMap: null | undefined | FBSourceFunctionMap;
|
|
91
|
-
readonly path: string;
|
|
92
|
-
readonly source: string;
|
|
93
|
-
readonly code: string;
|
|
94
|
-
readonly isIgnored: boolean;
|
|
95
|
-
readonly lineCount?: number;
|
|
96
|
-
}>,
|
|
97
|
-
offsetLines?: number,
|
|
98
|
-
): Generator;
|
|
99
|
-
declare function fromRawMappingsNonBlocking(
|
|
100
|
-
modules: ReadonlyArray<{
|
|
101
|
-
readonly map: null | undefined | ReadonlyArray<MetroSourceMapSegmentTuple>;
|
|
102
|
-
readonly functionMap: null | undefined | FBSourceFunctionMap;
|
|
103
|
-
readonly path: string;
|
|
104
|
-
readonly source: string;
|
|
105
|
-
readonly code: string;
|
|
106
|
-
readonly isIgnored: boolean;
|
|
107
|
-
readonly lineCount?: number;
|
|
108
|
-
}>,
|
|
109
|
-
offsetLines?: number,
|
|
110
|
-
): Promise<Generator>;
|
|
111
|
-
/**
|
|
112
|
-
* Transforms a standard source map object into a Raw Mappings object, to be
|
|
113
|
-
* used across the bundler.
|
|
114
|
-
*/
|
|
115
|
-
declare function toBabelSegments(
|
|
116
|
-
sourceMap: BasicSourceMap,
|
|
117
|
-
): Array<BabelSourceMapSegment>;
|
|
118
|
-
declare function toSegmentTuple(
|
|
119
|
-
mapping: BabelSourceMapSegment,
|
|
120
|
-
): MetroSourceMapSegmentTuple;
|
|
121
|
-
export {
|
|
122
|
-
BundleBuilder,
|
|
123
|
-
composeSourceMaps,
|
|
124
|
-
Consumer,
|
|
125
|
-
createIndexMap,
|
|
126
|
-
generateFunctionMap,
|
|
127
|
-
fromRawMappings,
|
|
128
|
-
fromRawMappingsNonBlocking,
|
|
129
|
-
functionMapBabelPlugin,
|
|
130
|
-
normalizeSourcePath,
|
|
131
|
-
toBabelSegments,
|
|
132
|
-
toSegmentTuple,
|
|
133
|
-
};
|
|
134
|
-
/**
|
|
135
|
-
* Backwards-compatibility with CommonJS consumers using interopRequireDefault.
|
|
136
|
-
* Do not add to this list.
|
|
137
|
-
*
|
|
138
|
-
* @deprecated Default import from 'metro-source-map' is deprecated, use named exports.
|
|
139
|
-
*/
|
|
140
|
-
declare const $$EXPORT_DEFAULT_DECLARATION$$: {
|
|
141
|
-
BundleBuilder: typeof BundleBuilder;
|
|
142
|
-
composeSourceMaps: typeof composeSourceMaps;
|
|
143
|
-
Consumer: typeof Consumer;
|
|
144
|
-
createIndexMap: typeof createIndexMap;
|
|
145
|
-
generateFunctionMap: typeof generateFunctionMap;
|
|
146
|
-
fromRawMappings: typeof fromRawMappings;
|
|
147
|
-
fromRawMappingsNonBlocking: typeof fromRawMappingsNonBlocking;
|
|
148
|
-
functionMapBabelPlugin: typeof functionMapBabelPlugin;
|
|
149
|
-
normalizeSourcePath: typeof normalizeSourcePath;
|
|
150
|
-
toBabelSegments: typeof toBabelSegments;
|
|
151
|
-
toSegmentTuple: typeof toSegmentTuple;
|
|
152
|
-
};
|
|
153
|
-
declare type $$EXPORT_DEFAULT_DECLARATION$$ =
|
|
154
|
-
typeof $$EXPORT_DEFAULT_DECLARATION$$;
|
|
155
|
-
export default $$EXPORT_DEFAULT_DECLARATION$$;
|