n8n-nodes-base 1.53.0 → 1.53.2
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.
|
@@ -59,6 +59,34 @@
|
|
|
59
59
|
"type": "n8n-nodes-base.code",
|
|
60
60
|
"typeVersion": 1,
|
|
61
61
|
"position": [460, 860]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"parameters": {
|
|
65
|
+
"mode": "runOnceForEachItem",
|
|
66
|
+
"jsCode": "const json = $input.item.json\njson.myNewField = await (async () => json.value)();\n\nreturn $input.item;"
|
|
67
|
+
},
|
|
68
|
+
"id": "3cff4a64-c3fd-47d3-a33e-3c446846138f",
|
|
69
|
+
"name": "With Async Functions",
|
|
70
|
+
"type": "n8n-nodes-base.code",
|
|
71
|
+
"typeVersion": 1,
|
|
72
|
+
"position": [
|
|
73
|
+
460,
|
|
74
|
+
1200
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"parameters": {
|
|
79
|
+
"mode": "runOnceForEachItem",
|
|
80
|
+
"jsCode": "const json = $input.item.json\njson.myNewField = await new Promise((resolve) => resolve(json.value));\n\nreturn $input.item;"
|
|
81
|
+
},
|
|
82
|
+
"id": "947e4e3e-2da3-40c5-97da-830c4572fc05",
|
|
83
|
+
"name": "With Promises",
|
|
84
|
+
"type": "n8n-nodes-base.code",
|
|
85
|
+
"typeVersion": 1,
|
|
86
|
+
"position": [
|
|
87
|
+
460,
|
|
88
|
+
1380
|
|
89
|
+
]
|
|
62
90
|
}
|
|
63
91
|
],
|
|
64
92
|
"pinData": {
|
|
@@ -103,6 +131,34 @@
|
|
|
103
131
|
"myNewField": 2
|
|
104
132
|
}
|
|
105
133
|
}
|
|
134
|
+
],
|
|
135
|
+
"With Async Functions": [
|
|
136
|
+
{
|
|
137
|
+
"json": {
|
|
138
|
+
"value": 1,
|
|
139
|
+
"myNewField": 1
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"json": {
|
|
144
|
+
"value": 2,
|
|
145
|
+
"myNewField": 2
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"With Promises": [
|
|
150
|
+
{
|
|
151
|
+
"json": {
|
|
152
|
+
"value": 1,
|
|
153
|
+
"myNewField": 1
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"json": {
|
|
158
|
+
"value": 2,
|
|
159
|
+
"myNewField": 2
|
|
160
|
+
}
|
|
161
|
+
}
|
|
106
162
|
]
|
|
107
163
|
},
|
|
108
164
|
"connections": {
|
|
@@ -139,6 +195,16 @@
|
|
|
139
195
|
"node": "Run Once for Each Item (Legacy Syntax)",
|
|
140
196
|
"type": "main",
|
|
141
197
|
"index": 0
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"node": "With Async Functions",
|
|
201
|
+
"type": "main",
|
|
202
|
+
"index": 0
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"node": "With Promises",
|
|
206
|
+
"type": "main",
|
|
207
|
+
"index": 0
|
|
142
208
|
}
|
|
143
209
|
]
|
|
144
210
|
]
|