@adonisjs/sink
Advanced tools
Comparing version 2.0.9 to 2.0.10
{ | ||
"name": "@adonisjs/sink", | ||
"version": "2.0.9", | ||
"version": "2.0.10", | ||
"description": "Utilities to create AdonisJs boilerplates and custom providers", | ||
@@ -74,3 +74,2 @@ "main": "index.js", | ||
"@poppinss/utils": "^1.0.4", | ||
"empty-dir": "^2.0.0", | ||
"kleur": "^3.0.3", | ||
@@ -77,0 +76,0 @@ "mrm-core": "^3.3.0" |
@@ -1,1 +0,1 @@ | ||
export declare function isEmptyDir(location: string, filterFn?: (filePath: string) => boolean): boolean; | ||
export declare function isEmptyDir(location: string): boolean; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const emptyDir = require("empty-dir"); | ||
function isEmptyDir(location, filterFn) { | ||
const fs_1 = require("fs"); | ||
function isEmptyDir(location) { | ||
try { | ||
return emptyDir.sync(location, filterFn); | ||
const files = fs_1.readdirSync(location); | ||
return files.length === 0; | ||
} | ||
catch (error) { | ||
return false; | ||
return error.code === 'ENOENT'; | ||
} | ||
} | ||
exports.isEmptyDir = isEmptyDir; |
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
4
764
28615
4
- Removedempty-dir@^2.0.0
- Removedempty-dir@2.0.0(transitive)