Skip to content

Commit 18e4d22

Browse files
authored
Merge branch 'next' into @ehesp/#310
2 parents cc2366d + f0a4fc0 commit 18e4d22

File tree

40 files changed

+296
-262
lines changed

40 files changed

+296
-262
lines changed

auth-mailchimp-sync/POSTINSTALL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ You can test out this extension right away:
66

77
1. Click **Add User** to add a test user.
88

9-
1. In a few seconds, go to your Mailchimp audience page, you'll see the test user's email appear in the list.
9+
1. In a few seconds, go to your Mailchimp audience page, you'll see the test user's email appear.
1010

1111
### Using the extension
1212

auth-mailchimp-sync/functions/lib/logs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ exports.complete = () => {
2121
console.log("Completed execution of extension");
2222
};
2323
exports.errorAddUser = (err) => {
24-
console.error("Error when adding user to Mailchimp list", err);
24+
console.error("Error when adding user to Mailchimp audience", err);
2525
};
2626
exports.errorRemoveUser = (err) => {
27-
console.error("Error when removing user from Mailchimp list", err);
27+
console.error("Error when removing user from Mailchimp audience", err);
2828
};
2929
exports.init = () => {
3030
console.log("Initializing extension with configuration", obfuscatedConfig);

auth-mailchimp-sync/functions/src/logs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ export const complete = () => {
2626
};
2727

2828
export const errorAddUser = (err: Error) => {
29-
console.error("Error when adding user to Mailchimp list", err);
29+
console.error("Error when adding user to Mailchimp audience", err);
3030
};
3131

3232
export const errorRemoveUser = (err: Error) => {
33-
console.error("Error when removing user from Mailchimp list", err);
33+
console.error("Error when removing user from Mailchimp audience", err);
3434
};
3535

3636
export const init = () => {

delete-user-data/functions/lib/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,6 @@ const clearStorageData = (storagePaths, uid) => __awaiter(this, void 0, void 0,
109109
logs.storageDeleted();
110110
});
111111
const clearFirestoreData = (firestorePaths, uid) => __awaiter(this, void 0, void 0, function* () {
112-
// admin.firestore().settings({
113-
// timestampsInSnapshots: true,
114-
// });
115112
logs.firestoreDeleting();
116113
const paths = extractUserPaths(firestorePaths, uid);
117114
const promises = paths.map((path) => __awaiter(this, void 0, void 0, function* () {

delete-user-data/functions/src/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,6 @@ const clearStorageData = async (storagePaths: string, uid: string) => {
112112
};
113113

114114
const clearFirestoreData = async (firestorePaths: string, uid: string) => {
115-
// admin.firestore().settings({
116-
// timestampsInSnapshots: true,
117-
// });
118115
logs.firestoreDeleting();
119116

120117
const paths = extractUserPaths(firestorePaths, uid);

firestore-bigquery-export/firestore-bigquery-change-tracker/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"url": "github.com/firebase/extensions.git",
66
"directory": "firestore-bigquery-export/firestore-bigquery-change-tracker"
77
},
8-
"version": "0.1.2",
8+
"version": "0.1.3",
99
"description": "Core change-tracker library for Cloud Firestore Collection BigQuery Exports",
1010
"main": "./lib/index.js",
1111
"scripts": {

firestore-bigquery-export/firestore-bigquery-change-tracker/src/bigquery/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ export class FirestoreBigQueryEventHistoryTracker implements FirestoreEventHisto
8787
buildDataRow(
8888
eventId: string,
8989
changeType: ChangeType,
90-
timestamp: Date,
90+
timestamp: string,
9191
document_name: string,
9292
data?: Object
9393
): bigquery.RowMetadata {
9494
// This must match firestoreToBQTable().
9595
return {
96-
timestamp: timestamp.toISOString(),
96+
timestamp: timestamp,
9797
event_id: eventId,
9898
document_name: document_name,
9999
operation: ChangeType[changeType],

firestore-bigquery-export/firestore-bigquery-change-tracker/src/tracker.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ export enum ChangeType {
2525
}
2626

2727
export interface FirestoreDocumentChangeEvent {
28-
timestamp: Date;
28+
// The timestamp represented in ISO format.
29+
// Date is not appropriate because it only has millisecond precision.
30+
// Cloud Firestore timestamps have microsecond precision.
31+
timestamp: string;
2932
operation: ChangeType;
3033
documentName: string;
3134
eventId: string;

firestore-bigquery-export/functions/lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ exports.fsexportbigquery = functions.handler.firestore.document.onWrite((change,
3636
try {
3737
const changeType = util_1.getChangeType(change);
3838
yield eventTracker.record([{
39-
timestamp: util_1.getTimestamp(context, change),
39+
timestamp: context.timestamp,
4040
operation: changeType,
4141
documentName: context.resource.name,
4242
eventId: context.eventId,

firestore-bigquery-export/functions/lib/logs.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ exports.bigQueryViewValidating = (viewName) => {
9090
console.log(`Validating existing BigQuery view: ${viewName}`);
9191
};
9292
exports.complete = () => {
93-
console.log("Completed mod execution");
93+
console.log("Completed execution of extension");
9494
};
9595
exports.dataInserted = (rowCount) => {
9696
console.log(`Inserted ${rowCount} row(s) of data into BigQuery`);
@@ -105,10 +105,10 @@ exports.error = (err) => {
105105
console.error("Error when mirroring data to BigQuery", err);
106106
};
107107
exports.init = () => {
108-
console.log("Initializing mod with configuration", config_1.default);
108+
console.log("Initializing extension with configuration", config_1.default);
109109
};
110110
exports.start = () => {
111-
console.log("Started mod execution with configuration", config_1.default);
111+
console.log("Started execution of extension with configuration", config_1.default);
112112
};
113113
exports.timestampMissingValue = (fieldName) => {
114114
console.warn(`Missing value for timestamp field: ${fieldName}, using default timestamp instead.`);

0 commit comments

Comments
 (0)