metro 0.66.2 → 0.69.0
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 +22 -24
- package/src/Assets.js +9 -9
- package/src/Assets.js.flow +5 -7
- package/src/Bundler/util.js +16 -15
- package/src/Bundler/util.js.flow +11 -10
- package/src/Bundler.js +21 -8
- package/src/Bundler.js.flow +19 -7
- package/src/DeltaBundler/DeltaCalculator.js +15 -15
- package/src/DeltaBundler/DeltaCalculator.js.flow +7 -7
- package/src/DeltaBundler/Serializers/baseBytecodeBundle.js +13 -13
- package/src/DeltaBundler/Serializers/baseBytecodeBundle.js.flow +6 -7
- package/src/DeltaBundler/Serializers/baseJSBundle.js +4 -4
- package/src/DeltaBundler/Serializers/baseJSBundle.js.flow +4 -4
- package/src/DeltaBundler/Serializers/getAllFiles.js +1 -1
- package/src/DeltaBundler/Serializers/getAllFiles.js.flow +3 -3
- package/src/DeltaBundler/Serializers/getAssets.js +3 -3
- package/src/DeltaBundler/Serializers/getAssets.js.flow +4 -5
- package/src/DeltaBundler/Serializers/getExplodedSourceMap.js +4 -4
- package/src/DeltaBundler/Serializers/getExplodedSourceMap.js.flow +4 -4
- package/src/DeltaBundler/Serializers/getRamBundleInfo.js +20 -20
- package/src/DeltaBundler/Serializers/getRamBundleInfo.js.flow +9 -10
- package/src/DeltaBundler/Serializers/helpers/bytecode.js +11 -11
- package/src/DeltaBundler/Serializers/helpers/bytecode.js.flow +5 -6
- package/src/DeltaBundler/Serializers/helpers/getInlineSourceMappingURL.js +1 -1
- package/src/DeltaBundler/Serializers/helpers/getInlineSourceMappingURL.js.flow +1 -1
- package/src/DeltaBundler/Serializers/helpers/getSourceMapInfo.js +2 -2
- package/src/DeltaBundler/Serializers/helpers/getSourceMapInfo.js.flow +4 -4
- package/src/DeltaBundler/Serializers/helpers/getTransitiveDependencies.js +1 -1
- package/src/DeltaBundler/Serializers/helpers/getTransitiveDependencies.js.flow +1 -1
- package/src/DeltaBundler/Serializers/helpers/js.js +6 -6
- package/src/DeltaBundler/Serializers/helpers/js.js.flow +11 -12
- package/src/DeltaBundler/Serializers/helpers/processBytecodeModules.js +4 -4
- package/src/DeltaBundler/Serializers/helpers/processBytecodeModules.js.flow +3 -3
- package/src/DeltaBundler/Serializers/helpers/processModules.js +4 -4
- package/src/DeltaBundler/Serializers/helpers/processModules.js.flow +3 -3
- package/src/DeltaBundler/Serializers/hmrJSBundle.js +9 -9
- package/src/DeltaBundler/Serializers/hmrJSBundle.js.flow +9 -8
- package/src/DeltaBundler/Serializers/sourceMapGenerator.js +6 -6
- package/src/DeltaBundler/Serializers/sourceMapGenerator.js.flow +3 -4
- package/src/DeltaBundler/Serializers/sourceMapObject.js +5 -5
- package/src/DeltaBundler/Serializers/sourceMapObject.js.flow +4 -4
- package/src/DeltaBundler/Serializers/sourceMapString.js +2 -2
- package/src/DeltaBundler/Serializers/sourceMapString.js.flow +3 -3
- package/src/DeltaBundler/Transformer.js +9 -9
- package/src/DeltaBundler/Transformer.js.flow +7 -9
- package/src/DeltaBundler/Worker.js +8 -11
- package/src/DeltaBundler/Worker.js.flow +8 -11
- package/src/DeltaBundler/WorkerFarm.js +14 -17
- package/src/DeltaBundler/WorkerFarm.js.flow +7 -10
- package/src/DeltaBundler/__fixtures__/hasteImpl.js +2 -2
- package/src/DeltaBundler/computeDelta.js +2 -2
- package/src/DeltaBundler/computeDelta.js.flow +2 -2
- package/src/DeltaBundler/getTransformCacheKey.js +4 -4
- package/src/DeltaBundler/getTransformCacheKey.js.flow +5 -6
- package/src/DeltaBundler/mergeDeltas.js +2 -2
- package/src/DeltaBundler/mergeDeltas.js.flow +1 -1
- package/src/DeltaBundler/traverseDependencies.js +22 -22
- package/src/DeltaBundler/traverseDependencies.js.flow +3 -3
- package/src/DeltaBundler/types.flow.js +1 -1
- package/src/DeltaBundler/types.flow.js.flow +1 -1
- package/src/DeltaBundler.js +5 -5
- package/src/DeltaBundler.js.flow +4 -4
- package/src/HmrServer.js +71 -55
- package/src/HmrServer.js.flow +40 -37
- package/src/IncrementalBundler/GraphNotFoundError.js +1 -1
- package/src/IncrementalBundler/GraphNotFoundError.js.flow +1 -1
- package/src/IncrementalBundler/ResourceNotFoundError.js +1 -1
- package/src/IncrementalBundler/ResourceNotFoundError.js.flow +1 -1
- package/src/IncrementalBundler/RevisionNotFoundError.js +1 -1
- package/src/IncrementalBundler/RevisionNotFoundError.js.flow +1 -1
- package/src/IncrementalBundler.js +44 -32
- package/src/IncrementalBundler.js.flow +30 -24
- package/src/ModuleGraph/module.js +3 -3
- package/src/ModuleGraph/module.js.flow +1 -1
- package/src/ModuleGraph/node-haste/HasteFS.js +2 -2
- package/src/ModuleGraph/node-haste/HasteFS.js.flow +1 -1
- package/src/ModuleGraph/node-haste/Module.js +1 -1
- package/src/ModuleGraph/node-haste/Module.js.flow +1 -1
- package/src/ModuleGraph/node-haste/ModuleCache.js +1 -1
- package/src/ModuleGraph/node-haste/ModuleCache.js.flow +3 -3
- package/src/ModuleGraph/node-haste/Package.js +3 -3
- package/src/ModuleGraph/node-haste/Package.js.flow +3 -3
- package/src/ModuleGraph/node-haste/node-haste.flow.js +1 -1
- package/src/ModuleGraph/node-haste/node-haste.flow.js.flow +1 -1
- package/src/ModuleGraph/node-haste/node-haste.js +42 -32
- package/src/ModuleGraph/node-haste/node-haste.js.flow +28 -23
- package/src/ModuleGraph/output/indexed-ram-bundle.js +17 -17
- package/src/ModuleGraph/output/indexed-ram-bundle.js.flow +41 -9
- package/src/ModuleGraph/output/multiple-files-ram-bundle.js +18 -18
- package/src/ModuleGraph/output/multiple-files-ram-bundle.js.flow +21 -9
- package/src/ModuleGraph/output/plain-bundle.js +6 -6
- package/src/ModuleGraph/output/plain-bundle.js.flow +7 -7
- package/src/ModuleGraph/output/reverse-dependency-map-references.js +3 -3
- package/src/ModuleGraph/output/reverse-dependency-map-references.js.flow +4 -8
- package/src/ModuleGraph/output/util.js +31 -30
- package/src/ModuleGraph/output/util.js.flow +15 -16
- package/src/ModuleGraph/silent-console.js +2 -2
- package/src/ModuleGraph/silent-console.js.flow +1 -1
- package/src/ModuleGraph/test-helpers.js +7 -7
- package/src/ModuleGraph/types.flow.js +1 -1
- package/src/ModuleGraph/types.flow.js.flow +7 -7
- package/src/ModuleGraph/worker/JsFileWrapping.js +7 -7
- package/src/ModuleGraph/worker/JsFileWrapping.js.flow +3 -2
- package/src/ModuleGraph/worker/Platforms.js +2 -2
- package/src/ModuleGraph/worker/Platforms.js.flow +1 -1
- package/src/ModuleGraph/worker/collectDependencies.js +24 -25
- package/src/ModuleGraph/worker/collectDependencies.js.flow +15 -17
- package/src/ModuleGraph/worker/generate.js +2 -2
- package/src/ModuleGraph/worker/generate.js.flow +3 -3
- package/src/ModuleGraph/worker/generateImportNames.js +5 -5
- package/src/ModuleGraph/worker/generateImportNames.js.flow +3 -5
- package/src/ModuleGraph/worker/mergeSourceMaps.js +8 -7
- package/src/ModuleGraph/worker/mergeSourceMaps.js.flow +3 -3
- package/src/Server/MultipartResponse.js +4 -8
- package/src/Server/symbolicate.js +8 -8
- package/src/Server/symbolicate.js.flow +17 -5
- package/src/Server.js +202 -150
- package/src/Server.js.flow +129 -87
- package/src/cli-utils.js +4 -4
- package/src/cli-utils.js.flow +15 -13
- package/src/cli.js +4 -4
- package/src/cli.js.flow +2 -4
- package/src/commands/build.js +23 -24
- package/src/commands/build.js.flow +6 -9
- package/src/commands/dependencies.js +25 -19
- package/src/commands/serve.js +17 -18
- package/src/commands/serve.js.flow +6 -9
- package/src/index.js +116 -51
- package/src/index.js.flow +107 -41
- package/src/integration_tests/basic_bundle/AssetRegistry.js +2 -2
- package/src/integration_tests/basic_bundle/AssetRegistry.js.flow +1 -1
- package/src/integration_tests/basic_bundle/Bar.js +2 -2
- package/src/integration_tests/basic_bundle/Bar.js.flow +1 -1
- package/src/integration_tests/basic_bundle/ErrorBundle.js +2 -2
- package/src/integration_tests/basic_bundle/ErrorBundle.js.flow +1 -1
- package/src/integration_tests/basic_bundle/Foo.js +2 -2
- package/src/integration_tests/basic_bundle/Foo.js.flow +1 -1
- package/src/integration_tests/basic_bundle/TestBundle.js +3 -2
- package/src/integration_tests/basic_bundle/TestBundle.js.flow +3 -1
- package/src/integration_tests/basic_bundle/TestPolyfill.js +1 -1
- package/src/integration_tests/basic_bundle/TestPolyfill.js.flow +1 -1
- package/src/integration_tests/basic_bundle/TypeScript.ts +1 -1
- package/src/integration_tests/basic_bundle/import-export/export-1.js +2 -2
- package/src/integration_tests/basic_bundle/import-export/export-1.js.flow +1 -1
- package/src/integration_tests/basic_bundle/import-export/export-2.js +2 -2
- package/src/integration_tests/basic_bundle/import-export/export-2.js.flow +1 -1
- package/src/integration_tests/basic_bundle/import-export/export-3.js +2 -2
- package/src/integration_tests/basic_bundle/import-export/export-3.js.flow +1 -1
- package/src/integration_tests/basic_bundle/import-export/export-4.js +2 -2
- package/src/integration_tests/basic_bundle/import-export/export-4.js.flow +1 -1
- package/src/integration_tests/basic_bundle/import-export/export-5.js +2 -2
- package/src/integration_tests/basic_bundle/import-export/export-5.js.flow +1 -1
- package/src/integration_tests/basic_bundle/import-export/export-6.js +2 -2
- package/src/integration_tests/basic_bundle/import-export/export-6.js.flow +1 -1
- package/src/integration_tests/basic_bundle/import-export/export-null.js +2 -2
- package/src/integration_tests/basic_bundle/import-export/export-null.js.flow +1 -1
- package/src/integration_tests/basic_bundle/import-export/export-primitive-default.js +2 -2
- package/src/integration_tests/basic_bundle/import-export/export-primitive-default.js.flow +1 -1
- package/src/integration_tests/basic_bundle/import-export/index.js +8 -8
- package/src/integration_tests/basic_bundle/import-export/index.js.flow +1 -1
- package/src/integration_tests/basic_bundle/polyfill.js +1 -1
- package/src/integration_tests/execBundle.js +2 -2
- package/src/integration_tests/execBundle.js.flow +1 -1
- package/src/integration_tests/metro.config.js +8 -8
- package/src/lib/BatchProcessor.js +3 -3
- package/src/lib/BatchProcessor.js.flow +1 -1
- package/src/lib/JsonReporter.js +2 -2
- package/src/lib/JsonReporter.js.flow +1 -1
- package/src/lib/RamBundleParser.js +1 -1
- package/src/lib/RamBundleParser.js.flow +1 -1
- package/src/lib/TerminalReporter.js +14 -14
- package/src/lib/TerminalReporter.js.flow +9 -10
- package/src/lib/bundleToBytecode.js +6 -7
- package/src/lib/bundleToBytecode.js.flow +8 -7
- package/src/lib/bundleToString.js +3 -3
- package/src/lib/bundleToString.js.flow +5 -4
- package/src/lib/countLines.js +3 -7
- package/src/lib/countLines.js.flow +4 -7
- package/src/lib/createModuleIdFactory.js +2 -2
- package/src/lib/createModuleIdFactory.js.flow +1 -1
- package/src/lib/{attachWebsocketServer.js → createWebsocketServer.js} +18 -17
- package/src/lib/{attachWebsocketServer.js.flow → createWebsocketServer.js.flow} +12 -21
- package/src/lib/debounceAsyncQueue.js +2 -2
- package/src/lib/debounceAsyncQueue.js.flow +1 -1
- package/src/lib/formatBundlingError.js +21 -21
- package/src/lib/formatBundlingError.js.flow +6 -8
- package/src/lib/getAppendScripts.js +26 -27
- package/src/lib/getAppendScripts.js.flow +7 -8
- package/src/lib/getGraphId.js +3 -3
- package/src/lib/getGraphId.js.flow +3 -3
- package/src/lib/getMaxWorkers.js +2 -2
- package/src/lib/getMaxWorkers.js.flow +1 -1
- package/src/lib/getPreludeCode.js +2 -2
- package/src/lib/getPreludeCode.js.flow +1 -1
- package/src/lib/getPrependedScripts.js +15 -15
- package/src/lib/getPrependedScripts.js.flow +7 -8
- package/src/lib/logToConsole.js +1 -1
- package/src/lib/logToConsole.js.flow +3 -3
- package/src/lib/parseCustomTransformOptions.js +2 -2
- package/src/lib/parseCustomTransformOptions.js.flow +3 -3
- package/src/lib/parseOptionsFromUrl.js +7 -7
- package/src/lib/parseOptionsFromUrl.js.flow +29 -9
- package/src/lib/relativizeSourceMap.js +1 -1
- package/src/lib/relativizeSourceMap.js.flow +3 -3
- package/src/lib/reporting.js +5 -5
- package/src/lib/reporting.js.flow +16 -3
- package/src/lib/splitBundleOptions.js +5 -5
- package/src/lib/splitBundleOptions.js.flow +1 -1
- package/src/lib/transformHelpers.js +10 -10
- package/src/lib/transformHelpers.js.flow +5 -5
- package/src/node-haste/DependencyGraph/ModuleResolution.js +51 -30
- package/src/node-haste/DependencyGraph/ModuleResolution.js.flow +46 -42
- package/src/node-haste/DependencyGraph/createHasteMap.js +99 -0
- package/src/node-haste/DependencyGraph/createHasteMap.js.flow +88 -0
- package/src/node-haste/DependencyGraph/{assets/empty-module.js → types.js} +2 -2
- package/src/node-haste/DependencyGraph/types.js.flow +88 -0
- package/src/node-haste/DependencyGraph.js +49 -117
- package/src/node-haste/DependencyGraph.js.flow +36 -111
- package/src/node-haste/Module.js +1 -1
- package/src/node-haste/Module.js.flow +3 -3
- package/src/node-haste/ModuleCache.js +54 -13
- package/src/node-haste/ModuleCache.js.flow +53 -12
- package/src/node-haste/Package.js +7 -9
- package/src/node-haste/Package.js.flow +1 -8
- package/src/node-haste/lib/AssetPaths.js +5 -5
- package/src/node-haste/lib/AssetPaths.js.flow +2 -4
- package/src/node-haste/lib/parsePlatformFilePath.js +4 -4
- package/src/node-haste/lib/parsePlatformFilePath.js.flow +1 -1
- package/src/shared/output/RamBundle/as-assets.js +16 -17
- package/src/shared/output/RamBundle/as-assets.js.flow +11 -15
- package/src/shared/output/RamBundle/as-indexed-file.js +14 -15
- package/src/shared/output/RamBundle/as-indexed-file.js.flow +8 -12
- package/src/shared/output/RamBundle/buildSourcemapWithMetadata.js +7 -7
- package/src/shared/output/RamBundle/buildSourcemapWithMetadata.js.flow +4 -4
- package/src/shared/output/RamBundle/magic-number.js +1 -1
- package/src/shared/output/RamBundle/magic-number.js.flow +1 -1
- package/src/shared/output/RamBundle/util.js +21 -19
- package/src/shared/output/RamBundle/util.js.flow +5 -8
- package/src/shared/output/RamBundle/write-sourcemap.js +1 -1
- package/src/shared/output/RamBundle/write-sourcemap.js.flow +1 -1
- package/src/shared/output/RamBundle.js +2 -2
- package/src/shared/output/RamBundle.js.flow +4 -5
- package/src/shared/output/bundle.js +6 -6
- package/src/shared/output/bundle.js.flow +4 -5
- package/src/shared/output/meta.js +4 -5
- package/src/shared/output/meta.js.flow +2 -4
- package/src/shared/output/unbundle.js +1 -1
- package/src/shared/output/unbundle.js.flow +1 -1
- package/src/shared/output/writeFile.js +1 -1
- package/src/shared/output/writeFile.js.flow +1 -1
- package/src/shared/types.flow.js +1 -1
- package/src/shared/types.flow.js.flow +2 -2
- package/src/node-haste/DependencyGraph/assets/empty-module.js.flow +0 -9
- package/src/node-haste/types.js +0 -10
- package/src/node-haste/types.js.flow +0 -23
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -10,14 +10,13 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
const invariant = require('invariant');
|
|
14
|
-
const path = require('path');
|
|
15
|
-
|
|
16
|
-
const {addParamsToDefineCall} = require('metro-transform-plugins');
|
|
17
|
-
|
|
18
13
|
import type {MixedOutput, Module} from '../../types.flow';
|
|
19
14
|
import type {JsOutput} from 'metro-transform-worker';
|
|
20
15
|
|
|
16
|
+
const invariant = require('invariant');
|
|
17
|
+
const {addParamsToDefineCall} = require('metro-transform-plugins');
|
|
18
|
+
const path = require('path');
|
|
19
|
+
|
|
21
20
|
export type Options = {
|
|
22
21
|
+createModuleId: string => number | string,
|
|
23
22
|
+dev: boolean,
|
|
@@ -60,18 +59,18 @@ function getJsOutput(
|
|
|
60
59
|
|
|
61
60
|
invariant(
|
|
62
61
|
jsModules.length === 1,
|
|
63
|
-
`Modules must have exactly one JS output, but ${
|
|
64
|
-
'unknown module'
|
|
62
|
+
`Modules must have exactly one JS output, but ${
|
|
63
|
+
module.path ?? 'unknown module'
|
|
64
|
+
} has ${jsModules.length} JS outputs.`,
|
|
65
65
|
);
|
|
66
66
|
|
|
67
67
|
const jsOutput: JsOutput = (jsModules[0]: any);
|
|
68
68
|
|
|
69
69
|
invariant(
|
|
70
70
|
Number.isFinite(jsOutput.data.lineCount),
|
|
71
|
-
`JS output must populate lineCount, but ${
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}'`,
|
|
71
|
+
`JS output must populate lineCount, but ${
|
|
72
|
+
module.path ?? 'unknown module'
|
|
73
|
+
} has ${jsOutput.type} output with lineCount '${jsOutput.data.lineCount}'`,
|
|
75
74
|
);
|
|
76
75
|
|
|
77
76
|
return jsOutput;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -18,13 +18,13 @@ function processBytecodeModules(
|
|
|
18
18
|
return [...modules]
|
|
19
19
|
.filter(isBytecodeModule)
|
|
20
20
|
.filter(filter)
|
|
21
|
-
.map(module => [
|
|
21
|
+
.map((module) => [
|
|
22
22
|
module,
|
|
23
23
|
wrapModule(module, {
|
|
24
24
|
createModuleId,
|
|
25
25
|
dev,
|
|
26
|
-
projectRoot
|
|
27
|
-
})
|
|
26
|
+
projectRoot,
|
|
27
|
+
}),
|
|
28
28
|
]);
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
const {isBytecodeModule, wrapModule} = require('./bytecode');
|
|
14
|
-
|
|
15
13
|
import type {Module} from '../../types.flow';
|
|
16
14
|
|
|
15
|
+
const {isBytecodeModule, wrapModule} = require('./bytecode');
|
|
16
|
+
|
|
17
17
|
function processBytecodeModules(
|
|
18
18
|
modules: $ReadOnlyArray<Module<>>,
|
|
19
19
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -18,13 +18,13 @@ function processModules(
|
|
|
18
18
|
return [...modules]
|
|
19
19
|
.filter(isJsModule)
|
|
20
20
|
.filter(filter)
|
|
21
|
-
.map(module => [
|
|
21
|
+
.map((module) => [
|
|
22
22
|
module,
|
|
23
23
|
wrapModule(module, {
|
|
24
24
|
createModuleId,
|
|
25
25
|
dev,
|
|
26
|
-
projectRoot
|
|
27
|
-
})
|
|
26
|
+
projectRoot,
|
|
27
|
+
}),
|
|
28
28
|
]);
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
const {isJsModule, wrapModule} = require('./js');
|
|
14
|
-
|
|
15
13
|
import type {Module} from '../../types.flow';
|
|
16
14
|
|
|
15
|
+
const {isJsModule, wrapModule} = require('./js');
|
|
16
|
+
|
|
17
17
|
function processModules(
|
|
18
18
|
modules: $ReadOnlyArray<Module<>>,
|
|
19
19
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -9,21 +9,21 @@
|
|
|
9
9
|
*/
|
|
10
10
|
"use strict";
|
|
11
11
|
|
|
12
|
-
const path = require("path");
|
|
13
|
-
|
|
14
|
-
const url = require("url");
|
|
15
|
-
|
|
16
12
|
const { isJsModule, wrapModule } = require("./helpers/js");
|
|
17
13
|
|
|
18
14
|
const { addParamsToDefineCall } = require("metro-transform-plugins");
|
|
19
15
|
|
|
16
|
+
const path = require("path");
|
|
17
|
+
|
|
18
|
+
const url = require("url");
|
|
19
|
+
|
|
20
20
|
function generateModules(sourceModules, graph, options) {
|
|
21
21
|
const modules = [];
|
|
22
22
|
|
|
23
23
|
for (const module of sourceModules) {
|
|
24
24
|
if (isJsModule(module)) {
|
|
25
25
|
// Construct a bundle URL for this specific module only
|
|
26
|
-
const getURL = extension => {
|
|
26
|
+
const getURL = (extension) => {
|
|
27
27
|
options.clientUrl.pathname = path.relative(
|
|
28
28
|
options.projectRoot,
|
|
29
29
|
path.join(
|
|
@@ -45,7 +45,7 @@ function generateModules(sourceModules, graph, options) {
|
|
|
45
45
|
modules.push({
|
|
46
46
|
module: [options.createModuleId(module.path), code],
|
|
47
47
|
sourceMappingURL,
|
|
48
|
-
sourceURL
|
|
48
|
+
sourceURL,
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -58,7 +58,7 @@ function prepareModule(module, graph, options) {
|
|
|
58
58
|
const inverseDependencies = getInverseDependencies(module.path, graph); // Transform the inverse dependency paths to ids.
|
|
59
59
|
|
|
60
60
|
const inverseDependenciesById = Object.create(null);
|
|
61
|
-
Object.keys(inverseDependencies).forEach(path => {
|
|
61
|
+
Object.keys(inverseDependencies).forEach((path) => {
|
|
62
62
|
inverseDependenciesById[options.createModuleId(path)] = inverseDependencies[
|
|
63
63
|
path
|
|
64
64
|
].map(options.createModuleId);
|
|
@@ -98,7 +98,7 @@ function hmrJSBundle(delta, graph, options) {
|
|
|
98
98
|
return {
|
|
99
99
|
added: generateModules(delta.added.values(), graph, options),
|
|
100
100
|
modified: generateModules(delta.modified.values(), graph, options),
|
|
101
|
-
deleted: [...delta.deleted].map(path => options.createModuleId(path))
|
|
101
|
+
deleted: [...delta.deleted].map((path) => options.createModuleId(path)),
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
104
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -10,16 +10,15 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
const path = require('path');
|
|
14
|
-
const url = require('url');
|
|
15
|
-
|
|
16
|
-
const {isJsModule, wrapModule} = require('./helpers/js');
|
|
17
|
-
const {addParamsToDefineCall} = require('metro-transform-plugins');
|
|
18
|
-
|
|
19
13
|
import type {EntryPointURL} from '../../HmrServer';
|
|
20
14
|
import type {DeltaResult, Graph, Module} from '../types.flow';
|
|
21
15
|
import type {HmrModule} from 'metro-runtime/src/modules/types.flow';
|
|
22
16
|
|
|
17
|
+
const {isJsModule, wrapModule} = require('./helpers/js');
|
|
18
|
+
const {addParamsToDefineCall} = require('metro-transform-plugins');
|
|
19
|
+
const path = require('path');
|
|
20
|
+
const url = require('url');
|
|
21
|
+
|
|
23
22
|
type Options = {
|
|
24
23
|
+clientUrl: EntryPointURL,
|
|
25
24
|
+createModuleId: string => number,
|
|
@@ -37,7 +36,9 @@ function generateModules(
|
|
|
37
36
|
for (const module of sourceModules) {
|
|
38
37
|
if (isJsModule(module)) {
|
|
39
38
|
// Construct a bundle URL for this specific module only
|
|
40
|
-
const getURL =
|
|
39
|
+
const getURL = (
|
|
40
|
+
extension: $TEMPORARY$string<'bundle'> | $TEMPORARY$string<'map'>,
|
|
41
|
+
) => {
|
|
41
42
|
options.clientUrl.pathname = path.relative(
|
|
42
43
|
options.projectRoot,
|
|
43
44
|
path.join(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -15,7 +15,7 @@ const { isJsModule } = require("./helpers/js");
|
|
|
15
15
|
|
|
16
16
|
const {
|
|
17
17
|
fromRawMappings,
|
|
18
|
-
fromRawMappingsNonBlocking
|
|
18
|
+
fromRawMappingsNonBlocking,
|
|
19
19
|
} = require("metro-source-map");
|
|
20
20
|
|
|
21
21
|
function getSourceMapInfosImpl(isBlocking, onDone, modules, options) {
|
|
@@ -31,7 +31,7 @@ function getSourceMapInfosImpl(isBlocking, onDone, modules, options) {
|
|
|
31
31
|
|
|
32
32
|
const mod = modulesToProcess.shift();
|
|
33
33
|
const info = getSourceMapInfo(mod, {
|
|
34
|
-
excludeSource: options.excludeSource
|
|
34
|
+
excludeSource: options.excludeSource,
|
|
35
35
|
});
|
|
36
36
|
sourceMapInfos.push(info);
|
|
37
37
|
return false;
|
|
@@ -72,7 +72,7 @@ function sourceMapGenerator(modules, options) {
|
|
|
72
72
|
let sourceMapInfos;
|
|
73
73
|
getSourceMapInfosImpl(
|
|
74
74
|
true,
|
|
75
|
-
infos => {
|
|
75
|
+
(infos) => {
|
|
76
76
|
sourceMapInfos = infos;
|
|
77
77
|
},
|
|
78
78
|
modules,
|
|
@@ -89,7 +89,7 @@ function sourceMapGenerator(modules, options) {
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
async function sourceMapGeneratorNonBlocking(modules, options) {
|
|
92
|
-
const sourceMapInfos = await new Promise(resolve => {
|
|
92
|
+
const sourceMapInfos = await new Promise((resolve) => {
|
|
93
93
|
getSourceMapInfosImpl(false, resolve, modules, options);
|
|
94
94
|
});
|
|
95
95
|
return fromRawMappingsNonBlocking(sourceMapInfos);
|
|
@@ -97,5 +97,5 @@ async function sourceMapGeneratorNonBlocking(modules, options) {
|
|
|
97
97
|
|
|
98
98
|
module.exports = {
|
|
99
99
|
sourceMapGenerator,
|
|
100
|
-
sourceMapGeneratorNonBlocking
|
|
100
|
+
sourceMapGeneratorNonBlocking,
|
|
101
101
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -10,16 +10,15 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
import type {Module} from '../types.flow';
|
|
14
14
|
|
|
15
|
+
const getSourceMapInfo = require('./helpers/getSourceMapInfo');
|
|
15
16
|
const {isJsModule} = require('./helpers/js');
|
|
16
17
|
const {
|
|
17
18
|
fromRawMappings,
|
|
18
19
|
fromRawMappingsNonBlocking,
|
|
19
20
|
} = require('metro-source-map');
|
|
20
21
|
|
|
21
|
-
import type {Module} from '../types.flow';
|
|
22
|
-
|
|
23
22
|
type ReturnType<F> = $Call<<A, R>((...A) => R) => R, F>;
|
|
24
23
|
|
|
25
24
|
function getSourceMapInfosImpl(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -11,24 +11,24 @@
|
|
|
11
11
|
|
|
12
12
|
const {
|
|
13
13
|
sourceMapGenerator,
|
|
14
|
-
sourceMapGeneratorNonBlocking
|
|
14
|
+
sourceMapGeneratorNonBlocking,
|
|
15
15
|
} = require("./sourceMapGenerator");
|
|
16
16
|
|
|
17
17
|
function sourceMapObject(modules, options) {
|
|
18
18
|
const generator = sourceMapGenerator(modules, options);
|
|
19
19
|
return generator.toMap(undefined, {
|
|
20
|
-
excludeSource: options.excludeSource
|
|
20
|
+
excludeSource: options.excludeSource,
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
async function sourceMapObjectNonBlocking(modules, options) {
|
|
25
25
|
const generator = await sourceMapGeneratorNonBlocking(modules, options);
|
|
26
26
|
return generator.toMap(undefined, {
|
|
27
|
-
excludeSource: options.excludeSource
|
|
27
|
+
excludeSource: options.excludeSource,
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
module.exports = {
|
|
32
32
|
sourceMapObject,
|
|
33
|
-
sourceMapObjectNonBlocking
|
|
33
|
+
sourceMapObjectNonBlocking,
|
|
34
34
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
+
import type {Module} from '../types.flow';
|
|
14
|
+
import type {MixedSourceMap} from 'metro-source-map';
|
|
15
|
+
|
|
13
16
|
const {
|
|
14
17
|
sourceMapGenerator,
|
|
15
18
|
sourceMapGeneratorNonBlocking,
|
|
16
19
|
} = require('./sourceMapGenerator');
|
|
17
20
|
|
|
18
|
-
import type {Module} from '../types.flow';
|
|
19
|
-
import type {MixedSourceMap} from 'metro-source-map';
|
|
20
|
-
|
|
21
21
|
function sourceMapObject(
|
|
22
22
|
modules: $ReadOnlyArray<Module<>>,
|
|
23
23
|
options: {|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -13,7 +13,7 @@ const { sourceMapGenerator } = require("./sourceMapGenerator");
|
|
|
13
13
|
|
|
14
14
|
function sourceMapString(modules, options) {
|
|
15
15
|
return sourceMapGenerator(modules, options).toString(undefined, {
|
|
16
|
-
excludeSource: options.excludeSource
|
|
16
|
+
excludeSource: options.excludeSource,
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
const {sourceMapGenerator} = require('./sourceMapGenerator');
|
|
14
|
-
|
|
15
13
|
import type {Module} from '../types.flow';
|
|
16
14
|
|
|
15
|
+
const {sourceMapGenerator} = require('./sourceMapGenerator');
|
|
16
|
+
|
|
17
17
|
function sourceMapString(
|
|
18
18
|
modules: $ReadOnlyArray<Module<>>,
|
|
19
19
|
options: {|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -9,18 +9,18 @@
|
|
|
9
9
|
*/
|
|
10
10
|
"use strict";
|
|
11
11
|
|
|
12
|
+
const getTransformCacheKey = require("./getTransformCacheKey");
|
|
13
|
+
|
|
12
14
|
const WorkerFarm = require("./WorkerFarm");
|
|
13
15
|
|
|
14
16
|
const assert = require("assert");
|
|
15
17
|
|
|
16
18
|
const fs = require("fs");
|
|
17
19
|
|
|
18
|
-
const
|
|
20
|
+
const { Cache, stableHash } = require("metro-cache");
|
|
19
21
|
|
|
20
22
|
const path = require("path");
|
|
21
23
|
|
|
22
|
-
const { Cache, stableHash } = require("metro-cache");
|
|
23
|
-
|
|
24
24
|
class Transformer {
|
|
25
25
|
constructor(config, getSha1Fn) {
|
|
26
26
|
this._config = config;
|
|
@@ -40,7 +40,7 @@ class Transformer {
|
|
|
40
40
|
} = this._config.transformer;
|
|
41
41
|
const transformerOptions = {
|
|
42
42
|
transformerPath: this._config.transformerPath,
|
|
43
|
-
transformerConfig
|
|
43
|
+
transformerConfig,
|
|
44
44
|
};
|
|
45
45
|
this._workerFarm = new WorkerFarm(config, transformerOptions);
|
|
46
46
|
const globalCacheKey = this._cache.isDisabled
|
|
@@ -48,7 +48,7 @@ class Transformer {
|
|
|
48
48
|
: getTransformCacheKey({
|
|
49
49
|
cacheVersion: this._config.cacheVersion,
|
|
50
50
|
projectRoot: this._config.projectRoot,
|
|
51
|
-
transformerConfig: transformerOptions
|
|
51
|
+
transformerConfig: transformerOptions,
|
|
52
52
|
});
|
|
53
53
|
this._baseHash = stableHash([globalCacheKey]).toString("binary");
|
|
54
54
|
}
|
|
@@ -98,7 +98,7 @@ class Transformer {
|
|
|
98
98
|
runtimeBytecodeVersion,
|
|
99
99
|
type,
|
|
100
100
|
unstable_disableES6Transforms,
|
|
101
|
-
unstable_transformProfile
|
|
101
|
+
unstable_transformProfile,
|
|
102
102
|
]);
|
|
103
103
|
|
|
104
104
|
const sha1 = this._getSha1(filePath);
|
|
@@ -110,7 +110,7 @@ class Transformer {
|
|
|
110
110
|
const data = result
|
|
111
111
|
? {
|
|
112
112
|
result,
|
|
113
|
-
sha1
|
|
113
|
+
sha1,
|
|
114
114
|
}
|
|
115
115
|
: await this._workerFarm.transform(localPath, transformerOptions); // Only re-compute the full key if the SHA-1 changed. This is because
|
|
116
116
|
// references are used by the cache implementation in a weak map to keep
|
|
@@ -126,7 +126,7 @@ class Transformer {
|
|
|
126
126
|
|
|
127
127
|
getSource() {
|
|
128
128
|
return fs.readFileSync(filePath);
|
|
129
|
-
}
|
|
129
|
+
},
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
132
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -10,18 +10,16 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
import type {TransformResult, TransformResultWithSource} from '../DeltaBundler';
|
|
14
|
+
import type {TransformerConfig, TransformOptions} from './Worker';
|
|
15
|
+
import type {ConfigT} from 'metro-config/src/configTypes.flow';
|
|
14
16
|
|
|
17
|
+
const getTransformCacheKey = require('./getTransformCacheKey');
|
|
18
|
+
const WorkerFarm = require('./WorkerFarm');
|
|
15
19
|
const assert = require('assert');
|
|
16
20
|
const fs = require('fs');
|
|
17
|
-
const getTransformCacheKey = require('./getTransformCacheKey');
|
|
18
|
-
const path = require('path');
|
|
19
|
-
|
|
20
21
|
const {Cache, stableHash} = require('metro-cache');
|
|
21
|
-
|
|
22
|
-
import type {TransformResult, TransformResultWithSource} from '../DeltaBundler';
|
|
23
|
-
import type {TransformOptions, TransformerConfig} from './Worker';
|
|
24
|
-
import type {ConfigT} from 'metro-config/src/configTypes.flow';
|
|
22
|
+
const path = require('path');
|
|
25
23
|
|
|
26
24
|
class Transformer {
|
|
27
25
|
_config: ConfigT;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
*/
|
|
10
10
|
"use strict";
|
|
11
11
|
|
|
12
|
+
const traverse = require("@babel/traverse").default;
|
|
13
|
+
|
|
12
14
|
const crypto = require("crypto");
|
|
13
15
|
|
|
14
16
|
const fs = require("fs");
|
|
15
17
|
|
|
16
18
|
const path = require("path");
|
|
17
19
|
|
|
18
|
-
const traverse = require("@babel/traverse").default;
|
|
19
|
-
|
|
20
20
|
async function transform(
|
|
21
21
|
filename,
|
|
22
22
|
transformOptions,
|
|
@@ -31,13 +31,10 @@ async function transform(
|
|
|
31
31
|
action_phase: "start",
|
|
32
32
|
file_name: filename,
|
|
33
33
|
log_entry_label: "Transforming file",
|
|
34
|
-
start_timestamp: process.hrtime()
|
|
34
|
+
start_timestamp: process.hrtime(),
|
|
35
35
|
};
|
|
36
36
|
const data = fs.readFileSync(path.resolve(projectRoot, filename));
|
|
37
|
-
const sha1 = crypto
|
|
38
|
-
.createHash("sha1")
|
|
39
|
-
.update(data)
|
|
40
|
-
.digest("hex");
|
|
37
|
+
const sha1 = crypto.createHash("sha1").update(data).digest("hex");
|
|
41
38
|
const result = await Transformer.transform(
|
|
42
39
|
transformerConfig.transformerConfig,
|
|
43
40
|
projectRoot,
|
|
@@ -60,7 +57,7 @@ async function transform(
|
|
|
60
57
|
result,
|
|
61
58
|
sha1,
|
|
62
59
|
transformFileStartLogEntry,
|
|
63
|
-
transformFileEndLogEntry
|
|
60
|
+
transformFileEndLogEntry,
|
|
64
61
|
};
|
|
65
62
|
}
|
|
66
63
|
|
|
@@ -72,10 +69,10 @@ function getEndLogEntry(startLogEntry, filename) {
|
|
|
72
69
|
action_phase: "end",
|
|
73
70
|
file_name: filename,
|
|
74
71
|
duration_ms,
|
|
75
|
-
log_entry_label: "Transforming file"
|
|
72
|
+
log_entry_label: "Transforming file",
|
|
76
73
|
};
|
|
77
74
|
}
|
|
78
75
|
|
|
79
76
|
module.exports = {
|
|
80
|
-
transform
|
|
77
|
+
transform,
|
|
81
78
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -10,18 +10,18 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
const crypto = require('crypto');
|
|
14
|
-
const fs = require('fs');
|
|
15
|
-
const path = require('path');
|
|
16
|
-
const traverse = require('@babel/traverse').default;
|
|
17
|
-
|
|
18
13
|
import type {TransformResult} from './types.flow';
|
|
19
14
|
import type {LogEntry} from 'metro-core/src/Logger';
|
|
20
15
|
import type {
|
|
21
|
-
JsTransformOptions,
|
|
22
16
|
JsTransformerConfig,
|
|
17
|
+
JsTransformOptions,
|
|
23
18
|
} from 'metro-transform-worker';
|
|
24
19
|
|
|
20
|
+
const traverse = require('@babel/traverse').default;
|
|
21
|
+
const crypto = require('crypto');
|
|
22
|
+
const fs = require('fs');
|
|
23
|
+
const path = require('path');
|
|
24
|
+
|
|
25
25
|
export type {JsTransformOptions as TransformOptions} from 'metro-transform-worker';
|
|
26
26
|
|
|
27
27
|
export type Worker = {|
|
|
@@ -72,10 +72,7 @@ async function transform(
|
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
const data = fs.readFileSync(path.resolve(projectRoot, filename));
|
|
75
|
-
const sha1 = crypto
|
|
76
|
-
.createHash('sha1')
|
|
77
|
-
.update(data)
|
|
78
|
-
.digest('hex');
|
|
75
|
+
const sha1 = crypto.createHash('sha1').update(data).digest('hex');
|
|
79
76
|
|
|
80
77
|
const result = await Transformer.transform(
|
|
81
78
|
transformerConfig.transformerConfig,
|