herramientaenvioestupendo 1.0.35 → 1.0.37

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
@@ -14,7 +14,7 @@ Para instalar el aplicativo CLI, deben realizar el siguiente procedimiento :
14
14
  ```npm i -g herramientaenvioestupendo```
15
15
 
16
16
  - Luego de esto deben validar la version de la herramienta :
17
- ```estupendo --version```, si esta indica que es la 1.0.35 es la correcta.
17
+ ```estupendo --version```, si esta indica que es la 1.0.37 es la correcta.
18
18
 
19
19
  - Para conocer que opciones tienen de comandos solo deben ingresar en su CMD :
20
20
  ```estupendo --help```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "herramientaenvioestupendo",
3
- "version": "1.0.35",
3
+ "version": "1.0.37",
4
4
  "private": false,
5
5
  "description": "Proyecto para envio documentos masivos",
6
6
  "keywords": [],
package/src/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { program } from "commander"
3
- import { sendTxt, sendXml, sendAttached, sendJson } from "./services.js"
3
+ import { sendTxt, sendXml, sendAttached, sendJson, requestDocumentRace } from "./services.js"
4
4
 
5
5
 
6
- program.name("estupendo").version("1.0.35")
6
+ program.name("estupendo").version("1.0.37")
7
7
 
8
8
  program.command("send_xml")
9
9
  .requiredOption("-d, --directory <char>", "Directorio donde se encuentran los documentos XML")
package/src/services.js CHANGED
@@ -324,16 +324,16 @@ const requestDocumentRace = async (options) => {
324
324
  if (!fs.existsSync(xmlDir)) fs.mkdirSync(xmlDir);
325
325
 
326
326
  console.log("Procesando...")
327
- const now = new Date();
328
- now.setDate(now.getDate() - 1);
327
+ const yesterday = new Date();
328
+ yesterday.setDate(yesterday.getDate() - 1);
329
329
 
330
- const year = now.getFullYear();
331
- const month = String(now.getMonth() + 1).padStart(2, '0');
332
- const day = String(now.getDate()).padStart(2, '0');
330
+ const year = yesterday.getFullYear();
331
+ const month = String(yesterday.getMonth() + 1).padStart(2, '0');
332
+ const day = String(yesterday.getDate()).padStart(2, '0');
333
333
 
334
334
  const fechaAnterior = `${year}-${month}-${day}`;
335
335
 
336
-
336
+ console.log(fechaAnterior)
337
337
  try {
338
338
  const data = await requestGet(urlApiConsulta, {
339
339
  fechaIni:fechaAnterior,