You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

@trayio/commons

Package Overview
Dependencies
Maintainers
4
Versions
195
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trayio/commons - npm Package Compare versions

Comparing version

to
4.18.2

3

dist/file/NodeFsFileStorage.d.ts

@@ -0,2 +1,4 @@

/// <reference types="node" />
import * as TE from 'fp-ts/lib/TaskEither';
import { Dirent } from 'fs';
import { File, FileStorage, SharedUrl } from './File';

@@ -11,3 +13,4 @@ export declare class NodeFsFileStorage implements FileStorage {

createDirectory(key: string): TE.TaskEither<Error, undefined>;
readDirectory(key: string): TE.TaskEither<Error, Dirent[]>;
}
//# sourceMappingURL=NodeFsFileStorage.d.ts.map

@@ -71,3 +71,10 @@ "use strict";

}
readDirectory(key) {
const filePath = `${this.basePath}/${key}`;
return TE.tryCatch(async () => {
const files = await fs.readdir(filePath, { withFileTypes: true });
return files;
}, (reason) => new Error(String(reason)));
}
}
exports.NodeFsFileStorage = NodeFsFileStorage;

2

package.json
{
"name": "@trayio/commons",
"version": "4.18.1",
"version": "4.18.2",
"description": "Extensions to the standard/core libraries and basic features",

@@ -5,0 +5,0 @@ "exports": {

Sorry, the diff of this file is not supported yet