@firebase/storage 0.14.5 → 0.14.6-20261007162724
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 +2 -2
- package/dist/index.browser.cjs.js.map +1 -1
- package/dist/index.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.node.cjs.js +2 -2
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/node-esm/index.node.esm.js +2 -2
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/dist/node-esm/src/api.d.ts +2 -2
- package/dist/node-esm/src/service.d.ts +1 -1
- package/dist/src/api.d.ts +2 -2
- package/dist/src/service.d.ts +1 -1
- package/dist/storage-public.d.ts +1 -0
- package/dist/storage.d.ts +1 -0
- package/dist/{src/tsdoc-metadata.json → tsdoc-metadata.json} +1 -1
- package/package.json +12 -12
- package/dist/node-esm/test/unit/connection.d.ts +0 -47
- package/dist/node-esm/test/unit/testshared.d.ts +0 -60
- package/dist/test/unit/connection.d.ts +0 -47
- package/dist/test/unit/testshared.d.ts +0 -60
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
import { FirebaseApp } from '@firebase/app';
|
|
18
18
|
import { StorageReference, FirebaseStorage, UploadResult, ListOptions, ListResult, UploadTask, SettableMetadata, UploadMetadata, FullMetadata } from './public-types';
|
|
19
19
|
import { Reference } from './reference';
|
|
20
|
-
import { EmulatorMockTokenOptions } from '@firebase/util';
|
|
20
|
+
import type { EmulatorMockTokenOptions } from '@firebase/util';
|
|
21
21
|
import { StringFormat } from './implementation/string';
|
|
22
|
-
export { EmulatorMockTokenOptions } from '@firebase/util';
|
|
22
|
+
export type { EmulatorMockTokenOptions } from '@firebase/util';
|
|
23
23
|
export { StorageError, StorageErrorCode } from './implementation/error';
|
|
24
24
|
/**
|
|
25
25
|
* Public types.
|
|
@@ -23,7 +23,7 @@ import { FirebaseAuthInternalName } from '@firebase/auth-interop-types';
|
|
|
23
23
|
import { AppCheckInternalComponentName } from '@firebase/app-check-interop-types';
|
|
24
24
|
import { FirebaseApp } from '@firebase/app';
|
|
25
25
|
import { FirebaseStorage } from './public-types';
|
|
26
|
-
import { EmulatorMockTokenOptions } from '@firebase/util';
|
|
26
|
+
import type { EmulatorMockTokenOptions } from '@firebase/util';
|
|
27
27
|
import { Connection, ConnectionType } from './implementation/connection';
|
|
28
28
|
export declare function isUrl(path?: string): boolean;
|
|
29
29
|
/**
|
package/dist/src/api.d.ts
CHANGED
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
import { FirebaseApp } from '@firebase/app';
|
|
18
18
|
import { StorageReference, FirebaseStorage, UploadResult, ListOptions, ListResult, UploadTask, SettableMetadata, UploadMetadata, FullMetadata } from './public-types';
|
|
19
19
|
import { Reference } from './reference';
|
|
20
|
-
import { EmulatorMockTokenOptions } from '@firebase/util';
|
|
20
|
+
import type { EmulatorMockTokenOptions } from '@firebase/util';
|
|
21
21
|
import { StringFormat } from './implementation/string';
|
|
22
|
-
export { EmulatorMockTokenOptions } from '@firebase/util';
|
|
22
|
+
export type { EmulatorMockTokenOptions } from '@firebase/util';
|
|
23
23
|
export { StorageError, StorageErrorCode } from './implementation/error';
|
|
24
24
|
/**
|
|
25
25
|
* Public types.
|
package/dist/src/service.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ import { FirebaseAuthInternalName } from '@firebase/auth-interop-types';
|
|
|
23
23
|
import { AppCheckInternalComponentName } from '@firebase/app-check-interop-types';
|
|
24
24
|
import { FirebaseApp } from '@firebase/app';
|
|
25
25
|
import { FirebaseStorage } from './public-types';
|
|
26
|
-
import { EmulatorMockTokenOptions } from '@firebase/util';
|
|
26
|
+
import type { EmulatorMockTokenOptions } from '@firebase/util';
|
|
27
27
|
import { Connection, ConnectionType } from './implementation/connection';
|
|
28
28
|
export declare function isUrl(path?: string): boolean;
|
|
29
29
|
/**
|
package/dist/storage-public.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export declare function connectStorageEmulator(storage: FirebaseStorage, host: s
|
|
|
34
34
|
* @returns A `Promise` that resolves if the deletion succeeds.
|
|
35
35
|
*/
|
|
36
36
|
export declare function deleteObject(ref: StorageReference): Promise<void>;
|
|
37
|
+
|
|
37
38
|
export { EmulatorMockTokenOptions }
|
|
38
39
|
/* Excluded from this release type: _FbsBlob */
|
|
39
40
|
|
package/dist/storage.d.ts
CHANGED
|
@@ -79,6 +79,7 @@ export declare function _dataFromString(format: StringFormat, stringData: string
|
|
|
79
79
|
* @returns A `Promise` that resolves if the deletion succeeds.
|
|
80
80
|
*/
|
|
81
81
|
export declare function deleteObject(ref: StorageReference): Promise<void>;
|
|
82
|
+
|
|
82
83
|
export { EmulatorMockTokenOptions }
|
|
83
84
|
|
|
84
85
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase/storage",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.6-20261007162724",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
|
|
6
6
|
"main": "dist/index.node.cjs.js",
|
|
@@ -31,18 +31,18 @@
|
|
|
31
31
|
"build": "rollup -c rollup.config.js && yarn api-report",
|
|
32
32
|
"build:deps": "lerna run build --scope @firebase/storage --include-dependencies",
|
|
33
33
|
"dev": "rollup -c -w",
|
|
34
|
-
"test": "run-p --npm-path npm
|
|
35
|
-
"test:all": "run
|
|
34
|
+
"test": "run-p --npm-path npm lint test:all",
|
|
35
|
+
"test:all": "vitest run",
|
|
36
36
|
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
|
|
37
|
-
"test:browser:unit": "
|
|
38
|
-
"test:browser:integration": "
|
|
39
|
-
"test:browser": "
|
|
40
|
-
"test:node": "
|
|
41
|
-
"test:debug": "karma start --browser=Chrome",
|
|
37
|
+
"test:browser:unit": "vitest run --project=browser test/unit",
|
|
38
|
+
"test:browser:integration": "vitest run --project=browser test/integration test/browser",
|
|
39
|
+
"test:browser": "vitest run --project=browser",
|
|
40
|
+
"test:node": "vitest run --project=node",
|
|
42
41
|
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
|
|
43
42
|
"prettier": "prettier --cache --write 'src/**/*.ts' 'test/**/*.ts'",
|
|
44
43
|
"api-report": "api-extractor run --local --verbose && ts-node-script ../../repo-scripts/prune-dts/prune-dts.ts --input dist/storage-public.d.ts --output dist/storage-public.d.ts",
|
|
45
|
-
"typings:public": "node ../../scripts/build/use_typings.js ./dist/storage-public.d.ts"
|
|
44
|
+
"typings:public": "node ../../scripts/build/use_typings.js ./dist/storage-public.d.ts",
|
|
45
|
+
"test:browser:debug": "vitest --project=browser --browser.headless=false"
|
|
46
46
|
},
|
|
47
47
|
"license": "Apache-2.0",
|
|
48
48
|
"dependencies": {
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"@firebase/app": "0.x"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@firebase/app": "0.16.
|
|
58
|
-
"@firebase/auth": "1.13.
|
|
57
|
+
"@firebase/app": "0.16.2",
|
|
58
|
+
"@firebase/auth": "1.13.7-20261007162724",
|
|
59
59
|
"rollup": "4.62.2",
|
|
60
60
|
"@rollup/plugin-alias": "5.1.1",
|
|
61
61
|
"@rollup/plugin-json": "6.1.0",
|
|
@@ -72,6 +72,6 @@
|
|
|
72
72
|
},
|
|
73
73
|
"typings": "./dist/storage-public.d.ts",
|
|
74
74
|
"engines": {
|
|
75
|
-
"node": ">=
|
|
75
|
+
"node": ">=24.12.0"
|
|
76
76
|
}
|
|
77
77
|
}
|
|
@@ -1,47 +0,0 @@
|
|
|
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, _isUsingEmulator: boolean, 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,60 +0,0 @@
|
|
|
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,47 +0,0 @@
|
|
|
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, _isUsingEmulator: boolean, 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,60 +0,0 @@
|
|
|
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 {};
|