expo-asset 8.4.5 → 8.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +3 -3
- package/build/Asset.d.ts +1 -0
- package/build/Asset.d.ts.map +1 -0
- package/build/Asset.fx.d.ts +1 -0
- package/build/Asset.fx.d.ts.map +1 -0
- package/build/Asset.fx.js +1 -1
- package/build/Asset.fx.js.map +1 -1
- package/build/AssetHooks.d.ts +1 -0
- package/build/AssetHooks.d.ts.map +1 -0
- package/build/AssetRegistry.d.ts +1 -0
- package/build/AssetRegistry.d.ts.map +1 -0
- package/build/AssetRegistry.web.d.ts +1 -0
- package/build/AssetRegistry.web.d.ts.map +1 -0
- package/build/AssetSourceResolver.d.ts +1 -0
- package/build/AssetSourceResolver.d.ts.map +1 -0
- package/build/AssetSourceResolver.web.d.ts +1 -0
- package/build/AssetSourceResolver.web.d.ts.map +1 -0
- package/build/AssetSources.d.ts +1 -0
- package/build/AssetSources.d.ts.map +1 -0
- package/build/AssetSources.js +1 -1
- package/build/AssetSources.js.map +1 -1
- package/build/AssetUris.d.ts +3 -2
- package/build/AssetUris.d.ts.map +1 -0
- package/build/AssetUris.js +2 -2
- package/build/AssetUris.js.map +1 -1
- package/build/ImageAssets.d.ts +1 -0
- package/build/ImageAssets.d.ts.map +1 -0
- package/build/LocalAssets.d.ts +1 -0
- package/build/LocalAssets.d.ts.map +1 -0
- package/build/LocalAssets.web.d.ts +1 -0
- package/build/LocalAssets.web.d.ts.map +1 -0
- package/build/PlatformUtils.d.ts +1 -0
- package/build/PlatformUtils.d.ts.map +1 -0
- package/build/PlatformUtils.web.d.ts +2 -0
- package/build/PlatformUtils.web.d.ts.map +1 -0
- package/build/PlatformUtils.web.js +3 -0
- package/build/PlatformUtils.web.js.map +1 -1
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -0
- package/build/resolveAssetSource.d.ts +1 -0
- package/build/resolveAssetSource.d.ts.map +1 -0
- package/build/resolveAssetSource.web.d.ts +1 -0
- package/build/resolveAssetSource.web.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/Asset.fx.ts +1 -1
- package/src/AssetSources.ts +1 -1
- package/src/AssetUris.ts +2 -2
- package/src/PlatformUtils.web.ts +4 -0
- package/tsconfig.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,22 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 8.6.0 — 2022-07-07
|
|
14
|
+
|
|
15
|
+
_This version does not introduce any user-facing changes._
|
|
16
|
+
|
|
17
|
+
## 8.5.0 — 2022-04-18
|
|
18
|
+
|
|
19
|
+
### 💡 Others
|
|
20
|
+
|
|
21
|
+
- Swap out Cloudfront CDN for `classic-assets.eascdn.net`. ([#15781](https://github.com/expo/expo/pull/15781)) by [@quinlanj](https://github.com/quinlanj)
|
|
22
|
+
|
|
23
|
+
## 8.4.6 - 2022-01-13
|
|
24
|
+
|
|
25
|
+
### 🐛 Bug fixes
|
|
26
|
+
|
|
27
|
+
- Fix missing `getManifest2()` function on web. ([#15891](https://github.com/expo/expo/pull/15891)) by [@jonsamp](https://github.com/jonsamp) ([#15891](https://github.com/expo/expo/pull/15891) by [@jonsamp](https://github.com/jonsamp))
|
|
28
|
+
|
|
13
29
|
## 8.4.5 — 2021-12-21
|
|
14
30
|
|
|
15
31
|
### 🐛 Bug fixes
|
package/README.md
CHANGED
|
@@ -4,12 +4,12 @@ An Expo universal module to download assets and pass them into other APIs
|
|
|
4
4
|
|
|
5
5
|
# API documentation
|
|
6
6
|
|
|
7
|
-
- [Documentation for the
|
|
8
|
-
- [Documentation for the latest stable release](https://docs.expo.
|
|
7
|
+
- [Documentation for the main branch](https://github.com/expo/expo/blob/main/docs/pages/versions/unversioned/sdk/asset.md)
|
|
8
|
+
- [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/asset/)
|
|
9
9
|
|
|
10
10
|
# Installation in managed Expo projects
|
|
11
11
|
|
|
12
|
-
For
|
|
12
|
+
For [managed](https://docs.expo.dev/versions/latest/introduction/managed-vs-bare/) Expo projects, please follow the installation instructions in the [API documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/asset/). If you follow the link and there is no documentation available then this library is not yet usable within managed projects — it is likely to be included in an upcoming Expo SDK release.
|
|
13
13
|
|
|
14
14
|
# Installation in bare React Native projects
|
|
15
15
|
|
package/build/Asset.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Asset.d.ts","sourceRoot":"","sources":["../src/Asset.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAqB,MAAM,gBAAgB,CAAC;AAQlE,oBAAY,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;AAEF,aAAK,wBAAwB,GAAG;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAChC,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC;AAGzB;;;GAGG;AACH,qBAAa,KAAK;IAChB;;OAEG;IACH,MAAM,CAAC,MAAM,KAAM;IACnB;;OAEG;IACH,MAAM,CAAC,KAAK,KAAM;IAElB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC3B;;;;;OAKG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC/B;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC5B;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE7B,WAAW,EAAE,OAAO,CAAS;IAE7B,UAAU,EAAE,OAAO,CAAS;IAE5B;;OAEG;IACH,kBAAkB,EAAE,wBAAwB,EAAE,CAAM;gBAExC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAW,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,eAAe;IA+B5E;;;;;;;;;;OAUG;IACH,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IAMnF;;;;;OAKG;IACH,MAAM,CAAC,UAAU,CAAC,kBAAkB,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK;IAwC7D,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,aAAa,GAAG,KAAK;IAsB/C,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK;IA2BlC;;;;;;;OAOG;IACG,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;CAoCrC"}
|
package/build/Asset.fx.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Asset.fx.d.ts","sourceRoot":"","sources":["../src/Asset.fx.ts"],"names":[],"mappings":""}
|
package/build/Asset.fx.js
CHANGED
package/build/Asset.fx.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Asset.fx.js","sourceRoot":"","sources":["../src/Asset.fx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sB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CAAC,CAAC,CAAC;CACJ","sourcesContent":["import { Asset } from './Asset';\nimport { IS_ENV_WITH_UPDATES_ENABLED } from './PlatformUtils';\nimport { setCustomSourceTransformer } from './resolveAssetSource';\n\n// Override React Native's asset resolution for `Image` components in contexts where it matters\nif (IS_ENV_WITH_UPDATES_ENABLED) {\n setCustomSourceTransformer((resolver) => {\n try {\n // Bundler is using the hashAssetFiles plugin if and only if the fileHashes property exists\n if (resolver.asset.fileHashes) {\n const asset = Asset.fromMetadata(resolver.asset);\n return resolver.fromSource(asset.downloaded ? asset.localUri! : asset.uri);\n } else {\n return resolver.defaultAsset();\n }\n } catch {\n return resolver.defaultAsset();\n }\n });\n}\n"]}
|
package/build/AssetHooks.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssetHooks.d.ts","sourceRoot":"","sources":["../src/AssetHooks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,CAAC,KAAK,EAAE,GAAG,SAAS,EAAE,KAAK,GAAG,SAAS,CAAC,CAShG"}
|
package/build/AssetRegistry.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssetRegistry.d.ts","sourceRoot":"","sources":["../src/AssetRegistry.ts"],"names":[],"mappings":"AAAA,cAAc,4CAA4C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssetRegistry.web.d.ts","sourceRoot":"","sources":["../src/AssetRegistry.web.ts"],"names":[],"mappings":"AAAA,cAAc,6CAA6C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssetSourceResolver.d.ts","sourceRoot":"","sources":["../src/AssetSourceResolver.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,M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IAAI,mBAAmB;IAG7C,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,mBAAmB;IAU/C,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM;CAQhE"}
|
package/build/AssetSources.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssetSources.d.ts","sourceRoot":"","sources":["../src/AssetSources.ts"],"names":[],"mappings":"AASA,oBAAY,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAEF,oBAAY,WAAW,GAAG;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAKF;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,aAAa,GAAG,WAAW,CAiElE;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAc9C"}
|
package/build/AssetSources.js
CHANGED
|
@@ -60,7 +60,7 @@ export function selectAssetSource(meta) {
|
|
|
60
60
|
}
|
|
61
61
|
// Production CDN URIs are based on each asset file hash
|
|
62
62
|
return {
|
|
63
|
-
uri: `https://
|
|
63
|
+
uri: `https://classic-assets.eascdn.net/~assets/${encodeURIComponent(hash)}`,
|
|
64
64
|
hash,
|
|
65
65
|
};
|
|
66
66
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
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AC;KACpC;IAED,wDAAwD;IACxD,OAAO;QACL,GAAG,EAAE,6CAA6C,kBAAkB,CAAC,IAAI,CAAC,EAAE;QAC5E,IAAI;KACL,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,GAAW;IACpC,IAAI,CAAC,eAAe,EAAE;QACpB,OAAO,GAAG,CAAC;KACZ;IAED,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;IAClC,IAAI,QAAQ,KAAK,EAAE,EAAE;QACnB,OAAO,GAAG,CAAC;KACZ;IAED,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,eAAe,CAAC,CAAC;IACzC,MAAM,YAAY,GAAG,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAClF,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IACtC,OAAO,OAAO,CAAC,IAAI,CAAC;AACtB,CAAC","sourcesContent":["import { Platform } from 'expo-modules-core';\nimport path from 'path-browserify';\nimport { PixelRatio } from 'react-native';\nimport URL from 'url-parse';\n\nimport AssetSourceResolver from './AssetSourceResolver';\nimport { manifestBaseUrl, getManifest, getManifest2 } from './PlatformUtils';\n\n// @docsMissing\nexport type AssetMetadata = {\n hash: string;\n name: string;\n type: string;\n width?: number;\n height?: number;\n scales: number[];\n httpServerLocation: string;\n uri?: string;\n fileHashes?: string[];\n fileUris?: string[];\n};\n\nexport type AssetSource = {\n uri: string;\n hash: string;\n};\n\n// Fast lookup check if asset map has any overrides in the manifest\nconst assetMapOverride = getManifest().assetMapOverride;\n\n/**\n * Selects the best file for the given asset (ex: choosing the best scale for images) and returns\n * a { uri, hash } pair for the specific asset file.\n *\n * If the asset isn't an image with multiple scales, the first file is selected.\n */\nexport function selectAssetSource(meta: AssetMetadata): AssetSource {\n // Override with the asset map in manifest if available\n if (assetMapOverride && assetMapOverride.hasOwnProperty(meta.hash)) {\n meta = { ...meta, ...assetMapOverride[meta.hash] };\n }\n\n // This logic is based on that of AssetSourceResolver, with additional support for file hashes and\n // explicitly provided URIs\n const scale = AssetSourceResolver.pickScale(meta.scales, PixelRatio.get());\n const index = meta.scales.findIndex((s) => s === scale);\n const hash = meta.fileHashes ? meta.fileHashes[index] || meta.fileHashes[0] : meta.hash;\n\n // Allow asset processors to directly provide the URL to load\n const uri = meta.fileUris ? meta.fileUris[index] || meta.fileUris[0] : meta.uri;\n if (uri) {\n return { uri: resolveUri(uri), hash };\n }\n\n // Check if the assetUrl was overridden in the manifest\n const assetUrlOverride = getManifest().assetUrlOverride;\n if (assetUrlOverride) {\n const uri = path.join(assetUrlOverride, hash);\n return { uri: resolveUri(uri), hash };\n }\n\n const fileScale = scale === 1 ? '' : `@${scale}x`;\n const fileExtension = meta.type ? `.${encodeURIComponent(meta.type)}` : '';\n const suffix = `/${encodeURIComponent(\n meta.name\n )}${fileScale}${fileExtension}?platform=${encodeURIComponent(\n Platform.OS\n )}&hash=${encodeURIComponent(meta.hash)}`;\n\n // For assets with a specified absolute URL, we use the existing origin instead of prepending the\n // development server or production CDN URL origin\n if (/^https?:\\/\\//.test(meta.httpServerLocation)) {\n const uri = meta.httpServerLocation + suffix;\n return { uri, hash };\n }\n\n // For assets during development using manifest2, we use the development server's URL origin\n const manifest2 = getManifest2();\n\n if (manifest2?.extra?.expoGo?.developer) {\n const baseUrl = new URL(`http://${manifest2.extra.expoGo.debuggerHost}`);\n baseUrl.set('pathname', meta.httpServerLocation + suffix);\n\n return {\n uri: baseUrl.href,\n hash,\n };\n }\n\n // For assets during development, we use the development server's URL origin\n if (getManifest().developer) {\n const baseUrl = new URL(getManifest().bundleUrl);\n baseUrl.set('pathname', meta.httpServerLocation + suffix);\n return { uri: baseUrl.href, hash };\n }\n\n // Production CDN URIs are based on each asset file hash\n return {\n uri: `https://classic-assets.eascdn.net/~assets/${encodeURIComponent(hash)}`,\n hash,\n };\n}\n\n/**\n * Resolves the given URI to an absolute URI. If the given URI is already an absolute URI, it is\n * simply returned. Otherwise, if it is a relative URI, it is resolved relative to the manifest's\n * base URI.\n */\nexport function resolveUri(uri: string): string {\n if (!manifestBaseUrl) {\n return uri;\n }\n\n const { protocol } = new URL(uri);\n if (protocol !== '') {\n return uri;\n }\n\n const baseUrl = new URL(manifestBaseUrl);\n const resolvedPath = uri.startsWith('/') ? uri : path.join(baseUrl.pathname, uri);\n baseUrl.set('pathname', resolvedPath);\n return baseUrl.href;\n}\n"]}
|
package/build/AssetUris.d.ts
CHANGED
|
@@ -5,10 +5,11 @@ export declare function getFileExtension(url: string): string;
|
|
|
5
5
|
* https://example.com/app/manifest.json, the base URL would be https://example.com/app/. Query
|
|
6
6
|
* parameters and fragments also are removed.
|
|
7
7
|
*
|
|
8
|
-
* For an Expo-hosted project with a manifest hosted at https://
|
|
9
|
-
* base URL would be https://
|
|
8
|
+
* For an Expo-hosted project with a manifest hosted at https://exp.host/@user/project/index.exp, the
|
|
9
|
+
* base URL would be https://exp.host/@user/project.
|
|
10
10
|
*
|
|
11
11
|
* We also normalize the "exp" protocol to "http" to handle internal URLs with the Expo schemes used
|
|
12
12
|
* to tell the OS to open the URLs in the the Expo client.
|
|
13
13
|
*/
|
|
14
14
|
export declare function getManifestBaseUrl(manifestUrl: string): string;
|
|
15
|
+
//# sourceMappingURL=AssetUris.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssetUris.d.ts","sourceRoot":"","sources":["../src/AssetUris.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG/C;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAKpD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAiB9D"}
|
package/build/AssetUris.js
CHANGED
|
@@ -14,8 +14,8 @@ export function getFileExtension(url) {
|
|
|
14
14
|
* https://example.com/app/manifest.json, the base URL would be https://example.com/app/. Query
|
|
15
15
|
* parameters and fragments also are removed.
|
|
16
16
|
*
|
|
17
|
-
* For an Expo-hosted project with a manifest hosted at https://
|
|
18
|
-
* base URL would be https://
|
|
17
|
+
* For an Expo-hosted project with a manifest hosted at https://exp.host/@user/project/index.exp, the
|
|
18
|
+
* base URL would be https://exp.host/@user/project.
|
|
19
19
|
*
|
|
20
20
|
* We also normalize the "exp" protocol to "http" to handle internal URLs with the Expo schemes used
|
|
21
21
|
* to tell the OS to open the URLs in the the Expo client.
|
package/build/AssetUris.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssetUris.js","sourceRoot":"","sources":["../src/AssetUris.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,WAAW,CAAC;AAE5B,MAAM,UAAU,WAAW,CAAC,GAAW;IACrC,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACtC,OAAO,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,GAAW;IAC1C,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;IAClC,MAAM,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAC3C,uCAAuC;IACvC,OAAO,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC1D,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,kBAAkB,CAAC,WAAmB;IACpD,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IAE3C,+CAA+C;IAC/C,IAAI,SAAS,CAAC,QAAQ,KAAK,MAAM,EAAE;QACjC,SAAS,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;KACpC;SAAM,IAAI,SAAS,CAAC,QAAQ,KAAK,OAAO,EAAE;QACzC,SAAS,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;KACrC;IAED,wDAAwD;IACxD,MAAM,SAAS,GAAG,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3F,SAAS,CAAC,GAAG,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IACrC,SAAS,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC3B,SAAS,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAE1B,OAAO,SAAS,CAAC,IAAI,CAAC;AACxB,CAAC","sourcesContent":["import URL from 'url-parse';\n\nexport function getFilename(url: string): string {\n const { pathname } = new URL(url, {});\n return pathname.substring(pathname.lastIndexOf('/') + 1);\n}\n\nexport function getFileExtension(url: string): string {\n const filename = getFilename(url);\n const dotIndex = filename.lastIndexOf('.');\n // Ignore leading dots for hidden files\n return dotIndex > 0 ? filename.substring(dotIndex) : '';\n}\n\n/**\n * Returns the base URL from a manifest's URL. For example, given a manifest hosted at\n * https://example.com/app/manifest.json, the base URL would be https://example.com/app/. Query\n * parameters and fragments also are removed.\n *\n * For an Expo-hosted project with a manifest hosted at https://
|
|
1
|
+
{"version":3,"file":"AssetUris.js","sourceRoot":"","sources":["../src/AssetUris.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,WAAW,CAAC;AAE5B,MAAM,UAAU,WAAW,CAAC,GAAW;IACrC,MAAM,EAAE,QAAQ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,IAAI,CAAC;AACxB,CAAC","sourcesContent":["import URL from 'url-parse';\n\nexport function getFilename(url: string): string {\n const { pathname } = new URL(url, {});\n return pathname.substring(pathname.lastIndexOf('/') + 1);\n}\n\nexport function getFileExtension(url: string): string {\n const filename = getFilename(url);\n const dotIndex = filename.lastIndexOf('.');\n // Ignore leading dots for hidden files\n return dotIndex > 0 ? filename.substring(dotIndex) : '';\n}\n\n/**\n * Returns the base URL from a manifest's URL. For example, given a manifest hosted at\n * https://example.com/app/manifest.json, the base URL would be https://example.com/app/. Query\n * parameters and fragments also are removed.\n *\n * For an Expo-hosted project with a manifest hosted at https://exp.host/@user/project/index.exp, the\n * base URL would be https://exp.host/@user/project.\n *\n * We also normalize the \"exp\" protocol to \"http\" to handle internal URLs with the Expo schemes used\n * to tell the OS to open the URLs in the the Expo client.\n */\nexport function getManifestBaseUrl(manifestUrl: string): string {\n const urlObject = new URL(manifestUrl, {});\n\n // Change the scheme to http(s) if it is exp(s)\n if (urlObject.protocol === 'exp:') {\n urlObject.set('protocol', 'http:');\n } else if (urlObject.protocol === 'exps:') {\n urlObject.set('protocol', 'https:');\n }\n\n // Trim filename, query parameters, and fragment, if any\n const directory = urlObject.pathname.substring(0, urlObject.pathname.lastIndexOf('/') + 1);\n urlObject.set('pathname', directory);\n urlObject.set('query', '');\n urlObject.set('hash', '');\n\n return urlObject.href;\n}\n"]}
|
package/build/ImageAssets.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageAssets.d.ts","sourceRoot":"","sources":["../src/ImageAssets.ts"],"names":[],"mappings":"AAGA,aAAK,SAAS,GAAG;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAajE"}
|
package/build/LocalAssets.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocalAssets.d.ts","sourceRoot":"","sources":["../src/LocalAssets.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAwBjF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocalAssets.web.d.ts","sourceRoot":"","sources":["../src/LocalAssets.web.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAGjF"}
|
package/build/PlatformUtils.d.ts
CHANGED
|
@@ -10,3 +10,4 @@ export declare function getManifest(): {
|
|
|
10
10
|
export declare function getManifest2(): Manifest | undefined;
|
|
11
11
|
export declare const manifestBaseUrl: string | null;
|
|
12
12
|
export declare function downloadAsync(uri: any, hash: any, type: any, name: any): Promise<string>;
|
|
13
|
+
//# sourceMappingURL=PlatformUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlatformUtils.d.ts","sourceRoot":"","sources":["../src/PlatformUtils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAOhE,eAAO,MAAM,cAAc,SAA2B,CAAC;AAKvD,eAAO,MAAM,wBAAwB,SAKmB,CAAC;AAEzD,eAAO,MAAM,2BAA2B,SAA6C,CAAC;AAGtF,eAAO,MAAM,2BAA2B,SAA+C,CAAC;AAIxF,wBAAgB,cAAc,QAE7B;AAED,wBAAgB,WAAW,IAAI;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,CAEpD;AAED,wBAAgB,YAAY,IAAI,QAAQ,GAAG,SAAS,CAEnD;AAGD,eAAO,MAAM,eAAe,eAEpB,CAAC;AAGT,wBAAsB,aAAa,CAAC,GAAG,KAAA,EAAE,IAAI,KAAA,EAAE,IAAI,KAAA,EAAE,IAAI,KAAA,GAAG,OAAO,CAAC,MAAM,CAAC,CAM1E"}
|
|
@@ -4,3 +4,5 @@ export declare const IS_ENV_WITHOUT_UPDATES_ENABLED = false;
|
|
|
4
4
|
export declare const manifestBaseUrl: null;
|
|
5
5
|
export declare function downloadAsync(uri: any, hash: any, type: any, name: any): Promise<string>;
|
|
6
6
|
export declare function getManifest(): {};
|
|
7
|
+
export declare function getManifest2(): {};
|
|
8
|
+
//# sourceMappingURL=PlatformUtils.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlatformUtils.web.d.ts","sourceRoot":"","sources":["../src/PlatformUtils.web.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,QAAQ,CAAC;AACpC,eAAO,MAAM,2BAA2B,QAAQ,CAAC;AACjD,eAAO,MAAM,8BAA8B,QAAQ,CAAC;AAGpD,eAAO,MAAM,eAAe,MAAO,CAAC;AAEpC,wBAAsB,aAAa,CAAC,GAAG,KAAA,EAAE,IAAI,KAAA,EAAE,IAAI,KAAA,EAAE,IAAI,KAAA,GAAG,OAAO,CAAC,MAAM,CAAC,CAE1E;AAED,wBAAgB,WAAW,OAE1B;AAED,wBAAgB,YAAY,OAE3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformUtils.web.js","sourceRoot":"","sources":["../src/PlatformUtils.web.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC;AACpC,MAAM,CAAC,MAAM,2BAA2B,GAAG,KAAK,CAAC;AACjD,MAAM,CAAC,MAAM,8BAA8B,GAAG,KAAK,CAAC;AAEpD,yCAAyC;AACzC,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC;AAEpC,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IACvD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,UAAU,WAAW;IACzB,OAAO,EAAE,CAAC;AACZ,CAAC","sourcesContent":["export const IS_MANAGED_ENV = false;\nexport const IS_ENV_WITH_UPDATES_ENABLED = false;\nexport const IS_ENV_WITHOUT_UPDATES_ENABLED = false;\n\n// Compute manifest base URL if available\nexport const manifestBaseUrl = null;\n\nexport async function downloadAsync(uri, hash, type, name): Promise<string> {\n return uri;\n}\n\nexport function getManifest() {\n return {};\n}\n"]}
|
|
1
|
+
{"version":3,"file":"PlatformUtils.web.js","sourceRoot":"","sources":["../src/PlatformUtils.web.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC;AACpC,MAAM,CAAC,MAAM,2BAA2B,GAAG,KAAK,CAAC;AACjD,MAAM,CAAC,MAAM,8BAA8B,GAAG,KAAK,CAAC;AAEpD,yCAAyC;AACzC,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC;AAEpC,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IACvD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,UAAU,WAAW;IACzB,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,OAAO,EAAE,CAAC;AACZ,CAAC","sourcesContent":["export const IS_MANAGED_ENV = false;\nexport const IS_ENV_WITH_UPDATES_ENABLED = false;\nexport const IS_ENV_WITHOUT_UPDATES_ENABLED = false;\n\n// Compute manifest base URL if available\nexport const manifestBaseUrl = null;\n\nexport async function downloadAsync(uri, hash, type, name): Promise<string> {\n return uri;\n}\n\nexport function getManifest() {\n return {};\n}\n\nexport function getManifest2() {\n return {};\n}\n"]}
|
package/build/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,CAAC;AAEpB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveAssetSource.d.ts","sourceRoot":"","sources":["../src/resolveAssetSource.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,iDAAiD,CAAC;AACjF,eAAe,kBAAkB,CAAC;AAClC,cAAc,iDAAiD,CAAC"}
|
|
@@ -6,3 +6,4 @@ export declare function setCustomSourceTransformer(transformer: (resolver: Asset
|
|
|
6
6
|
*/
|
|
7
7
|
export default function resolveAssetSource(source: any): ResolvedAssetSource | undefined;
|
|
8
8
|
export declare const pickScale: typeof AssetSourceResolver.pickScale;
|
|
9
|
+
//# sourceMappingURL=resolveAssetSource.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveAssetSource.web.d.ts","sourceRoot":"","sources":["../src/resolveAssetSource.web.ts"],"names":[],"mappings":"AAGA,OAAO,mBAAmB,EAAE,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAoCjF,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,CAAC,QAAQ,EAAE,mBAAmB,KAAK,mBAAmB,GAClE,IAAI,CAEN;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,MAAM,EAAE,GAAG,GAAG,mBAAmB,GAAG,SAAS,CAevF;AAQD,eAAO,MAAQ,SAAS,sCAAwB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-asset",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.6.0",
|
|
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",
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
"invariant": "^2.2.4",
|
|
42
42
|
"md5-file": "^3.2.3",
|
|
43
43
|
"path-browserify": "^1.0.0",
|
|
44
|
-
"url-parse": "^1.
|
|
44
|
+
"url-parse": "^1.5.9"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@testing-library/react-hooks": "^7.0.1",
|
|
48
48
|
"@types/url-parse": "^1.4.1",
|
|
49
49
|
"expo-module-scripts": "^2.0.0"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "093d340c3fd67ff4375af3a471c7d044aee893c9"
|
|
52
52
|
}
|
package/src/Asset.fx.ts
CHANGED
package/src/AssetSources.ts
CHANGED
|
@@ -96,7 +96,7 @@ export function selectAssetSource(meta: AssetMetadata): AssetSource {
|
|
|
96
96
|
|
|
97
97
|
// Production CDN URIs are based on each asset file hash
|
|
98
98
|
return {
|
|
99
|
-
uri: `https://
|
|
99
|
+
uri: `https://classic-assets.eascdn.net/~assets/${encodeURIComponent(hash)}`,
|
|
100
100
|
hash,
|
|
101
101
|
};
|
|
102
102
|
}
|
package/src/AssetUris.ts
CHANGED
|
@@ -17,8 +17,8 @@ export function getFileExtension(url: string): string {
|
|
|
17
17
|
* https://example.com/app/manifest.json, the base URL would be https://example.com/app/. Query
|
|
18
18
|
* parameters and fragments also are removed.
|
|
19
19
|
*
|
|
20
|
-
* For an Expo-hosted project with a manifest hosted at https://
|
|
21
|
-
* base URL would be https://
|
|
20
|
+
* For an Expo-hosted project with a manifest hosted at https://exp.host/@user/project/index.exp, the
|
|
21
|
+
* base URL would be https://exp.host/@user/project.
|
|
22
22
|
*
|
|
23
23
|
* We also normalize the "exp" protocol to "http" to handle internal URLs with the Expo schemes used
|
|
24
24
|
* to tell the OS to open the URLs in the the Expo client.
|
package/src/PlatformUtils.web.ts
CHANGED
package/tsconfig.json
CHANGED