-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmessages.js
More file actions
37 lines (32 loc) · 1.23 KB
/
messages.js
File metadata and controls
37 lines (32 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/**
* Centralized message store for datasync-boilerplate
* This file contains all user-facing messages including info, error, and warning messages.
*/
module.exports = {
// Clean script messages
clean: {
deleted: (item) => `Deleted: ${item}`,
notFound: (item) => `Item not found! Skipping: ${item}`,
},
// Index/Main application messages
sync: {
tokenFound: (checkpoint) => `Sync token found in the checkpoint file: ${JSON.stringify(checkpoint)}`,
usingToken: (token) => `Using sync token: ${token}`,
startSuccess: () => `Boilerplate: Data sync started successfully.`,
error: (error) => `An error occurred: ${error}`,
},
// File operation messages
file: {
notExist: (filePath) => `File does not exist: ${filePath}`,
readError: (errorMessage) => `An error occurred while reading the file: ${errorMessage}`,
},
// Plugin messages
plugin: {
itemLogger: {
beforeSync: (action, uid, contentType) =>
`Item logger - Before sync: ${action.toUpperCase()} operation on '${uid}' (content type: ${contentType})`,
afterSync: (action, uid, contentType) =>
`Item logger - After sync: ${action.toUpperCase()} operation on '${uid}' (content type: ${contentType})`,
},
},
};