@alttiri/util-node-js
Advanced tools
+1
-1
| { | ||
| "name": "@alttiri/util-node-js", | ||
| "version": "2.0.5", | ||
| "version": "2.0.6", | ||
| "description": "Some Node.js util functions for personal use", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
| /// <reference types="node" /> | ||
| import { Dirent } from "node:fs"; | ||
| import { ListEntryBaseEx, ListEntryDirent, ListEntryDirentError, ListEntryDirentLink, ListEntryStats } from "./types/ListEntry"; | ||
| import { ListEntryBaseEx, ListEntryDirent, ListEntryDirentError, ListEntryDirentLink, ListEntryStats, ListEntryStatsAny } from "./types/ListEntry"; | ||
| import { IOError } from "./types/IOError"; | ||
@@ -12,2 +12,2 @@ import { FileListingSetting } from "./settings"; | ||
| /** 100 lines of code to handle edge cases to create the root entry */ | ||
| export declare function getRootEntry({ filepath, _map }: FileListingSetting): Promise<ListEntryStats>; | ||
| export declare function getRootEntry({ filepath, _map, bigint }: FileListingSetting): Promise<ListEntryStatsAny>; |
@@ -84,3 +84,3 @@ import fs from "node:fs/promises"; | ||
| /** 100 lines of code to handle edge cases to create the root entry */ | ||
| export async function getRootEntry({ filepath, _map }) { | ||
| export async function getRootEntry({ filepath, _map, bigint }) { | ||
| let dirents = []; | ||
@@ -90,3 +90,3 @@ filepath = path.resolve(filepath); | ||
| try { | ||
| stats = await fs.lstat(filepath); | ||
| stats = await fs.lstat(filepath, { bigint }); | ||
| } | ||
@@ -93,0 +93,0 @@ catch (err) { |
@@ -55,2 +55,5 @@ /// <reference types="node" /> | ||
| }; | ||
| export type StatEntryAny = { | ||
| stats: Stats | BigIntStats; | ||
| }; | ||
| export type StatEntryError = { | ||
@@ -61,4 +64,5 @@ errors: StatError; | ||
| export type StatEntryBaseBigInt = StatEntryBigInt | StatEntryError; | ||
| export type StatEntryBaseAny = StatEntryAny | StatEntryError; | ||
| export type ListEntryStats = StatEntryBase & ListEntryBaseEx; | ||
| export type ListEntryStatsBigInt = StatEntryBaseBigInt & ListEntryBaseEx; | ||
| export type ListEntryStatsAny = ListEntryStats | ListEntryStatsBigInt; | ||
| export type ListEntryStatsAny = StatEntryBaseAny & ListEntryBaseEx; |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
30945
0.56%810
0.5%