kourou 1.5.0-dev.1 → 1.5.0-dev.3
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/README.md +1 -1
- package/bin/run +5 -3
- package/lib/commands/sdk/query.js +7 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/bin/run
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const oclif = require('@oclif/core')
|
|
4
|
-
|
|
5
3
|
/**
|
|
6
4
|
* oclif v1 accepted -v as an alias for --version, @oclif/core does not, and a
|
|
7
5
|
* script calling `kourou -v` would print nothing at all rather than fail.
|
|
@@ -14,4 +12,8 @@ if (process.argv[2] === '-v') {
|
|
|
14
12
|
process.argv[2] = '--version'
|
|
15
13
|
}
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
void (async () => {
|
|
16
|
+
const oclif = await import('@oclif/core')
|
|
17
|
+
|
|
18
|
+
await oclif.execute({ dir: __dirname })
|
|
19
|
+
})()
|
|
@@ -34,7 +34,13 @@ class SdkQuery extends common_1.Kommand {
|
|
|
34
34
|
const display = this.flags.display === ""
|
|
35
35
|
? response
|
|
36
36
|
: lodash_1.default.get(response, this.flags.display);
|
|
37
|
-
|
|
37
|
+
// An action that answers without the property --display points at, which
|
|
38
|
+
// is "result" by default, has nothing to show. JSON.stringify returns the
|
|
39
|
+
// undefined value rather than a string here, which used to be logged as
|
|
40
|
+
// the literal " undefined".
|
|
41
|
+
if (display !== undefined) {
|
|
42
|
+
this.log(JSON.stringify(display, null, 2));
|
|
43
|
+
}
|
|
38
44
|
this.logOk(`Successfully executed "${controller}:${action}"`);
|
|
39
45
|
}
|
|
40
46
|
}
|