expo-updates 0.28.1 → 0.28.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/android/build.gradle +2 -2
  3. package/build/ExpoUpdatesModule.types.js +1 -1
  4. package/build/ExpoUpdatesModule.types.js.map +1 -1
  5. package/build/Updates.js.map +1 -1
  6. package/build/UpdatesEmitter.d.ts.map +1 -1
  7. package/build/UpdatesEmitter.js.map +1 -1
  8. package/cli/build/assetsVerify.js +17 -7
  9. package/cli/build/assetsVerifyAsync.js +7 -8
  10. package/cli/build/cli.js +17 -7
  11. package/cli/build/configureCodeSigning.js +17 -7
  12. package/cli/build/configureCodeSigningAsync.js +1 -2
  13. package/cli/build/generateCodeSigning.js +17 -7
  14. package/cli/build/generateCodeSigningAsync.js +1 -2
  15. package/cli/build/generateFingerprint.js +17 -7
  16. package/cli/build/resolveRuntimeVersion.js +17 -7
  17. package/cli/build/syncConfigurationToNative.js +17 -7
  18. package/cli/build/syncConfigurationToNativeAsync.js +3 -4
  19. package/cli/build/utils/args.js +20 -11
  20. package/cli/build/utils/dir.js +1 -2
  21. package/cli/build/utils/errors.js +2 -2
  22. package/cli/build/utils/log.js +8 -9
  23. package/cli/build/utils/modifyConfigAsync.js +18 -9
  24. package/cli/build/utils/withConsoleDisabledAsync.js +1 -2
  25. package/package.json +6 -6
  26. package/utils/build/createFingerprintAsync.js +18 -9
  27. package/utils/build/createFingerprintForBuildAsync.js +1 -2
  28. package/utils/build/createManifestForBuildAsync.js +2 -3
  29. package/utils/build/filterPlatformAssetScales.js +1 -2
  30. package/utils/build/findUpProjectRoot.js +1 -2
  31. package/utils/build/resolveRuntimeVersionAsync.js +1 -2
  32. package/utils/build/vcs.js +1 -1
  33. package/utils/build/workflow.js +2 -3
package/CHANGELOG.md CHANGED
@@ -10,6 +10,10 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 0.28.2 — 2025-04-09
14
+
15
+ _This version does not introduce any user-facing changes._
16
+
13
17
  ## 0.28.1 — 2025-04-08
14
18
 
15
19
  _This version does not introduce any user-facing changes._
@@ -39,7 +39,7 @@ expoModule {
39
39
  }
40
40
 
41
41
  group = 'host.exp.exponent'
42
- version = '0.28.1'
42
+ version = '0.28.2'
43
43
 
44
44
  // Utility method to derive boolean values from the environment or from Java properties,
45
45
  // and return them as strings to be used in BuildConfig fields
