n8n-nodes-soar 0.1.16 → 0.1.18

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.
Files changed (57) hide show
  1. package/dist/common/asset.js +141 -0
  2. package/dist/common/collector.js +32 -0
  3. package/dist/common/connectionType.js +15 -0
  4. package/dist/common/executor/docker.executor.js +97 -0
  5. package/dist/common/executor/executor.js +48 -0
  6. package/dist/common/executor/k8s.executor.js +190 -0
  7. package/dist/common/runner/container.runner.js +174 -0
  8. package/dist/common/runner/priority.js +44 -0
  9. package/dist/common/runner/priority.runner.js +38 -0
  10. package/dist/common/runner/runner.js +57 -0
  11. package/dist/credentials/Docker/Docker.credentials.js +149 -0
  12. package/dist/credentials/Docker/docker.svg +7 -0
  13. package/dist/credentials/{FofaCredentials.credentials.js → FofaApi/FofaApi.credentials.js} +5 -5
  14. package/dist/credentials/Kubernetes/Kubernetes.credentials.js +82 -0
  15. package/dist/credentials/Kubernetes/k8s.svg +1 -0
  16. package/dist/nodes/Asset/SplitAsset/SplitAsset.node.js +110 -0
  17. package/dist/nodes/Asset/SplitAsset/split.svg +13 -0
  18. package/dist/nodes/Collector/Collector.node.js +123 -0
  19. package/dist/nodes/Executor/DockerExecutor/DockerExecutor.node.js +59 -0
  20. package/dist/nodes/Executor/DockerExecutor/docker.svg +7 -0
  21. package/dist/nodes/Executor/KubernetesExecutor/KubernetesExecutor.node.js +59 -0
  22. package/dist/nodes/Executor/KubernetesExecutor/k8s.svg +1 -0
  23. package/dist/nodes/Fofa/Fofa.node.js +20 -7
  24. package/dist/nodes/Katana/Katana.node.js +1 -1
  25. package/dist/nodes/Nuclei/Nuclei.node.js +1 -1
  26. package/dist/nodes/Runner/Dns/Dns.node.js +199 -0
  27. package/dist/nodes/Runner/Dns/script.js +81 -0
  28. package/dist/nodes/Runner/Httpx/Httpx.node.js +830 -0
  29. package/dist/nodes/Runner/Httpx/httpx.svg +3 -0
  30. package/dist/nodes/Runner/Katana/Katana.node.js +521 -0
  31. package/dist/nodes/Runner/Katana/a.json +30 -0
  32. package/dist/nodes/Runner/Katana/katana.svg +3 -0
  33. package/dist/nodes/Runner/Masscan/Masscan.node.js +151 -0
  34. package/dist/nodes/Runner/Masscan/masscan.svg +70 -0
  35. package/dist/nodes/{Naabu → Runner/Naabu}/Naabu.node.js +86 -48
  36. package/dist/nodes/Runner/Naabu/naabu.svg +3 -0
  37. package/dist/nodes/Runner/Nuclei/Nuclei.node.js +1057 -0
  38. package/dist/nodes/Runner/Nuclei/a.json +48 -0
  39. package/dist/nodes/Runner/Nuclei/nuclei.svg +3 -0
  40. package/dist/nodes/Runner/Priority/Priority.node.js +110 -0
  41. package/dist/nodes/Runner/PriorityAdd/PriorityAdd.node.js +97 -0
  42. package/dist/nodes/Runner/Router/SwitchRouter/SwitchRouter.node.js +101 -0
  43. package/dist/nodes/{Subfinder → Runner/Subfinder}/Subfinder.node.js +74 -43
  44. package/dist/nodes/Runner/Subfinder/subfinder.svg +3 -0
  45. package/dist/nodes/Runner/Unauthor/Unauthor.node.js +169 -0
  46. package/package.json +63 -59
  47. package/dist/nodes/Cdncheck/Cdncheck.node.json +0 -9
  48. package/dist/nodes/Fofa/Fofa.node.json +0 -9
  49. package/dist/nodes/Httpx/Httpx.node.json +0 -9
  50. package/dist/nodes/Naabu/Naabu.node.json +0 -9
  51. package/dist/nodes/Subfinder/Subfinder.node.json +0 -9
  52. package/dist/utils/executor.js +0 -233
  53. package/dist/utils/interface.js +0 -4
  54. package/dist/utils/runner/docker.runner.js +0 -72
  55. package/dist/utils/runner/k8s.runner.js +0 -167
  56. package/dist/utils/runner/runner.js +0 -11
  57. /package/dist/credentials/{fofa.svg → FofaApi/fofa.svg} +0 -0
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ APP_RUNNER_PRIORITY: function() {
13
+ return APP_RUNNER_PRIORITY;
14
+ },
15
+ BANNER_RUNNER_PRIORITY: function() {
16
+ return BANNER_RUNNER_PRIORITY;
17
+ },
18
+ DEFAULT_PRIORITY: function() {
19
+ return DEFAULT_PRIORITY;
20
+ },
21
+ DNS_RUNNER_PRIORITY: function() {
22
+ return DNS_RUNNER_PRIORITY;
23
+ },
24
+ DOMAIN_RUNNER_PRIORITY: function() {
25
+ return DOMAIN_RUNNER_PRIORITY;
26
+ },
27
+ EXPLOIT_RUNNER_PRIORITY: function() {
28
+ return EXPLOIT_RUNNER_PRIORITY;
29
+ },
30
+ IP_RUNNER_PRIORITY: function() {
31
+ return IP_RUNNER_PRIORITY;
32
+ },
33
+ PORT_RUNNER_PRIORITY: function() {
34
+ return PORT_RUNNER_PRIORITY;
35
+ }
36
+ });
37
+ const DEFAULT_PRIORITY = 100;
38
+ const DOMAIN_RUNNER_PRIORITY = 10;
39
+ const DNS_RUNNER_PRIORITY = 20;
40
+ const IP_RUNNER_PRIORITY = 30;
41
+ const PORT_RUNNER_PRIORITY = 40;
42
+ const BANNER_RUNNER_PRIORITY = 50;
43
+ const APP_RUNNER_PRIORITY = 60;
44
+ const EXPLOIT_RUNNER_PRIORITY = 70;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "PriorityRunner", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return PriorityRunner;
9
+ }
10
+ });
11
+ const _runner = require("./runner");
12
+ function _define_property(obj, key, value) {
13
+ if (key in obj) {
14
+ Object.defineProperty(obj, key, {
15
+ value: value,
16
+ enumerable: true,
17
+ configurable: true,
18
+ writable: true
19
+ });
20
+ } else {
21
+ obj[key] = value;
22
+ }
23
+ return obj;
24
+ }
25
+ class PriorityRunner extends _runner.Runner {
26
+ __run(collector, assets) {
27
+ return assets;
28
+ }
29
+ run(collector, assets) {
30
+ // bypass set input/output in priority runner node
31
+ return this.parentRunner.run(collector, assets);
32
+ }
33
+ constructor(parentRunner, priority){
34
+ super(parentRunner.name, priority, parentRunner.func, parentRunner.itemIndex);
35
+ _define_property(this, "parentRunner", void 0);
36
+ this.parentRunner = parentRunner;
37
+ }
38
+ }
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "Runner", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return Runner;
9
+ }
10
+ });
11
+ const _classtransformer = require("class-transformer");
12
+ const _connectionType = require("../connectionType");
13
+ const _priority = require("./priority");
14
+ function _define_property(obj, key, value) {
15
+ if (key in obj) {
16
+ Object.defineProperty(obj, key, {
17
+ value: value,
18
+ enumerable: true,
19
+ configurable: true,
20
+ writable: true
21
+ });
22
+ } else {
23
+ obj[key] = value;
24
+ }
25
+ return obj;
26
+ }
27
+ class Runner {
28
+ async run(collector, assets) {
29
+ assets.forEach((a)=>a.success = false);
30
+ const { index } = this.func.addInputData(_connectionType.NodeConnectionType.Runner, [
31
+ assets.map((a)=>({
32
+ json: (0, _classtransformer.instanceToPlain)(a)
33
+ }))
34
+ ]);
35
+ let resp = await this.__run(collector, assets);
36
+ const onlySuccess = this.func.getNodeParameter("onlySuccess", index, true);
37
+ if (onlySuccess) {
38
+ resp = resp.filter((a)=>a.success);
39
+ }
40
+ this.func.addOutputData(_connectionType.NodeConnectionType.Runner, index, [
41
+ resp.map((a)=>({
42
+ json: (0, _classtransformer.instanceToPlain)(a)
43
+ }))
44
+ ]);
45
+ return resp;
46
+ }
47
+ constructor(name, priority = _priority.DEFAULT_PRIORITY, func, itemIndex){
48
+ _define_property(this, "name", void 0);
49
+ _define_property(this, "priority", void 0);
50
+ _define_property(this, "func", void 0);
51
+ _define_property(this, "itemIndex", void 0);
52
+ this.name = name;
53
+ this.priority = priority;
54
+ this.func = func;
55
+ this.itemIndex = itemIndex;
56
+ }
57
+ }
@@ -0,0 +1,149 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "Docker", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return Docker;
9
+ }
10
+ });
11
+ function _define_property(obj, key, value) {
12
+ if (key in obj) {
13
+ Object.defineProperty(obj, key, {
14
+ value: value,
15
+ enumerable: true,
16
+ configurable: true,
17
+ writable: true
18
+ });
19
+ } else {
20
+ obj[key] = value;
21
+ }
22
+ return obj;
23
+ }
24
+ class Docker {
25
+ constructor(){
26
+ _define_property(this, "name", "dockerApi");
27
+ _define_property(this, "displayName", "Docker Credentials");
28
+ _define_property(this, "documentationUrl", "https://github.com/apocas/dockerode#getting-started");
29
+ _define_property(this, "icon", "file:docker.svg");
30
+ _define_property(this, "properties", [
31
+ {
32
+ displayName: "Authentication Type",
33
+ name: "authType",
34
+ type: "options",
35
+ options: [
36
+ {
37
+ name: "Socket",
38
+ value: "socket"
39
+ },
40
+ {
41
+ name: "Remote",
42
+ value: "remote"
43
+ }
44
+ ],
45
+ default: "socket"
46
+ },
47
+ {
48
+ displayName: "Socket Path",
49
+ name: "socketPath",
50
+ type: "string",
51
+ default: "/var/run/docker.sock",
52
+ displayOptions: {
53
+ show: {
54
+ authType: [
55
+ "socket"
56
+ ]
57
+ }
58
+ }
59
+ },
60
+ {
61
+ displayName: "Host",
62
+ name: "host",
63
+ type: "string",
64
+ default: "localhost",
65
+ displayOptions: {
66
+ show: {
67
+ authType: [
68
+ "remote"
69
+ ]
70
+ }
71
+ }
72
+ },
73
+ {
74
+ displayName: "Port",
75
+ name: "port",
76
+ type: "number",
77
+ default: 2375,
78
+ displayOptions: {
79
+ show: {
80
+ authType: [
81
+ "remote"
82
+ ]
83
+ }
84
+ }
85
+ },
86
+ {
87
+ displayName: "Use TLS",
88
+ name: "useTls",
89
+ type: "boolean",
90
+ default: false,
91
+ displayOptions: {
92
+ show: {
93
+ authType: [
94
+ "remote"
95
+ ]
96
+ }
97
+ }
98
+ },
99
+ {
100
+ displayName: "CA Certificate",
101
+ name: "ca",
102
+ type: "string",
103
+ default: "",
104
+ displayOptions: {
105
+ show: {
106
+ authType: [
107
+ "remote"
108
+ ],
109
+ useTls: [
110
+ true
111
+ ]
112
+ }
113
+ }
114
+ },
115
+ {
116
+ displayName: "Certificate",
117
+ name: "cert",
118
+ type: "string",
119
+ default: "",
120
+ displayOptions: {
121
+ show: {
122
+ authType: [
123
+ "remote"
124
+ ],
125
+ useTls: [
126
+ true
127
+ ]
128
+ }
129
+ }
130
+ },
131
+ {
132
+ displayName: "Key",
133
+ name: "key",
134
+ type: "string",
135
+ default: "",
136
+ displayOptions: {
137
+ show: {
138
+ authType: [
139
+ "remote"
140
+ ],
141
+ useTls: [
142
+ true
143
+ ]
144
+ }
145
+ }
146
+ }
147
+ ]);
148
+ }
149
+ }
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
2
+ <svg xmlns="http://www.w3.org/2000/svg"
3
+ aria-label="Docker" role="img"
4
+ viewBox="0 0 512 512"><rect
5
+ width="512" height="512"
6
+ rx="15%"
7
+ fill="#ffffff"/><path stroke="#066da5" stroke-width="38" d="M296 226h42m-92 0h42m-91 0h42m-91 0h41m-91 0h42m8-46h41m8 0h42m7 0h42m-42-46h42"/><path fill="#066da5" d="m472 228s-18-17-55-11c-4-29-35-46-35-46s-29 35-8 74c-6 3-16 7-31 7H68c-5 19-5 145 133 145 99 0 173-46 208-130 52 4 63-39 63-39"/></svg>
@@ -2,10 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- Object.defineProperty(exports, "FofaCredentials", {
5
+ Object.defineProperty(exports, "FofaApi", {
6
6
  enumerable: true,
7
7
  get: function() {
8
- return FofaCredentials;
8
+ return FofaApi;
9
9
  }
10
10
  });
11
11
  function _define_property(obj, key, value) {
@@ -21,10 +21,10 @@ function _define_property(obj, key, value) {
21
21
  }
22
22
  return obj;
23
23
  }
24
- class FofaCredentials {
24
+ class FofaApi {
25
25
  constructor(){
26
- _define_property(this, "name", "fofaCredentialsApi");
27
- _define_property(this, "displayName", "Fofa Credentials");
26
+ _define_property(this, "name", "fofaApi");
27
+ _define_property(this, "displayName", "Fofa API Credentials");
28
28
  _define_property(this, "documentationUrl", "https://fofa.info/api");
29
29
  _define_property(this, "icon", "file:fofa.svg");
30
30
  _define_property(this, "properties", [
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "Kubernetes", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return Kubernetes;
9
+ }
10
+ });
11
+ function _define_property(obj, key, value) {
12
+ if (key in obj) {
13
+ Object.defineProperty(obj, key, {
14
+ value: value,
15
+ enumerable: true,
16
+ configurable: true,
17
+ writable: true
18
+ });
19
+ } else {
20
+ obj[key] = value;
21
+ }
22
+ return obj;
23
+ }
24
+ class Kubernetes {
25
+ constructor(){
26
+ _define_property(this, "name", "kubernetesApi");
27
+ _define_property(this, "displayName", "Kubernetes Credentials");
28
+ _define_property(this, "documentationUrl", "https://github.com/kubernetes-client/javascript");
29
+ _define_property(this, "icon", "file:k8s.svg");
30
+ _define_property(this, "properties", [
31
+ {
32
+ displayName: "Load From",
33
+ name: "loadFrom",
34
+ type: "options",
35
+ options: [
36
+ {
37
+ name: "Automatic",
38
+ value: "automatic"
39
+ },
40
+ {
41
+ name: "File",
42
+ value: "file"
43
+ },
44
+ {
45
+ name: "Content",
46
+ value: "content"
47
+ }
48
+ ],
49
+ default: "automatic"
50
+ },
51
+ {
52
+ displayName: "File Path",
53
+ name: "filePath",
54
+ type: "string",
55
+ default: "",
56
+ displayOptions: {
57
+ show: {
58
+ loadFrom: [
59
+ "file"
60
+ ]
61
+ }
62
+ }
63
+ },
64
+ {
65
+ displayName: "Content",
66
+ name: "content",
67
+ type: "string",
68
+ default: "",
69
+ typeOptions: {
70
+ rows: 4
71
+ },
72
+ displayOptions: {
73
+ show: {
74
+ loadFrom: [
75
+ "content"
76
+ ]
77
+ }
78
+ }
79
+ }
80
+ ]);
81
+ }
82
+ }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" role="img" viewBox="-0.17 0.08 230.10 223.35"><defs><style>.cls-1{fill:#fff}.cls-2{fill:#326ce5}</style></defs><path d="M134.358 126.466a3.59 3.59 0 0 0-.855-.065 3.685 3.685 0 0 0-1.425.37 3.725 3.725 0 0 0-1.803 4.825l-.026.037 8.528 20.603a43.53 43.53 0 0 0 17.595-22.102l-21.976-3.714zm-34.194 2.92a3.72 3.72 0 0 0-3.568-2.894 3.656 3.656 0 0 0-.733.065l-.037-.045-21.785 3.698a43.695 43.695 0 0 0 17.54 21.946l8.442-20.4-.066-.08a3.683 3.683 0 0 0 .207-2.29zm18.245 8a3.718 3.718 0 0 0-6.557.008h-.018l-10.713 19.372a43.637 43.637 0 0 0 23.815 1.225q2.197-.5 4.292-1.2l-10.738-19.406zm33.914-45l-16.483 14.753.009.047a3.725 3.725 0 0 0 1.46 6.395l.02.089 21.35 6.15a44.278 44.278 0 0 0-6.356-27.432zM121.7 94.039a3.725 3.725 0 0 0 5.913 2.84l.065.027 18.036-12.788a43.85 43.85 0 0 0-25.287-12.19l1.253 22.105zm-19.1 2.921a3.72 3.72 0 0 0 5.904-2.85l.092-.043 1.253-22.14a44.682 44.682 0 0 0-4.501.776 43.467 43.467 0 0 0-20.937 11.409l18.154 12.869zm-9.678 16.729a3.72 3.72 0 0 0 1.462-6.396l.018-.088-16.574-14.824a43.454 43.454 0 0 0-6.168 27.51l21.245-6.13zm16.098 6.512l6.114 2.94 6.096-2.934 1.514-6.581-4.219-5.276h-6.79l-4.231 5.268z" class="cls-2"/><path d="M216.208 133.167l-17.422-75.675a13.602 13.602 0 0 0-7.293-9.073l-70.521-33.67a13.589 13.589 0 0 0-11.705 0L38.76 48.437a13.598 13.598 0 0 0-7.295 9.072l-17.394 75.673a13.315 13.315 0 0 0-.004 5.81 13.506 13.506 0 0 0 .491 1.718 13.1 13.1 0 0 0 1.343 2.726c.239.365.491.72.765 1.064l48.804 60.678c.213.264.448.505.681.75a13.423 13.423 0 0 0 2.574 2.133 13.924 13.924 0 0 0 3.857 1.677 13.298 13.298 0 0 0 3.43.473h.759l77.504-.018a12.993 12.993 0 0 0 1.41-.083 13.47 13.47 0 0 0 1.989-.378 13.872 13.872 0 0 0 1.381-.442c.353-.135.705-.27 1.045-.433a13.941 13.941 0 0 0 1.479-.822 13.303 13.303 0 0 0 3.237-2.865l1.488-1.85 47.299-58.84a13.185 13.185 0 0 0 2.108-3.785 13.67 13.67 0 0 0 .5-1.724 13.282 13.282 0 0 0-.004-5.81zm-73.147 29.432a14.516 14.516 0 0 0 .703 1.703 3.314 3.314 0 0 0-.327 2.49 39.372 39.372 0 0 0 3.742 6.7 35.06 35.06 0 0 1 2.263 3.364c.17.315.392.803.553 1.136a4.24 4.24 0 1 1-7.63 3.607c-.161-.33-.385-.77-.522-1.082a35.275 35.275 0 0 1-1.225-3.868 39.305 39.305 0 0 0-2.896-7.097 3.335 3.335 0 0 0-2.154-1.307c-.135-.233-.635-1.15-.903-1.623a54.617 54.617 0 0 1-38.948-.1l-.955 1.73a3.429 3.429 0 0 0-1.819.887 29.517 29.517 0 0 0-3.268 7.582 34.9 34.9 0 0 1-1.218 3.868c-.135.31-.361.744-.522 1.073v.009l-.007.008a4.238 4.238 0 1 1-7.619-3.616c.159-.335.372-.82.54-1.135a35.177 35.177 0 0 1 2.262-3.373 41.228 41.228 0 0 0 3.82-6.866 4.188 4.188 0 0 0-.376-2.387l.768-1.84a54.922 54.922 0 0 1-24.338-30.387l-1.839.313a4.68 4.68 0 0 0-2.428-.855 39.524 39.524 0 0 0-7.356 2.165 35.589 35.589 0 0 1-3.787 1.45c-.305.084-.745.168-1.093.244-.028.01-.052.022-.08.029a.605.605 0 0 1-.065.006 4.236 4.236 0 1 1-1.874-8.224l.061-.015.037-.01c.353-.083.805-.2 1.127-.262a35.27 35.27 0 0 1 4.05-.326 39.388 39.388 0 0 0 7.564-1.242 5.835 5.835 0 0 0 1.814-1.83l1.767-.516a54.613 54.613 0 0 1 8.613-38.073l-1.353-1.206a4.688 4.688 0 0 0-.848-2.436 39.366 39.366 0 0 0-6.277-4.41 35.25 35.25 0 0 1-3.499-2.046c-.256-.191-.596-.478-.874-.704l-.063-.044a4.473 4.473 0 0 1-1.038-6.222 4.066 4.066 0 0 1 3.363-1.488 5.03 5.03 0 0 1 2.942 1.11c.287.225.68.526.935.745a35.253 35.253 0 0 1 2.78 2.95 39.383 39.383 0 0 0 5.69 5.142 3.333 3.333 0 0 0 2.507.243q.754.55 1.522 1.082A54.289 54.289 0 0 1 102.86 61.89a55.052 55.052 0 0 1 7.63-1.173l.1-1.784a4.6 4.6 0 0 0 1.37-2.184 39.476 39.476 0 0 0-.47-7.654 35.466 35.466 0 0 1-.576-4.014c-.011-.307.006-.731.01-1.081 0-.04-.01-.08-.01-.118a4.242 4.242 0 1 1 8.441-.004c0 .37.022.86.009 1.2a35.109 35.109 0 0 1-.579 4.013 39.533 39.533 0 0 0-.478 7.656 3.344 3.344 0 0 0 1.379 2.11c.015.305.065 1.323.102 1.884a55.309 55.309 0 0 1 35.032 16.927l1.606-1.147a4.69 4.69 0 0 0 2.56-.278 39.532 39.532 0 0 0 5.69-5.148 35.004 35.004 0 0 1 2.787-2.95c.259-.222.65-.52.936-.746a4.242 4.242 0 1 1 5.258 6.598c-.283.229-.657.548-.929.75a35.095 35.095 0 0 1-3.507 2.046 39.495 39.495 0 0 0-6.277 4.41 3.337 3.337 0 0 0-.792 2.39c-.235.216-1.06.947-1.497 1.343a54.837 54.837 0 0 1 8.792 37.983l1.704.496a4.745 4.745 0 0 0 1.82 1.83 39.464 39.464 0 0 0 7.568 1.246 35.64 35.64 0 0 1 4.046.324c.355.065.868.207 1.23.29a4.236 4.236 0 1 1-1.878 8.223l-.061-.008c-.028-.007-.054-.022-.083-.03-.348-.075-.785-.151-1.09-.231a35.14 35.14 0 0 1-3.785-1.462 39.477 39.477 0 0 0-7.363-2.165 3.337 3.337 0 0 0-2.362.877q-.9-.171-1.804-.316a54.92 54.92 0 0 1-24.328 30.605z" class="cls-2"/><path d="M225.407 135.107L206.4 52.547a14.838 14.838 0 0 0-7.958-9.9l-76.935-36.73a14.825 14.825 0 0 0-12.771 0L31.808 42.669a14.838 14.838 0 0 0-7.961 9.895L4.873 135.129a14.668 14.668 0 0 0 1.995 11.185c.261.4.538.788.838 1.162l53.246 66.205a14.98 14.98 0 0 0 11.499 5.487l85.387-.02a14.986 14.986 0 0 0 11.5-5.48l53.227-66.211a14.72 14.72 0 0 0 2.842-12.347zm-9.197 3.866a13.677 13.677 0 0 1-.498 1.723 13.184 13.184 0 0 1-2.11 3.786l-47.299 58.838-1.486 1.852a13.305 13.305 0 0 1-3.24 2.865 13.945 13.945 0 0 1-1.474.822q-.513.237-1.045.43a13.873 13.873 0 0 1-1.383.445 13.473 13.473 0 0 1-1.989.379 12.988 12.988 0 0 1-1.41.082l-77.504.018h-.76a13.298 13.298 0 0 1-3.429-.472 13.925 13.925 0 0 1-3.855-1.679 13.424 13.424 0 0 1-2.576-2.132c-.233-.246-.468-.487-.68-.75l-48.805-60.679q-.408-.514-.765-1.066a13.102 13.102 0 0 1-1.343-2.726 13.505 13.505 0 0 1-.491-1.719 13.315 13.315 0 0 1 .004-5.809l17.394-75.675a13.598 13.598 0 0 1 7.295-9.07l70.508-33.685a13.589 13.589 0 0 1 11.705 0l70.519 33.67a13.602 13.602 0 0 1 7.293 9.073l17.422 75.674a13.282 13.282 0 0 1 .002 5.807z" class="cls-1"/><path d="M185.814 127.106c-.36-.083-.874-.225-1.227-.29a35.642 35.642 0 0 0-4.046-.326 39.464 39.464 0 0 1-7.57-1.242 4.745 4.745 0 0 1-1.82-1.832l-1.704-.496a54.837 54.837 0 0 0-8.79-37.983c.436-.396 1.262-1.127 1.495-1.342a3.338 3.338 0 0 1 .792-2.39 39.495 39.495 0 0 1 6.277-4.41 35.095 35.095 0 0 0 3.507-2.046c.272-.202.644-.522.929-.75a4.242 4.242 0 1 0-5.256-6.6c-.288.227-.68.525-.936.747a35.004 35.004 0 0 0-2.789 2.95 39.533 39.533 0 0 1-5.69 5.148 4.69 4.69 0 0 1-2.56.278l-1.606 1.147a55.309 55.309 0 0 0-35.032-16.927c-.039-.561-.087-1.577-.102-1.884a3.344 3.344 0 0 1-1.377-2.11 39.533 39.533 0 0 1 .478-7.656 35.112 35.112 0 0 0 .575-4.012c.013-.34-.007-.834-.007-1.201a4.242 4.242 0 1 0-8.441.004c0 .04.009.078.01.118-.004.35-.021.774-.01 1.08a35.476 35.476 0 0 0 .576 4.015 39.475 39.475 0 0 1 .47 7.654 4.601 4.601 0 0 1-1.37 2.182l-.1 1.786a55.052 55.052 0 0 0-7.63 1.173 54.289 54.289 0 0 0-27.574 15.754q-.77-.531-1.526-1.082a3.333 3.333 0 0 1-2.506-.243 39.383 39.383 0 0 1-5.69-5.141 35.255 35.255 0 0 0-2.777-2.95c-.257-.22-.65-.52-.938-.75a5.03 5.03 0 0 0-2.942-1.11 4.066 4.066 0 0 0-3.363 1.49 4.473 4.473 0 0 0 1.038 6.222l.065.046c.276.226.616.515.872.702a35.256 35.256 0 0 0 3.499 2.048 39.367 39.367 0 0 1 6.276 4.412 4.69 4.69 0 0 1 .849 2.434l1.351 1.208a54.613 54.613 0 0 0-8.611 38.073l-1.767.514a5.835 5.835 0 0 1-1.814 1.827 39.39 39.39 0 0 1-7.565 1.247 35.266 35.266 0 0 0-4.049.326c-.324.06-.774.174-1.127.262l-.037.008-.06.018a4.236 4.236 0 1 0 1.875 8.224l.063-.01c.028-.006.052-.02.08-.025.348-.08.786-.163 1.092-.246a35.59 35.59 0 0 0 3.786-1.451 39.527 39.527 0 0 1 7.358-2.165 4.68 4.68 0 0 1 2.426.857l1.84-.315a54.922 54.922 0 0 0 24.34 30.387l-.769 1.84a4.188 4.188 0 0 1 .377 2.387 41.228 41.228 0 0 1-3.82 6.864 35.183 35.183 0 0 0-2.263 3.372c-.168.318-.381.805-.542 1.138a4.238 4.238 0 1 0 7.621 3.616l.007-.008v-.01c.16-.33.387-.763.522-1.072a34.903 34.903 0 0 0 1.218-3.868 29.517 29.517 0 0 1 3.268-7.582 3.43 3.43 0 0 1 1.819-.888l.957-1.73a54.617 54.617 0 0 0 38.946.099c.268.478.768 1.392.9 1.623a3.335 3.335 0 0 1 2.155 1.31 39.306 39.306 0 0 1 2.898 7.096 35.275 35.275 0 0 0 1.225 3.868c.137.312.36.75.522 1.082a4.24 4.24 0 1 0 7.63-3.607c-.161-.333-.383-.82-.55-1.136a35.06 35.06 0 0 0-2.263-3.364 39.372 39.372 0 0 1-3.742-6.7 3.314 3.314 0 0 1 .324-2.49 14.519 14.519 0 0 1-.703-1.703 54.92 54.92 0 0 0 24.328-30.605c.546.087 1.497.253 1.806.316a3.337 3.337 0 0 1 2.36-.877 39.476 39.476 0 0 1 7.36 2.165 35.135 35.135 0 0 0 3.788 1.462c.305.08.74.156 1.09.233.029.008.055.02.083.028l.06.009a4.236 4.236 0 1 0 1.878-8.224zm-40.1-42.987l-18.037 12.787-.063-.03a3.723 3.723 0 0 1-5.913-2.838l-.02-.01-1.253-22.103a43.85 43.85 0 0 1 25.285 12.194zm-33.978 24.228h6.788l4.22 5.276-1.513 6.58-6.096 2.934-6.114-2.94-1.516-6.583zm-6.386-35.648a44.672 44.672 0 0 1 4.503-.774l-1.255 22.137-.092.044a3.72 3.72 0 0 1-5.904 2.852l-.035.02-18.154-12.872a43.467 43.467 0 0 1 20.937-11.407zm-27.52 19.68l16.574 14.824-.018.09a3.72 3.72 0 0 1-1.462 6.395l-.017.072-21.245 6.13a43.454 43.454 0 0 1 6.168-27.51zm22.191 39.38l-8.441 20.397a43.696 43.696 0 0 1-17.536-21.948l21.783-3.7.037.049a3.655 3.655 0 0 1 .73-.065 3.72 3.72 0 0 1 3.364 5.185zm24.916 26.23a43.637 43.637 0 0 1-23.815-1.223l10.713-19.372h.018a3.725 3.725 0 0 1 6.557-.006h.08l10.74 19.404q-2.091.698-4.293 1.199zm13.841-5.751l-8.528-20.605.026-.037a3.725 3.725 0 0 1 1.803-4.823 3.685 3.685 0 0 1 1.425-.37 3.59 3.59 0 0 1 .855.063l.037-.046 21.977 3.714a43.53 43.53 0 0 1-17.595 22.105zm19.903-32.42l-21.352-6.15-.02-.09a3.725 3.725 0 0 1-1.46-6.395l-.008-.043 16.482-14.751a44.279 44.279 0 0 1 6.357 27.43z" class="cls-1"/></svg>
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "SplitAsset", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return SplitAsset;
9
+ }
10
+ });
11
+ const _classtransformer = require("class-transformer");
12
+ const _n8nworkflow = require("n8n-workflow");
13
+ const _asset = require("../../../common/asset");
14
+ function _define_property(obj, key, value) {
15
+ if (key in obj) {
16
+ Object.defineProperty(obj, key, {
17
+ value: value,
18
+ enumerable: true,
19
+ configurable: true,
20
+ writable: true
21
+ });
22
+ } else {
23
+ obj[key] = value;
24
+ }
25
+ return obj;
26
+ }
27
+ class SplitAsset {
28
+ async execute() {
29
+ const mode = this.getNodeParameter("mode", 0);
30
+ let assets = this.getInputData().map((n)=>(0, _classtransformer.plainToInstance)(_asset.Asset, n.json));
31
+ if (mode === "all") {
32
+ assets = assets.flatMap((n)=>n.splitBySubdomains());
33
+ } else if (mode === "by_field") {
34
+ const field = this.getNodeParameter("field", 0);
35
+ switch(field){
36
+ case "subdomain":
37
+ assets = assets.flatMap((n)=>n.splitBySubdomains());
38
+ break;
39
+ }
40
+ }
41
+ return [
42
+ assets.map((n)=>{
43
+ return {
44
+ json: (0, _classtransformer.instanceToPlain)(n)
45
+ };
46
+ })
47
+ ];
48
+ }
49
+ constructor(){
50
+ _define_property(this, "description", {
51
+ displayName: "Split Asset",
52
+ name: "splitAsset",
53
+ icon: "file:split.svg",
54
+ group: [
55
+ "transform"
56
+ ],
57
+ version: 1,
58
+ description: "Split assets",
59
+ defaults: {
60
+ name: "Split Asset"
61
+ },
62
+ // eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node
63
+ inputs: [
64
+ _n8nworkflow.NodeConnectionType.Main
65
+ ],
66
+ // eslint-disable-next-line n8n-nodes-base/node-class-description-outputs-wrong
67
+ outputs: [
68
+ _n8nworkflow.NodeConnectionType.Main
69
+ ],
70
+ credentials: [],
71
+ properties: [
72
+ {
73
+ displayName: "Split Mode",
74
+ name: "mode",
75
+ type: "options",
76
+ default: "all",
77
+ options: [
78
+ {
79
+ name: "All",
80
+ value: "all"
81
+ },
82
+ {
83
+ name: "By Field",
84
+ value: "by_field"
85
+ }
86
+ ]
87
+ },
88
+ {
89
+ displayName: "Field",
90
+ name: "field",
91
+ type: "options",
92
+ displayOptions: {
93
+ show: {
94
+ mode: [
95
+ "by_field"
96
+ ]
97
+ }
98
+ },
99
+ default: "subdomain",
100
+ options: [
101
+ {
102
+ name: "Subdomain",
103
+ value: "subdomain"
104
+ }
105
+ ]
106
+ }
107
+ ]
108
+ });
109
+ }
110
+ }
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 24.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" focusable="false" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 210 210" width="60" height="60" xml:space="preserve">
4
+ <style type="text/css">
5
+ .st0{fill:#FF6D5A;}
6
+ </style>
7
+ <path class="st0" d="M18.8,18.8C8.4,18.8,0,27.1,0,37.5s8.4,18.8,18.8,18.8s18.8-8.4,18.8-18.8S29.1,18.8,18.8,18.8z M18.8,81.2
8
+ C8.4,81.2,0,89.6,0,100s8.4,18.8,18.8,18.8s18.8-8.4,18.8-18.8S29.1,81.2,18.8,81.2z M18.8,143.8C8.4,143.8,0,152.1,0,162.5
9
+ s8.4,18.8,18.8,18.8s18.8-8.4,18.8-18.8S29.1,143.8,18.8,143.8z M193.8,150h-125c-3.5,0-6.2,2.8-6.2,6.2v12.5c0,3.5,2.8,6.2,6.2,6.2
10
+ h125c3.5,0,6.2-2.8,6.2-6.2v-12.5C200,152.8,197.2,150,193.8,150z M193.8,25h-125c-3.5,0-6.2,2.8-6.2,6.2v12.5
11
+ c0,3.5,2.8,6.2,6.2,6.2h125c3.5,0,6.2-2.8,6.2-6.2V31.2C200,27.8,197.2,25,193.8,25z M193.8,87.5h-125c-3.5,0-6.2,2.8-6.2,6.2v12.5
12
+ c0,3.5,2.8,6.2,6.2,6.2h125c3.5,0,6.2-2.8,6.2-6.2V93.8C200,90.3,197.2,87.5,193.8,87.5z"/>
13
+ </svg>
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "Collector", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return Collector;
9
+ }
10
+ });
11
+ const _classtransformer = require("class-transformer");
12
+ const _n8nworkflow = require("n8n-workflow");
13
+ const _asset = require("../../common/asset");
14
+ const _collector = require("../../common/collector");
15
+ const _connectionType = require("../../common/connectionType");
16
+ function _define_property(obj, key, value) {
17
+ if (key in obj) {
18
+ Object.defineProperty(obj, key, {
19
+ value: value,
20
+ enumerable: true,
21
+ configurable: true,
22
+ writable: true
23
+ });
24
+ } else {
25
+ obj[key] = value;
26
+ }
27
+ return obj;
28
+ }
29
+ class Collector {
30
+ async execute() {
31
+ let assets = this.getInputData().map((n)=>(0, _classtransformer.plainToInstance)(_asset.Asset, n.json));
32
+ const batch = this.getNodeParameter("batch", 0);
33
+ if (batch) {
34
+ const executor = await this.getInputConnectionData(_connectionType.NodeConnectionType.Executor, 0);
35
+ const collector = new _collector.Collector();
36
+ collector.setExecutor(executor);
37
+ let runners = (await this.getInputConnectionData(_connectionType.NodeConnectionType.Runner, 0)).flat();
38
+ runners = runners.sort((a, b)=>a.priority - b.priority);
39
+ for (const runner of runners){
40
+ assets = await runner.run(collector, assets);
41
+ }
42
+ return [
43
+ assets.flatMap((n)=>{
44
+ return this.helpers.returnJsonArray((0, _classtransformer.instanceToPlain)(n));
45
+ })
46
+ ];
47
+ } else {
48
+ const results = [];
49
+ for(let idx = 0; idx < assets.length; idx++){
50
+ const asset = assets[idx];
51
+ let currentAssets = [
52
+ asset
53
+ ];
54
+ const executor = await this.getInputConnectionData(_connectionType.NodeConnectionType.Executor, idx);
55
+ const collector = new _collector.Collector();
56
+ collector.setExecutor(executor);
57
+ let runners = (await this.getInputConnectionData(_connectionType.NodeConnectionType.Runner, 0)).flat();
58
+ runners = runners.sort((a, b)=>a.priority - b.priority);
59
+ for (const runner of runners){
60
+ currentAssets = await runner.run(collector, currentAssets);
61
+ }
62
+ results.push(...this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(currentAssets.map((n)=>(0, _classtransformer.instanceToPlain)(n))), {
63
+ itemData: {
64
+ item: idx
65
+ }
66
+ }));
67
+ }
68
+ return [
69
+ results
70
+ ];
71
+ }
72
+ }
73
+ constructor(){
74
+ _define_property(this, "description", {
75
+ displayName: "Collector",
76
+ name: "collector",
77
+ icon: "fa:link",
78
+ group: [
79
+ "transform"
80
+ ],
81
+ version: 1,
82
+ description: "A collector to collect all info about site",
83
+ defaults: {
84
+ name: "Collector",
85
+ color: "#D8EF40"
86
+ },
87
+ // eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node
88
+ inputs: [
89
+ _n8nworkflow.NodeConnectionType.Main,
90
+ {
91
+ displayName: "Executor",
92
+ maxConnections: 1,
93
+ type: _connectionType.NodeConnectionType.Executor,
94
+ required: true
95
+ },
96
+ {
97
+ displayName: "Collector",
98
+ type: _connectionType.NodeConnectionType.Runner,
99
+ required: false
100
+ }
101
+ ],
102
+ // eslint-disable-next-line n8n-nodes-base/node-class-description-outputs-wrong
103
+ outputs: [
104
+ _n8nworkflow.NodeConnectionType.Main
105
+ ],
106
+ credentials: [],
107
+ properties: [
108
+ {
109
+ displayName: "Batch",
110
+ name: "batch",
111
+ type: "boolean",
112
+ default: true
113
+ },
114
+ {
115
+ displayName: "Asset",
116
+ name: "asset",
117
+ type: "json",
118
+ default: "={{ $json }}"
119
+ }
120
+ ]
121
+ });
122
+ }
123
+ }