utn-cli 2.0.1 → 2.0.3
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/GEMINI.md +0 -0
- package/commands/frontend.js +5 -11
- package/package.json +2 -2
package/GEMINI.md
ADDED
|
File without changes
|
package/commands/frontend.js
CHANGED
|
@@ -165,11 +165,9 @@ export async function cloneFrontendComponent() {
|
|
|
165
165
|
const finUltimoImport = contenidoRoutes.indexOf(';', ultimoImportIndex);
|
|
166
166
|
|
|
167
167
|
if (finUltimoImport !== -1) {
|
|
168
|
-
contenidoRoutes = contenidoRoutes.slice(0, finUltimoImport + 1) + '
|
|
169
|
-
' + lineaImport + contenidoRoutes.slice(finUltimoImport + 1);
|
|
168
|
+
contenidoRoutes = contenidoRoutes.slice(0, finUltimoImport + 1) + '\n' + lineaImport + contenidoRoutes.slice(finUltimoImport + 1);
|
|
170
169
|
} else {
|
|
171
|
-
contenidoRoutes = lineaImport + '
|
|
172
|
-
' + contenidoRoutes;
|
|
170
|
+
contenidoRoutes = lineaImport + '\n' + contenidoRoutes;
|
|
173
171
|
}
|
|
174
172
|
|
|
175
173
|
const cierreArray = contenidoRoutes.lastIndexOf('];');
|
|
@@ -179,10 +177,8 @@ export async function cloneFrontendComponent() {
|
|
|
179
177
|
const necesitaComa = !textoAntesDeCierre.endsWith(',') && !textoAntesDeCierre.endsWith('[');
|
|
180
178
|
|
|
181
179
|
contenidoRoutes = contenidoRoutes.slice(0, cierreArray) +
|
|
182
|
-
(necesitaComa ? ',' : '') + '
|
|
183
|
-
' +
|
|
184
|
-
nuevaRuta + '
|
|
185
|
-
' +
|
|
180
|
+
(necesitaComa ? ',' : '') + '\n' +
|
|
181
|
+
nuevaRuta + '\n' +
|
|
186
182
|
contenidoRoutes.slice(cierreArray);
|
|
187
183
|
|
|
188
184
|
fs.writeFileSync(rutaRoutes, contenidoRoutes);
|
|
@@ -205,9 +201,7 @@ export async function cloneFrontendComponent() {
|
|
|
205
201
|
const ultimoDiv = contenidoHtml.lastIndexOf('</div>');
|
|
206
202
|
|
|
207
203
|
if (ultimoDiv !== -1) {
|
|
208
|
-
contenidoHtml = contenidoHtml.slice(0, ultimoDiv) + '
|
|
209
|
-
' + nuevaTarjeta + '
|
|
210
|
-
' + contenidoHtml.slice(ultimoDiv);
|
|
204
|
+
contenidoHtml = contenidoHtml.slice(0, ultimoDiv) + '\n' + nuevaTarjeta + '\n' + contenidoHtml.slice(ultimoDiv);
|
|
211
205
|
fs.writeFileSync(rutaHtml, contenidoHtml);
|
|
212
206
|
console.log('Tarjeta agregada exitosamente.');
|
|
213
207
|
} else {
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "utn-cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "Herramienta CLI unificada para la gestión de plantillas en SIGU.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
|
-
"utn": "./index.js"
|
|
8
|
+
"utn-cli": "./index.js"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"test": "echo \"Error: no test specified\" && exit 1"
|