@platform/fs
Advanced tools
Comparing version 0.1.7 to 0.2.0
/// <reference types="node" /> | ||
import * as fsExtra from 'fs-extra'; | ||
import * as path from 'path'; | ||
import { File } from '../file'; | ||
import { File as file } from '../file'; | ||
import { glob } from '../glob'; | ||
@@ -9,2 +9,4 @@ import { is } from '../is'; | ||
import { unzip, zip } from '../zip'; | ||
import { ancestor } from '../ancestor'; | ||
import { match } from '../match'; | ||
export declare const fs: { | ||
@@ -22,4 +24,6 @@ size: { | ||
glob: typeof glob; | ||
file: typeof File; | ||
file: typeof file; | ||
ancestor: typeof ancestor; | ||
merge: typeof merge; | ||
match: typeof match; | ||
is: typeof is; | ||
@@ -26,0 +30,0 @@ zip: typeof zip; |
@@ -12,4 +12,10 @@ "use strict"; | ||
var zip_1 = require("../zip"); | ||
var ancestor_1 = require("../ancestor"); | ||
var match_1 = require("../match"); | ||
exports.fs = tslib_1.__assign({}, fsExtra, { size: size_1.size, | ||
glob: glob_1.glob, file: file_1.File, merge: merge_1.merge, | ||
glob: glob_1.glob, | ||
file: file_1.File, | ||
ancestor: ancestor_1.ancestor, | ||
merge: merge_1.merge, | ||
match: match_1.match, | ||
is: is_1.is, | ||
@@ -16,0 +22,0 @@ zip: zip_1.zip, |
export declare type IGlobOptions = { | ||
type?: 'FILES' | 'DIRS'; | ||
includeDirs?: boolean; | ||
dot?: boolean; | ||
cache?: {}; | ||
statCache?: {}; | ||
realpathCache?: {}; | ||
}; | ||
export declare function find(pattern: string, options?: IGlobOptions): Promise<string[]>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var fg = require("fast-glob"); | ||
var glob = require("glob"); | ||
function find(pattern, options) { | ||
@@ -9,15 +9,14 @@ var _this = this; | ||
return new Promise(function (resolve, reject) { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var _a, type, _b, dot, onlyDirectories, args, res; | ||
return tslib_1.__generator(this, function (_c) { | ||
switch (_c.label) { | ||
case 0: | ||
_a = options.type, type = _a === void 0 ? 'FILES' : _a, _b = options.dot, dot = _b === void 0 ? false : _b; | ||
onlyDirectories = type === 'DIRS' ? true : false; | ||
args = { onlyDirectories: onlyDirectories, unique: true, dot: dot }; | ||
return [4, fg(pattern, args)]; | ||
case 1: | ||
res = _c.sent(); | ||
resolve(res); | ||
return [2]; | ||
} | ||
var _a, dot, includeDirs, cache, statCache, realpathCache, nodir, args; | ||
return tslib_1.__generator(this, function (_b) { | ||
_a = options.dot, dot = _a === void 0 ? false : _a, includeDirs = options.includeDirs, cache = options.cache, statCache = options.statCache, realpathCache = options.realpathCache; | ||
nodir = !Boolean(includeDirs); | ||
args = { dot: dot, nodir: nodir, cache: cache, statCache: statCache, realpathCache: realpathCache }; | ||
glob(pattern, args, function (err, paths) { | ||
if (err) { | ||
return reject(err); | ||
} | ||
resolve(paths); | ||
}); | ||
return [2]; | ||
}); | ||
@@ -24,0 +23,0 @@ }); }); |
export * from './fs'; | ||
export { File } from './file'; |
@@ -5,3 +5,1 @@ "use strict"; | ||
tslib_1.__exportStar(require("./fs"), exports); | ||
var file_1 = require("./file"); | ||
exports.File = file_1.File; |
{ | ||
"name": "@platform/fs", | ||
"version": "0.1.7", | ||
"version": "0.2.0", | ||
"description": "File-system tools.", | ||
@@ -17,18 +17,22 @@ "main": "lib/index", | ||
"@types/js-yaml": "3.12.1", | ||
"archiver": "3.0.3", | ||
"archiver": "3.1.1", | ||
"extract-zip": "1.6.7", | ||
"fast-glob": "3.0.4", | ||
"filesize": "4.1.2", | ||
"fs-extra": "8.1.0", | ||
"js-yaml": "3.13.1" | ||
"glob": "7.1.4", | ||
"js-yaml": "3.13.1", | ||
"minimatch": "3.0.4" | ||
}, | ||
"devDependencies": { | ||
"@platform/test": "0.0.60", | ||
"@platform/ts.libs": "3.5.5", | ||
"@platform/test": "0.0.61", | ||
"@platform/ts.libs": "3.5.6", | ||
"@types/archiver": "3.0.0", | ||
"@types/extract-zip": "1.6.2", | ||
"@types/filesize": "^4.1.0" | ||
"@types/filesize": "4.1.0", | ||
"@types/glob": "7.1.1" | ||
}, | ||
"files": [ | ||
"lib" | ||
"lib", | ||
"!lib/test", | ||
"!*.TEST.{js, mjs, d.ts}" | ||
], | ||
@@ -35,0 +39,0 @@ "repository": "uiharness/platform", |
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
59
5
60835
9
6
1235
+ Addedglob@7.1.4
+ Addedminimatch@3.0.4
+ Addedarchiver@3.1.1(transitive)
+ Addedglob@7.1.4(transitive)
+ Addedminimatch@3.0.4(transitive)
- Removedfast-glob@3.0.4
- Removed@nodelib/fs.scandir@2.1.5(transitive)
- Removed@nodelib/fs.stat@2.0.5(transitive)
- Removed@nodelib/fs.walk@1.2.8(transitive)
- Removedarchiver@3.0.3(transitive)
- Removedbraces@3.0.3(transitive)
- Removedfast-glob@3.0.4(transitive)
- Removedfastq@1.17.1(transitive)
- Removedfill-range@7.1.1(transitive)
- Removedglob@7.2.3(transitive)
- Removedglob-parent@5.1.2(transitive)
- Removedis-extglob@2.1.1(transitive)
- Removedis-glob@4.0.3(transitive)
- Removedis-number@7.0.0(transitive)
- Removedmerge2@1.4.1(transitive)
- Removedmicromatch@4.0.8(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedpicomatch@2.3.1(transitive)
- Removedqueue-microtask@1.2.3(transitive)
- Removedreusify@1.0.4(transitive)
- Removedrun-parallel@1.2.0(transitive)
- Removedto-regex-range@5.0.1(transitive)
Updatedarchiver@3.1.1