alert-message-plugin-flow-requests 1.2.0 → 1.2.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.
- package/build.sh +7 -0
- package/dist/browser-bundle.js +343 -0
- package/dist/deno-bundle.js +354 -0
- package/package.json +2 -1
- package/src/index.ts +7 -0
package/build.sh
ADDED
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key2 of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key2) && key2 !== except)
|
|
14
|
+
__defProp(to, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
|
+
mod
|
|
25
|
+
));
|
|
26
|
+
|
|
27
|
+
// node_modules/.pnpm/core-package-mini-n8n@1.3.0/node_modules/core-package-mini-n8n/dist/types/node-base.js
|
|
28
|
+
var require_node_base = __commonJS({
|
|
29
|
+
"node_modules/.pnpm/core-package-mini-n8n@1.3.0/node_modules/core-package-mini-n8n/dist/types/node-base.js"(exports, module) {
|
|
30
|
+
"use strict";
|
|
31
|
+
Object.defineProperty(exports, "__esModule", {
|
|
32
|
+
value: true
|
|
33
|
+
});
|
|
34
|
+
exports.NodeBase = void 0;
|
|
35
|
+
var NodeBase = class {
|
|
36
|
+
state;
|
|
37
|
+
constructor(state) {
|
|
38
|
+
this.state = state;
|
|
39
|
+
}
|
|
40
|
+
parseExpression(expression) {
|
|
41
|
+
const regex = /{{(.*?)}}/g;
|
|
42
|
+
const matches = expression.match(regex);
|
|
43
|
+
if (matches) {
|
|
44
|
+
matches.forEach((match) => {
|
|
45
|
+
const key = match.replace("{{", "").replace("}}", "");
|
|
46
|
+
let value = eval(key);
|
|
47
|
+
if (typeof value == "object") {
|
|
48
|
+
value = JSON.stringify(value);
|
|
49
|
+
}
|
|
50
|
+
expression = expression.replace(match, value);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return expression;
|
|
54
|
+
}
|
|
55
|
+
getConfig() {
|
|
56
|
+
throw new Error("Method not implemented");
|
|
57
|
+
}
|
|
58
|
+
execute(input) {
|
|
59
|
+
throw new Error("Method not implemented");
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
exports.NodeBase = NodeBase;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
// node_modules/.pnpm/core-package-mini-n8n@1.3.0/node_modules/core-package-mini-n8n/dist/types/linkedlist.js
|
|
67
|
+
var require_linkedlist = __commonJS({
|
|
68
|
+
"node_modules/.pnpm/core-package-mini-n8n@1.3.0/node_modules/core-package-mini-n8n/dist/types/linkedlist.js"(exports2) {
|
|
69
|
+
"use strict";
|
|
70
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
71
|
+
value: true
|
|
72
|
+
});
|
|
73
|
+
exports2.LinkedList = exports2.Node = void 0;
|
|
74
|
+
var Node = class {
|
|
75
|
+
value;
|
|
76
|
+
next;
|
|
77
|
+
constructor(value2, next) {
|
|
78
|
+
this.value = value2;
|
|
79
|
+
this.next = next;
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
exports2.Node = Node;
|
|
83
|
+
var LinkedList = class _LinkedList {
|
|
84
|
+
head;
|
|
85
|
+
tail;
|
|
86
|
+
constructor() {
|
|
87
|
+
this.head = null;
|
|
88
|
+
this.tail = null;
|
|
89
|
+
}
|
|
90
|
+
add(value2) {
|
|
91
|
+
if (!this.head) {
|
|
92
|
+
this.head = new Node(value2, null);
|
|
93
|
+
this.tail = null;
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
if (!this.head.next) {
|
|
97
|
+
const next = new Node(value2, null);
|
|
98
|
+
this.head.next = next;
|
|
99
|
+
this.tail = next;
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
const oldNext = this.tail;
|
|
103
|
+
const newNext = new Node(value2, null);
|
|
104
|
+
if (oldNext) {
|
|
105
|
+
oldNext.next = newNext;
|
|
106
|
+
}
|
|
107
|
+
this.tail = newNext;
|
|
108
|
+
}
|
|
109
|
+
show() {
|
|
110
|
+
if (!this.head) return null;
|
|
111
|
+
let start2 = this.head;
|
|
112
|
+
while (start2 != null) {
|
|
113
|
+
if (start2.value instanceof _LinkedList) {
|
|
114
|
+
start2 = start2.value.head;
|
|
115
|
+
} else {
|
|
116
|
+
start2 = start2.next;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
exports2.LinkedList = LinkedList;
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
// node_modules/.pnpm/core-package-mini-n8n@1.3.0/node_modules/core-package-mini-n8n/dist/index.js
|
|
126
|
+
var require_dist = __commonJS({
|
|
127
|
+
"node_modules/.pnpm/core-package-mini-n8n@1.3.0/node_modules/core-package-mini-n8n/dist/index.js"(exports2) {
|
|
128
|
+
"use strict";
|
|
129
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
130
|
+
value: true
|
|
131
|
+
});
|
|
132
|
+
exports2.Node = exports2.LinkedList = exports2.NodeBase = void 0;
|
|
133
|
+
var node_base_1 = require_node_base();
|
|
134
|
+
Object.defineProperty(exports2, "NodeBase", {
|
|
135
|
+
enumerable: true,
|
|
136
|
+
get: function() {
|
|
137
|
+
return node_base_1.NodeBase;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
var linkedlist_1 = require_linkedlist();
|
|
141
|
+
Object.defineProperty(exports2, "LinkedList", {
|
|
142
|
+
enumerable: true,
|
|
143
|
+
get: function() {
|
|
144
|
+
return linkedlist_1.LinkedList;
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
Object.defineProperty(exports2, "Node", {
|
|
148
|
+
enumerable: true,
|
|
149
|
+
get: function() {
|
|
150
|
+
return linkedlist_1.Node;
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
// node_modules/.pnpm/alert-message-plugin-flow-requests@1.2.1_typescript@5.9.3_webpack@5.104.1/node_modules/alert-message-plugin-flow-requests/dist/browser-bundle.js
|
|
157
|
+
var require_browser_bundle = __commonJS({
|
|
158
|
+
"node_modules/.pnpm/alert-message-plugin-flow-requests@1.2.1_typescript@5.9.3_webpack@5.104.1/node_modules/alert-message-plugin-flow-requests/dist/browser-bundle.js"(exports, module) {
|
|
159
|
+
var root;
|
|
160
|
+
var factory;
|
|
161
|
+
root = self, factory = () => (() => {
|
|
162
|
+
var __webpack_modules__ = {
|
|
163
|
+
191(e, t) {
|
|
164
|
+
Object.defineProperty(t, "__esModule", {
|
|
165
|
+
value: true
|
|
166
|
+
}), t.LinkedList = t.Node = void 0;
|
|
167
|
+
class o {
|
|
168
|
+
value;
|
|
169
|
+
next;
|
|
170
|
+
constructor(e2, t2) {
|
|
171
|
+
this.value = e2, this.next = t2;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
t.Node = o;
|
|
175
|
+
class r {
|
|
176
|
+
head;
|
|
177
|
+
tail;
|
|
178
|
+
constructor() {
|
|
179
|
+
this.head = null, this.tail = null;
|
|
180
|
+
}
|
|
181
|
+
add(e2) {
|
|
182
|
+
if (!this.head) return this.head = new o(e2, null), void (this.tail = null);
|
|
183
|
+
if (!this.head.next) {
|
|
184
|
+
const t3 = new o(e2, null);
|
|
185
|
+
return this.head.next = t3, void (this.tail = t3);
|
|
186
|
+
}
|
|
187
|
+
const t2 = this.tail, r2 = new o(e2, null);
|
|
188
|
+
t2 && (t2.next = r2), this.tail = r2;
|
|
189
|
+
}
|
|
190
|
+
show() {
|
|
191
|
+
if (!this.head) return null;
|
|
192
|
+
let e2 = this.head;
|
|
193
|
+
for (; null != e2; ) e2 = e2.value instanceof r ? e2.value.head : e2.next;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
t.LinkedList = r;
|
|
197
|
+
},
|
|
198
|
+
638(__unused_webpack_module, exports) {
|
|
199
|
+
Object.defineProperty(exports, "__esModule", {
|
|
200
|
+
value: true
|
|
201
|
+
}), exports.NodeBase = void 0;
|
|
202
|
+
class NodeBase {
|
|
203
|
+
state;
|
|
204
|
+
constructor(e) {
|
|
205
|
+
this.state = e;
|
|
206
|
+
}
|
|
207
|
+
parseExpression(expression) {
|
|
208
|
+
const regex = /{{(.*?)}}/g, matches = expression.match(regex);
|
|
209
|
+
return matches && matches.forEach((match) => {
|
|
210
|
+
const key = match.replace("{{", "").replace("}}", "");
|
|
211
|
+
let value = eval(key);
|
|
212
|
+
"object" == typeof value && (value = JSON.stringify(value)), expression = expression.replace(match, value);
|
|
213
|
+
}), expression;
|
|
214
|
+
}
|
|
215
|
+
getConfig() {
|
|
216
|
+
throw new Error("Method not implemented");
|
|
217
|
+
}
|
|
218
|
+
execute(e) {
|
|
219
|
+
throw new Error("Method not implemented");
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
exports.NodeBase = NodeBase;
|
|
223
|
+
},
|
|
224
|
+
882(e, t, o) {
|
|
225
|
+
Object.defineProperty(t, "__esModule", {
|
|
226
|
+
value: true
|
|
227
|
+
}), t.Node = t.LinkedList = t.NodeBase = void 0;
|
|
228
|
+
const r = o(638);
|
|
229
|
+
Object.defineProperty(t, "NodeBase", {
|
|
230
|
+
enumerable: true,
|
|
231
|
+
get: function() {
|
|
232
|
+
return r.NodeBase;
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
const s = o(191);
|
|
236
|
+
Object.defineProperty(t, "LinkedList", {
|
|
237
|
+
enumerable: true,
|
|
238
|
+
get: function() {
|
|
239
|
+
return s.LinkedList;
|
|
240
|
+
}
|
|
241
|
+
}), Object.defineProperty(t, "Node", {
|
|
242
|
+
enumerable: true,
|
|
243
|
+
get: function() {
|
|
244
|
+
return s.Node;
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
}, __webpack_module_cache__ = {};
|
|
249
|
+
function __webpack_require__(e) {
|
|
250
|
+
var t = __webpack_module_cache__[e];
|
|
251
|
+
if (void 0 !== t) return t.exports;
|
|
252
|
+
var o = __webpack_module_cache__[e] = {
|
|
253
|
+
exports: {}
|
|
254
|
+
};
|
|
255
|
+
return __webpack_modules__[e](o, o.exports, __webpack_require__), o.exports;
|
|
256
|
+
}
|
|
257
|
+
var __webpack_exports__ = {};
|
|
258
|
+
return (() => {
|
|
259
|
+
var e = __webpack_exports__;
|
|
260
|
+
Object.defineProperty(e, "__esModule", {
|
|
261
|
+
value: true
|
|
262
|
+
});
|
|
263
|
+
const t = __webpack_require__(882);
|
|
264
|
+
class o extends t.NodeBase {
|
|
265
|
+
constructor(e2) {
|
|
266
|
+
super(e2);
|
|
267
|
+
}
|
|
268
|
+
getConfig() {
|
|
269
|
+
return {
|
|
270
|
+
name: "AlertMessage",
|
|
271
|
+
type: "AlertMessage",
|
|
272
|
+
description: "Show alert message when execute the node",
|
|
273
|
+
properties: [
|
|
274
|
+
{
|
|
275
|
+
label: "Message",
|
|
276
|
+
name: "message",
|
|
277
|
+
type: "text",
|
|
278
|
+
required: true,
|
|
279
|
+
default: null
|
|
280
|
+
}
|
|
281
|
+
]
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
async execute(e2) {
|
|
285
|
+
const t2 = e2.settings;
|
|
286
|
+
return "undefined" != typeof window ? alert(this.parseExpression(t2.message)) : console.log(t2.message), {
|
|
287
|
+
ok: true
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
e.default = o;
|
|
292
|
+
})(), __webpack_exports__;
|
|
293
|
+
})(), "object" == typeof exports && "object" == typeof module ? module.exports = factory() : "function" == typeof define && define.amd ? define([], factory) : "object" == typeof exports ? exports.AlertMessage = factory() : root.AlertMessage = factory();
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
// src/index.ts
|
|
298
|
+
var import_core_package_mini_n8n = __toESM(require_dist());
|
|
299
|
+
var AlertMessageNode = class extends import_core_package_mini_n8n.NodeBase {
|
|
300
|
+
constructor(state) {
|
|
301
|
+
super(state);
|
|
302
|
+
}
|
|
303
|
+
getConfig() {
|
|
304
|
+
return {
|
|
305
|
+
name: "AlertMessage",
|
|
306
|
+
type: "AlertMessage",
|
|
307
|
+
description: "Show alert message when execute the node",
|
|
308
|
+
properties: [
|
|
309
|
+
{
|
|
310
|
+
label: "Message",
|
|
311
|
+
name: "message",
|
|
312
|
+
type: "text",
|
|
313
|
+
required: true,
|
|
314
|
+
default: null
|
|
315
|
+
}
|
|
316
|
+
]
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
async execute(node) {
|
|
320
|
+
const setting = node.settings;
|
|
321
|
+
if (typeof window !== "undefined") {
|
|
322
|
+
alert(this.parseExpression(setting.message));
|
|
323
|
+
} else {
|
|
324
|
+
console.log(setting.message);
|
|
325
|
+
}
|
|
326
|
+
return {
|
|
327
|
+
ok: true
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
};
|
|
331
|
+
async function start() {
|
|
332
|
+
const item = await Promise.resolve().then(() => __toESM(require_browser_bundle()));
|
|
333
|
+
console.log(new item.default({}).execute({
|
|
334
|
+
settings: {
|
|
335
|
+
message: "a"
|
|
336
|
+
}
|
|
337
|
+
}));
|
|
338
|
+
}
|
|
339
|
+
start();
|
|
340
|
+
var src_default = AlertMessageNode;
|
|
341
|
+
export {
|
|
342
|
+
src_default as default
|
|
343
|
+
};
|
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __esm = (fn, res) => function __init() {
|
|
8
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
9
|
+
};
|
|
10
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
11
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
12
|
+
};
|
|
13
|
+
var __export = (target, all) => {
|
|
14
|
+
for (var name in all)
|
|
15
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
16
|
+
};
|
|
17
|
+
var __copyProps = (to, from, except, desc) => {
|
|
18
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
19
|
+
for (let key2 of __getOwnPropNames(from))
|
|
20
|
+
if (!__hasOwnProp.call(to, key2) && key2 !== except)
|
|
21
|
+
__defProp(to, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
24
|
+
};
|
|
25
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
26
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
27
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
28
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
29
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
30
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
31
|
+
mod
|
|
32
|
+
));
|
|
33
|
+
|
|
34
|
+
// node_modules/.pnpm/core-package-mini-n8n@1.3.0/node_modules/core-package-mini-n8n/dist/types/node-base.js
|
|
35
|
+
var require_node_base = __commonJS({
|
|
36
|
+
"node_modules/.pnpm/core-package-mini-n8n@1.3.0/node_modules/core-package-mini-n8n/dist/types/node-base.js"(exports, module) {
|
|
37
|
+
"use strict";
|
|
38
|
+
Object.defineProperty(exports, "__esModule", {
|
|
39
|
+
value: true
|
|
40
|
+
});
|
|
41
|
+
exports.NodeBase = void 0;
|
|
42
|
+
var NodeBase = class {
|
|
43
|
+
state;
|
|
44
|
+
constructor(state) {
|
|
45
|
+
this.state = state;
|
|
46
|
+
}
|
|
47
|
+
parseExpression(expression) {
|
|
48
|
+
const regex = /{{(.*?)}}/g;
|
|
49
|
+
const matches = expression.match(regex);
|
|
50
|
+
if (matches) {
|
|
51
|
+
matches.forEach((match) => {
|
|
52
|
+
const key = match.replace("{{", "").replace("}}", "");
|
|
53
|
+
let value = eval(key);
|
|
54
|
+
if (typeof value == "object") {
|
|
55
|
+
value = JSON.stringify(value);
|
|
56
|
+
}
|
|
57
|
+
expression = expression.replace(match, value);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
return expression;
|
|
61
|
+
}
|
|
62
|
+
getConfig() {
|
|
63
|
+
throw new Error("Method not implemented");
|
|
64
|
+
}
|
|
65
|
+
execute(input) {
|
|
66
|
+
throw new Error("Method not implemented");
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
exports.NodeBase = NodeBase;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
// node_modules/.pnpm/core-package-mini-n8n@1.3.0/node_modules/core-package-mini-n8n/dist/types/linkedlist.js
|
|
74
|
+
var require_linkedlist = __commonJS({
|
|
75
|
+
"node_modules/.pnpm/core-package-mini-n8n@1.3.0/node_modules/core-package-mini-n8n/dist/types/linkedlist.js"(exports2) {
|
|
76
|
+
"use strict";
|
|
77
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
78
|
+
value: true
|
|
79
|
+
});
|
|
80
|
+
exports2.LinkedList = exports2.Node = void 0;
|
|
81
|
+
var Node = class {
|
|
82
|
+
value;
|
|
83
|
+
next;
|
|
84
|
+
constructor(value2, next) {
|
|
85
|
+
this.value = value2;
|
|
86
|
+
this.next = next;
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
exports2.Node = Node;
|
|
90
|
+
var LinkedList = class _LinkedList {
|
|
91
|
+
head;
|
|
92
|
+
tail;
|
|
93
|
+
constructor() {
|
|
94
|
+
this.head = null;
|
|
95
|
+
this.tail = null;
|
|
96
|
+
}
|
|
97
|
+
add(value2) {
|
|
98
|
+
if (!this.head) {
|
|
99
|
+
this.head = new Node(value2, null);
|
|
100
|
+
this.tail = null;
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
if (!this.head.next) {
|
|
104
|
+
const next = new Node(value2, null);
|
|
105
|
+
this.head.next = next;
|
|
106
|
+
this.tail = next;
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
const oldNext = this.tail;
|
|
110
|
+
const newNext = new Node(value2, null);
|
|
111
|
+
if (oldNext) {
|
|
112
|
+
oldNext.next = newNext;
|
|
113
|
+
}
|
|
114
|
+
this.tail = newNext;
|
|
115
|
+
}
|
|
116
|
+
show() {
|
|
117
|
+
if (!this.head) return null;
|
|
118
|
+
let start2 = this.head;
|
|
119
|
+
while (start2 != null) {
|
|
120
|
+
if (start2.value instanceof _LinkedList) {
|
|
121
|
+
start2 = start2.value.head;
|
|
122
|
+
} else {
|
|
123
|
+
start2 = start2.next;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
exports2.LinkedList = LinkedList;
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
// node_modules/.pnpm/core-package-mini-n8n@1.3.0/node_modules/core-package-mini-n8n/dist/index.js
|
|
133
|
+
var require_dist = __commonJS({
|
|
134
|
+
"node_modules/.pnpm/core-package-mini-n8n@1.3.0/node_modules/core-package-mini-n8n/dist/index.js"(exports2) {
|
|
135
|
+
"use strict";
|
|
136
|
+
Object.defineProperty(exports2, "__esModule", {
|
|
137
|
+
value: true
|
|
138
|
+
});
|
|
139
|
+
exports2.Node = exports2.LinkedList = exports2.NodeBase = void 0;
|
|
140
|
+
var node_base_1 = require_node_base();
|
|
141
|
+
Object.defineProperty(exports2, "NodeBase", {
|
|
142
|
+
enumerable: true,
|
|
143
|
+
get: function() {
|
|
144
|
+
return node_base_1.NodeBase;
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
var linkedlist_1 = require_linkedlist();
|
|
148
|
+
Object.defineProperty(exports2, "LinkedList", {
|
|
149
|
+
enumerable: true,
|
|
150
|
+
get: function() {
|
|
151
|
+
return linkedlist_1.LinkedList;
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
Object.defineProperty(exports2, "Node", {
|
|
155
|
+
enumerable: true,
|
|
156
|
+
get: function() {
|
|
157
|
+
return linkedlist_1.Node;
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
// node_modules/.pnpm/alert-message-plugin-flow-requests@1.2.1_typescript@5.9.3_webpack@5.104.1/node_modules/alert-message-plugin-flow-requests/dist/node-bundle.js
|
|
164
|
+
var node_bundle_exports = {};
|
|
165
|
+
__export(node_bundle_exports, {
|
|
166
|
+
__esModule: () => __webpack_exports___esModule,
|
|
167
|
+
default: () => __webpack_exports__
|
|
168
|
+
});
|
|
169
|
+
function __webpack_require__(e) {
|
|
170
|
+
var t = __webpack_module_cache__[e];
|
|
171
|
+
if (void 0 !== t) return t.exports;
|
|
172
|
+
var s = __webpack_module_cache__[e] = {
|
|
173
|
+
exports: {}
|
|
174
|
+
};
|
|
175
|
+
return __webpack_modules__[e](s, s.exports, __webpack_require__), s.exports;
|
|
176
|
+
}
|
|
177
|
+
var __webpack_modules__, __webpack_module_cache__, __webpack_exports__, __webpack_exports___esModule;
|
|
178
|
+
var init_node_bundle = __esm({
|
|
179
|
+
"node_modules/.pnpm/alert-message-plugin-flow-requests@1.2.1_typescript@5.9.3_webpack@5.104.1/node_modules/alert-message-plugin-flow-requests/dist/node-bundle.js"() {
|
|
180
|
+
__webpack_modules__ = {
|
|
181
|
+
191(e, t) {
|
|
182
|
+
Object.defineProperty(t, "__esModule", {
|
|
183
|
+
value: true
|
|
184
|
+
}), t.LinkedList = t.Node = void 0;
|
|
185
|
+
class s {
|
|
186
|
+
value;
|
|
187
|
+
next;
|
|
188
|
+
constructor(e2, t2) {
|
|
189
|
+
this.value = e2, this.next = t2;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
t.Node = s;
|
|
193
|
+
class o {
|
|
194
|
+
head;
|
|
195
|
+
tail;
|
|
196
|
+
constructor() {
|
|
197
|
+
this.head = null, this.tail = null;
|
|
198
|
+
}
|
|
199
|
+
add(e2) {
|
|
200
|
+
if (!this.head) return this.head = new s(e2, null), void (this.tail = null);
|
|
201
|
+
if (!this.head.next) {
|
|
202
|
+
const t3 = new s(e2, null);
|
|
203
|
+
return this.head.next = t3, void (this.tail = t3);
|
|
204
|
+
}
|
|
205
|
+
const t2 = this.tail, o2 = new s(e2, null);
|
|
206
|
+
t2 && (t2.next = o2), this.tail = o2;
|
|
207
|
+
}
|
|
208
|
+
show() {
|
|
209
|
+
if (!this.head) return null;
|
|
210
|
+
let e2 = this.head;
|
|
211
|
+
for (; null != e2; ) e2 = e2.value instanceof o ? e2.value.head : e2.next;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
t.LinkedList = o;
|
|
215
|
+
},
|
|
216
|
+
638(__unused_webpack_module, exports) {
|
|
217
|
+
Object.defineProperty(exports, "__esModule", {
|
|
218
|
+
value: true
|
|
219
|
+
}), exports.NodeBase = void 0;
|
|
220
|
+
class NodeBase {
|
|
221
|
+
state;
|
|
222
|
+
constructor(e) {
|
|
223
|
+
this.state = e;
|
|
224
|
+
}
|
|
225
|
+
parseExpression(expression) {
|
|
226
|
+
const regex = /{{(.*?)}}/g, matches = expression.match(regex);
|
|
227
|
+
return matches && matches.forEach((match) => {
|
|
228
|
+
const key = match.replace("{{", "").replace("}}", "");
|
|
229
|
+
let value = eval(key);
|
|
230
|
+
"object" == typeof value && (value = JSON.stringify(value)), expression = expression.replace(match, value);
|
|
231
|
+
}), expression;
|
|
232
|
+
}
|
|
233
|
+
getConfig() {
|
|
234
|
+
throw new Error("Method not implemented");
|
|
235
|
+
}
|
|
236
|
+
execute(e) {
|
|
237
|
+
throw new Error("Method not implemented");
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
exports.NodeBase = NodeBase;
|
|
241
|
+
},
|
|
242
|
+
882(e, t, s) {
|
|
243
|
+
Object.defineProperty(t, "__esModule", {
|
|
244
|
+
value: true
|
|
245
|
+
}), t.Node = t.LinkedList = t.NodeBase = void 0;
|
|
246
|
+
const o = s(638);
|
|
247
|
+
Object.defineProperty(t, "NodeBase", {
|
|
248
|
+
enumerable: true,
|
|
249
|
+
get: function() {
|
|
250
|
+
return o.NodeBase;
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
const r = s(191);
|
|
254
|
+
Object.defineProperty(t, "LinkedList", {
|
|
255
|
+
enumerable: true,
|
|
256
|
+
get: function() {
|
|
257
|
+
return r.LinkedList;
|
|
258
|
+
}
|
|
259
|
+
}), Object.defineProperty(t, "Node", {
|
|
260
|
+
enumerable: true,
|
|
261
|
+
get: function() {
|
|
262
|
+
return r.Node;
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
__webpack_module_cache__ = {};
|
|
268
|
+
__webpack_exports__ = {};
|
|
269
|
+
(() => {
|
|
270
|
+
var e = __webpack_exports__;
|
|
271
|
+
Object.defineProperty(e, "__esModule", {
|
|
272
|
+
value: true
|
|
273
|
+
});
|
|
274
|
+
const t = __webpack_require__(882);
|
|
275
|
+
class s extends t.NodeBase {
|
|
276
|
+
constructor(e2) {
|
|
277
|
+
super(e2);
|
|
278
|
+
}
|
|
279
|
+
getConfig() {
|
|
280
|
+
return {
|
|
281
|
+
name: "AlertMessage",
|
|
282
|
+
type: "AlertMessage",
|
|
283
|
+
description: "Show alert message when execute the node",
|
|
284
|
+
properties: [
|
|
285
|
+
{
|
|
286
|
+
label: "Message",
|
|
287
|
+
name: "message",
|
|
288
|
+
type: "text",
|
|
289
|
+
required: true,
|
|
290
|
+
default: null
|
|
291
|
+
}
|
|
292
|
+
]
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
async execute(e2) {
|
|
296
|
+
const t2 = e2.settings;
|
|
297
|
+
return "undefined" != typeof window ? alert(this.parseExpression(t2.message)) : console.log(t2.message), {
|
|
298
|
+
ok: true
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
e.default = s;
|
|
303
|
+
})();
|
|
304
|
+
__webpack_exports___esModule = __webpack_exports__.__esModule;
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
// src/index.ts
|
|
309
|
+
var import_core_package_mini_n8n = __toESM(require_dist());
|
|
310
|
+
var AlertMessageNode = class extends import_core_package_mini_n8n.NodeBase {
|
|
311
|
+
constructor(state) {
|
|
312
|
+
super(state);
|
|
313
|
+
}
|
|
314
|
+
getConfig() {
|
|
315
|
+
return {
|
|
316
|
+
name: "AlertMessage",
|
|
317
|
+
type: "AlertMessage",
|
|
318
|
+
description: "Show alert message when execute the node",
|
|
319
|
+
properties: [
|
|
320
|
+
{
|
|
321
|
+
label: "Message",
|
|
322
|
+
name: "message",
|
|
323
|
+
type: "text",
|
|
324
|
+
required: true,
|
|
325
|
+
default: null
|
|
326
|
+
}
|
|
327
|
+
]
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
async execute(node) {
|
|
331
|
+
const setting = node.settings;
|
|
332
|
+
if (typeof window !== "undefined") {
|
|
333
|
+
alert(this.parseExpression(setting.message));
|
|
334
|
+
} else {
|
|
335
|
+
console.log(setting.message);
|
|
336
|
+
}
|
|
337
|
+
return {
|
|
338
|
+
ok: true
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
};
|
|
342
|
+
async function start() {
|
|
343
|
+
const item = await Promise.resolve().then(() => (init_node_bundle(), node_bundle_exports));
|
|
344
|
+
console.log(new item.default({}).execute({
|
|
345
|
+
settings: {
|
|
346
|
+
message: "a"
|
|
347
|
+
}
|
|
348
|
+
}));
|
|
349
|
+
}
|
|
350
|
+
start();
|
|
351
|
+
var src_default = AlertMessageNode;
|
|
352
|
+
export {
|
|
353
|
+
src_default as default
|
|
354
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "alert-message-plugin-flow-requests",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Alert message plugin to Flow requests",
|
|
5
5
|
"main": "./dist/node-bundle.js",
|
|
6
6
|
"browser": "./dist/browser-bundle.js",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"test": "jest ./tests/*.spec.ts"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
+
"alert-message-plugin-flow-requests": "^1.2.1",
|
|
15
16
|
"axios": "^1.13.2",
|
|
16
17
|
"core-package-mini-n8n": "^1.1.5",
|
|
17
18
|
"ts-loader": "^9.5.4"
|
package/src/index.ts
CHANGED
|
@@ -39,6 +39,13 @@ class AlertMessageNode extends NodeBase {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
async function start() {
|
|
43
|
+
const item = await import("alert-message-plugin-flow-requests");
|
|
44
|
+
console.log(new item.default({}).execute({ settings: { message: "a" } }));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
start();
|
|
48
|
+
|
|
42
49
|
// import AlertMessageT from "../dist/node-bundle";
|
|
43
50
|
|
|
44
51
|
// console.log(
|