n8n-nodes-soar 0.1.20 → 0.1.22
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/common/asset.js +13 -7
- package/package.json +1 -1
package/dist/common/asset.js
CHANGED
@@ -48,6 +48,9 @@ class MissingPropertyError extends Error {
|
|
48
48
|
}
|
49
49
|
}
|
50
50
|
class Asset {
|
51
|
+
static fromPlain(plain) {
|
52
|
+
return (0, _classtransformer.plainToInstance)(Asset, plain);
|
53
|
+
}
|
51
54
|
getDomain() {
|
52
55
|
if (!this.basic.domain) {
|
53
56
|
throw new MissingPropertyError("basic.domain", this);
|
@@ -70,18 +73,19 @@ class Asset {
|
|
70
73
|
return `${this.getHost()}:${this.getPort()}`;
|
71
74
|
}
|
72
75
|
clone(patch) {
|
73
|
-
return
|
76
|
+
return Asset.fromPlain(Object.assign({}, this, patch));
|
74
77
|
}
|
75
78
|
splitBySubdomains() {
|
76
79
|
if (this.subdomains?.length) {
|
77
80
|
return [
|
78
81
|
this,
|
79
82
|
...this.subdomains.map((n)=>{
|
80
|
-
return
|
83
|
+
return Asset.fromPlain({
|
81
84
|
basic: {
|
82
|
-
|
85
|
+
domain: n
|
83
86
|
},
|
84
|
-
metadata: this.metadata
|
87
|
+
metadata: this.metadata,
|
88
|
+
success: true
|
85
89
|
});
|
86
90
|
})
|
87
91
|
];
|
@@ -97,12 +101,13 @@ class Asset {
|
|
97
101
|
...this.dnsRecord?.A ?? [],
|
98
102
|
...this.dnsRecord?.AAAA ?? []
|
99
103
|
].map((n)=>{
|
100
|
-
return
|
104
|
+
return Asset.fromPlain({
|
101
105
|
basic: {
|
102
106
|
domain: this.basic.domain,
|
103
107
|
ip: n
|
104
108
|
},
|
105
|
-
metadata: this.metadata
|
109
|
+
metadata: this.metadata,
|
110
|
+
success: true
|
106
111
|
});
|
107
112
|
});
|
108
113
|
} else {
|
@@ -120,7 +125,8 @@ class Asset {
|
|
120
125
|
port: n.port,
|
121
126
|
protocol: n.protocol
|
122
127
|
},
|
123
|
-
metadata: this.metadata
|
128
|
+
metadata: this.metadata,
|
129
|
+
success: true
|
124
130
|
});
|
125
131
|
});
|
126
132
|
} else {
|