pmcf 1.36.0 → 1.36.1
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/package.json +1 -1
- package/src/base.mjs +12 -5
package/package.json
CHANGED
package/src/base.mjs
CHANGED
|
@@ -87,11 +87,14 @@ export class Base {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
get directory() {
|
|
90
|
-
return
|
|
90
|
+
return (
|
|
91
|
+
this.#directory ||
|
|
92
|
+
(this.owner ? join(this.owner.directory, this.name) : this.name)
|
|
93
|
+
);
|
|
91
94
|
}
|
|
92
95
|
|
|
93
96
|
get fullName() {
|
|
94
|
-
return this.owner && this.name
|
|
97
|
+
return this.owner?.fullName && this.name
|
|
95
98
|
? join(this.owner.fullName, this.name)
|
|
96
99
|
: this.name;
|
|
97
100
|
}
|
|
@@ -200,9 +203,13 @@ export function extractFrom(object) {
|
|
|
200
203
|
json[p].name = value.name;
|
|
201
204
|
}
|
|
202
205
|
} else {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
+
if (Array.isArray(value)) {
|
|
207
|
+
json[p] = value;
|
|
208
|
+
} else {
|
|
209
|
+
json[p] = Object.fromEntries(
|
|
210
|
+
Object.entries(value).map(([k, v]) => [k, extractFrom(v)])
|
|
211
|
+
);
|
|
212
|
+
}
|
|
206
213
|
}
|
|
207
214
|
break;
|
|
208
215
|
default:
|