cli-argv-util 1.4.0 → 1.4.1

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/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2022-2025 Individual contributors to cli-argv-util
3
+ Copyright (c) 2022-2026 Individual contributors to cli-argv-util
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,4 +1,4 @@
1
- //! cli-argv-util v1.4.0 ~~ https://github.com/center-key/cli-argv-util ~~ MIT License
1
+ //! cli-argv-util v1.4.1 ~~ https://github.com/center-key/cli-argv-util ~~ MIT License
2
2
 
3
3
  export type StringFlagMap = {
4
4
  [flag: string]: string | undefined;
@@ -10,6 +10,8 @@ export type Ancestor = {
10
10
  common: string;
11
11
  source: string;
12
12
  target: string;
13
+ renamed: boolean;
14
+ filename: string | null;
13
15
  message: string;
14
16
  };
15
17
  export type Result = {
@@ -1,4 +1,4 @@
1
- //! cli-argv-util v1.4.0 ~~ https://github.com/center-key/cli-argv-util ~~ MIT License
1
+ //! cli-argv-util v1.4.1 ~~ https://github.com/center-key/cli-argv-util ~~ MIT License
2
2
 
3
3
  import { execSync } from 'node:child_process';
4
4
  import chalk from 'chalk';
@@ -46,8 +46,12 @@ const cliArgvUtil = {
46
46
  const source = sourceFile.substring(len);
47
47
  const target = targetFile.substring(len);
48
48
  const intro = common ? chalk.blue(common) + chalk.gray.bold(': ') : '';
49
- const message = intro + chalk.white(source) + chalk.gray.bold(' → ') + chalk.green(target);
50
- return { common, source, target, message };
49
+ const renamed = path.basename(sourceFile) !== path.basename(targetFile);
50
+ const filename = renamed ? null : path.basename(sourceFile);
51
+ const folder = path.dirname(target);
52
+ const dest = renamed ? target : (folder === '.' ? filename : folder + '/');
53
+ const message = intro + chalk.white(source) + chalk.gray.bold(' → ') + chalk.green(dest);
54
+ return { common, source, target, renamed, filename, message };
51
55
  },
52
56
  unquoteArgs(args) {
53
57
  const unquote = (builder, nextArg) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cli-argv-util",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Simple utility to parse command line parameters and flags (arguments vector)",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -67,6 +67,6 @@
67
67
  "rimraf": "~6.1",
68
68
  "run-scripts-util": "~1.3",
69
69
  "typescript": "~5.9",
70
- "typescript-eslint": "~8.49"
70
+ "typescript-eslint": "~8.52"
71
71
  }
72
72
  }