@entropic-bond/firebase 1.13.5 → 1.13.7

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.
@@ -1,5 +1,4 @@
1
1
  import { CollectionReference, DocumentData, Query } from 'firebase/firestore';
2
-
3
2
  export type FirebaseQuery = CollectionReference<DocumentData> | Query<DocumentData>;
4
3
  export interface FirebaseConfig {
5
4
  apiKey?: string;
@@ -1,5 +1,4 @@
1
1
  import { Persistent } from 'entropic-bond';
2
-
3
2
  interface Name {
4
3
  firstName: string;
5
4
  lastName: string;
@@ -1,7 +1,6 @@
1
- import { EmulatorConfig } from '../firebase-helper';
2
- import { Collections, DataSource, DocumentObject, QueryObject, QueryOperator } from 'entropic-bond';
3
1
  import { WhereFilterOp } from 'firebase/firestore';
4
-
2
+ import { Collections, DataSource, DocumentChangeListerner, DocumentObject, QueryObject, QueryOperator, Unsubscriber } from 'entropic-bond';
3
+ import { EmulatorConfig } from '../firebase-helper';
5
4
  export declare class FirebaseDatasource extends DataSource {
6
5
  constructor(emulator?: EmulatorConfig);
7
6
  findById(id: string, collectionName: string): Promise<DocumentObject>;
@@ -10,6 +9,8 @@ export declare class FirebaseDatasource extends DataSource {
10
9
  count(queryObject: QueryObject<DocumentObject>, collectionName: string): Promise<number>;
11
10
  delete(id: string, collectionName: string): Promise<void>;
12
11
  next(maxDocs?: number): Promise<DocumentObject[]>;
12
+ onCollectionChange(query: QueryObject<DocumentObject>, collectionName: string, listener: DocumentChangeListerner<DocumentObject>): Unsubscriber;
13
+ onDocumentChange(documentPath: string, documentId: string, listener: DocumentChangeListerner<DocumentObject>): Unsubscriber;
13
14
  private queryObjectToQueryConstraints;
14
15
  toFirebaseOperator(operator: QueryOperator): WhereFilterOp;
15
16
  private getFromQuery;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@entropic-bond/firebase",
3
3
  "type": "module",
4
- "version": "1.13.5",
4
+ "version": "1.13.7",
5
5
  "description": "Firebase plugins for Entropic Bond",
6
6
  "main": "./lib/entropic-bond-firebase.umd.cjs",
7
7
  "module": "./lib/entropic-bond-firebase.js",
@@ -32,6 +32,7 @@
32
32
  ]
33
33
  },
34
34
  "scripts": {
35
+ "test-vi": "vitest",
35
36
  "test": "npm run install-functions-dependencies && firebase emulators:exec --project demo-test vitest",
36
37
  "build": "tsc -p tsconfig-build.json && vite build",
37
38
  "prepare": "npm run build",
@@ -55,17 +56,17 @@
55
56
  "devDependencies": {
56
57
  "@semantic-release/changelog": "^6.0.3",
57
58
  "@semantic-release/git": "^10.0.1",
58
- "@types/node": "^20.11.17",
59
+ "@types/node": "^22.7.0",
59
60
  "git-branch-is": "^4.0.0",
60
- "husky": "^9.0.11",
61
- "semantic-release": "^23.0.7",
62
- "typescript": "^5.3.3",
63
- "vite-plugin-dts": "^3.7.2",
64
- "vitest": "^1.2.2",
61
+ "husky": "^9.1.6",
62
+ "semantic-release": "^24.1.1",
63
+ "typescript": "^5.6.2",
64
+ "vite-plugin-dts": "^4.2.2",
65
+ "vitest": "^2.1.1",
65
66
  "xhr2": "^0.2.1"
66
67
  },
67
68
  "dependencies": {
68
- "entropic-bond": "^1.50.5",
69
- "firebase": "^10.6.0"
69
+ "entropic-bond": "^1.53.9",
70
+ "firebase": "^10.13.2"
70
71
  }
71
72
  }