Skip to content

Commit 85788f0

Browse files
committed
fix misc things
1 parent 6129d07 commit 85788f0

File tree

6 files changed

+90
-5
lines changed

6 files changed

+90
-5
lines changed

common/api-review/storage.api.md

Lines changed: 86 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,32 @@
66

77
import { CompleteFn } from '@firebase/util';
88
import { FirebaseApp } from '@firebase/app';
9+
import { FirebaseAuthInternalName } from '@firebase/auth-interop-types';
910
import { FirebaseError } from '@firebase/util';
11+
import { _FirebaseService } from '@firebase/app';
1012
import { NextFn } from '@firebase/util';
13+
import { Provider } from '@firebase/component';
1114
import { Subscribe } from '@firebase/util';
1215
import { Unsubscribe } from '@firebase/util';
1316

1417
// @public
1518
export function deleteObject(ref: StorageReference): Promise<void>;
1619

20+
// @internal (undocumented)
21+
export class _FbsBlob {
22+
constructor(data: Blob | Uint8Array | ArrayBuffer, elideCopy?: boolean);
23+
// (undocumented)
24+
static getBlob(...args: Array<string | _FbsBlob>): _FbsBlob | null;
25+
// (undocumented)
26+
size(): number;
27+
// (undocumented)
28+
slice(startByte: number, endByte: number): _FbsBlob | null;
29+
// (undocumented)
30+
type(): string;
31+
// (undocumented)
32+
uploadData(): Blob | Uint8Array;
33+
}
34+
1735
// @public
1836
export interface FirebaseStorageError extends FirebaseError {
1937
serverResponse: string | null;
@@ -33,6 +51,9 @@ export interface FullMetadata extends UploadMetadata {
3351
updated: string;
3452
}
3553

54+
// @internal (undocumented)
55+
export function _getChild(ref: StorageReference, childPath: string): _Reference;
56+
3657
// @public
3758
export function getDownloadURL(ref: StorageReference): Promise<string>;
3859

@@ -61,12 +82,50 @@ export interface ListResult {
6182
prefixes: StorageReference[];
6283
}
6384

85+
// @internal
86+
export class _Location {
87+
constructor(bucket: string, path: string);
88+
// (undocumented)
89+
readonly bucket: string;
90+
// (undocumented)
91+
bucketOnlyServerUrl(): string;
92+
// (undocumented)
93+
fullServerUrl(): string;
94+
// (undocumented)
95+
get isRoot(): boolean;
96+
// (undocumented)
97+
static makeFromBucketSpec(bucketString: string): _Location;
98+
// (undocumented)
99+
static makeFromUrl(url: string): _Location;
100+
// (undocumented)
101+
get path(): string;
102+
}
103+
64104
// @public
65105
export function ref(storage: StorageService, url?: string): StorageReference;
66106

67107
// @public
68108
export function ref(storageOrRef: StorageService | StorageReference, path?: string): StorageReference;
69109

110+
// @internal
111+
export class _Reference {
112+
// Warning: (ae-forgotten-export) The symbol "StorageService" needs to be exported by the entry point index.d.ts
113+
constructor(_service: StorageService_2, location: string | _Location);
114+
get bucket(): string;
115+
get fullPath(): string;
116+
// (undocumented)
117+
_location: _Location;
118+
get name(): string;
119+
// (undocumented)
120+
protected _newRef(service: StorageService_2, location: _Location): _Reference;
121+
get parent(): _Reference | null;
122+
get root(): _Reference;
123+
get storage(): StorageService_2;
124+
_throwIfRoot(name: string): void;
125+
// @override
126+
toString(): string;
127+
}
128+
70129
// @public
71130
export interface SettableMetadata {
72131
cacheControl?: string | undefined;
@@ -101,7 +160,7 @@ export interface StorageReference {
101160
}
102161

103162
// @public
104-
export interface StorageService {
163+
export interface StorageService extends _FirebaseService {
105164
readonly app: FirebaseApp;
106165
maxOperationRetryTime: number;
107166
maxUploadRetryTime: number;
@@ -158,6 +217,32 @@ export interface UploadTask {
158217
then(onFulfilled?: ((snapshot: UploadTaskSnapshot) => unknown) | null, onRejected?: ((error: FirebaseStorageError) => unknown) | null): Promise<unknown>;
159218
}
160219

220+
// @internal
221+
export class _UploadTask {
222+
constructor(ref: _Reference, blob: _FbsBlob, metadata?: Metadata | null);
223+
_blob: _FbsBlob;
224+
cancel(): boolean;
225+
catch<T>(onRejected: (p1: FirebaseStorageError_2) => T | Promise<T>): Promise<T>;
226+
// Warning: (ae-forgotten-export) The symbol "Metadata" needs to be exported by the entry point index.d.ts
227+
_metadata: Metadata | null;
228+
// Warning: (ae-forgotten-export) The symbol "TaskEvent" needs to be exported by the entry point index.d.ts
229+
// Warning: (ae-forgotten-export) The symbol "StorageObserver" needs to be exported by the entry point index.d.ts
230+
// Warning: (ae-forgotten-export) The symbol "ErrorFn" needs to be exported by the entry point index.d.ts
231+
// Warning: (ae-forgotten-export) The symbol "CompleteFn" needs to be exported by the entry point index.d.ts
232+
// Warning: (ae-forgotten-export) The symbol "Unsubscribe" needs to be exported by the entry point index.d.ts
233+
// Warning: (ae-forgotten-export) The symbol "Subscribe" needs to be exported by the entry point index.d.ts
234+
on(type: TaskEvent_2, nextOrObserver?: StorageObserver_2<UploadTaskSnapshot_2> | ((a: UploadTaskSnapshot_2) => unknown), error?: ErrorFn, completed?: CompleteFn_2): Unsubscribe_2 | Subscribe_2<UploadTaskSnapshot_2>;
235+
pause(): boolean;
236+
resume(): boolean;
237+
// Warning: (ae-forgotten-export) The symbol "UploadTaskSnapshot" needs to be exported by the entry point index.d.ts
238+
get snapshot(): UploadTaskSnapshot_2;
239+
// Warning: (ae-forgotten-export) The symbol "InternalTaskState" needs to be exported by the entry point index.d.ts
240+
_state: InternalTaskState;
241+
// Warning: (ae-forgotten-export) The symbol "FirebaseStorageError" needs to be exported by the entry point index.d.ts
242+
then<U>(onFulfilled?: ((value: UploadTaskSnapshot_2) => U | Promise<U>) | null, onRejected?: ((error: FirebaseStorageError_2) => U | Promise<U>) | null): Promise<U>;
243+
_transferred: number;
244+
}
245+
161246
// @public
162247
export interface UploadTaskSnapshot {
163248
bytesTransferred: number;

packages/storage/compat/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18+
// eslint-disable-next-line import/no-extraneous-dependencies
1819
import firebase from '@firebase/app-compat';
1920
import { _FirebaseNamespace } from '@firebase/app-types/private';
2021
import { StringFormat } from '../src/implementation/string';

packages/storage/exp/api.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
*/
1717

1818
import {
19-
_registerComponent,
2019
_getProvider,
2120
FirebaseApp
2221
// eslint-disable-next-line import/no-extraneous-dependencies

packages/storage/exp/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import {
1919
_registerComponent,
2020
registerVersion,
21-
_getProvider,
2221
SDK_VERSION
2322
// eslint-disable-next-line import/no-extraneous-dependencies
2423
} from '@firebase/app-exp';

packages/storage/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
"exp/dist"
1313
],
1414
"scripts": {
15+
"bundle": "rollup -c",
1516
"lint": "eslint -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
1617
"lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
17-
"build": "rollup -c rollup.config.js && yarn build:exp",
18+
"build": "run-p 'bundle rollup.config.js' build:exp build:compat",
1819
"build:exp": "rollup -c rollup.config.exp.js ; yarn api-report",
1920
"build:compat": "rollup -c rollup.config.compat.js",
2021
"build:exp:release": "run-p build:exp build:compat",

packages/storage/src/task.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ import { Reference } from './reference';
5757
/**
5858
* Represents a blob being uploaded. Can be used to pause/resume/cancel the
5959
* upload and manage callbacks for various events.
60-
* @public
60+
* @internal
6161
*/
6262
export class UploadTask {
6363
private _ref: Reference;

0 commit comments

Comments
 (0)