@@ -82,7 +82,7 @@ android {
82
82
  namespace "expo.modules.updates"
83
83
  defaultConfig {
84
84
  versionCode 31
85
- versionName '0.28.1'
85
+ versionName '0.28.2'
86
86
  consumerProguardFiles("proguard-rules.pro")
87
87
  testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
88
88
 
@@ -1,2 +1,2 @@
1
- import { NativeModule } from 'expo-modules-core';
1
+ export {};
2
2
  //# sourceMappingURL=ExpoUpdatesModule.types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoUpdatesModule.types.js","sourceRoot":"","sources":["../src/ExpoUpdatesModule.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["import { NativeModule } from 'expo-modules-core';\n\nimport {\n Manifest,\n UpdateCheckResultAvailable,\n UpdateCheckResultNotAvailable,\n UpdateCheckResultRollBack,\n UpdateFetchResultRollBackToEmbedded,\n UpdateFetchResultFailure,\n UpdateFetchResultSuccess,\n UpdatesLogEntry,\n UpdatesNativeStateMachineContext,\n} from './Updates.types';\n\nexport type UpdatesEvents = {\n 'Expo.nativeUpdatesStateChangeEvent': (params: any) => void;\n};\n\nexport type UpdatesCheckAutomaticallyNativeValue =\n | 'ALWAYS'\n | 'ERROR_RECOVERY_ONLY'\n | 'NEVER'\n | 'WIFI_ONLY';\n\n/**\n * Common interface for all native module implementations (android, ios, web).\n *\n * @internal\n */\nexport interface UpdatesModuleInterface {\n isEmergencyLaunch: boolean;\n emergencyLaunchReason: string | null;\n launchDuration: number | null;\n isEmbeddedLaunch: boolean;\n isEnabled: boolean;\n isUsingEmbeddedAssets?: boolean;\n /**\n * Can be empty string\n */\n runtimeVersion: string;\n checkAutomatically: UpdatesCheckAutomaticallyNativeValue;\n /**\n * Can be empty string\n */\n channel: string;\n shouldDeferToNativeForAPIMethodAvailabilityInDevelopment: boolean;\n updateId?: string;\n commitTime?: string;\n /**\n * @platform android\n */\n manifestString?: string;\n /**\n * @platform ios\n */\n manifest?: Manifest;\n localAssets?: Record<string, string>;\n\n initialContext: UpdatesNativeStateMachineContext & {\n latestManifestString?: string;\n downloadedManifestString?: string;\n lastCheckForUpdateTimeString?: string;\n rollbackString?: string;\n };\n\n reload: () => Promise<void>;\n checkForUpdateAsync: () => Promise<\n | UpdateCheckResultRollBack\n | (Omit<UpdateCheckResultAvailable, 'manifest'> &\n ({ manifestString: string } | { manifest: Manifest }))\n | UpdateCheckResultNotAvailable\n >;\n getExtraParamsAsync: () => Promise<Record<string, string>>;\n setExtraParamAsync: (key: string, value: string | null) => Promise<void>;\n readLogEntriesAsync: (maxAge: number) => Promise<UpdatesLogEntry[]>;\n clearLogEntriesAsync: () => Promise<void>;\n fetchUpdateAsync: () => Promise<\n | (Omit<UpdateFetchResultSuccess, 'manifest'> &\n ({ manifestString: string } | { manifest: Manifest }))\n | UpdateFetchResultFailure\n | UpdateFetchResultRollBackToEmbedded\n >;\n}\n\n/**\n * @internal\n */\nexport declare class ExpoUpdatesModule\n extends NativeModule<UpdatesEvents>\n implements UpdatesModuleInterface\n{\n isEmergencyLaunch: boolean;\n emergencyLaunchReason: string | null;\n launchDuration: number | null;\n isEmbeddedLaunch: boolean;\n isEnabled: boolean;\n isUsingEmbeddedAssets?: boolean;\n runtimeVersion: string;\n checkAutomatically: UpdatesCheckAutomaticallyNativeValue;\n channel: string;\n shouldDeferToNativeForAPIMethodAvailabilityInDevelopment: boolean;\n updateId?: string;\n commitTime?: string;\n manifestString?: string;\n manifest?: Manifest;\n localAssets?: Record<string, string>;\n\n initialContext: UpdatesNativeStateMachineContext & {\n latestManifestString?: string;\n downloadedManifestString?: string;\n lastCheckForUpdateTimeString?: string;\n rollbackString?: string;\n };\n\n reload: () => Promise<void>;\n checkForUpdateAsync: () => Promise<\n | UpdateCheckResultRollBack\n | (Omit<UpdateCheckResultAvailable, 'manifest'> &\n ({ manifestString: string } | { manifest: Manifest }))\n | UpdateCheckResultNotAvailable\n >;\n getExtraParamsAsync: () => Promise<Record<string, string>>;\n setExtraParamAsync: (key: string, value: string | null) => Promise<void>;\n readLogEntriesAsync: (maxAge: number) => Promise<UpdatesLogEntry[]>;\n clearLogEntriesAsync: () => Promise<void>;\n fetchUpdateAsync: () => Promise<\n | (Omit<UpdateFetchResultSuccess, 'manifest'> &\n ({ manifestString: string } | { manifest: Manifest }))\n | UpdateFetchResultFailure\n | UpdateFetchResultRollBackToEmbedded\n >;\n}\n"]}
1
+ {"version":3,"file":"ExpoUpdatesModule.types.js","sourceRoot":"","sources":["../src/ExpoUpdatesModule.types.ts"],"names":[],"mappings":"","sourcesContent":["import { NativeModule } from 'expo-modules-core';\n\nimport {\n Manifest,\n UpdateCheckResultAvailable,\n UpdateCheckResultNotAvailable,\n UpdateCheckResultRollBack,\n UpdateFetchResultRollBackToEmbedded,\n UpdateFetchResultFailure,\n UpdateFetchResultSuccess,\n UpdatesLogEntry,\n UpdatesNativeStateMachineContext,\n} from './Updates.types';\n\nexport type UpdatesEvents = {\n 'Expo.nativeUpdatesStateChangeEvent': (params: any) => void;\n};\n\nexport type UpdatesCheckAutomaticallyNativeValue =\n | 'ALWAYS'\n | 'ERROR_RECOVERY_ONLY'\n | 'NEVER'\n | 'WIFI_ONLY';\n\n/**\n * Common interface for all native module implementations (android, ios, web).\n *\n * @internal\n */\nexport interface UpdatesModuleInterface {\n isEmergencyLaunch: boolean;\n emergencyLaunchReason: string | null;\n launchDuration: number | null;\n isEmbeddedLaunch: boolean;\n isEnabled: boolean;\n isUsingEmbeddedAssets?: boolean;\n /**\n * Can be empty string\n */\n runtimeVersion: string;\n checkAutomatically: UpdatesCheckAutomaticallyNativeValue;\n /**\n * Can be empty string\n */\n channel: string;\n shouldDeferToNativeForAPIMethodAvailabilityInDevelopment: boolean;\n updateId?: string;\n commitTime?: string;\n /**\n * @platform android\n */\n manifestString?: string;\n /**\n * @platform ios\n */\n manifest?: Manifest;\n localAssets?: Record<string, string>;\n\n initialContext: UpdatesNativeStateMachineContext & {\n latestManifestString?: string;\n downloadedManifestString?: string;\n lastCheckForUpdateTimeString?: string;\n rollbackString?: string;\n };\n\n reload: () => Promise<void>;\n checkForUpdateAsync: () => Promise<\n | UpdateCheckResultRollBack\n | (Omit<UpdateCheckResultAvailable, 'manifest'> &\n ({ manifestString: string } | { manifest: Manifest }))\n | UpdateCheckResultNotAvailable\n >;\n getExtraParamsAsync: () => Promise<Record<string, string>>;\n setExtraParamAsync: (key: string, value: string | null) => Promise<void>;\n readLogEntriesAsync: (maxAge: number) => Promise<UpdatesLogEntry[]>;\n clearLogEntriesAsync: () => Promise<void>;\n fetchUpdateAsync: () => Promise<\n | (Omit<UpdateFetchResultSuccess, 'manifest'> &\n ({ manifestString: string } | { manifest: Manifest }))\n | UpdateFetchResultFailure\n | UpdateFetchResultRollBackToEmbedded\n >;\n}\n\n/**\n * @internal\n */\nexport declare class ExpoUpdatesModule\n extends NativeModule<UpdatesEvents>\n implements UpdatesModuleInterface\n{\n isEmergencyLaunch: boolean;\n emergencyLaunchReason: string | null;\n launchDuration: number | null;\n isEmbeddedLaunch: boolean;\n isEnabled: boolean;\n isUsingEmbeddedAssets?: boolean;\n runtimeVersion: string;\n checkAutomatically: UpdatesCheckAutomaticallyNativeValue;\n channel: string;\n shouldDeferToNativeForAPIMethodAvailabilityInDevelopment: boolean;\n updateId?: string;\n commitTime?: string;\n manifestString?: string;\n manifest?: Manifest;\n localAssets?: Record<string, string>;\n\n initialContext: UpdatesNativeStateMachineContext & {\n latestManifestString?: string;\n downloadedManifestString?: string;\n lastCheckForUpdateTimeString?: string;\n rollbackString?: string;\n };\n\n reload: () => Promise<void>;\n checkForUpdateAsync: () => Promise<\n | UpdateCheckResultRollBack\n | (Omit<UpdateCheckResultAvailable, 'manifest'> &\n ({ manifestString: string } | { manifest: Manifest }))\n | UpdateCheckResultNotAvailable\n >;\n getExtraParamsAsync: () => Promise<Record<string, string>>;\n setExtraParamAsync: (key: string, value: string | null) => Promise<void>;\n readLogEntriesAsync: (maxAge: number) => Promise<UpdatesLogEntry[]>;\n clearLogEntriesAsync: () => Promise<void>;\n fetchUpdateAsync: () => Promise<\n | (Omit<UpdateFetchResultSuccess, 'manifest'> &\n ({ manifestString: string } | { manifest: Manifest }))\n | UpdateFetchResultFailure\n | UpdateFetchResultRollBackToEmbedded\n >;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Updates.js","sourceRoot":"","sources":["../src/Updates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,OAAO,EAKL,8BAA8B,GAE/B,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,SAAS,GAAY,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC;AAE1D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,QAAQ,GACnB,WAAW,CAAC,QAAQ,IAAI,OAAO,WAAW,CAAC,QAAQ,KAAK,QAAQ;IAC9D,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,EAAE;IACpC,CAAC,CAAC,IAAI,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAkB,WAAW,CAAC,OAAO,IAAI,IAAI,CAAC;AAElE;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAkB,WAAW,CAAC,cAAc,IAAI,IAAI,CAAC;AAEhF,MAAM,gCAAgC,GAGlC;IACF,MAAM,EAAE,8BAA8B,CAAC,OAAO;IAC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AO,MAAM,WAAW,CAAC,kBAAkB,CAAC,GAAG,EAAE,KAAK,IAAI,IAAI,CAAC,CAAC;AAClE,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,SAAiB,OAAO;IAChE,OAAO,MAAM,WAAW,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;AACvD,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB;IACxC,MAAM,WAAW,CAAC,oBAAoB,EAAE,CAAC;AAC3C,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,IACE,CAAC,OAAO,IAAI,oBAAoB,CAAC;QACjC,CAAC,wDAAwD,EACzD;QACA,MAAM,IAAI,UAAU,CAClB,sBAAsB,EACtB,iDAAiD,yBAAyB,EAAE,CAC7E,CAAC;KACH;IAED,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,gBAAgB,EAAE,CAAC;IACpD,IAAI,gBAAgB,IAAI,MAAM,EAAE;QAC9B,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC3C,OAAO;YACL,GAAG,IAAI;YACP,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC;SACrC,CAAC;KACH;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,qCAAqC,CACnD,cAAoF;IAEpF,WAAW,CAAC,qCAAqC,CAAC,cAAc,CAAC,CAAC;AACpE,CAAC","sourcesContent":["import { CodedError } from 'expo-modules-core';\n\nimport ExpoUpdates from './ExpoUpdates';\nimport { UpdatesCheckAutomaticallyNativeValue } from './ExpoUpdatesModule.types';\nimport {\n LocalAssets,\n Manifest,\n UpdateCheckResult,\n UpdateFetchResult,\n UpdatesCheckAutomaticallyValue,\n UpdatesLogEntry,\n} from './Updates.types';\n\n/**\n * Whether `expo-updates` is enabled. This may be false in a variety of cases including:\n * - enabled set to false in configuration\n * - missing or invalid URL in configuration\n * - missing runtime version or SDK version in configuration\n * - error accessing storage on device during initialization\n *\n * When false, the embedded update is loaded.\n */\nexport const isEnabled: boolean = !!ExpoUpdates.isEnabled;\n\n/**\n * The UUID that uniquely identifies the currently running update. The\n * UUID is represented in its canonical string form and will always use lowercase letters.\n * This value is `null` when running in a local development environment or any other environment where `expo-updates` is disabled.\n * @example\n * `\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"`\n */\nexport const updateId: string | null =\n ExpoUpdates.updateId && typeof ExpoUpdates.updateId === 'string'\n ? ExpoUpdates.updateId.toLowerCase()\n : null;\n\n/**\n * The channel name of the current build, if configured for use with EAS Update. `null` otherwise.\n *\n * Expo Go and development builds are not set to a specific channel and can run any updates compatible with their native runtime. Therefore, this value will always be `null` when running an update on Expo Go or a development build.\n */\nexport const channel: string | null = ExpoUpdates.channel ?? null;\n\n/**\n * The runtime version of the current build.\n */\nexport const runtimeVersion: string | null = ExpoUpdates.runtimeVersion ?? null;\n\nconst _checkAutomaticallyMapNativeToJS: Record<\n UpdatesCheckAutomaticallyNativeValue,\n UpdatesCheckAutomaticallyValue\n> = {\n ALWAYS: UpdatesCheckAutomaticallyValue.ON_LOAD,\n ERROR_RECOVERY_ONLY: UpdatesCheckAutomaticallyValue.ON_ERROR_RECOVERY,\n NEVER: UpdatesCheckAutomaticallyValue.NEVER,\n WIFI_ONLY: UpdatesCheckAutomaticallyValue.WIFI_ONLY,\n};\n\n/**\n * Determines if and when `expo-updates` checks for and downloads updates automatically on startup.\n */\nexport const checkAutomatically: UpdatesCheckAutomaticallyValue | null =\n _checkAutomaticallyMapNativeToJS[ExpoUpdates.checkAutomatically] ?? null;\n\n// @docsMissing\n/**\n * @hidden\n */\nexport const localAssets: LocalAssets = ExpoUpdates.localAssets ?? {};\n\n/**\n * `expo-updates` does its very best to always launch monotonically newer versions of your app so\n * you don't need to worry about backwards compatibility when you put out an update. In very rare\n * cases, it's possible that `expo-updates` may need to fall back to the update that's embedded in\n * the app binary, even after newer updates have been downloaded and run (an \"emergency launch\").\n * This boolean will be `true` if the app is launching under this fallback mechanism and `false`\n * otherwise. If you are concerned about backwards compatibility of future updates to your app, you\n * can use this constant to provide special behavior for this rare case.\n */\nexport const isEmergencyLaunch = ExpoUpdates.isEmergencyLaunch;\n\n/**\n * If `isEmergencyLaunch` is set to true, this will contain a string error message describing\n * what failed during initialization.\n */\nexport const emergencyLaunchReason = ExpoUpdates.emergencyLaunchReason;\n\n/**\n * Number of milliseconds it took to launch.\n */\nexport const launchDuration = ExpoUpdates.launchDuration;\n\n/**\n * This will be true if the currently running update is the one embedded in the build,\n * and not one downloaded from the updates server.\n */\nexport const isEmbeddedLaunch: boolean = ExpoUpdates.isEmbeddedLaunch || false;\n\n// @docsMissing\n/**\n * @hidden\n */\nexport const isUsingEmbeddedAssets: boolean = ExpoUpdates.isUsingEmbeddedAssets || false;\n\n/**\n * If `expo-updates` is enabled, this is the\n * [manifest](/versions/latest/sdk/constants/#manifest) (or\n * [classic manifest](/versions/latest/sdk/constants/#appmanifest))\n * object for the update that's currently running.\n *\n * In development mode, or any other environment in which `expo-updates` is disabled, this object is\n * empty.\n */\nexport const manifest: Partial<Manifest> =\n (ExpoUpdates.manifestString ? JSON.parse(ExpoUpdates.manifestString) : ExpoUpdates.manifest) ??\n {};\n\n/**\n * If `expo-updates` is enabled, this is a `Date` object representing the creation time of the update that's currently running (whether it was embedded or downloaded at runtime).\n *\n * In development mode, or any other environment in which `expo-updates` is disabled, this value is\n * null.\n */\nexport const createdAt: Date | null = ExpoUpdates.commitTime\n ? new Date(ExpoUpdates.commitTime)\n : null;\n\n/**\n * During non-expo development we block accessing the updates API methods on the JS side, but when developing in\n * Expo Go or a development client build, the controllers should have control over which API methods should\n * be allowed.\n */\nconst shouldDeferToNativeForAPIMethodAvailabilityInDevelopment =\n !!ExpoUpdates.shouldDeferToNativeForAPIMethodAvailabilityInDevelopment;\n\n/**\n * Developer tool is set when a project is served by `expo start`.\n */\nconst isUsingDeveloperTool =\n 'extra' in manifest ? !!manifest.extra?.expoGo?.developer?.tool : false;\n\nconst manualUpdatesInstructions =\n 'To test usage of the expo-updates JS API in your app, make a release build with `npx expo run:ios --configuration Release` or ' +\n '`npx expo run:android --variant Release`.';\n\n/**\n * Instructs the app to reload using the most recently downloaded version. This is useful for\n * triggering a newly downloaded update to launch without the user needing to manually restart the\n * app.\n * Unlike `Expo.reloadAppAsync()` provided by the `expo` package,\n * this function not only reloads the app but also changes the loaded JavaScript bundle to that of the most recently downloaded update.\n *\n * It is not recommended to place any meaningful logic after a call to `await\n * Updates.reloadAsync()`. This is because the promise is resolved after verifying that the app can\n * be reloaded, and immediately before posting an asynchronous task to the main thread to actually\n * reload the app. It is unsafe to make any assumptions about whether any more JS code will be\n * executed after the `Updates.reloadAsync` method call resolves, since that depends on the OS and\n * the state of the native module and main threads.\n *\n * This method cannot be used in Expo Go or development mode, and the returned promise will be rejected if you\n * try to do so. It also rejects when `expo-updates` is not enabled.\n *\n * @return A promise that fulfills right before the reload instruction is sent to the JS runtime, or\n * rejects if it cannot find a reference to the JS runtime. If the promise is rejected in production\n * mode, it most likely means you have installed the module incorrectly. Double check you've\n * followed the installation instructions. In particular, on iOS ensure that you set the `bridge`\n * property on `EXUpdatesAppController` with a pointer to the `RCTBridge` you want to reload, and on\n * Android ensure you either call `UpdatesController.initialize` with the instance of\n * `ReactApplication` you want to reload, or call `UpdatesController.setReactNativeHost` with the\n * proper instance of `ReactNativeHost`.\n */\nexport async function reloadAsync(): Promise<void> {\n if (\n (__DEV__ || isUsingDeveloperTool) &&\n !shouldDeferToNativeForAPIMethodAvailabilityInDevelopment\n ) {\n throw new CodedError(\n 'ERR_UPDATES_DISABLED',\n `You cannot use the Updates module in development mode in a production app. ${manualUpdatesInstructions}`\n );\n }\n await ExpoUpdates.reload();\n}\n\n/**\n * Checks the server to see if a newly deployed update to your project is available. Does not\n * actually download the update. This method cannot be used in development mode, and the returned\n * promise will be rejected if you try to do so.\n *\n * Checking for an update uses a device's bandwidth and battery life like any network call.\n * Additionally, updates served by Expo may be rate limited. A good rule of thumb to check for\n * updates judiciously is to check when the user launches or foregrounds the app. Avoid polling for\n * updates in a frequent loop.\n *\n * @return A promise that fulfills with an [`UpdateCheckResult`](#updatecheckresult) object.\n *\n * The promise rejects in Expo Go or if the app is in development mode, or if there is an unexpected error or\n * timeout communicating with the server. It also rejects when `expo-updates` is not enabled.\n */\nexport async function checkForUpdateAsync(): Promise<UpdateCheckResult> {\n if (\n (__DEV__ || isUsingDeveloperTool) &&\n !shouldDeferToNativeForAPIMethodAvailabilityInDevelopment\n ) {\n throw new CodedError(\n 'ERR_UPDATES_DISABLED',\n `You cannot check for updates in development mode. ${manualUpdatesInstructions}`\n );\n }\n\n const result = await ExpoUpdates.checkForUpdateAsync();\n if ('manifestString' in result) {\n const { manifestString, ...rest } = result;\n return {\n ...rest,\n manifest: JSON.parse(manifestString),\n };\n }\n return result;\n}\n\n/**\n * Retrieves the current extra params.\n *\n * This method cannot be used in Expo Go or development mode. It also rejects when `expo-updates` is not enabled.\n */\nexport async function getExtraParamsAsync(): Promise<Record<string, string>> {\n return await ExpoUpdates.getExtraParamsAsync();\n}\n\n/**\n * Sets an extra param if value is non-null, otherwise unsets the param.\n * Extra params are sent as an [Expo Structured Field Value Dictionary](/technical-specs/expo-sfv-0/)\n * in the `Expo-Extra-Params` header of update requests. A compliant update server may use these params when selecting an update to serve.\n *\n * This method cannot be used in Expo Go or development mode. It also rejects when `expo-updates` is not enabled.\n */\nexport async function setExtraParamAsync(\n key: string,\n value: string | null | undefined\n): Promise<void> {\n return await ExpoUpdates.setExtraParamAsync(key, value ?? null);\n}\n\n/**\n * Retrieves the most recent `expo-updates` log entries.\n *\n * @param maxAge Sets the max age of retrieved log entries in milliseconds. Default to `3600000` ms (1 hour).\n *\n * @return A promise that fulfills with an array of [`UpdatesLogEntry`](#updateslogentry) objects;\n *\n * The promise rejects if there is an unexpected error in retrieving the logs.\n */\nexport async function readLogEntriesAsync(maxAge: number = 3600000): Promise<UpdatesLogEntry[]> {\n return await ExpoUpdates.readLogEntriesAsync(maxAge);\n}\n\n/**\n * Clears existing `expo-updates` log entries.\n *\n * > For now, this operation does nothing on the client. Once log persistence has been\n * > implemented, this operation will actually remove existing logs.\n *\n * @return A promise that fulfills if the clear operation was successful.\n *\n * The promise rejects if there is an unexpected error in clearing the logs.\n *\n */\nexport async function clearLogEntriesAsync(): Promise<void> {\n await ExpoUpdates.clearLogEntriesAsync();\n}\n\n/**\n * Downloads the most recently deployed update to your project from server to the device's local\n * storage. This method cannot be used in development mode, and the returned promise will be\n * rejected if you try to do so.\n *\n > **Note:** [`reloadAsync()`](#updatesreloadasync) can be called after promise resolution to\n * reload the app using the most recently downloaded version. Otherwise, the update will be applied\n * on the next app cold start.\n *\n * @return A promise that fulfills with an [`UpdateFetchResult`](#updatefetchresult) object.\n *\n * The promise rejects in Expo Go or if the app is in development mode, or if there is an unexpected error or\n * timeout communicating with the server. It also rejects when `expo-updates` is not enabled.\n */\nexport async function fetchUpdateAsync(): Promise<UpdateFetchResult> {\n if (\n (__DEV__ || isUsingDeveloperTool) &&\n !shouldDeferToNativeForAPIMethodAvailabilityInDevelopment\n ) {\n throw new CodedError(\n 'ERR_UPDATES_DISABLED',\n `You cannot fetch updates in development mode. ${manualUpdatesInstructions}`\n );\n }\n\n const result = await ExpoUpdates.fetchUpdateAsync();\n if ('manifestString' in result) {\n const { manifestString, ...rest } = result;\n return {\n ...rest,\n manifest: JSON.parse(manifestString),\n };\n }\n return result;\n}\n\n/**\n * Overrides updates URL and reuqest headers in runtime from build time.\n * This method allows you to load specific updates from a URL that you provide.\n * Use this method at your own risk, as it may cause unexpected behavior.\n * @experimental\n * @hidden\n */\nexport function setUpdateURLAndRequestHeadersOverride(\n configOverride: { updateUrl: string; requestHeaders: Record<string, string> } | null\n): void {\n ExpoUpdates.setUpdateURLAndRequestHeaders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ACpC,IACE,CAAC,OAAO,IAAI,oBAAoB,CAAC;QACjC,CAAC,wDAAwD,EACzD,CAAC;QACD,MAAM,IAAI,UAAU,CAClB,sBAAsB,EACtB,iDAAiD,yBAAyB,EAAE,CAC7E,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,gBAAgB,EAAE,CAAC;IACpD,IAAI,gBAAgB,IAAI,MAAM,EAAE,CAAC;QAC/B,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC3C,OAAO;YACL,GAAG,IAAI;YACP,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC;SACrC,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,qCAAqC,CACnD,cAAoF;IAEpF,WAAW,CAAC,qCAAqC,CAAC,cAAc,CAAC,CAAC;AACpE,CAAC","sourcesContent":["import { CodedError } from 'expo-modules-core';\n\nimport ExpoUpdates from './ExpoUpdates';\nimport { UpdatesCheckAutomaticallyNativeValue } from './ExpoUpdatesModule.types';\nimport {\n LocalAssets,\n Manifest,\n UpdateCheckResult,\n UpdateFetchResult,\n UpdatesCheckAutomaticallyValue,\n UpdatesLogEntry,\n} from './Updates.types';\n\n/**\n * Whether `expo-updates` is enabled. This may be false in a variety of cases including:\n * - enabled set to false in configuration\n * - missing or invalid URL in configuration\n * - missing runtime version or SDK version in configuration\n * - error accessing storage on device during initialization\n *\n * When false, the embedded update is loaded.\n */\nexport const isEnabled: boolean = !!ExpoUpdates.isEnabled;\n\n/**\n * The UUID that uniquely identifies the currently running update. The\n * UUID is represented in its canonical string form and will always use lowercase letters.\n * This value is `null` when running in a local development environment or any other environment where `expo-updates` is disabled.\n * @example\n * `\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"`\n */\nexport const updateId: string | null =\n ExpoUpdates.updateId && typeof ExpoUpdates.updateId === 'string'\n ? ExpoUpdates.updateId.toLowerCase()\n : null;\n\n/**\n * The channel name of the current build, if configured for use with EAS Update. `null` otherwise.\n *\n * Expo Go and development builds are not set to a specific channel and can run any updates compatible with their native runtime. Therefore, this value will always be `null` when running an update on Expo Go or a development build.\n */\nexport const channel: string | null = ExpoUpdates.channel ?? null;\n\n/**\n * The runtime version of the current build.\n */\nexport const runtimeVersion: string | null = ExpoUpdates.runtimeVersion ?? null;\n\nconst _checkAutomaticallyMapNativeToJS: Record<\n UpdatesCheckAutomaticallyNativeValue,\n UpdatesCheckAutomaticallyValue\n> = {\n ALWAYS: UpdatesCheckAutomaticallyValue.ON_LOAD,\n ERROR_RECOVERY_ONLY: UpdatesCheckAutomaticallyValue.ON_ERROR_RECOVERY,\n NEVER: UpdatesCheckAutomaticallyValue.NEVER,\n WIFI_ONLY: UpdatesCheckAutomaticallyValue.WIFI_ONLY,\n};\n\n/**\n * Determines if and when `expo-updates` checks for and downloads updates automatically on startup.\n */\nexport const checkAutomatically: UpdatesCheckAutomaticallyValue | null =\n _checkAutomaticallyMapNativeToJS[ExpoUpdates.checkAutomatically] ?? null;\n\n// @docsMissing\n/**\n * @hidden\n */\nexport const localAssets: LocalAssets = ExpoUpdates.localAssets ?? {};\n\n/**\n * `expo-updates` does its very best to always launch monotonically newer versions of your app so\n * you don't need to worry about backwards compatibility when you put out an update. In very rare\n * cases, it's possible that `expo-updates` may need to fall back to the update that's embedded in\n * the app binary, even after newer updates have been downloaded and run (an \"emergency launch\").\n * This boolean will be `true` if the app is launching under this fallback mechanism and `false`\n * otherwise. If you are concerned about backwards compatibility of future updates to your app, you\n * can use this constant to provide special behavior for this rare case.\n */\nexport const isEmergencyLaunch = ExpoUpdates.isEmergencyLaunch;\n\n/**\n * If `isEmergencyLaunch` is set to true, this will contain a string error message describing\n * what failed during initialization.\n */\nexport const emergencyLaunchReason = ExpoUpdates.emergencyLaunchReason;\n\n/**\n * Number of milliseconds it took to launch.\n */\nexport const launchDuration = ExpoUpdates.launchDuration;\n\n/**\n * This will be true if the currently running update is the one embedded in the build,\n * and not one downloaded from the updates server.\n */\nexport const isEmbeddedLaunch: boolean = ExpoUpdates.isEmbeddedLaunch || false;\n\n// @docsMissing\n/**\n * @hidden\n */\nexport const isUsingEmbeddedAssets: boolean = ExpoUpdates.isUsingEmbeddedAssets || false;\n\n/**\n * If `expo-updates` is enabled, this is the\n * [manifest](/versions/latest/sdk/constants/#manifest) (or\n * [classic manifest](/versions/latest/sdk/constants/#appmanifest))\n * object for the update that's currently running.\n *\n * In development mode, or any other environment in which `expo-updates` is disabled, this object is\n * empty.\n */\nexport const manifest: Partial<Manifest> =\n (ExpoUpdates.manifestString ? JSON.parse(ExpoUpdates.manifestString) : ExpoUpdates.manifest) ??\n {};\n\n/**\n * If `expo-updates` is enabled, this is a `Date` object representing the creation time of the update that's currently running (whether it was embedded or downloaded at runtime).\n *\n * In development mode, or any other environment in which `expo-updates` is disabled, this value is\n * null.\n */\nexport const createdAt: Date | null = ExpoUpdates.commitTime\n ? new Date(ExpoUpdates.commitTime)\n : null;\n\n/**\n * During non-expo development we block accessing the updates API methods on the JS side, but when developing in\n * Expo Go or a development client build, the controllers should have control over which API methods should\n * be allowed.\n */\nconst shouldDeferToNativeForAPIMethodAvailabilityInDevelopment =\n !!ExpoUpdates.shouldDeferToNativeForAPIMethodAvailabilityInDevelopment;\n\n/**\n * Developer tool is set when a project is served by `expo start`.\n */\nconst isUsingDeveloperTool =\n 'extra' in manifest ? !!manifest.extra?.expoGo?.developer?.tool : false;\n\nconst manualUpdatesInstructions =\n 'To test usage of the expo-updates JS API in your app, make a release build with `npx expo run:ios --configuration Release` or ' +\n '`npx expo run:android --variant Release`.';\n\n/**\n * Instructs the app to reload using the most recently downloaded version. This is useful for\n * triggering a newly downloaded update to launch without the user needing to manually restart the\n * app.\n * Unlike `Expo.reloadAppAsync()` provided by the `expo` package,\n * this function not only reloads the app but also changes the loaded JavaScript bundle to that of the most recently downloaded update.\n *\n * It is not recommended to place any meaningful logic after a call to `await\n * Updates.reloadAsync()`. This is because the promise is resolved after verifying that the app can\n * be reloaded, and immediately before posting an asynchronous task to the main thread to actually\n * reload the app. It is unsafe to make any assumptions about whether any more JS code will be\n * executed after the `Updates.reloadAsync` method call resolves, since that depends on the OS and\n * the state of the native module and main threads.\n *\n * This method cannot be used in Expo Go or development mode, and the returned promise will be rejected if you\n * try to do so. It also rejects when `expo-updates` is not enabled.\n *\n * @return A promise that fulfills right before the reload instruction is sent to the JS runtime, or\n * rejects if it cannot find a reference to the JS runtime. If the promise is rejected in production\n * mode, it most likely means you have installed the module incorrectly. Double check you've\n * followed the installation instructions. In particular, on iOS ensure that you set the `bridge`\n * property on `EXUpdatesAppController` with a pointer to the `RCTBridge` you want to reload, and on\n * Android ensure you either call `UpdatesController.initialize` with the instance of\n * `ReactApplication` you want to reload, or call `UpdatesController.setReactNativeHost` with the\n * proper instance of `ReactNativeHost`.\n */\nexport async function reloadAsync(): Promise<void> {\n if (\n (__DEV__ || isUsingDeveloperTool) &&\n !shouldDeferToNativeForAPIMethodAvailabilityInDevelopment\n ) {\n throw new CodedError(\n 'ERR_UPDATES_DISABLED',\n `You cannot use the Updates module in development mode in a production app. ${manualUpdatesInstructions}`\n );\n }\n await ExpoUpdates.reload();\n}\n\n/**\n * Checks the server to see if a newly deployed update to your project is available. Does not\n * actually download the update. This method cannot be used in development mode, and the returned\n * promise will be rejected if you try to do so.\n *\n * Checking for an update uses a device's bandwidth and battery life like any network call.\n * Additionally, updates served by Expo may be rate limited. A good rule of thumb to check for\n * updates judiciously is to check when the user launches or foregrounds the app. Avoid polling for\n * updates in a frequent loop.\n *\n * @return A promise that fulfills with an [`UpdateCheckResult`](#updatecheckresult) object.\n *\n * The promise rejects in Expo Go or if the app is in development mode, or if there is an unexpected error or\n * timeout communicating with the server. It also rejects when `expo-updates` is not enabled.\n */\nexport async function checkForUpdateAsync(): Promise<UpdateCheckResult> {\n if (\n (__DEV__ || isUsingDeveloperTool) &&\n !shouldDeferToNativeForAPIMethodAvailabilityInDevelopment\n ) {\n throw new CodedError(\n 'ERR_UPDATES_DISABLED',\n `You cannot check for updates in development mode. ${manualUpdatesInstructions}`\n );\n }\n\n const result = await ExpoUpdates.checkForUpdateAsync();\n if ('manifestString' in result) {\n const { manifestString, ...rest } = result;\n return {\n ...rest,\n manifest: JSON.parse(manifestString),\n };\n }\n return result;\n}\n\n/**\n * Retrieves the current extra params.\n *\n * This method cannot be used in Expo Go or development mode. It also rejects when `expo-updates` is not enabled.\n */\nexport async function getExtraParamsAsync(): Promise<Record<string, string>> {\n return await ExpoUpdates.getExtraParamsAsync();\n}\n\n/**\n * Sets an extra param if value is non-null, otherwise unsets the param.\n * Extra params are sent as an [Expo Structured Field Value Dictionary](/technical-specs/expo-sfv-0/)\n * in the `Expo-Extra-Params` header of update requests. A compliant update server may use these params when selecting an update to serve.\n *\n * This method cannot be used in Expo Go or development mode. It also rejects when `expo-updates` is not enabled.\n */\nexport async function setExtraParamAsync(\n key: string,\n value: string | null | undefined\n): Promise<void> {\n return await ExpoUpdates.setExtraParamAsync(key, value ?? null);\n}\n\n/**\n * Retrieves the most recent `expo-updates` log entries.\n *\n * @param maxAge Sets the max age of retrieved log entries in milliseconds. Default to `3600000` ms (1 hour).\n *\n * @return A promise that fulfills with an array of [`UpdatesLogEntry`](#updateslogentry) objects;\n *\n * The promise rejects if there is an unexpected error in retrieving the logs.\n */\nexport async function readLogEntriesAsync(maxAge: number = 3600000): Promise<UpdatesLogEntry[]> {\n return await ExpoUpdates.readLogEntriesAsync(maxAge);\n}\n\n/**\n * Clears existing `expo-updates` log entries.\n *\n * > For now, this operation does nothing on the client. Once log persistence has been\n * > implemented, this operation will actually remove existing logs.\n *\n * @return A promise that fulfills if the clear operation was successful.\n *\n * The promise rejects if there is an unexpected error in clearing the logs.\n *\n */\nexport async function clearLogEntriesAsync(): Promise<void> {\n await ExpoUpdates.clearLogEntriesAsync();\n}\n\n/**\n * Downloads the most recently deployed update to your project from server to the device's local\n * storage. This method cannot be used in development mode, and the returned promise will be\n * rejected if you try to do so.\n *\n > **Note:** [`reloadAsync()`](#updatesreloadasync) can be called after promise resolution to\n * reload the app using the most recently downloaded version. Otherwise, the update will be applied\n * on the next app cold start.\n *\n * @return A promise that fulfills with an [`UpdateFetchResult`](#updatefetchresult) object.\n *\n * The promise rejects in Expo Go or if the app is in development mode, or if there is an unexpected error or\n * timeout communicating with the server. It also rejects when `expo-updates` is not enabled.\n */\nexport async function fetchUpdateAsync(): Promise<UpdateFetchResult> {\n if (\n (__DEV__ || isUsingDeveloperTool) &&\n !shouldDeferToNativeForAPIMethodAvailabilityInDevelopment\n ) {\n throw new CodedError(\n 'ERR_UPDATES_DISABLED',\n `You cannot fetch updates in development mode. ${manualUpdatesInstructions}`\n );\n }\n\n const result = await ExpoUpdates.fetchUpdateAsync();\n if ('manifestString' in result) {\n const { manifestString, ...rest } = result;\n return {\n ...rest,\n manifest: JSON.parse(manifestString),\n };\n }\n return result;\n}\n\n/**\n * Overrides updates URL and reuqest headers in runtime from build time.\n * This method allows you to load specific updates from a URL that you provide.\n * Use this method at your own risk, as it may cause unexpected behavior.\n * @experimental\n * @hidden\n */\nexport function setUpdateURLAndRequestHeadersOverride(\n configOverride: { updateUrl: string; requestHeaders: Record<string, string> } | null\n): void {\n ExpoUpdates.setUpdateURLAndRequestHeadersOverride(configOverride);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"UpdatesEmitter.d.ts","sourceRoot":"","sources":["../src/UpdatesEmitter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,6BAA6B,EAC7B,gCAAgC,EACjC,MAAM,iBAAiB,CAAC;AAEzB,eAAO,IAAI,aAAa,kCAAuE,CAAC;AAIhG,UAAU,8BAA8B;IACtC,MAAM,IAAI,IAAI,CAAC;CAChB;AAmBD;;;GAGG;AACH,eAAO,MAAM,6BAA6B,qBACtB,6BAA6B,KAAK,IAAI,KACvD,8BAOF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,UAAW,6BAA6B,SAE5E,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,YAE9B,CAAC"}
1
+ {"version":3,"file":"UpdatesEmitter.d.ts","sourceRoot":"","sources":["../src/UpdatesEmitter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,6BAA6B,EAC7B,gCAAgC,EACjC,MAAM,iBAAiB,CAAC;AAEzB,eAAO,IAAI,aAAa,kCAAuE,CAAC;AAIhG,UAAU,8BAA8B;IACtC,MAAM,IAAI,IAAI,CAAC;CAChB;AAmBD;;;GAGG;AACH,eAAO,MAAM,6BAA6B,GACxC,UAAU,CAAC,KAAK,EAAE,6BAA6B,KAAK,IAAI,KACvD,8BAOF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GAAI,OAAO,6BAA6B,SAE5E,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,YAE9B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"UpdatesEmitter.js","sourceRoot":"","sources":["../src/UpdatesEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,eAAe,CAAC;AAM9C,MAAM,CAAC,IAAI,aAAa,GAAG,kCAAkC,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;AAEhG,iBAAiB,CAAC,WAAW,CAAC,oCAAoC,EAAE,6BAA6B,CAAC,CAAC;AAMnG,MAAM,4BAA4B,GAAG,IAAI,GAAG,EAAkD,CAAC;AAE/F,qCAAqC;AACrC,SAAS,6BAA6B,CAAC,MAAW;IAChD,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,CAAC;IAClF,MAAM,kBAAkB,GAAG,kCAAkC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAEjF,wDAAwD;IACxD,IAA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aAAa,CAAC,4BAA4B,EAAE;QAC9C,aAAa,CAAC,sBAAsB,GAAG,IAAI,IAAI,CAAC,aAAa,CAAC,4BAA4B,CAAC,CAAC;QAC5F,OAAO,aAAa,CAAC,4BAA4B,CAAC;KACnD;IACD,IAAI,aAAa,CAAC,cAAc,EAAE;QAChC,aAAa,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAClE,OAAO,aAAa,CAAC,cAAc,CAAC;KACrC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC","sourcesContent":["import ExpoUpdatesModule from './ExpoUpdates';\nimport type {\n UpdatesNativeStateChangeEvent,\n UpdatesNativeStateMachineContext,\n} from './Updates.types';\n\nexport let latestContext = transformNativeStateMachineContext(ExpoUpdatesModule.initialContext);\n\nExpoUpdatesModule.addListener('Expo.nativeUpdatesStateChangeEvent', _handleNativeStateChangeEvent);\n\ninterface UpdatesStateChangeSubscription {\n remove(): void;\n}\n\nconst _updatesStateChangeListeners = new Set<(event: UpdatesNativeStateChangeEvent) => void>();\n\n// Reemits native state change events\nfunction _handleNativeStateChangeEvent(params: any) {\n const newParams = typeof params === 'string' ? JSON.parse(params) : { ...params };\n const transformedContext = transformNativeStateMachineContext(newParams.context);\n\n // only process state change events if they are in order\n if (transformedContext.sequenceNumber <= latestContext.sequenceNumber) {\n return;\n }\n\n newParams.context = transformedContext;\n latestContext = transformedContext;\n _updatesStateChangeListeners.forEach((listener) => listener(newParams));\n}\n\n/**\n * Add listener for state change events\n * @hidden\n */\nexport const addUpdatesStateChangeListener = (\n listener: (event: UpdatesNativeStateChangeEvent) => void\n): UpdatesStateChangeSubscription => {\n _updatesStateChangeListeners.add(listener);\n return {\n remove() {\n _updatesStateChangeListeners.delete(listener);\n },\n };\n};\n\n/**\n * Allows JS test to emit a simulated native state change event (used in unit testing)\n * @hidden\n */\nexport const emitTestStateChangeEvent = (event: UpdatesNativeStateChangeEvent) => {\n _handleNativeStateChangeEvent(event);\n};\n\n/**\n * Allows JS test to reset latest context (and sequence number)\n * @hidden\n */\nexport const resetLatestContext = () => {\n latestContext = transformNativeStateMachineContext(ExpoUpdatesModule.initialContext);\n};\n\nfunction transformNativeStateMachineContext(\n originalNativeContext: UpdatesNativeStateMachineContext & {\n latestManifestString?: string;\n downloadedManifestString?: string;\n lastCheckForUpdateTimeString?: string;\n rollbackString?: string;\n }\n): UpdatesNativeStateMachineContext {\n const nativeContext = { ...originalNativeContext };\n if (nativeContext.latestManifestString) {\n nativeContext.latestManifest = JSON.parse(nativeContext.latestManifestString);\n delete nativeContext.latestManifestString;\n }\n if (nativeContext.downloadedManifestString) {\n nativeContext.downloadedManifest = JSON.parse(nativeContext.downloadedManifestString);\n delete nativeContext.downloadedManifestString;\n }\n if (nativeContext.lastCheckForUpdateTimeString) {\n nativeContext.lastCheckForUpdateTime = new Date(nativeContext.lastCheckForUpdateTimeString);\n delete nativeContext.lastCheckForUpdateTimeString;\n }\n if (nativeContext.rollbackString) {\n nativeContext.rollback = JSON.parse(nativeContext.rollbackString);\n delete nativeContext.rollbackString;\n }\n return nativeContext;\n}\n"]}
1
+ {"version":3,"file":"UpdatesEmitter.js","sourceRoot":"","sources":["../src/UpdatesEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,eAAe,CAAC;AAM9C,MAAM,CAAC,IAAI,aAAa,GAAG,kCAAkC,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;AAEhG,iBAAiB,CAAC,WAAW,CAAC,oCAAoC,EAAE,6BAA6B,CAAC,CAAC;AAMnG,MAAM,4BAA4B,GAAG,IAAI,GAAG,EAAkD,CAAC;AAE/F,qCAAqC;AACrC,SAAS,6BAA6B,CAAC,MAAW;IAChD,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,CAAC;IAClF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B,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,wBAAwB,CAAC,CAAC;QACtF,OAAO,aAAa,CAAC,wBAAwB,CAAC;IAChD,CAAC;IACD,IAAI,aAAa,CAAC,4BAA4B,EAAE,CAAC;QAC/C,aAAa,CAAC,sBAAsB,GAAG,IAAI,IAAI,CAAC,aAAa,CAAC,4BAA4B,CAAC,CAAC;QAC5F,OAAO,aAAa,CAAC,4BAA4B,CAAC;IACpD,CAAC;IACD,IAAI,aAAa,CAAC,cAAc,EAAE,CAAC;QACjC,aAAa,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAClE,OAAO,aAAa,CAAC,cAAc,CAAC;IACtC,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC","sourcesContent":["import ExpoUpdatesModule from './ExpoUpdates';\nimport type {\n UpdatesNativeStateChangeEvent,\n UpdatesNativeStateMachineContext,\n} from './Updates.types';\n\nexport let latestContext = transformNativeStateMachineContext(ExpoUpdatesModule.initialContext);\n\nExpoUpdatesModule.addListener('Expo.nativeUpdatesStateChangeEvent', _handleNativeStateChangeEvent);\n\ninterface UpdatesStateChangeSubscription {\n remove(): void;\n}\n\nconst _updatesStateChangeListeners = new Set<(event: UpdatesNativeStateChangeEvent) => void>();\n\n// Reemits native state change events\nfunction _handleNativeStateChangeEvent(params: any) {\n const newParams = typeof params === 'string' ? JSON.parse(params) : { ...params };\n const transformedContext = transformNativeStateMachineContext(newParams.context);\n\n // only process state change events if they are in order\n if (transformedContext.sequenceNumber <= latestContext.sequenceNumber) {\n return;\n }\n\n newParams.context = transformedContext;\n latestContext = transformedContext;\n _updatesStateChangeListeners.forEach((listener) => listener(newParams));\n}\n\n/**\n * Add listener for state change events\n * @hidden\n */\nexport const addUpdatesStateChangeListener = (\n listener: (event: UpdatesNativeStateChangeEvent) => void\n): UpdatesStateChangeSubscription => {\n _updatesStateChangeListeners.add(listener);\n return {\n remove() {\n _updatesStateChangeListeners.delete(listener);\n },\n };\n};\n\n/**\n * Allows JS test to emit a simulated native state change event (used in unit testing)\n * @hidden\n */\nexport const emitTestStateChangeEvent = (event: UpdatesNativeStateChangeEvent) => {\n _handleNativeStateChangeEvent(event);\n};\n\n/**\n * Allows JS test to reset latest context (and sequence number)\n * @hidden\n */\nexport const resetLatestContext = () => {\n latestContext = transformNativeStateMachineContext(ExpoUpdatesModule.initialContext);\n};\n\nfunction transformNativeStateMachineContext(\n originalNativeContext: UpdatesNativeStateMachineContext & {\n latestManifestString?: string;\n downloadedManifestString?: string;\n lastCheckForUpdateTimeString?: string;\n rollbackString?: string;\n }\n): UpdatesNativeStateMachineContext {\n const nativeContext = { ...originalNativeContext };\n if (nativeContext.latestManifestString) {\n nativeContext.latestManifest = JSON.parse(nativeContext.latestManifestString);\n delete nativeContext.latestManifestString;\n }\n if (nativeContext.downloadedManifestString) {\n nativeContext.downloadedManifest = JSON.parse(nativeContext.downloadedManifestString);\n delete nativeContext.downloadedManifestString;\n }\n if (nativeContext.lastCheckForUpdateTimeString) {\n nativeContext.lastCheckForUpdateTime = new Date(nativeContext.lastCheckForUpdateTimeString);\n delete nativeContext.lastCheckForUpdateTimeString;\n }\n if (nativeContext.rollbackString) {\n nativeContext.rollback = JSON.parse(nativeContext.rollbackString);\n delete nativeContext.rollbackString;\n }\n return nativeContext;\n}\n"]}
@@ -16,13 +16,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
16
16
  }) : function(o, v) {
17
17
  o["default"] = v;
18
18
  });
19
- var __importStar = (this && this.__importStar) || function (mod) {
20
- if (mod && mod.__esModule) return mod;
21
- var result = {};
22
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
- __setModuleDefault(result, mod);
24
- return result;
25
- };
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
26
36
  var __importDefault = (this && this.__importDefault) || function (mod) {
27
37
  return (mod && mod.__esModule) ? mod : { "default": mod };
28
38
  };
@@ -1,6 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getExportedMetadataHashSet = exports.getExportedMetadataAsync = exports.getFullAssetDumpHashSet = exports.getFullAssetDumpAsync = exports.getBuildManifestHashSet = exports.getBuildManifestAsync = exports.getMissingAssetsAsync = void 0;
3
+ exports.getMissingAssetsAsync = getMissingAssetsAsync;
4
+ exports.getBuildManifestAsync = getBuildManifestAsync;
5
+ exports.getBuildManifestHashSet = getBuildManifestHashSet;
6
+ exports.getFullAssetDumpAsync = getFullAssetDumpAsync;
7
+ exports.getFullAssetDumpHashSet = getFullAssetDumpHashSet;
8
+ exports.getExportedMetadataAsync = getExportedMetadataAsync;
9
+ exports.getExportedMetadataHashSet = getExportedMetadataHashSet;
4
10
  const fs_1 = require("fs");
5
11
  const errors_1 = require("./utils/errors");
6
12
  const debug = require('debug')('expo-updates:assets:verify');
@@ -39,7 +45,6 @@ async function getMissingAssetsAsync(buildManifestPath, exportMetadataPath, asse
39
45
  });
40
46
  return missingAssets;
41
47
  }
42
- exports.getMissingAssetsAsync = getMissingAssetsAsync;
43
48
  /**
44
49
  * Reads and returns the embedded manifest (app.manifest) for a build.
45
50
  *
@@ -53,7 +58,6 @@ async function getBuildManifestAsync(buildManifestPath) {
53
58
  const buildManifest = JSON.parse(buildManifestString);
54
59
  return buildManifest;
55
60
  }
56
- exports.getBuildManifestAsync = getBuildManifestAsync;
57
61
  /**
58
62
  * Extracts the set of asset hashes from a build manifest.
59
63
  *
@@ -63,7 +67,6 @@ exports.getBuildManifestAsync = getBuildManifestAsync;
63
67
  function getBuildManifestHashSet(buildManifest) {
64
68
  return new Set((buildManifest.assets ?? []).map((asset) => asset.packagerHash));
65
69
  }
66
- exports.getBuildManifestHashSet = getBuildManifestHashSet;
67
70
  /**
68
71
  * Reads and extracts the asset dump for an exported bundle.
69
72
  *
@@ -75,7 +78,6 @@ async function getFullAssetDumpAsync(assetMapPath) {
75
78
  const assetMap = new Map(Object.entries(JSON.parse(assetMapString)));
76
79
  return assetMap;
77
80
  }
78
- exports.getFullAssetDumpAsync = getFullAssetDumpAsync;
79
81
  /**
80
82
  * Extracts the set of asset hashes from an asset dump.
81
83
  *
@@ -94,7 +96,6 @@ function getFullAssetDumpHashSet(assetDump) {
94
96
  fullAssetHashMap,
95
97
  };
96
98
  }
97
- exports.getFullAssetDumpHashSet = getFullAssetDumpHashSet;
98
99
  /**
99
100
  * Reads and extracts the metadata.json from an exported bundle.
100
101
  *
@@ -106,7 +107,6 @@ async function getExportedMetadataAsync(exportedMetadataPath) {
106
107
  const metadata = JSON.parse(metadataString);
107
108
  return metadata;
108
109
  }
109
- exports.getExportedMetadataAsync = getExportedMetadataAsync;
110
110
  /**
111
111
  * Extracts the set of asset hashes from an exported bundle's metadata for a given platform.
112
112
  *
@@ -123,4 +123,3 @@ function getExportedMetadataHashSet(metadata, platform) {
123
123
  // Asset paths in the export metadata are of the form 'assets/<hash string>'
124
124
  return new Set(assets.map((asset) => asset.path.substring(7, asset.path.length)));
125
125
  }
126
- exports.getExportedMetadataHashSet = getExportedMetadataHashSet;
package/cli/build/cli.js CHANGED
@@ -16,13 +16,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
16
16
  }) : function(o, v) {
17
17
  o["default"] = v;
18
18
  });
19
- var __importStar = (this && this.__importStar) || function (mod) {
20
- if (mod && mod.__esModule) return mod;
21
- var result = {};
22
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
- __setModuleDefault(result, mod);
24
- return result;
25
- };
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
26
36
  var __importDefault = (this && this.__importDefault) || function (mod) {
27
37
  return (mod && mod.__esModule) ? mod : { "default": mod };
28
38
  };
@@ -16,13 +16,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
16
16
  }) : function(o, v) {
17
17
  o["default"] = v;
18
18
  });
19
- var __importStar = (this && this.__importStar) || function (mod) {
20
- if (mod && mod.__esModule) return mod;
21
- var result = {};
22
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
- __setModuleDefault(result, mod);
24
- return result;
25
- };
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
26
36
  var __importDefault = (this && this.__importDefault) || function (mod) {
27
37
  return (mod && mod.__esModule) ? mod : { "default": mod };
28
38
  };
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.configureCodeSigningAsync = void 0;
6
+ exports.configureCodeSigningAsync = configureCodeSigningAsync;
7
7
  const code_signing_certificates_1 = require("@expo/code-signing-certificates");
8
8
  const config_1 = require("@expo/config");
9
9
  const fs_1 = require("fs");
@@ -41,4 +41,3 @@ async function configureCodeSigningAsync(projectRoot, { certificateInput, keyInp
41
41
  });
42
42
  (0, log_1.log)(`Code signing configuration written to app configuration.`);
43
43
  }
44
- exports.configureCodeSigningAsync = configureCodeSigningAsync;
@@ -16,13 +16,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
16
16
  }) : function(o, v) {
17
17
  o["default"] = v;
18
18
  });
19
- var __importStar = (this && this.__importStar) || function (mod) {
20
- if (mod && mod.__esModule) return mod;
21
- var result = {};
22
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
- __setModuleDefault(result, mod);
24
- return result;
25
- };
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
26
36
  var __importDefault = (this && this.__importDefault) || function (mod) {
27
37
  return (mod && mod.__esModule) ? mod : { "default": mod };
28
38
  };
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.generateCodeSigningAsync = void 0;
6
+ exports.generateCodeSigningAsync = generateCodeSigningAsync;
7
7
  const code_signing_certificates_1 = require("@expo/code-signing-certificates");
8
8
  const assert_1 = __importDefault(require("assert"));
9
9
  const fs_1 = require("fs");
@@ -42,4 +42,3 @@ async function generateCodeSigningAsync(projectRoot, { certificateValidityDurati
42
42
  (0, log_1.log)(`Generated code signing certificate output in ${certificateOutputDir}.`);
43
43
  (0, log_1.log)(`To automatically configure this project for code signing, run \`yarn expo-updates codesigning:configure --certificate-input-directory=${certificateOutput} --key-input-directory=${keyOutput}\`.`);
44
44
  }
45
- exports.generateCodeSigningAsync = generateCodeSigningAsync;
@@ -16,13 +16,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
16
16
  }) : function(o, v) {
17
17
  o["default"] = v;
18
18
  });
19
- var __importStar = (this && this.__importStar) || function (mod) {
20
- if (mod && mod.__esModule) return mod;
21
- var result = {};
22
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
- __setModuleDefault(result, mod);
24
- return result;
25
- };
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
26
36
  var __importDefault = (this && this.__importDefault) || function (mod) {
27
37
  return (mod && mod.__esModule) ? mod : { "default": mod };
28
38
  };
@@ -16,13 +16,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
16
16
  }) : function(o, v) {
17
17
  o["default"] = v;
18
18
  });
19
- var __importStar = (this && this.__importStar) || function (mod) {
20
- if (mod && mod.__esModule) return mod;
21
- var result = {};
22
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
- __setModuleDefault(result, mod);
24
- return result;
25
- };
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
26
36
  var __importDefault = (this && this.__importDefault) || function (mod) {
27
37
  return (mod && mod.__esModule) ? mod : { "default": mod };
28
38
  };
@@ -16,13 +16,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
16
16
  }) : function(o, v) {
17
17
  o["default"] = v;
18
18
  });
19
- var __importStar = (this && this.__importStar) || function (mod) {
20
- if (mod && mod.__esModule) return mod;
21
- var result = {};
22
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
- __setModuleDefault(result, mod);
24
- return result;
25
- };
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
26
36
  var __importDefault = (this && this.__importDefault) || function (mod) {
27
37
  return (mod && mod.__esModule) ? mod : { "default": mod };
28
38
  };
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.syncConfigurationToNativeAsync = void 0;
6
+ exports.syncConfigurationToNativeAsync = syncConfigurationToNativeAsync;
7
7
  const config_1 = require("@expo/config");
8
8
  const config_plugins_1 = require("@expo/config-plugins");
9
9
  const plist_1 = __importDefault(require("@expo/plist"));
@@ -26,10 +26,9 @@ async function syncConfigurationToNativeAsync(options) {
26
26
  break;
27
27
  }
28
28
  }
29
- exports.syncConfigurationToNativeAsync = syncConfigurationToNativeAsync;
30
29
  async function syncConfigurationToNativeAndroidAsync(options) {
31
30
  const { exp } = (0, config_1.getConfig)(options.projectRoot, {
32
- isPublicConfig: false,
31
+ isPublicConfig: false, // This must be false or it will drop codesigning config
33
32
  skipSDKVersionRequirement: true,
34
33
  });
35
34
  const packageVersion = require('../../package.json').version;
@@ -51,7 +50,7 @@ async function syncConfigurationToNativeAndroidAsync(options) {
51
50
  }
52
51
  async function syncConfigurationToNativeIosAsync(options) {
53
52
  const { exp } = (0, config_1.getConfig)(options.projectRoot, {
54
- isPublicConfig: false,
53
+ isPublicConfig: false, // This must be false or it will drop codesigning config
55
54
  skipSDKVersionRequirement: true,
56
55
  });
57
56
  const packageVersion = require('../../package.json').version;
@@ -15,18 +15,30 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
37
  };
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.requireArg = exports.assertArgs = exports.getProjectRoot = void 0;
39
+ exports.getProjectRoot = getProjectRoot;
40
+ exports.assertArgs = assertArgs;
41
+ exports.requireArg = requireArg;
30
42
  // Common utilities for interacting with `args` library.
31
43
  // These functions should be used by every command.
32
44
  const arg_1 = __importDefault(require("arg"));
@@ -45,7 +57,6 @@ function getProjectRoot(args) {
45
57
  }
46
58
  return projectRoot;
47
59
  }
48
- exports.getProjectRoot = getProjectRoot;
49
60
  /**
50
61
  * Parse args and assert unknown options.
51
62
  *
@@ -66,7 +77,6 @@ function assertArgs(schema, argv) {
66
77
  throw error;
67
78
  }
68
79
  }
69
- exports.assertArgs = assertArgs;
70
80
  function requireArg(args, name) {
71
81
  const value = args[name];
72
82
  if (value === undefined || value === null) {
@@ -74,4 +84,3 @@ function requireArg(args, name) {
74
84
  }
75
85
  return value;
76
86
  }
77
- exports.requireArg = requireArg;
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ensureDirAsync = void 0;
3
+ exports.ensureDirAsync = ensureDirAsync;
4
4
  const fs_1 = require("fs");
5
5
  function ensureDirAsync(path) {
6
6
  return fs_1.promises.mkdir(path, { recursive: true });
7
7
  }
8
- exports.ensureDirAsync = ensureDirAsync;
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.logCmdError = exports.CommandError = void 0;
6
+ exports.CommandError = void 0;
7
+ exports.logCmdError = logCmdError;
7
8
  const assert_1 = require("assert");
8
9
  const chalk_1 = __importDefault(require("chalk"));
9
10
  const log_1 = require("./log");
@@ -38,4 +39,3 @@ function logCmdError(error) {
38
39
  const errorDetails = error.stack ? '\n' + chalk_1.default.gray(error.stack) : '';
39
40
  (0, log_1.exit)(chalk_1.default.red(error.toString()) + errorDetails);
40
41
  }
41
- exports.logCmdError = logCmdError;
@@ -3,38 +3,38 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.exit = exports.clear = exports.log = exports.warn = exports.exception = exports.error = exports.timeEnd = exports.time = void 0;
6
+ exports.time = time;
7
+ exports.timeEnd = timeEnd;
8
+ exports.error = error;
9
+ exports.exception = exception;
10
+ exports.warn = warn;
11
+ exports.log = log;
12
+ exports.clear = clear;
13
+ exports.exit = exit;
7
14
  const chalk_1 = __importDefault(require("chalk"));
8
15
  function time(label) {
9
16
  console.time(label);
10
17
  }
11
- exports.time = time;
12
18
  function timeEnd(label) {
13
19
  console.timeEnd(label);
14
20
  }
15
- exports.timeEnd = timeEnd;
16
21
  function error(...message) {
17
22
  console.error(...message);
18
23
  }
19
- exports.error = error;
20
24
  /** Print an error and provide additional info (the stack trace) in debug mode. */
21
25
  function exception(e) {
22
26
  error(chalk_1.default.red(e.toString()) + (process.env.EXPO_DEBUG ? '\n' + chalk_1.default.gray(e.stack) : ''));
23
27
  }
24
- exports.exception = exception;
25
28
  function warn(...message) {
26
29
  console.warn(...message.map((value) => chalk_1.default.yellow(value)));
27
30
  }
28
- exports.warn = warn;
29
31
  function log(...message) {
30
32
  console.log(...message);
31
33
  }
32
- exports.log = log;
33
34
  /** Clear the terminal of all text. */
34
35
  function clear() {
35
36
  process.stdout.write(process.platform === 'win32' ? '\x1B[2J\x1B[0f' : '\x1B[2J\x1B[3J\x1B[H');
36
37
  }
37
- exports.clear = clear;
38
38
  /** Log a message and exit the current process. If the `code` is non-zero then `console.error` will be used instead of `console.log`. */
39
39
  function exit(message, code = 1) {
40
40
  if (message instanceof Error) {
@@ -51,4 +51,3 @@ function exit(message, code = 1) {
51
51
  }
52
52
  process.exit(code);
53
53
  }
54
- exports.exit = exit;
@@ -15,18 +15,28 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
37
  };
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.attemptModification = void 0;
39
+ exports.attemptModification = attemptModification;
30
40
  const config_1 = require("@expo/config");
31
41
  const chalk_1 = __importDefault(require("chalk"));
32
42
  const Log = __importStar(require("./log"));
@@ -42,7 +52,6 @@ async function attemptModification(projectRoot, edits, exactEdits) {
42
52
  warnAboutConfigAndThrow(modification.type, modification.message, exactEdits);
43
53
  }
44
54
  }
45
- exports.attemptModification = attemptModification;
46
55
  function warnAboutConfigAndThrow(type, message, edits) {
47
56
  Log.log();
48
57
  if (type === 'warn') {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.withConsoleDisabledAsync = void 0;
3
+ exports.withConsoleDisabledAsync = withConsoleDisabledAsync;
4
4
  async function withConsoleDisabledAsync(block) {
5
5
  const loggingFunctions = {
6
6
  log: console.log,
@@ -21,4 +21,3 @@ async function withConsoleDisabledAsync(block) {
21
21
  console.error = loggingFunctions.error;
22
22
  }
23
23
  }
24
- exports.withConsoleDisabledAsync = withConsoleDisabledAsync;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-updates",
3
- "version": "0.28.1",
3
+ "version": "0.28.2",
4
4
  "description": "Fetches and manages remotely-hosted assets and updates to your app's JS bundle.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -39,8 +39,8 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@expo/code-signing-certificates": "0.0.5",
42
- "@expo/config": "~11.0.0",
43
- "@expo/config-plugins": "~9.1.1",
42
+ "@expo/config": "~11.0.1",
43
+ "@expo/config-plugins": "~9.1.2",
44
44
  "@expo/spawn-async": "^1.7.2",
45
45
  "arg": "4.1.0",
46
46
  "chalk": "^4.1.2",
@@ -54,9 +54,9 @@
54
54
  },
55
55
  "devDependencies": {
56
56
  "@types/jest": "^29.2.1",
57
- "@types/node": "^18.19.34",
57
+ "@types/node": "^22.14.0",
58
58
  "@types/node-forge": "^1.0.0",
59
- "expo-module-scripts": "^4.1.0",
59
+ "expo-module-scripts": "^4.1.1",
60
60
  "express": "^4.21.1",
61
61
  "form-data": "^4.0.0",
62
62
  "memfs": "^3.2.0",
@@ -66,5 +66,5 @@
66
66
  "expo": "*",
67
67
  "react": "*"
68
68
  },
69
- "gitHead": "2487c7aa9b5ef6a7052e82bbf9a53604c2ed273f"
69
+ "gitHead": "1914bb35d23af23078da37e70988261844436505"
70
70
  }
@@ -15,15 +15,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.createFingerprintAsync = void 0;
36
+ exports.createFingerprintAsync = createFingerprintAsync;
27
37
  const Fingerprint = __importStar(require("expo/fingerprint"));
28
38
  async function createFingerprintAsync(projectRoot, platform, workflow, options) {
29
39
  if (workflow === 'generic') {
@@ -42,4 +52,3 @@ async function createFingerprintAsync(projectRoot, platform, workflow, options)
42
52
  });
43
53
  }
44
54
  }
45
- exports.createFingerprintAsync = createFingerprintAsync;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.createFingerprintForBuildAsync = void 0;
6
+ exports.createFingerprintForBuildAsync = createFingerprintForBuildAsync;
7
7
  const config_1 = require("@expo/config");
8
8
  const fs_1 = __importDefault(require("fs"));
9
9
  const path_1 = __importDefault(require("path"));
@@ -52,4 +52,3 @@ async function createFingerprintForBuildAsync(platform, possibleProjectRoot, des
52
52
  }
53
53
  fs_1.default.writeFileSync(path_1.default.join(destinationDir, 'fingerprint'), fingerprint.hash);
54
54
  }
55
- exports.createFingerprintForBuildAsync = createFingerprintForBuildAsync;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.createManifestForBuildAsync = void 0;
6
+ exports.createManifestForBuildAsync = createManifestForBuildAsync;
7
7
  const exportEmbedAsync_1 = require("@expo/cli/build/src/export/embed/exportEmbedAsync");
8
8
  const metroAssetLocalPath_1 = require("@expo/cli/build/src/export/metroAssetLocalPath");
9
9
  const paths_1 = require("@expo/config/paths");
@@ -25,7 +25,7 @@ async function createManifestForBuildAsync(platform, projectRoot, destinationDir
25
25
  platform,
26
26
  entryFile,
27
27
  minify: false,
28
- dev: process.env.CONFIGURATION === 'Debug',
28
+ dev: process.env.CONFIGURATION === 'Debug', // ensures debug assets packaged correctly for iOS and native debug
29
29
  sourcemapUseAbsolutePath: false,
30
30
  };
31
31
  const { server, bundleRequest } = (await (0, exportEmbedAsync_1.createMetroServerAndBundleRequestAsync)(projectRoot, options));
@@ -76,7 +76,6 @@ async function createManifestForBuildAsync(platform, projectRoot, destinationDir
76
76
  });
