@firebaseextensions/firestore-bigquery-change-tracker 1.1.26 → 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.
@@ -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
- Object.defineProperty(exports, "__esModule", { value: true });
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;
@@ -296,6 +300,11 @@ class FirestoreBigQueryEventHistoryTracker {
296
300
  schema.fields.push(schema_1.documentPathParams);
297
301
  }
298
302
  const options = { friendlyName: changelogName, schema };
303
+ if (this.config.kmsKeyName) {
304
+ options["encryptionConfiguration"] = {
305
+ kmsKeyName: this.config.kmsKeyName,
306
+ };
307
+ }
299
308
  //Add partitioning
300
309
  await partitioning.addPartitioningToSchema(schema.fields);
301
310
  await partitioning.updateTableMetadata(options);
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.26",
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": {