pdf-catalog-generator 1.1.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.
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = __importDefault(require("react"));
7
+ const renderer_1 = require("@react-pdf/renderer");
8
+ const styles = renderer_1.StyleSheet.create({
9
+ page: {
10
+ width: '100%',
11
+ height: '100vh',
12
+ position: 'relative',
13
+ },
14
+ header: {
15
+ backgroundColor: '#2C2C2C',
16
+ padding: 15,
17
+ display: 'flex',
18
+ flexDirection: 'row',
19
+ justifyContent: 'space-between',
20
+ alignItems: 'center',
21
+ },
22
+ companyName: {
23
+ color: '#FFFFFF',
24
+ fontSize: 14,
25
+ fontWeight: 'bold',
26
+ letterSpacing: 2,
27
+ },
28
+ brandLogo: {
29
+ width: 60,
30
+ height: 60,
31
+ objectFit: 'contain',
32
+ },
33
+ productContainer: {
34
+ width: '100%',
35
+ height: 'calc(100vh - 90px)',
36
+ position: 'relative',
37
+ padding: 20,
38
+ },
39
+ productImage: {
40
+ width: '100%',
41
+ height: '100%',
42
+ objectFit: 'contain',
43
+ },
44
+ detailsBox: {
45
+ position: 'absolute',
46
+ bottom: 30,
47
+ right: 30,
48
+ backgroundColor: '#FFFFFF',
49
+ padding: 15,
50
+ borderRadius: 4,
51
+ minWidth: '40%',
52
+ maxWidth: '50%',
53
+ border: '1px solid #E0E0E0',
54
+ },
55
+ detailRow: {
56
+ display: 'flex',
57
+ flexDirection: 'row',
58
+ marginBottom: 6,
59
+ fontSize: 9,
60
+ },
61
+ detailLabel: {
62
+ fontWeight: 'bold',
63
+ color: '#333333',
64
+ marginRight: 5,
65
+ minWidth: 100,
66
+ },
67
+ detailValue: {
68
+ color: '#555555',
69
+ flexShrink: 1,
70
+ },
71
+ });
72
+ /**
73
+ * Format field name to display label
74
+ * Examples:
75
+ * - "designNumber" -> "Design Number"
76
+ * - "gsm" -> "GSM"
77
+ * - "fabric_finish" -> "Fabric Finish"
78
+ */
79
+ const formatFieldName = (fieldName) => {
80
+ // Handle common acronyms
81
+ const acronyms = ['gsm', 'slub', 'id', 'sku'];
82
+ // Replace underscores and hyphens with spaces
83
+ let formatted = fieldName.replace(/[_-]/g, ' ');
84
+ // Split camelCase
85
+ formatted = formatted.replace(/([a-z])([A-Z])/g, '$1 $2');
86
+ // Capitalize each word
87
+ formatted = formatted
88
+ .split(' ')
89
+ .map(word => {
90
+ const lowerWord = word.toLowerCase();
91
+ // Keep acronyms in uppercase
92
+ if (acronyms.includes(lowerWord)) {
93
+ return word.toUpperCase();
94
+ }
95
+ // Capitalize first letter
96
+ return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
97
+ })
98
+ .join(' ');
99
+ return formatted;
100
+ };
101
+ const Template4 = ({ products, companyLogo, companyName = 'BANG TEXTILES & CLOTHING PVT. LTD.' }) => {
102
+ return (react_1.default.createElement(react_1.default.Fragment, null, products.map((product, index) => {
103
+ // Extract all fields except 'image'
104
+ const detailFields = Object.entries(product).filter(([key]) => key !== 'image');
105
+ return (react_1.default.createElement(renderer_1.View, { key: index, style: styles.page },
106
+ react_1.default.createElement(renderer_1.View, { style: styles.header },
107
+ react_1.default.createElement(renderer_1.Text, { style: styles.companyName }, companyName),
108
+ companyLogo && (react_1.default.createElement(renderer_1.Image, { style: styles.brandLogo, src: companyLogo }))),
109
+ react_1.default.createElement(renderer_1.View, { style: styles.productContainer },
110
+ react_1.default.createElement(renderer_1.Image, { style: styles.productImage, src: product.Image ||
111
+ 'https://cloud-flz4zi76g-hack-club-bot.vercel.app/0image_fallback.jpg' }),
112
+ detailFields.length > 0 && (react_1.default.createElement(renderer_1.View, { style: styles.detailsBox }, detailFields.map(([key, value]) => {
113
+ // Only render if value exists
114
+ if (value === undefined || value === null || value === '') {
115
+ return null;
116
+ }
117
+ return (react_1.default.createElement(renderer_1.View, { key: key, style: styles.detailRow },
118
+ react_1.default.createElement(renderer_1.Text, { style: styles.detailLabel },
119
+ formatFieldName(key),
120
+ ":"),
121
+ react_1.default.createElement(renderer_1.Text, { style: styles.detailValue }, String(value))));
122
+ })))),
123
+ react_1.default.createElement(renderer_1.View, { break: true })));
124
+ })));
125
+ };
126
+ exports.default = Template4;
@@ -0,0 +1,4 @@
1
+ export { default as Template1 } from './Template1';
2
+ export { default as Template2 } from './Template2';
3
+ export { default as Template3 } from './Template3';
4
+ export { default as Template4 } from './Template4';
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Template4 = exports.Template3 = exports.Template2 = exports.Template1 = void 0;
7
+ var Template1_1 = require("./Template1");
8
+ Object.defineProperty(exports, "Template1", { enumerable: true, get: function () { return __importDefault(Template1_1).default; } });
9
+ var Template2_1 = require("./Template2");
10
+ Object.defineProperty(exports, "Template2", { enumerable: true, get: function () { return __importDefault(Template2_1).default; } });
11
+ var Template3_1 = require("./Template3");
12
+ Object.defineProperty(exports, "Template3", { enumerable: true, get: function () { return __importDefault(Template3_1).default; } });
13
+ var Template4_1 = require("./Template4");
14
+ Object.defineProperty(exports, "Template4", { enumerable: true, get: function () { return __importDefault(Template4_1).default; } });
@@ -0,0 +1,16 @@
1
+ export interface ProductData {
2
+ Image: string;
3
+ [key: string]: string | number | undefined;
4
+ }
5
+ export type TemplateType = 'template1' | 'template2' | 'template3' | 'template4';
6
+ export interface CatalogConfig {
7
+ products: ProductData[];
8
+ companyLogo?: string | null;
9
+ companyName: string;
10
+ template?: TemplateType;
11
+ }
12
+ export interface TemplateProps {
13
+ companyLogo?: string | null;
14
+ companyName?: string;
15
+ products: ProductData[];
16
+ }
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "pdf-catalog-generator",
3
+ "version": "1.1.0",
4
+ "description": "Generate product catalog PDFs from Excel, CSV, or JSON data",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "scripts": {
8
+ "build": "tsc",
9
+ "watch": "tsc --watch",
10
+ "prepublishOnly": "npm run build"
11
+ },
12
+ "keywords": [
13
+ "pdf",
14
+ "catalog",
15
+ "product",
16
+ "excel",
17
+ "csv"
18
+ ],
19
+ "author": "",
20
+ "license": "MIT",
21
+ "dependencies": {
22
+ "@react-pdf/renderer": "^3.1.14",
23
+ "xlsx": "^0.18.5"
24
+ },
25
+ "devDependencies": {
26
+ "@types/node": "^20.10.0",
27
+ "@types/react": "^18.2.0",
28
+ "typescript": "^5.3.0"
29
+ },
30
+ "peerDependencies": {
31
+ "react": "^18.0.0"
32
+ }
33
+ }
@@ -0,0 +1,100 @@
1
+ # PDF Catalog Generator - Test Project
2
+
3
+ This project demonstrates how to use the `pdf-catalog-generator` package with different input formats.
4
+
5
+ ## Setup
6
+
7
+ ```bash
8
+ # Install dependencies
9
+ npm install
10
+
11
+ # Build TypeScript
12
+ npm run build
13
+ ```
14
+
15
+ ## Running Tests
16
+
17
+ ### Test All Formats at Once
18
+ ```bash
19
+ npm start
20
+ # or
21
+ npm run test:all
22
+ ```
23
+
24
+ ### Test Individual Formats
25
+ ```bash
26
+ # Test JSON input
27
+ npm run test:json
28
+
29
+ # Test CSV input
30
+ npm run test:csv
31
+
32
+ # Test Excel input
33
+ npm run test:excel
34
+ ```
35
+
36
+ ## Input Data Formats
37
+
38
+ ### JSON Format
39
+ Located in `data/products.json`. Array of product objects:
40
+ ```json
41
+ [
42
+ {
43
+ "Title": "Product Name",
44
+ "Description": "Product description",
45
+ "Image": "https://example.com/image.jpg",
46
+ "Price": 999,
47
+ "Rating": 4.5,
48
+ "Link": "https://example.com/product"
49
+ }
50
+ ]
51
+ ```
52
+
53
+ ### CSV Format
54
+ Located in `data/products.csv`. Standard CSV with headers:
55
+ ```
56
+ Title,Description,Image,Price,Rating,Link
57
+ Product Name,Description here,https://...,999,4.5,https://...
58
+ ```
59
+
60
+ ### Excel Format
61
+ Located in `data/products.xlsx`. Excel file with same columns as CSV.
62
+
63
+ ## Output
64
+
65
+ Generated PDFs are saved in the `output/` directory:
66
+ - `catalog-from-json-template1.pdf`
67
+ - `catalog-from-csv-template2.pdf`
68
+ - `catalog-from-excel-template3.pdf`
69
+ - And more...
70
+
71
+ ## Templates
72
+
73
+ The package includes 3 templates:
74
+ - **Template 1**: Grid layout with 2 columns
75
+ - **Template 2**: Full-width list layout
76
+ - **Template 3**: Full-page layout with overlay
77
+
78
+ ## Example Usage in Your Code
79
+
80
+ ```typescript
81
+ import { generateProductCatalog, parseJSON } from 'pdf-catalog-generator';
82
+ import fs from 'fs';
83
+
84
+ // From JSON
85
+ const products = parseJSON(yourJsonData);
86
+ const pdfBuffer = await generateProductCatalog({
87
+ products,
88
+ companyLogo: 'https://your-logo.png',
89
+ companyName: 'Your Company',
90
+ template: 'template1'
91
+ });
92
+
93
+ // Save to file
94
+ fs.writeFileSync('catalog.pdf', pdfBuffer);
95
+
96
+ // Or send as HTTP response
97
+ res.setHeader('Content-Type', 'application/pdf');
98
+ res.send(pdfBuffer);
99
+ ```
100
+
@@ -0,0 +1,8 @@
1
+ Title,Description,Image,Price,Rating,Link
2
+ Wireless Bluetooth Headphones,"Premium noise-cancelling headphones with 30-hour battery life. Features advanced Bluetooth 5.0 connectivity and superior sound quality.",https://images.unsplash.com/photo-1505740420928-5e560c06d30e?w=400,2999,4.5,https://example.com/product/headphones
3
+ Smart Fitness Watch,"Track your health and fitness with GPS, heart rate monitor, and sleep tracking. Water-resistant up to 50 meters.",https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=400,1499,4.7,https://example.com/product/watch
4
+ Portable Power Bank,"20000mAh high-capacity power bank with fast charging support. Charge multiple devices simultaneously with dual USB ports.",https://images.unsplash.com/photo-1609091839311-d5365f9ff1c5?w=400,799,4.3,https://example.com/product/powerbank
5
+ Laptop Stand Adjustable,"Ergonomic aluminum laptop stand with 6 adjustable height levels. Compatible with all laptop sizes from 10 to 17 inches.",https://images.unsplash.com/photo-1527864550417-7fd91fc51a46?w=400,1299,4.6,https://example.com/product/laptop-stand
6
+ USB-C Hub 7-in-1,"Expand your connectivity with HDMI, USB 3.0, SD card reader, and more. Sleek aluminum design matches your devices perfectly.",https://images.unsplash.com/photo-1625948515291-69613efd103f?w=400,1899,4.4,https://example.com/product/usb-hub
7
+ Mechanical Keyboard RGB,"Premium mechanical gaming keyboard with customizable RGB lighting. Blue switches provide tactile feedback for gaming and typing.",https://images.unsplash.com/photo-1587829741301-dc798b83add3?w=400,3499,4.8,https://example.com/product/keyboard
8
+
@@ -0,0 +1,51 @@
1
+ [
2
+ {
3
+ "Title": "Wireless Bluetooth Headphones",
4
+ "Description": "Premium noise-cancelling headphones with 30-hour battery life. Features advanced Bluetooth 5.0 connectivity and superior sound quality.",
5
+ "Image": "https://images.unsplash.com/photo-1505740420928-5e560c06d30e?w=400",
6
+ "Price": 2999,
7
+ "Rating": 4.5,
8
+ "Link": "https://example.com/product/headphones"
9
+ },
10
+ {
11
+ "Title": "Smart Fitness Watch",
12
+ "Description": "Track your health and fitness with GPS, heart rate monitor, and sleep tracking. Water-resistant up to 50 meters.",
13
+ "Image": "https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=400",
14
+ "Price": 1499,
15
+ "Rating": 4.7,
16
+ "Link": "https://example.com/product/watch"
17
+ },
18
+ {
19
+ "Title": "Portable Power Bank",
20
+ "Description": "20000mAh high-capacity power bank with fast charging support. Charge multiple devices simultaneously with dual USB ports.",
21
+ "Image": "https://images.unsplash.com/photo-1609091839311-d5365f9ff1c5?w=400",
22
+ "Price": 799,
23
+ "Rating": 4.3,
24
+ "Link": "https://example.com/product/powerbank"
25
+ },
26
+ {
27
+ "Title": "Laptop Stand Adjustable",
28
+ "Description": "Ergonomic aluminum laptop stand with 6 adjustable height levels. Compatible with all laptop sizes from 10 to 17 inches.",
29
+ "Image": "https://images.unsplash.com/photo-1527864550417-7fd91fc51a46?w=400",
30
+ "Price": 1299,
31
+ "Rating": 4.6,
32
+ "Link": "https://example.com/product/laptop-stand"
33
+ },
34
+ {
35
+ "Title": "USB-C Hub 7-in-1",
36
+ "Description": "Expand your connectivity with HDMI, USB 3.0, SD card reader, and more. Sleek aluminum design matches your devices perfectly.",
37
+ "Image": "https://images.unsplash.com/photo-1625948515291-69613efd103f?w=400",
38
+ "Price": 1899,
39
+ "Rating": 4.4,
40
+ "Link": "https://example.com/product/usb-hub"
41
+ },
42
+ {
43
+ "Title": "Mechanical Keyboard RGB",
44
+ "Description": "Premium mechanical gaming keyboard with customizable RGB lighting. Blue switches provide tactile feedback for gaming and typing.",
45
+ "Image": "https://images.unsplash.com/photo-1587829741301-dc798b83add3?w=400",
46
+ "Price": 3499,
47
+ "Rating": 4.8,
48
+ "Link": "https://example.com/product/keyboard"
49
+ }
50
+ ]
51
+
@@ -0,0 +1,260 @@
1
+ {
2
+ "name": "pdf-catalog-test",
3
+ "version": "1.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "pdf-catalog-test",
9
+ "version": "1.0.0",
10
+ "dependencies": {
11
+ "pdf-catalog-generator": "file:../pdf-catalog-generator"
12
+ },
13
+ "devDependencies": {
14
+ "@types/node": "^20.10.0",
15
+ "ts-node": "^10.9.2",
16
+ "typescript": "^5.3.0"
17
+ }
18
+ },
19
+ "../pdf-catalog-generator": {
20
+ "version": "1.0.0",
21
+ "license": "MIT",
22
+ "dependencies": {
23
+ "@react-pdf/renderer": "^3.1.14",
24
+ "xlsx": "^0.18.5"
25
+ },
26
+ "devDependencies": {
27
+ "@types/node": "^20.10.0",
28
+ "@types/react": "^18.2.0",
29
+ "typescript": "^5.3.0"
30
+ },
31
+ "peerDependencies": {
32
+ "react": "^18.0.0"
33
+ }
34
+ },
35
+ "node_modules/@cspotcode/source-map-support": {
36
+ "version": "0.8.1",
37
+ "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
38
+ "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
39
+ "dev": true,
40
+ "license": "MIT",
41
+ "dependencies": {
42
+ "@jridgewell/trace-mapping": "0.3.9"
43
+ },
44
+ "engines": {
45
+ "node": ">=12"
46
+ }
47
+ },
48
+ "node_modules/@jridgewell/resolve-uri": {
49
+ "version": "3.1.2",
50
+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
51
+ "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
52
+ "dev": true,
53
+ "license": "MIT",
54
+ "engines": {
55
+ "node": ">=6.0.0"
56
+ }
57
+ },
58
+ "node_modules/@jridgewell/sourcemap-codec": {
59
+ "version": "1.5.5",
60
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",
61
+ "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==",
62
+ "dev": true,
63
+ "license": "MIT"
64
+ },
65
+ "node_modules/@jridgewell/trace-mapping": {
66
+ "version": "0.3.9",
67
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
68
+ "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
69
+ "dev": true,
70
+ "license": "MIT",
71
+ "dependencies": {
72
+ "@jridgewell/resolve-uri": "^3.0.3",
73
+ "@jridgewell/sourcemap-codec": "^1.4.10"
74
+ }
75
+ },
76
+ "node_modules/@tsconfig/node10": {
77
+ "version": "1.0.12",
78
+ "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.12.tgz",
79
+ "integrity": "sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ==",
80
+ "dev": true,
81
+ "license": "MIT"
82
+ },
83
+ "node_modules/@tsconfig/node12": {
84
+ "version": "1.0.11",
85
+ "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
86
+ "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
87
+ "dev": true,
88
+ "license": "MIT"
89
+ },
90
+ "node_modules/@tsconfig/node14": {
91
+ "version": "1.0.3",
92
+ "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
93
+ "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
94
+ "dev": true,
95
+ "license": "MIT"
96
+ },
97
+ "node_modules/@tsconfig/node16": {
98
+ "version": "1.0.4",
99
+ "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz",
100
+ "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==",
101
+ "dev": true,
102
+ "license": "MIT"
103
+ },
104
+ "node_modules/@types/node": {
105
+ "version": "20.19.27",
106
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.27.tgz",
107
+ "integrity": "sha512-N2clP5pJhB2YnZJ3PIHFk5RkygRX5WO/5f0WC08tp0wd+sv0rsJk3MqWn3CbNmT2J505a5336jaQj4ph1AdMug==",
108
+ "dev": true,
109
+ "license": "MIT",
110
+ "peer": true,
111
+ "dependencies": {
112
+ "undici-types": "~6.21.0"
113
+ }
114
+ },
115
+ "node_modules/acorn": {
116
+ "version": "8.15.0",
117
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
118
+ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
119
+ "dev": true,
120
+ "license": "MIT",
121
+ "bin": {
122
+ "acorn": "bin/acorn"
123
+ },
124
+ "engines": {
125
+ "node": ">=0.4.0"
126
+ }
127
+ },
128
+ "node_modules/acorn-walk": {
129
+ "version": "8.3.4",
130
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz",
131
+ "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==",
132
+ "dev": true,
133
+ "license": "MIT",
134
+ "dependencies": {
135
+ "acorn": "^8.11.0"
136
+ },
137
+ "engines": {
138
+ "node": ">=0.4.0"
139
+ }
140
+ },
141
+ "node_modules/arg": {
142
+ "version": "4.1.3",
143
+ "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
144
+ "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
145
+ "dev": true,
146
+ "license": "MIT"
147
+ },
148
+ "node_modules/create-require": {
149
+ "version": "1.1.1",
150
+ "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
151
+ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
152
+ "dev": true,
153
+ "license": "MIT"
154
+ },
155
+ "node_modules/diff": {
156
+ "version": "4.0.2",
157
+ "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
158
+ "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
159
+ "dev": true,
160
+ "license": "BSD-3-Clause",
161
+ "engines": {
162
+ "node": ">=0.3.1"
163
+ }
164
+ },
165
+ "node_modules/make-error": {
166
+ "version": "1.3.6",
167
+ "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
168
+ "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
169
+ "dev": true,
170
+ "license": "ISC"
171
+ },
172
+ "node_modules/pdf-catalog-generator": {
173
+ "resolved": "../pdf-catalog-generator",
174
+ "link": true
175
+ },
176
+ "node_modules/ts-node": {
177
+ "version": "10.9.2",
178
+ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz",
179
+ "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==",
180
+ "dev": true,
181
+ "license": "MIT",
182
+ "dependencies": {
183
+ "@cspotcode/source-map-support": "^0.8.0",
184
+ "@tsconfig/node10": "^1.0.7",
185
+ "@tsconfig/node12": "^1.0.7",
186
+ "@tsconfig/node14": "^1.0.0",
187
+ "@tsconfig/node16": "^1.0.2",
188
+ "acorn": "^8.4.1",
189
+ "acorn-walk": "^8.1.1",
190
+ "arg": "^4.1.0",
191
+ "create-require": "^1.1.0",
192
+ "diff": "^4.0.1",
193
+ "make-error": "^1.1.1",
194
+ "v8-compile-cache-lib": "^3.0.1",
195
+ "yn": "3.1.1"
196
+ },
197
+ "bin": {
198
+ "ts-node": "dist/bin.js",
199
+ "ts-node-cwd": "dist/bin-cwd.js",
200
+ "ts-node-esm": "dist/bin-esm.js",
201
+ "ts-node-script": "dist/bin-script.js",
202
+ "ts-node-transpile-only": "dist/bin-transpile.js",
203
+ "ts-script": "dist/bin-script-deprecated.js"
204
+ },
205
+ "peerDependencies": {
206
+ "@swc/core": ">=1.2.50",
207
+ "@swc/wasm": ">=1.2.50",
208
+ "@types/node": "*",
209
+ "typescript": ">=2.7"
210
+ },
211
+ "peerDependenciesMeta": {
212
+ "@swc/core": {
213
+ "optional": true
214
+ },
215
+ "@swc/wasm": {
216
+ "optional": true
217
+ }
218
+ }
219
+ },
220
+ "node_modules/typescript": {
221
+ "version": "5.9.3",
222
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
223
+ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
224
+ "dev": true,
225
+ "license": "Apache-2.0",
226
+ "peer": true,
227
+ "bin": {
228
+ "tsc": "bin/tsc",
229
+ "tsserver": "bin/tsserver"
230
+ },
231
+ "engines": {
232
+ "node": ">=14.17"
233
+ }
234
+ },
235
+ "node_modules/undici-types": {
236
+ "version": "6.21.0",
237
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
238
+ "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
239
+ "dev": true,
240
+ "license": "MIT"
241
+ },
242
+ "node_modules/v8-compile-cache-lib": {
243
+ "version": "3.0.1",
244
+ "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
245
+ "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
246
+ "dev": true,
247
+ "license": "MIT"
248
+ },
249
+ "node_modules/yn": {
250
+ "version": "3.1.1",
251
+ "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
252
+ "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
253
+ "dev": true,
254
+ "license": "MIT",
255
+ "engines": {
256
+ "node": ">=6"
257
+ }
258
+ }
259
+ }
260
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "pdf-catalog-test",
3
+ "version": "1.0.0",
4
+ "description": "Test project for pdf-catalog-generator",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "node --loader ts-node/esm test.ts",
8
+ "test:json": "node dist/test-json.js",
9
+ "test:csv": "node dist/test-csv.js",
10
+ "test:excel": "node dist/test-excel.js",
11
+ "test:all": "node dist/test-all.js",
12
+ "build": "tsc",
13
+ "start": "npm run build && npm run test:all"
14
+ },
15
+ "dependencies": {
16
+ "pdf-catalog-generator": "file:../pdf-catalog-generator"
17
+ },
18
+ "devDependencies": {
19
+ "@types/node": "^20.10.0",
20
+ "typescript": "^5.3.0",
21
+ "ts-node": "^10.9.2"
22
+ }
23
+ }
24
+