Home
last modified time | relevance | path

Searched refs:moduleId (Results 1 – 25 of 72) sorted by relevance

123

/expo/packages/@expo/cli/src/start/server/metro/
H A DresolveFromProject.ts9 constructor(projectRoot: string, moduleId: string) {
11 `Missing package "${moduleId}" in the project at: ${projectRoot}\n` +
32 const resolvedPath = resolveFrom.silent(projectRoot, moduleId);
34 throw new MetroImportError(projectRoot, moduleId);
39 function importFromProject(projectRoot: string, moduleId: string) {
40 return require(resolveFromProject(projectRoot, moduleId));
74 moduleId: string
76 const resolvedPath = resolveFrom.silent(projectRoot, moduleId);
78 debug(`requiring "${moduleId}" relative to the CLI`);
79 return require(require.resolve(moduleId));
[all …]
H A Dexternals.ts27 export function getNodeExternalModuleId(fromModule: string, moduleId: string) {
30 path.join(METRO_EXTERNALS_FOLDER, moduleId, 'index.js')
54 const moduleId = moduleName.replace(/^node:/, ''); constant
55 if (NODE_STDLIB_MODULES.includes(moduleId)) {
56 return moduleId;
61 function tapNodeShimContents(moduleId: string): string {
62 return `module.exports = $$require_external('node:${moduleId}');`;
68 for (const moduleId of NODE_STDLIB_MODULES) { constant
69 const shimDir = path.join(projectRoot, METRO_EXTERNALS_FOLDER, moduleId);
71 externals[moduleId] = shimPath;
[all …]
/expo/packages/@expo/fingerprint/__mocks__/
H A Dresolve-from.ts3 function mockedResolveFrom(fromDirectory: string, moduleId: string, silent: boolean) {
4 if (fromDirectory === '/app' && moduleId === './package.json') {
10 return silent ? resolveFrom.silent(__dirname, moduleId) : resolveFrom(__dirname, moduleId);
16 .mockImplementation((fromDirectory: string, moduleId: string) =>
17 mockedResolveFrom(fromDirectory, moduleId, false)
22 .mockImplementation((fromDirectory: string, moduleId: string) =>
23 mockedResolveFrom(fromDirectory, moduleId, true)
/expo/packages/@expo/cli/src/start/server/webpack/
H A DresolveFromProject.ts9 constructor(projectRoot: string, moduleId: string) {
12 …`Missing package "${moduleId}" in the project. Try running the command again. (cwd: ${projectRoot}…
17 function resolveFromProject(projectRoot: string, moduleId: string) {
18 const resolvedPath = resolveFrom.silent(projectRoot, moduleId);
20 throw new WebpackImportError(projectRoot, moduleId);
25 function importFromProject(projectRoot: string, moduleId: string) {
26 return require(resolveFromProject(projectRoot, moduleId));
/expo/packages/@expo/metro-config/src/transform-worker/utils/
H A Drequire.ts1 export async function tryRequireThenImport<TModule>(moduleId: string): Promise<TModule> {
3 return require(moduleId);
14 return (await importESM(moduleId)).default;
21 export function requireUncachedFile(moduleId: string) {
26 return require(moduleId);
29 error.message = `Cannot load file ${moduleId}: ${error.message}`;
/expo/packages/@expo/metro-config/build/transform-worker/utils/
H A Drequire.js8 async function tryRequireThenImport(moduleId) { argument
10 return require(moduleId);
20 return (await importESM(moduleId)).default;
25 function requireUncachedFile(moduleId) { argument
30 return require(moduleId);
33 error.message = `Cannot load file ${moduleId}: ${error.message}`;
H A Drequire.js.map1moduleId","require","requireError","importESM","Function","code","default","requireUncachedFile","…
H A Drequire.d.ts1 export declare function tryRequireThenImport<TModule>(moduleId: string): Promise<TModule>;
2 export declare function requireUncachedFile(moduleId: string): any;
/expo/packages/@expo/cli/src/customize/
H A Dtemplates.ts15 function importFromExpoWebpackConfig(projectRoot: string, folder: string, moduleId: string) {
17 const filePath = resolveFrom(projectRoot, `@expo/webpack-config/${folder}/${moduleId}`);
18 debug(`Using @expo/webpack-config template for "${moduleId}": ${filePath}`);
21 debug(`@expo/webpack-config template for "${moduleId}" not found, falling back on @expo/cli`);
23 return importFromVendor(projectRoot, moduleId);
26 function importFromVendor(projectRoot: string, moduleId: string) {
28 const filePath = resolveFrom(projectRoot, '@expo/cli/static/template/' + moduleId);
29 debug(`Using @expo/cli template for "${moduleId}": ${filePath}`);
33 const filePath = require.resolve(`@expo/cli/static/template/${moduleId}`);
35 …`Local @expo/cli template for "${moduleId}" not found, falling back on template relative to @expo/…
/expo/packages/@expo/cli/src/start/server/
H A DgetStaticRenderFunctions.ts32 const moduleId = resolveFrom.silent(projectRoot, 'expo-router/node/render.js');
33 if (!moduleId) {
39 return moduleId;
55 const moduleId = path.join(tempDir, 'render.js');
59 return moduleId;
70 let moduleId = requiredModuleId;
74 if (path.relative(root, moduleId).startsWith('..')) {
75 moduleId = await moveStaticRenderFunction(projectRoot, requiredModuleId);
92 const moduleId = path.join(tempDir, path.basename(otherFile)); constant
93 await fs.promises.writeFile(moduleId, await fs.promises.readFile(otherFile, 'utf8'));
[all …]
/expo/ios/versioned-react-native/ABI48_0_0/ReactNative/ReactCommon/cxxreact/
H A DABI48_0_0ModuleRegistry.cpp200 std::string ModuleRegistry::getModuleName(unsigned int moduleId) { in getModuleName() argument
201 if (moduleId >= modules_.size()) { in getModuleName()
206 return modules_[moduleId]->getName(); in getModuleName()
210 unsigned int moduleId, in getModuleSyncMethodName() argument
212 if (moduleId >= modules_.size()) { in getModuleSyncMethodName()
217 return modules_[moduleId]->getSyncMethodName(methodId); in getModuleSyncMethodName()
221 unsigned int moduleId, in callNativeMethod() argument
225 if (moduleId >= modules_.size()) { in callNativeMethod()
233 unsigned int moduleId, in callSerializableNativeHook() argument
236 if (moduleId >= modules_.size()) { in callSerializableNativeHook()
[all …]
H A DABI48_0_0JSModulesUnbundle.h31 ModuleNotFound(uint32_t moduleId) in ModuleNotFound() argument
33 folly::to<std::string>("Module not found: ", moduleId)) {} in ModuleNotFound()
41 virtual Module getModule(uint32_t moduleId) const = 0;
H A DABI48_0_0ModuleRegistry.h53 unsigned int moduleId,
58 unsigned int moduleId,
62 std::string getModuleName(unsigned int moduleId);
64 unsigned int moduleId,
/expo/ios/versioned-react-native/ABI47_0_0/ReactNative/ReactCommon/cxxreact/
H A DABI47_0_0ModuleRegistry.cpp200 std::string ModuleRegistry::getModuleName(unsigned int moduleId) { in getModuleName() argument
201 if (moduleId >= modules_.size()) { in getModuleName()
206 return modules_[moduleId]->getName(); in getModuleName()
210 unsigned int moduleId, in getModuleSyncMethodName() argument
212 if (moduleId >= modules_.size()) { in getModuleSyncMethodName()
217 return modules_[moduleId]->getSyncMethodName(methodId); in getModuleSyncMethodName()
221 unsigned int moduleId, in callNativeMethod() argument
225 if (moduleId >= modules_.size()) { in callNativeMethod()
233 unsigned int moduleId, in callSerializableNativeHook() argument
236 if (moduleId >= modules_.size()) { in callSerializableNativeHook()
[all …]
H A DABI47_0_0JSModulesUnbundle.h31 ModuleNotFound(uint32_t moduleId) in ModuleNotFound() argument
33 folly::to<std::string>("Module not found: ", moduleId)) {} in ModuleNotFound()
41 virtual Module getModule(uint32_t moduleId) const = 0;
H A DABI47_0_0ModuleRegistry.h53 unsigned int moduleId,
58 unsigned int moduleId,
62 std::string getModuleName(unsigned int moduleId);
64 unsigned int moduleId,
/expo/ios/versioned-react-native/ABI49_0_0/ReactNative/ReactCommon/cxxreact/
H A DABI49_0_0ModuleRegistry.cpp199 std::string ModuleRegistry::getModuleName(unsigned int moduleId) { in getModuleName() argument
200 if (moduleId >= modules_.size()) { in getModuleName()
205 return modules_[moduleId]->getName(); in getModuleName()
209 unsigned int moduleId, in getModuleSyncMethodName() argument
211 if (moduleId >= modules_.size()) { in getModuleSyncMethodName()
216 return modules_[moduleId]->getSyncMethodName(methodId); in getModuleSyncMethodName()
220 unsigned int moduleId, in callNativeMethod() argument
224 if (moduleId >= modules_.size()) { in callNativeMethod()
232 unsigned int moduleId, in callSerializableNativeHook() argument
235 if (moduleId >= modules_.size()) { in callSerializableNativeHook()
[all …]
H A DABI49_0_0JSModulesUnbundle.h31 ModuleNotFound(uint32_t moduleId) in ModuleNotFound() argument
33 folly::to<std::string>("Module not found: ", moduleId)) {} in ModuleNotFound()
41 virtual Module getModule(uint32_t moduleId) const = 0;
H A DABI49_0_0ModuleRegistry.h53 unsigned int moduleId,
58 unsigned int moduleId,
62 std::string getModuleName(unsigned int moduleId);
64 unsigned int moduleId,
/expo/packages/create-expo/src/
H A DTemplate.ts52 export function resolvePackageModuleId(moduleId: string) {
55 moduleId?.startsWith('file:') ||
57 moduleId?.startsWith('.') ||
59 moduleId?.startsWith(path.sep)
61 if (moduleId?.startsWith('file:')) {
62 moduleId = moduleId.substring(5);
64 debug(`Resolved moduleId to file path:`, moduleId);
65 return { type: 'file', uri: path.resolve(moduleId) };
67 debug(`Resolved moduleId to NPM package:`, moduleId);
68 return { type: 'npm', uri: moduleId };
/expo/packages/@expo/cli/src/utils/
H A DisModuleSymlinked.ts34 moduleId,
37 moduleId: string;
42 const moduleRootPath = path.dirname(resolveFrom(projectRoot, `${moduleId}/package.json`));
/expo/packages/@expo/config/src/paths/
H A Dpaths.ts107 moduleId: string,
111 const modulePath = resolveFrom.silent(fromDirectory, `${moduleId}.${extension}`);
116 return resolveFrom.silent(fromDirectory, moduleId) || null;
123 moduleId: string,
126 const modulePath = path.join(fromDirectory, moduleId);
131 const modulePath = path.join(fromDirectory, `${moduleId}.${extension}`);
/expo/packages/@expo/cli/src/start/doctor/ngrok/
H A DExternalModule.ts158 _require(moduleId: string): any {
159 return require(moduleId);
163 _resolveLocal(moduleId: string): string {
164 return resolveFrom(this.projectRoot, moduleId);
168 _resolveGlobal(moduleId: string): string {
169 return requireGlobal.resolve(moduleId);
/expo/packages/@expo/config/build/paths/
H A Dpaths.js129 function resolveFromSilentWithExtensions(fromDirectory, moduleId, extensions) { argument
131 const modulePath = _resolveFrom().default.silent(fromDirectory, `${moduleId}.${extension}`);
136 return _resolveFrom().default.silent(fromDirectory, moduleId) || null;
141 function getFileWithExtensions(fromDirectory, moduleId, extensions) { argument
142 const modulePath = _path().default.join(fromDirectory, moduleId);
147 const modulePath = _path().default.join(fromDirectory, `${moduleId}.${extension}`);
/expo/packages/expo-asset/src/
H A DAsset.ts131 static loadAsync(moduleId: number | number[] | string | string[]): Promise<Asset[]> {
132 const moduleIds = Array.isArray(moduleId) ? moduleId : [moduleId];
133 return Promise.all(moduleIds.map((moduleId) => Asset.fromModule(moduleId).downloadAsync()));

123