@fett/synology-api 0.0.2-beta.1 → 0.0.2-beta.2

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/lib/cli/apis.js +3 -0
  2. package/package.json +1 -1
package/lib/cli/apis.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { program } from "commander";
2
2
  import chalk from "chalk";
3
+ import ora from "ora";
3
4
  import { loadConfig } from "./config.js";
4
5
  import { SynologyApi } from "../core.js";
5
6
  import { SynologyApiModules, SynologyApiMethods } from "../modules/index.js";
@@ -28,7 +29,9 @@ export const onMethodCall = (module) => async (method, options) => {
28
29
  throw new Error(`Module method ${module} is not a function`);
29
30
  }
30
31
  const synologyApi = new SynologyApi(connection);
32
+ const spinner = ora("waiting...").start();
31
33
  const result = await synologyApi[module]?.[method](params);
34
+ spinner.stop();
32
35
  if (pretty) {
33
36
  console.log(JSON.stringify(result, null, 2));
34
37
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fett/synology-api",
3
- "version": "0.0.2-beta.1",
3
+ "version": "0.0.2-beta.2",
4
4
  "description": "synology api for nodejs",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",