@fnpm-io/cli
Advanced tools
Comparing version 0.4.10 to 0.4.11
import chalk from "chalk"; | ||
import { link, lstat, mkdir, readdir, copyFile } from "fs/promises"; | ||
import { constants } from "fs"; | ||
import ora from "ora"; | ||
@@ -33,3 +34,4 @@ import path from "path"; | ||
} else { | ||
await copyFile(filePath, targetPath).catch((e)=>{ | ||
// Use clonefile on mac | ||
await copyFile(filePath, targetPath, constants.COPYFILE_FICLONE).catch((e)=>{ | ||
if (e.code === "EEXIST") { | ||
@@ -36,0 +38,0 @@ return; |
@@ -68,2 +68,11 @@ import chalk from "chalk"; | ||
let savedDeps = null; | ||
// Push to downloaded package info | ||
__DOWNLOADED.push({ | ||
name: manifest.name, | ||
version: manifest.version, | ||
// Remove cwd from path | ||
path: pkgProjectDir.replace(process.cwd(), ""), | ||
// Remove homeDir from path | ||
cache: cacheFolder.replace(userFnpmCache, "") | ||
}); | ||
// Check if package is already in cache, searching for file .fnpm | ||
@@ -92,8 +101,2 @@ if (existsSync(`${cacheFolder}/${downloadFile}`)) { | ||
} | ||
__DOWNLOADED.push({ | ||
name: manifest.name, | ||
version: manifest.version, | ||
path: pkgProjectDir.replace(process.cwd(), ""), | ||
cache: cacheFolder.replace(userFnpmCache, "") | ||
}); | ||
} else { | ||
@@ -161,11 +164,2 @@ if (spinner) spinner.text = chalk.green(`Installing ${manifest.name}... ${chalk.grey("(cache miss)")}`); | ||
} | ||
// Push to downloaded package info | ||
__DOWNLOADED.push({ | ||
name: manifest.name, | ||
version: manifest.version, | ||
// Remove cwd from path | ||
path: pkgProjectDir.replace(process.cwd(), ""), | ||
// Remove homeDir from path | ||
cache: cacheFolder.replace(userFnpmCache, "") | ||
}); | ||
return; | ||
@@ -184,11 +178,2 @@ } else { | ||
} | ||
// Push to downloaded package info | ||
__DOWNLOADED.push({ | ||
name: manifest.name, | ||
version: manifest.version, | ||
// Remove cwd from path | ||
path: pkgProjectDir.replace(process.cwd(), ""), | ||
// Remove homeDir from path | ||
cache: cacheFolder.replace(userFnpmCache, "") | ||
}); | ||
return; | ||
@@ -195,0 +180,0 @@ } |
{ | ||
"name": "@fnpm-io/cli", | ||
"version": "0.4.10", | ||
"version": "0.4.11", | ||
"description": "FNPM CLI Tool.", | ||
@@ -5,0 +5,0 @@ "private": false, |
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
58040
1473
27