xypriss 9.14.15 → 9.14.17

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/dist/cjs/index.js CHANGED
@@ -8,6 +8,7 @@ var fs = require('node:fs');
8
8
  var node_url = require('node:url');
9
9
  var net = require('node:net');
10
10
  var node_worker_threads = require('node:worker_threads');
11
+ var os = require('node:os');
11
12
  var fs$1 = require('fs');
12
13
  var path$1 = require('path');
13
14
  var nehoid = require('nehoid');
@@ -5167,11 +5168,18 @@ class SynapxClient {
5167
5168
  NO_COLOR: "1",
5168
5169
  },
5169
5170
  });
5171
+ let childExited = false;
5172
+ child.on("exit", () => {
5173
+ childExited = true;
5174
+ });
5175
+ child.on("error", () => {
5176
+ childExited = true;
5177
+ });
5170
5178
  child.unref();
5171
5179
  // Wait for socket to appear (up to 1500ms)
5172
5180
  const start = Date.now();
5173
5181
  while (Date.now() - start < 1500) {
5174
- if (this.isAvailable()) {
5182
+ if (this.isAvailable() || childExited) {
5175
5183
  break;
5176
5184
  }
5177
5185
  try {
@@ -5962,7 +5970,14 @@ class PathApi extends BaseApi {
5962
5970
  * **Get System Temp Directory**
5963
5971
  */
5964
5972
  this.tempDir = () => {
5965
- return this.runner.runSync("path", "tempdir");
5973
+ try {
5974
+ return this.runner.runSync("path", "tempdir");
5975
+ }
5976
+ catch {
5977
+ return (process.env.XYPRISS_USER_TMP ||
5978
+ process.env.XESS_SESSION_TMP ||
5979
+ (typeof os !== "undefined" ? os.tmpdir() : "/tmp"));
5980
+ }
5966
5981
  };
5967
5982
  /**
5968
5983
  * **Check Existence**