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

@travetto/exec

Package Overview
Dependencies
Maintainers
1
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@travetto/exec - npm Package Compare versions

Comparing version 0.0.11 to 0.0.12

6

package.json

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

"@types/cross-spawn": "^6.0.0",
"@types/rimraf": "^2.0.2",
"cross-spawn": "^6.0.5",
"rimraf": "^2.6.2"
"cross-spawn": "^6.0.5"
},

@@ -22,3 +20,3 @@ "description": "",

},
"version": "0.0.11"
"version": "0.0.12"
}
travetto: Exec
===
This module provides general operations for running commands:
This module provides general operations for working with processes
- Will allow for running a single command.
- Will allow for running commands through a pool of workers.
- Handles cross-spawn utility for cases where it matters
- Allows for running a single command
- Allows for running commands through a pool of workers
- Defaults to `cross-spawn` where possible.
- Provides constructs for managing IPC (inter-process communication)
- Allows for running docker operations with proper handling of execution
- Will catch when the docker container has run away, and will terminate within timeouts
import * as fs from 'fs';
import * as path from 'path';
import * as rimraf from 'rimraf';
import * as util from 'util';

@@ -9,6 +8,6 @@ import * as child_process from 'child_process';

import { spawn, WithOpts } from './util';
import { scanDir, Entry, rimraf } from '@travetto/base';
const mkdir = util.promisify(fs.mkdir);
const writeFile = util.promisify(fs.writeFile);
const rimrafProm = util.promisify(rimraf);

@@ -101,3 +100,3 @@ function exec(command: string, opts?: WithOpts<child_process.SpawnOptions>) {

try {
await rimrafProm(`${this.workspace}/*`);
await rimraf(`${this.workspace}/*`);
} catch (e) { /* ignore */ }

@@ -104,0 +103,0 @@ }

import * as cp from 'child_process';
import * as crossSpawn from 'cross-spawn';
import { ExecutionOptions, ExecutionResult } from './types';
import { scanDir, Entry } from '@travetto/base';

@@ -5,0 +6,0 @@ export function enhanceProcess(p: cp.ChildProcess, options: ExecutionOptions) {

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