@titanpl/core 2.0.4 → 2.0.5

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/index.js CHANGED
@@ -485,7 +485,15 @@ const os = {
485
485
  const info = JSON.parse(native_os_info());
486
486
  return info.freeMemory;
487
487
  },
488
- tmpdir: () => '/tmp'
488
+ tmpdir: () => {
489
+ if (!native_os_info) return '/tmp';
490
+ try {
491
+ const info = JSON.parse(native_os_info());
492
+ return info.tempDir || '/tmp';
493
+ } catch (e) {
494
+ return '/tmp';
495
+ }
496
+ }
489
497
  };
490
498
 
491
499
  // --- Net ---
package/package.json CHANGED
@@ -1,11 +1,13 @@
1
1
  {
2
2
  "name": "@titanpl/core",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
4
4
  "description": "The official Core Standard Library for Titan Planet - provides fs, path, crypto, os, net, proc, time, and url modules",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
7
7
  "scripts": {
8
- "build:native": "cd native && cargo build --release",
8
+ "configure": "node configure.js",
9
+ "postinstall": "node configure.js",
10
+ "build:native": "cd native && cargo build --release && cd .. && npm run configure",
9
11
  "test": "titan run ext"
10
12
  },
11
13
  "keywords": [
package/titan.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@titanpl/core",
3
3
  "description": "The official Core Standard Library for Titan Planet",
4
- "version": "2.0.2",
4
+ "version": "2.0.3",
5
5
  "main": "index.js",
6
6
  "native": {
7
7
  "path": "native/target/release/titan_core.dll",