Skip to content

Commit b5faba1

Browse files
Merge branch 'master' into mrschmidt/mutabledocuments
2 parents 2bd9d1c + 4d7d2c4 commit b5faba1

File tree

84 files changed

+2336
-1155
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+2336
-1155
lines changed

.changeset/config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"@firebase/installations-exp",
2424
"@firebase/installations-compat",
2525
"@firebase/messaging-exp",
26+
"@firebase/messaging-compat",
2627
"@firebase/performance-exp",
2728
"@firebase/performance-compat",
2829
"@firebase/remote-config-exp",

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-exp/analytics-compat/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"@firebase/analytics-exp": "0.0.900",
4949
"@firebase/analytics-types": "0.4.0",
5050
"@firebase/util": "0.4.0",
51-
"tslib": "^2.0.0"
51+
"tslib": "^2.1.0"
5252
},
5353
"nyc": {
5454
"extension": [

packages-exp/analytics-compat/rollup.shared.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@
1616
*/
1717
import pkg from './package.json';
1818

19-
const deps = Object.keys(
20-
Object.assign({}, pkg.peerDependencies, pkg.dependencies)
21-
);
19+
const deps = [
20+
...Object.keys(Object.assign({}, pkg.peerDependencies, pkg.dependencies)),
21+
'@firebase/analytics'
22+
];
2223

2324
export const es5BuildsNoPlugin = [
2425
/**

packages-exp/analytics-exp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"@firebase/logger": "0.2.6",
3737
"@firebase/util": "0.4.0",
3838
"@firebase/component": "0.2.1",
39-
"tslib": "^2.0.0"
39+
"tslib": "^2.1.0"
4040
},
4141
"license": "Apache-2.0",
4242
"devDependencies": {

packages-exp/app-compat/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"@firebase/util": "0.4.0",
3434
"@firebase/logger": "0.2.6",
3535
"@firebase/component": "0.2.1",
36-
"tslib": "^2.0.0",
36+
"tslib": "^2.1.0",
3737
"dom-storage": "2.1.0",
3838
"xmlhttprequest": "1.8.0"
3939
},

packages-exp/app-compat/rollup.config.release.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ import typescript from 'typescript';
2121
import pkg from './package.json';
2222
import { importPathTransformer } from '../../scripts/exp/ts-transform-import-path';
2323

24-
const deps = Object.keys(
25-
Object.assign({}, pkg.peerDependencies, pkg.dependencies)
26-
);
24+
const deps = [
25+
...Object.keys(Object.assign({}, pkg.peerDependencies, pkg.dependencies)),
26+
'@firebase/app'
27+
];
2728

2829
/**
2930
* ES5 Builds

packages-exp/app-exp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"@firebase/util": "0.4.0",
3535
"@firebase/logger": "0.2.6",
3636
"@firebase/component": "0.2.1",
37-
"tslib": "^2.0.0"
37+
"tslib": "^2.1.0"
3838
},
3939
"license": "Apache-2.0",
4040
"devDependencies": {

packages-exp/auth-compat-exp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"@firebase/component": "0.2.1",
3737
"@firebase/util": "0.4.0",
3838
"node-fetch": "2.6.1",
39-
"tslib": "^2.0.0"
39+
"tslib": "^2.1.0"
4040
},
4141
"license": "Apache-2.0",
4242
"devDependencies": {

packages-exp/auth-exp/demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"@firebase/auth-exp": "0.0.900",
2121
"@firebase/logger": "0.2.6",
2222
"@firebase/util": "0.3.4",
23-
"tslib": "^2.0.0"
23+
"tslib": "^2.1.0"
2424
},
2525
"license": "Apache-2.0",
2626
"devDependencies": {

packages-exp/auth-exp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"@firebase/util": "0.4.0",
5555
"node-fetch": "2.6.1",
5656
"selenium-webdriver": "4.0.0-beta.1",
57-
"tslib": "^2.0.0"
57+
"tslib": "^2.1.0"
5858
},
5959
"license": "Apache-2.0",
6060
"devDependencies": {

packages-exp/functions-compat/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"@firebase/functions-exp": "0.0.900",
5252
"@firebase/messaging-types": "0.5.0",
5353
"@firebase/util": "0.4.0",
54-
"tslib": "^2.0.0"
54+
"tslib": "^2.1.0"
5555
},
5656
"nyc": {
5757
"extension": [

packages-exp/functions-compat/rollup.config.base.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ import typescriptPlugin from 'rollup-plugin-typescript2';
2020
import typescript from 'typescript';
2121
import pkg from './package.json';
2222

23-
const deps = Object.keys(
24-
Object.assign({}, pkg.peerDependencies, pkg.dependencies)
25-
);
23+
const deps = [
24+
...Object.keys(Object.assign({}, pkg.peerDependencies, pkg.dependencies)),
25+
'@firebase/functions'
26+
];
2627

2728
/**
2829
* ES5 Builds

packages-exp/functions-exp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"@firebase/messaging-types": "0.5.0",
5656
"@firebase/util": "0.4.0",
5757
"node-fetch": "2.6.1",
58-
"tslib": "^2.0.0"
58+
"tslib": "^2.1.0"
5959
},
6060
"nyc": {
6161
"extension": [

packages-exp/installations-compat/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@
5454
"@firebase/util": "0.4.0",
5555
"@firebase/component": "0.2.1",
5656
"idb": "3.0.2",
57-
"tslib": "^2.0.0"
57+
"tslib": "^2.1.0"
5858
}
5959
}

packages-exp/installations-exp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@
5959
"@firebase/util": "0.4.0",
6060
"@firebase/component": "0.2.1",
6161
"idb": "3.0.2",
62-
"tslib": "^2.0.0"
62+
"tslib": "^2.1.0"
6363
}
6464
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/* eslint-disable @typescript-eslint/no-require-imports */
2+
/**
3+
* @license
4+
* Copyright 2020 Google LLC
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
const path = require('path');
19+
20+
module.exports = {
21+
extends: '../../config/.eslintrc.js',
22+
parserOptions: {
23+
project: 'tsconfig.json',
24+
// to make vscode-eslint work with monorepo
25+
// https://github.com/typescript-eslint/typescript-eslint/issues/251#issuecomment-463943250
26+
tsconfigRootDir: __dirname
27+
}
28+
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# @firebase/messaging-compat
2+
3+
This is the compat package that recreates the v8 APIs.
4+
5+
**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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+
18+
const karmaBase = require('../../config/karma.base');
19+
20+
const files = ['test/**/*'];
21+
22+
module.exports = function (config) {
23+
const karmaConfig = {
24+
...karmaBase,
25+
files,
26+
frameworks: ['mocha']
27+
};
28+
29+
config.set(karmaConfig);
30+
};
31+
32+
module.exports.files = files;

0 commit comments

Comments
 (0)