n8n-nodes-base 1.95.1 → 1.96.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.
- package/dist/credentials/PerplexityApi.credentials.js +1 -1
- package/dist/credentials/PerplexityApi.credentials.js.map +1 -1
- package/dist/nodes/Adalo/__schema__/v1.0.0/collection/getAll.json +21 -0
- package/dist/nodes/Airtable/test/v2/node/helpers.js +12 -2
- package/dist/nodes/Airtable/test/v2/node/helpers.js.map +1 -1
- package/dist/nodes/Airtop/__schema__/v1.0.0/extraction/query.json +7 -1
- package/dist/nodes/Airtop/__schema__/v1.0.0/session/create.json +9 -0
- package/dist/nodes/Airtop/__schema__/v1.0.0/window/create.json +40 -0
- package/dist/nodes/Airtop/test/node/helpers.js +12 -2
- package/dist/nodes/Airtop/test/node/helpers.js.map +1 -1
- package/dist/nodes/Asana/__schema__/v1.0.0/subtask/getAll.json +4 -1
- package/dist/nodes/Aws/S3/__schema__/v2.0.0/file/getAll.json +7 -1
- package/dist/nodes/Aws/S3/__schema__/v2.0.0/folder/getAll.json +7 -1
- package/dist/nodes/BambooHr/__schema__/v1.0.0/employee/getAll.json +1 -4
- package/dist/nodes/ClickUp/__schema__/v1.0.0/list/customFields.json +23 -1
- package/dist/nodes/Code/Pyodide.js +24 -0
- package/dist/nodes/Code/Pyodide.js.map +1 -1
- package/dist/nodes/CompareDatasets/GenericFunctions.js +5 -5
- package/dist/nodes/CompareDatasets/GenericFunctions.js.map +1 -1
- package/dist/nodes/Discord/__schema__/v2.0.0/message/sendAndWait.json +14 -0
- package/dist/nodes/Discord/v2/helpers/utils.js +2 -2
- package/dist/nodes/Discord/v2/helpers/utils.js.map +1 -1
- package/dist/nodes/Dropbox/__schema__/v1.0.0/file/download.json +31 -1
- package/dist/nodes/Dropcontact/__schema__/v1.0.0/contact/enrich.json +15 -1
- package/dist/nodes/Dropcontact/__schema__/v1.0.0/contact/fetchRequest.json +50 -0
- package/dist/nodes/EmailReadImap/v2/utils.js +16 -3
- package/dist/nodes/EmailReadImap/v2/utils.js.map +1 -1
- package/dist/nodes/EmailSend/__schema__/v2.1.0/email/send.json +1 -7
- package/dist/nodes/Evaluation/EvaluationTrigger/EvaluationTrigger.node.ee.js +1 -1
- package/dist/nodes/Evaluation/EvaluationTrigger/EvaluationTrigger.node.ee.js.map +1 -1
- package/dist/nodes/ExecuteWorkflow/ExecuteWorkflowTrigger/ExecuteWorkflowTrigger.node.js +2 -2
- package/dist/nodes/ExecuteWorkflow/ExecuteWorkflowTrigger/ExecuteWorkflowTrigger.node.js.map +1 -1
- package/dist/nodes/Freshservice/GenericFunctions.js +12 -2
- package/dist/nodes/Freshservice/GenericFunctions.js.map +1 -1
- package/dist/nodes/Google/Ads/__schema__/v1.0.0/campaign/getAll.json +13 -1
- package/dist/nodes/Google/Analytics/__schema__/v2.0.0/report/get.json +1 -4
- package/dist/nodes/Google/Calendar/__schema__/v1.3.0/event/getAll.json +1 -4
- package/dist/nodes/Google/Chat/__schema__/v1.0.0/message/create.json +30 -1
- package/dist/nodes/Google/Drive/__schema__/v3.0.0/file/upload.json +4 -1
- package/dist/nodes/Google/Drive/test/v2/node/helpers.js +12 -2
- package/dist/nodes/Google/Drive/test/v2/node/helpers.js.map +1 -1
- package/dist/nodes/Google/Firebase/CloudFirestore/__schema__/v1.1.0/document/query.json +1 -7
- package/dist/nodes/Google/Gmail/__schema__/v2.1.0/message/addLabels.json +13 -1
- package/dist/nodes/Google/Gmail/__schema__/v2.1.0/message/get.json +1 -7
- package/dist/nodes/Google/Gmail/__schema__/v2.1.0/message/markAsRead.json +13 -1
- package/dist/nodes/Google/Gmail/__schema__/v2.1.0/thread/addLabels.json +16 -1
- package/dist/nodes/Google/Sheet/v2/actions/sheet/update.operation.js +10 -4
- package/dist/nodes/Google/Sheet/v2/actions/sheet/update.operation.js.map +1 -1
- package/dist/nodes/HaloPSA/__schema__/v1.0.0/ticket/getAll.json +1 -268
- package/dist/nodes/HttpRequest/shared/optimizeResponse.js +5 -3
- package/dist/nodes/HttpRequest/shared/optimizeResponse.js.map +1 -1
- package/dist/nodes/Hubspot/__schema__/v2.1.0/company/getAll.json +1 -4
- package/dist/nodes/Hubspot/__schema__/v2.1.0/deal/getAll.json +64 -1
- package/dist/nodes/Hubspot/__schema__/v2.1.0/deal/search.json +1 -4
- package/dist/nodes/Hubspot/__schema__/v2.1.0/ticket/get.json +1 -61
- package/dist/nodes/JinaAI/__schema__/v1.0.0/reader/read.json +26 -0
- package/dist/nodes/Jira/__schema__/v1.0.0/issue/get.json +604 -7
- package/dist/nodes/Jira/__schema__/v1.0.0/issue/getAll.json +1 -110
- package/dist/nodes/Lemlist/__schema__/v2.0.0/lead/create.json +1 -4
- package/dist/nodes/Lemlist/__schema__/v2.0.0/lead/get.json +30 -0
- package/dist/nodes/Line/__schema__/v1.0.0/notification/send.json +4 -7
- package/dist/nodes/Linear/__schema__/v1.0.0/issue/getAll.json +12 -1
- package/dist/nodes/LocalFileTrigger/LocalFileTrigger.node.js +23 -3
- package/dist/nodes/LocalFileTrigger/LocalFileTrigger.node.js.map +1 -1
- package/dist/nodes/Microsoft/Entra/__schema__/v1.0.0/user/getAll.json +1 -7
- package/dist/nodes/Microsoft/Entra/descriptions/GroupDescription.js +12 -2
- package/dist/nodes/Microsoft/Entra/descriptions/GroupDescription.js.map +1 -1
- package/dist/nodes/Microsoft/Entra/descriptions/UserDescription.js +13 -3
- package/dist/nodes/Microsoft/Entra/descriptions/UserDescription.js.map +1 -1
- package/dist/nodes/Microsoft/OneDrive/__schema__/v1.0.0/file/download.json +23 -10
- package/dist/nodes/Microsoft/OneDrive/__schema__/v1.0.0/folder/create.json +1 -15
- package/dist/nodes/Microsoft/Outlook/__schema__/v2.0.0/event/getAll.json +1 -4
- package/dist/nodes/Microsoft/Outlook/__schema__/v2.0.0/folderMessage/getAll.json +124 -1
- package/dist/nodes/Microsoft/Outlook/__schema__/v2.0.0/message/getAll.json +1 -56
- package/dist/nodes/Microsoft/Sql/MicrosoftSql.node.js +12 -2
- package/dist/nodes/Microsoft/Sql/MicrosoftSql.node.js.map +1 -1
- package/dist/nodes/Microsoft/Storage/__schema__/v1.0.0/blob/create.json +39 -0
- package/dist/nodes/Microsoft/Storage/__schema__/v1.0.0/blob/get.json +44 -0
- package/dist/nodes/Microsoft/ToDo/__schema__/v1.0.0/task/getAll.json +5 -21
- package/dist/nodes/N8n/WorkflowDescription.js +40 -0
- package/dist/nodes/N8n/WorkflowDescription.js.map +1 -1
- package/dist/nodes/Nasa/__schema__/v1.0.0/donkiSolarFlare/get.json +1 -4
- package/dist/nodes/Notion/__schema__/v2.2.0/database/get.json +2 -149
- package/dist/nodes/Odoo/__schema__/v1.0.0/contact/get.json +1 -4
- package/dist/nodes/Odoo/__schema__/v1.0.0/contact/getAll.json +1 -10
- package/dist/nodes/Odoo/__schema__/v1.0.0/opportunity/getAll.json +1 -40
- package/dist/nodes/OpenAi/__schema__/v1.1.0/chat/complete.json +29 -1
- package/dist/nodes/Pipedrive/__schema__/v1.0.0/person/search.json +7 -1
- package/dist/nodes/QuickBase/__schema__/v1.0.0/record/getAll.json +9 -0
- package/dist/nodes/QuickBooks/__schema__/v1.0.0/transaction/getReport.json +4 -1
- package/dist/nodes/RssFeedRead/RssFeedRead.node.js +9 -3
- package/dist/nodes/RssFeedRead/RssFeedRead.node.js.map +1 -1
- package/dist/nodes/S3/__schema__/v1.0.0/file/download.json +21 -0
- package/dist/nodes/Salesforce/__schema__/v1.0.0/customObject/getAll.json +1 -4
- package/dist/nodes/Salesforce/__schema__/v1.0.0/lead/getAll.json +1 -4
- package/dist/nodes/Salesforce/__schema__/v1.0.0/opportunity/getAll.json +1 -4
- package/dist/nodes/Salesforce/__schema__/v1.0.0/search/query.json +1 -4
- package/dist/nodes/Shopify/__schema__/v1.0.0/order/getAll.json +250 -3
- package/dist/nodes/Slack/__schema__/v2.3.0/channel/history.json +1 -50
- package/dist/nodes/Slack/__schema__/v2.3.0/channel/member.json +168 -2
- package/dist/nodes/Slack/__schema__/v2.3.0/message/post.json +1 -4
- package/dist/nodes/Sms77/__schema__/v1.0.0/sms/send.json +1 -10
- package/dist/nodes/Strapi/__schema__/v1.0.0/entry/getAll.json +10 -1
- package/dist/nodes/Telegram/__schema__/v1.2.0/chat/member.json +1 -4
- package/dist/nodes/Telegram/__schema__/v1.2.0/message/editMessageText.json +4 -1
- package/dist/nodes/Telegram/__schema__/v1.2.0/message/sendAndWait.json +14 -0
- package/dist/nodes/Telegram/__schema__/v1.2.0/message/sendMessage.json +4 -21
- package/dist/nodes/Telegram/__schema__/v1.2.0/message/sendPhoto.json +1 -7
- package/dist/nodes/Telegram/tests/Helpers.js +12 -2
- package/dist/nodes/Telegram/tests/Helpers.js.map +1 -1
- package/dist/nodes/Transform/RemoveDuplicates/utils.js +8 -6
- package/dist/nodes/Transform/RemoveDuplicates/utils.js.map +1 -1
- package/dist/nodes/Trello/__schema__/v1.0.0/list/getAll.json +1 -4
- package/dist/nodes/Trello/__schema__/v1.0.0/list/getCards.json +1 -4
- package/dist/nodes/Twitter/__schema__/v2.0.0/tweet/search.json +7 -1
- package/dist/nodes/Wordpress/__schema__/v1.0.0/post/get.json +1 -7
- package/dist/nodes/Zoho/__schema__/v1.0.0/contact/getAll.json +1 -4
- package/dist/nodes/Zoho/__schema__/v1.0.0/lead/getAll.json +99 -1
- package/dist/test/nodes/Helpers.js +12 -2
- package/dist/test/nodes/Helpers.js.map +1 -1
- package/dist/types/credentials.json +1 -1
- package/dist/types/nodes.json +13 -13
- package/dist/utils/binary.js +12 -9
- package/dist/utils/binary.js.map +1 -1
- package/dist/utils/sendAndWait/utils.js +20 -5
- package/dist/utils/sendAndWait/utils.js.map +1 -1
- package/dist/utils/utilities.js +31 -16
- package/dist/utils/utilities.js.map +1 -1
- package/dist/utils/workflowInputsResourceMapping/GenericFunctions.js +2 -2
- package/dist/utils/workflowInputsResourceMapping/GenericFunctions.js.map +1 -1
- package/package.json +8 -8
|
@@ -7,115 +7,6 @@
|
|
|
7
7
|
"fields": {
|
|
8
8
|
"type": "object",
|
|
9
9
|
"properties": {
|
|
10
|
-
"created": {
|
|
11
|
-
"type": "string"
|
|
12
|
-
},
|
|
13
|
-
"issuetype": {
|
|
14
|
-
"type": "object",
|
|
15
|
-
"properties": {
|
|
16
|
-
"avatarId": {
|
|
17
|
-
"type": "integer"
|
|
18
|
-
},
|
|
19
|
-
"description": {
|
|
20
|
-
"type": "string"
|
|
21
|
-
},
|
|
22
|
-
"entityId": {
|
|
23
|
-
"type": "string"
|
|
24
|
-
},
|
|
25
|
-
"hierarchyLevel": {
|
|
26
|
-
"type": "integer"
|
|
27
|
-
},
|
|
28
|
-
"iconUrl": {
|
|
29
|
-
"type": "string"
|
|
30
|
-
},
|
|
31
|
-
"id": {
|
|
32
|
-
"type": "string"
|
|
33
|
-
},
|
|
34
|
-
"name": {
|
|
35
|
-
"type": "string"
|
|
36
|
-
},
|
|
37
|
-
"self": {
|
|
38
|
-
"type": "string"
|
|
39
|
-
},
|
|
40
|
-
"subtask": {
|
|
41
|
-
"type": "boolean"
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
"labels": {
|
|
46
|
-
"type": "array",
|
|
47
|
-
"items": {
|
|
48
|
-
"type": "string"
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
"priority": {
|
|
52
|
-
"type": "object",
|
|
53
|
-
"properties": {
|
|
54
|
-
"iconUrl": {
|
|
55
|
-
"type": "string"
|
|
56
|
-
},
|
|
57
|
-
"id": {
|
|
58
|
-
"type": "string"
|
|
59
|
-
},
|
|
60
|
-
"name": {
|
|
61
|
-
"type": "string"
|
|
62
|
-
},
|
|
63
|
-
"self": {
|
|
64
|
-
"type": "string"
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
"progress": {
|
|
69
|
-
"type": "object",
|
|
70
|
-
"properties": {
|
|
71
|
-
"progress": {
|
|
72
|
-
"type": "integer"
|
|
73
|
-
},
|
|
74
|
-
"total": {
|
|
75
|
-
"type": "integer"
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
"project": {
|
|
80
|
-
"type": "object",
|
|
81
|
-
"properties": {
|
|
82
|
-
"avatarUrls": {
|
|
83
|
-
"type": "object",
|
|
84
|
-
"properties": {
|
|
85
|
-
"16x16": {
|
|
86
|
-
"type": "string"
|
|
87
|
-
},
|
|
88
|
-
"24x24": {
|
|
89
|
-
"type": "string"
|
|
90
|
-
},
|
|
91
|
-
"32x32": {
|
|
92
|
-
"type": "string"
|
|
93
|
-
},
|
|
94
|
-
"48x48": {
|
|
95
|
-
"type": "string"
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
"id": {
|
|
100
|
-
"type": "string"
|
|
101
|
-
},
|
|
102
|
-
"key": {
|
|
103
|
-
"type": "string"
|
|
104
|
-
},
|
|
105
|
-
"name": {
|
|
106
|
-
"type": "string"
|
|
107
|
-
},
|
|
108
|
-
"projectTypeKey": {
|
|
109
|
-
"type": "string"
|
|
110
|
-
},
|
|
111
|
-
"self": {
|
|
112
|
-
"type": "string"
|
|
113
|
-
},
|
|
114
|
-
"simplified": {
|
|
115
|
-
"type": "boolean"
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
10
|
"status": {
|
|
120
11
|
"type": "object",
|
|
121
12
|
"properties": {
|
|
@@ -171,5 +62,5 @@
|
|
|
171
62
|
"type": "string"
|
|
172
63
|
}
|
|
173
64
|
},
|
|
174
|
-
"version":
|
|
65
|
+
"version": 4
|
|
175
66
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"properties": {
|
|
4
|
+
"_id": {
|
|
5
|
+
"type": "string"
|
|
6
|
+
},
|
|
7
|
+
"campaignId": {
|
|
8
|
+
"type": "string"
|
|
9
|
+
},
|
|
10
|
+
"companyName": {
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
"email": {
|
|
14
|
+
"type": "string"
|
|
15
|
+
},
|
|
16
|
+
"firstName": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
},
|
|
19
|
+
"isPaused": {
|
|
20
|
+
"type": "boolean"
|
|
21
|
+
},
|
|
22
|
+
"lastName": {
|
|
23
|
+
"type": "string"
|
|
24
|
+
},
|
|
25
|
+
"phone": {
|
|
26
|
+
"type": "string"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"version": 1
|
|
30
|
+
}
|
|
@@ -7,6 +7,17 @@
|
|
|
7
7
|
"createdAt": {
|
|
8
8
|
"type": "string"
|
|
9
9
|
},
|
|
10
|
+
"creator": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"properties": {
|
|
13
|
+
"displayName": {
|
|
14
|
+
"type": "string"
|
|
15
|
+
},
|
|
16
|
+
"id": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
10
21
|
"id": {
|
|
11
22
|
"type": "string"
|
|
12
23
|
},
|
|
@@ -31,5 +42,5 @@
|
|
|
31
42
|
"type": "string"
|
|
32
43
|
}
|
|
33
44
|
},
|
|
34
|
-
"version":
|
|
45
|
+
"version": 3
|
|
35
46
|
}
|
|
@@ -157,8 +157,8 @@ class LocalFileTrigger {
|
|
|
157
157
|
name: "ignored",
|
|
158
158
|
type: "string",
|
|
159
159
|
default: "",
|
|
160
|
-
placeholder: "**/*.txt",
|
|
161
|
-
description:
|
|
160
|
+
placeholder: "**/*.txt or ignore-me/subfolder",
|
|
161
|
+
description: `Files or paths to ignore. The whole path is tested, not just the filename.\xA0Supports <a href="https://github.com/micromatch/anymatch">Anymatch</a>- syntax. Regex patterns may not work on macOS. To ignore files based on substring matching, use the 'Ignore Mode' option with 'Contain'.`
|
|
162
162
|
},
|
|
163
163
|
{
|
|
164
164
|
displayName: "Ignore Existing Files/Folders",
|
|
@@ -210,6 +210,25 @@ class LocalFileTrigger {
|
|
|
210
210
|
type: "boolean",
|
|
211
211
|
default: false,
|
|
212
212
|
description: "Whether to use polling for watching. Typically necessary to successfully watch files over a network."
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
displayName: "Ignore Mode",
|
|
216
|
+
name: "ignoreMode",
|
|
217
|
+
type: "options",
|
|
218
|
+
options: [
|
|
219
|
+
{
|
|
220
|
+
name: "Match",
|
|
221
|
+
value: "match",
|
|
222
|
+
description: "Ignore files using regex patterns (e.g., **/*.txt), Not supported on macOS"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
name: "Contain",
|
|
226
|
+
value: "contain",
|
|
227
|
+
description: "Ignore files if their path contains the specified value"
|
|
228
|
+
}
|
|
229
|
+
],
|
|
230
|
+
default: "match",
|
|
231
|
+
description: "Whether to ignore files using regex matching (Anymatch patterns) or by checking if the path contains a specified value"
|
|
213
232
|
}
|
|
214
233
|
]
|
|
215
234
|
}
|
|
@@ -226,8 +245,9 @@ class LocalFileTrigger {
|
|
|
226
245
|
} else {
|
|
227
246
|
events = this.getNodeParameter("events", []);
|
|
228
247
|
}
|
|
248
|
+
const ignored = options.ignored === "" ? void 0 : options.ignored;
|
|
229
249
|
const watcher = (0, import_chokidar.watch)(path, {
|
|
230
|
-
ignored: options.
|
|
250
|
+
ignored: options.ignoreMode === "match" ? ignored : (x) => x.includes(ignored),
|
|
231
251
|
persistent: true,
|
|
232
252
|
ignoreInitial: options.ignoreInitial === void 0 ? true : options.ignoreInitial,
|
|
233
253
|
followSymlinks: options.followSymlinks === void 0 ? true : options.followSymlinks,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../nodes/LocalFileTrigger/LocalFileTrigger.node.ts"],"sourcesContent":["import { watch } from 'chokidar';\nimport {\n\ttype ITriggerFunctions,\n\ttype IDataObject,\n\ttype INodeType,\n\ttype INodeTypeDescription,\n\ttype ITriggerResponse,\n\tNodeConnectionTypes,\n} from 'n8n-workflow';\n\nexport class LocalFileTrigger implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Local File Trigger',\n\t\tname: 'localFileTrigger',\n\t\ticon: 'fa:folder-open',\n\t\ticonColor: 'black',\n\t\tgroup: ['trigger'],\n\t\tversion: 1,\n\t\tsubtitle: '=Path: {{$parameter[\"path\"]}}',\n\t\tdescription: 'Triggers a workflow on file system changes',\n\t\teventTriggerDescription: '',\n\t\tdefaults: {\n\t\t\tname: 'Local File Trigger',\n\t\t\tcolor: '#404040',\n\t\t},\n\t\ttriggerPanel: {\n\t\t\theader: '',\n\t\t\texecutionsHelp: {\n\t\t\t\tinactive:\n\t\t\t\t\t\"<b>While building your workflow</b>, click the 'execute step' button, then make a change to your watched file or folder. This will trigger an execution, which will show up in this editor.<br /> <br /><b>Once you're happy with your workflow</b>, <a data-key='activate'>activate</a> it. Then every time a change is detected, the workflow will execute. These executions will show up in the <a data-key='executions'>executions list</a>, but not in the editor.\",\n\t\t\t\tactive:\n\t\t\t\t\t\"<b>While building your workflow</b>, click the 'execute step' button, then make a change to your watched file or folder. This will trigger an execution, which will show up in this editor.<br /> <br /><b>Your workflow will also execute automatically</b>, since it's activated. Every time a change is detected, this node will trigger an execution. These executions will show up in the <a data-key='executions'>executions list</a>, but not in the editor.\",\n\t\t\t},\n\t\t\tactivationHint:\n\t\t\t\t\"Once you’ve finished building your workflow, <a data-key='activate'>activate</a> it to have it also listen continuously (you just won’t see those executions here).\",\n\t\t},\n\t\tinputs: [],\n\t\toutputs: [NodeConnectionTypes.Main],\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Trigger On',\n\t\t\t\tname: 'triggerOn',\n\t\t\t\ttype: 'options',\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Changes to a Specific File',\n\t\t\t\t\t\tvalue: 'file',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Changes Involving a Specific Folder',\n\t\t\t\t\t\tvalue: 'folder',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\trequired: true,\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'File to Watch',\n\t\t\t\tname: 'path',\n\t\t\t\ttype: 'string',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\ttriggerOn: ['file'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '',\n\t\t\t\tplaceholder: '/data/invoices/1.pdf',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Folder to Watch',\n\t\t\t\tname: 'path',\n\t\t\t\ttype: 'string',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\ttriggerOn: ['folder'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '',\n\t\t\t\tplaceholder: '/data/invoices',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Watch for',\n\t\t\t\tname: 'events',\n\t\t\t\ttype: 'multiOptions',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\ttriggerOn: ['folder'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'File Added',\n\t\t\t\t\t\tvalue: 'add',\n\t\t\t\t\t\tdescription: 'Triggers whenever a new file was added',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'File Changed',\n\t\t\t\t\t\tvalue: 'change',\n\t\t\t\t\t\tdescription: 'Triggers whenever a file was changed',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'File Deleted',\n\t\t\t\t\t\tvalue: 'unlink',\n\t\t\t\t\t\tdescription: 'Triggers whenever a file was deleted',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Folder Added',\n\t\t\t\t\t\tvalue: 'addDir',\n\t\t\t\t\t\tdescription: 'Triggers whenever a new folder was added',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Folder Deleted',\n\t\t\t\t\t\tvalue: 'unlinkDir',\n\t\t\t\t\t\tdescription: 'Triggers whenever a folder was deleted',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\trequired: true,\n\t\t\t\tdefault: [],\n\t\t\t\tdescription: 'The events to listen to',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tdisplayName: 'Options',\n\t\t\t\tname: 'options',\n\t\t\t\ttype: 'collection',\n\t\t\t\tplaceholder: 'Add option',\n\t\t\t\tdefault: {},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Await Write Finish',\n\t\t\t\t\t\tname: 'awaitWriteFinish',\n\t\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\t\tdefault: false,\n\t\t\t\t\t\tdescription: 'Whether to wait until files finished writing to avoid partially read',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Include Linked Files/Folders',\n\t\t\t\t\t\tname: 'followSymlinks',\n\t\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\t\tdefault: true,\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Whether linked files/folders will also be watched (this includes symlinks, aliases on MacOS and shortcuts on Windows). Otherwise only the links themselves will be monitored).',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Ignore',\n\t\t\t\t\t\tname: 'ignored',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tplaceholder: '**/*.txt',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Files or paths to ignore. The whole path is tested, not just the filename. Supports <a href=\"https://github.com/micromatch/anymatch\">Anymatch</a>- syntax.',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Ignore Existing Files/Folders',\n\t\t\t\t\t\tname: 'ignoreInitial',\n\t\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\t\tdefault: true,\n\t\t\t\t\t\tdescription: 'Whether to ignore existing files/folders to not trigger an event',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Max Folder Depth',\n\t\t\t\t\t\tname: 'depth',\n\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: '1 Levels Down',\n\t\t\t\t\t\t\t\tvalue: 1,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: '2 Levels Down',\n\t\t\t\t\t\t\t\tvalue: 2,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: '3 Levels Down',\n\t\t\t\t\t\t\t\tvalue: 3,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: '4 Levels Down',\n\t\t\t\t\t\t\t\tvalue: 4,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: '5 Levels Down',\n\t\t\t\t\t\t\t\tvalue: 5,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Top Folder Only',\n\t\t\t\t\t\t\t\tvalue: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Unlimited',\n\t\t\t\t\t\t\t\tvalue: -1,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\tdefault: -1,\n\t\t\t\t\t\tdescription: 'How deep into the folder structure to watch for changes',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Use Polling',\n\t\t\t\t\t\tname: 'usePolling',\n\t\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\t\tdefault: false,\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Whether to use polling for watching. Typically necessary to successfully watch files over a network.',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t};\n\n\tasync trigger(this: ITriggerFunctions): Promise<ITriggerResponse> {\n\t\tconst triggerOn = this.getNodeParameter('triggerOn') as string;\n\t\tconst path = this.getNodeParameter('path') as string;\n\t\tconst options = this.getNodeParameter('options', {}) as IDataObject;\n\n\t\tlet events: string[];\n\t\tif (triggerOn === 'file') {\n\t\t\tevents = ['change'];\n\t\t} else {\n\t\t\tevents = this.getNodeParameter('events', []) as string[];\n\t\t}\n\n\t\tconst watcher = watch(path, {\n\t\t\tignored: options.ignored === '' ? undefined : (options.ignored as string),\n\t\t\tpersistent: true,\n\t\t\tignoreInitial:\n\t\t\t\toptions.ignoreInitial === undefined ? true : (options.ignoreInitial as boolean),\n\t\t\tfollowSymlinks:\n\t\t\t\toptions.followSymlinks === undefined ? true : (options.followSymlinks as boolean),\n\t\t\tdepth: [-1, undefined].includes(options.depth as number)\n\t\t\t\t? undefined\n\t\t\t\t: (options.depth as number),\n\t\t\tusePolling: options.usePolling as boolean,\n\t\t\tawaitWriteFinish: options.awaitWriteFinish as boolean,\n\t\t});\n\n\t\tconst executeTrigger = (event: string, pathString: string) => {\n\t\t\tthis.emit([this.helpers.returnJsonArray([{ event, path: pathString }])]);\n\t\t};\n\n\t\tfor (const eventName of events) {\n\t\t\twatcher.on(eventName, (pathString) => executeTrigger(eventName, pathString as string));\n\t\t}\n\n\t\tasync function closeFunction() {\n\t\t\treturn await watcher.close();\n\t\t}\n\n\t\treturn {\n\t\t\tcloseFunction,\n\t\t};\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAsB;AACtB,0BAOO;AAEA,MAAM,iBAAsC;AAAA,EAA5C;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAA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;AAAA,IACxE;AAEA,eAAW,aAAa,QAAQ;AAC/B,cAAQ,GAAG,WAAW,CAAC,eAAe,eAAe,WAAW,UAAoB,CAAC;AAAA,IACtF;AAEA,mBAAe,gBAAgB;AAC9B,aAAO,MAAM,QAAQ,MAAM;AAAA,IAC5B;AAEA,WAAO;AAAA,MACN;AAAA,IACD;AAAA,EACD;AACD;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../nodes/LocalFileTrigger/LocalFileTrigger.node.ts"],"sourcesContent":["import { watch } from 'chokidar';\nimport {\n\ttype ITriggerFunctions,\n\ttype IDataObject,\n\ttype INodeType,\n\ttype INodeTypeDescription,\n\ttype ITriggerResponse,\n\tNodeConnectionTypes,\n} from 'n8n-workflow';\n\nexport class LocalFileTrigger implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Local File Trigger',\n\t\tname: 'localFileTrigger',\n\t\ticon: 'fa:folder-open',\n\t\ticonColor: 'black',\n\t\tgroup: ['trigger'],\n\t\tversion: 1,\n\t\tsubtitle: '=Path: {{$parameter[\"path\"]}}',\n\t\tdescription: 'Triggers a workflow on file system changes',\n\t\teventTriggerDescription: '',\n\t\tdefaults: {\n\t\t\tname: 'Local File Trigger',\n\t\t\tcolor: '#404040',\n\t\t},\n\t\ttriggerPanel: {\n\t\t\theader: '',\n\t\t\texecutionsHelp: {\n\t\t\t\tinactive:\n\t\t\t\t\t\"<b>While building your workflow</b>, click the 'execute step' button, then make a change to your watched file or folder. This will trigger an execution, which will show up in this editor.<br /> <br /><b>Once you're happy with your workflow</b>, <a data-key='activate'>activate</a> it. Then every time a change is detected, the workflow will execute. These executions will show up in the <a data-key='executions'>executions list</a>, but not in the editor.\",\n\t\t\t\tactive:\n\t\t\t\t\t\"<b>While building your workflow</b>, click the 'execute step' button, then make a change to your watched file or folder. This will trigger an execution, which will show up in this editor.<br /> <br /><b>Your workflow will also execute automatically</b>, since it's activated. Every time a change is detected, this node will trigger an execution. These executions will show up in the <a data-key='executions'>executions list</a>, but not in the editor.\",\n\t\t\t},\n\t\t\tactivationHint:\n\t\t\t\t\"Once you’ve finished building your workflow, <a data-key='activate'>activate</a> it to have it also listen continuously (you just won’t see those executions here).\",\n\t\t},\n\t\tinputs: [],\n\t\toutputs: [NodeConnectionTypes.Main],\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Trigger On',\n\t\t\t\tname: 'triggerOn',\n\t\t\t\ttype: 'options',\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Changes to a Specific File',\n\t\t\t\t\t\tvalue: 'file',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Changes Involving a Specific Folder',\n\t\t\t\t\t\tvalue: 'folder',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\trequired: true,\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'File to Watch',\n\t\t\t\tname: 'path',\n\t\t\t\ttype: 'string',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\ttriggerOn: ['file'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '',\n\t\t\t\tplaceholder: '/data/invoices/1.pdf',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Folder to Watch',\n\t\t\t\tname: 'path',\n\t\t\t\ttype: 'string',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\ttriggerOn: ['folder'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '',\n\t\t\t\tplaceholder: '/data/invoices',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Watch for',\n\t\t\t\tname: 'events',\n\t\t\t\ttype: 'multiOptions',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\ttriggerOn: ['folder'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'File Added',\n\t\t\t\t\t\tvalue: 'add',\n\t\t\t\t\t\tdescription: 'Triggers whenever a new file was added',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'File Changed',\n\t\t\t\t\t\tvalue: 'change',\n\t\t\t\t\t\tdescription: 'Triggers whenever a file was changed',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'File Deleted',\n\t\t\t\t\t\tvalue: 'unlink',\n\t\t\t\t\t\tdescription: 'Triggers whenever a file was deleted',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Folder Added',\n\t\t\t\t\t\tvalue: 'addDir',\n\t\t\t\t\t\tdescription: 'Triggers whenever a new folder was added',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Folder Deleted',\n\t\t\t\t\t\tvalue: 'unlinkDir',\n\t\t\t\t\t\tdescription: 'Triggers whenever a folder was deleted',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\trequired: true,\n\t\t\t\tdefault: [],\n\t\t\t\tdescription: 'The events to listen to',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tdisplayName: 'Options',\n\t\t\t\tname: 'options',\n\t\t\t\ttype: 'collection',\n\t\t\t\tplaceholder: 'Add option',\n\t\t\t\tdefault: {},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Await Write Finish',\n\t\t\t\t\t\tname: 'awaitWriteFinish',\n\t\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\t\tdefault: false,\n\t\t\t\t\t\tdescription: 'Whether to wait until files finished writing to avoid partially read',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Include Linked Files/Folders',\n\t\t\t\t\t\tname: 'followSymlinks',\n\t\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\t\tdefault: true,\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Whether linked files/folders will also be watched (this includes symlinks, aliases on MacOS and shortcuts on Windows). Otherwise only the links themselves will be monitored).',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Ignore',\n\t\t\t\t\t\tname: 'ignored',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tplaceholder: '**/*.txt or ignore-me/subfolder',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\"Files or paths to ignore. The whole path is tested, not just the filename. Supports <a href=\\\"https://github.com/micromatch/anymatch\\\">Anymatch</a>- syntax. Regex patterns may not work on macOS. To ignore files based on substring matching, use the 'Ignore Mode' option with 'Contain'.\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Ignore Existing Files/Folders',\n\t\t\t\t\t\tname: 'ignoreInitial',\n\t\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\t\tdefault: true,\n\t\t\t\t\t\tdescription: 'Whether to ignore existing files/folders to not trigger an event',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Max Folder Depth',\n\t\t\t\t\t\tname: 'depth',\n\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: '1 Levels Down',\n\t\t\t\t\t\t\t\tvalue: 1,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: '2 Levels Down',\n\t\t\t\t\t\t\t\tvalue: 2,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: '3 Levels Down',\n\t\t\t\t\t\t\t\tvalue: 3,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: '4 Levels Down',\n\t\t\t\t\t\t\t\tvalue: 4,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: '5 Levels Down',\n\t\t\t\t\t\t\t\tvalue: 5,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Top Folder Only',\n\t\t\t\t\t\t\t\tvalue: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Unlimited',\n\t\t\t\t\t\t\t\tvalue: -1,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\tdefault: -1,\n\t\t\t\t\t\tdescription: 'How deep into the folder structure to watch for changes',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Use Polling',\n\t\t\t\t\t\tname: 'usePolling',\n\t\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\t\tdefault: false,\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Whether to use polling for watching. Typically necessary to successfully watch files over a network.',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Ignore Mode',\n\t\t\t\t\t\tname: 'ignoreMode',\n\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Match',\n\t\t\t\t\t\t\t\tvalue: 'match',\n\t\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t\t'Ignore files using regex patterns (e.g., **/*.txt), Not supported on macOS',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Contain',\n\t\t\t\t\t\t\t\tvalue: 'contain',\n\t\t\t\t\t\t\t\tdescription: 'Ignore files if their path contains the specified value',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\tdefault: 'match',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Whether to ignore files using regex matching (Anymatch patterns) or by checking if the path contains a specified value',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t};\n\n\tasync trigger(this: ITriggerFunctions): Promise<ITriggerResponse> {\n\t\tconst triggerOn = this.getNodeParameter('triggerOn') as string;\n\t\tconst path = this.getNodeParameter('path') as string;\n\t\tconst options = this.getNodeParameter('options', {}) as IDataObject;\n\n\t\tlet events: string[];\n\t\tif (triggerOn === 'file') {\n\t\t\tevents = ['change'];\n\t\t} else {\n\t\t\tevents = this.getNodeParameter('events', []) as string[];\n\t\t}\n\t\tconst ignored = options.ignored === '' ? undefined : (options.ignored as string);\n\t\tconst watcher = watch(path, {\n\t\t\tignored: options.ignoreMode === 'match' ? ignored : (x) => x.includes(ignored as string),\n\t\t\tpersistent: true,\n\t\t\tignoreInitial:\n\t\t\t\toptions.ignoreInitial === undefined ? true : (options.ignoreInitial as boolean),\n\t\t\tfollowSymlinks:\n\t\t\t\toptions.followSymlinks === undefined ? true : (options.followSymlinks as boolean),\n\t\t\tdepth: [-1, undefined].includes(options.depth as number)\n\t\t\t\t? undefined\n\t\t\t\t: (options.depth as number),\n\t\t\tusePolling: options.usePolling as boolean,\n\t\t\tawaitWriteFinish: options.awaitWriteFinish as boolean,\n\t\t});\n\n\t\tconst executeTrigger = (event: string, pathString: string) => {\n\t\t\tthis.emit([this.helpers.returnJsonArray([{ event, path: pathString }])]);\n\t\t};\n\n\t\tfor (const eventName of events) {\n\t\t\twatcher.on(eventName, (pathString) => executeTrigger(eventName, pathString as string));\n\t\t}\n\n\t\tasync function closeFunction() {\n\t\t\treturn await watcher.close();\n\t\t}\n\n\t\treturn {\n\t\t\tcloseFunction,\n\t\t};\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAsB;AACtB,0BAOO;AAEA,MAAM,iBAAsC;AAAA,EAA5C;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA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Q,QAAQ;AAAA,MACvD,gBACC,QAAQ,mBAAmB,SAAY,OAAQ,QAAQ;AAAA,MACxD,OAAO,CAAC,IAAI,MAAS,EAAE,SAAS,QAAQ,KAAe,IACpD,SACC,QAAQ;AAAA,MACZ,YAAY,QAAQ;AAAA,MACpB,kBAAkB,QAAQ;AAAA,IAC3B,CAAC;AAED,UAAM,iBAAiB,CAAC,OAAe,eAAuB;AAC7D,WAAK,KAAK,CAAC,KAAK,QAAQ,gBAAgB,CAAC,EAAE,OAAO,MAAM,WAAW,CAAC,CAAC,CAAC,CAAC;AAAA,IACxE;AAEA,eAAW,aAAa,QAAQ;AAC/B,cAAQ,GAAG,WAAW,CAAC,eAAe,eAAe,WAAW,UAAoB,CAAC;AAAA,IACtF;AAEA,mBAAe,gBAAgB;AAC9B,aAAO,MAAM,QAAQ,MAAM;AAAA,IAC5B;AAEA,WAAO;AAAA,MACN;AAAA,IACD;AAAA,EACD;AACD;","names":[]}
|
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "object",
|
|
3
3
|
"properties": {
|
|
4
|
-
"createdDateTime": {
|
|
5
|
-
"type": "string"
|
|
6
|
-
},
|
|
7
4
|
"displayName": {
|
|
8
5
|
"type": "string"
|
|
9
6
|
},
|
|
10
7
|
"id": {
|
|
11
8
|
"type": "string"
|
|
12
|
-
},
|
|
13
|
-
"userPrincipalName": {
|
|
14
|
-
"type": "string"
|
|
15
9
|
}
|
|
16
10
|
},
|
|
17
|
-
"version":
|
|
11
|
+
"version": 3
|
|
18
12
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __export = (target, all) => {
|
|
7
9
|
for (var name in all)
|
|
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
}
|
|
16
18
|
return to;
|
|
17
19
|
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
29
|
var GroupDescription_exports = {};
|
|
20
30
|
__export(GroupDescription_exports, {
|
|
@@ -22,7 +32,7 @@ __export(GroupDescription_exports, {
|
|
|
22
32
|
groupOperations: () => groupOperations
|
|
23
33
|
});
|
|
24
34
|
module.exports = __toCommonJS(GroupDescription_exports);
|
|
25
|
-
var
|
|
35
|
+
var import_merge = __toESM(require("lodash/merge"));
|
|
26
36
|
var import_n8n_workflow = require("n8n-workflow");
|
|
27
37
|
var import_GenericFunctions = require("../GenericFunctions");
|
|
28
38
|
const groupOperations = [
|
|
@@ -529,7 +539,7 @@ const createFields = [
|
|
|
529
539
|
}
|
|
530
540
|
try {
|
|
531
541
|
await import_GenericFunctions.microsoftApiRequest.call(this, "PATCH", `/groups/${groupId}`, body);
|
|
532
|
-
(0,
|
|
542
|
+
(0, import_merge.default)(item.json, body);
|
|
533
543
|
} catch (error) {
|
|
534
544
|
try {
|
|
535
545
|
await import_GenericFunctions.microsoftApiRequest.call(this, "DELETE", `/groups/${groupId}`);
|