New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

install-bin

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

install-bin - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

4

lib/installer.d.ts

@@ -0,1 +1,2 @@

import { AxiosRequestConfig } from 'axios';
import { Binary } from './binary';

@@ -7,6 +8,7 @@ import { LogLevelFilterString } from './logger';

logLevel?: LogLevelFilterString;
requestConfig?: AxiosRequestConfig;
}
export declare const makeInstaller: ({ root, binary, logLevel, }: MakeInstallerParams) => {
export declare const makeInstaller: ({ root, binary, logLevel, requestConfig, }: MakeInstallerParams) => {
install: () => Promise<void>;
binaryPath: string;
};

@@ -22,3 +22,3 @@ "use strict";

const logger_1 = require("./logger");
const makeInstaller = ({ root, binary, logLevel = 'info', }) => {
const makeInstaller = ({ root, binary, logLevel = 'info', requestConfig, }) => {
const logger = new logger_1.Logger(logLevel);

@@ -40,3 +40,3 @@ const installDirectory = node_path_1.default.join(root, 'node_modules', '.bin');

try {
const res = yield axios_1.default.get(binary.url, { responseType: 'stream' });
const res = yield axios_1.default.get(binary.url, Object.assign(Object.assign({}, requestConfig), { responseType: 'stream' }));
yield new Promise((resolve, reject) => {

@@ -43,0 +43,0 @@ res.data

{
"name": "install-bin",
"version": "0.2.0",
"version": "0.3.0",
"repository": "git@github.com:maxdeviant/install-bin.git",

@@ -5,0 +5,0 @@ "author": "Marshall Bowers <elliott.codes@gmail.com>",

@@ -1,2 +0,2 @@

import axios from 'axios';
import axios, { AxiosRequestConfig } from 'axios';
import { existsSync } from 'node:fs';

@@ -13,2 +13,3 @@ import fs from 'node:fs/promises';

logLevel?: LogLevelFilterString;
requestConfig?: AxiosRequestConfig;
}

@@ -20,2 +21,3 @@

logLevel = 'info',
requestConfig,
}: MakeInstallerParams) => {

@@ -45,3 +47,6 @@ const logger = new Logger(logLevel);

try {
const res = await axios.get(binary.url, { responseType: 'stream' });
const res = await axios.get(binary.url, {
...requestConfig,
responseType: 'stream',
});

@@ -48,0 +53,0 @@ await new Promise((resolve, reject) => {

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