diff --git a/changelog.md b/changelog.md index 3f15f14..f8e583b 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,12 @@ # Changelog +## 2024-12-02 - 1.5.0 - feat(core) +Refactor project structure for better modularity and code organization + +- Moved shared components to a dedicated 'dist_ts_shared' directory for better separation of concerns. +- Updated import statements across the codebase to align with the new file structure. +- Introduced translations directly under 'ts_shared' for language-specific string management. + ## 2024-12-02 - 1.4.0 - feat(translation) Add French and Italian translations for document interface diff --git a/package.json b/package.json index e464b3d..3aa774c 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,10 @@ "main": "dist_ts_web/index.js", "typings": "dist_ts_web/index.d.ts", "exports": { - "./ts": "./dist_ts/index.js", - "./ts_web": "./dist_ts_web/index.js" + ".": "./dist_ts/index.js", + "./web": "./dist_ts_web/index.js", + "./shared": "./dist_ts_shared/index.js", + "./interfaces": "./dist_ts_shared/interfaces/index.js" }, "scripts": { "test": "npm run build && tstest test/", diff --git a/test/test.ts b/test/test.ts index 5f7f520..ea67a58 100644 --- a/test/test.ts +++ b/test/test.ts @@ -1,6 +1,6 @@ import * as plugins from './plugins.js'; import * as paths from './paths.js'; -import * as interfaces from '../ts/interfaces/index.js'; +import * as interfaces from '../ts_shared/interfaces/index.js'; import { expect, tap } from '@push.rocks/tapbundle'; import * as deesDocumentServer from '../ts/index.js'; diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 8033d5a..0311e55 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@design.estate/dees-document', - version: '1.4.0', + version: '1.5.0', description: 'A sophisticated framework for dynamically generating and rendering business documents like invoices with modern web technologies, featuring PDF creation, templating, and automation.' } diff --git a/ts/classes.pdfservice.ts b/ts/classes.pdfservice.ts index f749e2d..e6849d7 100644 --- a/ts/classes.pdfservice.ts +++ b/ts/classes.pdfservice.ts @@ -1,6 +1,5 @@ import * as plugins from './plugins.js'; import * as helpers from './helpers.js'; -import type { IDocumentSettings} from '../ts/interfaces/index.js'; export interface IPdfServiceConstructorOptions { @@ -46,7 +45,7 @@ export class PdfService { */ public async createPdfFromLetterObject(optionsArg: { letterData: plugins.tsclass.business.ILetter, - documentSettings: IDocumentSettings + documentSettings: plugins.shared.interfaces.IDocumentSettings }) { const html = `