scanoss 0.32.0-beta.7 → 0.33.0-beta.1
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/CHANGELOG.md +10 -2
- package/build/main/sdk/Cryptography/Helper/CryptographyHelper.js +10 -8
- package/build/main/tsconfig.tsbuildinfo +1 -1
- package/build/module/sdk/Cryptography/Helper/CryptographyHelper.js +11 -9
- package/build/module/tsconfig.module.tsbuildinfo +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,11 +4,19 @@ All notable changes to this project will be documented in this file. See [standa
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
- Upcoming changes...
|
|
7
|
+
### Fixed
|
|
8
|
+
- Throttled file system operations in `excludeBinariesAndLargeFiles` using `PQueue` (concurrency: 10) to prevent EMFILE errors when processing large file lists
|
|
9
|
+
- Switched from async `isBinaryFile` to sync `isBinaryFileSync` for more predictable concurrency behavior
|
|
7
10
|
|
|
8
|
-
## [0.32.0] (2026-02-
|
|
11
|
+
## [0.32.0] (2026-02-09)
|
|
9
12
|
### Changed
|
|
10
13
|
- Improved decompression error handling: extraction failures are now collected and reported rather than stopping the entire process
|
|
11
14
|
- CLI scan command displays warnings for archives that failed to extract while continuing with successful extractions
|
|
15
|
+
### Fixed
|
|
16
|
+
- Fixed `libarchive.js` compatibility with Electron ASAR archives by resolving module paths through `app.asar.unpacked`
|
|
17
|
+
- Used indirect dynamic import to prevent bundlers from converting ESM `import()` to `require()`
|
|
18
|
+
- Fixed `libarchive.js` worker initialization for paths containing spaces
|
|
19
|
+
|
|
12
20
|
|
|
13
21
|
## [0.31.2] (2026-02-03)
|
|
14
22
|
### Fixed
|
|
@@ -240,4 +248,4 @@ All notable changes to this project will be documented in this file. See [standa
|
|
|
240
248
|
### [0.31.0](https://github.com/scanoss/scanoss.js/compare/v0.30.1...v0.31.0) (2026-02-02)
|
|
241
249
|
### [0.31.1](https://github.com/scanoss/scanoss.js/compare/v0.31.0...v0.31.1) (2026-02-02)
|
|
242
250
|
### [0.31.2](https://github.com/scanoss/scanoss.js/compare/v0.31.1...v0.31.2) (2026-02-03)
|
|
243
|
-
### [0.32.0](https://github.com/scanoss/scanoss.js/compare/v0.31.2...v0.32.0) (2026-02-
|
|
251
|
+
### [0.32.0](https://github.com/scanoss/scanoss.js/compare/v0.31.2...v0.32.0) (2026-02-09)
|
|
@@ -6,28 +6,30 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.excludeBinariesAndLargeFiles = excludeBinariesAndLargeFiles;
|
|
7
7
|
const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const isbinaryfile_1 = require("isbinaryfile");
|
|
9
|
+
const p_queue_1 = __importDefault(require("p-queue"));
|
|
9
10
|
// Maximum file size (2GB)
|
|
10
11
|
const MAX_FILE_SIZE = 2 * 1024 * 1024 * 1024;
|
|
12
|
+
const FILE_CONCURRENCY = 10;
|
|
11
13
|
/**
|
|
12
14
|
* Filters out binary files and files larger than 2GB
|
|
13
15
|
* @param {Array<string>} files - Files to filter
|
|
14
16
|
* @returns {Promise<Array<string>>} Filtered files
|
|
15
17
|
*/
|
|
16
18
|
async function excludeBinariesAndLargeFiles(files) {
|
|
17
|
-
const
|
|
19
|
+
const queue = new p_queue_1.default({ concurrency: FILE_CONCURRENCY });
|
|
20
|
+
const filtered = [];
|
|
21
|
+
await queue.addAll(files.map((file) => async () => {
|
|
18
22
|
try {
|
|
19
23
|
const stats = await fs_1.default.promises.stat(file);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return null;
|
|
24
|
+
if (stats.size > MAX_FILE_SIZE || (0, isbinaryfile_1.isBinaryFileSync)(file)) {
|
|
25
|
+
return;
|
|
23
26
|
}
|
|
24
|
-
|
|
27
|
+
filtered.push(file);
|
|
25
28
|
}
|
|
26
29
|
catch (error) {
|
|
27
30
|
console.error(`[ Cryptography Helper ] excludeBinariesAndLargeFiles: ${file}:`, error);
|
|
28
|
-
return null;
|
|
29
31
|
}
|
|
30
32
|
}));
|
|
31
|
-
return
|
|
33
|
+
return filtered;
|
|
32
34
|
}
|
|
33
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
35
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ3J5cHRvZ3JhcGh5SGVscGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL3Nkay9DcnlwdG9ncmFwaHkvSGVscGVyL0NyeXB0b2dyYXBoeUhlbHBlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQWNBLG9FQW1CQztBQWpDRCw0Q0FBb0I7QUFDcEIsK0NBQWdEO0FBQ2hELHNEQUE2QjtBQUU3QiwwQkFBMEI7QUFDMUIsTUFBTSxhQUFhLEdBQUcsQ0FBQyxHQUFHLElBQUksR0FBRyxJQUFJLEdBQUcsSUFBSSxDQUFDO0FBRTdDLE1BQU0sZ0JBQWdCLEdBQUcsRUFBRSxDQUFDO0FBRTVCOzs7O0dBSUc7QUFDSSxLQUFLLFVBQVUsNEJBQTRCLENBQUMsS0FBb0I7SUFDckUsTUFBTSxLQUFLLEdBQUcsSUFBSSxpQkFBTSxDQUFDLEVBQUUsV0FBVyxFQUFFLGdCQUFnQixFQUFFLENBQUMsQ0FBQztJQUM1RCxNQUFNLFFBQVEsR0FBa0IsRUFBRSxDQUFDO0lBRW5DLE1BQU0sS0FBSyxDQUFDLE1BQU0sQ0FDaEIsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDLElBQUksRUFBRSxFQUFFLENBQUMsS0FBSyxJQUFJLEVBQUU7UUFDN0IsSUFBSSxDQUFDO1lBQ0gsTUFBTSxLQUFLLEdBQUcsTUFBTSxZQUFFLENBQUMsUUFBUSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQztZQUMzQyxJQUFJLEtBQUssQ0FBQy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