@cloudconvert/n8n-nodes-cloudconvert 1.0.0 → 1.0.2
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 +1 -1
- package/dist/nodes/CloudConvert/CloudConvert.node.d.ts +1 -2
- package/dist/nodes/CloudConvert/CloudConvert.node.js +42 -31
- package/dist/nodes/CloudConvert/CloudConvert.node.js.map +1 -1
- package/dist/nodes/CloudConvert/Utils.d.ts +1 -0
- package/dist/nodes/CloudConvert/Utils.js +31 -18
- package/dist/nodes/CloudConvert/Utils.js.map +1 -1
- package/dist/nodes/CloudConvert/operations/capture-website/execute.js +6 -9
- package/dist/nodes/CloudConvert/operations/capture-website/execute.js.map +1 -1
- package/dist/nodes/CloudConvert/operations/convert/execute.js +8 -11
- package/dist/nodes/CloudConvert/operations/convert/execute.js.map +1 -1
- package/dist/nodes/CloudConvert/operations/optimize/execute.js +8 -11
- package/dist/nodes/CloudConvert/operations/optimize/execute.js.map +1 -1
- package/dist/nodes/CloudConvert/operations/thumbnail/execute.js +8 -11
- package/dist/nodes/CloudConvert/operations/thumbnail/execute.js.map +1 -1
- package/dist/nodes/CloudConvert/operations/watermark/execute.js +8 -11
- package/dist/nodes/CloudConvert/operations/watermark/execute.js.map +1 -1
- package/dist/package.json +3 -17
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -17
- package/dist/credentials/ExampleCredentialsApi.credentials.d.ts +0 -8
- package/dist/credentials/ExampleCredentialsApi.credentials.js +0 -46
- package/dist/credentials/ExampleCredentialsApi.credentials.js.map +0 -1
- package/dist/credentials/HttpBinApi.credentials.d.ts +0 -9
- package/dist/credentials/HttpBinApi.credentials.js +0 -40
- package/dist/credentials/HttpBinApi.credentials.js.map +0 -1
- package/dist/nodes/CloudConvert/convert/execute.d.ts +0 -2
- package/dist/nodes/CloudConvert/convert/execute.js +0 -64
- package/dist/nodes/CloudConvert/convert/execute.js.map +0 -1
- package/dist/nodes/CloudConvert/operations/execute.d.ts +0 -2
- package/dist/nodes/CloudConvert/operations/execute.js +0 -7
- package/dist/nodes/CloudConvert/operations/execute.js.map +0 -1
- package/dist/nodes/CloudConvert/operations/thumbnail/description.d.ts +0 -2
- package/dist/nodes/CloudConvert/operations/thumbnail/description.js +0 -58
- package/dist/nodes/CloudConvert/operations/thumbnail/description.js.map +0 -1
- package/dist/nodes/CloudConvert/test/CloudConvert.node.test.d.ts +0 -1
- package/dist/nodes/CloudConvert/test/CloudConvert.node.test.js +0 -103
- package/dist/nodes/CloudConvert/test/CloudConvert.node.test.js.map +0 -1
- package/dist/nodes/CloudConvert/test/CloudConvert.workflow.test.json +0 -354
- package/dist/nodes/CloudConvert/test/ExecuteWorkflow.d.ts +0 -7
- package/dist/nodes/CloudConvert/test/ExecuteWorkflow.js +0 -48
- package/dist/nodes/CloudConvert/test/ExecuteWorkflow.js.map +0 -1
- package/dist/nodes/CloudConvert/test/FakeCredentialsMap.d.ts +0 -8
- package/dist/nodes/CloudConvert/test/FakeCredentialsMap.js +0 -12
- package/dist/nodes/CloudConvert/test/FakeCredentialsMap.js.map +0 -1
- package/dist/nodes/CloudConvert/test/Helpers.d.ts +0 -32
- package/dist/nodes/CloudConvert/test/Helpers.js +0 -240
- package/dist/nodes/CloudConvert/test/Helpers.js.map +0 -1
- package/dist/nodes/CloudConvert/test/types.d.ts +0 -16
- package/dist/nodes/CloudConvert/test/types.js +0 -3
- package/dist/nodes/CloudConvert/test/types.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../../nodes/CloudConvert/operations/thumbnail/description.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAsB;IACjD;QACC,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,SAAS,EAAE,CAAC,WAAW,CAAC;aACxB;SACD;QACD,WAAW,EAAE,EAAE;QACf,WAAW,EAAE,2BAA2B;KACxC;IACD;QACC,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,SAAS,EAAE,CAAC,WAAW,CAAC;aACxB;SACD;QACD,WAAW,EAAE,EAAE;QACf,WAAW,EAAE,4BAA4B;KACzC;IACD;QACC,WAAW,EAAE,KAAK;QAClB,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,KAAK;QACd,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;aACZ;YACD;gBACC,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,MAAM;aACb;YACD;gBACC,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,OAAO;aACd;SACD;QACD,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,SAAS,EAAE,CAAC,WAAW,CAAC;aACxB;SACD;QACD,WAAW,EACV,+UAA+U;KAChV;CACD,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,103 +0,0 @@
|
|
|
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 nock_1 = __importDefault(require("nock"));
|
|
7
|
-
const Helpers_1 = require("./Helpers");
|
|
8
|
-
const FakeCredentialsMap_1 = require("./FakeCredentialsMap");
|
|
9
|
-
describe('Test CloudConvert Node', () => {
|
|
10
|
-
beforeEach(async () => {
|
|
11
|
-
await (0, Helpers_1.initBinaryDataManager)();
|
|
12
|
-
});
|
|
13
|
-
beforeAll(() => {
|
|
14
|
-
nock_1.default.disableNetConnect();
|
|
15
|
-
const { apiUrl, syncApiUrl, storageUrl } = FakeCredentialsMap_1.FAKE_CREDENTIALS_DATA.cloudConvertApi;
|
|
16
|
-
(0, nock_1.default)(apiUrl)
|
|
17
|
-
.persist(true)
|
|
18
|
-
.post('/v2/jobs')
|
|
19
|
-
.reply(200, {
|
|
20
|
-
data: {
|
|
21
|
-
id: 'fake-id',
|
|
22
|
-
status: 'waiting',
|
|
23
|
-
tasks: [
|
|
24
|
-
{
|
|
25
|
-
operation: 'import/upload',
|
|
26
|
-
status: 'waiting',
|
|
27
|
-
result: {
|
|
28
|
-
form: {
|
|
29
|
-
url: storageUrl + '/upload',
|
|
30
|
-
parameters: {
|
|
31
|
-
some: 'value',
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
operation: 'convert',
|
|
38
|
-
status: 'waiting',
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
operation: 'export/url',
|
|
42
|
-
status: 'waiting',
|
|
43
|
-
},
|
|
44
|
-
],
|
|
45
|
-
},
|
|
46
|
-
});
|
|
47
|
-
(0, nock_1.default)(syncApiUrl)
|
|
48
|
-
.persist()
|
|
49
|
-
.get('/v2/jobs/fake-id')
|
|
50
|
-
.reply(200, {
|
|
51
|
-
data: {
|
|
52
|
-
id: 'fake-id',
|
|
53
|
-
status: 'finished',
|
|
54
|
-
tasks: [
|
|
55
|
-
{
|
|
56
|
-
operation: 'import/upload',
|
|
57
|
-
status: 'finished',
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
operation: 'convert',
|
|
61
|
-
status: 'finished',
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
operation: 'export/url',
|
|
65
|
-
status: 'finished',
|
|
66
|
-
result: {
|
|
67
|
-
files: [
|
|
68
|
-
{
|
|
69
|
-
filename: 'output.txt',
|
|
70
|
-
url: storageUrl + '/files/fake-id/output.txt',
|
|
71
|
-
},
|
|
72
|
-
],
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
operation: 'metadata',
|
|
77
|
-
status: 'finished',
|
|
78
|
-
result: {
|
|
79
|
-
metadata: {
|
|
80
|
-
some: 'metadata',
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
],
|
|
85
|
-
},
|
|
86
|
-
});
|
|
87
|
-
const storageMock = (0, nock_1.default)(storageUrl);
|
|
88
|
-
storageMock.persist().post('/upload').reply(200, {
|
|
89
|
-
data: '',
|
|
90
|
-
});
|
|
91
|
-
storageMock.persist().get('/files/fake-id/output.txt').reply(200, {
|
|
92
|
-
data: 'output',
|
|
93
|
-
}, {
|
|
94
|
-
'Content-Type': 'text/plain',
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
afterAll(() => {
|
|
98
|
-
nock_1.default.restore();
|
|
99
|
-
});
|
|
100
|
-
const workflows = (0, Helpers_1.getWorkflowFilenames)(__dirname);
|
|
101
|
-
(0, Helpers_1.testWorkflows)(workflows);
|
|
102
|
-
});
|
|
103
|
-
//# sourceMappingURL=CloudConvert.node.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CloudConvert.node.test.js","sourceRoot":"","sources":["../../../../nodes/CloudConvert/test/CloudConvert.node.test.ts"],"names":[],"mappings":";;;;;AAAA,gDAAwB;AACxB,uCAAuF;AACvF,6DAA6D;AAE7D,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACvC,UAAU,CAAC,KAAK,IAAI,EAAE;QACrB,MAAM,IAAA,+BAAqB,GAAE,CAAC;IAC/B,CAAC,CAAC,CAAC;IACH,SAAS,CAAC,GAAG,EAAE;QACd,cAAI,CAAC,iBAAiB,EAAE,CAAC;QAEzB,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,0CAAqB,CAAC,eAAe,CAAC;QAEjF,IAAA,cAAI,EAAC,MAAM,CAAC;aACV,OAAO,CAAC,IAAI,CAAC;aACb,IAAI,CAAC,UAAU,CAAC;aAChB,KAAK,CAAC,GAAG,EAAE;YACX,IAAI,EAAE;gBACL,EAAE,EAAE,SAAS;gBACb,MAAM,EAAE,SAAS;gBACjB,KAAK,EAAE;oBACN;wBACC,SAAS,EAAE,eAAe;wBAC1B,MAAM,EAAE,SAAS;wBACjB,MAAM,EAAE;4BACP,IAAI,EAAE;gCACL,GAAG,EAAE,UAAU,GAAG,SAAS;gCAC3B,UAAU,EAAE;oCACX,IAAI,EAAE,OAAO;iCACb;6BACD;yBACD;qBACD;oBACD;wBACC,SAAS,EAAE,SAAS;wBACpB,MAAM,EAAE,SAAS;qBACjB;oBACD;wBACC,SAAS,EAAE,YAAY;wBACvB,MAAM,EAAE,SAAS;qBACjB;iBACD;aACD;SACD,CAAC,CAAC;QAEJ,IAAA,cAAI,EAAC,UAAU,CAAC;aACd,OAAO,EAAE;aACT,GAAG,CAAC,kBAAkB,CAAC;aACvB,KAAK,CAAC,GAAG,EAAE;YACX,IAAI,EAAE;gBACL,EAAE,EAAE,SAAS;gBACb,MAAM,EAAE,UAAU;gBAClB,KAAK,EAAE;oBACN;wBACC,SAAS,EAAE,eAAe;wBAC1B,MAAM,EAAE,UAAU;qBAClB;oBACD;wBACC,SAAS,EAAE,SAAS;wBACpB,MAAM,EAAE,UAAU;qBAClB;oBACD;wBACC,SAAS,EAAE,YAAY;wBACvB,MAAM,EAAE,UAAU;wBAClB,MAAM,EAAE;4BACP,KAAK,EAAE;gCACN;oCACC,QAAQ,EAAE,YAAY;oCACtB,GAAG,EAAE,UAAU,GAAG,2BAA2B;iCAC7C;6BACD;yBACD;qBACD;oBACD;wBACC,SAAS,EAAE,UAAU;wBACrB,MAAM,EAAE,UAAU;wBAClB,MAAM,EAAE;4BACP,QAAQ,EAAE;gCACT,IAAI,EAAE,UAAU;6BAChB;yBACD;qBACD;iBACD;aACD;SACD,CAAC,CAAC;QAEJ,MAAM,WAAW,GAAG,IAAA,cAAI,EAAC,UAAU,CAAC,CAAC;QAErC,WAAW,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE;YAChD,IAAI,EAAE,EAAE;SACR,CAAC,CAAC;QAEH,WAAW,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC,KAAK,CAC3D,GAAG,EACH;YACC,IAAI,EAAE,QAAQ;SACd,EACD;YACC,cAAc,EAAE,YAAY;SAC5B,CACD,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,GAAG,EAAE;QACb,cAAI,CAAC,OAAO,EAAE,CAAC;IAChB,CAAC,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,IAAA,8BAAoB,EAAC,SAAS,CAAC,CAAC;IAClD,IAAA,uBAAa,EAAC,SAAS,CAAC,CAAC;AAC1B,CAAC,CAAC,CAAC"}
|
|
@@ -1,354 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
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
|
-
}>;
|
|
@@ -1,48 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,8 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,32 +0,0 @@
|
|
|
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 {};
|