@firebase/database-compat 0.1.1-2021823172527 → 0.1.2-canary.0b3ca78eb

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.
Files changed (61) hide show
  1. package/CHANGELOG.md +19 -8
  2. package/dist/database-compat/src/index.d.ts +0 -9
  3. package/dist/database-compat/src/index.node.d.ts +0 -53
  4. package/dist/database-compat/src/index.standalone.d.ts +52 -0
  5. package/dist/index.esm2017.js +5 -6
  6. package/dist/index.esm2017.js.map +1 -1
  7. package/dist/index.esm5.js +2 -3
  8. package/dist/index.esm5.js.map +1 -1
  9. package/dist/index.js +10 -77
  10. package/dist/index.js.map +1 -1
  11. package/dist/index.standalone.js +15150 -0
  12. package/dist/index.standalone.js.map +1 -0
  13. package/dist/node-esm/database-compat/src/api/Database.d.ts +72 -0
  14. package/dist/node-esm/database-compat/src/api/Reference.d.ts +201 -0
  15. package/{karma.conf.js → dist/node-esm/database-compat/src/api/TransactionResult.d.ts} +26 -34
  16. package/dist/node-esm/database-compat/src/api/internal.d.ts +39 -0
  17. package/dist/node-esm/database-compat/src/api/onDisconnect.d.ts +27 -0
  18. package/dist/node-esm/database-compat/src/index.d.ts +32 -0
  19. package/dist/node-esm/database-compat/src/index.node.d.ts +14 -0
  20. package/dist/node-esm/database-compat/src/index.standalone.d.ts +52 -0
  21. package/{src/util/util.ts → dist/node-esm/database-compat/src/util/util.d.ts} +17 -25
  22. package/dist/node-esm/database-compat/src/util/validation.d.ts +18 -0
  23. package/{src/api/TransactionResult.ts → dist/node-esm/database-compat/test/browser/crawler_support.test.d.ts} +17 -34
  24. package/dist/node-esm/database-compat/test/database.test.d.ts +17 -0
  25. package/dist/node-esm/database-compat/test/datasnapshot.test.d.ts +17 -0
  26. package/dist/node-esm/database-compat/test/helpers/events.d.ts +34 -0
  27. package/dist/node-esm/database-compat/test/helpers/util.d.ts +42 -0
  28. package/dist/node-esm/database-compat/test/info.test.d.ts +17 -0
  29. package/dist/node-esm/database-compat/test/order.test.d.ts +17 -0
  30. package/dist/node-esm/database-compat/test/order_by.test.d.ts +17 -0
  31. package/dist/node-esm/database-compat/test/promise.test.d.ts +17 -0
  32. package/dist/node-esm/database-compat/test/query.test.d.ts +17 -0
  33. package/dist/node-esm/database-compat/test/servervalues.test.d.ts +17 -0
  34. package/dist/node-esm/database-compat/test/transaction.test.d.ts +17 -0
  35. package/dist/node-esm/index.js +868 -0
  36. package/dist/node-esm/index.js.map +1 -0
  37. package/dist/node-esm/package.json +1 -0
  38. package/package.json +34 -9
  39. package/standalone/package.json +7 -0
  40. package/.eslintrc.js +0 -64
  41. package/rollup.config.js +0 -125
  42. package/src/api/Database.ts +0 -123
  43. package/src/api/Reference.ts +0 -790
  44. package/src/api/internal.ts +0 -91
  45. package/src/api/onDisconnect.ts +0 -112
  46. package/src/index.node.ts +0 -142
  47. package/src/index.ts +0 -88
  48. package/src/util/validation.ts +0 -59
  49. package/test/browser/crawler_support.test.ts +0 -206
  50. package/test/database.test.ts +0 -306
  51. package/test/datasnapshot.test.ts +0 -249
  52. package/test/helpers/events.ts +0 -258
  53. package/test/helpers/util.ts +0 -177
  54. package/test/info.test.ts +0 -222
  55. package/test/order.test.ts +0 -592
  56. package/test/order_by.test.ts +0 -530
  57. package/test/promise.test.ts +0 -261
  58. package/test/query.test.ts +0 -4670
  59. package/test/servervalues.test.ts +0 -152
  60. package/test/transaction.test.ts +0 -1534
  61. package/tsconfig.json +0 -11
@@ -0,0 +1,34 @@
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
+ /**
18
+ * A set of functions to clean up event handlers.
19
+ */
20
+ export declare let eventCleanupHandlers: any[];
21
+ /** Clean up outstanding event handlers */
22
+ export declare function eventCleanup(): void;
23
+ /**
24
+ * Creates a struct which waits for many events.
25
+ * @param pathAndEvents - an array of tuples of [Firebase, [event type strings]]
26
+ */
27
+ export declare function eventTestHelper(pathAndEvents: any, helperName?: any): {
28
+ promise: Promise<unknown>;
29
+ initPromise: Promise<unknown>;
30
+ waiter: () => boolean;
31
+ watchesInitializedWaiter: () => boolean;
32
+ unregister: () => void;
33
+ addExpectedEvents(moreEvents: any): void;
34
+ };
@@ -0,0 +1,42 @@
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
+ import '../../src/index';
18
+ import { Path } from '../../../database/src/core/util/Path';
19
+ import { Query, Reference } from '../../src/api/Reference';
20
+ export declare const TEST_PROJECT: any;
21
+ export declare const DATABASE_ADDRESS: any;
22
+ export declare const DATABASE_URL: any;
23
+ export declare function createTestApp(): import("@firebase/app-compat").FirebaseApp;
24
+ /**
25
+ * Gets or creates a root node to the test namespace. All calls sharing the
26
+ * value of opt_i will share an app context.
27
+ */
28
+ export declare function getRootNode(i?: number, ref?: string): any;
29
+ /**
30
+ * Create multiple refs to the same top level
31
+ * push key - each on it's own Firebase.Context.
32
+ */
33
+ export declare function getRandomNode(numNodes?: any): Reference | Reference[];
34
+ export declare function getQueryValue(query: Query): Promise<unknown>;
35
+ export declare function pause(milliseconds: number): Promise<void>;
36
+ export declare function getPath(query: Query): string;
37
+ export declare function shuffle(arr: any, randFn?: () => number): void;
38
+ export declare function getFreshRepo(path: Path): any;
39
+ export declare function getFreshRepoFromReference(ref: any): any;
40
+ export declare function getSnap(path: any): any;
41
+ export declare function getVal(path: any): any;
42
+ export declare function canCreateExtraConnections(): boolean;
@@ -0,0 +1,17 @@
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 {};
@@ -0,0 +1,17 @@
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 {};
@@ -0,0 +1,17 @@
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 {};
@@ -0,0 +1,17 @@
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 {};
@@ -0,0 +1,17 @@
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 {};
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2019 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 {};
@@ -0,0 +1,17 @@
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
+ import '../src/index';