@cocreate/cli
Advanced tools
Comparing version 1.32.1 to 1.32.2
@@ -0,1 +1,9 @@ | ||
## [1.32.2](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.32.1...v1.32.2) (2023-06-11) | ||
### Bug Fixes | ||
* renamed db to storage ([fa41daf](https://github.com/CoCreate-app/CoCreate-cli/commit/fa41daf2344f2c8768bfd2db10c58ce4bad403be)) | ||
* renamed hosts to host. the value can be a string or an array of strings ([932f60b](https://github.com/CoCreate-app/CoCreate-cli/commit/932f60bdd7890da296b9d4d5ea92c9c7aeb9398c)) | ||
## [1.32.1](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.32.0...v1.32.1) (2023-06-10) | ||
@@ -2,0 +10,0 @@ |
@@ -13,3 +13,3 @@ module.exports = { | ||
"src": "{{./docs/index.html}}", | ||
"hosts": [ | ||
"host": [ | ||
"*", | ||
@@ -16,0 +16,0 @@ "general.cocreate.app" |
{ | ||
"name": "@cocreate/cli", | ||
"version": "1.32.1", | ||
"version": "1.32.2", | ||
"description": "Polyrepo management bash CLI tool. Run all git commands and yarn commands on multiple repositories. Also includes a few custom macros for cloning, installing, etc.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -74,10 +74,17 @@ const readline = require('readline'); | ||
config[key] = process.env[key]; | ||
} else if (localConfig[key]) { | ||
config[key] = localConfig[key]; | ||
} else if (globalConfig[key]) { | ||
config[key] = globalConfig[key]; | ||
} else if (prompt || prompt === '') { | ||
config[key] = await promptForInput(prompt || `${key}: `); | ||
if (processEnv) process.env[key] = config[key]; | ||
if (updateGlobal) update = true; | ||
} else { | ||
if (localConfig[key]) { | ||
config[key] = localConfig[key]; | ||
} else if (globalConfig[key]) { | ||
config[key] = globalConfig[key]; | ||
} else if (prompt || prompt === '') { | ||
config[key] = await promptForInput(prompt || `${key}: `); | ||
if (updateGlobal) update = true; | ||
} | ||
if (processEnv) { | ||
if (typeof config[key] === 'object') | ||
process.env[key] = JSON.stringify(config[key]); | ||
else | ||
process.env[key] = config[key]; | ||
} | ||
} | ||
@@ -84,0 +91,0 @@ } |
@@ -42,3 +42,3 @@ let glob = require("glob"); | ||
"src": "{{./docs/index.html}}", | ||
"hosts": [ | ||
"host": [ | ||
"general.cocreate.app" | ||
@@ -60,3 +60,3 @@ ], | ||
console.log("Document_id Undefined: ", MdPath); | ||
if (document_id.length != 24 && document_id.length != 0 ) | ||
if (document_id.length != 24 && document_id.length != 0) | ||
console.log("Document_id not valid! please check your config: ", MdPath); | ||
@@ -63,0 +63,0 @@ else { |
@@ -43,2 +43,14 @@ const fs = require('fs') | ||
if (fs.existsSync(dest)) { | ||
if (!cwdNodeModulesPath.includes('/CoCreateJS')) { | ||
let isSymlink = await isSymlinkDirectory(dest) | ||
if (isSymlink) { | ||
const targetPath = await getSymlinkTargetPath(dest); | ||
if (targetPath.includes('/CoCreateJS')) { | ||
console.warn('symlink already exists with CoCreateJS') | ||
return | ||
} | ||
} | ||
} | ||
fs.rm(dest, { recursive: true, force: true }, function (err) { | ||
@@ -115,1 +127,21 @@ if (err) { | ||
} | ||
async function isSymlinkDirectory(path) { | ||
try { | ||
const stats = await fs.promises.lstat(path); | ||
return stats.isSymbolicLink(); | ||
} catch (err) { | ||
throw err; | ||
} | ||
} | ||
async function getSymlinkTargetPath(symlinkPath) { | ||
try { | ||
const target = await fs.promises.readlink(symlinkPath); | ||
const targetPath = fs.realpathSync(target); | ||
return targetPath; | ||
} catch (err) { | ||
throw err; | ||
} | ||
} | ||
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
177577
2465
43