herramientaenvioestupendo 1.0.2 → 1.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.
@@ -31,15 +31,16 @@
31
31
  <option name="hideEmptyMiddlePackages" value="true" />
32
32
  <option name="showLibraryContents" value="true" />
33
33
  </component>
34
- <component name="PropertiesComponent">{
35
- &quot;keyToString&quot;: {
36
- &quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
37
- &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
38
- &quot;git-widget-placeholder&quot;: &quot;main&quot;,
39
- &quot;kotlin-language-version-configured&quot;: &quot;true&quot;,
40
- &quot;last_opened_file_path&quot;: &quot;C:/Users/santi/Downloads/Santiago/ESTUPENDO/Herramientas/EstupendoCLI&quot;
34
+ <component name="PropertiesComponent"><![CDATA[{
35
+ "keyToString": {
36
+ "RunOnceActivity.OpenProjectViewOnStart": "true",
37
+ "RunOnceActivity.ShowReadmeOnStart": "true",
38
+ "Shell Script.estupendo.executor": "Run",
39
+ "git-widget-placeholder": "main",
40
+ "kotlin-language-version-configured": "true",
41
+ "last_opened_file_path": "C:/Users/santi/Downloads/Santiago/ESTUPENDO/Herramientas/EstupendoCLI"
41
42
  }
42
- }</component>
43
+ }]]></component>
43
44
  <component name="RunManager">
44
45
  <configuration name="estupendo" type="ShConfigurationType" temporary="true">
45
46
  <option name="SCRIPT_TEXT" value="" />
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.2 es la correcta.
17
+ ```estupendo --version```, si esta indica que es la 1.0.3 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.2",
3
+ "version": "1.0.3",
4
4
  "private": false,
5
5
  "description": "Proyecto para envio documentos masivos",
6
6
  "keywords": [],
package/src/index.js CHANGED
@@ -3,7 +3,7 @@ import { program } from "commander"
3
3
  import { sendTxt, sendXml, sendAttached } from "./services.js"
4
4
 
5
5
 
6
- program.name("estupendo").version("1.0.2")
6
+ program.name("estupendo").version("1.0.3")
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
@@ -66,10 +66,12 @@ const sendTxt = async (options) => {
66
66
  for (let archivo of txts) {
67
67
  const name = path.join(options.directory, archivo)
68
68
  const content = fs.readFileSync(name, { encoding: "utf-8" })
69
+ console.log(`Procesando Archivo: ${archivo}`);
69
70
  const encoded = Buffer.from(content).toString("base64")
70
71
  const data = await request(urlApi, {
71
72
  txtEncode: encoded
72
73
  })
74
+ console.log(data);
73
75
  // Validar que el documento fue autorizado (estado === 2)
74
76
  if (data.result === true && data.estado === 2 && data.pdf && data.doc_id) {
75
77
  const pdfUrl = data.pdf;