cx-protofetch
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -1,3 +0,4 @@ | ||
const { Binary } = require('binary-install'); | ||
const os = require('os'); | ||
import { Binary } from 'simple-binary-install'; | ||
import * as os from 'os'; | ||
import * as fs from 'fs'; | ||
@@ -31,5 +32,5 @@ function getPlatform() { | ||
function getBinary() { | ||
export function getBinary() { | ||
const platform = getPlatform(); | ||
const version = require('./package.json').version; | ||
const { version } = JSON.parse(fs.readFileSync('./package.json')); | ||
const url = `https://github.com/coralogix/protofetch/releases/download/v${version}/protofetch_${platform}.tar.gz`; | ||
@@ -40,3 +41,1 @@ const name = 'protofetch'; | ||
} | ||
module.exports = getBinary; |
{ | ||
"name": "cx-protofetch", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "A source dependency management tool for Protobuf.", | ||
@@ -8,2 +8,3 @@ "repository": "https://github.com/coralogix/protofetch.git", | ||
"license": "Apache-2.0", | ||
"type": "module", | ||
"bin": { | ||
@@ -16,8 +17,4 @@ "protofetch": "run.js" | ||
"dependencies": { | ||
"binary-install": "^1.0.1" | ||
"simple-binary-install": "^0.2.1" | ||
}, | ||
"devDependencies": { | ||
"ncp": "^2.0.0", | ||
"vuepress": "^1.9.7" | ||
}, | ||
"keywords": [ | ||
@@ -24,0 +21,0 @@ "proto", |
#!/usr/bin/env node | ||
const getBinary = require('./getBinary'); | ||
import { getBinary } from './getBinary.js'; | ||
const binary = getBinary(); | ||
binary.run(); | ||
getBinary().run(); |
@@ -1,13 +0,5 @@ | ||
function getBinary({ fatal }) { | ||
try { | ||
return require('./getBinary')(); | ||
} catch (err) { | ||
if (fatal) throw err; | ||
} | ||
} | ||
import { getBinary } from './getBinary.js'; | ||
if (process.argv.includes('install')) { | ||
const binary = getBinary({ fatal: true }); | ||
if (binary) binary.install(); | ||
getBinary().install(); | ||
} | ||
Sorry, the diff of this file is not supported yet
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
0
Yes
2476
37
2
+ Addedsimple-binary-install@^0.2.1
+ Addedb4a@1.6.7(transitive)
+ Addedbare-events@2.5.4(transitive)
+ Addedfast-fifo@1.3.2(transitive)
+ Addedsimple-binary-install@0.2.1(transitive)
+ Addedstreamx@2.22.0(transitive)
+ Addedtar-stream@3.1.6(transitive)
+ Addedtext-decoder@1.2.3(transitive)
- Removedbinary-install@^1.0.1
- Removedaxios@0.26.1(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbinary-install@1.1.0(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedchownr@2.0.0(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedfollow-redirects@1.15.9(transitive)
- Removedfs-minipass@2.1.0(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedglob@7.2.3(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedminipass@3.3.65.0.0(transitive)
- Removedminizlib@2.1.2(transitive)
- Removedmkdirp@1.0.4(transitive)
- Removedonce@1.4.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedrimraf@3.0.2(transitive)
- Removedtar@6.2.1(transitive)
- Removedwrappy@1.0.2(transitive)
- Removedyallist@4.0.0(transitive)