@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 +9 -1
- package/native/target/release/titan_core.dll +0 -0
- package/package.json +4 -2
- package/titan.json +1 -1
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: () =>
|
|
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 ---
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@titanpl/core",
|
|
3
|
-
"version": "2.0.
|
|
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
|
-
"
|
|
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": [
|