@platform/fs
Advanced tools
Comparing version 0.5.5 to 0.5.7
@@ -0,2 +1,4 @@ | ||
import * as t from './types'; | ||
export { t }; | ||
export * from './libs'; | ||
export * from './util'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var t = require("./types"); | ||
exports.t = t; | ||
tslib_1.__exportStar(require("./libs"), exports); | ||
tslib_1.__exportStar(require("./util"), exports); |
/// <reference types="node" /> | ||
import * as fsExtra from 'fs-extra'; | ||
import * as path from 'path'; | ||
import { t } from '../common'; | ||
import { File as file } from '../file'; | ||
@@ -15,2 +16,4 @@ import { glob } from '../glob'; | ||
export declare const fs: { | ||
exists: (path: string) => Promise<boolean>; | ||
writeFile: (path: string, data: any, options?: string | t.IFsWriteFileOptions | undefined) => Promise<void>; | ||
size: { | ||
@@ -37,8 +40,8 @@ toString(input: number | Buffer, options?: import("../size").IFileSizeStringOptions | undefined): string; | ||
unzip: typeof unzip; | ||
path: typeof path; | ||
join: typeof path.join; | ||
resolve: typeof path.resolve; | ||
dirname: typeof path.dirname; | ||
basename: typeof path.basename; | ||
extname: typeof path.extname; | ||
path: path.PlatformPath; | ||
join: (...paths: string[]) => string; | ||
resolve: (...pathSegments: string[]) => string; | ||
dirname: (p: string) => string; | ||
basename: (p: string, ext?: string | undefined) => string; | ||
extname: (p: string) => string; | ||
copy(src: string, dest: string, options?: fsExtra.CopyOptions | undefined): Promise<void>; | ||
@@ -58,2 +61,5 @@ copy(src: string, dest: string, callback: (err: Error) => void): void; | ||
createFileSync(file: string): void; | ||
createSymlink(src: string, dest: string, type: fsExtra.SymlinkType): Promise<void>; | ||
createSymlink(src: string, dest: string, type: fsExtra.SymlinkType, callback?: ((err: Error) => void) | undefined): void; | ||
createSymlinkSync(src: string, dest: string, type: fsExtra.SymlinkType): void; | ||
ensureDir(path: string, options?: number | fsExtra.EnsureOptions | undefined): Promise<void>; | ||
@@ -218,5 +224,2 @@ ensureDir(path: string, options?: number | fsExtra.EnsureOptions | undefined, callback?: ((err: Error) => void) | undefined): void; | ||
write(fd: number, data: any, offset?: number | undefined, encoding?: string | undefined): Promise<fsExtra.WriteResult>; | ||
writeFile(file: string | number | Buffer, data: any, callback: (err: NodeJS.ErrnoException) => void): void; | ||
writeFile(file: string | number | Buffer, data: any, options?: string | fsExtra.WriteFileOptions | undefined): Promise<void>; | ||
writeFile(file: string | number | Buffer, data: any, options: string | fsExtra.WriteFileOptions, callback: (err: NodeJS.ErrnoException) => void): void; | ||
mkdtemp(prefix: string): Promise<string>; | ||
@@ -235,2 +238,4 @@ mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException, folder: string) => void): void; | ||
statSync(path: fsExtra.PathLike): fsExtra.Stats; | ||
statSync(path: fsExtra.PathLike, options: fsExtra.BigIntOptions): fsExtra.BigIntStats; | ||
statSync(path: fsExtra.PathLike, options: fsExtra.StatOptions): fsExtra.Stats | fsExtra.BigIntStats; | ||
fstatSync(fd: number): fsExtra.Stats; | ||
@@ -240,5 +245,5 @@ lstatSync(path: fsExtra.PathLike): fsExtra.Stats; | ||
symlinkSync(target: fsExtra.PathLike, path: fsExtra.PathLike, type?: "file" | "dir" | "junction" | null | undefined): void; | ||
readlinkSync(path: fsExtra.PathLike, options?: "utf-8" | "utf8" | { | ||
readlinkSync(path: fsExtra.PathLike, options?: "utf-8" | "utf8" | "ascii" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex" | { | ||
encoding?: "utf-8" | "utf8" | "ascii" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex" | null | undefined; | ||
} | "ascii" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex" | null | undefined): string; | ||
} | null | undefined): string; | ||
readlinkSync(path: fsExtra.PathLike, options: { | ||
@@ -252,3 +257,3 @@ encoding: "buffer"; | ||
unlinkSync(path: fsExtra.PathLike): void; | ||
rmdirSync(path: fsExtra.PathLike): void; | ||
rmdirSync(path: fsExtra.PathLike, options?: fsExtra.RmDirOptions | undefined): void; | ||
mkdirSync(path: fsExtra.PathLike, options?: string | number | fsExtra.MakeDirectoryOptions | null | undefined): void; | ||
@@ -285,5 +290,5 @@ mkdtempSync(prefix: string, options?: "utf-8" | "utf8" | "ascii" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex" | { | ||
fsyncSync(fd: number): void; | ||
writeSync(fd: number, buffer: fsExtra.BinaryData, offset?: number | null | undefined, length?: number | null | undefined, position?: number | null | undefined): number; | ||
writeSync(fd: number, buffer: NodeJS.ArrayBufferView, offset?: number | null | undefined, length?: number | null | undefined, position?: number | null | undefined): number; | ||
writeSync(fd: number, string: any, position?: number | null | undefined, encoding?: string | null | undefined): number; | ||
readSync(fd: number, buffer: fsExtra.BinaryData, offset: number, length: number, position: number | null): number; | ||
readSync(fd: number, buffer: NodeJS.ArrayBufferView, offset: number, length: number, position: number | null): number; | ||
readFileSync(path: string | number | Buffer | import("url").URL, options?: { | ||
@@ -333,3 +338,2 @@ encoding?: null | undefined; | ||
watch(filename: fsExtra.PathLike, listener?: ((event: string, filename: string) => any) | undefined): fsExtra.FSWatcher; | ||
exists: typeof fsExtra.exists; | ||
existsSync(path: fsExtra.PathLike): boolean; | ||
@@ -343,2 +347,3 @@ accessSync(path: fsExtra.PathLike, mode?: number | undefined): void; | ||
autoClose?: boolean | undefined; | ||
emitClose?: boolean | undefined; | ||
start?: number | undefined; | ||
@@ -354,2 +359,3 @@ end?: number | undefined; | ||
autoClose?: boolean | undefined; | ||
emitClose?: boolean | undefined; | ||
start?: number | undefined; | ||
@@ -360,4 +366,9 @@ highWaterMark?: number | undefined; | ||
copyFileSync(src: fsExtra.PathLike, dest: fsExtra.PathLike, flags?: number | undefined): void; | ||
writev: typeof fsExtra.writev; | ||
writevSync(fd: number, buffers: NodeJS.ArrayBufferView[], position?: number | undefined): number; | ||
opendirSync(path: string, options?: fsExtra.OpenDirOptions | undefined): fsExtra.Dir; | ||
opendir: typeof fsExtra.opendir; | ||
Stats: typeof fsExtra.Stats; | ||
Dirent: typeof fsExtra.Dirent; | ||
Dir: typeof fsExtra.Dir; | ||
ReadStream: typeof fsExtra.ReadStream; | ||
@@ -367,2 +378,3 @@ WriteStream: typeof fsExtra.WriteStream; | ||
promises: typeof fsExtra.promises; | ||
BigIntStats: typeof fsExtra.BigIntStats; | ||
}; |
@@ -17,3 +17,8 @@ "use strict"; | ||
var sort_1 = require("../sort"); | ||
exports.fs = tslib_1.__assign(tslib_1.__assign({}, fsExtra), { size: size_1.size, | ||
var join = path.join, resolve = path.resolve, dirname = path.dirname, basename = path.basename, extname = path.extname; | ||
var exists = function (path) { return fsExtra.pathExists(path); }; | ||
var writeFile = fsExtra.writeFile; | ||
exports.fs = tslib_1.__assign(tslib_1.__assign({}, fsExtra), { exists: exists, | ||
writeFile: writeFile, | ||
size: size_1.size, | ||
stream: stream_1.stream, | ||
@@ -30,2 +35,7 @@ glob: glob_1.glob, | ||
unzip: zip_1.unzip, | ||
path: path, join: path.join, resolve: path.resolve, dirname: path.dirname, basename: path.basename, extname: path.extname }); | ||
path: path, | ||
join: join, | ||
resolve: resolve, | ||
dirname: dirname, | ||
basename: basename, | ||
extname: extname }); |
{ | ||
"name": "@platform/fs", | ||
"version": "0.5.5", | ||
"version": "0.5.7", | ||
"description": "File-system tools.", | ||
@@ -15,3 +15,4 @@ "main": "lib/index", | ||
"dependencies": { | ||
"@types/fs-extra": "8.0.1", | ||
"@platform/fs.types": "0.0.2", | ||
"@types/fs-extra": "8.1.0", | ||
"@types/js-yaml": "3.12.2", | ||
@@ -21,3 +22,3 @@ "archiver": "3.1.1", | ||
"extract-zip": "1.6.7", | ||
"filesize": "6.0.1", | ||
"filesize": "6.1.0", | ||
"fs-extra": "8.1.0", | ||
@@ -31,3 +32,3 @@ "glob": "7.1.6", | ||
"@platform/ts.libs": "3.7.3", | ||
"@types/archiver": "3.0.0", | ||
"@types/archiver": "3.1.0", | ||
"@types/dotenv": "8.2.0", | ||
@@ -34,0 +35,0 @@ "@types/extract-zip": "1.6.2", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
72509
75
1567
11
+ Added@platform/fs.types@0.0.2
+ Added@platform/fs.types@0.0.2(transitive)
+ Added@types/fs-extra@8.1.0(transitive)
+ Addedfilesize@6.1.0(transitive)
- Removed@types/fs-extra@8.0.1(transitive)
- Removedfilesize@6.0.1(transitive)
Updated@types/fs-extra@8.1.0
Updatedfilesize@6.1.0