@expo/cli 0.7.1 → 0.7.3
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/bin/cli +2 -2
- package/build/src/prebuild/prebuildAsync.js +1 -1
- package/build/src/prebuild/prebuildAsync.js.map +1 -1
- package/build/src/start/doctor/ngrok/ExternalModule.js +2 -2
- package/build/src/start/doctor/ngrok/ExternalModule.js.map +1 -1
- package/build/src/start/server/middleware/ClassicManifestMiddleware.js +1 -1
- package/build/src/utils/analytics/rudderstackClient.js +2 -2
- package/build/src/utils/cocoapods.js +1 -1
- package/build/src/utils/cocoapods.js.map +1 -1
- package/build/src/utils/downloadExpoGoAsync.js +2 -1
- package/build/src/utils/downloadExpoGoAsync.js.map +1 -1
- package/package.json +2 -2
package/build/bin/cli
CHANGED
|
@@ -121,7 +121,7 @@ const args = (0, _arg).default({
|
|
|
121
121
|
});
|
|
122
122
|
if (args["--version"]) {
|
|
123
123
|
// Version is added in the build script.
|
|
124
|
-
console.log("0.7.
|
|
124
|
+
console.log("0.7.3");
|
|
125
125
|
process.exit(0);
|
|
126
126
|
}
|
|
127
127
|
if (args["--non-interactive"]) {
|
|
@@ -248,7 +248,7 @@ commands[command]().then((exec)=>{
|
|
|
248
248
|
logEventAsync("action", {
|
|
249
249
|
action: `expo ${command}`,
|
|
250
250
|
source: "expo/cli",
|
|
251
|
-
source_version: "0.7.
|
|
251
|
+
source_version: "0.7.3"
|
|
252
252
|
});
|
|
253
253
|
});
|
|
254
254
|
|
|
@@ -74,7 +74,7 @@ async function prebuildAsync(projectRoot, options) {
|
|
|
74
74
|
}
|
|
75
75
|
await (0, _installAsync).installAsync([], {
|
|
76
76
|
...options.packageManager,
|
|
77
|
-
silent: !_env.env.EXPO_DEBUG
|
|
77
|
+
silent: !(_env.env.EXPO_DEBUG || _env.env.CI)
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
// Apply Expo config to native projects
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/prebuild/prebuildAsync.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config';\nimport { ModPlatform } from '@expo/config-plugins';\n\nimport { installAsync } from '../install/installAsync';\nimport { env } from '../utils/env';\nimport { clearNodeModulesAsync } from '../utils/nodeModules';\nimport { logNewSection } from '../utils/ora';\nimport { profile } from '../utils/profile';\nimport { clearNativeFolder, promptToClearMalformedNativeProjectsAsync } from './clearNativeFolder';\nimport { configureProjectAsync } from './configureProjectAsync';\nimport { ensureConfigAsync } from './ensureConfigAsync';\nimport { assertPlatforms, ensureValidPlatforms, resolveTemplateOption } from './resolveOptions';\nimport { updateFromTemplateAsync } from './updateFromTemplate';\n\nconst debug = require('debug')('expo:prebuild') as typeof console.log;\n\nexport type PrebuildResults = {\n /** Expo config. */\n exp: ExpoConfig;\n /** Indicates if the process created new files. */\n hasNewProjectFiles: boolean;\n /** The platforms that were prebuilt. */\n platforms: ModPlatform[];\n /** Indicates if pod install was run. */\n podInstall: boolean;\n /** Indicates if node modules were installed. */\n nodeInstall: boolean;\n};\n\n/**\n * Entry point into the prebuild process, delegates to other helpers to perform various steps.\n *\n * 0. Attempt to clean the project folders.\n * 1. Create native projects (ios, android).\n * 2. Install node modules.\n * 3. Apply config to native projects.\n * 4. Install CocoaPods.\n */\nexport async function prebuildAsync(\n projectRoot: string,\n options: {\n /** Should install node modules and cocoapods. */\n install?: boolean;\n /** List of platforms to prebuild. */\n platforms: ModPlatform[];\n /** Should delete the native folders before attempting to prebuild. */\n clean?: boolean;\n /** URL or file path to the prebuild template. */\n template?: string;\n /** Name of the node package manager to install with. */\n packageManager?: {\n npm?: boolean;\n yarn?: boolean;\n pnpm?: boolean;\n };\n /** List of node modules to skip updating. */\n skipDependencyUpdate?: string[];\n }\n): Promise<PrebuildResults | null> {\n if (options.clean) {\n const { maybeBailOnGitStatusAsync } = await import('../utils/git');\n // Clean the project folders...\n if (await maybeBailOnGitStatusAsync()) {\n return null;\n }\n // Clear the native folders before syncing\n await clearNativeFolder(projectRoot, options.platforms);\n } else {\n // Check if the existing project folders are malformed.\n await promptToClearMalformedNativeProjectsAsync(projectRoot, options.platforms);\n }\n\n // Warn if the project is attempting to prebuild an unsupported platform (iOS on Windows).\n options.platforms = ensureValidPlatforms(options.platforms);\n // Assert if no platforms are left over after filtering.\n assertPlatforms(options.platforms);\n\n // Get the Expo config, create it if missing.\n const { exp, pkg } = await ensureConfigAsync(projectRoot, { platforms: options.platforms });\n\n // Create native projects from template.\n const { hasNewProjectFiles, needsPodInstall, hasNewDependencies } = await updateFromTemplateAsync(\n projectRoot,\n {\n exp,\n pkg,\n template: options.template != null ? resolveTemplateOption(options.template) : undefined,\n platforms: options.platforms,\n skipDependencyUpdate: options.skipDependencyUpdate,\n }\n );\n\n // Install node modules\n if (options.install) {\n if (hasNewDependencies && options.packageManager?.npm) {\n await clearNodeModulesAsync(projectRoot);\n }\n\n await installAsync([], {\n ...options.packageManager,\n silent: !env.EXPO_DEBUG,\n });\n }\n\n // Apply Expo config to native projects\n const configSyncingStep = logNewSection('Config syncing');\n try {\n await profile(configureProjectAsync)(projectRoot, {\n platforms: options.platforms,\n });\n configSyncingStep.succeed('Config synced');\n } catch (error) {\n configSyncingStep.fail('Config sync failed');\n throw error;\n }\n\n // Install CocoaPods\n let podsInstalled: boolean = false;\n // err towards running pod install less because it's slow and users can easily run npx pod-install afterwards.\n if (options.platforms.includes('ios') && options.install && needsPodInstall) {\n const { installCocoaPodsAsync } = await import('../utils/cocoapods');\n\n podsInstalled = await installCocoaPodsAsync(projectRoot);\n } else {\n debug('Skipped pod install');\n }\n\n return {\n nodeInstall: !!options.install,\n podInstall: !podsInstalled,\n platforms: options.platforms,\n hasNewProjectFiles,\n exp,\n };\n}\n"],"names":["prebuildAsync","debug","require","projectRoot","options","clean","maybeBailOnGitStatusAsync","clearNativeFolder","platforms","promptToClearMalformedNativeProjectsAsync","ensureValidPlatforms","assertPlatforms","exp","pkg","ensureConfigAsync","hasNewProjectFiles","needsPodInstall","hasNewDependencies","updateFromTemplateAsync","template","resolveTemplateOption","undefined","skipDependencyUpdate","install","packageManager","npm","clearNodeModulesAsync","installAsync","silent","env","EXPO_DEBUG","configSyncingStep","logNewSection","profile","configureProjectAsync","succeed","error","fail","podsInstalled","includes","installCocoaPodsAsync","nodeInstall","podInstall"],"mappings":"AAAA;;;;QAsCsBA,aAAa,GAAbA,aAAa;AAnCN,IAAA,aAAyB,WAAzB,yBAAyB,CAAA;AAClC,IAAA,IAAc,WAAd,cAAc,CAAA;AACI,IAAA,YAAsB,WAAtB,sBAAsB,CAAA;AAC9B,IAAA,IAAc,WAAd,cAAc,CAAA;AACpB,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;AACmC,IAAA,kBAAqB,WAArB,qBAAqB,CAAA;AAC5D,IAAA,sBAAyB,WAAzB,yBAAyB,CAAA;AAC7B,IAAA,kBAAqB,WAArB,qBAAqB,CAAA;AACsB,IAAA,eAAkB,WAAlB,kBAAkB,CAAA;AACvD,IAAA,mBAAsB,WAAtB,sBAAsB,CAAA;;;;;;;;;;;;;;;;;;;;;;AAE9D,MAAMC,KAAK,GAAGC,OAAO,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC,AAAsB,AAAC;AAwB/D,eAAeF,aAAa,CACjCG,WAAmB,EACnBC,OAiBC,EACgC;IACjC,IAAIA,OAAO,CAACC,KAAK,EAAE;QACjB,MAAM,EAAEC,yBAAyB,CAAA,EAAE,GAAG,MAAM;mDAAO,cAAc;UAAC,AAAC;QACnE,+BAA+B;QAC/B,IAAI,MAAMA,yBAAyB,EAAE,EAAE;YACrC,OAAO,IAAI,CAAC;SACb;QACD,0CAA0C;QAC1C,MAAMC,CAAAA,GAAAA,kBAAiB,AAAgC,CAAA,kBAAhC,CAACJ,WAAW,EAAEC,OAAO,CAACI,SAAS,CAAC,CAAC;KACzD,MAAM;QACL,uDAAuD;QACvD,MAAMC,CAAAA,GAAAA,kBAAyC,AAAgC,CAAA,0CAAhC,CA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C;SAC1C;QAED,MAAMwB,CAAAA,GAAAA,aAAY,AAGhB,CAAA,aAHgB,CAAC,EAAE,EAAE;YACrB,GAAGvB,OAAO,CAACoB,cAAc;YACzBI,MAAM,EAAE,CAACC,IAAG,IAAA,CAACC,UAAU;
|
|
1
|
+
{"version":3,"sources":["../../../src/prebuild/prebuildAsync.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config';\nimport { ModPlatform } from '@expo/config-plugins';\n\nimport { installAsync } from '../install/installAsync';\nimport { env } from '../utils/env';\nimport { clearNodeModulesAsync } from '../utils/nodeModules';\nimport { logNewSection } from '../utils/ora';\nimport { profile } from '../utils/profile';\nimport { clearNativeFolder, promptToClearMalformedNativeProjectsAsync } from './clearNativeFolder';\nimport { configureProjectAsync } from './configureProjectAsync';\nimport { ensureConfigAsync } from './ensureConfigAsync';\nimport { assertPlatforms, ensureValidPlatforms, resolveTemplateOption } from './resolveOptions';\nimport { updateFromTemplateAsync } from './updateFromTemplate';\n\nconst debug = require('debug')('expo:prebuild') as typeof console.log;\n\nexport type PrebuildResults = {\n /** Expo config. */\n exp: ExpoConfig;\n /** Indicates if the process created new files. */\n hasNewProjectFiles: boolean;\n /** The platforms that were prebuilt. */\n platforms: ModPlatform[];\n /** Indicates if pod install was run. */\n podInstall: boolean;\n /** Indicates if node modules were installed. */\n nodeInstall: boolean;\n};\n\n/**\n * Entry point into the prebuild process, delegates to other helpers to perform various steps.\n *\n * 0. Attempt to clean the project folders.\n * 1. Create native projects (ios, android).\n * 2. Install node modules.\n * 3. Apply config to native projects.\n * 4. Install CocoaPods.\n */\nexport async function prebuildAsync(\n projectRoot: string,\n options: {\n /** Should install node modules and cocoapods. */\n install?: boolean;\n /** List of platforms to prebuild. */\n platforms: ModPlatform[];\n /** Should delete the native folders before attempting to prebuild. */\n clean?: boolean;\n /** URL or file path to the prebuild template. */\n template?: string;\n /** Name of the node package manager to install with. */\n packageManager?: {\n npm?: boolean;\n yarn?: boolean;\n pnpm?: boolean;\n };\n /** List of node modules to skip updating. */\n skipDependencyUpdate?: string[];\n }\n): Promise<PrebuildResults | null> {\n if (options.clean) {\n const { maybeBailOnGitStatusAsync } = await import('../utils/git');\n // Clean the project folders...\n if (await maybeBailOnGitStatusAsync()) {\n return null;\n }\n // Clear the native folders before syncing\n await clearNativeFolder(projectRoot, options.platforms);\n } else {\n // Check if the existing project folders are malformed.\n await promptToClearMalformedNativeProjectsAsync(projectRoot, options.platforms);\n }\n\n // Warn if the project is attempting to prebuild an unsupported platform (iOS on Windows).\n options.platforms = ensureValidPlatforms(options.platforms);\n // Assert if no platforms are left over after filtering.\n assertPlatforms(options.platforms);\n\n // Get the Expo config, create it if missing.\n const { exp, pkg } = await ensureConfigAsync(projectRoot, { platforms: options.platforms });\n\n // Create native projects from template.\n const { hasNewProjectFiles, needsPodInstall, hasNewDependencies } = await updateFromTemplateAsync(\n projectRoot,\n {\n exp,\n pkg,\n template: options.template != null ? resolveTemplateOption(options.template) : undefined,\n platforms: options.platforms,\n skipDependencyUpdate: options.skipDependencyUpdate,\n }\n );\n\n // Install node modules\n if (options.install) {\n if (hasNewDependencies && options.packageManager?.npm) {\n await clearNodeModulesAsync(projectRoot);\n }\n\n await installAsync([], {\n ...options.packageManager,\n silent: !(env.EXPO_DEBUG || env.CI),\n });\n }\n\n // Apply Expo config to native projects\n const configSyncingStep = logNewSection('Config syncing');\n try {\n await profile(configureProjectAsync)(projectRoot, {\n platforms: options.platforms,\n });\n configSyncingStep.succeed('Config synced');\n } catch (error) {\n configSyncingStep.fail('Config sync failed');\n throw error;\n }\n\n // Install CocoaPods\n let podsInstalled: boolean = false;\n // err towards running pod install less because it's slow and users can easily run npx pod-install afterwards.\n if (options.platforms.includes('ios') && options.install && needsPodInstall) {\n const { installCocoaPodsAsync } = await import('../utils/cocoapods');\n\n podsInstalled = await installCocoaPodsAsync(projectRoot);\n } else {\n debug('Skipped pod install');\n }\n\n return {\n nodeInstall: !!options.install,\n podInstall: !podsInstalled,\n platforms: options.platforms,\n hasNewProjectFiles,\n exp,\n };\n}\n"],"names":["prebuildAsync","debug","require","projectRoot","options","clean","maybeBailOnGitStatusAsync","clearNativeFolder","platforms","promptToClearMalformedNativeProjectsAsync","ensureValidPlatforms","assertPlatforms","exp","pkg","ensureConfigAsync","hasNewProjectFiles","needsPodInstall","hasNewDependencies","updateFromTemplateAsync","template","resolveTemplateOption","undefined","skipDependencyUpdate","install","packageManager","npm","clearNodeModulesAsync","installAsync","silent","env","EXPO_DEBUG","CI","configSyncingStep","logNewSection","profile","configureProjectAsync","succeed","error","fail","podsInstalled","includes","installCocoaPodsAsync","nodeInstall","podInstall"],"mappings":"AAAA;;;;QAsCsBA,aAAa,GAAbA,aAAa;AAnCN,IAAA,aAAyB,WAAzB,yBAAyB,CAAA;AAClC,IAAA,IAAc,WAAd,cAAc,CAAA;AACI,IAAA,YAAsB,WAAtB,sBAAsB,CAAA;AAC9B,IAAA,IAAc,WAAd,cAAc,CAAA;AACpB,IAAA,QAAkB,WAAlB,kBAAkB,CAAA;AACmC,IAAA,kBAAqB,WAArB,qBAAqB,CAAA;AAC5D,IAAA,sBAAyB,WAAzB,yBAAyB,CAAA;AAC7B,IAAA,kBAAqB,WAArB,qBAAqB,CAAA;AACsB,IAAA,eAAkB,WAAlB,kBAAkB,CAAA;AACvD,IAAA,mBAAsB,WAAtB,sBAAsB,CAAA;;;;;;;;;;;;;;;;;;;;;;AAE9D,MAAMC,KAAK,GAAGC,OAAO,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC,AAAsB,AAAC;AAwB/D,eAAeF,aAAa,CACjCG,WAAmB,EACnBC,OAiBC,EACgC;IACjC,IAAIA,OAAO,CAACC,KAAK,EAAE;QACjB,MAAM,EAAEC,yBAAyB,CAAA,EAAE,GAAG,MAAM;mDAAO,cAAc;UAAC,AAAC;QACnE,+BAA+B;QAC/B,IAAI,MAAMA,yBAAyB,EAAE,EAAE;YACrC,OAAO,IAAI,CAAC;SACb;QACD,0CAA0C;QAC1C,MAAMC,C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C9B;IAED,OAAO;QACLyC,WAAW,EAAE,CAAC,CAACtC,OAAO,CAACmB,OAAO;QAC9BoB,UAAU,EAAE,CAACJ,aAAa;QAC1B/B,SAAS,EAAEJ,OAAO,CAACI,SAAS;QAC5BO,kBAAkB;QAClBH,GAAG;KACJ,CAAC;CACH"}
|
|
@@ -92,9 +92,9 @@ class ExternalModule {
|
|
|
92
92
|
const packageManager = shouldGloballyInstall ? new PackageManager.NpmPackageManager({
|
|
93
93
|
cwd: this.projectRoot,
|
|
94
94
|
log: Log.log,
|
|
95
|
-
silent: !_env.env.EXPO_DEBUG
|
|
95
|
+
silent: !(_env.env.EXPO_DEBUG || _env.env.CI)
|
|
96
96
|
}) : PackageManager.createForProject(this.projectRoot, {
|
|
97
|
-
silent: !_env.env.EXPO_DEBUG
|
|
97
|
+
silent: !(_env.env.EXPO_DEBUG || _env.env.CI)
|
|
98
98
|
});
|
|
99
99
|
try {
|
|
100
100
|
if (shouldGloballyInstall) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/start/doctor/ngrok/ExternalModule.ts"],"sourcesContent":["import * as PackageManager from '@expo/package-manager';\nimport requireGlobal from 'requireg';\nimport resolveFrom from 'resolve-from';\nimport semver from 'semver';\n\nimport * as Log from '../../../log';\nimport { delayAsync } from '../../../utils/delay';\nimport { env } from '../../../utils/env';\nimport { CommandError } from '../../../utils/errors';\nimport { confirmAsync } from '../../../utils/prompts';\n\nconst debug = require('debug')('expo:doctor:externalModule') as typeof console.log;\n\n/** An error that is thrown when a package is installed but doesn't meet the version criteria. */\nexport class ExternalModuleVersionError extends CommandError {\n constructor(message: string, public readonly shouldGloballyInstall: boolean) {\n super('EXTERNAL_MODULE_VERSION', message);\n }\n}\n\ninterface PromptOptions {\n /** Should prompt the user to install, when false the module will just assert on missing packages, default `true`. Ignored when `autoInstall` is true. */\n shouldPrompt?: boolean;\n /** Should automatically install the package without prompting, default `false` */\n autoInstall?: boolean;\n}\n\nexport interface InstallPromptOptions extends PromptOptions {\n /** Should install the package globally, default `false` */\n shouldGloballyInstall?: boolean;\n}\n\nexport interface ResolvePromptOptions extends PromptOptions {\n /**\n * Prefer to install the package globally, this can be overridden if the function\n * detects that a locally installed package simply needs an upgrade, default `false`\n */\n prefersGlobalInstall?: boolean;\n}\n\n/** Resolves a local or globally installed package, prompts to install if missing. */\nexport class ExternalModule<TModule> {\n private instance: TModule | null = null;\n\n constructor(\n /** Project root for checking if the package is installed locally. */\n private projectRoot: string,\n /** Info on the external package. */\n private pkg: {\n /** NPM package name. */\n name: string;\n /** Required semver range, ex: `^1.0.0`. */\n versionRange: string;\n },\n /** A function used to create the installation prompt message. */\n private promptMessage: (pkgName: string) => string\n ) {}\n\n /** Resolve the globally or locally installed instance, or prompt to install. */\n async resolveAsync({\n prefersGlobalInstall,\n ...options\n }: ResolvePromptOptions = {}): Promise<TModule> {\n try {\n return (\n this.getVersioned() ??\n this.installAsync({\n ...options,\n shouldGloballyInstall: prefersGlobalInstall,\n })\n );\n } catch (error: any) {\n if (error instanceof ExternalModuleVersionError) {\n // If the module version in not compliant with the version range,\n // we should prompt the user to install the package where it already exists.\n return this.installAsync({\n ...options,\n shouldGloballyInstall: error.shouldGloballyInstall ?? prefersGlobalInstall,\n });\n }\n throw error;\n }\n }\n\n /** Prompt the user to install the package and try again. */\n async installAsync({\n shouldPrompt = true,\n autoInstall,\n shouldGloballyInstall,\n }: InstallPromptOptions = {}): Promise<TModule> {\n const packageName = [this.pkg.name, this.pkg.versionRange].join('@');\n if (!autoInstall) {\n // Delay the prompt so it doesn't conflict with other dev tool logs\n await delayAsync(100);\n }\n const answer =\n autoInstall ||\n (shouldPrompt &&\n (await confirmAsync({\n message: this.promptMessage(packageName),\n initial: true,\n })));\n if (answer) {\n Log.log(`Installing ${packageName}...`);\n\n // Always use npm for global installs\n const packageManager = shouldGloballyInstall\n ? new PackageManager.NpmPackageManager({\n cwd: this.projectRoot,\n log: Log.log,\n silent: !env.EXPO_DEBUG,\n })\n : PackageManager.createForProject(this.projectRoot, {\n silent: !env.EXPO_DEBUG,\n });\n\n try {\n if (shouldGloballyInstall) {\n await packageManager.addGlobalAsync([packageName]);\n } else {\n await packageManager.addDevAsync([packageName]);\n }\n Log.log(`Installed ${packageName}`);\n } catch (error: any) {\n error.message = `Failed to install ${packageName} ${\n shouldGloballyInstall ? 'globally' : 'locally'\n }: ${error.message}`;\n throw error;\n }\n return await this.resolveAsync({ shouldPrompt: false });\n }\n\n throw new CommandError(\n 'EXTERNAL_MODULE_AVAILABILITY',\n `Please install ${packageName} and try again`\n );\n }\n\n /** Get the module. */\n get(): TModule | null {\n try {\n return this.getVersioned();\n } catch {\n return null;\n }\n }\n\n /** Get the module, throws if the module is not versioned correctly. */\n getVersioned(): TModule | null {\n this.instance ??= this._resolveModule(true) ?? this._resolveModule(false);\n return this.instance;\n }\n\n /** Exposed for testing. */\n _require(moduleId: string): any {\n return require(moduleId);\n }\n\n /** Resolve a copy that's installed in the project. Exposed for testing. */\n _resolveLocal(moduleId: string): string {\n return resolveFrom(this.projectRoot, moduleId);\n }\n\n /** Resolve a copy that's installed globally. Exposed for testing. */\n _resolveGlobal(moduleId: string): string {\n return requireGlobal.resolve(moduleId);\n }\n\n /** Resolve the module and verify the version. Exposed for testing. */\n _resolveModule(isLocal: boolean): TModule | null {\n const resolver = isLocal ? this._resolveLocal.bind(this) : this._resolveGlobal.bind(this);\n try {\n const packageJsonPath = resolver(`${this.pkg.name}/package.json`);\n const packageJson = this._require(packageJsonPath);\n if (packageJson) {\n if (semver.satisfies(packageJson.version, this.pkg.versionRange)) {\n const modulePath = resolver(this.pkg.name);\n const requiredModule = this._require(modulePath);\n if (requiredModule == null) {\n throw new CommandError(\n 'EXTERNAL_MODULE_EXPORT',\n `${this.pkg.name} exports a nullish value, which is not allowed.`\n );\n }\n return requiredModule;\n }\n throw new ExternalModuleVersionError(\n `Required module '${this.pkg.name}@${packageJson.version}' does not satisfy ${this.pkg.versionRange}. Installed at: ${packageJsonPath}`,\n !isLocal\n );\n }\n } catch (error: any) {\n if (error instanceof CommandError) {\n throw error;\n } else if (error.code !== 'MODULE_NOT_FOUND') {\n debug('Failed to resolve module', error.message);\n }\n }\n return null;\n }\n}\n"],"names":["PackageManager","Log","debug","require","ExternalModuleVersionError","CommandError","constructor","message","shouldGloballyInstall","ExternalModule","projectRoot","pkg","promptMessage","instance","resolveAsync","prefersGlobalInstall","options","getVersioned","installAsync","error","shouldPrompt","autoInstall","packageName","name","versionRange","join","delayAsync","answer","confirmAsync","initial","log","packageManager","NpmPackageManager","cwd","silent","env","EXPO_DEBUG","createForProject","addGlobalAsync","addDevAsync","get","_resolveModule","_require","moduleId","_resolveLocal","resolveFrom","_resolveGlobal","requireGlobal","resolve","isLocal","resolver","bind","packageJsonPath","packageJson","semver","satisfies","version","modulePath","requiredModule","code"],"mappings":"AAAA;;;;AAAYA,IAAAA,cAAc,mCAAM,uBAAuB,EAA7B;AACA,IAAA,SAAU,kCAAV,UAAU,EAAA;AACZ,IAAA,YAAc,kCAAd,cAAc,EAAA;AACnB,IAAA,OAAQ,kCAAR,QAAQ,EAAA;AAEfC,IAAAA,GAAG,mCAAM,cAAc,EAApB;AACY,IAAA,MAAsB,WAAtB,sBAAsB,CAAA;AAC7B,IAAA,IAAoB,WAApB,oBAAoB,CAAA;AACX,IAAA,OAAuB,WAAvB,uBAAuB,CAAA;AACvB,IAAA,QAAwB,WAAxB,wBAAwB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4IjD,IAAI;AA1IR,MAAMC,KAAK,GAAGC,OAAO,CAAC,OAAO,CAAC,CAAC,4BAA4B,CAAC,AAAsB,AAAC;AAG5E,MAAMC,0BAA0B,SAASC,OAAY,aAAA;IAC1DC,YAAYC,OAAe,EAAkBC,qBAA8B,CAAE;QAC3E,KAAK,CAAC,yBAAyB,EAAED,OAAO,CAAC,CAAC;aADCC,qBAA8B,GAA9BA,qBAA8B;KAE1E;CACF;QAJYJ,0BAA0B,GAA1BA,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c,GAAdA,cAAc"}
|
|
1
|
+
{"version":3,"sources":["../../../../../src/start/doctor/ngrok/ExternalModule.ts"],"sourcesContent":["import * as PackageManager from '@expo/package-manager';\nimport requireGlobal from 'requireg';\nimport resolveFrom from 'resolve-from';\nimport semver from 'semver';\n\nimport * as Log from '../../../log';\nimport { delayAsync } from '../../../utils/delay';\nimport { env } from '../../../utils/env';\nimport { CommandError } from '../../../utils/errors';\nimport { confirmAsync } from '../../../utils/prompts';\n\nconst debug = require('debug')('expo:doctor:externalModule') as typeof console.log;\n\n/** An error that is thrown when a package is installed but doesn't meet the version criteria. */\nexport class ExternalModuleVersionError extends CommandError {\n constructor(message: string, public readonly shouldGloballyInstall: boolean) {\n super('EXTERNAL_MODULE_VERSION', message);\n }\n}\n\ninterface PromptOptions {\n /** Should prompt the user to install, when false the module will just assert on missing packages, default `true`. Ignored when `autoInstall` is true. */\n shouldPrompt?: boolean;\n /** Should automatically install the package without prompting, default `false` */\n autoInstall?: boolean;\n}\n\nexport interface InstallPromptOptions extends PromptOptions {\n /** Should install the package globally, default `false` */\n shouldGloballyInstall?: boolean;\n}\n\nexport interface ResolvePromptOptions extends PromptOptions {\n /**\n * Prefer to install the package globally, this can be overridden if the function\n * detects that a locally installed package simply needs an upgrade, default `false`\n */\n prefersGlobalInstall?: boolean;\n}\n\n/** Resolves a local or globally installed package, prompts to install if missing. */\nexport class ExternalModule<TModule> {\n private instance: TModule | null = null;\n\n constructor(\n /** Project root for checking if the package is installed locally. */\n private projectRoot: string,\n /** Info on the external package. */\n private pkg: {\n /** NPM package name. */\n name: string;\n /** Required semver range, ex: `^1.0.0`. */\n versionRange: string;\n },\n /** A function used to create the installation prompt message. */\n private promptMessage: (pkgName: string) => string\n ) {}\n\n /** Resolve the globally or locally installed instance, or prompt to install. */\n async resolveAsync({\n prefersGlobalInstall,\n ...options\n }: ResolvePromptOptions = {}): Promise<TModule> {\n try {\n return (\n this.getVersioned() ??\n this.installAsync({\n ...options,\n shouldGloballyInstall: prefersGlobalInstall,\n })\n );\n } catch (error: any) {\n if (error instanceof ExternalModuleVersionError) {\n // If the module version in not compliant with the version range,\n // we should prompt the user to install the package where it already exists.\n return this.installAsync({\n ...options,\n shouldGloballyInstall: error.shouldGloballyInstall ?? prefersGlobalInstall,\n });\n }\n throw error;\n }\n }\n\n /** Prompt the user to install the package and try again. */\n async installAsync({\n shouldPrompt = true,\n autoInstall,\n shouldGloballyInstall,\n }: InstallPromptOptions = {}): Promise<TModule> {\n const packageName = [this.pkg.name, this.pkg.versionRange].join('@');\n if (!autoInstall) {\n // Delay the prompt so it doesn't conflict with other dev tool logs\n await delayAsync(100);\n }\n const answer =\n autoInstall ||\n (shouldPrompt &&\n (await confirmAsync({\n message: this.promptMessage(packageName),\n initial: true,\n })));\n if (answer) {\n Log.log(`Installing ${packageName}...`);\n\n // Always use npm for global installs\n const packageManager = shouldGloballyInstall\n ? new PackageManager.NpmPackageManager({\n cwd: this.projectRoot,\n log: Log.log,\n silent: !(env.EXPO_DEBUG || env.CI),\n })\n : PackageManager.createForProject(this.projectRoot, {\n silent: !(env.EXPO_DEBUG || env.CI),\n });\n\n try {\n if (shouldGloballyInstall) {\n await packageManager.addGlobalAsync([packageName]);\n } else {\n await packageManager.addDevAsync([packageName]);\n }\n Log.log(`Installed ${packageName}`);\n } catch (error: any) {\n error.message = `Failed to install ${packageName} ${\n shouldGloballyInstall ? 'globally' : 'locally'\n }: ${error.message}`;\n throw error;\n }\n return await this.resolveAsync({ shouldPrompt: false });\n }\n\n throw new CommandError(\n 'EXTERNAL_MODULE_AVAILABILITY',\n `Please install ${packageName} and try again`\n );\n }\n\n /** Get the module. */\n get(): TModule | null {\n try {\n return this.getVersioned();\n } catch {\n return null;\n }\n }\n\n /** Get the module, throws if the module is not versioned correctly. */\n getVersioned(): TModule | null {\n this.instance ??= this._resolveModule(true) ?? this._resolveModule(false);\n return this.instance;\n }\n\n /** Exposed for testing. */\n _require(moduleId: string): any {\n return require(moduleId);\n }\n\n /** Resolve a copy that's installed in the project. Exposed for testing. */\n _resolveLocal(moduleId: string): string {\n return resolveFrom(this.projectRoot, moduleId);\n }\n\n /** Resolve a copy that's installed globally. Exposed for testing. */\n _resolveGlobal(moduleId: string): string {\n return requireGlobal.resolve(moduleId);\n }\n\n /** Resolve the module and verify the version. Exposed for testing. */\n _resolveModule(isLocal: boolean): TModule | null {\n const resolver = isLocal ? this._resolveLocal.bind(this) : this._resolveGlobal.bind(this);\n try {\n const packageJsonPath = resolver(`${this.pkg.name}/package.json`);\n const packageJson = this._require(packageJsonPath);\n if (packageJson) {\n if (semver.satisfies(packageJson.version, this.pkg.versionRange)) {\n const modulePath = resolver(this.pkg.name);\n const requiredModule = this._require(modulePath);\n if (requiredModule == null) {\n throw new CommandError(\n 'EXTERNAL_MODULE_EXPORT',\n `${this.pkg.name} exports a nullish value, which is not allowed.`\n );\n }\n return requiredModule;\n }\n throw new ExternalModuleVersionError(\n `Required module '${this.pkg.name}@${packageJson.version}' does not satisfy ${this.pkg.versionRange}. Installed at: ${packageJsonPath}`,\n !isLocal\n );\n }\n } catch (error: any) {\n if (error instanceof CommandError) {\n throw error;\n } else if (error.code !== 'MODULE_NOT_FOUND') {\n debug('Failed to resolve module', error.message);\n }\n }\n return null;\n }\n}\n"],"names":["PackageManager","Log","debug","require","ExternalModuleVersionError","CommandError","constructor","message","shouldGloballyInstall","ExternalModule","projectRoot","pkg","promptMessage","instance","resolveAsync","prefersGlobalInstall","options","getVersioned","installAsync","error","shouldPrompt","autoInstall","packageName","name","versionRange","join","delayAsync","answer","confirmAsync","initial","log","packageManager","NpmPackageManager","cwd","silent","env","EXPO_DEBUG","CI","createForProject","addGlobalAsync","addDevAsync","get","_resolveModule","_require","moduleId","_resolveLocal","resolveFrom","_resolveGlobal","requireGlobal","resolve","isLocal","resolver","bind","packageJsonPath","packageJson","semver","satisfies","version","modulePath","requiredModule","code"],"mappings":"AAAA;;;;AAAYA,IAAAA,cAAc,mCAAM,uBAAuB,EAA7B;AACA,IAA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c,IAAI,IAAI,EAAE;wBAC1B,MAAM,IAAItD,OAAY,aAAA,CACpB,wBAAwB,EACxB,CAAC,EAAE,IAAI,CAACM,GAAG,CAACY,IAAI,CAAC,+CAA+C,CAAC,CAClE,CAAC;qBACH;oBACD,OAAOoC,cAAc,CAAC;iBACvB;gBACD,MAAM,IAAIvD,0BAA0B,CAClC,CAAC,iBAAiB,EAAE,IAAI,CAACO,GAAG,CAACY,IAAI,CAAC,CAAC,EAAE+B,WAAW,CAACG,OAAO,CAAC,mBAAmB,EAAE,IAAI,CAAC9C,GAAG,CAACa,YAAY,CAAC,gBAAgB,EAAE6B,eAAe,CAAC,CAAC,EACvI,CAACH,OAAO,CACT,CAAC;aACH;SACF,CAAC,OAAO/B,KAAK,EAAO;YACnB,IAAIA,KAAK,YAAYd,OAAY,aAAA,EAAE;gBACjC,MAAMc,KAAK,CAAC;aACb,MAAM,IAAIA,KAAK,CAACyC,IAAI,KAAK,kBAAkB,EAAE;gBAC5C1D,KAAK,CAAC,0BAA0B,EAAEiB,KAAK,CAACZ,OAAO,CAAC,CAAC;aAClD;SACF;QACD,OAAO,IAAI,CAAC;KACb;CACF;QA/JYE,cAAc,GAAdA,cAAc"}
|
|
@@ -130,7 +130,7 @@ async function createHostInfoAsync() {
|
|
|
130
130
|
host: await _userSettings.default.getAnonymousIdentifierAsync(),
|
|
131
131
|
server: "expo",
|
|
132
132
|
// Defined in the build step
|
|
133
|
-
serverVersion: "0.7.
|
|
133
|
+
serverVersion: "0.7.3",
|
|
134
134
|
serverDriver: _manifestMiddleware.DEVELOPER_TOOL,
|
|
135
135
|
serverOS: _os.default.platform(),
|
|
136
136
|
serverOSVersion: _os.default.release()
|
|
@@ -94,7 +94,7 @@ async function logEventAsync(event, properties = {}) {
|
|
|
94
94
|
}
|
|
95
95
|
const { userId , deviceId } = identifyData;
|
|
96
96
|
const commonEventProperties = {
|
|
97
|
-
source_version: "0.7.
|
|
97
|
+
source_version: "0.7.3",
|
|
98
98
|
source: "expo"
|
|
99
99
|
};
|
|
100
100
|
const identity = {
|
|
@@ -135,7 +135,7 @@ function getContext() {
|
|
|
135
135
|
},
|
|
136
136
|
app: {
|
|
137
137
|
name: "expo",
|
|
138
|
-
version: "0.7.
|
|
138
|
+
version: "0.7.3"
|
|
139
139
|
},
|
|
140
140
|
ci: ciInfo.isCI ? {
|
|
141
141
|
name: ciInfo.name,
|
|
@@ -85,7 +85,7 @@ async function installCocoaPodsAsync(projectRoot) {
|
|
|
85
85
|
}
|
|
86
86
|
const packageManager = new PackageManager.CocoaPodsPackageManager({
|
|
87
87
|
cwd: _path.default.join(projectRoot, "ios"),
|
|
88
|
-
silent: !_env.env.EXPO_DEBUG
|
|
88
|
+
silent: !(_env.env.EXPO_DEBUG || _env.env.CI)
|
|
89
89
|
});
|
|
90
90
|
if (!await packageManager.isCLIInstalledAsync()) {
|
|
91
91
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/cocoapods.ts"],"sourcesContent":["import { getPackageJson, PackageJSONConfig } from '@expo/config';\nimport JsonFile from '@expo/json-file';\nimport * as PackageManager from '@expo/package-manager';\nimport chalk from 'chalk';\nimport fs from 'fs';\nimport path from 'path';\n\nimport * as Log from '../log';\nimport { hashForDependencyMap } from '../prebuild/updatePackageJson';\nimport { ensureDirectoryAsync } from './dir';\nimport { env } from './env';\nimport { AbortCommandError } from './errors';\nimport { logNewSection } from './ora';\n\ntype PackageChecksums = {\n /** checksum for the `package.json` dependency object. */\n dependencies: string;\n /** checksum for the `package.json` devDependency object. */\n devDependencies: string;\n};\n\nconst PROJECT_PREBUILD_SETTINGS = '.expo/prebuild';\nconst CACHED_PACKAGE_JSON = 'cached-packages.json';\n\nfunction getTempPrebuildFolder(projectRoot: string): string {\n return path.join(projectRoot, PROJECT_PREBUILD_SETTINGS);\n}\n\nfunction hasNewDependenciesSinceLastBuild(\n projectRoot: string,\n packageChecksums: PackageChecksums\n): boolean {\n // TODO: Maybe comparing lock files would be better...\n const templateDirectory = getTempPrebuildFolder(projectRoot);\n const tempPkgJsonPath = path.join(templateDirectory, CACHED_PACKAGE_JSON);\n if (!fs.existsSync(tempPkgJsonPath)) {\n return true;\n }\n const { dependencies, devDependencies } = JsonFile.read(tempPkgJsonPath);\n // Only change the dependencies if the normalized hash changes, this helps to reduce meaningless changes.\n const hasNewDependencies = packageChecksums.dependencies !== dependencies;\n const hasNewDevDependencies = packageChecksums.devDependencies !== devDependencies;\n\n return hasNewDependencies || hasNewDevDependencies;\n}\n\nfunction createPackageChecksums(pkg: PackageJSONConfig): PackageChecksums {\n return {\n dependencies: hashForDependencyMap(pkg.dependencies || {}),\n devDependencies: hashForDependencyMap(pkg.devDependencies || {}),\n };\n}\n\n/** @returns `true` if the package.json dependency hash does not match the cached hash from the last run. */\nexport async function hasPackageJsonDependencyListChangedAsync(\n projectRoot: string\n): Promise<boolean> {\n const pkg = getPackageJson(projectRoot);\n\n const packages = createPackageChecksums(pkg);\n const hasNewDependencies = hasNewDependenciesSinceLastBuild(projectRoot, packages);\n\n // Cache package.json\n await ensureDirectoryAsync(getTempPrebuildFolder(projectRoot));\n const templateDirectory = path.join(getTempPrebuildFolder(projectRoot), CACHED_PACKAGE_JSON);\n await JsonFile.writeAsync(templateDirectory, packages);\n\n return hasNewDependencies;\n}\n\nexport async function installCocoaPodsAsync(projectRoot: string): Promise<boolean> {\n let step = logNewSection('Installing CocoaPods...');\n if (process.platform !== 'darwin') {\n step.succeed('Skipped installing CocoaPods because operating system is not on macOS.');\n return false;\n }\n\n const packageManager = new PackageManager.CocoaPodsPackageManager({\n cwd: path.join(projectRoot, 'ios'),\n silent: !env.EXPO_DEBUG,\n });\n\n if (!(await packageManager.isCLIInstalledAsync())) {\n try {\n // prompt user -- do you want to install cocoapods right now?\n step.text = 'CocoaPods CLI not found in your PATH, installing it now.';\n step.stopAndPersist();\n await PackageManager.CocoaPodsPackageManager.installCLIAsync({\n nonInteractive: true,\n spawnOptions: {\n ...packageManager.options,\n // Don't silence this part\n stdio: ['inherit', 'inherit', 'pipe'],\n },\n });\n step.succeed('Installed CocoaPods CLI.');\n step = logNewSection('Running `pod install` in the `ios` directory.');\n } catch (error: any) {\n step.stopAndPersist({\n symbol: '⚠️ ',\n text: chalk.red('Unable to install the CocoaPods CLI.'),\n });\n if (error instanceof PackageManager.CocoaPodsError) {\n Log.log(error.message);\n } else {\n Log.log(`Unknown error: ${error.message}`);\n }\n return false;\n }\n }\n\n try {\n await packageManager.installAsync({ spinner: step });\n // Create cached list for later\n await hasPackageJsonDependencyListChangedAsync(projectRoot).catch(() => null);\n step.succeed('Installed pods and initialized Xcode workspace.');\n return true;\n } catch (error: any) {\n step.stopAndPersist({\n symbol: '⚠️ ',\n text: chalk.red('Something went wrong running `pod install` in the `ios` directory.'),\n });\n if (error instanceof PackageManager.CocoaPodsError) {\n Log.log(error.message);\n } else {\n Log.log(`Unknown error: ${error.message}`);\n }\n return false;\n }\n}\n\nfunction doesProjectUseCocoaPods(projectRoot: string): boolean {\n return fs.existsSync(path.join(projectRoot, 'ios', 'Podfile'));\n}\n\nfunction isLockfileCreated(projectRoot: string): boolean {\n const podfileLockPath = path.join(projectRoot, 'ios', 'Podfile.lock');\n return fs.existsSync(podfileLockPath);\n}\n\nfunction isPodFolderCreated(projectRoot: string): boolean {\n const podFolderPath = path.join(projectRoot, 'ios', 'Pods');\n return fs.existsSync(podFolderPath);\n}\n\n// TODO: Same process but with app.config changes + default plugins.\n// This will ensure the user is prompted for extra setup.\nexport async function maybePromptToSyncPodsAsync(projectRoot: string) {\n if (!doesProjectUseCocoaPods(projectRoot)) {\n // Project does not use CocoaPods\n return;\n }\n if (!isLockfileCreated(projectRoot) || !isPodFolderCreated(projectRoot)) {\n if (!(await installCocoaPodsAsync(projectRoot))) {\n throw new AbortCommandError();\n }\n return;\n }\n\n // Getting autolinked packages can be heavy, optimize around checking every time.\n if (!(await hasPackageJsonDependencyListChangedAsync(projectRoot))) {\n return;\n }\n\n await promptToInstallPodsAsync(projectRoot, []);\n}\n\nasync function promptToInstallPodsAsync(projectRoot: string, missingPods?: string[]) {\n if (missingPods?.length) {\n Log.log(\n `Could not find the following native modules: ${missingPods\n .map((pod) => chalk.bold(pod))\n .join(', ')}. Did you forget to run \"${chalk.bold('pod install')}\" ?`\n );\n }\n\n try {\n if (!(await installCocoaPodsAsync(projectRoot))) {\n throw new AbortCommandError();\n }\n } catch (error) {\n await fs.promises.rm(path.join(getTempPrebuildFolder(projectRoot), CACHED_PACKAGE_JSON), {\n recursive: true,\n force: true,\n });\n throw error;\n }\n}\n"],"names":["hasPackageJsonDependencyListChangedAsync","installCocoaPodsAsync","maybePromptToSyncPodsAsync","PackageManager","Log","PROJECT_PREBUILD_SETTINGS","CACHED_PACKAGE_JSON","getTempPrebuildFolder","projectRoot","path","join","hasNewDependenciesSinceLastBuild","packageChecksums","templateDirectory","tempPkgJsonPath","fs","existsSync","dependencies","devDependencies","JsonFile","read","hasNewDependencies","hasNewDevDependencies","createPackageChecksums","pkg","hashForDependencyMap","getPackageJson","packages","ensureDirectoryAsync","writeAsync","step","logNewSection","process","platform","succeed","packageManager","CocoaPodsPackageManager","cwd","silent","env","EXPO_DEBUG","isCLIInstalledAsync","text","stopAndPersist","installCLIAsync","nonInteractive","spawnOptions","options","stdio","error","symbol","chalk","red","CocoaPodsError","log","message","installAsync","spinner","catch","doesProjectUseCocoaPods","isLockfileCreated","podfileLockPath","isPodFolderCreated","podFolderPath","AbortCommandError","promptToInstallPodsAsync","missingPods","length","map","pod","bold","promises","rm","recursive","force"],"mappings":"AAAA;;;;QAsDsBA,wCAAwC,GAAxCA,wCAAwC;QAgBxCC,qBAAqB,GAArBA,qBAAqB;QA6ErBC,0BAA0B,GAA1BA,0BAA0B;AAnJE,IAAA,OAAc,WAAd,cAAc,CAAA;AAC3C,IAAA,SAAiB,kCAAjB,iBAAiB,EAAA;AAC1BC,IAAAA,cAAc,mCAAM,uBAAuB,EAA7B;AACR,IAAA,MAAO,kCAAP,OAAO,EAA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ACZ,CAAC,CAAC;QACH,MAAMzB,KAAK,CAAC;KACb;CACF"}
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/cocoapods.ts"],"sourcesContent":["import { getPackageJson, PackageJSONConfig } from '@expo/config';\nimport JsonFile from '@expo/json-file';\nimport * as PackageManager from '@expo/package-manager';\nimport chalk from 'chalk';\nimport fs from 'fs';\nimport path from 'path';\n\nimport * as Log from '../log';\nimport { hashForDependencyMap } from '../prebuild/updatePackageJson';\nimport { ensureDirectoryAsync } from './dir';\nimport { env } from './env';\nimport { AbortCommandError } from './errors';\nimport { logNewSection } from './ora';\n\ntype PackageChecksums = {\n /** checksum for the `package.json` dependency object. */\n dependencies: string;\n /** checksum for the `package.json` devDependency object. */\n devDependencies: string;\n};\n\nconst PROJECT_PREBUILD_SETTINGS = '.expo/prebuild';\nconst CACHED_PACKAGE_JSON = 'cached-packages.json';\n\nfunction getTempPrebuildFolder(projectRoot: string): string {\n return path.join(projectRoot, PROJECT_PREBUILD_SETTINGS);\n}\n\nfunction hasNewDependenciesSinceLastBuild(\n projectRoot: string,\n packageChecksums: PackageChecksums\n): boolean {\n // TODO: Maybe comparing lock files would be better...\n const templateDirectory = getTempPrebuildFolder(projectRoot);\n const tempPkgJsonPath = path.join(templateDirectory, CACHED_PACKAGE_JSON);\n if (!fs.existsSync(tempPkgJsonPath)) {\n return true;\n }\n const { dependencies, devDependencies } = JsonFile.read(tempPkgJsonPath);\n // Only change the dependencies if the normalized hash changes, this helps to reduce meaningless changes.\n const hasNewDependencies = packageChecksums.dependencies !== dependencies;\n const hasNewDevDependencies = packageChecksums.devDependencies !== devDependencies;\n\n return hasNewDependencies || hasNewDevDependencies;\n}\n\nfunction createPackageChecksums(pkg: PackageJSONConfig): PackageChecksums {\n return {\n dependencies: hashForDependencyMap(pkg.dependencies || {}),\n devDependencies: hashForDependencyMap(pkg.devDependencies || {}),\n };\n}\n\n/** @returns `true` if the package.json dependency hash does not match the cached hash from the last run. */\nexport async function hasPackageJsonDependencyListChangedAsync(\n projectRoot: string\n): Promise<boolean> {\n const pkg = getPackageJson(projectRoot);\n\n const packages = createPackageChecksums(pkg);\n const hasNewDependencies = hasNewDependenciesSinceLastBuild(projectRoot, packages);\n\n // Cache package.json\n await ensureDirectoryAsync(getTempPrebuildFolder(projectRoot));\n const templateDirectory = path.join(getTempPrebuildFolder(projectRoot), CACHED_PACKAGE_JSON);\n await JsonFile.writeAsync(templateDirectory, packages);\n\n return hasNewDependencies;\n}\n\nexport async function installCocoaPodsAsync(projectRoot: string): Promise<boolean> {\n let step = logNewSection('Installing CocoaPods...');\n if (process.platform !== 'darwin') {\n step.succeed('Skipped installing CocoaPods because operating system is not on macOS.');\n return false;\n }\n\n const packageManager = new PackageManager.CocoaPodsPackageManager({\n cwd: path.join(projectRoot, 'ios'),\n silent: !(env.EXPO_DEBUG || env.CI),\n });\n\n if (!(await packageManager.isCLIInstalledAsync())) {\n try {\n // prompt user -- do you want to install cocoapods right now?\n step.text = 'CocoaPods CLI not found in your PATH, installing it now.';\n step.stopAndPersist();\n await PackageManager.CocoaPodsPackageManager.installCLIAsync({\n nonInteractive: true,\n spawnOptions: {\n ...packageManager.options,\n // Don't silence this part\n stdio: ['inherit', 'inherit', 'pipe'],\n },\n });\n step.succeed('Installed CocoaPods CLI.');\n step = logNewSection('Running `pod install` in the `ios` directory.');\n } catch (error: any) {\n step.stopAndPersist({\n symbol: '⚠️ ',\n text: chalk.red('Unable to install the CocoaPods CLI.'),\n });\n if (error instanceof PackageManager.CocoaPodsError) {\n Log.log(error.message);\n } else {\n Log.log(`Unknown error: ${error.message}`);\n }\n return false;\n }\n }\n\n try {\n await packageManager.installAsync({ spinner: step });\n // Create cached list for later\n await hasPackageJsonDependencyListChangedAsync(projectRoot).catch(() => null);\n step.succeed('Installed pods and initialized Xcode workspace.');\n return true;\n } catch (error: any) {\n step.stopAndPersist({\n symbol: '⚠️ ',\n text: chalk.red('Something went wrong running `pod install` in the `ios` directory.'),\n });\n if (error instanceof PackageManager.CocoaPodsError) {\n Log.log(error.message);\n } else {\n Log.log(`Unknown error: ${error.message}`);\n }\n return false;\n }\n}\n\nfunction doesProjectUseCocoaPods(projectRoot: string): boolean {\n return fs.existsSync(path.join(projectRoot, 'ios', 'Podfile'));\n}\n\nfunction isLockfileCreated(projectRoot: string): boolean {\n const podfileLockPath = path.join(projectRoot, 'ios', 'Podfile.lock');\n return fs.existsSync(podfileLockPath);\n}\n\nfunction isPodFolderCreated(projectRoot: string): boolean {\n const podFolderPath = path.join(projectRoot, 'ios', 'Pods');\n return fs.existsSync(podFolderPath);\n}\n\n// TODO: Same process but with app.config changes + default plugins.\n// This will ensure the user is prompted for extra setup.\nexport async function maybePromptToSyncPodsAsync(projectRoot: string) {\n if (!doesProjectUseCocoaPods(projectRoot)) {\n // Project does not use CocoaPods\n return;\n }\n if (!isLockfileCreated(projectRoot) || !isPodFolderCreated(projectRoot)) {\n if (!(await installCocoaPodsAsync(projectRoot))) {\n throw new AbortCommandError();\n }\n return;\n }\n\n // Getting autolinked packages can be heavy, optimize around checking every time.\n if (!(await hasPackageJsonDependencyListChangedAsync(projectRoot))) {\n return;\n }\n\n await promptToInstallPodsAsync(projectRoot, []);\n}\n\nasync function promptToInstallPodsAsync(projectRoot: string, missingPods?: string[]) {\n if (missingPods?.length) {\n Log.log(\n `Could not find the following native modules: ${missingPods\n .map((pod) => chalk.bold(pod))\n .join(', ')}. Did you forget to run \"${chalk.bold('pod install')}\" ?`\n );\n }\n\n try {\n if (!(await installCocoaPodsAsync(projectRoot))) {\n throw new AbortCommandError();\n }\n } catch (error) {\n await fs.promises.rm(path.join(getTempPrebuildFolder(projectRoot), CACHED_PACKAGE_JSON), {\n recursive: true,\n force: true,\n });\n throw error;\n }\n}\n"],"names":["hasPackageJsonDependencyListChangedAsync","installCocoaPodsAsync","maybePromptToSyncPodsAsync","PackageManager","Log","PROJECT_PREBUILD_SETTINGS","CACHED_PACKAGE_JSON","getTempPrebuildFolder","projectRoot","path","join","hasNewDependenciesSinceLastBuild","packageChecksums","templateDirectory","tempPkgJsonPath","fs","existsSync","dependencies","devDependencies","JsonFile","read","hasNewDependencies","hasNewDevDependencies","createPackageChecksums","pkg","hashForDependencyMap","getPackageJson","packages","ensureDirectoryAsync","writeAsync","step","logNewSection","process","platform","succeed","packageManager","CocoaPodsPackageManager","cwd","silent","env","EXPO_DEBUG","CI","isCLIInstalledAsync","text","stopAndPersist","installCLIAsync","nonInteractive","spawnOptions","options","stdio","error","symbol","chalk","red","CocoaPodsError","log","message","installAsync","spinner","catch","doesProjectUseCocoaPods","isLockfileCreated","podfileLockPath","isPodFolderCreated","podFolderPath","AbortCommandError","promptToInstallPodsAsync","missingPods","length","map","pod","bold","promises","rm","recursive","force"],"mappings":"AAAA;;;;QAsDsBA,wCAAwC,GAAxCA,wCAAwC;QAgBxCC,qBAAqB,GAArBA,qBAAqB;QA6ErBC,0BAA0B,GAA1BA,0BAA0B;AAnJE,IAAA,OAAc,WAAd,cAAc,CAAA;AAC3C,IAAA,SAAiB,kCAAjB,iBAAiB,EAAA;AAC1BC,IAAAA,cAAc,mCAAM,uBAAuB,EAA7B;AACR,IAAA,MAAO,kCAAP,OAAO,EAAA;AACV,IAAA,GAAI,kCAAJ,IAAI,EAAA;AACF,IAAA,KAAM,kCAAN,MAAM,EAAA;AAEXC,IAAAA,GAAG,mCAAM,QAAQ,EAAd;AACsB,IAAA,kBAA+B,WAA/B,+BAA+B,CAAA;AAC/B,IAAA,IAAO,WAAP,OAAO,CAAA;AACxB,IAAA,IAAO,WAAP,OAAO,CAAA;AACO,IAAA,OAAU,WAAV,UAAU,CAAA;AACd,IAAA,IAAO,WAAP,OAAO,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AASrC,MAAMC,yBAAyB,GAAG,gBAAgB,AAAC;AACnD,MAAMC,mBAAmB,GAAG,sBAAsB,AAAC;AAEnD,SAASC,qBAAqB,CAACC,WAAmB,EAAU;IAC1D,OAAOC,KAAI,QAAA,CAACC,IAAI,CAACF,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wBAAwB,CAAC1D,WAAmB,EAAE2D,WAAsB,EAAE;IACnF,IAAIA,WAAW,QAAQ,GAAnBA,KAAAA,CAAmB,GAAnBA,WAAW,CAAEC,MAAM,EAAE;QACvBhE,GAAG,CAACmD,GAAG,CACL,CAAC,6CAA6C,EAAEY,WAAW,CACxDE,GAAG,CAAC,CAACC,GAAG,GAAKlB,MAAK,QAAA,CAACmB,IAAI,CAACD,GAAG,CAAC;QAAA,CAAC,CAC7B5D,IAAI,CAAC,IAAI,CAAC,CAAC,yBAAyB,EAAE0C,MAAK,QAAA,CAACmB,IAAI,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,CACxE,CAAC;KACH;IAED,IAAI;QACF,IAAI,CAAE,MAAMtE,qBAAqB,CAACO,WAAW,CAAC,AAAC,EAAE;YAC/C,MAAM,IAAIyD,OAAiB,kBAAA,EAAE,CAAC;SAC/B;KACF,CAAC,OAAOf,KAAK,EAAE;QACd,MAAMnC,GAAE,QAAA,CAACyD,QAAQ,CAACC,EAAE,CAAChE,KAAI,QAAA,CAACC,IAAI,CAACH,qBAAqB,CAACC,WAAW,CAAC,EAAEF,mBAAmB,CAAC,EAAE;YACvFoE,SAAS,EAAE,IAAI;YACfC,KAAK,EAAE,IAAI;SACZ,CAAC,CAAC;QACH,MAAMzB,KAAK,CAAC;KACb;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/downloadExpoGoAsync.ts"],"sourcesContent":["import { getExpoHomeDirectory } from '@expo/config/build/getUserState';\nimport path from 'path';\nimport ProgressBar from 'progress';\nimport { gt } from 'semver';\n\nimport { getVersionsAsync, SDKVersion } from '../api/getVersions';\nimport { Log } from '../log';\nimport { downloadAppAsync } from './downloadAppAsync';\nimport { CommandError } from './errors';\nimport { ora } from './ora';\nimport { profile } from './profile';\nimport { createProgressBar } from './progress';\n\nconst debug = require('debug')('expo:utils:downloadExpoGo') as typeof console.log;\n\nconst platformSettings: Record<\n string,\n {\n shouldExtractResults: boolean;\n versionsKey: keyof SDKVersion;\n getFilePath: (filename: string) => string;\n }\n> = {\n ios: {\n versionsKey: 'iosClientUrl',\n getFilePath: (filename) =>\n path.join(getExpoHomeDirectory(), 'ios-simulator-app-cache', `${filename}.app`),\n shouldExtractResults: true,\n },\n android: {\n versionsKey: 'androidClientUrl',\n getFilePath: (filename) =>\n path.join(getExpoHomeDirectory(), 'android-apk-cache', `${filename}.apk`),\n shouldExtractResults: false,\n },\n};\n\n/**\n * @internal exposed for testing.\n * @returns the matching `SDKVersion` object from the Expo API.\n */\nexport async function getExpoGoVersionEntryAsync(sdkVersion: string): Promise<SDKVersion> {\n const { sdkVersions: versions } = await getVersionsAsync();\n let version: SDKVersion;\n\n if (sdkVersion.toUpperCase() === 'UNVERSIONED') {\n // find the latest version\n const latestVersionKey = Object.keys(versions).reduce((a, b) => {\n if (gt(b, a)) {\n return b;\n }\n return a;\n }, '0.0.0');\n\n Log.warn(\n `Downloading the latest Expo Go client (${latestVersionKey}). This will not fully conform to UNVERSIONED.`\n );\n version = versions[latestVersionKey];\n } else {\n version = versions[sdkVersion];\n }\n\n if (!version) {\n throw new CommandError(`Unable to find a version of Expo Go for SDK ${sdkVersion}`);\n }\n return version;\n}\n\n/** Download the Expo Go app from the Expo servers (if only it was this easy for every app). */\nexport async function downloadExpoGoAsync(\n platform: keyof typeof platformSettings,\n {\n url,\n sdkVersion,\n }: {\n url?: string;\n sdkVersion?: string;\n }\n): Promise<string> {\n const { getFilePath, versionsKey, shouldExtractResults } = platformSettings[platform];\n\n const spinner = ora({ text: 'Fetching Expo Go', color: 'white' }).start();\n\n let bar: ProgressBar | null = null;\n\n try {\n if (!url) {\n if (!sdkVersion) {\n throw new CommandError(\n `Unable to determine which Expo Go version to install (platform: ${platform})`\n );\n }\n\n const version = await getExpoGoVersionEntryAsync(sdkVersion);\n\n debug(`Installing Expo Go version for SDK ${sdkVersion} at URL: ${version[versionsKey]}`);\n url = version[versionsKey] as string;\n }\n } catch (error) {\n spinner.fail();\n throw error;\n }\n\n const filename = path.parse(url).name;\n\n try {\n const outputPath = getFilePath(filename);\n debug(`Downloading Expo Go from \"${url}\" to \"${outputPath}\".`);\n debug(\n `The requested copy of Expo Go might already be cached in: \"${getExpoHomeDirectory()}\". You can disable the cache with EXPO_NO_CACHE=1`\n );\n await profile(downloadAppAsync)({\n url,\n // Save all encrypted cache data to `~/.expo/expo-go`\n cacheDirectory: 'expo-go',\n outputPath,\n extract: shouldExtractResults,\n onProgress({ progress, total }) {\n if (progress && total) {\n if (!bar) {\n if (spinner.isSpinning) {\n spinner.stop();\n }\n bar = createProgressBar('Downloading the Expo Go app [:bar] :percent :etas', {\n width: 64,\n total: 100,\n // clear: true,\n complete: '=',\n incomplete: ' ',\n });\n }\n
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/downloadExpoGoAsync.ts"],"sourcesContent":["import { getExpoHomeDirectory } from '@expo/config/build/getUserState';\nimport path from 'path';\nimport ProgressBar from 'progress';\nimport { gt } from 'semver';\n\nimport { getVersionsAsync, SDKVersion } from '../api/getVersions';\nimport { Log } from '../log';\nimport { downloadAppAsync } from './downloadAppAsync';\nimport { CommandError } from './errors';\nimport { ora } from './ora';\nimport { profile } from './profile';\nimport { createProgressBar } from './progress';\n\nconst debug = require('debug')('expo:utils:downloadExpoGo') as typeof console.log;\n\nconst platformSettings: Record<\n string,\n {\n shouldExtractResults: boolean;\n versionsKey: keyof SDKVersion;\n getFilePath: (filename: string) => string;\n }\n> = {\n ios: {\n versionsKey: 'iosClientUrl',\n getFilePath: (filename) =>\n path.join(getExpoHomeDirectory(), 'ios-simulator-app-cache', `${filename}.app`),\n shouldExtractResults: true,\n },\n android: {\n versionsKey: 'androidClientUrl',\n getFilePath: (filename) =>\n path.join(getExpoHomeDirectory(), 'android-apk-cache', `${filename}.apk`),\n shouldExtractResults: false,\n },\n};\n\n/**\n * @internal exposed for testing.\n * @returns the matching `SDKVersion` object from the Expo API.\n */\nexport async function getExpoGoVersionEntryAsync(sdkVersion: string): Promise<SDKVersion> {\n const { sdkVersions: versions } = await getVersionsAsync();\n let version: SDKVersion;\n\n if (sdkVersion.toUpperCase() === 'UNVERSIONED') {\n // find the latest version\n const latestVersionKey = Object.keys(versions).reduce((a, b) => {\n if (gt(b, a)) {\n return b;\n }\n return a;\n }, '0.0.0');\n\n Log.warn(\n `Downloading the latest Expo Go client (${latestVersionKey}). This will not fully conform to UNVERSIONED.`\n );\n version = versions[latestVersionKey];\n } else {\n version = versions[sdkVersion];\n }\n\n if (!version) {\n throw new CommandError(`Unable to find a version of Expo Go for SDK ${sdkVersion}`);\n }\n return version;\n}\n\n/** Download the Expo Go app from the Expo servers (if only it was this easy for every app). */\nexport async function downloadExpoGoAsync(\n platform: keyof typeof platformSettings,\n {\n url,\n sdkVersion,\n }: {\n url?: string;\n sdkVersion?: string;\n }\n): Promise<string> {\n const { getFilePath, versionsKey, shouldExtractResults } = platformSettings[platform];\n\n const spinner = ora({ text: 'Fetching Expo Go', color: 'white' }).start();\n\n let bar: ProgressBar | null = null;\n\n try {\n if (!url) {\n if (!sdkVersion) {\n throw new CommandError(\n `Unable to determine which Expo Go version to install (platform: ${platform})`\n );\n }\n\n const version = await getExpoGoVersionEntryAsync(sdkVersion);\n\n debug(`Installing Expo Go version for SDK ${sdkVersion} at URL: ${version[versionsKey]}`);\n url = version[versionsKey] as string;\n }\n } catch (error) {\n spinner.fail();\n throw error;\n }\n\n const filename = path.parse(url).name;\n\n try {\n const outputPath = getFilePath(filename);\n debug(`Downloading Expo Go from \"${url}\" to \"${outputPath}\".`);\n debug(\n `The requested copy of Expo Go might already be cached in: \"${getExpoHomeDirectory()}\". You can disable the cache with EXPO_NO_CACHE=1`\n );\n await profile(downloadAppAsync)({\n url,\n // Save all encrypted cache data to `~/.expo/expo-go`\n cacheDirectory: 'expo-go',\n outputPath,\n extract: shouldExtractResults,\n onProgress({ progress, total }) {\n if (progress && total) {\n if (!bar) {\n if (spinner.isSpinning) {\n spinner.stop();\n }\n bar = createProgressBar('Downloading the Expo Go app [:bar] :percent :etas', {\n width: 64,\n total: 100,\n // clear: true,\n complete: '=',\n incomplete: ' ',\n });\n } else {\n bar!.update(progress, total);\n }\n }\n },\n });\n return outputPath;\n } finally {\n spinner.stop();\n // @ts-expect-error\n bar?.terminate();\n }\n}\n"],"names":["getExpoGoVersionEntryAsync","downloadExpoGoAsync","debug","require","platformSettings","ios","versionsKey","getFilePath","filename","path","join","getExpoHomeDirectory","shouldExtractResults","android","sdkVersion","sdkVersions","versions","getVersionsAsync","version","toUpperCase","latestVersionKey","Object","keys","reduce","a","b","gt","Log","warn","CommandError","platform","url","spinner","ora","text","color","start","bar","error","fail","parse","name","outputPath","profile","downloadAppAsync","cacheDirectory","extract","onProgress","progress","total","isSpinning","stop","createProgressBar","width","complete","incomplete","update","terminate"],"mappings":"AAAA;;;;QAyCsBA,0BAA0B,GAA1BA,0BAA0B;QA4B1BC,mBAAmB,GAAnBA,mBAAmB;AArEJ,IAAA,aAAiC,WAAjC,iCAAiC,CAAA;AACrD,IAAA,KAAM,kCAAN,MAAM,EAAA;AAEJ,IAAA,OAAQ,WAAR,QAAQ,CAAA;AAEkB,IAAA,YAAoB,WAApB,oBAAoB,CAAA;AAC7C,IAAA,IAAQ,WAAR,QAAQ,CAAA;AACK,IAAA,iBAAoB,WAApB,oBAAoB,CAAA;AACxB,IAAA,OAAU,WAAV,UAAU,CAAA;AACnB,IAAA,IAAO,WAAP,OAAO,CAAA;AACH,IAAA,QAAW,WAAX,WAAW,CAAA;AACD,IAAA,SAAY,WAAZ,YAAY,CAAA;;;;;;AAE9C,MAAMC,KAAK,GAAGC,OAAO,CAAC,OAAO,CAAC,CAAC,2BAA2B,CAAC,AAAsB,AAAC;AAElF,MAAMC,gBAAgB,GAOlB;IACFC,GAAG,EAAE;QACHC,WAAW,EAAE,cAAc;QAC3BC,WAAW,EAAE,CAACC,QAAQ,GACpBC,KAAI,QAAA,CAACC,IAAI,CAACC,CAAAA,GAAAA,aAAoB,A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-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"description": "The Expo CLI",
|
|
5
5
|
"main": "build/bin/cli",
|
|
6
6
|
"bin": {
|
|
@@ -142,5 +142,5 @@
|
|
|
142
142
|
"structured-headers": "^0.4.1",
|
|
143
143
|
"taskr": "1.1.0"
|
|
144
144
|
},
|
|
145
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "144b251d648be0e6a251bc7eb6000c4adf577577"
|
|
146
146
|
}
|