n8n-nodes-nvk-call-api 0.0.4 → 0.0.6
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.
|
@@ -29,10 +29,28 @@ exports.nvkBrowserApiDescription = {
|
|
|
29
29
|
name: 'Docker',
|
|
30
30
|
value: 'docker',
|
|
31
31
|
},
|
|
32
|
+
{
|
|
33
|
+
name: 'Tunnel (Custom URL)',
|
|
34
|
+
value: 'tunnel',
|
|
35
|
+
},
|
|
32
36
|
],
|
|
33
37
|
default: 'local',
|
|
34
38
|
description: 'Choose the environment to connect to',
|
|
35
39
|
},
|
|
40
|
+
{
|
|
41
|
+
displayName: 'Tunnel URL',
|
|
42
|
+
name: 'tunnelUrl',
|
|
43
|
+
type: 'string',
|
|
44
|
+
displayOptions: {
|
|
45
|
+
show: {
|
|
46
|
+
environment: ['tunnel'],
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
default: '',
|
|
50
|
+
placeholder: 'https://abc123.ngrok.io',
|
|
51
|
+
description: 'Enter your tunnel URL (ngrok, Cloudflare Tunnel, etc.)',
|
|
52
|
+
required: true,
|
|
53
|
+
},
|
|
36
54
|
{
|
|
37
55
|
displayName: 'Resource',
|
|
38
56
|
name: 'resource',
|
|
@@ -64,32 +82,32 @@ exports.nvkBrowserApiDescription = {
|
|
|
64
82
|
{
|
|
65
83
|
name: 'Create Profile',
|
|
66
84
|
value: 'createProfile',
|
|
67
|
-
action: 'Create
|
|
85
|
+
action: 'Create Profile',
|
|
68
86
|
},
|
|
69
87
|
{
|
|
70
88
|
name: 'Delete Profile',
|
|
71
89
|
value: 'deleteProfile',
|
|
72
|
-
action: 'Delete
|
|
90
|
+
action: 'Delete Profile',
|
|
73
91
|
},
|
|
74
92
|
{
|
|
75
93
|
name: 'Start Profile',
|
|
76
94
|
value: 'startProfile',
|
|
77
|
-
action: 'Start
|
|
95
|
+
action: 'Start Profile',
|
|
78
96
|
},
|
|
79
97
|
{
|
|
80
98
|
name: 'Stop Profile',
|
|
81
99
|
value: 'stopProfile',
|
|
82
|
-
action: 'Stop
|
|
100
|
+
action: 'Stop Profile',
|
|
83
101
|
},
|
|
84
102
|
{
|
|
85
103
|
name: 'Update Profile',
|
|
86
104
|
value: 'updateProfile',
|
|
87
|
-
action: 'Update
|
|
105
|
+
action: 'Update Profile',
|
|
88
106
|
},
|
|
89
107
|
{
|
|
90
108
|
name: 'Download Browser',
|
|
91
109
|
value: 'downloadBrowser',
|
|
92
|
-
action: 'Download
|
|
110
|
+
action: 'Download Browser',
|
|
93
111
|
},
|
|
94
112
|
],
|
|
95
113
|
default: 'createProfile',
|
|
@@ -108,22 +126,22 @@ exports.nvkBrowserApiDescription = {
|
|
|
108
126
|
{
|
|
109
127
|
name: 'Move and Click',
|
|
110
128
|
value: 'moveAndClick',
|
|
111
|
-
action: 'Move and
|
|
129
|
+
action: 'Move and Click',
|
|
112
130
|
},
|
|
113
131
|
{
|
|
114
132
|
name: 'Run JavaScript',
|
|
115
133
|
value: 'runJavaScript',
|
|
116
|
-
action: '
|
|
134
|
+
action: 'Run JavaScript',
|
|
117
135
|
},
|
|
118
136
|
{
|
|
119
137
|
name: 'Get Network Response',
|
|
120
138
|
value: 'getNetworkResponse',
|
|
121
|
-
action: '
|
|
139
|
+
action: 'Get Network Response',
|
|
122
140
|
},
|
|
123
141
|
{
|
|
124
142
|
name: 'Browser HTTP Request',
|
|
125
143
|
value: 'browserHttpRequest',
|
|
126
|
-
action: 'Make HTTP requests using
|
|
144
|
+
action: 'Make HTTP requests using Browser',
|
|
127
145
|
},
|
|
128
146
|
],
|
|
129
147
|
default: 'moveAndClick',
|
|
@@ -14,9 +14,16 @@ class NvkBrowserApi {
|
|
|
14
14
|
const environment = this.getNodeParameter('environment', i);
|
|
15
15
|
const resource = this.getNodeParameter('resource', i);
|
|
16
16
|
const operation = this.getNodeParameter('operation', i);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
let baseUrl;
|
|
18
|
+
if (environment === 'docker') {
|
|
19
|
+
baseUrl = 'http://host.docker.internal:3000';
|
|
20
|
+
}
|
|
21
|
+
else if (environment === 'tunnel') {
|
|
22
|
+
baseUrl = this.getNodeParameter('tunnelUrl', i).replace(/\/$/, '');
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
baseUrl = 'http://localhost:3000';
|
|
26
|
+
}
|
|
20
27
|
let endpoint = '';
|
|
21
28
|
let body = {};
|
|
22
29
|
if (resource === 'profileManagement') {
|