@shisyamo4131/air-firebase-v2-client-adapter 2.1.0 → 2.1.1

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 (2) hide show
  1. package/index.js +4 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
  * アプリ側で使用する FireModel のアダプターです。
3
3
  * FireModel に Firestore に対する CRUD 機能を注入します。
4
4
  *
5
+ * @update 2025-12-30 - Modified constructor to accept Functions instance.
5
6
  * @update 2025-12-29 - Added GeoPoint import and httpsCallable import.
6
7
  */
7
8
  import {
@@ -20,7 +21,7 @@ import {
20
21
  GeoPoint, // 2025-12-29 added
21
22
  } from "firebase/firestore";
22
23
  import { getAuth } from "firebase/auth";
23
- import { getFunctions, httpsCallable } from "firebase/functions"; // 2025-12-29 added
24
+ import { httpsCallable } from "firebase/functions"; // 2025-12-29 added
24
25
  import { ClientAdapterError, ERRORS } from "./error.js";
25
26
 
26
27
  /*****************************************************************************
@@ -31,14 +32,13 @@ import { ClientAdapterError, ERRORS } from "./error.js";
31
32
  class ClientAdapter {
32
33
  static firestore = null;
33
34
  static auth = null;
34
- static functions = null; // 2025-12-29 added
35
35
  static GeoPoint = null; // 2025-12-29 added
36
36
  static httpsCallable = null; // 2025-12-29 added
37
37
 
38
- constructor() {
38
+ constructor(functions = null) {
39
39
  ClientAdapter.firestore = getFirestore();
40
40
  ClientAdapter.auth = getAuth();
41
- ClientAdapter.functions = getFunctions(); // 2025-12-29 added
41
+ ClientAdapter.functions = functions; // 2025-12-30 changed from getFunctions();
42
42
  ClientAdapter.GeoPoint = GeoPoint; // 2025-12-29 added
43
43
  ClientAdapter.httpsCallable = httpsCallable; // 2025-12-29 added
44
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shisyamo4131/air-firebase-v2-client-adapter",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "client adapter for FireModel",
5
5
  "type": "module",
6
6
  "main": "index.js",