Skip to content

Commit c9575b2

Browse files
committed
Remove functions-types-exp and clean app-types-exp
1 parent bd1691c commit c9575b2

File tree

22 files changed

+62
-165
lines changed

22 files changed

+62
-165
lines changed

.changeset/config.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"@firebase/auth-types-exp",
2121
"@firebase/functions-compat",
2222
"@firebase/functions-exp",
23-
"@firebase/functions-types-exp",
2423
"@firebase/installations-exp",
2524
"@firebase/installations-types-exp",
2625
"@firebase/installations-compat",

common/api-review/functions-exp.api.md

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,47 @@
55
```ts
66

77
import { FirebaseApp } from '@firebase/app-exp';
8-
import { Functions } from '@firebase/functions-types-exp';
9-
import { FunctionsError } from '@firebase/functions-types-exp';
10-
import { FunctionsErrorCode } from '@firebase/functions-types-exp';
11-
import { HttpsCallable } from '@firebase/functions-types-exp';
12-
import { HttpsCallableOptions } from '@firebase/functions-types-exp';
13-
import { HttpsCallableResult } from '@firebase/functions-types-exp';
8+
import { FirebaseError } from '@firebase/util';
149

15-
export { Functions }
16-
17-
export { FunctionsError }
10+
// @public
11+
export interface Functions {
12+
app: FirebaseApp;
13+
customDomain: string | null;
14+
region: string;
15+
}
16+
17+
// @public (undocumented)
18+
export interface FunctionsError extends FirebaseError {
19+
readonly code: FunctionsErrorCode;
20+
readonly details?: unknown;
21+
}
1822

19-
export { FunctionsErrorCode }
23+
// @public
24+
export type FunctionsErrorCode = 'ok' | 'cancelled' | 'unknown' | 'invalid-argument' | 'deadline-exceeded' | 'not-found' | 'already-exists' | 'permission-denied' | 'resource-exhausted' | 'failed-precondition' | 'aborted' | 'out-of-range' | 'unimplemented' | 'internal' | 'unavailable' | 'data-loss' | 'unauthenticated';
2025

2126
// @public
2227
export function getFunctions(app: FirebaseApp, regionOrCustomDomain?: string): Functions;
2328

24-
export { HttpsCallable }
29+
// @public
30+
export interface HttpsCallable {
31+
// (undocumented)
32+
(data?: {} | null): Promise<HttpsCallableResult>;
33+
}
2534

2635
// @public
2736
export function httpsCallable(functionsInstance: Functions, name: string, options?: HttpsCallableOptions): HttpsCallable;
2837

29-
export { HttpsCallableOptions }
38+
// @public
39+
export interface HttpsCallableOptions {
40+
// (undocumented)
41+
timeout?: number;
42+
}
3043

31-
export { HttpsCallableResult }
44+
// @public
45+
export interface HttpsCallableResult {
46+
// (undocumented)
47+
readonly data: unknown;
48+
}
3249

3350
// @public
3451
export function useFunctionsEmulator(functionsInstance: Functions, host: string, port: number): void;

common/api-review/functions-types-exp.api.md

Lines changed: 0 additions & 67 deletions
This file was deleted.

packages-exp/functions-compat/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
"dependencies": {
5050
"@firebase/component": "0.2.0",
5151
"@firebase/functions-exp": "0.0.900",
52-
"@firebase/functions-types-exp": "0.0.900",
5352
"@firebase/messaging-types": "0.5.0",
5453
"@firebase/util": "0.3.4",
5554
"tslib": "^1.11.1"

packages-exp/functions-compat/src/callable.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717
import { expect } from 'chai';
18-
import { FunctionsErrorCode } from '@firebase/functions-types-exp';
18+
import { FunctionsErrorCode } from '@firebase/functions-exp';
1919
import { createTestService } from '../test/utils';
2020
import { firebase, FirebaseApp } from '@firebase/app-compat';
2121

packages-exp/functions-compat/src/register.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import {
2626
InstanceFactory,
2727
ComponentContainer
2828
} from '@firebase/component';
29-
import { Functions as FunctionsServiceExp } from '@firebase/functions-types-exp';
29+
import { Functions as FunctionsServiceExp } from '@firebase/functions-exp';
3030

3131
declare module '@firebase/component' {
3232
interface NameServiceMapping {

packages-exp/functions-compat/src/service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { FirebaseFunctions, HttpsCallable } from '@firebase/functions-types';
2323
import {
2424
HttpsCallableOptions,
2525
Functions as FunctionsServiceExp
26-
} from '@firebase/functions-types-exp';
26+
} from '@firebase/functions-exp';
2727
import { FirebaseApp } from '@firebase/app-compat';
2828
import { FirebaseError } from '@firebase/util';
2929

packages-exp/functions-exp/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
"typings": "dist/functions-exp-public.d.ts",
5353
"dependencies": {
5454
"@firebase/component": "0.2.0",
55-
"@firebase/functions-types-exp": "0.0.900",
5655
"@firebase/messaging-types": "0.5.0",
5756
"@firebase/util": "0.3.4",
5857
"node-fetch": "2.6.1",

packages-exp/functions-exp/src/api.ts

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,15 @@ import { _getProvider, FirebaseApp } from '@firebase/app-exp';
1919
import { FUNCTIONS_TYPE } from './constants';
2020

2121
import { Provider } from '@firebase/component';
22-
import {
23-
Functions,
24-
HttpsCallableOptions,
25-
HttpsCallable,
26-
HttpsCallableResult,
27-
FunctionsError,
28-
FunctionsErrorCode
29-
} from '@firebase/functions-types-exp';
22+
import { Functions, HttpsCallableOptions, HttpsCallable } from './public-types';
3023
import {
3124
FunctionsService,
3225
DEFAULT_REGION,
3326
useFunctionsEmulator as _useFunctionsEmulator,
3427
httpsCallable as _httpsCallable
3528
} from './service';
3629

37-
export {
38-
Functions,
39-
HttpsCallableOptions,
40-
HttpsCallable,
41-
HttpsCallableResult,
42-
FunctionsError,
43-
FunctionsErrorCode
44-
};
30+
export * from './public-types';
4531

4632
/**
4733
* Returns a Functions instance for the given app.

packages-exp/functions-exp/src/callable.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import { expect } from 'chai';
1818
import * as sinon from 'sinon';
1919
import { FirebaseApp } from '@firebase/app-exp';
20-
import { FunctionsErrorCode } from '@firebase/functions-types-exp';
20+
import { FunctionsErrorCode } from './public-types';
2121
import {
2222
Provider,
2323
ComponentContainer,

packages-exp/functions-exp/src/error.ts

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

18-
import { FunctionsErrorCode } from '@firebase/functions-types-exp';
18+
import { FunctionsErrorCode } from './public-types';
1919
import { decode } from './serializer';
2020
import { HttpResponseBody } from './service';
2121
import { FirebaseError } from '@firebase/util';

packages-exp/functions-types-exp/index.d.ts renamed to packages-exp/functions-exp/src/public-types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
import { FirebaseApp } from '@firebase/app-types-exp';
17+
import { FirebaseApp } from '@firebase/app-exp';
1818
import { FirebaseError } from '@firebase/util';
1919

2020
/**
2121
* An HttpsCallableResult wraps a single result from a function call.
2222
*/
2323
export interface HttpsCallableResult {
24-
readonly data: any;
24+
readonly data: unknown;
2525
}
2626

2727
/**
@@ -130,7 +130,7 @@ export interface FunctionsError extends FirebaseError {
130130
/**
131131
* Extra data to be converted to JSON and included in the error response.
132132
*/
133-
readonly details?: any;
133+
readonly details?: unknown;
134134
}
135135

136136
declare module '@firebase/component' {

packages-exp/functions-exp/src/service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
HttpsCallable,
2121
HttpsCallableResult,
2222
HttpsCallableOptions
23-
} from '@firebase/functions-types-exp';
23+
} from './public-types';
2424
import { _errorForResponse, FunctionsError } from './error';
2525
import { ContextProvider } from './context';
2626
import { encode, decode } from './serializer';

packages-exp/functions-types-exp/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages-exp/functions-types-exp/api-extractor.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

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

Lines changed: 0 additions & 31 deletions
This file was deleted.

packages-exp/functions-types-exp/tsconfig.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

packages-exp/installations-exp/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@
5151
"typescript": "4.0.5"
5252
},
5353
"peerDependencies": {
54-
"@firebase/app-exp": "0.x",
55-
"@firebase/app-types-exp": "0.x"
54+
"@firebase/app-exp": "0.x"
5655
},
5756
"dependencies": {
5857
"@firebase/installations-types-exp": "0.0.900",

packages/component/src/provider.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { expect } from 'chai';
1919
import { fake, SinonSpy } from 'sinon';
2020
import { ComponentContainer } from './component_container';
2121
import { FirebaseService } from '@firebase/app-types/private';
22-
import { _FirebaseService } from '@firebase/app-types-exp';
22+
import { _FirebaseService } from '@firebase/app-exp';
2323
import { Provider } from './provider';
2424
import { getFakeApp, getFakeComponent } from '../test/util';
2525
import '../test/setup';

repo-scripts/prune-dts/tests/firestore.input.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
* limitations under the License.
1616
*/
1717
import { DocumentData as DocumentData_2 } from '@firebase/firestore-types';
18-
import { FirebaseApp } from '@firebase/app-types-exp';
18+
import { FirebaseApp } from '@firebase/app-exp';
1919
import { FirebaseAuthInternalName } from '@firebase/auth-interop-types';
20-
import { _FirebaseService } from '@firebase/app-types-exp';
20+
import { _FirebaseService } from '@firebase/app-exp';
2121
import { LogLevelString as LogLevel } from '@firebase/logger';
2222
import { Provider } from '@firebase/component';
2323
import { SetOptions as SetOptions_2 } from '@firebase/firestore-types';

repo-scripts/prune-dts/tests/firestore.output.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
* limitations under the License.
1616
*/
1717
import { DocumentData as DocumentData_2 } from '@firebase/firestore-types';
18-
import { FirebaseApp } from '@firebase/app-types-exp';
18+
import { FirebaseApp } from '@firebase/app-exp';
1919
import { FirebaseAuthInternalName } from '@firebase/auth-interop-types';
20-
import { _FirebaseService } from '@firebase/app-types-exp';
20+
import { _FirebaseService } from '@firebase/app-exp';
2121
import { LogLevelString as LogLevel } from '@firebase/logger';
2222
import { Provider } from '@firebase/component';
2323
import { SetOptions as SetOptions_2 } from '@firebase/firestore-types';

yarn.lock

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,6 +1173,21 @@
11731173
unique-filename "^1.1.1"
11741174
which "^1.3.1"
11751175

1176+
"@firebase/[email protected]":
1177+
version "0.1.21"
1178+
resolved "https://registry.npmjs.org/@firebase/component/-/component-0.1.21.tgz#56062eb0d449dc1e7bbef3c084a9b5fa48c7c14d"
1179+
integrity sha512-kd5sVmCLB95EK81Pj+yDTea8pzN2qo/1yr0ua9yVi6UgMzm6zAeih73iVUkaat96MAHy26yosMufkvd3zC4IKg==
1180+
dependencies:
1181+
"@firebase/util" "0.3.4"
1182+
tslib "^1.11.1"
1183+
1184+
"@firebase/[email protected]", "@firebase/database-types@^0.6.1":
1185+
version "0.6.1"
1186+
resolved "https://registry.npmjs.org/@firebase/database-types/-/database-types-0.6.1.tgz#cf1cfc03e617ed4c2561703781f85ba4c707ff65"
1187+
integrity sha512-JtL3FUbWG+bM59iYuphfx9WOu2Mzf0OZNaqWiQ7lJR8wBe7bS9rIm9jlBFtksB7xcya1lZSQPA/GAy2jIlMIkA==
1188+
dependencies:
1189+
"@firebase/app-types" "0.6.1"
1190+
11761191
"@firebase/database@^0.8.1":
11771192
version "0.8.3"
11781193
resolved "https://registry.npmjs.org/@firebase/database/-/database-0.8.3.tgz#4e5efa8fc8df00d6febfd9c8d6d6e409596659f7"
@@ -14725,7 +14740,6 @@ symbol-observable@^1.1.0:
1472514740

1472614741
"sync-promise@git+https://github.com/brettz9/sync-promise.git#full-sync-missing-promise-features":
1472714742
version "1.0.1"
14728-
uid "25845a49a00aa2d2c985a5149b97c86a1fcdc75a"
1472914743
resolved "git+https://github.com/brettz9/sync-promise.git#25845a49a00aa2d2c985a5149b97c86a1fcdc75a"
1473014744

1473114745
table@^6.0.4:
@@ -16045,7 +16059,6 @@ websocket-extensions@>=0.1.1:
1604516059

1604616060
"websql@git+https://github.com/brettz9/node-websql.git#configurable-secure2":
1604716061
version "1.0.0"
16048-
uid "5149bc0763376ca757fc32dc74345ada0467bfbb"
1604916062
resolved "git+https://github.com/brettz9/node-websql.git#5149bc0763376ca757fc32dc74345ada0467bfbb"
1605016063
dependencies:
1605116064
argsarray "^0.0.1"

0 commit comments

Comments
 (0)