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

mobileui

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mobileui - npm Package Compare versions

Comparing version 1.1.19 to 1.1.20

140

bin/command/command_install.js

@@ -24,3 +24,3 @@ var project = require('../utils/project')

console.log(' ERROR: '.bgRed, 'To install a font you need to pass the font name after the font command.')
console.log('If you need help see de doc: https://mobileui.github.io/#fonts'.grey)
console.log('If you need help see the doc: https://mobileui.github.io/#fonts'.grey)
return false

@@ -33,3 +33,3 @@ }

console.log(' ERROR: '.bgRed, 'To install a template you need to pass the name of template after the template command.')
console.log('If you need help see de doc: https://mobileui.github.io/#templates'.grey)
console.log('If you need help see the doc: https://mobileui.github.io/#templates'.grey)
return false

@@ -44,3 +44,3 @@ }

console.log(' ERROR: '.bgRed, 'To install a environment you need to pass the system build (android, ios, wp).')
console.log('If you need help see de doc: https://mobileui.github.io/#environment'.grey)
console.log('If you need help see the doc: https://mobileui.github.io/#environment'.grey)
return false

@@ -66,62 +66,37 @@ }

install: function (componentName, callback) {
var self = this
var headerRequest = { uri: repoComponents + componentName + '.json', rejectUnauthorized: false }
request(headerRequest, function (error, response, body) {
if (response && response.statusCode === 200) {
var componentJson = JSON.parse(body)
var installedMessage = component.checkInstalled(componentName)
if (!commands.update && installedMessage) {
console.log(' EXIST: '.bgBlue, 'The component ', componentName, ' has already been installed!')
console.log('If you need reinstall put --update in command.'.grey)
callback()
return false
}
component.install(componentJson, function (err) {
if (err) {
console.log(' ERROR: '.bgRed, 'Sorry, the component could not be installed at this time.\n', err)
callback()
return false
}
if (installedMessage) {
console.log(' SUCCESS: '.bgYellow, 'Component ' + componentName + ' updated success!')
} else {
console.log(' SUCCESS: '.bgGreen, 'Component ' + componentName + ' installed success!')
}
if (componentJson.dependencies && componentJson.dependencies.length) {
console.log('> Installing dependent components...'.grey)
var totalDependencies = componentJson.dependencies.length
var totalDownloaded = 0
var installDependency = function () {
var compInstallDepName = componentJson.dependencies[totalDownloaded]
var installedMessage = component.checkInstalled(compInstallDepName)
if (!commands.update && installedMessage) {
var msg = '> The component ' + compInstallDepName + ' has already been installed!'
console.log(msg.grey)
totalDownloaded++
if (totalDependencies === totalDownloaded) {
callback()
} else {
installDependency()
}
require('dns').resolve('www.google.com', function (err) {
if (!err) {
var self = this
var headerRequest = { uri: repoComponents + componentName + '.json', rejectUnauthorized: false }
request(headerRequest, function (error, response, body) {
if (response && response.statusCode === 200) {
var componentJson = JSON.parse(body)
var installedMessage = component.checkInstalled(componentName)
if (!commands.update && installedMessage) {
console.log(' EXIST: '.bgBlue, 'The component ', componentName, ' has already been installed!')
console.log('If you need reinstall put --update in command.'.grey)
callback()
return false
}
component.install(componentJson, function (err) {
if (err) {
console.log(' ERROR: '.bgRed, 'Sorry, the component could not be installed at this time.\n', err)
callback()
return false
}
if (installedMessage) {
console.log(' SUCCESS: '.bgYellow, 'Component ' + componentName + ' updated success!')
} else {
var headerRequest = { uri: repoComponents + compInstallDepName + '.json', rejectUnauthorized: false }
request(headerRequest, function (error, response, body) {
if (response && response.statusCode === 200) {
var componentJsonDep = JSON.parse(body)
component.install(componentJsonDep, function (err) {
if (err) return console.log(' ERROR: '.bgRed, 'Sorry, the component could not be installed at this time.\n', err)
if (installedMessage) {
console.log(' SUCCESS: '.bgYellow, 'Component ' + compInstallDepName + ' updated success!')
} else {
console.log(' SUCCESS: '.bgGreen, 'Component ' + compInstallDepName + ' installed success!')
}
totalDownloaded++
if (totalDependencies === totalDownloaded) {
callback()
} else {
installDependency()
}
})
} else {
console.log(' ERROR: '.bgRed, 'Component ' + componentJson.dependencies[totalDownloaded] + ' not exist.')
console.log(' SUCCESS: '.bgGreen, 'Component ' + componentName + ' installed success!')
}
if (componentJson.dependencies && componentJson.dependencies.length) {
console.log('> Installing dependent components...'.grey)
var totalDependencies = componentJson.dependencies.length
var totalDownloaded = 0
var installDependency = function () {
var compInstallDepName = componentJson.dependencies[totalDownloaded]
var installedMessage = component.checkInstalled(compInstallDepName)
if (!commands.update && installedMessage) {
var msg = '> The component ' + compInstallDepName + ' has already been installed!'
console.log(msg.grey)
totalDownloaded++

@@ -133,8 +108,40 @@ if (totalDependencies === totalDownloaded) {

}
} else {
var headerRequest = { uri: repoComponents + compInstallDepName + '.json', rejectUnauthorized: false }
request(headerRequest, function (error, response, body) {
if (response && response.statusCode === 200) {
var componentJsonDep = JSON.parse(body)
component.install(componentJsonDep, function (err) {
if (err) return console.log(' ERROR: '.bgRed, 'Sorry, the component could not be installed at this time.\n', err)
if (installedMessage) {
console.log(' SUCCESS: '.bgYellow, 'Component ' + compInstallDepName + ' updated success!')
} else {
console.log(' SUCCESS: '.bgGreen, 'Component ' + compInstallDepName + ' installed success!')
}
totalDownloaded++
if (totalDependencies === totalDownloaded) {
callback()
} else {
installDependency()
}
})
} else {
console.log(' ERROR: '.bgRed, 'Component ' + componentJson.dependencies[totalDownloaded] + ' not exist.')
totalDownloaded++
if (totalDependencies === totalDownloaded) {
callback()
} else {
installDependency()
}
}
})
}
})
}
installDependency()
} else {
callback()
}
}
installDependency()
})
} else {
console.log(' ERROR: '.bgRed, 'Component ' + componentName + ' not exist.')
callback()

@@ -144,4 +151,3 @@ }

} else {
console.log(' ERROR: '.bgRed, 'Component ' + componentName + ' not exist.')
callback()
console.log(' ERROR: '.bgRed, 'You must be connected with the outside world.')
}

@@ -148,0 +154,0 @@ })

{
"name": "mobileui",
"version": "1.1.19",
"version": "1.1.20",
"description": "MobileUI is a simple and easy NPM package to install UI Components for web mobile apps using HTML, CSS and JavaScript.",
"main": "./bin/mobileui",
"scripts": {
"test": "./node_modules/.bin/mocha --timeout 120000 --reporter spec"
"test": "./node_modules/.bin/mocha --timeout 120000 --reporter spec",
"preinstall": "npx npm-force-resolutions"
},

@@ -28,11 +29,15 @@ "repository": {

"dependencies": {
"chokidar": "^1.6.1",
"colors": "^1.1.2",
"finalhandler": "^1.0.2",
"minimist": "^1.2.0",
"request": "^2.75.0",
"serve-static": "^1.12.1",
"socket.io": "^2.1.1",
"chokidar": "^3.5.1",
"colors": "^1.4.0",
"finalhandler": "^1.1.2",
"graceful-fs": "^4.2.6",
"minimist": "^1.2.5",
"request": "^2.88.2",
"serve-static": "^1.14.1",
"socket.io": "^3.1.2",
"unzip": "^0.1.11"
},
"resolutions": {
"graceful-fs": "^4.2.4"
},
"bin": {

@@ -39,0 +44,0 @@ "mobileui": "./bin/mobileui"

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