klei-cli 1.0.0 → 1.0.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/README.md CHANGED
@@ -7,9 +7,9 @@ KLEI CLI es una herramienta de línea de comandos profesional con múltiples car
7
7
  Para instalar las dependencias del proyecto, ejecuta:
8
8
 
9
9
  ```bash
10
- npm install -g @kreisler/klei
10
+ npm install -g klei-cli
11
11
  # o
12
- pnpm install -g @kreisler/klei
12
+ pnpm install -g klei-cli
13
13
  ```
14
14
 
15
15
  ## Uso
package/bin/cli.js CHANGED
@@ -1,39 +1,16 @@
1
1
  #!/usr/bin/env node
2
- // #!/usr/bin/env node
3
- "use strict";
4
- var __create = Object.create;
5
- var __defProp = Object.defineProperty;
6
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
- var __getOwnPropNames = Object.getOwnPropertyNames;
8
- var __getProtoOf = Object.getPrototypeOf;
9
- var __hasOwnProp = Object.prototype.hasOwnProperty;
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
19
- // If the importer is in node compatibility mode or this is not an ESM
20
- // file that has been converted to a CommonJS file using a Babel-
21
- // compatible transform (i.e. "__esModule" has not been set), then set
22
- // "default" to the CommonJS "module.exports" for node compatibility.
23
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
24
- mod
25
- ));
2
+ // klei-cli
26
3
 
27
4
  // src/index.ts
28
- var import_chalk4 = __toESM(require("chalk"));
29
- var import_commander = require("commander");
5
+ import chalk4 from "chalk";
6
+ import { program } from "commander";
30
7
 
31
8
  // src/commands/help.ts
