puvox-library 1.0.63 → 1.0.64
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/library_standard.js +22 -4
- package/package.json +1 -1
package/library_standard.js
CHANGED
@@ -2751,7 +2751,7 @@ const puvox_library =
|
|
2751
2751
|
openUrlInBrowser(url)
|
2752
2752
|
{
|
2753
2753
|
var cmd = (process.platform == 'darwin'? `open ${url}`: process.platform == 'win32'? `start ${url}`: `xdg-open ${url}`);
|
2754
|
-
require('child_process').exec(cmd);
|
2754
|
+
// require('child_process').exec(cmd);
|
2755
2755
|
},
|
2756
2756
|
|
2757
2757
|
stringify(obj_or_str){
|
@@ -3181,9 +3181,27 @@ const puvox_library =
|
|
3181
3181
|
// }
|
3182
3182
|
// },
|
3183
3183
|
file: {
|
3184
|
-
|
3185
|
-
|
3186
|
-
|
3184
|
+
set_Fs(module) { this.fs = module;},
|
3185
|
+
set_Path(module) { this.path = module;},
|
3186
|
+
set_Os(module) { this.os = module;},
|
3187
|
+
fs() {
|
3188
|
+
if(!this.fs) {
|
3189
|
+
throw new Error ('at first, set puvox_library.set_FS(require("fs"))');
|
3190
|
+
}
|
3191
|
+
return this.fs;
|
3192
|
+
},
|
3193
|
+
os() {
|
3194
|
+
if(!this.os) {
|
3195
|
+
throw new Error ('at first, set puvox_library.set_FS(require("os"))');
|
3196
|
+
}
|
3197
|
+
return this.os;
|
3198
|
+
},
|
3199
|
+
path() {
|
3200
|
+
if(!this.path) {
|
3201
|
+
throw new Error ('at first, set puvox_library.set_FS(require("path"))');
|
3202
|
+
}
|
3203
|
+
return this.path;
|
3204
|
+
},
|
3187
3205
|
// ends with slash
|
3188
3206
|
tempDir(){ return puvox_library.trailingSlash(this.os().tmpdir()); },
|
3189
3207
|
|