chromiumly 2.5.0 → 2.6.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.
- package/README.md +57 -40
- package/dist/chromium/converters/converter.d.ts +13 -0
- package/dist/chromium/converters/converter.js +10 -0
- package/dist/chromium/converters/converter.js.map +1 -1
- package/dist/chromium/converters/html.converter.d.ts +33 -1
- package/dist/chromium/converters/html.converter.js +32 -2
- package/dist/chromium/converters/html.converter.js.map +1 -1
- package/dist/chromium/converters/markdown.converter.d.ts +29 -0
- package/dist/chromium/converters/markdown.converter.js +29 -0
- package/dist/chromium/converters/markdown.converter.js.map +1 -1
- package/dist/chromium/converters/url.converter.d.ts +28 -0
- package/dist/chromium/converters/url.converter.js +28 -0
- package/dist/chromium/converters/url.converter.js.map +1 -1
- package/dist/chromium/utils/converter.utils.d.ts +24 -0
- package/dist/chromium/utils/converter.utils.js +24 -0
- package/dist/chromium/utils/converter.utils.js.map +1 -1
- package/dist/common/gotenberg.utils.d.ts +18 -0
- package/dist/common/gotenberg.utils.js +18 -0
- package/dist/common/gotenberg.utils.js.map +1 -1
- package/dist/gotenberg.d.ts +8 -0
- package/dist/gotenberg.js +8 -0
- package/dist/gotenberg.js.map +1 -1
- package/dist/libre-office/utils/constants.js +76 -76
- package/dist/libre-office/utils/constants.js.map +1 -1
- package/dist/libre-office/utils/libre-office.utils.d.ts +16 -0
- package/dist/libre-office/utils/libre-office.utils.js +38 -15
- package/dist/libre-office/utils/libre-office.utils.js.map +1 -1
- package/dist/main.config.d.ts +43 -0
- package/dist/main.config.js +43 -0
- package/dist/main.config.js.map +1 -1
- package/dist/pdf-engines/pdf.engine.d.ts +31 -5
- package/dist/pdf-engines/pdf.engine.js +28 -0
- package/dist/pdf-engines/pdf.engine.js.map +1 -1
- package/dist/pdf-engines/utils/engine.utils.d.ts +10 -0
- package/dist/pdf-engines/utils/engine.utils.js +11 -1
- package/dist/pdf-engines/utils/engine.utils.js.map +1 -1
- package/package.json +14 -13
- package/src/chromium/converters/converter.ts +13 -0
- package/src/chromium/converters/html.converter.ts +36 -3
- package/src/chromium/converters/markdown.converter.ts +30 -1
- package/src/chromium/converters/tests/html.converter.test.ts +21 -2
- package/src/chromium/converters/url.converter.ts +29 -3
- package/src/chromium/utils/converter.utils.ts +24 -0
- package/src/chromium/utils/tests/converter.utils.test.ts +2 -2
- package/src/common/gotenberg.utils.ts +20 -1
- package/src/gotenberg.ts +9 -0
- package/src/libre-office/utils/constants.ts +76 -76
- package/src/libre-office/utils/libre-office.utils.ts +42 -14
- package/src/libre-office/utils/tests/libre-office.utils.test.ts +24 -4
- package/src/main.config.ts +46 -1
- package/src/pdf-engines/pdf.engine.ts +32 -4
- package/src/pdf-engines/utils/engine.utils.ts +11 -1
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import FormData from "form-data";
|
|
3
|
+
/**
|
|
4
|
+
* Utility class for common tasks related to the Gotenberg service.
|
|
5
|
+
*/
|
|
3
6
|
export declare class GotenbergUtils {
|
|
7
|
+
/**
|
|
8
|
+
* Asserts that a condition is true; otherwise, throws an error with the specified message.
|
|
9
|
+
*
|
|
10
|
+
* @param {boolean} condition - The condition to assert.
|
|
11
|
+
* @param {string} message - The error message to throw if the condition is false.
|
|
12
|
+
* @throws {Error} Throws an error with the specified message if the condition is false.
|
|
13
|
+
*/
|
|
4
14
|
static assert(condition: boolean, message: string): asserts condition;
|
|
15
|
+
/**
|
|
16
|
+
* Performs a POST request to the specified Gotenberg endpoint with the provided FormData.
|
|
17
|
+
*
|
|
18
|
+
* @param {string} endpoint - The Gotenberg endpoint URL.
|
|
19
|
+
* @param {FormData} data - The FormData object to be sent in the POST request.
|
|
20
|
+
* @returns {Promise<Buffer>} A Promise that resolves to the response body as a Buffer.
|
|
21
|
+
* @throws {Error} Throws an error if the HTTP response status is not OK.
|
|
22
|
+
*/
|
|
5
23
|
static fetch(endpoint: string, data: FormData): Promise<Buffer>;
|
|
6
24
|
}
|
|
@@ -3,12 +3,30 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.GotenbergUtils = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
|
|
6
|
+
/**
|
|
7
|
+
* Utility class for common tasks related to the Gotenberg service.
|
|
8
|
+
*/
|
|
6
9
|
class GotenbergUtils {
|
|
10
|
+
/**
|
|
11
|
+
* Asserts that a condition is true; otherwise, throws an error with the specified message.
|
|
12
|
+
*
|
|
13
|
+
* @param {boolean} condition - The condition to assert.
|
|
14
|
+
* @param {string} message - The error message to throw if the condition is false.
|
|
15
|
+
* @throws {Error} Throws an error with the specified message if the condition is false.
|
|
16
|
+
*/
|
|
7
17
|
static assert(condition, message) {
|
|
8
18
|
if (!condition) {
|
|
9
19
|
throw new Error(message);
|
|
10
20
|
}
|
|
11
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Performs a POST request to the specified Gotenberg endpoint with the provided FormData.
|
|
24
|
+
*
|
|
25
|
+
* @param {string} endpoint - The Gotenberg endpoint URL.
|
|
26
|
+
* @param {FormData} data - The FormData object to be sent in the POST request.
|
|
27
|
+
* @returns {Promise<Buffer>} A Promise that resolves to the response body as a Buffer.
|
|
28
|
+
* @throws {Error} Throws an error if the HTTP response status is not OK.
|
|
29
|
+
*/
|
|
12
30
|
static fetch(endpoint, data) {
|
|
13
31
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
14
32
|
const response = yield (0, node_fetch_1.default)(endpoint, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gotenberg.utils.js","sourceRoot":"","sources":["../../src/common/gotenberg.utils.ts"],"names":[],"mappings":";;;;AACA,oEAA+B;AAE/B,MAAa,cAAc;
|
|
1
|
+
{"version":3,"file":"gotenberg.utils.js","sourceRoot":"","sources":["../../src/common/gotenberg.utils.ts"],"names":[],"mappings":";;;;AACA,oEAA+B;AAE/B;;GAEG;AACH,MAAa,cAAc;IACvB;;;;;;OAMG;IACI,MAAM,CAAC,MAAM,CAAC,SAAkB,EAAE,OAAe;QACpD,IAAI,CAAC,SAAS,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;QAC7B,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAO,KAAK,CAAC,QAAgB,EAAE,IAAc;;YACtD,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAK,EAAC,QAAQ,EAAE;gBACnC,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,IAAI;gBACV,OAAO,oBACA,IAAI,CAAC,UAAU,EAAE,CACvB;aACJ,CAAC,CAAC;YAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,GAAG,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;YACjE,CAAC;YAED,OAAO,QAAQ,CAAC,MAAM,EAAE,CAAC;QAC7B,CAAC;KAAA;CACJ;AArCD,wCAqCC"}
|
package/dist/gotenberg.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Class representing configuration for interacting with Gotenberg service.
|
|
3
|
+
*/
|
|
1
4
|
export declare class Gotenberg {
|
|
5
|
+
/**
|
|
6
|
+
* The Gotenberg service endpoint.
|
|
7
|
+
* Defaults to the value from the environment variable `GOTENBERG_ENDPOINT`, or falls back to the configuration file.
|
|
8
|
+
* @type {string}
|
|
9
|
+
*/
|
|
2
10
|
static endpoint: string;
|
|
3
11
|
}
|
package/dist/gotenberg.js
CHANGED
|
@@ -14,8 +14,16 @@ const dotenvConfig = dotenv.config({ path: path.resolve(envFile) });
|
|
|
14
14
|
if (dotenvConfig.error) {
|
|
15
15
|
dotenv.config({ path: path.resolve(envFileFallback) });
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Class representing configuration for interacting with Gotenberg service.
|
|
19
|
+
*/
|
|
17
20
|
class Gotenberg {
|
|
18
21
|
}
|
|
19
22
|
exports.Gotenberg = Gotenberg;
|
|
23
|
+
/**
|
|
24
|
+
* The Gotenberg service endpoint.
|
|
25
|
+
* Defaults to the value from the environment variable `GOTENBERG_ENDPOINT`, or falls back to the configuration file.
|
|
26
|
+
* @type {string}
|
|
27
|
+
*/
|
|
20
28
|
Gotenberg.endpoint = process.env.GOTENBERG_ENDPOINT || config_1.default.get("gotenberg.endpoint");
|
|
21
29
|
//# sourceMappingURL=gotenberg.js.map
|
package/dist/gotenberg.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gotenberg.js","sourceRoot":"","sources":["../src/gotenberg.ts"],"names":[],"mappings":";;;;AAAA,OAAO,CAAC,GAAG,CAAC,0BAA0B,GAAG,GAAG,CAAC;AAE7C,uDAAiC;AACjC,mDAA6B;AAC7B,4DAA4B;AAE5B,wEAAwE;AACxE,MAAM,OAAO,GAAG,QAAQ,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;AAC/C,MAAM,eAAe,GAAG,MAAM,CAAC;AAE/B,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,EAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAC,CAAC,CAAC;AAElE,oDAAoD;AACpD,IAAI,YAAY,CAAC,KAAK,EAAE,CAAC;IACrB,MAAM,CAAC,MAAM,CAAC,EAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAC,CAAC,CAAC;AACzD,CAAC;AAED,MAAa,SAAS;;AAAtB,
|
|
1
|
+
{"version":3,"file":"gotenberg.js","sourceRoot":"","sources":["../src/gotenberg.ts"],"names":[],"mappings":";;;;AAAA,OAAO,CAAC,GAAG,CAAC,0BAA0B,GAAG,GAAG,CAAC;AAE7C,uDAAiC;AACjC,mDAA6B;AAC7B,4DAA4B;AAE5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|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
5
|
+
"bib",
|
|
6
|
+
"doc",
|
|
7
|
+
"xml",
|
|
8
|
+
"docx",
|
|
9
|
+
"fodt",
|
|
10
|
+
"html",
|
|
11
|
+
"ltx",
|
|
12
|
+
"txt",
|
|
13
|
+
"odt",
|
|
14
|
+
"ott",
|
|
15
|
+
"pdb",
|
|
16
|
+
"pdf",
|
|
17
|
+
"psw",
|
|
18
|
+
"rtf",
|
|
19
|
+
"sdw",
|
|
20
|
+
"stw",
|
|
21
|
+
"sxw",
|
|
22
|
+
"uot",
|
|
23
|
+
"vor",
|
|
24
|
+
"wps",
|
|
25
|
+
"epub",
|
|
26
|
+
"png",
|
|
27
|
+
"bmp",
|
|
28
|
+
"emf",
|
|
29
|
+
"eps",
|
|
30
|
+
"fodg",
|
|
31
|
+
"gif",
|
|
32
|
+
"jpg",
|
|
33
|
+
"met",
|
|
34
|
+
"odd",
|
|
35
|
+
"otg",
|
|
36
|
+
"pbm",
|
|
37
|
+
"pct",
|
|
38
|
+
"pgm",
|
|
39
|
+
"ppm",
|
|
40
|
+
"ras",
|
|
41
|
+
"std",
|
|
42
|
+
"svg",
|
|
43
|
+
"svm",
|
|
44
|
+
"swf",
|
|
45
|
+
"sxd",
|
|
46
|
+
"sxw",
|
|
47
|
+
"tiff",
|
|
48
|
+
"xhtml",
|
|
49
|
+
"xpm",
|
|
50
|
+
"fodp",
|
|
51
|
+
"potm",
|
|
52
|
+
"pot",
|
|
53
|
+
"pptx",
|
|
54
|
+
"pps",
|
|
55
|
+
"ppt",
|
|
56
|
+
"pwp",
|
|
57
|
+
"sda",
|
|
58
|
+
"sdd",
|
|
59
|
+
"sti",
|
|
60
|
+
"sxi",
|
|
61
|
+
"uop",
|
|
62
|
+
"wmf",
|
|
63
|
+
"csv",
|
|
64
|
+
"dbf",
|
|
65
|
+
"dif",
|
|
66
|
+
"fods",
|
|
67
|
+
"ods",
|
|
68
|
+
"ots",
|
|
69
|
+
"pxl",
|
|
70
|
+
"sdc",
|
|
71
|
+
"slk",
|
|
72
|
+
"stc",
|
|
73
|
+
"sxc",
|
|
74
|
+
"uos",
|
|
75
|
+
"xls",
|
|
76
|
+
"xlt",
|
|
77
|
+
"xlsx",
|
|
78
|
+
"tif",
|
|
79
|
+
"jpeg",
|
|
80
|
+
"odp",
|
|
81
81
|
];
|
|
82
82
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/libre-office/utils/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,uBAAuB,GAAG;IACnC,MAAM;IACN,MAAM;IACN,MAAM;IACN,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/libre-office/utils/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,uBAAuB,GAAG;IACnC,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;IACN,MAAM;IACN,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,KAAK;IACL,MAAM;IACN,KAAK;CACR,CAAC"}
|
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
import FormData from "form-data";
|
|
2
2
|
import { PathLikeOrReadStream } from "../../common";
|
|
3
3
|
import { PageProperties } from "../interfaces/libre-office.types";
|
|
4
|
+
/**
|
|
5
|
+
* Utility class for handling common tasks related to LibreOffice conversions.
|
|
6
|
+
*/
|
|
4
7
|
export declare class LibreOfficeUtils {
|
|
8
|
+
/**
|
|
9
|
+
* Adds files to the FormData object for LibreOffice conversion.
|
|
10
|
+
*
|
|
11
|
+
* @param {PathLikeOrReadStream[]} files - An array of files to be added to the FormData.
|
|
12
|
+
* @param {FormData} data - The FormData object to which files will be added.
|
|
13
|
+
* @throws {Error} Throws an error if the file extension is not supported.
|
|
14
|
+
*/
|
|
5
15
|
static addFiles(files: PathLikeOrReadStream[], data: FormData): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Adds page properties to the FormData object based on the provided PageProperties.
|
|
18
|
+
*
|
|
19
|
+
* @param {FormData} data - The FormData object to which page properties will be added.
|
|
20
|
+
* @param {PageProperties} pageProperties - The page properties to be added to the FormData.
|
|
21
|
+
*/
|
|
6
22
|
static addPageProperties(data: FormData, pageProperties: PageProperties): void;
|
|
7
23
|
}
|
|
@@ -4,33 +4,56 @@ exports.LibreOfficeUtils = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fs_1 = require("fs");
|
|
6
6
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
7
|
+
const file_type_1 = require("file-type");
|
|
7
8
|
const common_1 = require("../../common");
|
|
8
9
|
const constants_1 = require("./constants");
|
|
10
|
+
/**
|
|
11
|
+
* Utility class for handling common tasks related to LibreOffice conversions.
|
|
12
|
+
*/
|
|
9
13
|
class LibreOfficeUtils {
|
|
14
|
+
/**
|
|
15
|
+
* Adds files to the FormData object for LibreOffice conversion.
|
|
16
|
+
*
|
|
17
|
+
* @param {PathLikeOrReadStream[]} files - An array of files to be added to the FormData.
|
|
18
|
+
* @param {FormData} data - The FormData object to which files will be added.
|
|
19
|
+
* @throws {Error} Throws an error if the file extension is not supported.
|
|
20
|
+
*/
|
|
10
21
|
static addFiles(files, data) {
|
|
11
22
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
12
|
-
for (const [key,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
23
|
+
for (const [key, value] of files.entries()) {
|
|
24
|
+
let file = value;
|
|
25
|
+
let fileInfo;
|
|
26
|
+
if (Buffer.isBuffer(value)) {
|
|
27
|
+
fileInfo = yield (0, file_type_1.fromBuffer)(value);
|
|
16
28
|
}
|
|
17
|
-
else if (
|
|
18
|
-
|
|
29
|
+
else if (value instanceof fs_1.ReadStream) {
|
|
30
|
+
fileInfo = yield (0, file_type_1.fromStream)(value);
|
|
19
31
|
}
|
|
20
32
|
else {
|
|
21
|
-
yield fs_1.promises.access(
|
|
22
|
-
const filename = path_1.default.basename(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
33
|
+
yield fs_1.promises.access(value, fs_1.constants.R_OK);
|
|
34
|
+
const filename = path_1.default.basename(value.toString());
|
|
35
|
+
fileInfo = { ext: path_1.default.extname(filename).slice(1) };
|
|
36
|
+
file = (0, fs_1.createReadStream)(value);
|
|
37
|
+
}
|
|
38
|
+
if (!fileInfo) {
|
|
39
|
+
throw new Error("File type could not be determined");
|
|
40
|
+
}
|
|
41
|
+
const extension = fileInfo.ext;
|
|
42
|
+
if (constants_1.LIBRE_OFFICE_EXTENSIONS.includes(extension)) {
|
|
43
|
+
data.append("files", file, `${key}.${extension}`);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
throw new Error(`${extension} is not supported`);
|
|
30
47
|
}
|
|
31
48
|
}
|
|
32
49
|
});
|
|
33
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Adds page properties to the FormData object based on the provided PageProperties.
|
|
53
|
+
*
|
|
54
|
+
* @param {FormData} data - The FormData object to which page properties will be added.
|
|
55
|
+
* @param {PageProperties} pageProperties - The page properties to be added to the FormData.
|
|
56
|
+
*/
|
|
34
57
|
static addPageProperties(data, pageProperties) {
|
|
35
58
|
if (pageProperties.landscape) {
|
|
36
59
|
data.append("landscape", String(pageProperties.landscape));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libre-office.utils.js","sourceRoot":"","sources":["../../../src/libre-office/utils/libre-office.utils.ts"],"names":[],"mappings":";;;;AAAA,2BAAqE;AACrE,wDAAwB;
|
|
1
|
+
{"version":3,"file":"libre-office.utils.js","sourceRoot":"","sources":["../../../src/libre-office/utils/libre-office.utils.ts"],"names":[],"mappings":";;;;AAAA,2BAAqE;AACrE,wDAAwB;AAExB,yCAAiD;AAIjD,yCAAkE;AAClE,2CAAoD;AAGpD;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MAAM,IAAI,KAAK,CAAC,GAAG,SAAS,mBAAmB,CAAC,CAAC;gBACrD,CAAC;YACL,CAAC;QACL,CAAC;KAAA;IAED;;;;;OAKG;IACI,MAAM,CAAC,iBAAiB,CAC3B,IAAc,EACd,cAA8B;QAE9B,IAAI,cAAc,CAAC,SAAS,EAAE,CAAC;YAC3B,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC;QAC/D,CAAC;QAED,IAAI,cAAc,CAAC,gBAAgB,EAAE,CAAC;YAClC,uBAAc,CAAC,MAAM,CACjB,cAAc,CAAC,gBAAgB,CAAC,IAAI,GAAG,CAAC;gBACxC,cAAc,CAAC,gBAAgB,CAAC,EAAE,GAAG,CAAC;gBACtC,cAAc,CAAC,gBAAgB,CAAC,EAAE;oBAClC,cAAc,CAAC,gBAAgB,CAAC,IAAI,EACpC,0BAA0B,CAC7B,CAAC;YAEF,IAAI,CAAC,MAAM,CACP,kBAAkB,EAClB,GAAG,cAAc,CAAC,gBAAgB,CAAC,IAAI,IAAI,cAAc,CAAC,gBAAgB,CAAC,EAAE,EAAE,CAClF,CAAC;QACN,CAAC;IACL,CAAC;CACJ;AAnED,4CAmEC"}
|
package/dist/main.config.d.ts
CHANGED
|
@@ -1,27 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enum representing the available Chromium routes for conversion.
|
|
3
|
+
* @enum {string}
|
|
4
|
+
*/
|
|
1
5
|
export declare enum ChromiumRoute {
|
|
2
6
|
URL = "url",
|
|
3
7
|
HTML = "html",
|
|
4
8
|
MARKDOWN = "markdown"
|
|
5
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Enum representing the available routes for the PDF engine.
|
|
12
|
+
* @enum {string}
|
|
13
|
+
*/
|
|
6
14
|
declare enum PdfEngineRoute {
|
|
7
15
|
MERGE = "merge"
|
|
8
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Enum representing the available routes for LibreOffice.
|
|
19
|
+
* @enum {string}
|
|
20
|
+
*/
|
|
9
21
|
declare enum LibreOfficeRoute {
|
|
10
22
|
CONVERT = "convert"
|
|
11
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Class providing constants and routes for interacting with the Gotenberg service and related engines.
|
|
26
|
+
*/
|
|
12
27
|
export declare class Chromiumly {
|
|
28
|
+
/**
|
|
29
|
+
* The Gotenberg service endpoint.
|
|
30
|
+
* @type {string}
|
|
31
|
+
*/
|
|
13
32
|
static readonly GOTENBERG_ENDPOINT: string;
|
|
33
|
+
/**
|
|
34
|
+
* The path for Chromium-related conversions.
|
|
35
|
+
* @type {string}
|
|
36
|
+
*/
|
|
14
37
|
static readonly CHROMIUM_PATH = "forms/chromium/convert";
|
|
38
|
+
/**
|
|
39
|
+
* The path for PDF engine-related operations.
|
|
40
|
+
* @type {string}
|
|
41
|
+
*/
|
|
15
42
|
static readonly PDF_ENGINES_PATH = "forms/pdfengines";
|
|
43
|
+
/**
|
|
44
|
+
* The path for LibreOffice-related conversions.
|
|
45
|
+
* @type {string}
|
|
46
|
+
*/
|
|
16
47
|
static readonly LIBRE_OFFICE_PATH = "forms/libreoffice";
|
|
48
|
+
/**
|
|
49
|
+
* Routes for Chromium conversions.
|
|
50
|
+
* @type {Object}
|
|
51
|
+
*/
|
|
17
52
|
static readonly CHROMIUM_ROUTES: {
|
|
18
53
|
url: ChromiumRoute;
|
|
19
54
|
html: ChromiumRoute;
|
|
20
55
|
markdown: ChromiumRoute;
|
|
21
56
|
};
|
|
57
|
+
/**
|
|
58
|
+
* Routes for PDF engine operations.
|
|
59
|
+
* @type {Object}
|
|
60
|
+
*/
|
|
22
61
|
static readonly PDF_ENGINE_ROUTES: {
|
|
23
62
|
merge: PdfEngineRoute;
|
|
24
63
|
};
|
|
64
|
+
/**
|
|
65
|
+
* Routes for LibreOffice conversions.
|
|
66
|
+
* @type {Object}
|
|
67
|
+
*/
|
|
25
68
|
static readonly LIBRE_OFFICE_ROUTES: {
|
|
26
69
|
convert: LibreOfficeRoute;
|
|
27
70
|
};
|
package/dist/main.config.js
CHANGED
|
@@ -2,35 +2,78 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Chromiumly = exports.ChromiumRoute = void 0;
|
|
4
4
|
const gotenberg_1 = require("./gotenberg");
|
|
5
|
+
/**
|
|
6
|
+
* Enum representing the available Chromium routes for conversion.
|
|
7
|
+
* @enum {string}
|
|
8
|
+
*/
|
|
5
9
|
var ChromiumRoute;
|
|
6
10
|
(function (ChromiumRoute) {
|
|
7
11
|
ChromiumRoute["URL"] = "url";
|
|
8
12
|
ChromiumRoute["HTML"] = "html";
|
|
9
13
|
ChromiumRoute["MARKDOWN"] = "markdown";
|
|
10
14
|
})(ChromiumRoute || (exports.ChromiumRoute = ChromiumRoute = {}));
|
|
15
|
+
/**
|
|
16
|
+
* Enum representing the available routes for the PDF engine.
|
|
17
|
+
* @enum {string}
|
|
18
|
+
*/
|
|
11
19
|
var PdfEngineRoute;
|
|
12
20
|
(function (PdfEngineRoute) {
|
|
13
21
|
PdfEngineRoute["MERGE"] = "merge";
|
|
14
22
|
})(PdfEngineRoute || (PdfEngineRoute = {}));
|
|
23
|
+
/**
|
|
24
|
+
* Enum representing the available routes for LibreOffice.
|
|
25
|
+
* @enum {string}
|
|
26
|
+
*/
|
|
15
27
|
var LibreOfficeRoute;
|
|
16
28
|
(function (LibreOfficeRoute) {
|
|
17
29
|
LibreOfficeRoute["CONVERT"] = "convert";
|
|
18
30
|
})(LibreOfficeRoute || (LibreOfficeRoute = {}));
|
|
31
|
+
/**
|
|
32
|
+
* Class providing constants and routes for interacting with the Gotenberg service and related engines.
|
|
33
|
+
*/
|
|
19
34
|
class Chromiumly {
|
|
20
35
|
}
|
|
21
36
|
exports.Chromiumly = Chromiumly;
|
|
37
|
+
/**
|
|
38
|
+
* The Gotenberg service endpoint.
|
|
39
|
+
* @type {string}
|
|
40
|
+
*/
|
|
22
41
|
Chromiumly.GOTENBERG_ENDPOINT = gotenberg_1.Gotenberg.endpoint;
|
|
42
|
+
/**
|
|
43
|
+
* The path for Chromium-related conversions.
|
|
44
|
+
* @type {string}
|
|
45
|
+
*/
|
|
23
46
|
Chromiumly.CHROMIUM_PATH = "forms/chromium/convert";
|
|
47
|
+
/**
|
|
48
|
+
* The path for PDF engine-related operations.
|
|
49
|
+
* @type {string}
|
|
50
|
+
*/
|
|
24
51
|
Chromiumly.PDF_ENGINES_PATH = "forms/pdfengines";
|
|
52
|
+
/**
|
|
53
|
+
* The path for LibreOffice-related conversions.
|
|
54
|
+
* @type {string}
|
|
55
|
+
*/
|
|
25
56
|
Chromiumly.LIBRE_OFFICE_PATH = "forms/libreoffice";
|
|
57
|
+
/**
|
|
58
|
+
* Routes for Chromium conversions.
|
|
59
|
+
* @type {Object}
|
|
60
|
+
*/
|
|
26
61
|
Chromiumly.CHROMIUM_ROUTES = {
|
|
27
62
|
url: ChromiumRoute.URL,
|
|
28
63
|
html: ChromiumRoute.HTML,
|
|
29
64
|
markdown: ChromiumRoute.MARKDOWN,
|
|
30
65
|
};
|
|
66
|
+
/**
|
|
67
|
+
* Routes for PDF engine operations.
|
|
68
|
+
* @type {Object}
|
|
69
|
+
*/
|
|
31
70
|
Chromiumly.PDF_ENGINE_ROUTES = {
|
|
32
71
|
merge: PdfEngineRoute.MERGE,
|
|
33
72
|
};
|
|
73
|
+
/**
|
|
74
|
+
* Routes for LibreOffice conversions.
|
|
75
|
+
* @type {Object}
|
|
76
|
+
*/
|
|
34
77
|
Chromiumly.LIBRE_OFFICE_ROUTES = {
|
|
35
78
|
convert: LibreOfficeRoute.CONVERT,
|
|
36
79
|
};
|
package/dist/main.config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.config.js","sourceRoot":"","sources":["../src/main.config.ts"],"names":[],"mappings":";;;AAAA,2CAAsC;AAEtC,IAAY,aAIX;AAJD,WAAY,aAAa;IACrB,4BAAW,CAAA;IACX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AG;IACvC,KAAK,EAAE,cAAc,CAAC,KAAK;CAC9B,CAAC;AAEF;;;GAGG;AACoB,8BAAmB,GAAG;IACzC,OAAO,EAAE,gBAAgB,CAAC,OAAO;CACpC,CAAC"}
|
|
@@ -1,18 +1,44 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
|
|
3
|
-
import { PathLike } from "fs";
|
|
4
|
-
import { PdfFormat } from "../common";
|
|
2
|
+
import { PathLikeOrReadStream, PdfFormat } from "../common";
|
|
5
3
|
import { PageProperties } from "../libre-office";
|
|
4
|
+
/**
|
|
5
|
+
* Class representing a PDF engine for various operations such as merging and conversion.
|
|
6
|
+
*/
|
|
6
7
|
export declare class PDFEngine {
|
|
8
|
+
/**
|
|
9
|
+
* Merges multiple PDF files into a single PDF document.
|
|
10
|
+
*
|
|
11
|
+
* @param {Object} options - Options for the merge operation.
|
|
12
|
+
* @param {PathLikeOrReadStream[]} options.files - An array of PathLikes or ReadStreams to the PDF files to be merged.
|
|
13
|
+
* @returns {Promise<Buffer>} A Promise resolving to the merged PDF content as a Buffer.
|
|
14
|
+
*/
|
|
7
15
|
static merge({ files }: {
|
|
8
|
-
files:
|
|
16
|
+
files: PathLikeOrReadStream[];
|
|
9
17
|
}): Promise<Buffer>;
|
|
18
|
+
/**
|
|
19
|
+
* Converts various document formats to PDF.
|
|
20
|
+
*
|
|
21
|
+
* @param {Object} options - Options for the conversion operation.
|
|
22
|
+
* @param {PathLikeOrReadStream[]} options.files - An array of PathLikes or ReadStreams to the files to be converted to PDF.
|
|
23
|
+
* @param {PageProperties} [options.properties] - Page properties for the conversion.
|
|
24
|
+
* @param {PdfFormat} [options.pdfFormat] - PDF format options.
|
|
25
|
+
* @param {boolean} [options.pdfUA] - Indicates whether to generate PDF/UA compliant output.
|
|
26
|
+
* @param {boolean} [options.merge] - Indicates whether to merge the resulting PDFs.
|
|
27
|
+
* @returns {Promise<Buffer>} A Promise resolving to the converted PDF content as a Buffer.
|
|
28
|
+
*/
|
|
10
29
|
static convert({ files, properties, pdfFormat, pdfUA, merge, }: {
|
|
11
|
-
files:
|
|
30
|
+
files: PathLikeOrReadStream[];
|
|
12
31
|
properties?: PageProperties;
|
|
13
32
|
pdfFormat?: PdfFormat;
|
|
14
33
|
pdfUA?: boolean;
|
|
15
34
|
merge?: boolean;
|
|
16
35
|
}): Promise<Buffer>;
|
|
36
|
+
/**
|
|
37
|
+
* Generates a PDF file from a buffer and saves it to the "__generated__" directory.
|
|
38
|
+
*
|
|
39
|
+
* @param {string} filename - The filename for the generated PDF.
|
|
40
|
+
* @param {Buffer} buffer - The PDF content as a Buffer.
|
|
41
|
+
* @returns {Promise<void>} A Promise that resolves once the file is generated and saved.
|
|
42
|
+
*/
|
|
17
43
|
static generate(filename: string, buffer: Buffer): Promise<void>;
|
|
18
44
|
}
|
|
@@ -9,7 +9,17 @@ const main_config_1 = require("../main.config");
|
|
|
9
9
|
const common_1 = require("../common");
|
|
10
10
|
const libre_office_1 = require("../libre-office");
|
|
11
11
|
const engine_utils_1 = require("./utils/engine.utils");
|
|
12
|
+
/**
|
|
13
|
+
* Class representing a PDF engine for various operations such as merging and conversion.
|
|
14
|
+
*/
|
|
12
15
|
class PDFEngine {
|
|
16
|
+
/**
|
|
17
|
+
* Merges multiple PDF files into a single PDF document.
|
|
18
|
+
*
|
|
19
|
+
* @param {Object} options - Options for the merge operation.
|
|
20
|
+
* @param {PathLikeOrReadStream[]} options.files - An array of PathLikes or ReadStreams to the PDF files to be merged.
|
|
21
|
+
* @returns {Promise<Buffer>} A Promise resolving to the merged PDF content as a Buffer.
|
|
22
|
+
*/
|
|
13
23
|
static merge({ files }) {
|
|
14
24
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
15
25
|
const data = new form_data_1.default();
|
|
@@ -18,6 +28,17 @@ class PDFEngine {
|
|
|
18
28
|
return common_1.GotenbergUtils.fetch(endpoint, data);
|
|
19
29
|
});
|
|
20
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Converts various document formats to PDF.
|
|
33
|
+
*
|
|
34
|
+
* @param {Object} options - Options for the conversion operation.
|
|
35
|
+
* @param {PathLikeOrReadStream[]} options.files - An array of PathLikes or ReadStreams to the files to be converted to PDF.
|
|
36
|
+
* @param {PageProperties} [options.properties] - Page properties for the conversion.
|
|
37
|
+
* @param {PdfFormat} [options.pdfFormat] - PDF format options.
|
|
38
|
+
* @param {boolean} [options.pdfUA] - Indicates whether to generate PDF/UA compliant output.
|
|
39
|
+
* @param {boolean} [options.merge] - Indicates whether to merge the resulting PDFs.
|
|
40
|
+
* @returns {Promise<Buffer>} A Promise resolving to the converted PDF content as a Buffer.
|
|
41
|
+
*/
|
|
21
42
|
static convert({ files, properties, pdfFormat, pdfUA, merge, }) {
|
|
22
43
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23
44
|
const data = new form_data_1.default();
|
|
@@ -38,6 +59,13 @@ class PDFEngine {
|
|
|
38
59
|
return common_1.GotenbergUtils.fetch(endpoint, data);
|
|
39
60
|
});
|
|
40
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Generates a PDF file from a buffer and saves it to the "__generated__" directory.
|
|
64
|
+
*
|
|
65
|
+
* @param {string} filename - The filename for the generated PDF.
|
|
66
|
+
* @param {Buffer} buffer - The PDF content as a Buffer.
|
|
67
|
+
* @returns {Promise<void>} A Promise that resolves once the file is generated and saved.
|
|
68
|
+
*/
|
|
41
69
|
static generate(filename, buffer) {
|
|
42
70
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
43
71
|
const __generated__ = path_1.default.resolve(process.cwd(), "__generated__");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pdf.engine.js","sourceRoot":"","sources":["../../src/pdf-engines/pdf.engine.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"pdf.engine.js","sourceRoot":"","sources":["../../src/pdf-engines/pdf.engine.ts"],"names":[],"mappings":";;;;AAAA,2BAA4B;AAC5B,wD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