pmcf 6.41.4 → 6.41.6
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/bin/pmcf-info +11 -2
- package/package.json +1 -1
- package/src/core.mjs +2 -4
package/bin/pmcf-info
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { extendingAttributeIterator } from "pacc";
|
|
3
|
+
import { AggregatedMap } from "aggregated-map";
|
|
4
|
+
|
|
3
5
|
import { prepare } from "../src/cli.mjs";
|
|
4
6
|
|
|
5
7
|
const { root, args, options } = await prepare({
|
|
@@ -34,6 +36,13 @@ function show(value, indent, options) {
|
|
|
34
36
|
return;
|
|
35
37
|
}
|
|
36
38
|
|
|
39
|
+
if (value instanceof AggregatedMap || value instanceof Map) {
|
|
40
|
+
for (const v of value.values()) {
|
|
41
|
+
show(v, indent + 1, options);
|
|
42
|
+
}
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
|
|
37
46
|
if (value instanceof Iterator || Array.isArray(value)) {
|
|
38
47
|
for (const v of value) {
|
|
39
48
|
show(v, indent + 1, options);
|
|
@@ -114,8 +123,8 @@ function show(value, indent, options) {
|
|
|
114
123
|
} else {
|
|
115
124
|
if (typeof v.get === "function") {
|
|
116
125
|
console.log(name(attribute));
|
|
117
|
-
for(const [k,o] of v) {
|
|
118
|
-
show(o,indent + 2, options);
|
|
126
|
+
for (const [k, o] of v) {
|
|
127
|
+
show(o, indent + 2, options);
|
|
119
128
|
}
|
|
120
129
|
} else {
|
|
121
130
|
try {
|
package/package.json
CHANGED
package/src/core.mjs
CHANGED
|
@@ -304,16 +304,14 @@ export class core {
|
|
|
304
304
|
/**
|
|
305
305
|
*
|
|
306
306
|
* @param {string} expression
|
|
307
|
-
* @param {object} options
|
|
308
307
|
* @returns {any}
|
|
309
308
|
*/
|
|
310
|
-
expression(expression
|
|
309
|
+
expression(expression) {
|
|
311
310
|
return parse(expression, {
|
|
312
311
|
root: this.root,
|
|
313
312
|
current: this,
|
|
314
313
|
valueFor: (name, at) =>
|
|
315
|
-
typeof at?.value === "function" ? at.value(name) : globals[name]
|
|
316
|
-
...options
|
|
314
|
+
typeof at?.value === "function" ? at.value(name) : globals[name]
|
|
317
315
|
});
|
|
318
316
|
}
|
|
319
317
|
|