@hyper-fetch/firebase-admin 1.0.0

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 (44) hide show
  1. package/.eslintrc.json +6 -0
  2. package/.firebaserc +5 -0
  3. package/README.md +73 -0
  4. package/database.rules.json +11 -0
  5. package/dist/index.cjs.js +704 -0
  6. package/dist/index.cjs.js.map +7 -0
  7. package/dist/index.d.ts +257 -0
  8. package/dist/index.esm.js +685 -0
  9. package/dist/index.esm.js.map +7 -0
  10. package/firebase.json +28 -0
  11. package/firestore.indexes.json +4 -0
  12. package/firestore.rules +8 -0
  13. package/package.json +74 -0
  14. package/src/adapter/adapter.sockets.ts +14 -0
  15. package/src/adapter/adapter.ts +72 -0
  16. package/src/adapter/index.ts +3 -0
  17. package/src/adapter/types/adapter.base.types.ts +15 -0
  18. package/src/adapter/types/adapter.firestore.types.ts +78 -0
  19. package/src/adapter/types/adapter.realtime.types.ts +82 -0
  20. package/src/adapter/types/firestore.socket.types.ts +17 -0
  21. package/src/adapter/types/index.ts +5 -0
  22. package/src/adapter/types/realtime.socket.types.ts +17 -0
  23. package/src/constraints/constraints.types.ts +47 -0
  24. package/src/constraints/firebase.constraints.ts +117 -0
  25. package/src/constraints/index.ts +2 -0
  26. package/src/firestore/firestore.methods.ts +86 -0
  27. package/src/firestore/firestore.sockets.ts +86 -0
  28. package/src/firestore/index.ts +3 -0
  29. package/src/firestore/utils/constraints.utils.ts +51 -0
  30. package/src/firestore/utils/index.ts +3 -0
  31. package/src/firestore/utils/ref.utils.ts +19 -0
  32. package/src/firestore/utils/result.utils.ts +17 -0
  33. package/src/index.ts +4 -0
  34. package/src/realtime/index.ts +3 -0
  35. package/src/realtime/realtime.methods.ts +74 -0
  36. package/src/realtime/realtime.sockets.ts +95 -0
  37. package/src/realtime/utils/constraints.utils.ts +54 -0
  38. package/src/realtime/utils/index.ts +2 -0
  39. package/src/realtime/utils/result.utils.ts +7 -0
  40. package/src/utils/cache.utils.ts +33 -0
  41. package/src/utils/index.ts +2 -0
  42. package/src/utils/misc.ts +10 -0
  43. package/test.sh +3 -0
  44. package/tsconfig.json +8 -0
