@firebase/storage 0.13.3 → 0.13.4
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/dist/index.browser.cjs.js +3571 -3571
- package/dist/index.browser.cjs.js.map +1 -1
- package/dist/index.cjs.js +3571 -3571
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm2017.js +3571 -3571
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.node.cjs.js +3596 -3596
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/node-esm/index.node.esm.js +3596 -3596
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/dist/node-esm/src/api.browser.d.ts +47 -47
- package/dist/node-esm/src/api.d.ts +200 -200
- package/dist/node-esm/src/api.node.d.ts +47 -47
- package/dist/node-esm/src/constants.d.ts +20 -20
- package/dist/node-esm/src/implementation/async.d.ts +22 -22
- package/dist/node-esm/src/implementation/backoff.d.ts +43 -43
- package/dist/node-esm/src/implementation/blob.d.ts +34 -34
- package/dist/node-esm/src/implementation/connection.d.ts +56 -56
- package/dist/node-esm/src/implementation/constants.d.ts +48 -48
- package/dist/node-esm/src/implementation/error.d.ts +126 -126
- package/dist/node-esm/src/implementation/failrequest.d.ts +29 -29
- package/dist/node-esm/src/implementation/fs.d.ts +17 -17
- package/dist/node-esm/src/implementation/json.d.ts +7 -7
- package/dist/node-esm/src/implementation/list.d.ts +19 -19
- package/dist/node-esm/src/implementation/location.d.ts +32 -32
- package/dist/node-esm/src/implementation/metadata.d.ts +40 -40
- package/dist/node-esm/src/implementation/observer.d.ts +47 -47
- package/dist/node-esm/src/implementation/path.d.ts +31 -31
- package/dist/node-esm/src/implementation/request.d.ts +47 -47
- package/dist/node-esm/src/implementation/requestinfo.d.ts +73 -73
- package/dist/node-esm/src/implementation/requests.d.ts +84 -84
- package/dist/node-esm/src/implementation/string.d.ts +73 -73
- package/dist/node-esm/src/implementation/taskenums.d.ts +77 -77
- package/dist/node-esm/src/implementation/type.d.ts +23 -23
- package/dist/node-esm/src/implementation/url.d.ts +22 -22
- package/dist/node-esm/src/implementation/utils.d.ts +23 -23
- package/dist/node-esm/src/index.d.ts +7 -7
- package/dist/node-esm/src/index.node.d.ts +7 -7
- package/dist/node-esm/src/list.d.ts +41 -41
- package/dist/node-esm/src/metadata.d.ts +27 -27
- package/dist/node-esm/src/platform/base64.d.ts +20 -20
- package/dist/node-esm/src/platform/browser/base64.d.ts +19 -19
- package/dist/node-esm/src/platform/browser/connection.d.ts +55 -55
- package/dist/node-esm/src/platform/connection.d.ts +22 -22
- package/dist/node-esm/src/platform/node/base64.d.ts +19 -19
- package/dist/node-esm/src/platform/node/connection.d.ts +58 -59
- package/dist/node-esm/src/public-types.d.ts +424 -424
- package/dist/node-esm/src/reference.d.ts +208 -208
- package/dist/node-esm/src/service.d.ts +130 -130
- package/dist/node-esm/src/task.d.ts +148 -148
- package/dist/node-esm/test/browser/blob.test.d.ts +17 -17
- package/dist/node-esm/test/browser/connection.test.d.ts +17 -17
- package/dist/node-esm/test/browser/string.browser.test.d.ts +17 -17
- package/dist/node-esm/test/integration/integration.test.d.ts +24 -24
- package/dist/node-esm/test/node/connection.test.d.ts +17 -17
- package/dist/node-esm/test/node/stream.test.d.ts +17 -17
- package/dist/node-esm/test/unit/connection.d.ts +47 -47
- package/dist/node-esm/test/unit/index.test.d.ts +4 -4
- package/dist/node-esm/test/unit/location.test.d.ts +1 -1
- package/dist/node-esm/test/unit/reference.test.d.ts +1 -1
- package/dist/node-esm/test/unit/request.test.d.ts +1 -1
- package/dist/node-esm/test/unit/requests.test.d.ts +1 -1
- package/dist/node-esm/test/unit/service.test.d.ts +1 -1
- package/dist/node-esm/test/unit/string.test.d.ts +1 -1
- package/dist/node-esm/test/unit/task.test.d.ts +1 -1
- package/dist/node-esm/test/unit/testshared.d.ts +60 -60
- package/dist/node-esm/test/unit/utils.test.d.ts +17 -17
- package/dist/src/api.browser.d.ts +47 -47
- package/dist/src/api.d.ts +200 -200
- package/dist/src/api.node.d.ts +47 -47
- package/dist/src/constants.d.ts +20 -20
- package/dist/src/implementation/async.d.ts +22 -22
- package/dist/src/implementation/backoff.d.ts +43 -43
- package/dist/src/implementation/blob.d.ts +34 -34
- package/dist/src/implementation/connection.d.ts +56 -56
- package/dist/src/implementation/constants.d.ts +48 -48
- package/dist/src/implementation/error.d.ts +126 -126
- package/dist/src/implementation/failrequest.d.ts +29 -29
- package/dist/src/implementation/fs.d.ts +17 -17
- package/dist/src/implementation/json.d.ts +7 -7
- package/dist/src/implementation/list.d.ts +19 -19
- package/dist/src/implementation/location.d.ts +32 -32
- package/dist/src/implementation/metadata.d.ts +40 -40
- package/dist/src/implementation/observer.d.ts +47 -47
- package/dist/src/implementation/path.d.ts +31 -31
- package/dist/src/implementation/request.d.ts +47 -47
- package/dist/src/implementation/requestinfo.d.ts +73 -73
- package/dist/src/implementation/requests.d.ts +84 -84
- package/dist/src/implementation/string.d.ts +73 -73
- package/dist/src/implementation/taskenums.d.ts +77 -77
- package/dist/src/implementation/type.d.ts +23 -23
- package/dist/src/implementation/url.d.ts +22 -22
- package/dist/src/implementation/utils.d.ts +23 -23
- package/dist/src/index.d.ts +7 -7
- package/dist/src/index.node.d.ts +7 -7
- package/dist/src/list.d.ts +41 -41
- package/dist/src/metadata.d.ts +27 -27
- package/dist/src/platform/base64.d.ts +20 -20
- package/dist/src/platform/browser/base64.d.ts +19 -19
- package/dist/src/platform/browser/connection.d.ts +55 -55
- package/dist/src/platform/connection.d.ts +22 -22
- package/dist/src/platform/node/base64.d.ts +19 -19
- package/dist/src/platform/node/connection.d.ts +58 -59
- package/dist/src/public-types.d.ts +424 -424
- package/dist/src/reference.d.ts +208 -208
- package/dist/src/service.d.ts +130 -130
- package/dist/src/task.d.ts +148 -148
- package/dist/test/browser/blob.test.d.ts +17 -17
- package/dist/test/browser/connection.test.d.ts +17 -17
- package/dist/test/browser/string.browser.test.d.ts +17 -17
- package/dist/test/integration/integration.test.d.ts +24 -24
- package/dist/test/node/connection.test.d.ts +17 -17
- package/dist/test/node/stream.test.d.ts +17 -17
- package/dist/test/unit/connection.d.ts +47 -47
- package/dist/test/unit/index.test.d.ts +4 -4
- package/dist/test/unit/location.test.d.ts +1 -1
- package/dist/test/unit/reference.test.d.ts +1 -1
- package/dist/test/unit/request.test.d.ts +1 -1
- package/dist/test/unit/requests.test.d.ts +1 -1
- package/dist/test/unit/service.test.d.ts +1 -1
- package/dist/test/unit/string.test.d.ts +1 -1
- package/dist/test/unit/task.test.d.ts +1 -1
- package/dist/test/unit/testshared.d.ts +60 -60
- package/dist/test/unit/utils.test.d.ts +17 -17
- package/package.json +6 -6
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2020 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import { FirebaseApp } from '@firebase/app';
|
|
18
|
-
import * as types from '../../src/public-types';
|
|
19
|
-
export declare const PROJECT_ID: any;
|
|
20
|
-
export declare const STORAGE_BUCKET: any;
|
|
21
|
-
export declare const API_KEY: any;
|
|
22
|
-
export declare const AUTH_DOMAIN: any;
|
|
23
|
-
export declare function createApp(): Promise<FirebaseApp>;
|
|
24
|
-
export declare function createStorage(app: FirebaseApp): types.FirebaseStorage;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { FirebaseApp } from '@firebase/app';
|
|
18
|
+
import * as types from '../../src/public-types';
|
|
19
|
+
export declare const PROJECT_ID: any;
|
|
20
|
+
export declare const STORAGE_BUCKET: any;
|
|
21
|
+
export declare const API_KEY: any;
|
|
22
|
+
export declare const AUTH_DOMAIN: any;
|
|
23
|
+
export declare function createApp(): Promise<FirebaseApp>;
|
|
24
|
+
export declare function createStorage(app: FirebaseApp): types.FirebaseStorage;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2021 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2021 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import { ErrorCode, Headers, Connection } from '../../src/implementation/connection';
|
|
18
|
-
export
|
|
19
|
-
export declare enum State {
|
|
20
|
-
START = 0,
|
|
21
|
-
SENT = 1,
|
|
22
|
-
DONE = 2
|
|
23
|
-
}
|
|
24
|
-
export declare class TestingConnection implements Connection<string> {
|
|
25
|
-
private state;
|
|
26
|
-
private sendPromise;
|
|
27
|
-
private resolve;
|
|
28
|
-
private sendHook;
|
|
29
|
-
private status;
|
|
30
|
-
private responseText;
|
|
31
|
-
private headers;
|
|
32
|
-
private errorCode;
|
|
33
|
-
constructor(sendHook: SendHook | null);
|
|
34
|
-
send(url: string, method: string, body?: ArrayBufferView | Blob | string | null, headers?: Headers): Promise<void>;
|
|
35
|
-
simulateResponse(status: number, body: string, headers: {
|
|
36
|
-
[key: string]: string;
|
|
37
|
-
}): void;
|
|
38
|
-
getErrorCode(): ErrorCode;
|
|
39
|
-
getStatus(): number;
|
|
40
|
-
getResponse(): string;
|
|
41
|
-
getErrorText(): string;
|
|
42
|
-
abort(): void;
|
|
43
|
-
getResponseHeader(header: string): string | null;
|
|
44
|
-
addUploadProgressListener(): void;
|
|
45
|
-
removeUploadProgressListener(): void;
|
|
46
|
-
}
|
|
47
|
-
export declare function newTestConnection(sendHook?: SendHook | null): Connection<string>;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { ErrorCode, Headers, Connection } from '../../src/implementation/connection';
|
|
18
|
+
export type SendHook = (connection: TestingConnection, url: string, method: string, body?: ArrayBufferView | Blob | string | null, headers?: Headers) => void;
|
|
19
|
+
export declare enum State {
|
|
20
|
+
START = 0,
|
|
21
|
+
SENT = 1,
|
|
22
|
+
DONE = 2
|
|
23
|
+
}
|
|
24
|
+
export declare class TestingConnection implements Connection<string> {
|
|
25
|
+
private state;
|
|
26
|
+
private sendPromise;
|
|
27
|
+
private resolve;
|
|
28
|
+
private sendHook;
|
|
29
|
+
private status;
|
|
30
|
+
private responseText;
|
|
31
|
+
private headers;
|
|
32
|
+
private errorCode;
|
|
33
|
+
constructor(sendHook: SendHook | null);
|
|
34
|
+
send(url: string, method: string, body?: ArrayBufferView | Blob | string | null, headers?: Headers): Promise<void>;
|
|
35
|
+
simulateResponse(status: number, body: string, headers: {
|
|
36
|
+
[key: string]: string;
|
|
37
|
+
}): void;
|
|
38
|
+
getErrorCode(): ErrorCode;
|
|
39
|
+
getStatus(): number;
|
|
40
|
+
getResponse(): string;
|
|
41
|
+
getErrorText(): string;
|
|
42
|
+
abort(): void;
|
|
43
|
+
getResponseHeader(header: string): string | null;
|
|
44
|
+
addUploadProgressListener(): void;
|
|
45
|
+
removeUploadProgressListener(): void;
|
|
46
|
+
}
|
|
47
|
+
export declare function newTestConnection(sendHook?: SendHook | null): Connection<string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const PROJECT_ID: any;
|
|
2
|
-
export declare const STORAGE_BUCKET: any;
|
|
3
|
-
export declare const API_KEY: any;
|
|
4
|
-
export declare const AUTH_DOMAIN: any;
|
|
1
|
+
export declare const PROJECT_ID: any;
|
|
2
|
+
export declare const STORAGE_BUCKET: any;
|
|
3
|
+
export declare const API_KEY: any;
|
|
4
|
+
export declare const AUTH_DOMAIN: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import { FirebaseApp } from '@firebase/app-types';
|
|
2
|
-
import { StorageError } from '../../src/implementation/error';
|
|
3
|
-
import { Headers, Connection, ConnectionType } from '../../src/implementation/connection';
|
|
4
|
-
import { FirebaseAuthInternalName } from '@firebase/auth-interop-types';
|
|
5
|
-
import { Provider } from '@firebase/component';
|
|
6
|
-
import { AppCheckInternalComponentName } from '@firebase/app-check-interop-types';
|
|
7
|
-
import { FirebaseStorageImpl } from '../../src/service';
|
|
8
|
-
import { Metadata } from '../../src/metadata';
|
|
9
|
-
export declare const authToken = "totally-legit-auth-token";
|
|
10
|
-
export declare const appCheckToken = "totally-shady-token";
|
|
11
|
-
export declare const bucket = "mybucket";
|
|
12
|
-
export declare const fakeApp: FirebaseApp;
|
|
13
|
-
export declare const fakeAuthProvider: Provider<"auth-internal">;
|
|
14
|
-
export declare const emptyAuthProvider: Provider<"auth-internal">;
|
|
15
|
-
export declare const fakeAppCheckTokenProvider: Provider<"app-check-internal">;
|
|
16
|
-
export declare function makeFakeApp(bucketArg?: string): FirebaseApp;
|
|
17
|
-
export declare function makeFakeAuthProvider(token: {
|
|
18
|
-
accessToken: string;
|
|
19
|
-
}): Provider<FirebaseAuthInternalName>;
|
|
20
|
-
export declare function makeFakeAppCheckProvider(tokenResult: {
|
|
21
|
-
token: string;
|
|
22
|
-
}): Provider<AppCheckInternalComponentName>;
|
|
23
|
-
/**
|
|
24
|
-
* Returns something that looks like an fbs.XhrIo with the given headers
|
|
25
|
-
* and status.
|
|
26
|
-
*/
|
|
27
|
-
export declare function fakeXhrIo<I extends ConnectionType = string>(headers: Headers, status?: number): Connection<I>;
|
|
28
|
-
/**
|
|
29
|
-
* Binds ignoring types. Used to test calls involving improper arguments.
|
|
30
|
-
*/
|
|
31
|
-
export declare function bind(f: Function, ctx: any, ...args: any[]): () => void;
|
|
32
|
-
export declare function assertThrows(f: () => void, code: string): StorageError;
|
|
33
|
-
export declare function assertUint8ArrayEquals(arr1: Uint8Array, arr2: Uint8Array): void;
|
|
34
|
-
export declare function assertObjectIncludes(included: {
|
|
35
|
-
[name: string]: any;
|
|
36
|
-
}, obj: {
|
|
37
|
-
[name: string]: any;
|
|
38
|
-
}): void;
|
|
39
|
-
interface Response {
|
|
40
|
-
status: number;
|
|
41
|
-
body: string;
|
|
42
|
-
headers: Headers;
|
|
43
|
-
}
|
|
44
|
-
export
|
|
45
|
-
export declare function storageServiceWithHandler(handler: RequestHandler, shouldResponseCb?: () => boolean): FirebaseStorageImpl;
|
|
46
|
-
export declare function fakeServerHandler(fakeMetadata?: Partial<Metadata>): RequestHandler;
|
|
47
|
-
/**
|
|
48
|
-
* Responds with a 503 for finalize.
|
|
49
|
-
* @param fakeMetadata metadata to respond with for finalize
|
|
50
|
-
* @returns a handler for requests
|
|
51
|
-
*/
|
|
52
|
-
export declare function fake503ForFinalizeServerHandler(fakeMetadata?: Partial<Metadata>): RequestHandler;
|
|
53
|
-
/**
|
|
54
|
-
* Responds with a 503 for upload.
|
|
55
|
-
* @param fakeMetadata metadata to respond with for query
|
|
56
|
-
* @returns a handler for requests
|
|
57
|
-
*/
|
|
58
|
-
export declare function fake503ForUploadServerHandler(fakeMetadata?: Partial<Metadata>, cb?: () => void): RequestHandler;
|
|
59
|
-
export declare function fakeOneShot503ServerHandler(fakeMetadata?: Partial<Metadata>): RequestHandler;
|
|
60
|
-
export {};
|
|
1
|
+
import { FirebaseApp } from '@firebase/app-types';
|
|
2
|
+
import { StorageError } from '../../src/implementation/error';
|
|
3
|
+
import { Headers, Connection, ConnectionType } from '../../src/implementation/connection';
|
|
4
|
+
import { FirebaseAuthInternalName } from '@firebase/auth-interop-types';
|
|
5
|
+
import { Provider } from '@firebase/component';
|
|
6
|
+
import { AppCheckInternalComponentName } from '@firebase/app-check-interop-types';
|
|
7
|
+
import { FirebaseStorageImpl } from '../../src/service';
|
|
8
|
+
import { Metadata } from '../../src/metadata';
|
|
9
|
+
export declare const authToken = "totally-legit-auth-token";
|
|
10
|
+
export declare const appCheckToken = "totally-shady-token";
|
|
11
|
+
export declare const bucket = "mybucket";
|
|
12
|
+
export declare const fakeApp: FirebaseApp;
|
|
13
|
+
export declare const fakeAuthProvider: Provider<"auth-internal">;
|
|
14
|
+
export declare const emptyAuthProvider: Provider<"auth-internal">;
|
|
15
|
+
export declare const fakeAppCheckTokenProvider: Provider<"app-check-internal">;
|
|
16
|
+
export declare function makeFakeApp(bucketArg?: string): FirebaseApp;
|
|
17
|
+
export declare function makeFakeAuthProvider(token: {
|
|
18
|
+
accessToken: string;
|
|
19
|
+
}): Provider<FirebaseAuthInternalName>;
|
|
20
|
+
export declare function makeFakeAppCheckProvider(tokenResult: {
|
|
21
|
+
token: string;
|
|
22
|
+
}): Provider<AppCheckInternalComponentName>;
|
|
23
|
+
/**
|
|
24
|
+
* Returns something that looks like an fbs.XhrIo with the given headers
|
|
25
|
+
* and status.
|
|
26
|
+
*/
|
|
27
|
+
export declare function fakeXhrIo<I extends ConnectionType = string>(headers: Headers, status?: number): Connection<I>;
|
|
28
|
+
/**
|
|
29
|
+
* Binds ignoring types. Used to test calls involving improper arguments.
|
|
30
|
+
*/
|
|
31
|
+
export declare function bind(f: Function, ctx: any, ...args: any[]): () => void;
|
|
32
|
+
export declare function assertThrows(f: () => void, code: string): StorageError;
|
|
33
|
+
export declare function assertUint8ArrayEquals(arr1: Uint8Array, arr2: Uint8Array): void;
|
|
34
|
+
export declare function assertObjectIncludes(included: {
|
|
35
|
+
[name: string]: any;
|
|
36
|
+
}, obj: {
|
|
37
|
+
[name: string]: any;
|
|
38
|
+
}): void;
|
|
39
|
+
interface Response {
|
|
40
|
+
status: number;
|
|
41
|
+
body: string;
|
|
42
|
+
headers: Headers;
|
|
43
|
+
}
|
|
44
|
+
export type RequestHandler = (url: string, method: string, body?: ArrayBufferView | Blob | string | null, headers?: Headers) => Response;
|
|
45
|
+
export declare function storageServiceWithHandler(handler: RequestHandler, shouldResponseCb?: () => boolean): FirebaseStorageImpl;
|
|
46
|
+
export declare function fakeServerHandler(fakeMetadata?: Partial<Metadata>): RequestHandler;
|
|
47
|
+
/**
|
|
48
|
+
* Responds with a 503 for finalize.
|
|
49
|
+
* @param fakeMetadata metadata to respond with for finalize
|
|
50
|
+
* @returns a handler for requests
|
|
51
|
+
*/
|
|
52
|
+
export declare function fake503ForFinalizeServerHandler(fakeMetadata?: Partial<Metadata>): RequestHandler;
|
|
53
|
+
/**
|
|
54
|
+
* Responds with a 503 for upload.
|
|
55
|
+
* @param fakeMetadata metadata to respond with for query
|
|
56
|
+
* @returns a handler for requests
|
|
57
|
+
*/
|
|
58
|
+
export declare function fake503ForUploadServerHandler(fakeMetadata?: Partial<Metadata>, cb?: () => void): RequestHandler;
|
|
59
|
+
export declare function fakeOneShot503ServerHandler(fakeMetadata?: Partial<Metadata>): RequestHandler;
|
|
60
|
+
export {};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase/storage",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
|
|
6
6
|
"main": "dist/index.node.cjs.js",
|
|
@@ -46,21 +46,21 @@
|
|
|
46
46
|
},
|
|
47
47
|
"license": "Apache-2.0",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@firebase/util": "1.10.
|
|
50
|
-
"@firebase/component": "0.6.
|
|
49
|
+
"@firebase/util": "1.10.2",
|
|
50
|
+
"@firebase/component": "0.6.11",
|
|
51
51
|
"tslib": "^2.1.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"@firebase/app": "0.x"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@firebase/app": "0.10.
|
|
58
|
-
"@firebase/auth": "1.8.
|
|
57
|
+
"@firebase/app": "0.10.16",
|
|
58
|
+
"@firebase/auth": "1.8.1",
|
|
59
59
|
"rollup": "2.79.1",
|
|
60
60
|
"@rollup/plugin-alias": "5.1.0",
|
|
61
61
|
"@rollup/plugin-json": "4.1.0",
|
|
62
62
|
"rollup-plugin-typescript2": "0.31.2",
|
|
63
|
-
"typescript": "
|
|
63
|
+
"typescript": "5.5.4"
|
|
64
64
|
},
|
|
65
65
|
"repository": {
|
|
66
66
|
"directory": "packages/storage",
|