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

@j-o-r/sh

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@j-o-r/sh - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

47

lib/SH.js

@@ -34,23 +34,30 @@ // Copyright 2021 Google LLC

/**
* @typedef {Function} RejectCallback
* @param {Error} error - The error object passed to the callback.
*/
* @typedef {Object.<string, string>} ArgsObject
* @property {string} [key: string] - Any string key maps to an object
* @property {string[]} _ - Array of strings, unnamed parameters
* @description Parsed parameters result.
*/
/**
* @typedef {Function} ResolveCallback
* @param {any} [param] - Optional callback any value
*/
* @typedef {Function} RejectCallback
* @param {Error} error - The error object passed to the callback.
*/
/**
* Creates a new SHDispatch object that represents a command to be executed.
*
* @typedef {Function} Shell
* @property {function(Array, ...*): ProcessPromise} execute - The function to execute the command.
*
* @param {Array} pieces - An array of string literals from a template literal.
* @param {...*} args - The values to be interpolated into the string literals.
* @returns {SHDispatch} Trigger for the command.
* @throws {Error} Throws an error if any of the string literals in `pieces` is undefined.
*
* @example
* const command = await SH`echo 'Hello, world!'`.run();
*/
* @typedef {Function} ResolveCallback
* @param {any} [param] - Optional callback any value
*/
/**
* Creates a new SHDispatch object that represents a command to be executed.
*
* @typedef {Function} Shell
* @property {function(Array, ...*): ProcessPromise} execute - The function to execute the command.
*
* @param {Array} pieces - An array of string literals from a template literal.
* @param {...*} args - The values to be interpolated into the string literals.
* @returns {SHDispatch} Trigger for the command.
* @throws {Error} Throws an error if any of the string literals in `pieces` is undefined.
*
* @example
* const command = await SH`echo 'Hello, world!'`.run();
*/

@@ -263,3 +270,3 @@ /**

* @param {string[]} args - An array of command-line arguments.
* @returns {object} An object where:
* @returns {ArgsObject} An object where:
* - Each key corresponds to an argument that starts with `--`,

@@ -266,0 +273,0 @@ * - The value is either the next argument or `true` if no value is provided,

@@ -5,3 +5,3 @@ {

"type": "module",
"version": "1.1.4",
"version": "1.1.5",
"description": "Execute shell commands on Linux-based systems from javascript",

@@ -8,0 +8,0 @@ "main": "lib/SH.js",

@@ -0,1 +1,4 @@

export type ArgsObject = {
[x: string]: ApiMethod;
};
export type RejectCallback = Function;

@@ -86,3 +89,3 @@ export type ResolveCallback = Function;

* @param {string[]} args - An array of command-line arguments.
* @returns {object} An object where:
* @returns {ArgsObject} An object where:
* - Each key corresponds to an argument that starts with `--`,

@@ -92,26 +95,32 @@ * - The value is either the next argument or `true` if no value is provided,

*/
export function parseArgs(args: string[]): object;
export function parseArgs(args: string[]): ArgsObject;
/**
* @typedef {Function} RejectCallback
* @param {Error} error - The error object passed to the callback.
*/
* @typedef {Object.<string, ApiMethod>} ArgsObject
* @property {string} [key: string] - Any string key maps to an object
* @property {string[]} _ - Array of strings, unnamed parameters
* @description Parse parameters result.
*/
/**
* @typedef {Function} ResolveCallback
* @param {any} [param] - Optional callback any value
*/
* @typedef {Function} RejectCallback
* @param {Error} error - The error object passed to the callback.
*/
/**
* Creates a new SHDispatch object that represents a command to be executed.
*
* @typedef {Function} Shell
* @property {function(Array, ...*): ProcessPromise} execute - The function to execute the command.
*
* @param {Array} pieces - An array of string literals from a template literal.
* @param {...*} args - The values to be interpolated into the string literals.
* @returns {SHDispatch} Trigger for the command.
* @throws {Error} Throws an error if any of the string literals in `pieces` is undefined.
*
* @example
* const command = await SH`echo 'Hello, world!'`.run();
*/
* @typedef {Function} ResolveCallback
* @param {any} [param] - Optional callback any value
*/
/**
* Creates a new SHDispatch object that represents a command to be executed.
*
* @typedef {Function} Shell
* @property {function(Array, ...*): ProcessPromise} execute - The function to execute the command.
*
* @param {Array} pieces - An array of string literals from a template literal.
* @param {...*} args - The values to be interpolated into the string literals.
* @returns {SHDispatch} Trigger for the command.
* @throws {Error} Throws an error if any of the string literals in `pieces` is undefined.
*
* @example
* const command = await SH`echo 'Hello, world!'`.run();
*/
/**
* Determine a javascript type

@@ -118,0 +127,0 @@ *

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