@kokiito0926/pseudoalias 0.0.7 → 0.0.8

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 +7 -9
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -31,7 +31,7 @@
31
31
  // >> $ ./index.js addition 1 2
32
32
  // >> $ ./index.js --unregister
33
33
 
34
- import { os, minimist, fs, path, argv } from "zx";
34
+ import { os, fs, path, argv } from "zx";
35
35
  import { pathToFileURL } from "node:url";
36
36
 
37
37
  const CONFIG_DIR = path.join(os.homedir(), ".pseudoalias");
@@ -40,19 +40,17 @@ const CONFIG_FILE = path.join(CONFIG_DIR, "config.js");
40
40
  const commands = argv._;
41
41
  // console.log(commands);
42
42
 
43
- const args = minimist(process.argv.slice(2));
44
- const config = args.config;
43
+ const config = argv.config;
45
44
  // console.log(argv);
46
- // console.log(args);
47
45
  // process.exit(0);
48
46
 
49
47
  /*
50
- const completion = args.completion;
48
+ const completion = argv.completion;
51
49
  */
52
50
 
53
- if (args.register) {
54
- if (args.config) {
55
- const absConfigPath = path.resolve(args.config);
51
+ if (argv.register) {
52
+ if (argv.config) {
53
+ const absConfigPath = path.resolve(argv.config);
56
54
  const configData = fs.readFileSync(absConfigPath, "utf-8");
57
55
 
58
56
  await fs.ensureDir(CONFIG_DIR);
@@ -67,7 +65,7 @@ if (args.register) {
67
65
  process.exit(0);
68
66
  }
69
67
 
70
- if (args.unregister) {
68
+ if (argv.unregister) {
71
69
  if (await fs.exists(CONFIG_DIR)) {
72
70
  await fs.remove(CONFIG_DIR);
73
71
  console.log("Success: Unregistered and removed configuration.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kokiito0926/pseudoalias",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "private": false,
5
5
  "description": "擬似的なエイリアスを作成することができるコマンドラインのツールです。",
6
6
  "keywords": [