Skip to content

Commit 513c9d6

Browse files
committed
release v1.0.0
1 parent 9d9c129 commit 513c9d6

File tree

22 files changed

+986
-978
lines changed

22 files changed

+986
-978
lines changed

.eslintrc.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module.exports = {
1818
extraFileExtensions: ['.json'],
1919
},
2020

21-
ignorePatterns: ['.eslintrc.js', '**/*.js', '**/node_modules/**', '**/dist/**', 'nodes/Browserless/v1/**'],
21+
ignorePatterns: ['.eslintrc.js', '**/*.js', '**/node_modules/**', '**/dist/**', 'nodes/**'],
2222

2323
overrides: [
2424
{
@@ -48,5 +48,12 @@ module.exports = {
4848
'n8n-nodes-base/node-param-fixed-collection-type-unsorted-items': 'off',
4949
},
5050
},
51+
{
52+
files: ['./src/**/*.ts'],
53+
plugins: ['eslint-plugin-n8n-nodes-base'],
54+
rules: {
55+
'n8n-nodes-base/node-dirname-against-convention': 'off',
56+
},
57+
}
5158
],
5259
};

nodes.config.js

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,22 @@ module.exports = {
2121
targetDir: path.resolve(__dirname, 'nodes/Browserless/v2'),
2222
version: 2,
2323
tags: ['Browser REST APIs'],
24-
// operations: ['/pdf'],
24+
// operations: ['/pdf'],
2525
credentials: [{
2626
displayName: 'Browserless API',
2727
name: 'browserlessApi',
2828
required: true,
2929
}],
30-
requestDefaults: {
31-
headers: {
32-
'Content-Type': 'application/json',
33-
},
34-
baseURL: '=\{\{$credentials.url\}\}',
35-
},
30+
requestDefaults: {
31+
headers: {
32+
'Content-Type': 'application/json',
33+
},
34+
baseURL: '=\{\{$credentials.url\}\}',
35+
},
3636
propertiesOrder: [
3737
"operation",
3838
"url",
39-
'selector',
39+
'selector',
4040
"timeout",
4141
"userAgent",
4242
"viewport",
@@ -45,7 +45,7 @@ module.exports = {
4545
"setExtraHTTPHeaders",
4646
"cookies",
4747
"authenticate",
48-
'options',
48+
'options',
4949
"gotoOptions",
5050
"blockAds",
5151
"rejectRequestPattern",
@@ -74,27 +74,27 @@ module.exports = {
7474
},
7575
set: false,
7676
},
77-
{
78-
match: {
79-
name: 'url',
80-
},
81-
set: {
82-
required: true,
83-
}
84-
},
85-
{
86-
match: {
87-
name: 'code',
88-
},
89-
set: {
90-
typeOptions: {
91-
rows: 10,
92-
},
93-
default: `export default async function () {
77+
{
78+
match: {
79+
name: 'url',
80+
},
81+
set: {
82+
required: true,
83+
}
84+
},
85+
{
86+
match: {
87+
name: 'code',
88+
},
89+
set: {
90+
typeOptions: {
91+
rows: 10,
92+
},
93+
default: `export default async function () {
9494
return { hello: 'world!', type: 'application/json' };
9595
}
9696
`},
97-
},
97+
},
9898
{
9999
match: {
100100
name: 'launch',
@@ -194,11 +194,11 @@ module.exports = {
194194
if (slugs.every(slug => slug.startsWith('/'))) {
195195
const slug = slugs[0]
196196

197-
if (slug === '/function') {
198-
return 'Execute Function';
199-
}
197+
if (slug === '/function') {
198+
return 'Execute';
199+
}
200200

201-
return slug;
201+
return slug;
202202
}
203203

204204
return s;

nodes/Browserless/v2/helpers/hooks.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ export async function preSendActionCustonBody(
3434
return Promise.resolve(requestOptions);
3535
}
3636

37+
/* eslint-disable indent */
38+
/* tslint:disable:indent */
3739
export type PostReceiveAction =
3840
| ((
3941
this: IExecuteSingleFunctions,
@@ -47,17 +49,16 @@ export type PostReceiveAction =
4749
| IPostReceiveSet
4850
| IPostReceiveSetKeyValue
4951
| IPostReceiveSort;
52+
/* eslint-enable indent */
53+
/* tslint:enable:indent */
5054

5155
function getresponseContentType(response: IN8nHttpFullResponse): string {
5256
return response.headers['content-type'] as string;
5357
}
5458

5559
function getFileTypeFromContentType(contentType: string): string {
56-
// application/pdf -> pdf
57-
// image/jpeg -> jpeg
5860
const type = contentType.split(';')[0].trim();
5961

60-
// any/thing -> any
6162
if (type.includes('/')) {
6263
return type.split('/')[0];
6364
}

0 commit comments

Comments
 (0)