@jestaubach/cloner-git
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -11,9 +11,7 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const path_1 = __importDefault(require("path")); | ||
function mock(fsHelpers) { | ||
return jest.fn().mockImplementation((args, cwd) => __awaiter(this, void 0, void 0, function* () { | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const pathLocal = require(`path`); | ||
const fullDest = fsHelpers.getAbsolutePath(cwd || args.slice(-1)[0]).value; | ||
@@ -23,7 +21,7 @@ const usePath = args.filter((cur) => { | ||
}).length > 0 | ||
? path_1.default.resolve(fsHelpers.getAbsolutePath(fullDest).value, args.slice(-1)[0].slice(1)) | ||
? pathLocal.resolve(fsHelpers.getAbsolutePath(fullDest).value, args.slice(-1)[0].slice(1)) | ||
: fullDest; | ||
if (!fsHelpers.checkIfDirExists(usePath).value) { | ||
fsHelpers.createDir(fsHelpers.getAbsolutePath(usePath).value); | ||
fsHelpers.touchFile(`${usePath}${path_1.default.sep}main.tf`); | ||
fsHelpers.touchFile(`${usePath}${pathLocal.sep}main.tf`); | ||
} | ||
@@ -30,0 +28,0 @@ return Promise.resolve({ |
{ | ||
"name": "@jestaubach/cloner-git", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "typescript library template", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
Sorry, the diff of this file is not supported yet
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
10324
132
1