bulltrackers-module 1.0.164 → 1.0.166

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.
@@ -12,8 +12,26 @@
12
12
  */
13
13
 
14
14
  const fs = require('fs');
15
- const path = require('path');
16
- const Viz = require('../node-graphviz'); // Uses your local module
15
+ //Hacky solution to force tmp writes
16
+ // --- TEMP PATCH START ---
17
+ process.env.TMPDIR = '/tmp';
18
+ process.env.TMP = '/tmp';
19
+ process.env.TEMP = '/tmp';
20
+
21
+ const os = require('os');
22
+ os.tmpdir = () => '/tmp';
23
+
24
+ try {
25
+ const temp = require('temp');
26
+ const path = require('path');
27
+ const fs = require('fs');
28
+ const tmp = '/tmp';
29
+ if (!fs.existsSync(tmp)) fs.mkdirSync(tmp);
30
+ temp.dir = tmp;
31
+ temp.path = () => path.join(tmp, 'temp-' + Math.random().toString(36).slice(2));
32
+ } catch {}
33
+ // --- TEMP PATCH END ---
34
+ const Viz = require('graphviz'); // Uses your local module
17
35
 
18
36
  /* --------------------------------------------------
19
37
  * Pretty Console Helpers
@@ -248,9 +266,10 @@ async function generateSvgGraph(manifest, filename = 'dependency-tree.svg') {
248
266
  // --- MODIFIED PATH ---
249
267
  // Writes to the root of the 'bulltrackers-module' package directory,
250
268
  // which is a safer, more predictable location.
251
- const out = path.join(__dirname, '..', '..', '..', filename);
269
+ const out = path.join('/tmp', filename);
252
270
  fs.writeFileSync(out, svg);
253
271
  log.success(`Dependency tree generated at ${out}`);
272
+
254
273
  } catch (e) { log.error(`SVG generation failed: ${e.message}`); }
255
274
  }
256
275
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bulltrackers-module",
3
- "version": "1.0.164",
3
+ "version": "1.0.166",
4
4
  "description": "Helper Functions for Bulltrackers.",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -41,7 +41,8 @@
41
41
  "node-graphviz": "^0.1.1",
42
42
  "p-limit": "^3.1.0",
43
43
  "require-all": "^3.0.0",
44
- "sharedsetup": "latest"
44
+ "sharedsetup": "latest",
45
+ "graphviz": "latest"
45
46
  },
46
47
  "devDependencies": {
47
48
  "bulltracker-deployer": "file:../bulltracker-deployer"