Socket
Socket
Sign inDemoInstall

@cocreate/cli

Package Overview
Dependencies
Maintainers
1
Versions
224
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cocreate/cli - npm Package Compare versions

Comparing version 1.45.2 to 1.45.3

2

package.json
{
"name": "@cocreate/cli",
"version": "1.45.2",
"version": "1.45.3",
"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": [

@@ -31,16 +31,7 @@ const file = require('@cocreate/file')

if (!filename.includes('CoCreate.config.js')) {
const filePath = path.resolve(directory, filename);
if (!filePath.includes('node_modules')) {
const configPath = findClosestConfig(filePath);
if (configPath) {
const config = require(configPath);
if (config) {
await file(config, configPath, filePath)
} else {
console.log('Failed to read or parse CoCreate.config.js.');
}
} else {
console.log('No CoCreate.config file found in parent directories.');
}
const { config, configPath, filePath } = await getConfig(directory, filename);
if (config) {
await file(config, configPath, filePath)
} else {
console.log('Failed to read or parse CoCreate.config.js.');
}

@@ -51,16 +42,15 @@ }

} else {
let CoCreateConfig
if (!args.length) {
let configPath = path.resolve(process.cwd(), 'CoCreate.config.js');
if (!CoCreateConfig && fs.existsSync(configPath)) {
CoCreateConfig = require(configPath);
directory = process.cwd()
const { config, configPath, filePath } = await getConfig(directory);
if (config) {
await file(config, configPath, filePath)
} else {
console.log('CoCreate.config.js could not be found.')
process.exit()
console.log('Failed to read or parse CoCreate.config.js.');
}
await file(CoCreateConfig, configPath)
} else {
for (let arg of args) {
let CoCreateConfig
try {

@@ -72,22 +62,29 @@ CoCreateConfig = JSON.parse(arg)

if (!CoCreateConfig) {
try {
let configPath = path.resolve(process.cwd(), arg)
if (fs.existsSync(configPath)) {
CoCreateConfig = require(configPath);
if (CoCreateConfig)
await file(CoCreateConfig, configPath)
const { config, configPath, filePath } = await getConfig(arg);
if (config) {
await file(config, configPath, filePath)
} else {
console.log('Failed to read or parse CoCreate.config.js.');
}
}
}
}
}
} else {
console.log(arg + ' could not be found.')
process.exit()
}
async function getConfig(directory, filename = '') {
const filePath = path.resolve(directory, filename);
if (!filePath.includes('node_modules')) {
const configPath = findClosestConfig(filePath)
if (configPath) {
return { config: require(configPath), configPath, filePath };
} catch (error) { }
}
} else {
console.log('No CoCreate.config file found in parent directories.');
}
}
}
function findClosestConfig(filePath) {
let currentDir = path.dirname(filePath);
let currentDir = filePath;

@@ -94,0 +91,0 @@ while (currentDir !== '/' && currentDir !== '.') {

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc