@depup/firebase__storage 0.14.1-depup.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/README.md +31 -0
- package/changes.json +10 -0
- package/dist/index.browser.cjs.js +3685 -0
- package/dist/index.browser.cjs.js.map +1 -0
- package/dist/index.cjs.js +3685 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.esm.js +3656 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.node.cjs.js +3710 -0
- package/dist/index.node.cjs.js.map +1 -0
- package/dist/node-esm/index.node.esm.js +3681 -0
- package/dist/node-esm/index.node.esm.js.map +1 -0
- package/dist/node-esm/package.json +1 -0
- package/dist/node-esm/src/api.browser.d.ts +47 -0
- package/dist/node-esm/src/api.d.ts +200 -0
- package/dist/node-esm/src/api.node.d.ts +47 -0
- package/dist/node-esm/src/constants.d.ts +20 -0
- package/dist/node-esm/src/implementation/async.d.ts +22 -0
- package/dist/node-esm/src/implementation/backoff.d.ts +43 -0
- package/dist/node-esm/src/implementation/blob.d.ts +34 -0
- package/dist/node-esm/src/implementation/connection.d.ts +56 -0
- package/dist/node-esm/src/implementation/constants.d.ts +48 -0
- package/dist/node-esm/src/implementation/error.d.ts +126 -0
- package/dist/node-esm/src/implementation/failrequest.d.ts +29 -0
- package/dist/node-esm/src/implementation/fs.d.ts +17 -0
- package/dist/node-esm/src/implementation/json.d.ts +7 -0
- package/dist/node-esm/src/implementation/list.d.ts +19 -0
- package/dist/node-esm/src/implementation/location.d.ts +32 -0
- package/dist/node-esm/src/implementation/metadata.d.ts +40 -0
- package/dist/node-esm/src/implementation/observer.d.ts +47 -0
- package/dist/node-esm/src/implementation/path.d.ts +31 -0
- package/dist/node-esm/src/implementation/request.d.ts +47 -0
- package/dist/node-esm/src/implementation/requestinfo.d.ts +73 -0
- package/dist/node-esm/src/implementation/requests.d.ts +84 -0
- package/dist/node-esm/src/implementation/string.d.ts +73 -0
- package/dist/node-esm/src/implementation/taskenums.d.ts +77 -0
- package/dist/node-esm/src/implementation/type.d.ts +23 -0
- package/dist/node-esm/src/implementation/url.d.ts +22 -0
- package/dist/node-esm/src/implementation/utils.d.ts +23 -0
- package/dist/node-esm/src/index.d.ts +7 -0
- package/dist/node-esm/src/index.node.d.ts +7 -0
- package/dist/node-esm/src/list.d.ts +41 -0
- package/dist/node-esm/src/metadata.d.ts +27 -0
- package/dist/node-esm/src/platform/base64.d.ts +20 -0
- package/dist/node-esm/src/platform/browser/base64.d.ts +19 -0
- package/dist/node-esm/src/platform/browser/connection.d.ts +55 -0
- package/dist/node-esm/src/platform/connection.d.ts +22 -0
- package/dist/node-esm/src/platform/node/base64.d.ts +19 -0
- package/dist/node-esm/src/platform/node/connection.d.ts +58 -0
- package/dist/node-esm/src/public-types.d.ts +424 -0
- package/dist/node-esm/src/reference.d.ts +208 -0
- package/dist/node-esm/src/service.d.ts +131 -0
- package/dist/node-esm/src/task.d.ts +148 -0
- package/dist/node-esm/test/unit/connection.d.ts +47 -0
- package/dist/node-esm/test/unit/testshared.d.ts +60 -0
- package/dist/src/api.browser.d.ts +47 -0
- package/dist/src/api.d.ts +200 -0
- package/dist/src/api.node.d.ts +47 -0
- package/dist/src/constants.d.ts +20 -0
- package/dist/src/implementation/async.d.ts +22 -0
- package/dist/src/implementation/backoff.d.ts +43 -0
- package/dist/src/implementation/blob.d.ts +34 -0
- package/dist/src/implementation/connection.d.ts +56 -0
- package/dist/src/implementation/constants.d.ts +48 -0
- package/dist/src/implementation/error.d.ts +126 -0
- package/dist/src/implementation/failrequest.d.ts +29 -0
- package/dist/src/implementation/fs.d.ts +17 -0
- package/dist/src/implementation/json.d.ts +7 -0
- package/dist/src/implementation/list.d.ts +19 -0
- package/dist/src/implementation/location.d.ts +32 -0
- package/dist/src/implementation/metadata.d.ts +40 -0
- package/dist/src/implementation/observer.d.ts +47 -0
- package/dist/src/implementation/path.d.ts +31 -0
- package/dist/src/implementation/request.d.ts +47 -0
- package/dist/src/implementation/requestinfo.d.ts +73 -0
- package/dist/src/implementation/requests.d.ts +84 -0
- package/dist/src/implementation/string.d.ts +73 -0
- package/dist/src/implementation/taskenums.d.ts +77 -0
- package/dist/src/implementation/type.d.ts +23 -0
- package/dist/src/implementation/url.d.ts +22 -0
- package/dist/src/implementation/utils.d.ts +23 -0
- package/dist/src/index.d.ts +7 -0
- package/dist/src/index.node.d.ts +7 -0
- package/dist/src/list.d.ts +41 -0
- package/dist/src/metadata.d.ts +27 -0
- package/dist/src/platform/base64.d.ts +20 -0
- package/dist/src/platform/browser/base64.d.ts +19 -0
- package/dist/src/platform/browser/connection.d.ts +55 -0
- package/dist/src/platform/connection.d.ts +22 -0
- package/dist/src/platform/node/base64.d.ts +19 -0
- package/dist/src/platform/node/connection.d.ts +58 -0
- package/dist/src/public-types.d.ts +424 -0
- package/dist/src/reference.d.ts +208 -0
- package/dist/src/service.d.ts +131 -0
- package/dist/src/task.d.ts +148 -0
- package/dist/src/tsdoc-metadata.json +11 -0
- package/dist/storage-public.d.ts +725 -0
- package/dist/storage.d.ts +1391 -0
- package/dist/test/unit/connection.d.ts +47 -0
- package/dist/test/unit/testshared.d.ts +60 -0
- package/package.json +98 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 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 { Reference } from './reference';
|
|
18
|
+
/**
|
|
19
|
+
* Result returned by `list()`.
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export interface ListResult {
|
|
23
|
+
/**
|
|
24
|
+
* References to prefixes (sub-folders). You can call list() on them to
|
|
25
|
+
* get its contents.
|
|
26
|
+
*
|
|
27
|
+
* Folders are implicit based on '/' in the object paths.
|
|
28
|
+
* For example, if a bucket has two objects '/a/b/1' and '/a/b/2', list('/a')
|
|
29
|
+
* will return '/a/b' as a prefix.
|
|
30
|
+
*/
|
|
31
|
+
prefixes: Reference[];
|
|
32
|
+
/**
|
|
33
|
+
* Objects in this directory.
|
|
34
|
+
* You can call getMetadata() and getDownloadUrl() on them.
|
|
35
|
+
*/
|
|
36
|
+
items: Reference[];
|
|
37
|
+
/**
|
|
38
|
+
* If set, there might be more results for this list. Use this token to resume the list.
|
|
39
|
+
*/
|
|
40
|
+
nextPageToken?: string;
|
|
41
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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 { FullMetadata } from './public-types';
|
|
18
|
+
/**
|
|
19
|
+
* @fileoverview Documentation for the metadata format.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* The full set of object metadata, including read-only properties.
|
|
23
|
+
*/
|
|
24
|
+
interface Metadata extends FullMetadata {
|
|
25
|
+
[prop: string]: unknown;
|
|
26
|
+
}
|
|
27
|
+
export { Metadata };
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
/** Converts a Base64 encoded string to a binary string. */
|
|
18
|
+
export declare function decodeBase64(encoded: string): string;
|
|
19
|
+
/** Converts a Uint8Array to a string. */
|
|
20
|
+
export declare function decodeUint8Array(data: Uint8Array): string;
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
/** Converts a Base64 encoded string to a binary string. */
|
|
18
|
+
export declare function decodeBase64(encoded: string): string;
|
|
19
|
+
export declare function decodeUint8Array(data: Uint8Array): string;
|
|
@@ -0,0 +1,55 @@
|
|
|
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 { Connection, ConnectionType, ErrorCode, Headers } from '../../implementation/connection';
|
|
18
|
+
/**
|
|
19
|
+
* Network layer for browsers. We use this instead of goog.net.XhrIo because
|
|
20
|
+
* goog.net.XhrIo is hyuuuuge and doesn't work in React Native on Android.
|
|
21
|
+
*/
|
|
22
|
+
declare abstract class XhrConnection<T extends ConnectionType> implements Connection<T> {
|
|
23
|
+
protected xhr_: XMLHttpRequest;
|
|
24
|
+
private errorCode_;
|
|
25
|
+
private sendPromise_;
|
|
26
|
+
protected sent_: boolean;
|
|
27
|
+
constructor();
|
|
28
|
+
abstract initXhr(): void;
|
|
29
|
+
send(url: string, method: string, isUsingEmulator: boolean, body?: ArrayBufferView | Blob | string, headers?: Headers): Promise<void>;
|
|
30
|
+
getErrorCode(): ErrorCode;
|
|
31
|
+
getStatus(): number;
|
|
32
|
+
getResponse(): T;
|
|
33
|
+
getErrorText(): string;
|
|
34
|
+
/** Aborts the request. */
|
|
35
|
+
abort(): void;
|
|
36
|
+
getResponseHeader(header: string): string | null;
|
|
37
|
+
addUploadProgressListener(listener: (p1: ProgressEvent) => void): void;
|
|
38
|
+
removeUploadProgressListener(listener: (p1: ProgressEvent) => void): void;
|
|
39
|
+
}
|
|
40
|
+
export declare class XhrTextConnection extends XhrConnection<string> {
|
|
41
|
+
initXhr(): void;
|
|
42
|
+
}
|
|
43
|
+
export declare function newTextConnection(): Connection<string>;
|
|
44
|
+
export declare class XhrBytesConnection extends XhrConnection<ArrayBuffer> {
|
|
45
|
+
private data_?;
|
|
46
|
+
initXhr(): void;
|
|
47
|
+
}
|
|
48
|
+
export declare function newBytesConnection(): Connection<ArrayBuffer>;
|
|
49
|
+
export declare class XhrBlobConnection extends XhrConnection<Blob> {
|
|
50
|
+
initXhr(): void;
|
|
51
|
+
}
|
|
52
|
+
export declare function newBlobConnection(): Connection<Blob>;
|
|
53
|
+
export declare function newStreamConnection(): Connection<ReadableStream>;
|
|
54
|
+
export declare function injectTestConnection(factory: (() => Connection<string>) | null): void;
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
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 { Connection } from '../implementation/connection';
|
|
18
|
+
export declare function injectTestConnection(factory: (() => Connection<string>) | null): void;
|
|
19
|
+
export declare function newTextConnection(): Connection<string>;
|
|
20
|
+
export declare function newBytesConnection(): Connection<ArrayBuffer>;
|
|
21
|
+
export declare function newBlobConnection(): Connection<Blob>;
|
|
22
|
+
export declare function newStreamConnection(): Connection<ReadableStream<Uint8Array>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
/** Converts a Base64 encoded string to a binary string. */
|
|
18
|
+
export declare function decodeBase64(encoded: string): string;
|
|
19
|
+
export declare function decodeUint8Array(data: Uint8Array): string;
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
import { Connection, ConnectionType, ErrorCode } from '../../implementation/connection';
|
|
18
|
+
/**
|
|
19
|
+
* Network layer that works in Node.
|
|
20
|
+
*
|
|
21
|
+
* This network implementation should not be used in browsers as it does not
|
|
22
|
+
* support progress updates.
|
|
23
|
+
*/
|
|
24
|
+
declare abstract class FetchConnection<T extends ConnectionType> implements Connection<T> {
|
|
25
|
+
protected errorCode_: ErrorCode;
|
|
26
|
+
protected statusCode_: number | undefined;
|
|
27
|
+
protected body_: ArrayBuffer | undefined;
|
|
28
|
+
protected errorText_: string;
|
|
29
|
+
protected headers_: Headers | undefined;
|
|
30
|
+
protected sent_: boolean;
|
|
31
|
+
constructor();
|
|
32
|
+
send(url: string, method: string, isUsingEmulator: boolean, body?: NodeJS.ArrayBufferView | Blob | string, headers?: Record<string, string>): Promise<void>;
|
|
33
|
+
getErrorCode(): ErrorCode;
|
|
34
|
+
getStatus(): number;
|
|
35
|
+
abstract getResponse(): T;
|
|
36
|
+
getErrorText(): string;
|
|
37
|
+
abort(): void;
|
|
38
|
+
getResponseHeader(header: string): string | null;
|
|
39
|
+
addUploadProgressListener(listener: (p1: ProgressEvent) => void): void;
|
|
40
|
+
removeUploadProgressListener(listener: (p1: ProgressEvent) => void): void;
|
|
41
|
+
}
|
|
42
|
+
export declare class FetchTextConnection extends FetchConnection<string> {
|
|
43
|
+
getResponse(): string;
|
|
44
|
+
}
|
|
45
|
+
export declare function newTextConnection(): Connection<string>;
|
|
46
|
+
export declare class FetchBytesConnection extends FetchConnection<ArrayBuffer> {
|
|
47
|
+
getResponse(): ArrayBuffer;
|
|
48
|
+
}
|
|
49
|
+
export declare function newBytesConnection(): Connection<ArrayBuffer>;
|
|
50
|
+
export declare class FetchStreamConnection extends FetchConnection<ReadableStream<Uint8Array>> {
|
|
51
|
+
private stream_;
|
|
52
|
+
send(url: string, method: string, isUsingEmulator: boolean, body?: NodeJS.ArrayBufferView | Blob | string, headers?: Record<string, string>): Promise<void>;
|
|
53
|
+
getResponse(): ReadableStream;
|
|
54
|
+
}
|
|
55
|
+
export declare function newStreamConnection(): Connection<ReadableStream<Uint8Array>>;
|
|
56
|
+
export declare function newBlobConnection(): Connection<Blob>;
|
|
57
|
+
export declare function injectTestConnection(factory: (() => Connection<string>) | null): void;
|
|
58
|
+
export {};
|