@themartiancompany/fs 0.0.11 → 0.0.13
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/fs +39 -9
- package/package.json +10 -2
package/fs
CHANGED
|
@@ -67,8 +67,9 @@ function
|
|
|
67
67
|
typeof __webpack_require__ !== 'function' ) {
|
|
68
68
|
_fs =
|
|
69
69
|
require(
|
|
70
|
-
"fs");
|
|
71
|
-
_fs
|
|
70
|
+
"node:fs");
|
|
71
|
+
_fs[
|
|
72
|
+
"fsWorkerStart"] =
|
|
72
73
|
_fs_worker_start_get(
|
|
73
74
|
_fs);
|
|
74
75
|
}
|
|
@@ -96,8 +97,9 @@ function
|
|
|
96
97
|
else if ( _module_name == 'fs' ) {
|
|
97
98
|
_fs =
|
|
98
99
|
require(
|
|
99
|
-
"fs");
|
|
100
|
-
_fs
|
|
100
|
+
"node:fs");
|
|
101
|
+
_fs[
|
|
102
|
+
"fsWorkerStart"] =
|
|
101
103
|
_fs_worker_start_get(
|
|
102
104
|
_fs);
|
|
103
105
|
}
|
|
@@ -117,17 +119,13 @@ function
|
|
|
117
119
|
return _fs;
|
|
118
120
|
}
|
|
119
121
|
|
|
120
|
-
const
|
|
121
|
-
_fs =
|
|
122
|
-
_fs_module_auto_detect();
|
|
123
|
-
|
|
124
122
|
function
|
|
125
123
|
_fs_worker_start_get(
|
|
126
124
|
_fs_module) {
|
|
127
125
|
let
|
|
128
126
|
_fs_worker_start_fun;
|
|
129
127
|
_fs_worker_start_fun =
|
|
130
|
-
_fs_module.
|
|
128
|
+
_fs_module.fsWorkerStart;
|
|
131
129
|
const
|
|
132
130
|
_fs_worker_start_fun_type =
|
|
133
131
|
typeof(
|
|
@@ -141,6 +139,38 @@ function
|
|
|
141
139
|
return _fs_worker_start_fun;
|
|
142
140
|
}
|
|
143
141
|
|
|
142
|
+
function
|
|
143
|
+
_is_dir_sync_get(
|
|
144
|
+
_fs_module,
|
|
145
|
+
_path) {
|
|
146
|
+
const
|
|
147
|
+
_is_dir_sync =
|
|
148
|
+
function(
|
|
149
|
+
_path) {
|
|
150
|
+
const
|
|
151
|
+
_file_info =
|
|
152
|
+
_fs_module.statSync(
|
|
153
|
+
_path);
|
|
154
|
+
const
|
|
155
|
+
_is_dir =
|
|
156
|
+
! _file_info.isFile();
|
|
157
|
+
return _is_dir;
|
|
158
|
+
}
|
|
159
|
+
return _is_dir_sync;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
const
|
|
163
|
+
_fs =
|
|
164
|
+
_fs_module_auto_detect();
|
|
165
|
+
|
|
166
|
+
_fs[
|
|
167
|
+
"isDirSync"] =
|
|
168
|
+
_is_dir_sync_get();
|
|
169
|
+
_fs[
|
|
170
|
+
"isDir"] =
|
|
171
|
+
_fs[
|
|
172
|
+
"isDirSync"];
|
|
173
|
+
|
|
144
174
|
module.exports =
|
|
145
175
|
_fs;
|
|
146
176
|
module.exports.getModule =
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"description":
|
|
5
5
|
"Platform-independent File System ('fs') module.",
|
|
6
6
|
"version":
|
|
7
|
-
"0.0.
|
|
7
|
+
"0.0.13",
|
|
8
8
|
"homepage":
|
|
9
9
|
"https://github.com/themartiancompany/tmcfs",
|
|
10
10
|
"license":
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
},
|
|
24
24
|
"keywords": [
|
|
25
25
|
"fs",
|
|
26
|
+
"tmcfs",
|
|
27
|
+
"node:fs",
|
|
26
28
|
"system",
|
|
27
29
|
"file",
|
|
28
30
|
"directory",
|
|
@@ -71,12 +73,18 @@
|
|
|
71
73
|
"@eslint/js":
|
|
72
74
|
"^10.0.1",
|
|
73
75
|
"eslint":
|
|
74
|
-
"^10.3.0"
|
|
76
|
+
"^10.3.0",
|
|
77
|
+
"globals":
|
|
78
|
+
"^17.3.0"
|
|
75
79
|
},
|
|
76
80
|
"dependencies": {
|
|
77
81
|
},
|
|
78
82
|
"optionalDependencies": {
|
|
79
83
|
"opfs":
|
|
80
84
|
"npm:@themartiancompany/opfs@^2.0.10"
|
|
85
|
+
},
|
|
86
|
+
"overrides": {
|
|
87
|
+
"fs":
|
|
88
|
+
"node:fs"
|
|
81
89
|
}
|
|
82
90
|
}
|