@cloudconvert/n8n-nodes-cloudconvert 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.
- package/LICENSE.md +19 -0
- package/README.md +68 -0
- package/dist/credentials/CloudConvertApi.credentials.d.ts +9 -0
- package/dist/credentials/CloudConvertApi.credentials.js +36 -0
- package/dist/credentials/CloudConvertApi.credentials.js.map +1 -0
- package/dist/credentials/CloudConvertOAuth2Api.credentials.d.ts +8 -0
- package/dist/credentials/CloudConvertOAuth2Api.credentials.js +52 -0
- package/dist/credentials/CloudConvertOAuth2Api.credentials.js.map +1 -0
- package/dist/credentials/ExampleCredentialsApi.credentials.d.ts +8 -0
- package/dist/credentials/ExampleCredentialsApi.credentials.js +46 -0
- package/dist/credentials/ExampleCredentialsApi.credentials.js.map +1 -0
- package/dist/credentials/HttpBinApi.credentials.d.ts +9 -0
- package/dist/credentials/HttpBinApi.credentials.js +40 -0
- package/dist/credentials/HttpBinApi.credentials.js.map +1 -0
- package/dist/nodes/CloudConvert/CloudConvert.node.d.ts +11 -0
- package/dist/nodes/CloudConvert/CloudConvert.node.js +315 -0
- package/dist/nodes/CloudConvert/CloudConvert.node.js.map +1 -0
- package/dist/nodes/CloudConvert/CloudConvert.node.json +22 -0
- package/dist/nodes/CloudConvert/Interfaces.d.ts +37 -0
- package/dist/nodes/CloudConvert/Interfaces.js +3 -0
- package/dist/nodes/CloudConvert/Interfaces.js.map +1 -0
- package/dist/nodes/CloudConvert/Utils.d.ts +9 -0
- package/dist/nodes/CloudConvert/Utils.js +117 -0
- package/dist/nodes/CloudConvert/Utils.js.map +1 -0
- package/dist/nodes/CloudConvert/cloudconvert.png +0 -0
- package/dist/nodes/CloudConvert/convert/execute.d.ts +2 -0
- package/dist/nodes/CloudConvert/convert/execute.js +64 -0
- package/dist/nodes/CloudConvert/convert/execute.js.map +1 -0
- package/dist/nodes/CloudConvert/operations/archive/execute.d.ts +2 -0
- package/dist/nodes/CloudConvert/operations/archive/execute.js +41 -0
- package/dist/nodes/CloudConvert/operations/archive/execute.js.map +1 -0
- package/dist/nodes/CloudConvert/operations/capture-website/execute.d.ts +2 -0
- package/dist/nodes/CloudConvert/operations/capture-website/execute.js +53 -0
- package/dist/nodes/CloudConvert/operations/capture-website/execute.js.map +1 -0
- package/dist/nodes/CloudConvert/operations/capture-website/fields.d.ts +2 -0
- package/dist/nodes/CloudConvert/operations/capture-website/fields.js +19 -0
- package/dist/nodes/CloudConvert/operations/capture-website/fields.js.map +1 -0
- package/dist/nodes/CloudConvert/operations/convert/execute.d.ts +2 -0
- package/dist/nodes/CloudConvert/operations/convert/execute.js +60 -0
- package/dist/nodes/CloudConvert/operations/convert/execute.js.map +1 -0
- package/dist/nodes/CloudConvert/operations/execute.d.ts +2 -0
- package/dist/nodes/CloudConvert/operations/execute.js +7 -0
- package/dist/nodes/CloudConvert/operations/execute.js.map +1 -0
- package/dist/nodes/CloudConvert/operations/merge/execute.d.ts +2 -0
- package/dist/nodes/CloudConvert/operations/merge/execute.js +41 -0
- package/dist/nodes/CloudConvert/operations/merge/execute.js.map +1 -0
- package/dist/nodes/CloudConvert/operations/metadata/execute.d.ts +2 -0
- package/dist/nodes/CloudConvert/operations/metadata/execute.js +36 -0
- package/dist/nodes/CloudConvert/operations/metadata/execute.js.map +1 -0
- package/dist/nodes/CloudConvert/operations/optimize/execute.d.ts +2 -0
- package/dist/nodes/CloudConvert/operations/optimize/execute.js +59 -0
- package/dist/nodes/CloudConvert/operations/optimize/execute.js.map +1 -0
- package/dist/nodes/CloudConvert/operations/thumbnail/description.d.ts +2 -0
- package/dist/nodes/CloudConvert/operations/thumbnail/description.js +58 -0
- package/dist/nodes/CloudConvert/operations/thumbnail/description.js.map +1 -0
- package/dist/nodes/CloudConvert/operations/thumbnail/execute.d.ts +2 -0
- package/dist/nodes/CloudConvert/operations/thumbnail/execute.js +65 -0
- package/dist/nodes/CloudConvert/operations/thumbnail/execute.js.map +1 -0
- package/dist/nodes/CloudConvert/operations/thumbnail/fields.d.ts +2 -0
- package/dist/nodes/CloudConvert/operations/thumbnail/fields.js +58 -0
- package/dist/nodes/CloudConvert/operations/thumbnail/fields.js.map +1 -0
- package/dist/nodes/CloudConvert/operations/watermark/execute.d.ts +2 -0
- package/dist/nodes/CloudConvert/operations/watermark/execute.js +80 -0
- package/dist/nodes/CloudConvert/operations/watermark/execute.js.map +1 -0
- package/dist/nodes/CloudConvert/operations/watermark/fields.d.ts +2 -0
- package/dist/nodes/CloudConvert/operations/watermark/fields.js +164 -0
- package/dist/nodes/CloudConvert/operations/watermark/fields.js.map +1 -0
- package/dist/nodes/CloudConvert/test/CloudConvert.node.test.d.ts +1 -0
- package/dist/nodes/CloudConvert/test/CloudConvert.node.test.js +103 -0
- package/dist/nodes/CloudConvert/test/CloudConvert.node.test.js.map +1 -0
- package/dist/nodes/CloudConvert/test/CloudConvert.workflow.test.json +354 -0
- package/dist/nodes/CloudConvert/test/ExecuteWorkflow.d.ts +7 -0
- package/dist/nodes/CloudConvert/test/ExecuteWorkflow.js +48 -0
- package/dist/nodes/CloudConvert/test/ExecuteWorkflow.js.map +1 -0
- package/dist/nodes/CloudConvert/test/FakeCredentialsMap.d.ts +8 -0
- package/dist/nodes/CloudConvert/test/FakeCredentialsMap.js +12 -0
- package/dist/nodes/CloudConvert/test/FakeCredentialsMap.js.map +1 -0
- package/dist/nodes/CloudConvert/test/Helpers.d.ts +32 -0
- package/dist/nodes/CloudConvert/test/Helpers.js +240 -0
- package/dist/nodes/CloudConvert/test/Helpers.js.map +1 -0
- package/dist/nodes/CloudConvert/test/types.d.ts +16 -0
- package/dist/nodes/CloudConvert/test/types.js +3 -0
- package/dist/nodes/CloudConvert/test/types.js.map +1 -0
- package/dist/package.json +67 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/index.js +0 -0
- package/package.json +67 -0
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Test CloudConvert",
|
|
3
|
+
"nodes": [
|
|
4
|
+
{
|
|
5
|
+
"parameters": {},
|
|
6
|
+
"id": "0d21e04e-f2cf-4341-9e06-ea1f1eb6249a",
|
|
7
|
+
"name": "When clicking \"Execute Workflow\"",
|
|
8
|
+
"type": "n8n-nodes-base.manualTrigger",
|
|
9
|
+
"typeVersion": 1,
|
|
10
|
+
"position": [560, 640]
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"parameters": {
|
|
14
|
+
"authentication": "apiKey",
|
|
15
|
+
"operation": "optimize",
|
|
16
|
+
"inputBinaryData": false,
|
|
17
|
+
"inputFileContent": "input",
|
|
18
|
+
"inputFilename": "input.txt"
|
|
19
|
+
},
|
|
20
|
+
"id": "af43f7a6-79bb-4234-8f6b-4bab4bffb615",
|
|
21
|
+
"name": "CloudConvertOptimize",
|
|
22
|
+
"type": "n8n-nodes-base.cloudConvert",
|
|
23
|
+
"typeVersion": 1,
|
|
24
|
+
"position": [1120, 500],
|
|
25
|
+
"credentials": {
|
|
26
|
+
"cloudConvertApi": {
|
|
27
|
+
"id": "2",
|
|
28
|
+
"name": "CloudConvert account"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"parameters": {
|
|
34
|
+
"authentication": "apiKey",
|
|
35
|
+
"operation": "metadata",
|
|
36
|
+
"inputBinaryData": false,
|
|
37
|
+
"inputFileContent": "input",
|
|
38
|
+
"inputFilename": "input.txt"
|
|
39
|
+
},
|
|
40
|
+
"id": "412f1c9b-7ed8-4392-abb0-f14700f1ccd6",
|
|
41
|
+
"name": "CloudConvertMetadata",
|
|
42
|
+
"type": "n8n-nodes-base.cloudConvert",
|
|
43
|
+
"typeVersion": 1,
|
|
44
|
+
"position": [1120, 340],
|
|
45
|
+
"credentials": {
|
|
46
|
+
"cloudConvertApi": {
|
|
47
|
+
"id": "2",
|
|
48
|
+
"name": "CloudConvert account"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"parameters": {
|
|
54
|
+
"authentication": "apiKey",
|
|
55
|
+
"operation": "merge",
|
|
56
|
+
"outputFormat": "pdf",
|
|
57
|
+
"inputBinaryData": false,
|
|
58
|
+
"inputFileContent": "input",
|
|
59
|
+
"inputFilename": "input.pdf"
|
|
60
|
+
},
|
|
61
|
+
"id": "0635ead5-5bb5-4dd1-a7f9-232cbd8bc633",
|
|
62
|
+
"name": "CloudConvertMerge",
|
|
63
|
+
"type": "n8n-nodes-base.cloudConvert",
|
|
64
|
+
"typeVersion": 1,
|
|
65
|
+
"position": [1120, 660],
|
|
66
|
+
"credentials": {
|
|
67
|
+
"cloudConvertApi": {
|
|
68
|
+
"id": "2",
|
|
69
|
+
"name": "CloudConvert account"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"parameters": {
|
|
75
|
+
"authentication": "apiKey",
|
|
76
|
+
"operation": "thumbnail",
|
|
77
|
+
"outputFormat": "jpg",
|
|
78
|
+
"inputBinaryData": false,
|
|
79
|
+
"inputFileContent": "input",
|
|
80
|
+
"inputFilename": "input.pdf",
|
|
81
|
+
"width": 200,
|
|
82
|
+
"height": 200,
|
|
83
|
+
"fit": "crop"
|
|
84
|
+
},
|
|
85
|
+
"id": "8af96d9c-d890-4bd7-bfaf-e40beee3fdf4",
|
|
86
|
+
"name": "CloudConvertThumbnail",
|
|
87
|
+
"type": "n8n-nodes-base.cloudConvert",
|
|
88
|
+
"typeVersion": 1,
|
|
89
|
+
"position": [1120, 820],
|
|
90
|
+
"credentials": {
|
|
91
|
+
"cloudConvertApi": {
|
|
92
|
+
"id": "2",
|
|
93
|
+
"name": "CloudConvert account"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"parameters": {
|
|
99
|
+
"authentication": "apiKey",
|
|
100
|
+
"operation": "archive",
|
|
101
|
+
"outputFormat": "zip",
|
|
102
|
+
"inputBinaryData": false,
|
|
103
|
+
"inputFileContent": "input",
|
|
104
|
+
"inputFilename": "input.txt"
|
|
105
|
+
},
|
|
106
|
+
"id": "0684803f-881d-4580-b0f2-595ad39eb20b",
|
|
107
|
+
"name": "CloudConvertArchive",
|
|
108
|
+
"type": "n8n-nodes-base.cloudConvert",
|
|
109
|
+
"typeVersion": 1,
|
|
110
|
+
"position": [1120, 1000],
|
|
111
|
+
"credentials": {
|
|
112
|
+
"cloudConvertApi": {
|
|
113
|
+
"id": "2",
|
|
114
|
+
"name": "CloudConvert account"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"parameters": {
|
|
120
|
+
"authentication": "apiKey",
|
|
121
|
+
"outputFormat": "pdf",
|
|
122
|
+
"inputBinaryData": false,
|
|
123
|
+
"inputFileContent": "input",
|
|
124
|
+
"inputFilename": "input.txt"
|
|
125
|
+
},
|
|
126
|
+
"id": "7b96ea9c-4ca7-4410-9c9e-3739ae3df5a0",
|
|
127
|
+
"name": "CloudConvertConvert",
|
|
128
|
+
"type": "n8n-nodes-base.cloudConvert",
|
|
129
|
+
"typeVersion": 1,
|
|
130
|
+
"position": [1120, 1180],
|
|
131
|
+
"credentials": {
|
|
132
|
+
"cloudConvertApi": {
|
|
133
|
+
"id": "2",
|
|
134
|
+
"name": "CloudConvert account"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"parameters": {
|
|
140
|
+
"authentication": "apiKey",
|
|
141
|
+
"operation": "capture-website",
|
|
142
|
+
"outputFormat": "png",
|
|
143
|
+
"url": "https://cloudconvert.com"
|
|
144
|
+
},
|
|
145
|
+
"id": "2392be44-2988-4308-858f-a24a5d5aaadf",
|
|
146
|
+
"name": "CloudConvertCaptureWebsite",
|
|
147
|
+
"type": "n8n-nodes-base.cloudConvert",
|
|
148
|
+
"typeVersion": 1,
|
|
149
|
+
"position": [1120, 1360],
|
|
150
|
+
"credentials": {
|
|
151
|
+
"cloudConvertApi": {
|
|
152
|
+
"id": "2",
|
|
153
|
+
"name": "CloudConvert account"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"parameters": {
|
|
159
|
+
"authentication": "apiKey",
|
|
160
|
+
"operation": "watermark",
|
|
161
|
+
"inputBinaryData": false,
|
|
162
|
+
"inputFileContent": "input",
|
|
163
|
+
"inputFilename": "input.pdf",
|
|
164
|
+
"text": "watermark",
|
|
165
|
+
"font_color": "#FF0000",
|
|
166
|
+
"opacity": 80
|
|
167
|
+
},
|
|
168
|
+
"id": "f96d2461-cdbd-4026-8f7e-80b7ec7cd51b",
|
|
169
|
+
"name": "CloudConvertWatermark",
|
|
170
|
+
"type": "n8n-nodes-base.cloudConvert",
|
|
171
|
+
"typeVersion": 1,
|
|
172
|
+
"position": [1120, 1540],
|
|
173
|
+
"credentials": {
|
|
174
|
+
"cloudConvertApi": {
|
|
175
|
+
"id": "2",
|
|
176
|
+
"name": "CloudConvert account"
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"pinData": {
|
|
182
|
+
"CloudConvertMetadata": [
|
|
183
|
+
{
|
|
184
|
+
"json": {
|
|
185
|
+
"some": "metadata"
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
],
|
|
189
|
+
"CloudConvertOptimize": [
|
|
190
|
+
{
|
|
191
|
+
"json": {},
|
|
192
|
+
"binary": {
|
|
193
|
+
"data": {
|
|
194
|
+
"data": "eyJkYXRhIjoib3V0cHV0In0=",
|
|
195
|
+
"fileExtension": "txt",
|
|
196
|
+
"fileName": "output.txt",
|
|
197
|
+
"fileSize": "17 B",
|
|
198
|
+
"fileType": "text",
|
|
199
|
+
"mimeType": "text/plain"
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
],
|
|
204
|
+
"CloudConvertMerge": [
|
|
205
|
+
{
|
|
206
|
+
"json": {},
|
|
207
|
+
"binary": {
|
|
208
|
+
"data": {
|
|
209
|
+
"data": "eyJkYXRhIjoib3V0cHV0In0=",
|
|
210
|
+
"fileExtension": "txt",
|
|
211
|
+
"fileName": "output.txt",
|
|
212
|
+
"fileSize": "17 B",
|
|
213
|
+
"fileType": "text",
|
|
214
|
+
"mimeType": "text/plain"
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
],
|
|
219
|
+
"CloudConvertThumbnail": [
|
|
220
|
+
{
|
|
221
|
+
"json": {},
|
|
222
|
+
"binary": {
|
|
223
|
+
"data": {
|
|
224
|
+
"data": "eyJkYXRhIjoib3V0cHV0In0=",
|
|
225
|
+
"fileExtension": "txt",
|
|
226
|
+
"fileName": "output.txt",
|
|
227
|
+
"fileSize": "17 B",
|
|
228
|
+
"fileType": "text",
|
|
229
|
+
"mimeType": "text/plain"
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
],
|
|
234
|
+
"CloudConvertArchive": [
|
|
235
|
+
{
|
|
236
|
+
"json": {},
|
|
237
|
+
"binary": {
|
|
238
|
+
"data": {
|
|
239
|
+
"data": "eyJkYXRhIjoib3V0cHV0In0=",
|
|
240
|
+
"fileExtension": "txt",
|
|
241
|
+
"fileName": "output.txt",
|
|
242
|
+
"fileSize": "17 B",
|
|
243
|
+
"fileType": "text",
|
|
244
|
+
"mimeType": "text/plain"
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
],
|
|
249
|
+
"CloudConvertConvert": [
|
|
250
|
+
{
|
|
251
|
+
"json": {},
|
|
252
|
+
"binary": {
|
|
253
|
+
"data": {
|
|
254
|
+
"data": "eyJkYXRhIjoib3V0cHV0In0=",
|
|
255
|
+
"fileExtension": "txt",
|
|
256
|
+
"fileName": "output.txt",
|
|
257
|
+
"fileSize": "17 B",
|
|
258
|
+
"fileType": "text",
|
|
259
|
+
"mimeType": "text/plain"
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
],
|
|
264
|
+
"CloudConvertCaptureWebsite": [
|
|
265
|
+
{
|
|
266
|
+
"json": {},
|
|
267
|
+
"binary": {
|
|
268
|
+
"data": {
|
|
269
|
+
"data": "eyJkYXRhIjoib3V0cHV0In0=",
|
|
270
|
+
"fileExtension": "txt",
|
|
271
|
+
"fileName": "output.txt",
|
|
272
|
+
"fileSize": "17 B",
|
|
273
|
+
"fileType": "text",
|
|
274
|
+
"mimeType": "text/plain"
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
],
|
|
279
|
+
"CloudConvertWatermark": [
|
|
280
|
+
{
|
|
281
|
+
"json": {},
|
|
282
|
+
"binary": {
|
|
283
|
+
"data": {
|
|
284
|
+
"data": "eyJkYXRhIjoib3V0cHV0In0=",
|
|
285
|
+
"fileExtension": "txt",
|
|
286
|
+
"fileName": "output.txt",
|
|
287
|
+
"fileSize": "17 B",
|
|
288
|
+
"fileType": "text",
|
|
289
|
+
"mimeType": "text/plain"
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
]
|
|
294
|
+
},
|
|
295
|
+
"connections": {
|
|
296
|
+
"When clicking \"Execute Workflow\"": {
|
|
297
|
+
"main": [
|
|
298
|
+
[
|
|
299
|
+
{
|
|
300
|
+
"node": "CloudConvertMetadata",
|
|
301
|
+
"type": "main",
|
|
302
|
+
"index": 0
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"node": "CloudConvertOptimize",
|
|
306
|
+
"type": "main",
|
|
307
|
+
"index": 0
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"node": "CloudConvertMerge",
|
|
311
|
+
"type": "main",
|
|
312
|
+
"index": 0
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"node": "CloudConvertArchive",
|
|
316
|
+
"type": "main",
|
|
317
|
+
"index": 0
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"node": "CloudConvertThumbnail",
|
|
321
|
+
"type": "main",
|
|
322
|
+
"index": 0
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"node": "CloudConvertConvert",
|
|
326
|
+
"type": "main",
|
|
327
|
+
"index": 0
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"node": "CloudConvertCaptureWebsite",
|
|
331
|
+
"type": "main",
|
|
332
|
+
"index": 0
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"node": "CloudConvertWatermark",
|
|
336
|
+
"type": "main",
|
|
337
|
+
"index": 0
|
|
338
|
+
}
|
|
339
|
+
]
|
|
340
|
+
]
|
|
341
|
+
},
|
|
342
|
+
"CloudConvertCaptureWebsite": {
|
|
343
|
+
"main": [[]]
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
"active": false,
|
|
347
|
+
"settings": {},
|
|
348
|
+
"versionId": "db79661c-fe41-424e-ac8e-39ce53fe8447",
|
|
349
|
+
"id": "3",
|
|
350
|
+
"meta": {
|
|
351
|
+
"instanceId": "8ce9d29cfd9955ff5664c29ff58b69de6e5fecc73d54581a1b633bc743f5aa63"
|
|
352
|
+
},
|
|
353
|
+
"tags": []
|
|
354
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { INodeTypes, IRun } from 'n8n-workflow';
|
|
2
|
+
import type { WorkflowTestData } from './types';
|
|
3
|
+
export declare function executeWorkflow(testData: WorkflowTestData, nodeTypes: INodeTypes): Promise<{
|
|
4
|
+
executionData: IRun;
|
|
5
|
+
result: IRun;
|
|
6
|
+
nodeExecutionOrder: string[];
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.executeWorkflow = void 0;
|
|
27
|
+
const n8n_core_1 = require("n8n-core");
|
|
28
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
29
|
+
const Helpers = __importStar(require("./Helpers"));
|
|
30
|
+
async function executeWorkflow(testData, nodeTypes) {
|
|
31
|
+
const executionMode = 'manual';
|
|
32
|
+
const workflowInstance = new n8n_workflow_1.Workflow({
|
|
33
|
+
id: 'test',
|
|
34
|
+
nodes: testData.input.workflowData.nodes,
|
|
35
|
+
connections: testData.input.workflowData.connections,
|
|
36
|
+
active: false,
|
|
37
|
+
nodeTypes,
|
|
38
|
+
});
|
|
39
|
+
const waitPromise = await (0, n8n_workflow_1.createDeferredPromise)();
|
|
40
|
+
const nodeExecutionOrder = [];
|
|
41
|
+
const additionalData = Helpers.WorkflowExecuteAdditionalData(waitPromise, nodeExecutionOrder);
|
|
42
|
+
const workflowExecute = new n8n_core_1.WorkflowExecute(additionalData, executionMode);
|
|
43
|
+
const executionData = await workflowExecute.run(workflowInstance);
|
|
44
|
+
const result = await waitPromise.promise();
|
|
45
|
+
return { executionData, result, nodeExecutionOrder };
|
|
46
|
+
}
|
|
47
|
+
exports.executeWorkflow = executeWorkflow;
|
|
48
|
+
//# sourceMappingURL=ExecuteWorkflow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExecuteWorkflow.js","sourceRoot":"","sources":["../../../../nodes/CloudConvert/test/ExecuteWorkflow.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA2C;AAC3C,+CAAiF;AACjF,mDAAqC;AAG9B,KAAK,UAAU,eAAe,CAAC,QAA0B,EAAE,SAAqB;IACtF,MAAM,aAAa,GAAG,QAAQ,CAAC;IAC/B,MAAM,gBAAgB,GAAG,IAAI,uBAAQ,CAAC;QACrC,EAAE,EAAE,MAAM;QACV,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK;QACxC,WAAW,EAAE,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,WAAW;QACpD,MAAM,EAAE,KAAK;QACb,SAAS;KACT,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG,MAAM,IAAA,oCAAqB,GAAQ,CAAC;IACxD,MAAM,kBAAkB,GAAa,EAAE,CAAC;IACxC,MAAM,cAAc,GAAG,OAAO,CAAC,6BAA6B,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;IAE9F,MAAM,eAAe,GAAG,IAAI,0BAAe,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC;IAE3E,MAAM,aAAa,GAAG,MAAM,eAAe,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAClE,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,CAAC;IAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC;AACtD,CAAC;AAnBD,0CAmBC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const FAKE_CREDENTIALS_DATA: {
|
|
2
|
+
readonly cloudConvertApi: {
|
|
3
|
+
readonly apiKey: "fake-cloudconvert-access-token";
|
|
4
|
+
readonly apiUrl: "https://api.cloudconvert.com";
|
|
5
|
+
readonly syncApiUrl: "https://sync.api.cloudconvert.com";
|
|
6
|
+
readonly storageUrl: "https://storage.cloudconvert.com";
|
|
7
|
+
};
|
|
8
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FAKE_CREDENTIALS_DATA = void 0;
|
|
4
|
+
exports.FAKE_CREDENTIALS_DATA = {
|
|
5
|
+
cloudConvertApi: {
|
|
6
|
+
apiKey: 'fake-cloudconvert-access-token',
|
|
7
|
+
apiUrl: 'https://api.cloudconvert.com',
|
|
8
|
+
syncApiUrl: 'https://sync.api.cloudconvert.com',
|
|
9
|
+
storageUrl: 'https://storage.cloudconvert.com',
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=FakeCredentialsMap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FakeCredentialsMap.js","sourceRoot":"","sources":["../../../../nodes/CloudConvert/test/FakeCredentialsMap.ts"],"names":[],"mappings":";;;AAIa,QAAA,qBAAqB,GAAG;IACpC,eAAe,EAAE;QAChB,MAAM,EAAE,gCAAgC;QACxC,MAAM,EAAE,8BAA8B;QACtC,UAAU,EAAE,mCAAmC;QAC/C,UAAU,EAAE,kCAAkC;KAC9C;CACQ,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Credentials } from 'n8n-core';
|
|
2
|
+
import { ICredentialDataDecryptedObject, ICredentialsHelper, IDeferredPromise, IHttpRequestHelper, IHttpRequestOptions, INode, INodeCredentialsDetails, INodeType, INodeTypeData, INodeTypes, IRun, IVersionedNodeType, IWorkflowExecuteAdditionalData } from 'n8n-workflow';
|
|
3
|
+
import { WorkflowTestData } from './types';
|
|
4
|
+
export declare class CredentialsHelper extends ICredentialsHelper {
|
|
5
|
+
authenticate(credentials: ICredentialDataDecryptedObject, typeName: string, requestParams: IHttpRequestOptions): Promise<IHttpRequestOptions>;
|
|
6
|
+
preAuthentication(helpers: IHttpRequestHelper, credentials: ICredentialDataDecryptedObject, typeName: string, node: INode, credentialsExpired: boolean): Promise<ICredentialDataDecryptedObject | undefined>;
|
|
7
|
+
getParentTypes(name: string): string[];
|
|
8
|
+
getDecrypted(nodeCredentials: INodeCredentialsDetails, type: string): Promise<ICredentialDataDecryptedObject>;
|
|
9
|
+
getCredentials(nodeCredentials: INodeCredentialsDetails, type: string): Promise<Credentials>;
|
|
10
|
+
updateCredentials(nodeCredentials: INodeCredentialsDetails, type: string, data: ICredentialDataDecryptedObject): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
export declare function WorkflowExecuteAdditionalData(waitPromise: IDeferredPromise<IRun>, nodeExecutionOrder: string[]): IWorkflowExecuteAdditionalData;
|
|
13
|
+
declare class NodeTypesClass implements INodeTypes {
|
|
14
|
+
nodeTypes: INodeTypeData;
|
|
15
|
+
getByName(nodeType: string): INodeType | IVersionedNodeType;
|
|
16
|
+
addNode(nodeTypeName: string, nodeType: INodeType | IVersionedNodeType): void;
|
|
17
|
+
getByNameAndVersion(nodeType: string, version?: number): INodeType;
|
|
18
|
+
}
|
|
19
|
+
export declare function NodeTypes(): NodeTypesClass;
|
|
20
|
+
export declare function createTemporaryDir(prefix?: string): string;
|
|
21
|
+
export declare function initBinaryDataManager(mode?: 'default' | 'filesystem'): Promise<string>;
|
|
22
|
+
export declare function setup(testData: Array<WorkflowTestData> | WorkflowTestData): NodeTypesClass;
|
|
23
|
+
export declare function getResultNodeData(result: IRun, testData: WorkflowTestData): {
|
|
24
|
+
nodeName: string;
|
|
25
|
+
resultData: (import("n8n-workflow").INodeExecutionData[] | null)[];
|
|
26
|
+
}[];
|
|
27
|
+
export declare function readJsonFileSync(path: string): any;
|
|
28
|
+
export declare const equalityTest: (testData: WorkflowTestData, types: INodeTypes) => Promise<void>;
|
|
29
|
+
export declare const workflowToTests: (workflowFiles: string[]) => WorkflowTestData[];
|
|
30
|
+
export declare const testWorkflows: (workflows: string[]) => void;
|
|
31
|
+
export declare const getWorkflowFilenames: (dirname: string) => string[];
|
|
32
|
+
export {};
|