77
77
  fs_1.default.writeFileSync(path_1.default.join(destinationDir, 'app.manifest'), JSON.stringify(manifest));
78
78
  }
79
- exports.createManifestForBuildAsync = createManifestForBuildAsync;
80
79
  function getAndroidResourceFolderName(asset) {
81
80
  return metroAssetLocalPath_1.drawableFileTypes.has(asset.type) ? 'drawable' : 'raw';
82
81
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // copied from https://github.com/react-native-community/cli/blob/48136adfb814d335e957e22129d049c4a05c8759/packages/cli/src/commands/bundle/filterPlatformAssetScales.ts
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.filterPlatformAssetScales = void 0;
4
+ exports.filterPlatformAssetScales = filterPlatformAssetScales;
5
5
  const ALLOWED_SCALES = {
6
6
  ios: [1, 2, 3],
7
7
  };
@@ -29,4 +29,3 @@ function filterPlatformAssetScales(platform, scales) {
29
29
  }
30
30
  return result;
31
31
  }
32
- exports.filterPlatformAssetScales = filterPlatformAssetScales;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.findUpProjectRoot = void 0;
6
+ exports.findUpProjectRoot = findUpProjectRoot;
7
7
  const fs_1 = __importDefault(require("fs"));
8
8
  const path_1 = __importDefault(require("path"));
