pmcf 4.17.4 → 4.18.0
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 -19
- package/package.json +1 -1
- package/src/owner.mjs +1 -1
- package/types/owner.d.mts +1 -1
package/bin/pmcf-info
CHANGED
|
@@ -1,26 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { prepare } from "../src/cli.mjs";
|
|
3
3
|
|
|
4
|
-
const { root, args, options } = await prepare({
|
|
5
|
-
service: {
|
|
6
|
-
type: "string"
|
|
7
|
-
},
|
|
8
|
-
address: {
|
|
9
|
-
type: "boolean"
|
|
10
|
-
}
|
|
11
|
-
});
|
|
4
|
+
const { root, args, options } = await prepare({});
|
|
12
5
|
|
|
13
6
|
for (const name of args) {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
} else {
|
|
24
|
-
console.log(object.toJSON());
|
|
7
|
+
const [path, expression] = name.split("?");
|
|
8
|
+
|
|
9
|
+
const object = await root.load(path);
|
|
10
|
+
|
|
11
|
+
let result = object.expression(expression);
|
|
12
|
+
|
|
13
|
+
if (result instanceof Iterator) {
|
|
14
|
+
result = Array.from(result);
|
|
25
15
|
}
|
|
16
|
+
|
|
17
|
+
console.log(result);
|
|
26
18
|
}
|
package/package.json
CHANGED
package/src/owner.mjs
CHANGED
package/types/owner.d.mts
CHANGED
|
@@ -192,7 +192,7 @@ export class Owner extends Base {
|
|
|
192
192
|
addObject(object: any): void;
|
|
193
193
|
findServices(filter: any): Generator<any, void, any>;
|
|
194
194
|
locationNamed(name: any): any;
|
|
195
|
-
locations(): any;
|
|
195
|
+
get locations(): any;
|
|
196
196
|
hostNamed(name: any): any;
|
|
197
197
|
directHosts(): Set<any>;
|
|
198
198
|
hosts(): Set<any>;
|