Skip to content

Commit d2b9d8c

Browse files
committed
address comments
1 parent 19c310b commit d2b9d8c

File tree

4 files changed

+122
-167
lines changed

4 files changed

+122
-167
lines changed
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
2-
"name": "@firebase/database-compat/standalone",
3-
"description": "The entry point for sharing code with Admin SDK",
4-
"main": "../dist/index.standalone.js",
5-
"typings": "../dist/database-compat/src/index.standalone.d.ts",
6-
"private": true
7-
}
8-
2+
"name": "@firebase/database-compat/standalone",
3+
"description": "The entry point for sharing code with Admin SDK",
4+
"main": "../dist/index.standalone.js",
5+
"typings": "../dist/database-compat/src/index.standalone.d.ts",
6+
"private": true
7+
}
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
/**
2+
* @license
3+
* Copyright 2021 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+
// APIs that don't depend on @firebase/app
19+
export {
20+
Database,
21+
EmulatorMockTokenOptions,
22+
enableLogging,
23+
goOffline,
24+
goOnline,
25+
connectDatabaseEmulator
26+
} from './api/Database';
27+
export {
28+
Query,
29+
DatabaseReference,
30+
ListenOptions,
31+
Unsubscribe,
32+
ThenableReference
33+
} from './api/Reference';
34+
export { OnDisconnect } from './api/OnDisconnect';
35+
export {
36+
DataSnapshot,
37+
EventType,
38+
QueryConstraint,
39+
QueryConstraintType,
40+
endAt,
41+
endBefore,
42+
equalTo,
43+
get,
44+
limitToFirst,
45+
limitToLast,
46+
off,
47+
onChildAdded,
48+
onChildChanged,
49+
onChildMoved,
50+
onChildRemoved,
51+
onDisconnect,
52+
onValue,
53+
orderByChild,
54+
orderByKey,
55+
orderByPriority,
56+
orderByValue,
57+
push,
58+
query,
59+
ref,
60+
refFromURL,
61+
remove,
62+
set,
63+
setPriority,
64+
setWithPriority,
65+
startAfter,
66+
startAt,
67+
update,
68+
child
69+
} from './api/Reference_impl';
70+
export { increment, serverTimestamp } from './api/ServerValue';
71+
export {
72+
runTransaction,
73+
TransactionOptions,
74+
TransactionResult
75+
} from './api/Transaction';
76+
77+
// internal exports
78+
export { setSDKVersion as _setSDKVersion } from './core/version';
79+
export {
80+
ReferenceImpl as _ReferenceImpl,
81+
QueryImpl as _QueryImpl
82+
} from './api/Reference_impl';
83+
export { repoManagerDatabaseFromApp as _repoManagerDatabaseFromApp } from './api/Database';
84+
export {
85+
validatePathString as _validatePathString,
86+
validateWritablePath as _validateWritablePath
87+
} from './core/util/validation';
88+
export { UserCallback as _UserCallback } from './core/view/EventRegistration';
89+
export { QueryParams as _QueryParams } from './core/view/QueryParams';
90+
91+
/* eslint-disable camelcase */
92+
export {
93+
hijackHash as _TEST_ACCESS_hijackHash,
94+
forceRestClient as _TEST_ACCESS_forceRestClient
95+
} from './api/test_access';
96+
/* eslint-enable camelcase */

packages/database/src/api.ts

Lines changed: 2 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -15,82 +15,5 @@
1515
* limitations under the License.
1616
*/
1717