9
9
  function findUpProjectRoot(cwd) {
@@ -17,4 +17,3 @@ function findUpProjectRoot(cwd) {
17
17
  return findUpProjectRoot(path_1.default.dirname(cwd));
18
18
  }
19
19
  }
20
- exports.findUpProjectRoot = findUpProjectRoot;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveRuntimeVersionAsync = void 0;
3
+ exports.resolveRuntimeVersionAsync = resolveRuntimeVersionAsync;
4
4
  const config_1 = require("@expo/config");
5
5
  const config_plugins_1 = require("@expo/config-plugins");
6
6
  const createFingerprintAsync_1 = require("./createFingerprintAsync");
@@ -32,4 +32,3 @@ async function resolveRuntimeVersionAsync(projectRoot, platform, fingerprintOpti
32
32
  workflow,
33
33
  };
34
34
  }
35
- exports.resolveRuntimeVersionAsync = resolveRuntimeVersionAsync;
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.default = getVCSClientAsync;
6
7
  const spawn_async_1 = __importDefault(require("@expo/spawn-async"));
7
8
  const promises_1 = __importDefault(require("fs/promises"));
8
9
  const glob_1 = require("glob");
@@ -16,7 +17,6 @@ async function getVCSClientAsync(projectDir) {
16
17
  return new NoVCSClient(projectDir);
17
18
  }
