convertit 1.0.0

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +85 -0
  2. package/README.md +503 -0
  3. package/dist/converters/base.d.ts +27 -0
  4. package/dist/converters/base.d.ts.map +1 -0
  5. package/dist/converters/csv.d.ts +67 -0
  6. package/dist/converters/csv.d.ts.map +1 -0
  7. package/dist/converters/excel-styles.d.ts +51 -0
  8. package/dist/converters/excel-styles.d.ts.map +1 -0
  9. package/dist/converters/excel.d.ts +40 -0
  10. package/dist/converters/excel.d.ts.map +1 -0
  11. package/dist/converters/html.d.ts +21 -0
  12. package/dist/converters/html.d.ts.map +1 -0
  13. package/dist/converters/image.d.ts +80 -0
  14. package/dist/converters/image.d.ts.map +1 -0
  15. package/dist/converters/index.d.ts +10 -0
  16. package/dist/converters/index.d.ts.map +1 -0
  17. package/dist/converters/pdf.d.ts +68 -0
  18. package/dist/converters/pdf.d.ts.map +1 -0
  19. package/dist/converters/text.d.ts +36 -0
  20. package/dist/converters/text.d.ts.map +1 -0
  21. package/dist/converters/word.d.ts +24 -0
  22. package/dist/converters/word.d.ts.map +1 -0
  23. package/dist/core/converter.d.ts +65 -0
  24. package/dist/core/converter.d.ts.map +1 -0
  25. package/dist/core/errors.d.ts +64 -0
  26. package/dist/core/errors.d.ts.map +1 -0
  27. package/dist/core/index.d.ts +8 -0
  28. package/dist/core/index.d.ts.map +1 -0
  29. package/dist/core/template-engine.d.ts +57 -0
  30. package/dist/core/template-engine.d.ts.map +1 -0
  31. package/dist/core/types.d.ts +702 -0
  32. package/dist/core/types.d.ts.map +1 -0
  33. package/dist/index.d.ts +16 -0
  34. package/dist/index.d.ts.map +1 -0
  35. package/dist/index.js +270420 -0
  36. package/dist/transformers/index.d.ts +61 -0
  37. package/dist/transformers/index.d.ts.map +1 -0
  38. package/dist/utils/helpers.d.ts +55 -0
  39. package/dist/utils/helpers.d.ts.map +1 -0
  40. package/dist/utils/index.d.ts +7 -0
  41. package/dist/utils/index.d.ts.map +1 -0
  42. package/dist/utils/validator.d.ts +26 -0
  43. package/dist/utils/validator.d.ts.map +1 -0
  44. package/package.json +129 -0
