@daiyam/artifact-npm-cli-ts 0.1.0 → 0.3.0

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/README.md CHANGED
@@ -13,7 +13,7 @@ Getting Started
13
13
  mkdir myproject
14
14
  cd myproject
15
15
  npm init -y
16
- artifact add @daiyam/base @daiyam/lang-ts @daiyam/npm-ts @daiyam/npm-cli-ts
16
+ artifact add @daiyam/lang-js @daiyam/lang-ts @daiyam/npm-ts @daiyam/npm-cli-ts
17
17
  ```
18
18
 
19
19
  License
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "bin": {
3
- "hello": "bin/hello"
3
+ "#[[package.json.name]]": "bin/#[[package.json.name]]"
4
4
  },
5
5
  "dependencies": {
6
- "ansi-colors": "^4.1.1",
7
- "commander": "^8.1.0",
8
- "enquirer": "^2.3.6"
6
+ "ansi-colors": "^4.1.3",
7
+ "commander": "^13.1.0",
8
+ "enquirer": "^2.4.1"
9
9
  }
10
10
  }
@@ -1,10 +1,12 @@
1
1
  import { Command } from 'commander';
2
2
  import pkg from '../package.json';
3
- import { hello } from './commands/hello';
3
+ import { hello } from './commands/hello.js';
4
4
 
5
5
  const program = new Command();
6
6
 
7
- program.version(pkg.version);
7
+ program
8
+ .version(pkg.version, '-v, --version')
9
+ .description(pkg.description);
8
10
 
9
11
  program
10
12
  .command('hello')
@@ -3,11 +3,11 @@ import enquirer from 'enquirer';
3
3
 
4
4
  export async function hello(name: string | undefined): Promise<void> {
5
5
  if(!name) {
6
- const response = await enquirer.prompt([
6
+ const response = await enquirer.prompt<{ name: string }>([
7
7
  {
8
8
  type: 'input',
9
9
  name: 'name',
10
- message: 'What\'s your name?'
10
+ message: 'What\'s your name?',
11
11
  },
12
12
  ]) as { name: string };
13
13
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daiyam/artifact-npm-cli-ts",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "The configuration to create a CLI",
5
5
  "author": {
6
6
  "name": "Baptiste Augrain",
@@ -31,5 +31,5 @@
31
31
  "project-template",
32
32
  "scaffold"
33
33
  ],
34
- "gitHead": "8f749cf203df6e391a716b30fdf7d2a169a45839"
34
+ "gitHead": "c73c92c82234f1f1e6c94ef2abd076feab0b8169"
35
35
  }
File without changes