18-
export {
19-
Database,
20-
EmulatorMockTokenOptions,
21-
enableLogging,
22-
getDatabase,
23-
goOffline,
24-
goOnline,
25-
connectDatabaseEmulator
26-
} from './api/Database';
27-
export {
28-
Query,
29-
DatabaseReference,
30-
ListenOptions,
31-
Unsubscribe,
32-
ThenableReference
33-
} from './api/Reference';
34-
export { OnDisconnect } from './api/OnDisconnect';
35-
export {
36-
DataSnapshot,
37-
EventType,
38-
QueryConstraint,
39-
QueryConstraintType,
40-
endAt,
41-
endBefore,
42-
equalTo,
43-
get,
44-
limitToFirst,
45-
limitToLast,
46-
off,
47-
onChildAdded,
48-
onChildChanged,
49-
onChildMoved,
50-
onChildRemoved,
51-
onDisconnect,
52-
onValue,
53-
orderByChild,
54-
orderByKey,
55-
orderByPriority,
56-
orderByValue,
57-
push,
58-
query,
59-
ref,
60-
refFromURL,
61-
remove,
62-
set,
63-
setPriority,
64-
setWithPriority,
65-
startAfter,
66-
startAt,
67-
update,
68-
child
69-
} from './api/Reference_impl';
70-
export { increment, serverTimestamp } from './api/ServerValue';
71-
export {
72-
runTransaction,
73-
TransactionOptions,
74-
TransactionResult
75-
} from './api/Transaction';
76-
77-
// internal exports
78-
export { setSDKVersion as _setSDKVersion } from './core/version';
79-
export {
80-
ReferenceImpl as _ReferenceImpl,
81-
QueryImpl as _QueryImpl
82-
} from './api/Reference_impl';
83-
export { repoManagerDatabaseFromApp as _repoManagerDatabaseFromApp } from './api/Database';
84-
export {
85-
validatePathString as _validatePathString,
86-
validateWritablePath as _validateWritablePath
87-
} from './core/util/validation';
88-
export { UserCallback as _UserCallback } from './core/view/EventRegistration';
89-
export { QueryParams as _QueryParams } from './core/view/QueryParams';
90-
91-
/* eslint-disable camelcase */
92-
export {
93-
hijackHash as _TEST_ACCESS_hijackHash,
94-
forceRestClient as _TEST_ACCESS_forceRestClient
95-
} from './api/test_access';
96-
/* eslint-enable camelcase */
18+
export * from './api.standalone';
19+
export { getDatabase } from './api/Database';
Lines changed: 18 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,25 @@
1+
/**
2+
* @license
3+
* Copyright 2021 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+
118
import { Client } from 'faye-websocket';
219

320
import { setWebSocketImpl } from './realtime/WebSocketConnection';
421

522
setWebSocketImpl(Client);
623

7-
// Identical to the exports from api.ts, but doesn't include getDatabase()
8-
// to avoid dependency on @firebase/app.
924
// This entry point should only be consumed by Admin SDK
10-
export {
11-
Database,
12-
EmulatorMockTokenOptions,
13-
enableLogging,
14-
goOffline,
15-
goOnline,
16-
connectDatabaseEmulator
17-
} from './api/Database';
18-
export {
19-
Query,
20-
DatabaseReference,
21-
ListenOptions,
22-
Unsubscribe,
23-
ThenableReference
24-
} from './api/Reference';
25-
export { OnDisconnect } from './api/OnDisconnect';
26-
export {
27-
DataSnapshot,
28-
EventType,
29-
QueryConstraint,
30-
QueryConstraintType,
31-
endAt,
32-
endBefore,
33-
equalTo,
34-
get,
35-
limitToFirst,
36-
limitToLast,
37-
off,
38-
onChildAdded,
39-
onChildChanged,
40-
onChildMoved,
41-
onChildRemoved,
42-
onDisconnect,
43-
onValue,
44-
orderByChild,
45-
orderByKey,
46-
orderByPriority,
47-
orderByValue,
48-
push,
49-
query,
50-
ref,
51-
refFromURL,
52-
remove,
53-
set,
54-
setPriority,
55-
setWithPriority,
56-
startAfter,
57-
startAt,
58-
update,
59-
child
60-
} from './api/Reference_impl';
61-
export { increment, serverTimestamp } from './api/ServerValue';
62-
export {
63-
runTransaction,
64-
TransactionOptions,
65-
TransactionResult
66-
} from './api/Transaction';
67-
68-
// internal exports
69-
export { setSDKVersion as _setSDKVersion } from './core/version';
70-
export {
71-
ReferenceImpl as _ReferenceImpl,
72-
QueryImpl as _QueryImpl
73-
} from './api/Reference_impl';
74-
export { repoManagerDatabaseFromApp as _repoManagerDatabaseFromApp } from './api/Database';
75-
export {
76-
validatePathString as _validatePathString,
77-
validateWritablePath as _validateWritablePath
78-
} from './core/util/validation';
79-
export { UserCallback as _UserCallback } from './core/view/EventRegistration';
80-
export { QueryParams as _QueryParams } from './core/view/QueryParams';
81-
82-
/* eslint-disable camelcase */
83-
export {
84-
hijackHash as _TEST_ACCESS_hijackHash,
85-
forceRestClient as _TEST_ACCESS_forceRestClient
86-
} from './api/test_access';
87-
/* eslint-enable camelcase */
88-
25+
export * from './api.standalone';

0 commit comments

Comments
 (0)