@t0mer/n8n-nodes-ssllabs 2026.9.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.
Files changed (62) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +234 -0
  3. package/dist/assets/demo/ssllabs-demo.png +0 -0
  4. package/dist/credentials/SslLabsApi.credentials.d.ts +10 -0
  5. package/dist/credentials/SslLabsApi.credentials.js +46 -0
  6. package/dist/credentials/SslLabsApi.credentials.js.map +1 -0
  7. package/dist/credentials/sslLabs.dark.svg +9 -0
  8. package/dist/credentials/sslLabs.svg +9 -0
  9. package/dist/nodes/SslLabs/SslLabs.node.d.ts +5 -0
  10. package/dist/nodes/SslLabs/SslLabs.node.js +91 -0
  11. package/dist/nodes/SslLabs/SslLabs.node.js.map +1 -0
  12. package/dist/nodes/SslLabs/SslLabs.node.json +18 -0
  13. package/dist/nodes/SslLabs/resources/assessment.d.ts +11 -0
  14. package/dist/nodes/SslLabs/resources/assessment.js +258 -0
  15. package/dist/nodes/SslLabs/resources/assessment.js.map +1 -0
  16. package/dist/nodes/SslLabs/resources/endpoint.d.ts +2 -0
  17. package/dist/nodes/SslLabs/resources/endpoint.js +77 -0
  18. package/dist/nodes/SslLabs/resources/endpoint.js.map +1 -0
  19. package/dist/nodes/SslLabs/resources/registration.d.ts +2 -0
  20. package/dist/nodes/SslLabs/resources/registration.js +71 -0
  21. package/dist/nodes/SslLabs/resources/registration.js.map +1 -0
  22. package/dist/nodes/SslLabs/resources/service.d.ts +3 -0
  23. package/dist/nodes/SslLabs/resources/service.js +86 -0
  24. package/dist/nodes/SslLabs/resources/service.js.map +1 -0
  25. package/dist/nodes/SslLabs/shared.d.ts +11 -0
  26. package/dist/nodes/SslLabs/shared.js +26 -0
  27. package/dist/nodes/SslLabs/shared.js.map +1 -0
  28. package/dist/nodes/SslLabs/sslLabs.dark.svg +9 -0
  29. package/dist/nodes/SslLabs/sslLabs.svg +9 -0
  30. package/dist/nodes/SslLabsTrigger/SslLabsTrigger.node.d.ts +5 -0
  31. package/dist/nodes/SslLabsTrigger/SslLabsTrigger.node.js +237 -0
  32. package/dist/nodes/SslLabsTrigger/SslLabsTrigger.node.js.map +1 -0
  33. package/dist/nodes/SslLabsTrigger/SslLabsTrigger.node.json +18 -0
  34. package/dist/nodes/SslLabsTrigger/sslLabs.dark.svg +9 -0
  35. package/dist/nodes/SslLabsTrigger/sslLabs.svg +9 -0
  36. package/dist/nodes/SslLabsTrigger/state.d.ts +35 -0
  37. package/dist/nodes/SslLabsTrigger/state.js +122 -0
  38. package/dist/nodes/SslLabsTrigger/state.js.map +1 -0
  39. package/dist/package.json +73 -0
  40. package/dist/shared/batch.d.ts +24 -0
  41. package/dist/shared/batch.js +66 -0
  42. package/dist/shared/batch.js.map +1 -0
  43. package/dist/shared/grades.d.ts +8 -0
  44. package/dist/shared/grades.js +38 -0
  45. package/dist/shared/grades.js.map +1 -0
  46. package/dist/shared/host.d.ts +2 -0
  47. package/dist/shared/host.js +38 -0
  48. package/dist/shared/host.js.map +1 -0
  49. package/dist/shared/poll.d.ts +29 -0
  50. package/dist/shared/poll.js +81 -0
  51. package/dist/shared/poll.js.map +1 -0
  52. package/dist/shared/summary.d.ts +8 -0
  53. package/dist/shared/summary.js +87 -0
  54. package/dist/shared/summary.js.map +1 -0
  55. package/dist/shared/transport.d.ts +37 -0
  56. package/dist/shared/transport.js +161 -0
  57. package/dist/shared/transport.js.map +1 -0
  58. package/dist/shared/types.d.ts +88 -0
  59. package/dist/shared/types.js +3 -0
  60. package/dist/shared/types.js.map +1 -0
  61. package/dist/tsconfig.tsbuildinfo +1 -0
  62. package/package.json +73 -0
