n8n-nodes-runrunit 0.2.2 → 0.2.4
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/dist/credentials/RunrunIt.credentials.d.ts +1 -0
- package/dist/credentials/RunrunIt.credentials.js +5 -11
- package/dist/credentials/RunrunIt.credentials.js.map +1 -1
- package/dist/nodes/RunrunIt/RunrunIt.node.d.ts +1 -1
- package/dist/nodes/RunrunIt/RunrunIt.node.js +61 -290
- package/dist/nodes/RunrunIt/RunrunIt.node.js.map +1 -1
- package/dist/nodes/RunrunIt/descriptions/TaskDescription.d.ts +5 -0
- package/dist/nodes/RunrunIt/descriptions/TaskDescription.js +221 -0
- package/dist/nodes/RunrunIt/descriptions/TaskDescription.js.map +1 -0
- package/dist/nodes/RunrunIt/transport.d.ts +2 -1
- package/dist/nodes/RunrunIt/transport.js +20 -97
- package/dist/nodes/RunrunIt/transport.js.map +1 -1
- package/dist/package.json +7 -19
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +44 -56
- package/LICENSE.md +0 -19
- package/README.md +0 -36
- package/dist/icons/glpi.dark.svg +0 -10
- package/dist/icons/glpi.svg +0 -10
- package/dist/icons/runrunit.dark.svg +0 -13
- package/dist/icons/runrunit.svg +0 -13
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TaskDescription = exports.taskFields = exports.taskOperations = void 0;
|
|
4
|
+
exports.taskOperations = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Operation',
|
|
7
|
+
name: 'operation',
|
|
8
|
+
type: 'options',
|
|
9
|
+
noDataExpression: true,
|
|
10
|
+
options: [
|
|
11
|
+
{ name: 'List', value: 'list', description: 'Get a list of tasks' },
|
|
12
|
+
{ name: 'Get', value: 'get', description: 'Get a task by ID' },
|
|
13
|
+
{ name: 'Create', value: 'create', description: 'Create a task' },
|
|
14
|
+
{ name: 'Update', value: 'update', description: 'Update a task' },
|
|
15
|
+
{ name: 'Delete', value: 'delete', description: 'Delete a task' },
|
|
16
|
+
{ name: 'Play', value: 'play', description: 'Play a task (start work)' },
|
|
17
|
+
{ name: 'Pause', value: 'pause', description: 'Pause a task' },
|
|
18
|
+
{ name: 'Deliver', value: 'deliver', description: 'Deliver a task' },
|
|
19
|
+
{ name: 'Reopen', value: 'reopen', description: 'Reopen a task' },
|
|
20
|
+
{ name: 'Mark as Urgent', value: 'mark_as_urgent', description: 'Mark a task as urgent' },
|
|
21
|
+
{ name: 'Move to Next Stage', value: 'move_to_next_stage', description: 'Move task to next board stage' },
|
|
22
|
+
{ name: 'Change Board', value: 'change_board', description: 'Change the task board/stage' },
|
|
23
|
+
{ name: 'Reestimate', value: 'reestimate', description: 'Update estimated time for a task' },
|
|
24
|
+
{ name: 'Assignment: Delete', value: 'assignment_delete', description: 'Delete a task assignment' },
|
|
25
|
+
{ name: 'Assignment: Play', value: 'assignment_play', description: 'Play an assignment' },
|
|
26
|
+
{ name: 'Assignment: Pause', value: 'assignment_pause', description: 'Pause an assignment' },
|
|
27
|
+
{ name: 'Assignment: Deliver', value: 'assignment_deliver', description: 'Deliver an assignment' },
|
|
28
|
+
{ name: 'Assignment: Reopen', value: 'assignment_reopen', description: 'Reopen an assignment' },
|
|
29
|
+
{ name: 'Assignment: Reposition', value: 'assignment_reposition', description: 'Reposition an assignment' },
|
|
30
|
+
{ name: 'Assignment: Reestimate', value: 'assignment_reestimate', description: 'Reestimate an assignment' },
|
|
31
|
+
],
|
|
32
|
+
default: 'list',
|
|
33
|
+
displayOptions: {
|
|
34
|
+
show: {
|
|
35
|
+
resource: ['task'],
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
];
|
|
40
|
+
exports.taskFields = [
|
|
41
|
+
{
|
|
42
|
+
displayName: 'Project ID',
|
|
43
|
+
name: 'project_id',
|
|
44
|
+
type: 'number',
|
|
45
|
+
default: 0,
|
|
46
|
+
placeholder: '800',
|
|
47
|
+
description: 'Filter by project id',
|
|
48
|
+
displayOptions: { show: { resource: ['task'], operation: ['list'] } },
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
displayName: 'Assignee ID',
|
|
52
|
+
name: 'assignee_id',
|
|
53
|
+
type: 'number',
|
|
54
|
+
default: 0,
|
|
55
|
+
description: 'Filter by assignee id',
|
|
56
|
+
displayOptions: { show: { resource: ['task'], operation: ['list'] } },
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
displayName: 'Status',
|
|
60
|
+
name: 'status',
|
|
61
|
+
type: 'options',
|
|
62
|
+
options: [
|
|
63
|
+
{ name: 'Open', value: 'open' },
|
|
64
|
+
{ name: 'Closed', value: 'closed' },
|
|
65
|
+
],
|
|
66
|
+
default: 'open',
|
|
67
|
+
description: 'Filter by status',
|
|
68
|
+
displayOptions: { show: { resource: ['task'], operation: ['list'] } },
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
displayName: 'Tags (comma separated)',
|
|
72
|
+
name: 'tags',
|
|
73
|
+
type: 'string',
|
|
74
|
+
default: '',
|
|
75
|
+
description: 'Filter by tags',
|
|
76
|
+
displayOptions: { show: { resource: ['task'], operation: ['list'] } },
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
displayName: 'Page',
|
|
80
|
+
name: 'page',
|
|
81
|
+
type: 'number',
|
|
82
|
+
default: 1,
|
|
83
|
+
description: 'Page number (pagination)',
|
|
84
|
+
displayOptions: { show: { resource: ['task'], operation: ['list'] } },
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
displayName: 'Limit',
|
|
88
|
+
name: 'limit',
|
|
89
|
+
type: 'number',
|
|
90
|
+
default: 50,
|
|
91
|
+
description: 'Items per page (max 100)',
|
|
92
|
+
displayOptions: { show: { resource: ['task'], operation: ['list'] } },
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
displayName: 'Task ID',
|
|
96
|
+
name: 'taskId',
|
|
97
|
+
type: 'number',
|
|
98
|
+
default: 0,
|
|
99
|
+
description: 'ID of the task',
|
|
100
|
+
displayOptions: { show: { resource: ['task'], operation: ['get', 'delete', 'play', 'pause', 'deliver', 'reopen', 'mark_as_urgent', 'move_to_next_stage', 'change_board', 'reestimate'] } },
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
displayName: 'Title',
|
|
104
|
+
name: 'title',
|
|
105
|
+
type: 'string',
|
|
106
|
+
default: '',
|
|
107
|
+
description: 'Task title',
|
|
108
|
+
displayOptions: { show: { resource: ['task'], operation: ['create', 'update'] } },
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
displayName: 'Project ID (create/update)',
|
|
112
|
+
name: 'project_id',
|
|
113
|
+
type: 'number',
|
|
114
|
+
default: 0,
|
|
115
|
+
description: 'Project id to associate the task with',
|
|
116
|
+
displayOptions: { show: { resource: ['task'], operation: ['create', 'update'] } },
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
displayName: 'Assignee ID',
|
|
120
|
+
name: 'assignee_id',
|
|
121
|
+
type: 'number',
|
|
122
|
+
default: 0,
|
|
123
|
+
description: 'Assign task to user id',
|
|
124
|
+
displayOptions: { show: { resource: ['task'], operation: ['create', 'update'] } },
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
displayName: 'Description',
|
|
128
|
+
name: 'description',
|
|
129
|
+
type: 'string',
|
|
130
|
+
typeOptions: { alwaysOpenEditWindow: true },
|
|
131
|
+
default: '',
|
|
132
|
+
description: 'Long description or content of the task',
|
|
133
|
+
displayOptions: { show: { resource: ['task'], operation: ['create', 'update'] } },
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
displayName: 'Desired Start Date',
|
|
137
|
+
name: 'desired_start_date',
|
|
138
|
+
type: 'dateTime',
|
|
139
|
+
default: '',
|
|
140
|
+
description: 'Desired start date (ISO 8601)',
|
|
141
|
+
displayOptions: { show: { resource: ['task'], operation: ['create', 'update'] } },
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
displayName: 'Desired Date',
|
|
145
|
+
name: 'desired_date',
|
|
146
|
+
type: 'dateTime',
|
|
147
|
+
default: '',
|
|
148
|
+
description: 'Desired delivery date (ISO 8601)',
|
|
149
|
+
displayOptions: { show: { resource: ['task'], operation: ['create', 'update'] } },
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
displayName: 'Points',
|
|
153
|
+
name: 'points',
|
|
154
|
+
type: 'number',
|
|
155
|
+
default: 0,
|
|
156
|
+
description: 'Scrum points or estimation metric',
|
|
157
|
+
displayOptions: { show: { resource: ['task'], operation: ['create', 'update'] } },
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
displayName: 'Tags (comma separated)',
|
|
161
|
+
name: 'tags_create',
|
|
162
|
+
type: 'string',
|
|
163
|
+
default: '',
|
|
164
|
+
description: 'Tags for the task (comma separated)',
|
|
165
|
+
displayOptions: { show: { resource: ['task'], operation: ['create', 'update'] } },
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
displayName: 'Board ID',
|
|
169
|
+
name: 'board_id',
|
|
170
|
+
type: 'number',
|
|
171
|
+
default: 0,
|
|
172
|
+
description: 'Target board id when changing board',
|
|
173
|
+
displayOptions: { show: { resource: ['task'], operation: ['change_board'] } },
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
displayName: 'Stage ID',
|
|
177
|
+
name: 'stage_id',
|
|
178
|
+
type: 'number',
|
|
179
|
+
default: 0,
|
|
180
|
+
description: 'Target stage id when changing board',
|
|
181
|
+
displayOptions: { show: { resource: ['task'], operation: ['change_board'] } },
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
displayName: 'Estimated Time (minutes)',
|
|
185
|
+
name: 'estimated_time',
|
|
186
|
+
type: 'number',
|
|
187
|
+
default: 0,
|
|
188
|
+
description: 'Estimated time in minutes for reestimate',
|
|
189
|
+
displayOptions: { show: { resource: ['task'], operation: ['reestimate'] } },
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
displayName: 'Assignment ID',
|
|
193
|
+
name: 'assignmentId',
|
|
194
|
+
type: 'number',
|
|
195
|
+
default: 0,
|
|
196
|
+
description: 'ID of the assignment (use with assignment operations)',
|
|
197
|
+
displayOptions: { show: { resource: ['task'], operation: ['assignment_delete', 'assignment_play', 'assignment_pause', 'assignment_deliver', 'assignment_reopen', 'assignment_reposition', 'assignment_reestimate'] } },
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
displayName: 'Position (reposition)',
|
|
201
|
+
name: 'position',
|
|
202
|
+
type: 'number',
|
|
203
|
+
default: 1,
|
|
204
|
+
description: 'New position when repositioning an assignment',
|
|
205
|
+
displayOptions: { show: { resource: ['task'], operation: ['assignment_reposition'] } },
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
displayName: 'Estimated Time (minutes) - assignment',
|
|
209
|
+
name: 'assignment_estimated_time',
|
|
210
|
+
type: 'number',
|
|
211
|
+
default: 0,
|
|
212
|
+
description: 'Estimated time in minutes when reestimating an assignment',
|
|
213
|
+
displayOptions: { show: { resource: ['task'], operation: ['assignment_reestimate'] } },
|
|
214
|
+
},
|
|
215
|
+
];
|
|
216
|
+
exports.TaskDescription = [
|
|
217
|
+
...exports.taskOperations,
|
|
218
|
+
...exports.taskFields,
|
|
219
|
+
];
|
|
220
|
+
exports.default = exports.TaskDescription;
|
|
221
|
+
//# sourceMappingURL=TaskDescription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskDescription.js","sourceRoot":"","sources":["../../../../nodes/RunrunIt/descriptions/TaskDescription.ts"],"names":[],"mappings":";;;AAEa,QAAA,cAAc,GAAsB;IAC/C;QACE,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE;YACP,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAA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,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,uBAAuB,CAAC,EAAE,EAAE;KACvF;IACD;QACE,WAAW,EAAE,uCAAuC;QACpD,IAAI,EAAE,2BAA2B;QACjC,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,CAAC;QACV,WAAW,EAAE,2DAA2D;QACxE,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,uBAAuB,CAAC,EAAE,EAAE;KACvF;CACF,CAAC;AAEW,QAAA,eAAe,GAAsB;IAChD,GAAG,sBAAc;IACjB,GAAG,kBAAU;CACd,CAAC;AAEF,kBAAe,uBAAe,CAAC"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-workflow';
|
|
2
|
+
export declare function runrunitApiRequest(this: IExecuteFunctions | ILoadOptionsFunctions, method: string, path: string, data?: any, params?: any): Promise<any>;
|
|
@@ -1,108 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
for (const part of parts) {
|
|
10
|
-
const m = part.match(/<([^>]+)>;\s*rel="([^"]+)"/);
|
|
11
|
-
if (m)
|
|
12
|
-
map[m[2]] = m[1];
|
|
3
|
+
exports.runrunitApiRequest = runrunitApiRequest;
|
|
4
|
+
const BASE_URL = 'https://runrun.it';
|
|
5
|
+
async function runrunitApiRequest(method, path, data, params) {
|
|
6
|
+
const credentials = await this.getCredentials('runrunitApi');
|
|
7
|
+
if (!credentials || !credentials.appKey || !credentials.userToken) {
|
|
8
|
+
throw new Error('Runrun.it credentials are missing (appKey/userToken)');
|
|
13
9
|
}
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
async function runRunrunRequest(method, endpoint, body, qs, returnAll = false) {
|
|
17
|
-
const sleep = (ms) => new Promise((resolve) => {
|
|
18
|
-
const timer = globalThis.setTimeout;
|
|
19
|
-
timer(() => resolve(), ms);
|
|
20
|
-
});
|
|
21
|
-
const creds = await this.getCredentials('runrunItApi');
|
|
22
|
-
const appKey = creds === null || creds === void 0 ? void 0 : creds.appKey;
|
|
23
|
-
const userToken = creds === null || creds === void 0 ? void 0 : creds.userToken;
|
|
24
|
-
const baseUrl = (creds === null || creds === void 0 ? void 0 : creds.baseUrl) || 'https://runrun.it';
|
|
25
|
-
if (!appKey || !userToken) {
|
|
26
|
-
throw new Error('Missing Runrun.it credentials (App Key / User Token)');
|
|
27
|
-
}
|
|
28
|
-
const apiBase = baseUrl.replace(/\/+$/g, '') + '/api/v1.0';
|
|
10
|
+
const url = `${BASE_URL}${path.startsWith('/') ? '' : '/'}${path}`;
|
|
29
11
|
const headers = {
|
|
30
|
-
'App-Key': appKey,
|
|
31
|
-
'User-Token': userToken,
|
|
12
|
+
'App-Key': credentials.appKey,
|
|
13
|
+
'User-Token': credentials.userToken,
|
|
32
14
|
'Content-Type': 'application/json',
|
|
15
|
+
Accept: 'application/json',
|
|
33
16
|
};
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const response = await this.helpers.httpRequest({
|
|
40
|
-
method,
|
|
41
|
-
url,
|
|
42
|
-
headers,
|
|
43
|
-
body: body === undefined ? undefined : body,
|
|
44
|
-
qs,
|
|
45
|
-
json: true,
|
|
46
|
-
});
|
|
47
|
-
if (response && typeof response === 'object' && 'body' in response && 'headers' in response) {
|
|
48
|
-
return response;
|
|
49
|
-
}
|
|
50
|
-
return { body: response, headers: {} };
|
|
51
|
-
}
|
|
52
|
-
catch (err) {
|
|
53
|
-
const status = (err === null || err === void 0 ? void 0 : err.statusCode) || (err === null || err === void 0 ? void 0 : err.status);
|
|
54
|
-
if (status === 429 && attempt < 3) {
|
|
55
|
-
attempt++;
|
|
56
|
-
const reset = ((_a = err === null || err === void 0 ? void 0 : err.headers) === null || _a === void 0 ? void 0 : _a['ratelimit-reset']) || ((_c = (_b = err === null || err === void 0 ? void 0 : err.response) === null || _b === void 0 ? void 0 : _b.headers) === null || _c === void 0 ? void 0 : _c['ratelimit-reset']);
|
|
57
|
-
let waitMs = 1000 * Math.pow(2, attempt);
|
|
58
|
-
if (reset) {
|
|
59
|
-
const ts = Number(reset);
|
|
60
|
-
if (!Number.isNaN(ts)) {
|
|
61
|
-
const ms = ts > 1e12 ? ts : ts * 1000;
|
|
62
|
-
const now = Date.now();
|
|
63
|
-
waitMs = Math.max(1000, ms - now);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
await sleep(waitMs);
|
|
67
|
-
continue;
|
|
68
|
-
}
|
|
69
|
-
throw err;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
17
|
+
const options = {
|
|
18
|
+
method: method,
|
|
19
|
+
url,
|
|
20
|
+
headers,
|
|
21
|
+
json: true,
|
|
72
22
|
};
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
const resp = await singleRequest.call(this, startUrl);
|
|
76
|
-
return resp.body;
|
|
23
|
+
if (typeof data !== 'undefined') {
|
|
24
|
+
options.body = data;
|
|
77
25
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
while (nextUrl) {
|
|
81
|
-
const resp = await singleRequest.call(this, nextUrl);
|
|
82
|
-
const body = resp.body;
|
|
83
|
-
const headers = (resp.headers || {});
|
|
84
|
-
if (Array.isArray(body)) {
|
|
85
|
-
allItems.push(...body);
|
|
86
|
-
}
|
|
87
|
-
else if (body && Array.isArray(body.data)) {
|
|
88
|
-
allItems.push(...body.data);
|
|
89
|
-
}
|
|
90
|
-
else if (body && Array.isArray(body.items)) {
|
|
91
|
-
allItems.push(...body.items);
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
allItems.push(body);
|
|
95
|
-
break;
|
|
96
|
-
}
|
|
97
|
-
const link = headers['link'] || headers['Link'];
|
|
98
|
-
const parsed = parseLinkHeader(link);
|
|
99
|
-
if (parsed && parsed.next) {
|
|
100
|
-
nextUrl = parsed.next;
|
|
101
|
-
}
|
|
102
|
-
else {
|
|
103
|
-
nextUrl = undefined;
|
|
104
|
-
}
|
|
26
|
+
if (typeof params !== 'undefined') {
|
|
27
|
+
options.qs = params;
|
|
105
28
|
}
|
|
106
|
-
return
|
|
29
|
+
return await this.helpers.httpRequest(options);
|
|
107
30
|
}
|
|
108
31
|
//# sourceMappingURL=transport.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.js","sourceRoot":"","sources":["../../../nodes/RunrunIt/transport.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"transport.js","sourceRoot":"","sources":["../../../nodes/RunrunIt/transport.ts"],"names":[],"mappings":";;AAQA,gDAyCC;AA3CD,MAAM,QAAQ,GAAG,mBAAmB,CAAC;AAE9B,KAAK,UAAU,kBAAkB,CAEtC,MAAc,EACd,IAAY,EACZ,IAAU,EACV,MAAY;IAEZ,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,aAAa,CAG1D,CAAC;IAEF,IAAI,CAAC,WAAW,IAAI,CAAC,WAAW,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC;QAClE,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;IAC1E,CAAC;IAED,MAAM,GAAG,GAAG,GAAG,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,EAAE,CAAC;IAEnE,MAAM,OAAO,GAAG;QACd,SAAS,EAAE,WAAW,CAAC,MAAM;QAC7B,YAAY,EAAE,WAAW,CAAC,SAAS;QACnC,cAAc,EAAE,kBAAkB;QAClC,MAAM,EAAE,kBAAkB;KACD,CAAC;IAE5B,MAAM,OAAO,GAAwB;QACnC,MAAM,EAAE,MAAa;QACrB,GAAG;QACH,OAAO;QACP,IAAI,EAAE,IAAI;KACX,CAAC;IAEF,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE,CAAC;QAChC,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IACtB,CAAC;IAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QAClC,OAAO,CAAC,EAAE,GAAG,MAAM,CAAC;IACtB,CAAC;IAED,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;AACjD,CAAC"}
|
package/dist/package.json
CHANGED
|
@@ -1,24 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-runrunit",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.2.4",
|
|
4
|
+
"description": "n8n nodes for Runrun.it API",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"homepage": "https://github.com/YeshShareDEV/n8n-nodes-runrunit",
|
|
7
|
-
"keywords": [
|
|
8
|
-
"n8n-community-node-package",
|
|
9
|
-
"n8n",
|
|
10
|
-
"runrun.it",
|
|
11
|
-
"runrun",
|
|
12
|
-
"tasks",
|
|
13
|
-
"project-management"
|
|
14
|
-
],
|
|
15
6
|
"author": {
|
|
16
7
|
"name": "Marcos Campos",
|
|
17
|
-
"email": "
|
|
18
|
-
},
|
|
19
|
-
"repository": {
|
|
20
|
-
"type": "git",
|
|
21
|
-
"url": "https://github.com/YeshShareDEV/n8n-nodes-runrunit.git"
|
|
8
|
+
"email": "contato@yeshshare.com.br"
|
|
22
9
|
},
|
|
23
10
|
"scripts": {
|
|
24
11
|
"build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true});\" && n8n-node build",
|
|
@@ -26,15 +13,13 @@
|
|
|
26
13
|
"dev": "n8n-node dev",
|
|
27
14
|
"lint": "n8n-node lint",
|
|
28
15
|
"lint:fix": "n8n-node lint --fix",
|
|
29
|
-
"release": "n8n-node release"
|
|
30
|
-
"ver:patch": "npm version patch -m \"chore(release): %s\" && git push --follow-tags"
|
|
16
|
+
"release": "n8n-node release"
|
|
31
17
|
},
|
|
32
18
|
"files": [
|
|
33
19
|
"dist"
|
|
34
20
|
],
|
|
35
21
|
"n8n": {
|
|
36
22
|
"n8nNodesApiVersion": 1,
|
|
37
|
-
"strict": true,
|
|
38
23
|
"credentials": [
|
|
39
24
|
"dist/credentials/RunrunIt.credentials.js"
|
|
40
25
|
],
|
|
@@ -44,7 +29,10 @@
|
|
|
44
29
|
},
|
|
45
30
|
"devDependencies": {
|
|
46
31
|
"@n8n/node-cli": "*",
|
|
32
|
+
"eslint": "9.32.0",
|
|
47
33
|
"n8n-workflow": "^1.120.9",
|
|
34
|
+
"@types/node": "^20.0.0",
|
|
35
|
+
"prettier": "3.6.2",
|
|
48
36
|
"typescript": "5.9.2"
|
|
49
37
|
},
|
|
50
38
|
"peerDependencies": {
|