firebase-rest-firestore 1.1.1 → 1.1.2

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/dist/client.js +5 -0
  2. package/package.json +1 -1
package/dist/client.js CHANGED
@@ -152,6 +152,11 @@ class FirestoreClient {
152
152
  // 操作前に設定をチェック
153
153
  this.checkConfig();
154
154
  const url = `${(0, path_1.getFirestoreBasePath)(this.config.projectId, collectionName, this.config.databaseId)}/${documentId}`;
155
+ // 既存のドキュメントを取得してからマージする
156
+ const existingDoc = await this.get(collectionName, documentId);
157
+ if (existingDoc) {
158
+ data = { ...existingDoc, ...data };
159
+ }
155
160
  const firestoreData = (0, converter_1.convertToFirestoreDocument)(data);
156
161
  const token = await this.getToken();
157
162
  const response = await fetch(url, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "firebase-rest-firestore",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Firebase Firestore REST API client for Edge runtime environments",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",