x3d-tidy 1.0.64 → 1.0.66

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x3d-tidy",
3
- "version": "1.0.64",
3
+ "version": "1.0.66",
4
4
  "description": "X3D Converter, Beautifier and Minimizer",
5
5
  "bin": {
6
6
  "x3d-tidy": "bin/x3d-tidy.js"
package/src/convert.js CHANGED
@@ -14,12 +14,12 @@ const
14
14
  nodeConsole = require ("console"),
15
15
  DEBUG = false
16
16
 
17
- // DEBUG: npm start -- --version` to reset cache.
17
+ // Redirect console messages.
18
18
 
19
19
  console = nodeConsole .Console (process .stdout, process .stderr)
20
20
 
21
21
  process .exit = (status) => electron .ipcRenderer .send (status ? "error" : "ready", "")
22
- process .stdout .write = (message) => electron .ipcRenderer .send ("output", message)
22
+ process .stdout .write = (message) => electron .ipcRenderer .send ("log", message)
23
23
  process .stderr .write = (message) => electron .ipcRenderer .send ("error", message)
24
24
 
25
25
  electron .ipcRenderer .on ("convert", async (event, argv) => main (argv))
@@ -132,7 +132,7 @@ async function convert (argv)
132
132
 
133
133
  if (args .output)
134
134
  {
135
- const output = path .resolve (args .cwd || process .cwd (), args .output)
135
+ const output = path .resolve (process .cwd (), args .output)
136
136
 
137
137
  if (path .extname (output))
138
138
  fs .writeFileSync (output, getContents ({ ...options, type: path .extname (output) }))
package/src/main.js CHANGED
@@ -5,7 +5,7 @@ const
5
5
  path = require ("path")
6
6
 
7
7
  process .env .ELECTRON_DISABLE_SECURITY_WARNINGS = "true"
8
- process .env .ELECTRON_ENABLE_LOGGING = 1
8
+ process .env .ELECTRON_ENABLE_LOGGING = 0
9
9
 
10
10
  if (process .platform === "darwin")
11
11
  {
@@ -28,13 +28,13 @@ electron .app .whenReady () .then (async () =>
28
28
 
29
29
  electron .ipcMain .on ("ready", () => electron .app .quit ())
30
30
 
31
- electron .ipcMain .on ("output", (event, message) =>
31
+ electron .ipcMain .on ("log", (event, message = "") =>
32
32
  {
33
33
  process .stderr .write (message)
34
34
  process .stderr .write ("\n")
35
35
  })
36
36
 
37
- electron .ipcMain .on ("error", (event, message) =>
37
+ electron .ipcMain .on ("error", (event, message = "") =>
38
38
  {
39
39
  process .stderr .write (message)
40
40
  process .stderr .write ("\n")