Skip to content

Commit 76015b0

Browse files
authored
Merge 5c592f6 into 19bab1c
2 parents 19bab1c + 5c592f6 commit 76015b0

File tree

13 files changed

+107
-13
lines changed

13 files changed

+107
-13
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
## API Report File for "@firebase/installations-exp"
2+
3+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4+
5+
```ts
6+
7+
import { FirebaseApp } from '@firebase/app-types-exp';
8+
import { FirebaseInstallations } from '@firebase/installations-types-exp';
9+
10+
// @public (undocumented)
11+
export function deleteInstallations(installations: FirebaseInstallations): Promise<void>;
12+
13+
// @public (undocumented)
14+
export function getId(installations: FirebaseInstallations): Promise<string>;
15+
16+
// @public (undocumented)
17+
export function getInstallations(app: FirebaseApp): FirebaseInstallations;
18+
19+
// @public (undocumented)
20+
export function getToken(installations: FirebaseInstallations, forceRefresh?: boolean): Promise<string>;
21+
22+
// @public (undocumented)
23+
export type IdChangeCallbackFn = (installationId: string) => void;
24+
25+
// @public (undocumented)
26+
export type IdChangeUnsubscribeFn = () => void;
27+
28+
// @public
29+
export function onIdChange(installations: FirebaseInstallations, callback: IdChangeCallbackFn): IdChangeUnsubscribeFn;
30+
31+
32+
// (No @packageDocumentation comment for this package)
33+
34+
```
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## API Report File for "@firebase/installations-types-exp"
2+
3+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4+
5+
```ts
6+
7+
// @public (undocumented)
8+
export interface FirebaseInstallations {}
9+
10+
// @internal
11+
export interface _FirebaseInstallationsInternal {
12+
getId(): Promise<string>;
13+
14+
getToken(forceRefresh?: boolean): Promise<string>;
15+
}
16+
17+
18+
// (No @packageDocumentation comment for this package)
19+
20+
```
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "../../config/api-extractor.json",
3+
// Point it to your entry point d.ts file.
4+
"mainEntryPointFilePath": "<projectFolder>/dist/src/index.d.ts",
5+
"dtsRollup": {
6+
"enabled": true
7+
}
8+
}

packages-exp/installations-exp/package.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@
55
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
66
"main": "dist/index.cjs.js",
77
"module": "dist/index.esm.js",
8+
"browser": "dist/index.esm.js",
89
"esm2017": "dist/index.esm2017.js",
9-
"types": "dist/src/index.d.ts",
10+
"typings": "dist/installations-exp.d.ts",
1011
"license": "Apache-2.0",
1112
"files": [
1213
"dist"
1314
],
1415
"scripts": {
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",
18+
"build": "rollup -c && yarn api-report",
1819
"build:deps": "lerna run --scope @firebase/installations-exp --include-dependencies build",
1920
"dev": "rollup -c -w",
2021
"test": "yarn type-check && yarn test:karma && yarn lint",
@@ -25,7 +26,11 @@
2526
"serve": "yarn serve:build && yarn serve:host",
2627
"serve:build": "rollup -c test-app/rollup.config.js",
2728
"serve:host": "http-server -c-1 test-app",
28-
"prepare": "yarn build"
29+
"prepare": "yarn build",
30+
"api-report": "api-extractor run --local --verbose",
31+
"predoc": "node ../../scripts/exp/remove-exp.js temp",
32+
"doc": "api-documenter markdown --input temp --output docs",
33+
"build:doc": "yarn build && yarn doc"
2934
},
3035
"repository": {
3136
"directory": "packages-exp/installations-exp",
@@ -37,11 +42,11 @@
3742
},
3843
"devDependencies": {
3944
"@firebase/app-exp": "0.0.800",
40-
"rollup": "2.26.5",
45+
"rollup": "2.26.7",
4146
"rollup-plugin-commonjs": "10.1.0",
4247
"rollup-plugin-json": "4.0.0",
4348
"rollup-plugin-node-resolve": "5.2.0",
44-
"rollup-plugin-typescript2": "0.27.1",
49+
"rollup-plugin-typescript2": "0.27.2",
4550
"rollup-plugin-uglify": "6.0.4",
4651
"typescript": "4.0.2"
4752
},

packages-exp/installations-exp/src/api/delete-installations.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ import { ERROR_FACTORY, ErrorCode } from '../util/errors';
2222
import { FirebaseInstallationsImpl } from '../interfaces/installation-impl';
2323
import { FirebaseInstallations } from '@firebase/installations-types-exp';
2424

