@react-native-firebase/storage 21.12.0 → 21.12.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.
- package/CHANGELOG.md +10 -0
- package/lib/modular/index.d.ts +14 -8
- package/lib/modular/index.js +1 -1
- package/lib/version.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,16 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [21.12.2](https://github.com/invertase/react-native-firebase/compare/v21.12.1...v21.12.2) (2025-03-23)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @react-native-firebase/storage
|
9
|
+
|
10
|
+
## [21.12.1](https://github.com/invertase/react-native-firebase/compare/v21.12.0...v21.12.1) (2025-03-22)
|
11
|
+
|
12
|
+
### Bug Fixes
|
13
|
+
|
14
|
+
- **storage:** Type defs storage ([#8387](https://github.com/invertase/react-native-firebase/issues/8387)) ([12ddc18](https://github.com/invertase/react-native-firebase/commit/12ddc18205a763913a45b2b6962276f80f022f4c))
|
15
|
+
|
6
16
|
## [21.12.0](https://github.com/invertase/react-native-firebase/compare/v21.11.0...v21.12.0) (2025-03-03)
|
7
17
|
|
8
18
|
**Note:** Version bump only for package @react-native-firebase/storage
|
package/lib/modular/index.d.ts
CHANGED
@@ -27,6 +27,7 @@ import Task = FirebaseStorageTypes.Task;
|
|
27
27
|
import ListOptions = FirebaseStorageTypes.ListOptions;
|
28
28
|
import SettableMetadata = FirebaseStorageTypes.SettableMetadata;
|
29
29
|
import EmulatorMockTokenOptions = FirebaseStorageTypes.EmulatorMockTokenOptions;
|
30
|
+
import StringFormat = FirebaseStorageTypes.StringFormat;
|
30
31
|
import FirebaseApp = ReactNativeFirebase.FirebaseApp;
|
31
32
|
|
32
33
|
export const StringFormat: FirebaseStorageTypes.StringFormat;
|
@@ -37,10 +38,11 @@ export const TaskState: FirebaseStorageTypes.TaskState;
|
|
37
38
|
* Returns the existing default {@link Storage} instance that is associated with the
|
38
39
|
* default {@link FirebaseApp}. The default storage bucket is used. If no instance exists, initializes a new
|
39
40
|
* instance with default settings.
|
40
|
-
*
|
41
|
+
* @param app - Firebase app to get FirebaseStorage instance for.
|
42
|
+
* @param bucketUrl - The gs:// url to your Firebase Storage Bucket. If not passed, uses the app's default Storage Bucket.
|
41
43
|
* @returns The {@link Storage} instance of the provided app.
|
42
44
|
*/
|
43
|
-
export declare function getStorage(): Storage;
|
45
|
+
export declare function getStorage(app?: FirebaseApp, bucketUrl?: string): Storage;
|
44
46
|
|
45
47
|
/**
|
46
48
|
* Returns the existing default {@link Storage} instance that is associated with the
|
@@ -99,18 +101,22 @@ export function deleteObject(storageRef: Reference): Promise<void>;
|
|
99
101
|
/**
|
100
102
|
* Retrieves the blob at the given reference's location. Throws an error if the object is not found.
|
101
103
|
* @param storageRef - The {@link Reference} to the object.
|
104
|
+
* @param maxDownloadSizeBytes - Optional. Maximum size in bytes to retrieve.
|
102
105
|
* @returns A promise resolving to the Blob.
|
103
106
|
*/
|
104
|
-
export function getBlob(storageRef: Reference): Promise<Blob>;
|
107
|
+
export function getBlob(storageRef: Reference, maxDownloadSizeBytes?: number): Promise<Blob>;
|
105
108
|
|
106
109
|
/**
|
107
110
|
* Retrieves bytes (up to the specified max size) from an object at the given reference's location.
|
108
111
|
* Throws an error if the object is not found or if the size exceeds the maximum allowed.
|
109
112
|
* @param storageRef - The {@link Reference} to the object.
|
110
|
-
* @param maxDownloadSizeBytes - Maximum size in bytes to retrieve.
|
113
|
+
* @param maxDownloadSizeBytes - Optional. Maximum size in bytes to retrieve.
|
111
114
|
* @returns A promise resolving to an ArrayBuffer.
|
112
115
|
*/
|
113
|
-
export function getBytes(
|
116
|
+
export function getBytes(
|
117
|
+
storageRef: Reference,
|
118
|
+
maxDownloadSizeBytes?: number,
|
119
|
+
): Promise<ArrayBuffer>;
|
114
120
|
|
115
121
|
/**
|
116
122
|
* Retrieves a long-lived download URL for the object at the given reference's location.
|
@@ -129,12 +135,12 @@ export function getMetadata(storageRef: Reference): Promise<FullMetadata>;
|
|
129
135
|
/**
|
130
136
|
* Retrieves a readable stream for the object at the given reference's location. This API is only available in Node.js.
|
131
137
|
* @param storageRef - The {@link Reference} to the object.
|
132
|
-
* @param maxDownloadSizeBytes - Maximum size in bytes to retrieve.
|
138
|
+
* @param maxDownloadSizeBytes - Optional. Maximum size in bytes to retrieve.
|
133
139
|
* @returns A NodeJS ReadableStream.
|
134
140
|
*/
|
135
141
|
export function getStream(
|
136
142
|
storageRef: Reference,
|
137
|
-
maxDownloadSizeBytes
|
143
|
+
maxDownloadSizeBytes?: number,
|
138
144
|
): NodeJS.ReadableStream;
|
139
145
|
|
140
146
|
/**
|
@@ -200,7 +206,7 @@ export function uploadBytesResumable(
|
|
200
206
|
export function uploadString(
|
201
207
|
storageRef: Reference,
|
202
208
|
data: string,
|
203
|
-
format?:
|
209
|
+
format?: StringFormat,
|
204
210
|
metadata?: SettableMetadata,
|
205
211
|
): Task;
|
206
212
|
|
package/lib/modular/index.js
CHANGED
@@ -90,7 +90,7 @@ export function deleteObject(storageRef) {
|
|
90
90
|
* @returns {Promise<Blob>}
|
91
91
|
*/
|
92
92
|
// eslint-disable-next-line
|
93
|
-
export function getBlob(storageRef) {
|
93
|
+
export function getBlob(storageRef, maxDownloadSizeBytes) {
|
94
94
|
throw new Error('`getBlob()` is not implemented');
|
95
95
|
}
|
96
96
|
|
package/lib/version.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
// Generated by genversion.
|
2
|
-
module.exports = '21.12.
|
2
|
+
module.exports = '21.12.2';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@react-native-firebase/storage",
|
3
|
-
"version": "21.12.
|
3
|
+
"version": "21.12.2",
|
4
4
|
"author": "Invertase <oss@invertase.io> (http://invertase.io)",
|
5
5
|
"description": "React Native Firebase - React Native Firebase provides native integration with Cloud Storage, providing support to upload and download files directly from your device and from your Firebase Cloud Storage bucket.",
|
6
6
|
"main": "lib/index.js",
|
@@ -29,10 +29,10 @@
|
|
29
29
|
"download"
|
30
30
|
],
|
31
31
|
"peerDependencies": {
|
32
|
-
"@react-native-firebase/app": "21.12.
|
32
|
+
"@react-native-firebase/app": "21.12.2"
|
33
33
|
},
|
34
34
|
"publishConfig": {
|
35
35
|
"access": "public"
|
36
36
|
},
|
37
|
-
"gitHead": "
|
37
|
+
"gitHead": "31e92391eddbebe8e665b596838d329c70640550"
|
38
38
|
}
|