fpavon-ee-shared 1.0.61 → 1.0.62
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.
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from './repository';
|
|
1
|
+
export * from './repository';
|
|
2
|
+
export * from './services/firmaService';
|
package/package.json
CHANGED
package/readme.md
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
# 📦 Publicación de paquetes en npm (con 2FA)
|
|
2
|
+
|
|
3
|
+
Este documento explica cómo publicar paquetes en npm cuando la cuenta tiene **autenticación en dos factores (2FA)** habilitada, incluyendo el flujo completo de trabajo.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 🚀 Flujo completo para publicar una nueva versión
|
|
8
|
+
|
|
9
|
+
## 1. ✏️ Actualizar versión
|
|
10
|
+
|
|
11
|
+
Modificar la versión actual por la nueva en `package.json`:
|
|
12
|
+
|
|
13
|
+
```json
|
|
14
|
+
{
|
|
15
|
+
"version": "1.0.62"
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
📌 Seguir semver:
|
|
20
|
+
|
|
21
|
+
* `patch` → fixes (1.0.61 → 1.0.62)
|
|
22
|
+
* `minor` → features (1.0.x → 1.1.0)
|
|
23
|
+
* `major` → breaking changes
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 2. 📤 Subir cambios al repositorio
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
git add .
|
|
31
|
+
git commit -m "chore: bump version to 1.0.62"
|
|
32
|
+
git push
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
👉 Esto asegura trazabilidad antes de publicar
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## 3. 🏗️ Build del paquete
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npm run build
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
👉 Genera los archivos que realmente se publican (ej: `/dist`)
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## 4. 📦 Publicar en npm
|
|
50
|
+
|
|
51
|
+
### Opción A — Con OTP
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npm publish --otp=123456
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Opción B — Con token (recomendado)
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npm publish
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
# 🔐 Configuración de 2FA
|
|
66
|
+
|
|
67
|
+
## Problema común
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npm ERR! 403 Forbidden - Two-factor authentication required
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
👉 npm exige 2FA también al publicar
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## ✅ Soluciones
|
|
78
|
+
|
|
79
|
+
### 🥇 Usar OTP
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npm publish --otp=123456
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
### 🥈 Usar token con bypass 2FA (recomendado)
|
|
88
|
+
|
|
89
|
+
#### 1. Crear token
|
|
90
|
+
|
|
91
|
+
https://www.npmjs.com/settings/tokens
|
|
92
|
+
|
|
93
|
+
* Tipo: **Automation**
|
|
94
|
+
* Con **Bypass 2FA** activado
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
#### 2. Configurar en local
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
npm config set //registry.npmjs.org/:_authToken=TU_TOKEN
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
#### 3. Publicar
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
npm publish
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
# 🔍 Verificaciones útiles
|
|
115
|
+
|
|
116
|
+
### Usuario actual
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
npm whoami
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Registry
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
npm config get registry
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Debe ser:
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
https://registry.npmjs.org/
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
# 🧠 Problemas comunes
|
|
137
|
+
|
|
138
|
+
### ❌ Error 404
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
Not found - PUT https://registry.npmjs.org/paquete
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
* No tienes permisos
|
|
145
|
+
* El nombre ya existe
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
### ❌ Error 403
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
2FA required
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
* Usar `--otp`
|
|
156
|
+
* o token con bypass 2FA
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
### ⚠️ Warning config
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
Unknown user config "config"
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
👉 No bloquea publicación
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
# 🚀 Recomendación
|
|
171
|
+
|
|
172
|
+
👉 Usar **token con bypass 2FA**
|
|
173
|
+
Evita tener que ingresar OTP cada vez.
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
# 📌 Resumen rápido
|
|
178
|
+
|
|
179
|
+
| Paso | Acción |
|
|
180
|
+
| ---- | ------------------------------- |
|
|
181
|
+
| 1 | Subir versión en `package.json` |
|
|
182
|
+
| 2 | Commit + push |
|
|
183
|
+
| 3 | `npm run build` |
|
|
184
|
+
| 4 | `npm publish` |
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
# 🛠️ Comandos clave
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
npm login
|
|
192
|
+
npm whoami
|
|
193
|
+
npm run build
|
|
194
|
+
npm publish
|
|
195
|
+
npm publish --otp=XXXXXX
|
|
196
|
+
npm config set //registry.npmjs.org/:_authToken=TOKEN
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|