@firebaseextensions/firestore-bigquery-change-tracker 1.1.27 → 1.1.28
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.
- package/lib/bigquery/index.js +9 -3
- package/package.json +1 -1
package/lib/bigquery/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FirestoreBigQueryEventHistoryTracker = exports.RawChangelogViewSchema = exports.RawChangelogSchema = void 0;
|
|
2
4
|
/*
|
|
3
5
|
* Copyright 2019 Google LLC
|
|
4
6
|
*
|
|
@@ -14,8 +16,7 @@
|
|
|
14
16
|
* See the License for the specific language governing permissions and
|
|
15
17
|
* limitations under the License.
|
|
16
18
|
*/
|
|
17
|
-
|
|
18
|
-
exports.FirestoreBigQueryEventHistoryTracker = exports.RawChangelogViewSchema = exports.RawChangelogSchema = void 0;
|
|
19
|
+
const admin = require("firebase-admin");
|
|
19
20
|
const bigquery = require("@google-cloud/bigquery");
|
|
20
21
|
const firestore_1 = require("firebase-admin/firestore");
|
|
21
22
|
const traverse = require("traverse");
|
|
@@ -104,6 +105,9 @@ class FirestoreBigQueryEventHistoryTracker {
|
|
|
104
105
|
if (property.constructor.name === firestore_1.DocumentReference.name) {
|
|
105
106
|
this.update(property.path);
|
|
106
107
|
}
|
|
108
|
+
if (property instanceof admin.firestore.Timestamp) {
|
|
109
|
+
this.update(property.toDate());
|
|
110
|
+
}
|
|
107
111
|
}
|
|
108
112
|
});
|
|
109
113
|
return data;
|
|
@@ -297,7 +301,9 @@ class FirestoreBigQueryEventHistoryTracker {
|
|
|
297
301
|
}
|
|
298
302
|
const options = { friendlyName: changelogName, schema };
|
|
299
303
|
if (this.config.kmsKeyName) {
|
|
300
|
-
options["encryptionConfiguration"] = {
|
|
304
|
+
options["encryptionConfiguration"] = {
|
|
305
|
+
kmsKeyName: this.config.kmsKeyName,
|
|
306
|
+
};
|
|
301
307
|
}
|
|
302
308
|
//Add partitioning
|
|
303
309
|
await partitioning.addPartitioningToSchema(schema.fields);
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"url": "github.com/firebase/extensions.git",
|
|
6
6
|
"directory": "firestore-bigquery-export/firestore-bigquery-change-tracker"
|
|
7
7
|
},
|
|
8
|
-
"version": "1.1.
|
|
8
|
+
"version": "1.1.28",
|
|
9
9
|
"description": "Core change-tracker library for Cloud Firestore Collection BigQuery Exports",
|
|
10
10
|
"main": "./lib/index.js",
|
|
11
11
|
"scripts": {
|