mobbdev 1.1.5 → 1.1.6
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.mjs +10 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -11705,7 +11705,16 @@ async function pack(srcDirPath, vulnFiles, isIncludeAllFiles = false) {
|
|
|
11705
11705
|
debug15("ignoring %s because the size is > 5MB", filepath);
|
|
11706
11706
|
continue;
|
|
11707
11707
|
}
|
|
11708
|
-
|
|
11708
|
+
let data;
|
|
11709
|
+
if (git) {
|
|
11710
|
+
try {
|
|
11711
|
+
data = await git.showBuffer([`HEAD:./${filepath}`]);
|
|
11712
|
+
} catch {
|
|
11713
|
+
data = fs8.readFileSync(absFilepath);
|
|
11714
|
+
}
|
|
11715
|
+
} else {
|
|
11716
|
+
data = fs8.readFileSync(absFilepath);
|
|
11717
|
+
}
|
|
11709
11718
|
if (isBinary2(null, data)) {
|
|
11710
11719
|
debug15("ignoring %s because is seems to be a binary file", filepath);
|
|
11711
11720
|
continue;
|