random-logs-str 0.0.0-stage → 1.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Miguel Angel Hernández
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,71 @@
1
- # Temporary Holding Version
1
+ # random-logs-str
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Muestra en la terminal un mensaje divertido al azar sobre programación. 🎲
4
+
5
+ ```text
6
+ $ random-logs-str
7
+ Hice push un viernes a las 6pm. Recuérdenme con cariño 🪦
8
+ ```
9
+
10
+ ## Instalación
11
+
12
+ Instálalo de forma global para tener el comando disponible en cualquier carpeta:
13
+
14
+ ```bash
15
+ npm install -g random-logs-str
16
+ ```
17
+
18
+ ## Uso
19
+
20
+ ```bash
21
+ random-logs-str
22
+ ```
23
+
24
+ Cada vez que lo ejecutes verás un mensaje distinto, en color azul.
25
+
26
+ ### Sin instalar
27
+
28
+ Si solo quieres probarlo, ejecútalo con `npx`. El paquete se descarga temporalmente y no queda instalado:
29
+
30
+ ```bash
31
+ npx random-logs-str
32
+ ```
33
+
34
+ ### Desinstalar
35
+
36
+ ```bash
37
+ npm uninstall -g random-logs-str
38
+ ```
39
+
40
+ ## Requisitos
41
+
42
+ - [Node.js](https://nodejs.org/) instalado (incluye `npm` y `npx`).
43
+
44
+ ## Estructura del proyecto
45
+
46
+ ```text
47
+ random-logs-str/
48
+ ├── bin/
49
+ │ └── global.js # Comando de terminal: llama a funnyCommit()
50
+ ├── src/
51
+ │ └── index.js # Arreglo de mensajes y función funnyCommit()
52
+ └── package.json # El campo "bin" registra el comando random-logs-str
53
+ ```
54
+
55
+ ## Desarrollo local
56
+
57
+ Para probar cambios sin publicar:
58
+
59
+ ```bash
60
+ git clone https://github.com/MigueloHTS/random-logs-str.git
61
+ cd random-logs-str
62
+ npm link # crea el comando global apuntando a esta carpeta
63
+ random-logs-str # prueba tus cambios
64
+ npm unlink -g random-logs-str # quita el enlace al terminar
65
+ ```
66
+
67
+ ¿Quieres agregar más mensajes? Edítalos en el arreglo `messages` de `src/index.js`.
68
+
69
+ ## Licencia
70
+
71
+ ISC
package/bin/global.js ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ let random = require('../src/index.js')
3
+ random.funnyCommit();
package/package.json CHANGED
@@ -1,6 +1,25 @@
1
1
  {
2
2
  "name": "random-logs-str",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.1.0",
4
+ "description": "This a package that print in console random strings",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/MigueloHTS/random-logs-str.git"
12
+ },
13
+ "keywords": [],
14
+ "author": "Miguel Angel Hernández <miguel0315torresh@gmail.com>",
15
+ "license": "ISC",
16
+ "type": "commonjs",
17
+ "bugs": {
18
+ "url": "https://github.com/MigueloHTS/random-logs-str/issues"
19
+ },
20
+ "homepage": "https://github.com/MigueloHTS/random-logs-str#readme",
21
+ "bin": {
22
+ "random-logs-str": "bin/global.js"
23
+ },
24
+ "preferGlobal": true
25
+ }
package/src/index.js ADDED
@@ -0,0 +1,26 @@
1
+ const messages = [
2
+ "¡Funciona en mi máquina! 🤷",
3
+ "No es un bug, es una feature no documentada 🐛",
4
+ "Si funciona, no lo toques.",
5
+ "El café es mi lenguaje de programación favorito ☕",
6
+ "Mi código no tiene errores, solo sorpresas inesperadas.",
7
+ "Hay 10 tipos de personas: las que entienden binario y las que no.",
8
+ "Ctrl + C, Ctrl + V: el verdadero full stack 💻",
9
+ "git commit -m 'arreglado' (spoiler: no estaba arreglado)",
10
+ "Mi gato pisó el teclado y ahora el código compila 🐱",
11
+ "Hice push un viernes a las 6pm. Recuérdenme con cariño 🪦",
12
+ "99 bugs en el código... arreglo uno... 127 bugs en el código.",
13
+ "Este commit fue patrocinado por Stack Overflow.",
14
+ "Borré node_modules y ahora tengo 40 GB libres 🎉",
15
+ "Funcionaba hace 5 minutos, lo juro.",
16
+ "Comentario del pasado: 'esto lo arreglo luego'. Spoiler: nunca."
17
+ ]
18
+
19
+ const funnyCommit = () => {
20
+ const message = messages[Math.floor(Math.random()* messages.length)]
21
+ console.log(`\x1b[34m${message}\x1b[89m`);
22
+ }
23
+
24
+ module.exports = {
25
+ funnyCommit
26
+ }