Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { join, sep } from 'path'
import { readFile, writeFile } from './util/fs'
import { getFileFieldPaths } from './util/get-file-fields'
import { buildLocalePath, filter, getPathKeys, removeUnwantedKeys } from './util/index'
import { LOG_MESSAGES } from './util/messages'

import {
validateContentTypeDeletedObject, validateEntryAssetDeletedObject,
Expand Down Expand Up @@ -65,7 +66,7 @@ export class FilesystemStore {
public publish(input) {
return new Promise(async (resolve, reject) => {
try {
debug(`Publishing ${JSON.stringify(input)}`)
debug(LOG_MESSAGES.PUBLISHING_ENTRY(input))
validatePublishedObject(input)
if (existsSync(this.localePath)) {
// if its a new locale, keep track!
Expand Down
24 changes: 24 additions & 0 deletions src/util/messages.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*!
* DataSync Content Store Filesystem - Messages
* Copyright (c) Contentstack LLC
* MIT Licensed
*/

/**
* Centralized message store for all log messages, error messages, and user-facing strings.
* This provides a single source of truth for all messages in the application,
* making it easier to maintain consistency and support future localization.
*/

export const LOG_MESSAGES = {
PUBLISHING_ENTRY: (input: any) => `Publishing entry: ${JSON.stringify(input)}`,
} as const;

export const ERROR_MESSAGES = {
// Add error messages here as needed
} as const;

export const INFO_MESSAGES = {
// Add info messages here as needed
} as const;

Loading