Comparing version 1.1.19 to 1.1.20
@@ -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" |
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
58243
830
9
1
4
+ Addedgraceful-fs@^4.2.6
+ Added@types/component-emitter@1.2.14(transitive)
+ Added@types/cookie@0.4.1(transitive)
+ Added@types/cors@2.8.17(transitive)
+ Added@types/node@22.10.7(transitive)
+ Addedanymatch@3.1.3(transitive)
+ Addedbinary-extensions@2.3.0(transitive)
+ Addedbraces@3.0.3(transitive)
+ Addedchokidar@3.6.0(transitive)
+ Addedcors@2.8.5(transitive)
+ Addeddebug@4.3.7(transitive)
+ Addedengine.io@4.1.2(transitive)
+ Addedengine.io-parser@4.0.3(transitive)
+ Addedfill-range@7.1.1(transitive)
+ Addedfsevents@2.3.3(transitive)
+ Addedglob-parent@5.1.2(transitive)
+ Addedis-binary-path@2.1.0(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-glob@4.0.3(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addednormalize-path@3.0.0(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedreaddirp@3.6.0(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsocket.io@3.1.2(transitive)
+ Addedsocket.io-adapter@2.1.0(transitive)
+ Addedsocket.io-parser@4.0.5(transitive)
+ Addedto-regex-range@5.0.1(transitive)
+ Addedundici-types@6.20.0(transitive)
+ Addedvary@1.1.2(transitive)
+ Addedws@7.4.6(transitive)
- Removedafter@0.8.2(transitive)
- Removedanymatch@1.3.2(transitive)
- Removedarr-diff@2.0.04.0.0(transitive)
- Removedarr-flatten@1.1.0(transitive)
- Removedarr-union@3.1.0(transitive)
- Removedarray-unique@0.2.10.3.2(transitive)
- Removedarraybuffer.slice@0.0.7(transitive)
- Removedassign-symbols@1.0.0(transitive)
- Removedasync-each@1.0.6(transitive)
- Removedatob@2.1.2(transitive)
- Removedbacko2@1.0.2(transitive)
- Removedbase@0.11.2(transitive)
- Removedbinary-extensions@1.13.1(transitive)
- Removedbindings@1.5.0(transitive)
- Removedblob@0.0.5(transitive)
- Removedbraces@1.8.52.3.2(transitive)
- Removedcache-base@1.0.1(transitive)
- Removedchokidar@1.7.0(transitive)
- Removedclass-utils@0.3.6(transitive)
- Removedcollection-visit@1.0.0(transitive)
- Removedcomponent-bind@1.0.0(transitive)
- Removedcomponent-emitter@1.2.1(transitive)
- Removedcomponent-inherit@0.0.3(transitive)
- Removedcopy-descriptor@0.1.1(transitive)
- Removeddebug@3.1.04.1.1(transitive)
- Removeddecode-uri-component@0.2.2(transitive)
- Removeddefine-property@0.2.51.0.02.0.2(transitive)
- Removedengine.io@3.6.2(transitive)
- Removedengine.io-client@3.5.4(transitive)
- Removedengine.io-parser@2.2.1(transitive)
- Removedexpand-brackets@0.1.52.1.4(transitive)
- Removedexpand-range@1.8.2(transitive)
- Removedextend-shallow@2.0.13.0.2(transitive)
- Removedextglob@0.3.22.0.4(transitive)
- Removedfile-uri-to-path@1.0.0(transitive)
- Removedfilename-regex@2.0.1(transitive)
- Removedfill-range@2.2.44.0.0(transitive)
- Removedfor-in@1.0.2(transitive)
- Removedfor-own@0.1.5(transitive)
- Removedfragment-cache@0.2.1(transitive)
- Removedfsevents@1.2.13(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-value@2.0.6(transitive)
- Removedglob-base@0.3.0(transitive)
- Removedglob-parent@2.0.0(transitive)
- Removedhas-binary2@1.0.3(transitive)
- Removedhas-cors@1.1.0(transitive)
- Removedhas-value@0.3.11.0.0(transitive)
- Removedhas-values@0.1.41.0.0(transitive)
- Removedhasown@2.0.2(transitive)
- Removedindexof@0.0.1(transitive)
- Removedis-accessor-descriptor@1.0.1(transitive)
- Removedis-binary-path@1.0.1(transitive)
- Removedis-buffer@1.1.6(transitive)
- Removedis-data-descriptor@1.0.1(transitive)
- Removedis-descriptor@0.1.71.0.3(transitive)
- Removedis-dotfile@1.0.3(transitive)
- Removedis-equal-shallow@0.1.3(transitive)
- Removedis-extendable@0.1.11.0.1(transitive)
- Removedis-extglob@1.0.0(transitive)
- Removedis-glob@2.0.1(transitive)
- Removedis-number@2.1.03.0.04.0.0(transitive)
- Removedis-plain-object@2.0.4(transitive)
- Removedis-posix-bracket@0.1.1(transitive)
- Removedis-primitive@2.0.0(transitive)
- Removedis-windows@1.0.2(transitive)
- Removedisarray@1.0.02.0.1(transitive)
- Removedisobject@2.1.03.0.1(transitive)
- Removedkind-of@3.2.24.0.06.0.3(transitive)
- Removedmap-cache@0.2.2(transitive)
- Removedmap-visit@1.0.0(transitive)
- Removedmath-random@1.0.4(transitive)
- Removedmicromatch@2.3.113.1.10(transitive)
- Removedmixin-deep@1.3.2(transitive)
- Removednan@2.22.0(transitive)
- Removednanomatch@1.2.13(transitive)
- Removednormalize-path@2.1.1(transitive)
- Removedobject-copy@0.1.0(transitive)
- Removedobject-visit@1.0.1(transitive)
- Removedobject.omit@2.0.1(transitive)
- Removedobject.pick@1.3.0(transitive)
- Removedparse-glob@3.0.4(transitive)
- Removedparseqs@0.0.6(transitive)
- Removedparseuri@0.0.6(transitive)
- Removedpascalcase@0.1.1(transitive)
- Removedposix-character-classes@0.1.1(transitive)
- Removedpreserve@0.2.0(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedrandomatic@3.1.1(transitive)
- Removedreadable-stream@2.3.8(transitive)
- Removedreaddirp@2.2.1(transitive)
- Removedregex-cache@0.4.4(transitive)
- Removedregex-not@1.0.2(transitive)
- Removedremove-trailing-separator@1.1.0(transitive)
- Removedrepeat-element@1.1.4(transitive)
- Removedrepeat-string@1.6.1(transitive)
- Removedresolve-url@0.2.1(transitive)
- Removedret@0.1.15(transitive)
- Removedsafe-buffer@5.1.2(transitive)
- Removedsafe-regex@1.1.0(transitive)
- Removedset-value@2.0.1(transitive)
- Removedsnapdragon@0.8.2(transitive)
- Removedsnapdragon-node@2.1.1(transitive)
- Removedsnapdragon-util@3.0.1(transitive)
- Removedsocket.io@2.5.1(transitive)
- Removedsocket.io-adapter@1.1.2(transitive)
- Removedsocket.io-client@2.5.0(transitive)
- Removedsocket.io-parser@3.3.43.4.3(transitive)
- Removedsource-map@0.5.7(transitive)
- Removedsource-map-resolve@0.5.3(transitive)
- Removedsource-map-url@0.4.1(transitive)
- Removedsplit-string@3.1.0(transitive)
- Removedstatic-extend@0.1.2(transitive)
- Removedstring_decoder@1.1.1(transitive)
- Removedto-array@0.1.4(transitive)
- Removedto-object-path@0.3.0(transitive)
- Removedto-regex@3.0.2(transitive)
- Removedto-regex-range@2.1.1(transitive)
- Removedunion-value@1.0.1(transitive)
- Removedunset-value@1.0.0(transitive)
- Removedurix@0.1.0(transitive)
- Removeduse@3.1.1(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedws@7.5.10(transitive)
- Removedxmlhttprequest-ssl@1.6.3(transitive)
- Removedyeast@0.1.2(transitive)
Updatedchokidar@^3.5.1
Updatedcolors@^1.4.0
Updatedfinalhandler@^1.1.2
Updatedminimist@^1.2.5
Updatedrequest@^2.88.2
Updatedserve-static@^1.14.1
Updatedsocket.io@^3.1.2