npmytd 1.0.4 → 1.0.5
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/package.json +1 -1
- package/src/cli.js +9 -0
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -5,7 +5,16 @@ import chalk from 'chalk';
|
|
|
5
5
|
import path from 'path';
|
|
6
6
|
import { sanitizeFilename } from './utils.js';
|
|
7
7
|
|
|
8
|
+
const packageVersion = '1.0.4'; // Manually update this or automate with a build step if complexity increases
|
|
9
|
+
|
|
8
10
|
async function main() {
|
|
11
|
+
// Check for --version or -v arguments
|
|
12
|
+
const args = process.argv.slice(2); // Get arguments after 'node cli.js'
|
|
13
|
+
if (args.includes('--version') || args.includes('-v')) {
|
|
14
|
+
console.log(packageVersion);
|
|
15
|
+
process.exit(0);
|
|
16
|
+
}
|
|
17
|
+
|
|
9
18
|
console.log(chalk.bold.hex('#FF0000')(`
|
|
10
19
|
Welcome to NPMYTD - YouTube Downloader CLI!`));
|
|
11
20
|
|