feat: add share links, folder zip download, and Delen sidebar button
- Add share_tokens table to DB schema (expires_at indexed) - New server/routes/share.js: POST /api/share/create, GET /api/share/info/:token, GET /api/share/preview/:token, GET /api/share/download/:token - Zip cache in zip-cache/ with 1-day max age and automatic pruning (buildZip, pruneZipCache) - Authenticated GET /api/files/download-zip for folder zip download - Public share page at /share/:token (public/share.html) with live HH:MM:SS timer, inline file preview, and download button - Sidebar: Delen button on all items, Download als zip button on folders - Share modal: read-only URL field with copy button and OK dismiss - Tests: tests/share.routes.test.js (22 tests), download-zip tests in files.routes.test.js - Updated technical-reference.md and tests.md
@@ -1,157 +1,180 @@
1
# Technical Reference
2
3
## server/index.js
4
- start() - Initialises DB/keys, starts HTTP/HTTPS servers, and starts the background thumbnail cache loop.
5
- shutdown(opts, ...servers) - Graceful teardown: stops thumbnail loop, closes DB/servers, exits with configurable code after drain/timeout.
6
7
## server/thumbnail-cache.js
8
- syncThumbnailCacheOnce() - Mirrors configured roots into public/thumbs and generates 99x99-max WebP thumbnails for image files; removes stale thumbnails and updates manifest hashes while preserving prior cache entries for temporarily unavailable roots (e.g. removable mounts).
9
- startThumbnailCacheLoop() - Schedules cache sync runs 5 seconds after boot and 5 seconds after each run completes.
10
- stopThumbnailCacheLoop() - Stops scheduled background cache sync runs.
11
- getCachedThumbnailInfo(sourceFile) - Returns cached thumbnail path/content-type when present; null when not ready.
12
- getThumbPathForSourceFile(sourceFile) - Maps an absolute source file path to its mirrored cache thumbnail path.
13
- getThumbRelPathForSourceFile(sourceFile) - Returns public-relative thumbnail path used in manifest entries.
14
- getImagesWithThumbnailsInDir(dirPath) - Returns [{filePath, thumbRelPath}] for all images inside dirPath (recursive) that have a cached thumbnail; sorted by filePath.
15
- getFolderIconSourceFile(folderPath) - Returns the source image path for a folder's icon: explicit assignment first, then auto-first cached image, null if none.
16
- setFolderIconAssignment(folderPath, imagePath) - Saves an explicit folder icon assignment to .folder-icons.json; pass null to clear (auto-detect used instead).
17
18
## server/db.js
19
- initDb() - Initializes SQLite schema for users, file metadata, and auth_sessions (idle timeout/revocation support).
20
- getDb() - Returns singleton DB handle with WAL and foreign key pragmas.
21
- closeDb() - Closes singleton DB handle to release file locks.
22
23
## server/auth.js
24
- createToken(username, req, fingerprint) - Creates JWT bound to IP/region/fingerprint and linked to a DB-backed session id.
25
- requireAuth(req, res, next) - Verifies JWT + binding + session row + 1-hour idle timeout, updates last_seen_at, and attaches req.user.
26
- requireAdmin(req, res, next) - Requires authenticated admin user.
27
- revokeSession(sessionId) - Revokes a session row so future token use fails immediately.
28
- getClientIp(req) - Normalizes request IP (including IPv4-mapped IPv6 loopback cases).
29
- getRegion(ip) - Derives coarse region binding from geoip lookup or local fallback.
30
- SESSION_IDLE_TIMEOUT_MS - Server-enforced idle timeout window (1 hour).
31
32
## server/routes/auth.js
33
- extractCredentials(body) - Accepts encrypted payloads and compatibility plaintext payloads for login/setup.
34
- makeAuthResponse(token, clientPublicKey) - Returns encrypted token when client key exists, plaintext token otherwise.
35
- POST /api/auth/setup - Creates first admin and issues token.
36
- POST /api/auth/login - Authenticates user by case-insensitive username match and issues token with canonical stored username.
37
- GET /api/auth/me - Returns current authenticated user profile.
38
- POST /api/auth/logout - Revokes the active session.
39
40
## server/routes/admin.js
41
- POST /api/admin/users - Creates a new user and enforces case-insensitive username uniqueness.
42
- normalizePermissions(permissions) - Normalizes permission maps and enforces that write access implies read access.
43
44
## server/routes/files.js
45
- GET /api/files/roots - Returns readable roots with display label (alias when configured), originalName, and path.
46
- POST /api/files/root-alias - Sets a display-only alias for an exact configured root path (no filesystem rename).
47
- GET /api/files/root-access - Returns users who can access an exact configured root and their access mode (R / R+W).
48
- GET /api/files/thumbnail - Serves cache-only thumbnail images for authorized files; returns 404 while cache is not ready.
49
- GET /api/files/folder-images - Returns images inside a directory (recursive) that already have a cached thumbnail; only thumbnailed images are included per user requirement.
50
- GET /api/files/folder-icon - Returns the current icon source file for a folder ({icon:{filePath}} or {icon:null}); explicit assignment takes priority over auto-first.
51
- POST /api/files/folder-icon - Sets or clears a folder's explicit icon assignment; imagePath must have a cached thumbnail; write access required.
52
- makeTempUploadPath(dir, originalName) - Builds a hidden per-upload staging filename in the target directory for multipart uploads.
53
- unlinkIfExists(targetPath, cb) - Removes a file during upload cleanup while ignoring already-missing temp files.
54
- promoteUploadedFile(tempPath, finalPath, cb) - Atomically renames a completed staged upload into place on the Linux server.
55
- splitNameExt(name) - Splits a filename into stem/ext, preserving dotless names and hidden-file behavior.
56
- pickNumberedPath(dir, requestedName) - Finds the first free `name (n).ext` path inside a directory.
57
- removePathRecursive(targetPath) - Deletes existing file or directory destination to support overwrite moves.
58
- POST /api/files/upload - Streams multipart uploads into hidden temp files, cleans them up on abort, and only exposes final filenames after completion.
59
- POST /api/files/move - Moves file/folder; supports conflict strategies: `error` (default), `overwrite`, or `rename` with optional `targetName`.
60
61
## public/app.js
62
- showApp() - Reveals app shell; keeps sidebar folded by default on mobile and shows folder overview sidebar on desktop.
63
- getOrCreateClientBindingId() - Creates/loads a persistent local browser binding id used in auth fingerprint derivation.
64
- getFingerprint() - Builds a stable fingerprint from binding id + stable browser properties (not viewport metrics) to avoid false session invalidation on UI/window-state changes.
65
- saveSessionState() - Persists token, selected path, and last operation timestamp in localStorage.
66
- loadSessionState() - Restores persisted state only when the last operation is within the 1-hour local idle window.
67
- api(method, path, body, opts) - Central API caller; refreshes local session timestamp on successful authenticated calls.
68
- performLogout() - Explicit logout path that revokes server session and clears local session state.
69
- initAuth() - Restores prior session when valid and auto-logins without credential prompt.
70
- showConfirm(title, message) - In-page confirm dialog; returns Promise<boolean>. Use instead of window.confirm().
71
- showPrompt(title, message, defaultValue) - In-page text-input dialog; returns Promise<string|null>. Use instead of window.prompt().
72
- showOverwrite(filename) - In-page overwrite-decision dialog for file conflicts; returns Promise<'yes'|'no'|'all'|'none'>.
73
- splitNameExt(name) - Client-side filename splitter used for local conflict rename suggestions.
74
- nextAvailableName(requestedName, existingNames) - Computes `name (n).ext` for upload/move rename options.
75
- listDirNameSet(dir) - Fetches directory listing and returns a Set of existing names.
76
- cloneFileWithName(file, newName) - Creates a renamed File object for non-overwrite uploads.
77
- showFileConflictChoice(filename, renameTo, mode) - Dialog for single upload/move conflicts; returns overwrite/rename/cancel.
78
- loadThumbnails() - Registers visible file icons for lazy thumbnail loading (both file thumbnails and folder icons); retries missing cache thumbnails during incremental refresh.
79
- loadOneThumbnail(iconEl) - Loads thumbnails from server cache endpoint for images, text snapshots for text files, and badges for other files; marks image icons as pending when cache returns 404 and uses direct source SVG thumbnails for SVG files under 1MB.
80
- observeFolderIcon(iconEl) - Registers a folder icon element with IntersectionObserver for lazy loading.
81
- loadOneFolderIcon(iconEl) - Fetches /api/files/folder-icon then the thumbnail blob and overlays it inside the folder SVG; no-op if no icon available.
82
- applyFolderThumbnail(iconEl, srcUrl) - Injects an SVG <image> element clipped to the folder outline path into the folder's icon SVG.
83
- openFolderIconPicker(item) - Opens the folder icon picker modal; shows cached-thumbnail images from the folder; allows selection, clearing, and cancellation.
84
- refreshAfterIconChange(item) - Resets and reloads the folder icon in both the grid tile and sidebar after set/clear operations.
85
- disconnectFolderIconObserver() - Disconnects and clears the folder icon IntersectionObserver on grid rebuild.
86
- getThumbnailKind(name) - Classifies files into image/text/badge thumbnail strategies.
87
- observeThumbnailIcon(iconEl) - Defers thumbnail fetch work until file icons are near/in the viewport.
88
- disconnectThumbnailObserver() - Clears active IntersectionObserver when the grid is rebuilt.
89
- setThumbnailPending(iconEl, pending) - Toggles per-icon pending spinner state while a cached image thumbnail is not ready yet.
90
- buildThumbnailSource(item, blob, kind) - Produces thumbnail image source (data/blob URL) for icon injection.
91
92
## tests/thumbnail-cache.test.js
93
- thumbnail cache worker / creates cached thumbnail with dimensions smaller than 100px - Verifies cached image generation and manifest write.
94
- thumbnail cache worker / removes cached thumbnail when source file is deleted - Verifies stale thumbnail cleanup behavior.
95
- afterEach() cleanup - Removes temp roots with `fs.rmSync(...maxRetries...)` to tolerate transient Windows file locks.
96
- detectCodeLanguage(name, mime) - Determines preview language for text/script files by MIME and extension.
97
- prettyPrintCode(raw, lang) - Best-effort formatter for JSON/markup/script previews before rendering.
98
- highlightCode(raw, lang) - Escapes and syntax-highlights preview text into HTML spans.
99
- fileAccentColor(name) - Returns canonical file-type accent color used by icon strokes and preview sheet outline.
100
- openFolderSidebar() - Persistent sidebar fallback view that shows current folder/root overview when no item is selected.
101
- closeSidebar() - Clears selection; hides the panel entirely on mobile and restores folder overview sidebar on desktop.
102
- isMobileViewport() - Central media-query helper for mobile-only sidebar/interaction behavior.
103
- hideSidebarPanel() - Hides sidebar panel and removes sidebar-open layout class from the app shell.
104
- renderBreadcrumb() - Builds clickable breadcrumb path and marks each folder segment as a drag-drop move target via .crumb-drop-target and data-path.
105
- fetchFileBlob(item) - Downloads a file as Blob with auth headers for preview/download flows.
106
- downloadOrView(item, sourceSvgEl) - Opens preview; prefers in-place expanded tile preview when invoked from a file icon, falls back to overlay when no source tile is available.
107
- downloadOrView(item, sourceSvgEl) - Opens in-place expanded tile preview from a file icon; shows error toast if no source tile is found.
108
- renderPreviewBody(item, blob, objectUrl, targetEl) - Renders preview content (image/video/audio/pdf/text) or unsupported message into a target container.
109
- animateRect(el, fromRect, toRect, opts) - Helper that animates element rectangle (left/top/width/height) for expand/collapse transitions.
110
- openExpandedTilePreview(item, tileEl, sourceSvgEl, blob, objectUrl) - Reparents the real file tile to body, expands it to viewport preview, injects close/download controls.
111
- openExpandedTilePreview(item, tileEl, sourceSvgEl, blob, objectUrl) - Reparents tile to body, shows spinner during expand animation, renders content after animation; applies file-type accent colour to tile border and outline glow.
112
- closeExpandedTilePreview() - Collapses expanded tile preview back to original grid position and restores original icon markup.
113
- closePreview() - Closes either expanded-tile preview or overlay preview, then revokes active preview object URL.
114
- closePreview() - Closes expanded-tile preview and revokes active preview object URL.
115
- openMovePicker(item) - Opens Move To selector modal with expandable folder tree across all writable roots and executes /api/files/move.
116
- moveWithConflictResolution(item, targetDir) - Attempts move and handles 409 conflicts by prompting overwrite/rename/cancel then retries.
117
- rootPermissionLabel(root) - Resolves permission key for a root using originalName when available (alias-safe permission checks).
118
- ensureMoveModal() - Lazily creates and wires Move To modal UI (tree, selection state, confirm/cancel handlers).
119
- createMoveNode(folderPath, label) - Builds an expandable/selectable folder node for the Move To tree.
120
- loadMoveChildren(containerEl, dirPath) - Lazy-loads subfolders for a tree node via /api/files/list.
121
- isInlinePreviewableBlob(blob, name) - Determines if a blob can be previewed inline by MIME/extension.
122
- makeFileItem(item) - Builds a .file-item element; roots in Home now use folder-like interaction (single-click focus, double-click open), roots are non-draggable, and mobile long-press contextmenu suppression remains.
123
- attachMobileLongPress(el, item) - Adds mobile long-press detection on file/folder tiles to open the item sidebar without desktop side effects.
124
- openSidebar(item) - Renders item details/actions in sidebar; roots show alias + original name + usage stats, hide Move To/Delete, keep Rename.
125
- fetchRootAccessList(rootPath) - Fetches root access users from the server for a specific configured root.
126
- formatRootAccessList(users) - Formats root access entries as "username mode" values for sidebar rendering.
127
- openSidebar(item) - Renders item details/actions in sidebar; root selections include alias/original name/usage/access list and keep Rename while hiding Move To/Delete.
128
- openFolderSidebar() - Shows current folder details when nothing is selected; when at root base-level it also shows root access list.
129
- openRenameModal(item) - Renames files/folders; for roots this writes display alias via /api/files/root-alias and reloads roots.
130
- uploadFiles(fileList) - Uploads files one-by-one with per-file conflict prompt (overwrite/rename/cancel) when names already exist.
131
- openUserModal(user, paths) - Admin user editor; enforces UI permission rule that Write is disabled/unchecked while Read is unchecked.
132
133
## public/drag-move.js
134
- makeDraggable(el, item) - Attaches pointerdown to a .file-item; starts drag after threshold movement. Depends on: api(), canWrite(), navigateTo(), STATE, closeSidebar(), toast() from app.js.
135
- makeDraggable(el, item) - Touch drag now requires a short hold before movement, uses pointer capture, and keeps drag responsive on mobile.
136
- (internal) _beginDrag(e, el, item) - Lifts and re-parents the real .file-item to body, inserts hidden placeholder, and shows parent-folder drag target when applicable.
137
- (internal) _moveDrag(e) - Moves the real dragged item, hit-tests folder tiles, breadcrumb segments, and parent-folder target, toggles target highlight state.
138
- (internal) _endDrag() - On valid target: runs drop animation, calls moveWithConflictResolution() for overwrite/rename/cancel conflicts, then refreshes dir. Otherwise snap-back.
139
- (internal) _cleanupDrag(reinsert) - Restores tile styles; reinserts into grid on failure/abort or removes before refresh on success, hides drag helper targets.
140
141
## public/drag-move.css
142
- .file-item.dragging - Lifted style for real dragged tile.
143
- .file-item.drop-target - Glows folder icon when drag hovers over it.
144
- .drag-parent-target - Temporary top-left "move to parent" drop target shown while dragging in nested folders.
145
- .crumb-drop-target.active - Highlight style for breadcrumb drop destinations during drag.
146
- @keyframes drag-rise-spin-fall - Real tile rises, spins, falls/scales into folder on drop.
147
- @keyframes folder-bounce - Target folder bounces down then back on accept.
148
- .preview-backdrop/.file-item--preview/.preview-expand-* - In-place expanded tile preview styling (no separate overlay window), including preserved icon-outline layer.
149
- .move-modal/.move-tree/.move-node* - Move To tree picker styles with expandable/collapsible folder hierarchy.
150
151
## tests/auth.routes.test.js
152
- session lifecycle / POST /api/auth/logout revokes active session - Verifies explicit logout invalidates token immediately.
153
- session lifecycle / session expires after 1 hour of inactivity - Verifies server-side idle timeout enforcement.
154
155
## tests/page.load.test.js
156
- bootClient() - Boots the app in jsdom and waits until app shell is visible or timeout before assertions.
157
- waitFor(dom, predicate, timeoutMs) - Poll helper used by interaction tests to wait for rendered tiles.
1
# Technical Reference
2
3
## server/index.js
4
- start() - Initialises DB/keys, starts HTTP/HTTPS servers, and starts the background thumbnail cache loop.
5
- shutdown(opts, ...servers) - Graceful teardown: stops thumbnail loop, closes DB/servers, exits with configurable code after drain/timeout.
6
7
## server/thumbnail-cache.js
8
- syncThumbnailCacheOnce() - Mirrors configured roots into public/thumbs and generates 99x99-max WebP thumbnails for image files; removes stale thumbnails and updates manifest hashes while preserving prior cache entries for temporarily unavailable roots (e.g. removable mounts).
9
- startThumbnailCacheLoop() - Schedules cache sync runs 5 seconds after boot and 5 seconds after each run completes.
10
- stopThumbnailCacheLoop() - Stops scheduled background cache sync runs.
11
- getCachedThumbnailInfo(sourceFile) - Returns cached thumbnail path/content-type when present; null when not ready.
12
- getThumbPathForSourceFile(sourceFile) - Maps an absolute source file path to its mirrored cache thumbnail path.
13
- getThumbRelPathForSourceFile(sourceFile) - Returns public-relative thumbnail path used in manifest entries.
14
- getImagesWithThumbnailsInDir(dirPath) - Returns [{filePath, thumbRelPath}] for all images inside dirPath (recursive) that have a cached thumbnail; sorted by filePath.
15
- getFolderIconSourceFile(folderPath) - Returns the source image path for a folder's icon: explicit assignment first, then auto-first cached image, null if none.
16
- setFolderIconAssignment(folderPath, imagePath) - Saves an explicit folder icon assignment to .folder-icons.json; pass null to clear (auto-detect used instead).
17
18
## server/db.js
19
- initDb() - Initializes SQLite schema for users, file metadata, and auth_sessions (idle timeout/revocation support).
20
- getDb() - Returns singleton DB handle with WAL and foreign key pragmas.
21
- closeDb() - Closes singleton DB handle to release file locks.
22
23
## server/auth.js
24
- createToken(username, req, fingerprint) - Creates JWT bound to IP/region/fingerprint and linked to a DB-backed session id.
25
- requireAuth(req, res, next) - Verifies JWT + binding + session row + 1-hour idle timeout, updates last_seen_at, and attaches req.user.
26
- requireAdmin(req, res, next) - Requires authenticated admin user.
27
- revokeSession(sessionId) - Revokes a session row so future token use fails immediately.
28
- getClientIp(req) - Normalizes request IP (including IPv4-mapped IPv6 loopback cases).
29
- getRegion(ip) - Derives coarse region binding from geoip lookup or local fallback.
30
- SESSION_IDLE_TIMEOUT_MS - Server-enforced idle timeout window (1 hour).
31
32
## server/routes/auth.js
33
- extractCredentials(body) - Accepts encrypted payloads and compatibility plaintext payloads for login/setup.
34
- makeAuthResponse(token, clientPublicKey) - Returns encrypted token when client key exists, plaintext token otherwise.
35
- POST /api/auth/setup - Creates first admin and issues token.
36
- POST /api/auth/login - Authenticates user by case-insensitive username match and issues token with canonical stored username.
37
- GET /api/auth/me - Returns current authenticated user profile.
38
- POST /api/auth/logout - Revokes the active session.
39
40
## server/routes/admin.js
41
- POST /api/admin/users - Creates a new user and enforces case-insensitive username uniqueness.
42
- normalizePermissions(permissions) - Normalizes permission maps and enforces that write access implies read access.
43
44
## server/routes/files.js
45
- GET /api/files/roots - Returns readable roots with display label (alias when configured), originalName, and path.
46
- POST /api/files/root-alias - Sets a display-only alias for an exact configured root path (no filesystem rename).
47
- GET /api/files/root-access - Returns users who can access an exact configured root and their access mode (R / R+W).
48
- GET /api/files/thumbnail - Serves cache-only thumbnail images for authorized files; returns 404 while cache is not ready.
49
- GET /api/files/folder-images - Returns images inside a directory (recursive) that already have a cached thumbnail; only thumbnailed images are included per user requirement.
50
- GET /api/files/folder-icon - Returns the current icon source file for a folder ({icon:{filePath}} or {icon:null}); explicit assignment takes priority over auto-first.
51
- POST /api/files/folder-icon - Sets or clears a folder's explicit icon assignment; imagePath must have a cached thumbnail; write access required.
52
- GET /api/files/download-zip?dir=<absolute-path> - Authenticated. Streams the directory as a zip archive; caches the zip for up to 1 day in zip-cache/.
53
- makeTempUploadPath(dir, originalName) - Builds a hidden per-upload staging filename in the target directory for multipart uploads.
54
- unlinkIfExists(targetPath, cb) - Removes a file during upload cleanup while ignoring already-missing temp files.
55
- promoteUploadedFile(tempPath, finalPath, cb) - Atomically renames a completed staged upload into place on the Linux server.
56
- splitNameExt(name) - Splits a filename into stem/ext, preserving dotless names and hidden-file behavior.
57
- pickNumberedPath(dir, requestedName) - Finds the first free `name (n).ext` path inside a directory.
58
- removePathRecursive(targetPath) - Deletes existing file or directory destination to support overwrite moves.
59
- POST /api/files/upload - Streams multipart uploads into hidden temp files, cleans them up on abort, and only exposes final filenames after completion.
60
- POST /api/files/move - Moves file/folder; supports conflict strategies: `error` (default), `overwrite`, or `rename` with optional `targetName`.
61
62
## server/routes/share.js
63
- POST /api/share/create - Authenticated. Creates a 24-hour share token for a file or directory; returns {token, expiresAt}.
64
- GET /api/share/info/:token - Public. Returns {name, isDir, expiresAt} for a valid non-expired token; 410 when expired, 404 when unknown.
65
- GET /api/share/preview/:token - Public. Streams file content inline for preview (files only, max 50 MB); 400 for directories, 410 expired.
66
- GET /api/share/download/:token - Public. Downloads the file or a zip of the directory for a valid token; 410 expired.
67
- buildZip(dirPath, cacheKey) - Creates (or returns cached) zip in zip-cache/; prunes stale zips before building; exported for reuse in files.js.
68
- pruneZipCache() - Deletes zip files in zip-cache/ older than 1 day; called automatically before each zip build.
69
- ZIP_CACHE_DIR - Absolute path to the zip-cache/ directory (project root).
70
71
## server/db.js
72
- initDb() - Initializes SQLite schema for users, file metadata, auth_sessions, and share_tokens (expires_at index).
73
- getDb() - Returns singleton DB handle with WAL and foreign key pragmas.
74
- closeDb() - Closes singleton DB handle to release file locks.
75
76
## public/share.html
77
- Standalone public share page served at /share/:token; no auth required.
78
- Timer bar - Live HH:MM:SS countdown showing remaining validity; turns red and disables download when expired.
79
- tryPreview(name, isDir) - Renders inline preview (img/video/audio/text pre); no-op for unsupported types or directories.
80
- Fetches /api/share/info/:token on load; shows error state for 404/410 responses.
81
- Download link points to /api/share/download/:token; labelled "Download als .zip" for directories.
82
83
## public/app.js
84
- showApp() - Reveals app shell; keeps sidebar folded by default on mobile and shows folder overview sidebar on desktop.
85
- getOrCreateClientBindingId() - Creates/loads a persistent local browser binding id used in auth fingerprint derivation.
86
- getFingerprint() - Builds a stable fingerprint from binding id + stable browser properties (not viewport metrics) to avoid false session invalidation on UI/window-state changes.
87
- saveSessionState() - Persists token, selected path, and last operation timestamp in localStorage.
88
- loadSessionState() - Restores persisted state only when the last operation is within the 1-hour local idle window.
89
- api(method, path, body, opts) - Central API caller; refreshes local session timestamp on successful authenticated calls.
90
- performLogout() - Explicit logout path that revokes server session and clears local session state.
91
- initAuth() - Restores prior session when valid and auto-logins without credential prompt.
92
- showConfirm(title, message) - In-page confirm dialog; returns Promise<boolean>. Use instead of window.confirm().
93
- showPrompt(title, message, defaultValue) - In-page text-input dialog; returns Promise<string|null>. Use instead of window.prompt().
94
- showOverwrite(filename) - In-page overwrite-decision dialog for file conflicts; returns Promise<'yes'|'no'|'all'|'none'>.
95
- splitNameExt(name) - Client-side filename splitter used for local conflict rename suggestions.
96
- nextAvailableName(requestedName, existingNames) - Computes `name (n).ext` for upload/move rename options.
97
- listDirNameSet(dir) - Fetches directory listing and returns a Set of existing names.
98
- cloneFileWithName(file, newName) - Creates a renamed File object for non-overwrite uploads.
99
- showFileConflictChoice(filename, renameTo, mode) - Dialog for single upload/move conflicts; returns overwrite/rename/cancel.
100
- openShareModal(item) - Opens the Delen (share) popup, calls POST /api/share/create, shows the 24-hour URL with a copy button and OK to dismiss.
101
- loadThumbnails() - Registers visible file icons for lazy thumbnail loading (both file thumbnails and folder icons); retries missing cache thumbnails during incremental refresh.
102
- loadOneThumbnail(iconEl) - Loads thumbnails from server cache endpoint for images, text snapshots for text files, and badges for other files; marks image icons as pending when cache returns 404 and uses direct source SVG thumbnails for SVG files under 1MB.
103
- observeFolderIcon(iconEl) - Registers a folder icon element with IntersectionObserver for lazy loading.
104
- loadOneFolderIcon(iconEl) - Fetches /api/files/folder-icon then the thumbnail blob and overlays it inside the folder SVG; no-op if no icon available.
105
- applyFolderThumbnail(iconEl, srcUrl) - Injects an SVG <image> element clipped to the folder outline path into the folder's icon SVG.
106
- openFolderIconPicker(item) - Opens the folder icon picker modal; shows cached-thumbnail images from the folder; allows selection, clearing, and cancellation.
107
- refreshAfterIconChange(item) - Resets and reloads the folder icon in both the grid tile and sidebar after set/clear operations.
108
- disconnectFolderIconObserver() - Disconnects and clears the folder icon IntersectionObserver on grid rebuild.
109
- getThumbnailKind(name) - Classifies files into image/text/badge thumbnail strategies.
110
- observeThumbnailIcon(iconEl) - Defers thumbnail fetch work until file icons are near/in the viewport.
111
- disconnectThumbnailObserver() - Clears active IntersectionObserver when the grid is rebuilt.
112
- setThumbnailPending(iconEl, pending) - Toggles per-icon pending spinner state while a cached image thumbnail is not ready yet.
113
- buildThumbnailSource(item, blob, kind) - Produces thumbnail image source (data/blob URL) for icon injection.
114
115
## tests/thumbnail-cache.test.js
116
- thumbnail cache worker / creates cached thumbnail with dimensions smaller than 100px - Verifies cached image generation and manifest write.
117
- thumbnail cache worker / removes cached thumbnail when source file is deleted - Verifies stale thumbnail cleanup behavior.
118
- afterEach() cleanup - Removes temp roots with `fs.rmSync(...maxRetries...)` to tolerate transient Windows file locks.
119
- detectCodeLanguage(name, mime) - Determines preview language for text/script files by MIME and extension.
120
- prettyPrintCode(raw, lang) - Best-effort formatter for JSON/markup/script previews before rendering.
121
- highlightCode(raw, lang) - Escapes and syntax-highlights preview text into HTML spans.
122
- fileAccentColor(name) - Returns canonical file-type accent color used by icon strokes and preview sheet outline.
123
- openFolderSidebar() - Persistent sidebar fallback view that shows current folder/root overview when no item is selected.
124
- closeSidebar() - Clears selection; hides the panel entirely on mobile and restores folder overview sidebar on desktop.
125
- isMobileViewport() - Central media-query helper for mobile-only sidebar/interaction behavior.
126
- hideSidebarPanel() - Hides sidebar panel and removes sidebar-open layout class from the app shell.
127
- renderBreadcrumb() - Builds clickable breadcrumb path and marks each folder segment as a drag-drop move target via .crumb-drop-target and data-path.
128
- fetchFileBlob(item) - Downloads a file as Blob with auth headers for preview/download flows.
129
- downloadOrView(item, sourceSvgEl) - Opens preview; prefers in-place expanded tile preview when invoked from a file icon, falls back to overlay when no source tile is available.
130
- downloadOrView(item, sourceSvgEl) - Opens in-place expanded tile preview from a file icon; shows error toast if no source tile is found.
131
- renderPreviewBody(item, blob, objectUrl, targetEl) - Renders preview content (image/video/audio/pdf/text) or unsupported message into a target container.
132
- animateRect(el, fromRect, toRect, opts) - Helper that animates element rectangle (left/top/width/height) for expand/collapse transitions.
133
- openExpandedTilePreview(item, tileEl, sourceSvgEl, blob, objectUrl) - Reparents the real file tile to body, expands it to viewport preview, injects close/download controls.
134
- openExpandedTilePreview(item, tileEl, sourceSvgEl, blob, objectUrl) - Reparents tile to body, shows spinner during expand animation, renders content after animation; applies file-type accent colour to tile border and outline glow.
135
- closeExpandedTilePreview() - Collapses expanded tile preview back to original grid position and restores original icon markup.
136
- closePreview() - Closes either expanded-tile preview or overlay preview, then revokes active preview object URL.
137
- closePreview() - Closes expanded-tile preview and revokes active preview object URL.
138
- openMovePicker(item) - Opens Move To selector modal with expandable folder tree across all writable roots and executes /api/files/move.
139
- moveWithConflictResolution(item, targetDir) - Attempts move and handles 409 conflicts by prompting overwrite/rename/cancel then retries.
140
- rootPermissionLabel(root) - Resolves permission key for a root using originalName when available (alias-safe permission checks).
141
- ensureMoveModal() - Lazily creates and wires Move To modal UI (tree, selection state, confirm/cancel handlers).
142
- createMoveNode(folderPath, label) - Builds an expandable/selectable folder node for the Move To tree.
143
- loadMoveChildren(containerEl, dirPath) - Lazy-loads subfolders for a tree node via /api/files/list.
144
- isInlinePreviewableBlob(blob, name) - Determines if a blob can be previewed inline by MIME/extension.
145
- makeFileItem(item) - Builds a .file-item element; roots in Home now use folder-like interaction (single-click focus, double-click open), roots are non-draggable, and mobile long-press contextmenu suppression remains.
146
- attachMobileLongPress(el, item) - Adds mobile long-press detection on file/folder tiles to open the item sidebar without desktop side effects.
147
- openSidebar(item) - Renders item details/actions in sidebar; roots show alias + original name + usage stats, hide Move To/Delete, keep Rename.
148
- fetchRootAccessList(rootPath) - Fetches root access users from the server for a specific configured root.
149
- formatRootAccessList(users) - Formats root access entries as "username mode" values for sidebar rendering.
150
- openSidebar(item) - Renders item details/actions in sidebar; root selections include alias/original name/usage/access list and keep Rename while hiding Move To/Delete.
151
- openFolderSidebar() - Shows current folder details when nothing is selected; when at root base-level it also shows root access list.
152
- openRenameModal(item) - Renames files/folders; for roots this writes display alias via /api/files/root-alias and reloads roots.
153
- uploadFiles(fileList) - Uploads files one-by-one with per-file conflict prompt (overwrite/rename/cancel) when names already exist.
154
- openUserModal(user, paths) - Admin user editor; enforces UI permission rule that Write is disabled/unchecked while Read is unchecked.
155
156
## public/drag-move.js
157
- makeDraggable(el, item) - Attaches pointerdown to a .file-item; starts drag after threshold movement. Depends on: api(), canWrite(), navigateTo(), STATE, closeSidebar(), toast() from app.js.
158
- makeDraggable(el, item) - Touch drag now requires a short hold before movement, uses pointer capture, and keeps drag responsive on mobile.
159
- (internal) _beginDrag(e, el, item) - Lifts and re-parents the real .file-item to body, inserts hidden placeholder, and shows parent-folder drag target when applicable.
160
- (internal) _moveDrag(e) - Moves the real dragged item, hit-tests folder tiles, breadcrumb segments, and parent-folder target, toggles target highlight state.
161
- (internal) _endDrag() - On valid target: runs drop animation, calls moveWithConflictResolution() for overwrite/rename/cancel conflicts, then refreshes dir. Otherwise snap-back.
162
- (internal) _cleanupDrag(reinsert) - Restores tile styles; reinserts into grid on failure/abort or removes before refresh on success, hides drag helper targets.
163
164
## public/drag-move.css
165
- .file-item.dragging - Lifted style for real dragged tile.
166
- .file-item.drop-target - Glows folder icon when drag hovers over it.
167
- .drag-parent-target - Temporary top-left "move to parent" drop target shown while dragging in nested folders.
168
- .crumb-drop-target.active - Highlight style for breadcrumb drop destinations during drag.
169
- @keyframes drag-rise-spin-fall - Real tile rises, spins, falls/scales into folder on drop.
170
- @keyframes folder-bounce - Target folder bounces down then back on accept.
171
- .preview-backdrop/.file-item--preview/.preview-expand-* - In-place expanded tile preview styling (no separate overlay window), including preserved icon-outline layer.
172
- .move-modal/.move-tree/.move-node* - Move To tree picker styles with expandable/collapsible folder hierarchy.
173
174
## tests/auth.routes.test.js
175
- session lifecycle / POST /api/auth/logout revokes active session - Verifies explicit logout invalidates token immediately.
176
- session lifecycle / session expires after 1 hour of inactivity - Verifies server-side idle timeout enforcement.
177
178
## tests/page.load.test.js
179
- bootClient() - Boots the app in jsdom and waits until app shell is visible or timeout before assertions.
180
- waitFor(dom, predicate, timeoutMs) - Poll helper used by interaction tests to wait for rendered tiles.
@@ -1,157 +1,180 @@1
# Technical Reference1
# Technical Reference
2
2
3
## server/index.js3
## server/index.js
4
- start() - Initialises DB/keys, starts HTTP/HTTPS servers, and starts the background thumbnail cache loop.4
- start() - Initialises DB/keys, starts HTTP/HTTPS servers, and starts the background thumbnail cache loop.
5
- shutdown(opts, ...servers) - Graceful teardown: stops thumbnail loop, closes DB/servers, exits with configurable code after drain/timeout.5
- shutdown(opts, ...servers) - Graceful teardown: stops thumbnail loop, closes DB/servers, exits with configurable code after drain/timeout.
6
6
7
## server/thumbnail-cache.js7
## server/thumbnail-cache.js
8
- syncThumbnailCacheOnce() - Mirrors configured roots into public/thumbs and generates 99x99-max WebP thumbnails for image files; removes stale thumbnails and updates manifest hashes while preserving prior cache entries for temporarily unavailable roots (e.g. removable mounts).8
- syncThumbnailCacheOnce() - Mirrors configured roots into public/thumbs and generates 99x99-max WebP thumbnails for image files; removes stale thumbnails and updates manifest hashes while preserving prior cache entries for temporarily unavailable roots (e.g. removable mounts).
9
- startThumbnailCacheLoop() - Schedules cache sync runs 5 seconds after boot and 5 seconds after each run completes.9
- startThumbnailCacheLoop() - Schedules cache sync runs 5 seconds after boot and 5 seconds after each run completes.
10
- stopThumbnailCacheLoop() - Stops scheduled background cache sync runs.10
- stopThumbnailCacheLoop() - Stops scheduled background cache sync runs.
11
- getCachedThumbnailInfo(sourceFile) - Returns cached thumbnail path/content-type when present; null when not ready.11
- getCachedThumbnailInfo(sourceFile) - Returns cached thumbnail path/content-type when present; null when not ready.
12
- getThumbPathForSourceFile(sourceFile) - Maps an absolute source file path to its mirrored cache thumbnail path.12
- getThumbPathForSourceFile(sourceFile) - Maps an absolute source file path to its mirrored cache thumbnail path.
13
- getThumbRelPathForSourceFile(sourceFile) - Returns public-relative thumbnail path used in manifest entries.13
- getThumbRelPathForSourceFile(sourceFile) - Returns public-relative thumbnail path used in manifest entries.
14
- getImagesWithThumbnailsInDir(dirPath) - Returns [{filePath, thumbRelPath}] for all images inside dirPath (recursive) that have a cached thumbnail; sorted by filePath.14
- getImagesWithThumbnailsInDir(dirPath) - Returns [{filePath, thumbRelPath}] for all images inside dirPath (recursive) that have a cached thumbnail; sorted by filePath.
15
- getFolderIconSourceFile(folderPath) - Returns the source image path for a folder's icon: explicit assignment first, then auto-first cached image, null if none.15
- getFolderIconSourceFile(folderPath) - Returns the source image path for a folder's icon: explicit assignment first, then auto-first cached image, null if none.
16
- setFolderIconAssignment(folderPath, imagePath) - Saves an explicit folder icon assignment to .folder-icons.json; pass null to clear (auto-detect used instead).16
- setFolderIconAssignment(folderPath, imagePath) - Saves an explicit folder icon assignment to .folder-icons.json; pass null to clear (auto-detect used instead).
17
17
18
## server/db.js18
## server/db.js
19
- initDb() - Initializes SQLite schema for users, file metadata, and auth_sessions (idle timeout/revocation support).19
- initDb() - Initializes SQLite schema for users, file metadata, and auth_sessions (idle timeout/revocation support).
20
- getDb() - Returns singleton DB handle with WAL and foreign key pragmas.20
- getDb() - Returns singleton DB handle with WAL and foreign key pragmas.
21
- closeDb() - Closes singleton DB handle to release file locks.21
- closeDb() - Closes singleton DB handle to release file locks.
22
22
23
## server/auth.js23
## server/auth.js
24
- createToken(username, req, fingerprint) - Creates JWT bound to IP/region/fingerprint and linked to a DB-backed session id.24
- createToken(username, req, fingerprint) - Creates JWT bound to IP/region/fingerprint and linked to a DB-backed session id.
25
- requireAuth(req, res, next) - Verifies JWT + binding + session row + 1-hour idle timeout, updates last_seen_at, and attaches req.user.25
- requireAuth(req, res, next) - Verifies JWT + binding + session row + 1-hour idle timeout, updates last_seen_at, and attaches req.user.
26
- requireAdmin(req, res, next) - Requires authenticated admin user.26
- requireAdmin(req, res, next) - Requires authenticated admin user.
27
- revokeSession(sessionId) - Revokes a session row so future token use fails immediately.27
- revokeSession(sessionId) - Revokes a session row so future token use fails immediately.
28
- getClientIp(req) - Normalizes request IP (including IPv4-mapped IPv6 loopback cases).28
- getClientIp(req) - Normalizes request IP (including IPv4-mapped IPv6 loopback cases).
29
- getRegion(ip) - Derives coarse region binding from geoip lookup or local fallback.29
- getRegion(ip) - Derives coarse region binding from geoip lookup or local fallback.
30
- SESSION_IDLE_TIMEOUT_MS - Server-enforced idle timeout window (1 hour).30
- SESSION_IDLE_TIMEOUT_MS - Server-enforced idle timeout window (1 hour).
31
31
32
## server/routes/auth.js32
## server/routes/auth.js
33
- extractCredentials(body) - Accepts encrypted payloads and compatibility plaintext payloads for login/setup.33
- extractCredentials(body) - Accepts encrypted payloads and compatibility plaintext payloads for login/setup.
34
- makeAuthResponse(token, clientPublicKey) - Returns encrypted token when client key exists, plaintext token otherwise.34
- makeAuthResponse(token, clientPublicKey) - Returns encrypted token when client key exists, plaintext token otherwise.
35
- POST /api/auth/setup - Creates first admin and issues token.35
- POST /api/auth/setup - Creates first admin and issues token.
36
- POST /api/auth/login - Authenticates user by case-insensitive username match and issues token with canonical stored username.36
- POST /api/auth/login - Authenticates user by case-insensitive username match and issues token with canonical stored username.
37
- GET /api/auth/me - Returns current authenticated user profile.37
- GET /api/auth/me - Returns current authenticated user profile.
38
- POST /api/auth/logout - Revokes the active session.38
- POST /api/auth/logout - Revokes the active session.
39
39
40
## server/routes/admin.js40
## server/routes/admin.js
41
- POST /api/admin/users - Creates a new user and enforces case-insensitive username uniqueness.41
- POST /api/admin/users - Creates a new user and enforces case-insensitive username uniqueness.
42
- normalizePermissions(permissions) - Normalizes permission maps and enforces that write access implies read access.42
- normalizePermissions(permissions) - Normalizes permission maps and enforces that write access implies read access.
43
43
44
## server/routes/files.js44
## server/routes/files.js
45
- GET /api/files/roots - Returns readable roots with display label (alias when configured), originalName, and path.45
- GET /api/files/roots - Returns readable roots with display label (alias when configured), originalName, and path.
46
- POST /api/files/root-alias - Sets a display-only alias for an exact configured root path (no filesystem rename).46
- POST /api/files/root-alias - Sets a display-only alias for an exact configured root path (no filesystem rename).
47
- GET /api/files/root-access - Returns users who can access an exact configured root and their access mode (R / R+W).47
- GET /api/files/root-access - Returns users who can access an exact configured root and their access mode (R / R+W).
48
- GET /api/files/thumbnail - Serves cache-only thumbnail images for authorized files; returns 404 while cache is not ready.48
- GET /api/files/thumbnail - Serves cache-only thumbnail images for authorized files; returns 404 while cache is not ready.
49
- GET /api/files/folder-images - Returns images inside a directory (recursive) that already have a cached thumbnail; only thumbnailed images are included per user requirement.49
- GET /api/files/folder-images - Returns images inside a directory (recursive) that already have a cached thumbnail; only thumbnailed images are included per user requirement.
50
- GET /api/files/folder-icon - Returns the current icon source file for a folder ({icon:{filePath}} or {icon:null}); explicit assignment takes priority over auto-first.50
- GET /api/files/folder-icon - Returns the current icon source file for a folder ({icon:{filePath}} or {icon:null}); explicit assignment takes priority over auto-first.
51
- POST /api/files/folder-icon - Sets or clears a folder's explicit icon assignment; imagePath must have a cached thumbnail; write access required.51
- POST /api/files/folder-icon - Sets or clears a folder's explicit icon assignment; imagePath must have a cached thumbnail; write access required.
52
- makeTempUploadPath(dir, originalName) - Builds a hidden per-upload staging filename in the target directory for multipart uploads.52
- GET /api/files/download-zip?dir=<absolute-path> - Authenticated. Streams the directory as a zip archive; caches the zip for up to 1 day in zip-cache/.
53
- unlinkIfExists(targetPath, cb) - Removes a file during upload cleanup while ignoring already-missing temp files.53
- makeTempUploadPath(dir, originalName) - Builds a hidden per-upload staging filename in the target directory for multipart uploads.
54
- promoteUploadedFile(tempPath, finalPath, cb) - Atomically renames a completed staged upload into place on the Linux server.54
- unlinkIfExists(targetPath, cb) - Removes a file during upload cleanup while ignoring already-missing temp files.
55
- splitNameExt(name) - Splits a filename into stem/ext, preserving dotless names and hidden-file behavior.55
- promoteUploadedFile(tempPath, finalPath, cb) - Atomically renames a completed staged upload into place on the Linux server.
56
- pickNumberedPath(dir, requestedName) - Finds the first free `name (n).ext` path inside a directory.56
- splitNameExt(name) - Splits a filename into stem/ext, preserving dotless names and hidden-file behavior.
57
- removePathRecursive(targetPath) - Deletes existing file or directory destination to support overwrite moves.57
- pickNumberedPath(dir, requestedName) - Finds the first free `name (n).ext` path inside a directory.
58
- POST /api/files/upload - Streams multipart uploads into hidden temp files, cleans them up on abort, and only exposes final filenames after completion.58
- removePathRecursive(targetPath) - Deletes existing file or directory destination to support overwrite moves.
59
- POST /api/files/move - Moves file/folder; supports conflict strategies: `error` (default), `overwrite`, or `rename` with optional `targetName`.59
- POST /api/files/upload - Streams multipart uploads into hidden temp files, cleans them up on abort, and only exposes final filenames after completion.
60
60
- POST /api/files/move - Moves file/folder; supports conflict strategies: `error` (default), `overwrite`, or `rename` with optional `targetName`.
61
## public/app.js61
62
- showApp() - Reveals app shell; keeps sidebar folded by default on mobile and shows folder overview sidebar on desktop.62
## server/routes/share.js
63
- getOrCreateClientBindingId() - Creates/loads a persistent local browser binding id used in auth fingerprint derivation.63
- POST /api/share/create - Authenticated. Creates a 24-hour share token for a file or directory; returns {token, expiresAt}.
64
- getFingerprint() - Builds a stable fingerprint from binding id + stable browser properties (not viewport metrics) to avoid false session invalidation on UI/window-state changes.64
- GET /api/share/info/:token - Public. Returns {name, isDir, expiresAt} for a valid non-expired token; 410 when expired, 404 when unknown.
65
- saveSessionState() - Persists token, selected path, and last operation timestamp in localStorage.65
- GET /api/share/preview/:token - Public. Streams file content inline for preview (files only, max 50 MB); 400 for directories, 410 expired.
66
- loadSessionState() - Restores persisted state only when the last operation is within the 1-hour local idle window.66
- GET /api/share/download/:token - Public. Downloads the file or a zip of the directory for a valid token; 410 expired.
67
- api(method, path, body, opts) - Central API caller; refreshes local session timestamp on successful authenticated calls.67
- buildZip(dirPath, cacheKey) - Creates (or returns cached) zip in zip-cache/; prunes stale zips before building; exported for reuse in files.js.
68
- performLogout() - Explicit logout path that revokes server session and clears local session state.68
- pruneZipCache() - Deletes zip files in zip-cache/ older than 1 day; called automatically before each zip build.
69
- initAuth() - Restores prior session when valid and auto-logins without credential prompt.69
- ZIP_CACHE_DIR - Absolute path to the zip-cache/ directory (project root).
70
- showConfirm(title, message) - In-page confirm dialog; returns Promise<boolean>. Use instead of window.confirm().70
71
- showPrompt(title, message, defaultValue) - In-page text-input dialog; returns Promise<string|null>. Use instead of window.prompt().71
## server/db.js
72
- showOverwrite(filename) - In-page overwrite-decision dialog for file conflicts; returns Promise<'yes'|'no'|'all'|'none'>.72
- initDb() - Initializes SQLite schema for users, file metadata, auth_sessions, and share_tokens (expires_at index).
73
- splitNameExt(name) - Client-side filename splitter used for local conflict rename suggestions.73
- getDb() - Returns singleton DB handle with WAL and foreign key pragmas.
74
- nextAvailableName(requestedName, existingNames) - Computes `name (n).ext` for upload/move rename options.74
- closeDb() - Closes singleton DB handle to release file locks.
75
- listDirNameSet(dir) - Fetches directory listing and returns a Set of existing names.75
76
- cloneFileWithName(file, newName) - Creates a renamed File object for non-overwrite uploads.76
## public/share.html
77
- showFileConflictChoice(filename, renameTo, mode) - Dialog for single upload/move conflicts; returns overwrite/rename/cancel.77
- Standalone public share page served at /share/:token; no auth required.
78
- loadThumbnails() - Registers visible file icons for lazy thumbnail loading (both file thumbnails and folder icons); retries missing cache thumbnails during incremental refresh.78
- Timer bar - Live HH:MM:SS countdown showing remaining validity; turns red and disables download when expired.
79
- loadOneThumbnail(iconEl) - Loads thumbnails from server cache endpoint for images, text snapshots for text files, and badges for other files; marks image icons as pending when cache returns 404 and uses direct source SVG thumbnails for SVG files under 1MB.79
- tryPreview(name, isDir) - Renders inline preview (img/video/audio/text pre); no-op for unsupported types or directories.
80
- observeFolderIcon(iconEl) - Registers a folder icon element with IntersectionObserver for lazy loading.80
- Fetches /api/share/info/:token on load; shows error state for 404/410 responses.
81
- loadOneFolderIcon(iconEl) - Fetches /api/files/folder-icon then the thumbnail blob and overlays it inside the folder SVG; no-op if no icon available.81
- Download link points to /api/share/download/:token; labelled "Download als .zip" for directories.
82
- applyFolderThumbnail(iconEl, srcUrl) - Injects an SVG <image> element clipped to the folder outline path into the folder's icon SVG.82
83
- openFolderIconPicker(item) - Opens the folder icon picker modal; shows cached-thumbnail images from the folder; allows selection, clearing, and cancellation.83
## public/app.js
84
- refreshAfterIconChange(item) - Resets and reloads the folder icon in both the grid tile and sidebar after set/clear operations.84
- showApp() - Reveals app shell; keeps sidebar folded by default on mobile and shows folder overview sidebar on desktop.
85
- disconnectFolderIconObserver() - Disconnects and clears the folder icon IntersectionObserver on grid rebuild.85
- getOrCreateClientBindingId() - Creates/loads a persistent local browser binding id used in auth fingerprint derivation.
86
- getThumbnailKind(name) - Classifies files into image/text/badge thumbnail strategies.86
- getFingerprint() - Builds a stable fingerprint from binding id + stable browser properties (not viewport metrics) to avoid false session invalidation on UI/window-state changes.
87
- observeThumbnailIcon(iconEl) - Defers thumbnail fetch work until file icons are near/in the viewport.87
- saveSessionState() - Persists token, selected path, and last operation timestamp in localStorage.
88
- disconnectThumbnailObserver() - Clears active IntersectionObserver when the grid is rebuilt.88
- loadSessionState() - Restores persisted state only when the last operation is within the 1-hour local idle window.
89
- setThumbnailPending(iconEl, pending) - Toggles per-icon pending spinner state while a cached image thumbnail is not ready yet.89
- api(method, path, body, opts) - Central API caller; refreshes local session timestamp on successful authenticated calls.
90
- buildThumbnailSource(item, blob, kind) - Produces thumbnail image source (data/blob URL) for icon injection.90
- performLogout() - Explicit logout path that revokes server session and clears local session state.
91
91
- initAuth() - Restores prior session when valid and auto-logins without credential prompt.
92
## tests/thumbnail-cache.test.js92
- showConfirm(title, message) - In-page confirm dialog; returns Promise<boolean>. Use instead of window.confirm().
93
- thumbnail cache worker / creates cached thumbnail with dimensions smaller than 100px - Verifies cached image generation and manifest write.93
- showPrompt(title, message, defaultValue) - In-page text-input dialog; returns Promise<string|null>. Use instead of window.prompt().
94
- thumbnail cache worker / removes cached thumbnail when source file is deleted - Verifies stale thumbnail cleanup behavior.94
- showOverwrite(filename) - In-page overwrite-decision dialog for file conflicts; returns Promise<'yes'|'no'|'all'|'none'>.
95
- afterEach() cleanup - Removes temp roots with `fs.rmSync(...maxRetries...)` to tolerate transient Windows file locks.95
- splitNameExt(name) - Client-side filename splitter used for local conflict rename suggestions.
96
- detectCodeLanguage(name, mime) - Determines preview language for text/script files by MIME and extension.96
- nextAvailableName(requestedName, existingNames) - Computes `name (n).ext` for upload/move rename options.
97
- prettyPrintCode(raw, lang) - Best-effort formatter for JSON/markup/script previews before rendering.97
- listDirNameSet(dir) - Fetches directory listing and returns a Set of existing names.
98
- highlightCode(raw, lang) - Escapes and syntax-highlights preview text into HTML spans.98
- cloneFileWithName(file, newName) - Creates a renamed File object for non-overwrite uploads.
99
- fileAccentColor(name) - Returns canonical file-type accent color used by icon strokes and preview sheet outline.99
- showFileConflictChoice(filename, renameTo, mode) - Dialog for single upload/move conflicts; returns overwrite/rename/cancel.
100
- openFolderSidebar() - Persistent sidebar fallback view that shows current folder/root overview when no item is selected.100
- openShareModal(item) - Opens the Delen (share) popup, calls POST /api/share/create, shows the 24-hour URL with a copy button and OK to dismiss.
101
- closeSidebar() - Clears selection; hides the panel entirely on mobile and restores folder overview sidebar on desktop.101
- loadThumbnails() - Registers visible file icons for lazy thumbnail loading (both file thumbnails and folder icons); retries missing cache thumbnails during incremental refresh.
102
- isMobileViewport() - Central media-query helper for mobile-only sidebar/interaction behavior.102
- loadOneThumbnail(iconEl) - Loads thumbnails from server cache endpoint for images, text snapshots for text files, and badges for other files; marks image icons as pending when cache returns 404 and uses direct source SVG thumbnails for SVG files under 1MB.
103
- hideSidebarPanel() - Hides sidebar panel and removes sidebar-open layout class from the app shell.103
- observeFolderIcon(iconEl) - Registers a folder icon element with IntersectionObserver for lazy loading.
104
- renderBreadcrumb() - Builds clickable breadcrumb path and marks each folder segment as a drag-drop move target via .crumb-drop-target and data-path.104
- loadOneFolderIcon(iconEl) - Fetches /api/files/folder-icon then the thumbnail blob and overlays it inside the folder SVG; no-op if no icon available.
105
- fetchFileBlob(item) - Downloads a file as Blob with auth headers for preview/download flows.105
- applyFolderThumbnail(iconEl, srcUrl) - Injects an SVG <image> element clipped to the folder outline path into the folder's icon SVG.
106
- downloadOrView(item, sourceSvgEl) - Opens preview; prefers in-place expanded tile preview when invoked from a file icon, falls back to overlay when no source tile is available.106
- openFolderIconPicker(item) - Opens the folder icon picker modal; shows cached-thumbnail images from the folder; allows selection, clearing, and cancellation.
107
- downloadOrView(item, sourceSvgEl) - Opens in-place expanded tile preview from a file icon; shows error toast if no source tile is found.107
- refreshAfterIconChange(item) - Resets and reloads the folder icon in both the grid tile and sidebar after set/clear operations.
108
- renderPreviewBody(item, blob, objectUrl, targetEl) - Renders preview content (image/video/audio/pdf/text) or unsupported message into a target container.108
- disconnectFolderIconObserver() - Disconnects and clears the folder icon IntersectionObserver on grid rebuild.
109
- animateRect(el, fromRect, toRect, opts) - Helper that animates element rectangle (left/top/width/height) for expand/collapse transitions.109
- getThumbnailKind(name) - Classifies files into image/text/badge thumbnail strategies.
110
- openExpandedTilePreview(item, tileEl, sourceSvgEl, blob, objectUrl) - Reparents the real file tile to body, expands it to viewport preview, injects close/download controls.110
- observeThumbnailIcon(iconEl) - Defers thumbnail fetch work until file icons are near/in the viewport.
111
- openExpandedTilePreview(item, tileEl, sourceSvgEl, blob, objectUrl) - Reparents tile to body, shows spinner during expand animation, renders content after animation; applies file-type accent colour to tile border and outline glow.111
- disconnectThumbnailObserver() - Clears active IntersectionObserver when the grid is rebuilt.
112
- closeExpandedTilePreview() - Collapses expanded tile preview back to original grid position and restores original icon markup.112
- setThumbnailPending(iconEl, pending) - Toggles per-icon pending spinner state while a cached image thumbnail is not ready yet.
113
- closePreview() - Closes either expanded-tile preview or overlay preview, then revokes active preview object URL.113
- buildThumbnailSource(item, blob, kind) - Produces thumbnail image source (data/blob URL) for icon injection.
114
- closePreview() - Closes expanded-tile preview and revokes active preview object URL.114
115
- openMovePicker(item) - Opens Move To selector modal with expandable folder tree across all writable roots and executes /api/files/move.115
## tests/thumbnail-cache.test.js
116
- moveWithConflictResolution(item, targetDir) - Attempts move and handles 409 conflicts by prompting overwrite/rename/cancel then retries.116
- thumbnail cache worker / creates cached thumbnail with dimensions smaller than 100px - Verifies cached image generation and manifest write.
117
- rootPermissionLabel(root) - Resolves permission key for a root using originalName when available (alias-safe permission checks).117
- thumbnail cache worker / removes cached thumbnail when source file is deleted - Verifies stale thumbnail cleanup behavior.
118
- ensureMoveModal() - Lazily creates and wires Move To modal UI (tree, selection state, confirm/cancel handlers).118
- afterEach() cleanup - Removes temp roots with `fs.rmSync(...maxRetries...)` to tolerate transient Windows file locks.
119
- createMoveNode(folderPath, label) - Builds an expandable/selectable folder node for the Move To tree.119
- detectCodeLanguage(name, mime) - Determines preview language for text/script files by MIME and extension.
120
- loadMoveChildren(containerEl, dirPath) - Lazy-loads subfolders for a tree node via /api/files/list.120
- prettyPrintCode(raw, lang) - Best-effort formatter for JSON/markup/script previews before rendering.
121
- isInlinePreviewableBlob(blob, name) - Determines if a blob can be previewed inline by MIME/extension.121
- highlightCode(raw, lang) - Escapes and syntax-highlights preview text into HTML spans.
122
- makeFileItem(item) - Builds a .file-item element; roots in Home now use folder-like interaction (single-click focus, double-click open), roots are non-draggable, and mobile long-press contextmenu suppression remains.122
- fileAccentColor(name) - Returns canonical file-type accent color used by icon strokes and preview sheet outline.
123
- attachMobileLongPress(el, item) - Adds mobile long-press detection on file/folder tiles to open the item sidebar without desktop side effects.123
- openFolderSidebar() - Persistent sidebar fallback view that shows current folder/root overview when no item is selected.
124
- openSidebar(item) - Renders item details/actions in sidebar; roots show alias + original name + usage stats, hide Move To/Delete, keep Rename.124
- closeSidebar() - Clears selection; hides the panel entirely on mobile and restores folder overview sidebar on desktop.
125
- fetchRootAccessList(rootPath) - Fetches root access users from the server for a specific configured root.125
- isMobileViewport() - Central media-query helper for mobile-only sidebar/interaction behavior.
126
- formatRootAccessList(users) - Formats root access entries as "username mode" values for sidebar rendering.126
- hideSidebarPanel() - Hides sidebar panel and removes sidebar-open layout class from the app shell.
127
- openSidebar(item) - Renders item details/actions in sidebar; root selections include alias/original name/usage/access list and keep Rename while hiding Move To/Delete.127
- renderBreadcrumb() - Builds clickable breadcrumb path and marks each folder segment as a drag-drop move target via .crumb-drop-target and data-path.
128
- openFolderSidebar() - Shows current folder details when nothing is selected; when at root base-level it also shows root access list.128
- fetchFileBlob(item) - Downloads a file as Blob with auth headers for preview/download flows.
129
- openRenameModal(item) - Renames files/folders; for roots this writes display alias via /api/files/root-alias and reloads roots.129
- downloadOrView(item, sourceSvgEl) - Opens preview; prefers in-place expanded tile preview when invoked from a file icon, falls back to overlay when no source tile is available.
130
- uploadFiles(fileList) - Uploads files one-by-one with per-file conflict prompt (overwrite/rename/cancel) when names already exist.130
- downloadOrView(item, sourceSvgEl) - Opens in-place expanded tile preview from a file icon; shows error toast if no source tile is found.
131
- openUserModal(user, paths) - Admin user editor; enforces UI permission rule that Write is disabled/unchecked while Read is unchecked.131
- renderPreviewBody(item, blob, objectUrl, targetEl) - Renders preview content (image/video/audio/pdf/text) or unsupported message into a target container.
132
132
- animateRect(el, fromRect, toRect, opts) - Helper that animates element rectangle (left/top/width/height) for expand/collapse transitions.
133
## public/drag-move.js133
- openExpandedTilePreview(item, tileEl, sourceSvgEl, blob, objectUrl) - Reparents the real file tile to body, expands it to viewport preview, injects close/download controls.
134
- makeDraggable(el, item) - Attaches pointerdown to a .file-item; starts drag after threshold movement. Depends on: api(), canWrite(), navigateTo(), STATE, closeSidebar(), toast() from app.js.134
- openExpandedTilePreview(item, tileEl, sourceSvgEl, blob, objectUrl) - Reparents tile to body, shows spinner during expand animation, renders content after animation; applies file-type accent colour to tile border and outline glow.
135
- makeDraggable(el, item) - Touch drag now requires a short hold before movement, uses pointer capture, and keeps drag responsive on mobile.135
- closeExpandedTilePreview() - Collapses expanded tile preview back to original grid position and restores original icon markup.
136
- (internal) _beginDrag(e, el, item) - Lifts and re-parents the real .file-item to body, inserts hidden placeholder, and shows parent-folder drag target when applicable.136
- closePreview() - Closes either expanded-tile preview or overlay preview, then revokes active preview object URL.
137
- (internal) _moveDrag(e) - Moves the real dragged item, hit-tests folder tiles, breadcrumb segments, and parent-folder target, toggles target highlight state.137
- closePreview() - Closes expanded-tile preview and revokes active preview object URL.
138
- (internal) _endDrag() - On valid target: runs drop animation, calls moveWithConflictResolution() for overwrite/rename/cancel conflicts, then refreshes dir. Otherwise snap-back.138
- openMovePicker(item) - Opens Move To selector modal with expandable folder tree across all writable roots and executes /api/files/move.
139
- (internal) _cleanupDrag(reinsert) - Restores tile styles; reinserts into grid on failure/abort or removes before refresh on success, hides drag helper targets.139
- moveWithConflictResolution(item, targetDir) - Attempts move and handles 409 conflicts by prompting overwrite/rename/cancel then retries.
140
140
- rootPermissionLabel(root) - Resolves permission key for a root using originalName when available (alias-safe permission checks).
141
## public/drag-move.css141
- ensureMoveModal() - Lazily creates and wires Move To modal UI (tree, selection state, confirm/cancel handlers).
142
- .file-item.dragging - Lifted style for real dragged tile.142
- createMoveNode(folderPath, label) - Builds an expandable/selectable folder node for the Move To tree.
143
- .file-item.drop-target - Glows folder icon when drag hovers over it.143
- loadMoveChildren(containerEl, dirPath) - Lazy-loads subfolders for a tree node via /api/files/list.
144
- .drag-parent-target - Temporary top-left "move to parent" drop target shown while dragging in nested folders.144
- isInlinePreviewableBlob(blob, name) - Determines if a blob can be previewed inline by MIME/extension.
145
- .crumb-drop-target.active - Highlight style for breadcrumb drop destinations during drag.145
- makeFileItem(item) - Builds a .file-item element; roots in Home now use folder-like interaction (single-click focus, double-click open), roots are non-draggable, and mobile long-press contextmenu suppression remains.
146
- @keyframes drag-rise-spin-fall - Real tile rises, spins, falls/scales into folder on drop.146
- attachMobileLongPress(el, item) - Adds mobile long-press detection on file/folder tiles to open the item sidebar without desktop side effects.
147
- @keyframes folder-bounce - Target folder bounces down then back on accept.147
- openSidebar(item) - Renders item details/actions in sidebar; roots show alias + original name + usage stats, hide Move To/Delete, keep Rename.
148
- .preview-backdrop/.file-item--preview/.preview-expand-* - In-place expanded tile preview styling (no separate overlay window), including preserved icon-outline layer.148
- fetchRootAccessList(rootPath) - Fetches root access users from the server for a specific configured root.
149
- .move-modal/.move-tree/.move-node* - Move To tree picker styles with expandable/collapsible folder hierarchy.149
- formatRootAccessList(users) - Formats root access entries as "username mode" values for sidebar rendering.
150
150
- openSidebar(item) - Renders item details/actions in sidebar; root selections include alias/original name/usage/access list and keep Rename while hiding Move To/Delete.
151
## tests/auth.routes.test.js151
- openFolderSidebar() - Shows current folder details when nothing is selected; when at root base-level it also shows root access list.
152
- session lifecycle / POST /api/auth/logout revokes active session - Verifies explicit logout invalidates token immediately.152
- openRenameModal(item) - Renames files/folders; for roots this writes display alias via /api/files/root-alias and reloads roots.
153
- session lifecycle / session expires after 1 hour of inactivity - Verifies server-side idle timeout enforcement.153
- uploadFiles(fileList) - Uploads files one-by-one with per-file conflict prompt (overwrite/rename/cancel) when names already exist.
154
154
- openUserModal(user, paths) - Admin user editor; enforces UI permission rule that Write is disabled/unchecked while Read is unchecked.
155
## tests/page.load.test.js155
156
- bootClient() - Boots the app in jsdom and waits until app shell is visible or timeout before assertions.156
## public/drag-move.js
157
- waitFor(dom, predicate, timeoutMs) - Poll helper used by interaction tests to wait for rendered tiles.157
- makeDraggable(el, item) - Attaches pointerdown to a .file-item; starts drag after threshold movement. Depends on: api(), canWrite(), navigateTo(), STATE, closeSidebar(), toast() from app.js.
158
- makeDraggable(el, item) - Touch drag now requires a short hold before movement, uses pointer capture, and keeps drag responsive on mobile.
159
- (internal) _beginDrag(e, el, item) - Lifts and re-parents the real .file-item to body, inserts hidden placeholder, and shows parent-folder drag target when applicable.
160
- (internal) _moveDrag(e) - Moves the real dragged item, hit-tests folder tiles, breadcrumb segments, and parent-folder target, toggles target highlight state.
161
- (internal) _endDrag() - On valid target: runs drop animation, calls moveWithConflictResolution() for overwrite/rename/cancel conflicts, then refreshes dir. Otherwise snap-back.
162
- (internal) _cleanupDrag(reinsert) - Restores tile styles; reinserts into grid on failure/abort or removes before refresh on success, hides drag helper targets.
163
164
## public/drag-move.css
165
- .file-item.dragging - Lifted style for real dragged tile.
166
- .file-item.drop-target - Glows folder icon when drag hovers over it.
167
- .drag-parent-target - Temporary top-left "move to parent" drop target shown while dragging in nested folders.
168
- .crumb-drop-target.active - Highlight style for breadcrumb drop destinations during drag.
169
- @keyframes drag-rise-spin-fall - Real tile rises, spins, falls/scales into folder on drop.
170
- @keyframes folder-bounce - Target folder bounces down then back on accept.
171
- .preview-backdrop/.file-item--preview/.preview-expand-* - In-place expanded tile preview styling (no separate overlay window), including preserved icon-outline layer.
172
- .move-modal/.move-tree/.move-node* - Move To tree picker styles with expandable/collapsible folder hierarchy.
173
174
## tests/auth.routes.test.js
175
- session lifecycle / POST /api/auth/logout revokes active session - Verifies explicit logout invalidates token immediately.
176
- session lifecycle / session expires after 1 hour of inactivity - Verifies server-side idle timeout enforcement.
177
178
## tests/page.load.test.js
179
- bootClient() - Boots the app in jsdom and waits until app shell is visible or timeout before assertions.
180
- waitFor(dom, predicate, timeoutMs) - Poll helper used by interaction tests to wait for rendered tiles.
@@ -43,6 +43,7 @@
43
43
- `GET /api/files/thumbnail`
44
44
- `GET /api/files/root-access`
45
45
- `folder icon endpoints`
46
- `GET /api/files/download-zip`
46
47
47
48
---
48
49
@@ -51,6 +52,15 @@
51
52
52
53
---
53
54
55
## `test/share.routes.test.js`
56
- `POST /api/share/create`
57
- `GET /api/share/info/:token`
58
- `GET /api/share/preview/:token`
59
- `GET /api/share/download/:token`
60
- `pruneZipCache`
61
62
---
63
54
64
## `test/thumbnail-cache.test.js`
55
65
- `thumbnail cache worker`
56
66
@@ -43,6 +43,7 @@43
- `GET /api/files/thumbnail`43
- `GET /api/files/thumbnail`44
- `GET /api/files/root-access`44
- `GET /api/files/root-access`45
- `folder icon endpoints`45
- `folder icon endpoints`46
- `GET /api/files/download-zip`46
47
47
---48
---48
49
@@ -51,6 +52,15 @@51
52
52
---53
---53
54
55
## `test/share.routes.test.js`56
- `POST /api/share/create`57
- `GET /api/share/info/:token`58
- `GET /api/share/preview/:token`59
- `GET /api/share/download/:token`60
- `pruneZipCache`61
62
---63
54
## `test/thumbnail-cache.test.js`64
## `test/thumbnail-cache.test.js`55
- `thumbnail cache worker`65
- `thumbnail cache worker`56
66
@@ -8,6 +8,7 @@
8
8
"name": "filemanager",
9
9
"version": "1.0.0",
10
10
"dependencies": {
11
"archiver": "^7.0.1",
11
12
"bcrypt": "^5.1.1",
12
13
"express": "^4.18.2",
13
14
"geoip-lite": "^1.4.10",
@@ -1159,6 +1160,102 @@
1159
1160
"url": "https://opencollective.com/libvips"
1160
1161
}
1161
1162
},
1163
"node_modules/@isaacs/cliui": {
1164
"version": "8.0.2",
1165
"resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
1166
"integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==",
1167
"license": "ISC",
1168
"dependencies": {
1169
"string-width": "^5.1.2",
1170
"string-width-cjs": "npm:string-width@^4.2.0",
1171
"strip-ansi": "^7.0.1",
1172
"strip-ansi-cjs": "npm:strip-ansi@^6.0.1",
1173
"wrap-ansi": "^8.1.0",
1174
"wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"
1175
},
1176
"engines": {
1177
"node": ">=12"
1178
}
1179
},
1180
"node_modules/@isaacs/cliui/node_modules/ansi-regex": {
1181
"version": "6.2.2",
1182
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz",
1183
"integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==",
1184
"license": "MIT",
1185
"engines": {
1186
"node": ">=12"
1187
},
1188
"funding": {
1189
"url": "https://github.com/chalk/ansi-regex?sponsor=1"
1190
}
1191
},
1192
"node_modules/@isaacs/cliui/node_modules/ansi-styles": {
1193
"version": "6.2.3",
1194
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz",
1195
"integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==",
1196
"license": "MIT",
1197
"engines": {
1198
"node": ">=12"
1199
},
1200
"funding": {
1201
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
1202
}
1203
},
1204
"node_modules/@isaacs/cliui/node_modules/emoji-regex": {
1205
"version": "9.2.2",
1206
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
1207
"integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
1208
"license": "MIT"
1209
},
1210
"node_modules/@isaacs/cliui/node_modules/string-width": {
1211
"version": "5.1.2",
1212
"resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
1213
"integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
1214
"license": "MIT",
1215
"dependencies": {
1216
"eastasianwidth": "^0.2.0",
1217
"emoji-regex": "^9.2.2",
1218
"strip-ansi": "^7.0.1"
1219
},
1220
"engines": {
1221
"node": ">=12"
1222
},
1223
"funding": {
1224
"url": "https://github.com/sponsors/sindresorhus"
1225
}
1226
},
1227
"node_modules/@isaacs/cliui/node_modules/strip-ansi": {
1228
"version": "7.2.0",
1229
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz",
1230
"integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==",
1231
"license": "MIT",
1232
"dependencies": {
1233
"ansi-regex": "^6.2.2"
1234
},
1235
"engines": {
1236
"node": ">=12"
1237
},
1238
"funding": {
1239
"url": "https://github.com/chalk/strip-ansi?sponsor=1"
1240
}
1241
},
1242
"node_modules/@isaacs/cliui/node_modules/wrap-ansi": {
1243
"version": "8.1.0",
1244
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
1245
"integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
1246
"license": "MIT",
1247
"dependencies": {
1248
"ansi-styles": "^6.1.0",
1249
"string-width": "^5.0.1",
1250
"strip-ansi": "^7.0.1"
1251
},
1252
"engines": {
1253
"node": ">=12"
1254
},
1255
"funding": {
1256
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
1257
}
1258
},
1162
1259
"node_modules/@istanbuljs/load-nyc-config": {
1163
1260
"version": "1.1.0",
1164
1261
"resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",
@@ -1773,6 +1870,16 @@
1773
1870
"node-pre-gyp": "bin/node-pre-gyp"
1774
1871
}
1775
1872
},
1873
"node_modules/@pkgjs/parseargs": {
1874
"version": "0.11.0",
1875
"resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
1876
"integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==",
1877
"license": "MIT",
1878
"optional": true,
1879
"engines": {
1880
"node": ">=14"
1881
}
1882
},
1776
1883
"node_modules/@sinclair/typebox": {
1777
1884
"version": "0.27.10",
1778
1885
"resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.10.tgz",
@@ -1944,6 +2051,18 @@
1944
2051
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
1945
2052
"license": "ISC"
1946
2053
},
2054
"node_modules/abort-controller": {
2055
"version": "3.0.0",
2056
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
2057
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
2058
"license": "MIT",
2059
"dependencies": {
2060
"event-target-shim": "^5.0.0"
2061
},
2062
"engines": {
2063
"node": ">=6.5"
2064
}
2065
},
1947
2066
"node_modules/accepts": {
1948
2067
"version": "1.3.8",
1949
2068
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
@@ -2093,6 +2212,161 @@
2093
2212
"integrity": "sha512-tLIEcj5GuR2RSTnxNKdkK0dJ/GrC7P38sUkiDmDuHfsHmbagTFAxDVIBltoklXEVIQ/f14IL8IMJ5pn9Hez1Ew==",
2094
2213
"license": "ISC"
2095
2214
},
2215
"node_modules/archiver": {
2216
"version": "7.0.1",
2217
"resolved": "https://registry.npmjs.org/archiver/-/archiver-7.0.1.tgz",
2218
"integrity": "sha512-ZcbTaIqJOfCc03QwD468Unz/5Ir8ATtvAHsK+FdXbDIbGfihqh9mrvdcYunQzqn4HrvWWaFyaxJhGZagaJJpPQ==",
2219
"license": "MIT",
2220
"dependencies": {
2221
"archiver-utils": "^5.0.2",
2222
"async": "^3.2.4",
2223
"buffer-crc32": "^1.0.0",
2224
"readable-stream": "^4.0.0",
2225
"readdir-glob": "^1.1.2",
2226
"tar-stream": "^3.0.0",
2227
"zip-stream": "^6.0.1"
2228
},
2229
"engines": {
2230
"node": ">= 14"
2231
}
2232
},
2233
"node_modules/archiver-utils": {
2234
"version": "5.0.2",
2235
"resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-5.0.2.tgz",
2236
"integrity": "sha512-wuLJMmIBQYCsGZgYLTy5FIB2pF6Lfb6cXMSF8Qywwk3t20zWnAi7zLcQFdKQmIB8wyZpY5ER38x08GbwtR2cLA==",
2237
"license": "MIT",
2238
"dependencies": {
2239
"glob": "^10.0.0",
2240
"graceful-fs": "^4.2.0",
2241
"is-stream": "^2.0.1",
2242
"lazystream": "^1.0.0",
2243
"lodash": "^4.17.15",
2244
"normalize-path": "^3.0.0",
2245
"readable-stream": "^4.0.0"
2246
},
2247
"engines": {
2248
"node": ">= 14"
2249
}
2250
},
2251
"node_modules/archiver-utils/node_modules/brace-expansion": {
2252
"version": "2.1.0",
2253
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz",
2254
"integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==",
2255
"license": "MIT",
2256
"dependencies": {
2257
"balanced-match": "^1.0.0"
2258
}
2259
},
2260
"node_modules/archiver-utils/node_modules/glob": {
2261
"version": "10.5.0",
2262
"resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz",
2263
"integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==",
2264
"deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me",
2265
"license": "ISC",
2266
"dependencies": {
2267
"foreground-child": "^3.1.0",
2268
"jackspeak": "^3.1.2",
2269
"minimatch": "^9.0.4",
2270
"minipass": "^7.1.2",
2271
"package-json-from-dist": "^1.0.0",
2272
"path-scurry": "^1.11.1"
2273
},
2274
"bin": {
2275
"glob": "dist/esm/bin.mjs"
2276
},
2277
"funding": {
2278
"url": "https://github.com/sponsors/isaacs"
2279
}
2280
},
2281
"node_modules/archiver-utils/node_modules/minimatch": {
2282
"version": "9.0.9",
2283
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz",
2284
"integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==",
2285
"license": "ISC",
2286
"dependencies": {
2287
"brace-expansion": "^2.0.2"
2288
},
2289
"engines": {
2290
"node": ">=16 || 14 >=14.17"
2291
},
2292
"funding": {
2293
"url": "https://github.com/sponsors/isaacs"
2294
}
2295
},
2296
"node_modules/archiver-utils/node_modules/minipass": {
2297
"version": "7.1.3",
2298
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz",
2299
"integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==",
2300
"license": "BlueOak-1.0.0",
2301
"engines": {
2302
"node": ">=16 || 14 >=14.17"
2303
}
2304
},
2305
"node_modules/archiver-utils/node_modules/readable-stream": {
2306
"version": "4.7.0",
2307
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz",
2308
"integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==",
2309
"license": "MIT",
2310
"dependencies": {
2311
"abort-controller": "^3.0.0",
2312
"buffer": "^6.0.3",
2313
"events": "^3.3.0",
2314
"process": "^0.11.10",
2315
"string_decoder": "^1.3.0"
2316
},
2317
"engines": {
2318
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
2319
}
2320
},
2321
"node_modules/archiver-utils/node_modules/string_decoder": {
2322
"version": "1.3.0",
2323
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
2324
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
2325
"license": "MIT",
2326
"dependencies": {
2327
"safe-buffer": "~5.2.0"
2328
}
2329
},
2330
"node_modules/archiver/node_modules/async": {
2331
"version": "3.2.6",
2332
"resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz",
2333
"integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==",
2334
"license": "MIT"
2335
},
2336
"node_modules/archiver/node_modules/buffer-crc32": {
2337
"version": "1.0.0",
2338
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-1.0.0.tgz",
2339
"integrity": "sha512-Db1SbgBS/fg/392AblrMJk97KggmvYhr4pB5ZIMTWtaivCPMWLkmb7m21cJvpvgK+J3nsU2CmmixNBZx4vFj/w==",
2340
"license": "MIT",
2341
"engines": {
2342
"node": ">=8.0.0"
2343
}
2344
},
2345
"node_modules/archiver/node_modules/readable-stream": {
2346
"version": "4.7.0",
2347
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz",
2348
"integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==",
2349
"license": "MIT",
2350
"dependencies": {
2351
"abort-controller": "^3.0.0",
2352
"buffer": "^6.0.3",
2353
"events": "^3.3.0",
2354
"process": "^0.11.10",
2355
"string_decoder": "^1.3.0"
2356
},
2357
"engines": {
2358
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
2359
}
2360
},
2361
"node_modules/archiver/node_modules/string_decoder": {
2362
"version": "1.3.0",
2363
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
2364
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
2365
"license": "MIT",
2366
"dependencies": {
2367
"safe-buffer": "~5.2.0"
2368
}
2369
},
2096
2370
"node_modules/are-we-there-yet": {
2097
2371
"version": "2.0.0",
2098
2372
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz",
@@ -2158,6 +2432,20 @@
2158
2432
"dev": true,
2159
2433
"license": "MIT"
2160
2434
},
2435
"node_modules/b4a": {
2436
"version": "1.8.1",
2437
"resolved": "https://registry.npmjs.org/b4a/-/b4a-1.8.1.tgz",
2438
"integrity": "sha512-aiqre1Nr0B/6DgE2N5vwTc+2/oQZ4Wh1t4NznYY4E00y8LCt6NqdRv81so00oo27D8MVKTpUa/MwUUtBLXCoDw==",
2439
"license": "Apache-2.0",
2440
"peerDependencies": {
2441
"react-native-b4a": "*"
2442
},
2443
"peerDependenciesMeta": {
2444
"react-native-b4a": {
2445
"optional": true
2446
}
2447
}
2448
},
2161
2449
"node_modules/babel-jest": {
2162
2450
"version": "29.7.0",
2163
2451
"resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz",
@@ -2283,6 +2571,117 @@
2283
2571
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
2284
2572
"license": "MIT"
2285
2573
},
2574
"node_modules/bare-events": {
2575
"version": "2.8.2",
2576
"resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.8.2.tgz",
2577
"integrity": "sha512-riJjyv1/mHLIPX4RwiK+oW9/4c3TEUeORHKefKAKnZ5kyslbN+HXowtbaVEqt4IMUB7OXlfixcs6gsFeo/jhiQ==",
2578
"license": "Apache-2.0",
2579
"peerDependencies": {
2580
"bare-abort-controller": "*"
2581
},
2582
"peerDependenciesMeta": {
2583
"bare-abort-controller": {
2584
"optional": true
2585
}
2586
}
2587
},
2588
"node_modules/bare-fs": {
2589
"version": "4.7.1",
2590
"resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.7.1.tgz",
2591
"integrity": "sha512-WDRsyVN52eAx/lBamKD6uyw8H4228h/x0sGGGegOamM2cd7Pag88GfMQalobXI+HaEUxpCkbKQUDOQqt9wawRw==",
2592
"license": "Apache-2.0",
2593
"dependencies": {
2594
"bare-events": "^2.5.4",
2595
"bare-path": "^3.0.0",
2596
"bare-stream": "^2.6.4",
2597
"bare-url": "^2.2.2",
2598
"fast-fifo": "^1.3.2"
2599
},
2600
"engines": {
2601
"bare": ">=1.16.0"
2602
},
2603
"peerDependencies": {
2604
"bare-buffer": "*"
2605
},
2606
"peerDependenciesMeta": {
2607
"bare-buffer": {
2608
"optional": true
2609
}
2610
}
2611
},
2612
"node_modules/bare-os": {
2613
"version": "3.9.1",
2614
"resolved": "https://registry.npmjs.org/bare-os/-/bare-os-3.9.1.tgz",
2615
"integrity": "sha512-6M5XjcnsygQNPMCMPXSK379xrJFiZ/AEMNBmFEmQW8d/789VQATvriyi5r0HYTL9TkQ26rn3kgdTG3aisbrXkQ==",
2616
"license": "Apache-2.0",
2617
"engines": {
2618
"bare": ">=1.14.0"
2619
}
2620
},
2621
"node_modules/bare-path": {
2622
"version": "3.0.0",
2623
"resolved": "https://registry.npmjs.org/bare-path/-/bare-path-3.0.0.tgz",
2624
"integrity": "sha512-tyfW2cQcB5NN8Saijrhqn0Zh7AnFNsnczRcuWODH0eYAXBsJ5gVxAUuNr7tsHSC6IZ77cA0SitzT+s47kot8Mw==",
2625
"license": "Apache-2.0",
2626
"dependencies": {
2627
"bare-os": "^3.0.1"
2628
}
2629
},
2630
"node_modules/bare-stream": {
2631
"version": "2.13.1",
2632
"resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.13.1.tgz",
2633
"integrity": "sha512-Vp0cnjYyrEC4whYTymQ+YZi6pBpfiICZO3cfRG8sy67ZNWe951urv1x4eW1BKNngw3U+3fPYb5JQvHbCtxH7Ow==",
2634
"license": "Apache-2.0",
2635
"dependencies": {
2636
"streamx": "^2.25.0",
2637
"teex": "^1.0.1"
2638
},
2639
"peerDependencies": {
2640
"bare-abort-controller": "*",
2641
"bare-buffer": "*",
2642
"bare-events": "*"
2643
},
2644
"peerDependenciesMeta": {
2645
"bare-abort-controller": {
2646
"optional": true
2647
},
2648
"bare-buffer": {
2649
"optional": true
2650
},
2651
"bare-events": {
2652
"optional": true
2653
}
2654
}
2655
},
2656
"node_modules/bare-url": {
2657
"version": "2.4.3",
2658
"resolved": "https://registry.npmjs.org/bare-url/-/bare-url-2.4.3.tgz",
2659
"integrity": "sha512-Kccpc7ACfXaxfeInfqKcZtW4pT5YBn1mesc4sCsun6sRwtbJ4h+sNOaksUpYEJUKfN65YWC6Bw2OJEFiKxq8nQ==",
2660
"license": "Apache-2.0",
2661
"dependencies": {
2662
"bare-path": "^3.0.0"
2663
}
2664
},
2665
"node_modules/base64-js": {
2666
"version": "1.5.1",
2667
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
2668
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
2669
"funding": [
2670
{
2671
"type": "github",
2672
"url": "https://github.com/sponsors/feross"
2673
},
2674
{
2675
"type": "patreon",
2676
"url": "https://www.patreon.com/feross"
2677
},
2678
{
2679
"type": "consulting",
2680
"url": "https://feross.org/support"
2681
}
2682
],
2683
"license": "MIT"
2684
},
2286
2685
"node_modules/baseline-browser-mapping": {
2287
2686
"version": "2.10.27",
2288
2687
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.27.tgz",
@@ -2412,6 +2811,30 @@
2412
2811
"node-int64": "^0.4.0"
2413
2812
}
2414
2813
},
2814
"node_modules/buffer": {
2815
"version": "6.0.3",
2816
"resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
2817
"integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
2818
"funding": [
2819
{
2820
"type": "github",
2821
"url": "https://github.com/sponsors/feross"
2822
},
2823
{
2824
"type": "patreon",
2825
"url": "https://www.patreon.com/feross"
2826
},
2827
{
2828
"type": "consulting",
2829
"url": "https://feross.org/support"
2830
}
2831
],
2832
"license": "MIT",
2833
"dependencies": {
2834
"base64-js": "^1.3.1",
2835
"ieee754": "^1.2.1"
2836
}
2837
},
2415
2838
"node_modules/buffer-crc32": {
2416
2839
"version": "0.2.13",
2417
2840
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
@@ -2645,6 +3068,47 @@
2645
3068
"node": ">= 0.8"
2646
3069
}
2647
3070
},
3071
"node_modules/compress-commons": {
3072
"version": "6.0.2",
3073
"resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-6.0.2.tgz",
3074
"integrity": "sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg==",
3075
"license": "MIT",
3076
"dependencies": {
3077
"crc-32": "^1.2.0",
3078
"crc32-stream": "^6.0.0",
3079
"is-stream": "^2.0.1",
3080
"normalize-path": "^3.0.0",
3081
"readable-stream": "^4.0.0"
3082
},
3083
"engines": {
3084
"node": ">= 14"
3085
}
3086
},
3087
"node_modules/compress-commons/node_modules/readable-stream": {
3088
"version": "4.7.0",
3089
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz",
3090
"integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==",
3091
"license": "MIT",
3092
"dependencies": {
3093
"abort-controller": "^3.0.0",
3094
"buffer": "^6.0.3",
3095
"events": "^3.3.0",
3096
"process": "^0.11.10",
3097
"string_decoder": "^1.3.0"
3098
},
3099
"engines": {
3100
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
3101
}
3102
},
3103
"node_modules/compress-commons/node_modules/string_decoder": {
3104
"version": "1.3.0",
3105
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
3106
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
3107
"license": "MIT",
3108
"dependencies": {
3109
"safe-buffer": "~5.2.0"
3110
}
3111
},
2648
3112
"node_modules/concat-map": {
2649
3113
"version": "0.0.1",
2650
3114
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
@@ -2720,6 +3184,56 @@
2720
3184
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
2721
3185
"license": "MIT"
2722
3186
},
3187
"node_modules/crc-32": {
3188
"version": "1.2.2",
3189
"resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz",
3190
"integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==",
3191
"license": "Apache-2.0",
3192
"bin": {
3193
"crc32": "bin/crc32.njs"
3194
},
3195
"engines": {
3196
"node": ">=0.8"
3197
}
3198
},
3199
"node_modules/crc32-stream": {
3200
"version": "6.0.0",
3201
"resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-6.0.0.tgz",
3202
"integrity": "sha512-piICUB6ei4IlTv1+653yq5+KoqfBYmj9bw6LqXoOneTMDXk5nM1qt12mFW1caG3LlJXEKW1Bp0WggEmIfQB34g==",
3203
"license": "MIT",
3204
"dependencies": {
3205
"crc-32": "^1.2.0",
3206
"readable-stream": "^4.0.0"
3207
},
3208
"engines": {
3209
"node": ">= 14"
3210
}
3211
},
3212
"node_modules/crc32-stream/node_modules/readable-stream": {
3213
"version": "4.7.0",
3214
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz",
3215
"integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==",
3216
"license": "MIT",
3217
"dependencies": {
3218
"abort-controller": "^3.0.0",
3219
"buffer": "^6.0.3",
3220
"events": "^3.3.0",
3221
"process": "^0.11.10",
3222
"string_decoder": "^1.3.0"
3223
},
3224
"engines": {
3225
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
3226
}
3227
},
3228
"node_modules/crc32-stream/node_modules/string_decoder": {
3229
"version": "1.3.0",
3230
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
3231
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
3232
"license": "MIT",
3233
"dependencies": {
3234
"safe-buffer": "~5.2.0"
3235
}
3236
},
2723
3237
"node_modules/create-jest": {
2724
3238
"version": "29.7.0",
2725
3239
"resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz",
@@ -2973,6 +3487,12 @@
2973
3487
"node": ">= 0.4"
2974
3488
}
2975
3489
},
3490
"node_modules/eastasianwidth": {
3491
"version": "0.2.0",
3492
"resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
3493
"integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
3494
"license": "MIT"
3495
},
2976
3496
"node_modules/ecdsa-sig-formatter": {
2977
3497
"version": "1.0.11",
2978
3498
"resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
@@ -3177,6 +3697,33 @@
3177
3697
"node": ">= 0.6"
3178
3698
}
3179
3699
},
3700
"node_modules/event-target-shim": {
3701
"version": "5.0.1",
3702
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
3703
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
3704
"license": "MIT",
3705
"engines": {
3706
"node": ">=6"
3707
}
3708
},
3709
"node_modules/events": {
3710
"version": "3.3.0",
3711
"resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
3712
"integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
3713
"license": "MIT",
3714
"engines": {
3715
"node": ">=0.8.x"
3716
}
3717
},
3718
"node_modules/events-universal": {
3719
"version": "1.0.1",
3720
"resolved": "https://registry.npmjs.org/events-universal/-/events-universal-1.0.1.tgz",
3721
"integrity": "sha512-LUd5euvbMLpwOF8m6ivPCbhQeSiYVNb8Vs0fQ8QjXo0JTkEHpz8pxdQf0gStltaPpw0Cca8b39KxvK9cfKRiAw==",
3722
"license": "Apache-2.0",
3723
"dependencies": {
3724
"bare-events": "^2.7.0"
3725
}
3726
},
3180
3727
"node_modules/execa": {
3181
3728
"version": "5.1.1",
3182
3729
"resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
@@ -3270,6 +3817,12 @@
3270
3817
"url": "https://opencollective.com/express"
3271
3818
}
3272
3819
},
3820
"node_modules/fast-fifo": {
3821
"version": "1.3.2",
3822
"resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz",
3823
"integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==",
3824
"license": "MIT"
3825
},
3273
3826
"node_modules/fast-json-stable-stringify": {
3274
3827
"version": "2.1.0",
3275
3828
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
@@ -3337,6 +3890,34 @@
3337
3890
"node": ">=8"
3338
3891
}
3339
3892
},
3893
"node_modules/foreground-child": {
3894
"version": "3.3.1",
3895
"resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz",
3896
"integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==",
3897
"license": "ISC",
3898
"dependencies": {
3899
"cross-spawn": "^7.0.6",
3900
"signal-exit": "^4.0.1"
3901
},
3902
"engines": {
3903
"node": ">=14"
3904
},
3905
"funding": {
3906
"url": "https://github.com/sponsors/isaacs"
3907
}
3908
},
3909
"node_modules/foreground-child/node_modules/signal-exit": {
3910
"version": "4.1.0",
3911
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
3912
"integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
3913
"license": "ISC",
3914
"engines": {
3915
"node": ">=14"
3916
},
3917
"funding": {
3918
"url": "https://github.com/sponsors/isaacs"
3919
}
3920
},
3340
3921
"node_modules/form-data": {
3341
3922
"version": "4.0.5",
3342
3923
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz",
@@ -3789,6 +4370,26 @@
3789
4370
"node": ">=0.10.0"
3790
4371
}
3791
4372
},
4373
"node_modules/ieee754": {
4374
"version": "1.2.1",
4375
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
4376
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
4377
"funding": [
4378
{
4379
"type": "github",
4380
"url": "https://github.com/sponsors/feross"
4381
},
4382
{
4383
"type": "patreon",
4384
"url": "https://www.patreon.com/feross"
4385
},
4386
{
4387
"type": "consulting",
4388
"url": "https://feross.org/support"
4389
}
4390
],
4391
"license": "BSD-3-Clause"
4392
},
3792
4393
"node_modules/import-local": {
3793
4394
"version": "3.2.0",
3794
4395
"resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz",
@@ -4040,6 +4641,21 @@
4040
4641
"node": ">=8"
4041
4642
}
4042
4643
},
4644
"node_modules/jackspeak": {
4645
"version": "3.4.3",
4646
"resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz",
4647
"integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==",
4648
"license": "BlueOak-1.0.0",
4649
"dependencies": {
4650
"@isaacs/cliui": "^8.0.2"
4651
},
4652
"funding": {
4653
"url": "https://github.com/sponsors/isaacs"
4654
},
4655
"optionalDependencies": {
4656
"@pkgjs/parseargs": "^0.11.0"
4657
}
4658
},
4043
4659
"node_modules/jest": {
4044
4660
"version": "29.7.0",
4045
4661
"resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz",
@@ -5271,6 +5887,18 @@
5271
5887
"node": ">=0.2.0"
5272
5888
}
5273
5889
},
5890
"node_modules/lazystream": {
5891
"version": "1.0.1",
5892
"resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz",
5893
"integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==",
5894
"license": "MIT",
5895
"dependencies": {
5896
"readable-stream": "^2.0.5"
5897
},
5898
"engines": {
5899
"node": ">= 0.6.3"
5900
}
5901
},
5274
5902
"node_modules/leven": {
5275
5903
"version": "3.1.0",
5276
5904
"resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz",
@@ -5806,6 +6434,12 @@
5806
6434
"node": ">=6"
5807
6435
}
5808
6436
},
6437
"node_modules/package-json-from-dist": {
6438
"version": "1.0.1",
6439
"resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz",
6440
"integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",
6441
"license": "BlueOak-1.0.0"
6442
},
5809
6443
"node_modules/parse-json": {
5810
6444
"version": "5.2.0",
5811
6445
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
@@ -5879,6 +6513,28 @@
5879
6513
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
5880
6514
"license": "MIT"
5881
6515
},
6516
"node_modules/path-scurry": {
6517
"version": "1.11.1",
6518
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz",
6519
"integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==",
6520
"license": "BlueOak-1.0.0",
6521
"dependencies": {
6522
"lru-cache": "^10.2.0",
6523
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
6524
},
6525
"engines": {
6526
"node": ">=16 || 14 >=14.18"
6527
},
6528
"funding": {
6529
"url": "https://github.com/sponsors/isaacs"
6530
}
6531
},
6532
"node_modules/path-scurry/node_modules/lru-cache": {
6533
"version": "10.4.3",
6534
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz",
6535
"integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==",
6536
"license": "ISC"
6537
},
5882
6538
"node_modules/path-to-regexp": {
5883
6539
"version": "0.1.13",
5884
6540
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.13.tgz",
@@ -5956,6 +6612,15 @@
5956
6612
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
5957
6613
}
5958
6614
},
6615
"node_modules/process": {
6616
"version": "0.11.10",
6617
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
6618
"integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==",
6619
"license": "MIT",
6620
"engines": {
6621
"node": ">= 0.6.0"
6622
}
6623
},
5959
6624
"node_modules/process-nextick-args": {
5960
6625
"version": "2.0.1",
5961
6626
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
@@ -6100,6 +6765,36 @@
6100
6765
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
6101
6766
"license": "MIT"
6102
6767
},
6768
"node_modules/readdir-glob": {
6769
"version": "1.1.3",
6770
"resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.3.tgz",
6771
"integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==",
6772
"license": "Apache-2.0",
6773
"dependencies": {
6774
"minimatch": "^5.1.0"
6775
}
6776
},
6777
"node_modules/readdir-glob/node_modules/brace-expansion": {
6778
"version": "2.1.0",
6779
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz",
6780
"integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==",
6781
"license": "MIT",
6782
"dependencies": {
6783
"balanced-match": "^1.0.0"
6784
}
6785
},
6786
"node_modules/readdir-glob/node_modules/minimatch": {
6787
"version": "5.1.9",
6788
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz",
6789
"integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==",
6790
"license": "ISC",
6791
"dependencies": {
6792
"brace-expansion": "^2.0.1"
6793
},
6794
"engines": {
6795
"node": ">=10"
6796
}
6797
},
6103
6798
"node_modules/require-directory": {
6104
6799
"version": "2.1.1",
6105
6800
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
@@ -6510,6 +7205,17 @@
6510
7205
"node": ">=10.0.0"
6511
7206
}
6512
7207
},
7208
"node_modules/streamx": {
7209
"version": "2.25.0",
7210
"resolved": "https://registry.npmjs.org/streamx/-/streamx-2.25.0.tgz",
7211
"integrity": "sha512-0nQuG6jf1w+wddNEEXCF4nTg3LtufWINB5eFEN+5TNZW7KWJp6x87+JFL43vaAUPyCfH1wID+mNVyW6OHtFamg==",
7212
"license": "MIT",
7213
"dependencies": {
7214
"events-universal": "^1.0.0",
7215
"fast-fifo": "^1.3.2",
7216
"text-decoder": "^1.1.0"
7217
}
7218
},
6513
7219
"node_modules/string_decoder": {
6514
7220
"version": "1.1.1",
6515
7221
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
@@ -6552,6 +7258,21 @@
6552
7258
"node": ">=8"
6553
7259
}
6554
7260
},
7261
"node_modules/string-width-cjs": {
7262
"name": "string-width",
7263
"version": "4.2.3",
7264
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
7265
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
7266
"license": "MIT",
7267
"dependencies": {
7268
"emoji-regex": "^8.0.0",
7269
"is-fullwidth-code-point": "^3.0.0",
7270
"strip-ansi": "^6.0.1"
7271
},
7272
"engines": {
7273
"node": ">=8"
7274
}
7275
},
6555
7276
"node_modules/strip-ansi": {
6556
7277
"version": "6.0.1",
6557
7278
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
@@ -6564,6 +7285,19 @@
6564
7285
"node": ">=8"
6565
7286
}
6566
7287
},
7288
"node_modules/strip-ansi-cjs": {
7289
"name": "strip-ansi",
7290
"version": "6.0.1",
7291
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
7292
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
7293
"license": "MIT",
7294
"dependencies": {
7295
"ansi-regex": "^5.0.1"
7296
},
7297
"engines": {
7298
"node": ">=8"
7299
}
7300
},
6567
7301
"node_modules/strip-bom": {
6568
7302
"version": "4.0.0",
6569
7303
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz",
@@ -6643,6 +7377,18 @@
6643
7377
"node": ">=10"
6644
7378
}
6645
7379
},
7380
"node_modules/tar-stream": {
7381
"version": "3.2.0",
7382
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.2.0.tgz",
7383
"integrity": "sha512-ojzvCvVaNp6aOTFmG7jaRD0meowIAuPc3cMMhSgKiVWws1GyHbGd/xvnyuRKcKlMpt3qvxx6r0hreCNITP9hIg==",
7384
"license": "MIT",
7385
"dependencies": {
7386
"b4a": "^1.6.4",
7387
"bare-fs": "^4.5.5",
7388
"fast-fifo": "^1.2.0",
7389
"streamx": "^2.15.0"
7390
}
7391
},
6646
7392
"node_modules/tar/node_modules/mkdirp": {
6647
7393
"version": "1.0.4",
6648
7394
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
@@ -6661,6 +7407,15 @@
6661
7407
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
6662
7408
"license": "ISC"
6663
7409
},
7410
"node_modules/teex": {
7411
"version": "1.0.1",
7412
"resolved": "https://registry.npmjs.org/teex/-/teex-1.0.1.tgz",
7413
"integrity": "sha512-eYE6iEI62Ni1H8oIa7KlDU6uQBtqr4Eajni3wX7rpfXD8ysFx8z0+dri+KWEPWpBsxXfxu58x/0jvTVT1ekOSg==",
7414
"license": "MIT",
7415
"dependencies": {
7416
"streamx": "^2.12.5"
7417
}
7418
},
6664
7419
"node_modules/test-exclude": {
6665
7420
"version": "6.0.0",
6666
7421
"resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz",
@@ -6675,6 +7430,15 @@
6675
7430
"node": ">=8"
6676
7431
}
6677
7432
},
7433
"node_modules/text-decoder": {
7434
"version": "1.2.7",
7435
"resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.7.tgz",
7436
"integrity": "sha512-vlLytXkeP4xvEq2otHeJfSQIRyWxo/oZGEbXrtEEF9Hnmrdly59sUbzZ/QgyWuLYHctCHxFF4tRQZNQ9k60ExQ==",
7437
"license": "Apache-2.0",
7438
"dependencies": {
7439
"b4a": "^1.6.4"
7440
}
7441
},
6678
7442
"node_modules/tldts": {
6679
7443
"version": "6.1.86",
6680
7444
"resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.86.tgz",
@@ -7025,6 +7789,24 @@
7025
7789
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
7026
7790
}
7027
7791
},
7792
"node_modules/wrap-ansi-cjs": {
7793
"name": "wrap-ansi",
7794
"version": "7.0.0",
7795
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
7796
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
7797
"license": "MIT",
7798
"dependencies": {
7799
"ansi-styles": "^4.0.0",
7800
"string-width": "^4.1.0",
7801
"strip-ansi": "^6.0.0"
7802
},
7803
"engines": {
7804
"node": ">=10"
7805
},
7806
"funding": {
7807
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
7808
}
7809
},
7028
7810
"node_modules/wrappy": {
7029
7811
"version": "1.0.2",
7030
7812
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
@@ -7155,6 +7937,45 @@
7155
7937
"funding": {
7156
7938
"url": "https://github.com/sponsors/sindresorhus"
7157
7939
}
7940
},
7941
"node_modules/zip-stream": {
7942
"version": "6.0.1",
7943
"resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-6.0.1.tgz",
7944
"integrity": "sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==",
7945
"license": "MIT",
7946
"dependencies": {
7947
"archiver-utils": "^5.0.0",
7948
"compress-commons": "^6.0.2",
7949
"readable-stream": "^4.0.0"
7950
},
7951
"engines": {
7952
"node": ">= 14"
7953
}
7954
},
7955
"node_modules/zip-stream/node_modules/readable-stream": {
7956
"version": "4.7.0",
7957
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz",
7958
"integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==",
7959
"license": "MIT",
7960
"dependencies": {
7961
"abort-controller": "^3.0.0",
7962
"buffer": "^6.0.3",
7963
"events": "^3.3.0",
7964
"process": "^0.11.10",
7965
"string_decoder": "^1.3.0"
7966
},
7967
"engines": {
7968
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
7969
}
7970
},
7971
"node_modules/zip-stream/node_modules/string_decoder": {
7972
"version": "1.3.0",
7973
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
7974
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
7975
"license": "MIT",
7976
"dependencies": {
7977
"safe-buffer": "~5.2.0"
7978
}
7158
7979
}
7159
7980
}
7160
7981
}
@@ -8,6 +8,7 @@8
"name": "filemanager",8
"name": "filemanager",9
"version": "1.0.0",9
"version": "1.0.0",10
"dependencies": {10
"dependencies": {11
"archiver": "^7.0.1",11
"bcrypt": "^5.1.1",12
"bcrypt": "^5.1.1",12
"express": "^4.18.2",13
"express": "^4.18.2",13
"geoip-lite": "^1.4.10",14
"geoip-lite": "^1.4.10",@@ -1159,6 +1160,102 @@1159
"url": "https://opencollective.com/libvips"1160
"url": "https://opencollective.com/libvips"1160
}1161
}1161
},1162
},1163
"node_modules/@isaacs/cliui": {1164
"version": "8.0.2",1165
"resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",1166
"integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==",1167
"license": "ISC",1168
"dependencies": {1169
"string-width": "^5.1.2",1170
"string-width-cjs": "npm:string-width@^4.2.0",1171
"strip-ansi": "^7.0.1",1172
"strip-ansi-cjs": "npm:strip-ansi@^6.0.1",1173
"wrap-ansi": "^8.1.0",1174
"wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"1175
},1176
"engines": {1177
"node": ">=12"1178
}1179
},1180
"node_modules/@isaacs/cliui/node_modules/ansi-regex": {1181
"version": "6.2.2",1182
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz",1183
"integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==",1184
"license": "MIT",1185
"engines": {1186
"node": ">=12"1187
},1188
"funding": {1189
"url": "https://github.com/chalk/ansi-regex?sponsor=1"1190
}1191
},1192
"node_modules/@isaacs/cliui/node_modules/ansi-styles": {1193
"version": "6.2.3",1194
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz",1195
"integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==",1196
"license": "MIT",1197
"engines": {1198
"node": ">=12"1199
},1200
"funding": {1201
"url": "https://github.com/chalk/ansi-styles?sponsor=1"1202
}1203
},1204
"node_modules/@isaacs/cliui/node_modules/emoji-regex": {1205
"version": "9.2.2",1206
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",1207
"integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",1208
"license": "MIT"1209
},1210
"node_modules/@isaacs/cliui/node_modules/string-width": {1211
"version": "5.1.2",1212
"resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",1213
"integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",1214
"license": "MIT",1215
"dependencies": {1216
"eastasianwidth": "^0.2.0",1217
"emoji-regex": "^9.2.2",1218
"strip-ansi": "^7.0.1"1219
},1220
"engines": {1221
"node": ">=12"1222
},1223
"funding": {1224
"url": "https://github.com/sponsors/sindresorhus"1225
}1226
},1227
"node_modules/@isaacs/cliui/node_modules/strip-ansi": {1228
"version": "7.2.0",1229
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz",1230
"integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==",1231
"license": "MIT",1232
"dependencies": {1233
"ansi-regex": "^6.2.2"1234
},1235
"engines": {1236
"node": ">=12"1237
},1238
"funding": {1239
"url": "https://github.com/chalk/strip-ansi?sponsor=1"1240
}1241
},1242
"node_modules/@isaacs/cliui/node_modules/wrap-ansi": {1243
"version": "8.1.0",1244
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",1245
"integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",1246
"license": "MIT",1247
"dependencies": {1248
"ansi-styles": "^6.1.0",1249
"string-width": "^5.0.1",1250
"strip-ansi": "^7.0.1"1251
},1252
"engines": {1253
"node": ">=12"1254
},1255
"funding": {1256
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"1257
}1258
},1162
"node_modules/@istanbuljs/load-nyc-config": {1259
"node_modules/@istanbuljs/load-nyc-config": {1163
"version": "1.1.0",1260
"version": "1.1.0",1164
"resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",1261
"resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",@@ -1773,6 +1870,16 @@1773
"node-pre-gyp": "bin/node-pre-gyp"1870
"node-pre-gyp": "bin/node-pre-gyp"1774
}1871
}1775
},1872
},1873
"node_modules/@pkgjs/parseargs": {1874
"version": "0.11.0",1875
"resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",1876
"integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==",1877
"license": "MIT",1878
"optional": true,1879
"engines": {1880
"node": ">=14"1881
}1882
},1776
"node_modules/@sinclair/typebox": {1883
"node_modules/@sinclair/typebox": {1777
"version": "0.27.10",1884
"version": "0.27.10",1778
"resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.10.tgz",1885
"resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.10.tgz",@@ -1944,6 +2051,18 @@1944
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",2051
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",1945
"license": "ISC"2052
"license": "ISC"1946
},2053
},2054
"node_modules/abort-controller": {2055
"version": "3.0.0",2056
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",2057
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",2058
"license": "MIT",2059
"dependencies": {2060
"event-target-shim": "^5.0.0"2061
},2062
"engines": {2063
"node": ">=6.5"2064
}2065
},1947
"node_modules/accepts": {2066
"node_modules/accepts": {1948
"version": "1.3.8",2067
"version": "1.3.8",1949
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",2068
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",@@ -2093,6 +2212,161 @@2093
"integrity": "sha512-tLIEcj5GuR2RSTnxNKdkK0dJ/GrC7P38sUkiDmDuHfsHmbagTFAxDVIBltoklXEVIQ/f14IL8IMJ5pn9Hez1Ew==",2212
"integrity": "sha512-tLIEcj5GuR2RSTnxNKdkK0dJ/GrC7P38sUkiDmDuHfsHmbagTFAxDVIBltoklXEVIQ/f14IL8IMJ5pn9Hez1Ew==",2094
"license": "ISC"2213
"license": "ISC"2095
},2214
},2215
"node_modules/archiver": {2216
"version": "7.0.1",2217
"resolved": "https://registry.npmjs.org/archiver/-/archiver-7.0.1.tgz",2218
"integrity": "sha512-ZcbTaIqJOfCc03QwD468Unz/5Ir8ATtvAHsK+FdXbDIbGfihqh9mrvdcYunQzqn4HrvWWaFyaxJhGZagaJJpPQ==",2219
"license": "MIT",2220
"dependencies": {2221
"archiver-utils": "^5.0.2",2222
"async": "^3.2.4",2223
"buffer-crc32": "^1.0.0",2224
"readable-stream": "^4.0.0",2225
"readdir-glob": "^1.1.2",2226
"tar-stream": "^3.0.0",2227
"zip-stream": "^6.0.1"2228
},2229
"engines": {2230
"node": ">= 14"2231
}2232
},2233
"node_modules/archiver-utils": {2234
"version": "5.0.2",2235
"resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-5.0.2.tgz",2236
"integrity": "sha512-wuLJMmIBQYCsGZgYLTy5FIB2pF6Lfb6cXMSF8Qywwk3t20zWnAi7zLcQFdKQmIB8wyZpY5ER38x08GbwtR2cLA==",2237
"license": "MIT",2238
"dependencies": {2239
"glob": "^10.0.0",2240
"graceful-fs": "^4.2.0",2241
"is-stream": "^2.0.1",2242
"lazystream": "^1.0.0",2243
"lodash": "^4.17.15",2244
"normalize-path": "^3.0.0",2245
"readable-stream": "^4.0.0"2246
},2247
"engines": {2248
"node": ">= 14"2249
}2250
},2251
"node_modules/archiver-utils/node_modules/brace-expansion": {2252
"version": "2.1.0",2253
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz",2254
"integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==",2255
"license": "MIT",2256
"dependencies": {2257
"balanced-match": "^1.0.0"2258
}2259
},2260
"node_modules/archiver-utils/node_modules/glob": {2261
"version": "10.5.0",2262
"resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz",2263
"integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==",2264
"deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me",2265
"license": "ISC",2266
"dependencies": {2267
"foreground-child": "^3.1.0",2268
"jackspeak": "^3.1.2",2269
"minimatch": "^9.0.4",2270
"minipass": "^7.1.2",2271
"package-json-from-dist": "^1.0.0",2272
"path-scurry": "^1.11.1"2273
},2274
"bin": {2275
"glob": "dist/esm/bin.mjs"2276
},2277
"funding": {2278
"url": "https://github.com/sponsors/isaacs"2279
}2280
},2281
"node_modules/archiver-utils/node_modules/minimatch": {2282
"version": "9.0.9",2283
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz",2284
"integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==",2285
"license": "ISC",2286
"dependencies": {2287
"brace-expansion": "^2.0.2"2288
},2289
"engines": {2290
"node": ">=16 || 14 >=14.17"2291
},2292
"funding": {2293
"url": "https://github.com/sponsors/isaacs"2294
}2295
},2296
"node_modules/archiver-utils/node_modules/minipass": {2297
"version": "7.1.3",2298
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz",2299
"integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==",2300
"license": "BlueOak-1.0.0",2301
"engines": {2302
"node": ">=16 || 14 >=14.17"2303
}2304
},2305
"node_modules/archiver-utils/node_modules/readable-stream": {2306
"version": "4.7.0",2307
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz",2308
"integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==",2309
"license": "MIT",2310
"dependencies": {2311
"abort-controller": "^3.0.0",2312
"buffer": "^6.0.3",2313
"events": "^3.3.0",2314
"process": "^0.11.10",2315
"string_decoder": "^1.3.0"2316
},2317
"engines": {2318
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"2319
}2320
},2321
"node_modules/archiver-utils/node_modules/string_decoder": {2322
"version": "1.3.0",2323
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",2324
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",2325
"license": "MIT",2326
"dependencies": {2327
"safe-buffer": "~5.2.0"2328
}2329
},2330
"node_modules/archiver/node_modules/async": {2331
"version": "3.2.6",2332
"resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz",2333
"integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==",2334
"license": "MIT"2335
},2336
"node_modules/archiver/node_modules/buffer-crc32": {2337
"version": "1.0.0",2338
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-1.0.0.tgz",2339
"integrity": "sha512-Db1SbgBS/fg/392AblrMJk97KggmvYhr4pB5ZIMTWtaivCPMWLkmb7m21cJvpvgK+J3nsU2CmmixNBZx4vFj/w==",2340
"license": "MIT",2341
"engines": {2342
"node": ">=8.0.0"2343
}2344
},2345
"node_modules/archiver/node_modules/readable-stream": {2346
"version": "4.7.0",2347
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz",2348
"integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==",2349
"license": "MIT",2350
"dependencies": {2351
"abort-controller": "^3.0.0",2352
"buffer": "^6.0.3",2353
"events": "^3.3.0",2354
"process": "^0.11.10",2355
"string_decoder": "^1.3.0"2356
},2357
"engines": {2358
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"2359
}2360
},2361
"node_modules/archiver/node_modules/string_decoder": {2362
"version": "1.3.0",2363
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",2364
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",2365
"license": "MIT",2366
"dependencies": {2367
"safe-buffer": "~5.2.0"2368
}2369
},2096
"node_modules/are-we-there-yet": {2370
"node_modules/are-we-there-yet": {2097
"version": "2.0.0",2371
"version": "2.0.0",2098
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz",2372
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz",@@ -2158,6 +2432,20 @@2158
"dev": true,2432
"dev": true,2159
"license": "MIT"2433
"license": "MIT"2160
},2434
},2435
"node_modules/b4a": {2436
"version": "1.8.1",2437
"resolved": "https://registry.npmjs.org/b4a/-/b4a-1.8.1.tgz",2438
"integrity": "sha512-aiqre1Nr0B/6DgE2N5vwTc+2/oQZ4Wh1t4NznYY4E00y8LCt6NqdRv81so00oo27D8MVKTpUa/MwUUtBLXCoDw==",2439
"license": "Apache-2.0",2440
"peerDependencies": {2441
"react-native-b4a": "*"2442
},2443
"peerDependenciesMeta": {2444
"react-native-b4a": {2445
"optional": true2446
}2447
}2448
},2161
"node_modules/babel-jest": {2449
"node_modules/babel-jest": {2162
"version": "29.7.0",2450
"version": "29.7.0",2163
"resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz",2451
"resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz",@@ -2283,6 +2571,117 @@2283
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",2571
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",2284
"license": "MIT"2572
"license": "MIT"2285
},2573
},2574
"node_modules/bare-events": {2575
"version": "2.8.2",2576
"resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.8.2.tgz",2577
"integrity": "sha512-riJjyv1/mHLIPX4RwiK+oW9/4c3TEUeORHKefKAKnZ5kyslbN+HXowtbaVEqt4IMUB7OXlfixcs6gsFeo/jhiQ==",2578
"license": "Apache-2.0",2579
"peerDependencies": {2580
"bare-abort-controller": "*"2581
},2582
"peerDependenciesMeta": {2583
"bare-abort-controller": {2584
"optional": true2585
}2586
}2587
},2588
"node_modules/bare-fs": {2589
"version": "4.7.1",2590
"resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.7.1.tgz",2591
"integrity": "sha512-WDRsyVN52eAx/lBamKD6uyw8H4228h/x0sGGGegOamM2cd7Pag88GfMQalobXI+HaEUxpCkbKQUDOQqt9wawRw==",2592
"license": "Apache-2.0",2593
"dependencies": {2594
"bare-events": "^2.5.4",2595
"bare-path": "^3.0.0",2596
"bare-stream": "^2.6.4",2597
"bare-url": "^2.2.2",2598
"fast-fifo": "^1.3.2"2599
},2600
"engines": {2601
"bare": ">=1.16.0"2602
},2603
"peerDependencies": {2604
"bare-buffer": "*"2605
},2606
"peerDependenciesMeta": {2607
"bare-buffer": {2608
"optional": true2609
}2610
}2611
},2612
"node_modules/bare-os": {2613
"version": "3.9.1",2614
"resolved": "https://registry.npmjs.org/bare-os/-/bare-os-3.9.1.tgz",2615
"integrity": "sha512-6M5XjcnsygQNPMCMPXSK379xrJFiZ/AEMNBmFEmQW8d/789VQATvriyi5r0HYTL9TkQ26rn3kgdTG3aisbrXkQ==",2616
"license": "Apache-2.0",2617
"engines": {2618
"bare": ">=1.14.0"2619
}2620
},2621
"node_modules/bare-path": {2622
"version": "3.0.0",2623
"resolved": "https://registry.npmjs.org/bare-path/-/bare-path-3.0.0.tgz",2624
"integrity": "sha512-tyfW2cQcB5NN8Saijrhqn0Zh7AnFNsnczRcuWODH0eYAXBsJ5gVxAUuNr7tsHSC6IZ77cA0SitzT+s47kot8Mw==",2625
"license": "Apache-2.0",2626
"dependencies": {2627
"bare-os": "^3.0.1"2628
}2629
},2630
"node_modules/bare-stream": {2631
"version": "2.13.1",2632
"resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.13.1.tgz",2633
"integrity": "sha512-Vp0cnjYyrEC4whYTymQ+YZi6pBpfiICZO3cfRG8sy67ZNWe951urv1x4eW1BKNngw3U+3fPYb5JQvHbCtxH7Ow==",2634
"license": "Apache-2.0",2635
"dependencies": {2636
"streamx": "^2.25.0",2637
"teex": "^1.0.1"2638
},2639
"peerDependencies": {2640
"bare-abort-controller": "*",2641
"bare-buffer": "*",2642
"bare-events": "*"2643
},2644
"peerDependenciesMeta": {2645
"bare-abort-controller": {2646
"optional": true2647
},2648
"bare-buffer": {2649
"optional": true2650
},2651
"bare-events": {2652
"optional": true2653
}2654
}2655
},2656
"node_modules/bare-url": {2657
"version": "2.4.3",2658
"resolved": "https://registry.npmjs.org/bare-url/-/bare-url-2.4.3.tgz",2659
"integrity": "sha512-Kccpc7ACfXaxfeInfqKcZtW4pT5YBn1mesc4sCsun6sRwtbJ4h+sNOaksUpYEJUKfN65YWC6Bw2OJEFiKxq8nQ==",2660
"license": "Apache-2.0",2661
"dependencies": {2662
"bare-path": "^3.0.0"2663
}2664
},2665
"node_modules/base64-js": {2666
"version": "1.5.1",2667
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",2668
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",2669
"funding": [2670
{2671
"type": "github",2672
"url": "https://github.com/sponsors/feross"2673
},2674
{2675
"type": "patreon",2676
"url": "https://www.patreon.com/feross"2677
},2678
{2679
"type": "consulting",2680
"url": "https://feross.org/support"2681
}2682
],2683
"license": "MIT"2684
},2286
"node_modules/baseline-browser-mapping": {2685
"node_modules/baseline-browser-mapping": {2287
"version": "2.10.27",2686
"version": "2.10.27",2288
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.27.tgz",2687
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.27.tgz",@@ -2412,6 +2811,30 @@2412
"node-int64": "^0.4.0"2811
"node-int64": "^0.4.0"2413
}2812
}2414
},2813
},2814
"node_modules/buffer": {2815
"version": "6.0.3",2816
"resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",2817
"integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",2818
"funding": [2819
{2820
"type": "github",2821
"url": "https://github.com/sponsors/feross"2822
},2823
{2824
"type": "patreon",2825
"url": "https://www.patreon.com/feross"2826
},2827
{2828
"type": "consulting",2829
"url": "https://feross.org/support"2830
}2831
],2832
"license": "MIT",2833
"dependencies": {2834
"base64-js": "^1.3.1",2835
"ieee754": "^1.2.1"2836
}2837
},2415
"node_modules/buffer-crc32": {2838
"node_modules/buffer-crc32": {2416
"version": "0.2.13",2839
"version": "0.2.13",2417
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",2840
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",@@ -2645,6 +3068,47 @@2645
"node": ">= 0.8"3068
"node": ">= 0.8"2646
}3069
}2647
},3070
},3071
"node_modules/compress-commons": {3072
"version": "6.0.2",3073
"resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-6.0.2.tgz",3074
"integrity": "sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg==",3075
"license": "MIT",3076
"dependencies": {3077
"crc-32": "^1.2.0",3078
"crc32-stream": "^6.0.0",3079
"is-stream": "^2.0.1",3080
"normalize-path": "^3.0.0",3081
"readable-stream": "^4.0.0"3082
},3083
"engines": {3084
"node": ">= 14"3085
}3086
},3087
"node_modules/compress-commons/node_modules/readable-stream": {3088
"version": "4.7.0",3089
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz",3090
"integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==",3091
"license": "MIT",3092
"dependencies": {3093
"abort-controller": "^3.0.0",3094
"buffer": "^6.0.3",3095
"events": "^3.3.0",3096
"process": "^0.11.10",3097
"string_decoder": "^1.3.0"3098
},3099
"engines": {3100
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"3101
}3102
},3103
"node_modules/compress-commons/node_modules/string_decoder": {3104
"version": "1.3.0",3105
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",3106
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",3107
"license": "MIT",3108
"dependencies": {3109
"safe-buffer": "~5.2.0"3110
}3111
},2648
"node_modules/concat-map": {3112
"node_modules/concat-map": {2649
"version": "0.0.1",3113
"version": "0.0.1",2650
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",3114
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",@@ -2720,6 +3184,56 @@2720
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",3184
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",2721
"license": "MIT"3185
"license": "MIT"2722
},3186
},3187
"node_modules/crc-32": {3188
"version": "1.2.2",3189
"resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz",3190
"integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==",3191
"license": "Apache-2.0",3192
"bin": {3193
"crc32": "bin/crc32.njs"3194
},3195
"engines": {3196
"node": ">=0.8"3197
}3198
},3199
"node_modules/crc32-stream": {3200
"version": "6.0.0",3201
"resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-6.0.0.tgz",3202
"integrity": "sha512-piICUB6ei4IlTv1+653yq5+KoqfBYmj9bw6LqXoOneTMDXk5nM1qt12mFW1caG3LlJXEKW1Bp0WggEmIfQB34g==",3203
"license": "MIT",3204
"dependencies": {3205
"crc-32": "^1.2.0",3206
"readable-stream": "^4.0.0"3207
},3208
"engines": {3209
"node": ">= 14"3210
}3211
},3212
"node_modules/crc32-stream/node_modules/readable-stream": {3213
"version": "4.7.0",3214
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz",3215
"integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==",3216
"license": "MIT",3217
"dependencies": {3218
"abort-controller": "^3.0.0",3219
"buffer": "^6.0.3",3220
"events": "^3.3.0",3221
"process": "^0.11.10",3222
"string_decoder": "^1.3.0"3223
},3224
"engines": {3225
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"3226
}3227
},3228
"node_modules/crc32-stream/node_modules/string_decoder": {3229
"version": "1.3.0",3230
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",3231
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",3232
"license": "MIT",3233
"dependencies": {3234
"safe-buffer": "~5.2.0"3235
}3236
},2723
"node_modules/create-jest": {3237
"node_modules/create-jest": {2724
"version": "29.7.0",3238
"version": "29.7.0",2725
"resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz",3239
"resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz",@@ -2973,6 +3487,12 @@2973
"node": ">= 0.4"3487
"node": ">= 0.4"2974
}3488
}2975
},3489
},3490
"node_modules/eastasianwidth": {3491
"version": "0.2.0",3492
"resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",3493
"integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",3494
"license": "MIT"3495
},2976
"node_modules/ecdsa-sig-formatter": {3496
"node_modules/ecdsa-sig-formatter": {2977
"version": "1.0.11",3497
"version": "1.0.11",2978
"resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",3498
"resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",@@ -3177,6 +3697,33 @@3177
"node": ">= 0.6"3697
"node": ">= 0.6"3178
}3698
}3179
},3699
},3700
"node_modules/event-target-shim": {3701
"version": "5.0.1",3702
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",3703
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",3704
"license": "MIT",3705
"engines": {3706
"node": ">=6"3707
}3708
},3709
"node_modules/events": {3710
"version": "3.3.0",3711
"resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",3712
"integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",3713
"license": "MIT",3714
"engines": {3715
"node": ">=0.8.x"3716
}3717
},3718
"node_modules/events-universal": {3719
"version": "1.0.1",3720
"resolved": "https://registry.npmjs.org/events-universal/-/events-universal-1.0.1.tgz",3721
"integrity": "sha512-LUd5euvbMLpwOF8m6ivPCbhQeSiYVNb8Vs0fQ8QjXo0JTkEHpz8pxdQf0gStltaPpw0Cca8b39KxvK9cfKRiAw==",3722
"license": "Apache-2.0",3723
"dependencies": {3724
"bare-events": "^2.7.0"3725
}3726
},3180
"node_modules/execa": {3727
"node_modules/execa": {3181
"version": "5.1.1",3728
"version": "5.1.1",3182
"resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",3729
"resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",@@ -3270,6 +3817,12 @@3270
"url": "https://opencollective.com/express"3817
"url": "https://opencollective.com/express"3271
}3818
}3272
},3819
},3820
"node_modules/fast-fifo": {3821
"version": "1.3.2",3822
"resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz",3823
"integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==",3824
"license": "MIT"3825
},3273
"node_modules/fast-json-stable-stringify": {3826
"node_modules/fast-json-stable-stringify": {3274
"version": "2.1.0",3827
"version": "2.1.0",3275
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",3828
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",@@ -3337,6 +3890,34 @@3337
"node": ">=8"3890
"node": ">=8"3338
}3891
}3339
},3892
},3893
"node_modules/foreground-child": {3894
"version": "3.3.1",3895
"resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz",3896
"integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==",3897
"license": "ISC",3898
"dependencies": {3899
"cross-spawn": "^7.0.6",3900
"signal-exit": "^4.0.1"3901
},3902
"engines": {3903
"node": ">=14"3904
},3905
"funding": {3906
"url": "https://github.com/sponsors/isaacs"3907
}3908
},3909
"node_modules/foreground-child/node_modules/signal-exit": {3910
"version": "4.1.0",3911
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",3912
"integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",3913
"license": "ISC",3914
"engines": {3915
"node": ">=14"3916
},3917
"funding": {3918
"url": "https://github.com/sponsors/isaacs"3919
}3920
},3340
"node_modules/form-data": {3921
"node_modules/form-data": {3341
"version": "4.0.5",3922
"version": "4.0.5",3342
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz",3923
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz",@@ -3789,6 +4370,26 @@3789
"node": ">=0.10.0"4370
"node": ">=0.10.0"3790
}4371
}3791
},4372
},4373
"node_modules/ieee754": {4374
"version": "1.2.1",4375
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",4376
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",4377
"funding": [4378
{4379
"type": "github",4380
"url": "https://github.com/sponsors/feross"4381
},4382
{4383
"type": "patreon",4384
"url": "https://www.patreon.com/feross"4385
},4386
{4387
"type": "consulting",4388
"url": "https://feross.org/support"4389
}4390
],4391
"license": "BSD-3-Clause"4392
},3792
"node_modules/import-local": {4393
"node_modules/import-local": {3793
"version": "3.2.0",4394
"version": "3.2.0",3794
"resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz",4395
"resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz",@@ -4040,6 +4641,21 @@4040
"node": ">=8"4641
"node": ">=8"4041
}4642
}4042
},4643
},4644
"node_modules/jackspeak": {4645
"version": "3.4.3",4646
"resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz",4647
"integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==",4648
"license": "BlueOak-1.0.0",4649
"dependencies": {4650
"@isaacs/cliui": "^8.0.2"4651
},4652
"funding": {4653
"url": "https://github.com/sponsors/isaacs"4654
},4655
"optionalDependencies": {4656
"@pkgjs/parseargs": "^0.11.0"4657
}4658
},4043
"node_modules/jest": {4659
"node_modules/jest": {4044
"version": "29.7.0",4660
"version": "29.7.0",4045
"resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz",4661
"resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz",@@ -5271,6 +5887,18 @@5271
"node": ">=0.2.0"5887
"node": ">=0.2.0"5272
}5888
}5273
},5889
},5890
"node_modules/lazystream": {5891
"version": "1.0.1",5892
"resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz",5893
"integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==",5894
"license": "MIT",5895
"dependencies": {5896
"readable-stream": "^2.0.5"5897
},5898
"engines": {5899
"node": ">= 0.6.3"5900
}5901
},5274
"node_modules/leven": {5902
"node_modules/leven": {5275
"version": "3.1.0",5903
"version": "3.1.0",5276
"resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz",5904
"resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz",@@ -5806,6 +6434,12 @@5806
"node": ">=6"6434
"node": ">=6"5807
}6435
}5808
},6436
},6437
"node_modules/package-json-from-dist": {6438
"version": "1.0.1",6439
"resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz",6440
"integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",6441
"license": "BlueOak-1.0.0"6442
},5809
"node_modules/parse-json": {6443
"node_modules/parse-json": {5810
"version": "5.2.0",6444
"version": "5.2.0",5811
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",6445
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",@@ -5879,6 +6513,28 @@5879
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",6513
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",5880
"license": "MIT"6514
"license": "MIT"5881
},6515
},6516
"node_modules/path-scurry": {6517
"version": "1.11.1",6518
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz",6519
"integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==",6520
"license": "BlueOak-1.0.0",6521
"dependencies": {6522
"lru-cache": "^10.2.0",6523
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"6524
},6525
"engines": {6526
"node": ">=16 || 14 >=14.18"6527
},6528
"funding": {6529
"url": "https://github.com/sponsors/isaacs"6530
}6531
},6532
"node_modules/path-scurry/node_modules/lru-cache": {6533
"version": "10.4.3",6534
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz",6535
"integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==",6536
"license": "ISC"6537
},5882
"node_modules/path-to-regexp": {6538
"node_modules/path-to-regexp": {5883
"version": "0.1.13",6539
"version": "0.1.13",5884
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.13.tgz",6540
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.13.tgz",@@ -5956,6 +6612,15 @@5956
"url": "https://github.com/chalk/ansi-styles?sponsor=1"6612
"url": "https://github.com/chalk/ansi-styles?sponsor=1"5957
}6613
}5958
},6614
},6615
"node_modules/process": {6616
"version": "0.11.10",6617
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",6618
"integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==",6619
"license": "MIT",6620
"engines": {6621
"node": ">= 0.6.0"6622
}6623
},5959
"node_modules/process-nextick-args": {6624
"node_modules/process-nextick-args": {5960
"version": "2.0.1",6625
"version": "2.0.1",5961
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",6626
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",@@ -6100,6 +6765,36 @@6100
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",6765
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",6101
"license": "MIT"6766
"license": "MIT"6102
},6767
},6768
"node_modules/readdir-glob": {6769
"version": "1.1.3",6770
"resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.3.tgz",6771
"integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==",6772
"license": "Apache-2.0",6773
"dependencies": {6774
"minimatch": "^5.1.0"6775
}6776
},6777
"node_modules/readdir-glob/node_modules/brace-expansion": {6778
"version": "2.1.0",6779
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz",6780
"integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==",6781
"license": "MIT",6782
"dependencies": {6783
"balanced-match": "^1.0.0"6784
}6785
},6786
"node_modules/readdir-glob/node_modules/minimatch": {6787
"version": "5.1.9",6788
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz",6789
"integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==",6790
"license": "ISC",6791
"dependencies": {6792
"brace-expansion": "^2.0.1"6793
},6794
"engines": {6795
"node": ">=10"6796
}6797
},6103
"node_modules/require-directory": {6798
"node_modules/require-directory": {6104
"version": "2.1.1",6799
"version": "2.1.1",6105
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",6800
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",@@ -6510,6 +7205,17 @@6510
"node": ">=10.0.0"7205
"node": ">=10.0.0"6511
}7206
}6512
},7207
},7208
"node_modules/streamx": {7209
"version": "2.25.0",7210
"resolved": "https://registry.npmjs.org/streamx/-/streamx-2.25.0.tgz",7211
"integrity": "sha512-0nQuG6jf1w+wddNEEXCF4nTg3LtufWINB5eFEN+5TNZW7KWJp6x87+JFL43vaAUPyCfH1wID+mNVyW6OHtFamg==",7212
"license": "MIT",7213
"dependencies": {7214
"events-universal": "^1.0.0",7215
"fast-fifo": "^1.3.2",7216
"text-decoder": "^1.1.0"7217
}7218
},6513
"node_modules/string_decoder": {7219
"node_modules/string_decoder": {6514
"version": "1.1.1",7220
"version": "1.1.1",6515
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",7221
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",@@ -6552,6 +7258,21 @@6552
"node": ">=8"7258
"node": ">=8"6553
}7259
}6554
},7260
},7261
"node_modules/string-width-cjs": {7262
"name": "string-width",7263
"version": "4.2.3",7264
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",7265
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",7266
"license": "MIT",7267
"dependencies": {7268
"emoji-regex": "^8.0.0",7269
"is-fullwidth-code-point": "^3.0.0",7270
"strip-ansi": "^6.0.1"7271
},7272
"engines": {7273
"node": ">=8"7274
}7275
},6555
"node_modules/strip-ansi": {7276
"node_modules/strip-ansi": {6556
"version": "6.0.1",7277
"version": "6.0.1",6557
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",7278
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",@@ -6564,6 +7285,19 @@6564
"node": ">=8"7285
"node": ">=8"6565
}7286
}6566
},7287
},7288
"node_modules/strip-ansi-cjs": {7289
"name": "strip-ansi",7290
"version": "6.0.1",7291
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",7292
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",7293
"license": "MIT",7294
"dependencies": {7295
"ansi-regex": "^5.0.1"7296
},7297
"engines": {7298
"node": ">=8"7299
}7300
},6567
"node_modules/strip-bom": {7301
"node_modules/strip-bom": {6568
"version": "4.0.0",7302
"version": "4.0.0",6569
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz",7303
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz",@@ -6643,6 +7377,18 @@6643
"node": ">=10"7377
"node": ">=10"6644
}7378
}6645
},7379
},7380
"node_modules/tar-stream": {7381
"version": "3.2.0",7382
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.2.0.tgz",7383
"integrity": "sha512-ojzvCvVaNp6aOTFmG7jaRD0meowIAuPc3cMMhSgKiVWws1GyHbGd/xvnyuRKcKlMpt3qvxx6r0hreCNITP9hIg==",7384
"license": "MIT",7385
"dependencies": {7386
"b4a": "^1.6.4",7387
"bare-fs": "^4.5.5",7388
"fast-fifo": "^1.2.0",7389
"streamx": "^2.15.0"7390
}7391
},6646
"node_modules/tar/node_modules/mkdirp": {7392
"node_modules/tar/node_modules/mkdirp": {6647
"version": "1.0.4",7393
"version": "1.0.4",6648
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",7394
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",@@ -6661,6 +7407,15 @@6661
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",7407
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",6662
"license": "ISC"7408
"license": "ISC"6663
},7409
},7410
"node_modules/teex": {7411
"version": "1.0.1",7412
"resolved": "https://registry.npmjs.org/teex/-/teex-1.0.1.tgz",7413
"integrity": "sha512-eYE6iEI62Ni1H8oIa7KlDU6uQBtqr4Eajni3wX7rpfXD8ysFx8z0+dri+KWEPWpBsxXfxu58x/0jvTVT1ekOSg==",7414
"license": "MIT",7415
"dependencies": {7416
"streamx": "^2.12.5"7417
}7418
},6664
"node_modules/test-exclude": {7419
"node_modules/test-exclude": {6665
"version": "6.0.0",7420
"version": "6.0.0",6666
"resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz",7421
"resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz",@@ -6675,6 +7430,15 @@6675
"node": ">=8"7430
"node": ">=8"6676
}7431
}6677
},7432
},7433
"node_modules/text-decoder": {7434
"version": "1.2.7",7435
"resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.7.tgz",7436
"integrity": "sha512-vlLytXkeP4xvEq2otHeJfSQIRyWxo/oZGEbXrtEEF9Hnmrdly59sUbzZ/QgyWuLYHctCHxFF4tRQZNQ9k60ExQ==",7437
"license": "Apache-2.0",7438
"dependencies": {7439
"b4a": "^1.6.4"7440
}7441
},6678
"node_modules/tldts": {7442
"node_modules/tldts": {6679
"version": "6.1.86",7443
"version": "6.1.86",6680
"resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.86.tgz",7444
"resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.86.tgz",@@ -7025,6 +7789,24 @@7025
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"7789
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"7026
}7790
}7027
},7791
},7792
"node_modules/wrap-ansi-cjs": {7793
"name": "wrap-ansi",7794
"version": "7.0.0",7795
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",7796
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",7797
"license": "MIT",7798
"dependencies": {7799
"ansi-styles": "^4.0.0",7800
"string-width": "^4.1.0",7801
"strip-ansi": "^6.0.0"7802
},7803
"engines": {7804
"node": ">=10"7805
},7806
"funding": {7807
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"7808
}7809
},7028
"node_modules/wrappy": {7810
"node_modules/wrappy": {7029
"version": "1.0.2",7811
"version": "1.0.2",7030
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",7812
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",@@ -7155,6 +7937,45 @@7155
"funding": {7937
"funding": {7156
"url": "https://github.com/sponsors/sindresorhus"7938
"url": "https://github.com/sponsors/sindresorhus"7157
}7939
}7940
},7941
"node_modules/zip-stream": {7942
"version": "6.0.1",7943
"resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-6.0.1.tgz",7944
"integrity": "sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==",7945
"license": "MIT",7946
"dependencies": {7947
"archiver-utils": "^5.0.0",7948
"compress-commons": "^6.0.2",7949
"readable-stream": "^4.0.0"7950
},7951
"engines": {7952
"node": ">= 14"7953
}7954
},7955
"node_modules/zip-stream/node_modules/readable-stream": {7956
"version": "4.7.0",7957
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz",7958
"integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==",7959
"license": "MIT",7960
"dependencies": {7961
"abort-controller": "^3.0.0",7962
"buffer": "^6.0.3",7963
"events": "^3.3.0",7964
"process": "^0.11.10",7965
"string_decoder": "^1.3.0"7966
},7967
"engines": {7968
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"7969
}7970
},7971
"node_modules/zip-stream/node_modules/string_decoder": {7972
"version": "1.3.0",7973
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",7974
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",7975
"license": "MIT",7976
"dependencies": {7977
"safe-buffer": "~5.2.0"7978
}7158
}7979
}7159
}7980
}7160
}7981
}@@ -8,6 +8,7 @@
8
8
"test": "jest --runInBand"
9
9
},
10
10
"dependencies": {
11
"archiver": "^7.0.1",
11
12
"bcrypt": "^5.1.1",
12
13
"express": "^4.18.2",
13
14
"geoip-lite": "^1.4.10",
@@ -8,6 +8,7 @@8
"test": "jest --runInBand"8
"test": "jest --runInBand"9
},9
},10
"dependencies": {10
"dependencies": {11
"archiver": "^7.0.1",11
"bcrypt": "^5.1.1",12
"bcrypt": "^5.1.1",12
"express": "^4.18.2",13
"express": "^4.18.2",13
"geoip-lite": "^1.4.10",14
"geoip-lite": "^1.4.10",@@ -590,6 +590,74 @@ function showFileConflictChoice (filename, renameTo, mode = 'upload')
590
590
});
591
591
}
592
592
593
// ───────────────────────────────────────────────────────────────────────────
594
// SHARE MODAL
595
// ───────────────────────────────────────────────────────────────────────────
596
597
async function openShareModal (item)
598
{
599
const overlay = document.getElementById('share-modal');
600
const urlInput = document.getElementById('share-url-input');
601
const copyBtn = document.getElementById('share-copy-btn');
602
const okBtn = document.getElementById('share-modal-ok');
603
const closeBtn = document.getElementById('share-modal-close');
604
const msgEl = document.getElementById('share-modal-msg');
605
606
urlInput.value = 'Link aanmaken…';
607
copyBtn.disabled = true;
608
msgEl.textContent = 'De link is 24 uur geldig.';
609
overlay.classList.remove('hidden');
610
611
let data;
612
try
613
{
614
data = await api('POST', '/share/create', { filePath: item.path });
615
} catch (err)
616
{
617
msgEl.textContent = 'Fout: ' + (err.message || 'Kon geen link aanmaken.');
618
urlInput.value = '';
619
return;
620
}
621
622
if (!data || !data.token)
623
{
624
msgEl.textContent = 'Onbekende fout bij aanmaken van de link.';
625
urlInput.value = '';
626
return;
627
}
628
629
const shareUrl = `${location.origin}/share/${data.token}`;
630
urlInput.value = shareUrl;
631
copyBtn.disabled = false;
632
633
function close ()
634
{
635
overlay.classList.add('hidden');
636
okBtn.removeEventListener('click', close);
637
closeBtn.removeEventListener('click', close);
638
copyBtn.removeEventListener('click', onCopy);
639
}
640
641
function onCopy ()
642
{
643
navigator.clipboard.writeText(shareUrl).then(() =>
644
{
645
const orig = copyBtn.textContent;
646
copyBtn.textContent = 'Gekopieerd!';
647
setTimeout(() => { copyBtn.textContent = orig; }, 1500);
648
}).catch(() =>
649
{
650
// Fallback: select the text
651
urlInput.select();
652
});
653
}
654
655
okBtn.addEventListener('click', close);
656
closeBtn.addEventListener('click', close);
657
copyBtn.addEventListener('click', onCopy);
658
okBtn.focus();
659
}
660
593
661
// ───────────────────────────────────────────────────────────────────────────
594
662
// AUTH FLOW
595
663
// ───────────────────────────────────────────────────────────────────────────
@@ -1204,6 +1272,12 @@ async function openSidebar (item)
1204
1272
downloadOrView(item, source);
1205
1273
});
1206
1274
actions.appendChild(btnDl);
1275
1276
// Share button (file)
1277
const btnShareFile = document.createElement('button');
1278
btnShareFile.textContent = 'Delen';
1279
btnShareFile.addEventListener('click', () => openShareModal(item));
1280
actions.appendChild(btnShareFile);
1207
1281
} else
1208
1282
{
1209
1283
dl.innerHTML = `<dt>Type</dt><dd>${item._root ? 'Root folder' : 'Folder'}</dd>`;
@@ -1240,6 +1314,25 @@ async function openSidebar (item)
1240
1314
btnOpen.addEventListener('click', () => navigateTo(item.path, item._root || STATE.currentRoot));
1241
1315
actions.appendChild(btnOpen);
1242
1316
1317
// Download as zip button (folder)
1318
const btnZip = document.createElement('button');
1319
btnZip.textContent = 'Download als zip';
1320
btnZip.addEventListener('click', () =>
1321
{
1322
const url = `/api/files/download-zip?dir=${encodeURIComponent(item.path)}`;
1323
const a = document.createElement('a');
1324
a.href = url;
1325
a.download = item.name + '.zip';
1326
a.click();
1327
});
1328
actions.appendChild(btnZip);
1329
1330
// Share button (folder)
1331
const btnShareFolder = document.createElement('button');
1332
btnShareFolder.textContent = 'Delen';
1333
btnShareFolder.addEventListener('click', () => openShareModal(item));
1334
actions.appendChild(btnShareFolder);
1335
1243
1336
// Load folder icon thumbnail into the sidebar icon element.
1244
1337
void loadOneFolderIcon(document.getElementById('sidebar-icon'));
1245
1338
}
@@ -590,6 +590,74 @@ function showFileConflictChoice (filename, renameTo, mode = 'upload')590
});590
});591
}591
}592
592
593
// ───────────────────────────────────────────────────────────────────────────594
// SHARE MODAL595
// ───────────────────────────────────────────────────────────────────────────596
597
async function openShareModal (item)598
{599
const overlay = document.getElementById('share-modal');600
const urlInput = document.getElementById('share-url-input');601
const copyBtn = document.getElementById('share-copy-btn');602
const okBtn = document.getElementById('share-modal-ok');603
const closeBtn = document.getElementById('share-modal-close');604
const msgEl = document.getElementById('share-modal-msg');605
606
urlInput.value = 'Link aanmaken…';607
copyBtn.disabled = true;608
msgEl.textContent = 'De link is 24 uur geldig.';609
overlay.classList.remove('hidden');610
611
let data;612
try613
{614
data = await api('POST', '/share/create', { filePath: item.path });615
} catch (err)616
{617
msgEl.textContent = 'Fout: ' + (err.message || 'Kon geen link aanmaken.');618
urlInput.value = '';619
return;620
}621
622
if (!data || !data.token)623
{624
msgEl.textContent = 'Onbekende fout bij aanmaken van de link.';625
urlInput.value = '';626
return;627
}628
629
const shareUrl = `${location.origin}/share/${data.token}`;630
urlInput.value = shareUrl;631
copyBtn.disabled = false;632
633
function close ()634
{635
overlay.classList.add('hidden');636
okBtn.removeEventListener('click', close);637
closeBtn.removeEventListener('click', close);638
copyBtn.removeEventListener('click', onCopy);639
}640
641
function onCopy ()642
{643
navigator.clipboard.writeText(shareUrl).then(() =>644
{645
const orig = copyBtn.textContent;646
copyBtn.textContent = 'Gekopieerd!';647
setTimeout(() => { copyBtn.textContent = orig; }, 1500);648
}).catch(() =>649
{650
// Fallback: select the text651
urlInput.select();652
});653
}654
655
okBtn.addEventListener('click', close);656
closeBtn.addEventListener('click', close);657
copyBtn.addEventListener('click', onCopy);658
okBtn.focus();659
}660
593
// ───────────────────────────────────────────────────────────────────────────661
// ───────────────────────────────────────────────────────────────────────────594
// AUTH FLOW662
// AUTH FLOW595
// ───────────────────────────────────────────────────────────────────────────663
// ───────────────────────────────────────────────────────────────────────────@@ -1204,6 +1272,12 @@ async function openSidebar (item)1204
downloadOrView(item, source);1272
downloadOrView(item, source);1205
});1273
});1206
actions.appendChild(btnDl);1274
actions.appendChild(btnDl);1275
1276
// Share button (file)1277
const btnShareFile = document.createElement('button');1278
btnShareFile.textContent = 'Delen';1279
btnShareFile.addEventListener('click', () => openShareModal(item));1280
actions.appendChild(btnShareFile);1207
} else1281
} else1208
{1282
{1209
dl.innerHTML = `<dt>Type</dt><dd>${item._root ? 'Root folder' : 'Folder'}</dd>`;1283
dl.innerHTML = `<dt>Type</dt><dd>${item._root ? 'Root folder' : 'Folder'}</dd>`;@@ -1240,6 +1314,25 @@ async function openSidebar (item)1240
btnOpen.addEventListener('click', () => navigateTo(item.path, item._root || STATE.currentRoot));1314
btnOpen.addEventListener('click', () => navigateTo(item.path, item._root || STATE.currentRoot));1241
actions.appendChild(btnOpen);1315
actions.appendChild(btnOpen);1242
1316
1317
// Download as zip button (folder)1318
const btnZip = document.createElement('button');1319
btnZip.textContent = 'Download als zip';1320
btnZip.addEventListener('click', () =>1321
{1322
const url = `/api/files/download-zip?dir=${encodeURIComponent(item.path)}`;1323
const a = document.createElement('a');1324
a.href = url;1325
a.download = item.name + '.zip';1326
a.click();1327
});1328
actions.appendChild(btnZip);1329
1330
// Share button (folder)1331
const btnShareFolder = document.createElement('button');1332
btnShareFolder.textContent = 'Delen';1333
btnShareFolder.addEventListener('click', () => openShareModal(item));1334
actions.appendChild(btnShareFolder);1335
1243
// Load folder icon thumbnail into the sidebar icon element.1336
// Load folder icon thumbnail into the sidebar icon element.1244
void loadOneFolderIcon(document.getElementById('sidebar-icon'));1337
void loadOneFolderIcon(document.getElementById('sidebar-icon'));1245
}1338
}@@ -272,6 +272,24 @@
272
272
<!-- TOAST -->
273
273
<div id="toast" aria-live="assertive" aria-atomic="true"></div>
274
274
275
<!-- SHARE MODAL -->
276
<div id="share-modal" class="modal-overlay hidden" role="dialog" aria-modal="true"
277
aria-labelledby="share-modal-title">
278
<div class="modal small">
279
<button class="modal-close" id="share-modal-close" aria-label="Sluiten">✕</button>
280
<h2 id="share-modal-title">Delen</h2>
281
<p class="dialog-message" id="share-modal-msg">De link is 24 uur geldig.</p>
282
<div id="share-url-row" style="display:flex;gap:0.5rem;margin:0.8rem 0">
283
<input id="share-url-input" type="text" readonly
284
style="flex:1;font-size:0.82rem;background:var(--surface2);border:1px solid var(--border);border-radius:6px;padding:0.45rem 0.65rem;color:var(--text);min-width:0" />
285
<button id="share-copy-btn" title="Kopieer link">Kopieer</button>
286
</div>
287
<div class="dialog-actions">
288
<button class="primary" id="share-modal-ok">OK</button>
289
</div>
290
</div>
291
</div>
292
275
293
<link rel="stylesheet" href="drag-move.css" />
276
294
<script src="drag-move.js"></script>
277
295
<script src="app.js"></script>
@@ -272,6 +272,24 @@272
<!-- TOAST -->272
<!-- TOAST -->273
<div id="toast" aria-live="assertive" aria-atomic="true"></div>273
<div id="toast" aria-live="assertive" aria-atomic="true"></div>274
274
275
<!-- SHARE MODAL -->276
<div id="share-modal" class="modal-overlay hidden" role="dialog" aria-modal="true"277
aria-labelledby="share-modal-title">278
<div class="modal small">279
<button class="modal-close" id="share-modal-close" aria-label="Sluiten">✕</button>280
<h2 id="share-modal-title">Delen</h2>281
<p class="dialog-message" id="share-modal-msg">De link is 24 uur geldig.</p>282
<div id="share-url-row" style="display:flex;gap:0.5rem;margin:0.8rem 0">283
<input id="share-url-input" type="text" readonly284
style="flex:1;font-size:0.82rem;background:var(--surface2);border:1px solid var(--border);border-radius:6px;padding:0.45rem 0.65rem;color:var(--text);min-width:0" />285
<button id="share-copy-btn" title="Kopieer link">Kopieer</button>286
</div>287
<div class="dialog-actions">288
<button class="primary" id="share-modal-ok">OK</button>289
</div>290
</div>291
</div>292
275
<link rel="stylesheet" href="drag-move.css" />293
<link rel="stylesheet" href="drag-move.css" />276
<script src="drag-move.js"></script>294
<script src="drag-move.js"></script>277
<script src="app.js"></script>295
<script src="app.js"></script>@@ -49,6 +49,17 @@ function initDb ()
49
49
50
50
CREATE INDEX IF NOT EXISTS idx_auth_sessions_username ON auth_sessions(username);
51
51
CREATE INDEX IF NOT EXISTS idx_auth_sessions_last_seen ON auth_sessions(last_seen_at);
52
53
CREATE TABLE IF NOT EXISTS share_tokens (
54
token TEXT PRIMARY KEY,
55
file_path TEXT NOT NULL,
56
is_dir INTEGER NOT NULL DEFAULT 0,
57
created_by TEXT NOT NULL,
58
created_at INTEGER NOT NULL,
59
expires_at INTEGER NOT NULL
60
);
61
62
CREATE INDEX IF NOT EXISTS idx_share_tokens_expires ON share_tokens(expires_at);
52
63
`);
53
64
}
54
65
@@ -49,6 +49,17 @@ function initDb ()49
49
50
CREATE INDEX IF NOT EXISTS idx_auth_sessions_username ON auth_sessions(username);50
CREATE INDEX IF NOT EXISTS idx_auth_sessions_username ON auth_sessions(username);51
CREATE INDEX IF NOT EXISTS idx_auth_sessions_last_seen ON auth_sessions(last_seen_at);51
CREATE INDEX IF NOT EXISTS idx_auth_sessions_last_seen ON auth_sessions(last_seen_at);52
53
CREATE TABLE IF NOT EXISTS share_tokens (54
token TEXT PRIMARY KEY,55
file_path TEXT NOT NULL,56
is_dir INTEGER NOT NULL DEFAULT 0,57
created_by TEXT NOT NULL,58
created_at INTEGER NOT NULL,59
expires_at INTEGER NOT NULL60
);61
62
CREATE INDEX IF NOT EXISTS idx_share_tokens_expires ON share_tokens(expires_at);52
`);63
`);53
}64
}54
65
@@ -12,6 +12,7 @@ const { startThumbnailCacheLoop, stopThumbnailCacheLoop } = require('./thumbnail
12
12
const authRoutes = require('./routes/auth');
13
13
const filesRoutes = require('./routes/files');
14
14
const adminRoutes = require('./routes/admin');
15
const shareRoutes = require('./routes/share');
15
16
16
17
const app = express();
17
18
@@ -21,6 +22,13 @@ app.use(express.static(path.join(__dirname, '../public')));
21
22
app.use('/api/auth', authRoutes);
22
23
app.use('/api/files', filesRoutes);
23
24
app.use('/api/admin', adminRoutes);
25
app.use('/api/share', shareRoutes);
26
27
// Share page — served without authentication.
28
app.get('/share/:token', (req, res) =>
29
{
30
res.sendFile(path.join(__dirname, '../public/share.html'));
31
});
24
32
25
33
// SPA catch-all (only for non-API routes)
26
34
app.get('*', (req, res) =>
@@ -12,6 +12,7 @@ const { startThumbnailCacheLoop, stopThumbnailCacheLoop } = require('./thumbnail12
const authRoutes = require('./routes/auth');12
const authRoutes = require('./routes/auth');13
const filesRoutes = require('./routes/files');13
const filesRoutes = require('./routes/files');14
const adminRoutes = require('./routes/admin');14
const adminRoutes = require('./routes/admin');15
const shareRoutes = require('./routes/share');15
16
16
const app = express();17
const app = express();17
18
@@ -21,6 +22,13 @@ app.use(express.static(path.join(__dirname, '../public')));21
app.use('/api/auth', authRoutes);22
app.use('/api/auth', authRoutes);22
app.use('/api/files', filesRoutes);23
app.use('/api/files', filesRoutes);23
app.use('/api/admin', adminRoutes);24
app.use('/api/admin', adminRoutes);25
app.use('/api/share', shareRoutes);26
27
// Share page — served without authentication.28
app.get('/share/:token', (req, res) =>29
{30
res.sendFile(path.join(__dirname, '../public/share.html'));31
});24
32
25
// SPA catch-all (only for non-API routes)33
// SPA catch-all (only for non-API routes)26
app.get('*', (req, res) =>34
app.get('*', (req, res) =>@@ -11,6 +11,7 @@ const { getDb } = require('../db');
11
11
const { loadConfig, saveConfig, getEffectivePaths, getAllowedRoot } = require('../config');
12
12
const { requireAuth } = require('../auth');
13
13
const { getCachedThumbnailInfo, getImagesWithThumbnailsInDir, getFolderIconSourceFile, setFolderIconAssignment } = require('../thumbnail-cache');
14
const { buildZip } = require('./share');
14
15
15
16
// ---------------------------------------------------------------------------
16
17
// Multer storage — files are staged into temporary files and only promoted
@@ -622,6 +623,40 @@ router.get('/download', requireAuth, (req, res) =>
622
623
res.download(file, path.basename(file));
623
624
});
624
625
626
// ---------------------------------------------------------------------------
627
// GET /api/files/download-zip?dir=<absolute-path>
628
// Authenticated. Streams a zip of the given directory.
629
// ---------------------------------------------------------------------------
630
router.get('/download-zip', requireAuth, async (req, res) =>
631
{
632
const dir = req.query.dir;
633
if (!dir) return res.status(400).json({ error: 'dir is required.' });
634
635
const roots = effectivePaths();
636
const info = resolveRoot(dir, roots);
637
if (!info || !canRead(req.user, info.label))
638
{
639
return res.status(403).json({ error: 'Access denied.' });
640
}
641
642
if (!fs.existsSync(dir) || !fs.statSync(dir).isDirectory())
643
{
644
return res.status(404).json({ error: 'Directory not found.' });
645
}
646
647
// Use a hash of the dir path as cache key so concurrent users share the cache.
648
const cacheKey = crypto.createHash('sha256').update(dir).digest('hex');
649
try
650
{
651
const zipPath = await buildZip(dir, cacheKey);
652
const zipName = `${path.basename(dir)}.zip`;
653
res.download(zipPath, zipName);
654
} catch (err)
655
{
656
res.status(500).json({ error: 'Failed to create zip archive.' });
657
}
658
});
659
625
660
// ---------------------------------------------------------------------------
626
661
// GET /api/files/thumbnail?file=<absolute-path>
627
662
// Returns a pre-generated cached thumbnail if present.
@@ -11,6 +11,7 @@ const { getDb } = require('../db');11
const { loadConfig, saveConfig, getEffectivePaths, getAllowedRoot } = require('../config');11
const { loadConfig, saveConfig, getEffectivePaths, getAllowedRoot } = require('../config');12
const { requireAuth } = require('../auth');12
const { requireAuth } = require('../auth');13
const { getCachedThumbnailInfo, getImagesWithThumbnailsInDir, getFolderIconSourceFile, setFolderIconAssignment } = require('../thumbnail-cache');13
const { getCachedThumbnailInfo, getImagesWithThumbnailsInDir, getFolderIconSourceFile, setFolderIconAssignment } = require('../thumbnail-cache');14
const { buildZip } = require('./share');14
15
15
// ---------------------------------------------------------------------------16
// ---------------------------------------------------------------------------16
// Multer storage — files are staged into temporary files and only promoted17
// Multer storage — files are staged into temporary files and only promoted@@ -622,6 +623,40 @@ router.get('/download', requireAuth, (req, res) =>622
res.download(file, path.basename(file));623
res.download(file, path.basename(file));623
});624
});624
625
626
// ---------------------------------------------------------------------------627
// GET /api/files/download-zip?dir=<absolute-path>628
// Authenticated. Streams a zip of the given directory.629
// ---------------------------------------------------------------------------630
router.get('/download-zip', requireAuth, async (req, res) =>631
{632
const dir = req.query.dir;633
if (!dir) return res.status(400).json({ error: 'dir is required.' });634
635
const roots = effectivePaths();636
const info = resolveRoot(dir, roots);637
if (!info || !canRead(req.user, info.label))638
{639
return res.status(403).json({ error: 'Access denied.' });640
}641
642
if (!fs.existsSync(dir) || !fs.statSync(dir).isDirectory())643
{644
return res.status(404).json({ error: 'Directory not found.' });645
}646
647
// Use a hash of the dir path as cache key so concurrent users share the cache.648
const cacheKey = crypto.createHash('sha256').update(dir).digest('hex');649
try650
{651
const zipPath = await buildZip(dir, cacheKey);652
const zipName = `${path.basename(dir)}.zip`;653
res.download(zipPath, zipName);654
} catch (err)655
{656
res.status(500).json({ error: 'Failed to create zip archive.' });657
}658
});659
625
// ---------------------------------------------------------------------------660
// ---------------------------------------------------------------------------626
// GET /api/files/thumbnail?file=<absolute-path>661
// GET /api/files/thumbnail?file=<absolute-path>627
// Returns a pre-generated cached thumbnail if present.662
// Returns a pre-generated cached thumbnail if present.@@ -618,3 +618,50 @@ describe('folder icon endpoints', () =>
618
618
expect(status).toBe(403);
619
619
});
620
620
});
621
622
// ---------------------------------------------------------------------------
623
// GET /api/files/download-zip
624
// ---------------------------------------------------------------------------
625
describe('GET /api/files/download-zip', () =>
626
{
627
beforeEach(() =>
628
{
629
mockUser = { username: 'admin', isAdmin: true, permissions: {} };
630
});
631
632
test('streams a valid zip for an accessible directory', async () =>
633
{
634
const subDir = path.join(rootDir, 'zipme');
635
fs.mkdirSync(subDir);
636
fs.writeFileSync(path.join(subDir, 'file.txt'), 'content');
637
638
const { status, headers, body: buf } = await reqRaw('GET', `/api/files/download-zip?dir=${encodeURIComponent(subDir)}`);
639
expect(status).toBe(200);
640
641
const ct = headers['content-type'] || '';
642
expect(ct.includes('zip') || ct.includes('octet')).toBe(true);
643
644
// ZIP magic bytes PK\x03\x04
645
expect(buf[0]).toBe(0x50);
646
expect(buf[1]).toBe(0x4b);
647
}, 20000);
648
649
test('returns 400 when dir param is missing', async () =>
650
{
651
const { status } = await req('GET', '/api/files/download-zip');
652
expect(status).toBe(400);
653
});
654
655
test('returns 404 for a non-existent directory', async () =>
656
{
657
const missing = path.join(rootDir, 'ghost');
658
const { status } = await req('GET', `/api/files/download-zip?dir=${encodeURIComponent(missing)}`);
659
expect(status).toBe(404);
660
});
661
662
test('returns 403 for path outside configured roots', async () =>
663
{
664
const { status } = await req('GET', `/api/files/download-zip?dir=${encodeURIComponent(os.tmpdir())}`);
665
expect(status).toBe(403);
666
});
667
});
@@ -618,3 +618,50 @@ describe('folder icon endpoints', () =>618
expect(status).toBe(403);618
expect(status).toBe(403);619
});619
});620
});620
});621
622
// ---------------------------------------------------------------------------623
// GET /api/files/download-zip624
// ---------------------------------------------------------------------------625
describe('GET /api/files/download-zip', () =>626
{627
beforeEach(() =>628
{629
mockUser = { username: 'admin', isAdmin: true, permissions: {} };630
});631
632
test('streams a valid zip for an accessible directory', async () =>633
{634
const subDir = path.join(rootDir, 'zipme');635
fs.mkdirSync(subDir);636
fs.writeFileSync(path.join(subDir, 'file.txt'), 'content');637
638
const { status, headers, body: buf } = await reqRaw('GET', `/api/files/download-zip?dir=${encodeURIComponent(subDir)}`);639
expect(status).toBe(200);640
641
const ct = headers['content-type'] || '';642
expect(ct.includes('zip') || ct.includes('octet')).toBe(true);643
644
// ZIP magic bytes PK\x03\x04645
expect(buf[0]).toBe(0x50);646
expect(buf[1]).toBe(0x4b);647
}, 20000);648
649
test('returns 400 when dir param is missing', async () =>650
{651
const { status } = await req('GET', '/api/files/download-zip');652
expect(status).toBe(400);653
});654
655
test('returns 404 for a non-existent directory', async () =>656
{657
const missing = path.join(rootDir, 'ghost');658
const { status } = await req('GET', `/api/files/download-zip?dir=${encodeURIComponent(missing)}`);659
expect(status).toBe(404);660
});661
662
test('returns 403 for path outside configured roots', async () =>663
{664
const { status } = await req('GET', `/api/files/download-zip?dir=${encodeURIComponent(os.tmpdir())}`);665
expect(status).toBe(403);666
});667
});The contents of this binary file are not shown.
The contents of this binary file are not shown.