@firebase/database 1.1.5-eap-sql.49c10c82f → 1.1.6-20261110194028
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +6 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +6 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.node.cjs.js +6 -2
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.standalone.js +5 -1
- package/dist/index.standalone.js.map +1 -1
- package/dist/node-esm/index.node.esm.js +6 -2
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/dist/node-esm/src/api/Database.d.ts +2 -2
- package/dist/node-esm/src/api/Reference_impl.d.ts +2 -2
- package/dist/node-esm/src/api.standalone.d.ts +5 -5
- package/dist/node-esm/src/core/RepoInfo.d.ts +1 -1
- package/dist/src/api/Database.d.ts +2 -2
- package/dist/src/api/Reference_impl.d.ts +2 -2
- package/dist/src/api.standalone.d.ts +5 -5
- package/dist/src/core/RepoInfo.d.ts +1 -1
- package/package.json +12 -17
- package/dist/node-esm/test/helpers/EventAccumulator.d.ts +0 -35
- package/dist/node-esm/test/helpers/syncpoint-util.d.ts +0 -29
- package/dist/node-esm/test/helpers/util.d.ts +0 -36
- package/dist/test/helpers/EventAccumulator.d.ts +0 -35
- package/dist/test/helpers/syncpoint-util.d.ts +0 -29
- package/dist/test/helpers/util.d.ts +0 -36
|
@@ -18,10 +18,10 @@ import { _FirebaseService, FirebaseApp } from '@firebase/app';
|
|
|
18
18
|
import { AppCheckInternalComponentName } from '@firebase/app-check-interop-types';
|
|
19
19
|
import { FirebaseAuthInternalName } from '@firebase/auth-interop-types';
|
|
20
20
|
import { Provider } from '@firebase/component';
|
|
21
|
-
import { EmulatorMockTokenOptions } from '@firebase/util';
|
|
21
|
+
import { type EmulatorMockTokenOptions } from '@firebase/util';
|
|
22
22
|
import { Repo } from '../core/Repo';
|
|
23
23
|
import { ReferenceImpl } from './Reference_impl';
|
|
24
|
-
export { EmulatorMockTokenOptions } from '@firebase/util';
|
|
24
|
+
export type { EmulatorMockTokenOptions } from '@firebase/util';
|
|
25
25
|
/**
|
|
26
26
|
* This function should only ever be called to CREATE a new database instance.
|
|
27
27
|
* @internal
|
|
@@ -19,7 +19,7 @@ import { Index } from '../core/snap/indexes/Index';
|
|
|
19
19
|
import { Node } from '../core/snap/Node';
|
|
20
20
|
import { Path } from '../core/util/Path';
|
|
21
21
|
import { Change } from '../core/view/Change';
|
|
22
|
-
import { CancelEvent, DataEvent, EventType } from '../core/view/Event';
|
|
22
|
+
import { CancelEvent, DataEvent, type EventType } from '../core/view/Event';
|
|
23
23
|
import { CallbackContext, EventRegistration, QueryContext } from '../core/view/EventRegistration';
|
|
24
24
|
import { QueryParams } from '../core/view/QueryParams';
|
|
25
25
|
import { Database } from './Database';
|
|
@@ -848,7 +848,7 @@ export declare function onChildRemoved(query: Query, callback: (snapshot: DataSn
|
|
|
848
848
|
* @returns A function that can be invoked to remove the listener.
|
|
849
849
|
*/
|
|
850
850
|
export declare function onChildRemoved(query: Query, callback: (snapshot: DataSnapshot) => unknown, cancelCallback: (error: Error) => unknown, options: ListenOptions): Unsubscribe;
|
|
851
|
-
export { EventType };
|
|
851
|
+
export type { EventType };
|
|
852
852
|
/**
|
|
853
853
|
* Detaches a callback previously attached with the corresponding `on*()` (`onValue`, `onChildAdded`) listener.
|
|
854
854
|
* Note: This is not the recommended way to remove a listener. Instead, please use the returned callback function from
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
export { Database, EmulatorMockTokenOptions, enableLogging, goOffline, goOnline, forceWebSockets, forceLongPolling, connectDatabaseEmulator } from './api/Database';
|
|
18
|
-
export { Query, DatabaseReference, ListenOptions, Unsubscribe, ThenableReference } from './api/Reference';
|
|
17
|
+
export { Database, type EmulatorMockTokenOptions, enableLogging, goOffline, goOnline, forceWebSockets, forceLongPolling, connectDatabaseEmulator } from './api/Database';
|
|
18
|
+
export type { Query, DatabaseReference, ListenOptions, Unsubscribe, ThenableReference } from './api/Reference';
|
|
19
19
|
export { OnDisconnect } from './api/OnDisconnect';
|
|
20
|
-
export { DataSnapshot, EventType, IteratedDataSnapshot, QueryConstraint, QueryConstraintType, endAt, endBefore, equalTo, get, limitToFirst, limitToLast, off, onChildAdded, onChildChanged, onChildMoved, onChildRemoved, onDisconnect, onValue, orderByChild, orderByKey, orderByPriority, orderByValue, push, query, ref, refFromURL, remove, set, setPriority, setWithPriority, startAfter, startAt, update, child } from './api/Reference_impl';
|
|
20
|
+
export { DataSnapshot, type EventType, type IteratedDataSnapshot, QueryConstraint, type QueryConstraintType, endAt, endBefore, equalTo, get, limitToFirst, limitToLast, off, onChildAdded, onChildChanged, onChildMoved, onChildRemoved, onDisconnect, onValue, orderByChild, orderByKey, orderByPriority, orderByValue, push, query, ref, refFromURL, remove, set, setPriority, setWithPriority, startAfter, startAt, update, child } from './api/Reference_impl';
|
|
21
21
|
export { increment, serverTimestamp } from './api/ServerValue';
|
|
22
|
-
export { runTransaction, TransactionOptions, TransactionResult } from './api/Transaction';
|
|
22
|
+
export { runTransaction, type TransactionOptions, TransactionResult } from './api/Transaction';
|
|
23
23
|
export { setSDKVersion as _setSDKVersion } from './core/version';
|
|
24
24
|
export { ReferenceImpl as _ReferenceImpl, QueryImpl as _QueryImpl } from './api/Reference_impl';
|
|
25
25
|
export { repoManagerDatabaseFromApp as _repoManagerDatabaseFromApp } from './api/Database';
|
|
26
26
|
export { validatePathString as _validatePathString, validateWritablePath as _validateWritablePath } from './core/util/validation';
|
|
27
|
-
export { UserCallback as _UserCallback } from './core/view/EventRegistration';
|
|
27
|
+
export type { UserCallback as _UserCallback } from './core/view/EventRegistration';
|
|
28
28
|
export { QueryParams as _QueryParams } from './core/view/QueryParams';
|
|
29
29
|
export { hijackHash as _TEST_ACCESS_hijackHash, forceRestClient as _TEST_ACCESS_forceRestClient } from './api/test_access';
|
|
30
30
|
export * from './internal/index';
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { EmulatorMockTokenOptions } from '@firebase/util';
|
|
17
|
+
import { type EmulatorMockTokenOptions } from '@firebase/util';
|
|
18
18
|
export interface RepoInfoEmulatorOptions {
|
|
19
19
|
mockUserToken?: string | EmulatorMockTokenOptions;
|
|
20
20
|
}
|
|
@@ -18,10 +18,10 @@ import { _FirebaseService, FirebaseApp } from '@firebase/app';
|
|
|
18
18
|
import { AppCheckInternalComponentName } from '@firebase/app-check-interop-types';
|
|
19
19
|
import { FirebaseAuthInternalName } from '@firebase/auth-interop-types';
|
|
20
20
|
import { Provider } from '@firebase/component';
|
|
21
|
-
import { EmulatorMockTokenOptions } from '@firebase/util';
|
|
21
|
+
import { type EmulatorMockTokenOptions } from '@firebase/util';
|
|
22
22
|
import { Repo } from '../core/Repo';
|
|
23
23
|
import { ReferenceImpl } from './Reference_impl';
|
|
24
|
-
export { EmulatorMockTokenOptions } from '@firebase/util';
|
|
24
|
+
export type { EmulatorMockTokenOptions } from '@firebase/util';
|
|
25
25
|
/**
|
|
26
26
|
* This function should only ever be called to CREATE a new database instance.
|
|
27
27
|
* @internal
|
|
@@ -19,7 +19,7 @@ import { Index } from '../core/snap/indexes/Index';
|
|
|
19
19
|
import { Node } from '../core/snap/Node';
|
|
20
20
|
import { Path } from '../core/util/Path';
|
|
21
21
|
import { Change } from '../core/view/Change';
|
|
22
|
-
import { CancelEvent, DataEvent, EventType } from '../core/view/Event';
|
|
22
|
+
import { CancelEvent, DataEvent, type EventType } from '../core/view/Event';
|
|
23
23
|
import { CallbackContext, EventRegistration, QueryContext } from '../core/view/EventRegistration';
|
|
24
24
|
import { QueryParams } from '../core/view/QueryParams';
|
|
25
25
|
import { Database } from './Database';
|
|
@@ -848,7 +848,7 @@ export declare function onChildRemoved(query: Query, callback: (snapshot: DataSn
|
|
|
848
848
|
* @returns A function that can be invoked to remove the listener.
|
|
849
849
|
*/
|
|
850
850
|
export declare function onChildRemoved(query: Query, callback: (snapshot: DataSnapshot) => unknown, cancelCallback: (error: Error) => unknown, options: ListenOptions): Unsubscribe;
|
|
851
|
-
export { EventType };
|
|
851
|
+
export type { EventType };
|
|
852
852
|
/**
|
|
853
853
|
* Detaches a callback previously attached with the corresponding `on*()` (`onValue`, `onChildAdded`) listener.
|
|
854
854
|
* Note: This is not the recommended way to remove a listener. Instead, please use the returned callback function from
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
export { Database, EmulatorMockTokenOptions, enableLogging, goOffline, goOnline, forceWebSockets, forceLongPolling, connectDatabaseEmulator } from './api/Database';
|
|
18
|
-
export { Query, DatabaseReference, ListenOptions, Unsubscribe, ThenableReference } from './api/Reference';
|
|
17
|
+
export { Database, type EmulatorMockTokenOptions, enableLogging, goOffline, goOnline, forceWebSockets, forceLongPolling, connectDatabaseEmulator } from './api/Database';
|
|
18
|
+
export type { Query, DatabaseReference, ListenOptions, Unsubscribe, ThenableReference } from './api/Reference';
|
|
19
19
|
export { OnDisconnect } from './api/OnDisconnect';
|
|
20
|
-
export { DataSnapshot, EventType, IteratedDataSnapshot, QueryConstraint, QueryConstraintType, endAt, endBefore, equalTo, get, limitToFirst, limitToLast, off, onChildAdded, onChildChanged, onChildMoved, onChildRemoved, onDisconnect, onValue, orderByChild, orderByKey, orderByPriority, orderByValue, push, query, ref, refFromURL, remove, set, setPriority, setWithPriority, startAfter, startAt, update, child } from './api/Reference_impl';
|
|
20
|
+
export { DataSnapshot, type EventType, type IteratedDataSnapshot, QueryConstraint, type QueryConstraintType, endAt, endBefore, equalTo, get, limitToFirst, limitToLast, off, onChildAdded, onChildChanged, onChildMoved, onChildRemoved, onDisconnect, onValue, orderByChild, orderByKey, orderByPriority, orderByValue, push, query, ref, refFromURL, remove, set, setPriority, setWithPriority, startAfter, startAt, update, child } from './api/Reference_impl';
|
|
21
21
|
export { increment, serverTimestamp } from './api/ServerValue';
|
|
22
|
-
export { runTransaction, TransactionOptions, TransactionResult } from './api/Transaction';
|
|
22
|
+
export { runTransaction, type TransactionOptions, TransactionResult } from './api/Transaction';
|
|
23
23
|
export { setSDKVersion as _setSDKVersion } from './core/version';
|
|
24
24
|
export { ReferenceImpl as _ReferenceImpl, QueryImpl as _QueryImpl } from './api/Reference_impl';
|
|
25
25
|
export { repoManagerDatabaseFromApp as _repoManagerDatabaseFromApp } from './api/Database';
|
|
26
26
|
export { validatePathString as _validatePathString, validateWritablePath as _validateWritablePath } from './core/util/validation';
|
|
27
|
-
export { UserCallback as _UserCallback } from './core/view/EventRegistration';
|
|
27
|
+
export type { UserCallback as _UserCallback } from './core/view/EventRegistration';
|
|
28
28
|
export { QueryParams as _QueryParams } from './core/view/QueryParams';
|
|
29
29
|
export { hijackHash as _TEST_ACCESS_hijackHash, forceRestClient as _TEST_ACCESS_forceRestClient } from './api/test_access';
|
|
30
30
|
export * from './internal/index';
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { EmulatorMockTokenOptions } from '@firebase/util';
|
|
17
|
+
import { type EmulatorMockTokenOptions } from '@firebase/util';
|
|
18
18
|
export interface RepoInfoEmulatorOptions {
|
|
19
19
|
mockUserToken?: string | EmulatorMockTokenOptions;
|
|
20
20
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase/database",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6-20261110194028",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
|
|
6
6
|
"main": "dist/index.node.cjs.js",
|
|
@@ -35,29 +35,30 @@
|
|
|
35
35
|
"dev": "rollup -c -w",
|
|
36
36
|
"test": "run-p --npm-path npm lint test:emulator",
|
|
37
37
|
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:emulator",
|
|
38
|
-
"test:all": "run
|
|
39
|
-
"test:browser": "
|
|
40
|
-
"test:node": "
|
|
38
|
+
"test:all": "vitest run",
|
|
39
|
+
"test:browser": "vitest run --project=browser",
|
|
40
|
+
"test:node": "vitest run --project=node",
|
|
41
41
|
"test:emulator": "ts-node --compiler-options='{\"module\":\"commonjs\"}' ../../scripts/emulator-testing/database-test-runner.ts",
|
|
42
42
|
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
|
|
43
43
|
"api-report": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' ts-node ../../repo-scripts/prune-dts/extract-public-api.ts --package database --packageRoot . --typescriptDts ./dist/src/index.d.ts --rollupDts ./dist/private.d.ts --untrimmedRollupDts ./dist/internal.d.ts --publicDts ./dist/public.d.ts && yarn api-report:api-json",
|
|
44
44
|
"api-report:api-json": "rm -rf temp && api-extractor run --local --verbose",
|
|
45
45
|
"doc": "api-documenter markdown --input temp --output docs",
|
|
46
|
-
"typings:public": "node ../../scripts/build/use_typings.js ./dist/public.d.ts"
|
|
46
|
+
"typings:public": "node ../../scripts/build/use_typings.js ./dist/public.d.ts",
|
|
47
|
+
"test:browser:debug": "vitest --project=browser --browser.headless=false"
|
|
47
48
|
},
|
|
48
49
|
"license": "Apache-2.0",
|
|
49
50
|
"peerDependencies": {},
|
|
50
51
|
"dependencies": {
|
|
51
|
-
"@firebase/logger": "0.5.2
|
|
52
|
-
"@firebase/util": "1.15.3
|
|
53
|
-
"@firebase/component": "0.7.5
|
|
54
|
-
"@firebase/app-check-interop-types": "0.3.5
|
|
55
|
-
"@firebase/auth-interop-types": "0.2.6
|
|
52
|
+
"@firebase/logger": "0.5.2",
|
|
53
|
+
"@firebase/util": "1.15.3",
|
|
54
|
+
"@firebase/component": "0.7.5",
|
|
55
|
+
"@firebase/app-check-interop-types": "0.3.5",
|
|
56
|
+
"@firebase/auth-interop-types": "0.2.6",
|
|
56
57
|
"faye-websocket": "0.11.4",
|
|
57
58
|
"tslib": "^2.1.0"
|
|
58
59
|
},
|
|
59
60
|
"devDependencies": {
|
|
60
|
-
"@firebase/app": "0.16.
|
|
61
|
+
"@firebase/app": "0.16.5",
|
|
61
62
|
"rollup": "4.62.2",
|
|
62
63
|
"rollup-plugin-typescript2": "0.37.0",
|
|
63
64
|
"typescript": "5.5.4"
|
|
@@ -71,12 +72,6 @@
|
|
|
71
72
|
"url": "https://github.com/firebase/firebase-js-sdk/issues"
|
|
72
73
|
},
|
|
73
74
|
"typings": "./dist/public.d.ts",
|
|
74
|
-
"nyc": {
|
|
75
|
-
"extension": [
|
|
76
|
-
".ts"
|
|
77
|
-
],
|
|
78
|
-
"reportDir": "./coverage/node"
|
|
79
|
-
},
|
|
80
75
|
"engines": {
|
|
81
76
|
"node": ">=24.12.0"
|
|
82
77
|
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 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
|
-
export declare const EventAccumulatorFactory: {
|
|
18
|
-
waitsForCount: (maxCount: any) => EventAccumulator;
|
|
19
|
-
waitsForExactCount: (maxCount: any) => EventAccumulator;
|
|
20
|
-
};
|
|
21
|
-
export declare class EventAccumulator {
|
|
22
|
-
condition: Function;
|
|
23
|
-
eventData: any[];
|
|
24
|
-
promise: any;
|
|
25
|
-
resolve: any;
|
|
26
|
-
reject: any;
|
|
27
|
-
private onResetFxn;
|
|
28
|
-
private onEventFxn;
|
|
29
|
-
constructor(condition: Function);
|
|
30
|
-
addEvent(eventData?: any): void;
|
|
31
|
-
reset(condition?: Function): void;
|
|
32
|
-
onEvent(cb: Function): void;
|
|
33
|
-
onReset(cb: Function): void;
|
|
34
|
-
_testCondition(): any;
|
|
35
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 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
|
-
import { FirebaseApp } from '@firebase/app';
|
|
18
|
-
import { ListenProvider } from '../../src/core/SyncTree';
|
|
19
|
-
import { Path } from '../../src/core/util/Path';
|
|
20
|
-
export declare class SyncPointTestParser {
|
|
21
|
-
app: FirebaseApp;
|
|
22
|
-
listens_: any;
|
|
23
|
-
listenProvider_: ListenProvider;
|
|
24
|
-
private syncTree_;
|
|
25
|
-
constructor();
|
|
26
|
-
getTestPath(optBasePath: string | string[], path?: string): Path;
|
|
27
|
-
private testRunner;
|
|
28
|
-
defineTest(spec: any): void;
|
|
29
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
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
|
-
import { Database, DatabaseReference } from '../../src';
|
|
18
|
-
import { Path } from '../../src/core/util/Path';
|
|
19
|
-
import { EventAccumulator } from './EventAccumulator';
|
|
20
|
-
export declare const TEST_PROJECT: any;
|
|
21
|
-
export declare const EMULATOR_PORT: string;
|
|
22
|
-
export declare const USE_EMULATOR: boolean;
|
|
23
|
-
export declare function getFreshRepo(path: Path): DatabaseReference;
|
|
24
|
-
export declare const DATABASE_ADDRESS: any;
|
|
25
|
-
export declare const DATABASE_URL: any;
|
|
26
|
-
export declare function testRepoInfo(url: any): import("../../src/core/RepoInfo").RepoInfo;
|
|
27
|
-
export declare function repoInfoForConnectionTest(): import("../../src/core/RepoInfo").RepoInfo;
|
|
28
|
-
export declare function shuffle(arr: any, randFn?: () => number): void;
|
|
29
|
-
export declare function waitFor(waitTimeInMS: number): Promise<unknown>;
|
|
30
|
-
export declare function getUniqueRef(db: Database): DatabaseReference;
|
|
31
|
-
export declare function getRWRefs(db: Database): {
|
|
32
|
-
readerRef: DatabaseReference;
|
|
33
|
-
writerRef: DatabaseReference;
|
|
34
|
-
};
|
|
35
|
-
export declare function writeAndValidate(writerRef: DatabaseReference, readerRef: DatabaseReference, toWrite: unknown, ec: EventAccumulator): Promise<void>;
|
|
36
|
-
export declare function waitUntil(cb: () => boolean, maxRetries?: number): Promise<unknown>;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 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
|
-
export declare const EventAccumulatorFactory: {
|
|
18
|
-
waitsForCount: (maxCount: any) => EventAccumulator;
|
|
19
|
-
waitsForExactCount: (maxCount: any) => EventAccumulator;
|
|
20
|
-
};
|
|
21
|
-
export declare class EventAccumulator {
|
|
22
|
-
condition: Function;
|
|
23
|
-
eventData: any[];
|
|
24
|
-
promise: any;
|
|
25
|
-
resolve: any;
|
|
26
|
-
reject: any;
|
|
27
|
-
private onResetFxn;
|
|
28
|
-
private onEventFxn;
|
|
29
|
-
constructor(condition: Function);
|
|
30
|
-
addEvent(eventData?: any): void;
|
|
31
|
-
reset(condition?: Function): void;
|
|
32
|
-
onEvent(cb: Function): void;
|
|
33
|
-
onReset(cb: Function): void;
|
|
34
|
-
_testCondition(): any;
|
|
35
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 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
|
-
import { FirebaseApp } from '@firebase/app';
|
|
18
|
-
import { ListenProvider } from '../../src/core/SyncTree';
|
|
19
|
-
import { Path } from '../../src/core/util/Path';
|
|
20
|
-
export declare class SyncPointTestParser {
|
|
21
|
-
app: FirebaseApp;
|
|
22
|
-
listens_: any;
|
|
23
|
-
listenProvider_: ListenProvider;
|
|
24
|
-
private syncTree_;
|
|
25
|
-
constructor();
|
|
26
|
-
getTestPath(optBasePath: string | string[], path?: string): Path;
|
|
27
|
-
private testRunner;
|
|
28
|
-
defineTest(spec: any): void;
|
|
29
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
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
|
-
import { Database, DatabaseReference } from '../../src';
|
|
18
|
-
import { Path } from '../../src/core/util/Path';
|
|
19
|
-
import { EventAccumulator } from './EventAccumulator';
|
|
20
|
-
export declare const TEST_PROJECT: any;
|
|
21
|
-
export declare const EMULATOR_PORT: string;
|
|
22
|
-
export declare const USE_EMULATOR: boolean;
|
|
23
|
-
export declare function getFreshRepo(path: Path): DatabaseReference;
|
|
24
|
-
export declare const DATABASE_ADDRESS: any;
|
|
25
|
-
export declare const DATABASE_URL: any;
|
|
26
|
-
export declare function testRepoInfo(url: any): import("../../src/core/RepoInfo").RepoInfo;
|
|
27
|
-
export declare function repoInfoForConnectionTest(): import("../../src/core/RepoInfo").RepoInfo;
|
|
28
|
-
export declare function shuffle(arr: any, randFn?: () => number): void;
|
|
29
|
-
export declare function waitFor(waitTimeInMS: number): Promise<unknown>;
|
|
30
|
-
export declare function getUniqueRef(db: Database): DatabaseReference;
|
|
31
|
-
export declare function getRWRefs(db: Database): {
|
|
32
|
-
readerRef: DatabaseReference;
|
|
33
|
-
writerRef: DatabaseReference;
|
|
34
|
-
};
|
|
35
|
-
export declare function writeAndValidate(writerRef: DatabaseReference, readerRef: DatabaseReference, toWrite: unknown, ec: EventAccumulator): Promise<void>;
|
|
36
|
-
export declare function waitUntil(cb: () => boolean, maxRetries?: number): Promise<unknown>;
|