@expo/metro-config 0.17.2 → 0.17.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ExpoMetroConfig.js +239 -366
- package/build/ExpoMetroConfig.js.map +1 -1
- package/build/babel-core.js +6 -23
- package/build/babel-core.js.map +1 -1
- package/build/babel-transformer.js +117 -162
- package/build/babel-transformer.js.map +1 -1
- package/build/customizeFrame.js +84 -78
- package/build/customizeFrame.js.map +1 -1
- package/build/env.js +23 -37
- package/build/env.js.map +1 -1
- package/build/file-store.js +13 -21
- package/build/file-store.js.map +1 -1
- package/build/getModulesPaths.js +31 -48
- package/build/getModulesPaths.js.map +1 -1
- package/build/getWatchFolders.js +70 -98
- package/build/getWatchFolders.js.map +1 -1
- package/build/loadBabelConfig.js +30 -49
- package/build/loadBabelConfig.js.map +1 -1
- package/build/rewriteRequestUrl.js +82 -142
- package/build/rewriteRequestUrl.js.map +1 -1
- package/build/serializer/debugId.js +23 -22
- package/build/serializer/debugId.js.map +1 -1
- package/build/serializer/environmentVariableSerializerPlugin.js +90 -101
- package/build/serializer/environmentVariableSerializerPlugin.js.map +1 -1
- package/build/serializer/exportHermes.js +96 -133
- package/build/serializer/exportHermes.js.map +1 -1
- package/build/serializer/exportPath.js +18 -35
- package/build/serializer/exportPath.js.map +1 -1
- package/build/serializer/fork/baseJSBundle.js +124 -147
- package/build/serializer/fork/baseJSBundle.js.map +1 -1
- package/build/serializer/fork/js.js +81 -116
- package/build/serializer/fork/js.js.map +1 -1
- package/build/serializer/fork/processModules.js +22 -36
- package/build/serializer/fork/processModules.js.map +1 -1
- package/build/serializer/getCssDeps.js +64 -95
- package/build/serializer/getCssDeps.js.map +1 -1
- package/build/serializer/jsOutput.js +6 -16
- package/build/serializer/jsOutput.js.map +1 -1
- package/build/serializer/serializeChunks.js +406 -483
- package/build/serializer/serializeChunks.js.map +1 -1
- package/build/serializer/serializerAssets.js +1 -0
- package/build/serializer/serializerAssets.js.map +1 -1
- package/build/serializer/withExpoSerializers.js +165 -236
- package/build/serializer/withExpoSerializers.js.map +1 -1
- package/build/transform-worker/asset-transformer.js +21 -44
- package/build/transform-worker/asset-transformer.js.map +1 -1
- package/build/transform-worker/css-modules.js +57 -84
- package/build/transform-worker/css-modules.js.map +1 -1
- package/build/transform-worker/css.js +21 -20
- package/build/transform-worker/css.js.map +1 -1
- package/build/transform-worker/getAssets.js +38 -75
- package/build/transform-worker/getAssets.js.map +1 -1
- package/build/transform-worker/metro-transform-worker.js +384 -489
- package/build/transform-worker/metro-transform-worker.js.map +1 -1
- package/build/transform-worker/postcss.js +176 -233
- package/build/transform-worker/postcss.js.map +1 -1
- package/build/transform-worker/sass.js +30 -38
- package/build/transform-worker/sass.js.map +1 -1
- package/build/transform-worker/transform-worker.js +156 -188
- package/build/transform-worker/transform-worker.js.map +1 -1
- package/build/transform-worker/utils/require.js +30 -28
- package/build/transform-worker/utils/require.js.map +1 -1
- package/build/transformSync.js +40 -28
- package/build/transformSync.js.map +1 -1
- package/build/transformer/createExoticTransformer.js +96 -129
- package/build/transformer/createExoticTransformer.js.map +1 -1
- package/build/transformer/createMatcher.js +37 -46
- package/build/transformer/createMatcher.js.map +1 -1
- package/build/transformer/createMultiRuleTransformer.js +170 -240
- package/build/transformer/createMultiRuleTransformer.js.map +1 -1
- package/build/transformer/generateFunctionMap.js +20 -23
- package/build/transformer/generateFunctionMap.js.map +1 -1
- package/build/transformer/getBabelConfig.js +94 -127
- package/build/transformer/getBabelConfig.js.map +1 -1
- package/build/transformer/getCacheKey.js +17 -31
- package/build/transformer/getCacheKey.js.map +1 -1
- package/build/transformer/index.js +11 -62
- package/build/transformer/index.js.map +1 -1
- package/build/transformer/metro-expo-exotic-babel-transformer.js +3 -12
- package/build/transformer/metro-expo-exotic-babel-transformer.js.map +1 -1
- package/build/traveling/metro-config.js +12 -19
- package/build/traveling/metro-config.js.map +1 -1
- package/build/utils/hash.js +8 -14
- package/build/utils/hash.js.map +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withExpoSerializers.js","names":["_jscSafeUrl","data","require","_sourceMapString","_interopRequireDefault","_bundleToString","_debugId","_environmentVariableSerializerPlugin","_baseJSBundle","_serializeChunks","_serializerAssets","_env","obj","__esModule","default","withExpoSerializers","config","options","processors","push","serverPreludeSerializerPlugin","env","EXPO_NO_CLIENT_ENV_VARS","environmentVariableSerializerPlugin","withSerializerPlugins","_config$serializer","originalSerializer","serializer","customSerializer","createSerializerFromSerialProcessors","createDefaultExportCustomSerializer","configOptions","entryPoint","preModules","graph","_config$serializer2","isPossiblyDev","transformOptions","hot","enableDebugId","inlineSourceMap","debugId","loadDebugId","bundle","baseJSBundle","undefined","outputCode","bundleToString","code","stringToUUID","premodulesToBundle","bundleCode","bundleMap","_config$serializer3","map","unstable_beforeAssetSerializationPlugins","plugin","premodules","sourceMapString","getSortedModules","dependencies","values","excludeSource","processModuleFilter","shouldAddToIgnoreList","mutateSourceMapWithDebugId","sourceMap","sourceMapObject","JSON","parse","stringify","getDefaultSerializer","fallbackSerializer","defaultSerializer","props","customSerializerOptions","serializerOptions","supportsNonSerialReturn","output","includeBytecode","outputMode","includeSourceMaps","sourceUrl","isJscSafeUrl","toNormalUrl","url","URL","searchParams","get","assets","graphToSerialAssetsAsync","finalSerializer","processor"],"sources":["../../src/serializer/withExpoSerializers.ts"],"sourcesContent":["/**\n * Copyright © 2022 650 Industries.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { isJscSafeUrl, toNormalUrl } from 'jsc-safe-url';\nimport { MetroConfig, MixedOutput, Module, ReadOnlyGraph, SerializerOptions } from 'metro';\nimport sourceMapString from 'metro/src/DeltaBundler/Serializers/sourceMapString';\nimport bundleToString from 'metro/src/lib/bundleToString';\nimport { ConfigT, InputConfigT } from 'metro-config';\n\nimport { stringToUUID } from './debugId';\nimport {\n environmentVariableSerializerPlugin,\n serverPreludeSerializerPlugin,\n} from './environmentVariableSerializerPlugin';\nimport { ExpoSerializerOptions, baseJSBundle } from './fork/baseJSBundle';\nimport { getSortedModules, graphToSerialAssetsAsync } from './serializeChunks';\nimport { SerialAsset } from './serializerAssets';\nimport { env } from '../env';\n\nexport type Serializer = NonNullable<ConfigT['serializer']['customSerializer']>;\n\nexport type SerializerParameters = [\n string,\n readonly Module[],\n ReadOnlyGraph,\n ExpoSerializerOptions,\n];\n\nexport type SerializerConfigOptions = {\n unstable_beforeAssetSerializationPlugins?: ((serializationInput: {\n graph: ReadOnlyGraph<MixedOutput>;\n premodules: Module[];\n debugId?: string;\n }) => Module[])[];\n};\n\n// A serializer that processes the input and returns a modified version.\n// Unlike a serializer, these can be chained together.\nexport type SerializerPlugin = (...props: SerializerParameters) => SerializerParameters;\n\nexport function withExpoSerializers(\n config: InputConfigT,\n options: SerializerConfigOptions = {}\n): InputConfigT {\n const processors: SerializerPlugin[] = [];\n processors.push(serverPreludeSerializerPlugin);\n if (!env.EXPO_NO_CLIENT_ENV_VARS) {\n processors.push(environmentVariableSerializerPlugin);\n }\n\n return withSerializerPlugins(config, processors, options);\n}\n\n// There can only be one custom serializer as the input doesn't match the output.\n// Here we simply run\nexport function withSerializerPlugins(\n config: InputConfigT,\n processors: SerializerPlugin[],\n options: SerializerConfigOptions = {}\n): InputConfigT {\n const originalSerializer = config.serializer?.customSerializer;\n\n return {\n ...config,\n serializer: {\n ...config.serializer,\n customSerializer: createSerializerFromSerialProcessors(\n config,\n processors,\n originalSerializer ?? null,\n options\n ),\n },\n };\n}\n\nexport function createDefaultExportCustomSerializer(\n config: Partial<MetroConfig>,\n configOptions: SerializerConfigOptions = {}\n): Serializer {\n return async (\n entryPoint: string,\n preModules: readonly Module<MixedOutput>[],\n graph: ReadOnlyGraph<MixedOutput>,\n options: SerializerOptions<MixedOutput>\n ): Promise<string | { code: string; map: string }> => {\n const isPossiblyDev = graph.transformOptions.hot;\n // TODO: This is a temporary solution until we've converged on using the new serializer everywhere.\n const enableDebugId = options.inlineSourceMap !== true && !isPossiblyDev;\n\n let debugId: string | undefined;\n const loadDebugId = () => {\n if (!enableDebugId || debugId) {\n return debugId;\n }\n\n // TODO: Perform this cheaper.\n const bundle = baseJSBundle(entryPoint, preModules, graph, {\n ...options,\n debugId: undefined,\n });\n const outputCode = bundleToString(bundle).code;\n debugId = stringToUUID(outputCode);\n return debugId;\n };\n\n let premodulesToBundle = [...preModules];\n\n let bundleCode: string | null = null;\n let bundleMap: string | null = null;\n\n if (config.serializer?.customSerializer) {\n const bundle = await config.serializer?.customSerializer(\n entryPoint,\n premodulesToBundle,\n graph,\n options\n );\n if (typeof bundle === 'string') {\n bundleCode = bundle;\n } else {\n bundleCode = bundle.code;\n bundleMap = bundle.map;\n }\n } else {\n const debugId = loadDebugId();\n if (configOptions.unstable_beforeAssetSerializationPlugins) {\n for (const plugin of configOptions.unstable_beforeAssetSerializationPlugins) {\n premodulesToBundle = plugin({ graph, premodules: [...premodulesToBundle], debugId });\n }\n }\n bundleCode = bundleToString(\n baseJSBundle(entryPoint, premodulesToBundle, graph, {\n ...options,\n debugId,\n })\n ).code;\n }\n\n if (isPossiblyDev) {\n if (bundleMap == null) {\n return bundleCode;\n }\n return {\n code: bundleCode,\n map: bundleMap,\n };\n }\n\n // Exports....\n\n if (!bundleMap) {\n bundleMap = sourceMapString(\n [...premodulesToBundle, ...getSortedModules([...graph.dependencies.values()], options)],\n {\n // TODO: Surface this somehow.\n excludeSource: false,\n // excludeSource: options.serializerOptions?.excludeSource,\n processModuleFilter: options.processModuleFilter,\n shouldAddToIgnoreList: options.shouldAddToIgnoreList,\n }\n );\n }\n\n if (enableDebugId) {\n const mutateSourceMapWithDebugId = (sourceMap: string) => {\n // NOTE: debugId isn't required for inline source maps because the source map is included in the same file, therefore\n // we don't need to disambiguate between multiple source maps.\n const sourceMapObject = JSON.parse(sourceMap);\n sourceMapObject.debugId = loadDebugId();\n // NOTE: Sentry does this, but bun does not.\n // sourceMapObject.debug_id = debugId;\n return JSON.stringify(sourceMapObject);\n };\n\n return {\n code: bundleCode,\n map: mutateSourceMapWithDebugId(bundleMap),\n };\n }\n\n return {\n code: bundleCode,\n map: bundleMap,\n };\n };\n}\n\nfunction getDefaultSerializer(\n config: MetroConfig,\n fallbackSerializer?: Serializer | null,\n configOptions: SerializerConfigOptions = {}\n): Serializer {\n const defaultSerializer =\n fallbackSerializer ?? createDefaultExportCustomSerializer(config, configOptions);\n\n return async (\n ...props: SerializerParameters\n ): Promise<string | { code: string; map: string }> => {\n const [, , , options] = props;\n\n const customSerializerOptions = options.serializerOptions;\n\n // Custom options can only be passed outside of the dev server, meaning\n // we don't need to stringify the results at the end, i.e. this is `npx expo export` or `npx expo export:embed`.\n const supportsNonSerialReturn = !!customSerializerOptions?.output;\n\n const serializerOptions = (() => {\n if (customSerializerOptions) {\n return {\n includeBytecode: customSerializerOptions.includeBytecode,\n outputMode: customSerializerOptions.output,\n includeSourceMaps: customSerializerOptions.includeSourceMaps,\n };\n }\n if (options.sourceUrl) {\n const sourceUrl = isJscSafeUrl(options.sourceUrl)\n ? toNormalUrl(options.sourceUrl)\n : options.sourceUrl;\n\n const url = new URL(sourceUrl, 'https://expo.dev');\n\n return {\n outputMode: url.searchParams.get('serializer.output'),\n includeSourceMaps: url.searchParams.get('serializer.map') === 'true',\n includeBytecode: url.searchParams.get('serializer.bytecode') === 'true',\n };\n }\n return null;\n })();\n\n if (serializerOptions?.outputMode !== 'static') {\n return defaultSerializer(...props);\n }\n\n // Mutate the serializer options with the parsed options.\n options.serializerOptions = {\n ...options.serializerOptions,\n ...serializerOptions,\n };\n\n const assets = await graphToSerialAssetsAsync(\n config,\n {\n includeSourceMaps: !!serializerOptions.includeSourceMaps,\n includeBytecode: !!serializerOptions.includeBytecode,\n ...configOptions,\n },\n ...props\n );\n\n if (supportsNonSerialReturn) {\n // @ts-expect-error: this is future proofing for adding assets to the output as well.\n return assets;\n }\n\n return JSON.stringify(assets);\n };\n}\n\nexport function createSerializerFromSerialProcessors(\n config: MetroConfig,\n processors: (SerializerPlugin | undefined)[],\n originalSerializer: Serializer | null,\n options: SerializerConfigOptions = {}\n): Serializer {\n const finalSerializer = getDefaultSerializer(config, originalSerializer, options);\n return (...props: SerializerParameters): ReturnType<Serializer> => {\n for (const processor of processors) {\n if (processor) {\n props = processor(...props);\n }\n }\n\n return finalSerializer(...props);\n };\n}\n\nexport { SerialAsset };\n"],"mappings":";;;;;;;;;;;;;;;AAMA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,iBAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,gBAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,gBAAA;EAAA,MAAAJ,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAG,eAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAK,SAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,QAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,qCAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,oCAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,SAAAO,cAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,aAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,iBAAA;EAAA,MAAAR,IAAA,GAAAC,OAAA;EAAAO,gBAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAS,kBAAA;E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CAAC,GAAGlB,KAAK,CAAC;MAC7B;IACF;IAEA,OAAOiB,eAAe,CAAC,GAAGjB,KAAK,CAAC;EAClC,CAAC;AACH"}
|
|
1
|
+
{"version":3,"file":"withExpoSerializers.js","sourceRoot":"","sources":["../../src/serializer/withExpoSerializers.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;GAKG;AACH,+CAAyD;AAEzD,yGAAiF;AACjF,kFAA0D;AAG1D,uCAAyC;AACzC,+FAG+C;AAC/C,sDAA0E;AAC1E,uDAA+E;AAE/E,gCAA6B;AAuB7B,SAAgB,mBAAmB,CACjC,MAAoB,EACpB,UAAmC,EAAE;IAErC,MAAM,UAAU,GAAuB,EAAE,CAAC;IAC1C,UAAU,CAAC,IAAI,CAAC,mEAA6B,CAAC,CAAC;IAC/C,IAAI,CAAC,SAAG,CAAC,uBAAuB,EAAE;QAChC,UAAU,CAAC,IAAI,CAAC,yEAAmC,CAAC,CAAC;KACtD;IAED,OAAO,qBAAqB,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;AAC5D,CAAC;AAXD,kDAWC;AAED,iFAAiF;AACjF,qBAAqB;AACrB,SAAgB,qBAAqB,CACnC,MAAoB,EACpB,UAA8B,EAC9B,UAAmC,EAAE;IAErC,MAAM,kBAAkB,GAAG,MAAM,CAAC,UAAU,EAAE,gBAAgB,CAAC;IAE/D,OAAO;QACL,GAAG,MAAM;QACT,UAAU,EAAE;YACV,GAAG,MAAM,CAAC,UAAU;YACpB,gBAAgB,EAAE,oCAAoC,CACpD,MAAM,EACN,UAAU,EACV,kBAAkB,IAAI,IAAI,EAC1B,OAAO,CACR;SACF;KACF,CAAC;AACJ,CAAC;AAnBD,sDAmBC;AAED,SAAgB,mCAAmC,CACjD,MAA4B,EAC5B,gBAAyC,EAAE;IAE3C,OAAO,KAAK,EACV,UAAkB,EAClB,UAA0C,EAC1C,KAAiC,EACjC,OAAuC,EACU,EAAE;QACnD,MAAM,aAAa,GAAG,KAAK,CAAC,g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
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.transform =
|
|
7
|
-
function _util() {
|
|
8
|
-
const data = require("metro/src/Bundler/util");
|
|
9
|
-
_util = function () {
|
|
10
|
-
return data;
|
|
11
|
-
};
|
|
12
|
-
return data;
|
|
13
|
-
}
|
|
14
|
-
function _nodePath() {
|
|
15
|
-
const data = _interopRequireDefault(require("node:path"));
|
|
16
|
-
_nodePath = function () {
|
|
17
|
-
return data;
|
|
18
|
-
};
|
|
19
|
-
return data;
|
|
20
|
-
}
|
|
21
|
-
function _getAssets() {
|
|
22
|
-
const data = require("./getAssets");
|
|
23
|
-
_getAssets = function () {
|
|
24
|
-
return data;
|
|
25
|
-
};
|
|
26
|
-
return data;
|
|
27
|
-
}
|
|
28
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.transform = void 0;
|
|
29
7
|
/**
|
|
30
8
|
* Copyright 2023-present 650 Industries (Expo). All rights reserved.
|
|
31
9
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
@@ -36,22 +14,21 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
36
14
|
* Fork of the upstream transformer, but with modifications made for web production hashing.
|
|
37
15
|
* https://github.com/facebook/metro/blob/412771475c540b6f85d75d9dcd5a39a6e0753582/packages/metro-transform-worker/src/utils/assetTransformer.js#L1
|
|
38
16
|
*/
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
ast: (0, _util().generateAssetCodeFileAst)(assetRegistryPath, data)
|
|
55
|
-
};
|
|
17
|
+
const util_1 = require("metro/src/Bundler/util");
|
|
18
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
19
|
+
const getAssets_1 = require("./getAssets");
|
|
20
|
+
async function transform({ filename, options }, assetRegistryPath, assetDataPlugins) {
|
|
21
|
+
options ??= options || {
|
|
22
|
+
platform: '',
|
|
23
|
+
projectRoot: '',
|
|
24
|
+
inlineRequires: false,
|
|
25
|
+
minify: false,
|
|
26
|
+
};
|
|
27
|
+
const absolutePath = node_path_1.default.resolve(options.projectRoot, filename);
|
|
28
|
+
const data = await (0, getAssets_1.getUniversalAssetData)(absolutePath, filename, assetDataPlugins, options.platform, options.publicPath);
|
|
29
|
+
return {
|
|
30
|
+
ast: (0, util_1.generateAssetCodeFileAst)(assetRegistryPath, data),
|
|
31
|
+
};
|
|
56
32
|
}
|
|
33
|
+
exports.transform = transform;
|
|
57
34
|
//# sourceMappingURL=asset-transformer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset-transformer.js","
|
|
1
|
+
{"version":3,"file":"asset-transformer.js","sourceRoot":"","sources":["../../src/transform-worker/asset-transformer.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;GASG;AACH,iDAAkE;AAElE,0DAA6B;AAE7B,2CAAoD;AAE7C,KAAK,UAAU,SAAS,CAC7B,EAAE,QAAQ,EAAE,OAAO,EAAwB,EAC3C,iBAAyB,EACzB,gBAAmC;IAEnC,OAAO,KAAK,OAAO,IAAI;QACrB,QAAQ,EAAE,EAAE;QACZ,WAAW,EAAE,EAAE;QACf,cAAc,EAAE,KAAK;QACrB,MAAM,EAAE,KAAK;KACd,CAAC;IAEF,MAAM,YAAY,GAAG,mBAAI,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IAEjE,MAAM,IAAI,GAAG,MAAM,IAAA,iCAAqB,EACtC,YAAY,EACZ,QAAQ,EACR,gBAAgB,EAChB,OAAO,CAAC,QAAQ,EAChB,OAAO,CAAC,UAAU,CACnB,CAAC;IAEF,OAAO;QACL,GAAG,EAAE,IAAA,+BAAwB,EAAC,iBAAiB,EAAE,IAAI,CAAC;KACvD,CAAC;AACJ,CAAC;AAzBD,8BAyBC"}
|
|
@@ -1,95 +1,68 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.convertLightningCssToReactNativeWebStyleSheet = convertLightningCssToReactNativeWebStyleSheet;
|
|
7
|
-
exports.matchCssModule = matchCssModule;
|
|
8
|
-
exports.transformCssModuleWeb = transformCssModuleWeb;
|
|
9
|
-
function _css() {
|
|
10
|
-
const data = require("./css");
|
|
11
|
-
_css = function () {
|
|
12
|
-
return data;
|
|
13
|
-
};
|
|
14
|
-
return data;
|
|
15
|
-
}
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.matchCssModule = exports.convertLightningCssToReactNativeWebStyleSheet = exports.transformCssModuleWeb = void 0;
|
|
4
|
+
const css_1 = require("./css");
|
|
16
5
|
const RNW_CSS_CLASS_ID = '_';
|
|
17
6
|
async function transformCssModuleWeb(props) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
// cssModules: true,
|
|
35
|
-
projectRoot: props.options.projectRoot,
|
|
36
|
-
minify: props.options.minify
|
|
37
|
-
});
|
|
38
|
-
const codeAsString = cssResults.code.toString();
|
|
39
|
-
const {
|
|
40
|
-
styles,
|
|
41
|
-
reactNativeWeb,
|
|
42
|
-
variables
|
|
43
|
-
} = convertLightningCssToReactNativeWebStyleSheet(cssResults.exports);
|
|
44
|
-
let outputModule = `module.exports=Object.assign(${JSON.stringify(styles)},{unstable_styles:${JSON.stringify(reactNativeWeb)}},${JSON.stringify(variables)});`;
|
|
45
|
-
if (props.options.dev) {
|
|
46
|
-
const runtimeCss = (0, _css().wrapDevelopmentCSS)({
|
|
47
|
-
...props,
|
|
48
|
-
src: codeAsString
|
|
7
|
+
const { transform } = require('lightningcss');
|
|
8
|
+
// TODO: Add bundling to resolve imports
|
|
9
|
+
// https://lightningcss.dev/bundling.html#bundling-order
|
|
10
|
+
const cssResults = transform({
|
|
11
|
+
filename: props.filename,
|
|
12
|
+
code: Buffer.from(props.src),
|
|
13
|
+
sourceMap: props.options.sourceMap,
|
|
14
|
+
cssModules: {
|
|
15
|
+
// Prevent renaming CSS variables to ensure
|
|
16
|
+
// variables created in global files are available.
|
|
17
|
+
dashedIdents: false,
|
|
18
|
+
},
|
|
19
|
+
// cssModules: true,
|
|
20
|
+
projectRoot: props.options.projectRoot,
|
|
21
|
+
minify: props.options.minify,
|
|
49
22
|
});
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const styles = {};
|
|
60
|
-
const reactNativeWeb = {};
|
|
61
|
-
const variables = {};
|
|
62
|
-
// e.g. { container: { name: 'ahs8IW_container', composes: [], isReferenced: false }, }
|
|
63
|
-
Object.entries(input).map(([key, value]) => {
|
|
64
|
-
// order matters here
|
|
65
|
-
let className = value.name;
|
|
66
|
-
if (value.composes.length) {
|
|
67
|
-
className += ' ' + value.composes.map(value => value.name).join(' ');
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// CSS Variables will be `{string: string}`
|
|
71
|
-
if (key.startsWith('--')) {
|
|
72
|
-
variables[key] = className;
|
|
23
|
+
const codeAsString = cssResults.code.toString();
|
|
24
|
+
const { styles, reactNativeWeb, variables } = convertLightningCssToReactNativeWebStyleSheet(cssResults.exports);
|
|
25
|
+
let outputModule = `module.exports=Object.assign(${JSON.stringify(styles)},{unstable_styles:${JSON.stringify(reactNativeWeb)}},${JSON.stringify(variables)});`;
|
|
26
|
+
if (props.options.dev) {
|
|
27
|
+
const runtimeCss = (0, css_1.wrapDevelopmentCSS)({
|
|
28
|
+
...props,
|
|
29
|
+
src: codeAsString,
|
|
30
|
+
});
|
|
31
|
+
outputModule += '\n' + runtimeCss;
|
|
73
32
|
}
|
|
74
|
-
styles[key] = className;
|
|
75
|
-
reactNativeWeb[key] = {
|
|
76
|
-
$$css: true,
|
|
77
|
-
[RNW_CSS_CLASS_ID]: className
|
|
78
|
-
};
|
|
79
33
|
return {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
34
|
+
output: outputModule,
|
|
35
|
+
css: cssResults.code,
|
|
36
|
+
map: cssResults.map,
|
|
84
37
|
};
|
|
85
|
-
});
|
|
86
|
-
return {
|
|
87
|
-
styles,
|
|
88
|
-
reactNativeWeb,
|
|
89
|
-
variables
|
|
90
|
-
};
|
|
91
38
|
}
|
|
39
|
+
exports.transformCssModuleWeb = transformCssModuleWeb;
|
|
40
|
+
function convertLightningCssToReactNativeWebStyleSheet(input) {
|
|
41
|
+
const styles = {};
|
|
42
|
+
const reactNativeWeb = {};
|
|
43
|
+
const variables = {};
|
|
44
|
+
// e.g. { container: { name: 'ahs8IW_container', composes: [], isReferenced: false }, }
|
|
45
|
+
Object.entries(input).map(([key, value]) => {
|
|
46
|
+
// order matters here
|
|
47
|
+
let className = value.name;
|
|
48
|
+
if (value.composes.length) {
|
|
49
|
+
className += ' ' + value.composes.map((value) => value.name).join(' ');
|
|
50
|
+
}
|
|
51
|
+
// CSS Variables will be `{string: string}`
|
|
52
|
+
if (key.startsWith('--')) {
|
|
53
|
+
variables[key] = className;
|
|
54
|
+
}
|
|
55
|
+
styles[key] = className;
|
|
56
|
+
reactNativeWeb[key] = { $$css: true, [RNW_CSS_CLASS_ID]: className };
|
|
57
|
+
return {
|
|
58
|
+
[key]: { $$css: true, [RNW_CSS_CLASS_ID]: className },
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
return { styles, reactNativeWeb, variables };
|
|
62
|
+
}
|
|
63
|
+
exports.convertLightningCssToReactNativeWebStyleSheet = convertLightningCssToReactNativeWebStyleSheet;
|
|
92
64
|
function matchCssModule(filePath) {
|
|
93
|
-
|
|
65
|
+
return !!/\.module(\.(native|ios|android|web))?\.(css|s[ac]ss)$/.test(filePath);
|
|
94
66
|
}
|
|
67
|
+
exports.matchCssModule = matchCssModule;
|
|
95
68
|
//# sourceMappingURL=css-modules.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css-modules.js","
|
|
1
|
+
{"version":3,"file":"css-modules.js","sourceRoot":"","sources":["../../src/transform-worker/css-modules.ts"],"names":[],"mappings":";;;AAAA,+BAA2C;AAE3C,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAEtB,KAAK,UAAU,qBAAqB,CAAC,KAI3C;IACC,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,cAAc,CAAkC,CAAC;IAE/E,wCAAwC;IACxC,wDAAwD;IAExD,MAAM,UAAU,GAAG,SAAS,CAAC;QAC3B,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;QAC5B,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,SAAS;QAClC,UAAU,EAAE;YACV,2CAA2C;YAC3C,mDAAmD;YACnD,YAAY,EAAE,KAAK;SACpB;QACD,oBAAoB;QACpB,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,WAAW;QACtC,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM;KAC7B,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;IAEhD,M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YACxB,SAAS,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;SAC5B;QAED,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;QACxB,cAAc,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,gBAAgB,CAAC,EAAE,SAAS,EAAE,CAAC;QACrE,OAAO;YACL,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,gBAAgB,CAAC,EAAE,SAAS,EAAE;SACtD,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC;AAC/C,CAAC;AA5BD,sGA4BC;AAED,SAAgB,cAAc,CAAC,QAAgB;IAC7C,OAAO,CAAC,CAAC,uDAAuD,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAClF,CAAC;AAFD,wCAEC"}
|
|
@@ -1,29 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.escapeBackticksAndOctals = escapeBackticksAndOctals;
|
|
7
|
-
exports.getHotReplaceTemplate = getHotReplaceTemplate;
|
|
8
|
-
exports.pathToHtmlSafeName = pathToHtmlSafeName;
|
|
9
|
-
exports.wrapDevelopmentCSS = wrapDevelopmentCSS;
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.escapeBackticksAndOctals = exports.wrapDevelopmentCSS = exports.getHotReplaceTemplate = exports.pathToHtmlSafeName = void 0;
|
|
10
4
|
function pathToHtmlSafeName(path) {
|
|
11
|
-
|
|
5
|
+
return path.replace(/[^a-zA-Z0-9_]/g, '_');
|
|
12
6
|
}
|
|
7
|
+
exports.pathToHtmlSafeName = pathToHtmlSafeName;
|
|
13
8
|
function getHotReplaceTemplate(id) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
// In dev mode, we need to replace the style tag instead of appending it
|
|
10
|
+
// use the path as the expo-css-hmr attribute to find the style tag
|
|
11
|
+
// to replace.
|
|
12
|
+
const attr = JSON.stringify(pathToHtmlSafeName(id));
|
|
13
|
+
return `style.setAttribute('data-expo-css-hmr', ${attr});
|
|
19
14
|
const previousStyle = document.querySelector('[data-expo-css-hmr=${attr}]');
|
|
20
15
|
if (previousStyle) {
|
|
21
16
|
previousStyle.parentNode.removeChild(previousStyle);
|
|
22
17
|
}`;
|
|
23
18
|
}
|
|
19
|
+
exports.getHotReplaceTemplate = getHotReplaceTemplate;
|
|
24
20
|
function wrapDevelopmentCSS(props) {
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
const withBackTicksEscaped = escapeBackticksAndOctals(props.src);
|
|
22
|
+
return `(() => {
|
|
27
23
|
if (typeof document === 'undefined') {
|
|
28
24
|
return
|
|
29
25
|
}
|
|
@@ -40,10 +36,15 @@ function wrapDevelopmentCSS(props) {
|
|
|
40
36
|
}
|
|
41
37
|
})();`;
|
|
42
38
|
}
|
|
39
|
+
exports.wrapDevelopmentCSS = wrapDevelopmentCSS;
|
|
43
40
|
function escapeBackticksAndOctals(str) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
if (typeof str !== 'string') {
|
|
42
|
+
return '';
|
|
43
|
+
}
|
|
44
|
+
return str
|
|
45
|
+
.replace(/\\/g, '\\\\')
|
|
46
|
+
.replace(/`/g, '\\`')
|
|
47
|
+
.replace(/[\0-\7]/g, (match) => `\\0${match.charCodeAt(0).toString(8)}`);
|
|
48
48
|
}
|
|
49
|
+
exports.escapeBackticksAndOctals = escapeBackticksAndOctals;
|
|
49
50
|
//# sourceMappingURL=css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.js","
|
|
1
|
+
{"version":3,"file":"css.js","sourceRoot":"","sources":["../../src/transform-worker/css.ts"],"names":[],"mappings":";;;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-
const data = require("metro/src/DeltaBundler/Serializers/helpers/js");
|
|
17
|
-
_js = function () {
|
|
18
|
-
return data;
|
|
19
|
-
};
|
|
20
|
-
return data;
|
|
21
|
-
}
|
|
22
|
-
function _nodeAssert() {
|
|
23
|
-
const data = _interopRequireDefault(require("node:assert"));
|
|
24
|
-
_nodeAssert = function () {
|
|
25
|
-
return data;
|
|
26
|
-
};
|
|
27
|
-
return data;
|
|
28
|
-
}
|
|
29
|
-
function _nodeCrypto() {
|
|
30
|
-
const data = _interopRequireDefault(require("node:crypto"));
|
|
31
|
-
_nodeCrypto = function () {
|
|
32
|
-
return data;
|
|
33
|
-
};
|
|
34
|
-
return data;
|
|
35
|
-
}
|
|
36
|
-
function _nodePath() {
|
|
37
|
-
const data = _interopRequireDefault(require("node:path"));
|
|
38
|
-
_nodePath = function () {
|
|
39
|
-
return data;
|
|
40
|
-
};
|
|
41
|
-
return data;
|
|
42
|
-
}
|
|
43
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
44
|
-
/**
|
|
45
|
-
* Copyright 2023-present 650 Industries (Expo). All rights reserved.
|
|
46
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
47
|
-
*
|
|
48
|
-
* This source code is licensed under the MIT license found in the
|
|
49
|
-
* LICENSE file in the root directory of this source tree.
|
|
50
|
-
*/
|
|
51
|
-
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getUniversalAssetData = void 0;
|
|
7
|
+
const Assets_1 = require("metro/src/Assets");
|
|
8
|
+
const js_1 = require("metro/src/DeltaBundler/Serializers/helpers/js");
|
|
9
|
+
const node_assert_1 = __importDefault(require("node:assert"));
|
|
10
|
+
const node_crypto_1 = __importDefault(require("node:crypto"));
|
|
11
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
52
12
|
function md5Hash(data) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
13
|
+
if (data.length === 1)
|
|
14
|
+
return data[0];
|
|
15
|
+
const hash = node_crypto_1.default.createHash('md5');
|
|
16
|
+
hash.update(data.join(''));
|
|
17
|
+
return hash.digest('hex');
|
|
57
18
|
}
|
|
58
19
|
function assertHashedAssetData(data) {
|
|
59
|
-
|
|
20
|
+
(0, node_assert_1.default)('fileHashes' in data, 'Assets must have hashed files. Ensure the expo-asset plugin is installed.');
|
|
60
21
|
}
|
|
61
22
|
async function getUniversalAssetData(assetPath, localPath, assetDataPlugins, platform, publicPath) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
return data;
|
|
23
|
+
const data = await (0, Assets_1.getAssetData)(assetPath, localPath, assetDataPlugins, platform, publicPath);
|
|
24
|
+
assertHashedAssetData(data);
|
|
25
|
+
// NOTE(EvanBacon): This is where we modify the asset to include a hash in the name for web cache invalidation.
|
|
26
|
+
if (platform === 'web' && publicPath.includes('?export_path=')) {
|
|
27
|
+
// `local-image.[contenthash]`. Using `.` but this won't work if we ever apply to Android because Android res files cannot contain `.`.
|
|
28
|
+
// TODO: Prevent one multi-res image from updating the hash in all images.
|
|
29
|
+
// @ts-expect-error: name is typed as readonly.
|
|
30
|
+
data.name = `${data.name}.${md5Hash(data.fileHashes)}`;
|
|
31
|
+
}
|
|
32
|
+
return data;
|
|
73
33
|
}
|
|
34
|
+
exports.getUniversalAssetData = getUniversalAssetData;
|
|
74
35
|
async function getAssets(dependencies, options) {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
36
|
+
const promises = [];
|
|
37
|
+
const { processModuleFilter } = options;
|
|
38
|
+
for (const module of dependencies.values()) {
|
|
39
|
+
if ((0, js_1.isJsModule)(module) &&
|
|
40
|
+
processModuleFilter(module) &&
|
|
41
|
+
(0, js_1.getJsOutput)(module).type === 'js/module/asset' &&
|
|
42
|
+
node_path_1.default.relative(options.projectRoot, module.path) !== 'package.json') {
|
|
43
|
+
promises.push(getUniversalAssetData(module.path, node_path_1.default.relative(options.projectRoot, module.path), options.assetPlugins, options.platform, options.publicPath));
|
|
44
|
+
}
|
|
82
45
|
}
|
|
83
|
-
|
|
84
|
-
return await Promise.all(promises);
|
|
46
|
+
return await Promise.all(promises);
|
|
85
47
|
}
|
|
48
|
+
exports.default = getAssets;
|
|
86
49
|
//# sourceMappingURL=getAssets.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAssets.js","
|
|
1
|
+
{"version":3,"file":"getAssets.js","sourceRoot":"","sources":["../../src/transform-worker/getAssets.ts"],"names":[],"mappings":";;;;;;AAQA,6CAAgD;AAChD,sEAAwF;AACxF,8DAAiC;AACjC,8DAAiC;AACjC,0DAA6B;AAY7B,SAAS,OAAO,CAAC,IAAc;IAC7B,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC;IACtC,MAAM,IAAI,GAAG,qBAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IACtC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3B,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC;AAED,SAAS,qBAAqB,CAAC,IAAe;IAC5C,IAAA,qBAAM,EACJ,YAAY,IAAI,IAAI,EACpB,2EAA2E,CAC5E,CAAC;AACJ,CAAC;AAEM,KAAK,UAAU,qBAAqB,CACzC,SAAiB,EACjB,SAAiB,EACjB,gBAAmC,EACnC,QAAmC,EACnC,UAAkB;IAElB,MAAM,IAAI,GAAG,MAAM,IAAA,qBAA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