New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.32 to 0.0.33

2

package.json

@@ -17,3 +17,3 @@ {

},
"version": "0.0.32"
"version": "0.0.33"
}
import { DockerContainer } from './docker';
import { AppEnv } from '@travetto/base';
import { spawn } from './util';
import { ChildProcess } from 'child_process';
import { ExecutionResult, CommonProcess } from './types';

@@ -9,2 +8,4 @@

private _initPromise: Promise<any>;
container: DockerContainer;

@@ -15,2 +16,3 @@

imageStartCommand?: string;
checkLocal?: () => Promise<boolean>;
imageCommand?: (args: string[]) => string[];

@@ -21,4 +23,7 @@ processCommand?: (args: string[]) => string[];

async init() {
if (AppEnv.docker && (this.config.docker === undefined || !!this.config.docker)) {
async _init() {
const canUseDocker = AppEnv.docker && (this.config.docker === undefined || !!this.config.docker);
const useDocker = canUseDocker && (!this.config.checkLocal || (await this.config.checkLocal()));
if (useDocker) {
this.container = new DockerContainer(this.config.image)

@@ -33,3 +38,12 @@ .forceDestroyOnShutdown()

exec(...args: string[]) {
async init() {
if (!this._initPromise) {
this._initPromise = this._init();
}
return await this._initPromise;
}
async exec(...args: string[]) {
await this.init();
let exec;

@@ -36,0 +50,0 @@ if (this.container) {

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

import { CommonProcess, ChildOptions, ExecutionResult } from './types';
import { CommonProcess, ExecutionResult } from './types';
import { spawn, WithOpts } from './util';
import { Shutdown, rimraf, isPlainObject } from '@travetto/base';
import { CpuInfo } from 'os';
import { Shutdown, rimraf } from '@travetto/base';
const writeFile = util.promisify(fs.writeFile);
const mkTempDir = util.promisify(fs.mkdtemp);
const mkdir = util.promisify(fs.mkdir);

@@ -16,0 +14,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