crash-js 0.1.126 → 0.1.128
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/crash-js/crash-js +17 -17
- package/crash-js/fs-utils +39 -10
- package/crash-js/utils +5 -1
- package/package.json +2 -2
package/crash-js/crash-js
CHANGED
|
@@ -48,30 +48,30 @@ const
|
|
|
48
48
|
_child_process_spawn_get(
|
|
49
49
|
"async");
|
|
50
50
|
const
|
|
51
|
-
_process_exit_get =
|
|
52
|
-
|
|
51
|
+
_process_exit_get =
|
|
52
|
+
_utils._process_exit_get;
|
|
53
53
|
const
|
|
54
|
-
_process_exit =
|
|
55
|
-
|
|
54
|
+
_process_exit =
|
|
55
|
+
_process_exit_get();
|
|
56
56
|
const
|
|
57
|
-
_process_cwd_get =
|
|
58
|
-
|
|
57
|
+
_process_cwd_get =
|
|
58
|
+
_utils._process_cwd_get;
|
|
59
59
|
const
|
|
60
|
-
_process_cwd =
|
|
61
|
-
|
|
60
|
+
_process_cwd =
|
|
61
|
+
_process_cwd_get();
|
|
62
62
|
const
|
|
63
|
-
_pwd =
|
|
64
|
-
|
|
63
|
+
_pwd =
|
|
64
|
+
_process_cwd;
|
|
65
65
|
const
|
|
66
|
-
_yargv_get =
|
|
67
|
-
|
|
66
|
+
_yargv_get =
|
|
67
|
+
_utils._yargv_get;
|
|
68
68
|
const
|
|
69
|
-
_fs_utils_module =
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
_fs_utils_module =
|
|
70
|
+
require(
|
|
71
|
+
"./fs-utils");
|
|
72
72
|
const
|
|
73
|
-
_dirname =
|
|
74
|
-
|
|
73
|
+
_dirname =
|
|
74
|
+
_fs_utils_module._dirname;
|
|
75
75
|
const
|
|
76
76
|
_file_append =
|
|
77
77
|
_fs_utils_module._file_append;
|
package/crash-js/fs-utils
CHANGED
|
@@ -34,6 +34,12 @@ const
|
|
|
34
34
|
const
|
|
35
35
|
_os_tmpdir_get =
|
|
36
36
|
_utils_module._os_tmpdir_get;
|
|
37
|
+
const
|
|
38
|
+
_process_exit_get =
|
|
39
|
+
_utils_module._process_exit_get;
|
|
40
|
+
const
|
|
41
|
+
_process_exit =
|
|
42
|
+
_process_exit_get();
|
|
37
43
|
const
|
|
38
44
|
_fs_module =
|
|
39
45
|
require(
|
|
@@ -61,7 +67,7 @@ const
|
|
|
61
67
|
_fs_module.fsWorkerStart;
|
|
62
68
|
const
|
|
63
69
|
_mkdtemp =
|
|
64
|
-
_fs_module.
|
|
70
|
+
_fs_module.mkdtempSync;
|
|
65
71
|
const
|
|
66
72
|
_stat =
|
|
67
73
|
_fs_module.statSync;
|
|
@@ -235,6 +241,8 @@ async function
|
|
|
235
241
|
_mktemp(
|
|
236
242
|
_prefix,
|
|
237
243
|
_directory) {
|
|
244
|
+
let
|
|
245
|
+
_return;
|
|
238
246
|
const
|
|
239
247
|
_directory_type =
|
|
240
248
|
typeof(
|
|
@@ -246,7 +254,7 @@ _mktemp(
|
|
|
246
254
|
_os_tmpdir =
|
|
247
255
|
_os_tmpdir_get();
|
|
248
256
|
_prefix =
|
|
249
|
-
`${_os_tmpdir}
|
|
257
|
+
`${_os_tmpdir}/mammt.`;
|
|
250
258
|
}
|
|
251
259
|
if ( _directory_type == "undefined" ||
|
|
252
260
|
_directory == "" ||
|
|
@@ -259,16 +267,35 @@ _mktemp(
|
|
|
259
267
|
false;
|
|
260
268
|
}
|
|
261
269
|
if ( _directory ) {
|
|
270
|
+
const
|
|
271
|
+
_mkdtemp_callback =
|
|
272
|
+
( _error,
|
|
273
|
+
_folder) => {
|
|
274
|
+
if ( _error ) {
|
|
275
|
+
console.error(_error);
|
|
276
|
+
}
|
|
277
|
+
console.log(
|
|
278
|
+
_folder);
|
|
279
|
+
_return =
|
|
280
|
+
_folder;
|
|
281
|
+
console.log("Hello", _return);
|
|
282
|
+
};
|
|
262
283
|
try {
|
|
263
284
|
const
|
|
264
285
|
_dir =
|
|
265
|
-
|
|
286
|
+
_mkdtemp(
|
|
266
287
|
_prefix);
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
288
|
+
console.log(
|
|
289
|
+
_dir);
|
|
290
|
+
console.log(_return);
|
|
291
|
+
const
|
|
292
|
+
_dir_type =
|
|
293
|
+
typeof(
|
|
294
|
+
_dir);
|
|
295
|
+
if ( _dir_type != "undefined" ) {
|
|
296
|
+
_return =
|
|
297
|
+
_dir;
|
|
298
|
+
}
|
|
272
299
|
}
|
|
273
300
|
catch(
|
|
274
301
|
_error) {
|
|
@@ -279,10 +306,12 @@ _mktemp(
|
|
|
279
306
|
_msg =
|
|
280
307
|
"It only supports creating " +
|
|
281
308
|
"temporary directories.";
|
|
282
|
-
|
|
283
|
-
_msg
|
|
309
|
+
console.error(
|
|
310
|
+
_msg);
|
|
311
|
+
_process_exit(
|
|
284
312
|
1);
|
|
285
313
|
}
|
|
314
|
+
return _return;
|
|
286
315
|
}
|
|
287
316
|
|
|
288
317
|
module.exports = {
|
package/crash-js/utils
CHANGED
|
@@ -195,8 +195,12 @@ function
|
|
|
195
195
|
if ( typeof window === 'undefined' &&
|
|
196
196
|
( typeof global !== 'undefined' && global.global === global ) &&
|
|
197
197
|
typeof __webpack_require__ !== 'function' ) {
|
|
198
|
+
const
|
|
199
|
+
_os =
|
|
200
|
+
require(
|
|
201
|
+
"os");
|
|
198
202
|
_os_tmpdir =
|
|
199
|
-
|
|
203
|
+
_os.tmpdir;
|
|
200
204
|
}
|
|
201
205
|
else {
|
|
202
206
|
_os_tmpdir =
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name":
|
|
3
3
|
"crash-js",
|
|
4
4
|
"version":
|
|
5
|
-
"0.1.
|
|
5
|
+
"0.1.128",
|
|
6
6
|
"description":
|
|
7
7
|
"Crash Javascript library.",
|
|
8
8
|
"funding":
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"crash-js-webpack":
|
|
65
|
-
"^0.0.
|
|
65
|
+
"^0.0.22",
|
|
66
66
|
"eslint":
|
|
67
67
|
"^10.3.0",
|
|
68
68
|
"globals":
|