Index: imaps-frontend/node_modules/readdirp/index.js
===================================================================
--- imaps-frontend/node_modules/readdirp/index.js	(revision 0c6b92add4cfaedcb91bcd37b45849f142f7d152)
+++ imaps-frontend/node_modules/readdirp/index.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -1,32 +1,48 @@
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
-exports.readdirpPromise = exports.readdirp = exports.ReaddirpStream = void 0;
-const promises_1 = require("fs/promises");
-const stream_1 = require("stream");
-const path_1 = require("path");
-function defaultOptions() {
-    return {
-        root: '.',
-        fileFilter: (_path) => true,
-        directoryFilter: (_path) => true,
-        type: FILE_TYPE,
-        lstat: false,
-        depth: 2147483648,
-        alwaysStat: false,
-        highWaterMark: 4096,
-    };
-}
+exports.ReaddirpStream = exports.EntryTypes = void 0;
+exports.readdirp = readdirp;
+exports.readdirpPromise = readdirpPromise;
+const promises_1 = require("node:fs/promises");
+const node_stream_1 = require("node:stream");
+const node_path_1 = require("node:path");
+exports.EntryTypes = {
+    FILE_TYPE: 'files',
+    DIR_TYPE: 'directories',
+    FILE_DIR_TYPE: 'files_directories',
+    EVERYTHING_TYPE: 'all',
+};
+const defaultOptions = {
+    root: '.',
+    fileFilter: (_entryInfo) => true,
+    directoryFilter: (_entryInfo) => true,
+    type: exports.EntryTypes.FILE_TYPE,
+    lstat: false,
+    depth: 2147483648,
+    alwaysStat: false,
+    highWaterMark: 4096,
+};
+Object.freeze(defaultOptions);
 const RECURSIVE_ERROR_CODE = 'READDIRP_RECURSIVE_ERROR';
 const NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP', RECURSIVE_ERROR_CODE]);
-const FILE_TYPE = 'files';
-const DIR_TYPE = 'directories';
-const FILE_DIR_TYPE = 'files_directories';
-const EVERYTHING_TYPE = 'all';
-const ALL_TYPES = [FILE_TYPE, DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE];
-const DIR_TYPES = new Set([DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE]);
-const FILE_TYPES = new Set([FILE_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE]);
+const ALL_TYPES = [
+    exports.EntryTypes.DIR_TYPE,
+    exports.EntryTypes.EVERYTHING_TYPE,
+    exports.EntryTypes.FILE_DIR_TYPE,
+    exports.EntryTypes.FILE_TYPE,
+];
+const DIR_TYPES = new Set([
+    exports.EntryTypes.DIR_TYPE,
+    exports.EntryTypes.EVERYTHING_TYPE,
+    exports.EntryTypes.FILE_DIR_TYPE,
+]);
+const FILE_TYPES = new Set([
+    exports.EntryTypes.EVERYTHING_TYPE,
+    exports.EntryTypes.FILE_DIR_TYPE,
+    exports.EntryTypes.FILE_TYPE,
+]);
 const isNormalFlowError = (error) => NORMAL_FLOW_ERRORS.has(error.code);
 const wantBigintFsStats = process.platform === 'win32';
-const emptyFn = (_path) => true;
+const emptyFn = (_entryInfo) => true;
 const normalizeFilter = (filter) => {
     if (filter === undefined)
@@ -44,5 +60,6 @@
     return emptyFn;
 };
-class ReaddirpStream extends stream_1.Readable {
+/** Readable readdir stream, emitting new files as they're being listed. */
+class ReaddirpStream extends node_stream_1.Readable {
     constructor(options = {}) {
         super({
@@ -51,5 +68,5 @@
             highWaterMark: options.highWaterMark,
         });
-        const opts = { ...defaultOptions(), ...options };
+        const opts = { ...defaultOptions, ...options };
         const { root, type } = opts;
         this._fileFilter = normalizeFilter(opts.fileFilter);
@@ -63,9 +80,9 @@
             this._stat = statMethod;
         }
-        this._maxDepth = opts.depth;
-        this._wantsDir = DIR_TYPES.has(type);
-        this._wantsFile = FILE_TYPES.has(type);
-        this._wantsEverything = type === EVERYTHING_TYPE;
-        this._root = (0, path_1.resolve)(root);
+        this._maxDepth = opts.depth ?? defaultOptions.depth;
+        this._wantsDir = type ? DIR_TYPES.has(type) : false;
+        this._wantsFile = type ? FILE_TYPES.has(type) : false;
+        this._wantsEverything = type === exports.EntryTypes.EVERYTHING_TYPE;
+        this._root = (0, node_path_1.resolve)(root);
         this._isDirent = !opts.alwaysStat;
         this._statsProp = this._isDirent ? 'dirent' : 'stats';
@@ -147,6 +164,6 @@
         const basename = this._isDirent ? dirent.name : dirent;
         try {
-            const fullPath = (0, path_1.resolve)((0, path_1.join)(path, basename));
-            entry = { path: (0, path_1.relative)(this._root, fullPath), fullPath, basename };
+            const fullPath = (0, node_path_1.resolve)((0, node_path_1.join)(path, basename));
+            entry = { path: (0, node_path_1.relative)(this._root, fullPath), fullPath, basename };
             entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
         }
@@ -186,5 +203,5 @@
                 if (entryRealPathStats.isDirectory()) {
                     const len = entryRealPath.length;
-                    if (full.startsWith(entryRealPath) && full.substr(len, 1) === path_1.sep) {
+                    if (full.startsWith(entryRealPath) && full.substr(len, 1) === node_path_1.sep) {
                         const recursiveError = new Error(`Circular symlink detected: "${full}" points to "${entryRealPath}"`);
                         // @ts-ignore
@@ -208,13 +225,14 @@
 exports.ReaddirpStream = ReaddirpStream;
 /**
- * Main function which ends up calling readdirRec and reads all files and directories in given root recursively.
+ * Streaming version: Reads all files and directories in given root recursively.
+ * Consumes ~constant small amount of RAM.
  * @param root Root directory
  * @param options Options to specify root (start directory), filters and recursion depth
  */
-const readdirp = (root, options = {}) => {
+function readdirp(root, options = {}) {
     // @ts-ignore
     let type = options.entryType || options.type;
     if (type === 'both')
-        type = FILE_DIR_TYPE; // backwards-compatibility
+        type = exports.EntryTypes.FILE_DIR_TYPE; // backwards-compatibility
     if (type)
         options.type = type;
@@ -230,15 +248,18 @@
     options.root = root;
     return new ReaddirpStream(options);
-};
-exports.readdirp = readdirp;
-const readdirpPromise = (root, options = {}) => {
+}
+/**
+ * Promise version: Reads all files and directories in given root recursively.
+ * Compared to streaming version, will consume a lot of RAM e.g. when 1 million files are listed.
+ * @returns array of paths and their entry infos
+ */
+function readdirpPromise(root, options = {}) {
     return new Promise((resolve, reject) => {
         const files = [];
-        (0, exports.readdirp)(root, options)
+        readdirp(root, options)
             .on('data', (entry) => files.push(entry))
             .on('end', () => resolve(files))
             .on('error', (error) => reject(error));
     });
-};
-exports.readdirpPromise = readdirpPromise;
-exports.default = exports.readdirp;
+}
+exports.default = readdirp;
