expo-asset 12.0.4 → 12.0.5

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 (42) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/android/build.gradle +2 -2
  3. package/build/Asset.d.ts +8 -0
  4. package/build/Asset.d.ts.map +1 -1
  5. package/build/Asset.js +8 -0
  6. package/build/Asset.js.map +1 -1
  7. package/expo-module.config.json +1 -1
  8. package/local-maven-repo/expo/modules/asset/expo.modules.asset/{12.0.4/expo.modules.asset-12.0.4.module → 12.0.5/expo.modules.asset-12.0.5.module} +7 -7
  9. package/local-maven-repo/expo/modules/asset/expo.modules.asset/12.0.5/expo.modules.asset-12.0.5.module.md5 +1 -0
  10. package/local-maven-repo/expo/modules/asset/expo.modules.asset/12.0.5/expo.modules.asset-12.0.5.module.sha1 +1 -0
  11. package/local-maven-repo/expo/modules/asset/expo.modules.asset/12.0.5/expo.modules.asset-12.0.5.module.sha256 +1 -0
  12. package/local-maven-repo/expo/modules/asset/expo.modules.asset/12.0.5/expo.modules.asset-12.0.5.module.sha512 +1 -0
  13. package/local-maven-repo/expo/modules/asset/expo.modules.asset/{12.0.4/expo.modules.asset-12.0.4.pom → 12.0.5/expo.modules.asset-12.0.5.pom} +1 -1
  14. package/local-maven-repo/expo/modules/asset/expo.modules.asset/12.0.5/expo.modules.asset-12.0.5.pom.md5 +1 -0
  15. package/local-maven-repo/expo/modules/asset/expo.modules.asset/12.0.5/expo.modules.asset-12.0.5.pom.sha1 +1 -0
  16. package/local-maven-repo/expo/modules/asset/expo.modules.asset/12.0.5/expo.modules.asset-12.0.5.pom.sha256 +1 -0
  17. package/local-maven-repo/expo/modules/asset/expo.modules.asset/12.0.5/expo.modules.asset-12.0.5.pom.sha512 +1 -0
  18. package/local-maven-repo/expo/modules/asset/expo.modules.asset/maven-metadata.xml +4 -4
  19. package/local-maven-repo/expo/modules/asset/expo.modules.asset/maven-metadata.xml.md5 +1 -1
  20. package/local-maven-repo/expo/modules/asset/expo.modules.asset/maven-metadata.xml.sha1 +1 -1
  21. package/local-maven-repo/expo/modules/asset/expo.modules.asset/maven-metadata.xml.sha256 +1 -1
  22. package/local-maven-repo/expo/modules/asset/expo.modules.asset/maven-metadata.xml.sha512 +1 -1
  23. package/package.json +5 -5
  24. package/src/Asset.ts +8 -0
  25. package/local-maven-repo/expo/modules/asset/expo.modules.asset/12.0.4/expo.modules.asset-12.0.4.module.md5 +0 -1
  26. package/local-maven-repo/expo/modules/asset/expo.modules.asset/12.0.4/expo.modules.asset-12.0.4.module.sha1 +0 -1
  27. package/local-maven-repo/expo/modules/asset/expo.modules.asset/12.0.4/expo.modules.asset-12.0.4.module.sha256 +0 -1
  28. package/local-maven-repo/expo/modules/asset/expo.modules.asset/12.0.4/expo.modules.asset-12.0.4.module.sha512 +0 -1
  29. package/local-maven-repo/expo/modules/asset/expo.modules.asset/12.0.4/expo.modules.asset-12.0.4.pom.md5 +0 -1
  30. package/local-maven-repo/expo/modules/asset/expo.modules.asset/12.0.4/expo.modules.asset-12.0.4.pom.sha1 +0 -1
  31. package/local-maven-repo/expo/modules/asset/expo.modules.asset/12.0.4/expo.modules.asset-12.0.4.pom.sha256 +0 -1
  32. package/local-maven-repo/expo/modules/asset/expo.modules.asset/12.0.4/expo.modules.asset-12.0.4.pom.sha512 +0 -1
  33. /package/local-maven-repo/expo/modules/asset/expo.modules.asset/{12.0.4/expo.modules.asset-12.0.4-sources.jar → 12.0.5/expo.modules.asset-12.0.5-sources.jar} +0 -0
  34. /package/local-maven-repo/expo/modules/asset/expo.modules.asset/{12.0.4/expo.modules.asset-12.0.4-sources.jar.md5 → 12.0.5/expo.modules.asset-12.0.5-sources.jar.md5} +0 -0
  35. /package/local-maven-repo/expo/modules/asset/expo.modules.asset/{12.0.4/expo.modules.asset-12.0.4-sources.jar.sha1 → 12.0.5/expo.modules.asset-12.0.5-sources.jar.sha1} +0 -0
  36. /package/local-maven-repo/expo/modules/asset/expo.modules.asset/{12.0.4/expo.modules.asset-12.0.4-sources.jar.sha256 → 12.0.5/expo.modules.asset-12.0.5-sources.jar.sha256} +0 -0
  37. /package/local-maven-repo/expo/modules/asset/expo.modules.asset/{12.0.4/expo.modules.asset-12.0.4-sources.jar.sha512 → 12.0.5/expo.modules.asset-12.0.5-sources.jar.sha512} +0 -0
  38. /package/local-maven-repo/expo/modules/asset/expo.modules.asset/{12.0.4/expo.modules.asset-12.0.4.aar → 12.0.5/expo.modules.asset-12.0.5.aar} +0 -0
  39. /package/local-maven-repo/expo/modules/asset/expo.modules.asset/{12.0.4/expo.modules.asset-12.0.4.aar.md5 → 12.0.5/expo.modules.asset-12.0.5.aar.md5} +0 -0
  40. /package/local-maven-repo/expo/modules/asset/expo.modules.asset/{12.0.4/expo.modules.asset-12.0.4.aar.sha1 → 12.0.5/expo.modules.asset-12.0.5.aar.sha1} +0 -0
  41. /package/local-maven-repo/expo/modules/asset/expo.modules.asset/{12.0.4/expo.modules.asset-12.0.4.aar.sha256 → 12.0.5/expo.modules.asset-12.0.5.aar.sha256} +0 -0
  42. /package/local-maven-repo/expo/modules/asset/expo.modules.asset/{12.0.4/expo.modules.asset-12.0.4.aar.sha512 → 12.0.5/expo.modules.asset-12.0.5.aar.sha512} +0 -0
