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
package/src/lib/logToConsole.js
CHANGED
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _chalk = _interopRequireDefault(require("chalk"));
|
|
8
|
+
var _util = _interopRequireDefault(require("util"));
|
|
9
|
+
function _interopRequireDefault(e) {
|
|
10
|
+
return e && e.__esModule ? e : { default: e };
|
|
11
|
+
}
|
|
5
12
|
const groupStack = [];
|
|
6
13
|
let collapsedGuardTimer;
|
|
7
|
-
|
|
14
|
+
var _default = (terminal, level, ...data) => {
|
|
8
15
|
const logFunction = console[level] && level !== "trace" ? level : "log";
|
|
9
16
|
const color =
|
|
10
17
|
level === "error"
|
|
11
|
-
?
|
|
18
|
+
? _chalk.default.inverse.red
|
|
12
19
|
: level === "warn"
|
|
13
|
-
|
|
14
|
-
|
|
20
|
+
? _chalk.default.inverse.yellow
|
|
21
|
+
: _chalk.default.inverse.white;
|
|
15
22
|
if (level === "group") {
|
|
16
23
|
groupStack.push(level);
|
|
17
24
|
} else if (level === "groupCollapsed") {
|
|
@@ -20,8 +27,8 @@ module.exports = (terminal, level, mode, ...data) => {
|
|
|
20
27
|
collapsedGuardTimer = setTimeout(() => {
|
|
21
28
|
if (groupStack.includes("groupCollapsed")) {
|
|
22
29
|
terminal.log(
|
|
23
|
-
|
|
24
|
-
"Expected `console.groupEnd` to be called after `console.groupCollapsed`."
|
|
30
|
+
_chalk.default.inverse.yellow.bold(" WARN "),
|
|
31
|
+
"Expected `console.groupEnd` to be called after `console.groupCollapsed`.",
|
|
25
32
|
);
|
|
26
33
|
groupStack.length = 0;
|
|
27
34
|
}
|
|
@@ -39,12 +46,11 @@ module.exports = (terminal, level, mode, ...data) => {
|
|
|
39
46
|
if (typeof lastItem === "string") {
|
|
40
47
|
data[data.length - 1] = lastItem.trimEnd();
|
|
41
48
|
}
|
|
42
|
-
const modePrefix =
|
|
43
|
-
!mode || mode == "BRIDGE" ? "" : `(${mode.toUpperCase()}) `;
|
|
44
49
|
terminal.log(
|
|
45
|
-
color.bold(` ${
|
|
50
|
+
color.bold(` ${logFunction.toUpperCase()} `) +
|
|
46
51
|
"".padEnd(groupStack.length * 2, " "),
|
|
47
|
-
|
|
52
|
+
_util.default.format(...data),
|
|
48
53
|
);
|
|
49
54
|
}
|
|
50
55
|
};
|
|
56
|
+
exports.default = _default;
|
|
@@ -10,22 +10,15 @@
|
|
|
10
10
|
|
|
11
11
|
/* eslint-disable no-console */
|
|
12
12
|
|
|
13
|
-
'use strict';
|
|
14
|
-
|
|
15
13
|
import type {Terminal} from 'metro-core';
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
import chalk from 'chalk';
|
|
16
|
+
import util from 'util';
|
|
19
17
|
|
|
20
18
|
const groupStack = [];
|
|
21
19
|
let collapsedGuardTimer;
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
terminal: Terminal,
|
|
25
|
-
level: string,
|
|
26
|
-
mode: 'BRIDGE' | 'NOBRIDGE',
|
|
27
|
-
...data: Array<mixed>
|
|
28
|
-
) => {
|
|
21
|
+
export default (terminal: Terminal, level: string, ...data: Array<mixed>) => {
|
|
29
22
|
// $FlowFixMe[invalid-computed-prop]
|
|
30
23
|
const logFunction = console[level] && level !== 'trace' ? level : 'log';
|
|
31
24
|
const color =
|
|
@@ -66,15 +59,13 @@ module.exports = (
|
|
|
66
59
|
data[data.length - 1] = lastItem.trimEnd();
|
|
67
60
|
}
|
|
68
61
|
|
|
69
|
-
const modePrefix =
|
|
70
|
-
!mode || mode == 'BRIDGE' ? '' : `(${mode.toUpperCase()}) `;
|
|
71
62
|
terminal.log(
|
|
72
|
-
color.bold(` ${
|
|
63
|
+
color.bold(` ${logFunction.toUpperCase()} `) +
|
|
73
64
|
''.padEnd(groupStack.length * 2, ' '),
|
|
74
65
|
// `util.format` actually accepts any arguments.
|
|
75
66
|
// If the first argument is a string, it tries to format it.
|
|
76
67
|
// Otherwise, it just concatenates all arguments.
|
|
77
|
-
// $
|
|
68
|
+
// $FlowFixMe[incompatible-type] util.format expected the first argument to be a string
|
|
78
69
|
util.format(...data),
|
|
79
70
|
);
|
|
80
71
|
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
exports.default = parseBundleOptionsFromBundleRequestUrl;
|
|
7
|
+
var _parsePlatformFilePath = _interopRequireDefault(
|
|
8
|
+
require("../node-haste/lib/parsePlatformFilePath"),
|
|
9
|
+
);
|
|
10
|
+
var _types = require("../shared/types");
|
|
11
|
+
var _parseCustomResolverOptions = _interopRequireDefault(
|
|
12
|
+
require("./parseCustomResolverOptions"),
|
|
13
|
+
);
|
|
14
|
+
var _parseCustomTransformOptions = _interopRequireDefault(
|
|
15
|
+
require("./parseCustomTransformOptions"),
|
|
16
|
+
);
|
|
17
|
+
var jscSafeUrl = _interopRequireWildcard(require("jsc-safe-url"));
|
|
18
|
+
var _path = _interopRequireDefault(require("path"));
|
|
19
|
+
function _getRequireWildcardCache(e) {
|
|
20
|
+
if ("function" != typeof WeakMap) return null;
|
|
21
|
+
var r = new WeakMap(),
|
|
22
|
+
t = new WeakMap();
|
|
23
|
+
return (_getRequireWildcardCache = function (e) {
|
|
24
|
+
return e ? t : r;
|
|
25
|
+
})(e);
|
|
26
|
+
}
|
|
27
|
+
function _interopRequireWildcard(e, r) {
|
|
28
|
+
if (!r && e && e.__esModule) return e;
|
|
29
|
+
if (null === e || ("object" != typeof e && "function" != typeof e))
|
|
30
|
+
return { default: e };
|
|
31
|
+
var t = _getRequireWildcardCache(r);
|
|
32
|
+
if (t && t.has(e)) return t.get(e);
|
|
33
|
+
var n = { __proto__: null },
|
|
34
|
+
a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
35
|
+
for (var u in e)
|
|
36
|
+
if ("default" !== u && {}.hasOwnProperty.call(e, u)) {
|
|
37
|
+
var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
|
38
|
+
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : (n[u] = e[u]);
|
|
39
|
+
}
|
|
40
|
+
return ((n.default = e), t && t.set(e, n), n);
|
|
41
|
+
}
|
|
42
|
+
function _interopRequireDefault(e) {
|
|
43
|
+
return e && e.__esModule ? e : { default: e };
|
|
44
|
+
}
|
|
45
|
+
const debug = require("debug")(
|
|
46
|
+
"Metro:Server:parseBundleOptionsFromBundleRequestUrl",
|
|
47
|
+
);
|
|
48
|
+
const TRUE_STRINGS = new Set(["true", "1"]);
|
|
49
|
+
const RESOLVE_BASE_URL = "resolve://";
|
|
50
|
+
const getBoolQueryParam = (searchParams, opt, defaultValue) =>
|
|
51
|
+
searchParams.has(opt)
|
|
52
|
+
? TRUE_STRINGS.has(searchParams.get(opt) || "")
|
|
53
|
+
: defaultValue;
|
|
54
|
+
const getBundleType = (bundleType) =>
|
|
55
|
+
bundleType === "map" ? bundleType : "bundle";
|
|
56
|
+
const getTransformProfile = (transformProfile) =>
|
|
57
|
+
transformProfile === "hermes-stable" || transformProfile === "hermes-canary"
|
|
58
|
+
? transformProfile
|
|
59
|
+
: "default";
|
|
60
|
+
function parseBundleOptionsFromBundleRequestUrl(
|
|
61
|
+
rawNonJscSafeUrlEncodedUrl,
|
|
62
|
+
platforms,
|
|
63
|
+
) {
|
|
64
|
+
if (!URL.canParse(rawNonJscSafeUrlEncodedUrl, RESOLVE_BASE_URL)) {
|
|
65
|
+
throw new Error("Invalid URL", {
|
|
66
|
+
cause: rawNonJscSafeUrlEncodedUrl,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
const {
|
|
70
|
+
protocol: _tempProtocol,
|
|
71
|
+
host,
|
|
72
|
+
searchParams,
|
|
73
|
+
pathname: requestPathname,
|
|
74
|
+
search,
|
|
75
|
+
hash,
|
|
76
|
+
} = new URL(rawNonJscSafeUrlEncodedUrl, RESOLVE_BASE_URL);
|
|
77
|
+
const isRelativeProtocol = rawNonJscSafeUrlEncodedUrl.startsWith("//");
|
|
78
|
+
const protocolPart = isRelativeProtocol ? "//" : _tempProtocol + "//";
|
|
79
|
+
const isNoProtocol = !isRelativeProtocol && protocolPart === RESOLVE_BASE_URL;
|
|
80
|
+
if (isNoProtocol) {
|
|
81
|
+
throw new Error(
|
|
82
|
+
'Expecting the request url to have a valid protocol, e.g. "http://", "https://", or "//"',
|
|
83
|
+
{
|
|
84
|
+
cause: rawNonJscSafeUrlEncodedUrl,
|
|
85
|
+
},
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
const sourceUrl = jscSafeUrl.toJscSafeUrl(
|
|
89
|
+
protocolPart + host + requestPathname + search + hash,
|
|
90
|
+
);
|
|
91
|
+
const pathname = searchParams.get("bundleEntry") || requestPathname || "";
|
|
92
|
+
const platform =
|
|
93
|
+
searchParams.get("platform") ||
|
|
94
|
+
(0, _parsePlatformFilePath.default)(pathname, platforms).platform;
|
|
95
|
+
const bundleType = getBundleType(
|
|
96
|
+
_path.default.extname(pathname).substring(1),
|
|
97
|
+
);
|
|
98
|
+
const { pathname: sourceMapPathname } = new URL(
|
|
99
|
+
pathname.replace(/\.(bundle|delta)$/, ".map"),
|
|
100
|
+
RESOLVE_BASE_URL,
|
|
101
|
+
);
|
|
102
|
+
const sourceMapUrl = protocolPart + host + sourceMapPathname + search + hash;
|
|
103
|
+
const filePathPosix = pathname
|
|
104
|
+
.split("/")
|
|
105
|
+
.map((segment) => decodeURIComponent(segment))
|
|
106
|
+
.join("/")
|
|
107
|
+
.replace(/^(?:\.?\/)?/, "./")
|
|
108
|
+
.replace(/\.[^/.]+$/, "");
|
|
109
|
+
debug(
|
|
110
|
+
"Bundle options parsed from rawNonJscSafeUrlEncodedUrl: %s:\nsourceUrl: %s\nsourceMapUrl: %s\nentryFile: %s",
|
|
111
|
+
rawNonJscSafeUrlEncodedUrl,
|
|
112
|
+
sourceUrl,
|
|
113
|
+
sourceMapUrl,
|
|
114
|
+
filePathPosix,
|
|
115
|
+
);
|
|
116
|
+
return {
|
|
117
|
+
bundleType,
|
|
118
|
+
customResolverOptions: (0, _parseCustomResolverOptions.default)(
|
|
119
|
+
searchParams,
|
|
120
|
+
),
|
|
121
|
+
customTransformOptions: (0, _parseCustomTransformOptions.default)(
|
|
122
|
+
searchParams,
|
|
123
|
+
),
|
|
124
|
+
dev: getBoolQueryParam(searchParams, "dev", true),
|
|
125
|
+
entryFile: filePathPosix,
|
|
126
|
+
excludeSource: getBoolQueryParam(searchParams, "excludeSource", false),
|
|
127
|
+
inlineSourceMap: getBoolQueryParam(searchParams, "inlineSourceMap", false),
|
|
128
|
+
lazy: getBoolQueryParam(searchParams, "lazy", false),
|
|
129
|
+
minify: getBoolQueryParam(searchParams, "minify", false),
|
|
130
|
+
modulesOnly: getBoolQueryParam(searchParams, "modulesOnly", false),
|
|
131
|
+
onProgress: null,
|
|
132
|
+
platform,
|
|
133
|
+
runModule: getBoolQueryParam(searchParams, "runModule", true),
|
|
134
|
+
shallow: getBoolQueryParam(searchParams, "shallow", false),
|
|
135
|
+
sourceMapUrl,
|
|
136
|
+
sourcePaths:
|
|
137
|
+
_types.SourcePathsMode.cast(searchParams.get("sourcePaths")) ??
|
|
138
|
+
_types.SourcePathsMode.Absolute,
|
|
139
|
+
sourceUrl,
|
|
140
|
+
unstable_transformProfile: getTransformProfile(
|
|
141
|
+
searchParams.get("unstable_transformProfile"),
|
|
142
|
+
),
|
|
143
|
+
};
|
|
144
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
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
|
+
* @flow strict-local
|
|
8
|
+
* @format
|
|
9
|
+
* @oncall react_native
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import type {BundleOptions} from '../shared/types';
|
|
13
|
+
import type {TransformProfile} from 'metro-babel-transformer';
|
|
14
|
+
|
|
15
|
+
import parsePlatformFilePath from '../node-haste/lib/parsePlatformFilePath';
|
|
16
|
+
import {SourcePathsMode} from '../shared/types';
|
|
17
|
+
import parseCustomResolverOptions from './parseCustomResolverOptions';
|
|
18
|
+
import parseCustomTransformOptions from './parseCustomTransformOptions';
|
|
19
|
+
import * as jscSafeUrl from 'jsc-safe-url';
|
|
20
|
+
import path from 'path';
|
|
21
|
+
|
|
22
|
+
// eslint-disable-next-line import/no-commonjs
|
|
23
|
+
const debug = require('debug')(
|
|
24
|
+
'Metro:Server:parseBundleOptionsFromBundleRequestUrl',
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
const TRUE_STRINGS = new Set<string>(['true', '1']);
|
|
28
|
+
|
|
29
|
+
// This is a bit weird but this is the recommended way of getting around "URL" demanding to have a valid protocol
|
|
30
|
+
// for when handling relative URLs: https://nodejs.org/docs/latest-v24.x/api/url.html#urlresolvefrom-to
|
|
31
|
+
const RESOLVE_BASE_URL = 'resolve://';
|
|
32
|
+
|
|
33
|
+
const getBoolQueryParam = (
|
|
34
|
+
searchParams: URLSearchParams,
|
|
35
|
+
opt: string,
|
|
36
|
+
defaultValue: boolean,
|
|
37
|
+
) =>
|
|
38
|
+
searchParams.has(opt)
|
|
39
|
+
? TRUE_STRINGS.has(searchParams.get(opt) || '')
|
|
40
|
+
: defaultValue;
|
|
41
|
+
|
|
42
|
+
const getBundleType = (bundleType: string): 'map' | 'bundle' =>
|
|
43
|
+
bundleType === 'map' ? bundleType : 'bundle';
|
|
44
|
+
|
|
45
|
+
const getTransformProfile = (transformProfile: ?string): TransformProfile =>
|
|
46
|
+
transformProfile === 'hermes-stable' || transformProfile === 'hermes-canary'
|
|
47
|
+
? transformProfile
|
|
48
|
+
: 'default';
|
|
49
|
+
|
|
50
|
+
export default function parseBundleOptionsFromBundleRequestUrl(
|
|
51
|
+
rawNonJscSafeUrlEncodedUrl: string,
|
|
52
|
+
platforms: Set<string>,
|
|
53
|
+
): {
|
|
54
|
+
...BundleOptions,
|
|
55
|
+
// Retained for backwards compatibility, unused in Metro, to be removed.
|
|
56
|
+
bundleType: string,
|
|
57
|
+
} {
|
|
58
|
+
if (
|
|
59
|
+
!URL.canParse(rawNonJscSafeUrlEncodedUrl, RESOLVE_BASE_URL /* baseURL */)
|
|
60
|
+
) {
|
|
61
|
+
throw new Error('Invalid URL', {cause: rawNonJscSafeUrlEncodedUrl});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const {
|
|
65
|
+
protocol: _tempProtocol,
|
|
66
|
+
host,
|
|
67
|
+
searchParams,
|
|
68
|
+
pathname: requestPathname,
|
|
69
|
+
search,
|
|
70
|
+
hash,
|
|
71
|
+
} = new URL(rawNonJscSafeUrlEncodedUrl, RESOLVE_BASE_URL /* baseURL */);
|
|
72
|
+
|
|
73
|
+
// e.g. "//localhost:8081/foo/bar.js?platform=ios"
|
|
74
|
+
const isRelativeProtocol = rawNonJscSafeUrlEncodedUrl.startsWith('//');
|
|
75
|
+
|
|
76
|
+
const protocolPart = isRelativeProtocol ? '//' : _tempProtocol + '//';
|
|
77
|
+
|
|
78
|
+
// e.g. "/foo/bar.js?platform=ios"
|
|
79
|
+
const isNoProtocol = !isRelativeProtocol && protocolPart === RESOLVE_BASE_URL;
|
|
80
|
+
if (isNoProtocol) {
|
|
81
|
+
throw new Error(
|
|
82
|
+
'Expecting the request url to have a valid protocol, e.g. "http://", "https://", or "//"',
|
|
83
|
+
{cause: rawNonJscSafeUrlEncodedUrl},
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const sourceUrl = jscSafeUrl.toJscSafeUrl(
|
|
88
|
+
protocolPart + host + requestPathname + search + hash,
|
|
89
|
+
);
|
|
90
|
+
|
|
91
|
+
const pathname = searchParams.get('bundleEntry') || requestPathname || '';
|
|
92
|
+
|
|
93
|
+
const platform =
|
|
94
|
+
searchParams.get('platform') ||
|
|
95
|
+
parsePlatformFilePath(pathname, platforms).platform;
|
|
96
|
+
|
|
97
|
+
const bundleType = getBundleType(path.extname(pathname).substring(1));
|
|
98
|
+
|
|
99
|
+
const {pathname: sourceMapPathname} = new URL(
|
|
100
|
+
pathname.replace(/\.(bundle|delta)$/, '.map'),
|
|
101
|
+
RESOLVE_BASE_URL /* baseURL */,
|
|
102
|
+
);
|
|
103
|
+
const sourceMapUrl = protocolPart + host + sourceMapPathname + search + hash;
|
|
104
|
+
|
|
105
|
+
const filePathPosix = pathname
|
|
106
|
+
// Using this Metro particular convention for decoding URL paths into file paths
|
|
107
|
+
.split('/')
|
|
108
|
+
.map(segment => decodeURIComponent(segment))
|
|
109
|
+
.join('/')
|
|
110
|
+
.replace(/^(?:\.?\/)?/, './')
|
|
111
|
+
.replace(/\.[^/.]+$/, '');
|
|
112
|
+
|
|
113
|
+
debug(
|
|
114
|
+
'Bundle options parsed from rawNonJscSafeUrlEncodedUrl: %s:\nsourceUrl: %s\nsourceMapUrl: %s\nentryFile: %s',
|
|
115
|
+
rawNonJscSafeUrlEncodedUrl,
|
|
116
|
+
sourceUrl,
|
|
117
|
+
sourceMapUrl,
|
|
118
|
+
filePathPosix,
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
return {
|
|
122
|
+
bundleType,
|
|
123
|
+
customResolverOptions: parseCustomResolverOptions(searchParams),
|
|
124
|
+
customTransformOptions: parseCustomTransformOptions(searchParams),
|
|
125
|
+
dev: getBoolQueryParam(searchParams, 'dev', true),
|
|
126
|
+
// Absolute and relative paths are converted to paths relative to root
|
|
127
|
+
entryFile: filePathPosix,
|
|
128
|
+
excludeSource: getBoolQueryParam(searchParams, 'excludeSource', false),
|
|
129
|
+
inlineSourceMap: getBoolQueryParam(searchParams, 'inlineSourceMap', false),
|
|
130
|
+
lazy: getBoolQueryParam(searchParams, 'lazy', false),
|
|
131
|
+
minify: getBoolQueryParam(searchParams, 'minify', false),
|
|
132
|
+
modulesOnly: getBoolQueryParam(searchParams, 'modulesOnly', false),
|
|
133
|
+
onProgress: null,
|
|
134
|
+
platform,
|
|
135
|
+
runModule: getBoolQueryParam(searchParams, 'runModule', true),
|
|
136
|
+
shallow: getBoolQueryParam(searchParams, 'shallow', false),
|
|
137
|
+
sourceMapUrl,
|
|
138
|
+
sourcePaths:
|
|
139
|
+
SourcePathsMode.cast(searchParams.get('sourcePaths')) ??
|
|
140
|
+
SourcePathsMode.Absolute,
|
|
141
|
+
sourceUrl,
|
|
142
|
+
unstable_transformProfile: getTransformProfile(
|
|
143
|
+
searchParams.get('unstable_transformProfile'),
|
|
144
|
+
),
|
|
145
|
+
};
|
|
146
|
+
}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
exports.default = parseCustomResolverOptions;
|
|
4
7
|
const PREFIX = "resolver.";
|
|
5
|
-
|
|
8
|
+
function parseCustomResolverOptions(searchParams) {
|
|
6
9
|
const customResolverOptions = Object.create(null);
|
|
7
|
-
|
|
8
|
-
Object.keys(query).forEach((key) => {
|
|
10
|
+
searchParams.forEach((value, key) => {
|
|
9
11
|
if (key.startsWith(PREFIX)) {
|
|
10
|
-
customResolverOptions[key.
|
|
12
|
+
customResolverOptions[key.substring(PREFIX.length)] = value;
|
|
11
13
|
}
|
|
12
14
|
});
|
|
13
15
|
return customResolverOptions;
|
|
14
|
-
}
|
|
16
|
+
}
|
|
@@ -9,30 +9,24 @@
|
|
|
9
9
|
* @oncall react_native
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
'use strict';
|
|
13
|
-
|
|
14
12
|
import type {CustomResolverOptions} from '../../../metro-resolver/src/types';
|
|
15
13
|
|
|
16
|
-
const nullthrows = require('nullthrows');
|
|
17
|
-
|
|
18
14
|
const PREFIX = 'resolver.';
|
|
19
15
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}): CustomResolverOptions {
|
|
16
|
+
export default function parseCustomResolverOptions(
|
|
17
|
+
searchParams: URLSearchParams,
|
|
18
|
+
): CustomResolverOptions {
|
|
24
19
|
const customResolverOptions: {
|
|
25
20
|
__proto__: null,
|
|
26
21
|
[string]: mixed,
|
|
27
22
|
...
|
|
28
23
|
} = Object.create(null);
|
|
29
|
-
const query = nullthrows(urlObj.query);
|
|
30
24
|
|
|
31
|
-
|
|
25
|
+
searchParams.forEach((value: string, key: string) => {
|
|
32
26
|
if (key.startsWith(PREFIX)) {
|
|
33
|
-
customResolverOptions[key.
|
|
27
|
+
customResolverOptions[key.substring(PREFIX.length)] = value;
|
|
34
28
|
}
|
|
35
29
|
});
|
|
36
30
|
|
|
37
31
|
return customResolverOptions;
|
|
38
|
-
}
|
|
32
|
+
}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
exports.default = parseCustomTransformOptions;
|
|
4
7
|
const PREFIX = "transform.";
|
|
5
|
-
|
|
8
|
+
function parseCustomTransformOptions(searchParams) {
|
|
6
9
|
const customTransformOptions = Object.create(null);
|
|
7
|
-
|
|
8
|
-
Object.keys(query).forEach((key) => {
|
|
10
|
+
searchParams.forEach((value, key) => {
|
|
9
11
|
if (key.startsWith(PREFIX)) {
|
|
10
|
-
customTransformOptions[key.
|
|
12
|
+
customTransformOptions[key.substring(PREFIX.length)] = value;
|
|
11
13
|
}
|
|
12
14
|
});
|
|
13
15
|
return customTransformOptions;
|
|
14
|
-
}
|
|
16
|
+
}
|
|
@@ -9,27 +9,24 @@
|
|
|
9
9
|
* @oncall react_native
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
'use strict';
|
|
13
|
-
|
|
14
12
|
import type {CustomTransformOptions} from 'metro-transform-worker';
|
|
15
13
|
|
|
16
|
-
const nullthrows = require('nullthrows');
|
|
17
|
-
|
|
18
14
|
const PREFIX = 'transform.';
|
|
19
15
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
export default function parseCustomTransformOptions(
|
|
17
|
+
searchParams: URLSearchParams,
|
|
18
|
+
): CustomTransformOptions {
|
|
19
|
+
const customTransformOptions: {
|
|
20
|
+
__proto__: null,
|
|
21
|
+
[string]: mixed,
|
|
22
|
+
...
|
|
23
|
+
} = Object.create(null);
|
|
26
24
|
|
|
27
|
-
|
|
25
|
+
searchParams.forEach((value: string, key: string) => {
|
|
28
26
|
if (key.startsWith(PREFIX)) {
|
|
29
|
-
|
|
30
|
-
customTransformOptions[key.substr(PREFIX.length)] = query[key];
|
|
27
|
+
customTransformOptions[key.substring(PREFIX.length)] = value;
|
|
31
28
|
}
|
|
32
29
|
});
|
|
33
30
|
|
|
34
31
|
return customTransformOptions;
|
|
35
|
-
}
|
|
32
|
+
}
|
package/src/lib/parseJsonBody.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
exports.default = parseJsonBody;
|
|
3
7
|
const CONTENT_TYPE = "application/json";
|
|
4
8
|
const SIZE_LIMIT = 100 * 1024 * 1024;
|
|
5
9
|
function parseJsonBody(req, options = {}) {
|
|
@@ -32,4 +36,3 @@ function parseJsonBody(req, options = {}) {
|
|
|
32
36
|
});
|
|
33
37
|
});
|
|
34
38
|
}
|
|
35
|
-
module.exports = parseJsonBody;
|
|
@@ -17,7 +17,7 @@ const SIZE_LIMIT = 100 * 1024 * 1024; // 100MB
|
|
|
17
17
|
/**
|
|
18
18
|
* Attempt to parse a request body as JSON.
|
|
19
19
|
*/
|
|
20
|
-
function parseJsonBody(
|
|
20
|
+
export default function parseJsonBody(
|
|
21
21
|
req: IncomingMessage,
|
|
22
22
|
options: {strict?: boolean} = {},
|
|
23
23
|
): Promise<$FlowFixMe> {
|
|
@@ -56,5 +56,3 @@ function parseJsonBody(
|
|
|
56
56
|
});
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
-
|
|
60
|
-
module.exports = parseJsonBody;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
exports.normalizePathSeparatorsToPosix = void 0;
|
|
7
|
+
var path = _interopRequireWildcard(require("path"));
|
|
8
|
+
function _getRequireWildcardCache(e) {
|
|
9
|
+
if ("function" != typeof WeakMap) return null;
|
|
10
|
+
var r = new WeakMap(),
|
|
11
|
+
t = new WeakMap();
|
|
12
|
+
return (_getRequireWildcardCache = function (e) {
|
|
13
|
+
return e ? t : r;
|
|
14
|
+
})(e);
|
|
15
|
+
}
|
|
16
|
+
function _interopRequireWildcard(e, r) {
|
|
17
|
+
if (!r && e && e.__esModule) return e;
|
|
18
|
+
if (null === e || ("object" != typeof e && "function" != typeof e))
|
|
19
|
+
return { default: e };
|
|
20
|
+
var t = _getRequireWildcardCache(r);
|
|
21
|
+
if (t && t.has(e)) return t.get(e);
|
|
22
|
+
var n = { __proto__: null },
|
|
23
|
+
a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
24
|
+
for (var u in e)
|
|
25
|
+
if ("default" !== u && {}.hasOwnProperty.call(e, u)) {
|
|
26
|
+
var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
|
27
|
+
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : (n[u] = e[u]);
|
|
28
|
+
}
|
|
29
|
+
return ((n.default = e), t && t.set(e, n), n);
|
|
30
|
+
}
|
|
31
|
+
const normalizePathSeparatorsToPosix = (exports.normalizePathSeparatorsToPosix =
|
|
32
|
+
path.sep === "/"
|
|
33
|
+
? (filePath) => filePath
|
|
34
|
+
: (filePath) => filePath.replaceAll("\\", "/"));
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
* @flow strict
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import * as path from 'path';
|
|
12
|
+
|
|
13
|
+
export const normalizePathSeparatorsToPosix: string => string =
|
|
14
|
+
path.sep === '/'
|
|
15
|
+
? filePath => filePath
|
|
16
|
+
: filePath => filePath.replaceAll('\\', '/');
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
exports.default = relativizeSourceMapInline;
|
|
7
|
+
var _path = _interopRequireDefault(require("path"));
|
|
8
|
+
function _interopRequireDefault(e) {
|
|
9
|
+
return e && e.__esModule ? e : { default: e };
|
|
10
|
+
}
|
|
4
11
|
function relativizeSourceMapInline(sourceMap, sourcesRoot) {
|
|
5
12
|
if (sourceMap.mappings === undefined) {
|
|
6
13
|
for (let i = 0; i < sourceMap.sections.length; i++) {
|
|
@@ -8,8 +15,10 @@ function relativizeSourceMapInline(sourceMap, sourcesRoot) {
|
|
|
8
15
|
}
|
|
9
16
|
} else {
|
|
10
17
|
for (let i = 0; i < sourceMap.sources.length; i++) {
|
|
11
|
-
sourceMap.sources[i] =
|
|
18
|
+
sourceMap.sources[i] = _path.default.relative(
|
|
19
|
+
sourcesRoot,
|
|
20
|
+
sourceMap.sources[i],
|
|
21
|
+
);
|
|
12
22
|
}
|
|
13
23
|
}
|
|
14
24
|
}
|
|
15
|
-
module.exports = relativizeSourceMapInline;
|
|
@@ -9,13 +9,11 @@
|
|
|
9
9
|
* @oncall react_native
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
'use strict';
|
|
13
|
-
|
|
14
12
|
import type {MixedSourceMap} from 'metro-source-map';
|
|
15
13
|
|
|
16
|
-
|
|
14
|
+
import path from 'path';
|
|
17
15
|
|
|
18
|
-
function relativizeSourceMapInline(
|
|
16
|
+
export default function relativizeSourceMapInline(
|
|
19
17
|
sourceMap: MixedSourceMap,
|
|
20
18
|
sourcesRoot: string,
|
|
21
19
|
): void {
|
|
@@ -30,5 +28,3 @@ function relativizeSourceMapInline(
|
|
|
30
28
|
}
|
|
31
29
|
}
|
|
32
30
|
}
|
|
33
|
-
|
|
34
|
-
module.exports = relativizeSourceMapInline;
|