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

cli-eb-test

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli-eb-test - npm Package Compare versions

Comparing version 2.12.0 to 2.13.0

41

lib/Installer.js

@@ -6,7 +6,7 @@ const exec = require('child_process').exec

const ProgressBar = require('progress')
const spawnSync = require('child_process').spawnSync
const UpdateCheck = require('./UpdateCheck')
const url = 'http://raw.githubusercontent.com/eduardoboucas/cli/master/core/bin/dadi-macos'
const Installer = function ({cachePath, targetDirectory}) {
this.baseUrl = 'http://raw.githubusercontent.com/eduardoboucas/cli/master/core/bin/'
this.cachePath = cachePath

@@ -42,4 +42,39 @@ this.targetDirectory = targetDirectory

Installer.prototype.detectPlatform = function () {
const platform = process.platform
if (platform !== 'linux') {
return platform
}
const ldd = spawnSync('ldd', [
process.execPath
]).stdout.toString()
return /\bmusl\b/.test(ldd) ? 'alpine' : platform
}
Installer.prototype.getBinaryURLForPlatform = function () {
switch (this.detectPlatform()) {
case 'alpine':
return this.baseUrl + 'dadi-alpine'
case 'darwin':
return this.baseUrl + 'dadi-macos'
case 'linux':
return this.baseUrl + 'dadi-linux'
case 'win32':
return this.baseUrl + 'dadi-win.exe'
default:
throw new Error('PLATFORM_NOT_SUPPORTED')
}
}
Installer.prototype.install = function (newVersion) {
return fetch(url, {
const binaryUrl = this.getBinaryURLForPlatform()
return fetch(binaryUrl, {
compress: false

@@ -46,0 +81,0 @@ }).then(res => {

2

package.json
{
"name": "cli-eb-test",
"version": "2.12.0",
"version": "2.13.0",
"description": "A command-line tool for installation and customisation of the DADI platform",

@@ -5,0 +5,0 @@ "bin": {

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