package/CHANGELOG.md CHANGED
@@ -10,6 +10,10 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 12.0.5 — 2025-08-27
14
+
15
+ _This version does not introduce any user-facing changes._
16
+
13
17
  ## 12.0.4 — 2025-08-25
14
18
 
15
19
  _This version does not introduce any user-facing changes._
@@ -4,13 +4,13 @@ plugins {
4
4
  }
5
5
 
6
6
  group = 'expo.modules.asset'
7
- version = '12.0.4'
7
+ version = '12.0.5'
8
8
 
9
9
  android {
10
10
  namespace "expo.modules.asset"
11
11
  defaultConfig {
12
12
  versionCode 1
13
- versionName "12.0.4"
13
+ versionName "12.0.5"
14
14
  }
15
15
  }
16
16
 
package/build/Asset.d.ts CHANGED
@@ -94,6 +94,14 @@ export declare class Asset {
94
94
  * to a local file containing the asset data. The asset is only downloaded if an up-to-date local
95
95
  * file for the asset isn't already present due to an earlier download. The downloaded `Asset`
96
96
  * will be returned when the promise is resolved.
97
+ *
98
+ * > **Note:** There is no guarantee that files downloaded via `downloadAsync` persist between app sessions.
99
+ * `downloadAsync` stores files in the caches directory, so it's up to the OS to clear this folder at its
100
+ * own discretion or when the user manually purges the caches directory. Downloaded assets are stored as
101
+ * `ExponentAsset-{cacheFileId}.{extension}` within the cache directory.
102
+ * > To manually clear cached assets, you can use [`expo-file-system`](./filesystem/) to
103
+ * delete the cache directory: `Paths.cache.delete()` or use the legacy API `deleteAsync(cacheDirectory)`.
104
+ *
97
105
  * @return Returns a Promise which fulfills with an `Asset` instance.
98
106
  */
99
107
  downloadAsync(): Promise<this>;
@@ -1 +1 @@
1
- {"version":3,"file":"Asset.d.ts","sourceRoot":"","sources":["../src/Asset.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAqB,MAAM,gBAAgB,CAAC;AASlE,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB,CAAC;AAOF,OAAO,EAAE,aAAa,EAAE,CAAC;AAEzB;;;GAGG;AACH,eAAO,MAAM,kCAAkC,yBAAyB,CAAC;AAEzE;;;GAGG;AACH,qBAAa,KAAK;IAChB,OAAO,CAAC,MAAM,CAAC,MAAM,CAAyC;IAC9D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAyC;IAE7D;;;OAGG;IACI,IAAI,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B;;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,GAAG,MAAM,GAAG;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GACnF,KAAK;IAwDR,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,aAAa,GAAG,KAAK;IAuB/C,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK;IA2BlC;;;;;;;;;;;;;;;OAeG;IACG,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;CAoCrC"}
package/build/Asset.js CHANGED
@@ -212,6 +212,14 @@ export class Asset {
212
212
  * to a local file containing the asset data. The asset is only downloaded if an up-to-date local
213
213
  * file for the asset isn't already present due to an earlier download. The downloaded `Asset`
214
214
  * will be returned when the promise is resolved.
215
+ *
216
+ * > **Note:** There is no guarantee that files downloaded via `downloadAsync` persist between app sessions.
217
+ * `downloadAsync` stores files in the caches directory, so it's up to the OS to clear this folder at its
218
+ * own discretion or when the user manually purges the caches directory. Downloaded assets are stored as
219
+ * `ExponentAsset-{cacheFileId}.{extension}` within the cache directory.
220
+ * > To manually clear cached assets, you can use [`expo-file-system`](./filesystem/) to
221
+ * delete the cache directory: `Paths.cache.delete()` or use the legacy API `deleteAsync(cacheDirectory)`.
222
+ *
215
223
  * @return Returns a Promise which fulfills with an `Asset` instance.
216
224
  */
217
225
  async downloadAsync() {
@@ -1 +1 @@
1
- {"version":3,"file":"Asset.js","sourceRoot":"","sources":["../src/Asset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAiB,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAC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,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE,CAAC;gBAC1B,IAAI,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;oBACvC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,WAAW,CAAC,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;oBAC9E,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;oBACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;oBACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;gBACnB,CAAC;qBAAM,CAAC;oBACN,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAC9C,CAAC;YACH,CAAC;YACD,IAAI,CAAC,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YAEpE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;YACvB,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;QAC9D,CAAC;QAAC,OAAO,CAAM,EAAE,CAAC;YAChB,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3D,MAAM,CAAC,CAAC;QACV,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;YACzB,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;QAC/B,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC","sourcesContent":["import { getAssetByID } from '@react-native/assets-registry/registry';\nimport { Platform } from 'expo-modules-core';\n\nimport { AssetMetadata, selectAssetSource } from './AssetSources';\nimport * as AssetUris from './AssetUris';\nimport { downloadAsync } from './ExpoAsset';\nimport * as ImageAssets from './ImageAssets';\nimport { getLocalAssetUri } from './LocalAssets';\nimport { IS_ENV_WITH_LOCAL_ASSETS } from './PlatformUtils';\nimport resolveAssetSource from './resolveAssetSource';\n\n// @docsMissing\nexport type AssetDescriptor = {\n name: string;\n type: string;\n hash?: string | null;\n uri: string;\n width?: number | null;\n height?: number | null;\n};\n\ntype DownloadPromiseCallbacks = {\n resolve: () => void;\n reject: (error: Error) => void;\n};\n\nexport { AssetMetadata };\n\n/**\n * Android resource URL prefix.\n * @hidden\n */\nexport const ANDROID_EMBEDDED_URL_BASE_RESOURCE = 'file:///android_res/';\n\n/**\n * The `Asset` class represents an asset in your app. It gives metadata about the asset (such as its\n * name and type) and provides facilities to load the asset data.\n */\nexport class Asset {\n private static byHash: Record<string, Asset | undefined> = {};\n private static byUri: Record<string, Asset | undefined> = {};\n\n /**\n * The name of the asset file without the extension. Also without the part from `@` onward in the\n * filename (used to specify scale factor for images).\n */\n public name: string;\n /**\n * The extension of the asset filename.\n */\n public readonly type: string;\n /**\n * The MD5 hash of the asset's data.\n */\n public readonly hash: string | null = null;\n /**\n * A URI that points to the asset's data on the remote server. When running the published version\n * of your app, this refers to the location on Expo's asset server where Expo has stored your\n * asset. When running the app from Expo CLI during development, this URI points to Expo CLI's\n * server running on your computer and the asset is served directly from your computer. If you\n * are not using Classic Updates (legacy), this field should be ignored as we ensure your assets\n * are on device before running your application logic.\n */\n public readonly uri: string;\n /**\n * If the asset has been downloaded (by calling [`downloadAsync()`](#downloadasync)), the\n * `file://` URI pointing to the local file on the device that contains the asset data.\n */\n public localUri: string | null = null;\n /**\n * If the asset is an image, the width of the image data divided by the scale factor. The scale\n * factor is the number after `@` in the filename, or `1` if not present.\n */\n public width: number | null = null;\n /**\n * If the asset is an image, the height of the image data divided by the scale factor. The scale factor is the number after `@` in the filename, or `1` if not present.\n */\n public height: number | null = null;\n\n private downloading: boolean = false;\n\n /**\n * Whether the asset has finished downloading from a call to [`downloadAsync()`](#downloadasync).\n */\n public downloaded: boolean = false;\n\n private _downloadCallbacks: DownloadPromiseCallbacks[] = [];\n\n constructor({ name, type, hash = null, uri, width, height }: AssetDescriptor) {\n this.name = name;\n this.type = type;\n this.hash = hash;\n this.uri = uri;\n\n if (typeof width === 'number') {\n this.width = width;\n }\n if (typeof height === 'number') {\n this.height = height;\n }\n\n if (hash) {\n this.localUri = getLocalAssetUri(hash, type);\n if (this.localUri?.startsWith(ANDROID_EMBEDDED_URL_BASE_RESOURCE)) {\n // Treat Android embedded resources as not downloaded state, because the uri is not direct accessible.\n this.uri = this.localUri;\n this.localUri = null;\n } else if (this.localUri) {\n this.downloaded = true;\n }\n }\n\n if (Platform.OS === 'web') {\n if (!name) {\n this.name = AssetUris.getFilename(uri);\n }\n if (!type) {\n this.type = AssetUris.getFileExtension(uri);\n }\n }\n }\n\n // @needsAudit\n /**\n * A helper that wraps `Asset.fromModule(module).downloadAsync` for convenience.\n * @param moduleId An array of `require('path/to/file')` or external network URLs. Can also be\n * just one module or URL without an Array.\n * @return Returns a Promise that fulfills with an array of `Asset`s when the asset(s) has been\n * saved to disk.\n * @example\n * ```ts\n * const [{ localUri }] = await Asset.loadAsync(require('./assets/snack-icon.png'));\n * ```\n */\n static loadAsync(moduleId: number | number[] | string | string[]): Promise<Asset[]> {\n const moduleIds = Array.isArray(moduleId) ? moduleId : [moduleId];\n return Promise.all(moduleIds.map((moduleId) => Asset.fromModule(moduleId).downloadAsync()));\n }\n\n // @needsAudit\n /**\n * Returns the [`Asset`](#asset) instance representing an asset given its module or URL.\n * @param virtualAssetModule The value of `require('path/to/file')` for the asset or external\n * network URL\n * @return The [`Asset`](#asset) instance for the asset.\n */\n static fromModule(\n virtualAssetModule: number | string | { uri: string; width: number; height: number }\n ): Asset {\n if (typeof virtualAssetModule === 'string') {\n return Asset.fromURI(virtualAssetModule);\n }\n if (\n typeof virtualAssetModule === 'object' &&\n 'uri' in virtualAssetModule &&\n typeof virtualAssetModule.uri === 'string'\n ) {\n const extension = AssetUris.getFileExtension(virtualAssetModule.uri);\n return new Asset({\n name: '',\n type: extension.startsWith('.') ? extension.substring(1) : extension,\n hash: null,\n uri: virtualAssetModule.uri,\n width: virtualAssetModule.width,\n height: virtualAssetModule.height,\n });\n }\n\n const meta = getAssetByID(virtualAssetModule);\n if (!meta) {\n throw new Error(`Module \"${virtualAssetModule}\" is missing from the asset registry`);\n }\n\n // Outside of the managed env we need the moduleId to initialize the asset\n // because resolveAssetSource depends on it\n if (!IS_ENV_WITH_LOCAL_ASSETS) {\n // null-check is performed above with `getAssetByID`.\n const { uri } = resolveAssetSource(virtualAssetModule)!;\n\n const asset = new Asset({\n name: meta.name,\n type: meta.type,\n hash: meta.hash,\n uri,\n width: meta.width,\n height: meta.height,\n });\n\n // For images backward compatibility,\n // keeps localUri the same as uri for React Native's Image that\n // works fine with drawable resource names.\n if (Platform.OS === 'android' && !uri.includes(':') && (meta.width || meta.height)) {\n asset.localUri = asset.uri;\n asset.downloaded = true;\n }\n\n Asset.byHash[meta.hash] = asset;\n return asset;\n }\n\n return Asset.fromMetadata(meta);\n }\n\n // @docsMissing\n static fromMetadata(meta: AssetMetadata): Asset {\n // The hash of the whole asset, not to be confused with the hash of a specific file returned\n // from `selectAssetSource`\n const metaHash = meta.hash;\n const assetByHash = Asset.byHash[metaHash];\n if (assetByHash) {\n return assetByHash;\n }\n\n const { uri, hash } = selectAssetSource(meta);\n const asset = new Asset({\n name: meta.name,\n type: meta.type,\n hash,\n uri,\n width: meta.width,\n height: meta.height,\n });\n Asset.byHash[metaHash] = asset;\n return asset;\n }\n\n // @docsMissing\n static fromURI(uri: string): Asset {\n if (Asset.byUri[uri]) {\n return Asset.byUri[uri];\n }\n\n // Possibly a Base64-encoded URI\n let type = '';\n if (uri.indexOf(';base64') > -1) {\n type = uri.split(';')[0].split('/')[1];\n } else {\n const extension = AssetUris.getFileExtension(uri);\n type = extension.startsWith('.') ? extension.substring(1) : extension;\n }\n\n const asset = new Asset({\n name: '',\n type,\n hash: null,\n uri,\n });\n\n Asset.byUri[uri] = asset;\n\n return asset;\n }\n\n // @needsAudit\n /**\n * Downloads the asset data to a local file in the device's cache directory. Once the returned\n * promise is fulfilled without error, the [`localUri`](#localuri) field of this asset points\n * to a local file containing the asset data. The asset is only downloaded if an up-to-date local\n * file for the asset isn't already present due to an earlier download. The downloaded `Asset`\n * will be returned when the promise is resolved.\n * @return Returns a Promise which fulfills with an `Asset` instance.\n */\n async downloadAsync(): Promise<this> {\n if (this.downloaded) {\n return this;\n }\n if (this.downloading) {\n await new Promise<void>((resolve, reject) => {\n this._downloadCallbacks.push({ resolve, reject });\n });\n return this;\n }\n this.downloading = true;\n\n try {\n if (Platform.OS === 'web') {\n if (ImageAssets.isImageType(this.type)) {\n const { width, height, name } = await ImageAssets.getImageInfoAsync(this.uri);\n this.width = width;\n this.height = height;\n this.name = name;\n } else {\n this.name = AssetUris.getFilename(this.uri);\n }\n }\n this.localUri = await downloadAsync(this.uri, this.hash, this.type);\n\n this.downloaded = true;\n this._downloadCallbacks.forEach(({ resolve }) => resolve());\n } catch (e: any) {\n this._downloadCallbacks.forEach(({ reject }) => reject(e));\n throw e;\n } finally {\n this.downloading = false;\n this._downloadCallbacks = [];\n }\n return this;\n }\n}\n"]}
1
+ {"version":3,"file":"Asset.js","sourceRoot":"","sources":["../src/Asset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAiB,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC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,CAAC;gBAC1B,IAAI,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;oBACvC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,WAAW,CAAC,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;oBAC9E,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;oBACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;oBACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;gBACnB,CAAC;qBAAM,CAAC;oBACN,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAC9C,CAAC;YACH,CAAC;YACD,IAAI,CAAC,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YAEpE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;YACvB,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;QAC9D,CAAC;QAAC,OAAO,CAAM,EAAE,CAAC;YAChB,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3D,MAAM,CAAC,CAAC;QACV,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;YACzB,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;QAC/B,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC","sourcesContent":["import { getAssetByID } from '@react-native/assets-registry/registry';\nimport { Platform } from 'expo-modules-core';\n\nimport { AssetMetadata, selectAssetSource } from './AssetSources';\nimport * as AssetUris from './AssetUris';\nimport { downloadAsync } from './ExpoAsset';\nimport * as ImageAssets from './ImageAssets';\nimport { getLocalAssetUri } from './LocalAssets';\nimport { IS_ENV_WITH_LOCAL_ASSETS } from './PlatformUtils';\nimport resolveAssetSource from './resolveAssetSource';\n\n// @docsMissing\nexport type AssetDescriptor = {\n name: string;\n type: string;\n hash?: string | null;\n uri: string;\n width?: number | null;\n height?: number | null;\n};\n\ntype DownloadPromiseCallbacks = {\n resolve: () => void;\n reject: (error: Error) => void;\n};\n\nexport { AssetMetadata };\n\n/**\n * Android resource URL prefix.\n * @hidden\n */\nexport const ANDROID_EMBEDDED_URL_BASE_RESOURCE = 'file:///android_res/';\n\n/**\n * The `Asset` class represents an asset in your app. It gives metadata about the asset (such as its\n * name and type) and provides facilities to load the asset data.\n */\nexport class Asset {\n private static byHash: Record<string, Asset | undefined> = {};\n private static byUri: Record<string, Asset | undefined> = {};\n\n /**\n * The name of the asset file without the extension. Also without the part from `@` onward in the\n * filename (used to specify scale factor for images).\n */\n public name: string;\n /**\n * The extension of the asset filename.\n */\n public readonly type: string;\n /**\n * The MD5 hash of the asset's data.\n */\n public readonly hash: string | null = null;\n /**\n * A URI that points to the asset's data on the remote server. When running the published version\n * of your app, this refers to the location on Expo's asset server where Expo has stored your\n * asset. When running the app from Expo CLI during development, this URI points to Expo CLI's\n * server running on your computer and the asset is served directly from your computer. If you\n * are not using Classic Updates (legacy), this field should be ignored as we ensure your assets\n * are on device before running your application logic.\n */\n public readonly uri: string;\n /**\n * If the asset has been downloaded (by calling [`downloadAsync()`](#downloadasync)), the\n * `file://` URI pointing to the local file on the device that contains the asset data.\n */\n public localUri: string | null = null;\n /**\n * If the asset is an image, the width of the image data divided by the scale factor. The scale\n * factor is the number after `@` in the filename, or `1` if not present.\n */\n public width: number | null = null;\n /**\n * If the asset is an image, the height of the image data divided by the scale factor. The scale factor is the number after `@` in the filename, or `1` if not present.\n */\n public height: number | null = null;\n\n private downloading: boolean = false;\n\n /**\n * Whether the asset has finished downloading from a call to [`downloadAsync()`](#downloadasync).\n */\n public downloaded: boolean = false;\n\n private _downloadCallbacks: DownloadPromiseCallbacks[] = [];\n\n constructor({ name, type, hash = null, uri, width, height }: AssetDescriptor) {\n this.name = name;\n this.type = type;\n this.hash = hash;\n this.uri = uri;\n\n if (typeof width === 'number') {\n this.width = width;\n }\n if (typeof height === 'number') {\n this.height = height;\n }\n\n if (hash) {\n this.localUri = getLocalAssetUri(hash, type);\n if (this.localUri?.startsWith(ANDROID_EMBEDDED_URL_BASE_RESOURCE)) {\n // Treat Android embedded resources as not downloaded state, because the uri is not direct accessible.\n this.uri = this.localUri;\n this.localUri = null;\n } else if (this.localUri) {\n this.downloaded = true;\n }\n }\n\n if (Platform.OS === 'web') {\n if (!name) {\n this.name = AssetUris.getFilename(uri);\n }\n if (!type) {\n this.type = AssetUris.getFileExtension(uri);\n }\n }\n }\n\n // @needsAudit\n /**\n * A helper that wraps `Asset.fromModule(module).downloadAsync` for convenience.\n * @param moduleId An array of `require('path/to/file')` or external network URLs. Can also be\n * just one module or URL without an Array.\n * @return Returns a Promise that fulfills with an array of `Asset`s when the asset(s) has been\n * saved to disk.\n * @example\n * ```ts\n * const [{ localUri }] = await Asset.loadAsync(require('./assets/snack-icon.png'));\n * ```\n */\n static loadAsync(moduleId: number | number[] | string | string[]): Promise<Asset[]> {\n const moduleIds = Array.isArray(moduleId) ? moduleId : [moduleId];\n return Promise.all(moduleIds.map((moduleId) => Asset.fromModule(moduleId).downloadAsync()));\n }\n\n // @needsAudit\n /**\n * Returns the [`Asset`](#asset) instance representing an asset given its module or URL.\n * @param virtualAssetModule The value of `require('path/to/file')` for the asset or external\n * network URL\n * @return The [`Asset`](#asset) instance for the asset.\n */\n static fromModule(\n virtualAssetModule: number | string | { uri: string; width: number; height: number }\n ): Asset {\n if (typeof virtualAssetModule === 'string') {\n return Asset.fromURI(virtualAssetModule);\n }\n if (\n typeof virtualAssetModule === 'object' &&\n 'uri' in virtualAssetModule &&\n typeof virtualAssetModule.uri === 'string'\n ) {\n const extension = AssetUris.getFileExtension(virtualAssetModule.uri);\n return new Asset({\n name: '',\n type: extension.startsWith('.') ? extension.substring(1) : extension,\n hash: null,\n uri: virtualAssetModule.uri,\n width: virtualAssetModule.width,\n height: virtualAssetModule.height,\n });\n }\n\n const meta = getAssetByID(virtualAssetModule);\n if (!meta) {\n throw new Error(`Module \"${virtualAssetModule}\" is missing from the asset registry`);\n }\n\n // Outside of the managed env we need the moduleId to initialize the asset\n // because resolveAssetSource depends on it\n if (!IS_ENV_WITH_LOCAL_ASSETS) {\n // null-check is performed above with `getAssetByID`.\n const { uri } = resolveAssetSource(virtualAssetModule)!;\n\n const asset = new Asset({\n name: meta.name,\n type: meta.type,\n hash: meta.hash,\n uri,\n width: meta.width,\n height: meta.height,\n });\n\n // For images backward compatibility,\n // keeps localUri the same as uri for React Native's Image that\n // works fine with drawable resource names.\n if (Platform.OS === 'android' && !uri.includes(':') && (meta.width || meta.height)) {\n asset.localUri = asset.uri;\n asset.downloaded = true;\n }\n\n Asset.byHash[meta.hash] = asset;\n return asset;\n }\n\n return Asset.fromMetadata(meta);\n }\n\n // @docsMissing\n static fromMetadata(meta: AssetMetadata): Asset {\n // The hash of the whole asset, not to be confused with the hash of a specific file returned\n // from `selectAssetSource`\n const metaHash = meta.hash;\n const assetByHash = Asset.byHash[metaHash];\n if (assetByHash) {\n return assetByHash;\n }\n\n const { uri, hash } = selectAssetSource(meta);\n const asset = new Asset({\n name: meta.name,\n type: meta.type,\n hash,\n uri,\n width: meta.width,\n height: meta.height,\n });\n Asset.byHash[metaHash] = asset;\n return asset;\n }\n\n // @docsMissing\n static fromURI(uri: string): Asset {\n if (Asset.byUri[uri]) {\n return Asset.byUri[uri];\n }\n\n // Possibly a Base64-encoded URI\n let type = '';\n if (uri.indexOf(';base64') > -1) {\n type = uri.split(';')[0].split('/')[1];\n } else {\n const extension = AssetUris.getFileExtension(uri);\n type = extension.startsWith('.') ? extension.substring(1) : extension;\n }\n\n const asset = new Asset({\n name: '',\n type,\n hash: null,\n uri,\n });\n\n Asset.byUri[uri] = asset;\n\n return asset;\n }\n\n // @needsAudit\n /**\n * Downloads the asset data to a local file in the device's cache directory. Once the returned\n * promise is fulfilled without error, the [`localUri`](#localuri) field of this asset points\n * to a local file containing the asset data. The asset is only downloaded if an up-to-date local\n * file for the asset isn't already present due to an earlier download. The downloaded `Asset`\n * will be returned when the promise is resolved.\n *\n * > **Note:** There is no guarantee that files downloaded via `downloadAsync` persist between app sessions.\n * `downloadAsync` stores files in the caches directory, so it's up to the OS to clear this folder at its\n * own discretion or when the user manually purges the caches directory. Downloaded assets are stored as\n * `ExponentAsset-{cacheFileId}.{extension}` within the cache directory.\n * > To manually clear cached assets, you can use [`expo-file-system`](./filesystem/) to\n * delete the cache directory: `Paths.cache.delete()` or use the legacy API `deleteAsync(cacheDirectory)`.\n *\n * @return Returns a Promise which fulfills with an `Asset` instance.\n */\n async downloadAsync(): Promise<this> {\n if (this.downloaded) {\n return this;\n }\n if (this.downloading) {\n await new Promise<void>((resolve, reject) => {\n this._downloadCallbacks.push({ resolve, reject });\n });\n return this;\n }\n this.downloading = true;\n\n try {\n if (Platform.OS === 'web') {\n if (ImageAssets.isImageType(this.type)) {\n const { width, height, name } = await ImageAssets.getImageInfoAsync(this.uri);\n this.width = width;\n this.height = height;\n this.name = name;\n } else {\n this.name = AssetUris.getFilename(this.uri);\n }\n }\n this.localUri = await downloadAsync(this.uri, this.hash, this.type);\n\n this.downloaded = true;\n this._downloadCallbacks.forEach(({ resolve }) => resolve());\n } catch (e: any) {\n this._downloadCallbacks.forEach(({ reject }) => reject(e));\n throw e;\n } finally {\n this.downloading = false;\n this._downloadCallbacks = [];\n }\n return this;\n }\n}\n"]}
@@ -8,7 +8,7 @@
8
8
  "publication": {
9
9
  "groupId": "expo.modules.asset",
10
10
  "artifactId": "expo.modules.asset",
11
- "version": "12.0.4",
11
+ "version": "12.0.5",
12
12
  "repository": "local-maven-repo"
13
13
  }
14
14
  }
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "expo.modules.asset",
5
5
  "module": "expo.modules.asset",
6
- "version": "12.0.4",
6
+ "version": "12.0.5",
7
7
  "attributes": {
8
8
  "org.gradle.status": "release"
9
9
  }
@@ -24,8 +24,8 @@
24
24
  },
25
25
  "files": [
26
26
  {
27
- "name": "expo.modules.asset-12.0.4.aar",
28
- "url": "expo.modules.asset-12.0.4.aar",
27
+ "name": "expo.modules.asset-12.0.5.aar",
28
+ "url": "expo.modules.asset-12.0.5.aar",
29
29
  "size": 19485,
30
30
  "sha512": "c14871a6ed215ea5e531e1abe1a85de21b894e19de4827a6e9ee490bbf76c74ca070a3eb0aa10f94bad14b8c3bf90b7647d74e1d8a9c5da77dad3d4f6a1577ce",
31
31
  "sha256": "54335e6dff866b59534581daca0ad02ae89dfdc95619de6d011f0c13dc0e4a5b",
@@ -53,8 +53,8 @@
53
53
  ],
54
54
  "files": [
55
55
  {
56
- "name": "expo.modules.asset-12.0.4.aar",
57
- "url": "expo.modules.asset-12.0.4.aar",
56
+ "name": "expo.modules.asset-12.0.5.aar",
57
+ "url": "expo.modules.asset-12.0.5.aar",
58
58
  "size": 19485,
59
59
  "sha512": "c14871a6ed215ea5e531e1abe1a85de21b894e19de4827a6e9ee490bbf76c74ca070a3eb0aa10f94bad14b8c3bf90b7647d74e1d8a9c5da77dad3d4f6a1577ce",
60
60
  "sha256": "54335e6dff866b59534581daca0ad02ae89dfdc95619de6d011f0c13dc0e4a5b",
@@ -73,8 +73,8 @@
73
73
  },
74
74
  "files": [
75
75
  {
76
- "name": "expo.modules.asset-12.0.4-sources.jar",
77
- "url": "expo.modules.asset-12.0.4-sources.jar",
76
+ "name": "expo.modules.asset-12.0.5-sources.jar",
77
+ "url": "expo.modules.asset-12.0.5-sources.jar",
78
78
  "size": 3222,
79
79
  "sha512": "2c473bac2a1292c15a232c5c238cd518913556efa769a2c8e3de3634687f24aaa66a3bd5b08faf653867fd512e167f1cb9bb202896ebc84f7fbff1d2200d0383",
80
80
  "sha256": "f56f56b4e1c0a28b7e0c51b8e7485930eef0e0fb709eae41fe0a656a9540c261",
@@ -0,0 +1 @@
1
+ 6b84e5bc41b4fa8384697117bf53a3453c8a8d288c84d8113296bb5c4f9882c7
@@ -0,0 +1 @@
1
+ faff54b0de44145f6f77d864a826644b3b065d38b223a63ff52ba42ce8775506b1a3a788bf5b30e35a7020bf82e61cef0d5dff9fead07a786322acb5006fb006
@@ -9,7 +9,7 @@
9
9
  <modelVersion>4.0.0</modelVersion>
10
10
  <groupId>expo.modules.asset</groupId>
11
11
  <artifactId>expo.modules.asset</artifactId>
12
- <version>12.0.4</version>
12
+ <version>12.0.5</version>
13
13
  <packaging>aar</packaging>
14
14
  <name>expo.modules.asset</name>
15
15
  <url>https://github.com/expo/expo</url>
@@ -0,0 +1 @@
1
+ a36c4cd3d930a6adc632fbc79758e1cc6b4b0b74b5559e48aef841d225123cf4
@@ -0,0 +1 @@
1
+ 9f936a93f83fa599b815615a8406daa68ea76048162aac48bc6706ab150a0a1dce852e8f6470e780a34466c394c66f5e754343f43b820286350d753ef27e4ec8
@@ -3,11 +3,11 @@
3
3
  <groupId>expo.modules.asset</groupId>
4
4
  <artifactId>expo.modules.asset</artifactId>
5
5
  <versioning>
6
- <latest>12.0.4</latest>
7
- <release>12.0.4</release>
6
+ <latest>12.0.5</latest>
7
+ <release>12.0.5</release>
8
8
  <versions>
9
- <version>12.0.4</version>
9
+ <version>12.0.5</version>
10
10
  </versions>
11
- <lastUpdated>20250825183818</lastUpdated>
11
+ <lastUpdated>20250827210802</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- 24ad2bc3ab577494a254aad8ceca54d8
1
+ c1f6d4a4c775cf7149f95f0f2464081c
@@ -1 +1 @@
1
- 5829150f41f4139ec870d3d5e7b41e45d0ef7de7
1
+ 0cb9078973cd7487bf713d79ee0a1676e2f78e40
@@ -1 +1 @@
1
- 93994a3815bb382d3bfcd87167645b0a2942c0017c972a4a9a7631e6c9799abc
1
+ 854cb004e8caef0cbe825ad51734d76cbd0f88b277a2d69ddd5fa3f386c16c5a
@@ -1 +1 @@
1
- a05893f18dd76b0a634cc040c04d90804d708ac95ed60f57800eb1d864771d4b6cbebf23e79978114db88c637c68d7f65919d7811a03ceed64bf3191f5c8caf6
1
+ 784b80b15a7d5cc4dc1aae733b0199796cc7a4e733d2309663df618d47d47da33b969ab0b647907a622f9fe0f395da864492bc8c896f5e1baef728d055c68f5b
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-asset",
3
- "version": "12.0.4",
3
+ "version": "12.0.5",
4
4
  "description": "An Expo universal module to download assets and pass them into other APIs",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -48,19 +48,19 @@
48
48
  "preset": "expo-module-scripts"
49
49
  },
50
50
  "dependencies": {
51
- "@expo/image-utils": "^0.8.3",
52
- "expo-constants": "~18.0.4"
51
+ "@expo/image-utils": "^0.8.4",
52
+ "expo-constants": "~18.0.5"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@testing-library/react-native": "^13.2.0",
56
56
  "@types/node": "^22.14.0",
57
57
  "@types/react-native__assets": "^1.0.3",
58
- "expo-module-scripts": "^5.0.3"
58
+ "expo-module-scripts": "^5.0.4"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "expo": "*",
62
62
  "react": "*",
63
63
  "react-native": "*"
64
64
  },
65
- "gitHead": "bbd466e1bdb1ba2aa6ba64192f58e900ea7478bc"
65
+ "gitHead": "48faa7b9a9f93a7660cb80aa118c7f6bf0aeff38"
66
66
  }
package/src/Asset.ts CHANGED
@@ -258,6 +258,14 @@ export class Asset {
258
258
  * to a local file containing the asset data. The asset is only downloaded if an up-to-date local
259
259
  * file for the asset isn't already present due to an earlier download. The downloaded `Asset`
260
260
  * will be returned when the promise is resolved.
261
+ *
262
+ * > **Note:** There is no guarantee that files downloaded via `downloadAsync` persist between app sessions.
263
+ * `downloadAsync` stores files in the caches directory, so it's up to the OS to clear this folder at its
264
+ * own discretion or when the user manually purges the caches directory. Downloaded assets are stored as
265
+ * `ExponentAsset-{cacheFileId}.{extension}` within the cache directory.
266
+ * > To manually clear cached assets, you can use [`expo-file-system`](./filesystem/) to
267
+ * delete the cache directory: `Paths.cache.delete()` or use the legacy API `deleteAsync(cacheDirectory)`.
268
+ *
261
269
  * @return Returns a Promise which fulfills with an `Asset` instance.
262
270
  */
263
271
  async downloadAsync(): Promise<this> {
@@ -1 +0,0 @@
1
- b1e8c21e830aad26d3c1e7b5a13fc01b1ba9a44c073afa9375e0b1221514f09e
@@ -1 +0,0 @@
1
- 355200a4d3110def52ac69543b2cabdc9269aa10b8b4bcd8d4fd2a7f42adf4b90c2644f73a6d60f30565e20f50ebddfcf743f019a6059f34d9652a3799ac3af7
@@ -1 +0,0 @@
1
- f62fed536d360fa11eb0cbc53e46b0c05a84f02e
@@ -1 +0,0 @@
1
- ce3e1ce33ec1b721dc4e79cbe1600ec92d9c1b6ca7f5a346f43177ca91a1d34c
@@ -1 +0,0 @@
1
- a11182d5748ee213aee70913deb33cba10f703b0498481989515ef7c9eec301c4174e32408267fce95984b0723da60678f57c6801828c8a7594af48a734348ed