Comparing version 0.0.4 to 0.0.5
@@ -11,4 +11,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const fs = require('fs'); | ||
function _checkIfDirExists(dirName) { | ||
const fs = require("fs"); | ||
const path = require("path"); | ||
function _checkIfDirExists(cwd, dirName) { | ||
let resolve = null; | ||
@@ -20,3 +21,4 @@ let reject = null; | ||
}); | ||
fs.access(dirName, function (error) { | ||
const fullPath = path.join(cwd, dirName); | ||
fs.access(fullPath, function (error) { | ||
if (error) { | ||
@@ -31,6 +33,6 @@ reject(false); | ||
} | ||
function checkIfDirExists(dirName) { | ||
function checkIfDirExists(cwd, dirName) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
try { | ||
yield _checkIfDirExists(dirName); | ||
yield _checkIfDirExists(cwd, dirName); | ||
return true; | ||
@@ -37,0 +39,0 @@ } |
{ | ||
"name": "mdlinkc", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"lockfileVersion": 1, | ||
@@ -13,2 +13,15 @@ "requires": true, | ||
}, | ||
"bignumber.js": { | ||
"version": "9.0.0", | ||
"resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", | ||
"integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==" | ||
}, | ||
"lambda-math": { | ||
"version": "0.1.1", | ||
"resolved": "https://registry.npmjs.org/lambda-math/-/lambda-math-0.1.1.tgz", | ||
"integrity": "sha512-GlLpjBtgoNTAUUTLOTRmm8Ez5rhZWn5ifRhhjQBaC9bPL3l5EjaBO3Tar0CwHkN/PNAX2dGwOIav/tHbAuqGwg==", | ||
"requires": { | ||
"bignumber.js": "9.0.0" | ||
} | ||
}, | ||
"typescript": { | ||
@@ -15,0 +28,0 @@ "version": "3.1.6", |
{ | ||
"name": "mdlinkc", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"license": "MIT", | ||
@@ -17,3 +17,5 @@ "author": "Valera Rozuvan", | ||
}, | ||
"dependencies": {}, | ||
"dependencies": { | ||
"lambda-math": "^0.1.1" | ||
}, | ||
"devDependencies": { | ||
@@ -20,0 +22,0 @@ "@types/node": "10.12.18", |
@@ -1,4 +0,5 @@ | ||
const fs = require('fs') | ||
import * as fs from 'fs' | ||
import * as path from 'path' | ||
function _checkIfDirExists(dirName) { | ||
function _checkIfDirExists(cwd, dirName) { | ||
let resolve = null | ||
@@ -12,3 +13,5 @@ let reject = null | ||
fs.access(dirName, function (error) { | ||
const fullPath = path.join(cwd, dirName) | ||
fs.access(fullPath, function (error) { | ||
if (error) { | ||
@@ -24,5 +27,5 @@ reject(false) | ||
async function checkIfDirExists(dirName) { | ||
async function checkIfDirExists(cwd, dirName) { | ||
try { | ||
await _checkIfDirExists(dirName) | ||
await _checkIfDirExists(cwd, dirName) | ||
return true | ||
@@ -29,0 +32,0 @@ } catch (err) { |
Sorry, the diff of this file is not supported yet
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
6922
13
132
1
+ Addedlambda-math@^0.1.1
+ Addedbignumber.js@9.0.0(transitive)
+ Addedlambda-math@0.1.1(transitive)