zen-fs-config 0.3.27 → 0.3.28
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/dist/index.js +5 -9
- package/dist/index.mjs +5 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -150,14 +150,10 @@ function createChrootFS(inner, root) {
|
|
|
150
150
|
},
|
|
151
151
|
async stat(path) {
|
|
152
152
|
const s = await inner.stat(rp(path));
|
|
153
|
-
if (typeof s.isFile === "function" && typeof s.isDirectory === "function") {
|
|
154
|
-
return s;
|
|
155
|
-
}
|
|
156
|
-
const isDir = typeof s.isDirectory === "function" ? s.isDirectory() : typeof s.isDirectory === "boolean" ? s.isDirectory : s.mode !== void 0 && (s.mode & 61440) === 16384;
|
|
157
153
|
return {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
154
|
+
mode: typeof s.mode === "number" ? s.mode : void 0,
|
|
155
|
+
size: s.size ?? 0,
|
|
156
|
+
mtimeMs: s.mtimeMs ?? s.mtime ?? 0
|
|
161
157
|
};
|
|
162
158
|
},
|
|
163
159
|
async access(path) {
|
|
@@ -1019,9 +1015,9 @@ var ConfigRepo = class {
|
|
|
1019
1015
|
const fullPath = current === "/" ? `/${entry}` : `${current}/${entry}`;
|
|
1020
1016
|
try {
|
|
1021
1017
|
const stat = await this.cachedFS.stat(fullPath);
|
|
1022
|
-
if (stat.
|
|
1018
|
+
if (stat.mode !== void 0 && (stat.mode & 16384) === 16384) {
|
|
1023
1019
|
stack.push(fullPath);
|
|
1024
|
-
} else
|
|
1020
|
+
} else {
|
|
1025
1021
|
results.push(fullPath);
|
|
1026
1022
|
}
|
|
1027
1023
|
} catch {
|
package/dist/index.mjs
CHANGED
|
@@ -101,14 +101,10 @@ function createChrootFS(inner, root) {
|
|
|
101
101
|
},
|
|
102
102
|
async stat(path) {
|
|
103
103
|
const s = await inner.stat(rp(path));
|
|
104
|
-
if (typeof s.isFile === "function" && typeof s.isDirectory === "function") {
|
|
105
|
-
return s;
|
|
106
|
-
}
|
|
107
|
-
const isDir = typeof s.isDirectory === "function" ? s.isDirectory() : typeof s.isDirectory === "boolean" ? s.isDirectory : s.mode !== void 0 && (s.mode & 61440) === 16384;
|
|
108
104
|
return {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
105
|
+
mode: typeof s.mode === "number" ? s.mode : void 0,
|
|
106
|
+
size: s.size ?? 0,
|
|
107
|
+
mtimeMs: s.mtimeMs ?? s.mtime ?? 0
|
|
112
108
|
};
|
|
113
109
|
},
|
|
114
110
|
async access(path) {
|
|
@@ -970,9 +966,9 @@ var ConfigRepo = class {
|
|
|
970
966
|
const fullPath = current === "/" ? `/${entry}` : `${current}/${entry}`;
|
|
971
967
|
try {
|
|
972
968
|
const stat = await this.cachedFS.stat(fullPath);
|
|
973
|
-
if (stat.
|
|
969
|
+
if (stat.mode !== void 0 && (stat.mode & 16384) === 16384) {
|
|
974
970
|
stack.push(fullPath);
|
|
975
|
-
} else
|
|
971
|
+
} else {
|
|
976
972
|
results.push(fullPath);
|
|
977
973
|
}
|
|
978
974
|
} catch {
|