package/.eslintrc.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": ["../../.eslintrc.json"],
3
+ "parserOptions": {
4
+ "project": ["./tsconfig.json", "./__tests__/tsconfig.json"]
5
+ }
6
+ }
package/.firebaserc ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "projects": {
3
+ "default": "demo-test"
4
+ }
5
+ }
package/README.md ADDED
@@ -0,0 +1,73 @@
1
+ # ๐Ÿ”ฅ Hyper Fetch Firebase Admin
2
+
3
+ <p>
4
+ <a href="https://bettertyped.com/">
5
+ <img src="https://custom-icon-badges.demolab.com/static/v1?label=&message=BetterTyped&color=333&logo=BT" />
6
+ </a>
7
+ <a href="https://github.com/BetterTyped/hyper-fetch">
8
+ <img src="https://custom-icon-badges.demolab.com/github/stars/BetterTyped/hyper-fetch?logo=star&color=118ab2" />
9
+ </a>
10
+ <a href="https://github.com/BetterTyped/hyper-fetch/blob/main/License.md">
11
+ <img src="https://custom-icon-badges.demolab.com/github/license/BetterTyped/hyper-fetch?logo=law&color=yellow" />
12
+ </a>
13
+ <a href="https://www.npmjs.com/package/@hyper-fetch/firebase-admin">
14
+ <img src="https://custom-icon-badges.demolab.com/npm/v/@hyper-fetch/firebase-admin.svg?logo=npm&color=e76f51" />
15
+ </a>
16
+ <a href="https://api.codeclimate.com/v1/badges/eade9435e75ecea0c004/test_coverage">
17
+ <img src="https://api.codeclimate.com/v1/badges/eade9435e75ecea0c004/test_coverage" />
18
+ </a>
19
+ <a href="https://github.com/BetterTyped/hyper-fetch">
20
+ <img src="https://custom-icon-badges.demolab.com/badge/typescript-%23007ACC.svg?logo=typescript&logoColor=white" />
21
+ </a>
22
+ <a href="https://github.com/BetterTyped/hyper-fetch">
23
+ <img src="https://custom-icon-badges.demolab.com/badge/-Firebase-E10098?logo=firebase&logoColor=white" />
24
+ </a>
25
+ <a href="https://www.npmjs.com/package/@hyper-fetch/firebase-admin">
26
+ <img src="https://custom-icon-badges.demolab.com/bundlephobia/minzip/@hyper-fetch/firebase-admin?color=64BC4B&logo=package" />
27
+ </a>
28
+ </p>
29
+
30
+ ## About
31
+
32
+ **`Hyper Fetch Firebase Admin`** is adapter for Hyper Fetch. Take advantage of the powerful features and simplicity of
33
+ the first class Firebase adapter for **browser and server**, simplifying the retrieval and manipulation of data. Benefit
34
+ from the convenience and efficiency of Hyper Fetch for your Firebase-powered projects.
35
+
36
+ ## Key Features
37
+
38
+ ๐Ÿ”ฎ **Simple setup** - [Read more](https://hyperfetch.bettertyped.com/docs/guides/basic/setup)
39
+
40
+ ๐ŸŽฏ **Request cancellation** - [Read more](https://hyperfetch.bettertyped.com/docs/guides/advanced/cancellation)
41
+
42
+ โœจ **Window Focus/Blur Events** -
43
+ [Read more](https://hyperfetch.bettertyped.com/docs/guides/react/core/window-focus-blur)
44
+
45
+ ๐Ÿš€ **Queueing** - [Read more](https://hyperfetch.bettertyped.com/docs/guides/advanced/queueing)
46
+
47
+ ๐Ÿ’Ž **Automatic caching** - [Read more](https://hyperfetch.bettertyped.com/docs/documentation/core/cache)
48
+
49
+ ๐Ÿช„ **Persistence** - [Read more](https://hyperfetch.bettertyped.com/docs/guides/advanced/persistence)
50
+
51
+ ๐ŸŽŠ **SSR Support** - [Read more](https://hyperfetch.bettertyped.com/docs/documentation/getting-started/environment)
52
+
53
+ ๐Ÿ”‹ **Offline First** - [Read more](https://hyperfetch.bettertyped.com/docs/guides/advanced/offline)
54
+
55
+ ๐Ÿ“ก **Built-in adapter** - [Read more](https://hyperfetch.bettertyped.com/docs/documentation/core/adapter)
56
+
57
+ ๐Ÿงช **Easy to test** - [Read more](https://hyperfetch.bettertyped.com/docs/documentation/getting-started/testing)
58
+
59
+ ๐ŸŽŸ **Authentication** - [Read more](https://hyperfetch.bettertyped.com/docs/guides/basic/authentication)
60
+
61
+ ๐Ÿ’ก **Prefetching** - [Read more](https://hyperfetch.bettertyped.com/docs/guides/advanced/prefetching)
62
+
63
+ ## Help me keep working on this project โค๏ธ
64
+
65
+ - [Become a Sponsor on GitHub](https://github.com/sponsors/prc5)
66
+
67
+ ## Sources
68
+
69
+ - #### [Installation](https://hyperfetch.bettertyped.com/docs/documentation/getting-started/installation)
70
+ - #### [Docs](https://hyperfetch.bettertyped.com/docs/react/overview)
71
+ - #### [API](https://hyperfetch.bettertyped.com/api/)
72
+ - #### [NPM](https://www.npmjs.com/package/@hyper-fetch/firebase)
73
+ - #### [Guides](https://hyperfetch.bettertyped.com/guides/basic/setup)
@@ -0,0 +1,11 @@
1
+ {
2
+ "rules": {
3
+ ".read": true,
4
+ ".write": true,
5
+ "teas": {
6
+ ".read": true,
7
+ ".write": true,
8
+ ".indexOn": ["origin", "year"]
9
+ }
10
+ }
11
+ }