@hasagi/cli 0.8.3 → 0.8.4

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.
Files changed (2) hide show
  1. package/bin/index.js +3 -2
  2. package/package.json +1 -1
package/bin/index.js CHANGED
@@ -38,7 +38,6 @@ if (cmd === "request") {
38
38
  const path = options.path.toLowerCase();
39
39
  const out = (options.out === undefined ? undefined : options.out !== "" ? options.out : "./");
40
40
  const isDirectory = out !== undefined ? await fs.stat(out).then(stat => stat.isDirectory(), () => false) : false;
41
- log("Waiting for League client...");
42
41
  log(`Sending '${method}' request to 'https://127.0.0.1:${client.getPort()}${path}'...`);
43
42
  const result = await client.request({
44
43
  method,
@@ -49,8 +48,10 @@ if (cmd === "request") {
49
48
  body: res.data
50
49
  }), (err) => ({
51
50
  message: `${err.message}`,
52
- body: err.lcuError
51
+ body: err.lcuError,
52
+ err
53
53
  }));
54
+ console.log(result);
54
55
  if (out) {
55
56
  await fs.writeFile(isDirectory ? _path.join(out, `${method}-${path.substring(1).replaceAll("/", "_")}-${Date.now()}.json`) : out, JSON.stringify(result, null, 4));
56
57
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasagi/cli",
3
- "version": "0.8.3",
3
+ "version": "0.8.4",
4
4
  "description": "This package provides the 'hasagi' command-line interface",
5
5
  "bin": {
6
6
  "hasagi": "bin/index.js"