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

@ascot/process

Package Overview
Dependencies
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ascot/process - npm Package Compare versions

Comparing version 2.0.4 to 2.0.5

2

package.json
{
"name": "@ascot/process",
"description": "Tools for managing processes, powered by ascot",
"version": "2.0.4",
"version": "2.0.5",
"license": "SEE LICENSE IN LICENSE.md",

@@ -6,0 +6,0 @@ "dependencies": {

/// <reference types="node" />
import { ChildProcess } from "child_process";
import { processExists } from "process-exists";
export declare namespace Process {
const exists: typeof processExists;
const exists: {
(input: string | number): Promise<boolean>;
all(input: readonly (string | number)[]): Promise<Map<string | number, boolean>>;
filterExists(input: readonly (string | number)[]): (string | number)[];
};
function kill(proc: ChildProcess, signal?: NodeJS.Signals): Promise<void>;
}

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

exports.Process = void 0;
const process_exists_1 = require("process-exists");
const process_exists_1 = __importDefault(require("process-exists"));
const log_1 = __importDefault(require("@ascot/log"));

@@ -13,5 +13,5 @@ const time_1 = __importDefault(require("@ascot/time"));

(function (Process) {
Process.exists = process_exists_1.processExists;
Process.exists = process_exists_1.default;
async function kill(proc, signal) {
if (!await (0, process_exists_1.processExists)(proc.pid))
if (!await (0, process_exists_1.default)(proc.pid))
return; // allready killed

@@ -22,3 +22,3 @@ let exited = false;

let tm = setTimeout(async () => {
if (!await (0, process_exists_1.processExists)(proc.pid))
if (!await (0, process_exists_1.default)(proc.pid))
return; // allready killed

@@ -31,3 +31,3 @@ log_1.default.warn("Process " + log_1.default.colors.gray("#" + proc.pid) + " did not exit in time. Forcing exit...");

proc.kill(signal || "SIGINT");
while (await (0, process_exists_1.processExists)(proc.pid) && !exited)
while (await (0, process_exists_1.default)(proc.pid) && !exited)
await time_1.default.wait(500);

@@ -34,0 +34,0 @@ if (tm)

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