18
19
  }
19
- exports.default = getVCSClientAsync;
20
20
  class GitClient {
21
21
  async getRootPathAsync() {
22
22
  return (await (0, spawn_async_1.default)('git', ['rev-parse', '--show-toplevel'])).stdout.trim();
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.validateWorkflow = exports.resolveWorkflowAsync = void 0;
6
+ exports.resolveWorkflowAsync = resolveWorkflowAsync;
7
+ exports.validateWorkflow = validateWorkflow;
7
8
  const config_plugins_1 = require("@expo/config-plugins");
8
9
  const fs_1 = __importDefault(require("fs"));
9
10
  const path_1 = __importDefault(require("path"));
@@ -32,11 +33,9 @@ async function resolveWorkflowAsync(projectDir, platform) {
32
33
  }
33
34
  return 'managed';
34
35
  }
35
- exports.resolveWorkflowAsync = resolveWorkflowAsync;
36
36
  function validateWorkflow(possibleWorkflow) {
37
37
  if (possibleWorkflow === 'managed' || possibleWorkflow === 'generic') {
38
38
  return possibleWorkflow;
39
39
  }
40
40
  throw new Error(`Invalid workflow: ${possibleWorkflow}. Must be either 'managed' or 'generic'`);
41
41
  }
42
- exports.validateWorkflow = validateWorkflow;