25+
/**
26+
* @public
27+
*/
2528
export async function deleteInstallations(
2629
installations: FirebaseInstallations
2730
): Promise<void> {

packages-exp/installations-exp/src/api/get-id.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ import { refreshAuthToken } from '../helpers/refresh-auth-token';
2020
import { FirebaseInstallationsImpl } from '../interfaces/installation-impl';
2121
import { FirebaseInstallations } from '@firebase/installations-types-exp';
2222

23+
/**
24+
* @public
25+
*/
2326
export async function getId(
2427
installations: FirebaseInstallations
2528
): Promise<string> {

packages-exp/installations-exp/src/api/get-installations.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ import { FirebaseApp } from '@firebase/app-types-exp';
1919
import { FirebaseInstallations } from '@firebase/installations-types-exp';
2020
import { _getProvider } from '@firebase/app-exp';
2121

22+
/**
23+
* @public
24+
*/
2225
export function getInstallations(app: FirebaseApp): FirebaseInstallations {
2326
const installationsImpl = _getProvider(
2427
app,

packages-exp/installations-exp/src/api/get-token.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ import {
2323
} from '../interfaces/installation-impl';
2424
import { FirebaseInstallations } from '@firebase/installations-types-exp';
2525

26+
/**
27+
* @public
28+
*/
2629
export async function getToken(
2730
installations: FirebaseInstallations,
2831
forceRefresh = false

packages-exp/installations-exp/src/api/on-id-change.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,20 @@ import { addCallback, removeCallback } from '../helpers/fid-changed';
1919
import { FirebaseInstallationsImpl } from '../interfaces/installation-impl';
2020
import { FirebaseInstallations } from '@firebase/installations-types-exp';
2121

22+
/**
23+
* @public
24+
*/
2225
export type IdChangeCallbackFn = (installationId: string) => void;
26+
/**
27+
* @public
28+
*/
2329
export type IdChangeUnsubscribeFn = () => void;
2430

2531
/**
2632
* Sets a new callback that will get called when Installation ID changes.
2733
* Returns an unsubscribe function that will remove the callback when called.
34+
*
35+
* @public
2836
*/
2937
export function onIdChange(
3038
installations: FirebaseInstallations,

packages-exp/installations-exp/src/functions/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import {
2424
ComponentContainer
2525
} from '@firebase/component';
2626
import { getId, getToken } from '../api/index';
27-
import { FirebaseInstallationsInternal } from '@firebase/installations-types-exp';
27+
import { _FirebaseInstallationsInternal } from '@firebase/installations-types-exp';
2828
import { FirebaseInstallationsImpl } from '../interfaces/installation-impl';
2929
import { extractAppConfig } from '../helpers/extract-app-config';
3030

@@ -55,7 +55,7 @@ const internalFactory: InstanceFactory<'installations-exp-internal'> = (
5555
// Internal FIS instance relies on public FIS instance.
5656
const installations = _getProvider(app, INSTALLATIONS_NAME).getImmediate();
5757

58-
const installationsInternal: FirebaseInstallationsInternal = {
58+
const installationsInternal: _FirebaseInstallationsInternal = {
5959
getId: () => getId(installations),
6060
getToken: (forceRefresh?: boolean) => getToken(installations, forceRefresh)
6161
};

packages-exp/installations-types-exp/index.d.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,17 @@
1515
* limitations under the License.
1616
*/
1717

18-
import { FirebaseInstallationsImpl } from '../installations-exp/src/interfaces/installation-impl';
19-
18+
/**
19+
* @public
20+
*/
2021
export interface FirebaseInstallations {}
2122

2223
/**
2324
* An interface for Firebase internal SDKs use only.
25+
*
26+
* @internal
2427
*/
25-
export interface FirebaseInstallationsInternal {
28+
export interface _FirebaseInstallationsInternal {
2629
/**
2730
* Creates a Firebase Installation if there isn't one for the app and
2831
* returns the Installation ID.
@@ -38,6 +41,6 @@ export interface FirebaseInstallationsInternal {
3841
declare module '@firebase/component' {
3942
interface NameServiceMapping {
4043
'installations-exp': FirebaseInstallations;
41-
'installations-exp-internal': FirebaseInstallationsInternal;
44+
'installations-exp-internal': _FirebaseInstallationsInternal;
4245
}
4346
}

packages-exp/installations-types-exp/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
"license": "Apache-2.0",
88
"scripts": {
99
"test": "tsc",
10-
"test:ci": "node ../../scripts/run_tests_in_ci.js"
10+
"test:ci": "node ../../scripts/run_tests_in_ci.js",
11+
"api-report": "api-extractor run --local --verbose",
12+
"predoc": "node ../../scripts/exp/remove-exp.js temp",
13+
"doc": "api-documenter markdown --input temp --output docs",
14+
"build:doc": "yarn api-report && yarn doc"
1115
},
1216
"files": [
1317
"index.d.ts"

scripts/exp/remove-exp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if (argv._[0]) {
2929
if (statSync(dirOrFile).isFile()) {
3030
removeExpSuffixFromFile(dirOrFile);
3131
} else {
32-
removeExpSuffix(dir);
32+
removeExpSuffix(dirOrFile);
3333
}
3434
}
3535

0 commit comments

Comments
 (0)