@@ -0,0 +1,61 @@
1
+ /**
2
+ * convertit - Transformers
3
+ * Post-processing operations for converted files
4
+ */
5
+ import type { CompressionConfig, WatermarkConfig, EncryptionConfig, MergeConfig, SplitConfig, RotateConfig } from '../core/types';
6
+ /**
7
+ * Compression Transformer
8
+ * Reduces file size while maintaining quality
9
+ */
10
+ export declare class CompressionTransformer {
11
+ static compress(data: Buffer, format: string, config: CompressionConfig): Promise<Buffer>;
12
+ /**
13
+ * Estimate compression ratio
14
+ */
15
+ static estimateCompression(originalSize: number, level: CompressionConfig['level']): number;
16
+ }
17
+ /**
18
+ * Merge Transformer
19
+ * Combines multiple files into one
20
+ */
21
+ export declare class MergeTransformer {
22
+ static merge(files: Buffer[], format: string, config?: MergeConfig): Promise<Buffer>;
23
+ }
24
+ /**
25
+ * Split Transformer
26
+ * Divides files into multiple parts
27
+ */
28
+ export declare class SplitTransformer {
29
+ static split(data: Buffer, format: string, config: SplitConfig): Promise<Buffer[]>;
30
+ private static splitTextBySize;
31
+ }
32
+ /**
33
+ * Watermark Transformer
34
+ * Adds watermarks to documents and images
35
+ */
36
+ export declare class WatermarkTransformer {
37
+ static addWatermark(data: Buffer, format: string, config: WatermarkConfig): Promise<Buffer>;
38
+ private static createTextWatermarkImage;
39
+ }
40
+ /**
41
+ * Rotation Transformer
42
+ * Rotates pages in documents
43
+ */
44
+ export declare class RotationTransformer {
45
+ static rotate(data: Buffer, format: string, config: RotateConfig): Promise<Buffer>;
46
+ }
47
+ /**
48
+ * Encryption Transformer
49
+ * Password protects files
50
+ */
51
+ export declare class EncryptionTransformer {
52
+ static encrypt(data: Buffer, format: string, config: EncryptionConfig): Promise<Buffer>;
53
+ }
54
+ /**
55
+ * Page Number Transformer
56
+ * Adds page numbers to documents
57
+ */
58
+ export declare class PageNumberTransformer {
59
+ static addPageNumbers(data: Buffer, format: string, config: any): Promise<Buffer>;
60
+ }
61
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/transformers/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,YAAY,EACb,MAAM,eAAe,CAAC;AAQvB;;;GAGG;AACH,qBAAa,sBAAsB;WACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC;IAgC/F;;OAEG;IACH,MAAM,CAAC,mBAAmB,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC,GAAG,MAAM;CAS5F;AAED;;;GAGG;AACH,qBAAa,gBAAgB;WACd,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC;CAyC3F;AAED;;;GAGG;AACH,qBAAa,gBAAgB;WACd,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAwBxF,OAAO,CAAC,MAAM,CAAC,eAAe;CA8B/B;AAED;;;GAGG;AACH,qBAAa,oBAAoB;WAClB,YAAY,CACvB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,eAAe,GACtB,OAAO,CAAC,MAAM,CAAC;mBA0CG,wBAAwB;CAuB9C;AAED;;;GAGG;AACH,qBAAa,mBAAmB;WACjB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;CA0BzF;AAED;;;GAGG;AACH,qBAAa,qBAAqB;WACnB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC;CAuB9F;AAED;;;GAGG;AACH,qBAAa,qBAAqB;WACnB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC;CAexF"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Utility functions for file operations and data manipulation.
3
+ */
4
+ import type { FileFormat, InputDataType, PageSize, PageMargins, FontConfig } from '../core/types';
5
+ export declare function generateId(): string;
6
+ export declare function generateFilename(format: FileFormat, prefix?: string): string;
7
+ export declare function getFileExtension(format: FileFormat): string;
8
+ export declare function getMimeType(format: FileFormat): string;
9
+ export declare function detectFormatFromExtension(filename: string): FileFormat | null;
10
+ export declare function normalizeFormat(format: string): FileFormat;
11
+ export declare function isDocumentFormat(format: FileFormat): boolean;
12
+ export declare function isSpreadsheetFormat(format: FileFormat): boolean;
13
+ export declare function isImageFormat(format: FileFormat): boolean;
14
+ export declare function isDataFormat(format: FileFormat): boolean;
15
+ export declare function toBuffer(data: InputDataType): Promise<Buffer>;
16
+ export declare function toString(data: InputDataType): Promise<string>;
17
+ export declare function isReadableStream(value: unknown): boolean;
18
+ export declare function streamToBuffer(stream: ReadableStream): Promise<Buffer>;
19
+ /**
20
+ * Convert Buffer to ReadableStream
21
+ */
22
+ export declare function bufferToStream(buffer: Buffer): ReadableStream;
23
+ export declare function getPageSize(size: string | PageSize): PageSize;
24
+ export declare function mergeMargins(margins?: Partial<PageMargins>): PageMargins;
25
+ export declare function mergeFont(font?: Partial<FontConfig>): FontConfig;
26
+ export declare function parseColor(color: string): {
27
+ r: number;
28
+ g: number;
29
+ b: number;
30
+ };
31
+ export declare function rgbToHex(r: number, g: number, b: number): string;
32
+ export declare function getFileSize(data: Buffer | string): number;
33
+ export declare function formatFileSize(bytes: number): string;
34
+ export declare function deepMerge<T extends Record<string, any>>(target: T, ...sources: Partial<T>[]): T;
35
+ export declare function isPlainObject(value: unknown): value is Record<string, any>;
36
+ export declare function delay(ms: number): Promise<void>;
37
+ export declare function retry<T>(fn: () => Promise<T>, options?: {
38
+ retries?: number;
39
+ delay?: number;
40
+ backoff?: number;
41
+ onRetry?: (error: Error, attempt: number) => void;
42
+ }): Promise<T>;
43
+ export declare function withTimeout<T>(promise: Promise<T>, ms: number, message?: string): Promise<T>;
44
+ export declare function chunk<T>(array: T[], size: number): T[][];
45
+ export declare function flatten<T>(arrays: T[][]): T[];
46
+ export declare function compact<T extends Record<string, any>>(obj: T): Partial<T>;
47
+ export declare function escapeHtml(text: string): string;
48
+ export declare function unescapeHtml(text: string): string;
49
+ export declare function sanitizeFilename(filename: string): string;
50
+ export declare function isNode(): boolean;
51
+ export declare function isBun(): boolean;
52
+ export declare function isBrowser(): boolean;
53
+ export declare function timestamp(): string;
54
+ export declare function measureDuration(startTime: number): number;
55
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/utils/helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGlG,wBAAgB,UAAU,IAAI,MAAM,CAEnC;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAK5E;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAwB3D;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAwBtD;AAED,wBAAgB,yBA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,GAAG,CAAC,EAAE,CAE7C;AAED,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAEzE;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAS/C;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CASjD;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMzD;AAED,wBAAgB,MAAM,IAAI,OAAO,CAIhC;AAED,wBAAgB,KAAK,IAAI,OAAO,CAE/B;AAED,wBAAgB,SAAS,IAAI,OAAO,CAMnC;AAED,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEzD"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * convertit - Utils Module Index
3
+ * Export all utility functions
4
+ */
5
+ export * from './helpers';
6
+ export * from './validator';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Input validation utilities.
3
+ */
4
+ import type { FileFormat, InputDataType, ConvertFileOptions, PDFOptions, WordOptions, ExcelOptions, CSVOptions, HTMLOptions, ImageOptions, WatermarkConfig, EncryptionConfig, CompressionConfig, MergeConfig, SplitConfig } from '../core/types';
5
+ export interface ValidationResult {
6
+ valid: boolean;
7
+ errors: string[];
8
+ warnings: string[];
9
+ }
10
+ export declare function validateOptions(options: ConvertFileOptions): ValidationResult;
11
+ export declare function validateInput(data: InputDataType): ValidationResult;
12
+ export declare function isValidFormat(format: string): format is FileFormat;
13
+ export declare function validatePDFOptions(options: PDFOptions): ValidationResult;
14
+ export declare function validateWordOptions(options: WordOptions): ValidationResult;
15
+ export declare function validateExcelOptions(options: ExcelOptions): ValidationResult;
16
+ export declare function validateCSVOptions(options: CSVOptions): ValidationResult;
17
+ export declare function validateHTMLOptions(options: HTMLOptions): ValidationResult;
18
+ export declare function validateImageOptions(options: ImageOptions): ValidationResult;
19
+ export declare function validateWatermarkConfig(config: WatermarkConfig): ValidationResult;
20
+ export declare function validateEncryptionConfig(config: EncryptionConfig): ValidationResult;
21
+ export declare function validateCompressionConfig(config: CompressionConfig): ValidationResult;
22
+ export declare function validateMergeConfig(config: MergeConfig): ValidationResult;
23
+ export declare function validateSplitConfig(config: SplitConfig): ValidationResult;
24
+ export declare function assertValid(validation: ValidationResult, context?: string): void;
25
+ export declare function canConvert(from: FileFormat, to: FileFormat): boolean;
26
+ //# sourceMappingURL=validator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../src/utils/validator.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,aAAa,EACb,kBAAkB,EAClB,UAAU,EACV,WAAW,EACX,YAAY,EACZ,UAAU,EACV,WAAW,EACX,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,WAAW,EACZ,MAAM,eAAe,CAAC;AA+BvB,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,kBAAkB,GAAG,gBAAgB,CA4I7E;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,aAAa,GAAG,gBAAgB,CAgCnE;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,UAAU,CAElE;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,UAAU,GAAG,gBAAgB,CAkCxE;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,WAAW,GAAG,gBAAgB,CAe1E;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,YAAY,GAAG,gBAAgB,CAgC5E;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,UAAU,GAAG,gBAAgB,CAYxE;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,WAAW,GAAG,gBAAgB,CAa1E;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,YAAY,GAAG,gBAAgB,CAqC5E;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,eAAe,GAAG,gBAAgB,CAyBjF;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,gBAAgB,GAAG,gBAAgB,CAsBnF;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,iBAAiB,GAAG,gBAAgB,CA2BrF;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,WAAW,GAAG,gBAAgB,CA2BzE;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,WAAW,GAAG,gBAAgB,CAyDzE;AAED,wBAAgB,WAAW,CAAC,UAAU,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAOhF;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,UAAU,GAAG,OAAO,CAyCpE"}
package/package.json ADDED
@@ -0,0 +1,129 @@
1
+ {
2
+ "name": "convertit",
3
+ "version": "1.0.0",
4
+ "description": "Convert it! The ultimate file conversion toolkit. Create PDFs, Word docs, Excel spreadsheets, and more with a simple, chainable API.",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.mjs",
11
+ "require": "./dist/index.js",
12
+ "types": "./dist/index.d.ts"
13
+ },
14
+ "./converters": {
15
+ "import": "./dist/converters/index.mjs",
16
+ "require": "./dist/converters/index.js",
17
+ "types": "./dist/converters/index.d.ts"
18
+ },
19
+ "./transformers": {
20
+ "import": "./dist/transformers/index.mjs",
21
+ "require": "./dist/transformers/index.js",
22
+ "types": "./dist/transformers/index.d.ts"
23
+ }
24
+ },
25
+ "files": [
26
+ "dist",
27
+ "README.md",
28
+ "LICENSE",
29
+ "CHANGELOG.md"
30
+ ],
31
+ "scripts": {
32
+ "build": "bun run clean && bun run build:types && bun run build:bundle",
33
+ "build:types": "tsc --emitDeclarationOnly --declaration --outDir dist",
34
+ "build:bundle": "bun build ./src/index.ts --outdir ./dist --target node --format esm && bun build ./src/index.ts --outdir ./dist --target node --format cjs --outfile dist/index.js",
35
+ "dev": "bun --watch src/index.ts",
36
+ "test": "bun test",
37
+ "test:watch": "bun test --watch",
38
+ "test:coverage": "bun test --coverage",
39
+ "lint": "eslint .",
40
+ "lint:fix": "eslint . --fix",
41
+ "format": "prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"",
42
+ "format:check": "prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"",
43
+ "typecheck": "tsc --noEmit",
44
+ "prepublishOnly": "bun run build",
45
+ "clean": "rm -rf dist",
46
+ "prepare": "husky || true",
47
+ "release": "bun run build && npm publish",
48
+ "docs": "typedoc --out docs src/index.ts"
49
+ },
50
+ "keywords": [
51
+ "pdf",
52
+ "word",
53
+ "excel",
54
+ "xlsx",
55
+ "docx",
56
+ "csv",
57
+ "html",
58
+ "markdown",
59
+ "converter",
60
+ "file-conversion",
61
+ "document",
62
+ "spreadsheet",
63
+ "compress",
64
+ "merge",
65
+ "split",
66
+ "watermark",
67
+ "encrypt",
68
+ "template",
69
+ "generator",
70
+ "report",
71
+ "invoice",
72
+ "export",
73
+ "convertit",
74
+ "document-generator",
75
+ "pdf-generator",
76
+ "excel-generator"
77
+ ],
78
+ "author": "suraj-9849",
79
+ "license": "MIT",
80
+ "repository": {
81
+ "type": "git",
82
+ "url": "https://github.com/suraj-9849/convertit"
83
+ },
84
+ "bugs": {
85
+ "url": "https://github.com/suraj-9849/convertit/issues"
86
+ },
87
+ "homepage": "https://github.com/suraj-9849/convertit#readme",
88
+ "engines": {
89
+ "node": ">=18.0.0",
90
+ "bun": ">=1.0.0"
91
+ },
92
+ "devDependencies": {
93
+ "@eslint/js": "^9.0.0",
94
+ "@types/archiver": "^6.0.2",
95
+ "@types/bun": "latest",
96
+ "@types/node": "^20.10.0",
97
+ "eslint": "^9.0.0",
98
+ "eslint-config-prettier": "^9.1.0",
99
+ "husky": "^9.0.0",
100
+ "lint-staged": "^15.2.0",
101
+ "prettier": "^3.1.0",
102
+ "typedoc": "^0.25.0",
103
+ "typescript": "^5.3.0",
104
+ "typescript-eslint": "^8.0.0"
105
+ },
106
+ "dependencies": {
107
+ "@types/pdfkit": "^0.17.4",
108
+ "@types/uuid": "^11.0.0",
109
+ "archiver": "^6.0.1",
110
+ "csv-parse": "^5.5.2",
111
+ "csv-stringify": "^6.4.4",
112
+ "docx": "^8.5.0",
113
+ "exceljs": "^4.4.0",
114
+ "jszip": "^3.10.1",
115
+ "mammoth": "^1.6.0",
116
+ "pdf-lib": "^1.17.1",
117
+ "pdfkit": "^0.14.0",
118
+ "sharp": "^0.33.0",
119
+ "uuid": "^13.0.0"
120
+ },
121
+ "peerDependencies": {
122
+ "typescript": ">=5.0.0"
123
+ },
124
+ "peerDependenciesMeta": {
125
+ "typescript": {
126
+ "optional": true
127
+ }
128
+ }
129
+ }