metro 0.83.0 → 0.83.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/package.json +16 -16
- package/src/Assets.js +68 -42
- package/src/Assets.js.flow +13 -24
- package/src/Bundler/util.js +40 -17
- package/src/Bundler/util.js.flow +6 -13
- package/src/Bundler.js +17 -6
- package/src/Bundler.js.flow +3 -7
- package/src/DeltaBundler/DeltaCalculator.js +15 -15
- package/src/DeltaBundler/DeltaCalculator.js.flow +4 -7
- package/src/DeltaBundler/Graph.js +45 -40
- package/src/DeltaBundler/Graph.js.flow +3 -4
- package/src/DeltaBundler/Serializers/baseJSBundle.js +24 -10
- package/src/DeltaBundler/Serializers/baseJSBundle.js.flow +6 -9
- package/src/DeltaBundler/Serializers/getAllFiles.js +9 -6
- package/src/DeltaBundler/Serializers/getAllFiles.js.flow +4 -8
- package/src/DeltaBundler/Serializers/getAssets.js +18 -11
- package/src/DeltaBundler/Serializers/getAssets.js.flow +5 -9
- package/src/DeltaBundler/Serializers/getExplodedSourceMap.d.ts +26 -0
- package/src/DeltaBundler/Serializers/getExplodedSourceMap.js +7 -6
- package/src/DeltaBundler/Serializers/getExplodedSourceMap.js.flow +3 -9
- package/src/DeltaBundler/Serializers/getRamBundleInfo.js +40 -23
- package/src/DeltaBundler/Serializers/getRamBundleInfo.js.flow +11 -18
- package/src/DeltaBundler/Serializers/helpers/getInlineSourceMappingURL.js +4 -1
- package/src/DeltaBundler/Serializers/helpers/getInlineSourceMappingURL.js.flow +1 -5
- package/src/DeltaBundler/Serializers/helpers/getSourceMapInfo.js +7 -4
- package/src/DeltaBundler/Serializers/helpers/getSourceMapInfo.js.flow +3 -7
- package/src/DeltaBundler/Serializers/helpers/getTransitiveDependencies.js +4 -1
- package/src/DeltaBundler/Serializers/helpers/getTransitiveDependencies.js.flow +2 -6
- package/src/DeltaBundler/Serializers/helpers/js.js +65 -31
- package/src/DeltaBundler/Serializers/helpers/js.js.flow +21 -21
- package/src/DeltaBundler/Serializers/helpers/processModules.js +8 -5
- package/src/DeltaBundler/Serializers/helpers/processModules.js.flow +3 -7
- package/src/DeltaBundler/Serializers/hmrJSBundle.js +70 -25
- package/src/DeltaBundler/Serializers/hmrJSBundle.js.flow +43 -33
- package/src/DeltaBundler/Serializers/sourceMapGenerator.js +19 -16
- package/src/DeltaBundler/Serializers/sourceMapGenerator.js.flow +6 -14
- package/src/DeltaBundler/Serializers/sourceMapObject.js +12 -10
- package/src/DeltaBundler/Serializers/sourceMapObject.js.flow +4 -9
- package/src/DeltaBundler/Serializers/sourceMapString.js +14 -12
- package/src/DeltaBundler/Serializers/sourceMapString.js.flow +4 -9
- package/src/DeltaBundler/Transformer.js +32 -27
- package/src/DeltaBundler/Transformer.js.flow +10 -17
- package/src/DeltaBundler/Worker.flow.js +25 -18
- package/src/DeltaBundler/Worker.flow.js.flow +12 -18
- package/src/DeltaBundler/Worker.js.flow +2 -0
- package/src/DeltaBundler/WorkerFarm.js +13 -11
- package/src/DeltaBundler/WorkerFarm.js.flow +7 -9
- package/src/DeltaBundler/buildSubgraph.js +13 -17
- package/src/DeltaBundler/buildSubgraph.js.flow +1 -1
- package/src/DeltaBundler/getTransformCacheKey.js +12 -6
- package/src/DeltaBundler/getTransformCacheKey.js.flow +5 -7
- package/src/DeltaBundler/mergeDeltas.js +4 -1
- package/src/DeltaBundler/mergeDeltas.js.flow +5 -6
- package/src/DeltaBundler/types.d.ts +4 -1
- package/src/DeltaBundler/{types.flow.js → types.js} +1 -5
- package/src/DeltaBundler/{types.flow.js.flow → types.js.flow} +5 -3
- package/src/DeltaBundler.js +15 -6
- package/src/DeltaBundler.js.flow +4 -8
- package/src/HmrServer.js +116 -68
- package/src/HmrServer.js.flow +41 -52
- package/src/IncrementalBundler/GraphNotFoundError.js +5 -1
- package/src/IncrementalBundler/GraphNotFoundError.js.flow +1 -5
- package/src/IncrementalBundler/ResourceNotFoundError.js +5 -1
- package/src/IncrementalBundler/ResourceNotFoundError.js.flow +1 -5
- package/src/IncrementalBundler/RevisionNotFoundError.js +5 -1
- package/src/IncrementalBundler/RevisionNotFoundError.js.flow +1 -5
- package/src/IncrementalBundler.js +71 -35
- package/src/IncrementalBundler.js.flow +12 -16
- package/src/ModuleGraph/test-helpers.js +19 -14
- package/src/ModuleGraph/worker/JsFileWrapping.js +22 -29
- package/src/ModuleGraph/worker/JsFileWrapping.js.flow +1 -10
- package/src/ModuleGraph/worker/collectDependencies.js +81 -52
- package/src/ModuleGraph/worker/collectDependencies.js.flow +15 -22
- package/src/ModuleGraph/worker/generateImportNames.js +12 -6
- package/src/ModuleGraph/worker/generateImportNames.js.flow +3 -7
- package/src/ModuleGraph/worker/importLocationsPlugin.js +5 -4
- package/src/ModuleGraph/worker/importLocationsPlugin.js.flow +2 -4
- package/src/Server/MultipartResponse.js +11 -4
- package/src/Server/MultipartResponse.js.flow +2 -5
- package/src/Server/symbolicate.d.ts +31 -0
- package/src/Server/symbolicate.js +15 -16
- package/src/Server/symbolicate.js.flow +6 -16
- package/src/Server.d.ts +0 -1
- package/src/Server.js +298 -191
- package/src/Server.js.flow +136 -99
- package/src/cli-utils.js +13 -4
- package/src/cli-utils.js.flow +3 -5
- package/src/cli.js.flow +2 -0
- package/src/commands/build.js +18 -15
- package/src/commands/build.js.flow +6 -6
- package/src/commands/dependencies.js +26 -16
- package/src/commands/dependencies.js.flow +7 -9
- package/src/commands/serve.js +16 -11
- package/src/commands/serve.js.flow +5 -6
- package/src/index.d.ts +26 -3
- package/src/index.flow.js +162 -72
- package/src/index.flow.js.flow +60 -47
- package/src/index.js.flow +2 -0
- package/src/integration_tests/basic_bundle/TestBundle.js.flow +2 -1
- package/src/integration_tests/basic_bundle/build-errors/cannot-resolve-import.js +1 -5
- package/src/integration_tests/basic_bundle/build-errors/inline-requires-cannot-resolve-import.js +1 -5
- package/src/integration_tests/basic_bundle/import-export/index.js +5 -13
- package/src/integration_tests/basic_bundle/require-context/mode-eager.js +2 -2
- package/src/integration_tests/basic_bundle/require-context/mode-lazy-once.js +2 -2
- package/src/integration_tests/basic_bundle/require-context/mode-lazy.js +2 -2
- package/src/integration_tests/basic_bundle/require-context/mode-sync.js +1 -1
- package/src/integration_tests/basic_bundle/require-context/utils.js +1 -1
- package/src/integration_tests/execBundle.js +7 -4
- package/src/integration_tests/execBundle.js.flow +1 -3
- package/src/integration_tests/metro.config.js +3 -3
- package/src/lib/BatchProcessor.js +15 -5
- package/src/lib/BatchProcessor.js.flow +2 -6
- package/src/lib/CountingSet.js.flow +2 -2
- package/src/lib/JsonReporter.js +6 -2
- package/src/lib/JsonReporter.js.flow +1 -5
- package/src/lib/RamBundleParser.js +12 -3
- package/src/lib/RamBundleParser.js.flow +2 -6
- package/src/lib/TerminalReporter.js +95 -56
- package/src/lib/TerminalReporter.js.flow +9 -12
- package/src/lib/bundleToString.js +4 -1
- package/src/lib/bundleToString.js.flow +2 -9
- package/src/lib/contextModule.js +3 -7
- package/src/lib/contextModuleTemplates.js +9 -19
- package/src/lib/countLines.js +5 -1
- package/src/lib/countLines.js.flow +1 -3
- package/src/lib/createWebsocketServer.js +7 -7
- package/src/lib/createWebsocketServer.js.flow +4 -4
- package/src/lib/debounceAsyncQueue.js +4 -1
- package/src/lib/debounceAsyncQueue.js.flow +1 -5
- package/src/lib/formatBundlingError.js +32 -22
- package/src/lib/formatBundlingError.js.flow +18 -20
- package/src/lib/getAppendScripts.js +20 -20
- package/src/lib/getAppendScripts.js.flow +9 -13
- package/src/lib/getGraphId.js +12 -6
- package/src/lib/getGraphId.js.flow +4 -10
- package/src/lib/getPreludeCode.js +7 -10
- package/src/lib/getPreludeCode.js.flow +2 -6
- package/src/lib/getPrependedScripts.js +40 -16
- package/src/lib/getPrependedScripts.js.flow +8 -13
- package/src/lib/isResolvedDependency.js.flow +1 -1
- package/src/lib/logToConsole.js +18 -12
- package/src/lib/logToConsole.js.flow +5 -14
- package/src/lib/parseBundleOptionsFromBundleRequestUrl.js +144 -0
- package/src/lib/parseBundleOptionsFromBundleRequestUrl.js.flow +146 -0
- package/src/lib/parseCustomResolverOptions.js +8 -6
- package/src/lib/parseCustomResolverOptions.js.flow +6 -12
- package/src/lib/parseCustomTransformOptions.js +8 -6
- package/src/lib/parseCustomTransformOptions.js.flow +11 -14
- package/src/lib/parseJsonBody.js +4 -1
- package/src/lib/parseJsonBody.js.flow +1 -3
- package/src/lib/pathUtils.js +34 -0
- package/src/lib/pathUtils.js.flow +16 -0
- package/src/lib/relativizeSourceMap.js +12 -3
- package/src/lib/relativizeSourceMap.js.flow +2 -6
- package/src/lib/reporting.js +25 -19
- package/src/lib/reporting.js.flow +6 -16
- package/src/lib/splitBundleOptions.js +4 -2
- package/src/lib/splitBundleOptions.js.flow +4 -7
- package/src/lib/transformHelpers.js +19 -25
- package/src/lib/transformHelpers.js.flow +5 -15
- package/src/node-haste/DependencyGraph/ModuleResolution.js +75 -57
- package/src/node-haste/DependencyGraph/ModuleResolution.js.flow +28 -44
- package/src/node-haste/DependencyGraph/createFileMap.js +15 -13
- package/src/node-haste/DependencyGraph/createFileMap.js.flow +2 -5
- package/src/node-haste/DependencyGraph.js +61 -45
- package/src/node-haste/DependencyGraph.js.flow +34 -31
- package/src/node-haste/Package.js +13 -6
- package/src/node-haste/Package.js.flow +3 -7
- package/src/node-haste/{ModuleCache.js → PackageCache.js} +11 -19
- package/src/node-haste/{ModuleCache.js.flow → PackageCache.js.flow} +2 -30
- package/src/node-haste/lib/AssetPaths.js +14 -8
- package/src/node-haste/lib/AssetPaths.js.flow +7 -8
- package/src/node-haste/lib/parsePlatformFilePath.js +10 -4
- package/src/node-haste/lib/parsePlatformFilePath.js.flow +2 -6
- package/src/shared/output/RamBundle/as-assets.js +42 -22
- package/src/shared/output/RamBundle/as-assets.js.flow +12 -15
- package/src/shared/output/RamBundle/as-indexed-file.js +33 -23
- package/src/shared/output/RamBundle/as-indexed-file.js.flow +10 -16
- package/src/shared/output/RamBundle/buildSourcemapWithMetadata.js +11 -10
- package/src/shared/output/RamBundle/buildSourcemapWithMetadata.js.flow +4 -6
- package/src/shared/output/RamBundle/magic-number.js +5 -1
- package/src/shared/output/RamBundle/magic-number.js.flow +1 -3
- package/src/shared/output/RamBundle/util.js +21 -18
- package/src/shared/output/RamBundle/util.js.flow +4 -6
- package/src/shared/output/RamBundle/write-sourcemap.js +9 -3
- package/src/shared/output/RamBundle/write-sourcemap.js.flow +2 -6
- package/src/shared/output/RamBundle.js +16 -9
- package/src/shared/output/RamBundle.js.flow +8 -12
- package/src/shared/output/bundle.flow.js +37 -13
- package/src/shared/output/bundle.flow.js.flow +24 -12
- package/src/shared/output/bundle.js.flow +2 -0
- package/src/shared/output/meta.js +16 -9
- package/src/shared/output/meta.js.flow +3 -5
- package/src/shared/output/unbundle.js +14 -1
- package/src/shared/output/unbundle.js.flow +1 -3
- package/src/shared/output/writeFile.js +11 -4
- package/src/shared/output/writeFile.js.flow +3 -5
- package/src/shared/types.d.ts +0 -1
- package/src/shared/{types.flow.js.flow → types.js.flow} +16 -17
- package/src/lib/createModuleIdFactory.js +0 -15
- package/src/lib/createModuleIdFactory.js.flow +0 -27
- package/src/lib/getMaxWorkers.js +0 -9
- package/src/lib/getMaxWorkers.js.flow +0 -22
- package/src/lib/parseOptionsFromUrl.js +0 -62
- package/src/lib/parseOptionsFromUrl.js.flow +0 -97
- package/src/node-haste/Module.js +0 -24
- package/src/node-haste/Module.js.flow +0 -41
- /package/src/shared/{types.flow.js → types.js} +0 -0
|
@@ -1,14 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
exports.default = collectDependencies;
|
|
7
|
+
var _generator = _interopRequireDefault(require("@babel/generator"));
|
|
8
|
+
var _template = _interopRequireDefault(require("@babel/template"));
|
|
9
|
+
var _traverse = _interopRequireDefault(require("@babel/traverse"));
|
|
10
|
+
var _types = _interopRequireWildcard(require("@babel/types"));
|
|
11
|
+
var types = _types;
|
|
12
|
+
var _crypto = _interopRequireDefault(require("crypto"));
|
|
13
|
+
var _invariant = _interopRequireDefault(require("invariant"));
|
|
14
|
+
var _nullthrows = _interopRequireDefault(require("nullthrows"));
|
|
15
|
+
function _getRequireWildcardCache(e) {
|
|
16
|
+
if ("function" != typeof WeakMap) return null;
|
|
17
|
+
var r = new WeakMap(),
|
|
18
|
+
t = new WeakMap();
|
|
19
|
+
return (_getRequireWildcardCache = function (e) {
|
|
20
|
+
return e ? t : r;
|
|
21
|
+
})(e);
|
|
22
|
+
}
|
|
23
|
+
function _interopRequireWildcard(e, r) {
|
|
24
|
+
if (!r && e && e.__esModule) return e;
|
|
25
|
+
if (null === e || ("object" != typeof e && "function" != typeof e))
|
|
26
|
+
return { default: e };
|
|
27
|
+
var t = _getRequireWildcardCache(r);
|
|
28
|
+
if (t && t.has(e)) return t.get(e);
|
|
29
|
+
var n = { __proto__: null },
|
|
30
|
+
a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
31
|
+
for (var u in e)
|
|
32
|
+
if ("default" !== u && {}.hasOwnProperty.call(e, u)) {
|
|
33
|
+
var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
|
34
|
+
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : (n[u] = e[u]);
|
|
35
|
+
}
|
|
36
|
+
return ((n.default = e), t && t.set(e, n), n);
|
|
37
|
+
}
|
|
38
|
+
function _interopRequireDefault(e) {
|
|
39
|
+
return e && e.__esModule ? e : { default: e };
|
|
40
|
+
}
|
|
12
41
|
function collectDependencies(ast, options) {
|
|
13
42
|
const visited = new WeakSet();
|
|
14
43
|
const state = {
|
|
@@ -31,7 +60,7 @@ function collectDependencies(ast, options) {
|
|
|
31
60
|
}
|
|
32
61
|
const callee = path.node.callee;
|
|
33
62
|
const name = callee.type === "Identifier" ? callee.name : null;
|
|
34
|
-
if (isImport(callee)) {
|
|
63
|
+
if ((0, _types.isImport)(callee)) {
|
|
35
64
|
processImportCall(path, state, {
|
|
36
65
|
asyncType: "async",
|
|
37
66
|
isESMImport: true,
|
|
@@ -102,11 +131,11 @@ function collectDependencies(ast, options) {
|
|
|
102
131
|
ExportAllDeclaration: collectImports,
|
|
103
132
|
Program(path, state) {
|
|
104
133
|
state.asyncRequireModulePathStringLiteral = types.stringLiteral(
|
|
105
|
-
options.asyncRequireModulePath
|
|
134
|
+
options.asyncRequireModulePath,
|
|
106
135
|
);
|
|
107
136
|
if (options.dependencyMapName != null) {
|
|
108
137
|
state.dependencyMapIdentifier = types.identifier(
|
|
109
|
-
options.dependencyMapName
|
|
138
|
+
options.dependencyMapName,
|
|
110
139
|
);
|
|
111
140
|
} else {
|
|
112
141
|
state.dependencyMapIdentifier =
|
|
@@ -115,7 +144,7 @@ function collectDependencies(ast, options) {
|
|
|
115
144
|
state.dependencyCalls = new Set(["require", ...options.inlineableCalls]);
|
|
116
145
|
},
|
|
117
146
|
};
|
|
118
|
-
|
|
147
|
+
(0, _traverse.default)(ast, visitor, null, state);
|
|
119
148
|
const collectedDependencies = state.dependencyRegistry.getDependencies();
|
|
120
149
|
const dependencies = new Array(collectedDependencies.length);
|
|
121
150
|
for (const { index, name, ...dependencyData } of collectedDependencies) {
|
|
@@ -127,7 +156,8 @@ function collectDependencies(ast, options) {
|
|
|
127
156
|
return {
|
|
128
157
|
ast,
|
|
129
158
|
dependencies,
|
|
130
|
-
dependencyMapName:
|
|
159
|
+
dependencyMapName: (0, _nullthrows.default)(state.dependencyMapIdentifier)
|
|
160
|
+
.name,
|
|
131
161
|
};
|
|
132
162
|
}
|
|
133
163
|
function getRequireContextArgs(path) {
|
|
@@ -142,7 +172,7 @@ function getRequireContextArgs(path) {
|
|
|
142
172
|
} else {
|
|
143
173
|
throw new InvalidRequireCallError(
|
|
144
174
|
result.deopt ?? args[0],
|
|
145
|
-
"First argument of `require.context` should be a string denoting the directory to require."
|
|
175
|
+
"First argument of `require.context` should be a string denoting the directory to require.",
|
|
146
176
|
);
|
|
147
177
|
}
|
|
148
178
|
}
|
|
@@ -154,7 +184,7 @@ function getRequireContextArgs(path) {
|
|
|
154
184
|
} else if (!(result.confident && typeof result.value === "undefined")) {
|
|
155
185
|
throw new InvalidRequireCallError(
|
|
156
186
|
result.deopt ?? args[1],
|
|
157
|
-
"Second argument of `require.context` should be an optional boolean indicating if files should be imported recursively or not."
|
|
187
|
+
"Second argument of `require.context` should be an optional boolean indicating if files should be imported recursively or not.",
|
|
158
188
|
);
|
|
159
189
|
}
|
|
160
190
|
}
|
|
@@ -173,7 +203,7 @@ function getRequireContextArgs(path) {
|
|
|
173
203
|
} else if (!(result.confident && typeof result.value === "undefined")) {
|
|
174
204
|
throw new InvalidRequireCallError(
|
|
175
205
|
args[2],
|
|
176
|
-
`Third argument of \`require.context\` should be an optional RegExp pattern matching all of the files to import, instead found node of type: ${argNode.type}
|
|
206
|
+
`Third argument of \`require.context\` should be an optional RegExp pattern matching all of the files to import, instead found node of type: ${argNode.type}.`,
|
|
177
207
|
);
|
|
178
208
|
}
|
|
179
209
|
}
|
|
@@ -185,14 +215,14 @@ function getRequireContextArgs(path) {
|
|
|
185
215
|
} else if (!(result.confident && typeof result.value === "undefined")) {
|
|
186
216
|
throw new InvalidRequireCallError(
|
|
187
217
|
result.deopt ?? args[3],
|
|
188
|
-
'Fourth argument of `require.context` should be an optional string "mode" denoting how the modules will be resolved.'
|
|
218
|
+
'Fourth argument of `require.context` should be an optional string "mode" denoting how the modules will be resolved.',
|
|
189
219
|
);
|
|
190
220
|
}
|
|
191
221
|
}
|
|
192
222
|
if (args.length > 4) {
|
|
193
223
|
throw new InvalidRequireCallError(
|
|
194
224
|
path,
|
|
195
|
-
`Too many arguments provided to \`require.context\` call. Expected 4, got: ${args.length}
|
|
225
|
+
`Too many arguments provided to \`require.context\` call. Expected 4, got: ${args.length}`,
|
|
196
226
|
);
|
|
197
227
|
}
|
|
198
228
|
return [
|
|
@@ -215,7 +245,7 @@ function getContextMode(path, mode) {
|
|
|
215
245
|
}
|
|
216
246
|
throw new InvalidRequireCallError(
|
|
217
247
|
path,
|
|
218
|
-
`require.context "${mode}" mode is not supported. Expected one of: sync, eager, lazy, lazy-once
|
|
248
|
+
`require.context "${mode}" mode is not supported. Expected one of: sync, eager, lazy, lazy-once`,
|
|
219
249
|
);
|
|
220
250
|
}
|
|
221
251
|
function processRequireContextCall(path, state) {
|
|
@@ -230,7 +260,7 @@ function processRequireContextCall(path, state) {
|
|
|
230
260
|
isESMImport: false,
|
|
231
261
|
optional: isOptionalDependency(directory, path, state),
|
|
232
262
|
},
|
|
233
|
-
path
|
|
263
|
+
path,
|
|
234
264
|
);
|
|
235
265
|
path.get("callee").replaceWith(types.identifier("require"));
|
|
236
266
|
transformer.transformSyncRequire(path, dep, state);
|
|
@@ -248,20 +278,20 @@ function processResolveWeakCall(path, state) {
|
|
|
248
278
|
isESMImport: false,
|
|
249
279
|
optional: isOptionalDependency(name, path, state),
|
|
250
280
|
},
|
|
251
|
-
path
|
|
281
|
+
path,
|
|
252
282
|
);
|
|
253
283
|
path.replaceWith(
|
|
254
284
|
makeResolveWeakTemplate({
|
|
255
285
|
MODULE_ID: createModuleIDExpression(dependency, state),
|
|
256
|
-
})
|
|
286
|
+
}),
|
|
257
287
|
);
|
|
258
288
|
}
|
|
259
289
|
function collectImports(path, state) {
|
|
260
290
|
if (path.node.source) {
|
|
261
|
-
|
|
291
|
+
(0, _invariant.default)(
|
|
262
292
|
path.node.source.type === "StringLiteral",
|
|
263
293
|
`Expected import source to be a string. Maybe you're using 'createImportExpressions', which is not currently supported.
|
|
264
|
-
See: https://github.com/facebook/metro/pull/1343
|
|
294
|
+
See: https://github.com/facebook/metro/pull/1343`,
|
|
265
295
|
);
|
|
266
296
|
registerDependency(
|
|
267
297
|
state,
|
|
@@ -271,7 +301,7 @@ See: https://github.com/facebook/metro/pull/1343`
|
|
|
271
301
|
isESMImport: true,
|
|
272
302
|
optional: false,
|
|
273
303
|
},
|
|
274
|
-
path
|
|
304
|
+
path,
|
|
275
305
|
);
|
|
276
306
|
}
|
|
277
307
|
}
|
|
@@ -288,7 +318,7 @@ function processImportCall(path, state, options) {
|
|
|
288
318
|
isESMImport: options.isESMImport,
|
|
289
319
|
optional: isOptionalDependency(name, path, state),
|
|
290
320
|
},
|
|
291
|
-
path
|
|
321
|
+
path,
|
|
292
322
|
);
|
|
293
323
|
const transformer = state.dependencyTransformer;
|
|
294
324
|
switch (options.asyncType) {
|
|
@@ -334,7 +364,7 @@ function processRequireCall(path, state) {
|
|
|
334
364
|
isESMImport,
|
|
335
365
|
optional: isOptionalDependency(name, path, state),
|
|
336
366
|
},
|
|
337
|
-
path
|
|
367
|
+
path,
|
|
338
368
|
);
|
|
339
369
|
transformer.transformSyncRequire(path, dep, state);
|
|
340
370
|
}
|
|
@@ -405,41 +435,41 @@ class InvalidRequireCallError extends Error {
|
|
|
405
435
|
const line = node.loc && node.loc.start && node.loc.start.line;
|
|
406
436
|
super(
|
|
407
437
|
[
|
|
408
|
-
`Invalid call at line ${line || "<unknown>"}: ${
|
|
438
|
+
`Invalid call at line ${line || "<unknown>"}: ${(0, _generator.default)(node).code}`,
|
|
409
439
|
message,
|
|
410
440
|
]
|
|
411
441
|
.filter(Boolean)
|
|
412
|
-
.join("\n")
|
|
442
|
+
.join("\n"),
|
|
413
443
|
);
|
|
414
444
|
}
|
|
415
445
|
}
|
|
416
446
|
collectDependencies.InvalidRequireCallError = InvalidRequireCallError;
|
|
417
|
-
const dynamicRequireErrorTemplate =
|
|
447
|
+
const dynamicRequireErrorTemplate = _template.default.expression(`
|
|
418
448
|
(function(line) {
|
|
419
449
|
throw new Error(
|
|
420
450
|
'Dynamic require defined at line ' + line + '; not supported by Metro',
|
|
421
451
|
);
|
|
422
452
|
})(LINE)
|
|
423
453
|
`);
|
|
424
|
-
const makeAsyncRequireTemplate =
|
|
454
|
+
const makeAsyncRequireTemplate = _template.default.expression(`
|
|
425
455
|
require(ASYNC_REQUIRE_MODULE_PATH)(MODULE_ID, DEPENDENCY_MAP.paths)
|
|
426
456
|
`);
|
|
427
|
-
const makeAsyncRequireTemplateWithName =
|
|
457
|
+
const makeAsyncRequireTemplateWithName = _template.default.expression(`
|
|
428
458
|
require(ASYNC_REQUIRE_MODULE_PATH)(MODULE_ID, DEPENDENCY_MAP.paths, MODULE_NAME)
|
|
429
459
|
`);
|
|
430
|
-
const makeAsyncPrefetchTemplate =
|
|
460
|
+
const makeAsyncPrefetchTemplate = _template.default.expression(`
|
|
431
461
|
require(ASYNC_REQUIRE_MODULE_PATH).prefetch(MODULE_ID, DEPENDENCY_MAP.paths)
|
|
432
462
|
`);
|
|
433
|
-
const makeAsyncPrefetchTemplateWithName =
|
|
463
|
+
const makeAsyncPrefetchTemplateWithName = _template.default.expression(`
|
|
434
464
|
require(ASYNC_REQUIRE_MODULE_PATH).prefetch(MODULE_ID, DEPENDENCY_MAP.paths, MODULE_NAME)
|
|
435
465
|
`);
|
|
436
|
-
const makeAsyncImportMaybeSyncTemplate =
|
|
466
|
+
const makeAsyncImportMaybeSyncTemplate = _template.default.expression(`
|
|
437
467
|
require(ASYNC_REQUIRE_MODULE_PATH).unstable_importMaybeSync(MODULE_ID, DEPENDENCY_MAP.paths)
|
|
438
468
|
`);
|
|
439
|
-
const makeAsyncImportMaybeSyncTemplateWithName =
|
|
469
|
+
const makeAsyncImportMaybeSyncTemplateWithName = _template.default.expression(`
|
|
440
470
|
require(ASYNC_REQUIRE_MODULE_PATH).unstable_importMaybeSync(MODULE_ID, DEPENDENCY_MAP.paths, MODULE_NAME)
|
|
441
471
|
`);
|
|
442
|
-
const makeResolveWeakTemplate =
|
|
472
|
+
const makeResolveWeakTemplate = _template.default.expression(`
|
|
443
473
|
MODULE_ID
|
|
444
474
|
`);
|
|
445
475
|
const DefaultDependencyTransformer = {
|
|
@@ -455,11 +485,11 @@ const DefaultDependencyTransformer = {
|
|
|
455
485
|
? makeAsyncRequireTemplateWithName
|
|
456
486
|
: makeAsyncRequireTemplate;
|
|
457
487
|
const opts = {
|
|
458
|
-
ASYNC_REQUIRE_MODULE_PATH:
|
|
459
|
-
state.asyncRequireModulePathStringLiteral
|
|
488
|
+
ASYNC_REQUIRE_MODULE_PATH: (0, _nullthrows.default)(
|
|
489
|
+
state.asyncRequireModulePathStringLiteral,
|
|
460
490
|
),
|
|
461
491
|
MODULE_ID: createModuleIDExpression(dependency, state),
|
|
462
|
-
DEPENDENCY_MAP:
|
|
492
|
+
DEPENDENCY_MAP: (0, _nullthrows.default)(state.dependencyMapIdentifier),
|
|
463
493
|
...(state.keepRequireNames
|
|
464
494
|
? {
|
|
465
495
|
MODULE_NAME: createModuleNameLiteral(dependency),
|
|
@@ -473,11 +503,11 @@ const DefaultDependencyTransformer = {
|
|
|
473
503
|
? makeAsyncImportMaybeSyncTemplateWithName
|
|
474
504
|
: makeAsyncImportMaybeSyncTemplate;
|
|
475
505
|
const opts = {
|
|
476
|
-
ASYNC_REQUIRE_MODULE_PATH:
|
|
477
|
-
state.asyncRequireModulePathStringLiteral
|
|
506
|
+
ASYNC_REQUIRE_MODULE_PATH: (0, _nullthrows.default)(
|
|
507
|
+
state.asyncRequireModulePathStringLiteral,
|
|
478
508
|
),
|
|
479
509
|
MODULE_ID: createModuleIDExpression(dependency, state),
|
|
480
|
-
DEPENDENCY_MAP:
|
|
510
|
+
DEPENDENCY_MAP: (0, _nullthrows.default)(state.dependencyMapIdentifier),
|
|
481
511
|
...(state.keepRequireNames
|
|
482
512
|
? {
|
|
483
513
|
MODULE_NAME: createModuleNameLiteral(dependency),
|
|
@@ -491,11 +521,11 @@ const DefaultDependencyTransformer = {
|
|
|
491
521
|
? makeAsyncPrefetchTemplateWithName
|
|
492
522
|
: makeAsyncPrefetchTemplate;
|
|
493
523
|
const opts = {
|
|
494
|
-
ASYNC_REQUIRE_MODULE_PATH:
|
|
495
|
-
state.asyncRequireModulePathStringLiteral
|
|
524
|
+
ASYNC_REQUIRE_MODULE_PATH: (0, _nullthrows.default)(
|
|
525
|
+
state.asyncRequireModulePathStringLiteral,
|
|
496
526
|
),
|
|
497
527
|
MODULE_ID: createModuleIDExpression(dependency, state),
|
|
498
|
-
DEPENDENCY_MAP:
|
|
528
|
+
DEPENDENCY_MAP: (0, _nullthrows.default)(state.dependencyMapIdentifier),
|
|
499
529
|
...(state.keepRequireNames
|
|
500
530
|
? {
|
|
501
531
|
MODULE_NAME: createModuleNameLiteral(dependency),
|
|
@@ -508,15 +538,15 @@ const DefaultDependencyTransformer = {
|
|
|
508
538
|
path.replaceWith(
|
|
509
539
|
dynamicRequireErrorTemplate({
|
|
510
540
|
LINE: types.numericLiteral(path.node.loc?.start.line ?? 0),
|
|
511
|
-
})
|
|
541
|
+
}),
|
|
512
542
|
);
|
|
513
543
|
},
|
|
514
544
|
};
|
|
515
545
|
function createModuleIDExpression(dependency, state) {
|
|
516
546
|
return types.memberExpression(
|
|
517
|
-
|
|
547
|
+
(0, _nullthrows.default)(state.dependencyMapIdentifier),
|
|
518
548
|
types.numericLiteral(dependency.index),
|
|
519
|
-
true
|
|
549
|
+
true,
|
|
520
550
|
);
|
|
521
551
|
}
|
|
522
552
|
function createModuleNameLiteral(dependency) {
|
|
@@ -552,7 +582,7 @@ class DependencyRegistry {
|
|
|
552
582
|
isESMImport: qualifier.isESMImport,
|
|
553
583
|
locs: [],
|
|
554
584
|
index: this._dependencies.size,
|
|
555
|
-
key:
|
|
585
|
+
key: _crypto.default.createHash("sha1").update(key).digest("base64"),
|
|
556
586
|
};
|
|
557
587
|
if (qualifier.optional) {
|
|
558
588
|
newDependency.isOptional = true;
|
|
@@ -576,4 +606,3 @@ class DependencyRegistry {
|
|
|
576
606
|
return Array.from(this._dependencies.values());
|
|
577
607
|
}
|
|
578
608
|
}
|
|
579
|
-
module.exports = collectDependencies;
|
|
@@ -8,26 +8,21 @@
|
|
|
8
8
|
* @flow
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
'use strict';
|
|
12
|
-
|
|
13
11
|
import type {NodePath} from '@babel/traverse';
|
|
14
12
|
import type {CallExpression, Identifier, StringLiteral} from '@babel/types';
|
|
15
13
|
import type {
|
|
16
14
|
AllowOptionalDependencies,
|
|
17
15
|
AsyncDependencyType,
|
|
18
|
-
} from 'metro/private/DeltaBundler/types
|
|
19
|
-
|
|
20
|
-
import {isProgram} from '@babel/types';
|
|
16
|
+
} from 'metro/private/DeltaBundler/types';
|
|
21
17
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const {isImport} = types;
|
|
18
|
+
import generate from '@babel/generator';
|
|
19
|
+
import template from '@babel/template';
|
|
20
|
+
import traverse from '@babel/traverse';
|
|
21
|
+
import * as types from '@babel/types';
|
|
22
|
+
import {isImport, isProgram} from '@babel/types';
|
|
23
|
+
import crypto from 'crypto';
|
|
24
|
+
import invariant from 'invariant';
|
|
25
|
+
import nullthrows from 'nullthrows';
|
|
31
26
|
|
|
32
27
|
type ImportDependencyOptions = $ReadOnly<{
|
|
33
28
|
asyncType: AsyncDependencyType,
|
|
@@ -147,7 +142,7 @@ export type DynamicRequiresBehavior = 'throwAtRuntime' | 'reject';
|
|
|
147
142
|
*
|
|
148
143
|
* The second argument is only provided for debugging purposes.
|
|
149
144
|
*/
|
|
150
|
-
function collectDependencies(
|
|
145
|
+
export default function collectDependencies(
|
|
151
146
|
ast: BabelNodeFile,
|
|
152
147
|
options: Options,
|
|
153
148
|
): CollectedDependencies {
|
|
@@ -572,7 +567,7 @@ function getNearestLocFromPath(path: NodePath<>): ?BabelSourceLocation {
|
|
|
572
567
|
while (
|
|
573
568
|
current &&
|
|
574
569
|
!current.node.loc &&
|
|
575
|
-
// $
|
|
570
|
+
// $FlowFixMe[prop-missing] METRO_INLINE_REQUIRES_INIT_LOC is Metro-specific and not typed
|
|
576
571
|
!current.node.METRO_INLINE_REQUIRES_INIT_LOC
|
|
577
572
|
) {
|
|
578
573
|
current = current.parentPath;
|
|
@@ -582,7 +577,7 @@ function getNearestLocFromPath(path: NodePath<>): ?BabelSourceLocation {
|
|
|
582
577
|
current = null;
|
|
583
578
|
}
|
|
584
579
|
return (
|
|
585
|
-
// $
|
|
580
|
+
// $FlowFixMe[prop-missing] METRO_INLINE_REQUIRES_INIT_LOC is Metro-specific and not typed
|
|
586
581
|
current?.node.METRO_INLINE_REQUIRES_INIT_LOC ?? current?.node.loc
|
|
587
582
|
);
|
|
588
583
|
}
|
|
@@ -766,7 +761,7 @@ const DefaultDependencyTransformer: DependencyTransformer = {
|
|
|
766
761
|
? {MODULE_NAME: createModuleNameLiteral(dependency)}
|
|
767
762
|
: null),
|
|
768
763
|
};
|
|
769
|
-
/* $FlowFixMe[incompatible-
|
|
764
|
+
/* $FlowFixMe[incompatible-type] Natural Inference rollout. See
|
|
770
765
|
* https://fburl.com/gdoc/y8dn025u */
|
|
771
766
|
path.replaceWith(makeNode(opts));
|
|
772
767
|
},
|
|
@@ -789,7 +784,7 @@ const DefaultDependencyTransformer: DependencyTransformer = {
|
|
|
789
784
|
? {MODULE_NAME: createModuleNameLiteral(dependency)}
|
|
790
785
|
: null),
|
|
791
786
|
};
|
|
792
|
-
/* $FlowFixMe[incompatible-
|
|
787
|
+
/* $FlowFixMe[incompatible-type] Natural Inference rollout. See
|
|
793
788
|
* https://fburl.com/gdoc/y8dn025u */
|
|
794
789
|
path.replaceWith(makeNode(opts));
|
|
795
790
|
},
|
|
@@ -812,7 +807,7 @@ const DefaultDependencyTransformer: DependencyTransformer = {
|
|
|
812
807
|
? {MODULE_NAME: createModuleNameLiteral(dependency)}
|
|
813
808
|
: null),
|
|
814
809
|
};
|
|
815
|
-
/* $FlowFixMe[incompatible-
|
|
810
|
+
/* $FlowFixMe[incompatible-type] Natural Inference rollout. See
|
|
816
811
|
* https://fburl.com/gdoc/y8dn025u */
|
|
817
812
|
path.replaceWith(makeNode(opts));
|
|
818
813
|
},
|
|
@@ -932,5 +927,3 @@ class DependencyRegistry {
|
|
|
932
927
|
return Array.from(this._dependencies.values());
|
|
933
928
|
}
|
|
934
929
|
}
|
|
935
|
-
|
|
936
|
-
module.exports = collectDependencies;
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
exports.default = generateImportNames;
|
|
7
|
+
var _traverse = _interopRequireDefault(require("@babel/traverse"));
|
|
8
|
+
var _nullthrows = _interopRequireDefault(require("nullthrows"));
|
|
9
|
+
function _interopRequireDefault(e) {
|
|
10
|
+
return e && e.__esModule ? e : { default: e };
|
|
11
|
+
}
|
|
5
12
|
function generateImportNames(ast) {
|
|
6
13
|
let importDefault;
|
|
7
14
|
let importAll;
|
|
8
|
-
|
|
15
|
+
(0, _traverse.default)(ast, {
|
|
9
16
|
Program(path) {
|
|
10
17
|
importAll = path.scope.generateUid("$$_IMPORT_ALL");
|
|
11
18
|
importDefault = path.scope.generateUid("$$_IMPORT_DEFAULT");
|
|
@@ -13,8 +20,7 @@ function generateImportNames(ast) {
|
|
|
13
20
|
},
|
|
14
21
|
});
|
|
15
22
|
return {
|
|
16
|
-
importAll:
|
|
17
|
-
importDefault:
|
|
23
|
+
importAll: (0, _nullthrows.default)(importAll),
|
|
24
|
+
importDefault: (0, _nullthrows.default)(importDefault),
|
|
18
25
|
};
|
|
19
26
|
}
|
|
20
|
-
module.exports = generateImportNames;
|
|
@@ -8,16 +8,14 @@
|
|
|
8
8
|
* @flow strict-local
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const traverse = require('@babel/traverse').default;
|
|
14
|
-
const nullthrows = require('nullthrows');
|
|
11
|
+
import traverse from '@babel/traverse';
|
|
12
|
+
import nullthrows from 'nullthrows';
|
|
15
13
|
|
|
16
14
|
/**
|
|
17
15
|
* Select unused names for "metroImportDefault" and "metroImportAll", by
|
|
18
16
|
* calling "generateUid".
|
|
19
17
|
*/
|
|
20
|
-
function generateImportNames(ast: BabelNode): {
|
|
18
|
+
export default function generateImportNames(ast: BabelNode): {
|
|
21
19
|
importAll: string,
|
|
22
20
|
importDefault: string,
|
|
23
21
|
} {
|
|
@@ -38,5 +36,3 @@ function generateImportNames(ast: BabelNode): {
|
|
|
38
36
|
importDefault: nullthrows(importDefault),
|
|
39
37
|
};
|
|
40
38
|
}
|
|
41
|
-
|
|
42
|
-
module.exports = generateImportNames;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
exports.importLocationsPlugin = importLocationsPlugin;
|
|
7
|
+
exports.locToKey = locToKey;
|
|
3
8
|
function importLocationsPlugin({ types: t }) {
|
|
4
9
|
return {
|
|
5
10
|
visitor: {
|
|
@@ -40,7 +45,3 @@ function locToKey(loc) {
|
|
|
40
45
|
const { start = MISSING_LOC, end = MISSING_LOC } = loc;
|
|
41
46
|
return `${start.line},${start.column}:${end.line},${end.column}`;
|
|
42
47
|
}
|
|
43
|
-
module.exports = {
|
|
44
|
-
importLocationsPlugin,
|
|
45
|
-
locToKey,
|
|
46
|
-
};
|
|
@@ -9,8 +9,6 @@
|
|
|
9
9
|
* @oncall react_native
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
'use strict';
|
|
13
|
-
|
|
14
12
|
import type {File, PluginObj} from '@babel/core';
|
|
15
13
|
import typeof * as Types from '@babel/types';
|
|
16
14
|
import type {MetroBabelFileMetadata} from 'metro-babel-transformer';
|
|
@@ -60,7 +58,7 @@ function importLocationsPlugin({
|
|
|
60
58
|
// Initialise state
|
|
61
59
|
state.importDeclarationLocs = new Set();
|
|
62
60
|
|
|
63
|
-
// $FlowFixMe[
|
|
61
|
+
// $FlowFixMe[incompatible-type] Babel `File` is not generically typed
|
|
64
62
|
const metroMetadata: MetroBabelFileMetadata = state.file.metadata;
|
|
65
63
|
|
|
66
64
|
// Set the result on a metadata property
|
|
@@ -85,4 +83,4 @@ function locToKey(loc: BabelSourceLocation): string {
|
|
|
85
83
|
return `${start.line},${start.column}:${end.line},${end.column}`;
|
|
86
84
|
}
|
|
87
85
|
|
|
88
|
-
|
|
86
|
+
export {importLocationsPlugin, locToKey};
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _accepts = _interopRequireDefault(require("accepts"));
|
|
8
|
+
function _interopRequireDefault(e) {
|
|
9
|
+
return e && e.__esModule ? e : { default: e };
|
|
10
|
+
}
|
|
4
11
|
const CRLF = "\r\n";
|
|
5
12
|
const BOUNDARY = "3beqjf3apnqeu3h5jqorms4i";
|
|
6
13
|
class MultipartResponse {
|
|
7
14
|
static wrapIfSupported(req, res) {
|
|
8
|
-
if (
|
|
15
|
+
if ((0, _accepts.default)(req).types().includes("multipart/mixed")) {
|
|
9
16
|
return new MultipartResponse(res);
|
|
10
17
|
}
|
|
11
18
|
return res;
|
|
@@ -22,7 +29,7 @@ class MultipartResponse {
|
|
|
22
29
|
"Content-Type": `multipart/mixed; boundary="${BOUNDARY}"`,
|
|
23
30
|
});
|
|
24
31
|
res.write(
|
|
25
|
-
"If you are seeing this, your client does not support multipart response"
|
|
32
|
+
"If you are seeing this, your client does not support multipart response",
|
|
26
33
|
);
|
|
27
34
|
}
|
|
28
35
|
writeChunk(headers, data, isLast = false) {
|
|
@@ -61,4 +68,4 @@ class MultipartResponse {
|
|
|
61
68
|
return this;
|
|
62
69
|
}
|
|
63
70
|
}
|
|
64
|
-
|
|
71
|
+
exports.default = MultipartResponse;
|
|
@@ -9,17 +9,16 @@
|
|
|
9
9
|
* @oncall react_native
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
'use strict';
|
|
13
12
|
import type {IncomingMessage, ServerResponse} from 'http';
|
|
14
13
|
|
|
15
|
-
|
|
14
|
+
import accepts from 'accepts';
|
|
16
15
|
|
|
17
16
|
const CRLF = '\r\n';
|
|
18
17
|
const BOUNDARY = '3beqjf3apnqeu3h5jqorms4i';
|
|
19
18
|
type Data = string | Buffer | Uint8Array;
|
|
20
19
|
type Headers = {[string]: string | number};
|
|
21
20
|
|
|
22
|
-
class MultipartResponse {
|
|
21
|
+
export default class MultipartResponse {
|
|
23
22
|
static wrapIfSupported(
|
|
24
23
|
req: IncomingMessage,
|
|
25
24
|
res: ServerResponse,
|
|
@@ -100,5 +99,3 @@ class MultipartResponse {
|
|
|
100
99
|
return this;
|
|
101
100
|
}
|
|
102
101
|
}
|
|
103
|
-
|
|
104
|
-
module.exports = MultipartResponse;
|
|
@@ -0,0 +1,31 @@
|
|
|
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 {ExplodedSourceMap} from '../DeltaBundler/Serializers/getExplodedSourceMap';
|
|
12
|
+
import type {ConfigT} from 'metro-config';
|
|
13
|
+
|
|
14
|
+
export type StackFrameInput = {
|
|
15
|
+
readonly file: null | undefined | string;
|
|
16
|
+
readonly lineNumber: null | undefined | number;
|
|
17
|
+
readonly column: null | undefined | number;
|
|
18
|
+
readonly methodName: null | undefined | string;
|
|
19
|
+
};
|
|
20
|
+
export type IntermediateStackFrame = Omit<
|
|
21
|
+
StackFrameInput,
|
|
22
|
+
keyof {collapse?: boolean}
|
|
23
|
+
> & {collapse?: boolean};
|
|
24
|
+
export type StackFrameOutput = Readonly<IntermediateStackFrame>;
|
|
25
|
+
declare function symbolicate(
|
|
26
|
+
stack: ReadonlyArray<StackFrameInput>,
|
|
27
|
+
maps: Iterable<[string, ExplodedSourceMap]>,
|
|
28
|
+
config: ConfigT,
|
|
29
|
+
extraData: unknown,
|
|
30
|
+
): Promise<ReadonlyArray<StackFrameOutput>>;
|
|
31
|
+
export default symbolicate;
|