n8n-nodes-soar 0.1.21 → 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 +7 -4
- 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,16 +73,16 @@ 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
87
|
metadata: this.metadata,
|
85
88
|
success: true
|
@@ -98,7 +101,7 @@ class Asset {
|
|
98
101
|
...this.dnsRecord?.A ?? [],
|
99
102
|
...this.dnsRecord?.AAAA ?? []
|
100
103
|
].map((n)=>{
|
101
|
-
return
|
104
|
+
return Asset.fromPlain({
|
102
105
|
basic: {
|
103
106
|
domain: this.basic.domain,
|
104
107
|
ip: n
|