firestore-meilisearch 0.1.8 → 0.1.9

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/index.js CHANGED
@@ -57,7 +57,10 @@ async function handleAddDocument(documentId, snapshot) {
57
57
  logs.addDocument(documentId);
58
58
  if ((0, validate_1.validateDocumentId)(documentId)) {
59
59
  const document = (0, adapter_1.adaptDocument)(documentId, snapshot);
60
- await index.addDocuments([document], { primaryKey: '_firestore_id' });
60
+ const { taskUid } = await index.addDocuments([document], {
61
+ primaryKey: '_firestore_id',
62
+ });
63
+ firebase_functions_1.logger.info(`Document addition request for document with ID ${documentId} added to task list (task ID ${taskUid}).`);
61
64
  }
62
65
  else {
63
66
  firebase_functions_1.logger.error(`Could not create document with id: ${documentId}. The document id can only contain case-insensitive alphanumeric characters (abcDEF), hyphens (-) or underscores(_).`);
@@ -75,7 +78,8 @@ async function handleDeleteDocument(documentId) {
75
78
  try {
76
79
  logs.deleteDocument(documentId);
77
80
  if ((0, validate_1.validateDocumentId)(documentId)) {
78
- await index.deleteDocument(documentId);
81
+ const { taskUid } = await index.deleteDocument(documentId);
82
+ firebase_functions_1.logger.info(`Document deletion request for document with ID ${documentId} added to task list (task ID ${taskUid}).`);
79
83
  }
80
84
  else {
81
85
  firebase_functions_1.logger.error(`Could not delete document with id: ${documentId}. The document id can only contain case-insensitive alphanumeric characters (abcDEF), hyphens (-) or underscores(_).`);
@@ -95,7 +99,8 @@ async function handleUpdateDocument(documentId, after) {
95
99
  logs.updateDocument(documentId);
96
100
  if ((0, validate_1.validateDocumentId)(documentId)) {
97
101
  const document = (0, adapter_1.adaptDocument)(documentId, after);
98
- await index.addDocuments([document]);
102
+ const { taskUid } = await index.addDocuments([document]);
103
+ firebase_functions_1.logger.info(`Document update request for document with ID ${documentId} added to task list (task ID ${taskUid}).`);
99
104
  }
100
105
  else {
101
106
  firebase_functions_1.logger.error(`Could not update document with id: ${documentId}.The document id can only contain case-insensitive alphanumeric characters (abcDEF), hyphens (-) or underscores(_).`);
package/lib/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = void 0;
4
- exports.version = '0.1.8';
4
+ exports.version = '0.1.9';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "firestore-meilisearch",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "scripts": {
5
5
  "lint": "eslint .",
6
6
  "lint:fix": "eslint . --fix",
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '0.1.8'
1
+ export const version = '0.1.9'