Skip to content

Commit 6f50374

Browse files
Merge pull request #74 from contentstack/development
DX | 10-11-2025 | Release
2 parents aa7c9b9 + 104ddc4 commit 6f50374

5 files changed

Lines changed: 39 additions & 4 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@contentstack/datasync-content-store-filesystem",
3-
"version": "2.1.6",
3+
"version": "2.1.7",
44
"description": "Datasync content store library - saves data in filesystem",
55
"main": "./dist",
66
"types": "./typings",

src/fs.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { join, sep } from 'path'
1010
import { readFile, writeFile } from './util/fs'
1111
import { getFileFieldPaths } from './util/get-file-fields'
1212
import { buildLocalePath, filter, getPathKeys, removeUnwantedKeys } from './util/index'
13+
import { LOG_MESSAGES } from './util/messages'
1314

1415
import {
1516
validateContentTypeDeletedObject, validateEntryAssetDeletedObject,
@@ -65,7 +66,7 @@ export class FilesystemStore {
6566
public publish(input) {
6667
return new Promise(async (resolve, reject) => {
6768
try {
68-
debug(`Publishing ${JSON.stringify(input)}`)
69+
debug(LOG_MESSAGES.PUBLISHING_ENTRY(input))
6970
validatePublishedObject(input)
7071
if (existsSync(this.localePath)) {
7172
// if its a new locale, keep track!

src/util/messages.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*!
2+
* DataSync Content Store Filesystem - Messages
3+
* Copyright (c) Contentstack LLC
4+
* MIT Licensed
5+
*/
6+
7+
/**
8+
* Centralized message store for all log messages, error messages, and user-facing strings.
9+
* This provides a single source of truth for all messages in the application,
10+
* making it easier to maintain consistency and support future localization.
11+
*/
12+
13+
export const LOG_MESSAGES = {
14+
PUBLISHING_ENTRY: (input: any) => `Publishing entry: ${JSON.stringify(input)}`,
15+
} as const;
16+
17+
export const ERROR_MESSAGES = {
18+
// Add error messages here as needed
19+
} as const;
20+
21+
export const INFO_MESSAGES = {
22+
// Add info messages here as needed
23+
} as const;
24+

typings/util/messages.d.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*!
2+
* DataSync Content Store Filesystem - Messages
3+
* Copyright (c) Contentstack LLC
4+
* MIT Licensed
5+
*/
6+
export declare const LOG_MESSAGES: {
7+
readonly PUBLISHING_ENTRY: (input: any) => string;
8+
};
9+
export declare const ERROR_MESSAGES: {};
10+
export declare const INFO_MESSAGES: {};

0 commit comments

Comments
 (0)