@custom-js/n8n-nodes-pdf-toolkit 1.51.0 → 1.52.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/dist/nodes/CompressPDF/CompressPDF.node.js +18 -4
- package/dist/nodes/ExtractPages/ExtractPages.node.js +18 -4
- package/dist/nodes/GetFormFieldNames/GetFormFieldNames.node.js +17 -3
- package/dist/nodes/Html2Docx/Html2Docx.node.js +18 -4
- package/dist/nodes/Html2Pdf/Html2Pdf.node.js +18 -4
- package/dist/nodes/InvoiceGenerator/InvoiceGenerator.node.js +18 -4
- package/dist/nodes/Markdown2Html/Markdown2Html.node.js +17 -3
- package/dist/nodes/MergePdfs/MergePdfs.node.js +18 -4
- package/dist/nodes/PdfFormFill/PdfFormFill.node.js +18 -4
- package/dist/nodes/PdfToPng/PdfToPng.node.js +18 -4
- package/dist/nodes/PdfToText/PdfToText.node.js +17 -3
- package/dist/nodes/SSLChecker/SSLChecker.node.js +17 -3
- package/dist/nodes/Scraper/Scraper.node.js +18 -4
- package/dist/nodes/WebsiteScreenshot/WebsiteScreenshot.node.js +18 -4
- package/package.json +4 -4
|
@@ -14,8 +14,8 @@ class CompressPDF {
|
|
|
14
14
|
defaults: {
|
|
15
15
|
name: "Compress PDF file",
|
|
16
16
|
},
|
|
17
|
-
inputs: [
|
|
18
|
-
outputs: [
|
|
17
|
+
inputs: ["main" /* NodeConnectionType.Main */],
|
|
18
|
+
outputs: ["main" /* NodeConnectionType.Main */],
|
|
19
19
|
credentials: [
|
|
20
20
|
{
|
|
21
21
|
name: "customJsApi",
|
|
@@ -23,6 +23,20 @@ class CompressPDF {
|
|
|
23
23
|
},
|
|
24
24
|
],
|
|
25
25
|
properties: [
|
|
26
|
+
{
|
|
27
|
+
displayName: 'Operation',
|
|
28
|
+
name: 'operation',
|
|
29
|
+
type: 'options',
|
|
30
|
+
noDataExpression: true,
|
|
31
|
+
options: [
|
|
32
|
+
{
|
|
33
|
+
name: 'Compress PDF',
|
|
34
|
+
value: 'compressPdf',
|
|
35
|
+
action: 'Compress a PDF',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
default: 'compressPdf',
|
|
39
|
+
},
|
|
26
40
|
{
|
|
27
41
|
displayName: "Resource",
|
|
28
42
|
name: "resource",
|
|
@@ -94,10 +108,10 @@ class CompressPDF {
|
|
|
94
108
|
return PDF_COMPRESS(input);`,
|
|
95
109
|
returnBinary: "true",
|
|
96
110
|
},
|
|
97
|
-
encoding:
|
|
111
|
+
encoding: 'arraybuffer',
|
|
98
112
|
json: true,
|
|
99
113
|
};
|
|
100
|
-
const response = await this.helpers.
|
|
114
|
+
const response = await this.helpers.httpRequestWithAuthentication.call(this, 'customJsApi', options);
|
|
101
115
|
if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
|
|
102
116
|
// No binary data returned; emit only JSON without a binary property
|
|
103
117
|
returnData.push({
|
|
@@ -14,8 +14,8 @@ class ExtractPages {
|
|
|
14
14
|
defaults: {
|
|
15
15
|
name: "Extract Pages From PDF",
|
|
16
16
|
},
|
|
17
|
-
inputs: [
|
|
18
|
-
outputs: [
|
|
17
|
+
inputs: ["main" /* NodeConnectionType.Main */],
|
|
18
|
+
outputs: ["main" /* NodeConnectionType.Main */],
|
|
19
19
|
credentials: [
|
|
20
20
|
{
|
|
21
21
|
name: "customJsApi",
|
|
@@ -23,6 +23,20 @@ class ExtractPages {
|
|
|
23
23
|
},
|
|
24
24
|
],
|
|
25
25
|
properties: [
|
|
26
|
+
{
|
|
27
|
+
displayName: 'Operation',
|
|
28
|
+
name: 'operation',
|
|
29
|
+
type: 'options',
|
|
30
|
+
noDataExpression: true,
|
|
31
|
+
options: [
|
|
32
|
+
{
|
|
33
|
+
name: 'Extract Pages',
|
|
34
|
+
value: 'extractPages',
|
|
35
|
+
action: 'Extract Pages',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
default: 'extractPages',
|
|
39
|
+
},
|
|
26
40
|
{
|
|
27
41
|
displayName: "Resource",
|
|
28
42
|
name: "resource",
|
|
@@ -104,10 +118,10 @@ class ExtractPages {
|
|
|
104
118
|
return EXTRACT_PAGES_FROM_PDF(pdfBuffer, input.pageRange);`,
|
|
105
119
|
returnBinary: "true",
|
|
106
120
|
},
|
|
107
|
-
encoding:
|
|
121
|
+
encoding: 'arraybuffer',
|
|
108
122
|
json: true,
|
|
109
123
|
};
|
|
110
|
-
const response = await this.helpers.
|
|
124
|
+
const response = await this.helpers.httpRequestWithAuthentication.call(this, 'customJsApi', options);
|
|
111
125
|
if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
|
|
112
126
|
// No binary data returned; emit only JSON without a binary property
|
|
113
127
|
returnData.push({
|
|
@@ -14,8 +14,8 @@ class GetFormFieldNames {
|
|
|
14
14
|
defaults: {
|
|
15
15
|
name: "Get PDF Form Fields",
|
|
16
16
|
},
|
|
17
|
-
inputs: [
|
|
18
|
-
outputs: [
|
|
17
|
+
inputs: ["main" /* NodeConnectionType.Main */],
|
|
18
|
+
outputs: ["main" /* NodeConnectionType.Main */],
|
|
19
19
|
credentials: [
|
|
20
20
|
{
|
|
21
21
|
name: "customJsApi",
|
|
@@ -23,6 +23,20 @@ class GetFormFieldNames {
|
|
|
23
23
|
},
|
|
24
24
|
],
|
|
25
25
|
properties: [
|
|
26
|
+
{
|
|
27
|
+
displayName: 'Operation',
|
|
28
|
+
name: 'operation',
|
|
29
|
+
type: 'options',
|
|
30
|
+
noDataExpression: true,
|
|
31
|
+
options: [
|
|
32
|
+
{
|
|
33
|
+
name: 'Get PDF Form Fields',
|
|
34
|
+
value: 'getFormFieldNames',
|
|
35
|
+
action: 'Get PDF Form Fields',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
default: 'getFormFieldNames',
|
|
39
|
+
},
|
|
26
40
|
{
|
|
27
41
|
displayName: "Resource",
|
|
28
42
|
name: "resource",
|
|
@@ -82,7 +96,7 @@ class GetFormFieldNames {
|
|
|
82
96
|
},
|
|
83
97
|
json: true,
|
|
84
98
|
};
|
|
85
|
-
const response = await this.helpers.
|
|
99
|
+
const response = await this.helpers.httpRequestWithAuthentication.call(this, 'customJsApi', options);
|
|
86
100
|
returnData.push({
|
|
87
101
|
json: {
|
|
88
102
|
output: JSON.parse(response.toString()),
|
|
@@ -14,8 +14,8 @@ class Html2Docx {
|
|
|
14
14
|
defaults: {
|
|
15
15
|
name: "HTML to Docx",
|
|
16
16
|
},
|
|
17
|
-
inputs: ["main"],
|
|
18
|
-
outputs: ["main"],
|
|
17
|
+
inputs: ["main" /* NodeConnectionType.Main */],
|
|
18
|
+
outputs: ["main" /* NodeConnectionType.Main */],
|
|
19
19
|
credentials: [
|
|
20
20
|
{
|
|
21
21
|
name: "customJsApi",
|
|
@@ -23,6 +23,20 @@ class Html2Docx {
|
|
|
23
23
|
},
|
|
24
24
|
],
|
|
25
25
|
properties: [
|
|
26
|
+
{
|
|
27
|
+
displayName: 'Operation',
|
|
28
|
+
name: 'operation',
|
|
29
|
+
type: 'options',
|
|
30
|
+
noDataExpression: true,
|
|
31
|
+
options: [
|
|
32
|
+
{
|
|
33
|
+
name: 'Convert HTML to DOCX',
|
|
34
|
+
value: 'html2Docx',
|
|
35
|
+
action: 'Convert HTML to DOCX',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
default: 'html2Docx',
|
|
39
|
+
},
|
|
26
40
|
{
|
|
27
41
|
displayName: "HTML Input",
|
|
28
42
|
name: "htmlInput",
|
|
@@ -63,10 +77,10 @@ class Html2Docx {
|
|
|
63
77
|
code: "const { HTML2DOCX } = require('./utils'); return HTML2DOCX(input)",
|
|
64
78
|
returnBinary: "true",
|
|
65
79
|
},
|
|
66
|
-
encoding:
|
|
80
|
+
encoding: 'arraybuffer',
|
|
67
81
|
json: true,
|
|
68
82
|
};
|
|
69
|
-
const response = await this.helpers.
|
|
83
|
+
const response = await this.helpers.httpRequestWithAuthentication.call(this, 'customJsApi', options);
|
|
70
84
|
if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
|
|
71
85
|
// No binary data returned; emit only JSON without a binary property
|
|
72
86
|
returnData.push({
|
|
@@ -14,8 +14,8 @@ class Html2Pdf {
|
|
|
14
14
|
defaults: {
|
|
15
15
|
name: "HTML to PDF",
|
|
16
16
|
},
|
|
17
|
-
inputs: ["main"],
|
|
18
|
-
outputs: ["main"],
|
|
17
|
+
inputs: ["main" /* NodeConnectionType.Main */],
|
|
18
|
+
outputs: ["main" /* NodeConnectionType.Main */],
|
|
19
19
|
credentials: [
|
|
20
20
|
{
|
|
21
21
|
name: "customJsApi",
|
|
@@ -23,6 +23,20 @@ class Html2Pdf {
|
|
|
23
23
|
},
|
|
24
24
|
],
|
|
25
25
|
properties: [
|
|
26
|
+
{
|
|
27
|
+
displayName: 'Operation',
|
|
28
|
+
name: 'operation',
|
|
29
|
+
type: 'options',
|
|
30
|
+
noDataExpression: true,
|
|
31
|
+
options: [
|
|
32
|
+
{
|
|
33
|
+
name: 'Convert HTML to PDF',
|
|
34
|
+
value: 'html2Pdf',
|
|
35
|
+
action: 'Convert HTML to PDF',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
default: 'html2Pdf',
|
|
39
|
+
},
|
|
26
40
|
{
|
|
27
41
|
displayName: "HTML Input",
|
|
28
42
|
name: "htmlInput",
|
|
@@ -63,10 +77,10 @@ class Html2Pdf {
|
|
|
63
77
|
code: "const { HTML2PDF } = require('./utils'); return HTML2PDF(input)",
|
|
64
78
|
returnBinary: "true",
|
|
65
79
|
},
|
|
66
|
-
encoding:
|
|
80
|
+
encoding: 'arraybuffer',
|
|
67
81
|
json: true,
|
|
68
82
|
};
|
|
69
|
-
const response = await this.helpers.
|
|
83
|
+
const response = await this.helpers.httpRequestWithAuthentication.call(this, 'customJsApi', options);
|
|
70
84
|
if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
|
|
71
85
|
// No binary data returned; emit only JSON without a binary property
|
|
72
86
|
returnData.push({
|
|
@@ -14,8 +14,8 @@ class InvoiceGenerator {
|
|
|
14
14
|
defaults: {
|
|
15
15
|
name: 'Invoice Generator',
|
|
16
16
|
},
|
|
17
|
-
inputs: [
|
|
18
|
-
outputs: [
|
|
17
|
+
inputs: ["main" /* NodeConnectionType.Main */],
|
|
18
|
+
outputs: ["main" /* NodeConnectionType.Main */],
|
|
19
19
|
credentials: [
|
|
20
20
|
{
|
|
21
21
|
name: 'customJsApi',
|
|
@@ -23,6 +23,20 @@ class InvoiceGenerator {
|
|
|
23
23
|
},
|
|
24
24
|
],
|
|
25
25
|
properties: [
|
|
26
|
+
{
|
|
27
|
+
displayName: 'Operation',
|
|
28
|
+
name: 'operation',
|
|
29
|
+
type: 'options',
|
|
30
|
+
noDataExpression: true,
|
|
31
|
+
options: [
|
|
32
|
+
{
|
|
33
|
+
name: 'Generate Invoice',
|
|
34
|
+
value: 'invoiceGenerator',
|
|
35
|
+
action: 'Generate Invoice',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
default: 'invoiceGenerator',
|
|
39
|
+
},
|
|
26
40
|
{
|
|
27
41
|
displayName: 'PDF Template',
|
|
28
42
|
name: 'pdfTemplate',
|
|
@@ -269,10 +283,10 @@ class InvoiceGenerator {
|
|
|
269
283
|
code: code,
|
|
270
284
|
returnBinary: 'true',
|
|
271
285
|
},
|
|
272
|
-
encoding:
|
|
286
|
+
encoding: 'arraybuffer',
|
|
273
287
|
json: true,
|
|
274
288
|
};
|
|
275
|
-
const response = await this.helpers.
|
|
289
|
+
const response = await this.helpers.httpRequestWithAuthentication.call(this, 'customJsApi', options);
|
|
276
290
|
if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
|
|
277
291
|
returnData.push({
|
|
278
292
|
json: items[i].json,
|
|
@@ -14,8 +14,8 @@ class Markdown2Html {
|
|
|
14
14
|
defaults: {
|
|
15
15
|
name: "Markdown to HTML",
|
|
16
16
|
},
|
|
17
|
-
inputs: ["main"],
|
|
18
|
-
outputs: ["main"],
|
|
17
|
+
inputs: ["main" /* NodeConnectionType.Main */],
|
|
18
|
+
outputs: ["main" /* NodeConnectionType.Main */],
|
|
19
19
|
credentials: [
|
|
20
20
|
{
|
|
21
21
|
name: "customJsApi",
|
|
@@ -23,6 +23,20 @@ class Markdown2Html {
|
|
|
23
23
|
},
|
|
24
24
|
],
|
|
25
25
|
properties: [
|
|
26
|
+
{
|
|
27
|
+
displayName: 'Operation',
|
|
28
|
+
name: 'operation',
|
|
29
|
+
type: 'options',
|
|
30
|
+
noDataExpression: true,
|
|
31
|
+
options: [
|
|
32
|
+
{
|
|
33
|
+
name: 'Convert Markdown to HTML',
|
|
34
|
+
value: 'markdown2Html',
|
|
35
|
+
action: 'Convert Markdown to HTML',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
default: 'markdown2Html',
|
|
39
|
+
},
|
|
26
40
|
{
|
|
27
41
|
displayName: "Markdown Input",
|
|
28
42
|
name: "markdownInput",
|
|
@@ -57,7 +71,7 @@ class Markdown2Html {
|
|
|
57
71
|
},
|
|
58
72
|
json: true,
|
|
59
73
|
};
|
|
60
|
-
const response = await this.helpers.
|
|
74
|
+
const response = await this.helpers.httpRequestWithAuthentication.call(this, 'customJsApi', options);
|
|
61
75
|
returnData.push({
|
|
62
76
|
json: {
|
|
63
77
|
output: response.toString(),
|
|
@@ -14,8 +14,8 @@ class MergePdfs {
|
|
|
14
14
|
defaults: {
|
|
15
15
|
name: "Merge PDF",
|
|
16
16
|
},
|
|
17
|
-
inputs: ["main"],
|
|
18
|
-
outputs: ["main"],
|
|
17
|
+
inputs: ["main" /* NodeConnectionType.Main */],
|
|
18
|
+
outputs: ["main" /* NodeConnectionType.Main */],
|
|
19
19
|
credentials: [
|
|
20
20
|
{
|
|
21
21
|
name: "customJsApi",
|
|
@@ -23,6 +23,20 @@ class MergePdfs {
|
|
|
23
23
|
},
|
|
24
24
|
],
|
|
25
25
|
properties: [
|
|
26
|
+
{
|
|
27
|
+
displayName: 'Operation',
|
|
28
|
+
name: 'operation',
|
|
29
|
+
type: 'options',
|
|
30
|
+
noDataExpression: true,
|
|
31
|
+
options: [
|
|
32
|
+
{
|
|
33
|
+
name: 'Merge PDFs',
|
|
34
|
+
value: 'mergePdfs',
|
|
35
|
+
action: 'Merge PDFs',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
default: 'mergePdfs',
|
|
39
|
+
},
|
|
26
40
|
{
|
|
27
41
|
displayName: "Resource",
|
|
28
42
|
name: "resource",
|
|
@@ -86,10 +100,10 @@ class MergePdfs {
|
|
|
86
100
|
return PDF_MERGE(input);`,
|
|
87
101
|
returnBinary: "true",
|
|
88
102
|
},
|
|
89
|
-
encoding:
|
|
103
|
+
encoding: 'arraybuffer',
|
|
90
104
|
json: true,
|
|
91
105
|
};
|
|
92
|
-
const response = await this.helpers.
|
|
106
|
+
const response = await this.helpers.httpRequestWithAuthentication.call(this, 'customJsApi', options);
|
|
93
107
|
if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
|
|
94
108
|
// No binary data returned; emit only JSON without a binary property
|
|
95
109
|
returnData.push({
|
|
@@ -14,8 +14,8 @@ class PdfFormFill {
|
|
|
14
14
|
defaults: {
|
|
15
15
|
name: "PDF Form Fill (Fill PDF Fields)",
|
|
16
16
|
},
|
|
17
|
-
inputs: ["main"],
|
|
18
|
-
outputs: ["main"],
|
|
17
|
+
inputs: ["main" /* NodeConnectionType.Main */],
|
|
18
|
+
outputs: ["main" /* NodeConnectionType.Main */],
|
|
19
19
|
credentials: [
|
|
20
20
|
{
|
|
21
21
|
name: "customJsApi",
|
|
@@ -23,6 +23,20 @@ class PdfFormFill {
|
|
|
23
23
|
},
|
|
24
24
|
],
|
|
25
25
|
properties: [
|
|
26
|
+
{
|
|
27
|
+
displayName: 'Operation',
|
|
28
|
+
name: 'operation',
|
|
29
|
+
type: 'options',
|
|
30
|
+
noDataExpression: true,
|
|
31
|
+
options: [
|
|
32
|
+
{
|
|
33
|
+
name: 'Fill PDF Form',
|
|
34
|
+
value: 'pdfFormFill',
|
|
35
|
+
action: 'Fill PDF Form',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
default: 'pdfFormFill',
|
|
39
|
+
},
|
|
26
40
|
{
|
|
27
41
|
displayName: "Resource",
|
|
28
42
|
name: "resource",
|
|
@@ -126,10 +140,10 @@ class PdfFormFill {
|
|
|
126
140
|
return PDF_FILL_FORM(pdfInput, fieldValues);`,
|
|
127
141
|
returnBinary: "true",
|
|
128
142
|
},
|
|
129
|
-
encoding:
|
|
143
|
+
encoding: 'arraybuffer',
|
|
130
144
|
json: true,
|
|
131
145
|
};
|
|
132
|
-
const response = await this.helpers.
|
|
146
|
+
const response = await this.helpers.httpRequestWithAuthentication.call(this, 'customJsApi', options);
|
|
133
147
|
if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
|
|
134
148
|
// No binary data returned; emit only JSON without a binary property
|
|
135
149
|
returnData.push({
|
|
@@ -14,8 +14,8 @@ class PdfToPng {
|
|
|
14
14
|
defaults: {
|
|
15
15
|
name: "Convert PDF into PNG",
|
|
16
16
|
},
|
|
17
|
-
inputs: ["main"],
|
|
18
|
-
outputs: ["main"],
|
|
17
|
+
inputs: ["main" /* NodeConnectionType.Main */],
|
|
18
|
+
outputs: ["main" /* NodeConnectionType.Main */],
|
|
19
19
|
credentials: [
|
|
20
20
|
{
|
|
21
21
|
name: "customJsApi",
|
|
@@ -23,6 +23,20 @@ class PdfToPng {
|
|
|
23
23
|
},
|
|
24
24
|
],
|
|
25
25
|
properties: [
|
|
26
|
+
{
|
|
27
|
+
displayName: 'Operation',
|
|
28
|
+
name: 'operation',
|
|
29
|
+
type: 'options',
|
|
30
|
+
noDataExpression: true,
|
|
31
|
+
options: [
|
|
32
|
+
{
|
|
33
|
+
name: 'Convert PDF to PNG',
|
|
34
|
+
value: 'pdfToPng',
|
|
35
|
+
action: 'Convert PDF to PNG',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
default: 'pdfToPng',
|
|
39
|
+
},
|
|
26
40
|
{
|
|
27
41
|
displayName: "Resource",
|
|
28
42
|
name: "resource",
|
|
@@ -94,10 +108,10 @@ class PdfToPng {
|
|
|
94
108
|
return PDF2PNG(input);`,
|
|
95
109
|
returnBinary: "true",
|
|
96
110
|
},
|
|
97
|
-
encoding:
|
|
111
|
+
encoding: 'arraybuffer',
|
|
98
112
|
json: true,
|
|
99
113
|
};
|
|
100
|
-
const response = await this.helpers.
|
|
114
|
+
const response = await this.helpers.httpRequestWithAuthentication.call(this, 'customJsApi', options);
|
|
101
115
|
if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
|
|
102
116
|
// No binary data returned; emit only JSON without a binary property
|
|
103
117
|
returnData.push({
|
|
@@ -14,8 +14,8 @@ class PdfToText {
|
|
|
14
14
|
defaults: {
|
|
15
15
|
name: "Convert PDF into Text",
|
|
16
16
|
},
|
|
17
|
-
inputs: ["main"],
|
|
18
|
-
outputs: ["main"],
|
|
17
|
+
inputs: ["main" /* NodeConnectionType.Main */],
|
|
18
|
+
outputs: ["main" /* NodeConnectionType.Main */],
|
|
19
19
|
credentials: [
|
|
20
20
|
{
|
|
21
21
|
name: "customJsApi",
|
|
@@ -23,6 +23,20 @@ class PdfToText {
|
|
|
23
23
|
},
|
|
24
24
|
],
|
|
25
25
|
properties: [
|
|
26
|
+
{
|
|
27
|
+
displayName: 'Operation',
|
|
28
|
+
name: 'operation',
|
|
29
|
+
type: 'options',
|
|
30
|
+
noDataExpression: true,
|
|
31
|
+
options: [
|
|
32
|
+
{
|
|
33
|
+
name: 'Convert PDF to Text',
|
|
34
|
+
value: 'pdfToText',
|
|
35
|
+
action: 'Convert PDF to Text',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
default: 'pdfToText',
|
|
39
|
+
},
|
|
26
40
|
{
|
|
27
41
|
displayName: "Resource",
|
|
28
42
|
name: "resource",
|
|
@@ -88,7 +102,7 @@ class PdfToText {
|
|
|
88
102
|
},
|
|
89
103
|
json: true,
|
|
90
104
|
};
|
|
91
|
-
const response = await this.helpers.
|
|
105
|
+
const response = await this.helpers.httpRequestWithAuthentication.call(this, 'customJsApi', options);
|
|
92
106
|
returnData.push({
|
|
93
107
|
json: {
|
|
94
108
|
output: response.toString(),
|
|
@@ -14,8 +14,8 @@ class SSLChecker {
|
|
|
14
14
|
defaults: {
|
|
15
15
|
name: "SSL Checker",
|
|
16
16
|
},
|
|
17
|
-
inputs: ["main"],
|
|
18
|
-
outputs: ["main"],
|
|
17
|
+
inputs: ["main" /* NodeConnectionType.Main */],
|
|
18
|
+
outputs: ["main" /* NodeConnectionType.Main */],
|
|
19
19
|
credentials: [
|
|
20
20
|
{
|
|
21
21
|
name: "customJsApi",
|
|
@@ -23,6 +23,20 @@ class SSLChecker {
|
|
|
23
23
|
},
|
|
24
24
|
],
|
|
25
25
|
properties: [
|
|
26
|
+
{
|
|
27
|
+
displayName: 'Operation',
|
|
28
|
+
name: 'operation',
|
|
29
|
+
type: 'options',
|
|
30
|
+
noDataExpression: true,
|
|
31
|
+
options: [
|
|
32
|
+
{
|
|
33
|
+
name: 'Check SSL',
|
|
34
|
+
value: 'sslChecker',
|
|
35
|
+
action: 'Check SSL',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
default: 'sslChecker',
|
|
39
|
+
},
|
|
26
40
|
{
|
|
27
41
|
displayName: "Domain",
|
|
28
42
|
name: "domain",
|
|
@@ -61,7 +75,7 @@ class SSLChecker {
|
|
|
61
75
|
},
|
|
62
76
|
json: true,
|
|
63
77
|
};
|
|
64
|
-
const response = await this.helpers.
|
|
78
|
+
const response = await this.helpers.httpRequestWithAuthentication.call(this, 'customJsApi', options);
|
|
65
79
|
returnData.push({
|
|
66
80
|
json: {
|
|
67
81
|
output: response,
|
|
@@ -14,8 +14,8 @@ class Scraper {
|
|
|
14
14
|
defaults: {
|
|
15
15
|
name: "Scraper",
|
|
16
16
|
},
|
|
17
|
-
inputs: ["main"],
|
|
18
|
-
outputs: ["main"],
|
|
17
|
+
inputs: ["main" /* NodeConnectionType.Main */],
|
|
18
|
+
outputs: ["main" /* NodeConnectionType.Main */],
|
|
19
19
|
credentials: [
|
|
20
20
|
{
|
|
21
21
|
name: "customJsApi",
|
|
@@ -23,6 +23,20 @@ class Scraper {
|
|
|
23
23
|
},
|
|
24
24
|
],
|
|
25
25
|
properties: [
|
|
26
|
+
{
|
|
27
|
+
displayName: 'Operation',
|
|
28
|
+
name: 'operation',
|
|
29
|
+
type: 'options',
|
|
30
|
+
noDataExpression: true,
|
|
31
|
+
options: [
|
|
32
|
+
{
|
|
33
|
+
name: 'Scrape Website',
|
|
34
|
+
value: 'scraper',
|
|
35
|
+
action: 'Scrape Website',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
default: 'scraper',
|
|
39
|
+
},
|
|
26
40
|
{
|
|
27
41
|
displayName: "Website URL",
|
|
28
42
|
name: "url",
|
|
@@ -159,10 +173,10 @@ class Scraper {
|
|
|
159
173
|
`return SCRAPER(payload.url, payload.commands || [], "${returnValueType === "binary" ? "image" : "html"}", ${debug ? "true" : "false"});`,
|
|
160
174
|
returnBinary: returnValueType === "binary" ? "true" : "false",
|
|
161
175
|
},
|
|
162
|
-
encoding: returnValueType === "binary" ?
|
|
176
|
+
encoding: returnValueType === "binary" ? 'arraybuffer' : undefined,
|
|
163
177
|
json: true,
|
|
164
178
|
};
|
|
165
|
-
const response = await this.helpers.
|
|
179
|
+
const response = await this.helpers.httpRequestWithAuthentication.call(this, 'customJsApi', options);
|
|
166
180
|
if (returnValueType === "binary") {
|
|
167
181
|
if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
|
|
168
182
|
// No binary data returned; emit only JSON without a binary property
|
|
@@ -14,8 +14,8 @@ class WebsiteScreenshot {
|
|
|
14
14
|
defaults: {
|
|
15
15
|
name: "Take a screenshot of a website",
|
|
16
16
|
},
|
|
17
|
-
inputs: ["main"],
|
|
18
|
-
outputs: ["main"],
|
|
17
|
+
inputs: ["main" /* NodeConnectionType.Main */],
|
|
18
|
+
outputs: ["main" /* NodeConnectionType.Main */],
|
|
19
19
|
credentials: [
|
|
20
20
|
{
|
|
21
21
|
name: "customJsApi",
|
|
@@ -23,6 +23,20 @@ class WebsiteScreenshot {
|
|
|
23
23
|
},
|
|
24
24
|
],
|
|
25
25
|
properties: [
|
|
26
|
+
{
|
|
27
|
+
displayName: 'Operation',
|
|
28
|
+
name: 'operation',
|
|
29
|
+
type: 'options',
|
|
30
|
+
noDataExpression: true,
|
|
31
|
+
options: [
|
|
32
|
+
{
|
|
33
|
+
name: 'Take Website Screenshot',
|
|
34
|
+
value: 'websiteScreenshot',
|
|
35
|
+
action: 'Take Website Screenshot',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
default: 'websiteScreenshot',
|
|
39
|
+
},
|
|
26
40
|
{
|
|
27
41
|
displayName: "Website Url",
|
|
28
42
|
name: "urlInput",
|
|
@@ -60,10 +74,10 @@ class WebsiteScreenshot {
|
|
|
60
74
|
code: "const { SCREENSHOT } = require('./utils'); return SCREENSHOT(input);",
|
|
61
75
|
returnBinary: "true",
|
|
62
76
|
},
|
|
63
|
-
encoding:
|
|
77
|
+
encoding: 'arraybuffer',
|
|
64
78
|
json: true,
|
|
65
79
|
};
|
|
66
|
-
const response = await this.helpers.
|
|
80
|
+
const response = await this.helpers.httpRequestWithAuthentication.call(this, 'customJsApi', options);
|
|
67
81
|
if (!response || (Buffer.isBuffer(response) && response.length === 0)) {
|
|
68
82
|
// No binary data returned; emit only JSON without a binary property
|
|
69
83
|
returnData.push({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@custom-js/n8n-nodes-pdf-toolkit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.52.0",
|
|
4
4
|
"description": "This is official node for interacting with APIs from customjs.space",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"customjs",
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
]
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"
|
|
48
|
+
"@types/node": "^16.11.7",
|
|
49
49
|
"gulp": "^4.0.2",
|
|
50
|
-
"
|
|
50
|
+
"typescript": "~4.8.4"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"n8n-workflow": "
|
|
53
|
+
"n8n-workflow": "^1.64.0"
|
|
54
54
|
},
|
|
55
55
|
"type": "commonjs",
|
|
56
56
|
"main": "index.js",
|