Skip to content

Commit f2b1924

Browse files
committed
Add attempt #1
1 parent b366d68 commit f2b1924

File tree

6 files changed

+2544
-5
lines changed

6 files changed

+2544
-5
lines changed

api-extractor.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@
328328
*/
329329
"extractorMessageReporting": {
330330
"default": {
331-
"logLevel": "warning"
331+
"logLevel": "none"
332332
// "addToApiReportFile": false
333333
}
334334

@@ -349,7 +349,7 @@
349349
*/
350350
"tsdocMessageReporting": {
351351
"default": {
352-
"logLevel": "warning"
352+
"logLevel": "none"
353353
// "addToApiReportFile": false
354354
}
355355

etc/firebase-admin.api.md

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,164 @@
44
55
```ts
66

7+
import { Agent } from 'http';
8+
9+
// @public
10+
export function app(appName?: string): FirebaseApp;
11+
12+
// @public
13+
export type AppHook = (event: string, app: FirebaseApp) => void;
14+
15+
// Warning: (ae-forgotten-export) The symbol "Credential" needs to be exported by the entry point index.d.ts
16+
//
17+
// @public (undocumented)
18+
export function applicationDefault(httpAgent?: Agent): Credential;
19+
20+
// @public (undocumented)
21+
export function apps(): FirebaseApp[];
22+
23+
// @public (undocumented)
24+
export function cert(serviceAccountPathOrObject: string | object, httpAgent?: Agent): Credential;
25+
26+
// @public (undocumented)
27+
export const credential: {
28+
cert: (serviceAccountPathOrObject: string | object, httpAgent?: Agent | undefined) => Credential;
29+
refreshToken: (refreshTokenPathOrObject: string | object, httpAgent?: Agent | undefined) => Credential;
30+
applicationDefault: (httpAgent?: Agent | undefined) => Credential;
31+
};
32+
33+
// @public
34+
export const FIREBASE_CONFIG_VAR = "FIREBASE_CONFIG";
35+
36+
// @public
37+
export interface FirebaseAccessToken {
38+
// (undocumented)
39+
accessToken: string;
40+
// (undocumented)
41+
expirationTime: number;
42+
}
43+
44+
// @public
45+
export class FirebaseApp {
46+
constructor(options: FirebaseAppOptions, name: string, firebaseInternals_: FirebaseNamespaceInternals);
47+
delete(): Promise<void>;
48+
// (undocumented)
49+
INTERNAL: FirebaseAppInternals;
50+
get name(): string;
51+
get options(): FirebaseAppOptions;
52+
// Warning: (ae-forgotten-export) The symbol "FirebaseServiceInterface" needs to be exported by the entry point index.d.ts
53+
//
54+
// (undocumented)
55+
registerService(serviceName: string, service: FirebaseServiceInterface): void;
56+
}
57+
58+
// @public
59+
export class FirebaseAppInternals {
60+
constructor(credential_: Credential);
61+
addAuthTokenListener(listener: (token: string) => void): void;
62+
delete(): void;
63+
getToken(forceRefresh?: boolean): Promise<FirebaseAccessToken>;
64+
removeAuthTokenListener(listener: (token: string) => void): void;
65+
}
66+
67+
// @public
68+
export interface FirebaseAppOptions {
69+
// (undocumented)
70+
credential?: Credential;
71+
// (undocumented)
72+
databaseAuthVariableOverride?: object | null;
73+
// (undocumented)
74+
databaseURL?: string;
75+
// (undocumented)
76+
httpAgent?: Agent;
77+
// (undocumented)
78+
projectId?: string;
79+
// (undocumented)
80+
serviceAccountId?: string;
81+
// (undocumented)
82+
storageBucket?: string;
83+
}
84+
85+
// @public
86+
export class FirebaseNamespace {
87+
constructor();
88+
// (undocumented)
89+
__esModule: boolean;
90+
app(appName?: string): FirebaseApp;
91+
// (undocumented)
92+
applicationDefault(httpAgent?: Agent): Credential;
93+
// (undocumented)
94+
get apps(): FirebaseApp[];
95+
// (undocumented)
96+
cert(serviceAccountPathOrObject: string | object, httpAgent?: Agent): Credential;
97+
// (undocumented)
98+
credential: {
99+
cert: (serviceAccountPathOrObject: string | object, httpAgent?: Agent | undefined) => Credential;
100+
refreshToken: (refreshTokenPathOrObject: string | object, httpAgent?: Agent | undefined) => Credential;
101+
applicationDefault: (httpAgent?: Agent | undefined) => Credential;
102+
};
103+
initializeApp(options?: FirebaseAppOptions, appName?: string): FirebaseApp;
104+
// (undocumented)
105+
INTERNAL: FirebaseNamespaceInternals;
106+
// (undocumented)
107+
Promise: any;
108+
// (undocumented)
109+
refreshToken(refreshTokenPathOrObject: string | object, httpAgent?: Agent): Credential;
110+
// (undocumented)
111+
SDK_VERSION: string;
112+
}
113+
114+
// @public
115+
export class FirebaseNamespaceInternals {
116+
constructor(firebase_: {
117+
[key: string]: any;
118+
});
119+
app(appName?: string): FirebaseApp;
120+
// (undocumented)
121+
get apps(): FirebaseApp[];
122+
// (undocumented)
123+
firebase_: {
124+
[key: string]: any;
125+
};
126+
initializeApp(options?: FirebaseAppOptions, appName?: string): FirebaseApp;
127+
// (undocumented)
128+
registerService(serviceName: string, createService: FirebaseServiceFactory, serviceProperties?: object, appHook?: AppHook): FirebaseServiceNamespace<FirebaseServiceInterface>;
129+
// (undocumented)
130+
removeApp(appName: string): void;
131+
// (undocumented)
132+
serviceFactories: {
133+
[serviceName: string]: FirebaseServiceFactory;
134+
};
135+
}
136+
137+
// @public (undocumented)
138+
export interface FirebaseServiceNamespace<T> {
139+
// (undocumented)
140+
(app?: FirebaseApp): T;
141+
// (undocumented)
142+
[key: string]: any;
143+
}
144+
145+
// @public (undocumented)
146+
export class Hello {
147+
}
148+
149+
// @public
150+
export function initializeApp(options?: FirebaseAppOptions, appName?: string): FirebaseApp;
151+
152+
// @public (undocumented)
153+
export const internal: FirebaseNamespaceInternals;
154+
155+
// @public (undocumented)
156+
export function refreshToken(refreshTokenPathOrObject: string | object, httpAgent?: Agent): Credential;
157+
158+
// @public (undocumented)
159+
export const SDK_VERSION = "8.12.1";
160+
161+
162+
// Warnings were encountered during analysis:
163+
//
164+
// lib/firebase-namespace.d.ts:40:9 - (ae-forgotten-export) The symbol "FirebaseServiceFactory" needs to be exported by the entry point index.d.ts
7165

8166
// (No @packageDocumentation comment for this package)
9167

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@
99
"node": "^8.13.0 || >=10.10.0"
1010
},
1111
"scripts": {
12-
"build": "gulp build",
12+
"build": "gulp build && api-extractor run --local",
13+
"build:noreport": "gulp build && api-extractor run",
1314
"build:tests": "gulp compile_test",
1415
"clean": "rm -rf lib",
1516
"prebuildpackage": "npm run clean && npm run build && node lib/configure-package.js",
1617
"build:dist": "npm run prebuildpackage && cd lib && rm configure-package.* && npm pack",
1718
"prepare": "npm run build",
1819
"lint": "run-p lint:src lint:test",
1920
"test": "run-s lint test:unit",
20-
"integration": "run-s build test:integration",
21+
"integration": "run-s build:noreport test:integration",
2122
"test:unit": "mocha test/unit/*.spec.ts --require ts-node/register",
2223
"test:integration": "mocha test/integration/*.ts --slow 5000 --timeout 20000 --require ts-node/register",
2324
"test:coverage": "nyc npm run test:unit",

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@ https://firebase.google.com/docs/web/setup
3939
export * from './firebase-namespace';
4040
export * from './firebase-app';
4141

42+
4243
//export = firebase;

0 commit comments

Comments
 (0)