pterm 0.0.21 → 0.0.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/index.js +2 -0
- package/package.json +1 -1
- package/util.js +9 -0
package/index.js
CHANGED
|
@@ -69,6 +69,8 @@ const isHttpUri = (value) => typeof value === "string" && /^https?:\/\//i.test(v
|
|
|
69
69
|
await util.setStar(argv, false)
|
|
70
70
|
} else if (cmd === "which") {
|
|
71
71
|
await util.which(argv)
|
|
72
|
+
} else if (cmd === "home") {
|
|
73
|
+
await util.home(argv)
|
|
72
74
|
} else if (cmd === "status") {
|
|
73
75
|
await util.status(argv)
|
|
74
76
|
} else if (cmd === "logs") {
|
package/package.json
CHANGED
package/util.js
CHANGED
|
@@ -157,6 +157,15 @@ class Util {
|
|
|
157
157
|
throw error
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
|
+
async home(argv) {
|
|
161
|
+
const response = await axios.get("http://localhost:42000/pinokio/home")
|
|
162
|
+
if (argv.json) {
|
|
163
|
+
this.printJson(response.data)
|
|
164
|
+
} else if (response.data && response.data.path) {
|
|
165
|
+
process.stdout.write(String(response.data.path))
|
|
166
|
+
process.stdout.write("\n")
|
|
167
|
+
}
|
|
168
|
+
}
|
|
160
169
|
async filepicker(argv) {
|
|
161
170
|
const rpc = new RPC("ws://localhost:42000")
|
|
162
171
|
if (argv.path) {
|