@tolinax/ayoune-cli 2024.2.3 → 2024.2.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/index.js +16 -34
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,34 +1,16 @@
1
- #! /usr/bin/env node
2
- import { Command } from "commander";
3
- import { createSpinner } from "nanospinner";
4
- import { initializeSettings } from "./lib/helpers/initializeSettings.js";
5
- import { createProgram } from "./lib/commands/createProgram.js";
6
- import autoupdater from "cli-autoupdater";
7
- import path from "path";
8
- import { readFile } from "fs/promises";
9
- import * as process from "process";
10
- //Create new command instance
11
- //@ts-ignore
12
- const pkg = JSON.parse(await readFile(path.join(process.cwd(), "package.json"), "utf8"));
13
- const program = new Command();
14
- initializeSettings();
15
- //Setup spinner
16
- export const spinner = createSpinner("Getting data...");
17
- console.log(pkg);
18
- autoupdater(pkg)
19
- .then((updated) => {
20
- if (updated) {
21
- // The application was updated, so exit
22
- console.log("You may rerun the last command");
23
- process.exit();
24
- }
25
- else {
26
- // No update occurred, so just run the application
27
- createProgram(program);
28
- }
29
- })
30
- .catch((e) => {
31
- // An error has occurred so
32
- console.log(e);
33
- process.exit();
34
- });
1
+ #! /usr/bin/env node
2
+ import { Command } from "commander";
3
+ import { createSpinner } from "nanospinner";
4
+ import { initializeSettings } from "./lib/helpers/initializeSettings.js";
5
+ import { createProgram } from "./lib/commands/createProgram.js";
6
+ import path from "path";
7
+ import { readFile } from "fs/promises";
8
+ import * as process from "process";
9
+ //Create new command instance
10
+ //@ts-ignore
11
+ const pkg = JSON.parse(await readFile(path.join(process.cwd(), "package.json"), "utf8"));
12
+ const program = new Command();
13
+ initializeSettings();
14
+ //Setup spinner
15
+ export const spinner = createSpinner("Getting data...");
16
+ createProgram(program);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tolinax/ayoune-cli",
3
- "version": "2024.2.3",
3
+ "version": "2024.2.4",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./index.js",