@@ -0,0 +1,258 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.assessment = void 0;
4
+ exports.readMode = readMode;
5
+ exports.analyzeItem = analyzeItem;
6
+ exports.executeAnalyze = executeAnalyze;
7
+ const n8n_workflow_1 = require("n8n-workflow");
8
+ const batch_1 = require("../../../shared/batch");
9
+ const host_1 = require("../../../shared/host");
10
+ const poll_1 = require("../../../shared/poll");
11
+ const summary_1 = require("../../../shared/summary");
12
+ const transport_1 = require("../../../shared/transport");
13
+ const shared_1 = require("../shared");
14
+ const show = { resource: ['assessment'], operation: ['analyze'] };
15
+ const properties = [
16
+ {
17
+ displayName: 'Operation',
18
+ name: 'operation',
19
+ type: 'options',
20
+ noDataExpression: true,
21
+ displayOptions: { show: { resource: ['assessment'] } },
22
+ options: [
23
+ {
24
+ name: 'Analyze',
25
+ value: 'analyze',
26
+ description: 'Assess the SSL/TLS configuration of a host',
27
+ action: 'Analyze a host',
28
+ },
29
+ ],
30
+ default: 'analyze',
31
+ },
32
+ {
33
+ displayName: 'Host',
34
+ name: 'host',
35
+ type: 'string',
36
+ required: true,
37
+ default: '',
38
+ placeholder: 'example.com',
39
+ description: 'Hostname to assess. A pasted URL is reduced to its hostname. Only assess hosts you own or are authorized to test.',
40
+ displayOptions: { show },
41
+ },
42
+ {
43
+ displayName: 'Mode',
44
+ name: 'mode',
45
+ type: 'options',
46
+ noDataExpression: true,
47
+ displayOptions: { show },
48
+ options: [
49
+ {
50
+ name: 'Get Status',
51
+ value: 'getStatus',
52
+ description: 'Make a single call and return the current state. SSL Labs starts an assessment if none exists (or the cache is too old).',
53
+ },
54
+ {
55
+ name: 'Start Only',
56
+ value: 'startOnly',
57
+ description: 'Start the assessment and return right away with its status',
58
+ },
59
+ {
60
+ name: 'Wait for Result',
61
+ value: 'waitForResult',
62
+ description: 'Start (or reuse a cached) assessment and wait until it finishes. Can take several minutes.',
63
+ },
64
+ ],
65
+ default: 'waitForResult',
66
+ },
67
+ {
68
+ displayName: 'Use Cache',
69
+ name: 'useCache',
70
+ type: 'boolean',
71
+ default: true,
72
+ description: 'Whether to accept a cached report instead of running a new assessment',
73
+ displayOptions: { show },
74
+ },
75
+ {
76
+ displayName: 'Max Cache Age (Hours)',
77
+ name: 'maxAge',
78
+ type: 'number',
79
+ default: 24,
80
+ typeOptions: { minValue: 0 },
81
+ description: 'Only accept cached reports up to this old. 0 accepts any cached report.',
82
+ displayOptions: { show: { ...show, useCache: [true] } },
83
+ },
84
+ {
85
+ displayName: 'Force New Scan',
86
+ name: 'forceNewScan',
87
+ type: 'boolean',
88
+ default: false,
89
+ description: 'Whether to start a fresh assessment even if one was run recently',
90
+ displayOptions: { show: { ...show, useCache: [false], mode: ['startOnly', 'waitForResult'] } },
91
+ },
92
+ {
93
+ displayName: 'Options',
94
+ name: 'options',
95
+ type: 'collection',
96
+ placeholder: 'Add Option',
97
+ default: {},
98
+ displayOptions: { show },
99
+ options: [
100
+ {
101
+ displayName: 'Batch Concurrency',
102
+ name: 'batchConcurrency',
103
+ type: 'number',
104
+ default: batch_1.DEFAULT_BATCH_CONCURRENCY,
105
+ typeOptions: { minValue: 1, maxValue: batch_1.MAX_BATCH_CONCURRENCY },
106
+ description: 'Maximum assessments to run at once when there are several input items. Also capped by the free slots SSL Labs reports.',
107
+ },
108
+ {
109
+ displayName: 'Detail Level',
110
+ name: 'detailLevel',
111
+ type: 'options',
112
+ options: [
113
+ { name: 'Full', value: 'full', description: 'The raw SSL Labs host object' },
114
+ { name: 'Summary', value: 'summary', description: 'Grades, endpoints and certificate' },
115
+ ],
116
+ default: 'summary',
117
+ },
118
+ {
119
+ displayName: 'Fail on Assessment Error',
120
+ name: 'failOnError',
121
+ type: 'boolean',
122
+ default: true,
123
+ description: 'Whether to fail when the assessment ends in ERROR. When off, the ERROR result is returned as an item.',
124
+ },
125
+ {
126
+ displayName: 'Ignore Certificate Mismatch',
127
+ name: 'ignoreMismatch',
128
+ type: 'boolean',
129
+ default: false,
130
+ description: 'Whether to continue the assessment when the certificate does not match the hostname',
131
+ },
132
+ {
133
+ displayName: 'Initial Poll Interval (Seconds)',
134
+ name: 'initialPollInterval',
135
+ type: 'number',
136
+ default: 5,
137
+ typeOptions: { minValue: 5 },
138
+ description: 'How often to check while the assessment is resolving DNS',
139
+ displayOptions: { show: { '/mode': ['waitForResult'] } },
140
+ },
141
+ {
142
+ displayName: 'Poll Interval (Seconds)',
143
+ name: 'pollInterval',
144
+ type: 'number',
145
+ default: 10,
146
+ typeOptions: { minValue: 5 },
147
+ description: 'How often to check once the assessment is in progress',
148
+ displayOptions: { show: { '/mode': ['waitForResult'] } },
149
+ },
150
+ {
151
+ displayName: 'Publish Results',
152
+ name: 'publish',
153
+ type: 'boolean',
154
+ default: false,
155
+ description: 'Whether to publish the results. Warning: published results appear on the public SSL Labs boards.',
156
+ },
157
+ {
158
+ displayName: 'Timeout (Minutes)',
159
+ name: 'timeout',
160
+ type: 'number',
161
+ default: 15,
162
+ typeOptions: { minValue: 1 },
163
+ description: 'Stop waiting after this long. Use Start Only mode for very long batches.',
164
+ displayOptions: { show: { '/mode': ['waitForResult'] } },
165
+ },
166
+ ],
167
+ },
168
+ ];
169
+ function readMode(ctx, i) {
170
+ return ctx.getNodeParameter('mode', i, 'waitForResult');
171
+ }
172
+ async function analyzeItem(ctx, i, hooks = {}) {
173
+ var _a, _b, _c, _d, _e, _f;
174
+ const host = (0, host_1.normalizeHost)(ctx.getNodeParameter('host', i), ctx.getNode(), i);
175
+ const mode = readMode(ctx, i);
176
+ const useCache = ctx.getNodeParameter('useCache', i, true);
177
+ const options = ctx.getNodeParameter('options', i, {});
178
+ const params = {
179
+ host,
180
+ fromCache: useCache,
181
+ maxAge: useCache ? ctx.getNodeParameter('maxAge', i, 24) : undefined,
182
+ startNew: !useCache &&
183
+ mode !== 'getStatus' &&
184
+ ctx.getNodeParameter('forceNewScan', i, false),
185
+ publish: options.publish === true,
186
+ ignoreMismatch: options.ignoreMismatch === true,
187
+ all: 'done',
188
+ };
189
+ const callOptions = { abortSignal: hooks.abortSignal, itemIndex: i };
190
+ let result;
191
+ if (mode === 'waitForResult') {
192
+ result = await (0, poll_1.waitForAssessment)(ctx, params, {
193
+ ...callOptions,
194
+ beforeStart: hooks.beforeStart,
195
+ initialIntervalMs: Number((_a = options.initialPollInterval) !== null && _a !== void 0 ? _a : 5) * 1000,
196
+ intervalMs: Number((_b = options.pollInterval) !== null && _b !== void 0 ? _b : 10) * 1000,
197
+ timeoutMs: Number((_c = options.timeout) !== null && _c !== void 0 ? _c : 15) * 60000,
198
+ });
199
+ }
200
+ else {
201
+ await ((_d = hooks.beforeStart) === null || _d === void 0 ? void 0 : _d.call(hooks));
202
+ result = await (0, poll_1.analyze)(ctx, params, true, callOptions);
203
+ }
204
+ if (result.status === 'ERROR' && options.failOnError !== false) {
205
+ throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), `Assessment of ${host} failed: ${(_e = result.statusMessage) !== null && _e !== void 0 ? _e : 'unknown error'}`, {
206
+ itemIndex: i,
207
+ description: 'Turn off "Fail on Assessment Error" to receive the ERROR result as an item instead.',
208
+ });
209
+ }
210
+ return options.detailLevel === 'full'
211
+ ? { ...result, reportUrl: (0, summary_1.reportUrl)((_f = result.host) !== null && _f !== void 0 ? _f : host) }
212
+ : (0, summary_1.toSummary)(result);
213
+ }
214
+ async function executeAnalyze(ctx) {
215
+ const count = ctx.getInputData().length;
216
+ const cancelSignal = ctx.getExecutionCancelSignal();
217
+ const continueOnFail = ctx.continueOnFail();
218
+ const requested = ctx.getNodeParameter('options', 0, {}).batchConcurrency;
219
+ let concurrency = 1;
220
+ let gate;
221
+ if (count > 1) {
222
+ let info = {};
223
+ try {
224
+ ({ body: info } = await (0, transport_1.sslLabsRequest)(ctx, {
225
+ path: 'info',
226
+ abortSignal: cancelSignal,
227
+ retry: false,
228
+ }));
229
+ }
230
+ catch {
231
+ info = { maxAssessments: 1, currentAssessments: 0 };
232
+ }
233
+ concurrency = (0, batch_1.batchConcurrency)(requested, info.maxAssessments, info.currentAssessments);
234
+ const coolOff = Number(info.newAssessmentCoolOff);
235
+ gate = (0, batch_1.createStartGate)(coolOff > 0 ? coolOff + 100 : batch_1.DEFAULT_COOL_OFF_MS);
236
+ }
237
+ const { results, firstError } = await (0, batch_1.runPool)(count, concurrency, async (i, signal) => await analyzeItem(ctx, i, {
238
+ abortSignal: signal,
239
+ beforeStart: gate ? async () => await gate(signal) : undefined,
240
+ }), { signal: cancelSignal, stopOnError: !continueOnFail });
241
+ if (firstError)
242
+ throw (0, shared_1.toNodeError)(ctx, firstError.error, firstError.index);
243
+ return results.map((result, i) => {
244
+ var _a;
245
+ if (result === null || result === void 0 ? void 0 : result.ok)
246
+ return { json: result.value, pairedItem: { item: i } };
247
+ const error = (_a = result === null || result === void 0 ? void 0 : result.error) !== null && _a !== void 0 ? _a : new n8n_workflow_1.NodeOperationError(ctx.getNode(), 'Execution was cancelled');
248
+ if (!continueOnFail)
249
+ throw (0, shared_1.toNodeError)(ctx, error, i);
250
+ return (0, shared_1.errorItem)(ctx, error, i);
251
+ });
252
+ }
253
+ exports.assessment = {
254
+ properties,
255
+ handlers: {},
256
+ batchHandlers: { analyze: executeAnalyze },
257
+ };
258
+ //# sourceMappingURL=assessment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assessment.js","sourceRoot":"","sources":["../../../../nodes/SslLabs/resources/assessment.ts"],"names":[],"mappings":";;;AAkMA,4BAEC;AAGD,kCAqDC;AAOD,wCA6CC;AA1SD,+CAAkD;AAClD,iDAO+B;AAC/B,+CAAqD;AACrD,+CAAsF;AACtF,qDAA+D;AAC/D,yDAA2D;AAE3D,sCAAwE;AAExE,MAAM,IAAI,GAAG,EAAE,QAAQ,EAAE,CAAC,YAAY,CAAC,EAAE,SAAS,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC;AAElE,MAAM,UAAU,GAAsB;IACrC;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,YAAY,CAAC,EAAE,EAAE;QACtD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,SAAS;gBAChB,WA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AA,oBAAW,EAAC,GAAG,EAAE,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;IAE3E,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;;QAChC,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,EAAE;YAAE,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC;QACvE,MAAM,KAAK,GAAG,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,mCAAI,IAAI,iCAAkB,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,yBAAyB,CAAC,CAAC;QAChG,IAAI,CAAC,cAAc;YAAE,MAAM,IAAA,oBAAW,EAAC,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;QACtD,OAAO,IAAA,kBAAS,EAAC,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACJ,CAAC;AAEY,QAAA,UAAU,GAAmB;IACzC,UAAU;IACV,QAAQ,EAAE,EAAE;IACZ,aAAa,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;CAC1C,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { ResourceModule } from '../shared';
2
+ export declare const endpoint: ResourceModule;
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.endpoint = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const host_1 = require("../../../shared/host");
6
+ const transport_1 = require("../../../shared/transport");
7
+ const show = { resource: ['endpoint'], operation: ['get'] };
8
+ const properties = [
9
+ {
10
+ displayName: 'Operation',
11
+ name: 'operation',
12
+ type: 'options',
13
+ noDataExpression: true,
14
+ displayOptions: { show: { resource: ['endpoint'] } },
15
+ options: [
16
+ {
17
+ name: 'Get',
18
+ value: 'get',
19
+ description: 'Get full details of one endpoint (IP address) of an assessed host. Never starts a new assessment.',
20
+ action: 'Get endpoint details',
21
+ },
22
+ ],
23
+ default: 'get',
24
+ },
25
+ {
26
+ displayName: 'Host',
27
+ name: 'host',
28
+ type: 'string',
29
+ required: true,
30
+ default: '',
31
+ placeholder: 'example.com',
32
+ displayOptions: { show },
33
+ },
34
+ {
35
+ displayName: 'IP Address',
36
+ name: 'ipAddress',
37
+ type: 'string',
38
+ required: true,
39
+ default: '',
40
+ placeholder: '93.184.216.34',
41
+ description: 'Endpoint IP address, as listed in the endpoints of an Analyze result',
42
+ displayOptions: { show },
43
+ },
44
+ {
45
+ displayName: 'Use Cache',
46
+ name: 'useCache',
47
+ type: 'boolean',
48
+ default: true,
49
+ description: 'Whether to return the cached endpoint data',
50
+ displayOptions: { show },
51
+ },
52
+ ];
53
+ exports.endpoint = {
54
+ properties,
55
+ handlers: {
56
+ async get(ctx, i) {
57
+ const host = (0, host_1.normalizeHost)(ctx.getNodeParameter('host', i), ctx.getNode(), i);
58
+ const ipAddress = String(ctx.getNodeParameter('ipAddress', i, ''))
59
+ .trim()
60
+ .replace(/^\[|\]$/g, '');
61
+ if (!ipAddress) {
62
+ throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), 'IP Address is required', { itemIndex: i });
63
+ }
64
+ const qs = { host, s: ipAddress };
65
+ if (ctx.getNodeParameter('useCache', i, true))
66
+ qs.fromCache = 'on';
67
+ const { body } = await (0, transport_1.sslLabsRequest)(ctx, {
68
+ path: 'getEndpointData',
69
+ qs,
70
+ abortSignal: ctx.getExecutionCancelSignal(),
71
+ itemIndex: i,
72
+ });
73
+ return body;
74
+ },
75
+ },
76
+ };
77
+ //# sourceMappingURL=endpoint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endpoint.js","sourceRoot":"","sources":["../../../../nodes/SslLabs/resources/endpoint.ts"],"names":[],"mappings":";;;AACA,+CAAkD;AAClD,+CAAqD;AACrD,yDAA2D;AAG3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B,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;YAC9E,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;iBAChE,IAAI,EAAE;iBACN,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;YAC1B,IAAI,CAAC,SAAS,EAAE,CAAC;gBAChB,MAAM,IAAI,iCAAkB,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,wBAAwB,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;YACzF,CAAC;YACD,MAAM,EAAE,GAAgB,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC;YAC/C,IAAI,GAAG,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,EAAE,IAAI,CAAY;gBAAE,EAAE,CAAC,SAAS,GAAG,IAAI,CAAC;YAC9E,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAA,0BAAc,EAAc,GAAG,EAAE;gBACvD,IAAI,EAAE,iBAAiB;gBACvB,EAAE;gBACF,WAAW,EAAE,GAAG,CAAC,wBAAwB,EAAE;gBAC3C,SAAS,EAAE,CAAC;aACZ,CAAC,CAAC;YACH,OAAO,IAAI,CAAC;QACb,CAAC;KACD;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { ResourceModule } from '../shared';
2
+ export declare const registration: ResourceModule;
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registration = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const transport_1 = require("../../../shared/transport");
6
+ const show = { resource: ['registration'], operation: ['register'] };
7
+ const field = (displayName, name, placeholder) => ({
8
+ displayName,
9
+ name,
10
+ type: 'string',
11
+ required: true,
12
+ default: '',
13
+ placeholder,
14
+ displayOptions: { show },
15
+ });
16
+ const properties = [
17
+ {
18
+ displayName: 'Operation',
19
+ name: 'operation',
20
+ type: 'options',
21
+ noDataExpression: true,
22
+ displayOptions: { show: { resource: ['registration'] } },
23
+ options: [
24
+ {
25
+ name: 'Register',
26
+ value: 'register',
27
+ description: 'Register an email address with the SSL Labs API v4 (one-time). Free mailbox domains such as Gmail may be rejected.',
28
+ action: 'Register an email address',
29
+ },
30
+ ],
31
+ default: 'register',
32
+ },
33
+ field('First Name', 'firstName', 'Jane'),
34
+ field('Last Name', 'lastName', 'Doe'),
35
+ {
36
+ ...field('Email', 'email', 'name@example.com'),
37
+ description: 'Use an organization email address',
38
+ },
39
+ field('Organization', 'organization', 'Example Inc.'),
40
+ ];
41
+ exports.registration = {
42
+ properties,
43
+ handlers: {
44
+ async register(ctx, i) {
45
+ var _a;
46
+ const body = {};
47
+ for (const name of ['firstName', 'lastName', 'email', 'organization']) {
48
+ const value = String(ctx.getNodeParameter(name, i, '')).trim();
49
+ if (!value) {
50
+ throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), `"${name}" is required to register`, {
51
+ itemIndex: i,
52
+ });
53
+ }
54
+ body[name] = value;
55
+ }
56
+ const { body: response } = await (0, transport_1.sslLabsRequest)(ctx, {
57
+ path: 'register',
58
+ method: 'POST',
59
+ body,
60
+ authenticate: false,
61
+ retry: false,
62
+ itemIndex: i,
63
+ });
64
+ if ((response === null || response === void 0 ? void 0 : response.status) === 'failure') {
65
+ throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), `SSL Labs registration failed: ${String((_a = response.message) !== null && _a !== void 0 ? _a : 'no reason given')}`, { itemIndex: i });
66
+ }
67
+ return response;
68
+ },
69
+ },
70
+ };
71
+ //# sourceMappingURL=registration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registration.js","sourceRoot":"","sources":["../../../../nodes/SslLabs/resources/registration.ts"],"names":[],"mappings":";;;AACA,+CAAkD;AAClD,yDAA2D;AAG3D,MAAM,IAAI,GAAG,EAAE,Q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KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;gBAC/D,IAAI,CAAC,KAAK,EAAE,CAAC;oBACZ,MAAM,IAAI,iCAAkB,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,IAAI,IAAI,2BAA2B,EAAE;wBAChF,SAAS,EAAE,CAAC;qBACZ,CAAC,CAAC;gBACJ,CAAC;gBACD,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;YACpB,CAAC;YACD,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,MAAM,IAAA,0BAAc,EAAc,GAAG,EAAE;gBACjE,IAAI,EAAE,UAAU;gBAChB,MAAM,EAAE,MAAM;gBACd,IAAI;gBACJ,YAAY,EAAE,KAAK;gBACnB,KAAK,EAAE,KAAK;gBACZ,SAAS,EAAE,CAAC;aACZ,CAAC,CAAC;YACH,IAAI,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,MAAK,SAAS,EAAE,CAAC;gBACpC,MAAM,IAAI,iCAAkB,CAC3B,GAAG,CAAC,OAAO,EAAE,EACb,iCAAiC,MAAM,CAAC,MAAA,QAAQ,CAAC,OAAO,mCAAI,iBAAiB,CAAC,EAAE,EAChF,EAAE,SAAS,EAAE,CAAC,EAAE,CAChB,CAAC;YACH,CAAC;YACD,OAAO,QAAQ,CAAC;QACjB,CAAC;KACD;CACD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ResourceModule } from '../shared';
2
+ export declare const TRUST_STORES: Record<string, string>;
3
+ export declare const service: ResourceModule;
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.service = exports.TRUST_STORES = void 0;
4
+ const transport_1 = require("../../../shared/transport");
5
+ const show = { resource: ['service'] };
6
+ exports.TRUST_STORES = {
7
+ '1': 'Mozilla',
8
+ '2': 'Apple MacOS',
9
+ '3': 'Android',
10
+ '4': 'Java',
11
+ '5': 'Windows',
12
+ };
13
+ const properties = [
14
+ {
15
+ displayName: 'Operation',
16
+ name: 'operation',
17
+ type: 'options',
18
+ noDataExpression: true,
19
+ displayOptions: { show },
20
+ options: [
21
+ {
22
+ name: 'Get Info',
23
+ value: 'getInfo',
24
+ description: 'Check availability, engine version and your assessment limits',
25
+ action: 'Get service info',
26
+ },
27
+ {
28
+ name: 'Get Root Certificates',
29
+ value: 'getRootCertificates',
30
+ description: 'Get the raw root certificates of a trust store',
31
+ action: 'Get root certificates',
32
+ },
33
+ {
34
+ name: 'Get Status Codes',
35
+ value: 'getStatusCodes',
36
+ description: 'Get the translations of assessment status codes',
37
+ action: 'Get status codes',
38
+ },
39
+ ],
40
+ default: 'getInfo',
41
+ },
42
+ {
43
+ displayName: 'Trust Store',
44
+ name: 'trustStore',
45
+ type: 'options',
46
+ displayOptions: { show: { ...show, operation: ['getRootCertificates'] } },
47
+ options: Object.entries(exports.TRUST_STORES)
48
+ .map(([value, name]) => ({ name, value }))
49
+ .sort((a, b) => a.name.localeCompare(b.name)),
50
+ default: '1',
51
+ description: 'The trust store whose root certificates to return',
52
+ },
53
+ ];
54
+ exports.service = {
55
+ properties,
56
+ handlers: {
57
+ async getInfo(ctx, i) {
58
+ const { body } = await (0, transport_1.sslLabsRequest)(ctx, { path: 'info', itemIndex: i });
59
+ return body;
60
+ },
61
+ async getStatusCodes(ctx, i) {
62
+ const { body } = await (0, transport_1.sslLabsRequest)(ctx, {
63
+ path: 'getStatusCodes',
64
+ itemIndex: i,
65
+ });
66
+ return body;
67
+ },
68
+ async getRootCertificates(ctx, i) {
69
+ var _a;
70
+ const trustStore = String(ctx.getNodeParameter('trustStore', i, '1'));
71
+ const { body } = await (0, transport_1.sslLabsRequest)(ctx, {
72
+ path: 'getRootCertsRaw',
73
+ qs: { trustStore },
74
+ itemIndex: i,
75
+ });
76
+ const meta = {
77
+ trustStoreId: Number(trustStore),
78
+ trustStore: (_a = exports.TRUST_STORES[trustStore]) !== null && _a !== void 0 ? _a : trustStore,
79
+ };
80
+ return body && typeof body === 'object'
81
+ ? { ...meta, ...body }
82
+ : { ...meta, certificates: typeof body === 'string' ? body : String(body !== null && body !== void 0 ? body : '') };
83
+ },
84
+ },
85
+ };
86
+ //# sourceMappingURL=service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../nodes/SslLabs/resources/service.ts"],"names":[],"mappings":";;;AACA,yDAA2D;AAG3D,MAAM,IAAI,GAAG,EAAE,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC;AAE1B,QAAA,YAAY,GAA2B;IACnD,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,aAAa;IAClB,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,MAAM;IACX,GAAG,EAAE,SAAS;CACd,CAAC;AAEF,MAAM,UAAU,GAAsB;IACrC;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE,EAAE,IAAI,EAAE;QACxB,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,+DAA+D;gBAC5E,MAAM,EAAE,kBAAkB;aAC1B;YACD;gBACC,IAAI,EAAE,uBAAuB;gBAC7B,KAAK,EAAE,qBAAqB;gBAC5B,WAAW,EAAE,gDAAgD;gBAC7D,MAAM,EAAE,uBAAuB;aAC/B;YACD;gBACC,IAAI,EAAE,kBAAkB;gBACxB,KAAK,EAAE,gBAAgB;gBACvB,WAAW,EAAE,iDAAiD;gBAC9D,MAAM,EAAE,kBAAkB;aAC1B;SACD;QACD,OAAO,EAAE,SAAS;KAClB;IACD;QACC,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,SAAS;QACf,cAAc,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ACvB,EAAE,EAAE,EAAE,UAAU,EAAE;gBAClB,SAAS,EAAE,CAAC;aACZ,CAAC,CAAC;YACH,MAAM,IAAI,GAAG;gBACZ,YAAY,EAAE,MAAM,CAAC,UAAU,CAAC;gBAChC,UAAU,EAAE,MAAA,oBAAY,CAAC,UAAU,CAAC,mCAAI,UAAU;aAClD,CAAC;YACF,OAAO,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;gBACtC,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,GAAI,IAAoB,EAAE;gBACvC,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,YAAY,EAAE,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,CAAC,EAAE,CAAC;QACpF,CAAC;KACD;CACD,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { IDataObject, IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
2
+ import { NodeApiError, NodeOperationError } from 'n8n-workflow';
3
+ export type OperationHandler = (ctx: IExecuteFunctions, i: number) => Promise<IDataObject | IDataObject[]>;
4
+ export type BatchHandler = (ctx: IExecuteFunctions) => Promise<INodeExecutionData[]>;
5
+ export interface ResourceModule {
6
+ properties: INodeProperties[];
7
+ handlers: Record<string, OperationHandler>;
8
+ batchHandlers?: Record<string, BatchHandler>;
9
+ }
10
+ export declare function toNodeError(ctx: IExecuteFunctions, error: Error, itemIndex: number): NodeOperationError | NodeApiError;
11
+ export declare function errorItem(ctx: IExecuteFunctions, error: Error, itemIndex: number): INodeExecutionData;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toNodeError = toNodeError;
4
+ exports.errorItem = errorItem;
5
+ const n8n_workflow_1 = require("n8n-workflow");
6
+ function toNodeError(ctx, error, itemIndex) {
7
+ if (error instanceof n8n_workflow_1.NodeApiError || error instanceof n8n_workflow_1.NodeOperationError) {
8
+ error.context.itemIndex = itemIndex;
9
+ return error;
10
+ }
11
+ return new n8n_workflow_1.NodeOperationError(ctx.getNode(), error, { itemIndex });
12
+ }
13
+ function errorItem(ctx, error, itemIndex) {
14
+ let host = '';
15
+ try {
16
+ const value = ctx.getNodeParameter('host', itemIndex, '');
17
+ host = typeof value === 'string' ? value : '';
18
+ }
19
+ catch {
20
+ }
21
+ return {
22
+ json: { error: error.message, ...(host ? { host } : {}) },
23
+ pairedItem: { item: itemIndex },
24
+ };
25
+ }
26
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../nodes/SslLabs/shared.ts"],"names":[],"mappings":";;AAwBA,kCAMC;AAGD,8BAgBC;AA3CD,+CAAgE;AAkBhE,SAAgB,WAAW,CAAC,GAAsB,EAAE,KAAY,EAAE,SAAiB;IAClF,IAAI,KAAK,YAAY,2BAAY,IAAI,KAAK,YAAY,iCAAkB,EAAE,CAAC;QAC1E,KAAK,CAAC,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;QACpC,OAAO,KAAK,CAAC;IACd,CAAC;IACD,OAAO,IAAI,iCAAkB,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;AACpE,CAAC;AAGD,SAAgB,SAAS,CACxB,GAAsB,EACtB,KAAY,EACZ,SAAiB;IAEjB,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,IAAI,CAAC;QACJ,MAAM,KAAK,GAAG,GAAG,CAAC,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC;QAC1D,IAAI,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/C,CAAC;IAAC,MAAM,CAAC;IAET,CAAC;IACD,OAAO;QACN,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE;QACzD,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;KAC/B,CAAC;AACH,CAAC"}
@@ -0,0 +1,9 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">
2
+ <path d="M20 28v-7a12 12 0 0 1 24 0v7" fill="none" stroke="#58a6ff" stroke-width="5" stroke-linecap="round"/>
3
+ <rect x="10" y="27" width="44" height="31" rx="6" fill="#58a6ff"/>
4
+ <path d="M19 51a13 13 0 0 1 26 0" fill="none" stroke="#0d1117" stroke-width="3" stroke-linecap="round"/>
5
+ <path d="M19 51a13 13 0 0 1 6.5-11.26" fill="none" stroke="#e5534b" stroke-width="3" stroke-linecap="round"/>
6
+ <path d="M38.5 39.74A13 13 0 0 1 45 51" fill="none" stroke="#3fb950" stroke-width="3" stroke-linecap="round"/>
7
+ <line x1="32" y1="51" x2="39" y2="42" stroke="#0d1117" stroke-width="3" stroke-linecap="round"/>
8
+ <circle cx="32" cy="51" r="3" fill="#0d1117"/>
9
+ </svg>
@@ -0,0 +1,9 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">
2
+ <path d="M20 28v-7a12 12 0 0 1 24 0v7" fill="none" stroke="#1f5f8b" stroke-width="5" stroke-linecap="round"/>
3
+ <rect x="10" y="27" width="44" height="31" rx="6" fill="#1f5f8b"/>
4
+ <path d="M19 51a13 13 0 0 1 26 0" fill="none" stroke="#ffffff" stroke-width="3" stroke-linecap="round"/>
5
+ <path d="M19 51a13 13 0 0 1 6.5-11.26" fill="none" stroke="#e5534b" stroke-width="3" stroke-linecap="round"/>
6
+ <path d="M38.5 39.74A13 13 0 0 1 45 51" fill="none" stroke="#3fb950" stroke-width="3" stroke-linecap="round"/>
7
+ <line x1="32" y1="51" x2="39" y2="42" stroke="#ffffff" stroke-width="3" stroke-linecap="round"/>
8
+ <circle cx="32" cy="51" r="3" fill="#ffffff"/>
9
+ </svg>
@@ -0,0 +1,5 @@
1
+ import type { INodeExecutionData, INodeType, INodeTypeDescription, IPollFunctions } from 'n8n-workflow';
2
+ export declare class SslLabsTrigger implements INodeType {
3
+ description: INodeTypeDescription;
4
+ poll(this: IPollFunctions): Promise<INodeExecutionData[][] | null>;
5
+ }