32
- var import_chalk = __toESM(require("chalk"));
9
+ import chalk from "chalk";
33
10
  function helpCommand() {
34
- console.log(import_chalk.default.blue("-".repeat(48)));
35
- console.log(import_chalk.default.bold.green("klei CLI - Ayuda"));
36
- console.log(import_chalk.default.yellow(`
11
+ console.log(chalk.blue("-".repeat(48)));
12
+ console.log(chalk.bold.green("klei CLI - Ayuda"));
13
+ console.log(chalk.yellow(`
37
14
  Comandos disponibles:
38
15
 
39
16
  saludar <nombre> Saluda al usuario.
@@ -47,39 +24,39 @@ function helpCommand() {
47
24
  klei saludar <nombre> - Saluda al usuario.
48
25
  klei help - Muestra la ayuda.
49
26
  `));
50
- console.log(import_chalk.default.blue("-".repeat(48)));
27
+ console.log(chalk.blue("-".repeat(48)));
51
28
  }
52
29
  var help_default = helpCommand;
53
30
 
54
31
  // src/commands/saludar.ts
55
- var import_chalk2 = __toESM(require("chalk"));
32
+ import chalk2 from "chalk";
56
33
  var saludar_default = (program2) => {
57
34
  program2.command("saludar <nombre>").description("Saluda al usuario").option("-e, --exclamar", "Agrega una exclamaci\xF3n").action((nombre, options) => {
58
- let mensaje = `Hola ${import_chalk2.default.green(nombre)}!`;
35
+ let mensaje = `Hola ${chalk2.green(nombre)}!`;
59
36
  if (options.exclamar) mensaje += " \u{1F44B}";
60
37
  console.log(mensaje);
61
38
  });
62
39
  };
63
40
 
64
41
  // src/utils/banner.ts
65
- var import_chalk3 = __toESM(require("chalk"));
66
- var import_figlet = __toESM(require("figlet"));
42
+ import chalk3 from "chalk";
43
+ import figlet from "figlet";
67
44
  var printBanner = () => {
68
45
  console.log(
69
- import_chalk3.default.blue(
70
- import_figlet.default.textSync("KLEI", { horizontalLayout: "full" })
46
+ chalk3.blue(
47
+ figlet.textSync("KLEI", { horizontalLayout: "full" })
71
48
  )
72
49
  );
73
50
  };
74
51
 
75
52
  // src/index.ts
76
53
  printBanner();
77
- import_commander.program.name("klei").version("1.0.0").description("CLI profesional con m\xFAltiples caracter\xEDsticas");
78
- import_commander.program.command("help").description("Muestra ayuda en espa\xF1ol").action(help_default);
79
- saludar_default(import_commander.program);
80
- import_commander.program.configureOutput({
54
+ program.name("klei").version("1.0.0").description("CLI profesional con m\xFAltiples caracter\xEDsticas");
55
+ program.command("help").description("Muestra ayuda en espa\xF1ol").action(help_default);
56
+ saludar_default(program);
57
+ program.configureOutput({
81
58
  outputError: (err) => {
82
- console.error(import_chalk4.default.red(`Error: ${err}`));
59
+ console.error(chalk4.red(`Error: ${err}`));
83
60
  }
84
61
  });
85
- import_commander.program.parse(process.argv);
62
+ program.parse(process.argv);
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "klei-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "cli for creating and managing packages",
5
+ "type": "module",
5
6
  "funding": {
6
7
  "type": "buymeacoffee",
7
8
  "url": "https://www.buymeacoffee.com/kreisler"
@@ -13,7 +14,7 @@
13
14
  "n:latest": "npm install -g npm@latest",
14
15
  "p:latest": "pnpm add -g pnpm",
15
16
  "p:update": "corepack install -g pnpm@10.4.1",
16
- "pp": "npm publish --access public",
17
+ "pp": "npm run b && npm publish --access public",
17
18
  "n:cache": "npm config get cache"
18
19
  },
19
20
  "files": [
package/bin/cli.mjs DELETED
@@ -1,62 +0,0 @@
1
- #!/usr/bin/env node
2
- // #!/usr/bin/env node
3
-
4
- // src/index.ts
5
- import chalk4 from "chalk";
6
- import { program } from "commander";
7
-
8
- // src/commands/help.ts
9
- import chalk from "chalk";
10
- function helpCommand() {
11
- console.log(chalk.blue("-".repeat(48)));
12
- console.log(chalk.bold.green("klei CLI - Ayuda"));
13
- console.log(chalk.yellow(`
14
- Comandos disponibles:
15
-
16
- saludar <nombre> Saluda al usuario.
17
-
18
- help Muestra la ayuda y los comandos disponibles.
19
-
20
- Uso:
21
- klei <comando>
22
-
23
- Ejemplos:
24
- klei saludar <nombre> - Saluda al usuario.
25
- klei help - Muestra la ayuda.
26
- `));
27
- console.log(chalk.blue("-".repeat(48)));
28
- }
29
- var help_default = helpCommand;
30
-
31
- // src/commands/saludar.ts
32
- import chalk2 from "chalk";
33
- var saludar_default = (program2) => {
34
- program2.command("saludar <nombre>").description("Saluda al usuario").option("-e, --exclamar", "Agrega una exclamaci\xF3n").action((nombre, options) => {
35
- let mensaje = `Hola ${chalk2.green(nombre)}!`;
36
- if (options.exclamar) mensaje += " \u{1F44B}";
37
- console.log(mensaje);
38
- });
39
- };
40
-
41
- // src/utils/banner.ts
42
- import chalk3 from "chalk";
43
- import figlet from "figlet";
44
- var printBanner = () => {
45
- console.log(
46
- chalk3.blue(
47
- figlet.textSync("KLEI", { horizontalLayout: "full" })
48
- )
49
- );
50
- };
51
-
52
- // src/index.ts
53
- printBanner();
54
- program.name("klei").version("1.0.0").description("CLI profesional con m\xFAltiples caracter\xEDsticas");
55
- program.command("help").description("Muestra ayuda en espa\xF1ol").action(help_default);
56
- saludar_default(program);
57
- program.configureOutput({
58
- outputError: (err) => {
59
- console.error(chalk4.red(`Error: ${err}`));
60
- }
61
- });
62
- program.parse(process.argv);