Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

edp

Package Overview
Dependencies
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

edp - npm Package Compare versions

Comparing version 1.0.0-beta.10 to 1.0.0-beta.11

lib/util.js

10

lib/cli.js

@@ -100,3 +100,3 @@ /**

var commandNode = cmd.getCommand( args );
var commandModule = commandNode.module;
var commandModule = commandNode ? commandNode.module : null;

@@ -108,3 +108,3 @@ if ( !commandModule || !commandModule.cli ) {

edp.log.error( 'DEBUG INFO: → %s',
require.resolve( providerPackage ) );
util.resolve( providerPackage ) );

@@ -145,4 +145,4 @@ return;

var dir = path.join( __dirname, '..', 'node_modules', providerPackage );
if ( !fs.existsSync( dir ) ) {
var util = require( './util' );
if ( !util.isInstalled( providerPackage ) ) {
// 不存在,直接安装

@@ -156,3 +156,3 @@ edp.log.info( 'Install %s automatically', providerPackage );

try {
require( providerPackage );
util.require( providerPackage );
}

@@ -159,0 +159,0 @@ catch( ex ) {

@@ -19,6 +19,11 @@ /**

exports.getPackageCommands = function( pkg ) {
var dir = path.resolve( __dirname, '../node_modules', pkg );
var tempNode = new CommandNode( {}, pkg );
scanDir( path.join( dir, 'cli' ), tempNode );
return tempNode.children;
try {
var dir = require( './util' ).resolve( pkg );
var tempNode = new CommandNode( {}, pkg );
scanDir( path.join( dir, 'cli' ), tempNode );
return tempNode.children;
}
catch( ex ) {
return null;
}
};

@@ -77,2 +82,6 @@

if ( !pkgCommands ) {
return null;
}
var command = pkgCommands[ commandName ];

@@ -79,0 +88,0 @@ if ( !command ) {

@@ -13,10 +13,31 @@ /**

function getPackages( pattern, dir ) {
dir = dir || path.join( __dirname, '..', 'node_modules' );
function filter( item ) {
if ( item === 'edp-dev' || item === 'edp' ) {
return false;
}
var pkgs = fs.readdirSync( dir )
.filter( function( item ){
return pattern.test( item );
});
return pattern.test( item );
}
return pkgs;
var pkgs = [];
if ( dir ) {
pkgs = fs.readdirSync( dir );
}
else {
// /foo/bar/edp
// /foo/bar/edp/node_modules/edp-build
// /foo/bar/edp/node_modules/edp-webserver
// ...
dir = path.join( __dirname, '..', 'node_modules' );
pkgs = pkgs.concat( fs.readdirSync( dir ) );
// /foo/bar/edp
// /foo/bar/edp-build
// /foo/bar/edp-webserver
// ...
dir = path.join( __dirname, '..', '..' );
pkgs = pkgs.concat( fs.readdirSync( dir ) );
}
return pkgs.filter( filter );
}

@@ -23,0 +44,0 @@

{
"name": "edp",
"description": "Enterprise Develop Platform",
"version": "1.0.0-beta.10",
"version": "1.0.0-beta.11",
"contributors": [

@@ -6,0 +6,0 @@ { "name": "errorrik", "email": "errorrik@gmail.com" },

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