@firebaseextensions/firestore-bigquery-change-tracker 1.1.24 → 1.1.26
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 +5 -4
- package/package.json +1 -1
package/lib/bigquery/index.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.FirestoreBigQueryEventHistoryTracker = exports.RawChangelogViewSchema = exports.RawChangelogSchema = void 0;
|
|
19
19
|
const bigquery = require("@google-cloud/bigquery");
|
|
20
|
-
const
|
|
20
|
+
const firestore_1 = require("firebase-admin/firestore");
|
|
21
21
|
const traverse = require("traverse");
|
|
22
22
|
const node_fetch_1 = require("node-fetch");
|
|
23
23
|
const schema_1 = require("./schema");
|
|
@@ -51,7 +51,9 @@ class FirestoreBigQueryEventHistoryTracker {
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
async record(events) {
|
|
54
|
-
|
|
54
|
+
if (!this.config.skipInit) {
|
|
55
|
+
await this.initialize();
|
|
56
|
+
}
|
|
55
57
|
const partitionHandler = new partitioning_1.Partitioning(this.config);
|
|
56
58
|
const rows = events.map((event) => {
|
|
57
59
|
const partitionValue = partitionHandler.getPartitionValue(event);
|
|
@@ -99,8 +101,7 @@ class FirestoreBigQueryEventHistoryTracker {
|
|
|
99
101
|
if (property.constructor.name === "Buffer") {
|
|
100
102
|
this.remove();
|
|
101
103
|
}
|
|
102
|
-
if (property.constructor.name ===
|
|
103
|
-
firebase.firestore.DocumentReference.name) {
|
|
104
|
+
if (property.constructor.name === firestore_1.DocumentReference.name) {
|
|
104
105
|
this.update(property.path);
|
|
105
106
|
}
|
|
106
107
|
}
|
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.26",
|
|
9
9
|
"description": "Core change-tracker library for Cloud Firestore Collection BigQuery Exports",
|
|
10
10
|
"main": "./lib/index.js",
|
|
11
11
|
"scripts": {
|