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

zx

Package Overview
Dependencies
Maintainers
2
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zx - npm Package Compare versions

Comparing version 8.1.7 to 8.1.8-dev.88a545a

75

build/core.d.ts

@@ -7,12 +7,5 @@ import { type StdioOptions, type IOType, spawn, spawnSync } from 'node:child_process';

import { type Duration, noop, quote } from './util.js';
export interface Shell {
(pieces: TemplateStringsArray, ...args: any[]): ProcessPromise;
(opts: Partial<Options>): Shell;
sync: {
(pieces: TemplateStringsArray, ...args: any[]): ProcessOutput;
(opts: Partial<Options>): Shell;
};
}
declare const CWD: unique symbol;
declare const SYNC: unique symbol;
export declare function within<R>(callback: () => R): R;
export interface Options {

@@ -46,7 +39,13 @@ [CWD]: string;

}
export declare function syncProcessCwd(flag?: boolean): void;
export declare const defaults: Options;
export declare function usePowerShell(): void;
export declare function usePwsh(): void;
export declare function useBash(): void;
export interface Shell<S = false, R = S extends true ? ProcessOutput : ProcessPromise> {
(pieces: TemplateStringsArray, ...args: any[]): R;
<O extends Partial<Options> = Partial<Options>, R = O extends {
sync: true;
} ? Shell<true> : Shell>(opts: O): R;
sync: {
(pieces: TemplateStringsArray, ...args: any[]): ProcessOutput;
(opts: Partial<Omit<Options, 'sync'>>): Shell<true>;
};
}
export declare const $: Shell & Options;

@@ -57,4 +56,2 @@ type Resolve = (out: ProcessOutput) => void;

private _from;
private _resolve;
private _reject;
private _snapshot;

@@ -66,3 +63,3 @@ private _stdio?;

private _timeout?;
private _timeoutSignal;
private _timeoutSignal?;
private _resolved;

@@ -73,2 +70,4 @@ private _halted;

private _output;
private _reject;
private _resolve;
_prerun: typeof noop;

@@ -78,2 +77,5 @@ _postrun: typeof noop;

run(): ProcessPromise;
pipe(dest: Writable | ProcessPromise | TemplateStringsArray, ...args: any[]): ProcessPromise;
abort(reason?: string): void;
kill(signal?: NodeJS.Signals | undefined): Promise<void>;
get cmd(): string;

@@ -85,2 +87,10 @@ get child(): import("child_process").ChildProcess | undefined;

get exitCode(): Promise<number | null>;
get signal(): AbortSignal | undefined;
get output(): ProcessOutput | null;
stdio(stdin: IOType, stdout?: IOType, stderr?: IOType): ProcessPromise;
nothrow(): ProcessPromise;
quiet(v?: boolean): ProcessPromise;
verbose(v?: boolean): ProcessPromise;
timeout(d: Duration, signal?: NodeJS.Signals | undefined): ProcessPromise;
halt(): ProcessPromise;
json<T = any>(): Promise<T>;

@@ -91,20 +101,21 @@ text(encoding?: Encoding): Promise<string>;

blob(type?: string): Promise<Blob>;
then<R = ProcessOutput, E = ProcessOutput>(onfulfilled?: ((value: ProcessOutput) => PromiseLike<R> | R) | undefined | null, onrejected?: ((reason: ProcessOutput) => PromiseLike<E> | E) | undefined | null): Promise<R | E>;
catch<T = ProcessOutput>(onrejected?: ((reason: ProcessOutput) => PromiseLike<T> | T) | undefined | null): Promise<ProcessOutput | T>;
pipe(dest: Writable | ProcessPromise | TemplateStringsArray, ...args: any[]): ProcessPromise;
abort(reason?: string): void;
get signal(): AbortSignal | undefined;
kill(signal?: NodeJS.Signals | undefined): Promise<void>;
stdio(stdin: IOType, stdout?: IOType, stderr?: IOType): ProcessPromise;
nothrow(): ProcessPromise;
quiet(v?: boolean): ProcessPromise;
verbose(v?: boolean): ProcessPromise;
isHalted(): boolean;
isQuiet(): boolean;
isVerbose(): boolean;
isNothrow(): boolean;
timeout(d: Duration, signal?: NodeJS.Signals | undefined): ProcessPromise;
halt(): ProcessPromise;
isHalted(): boolean;
get output(): ProcessOutput | null;
then<R = ProcessOutput, E = ProcessOutput>(onfulfilled?: ((value: ProcessOutput) => PromiseLike<R> | R) | undefined | null, onrejected?: ((reason: ProcessOutput) => PromiseLike<E> | E) | undefined | null): Promise<R | E>;
catch<T = ProcessOutput>(onrejected?: ((reason: ProcessOutput) => PromiseLike<T> | T) | undefined | null): Promise<ProcessOutput | T>;
}
type GettersRecord<T extends Record<any, any>> = {
[K in keyof T]: () => T[K];
};
type ProcessOutputLazyDto = GettersRecord<{
code: number | null;
signal: NodeJS.Signals | null;
stdout: string;
stderr: string;
stdall: string;
message: string;
duration: number;
}>;
export declare class ProcessOutput extends Error {

@@ -117,2 +128,3 @@ private readonly _code;

private readonly _duration;
constructor(dto: ProcessOutputLazyDto);
constructor(code: number | null, signal: NodeJS.Signals | null, stdout: string, stderr: string, combined: string, message: string, duration?: number);

@@ -135,3 +147,6 @@ toString(): string;

}
export declare function within<R>(callback: () => R): R;
export declare function usePowerShell(): void;
export declare function usePwsh(): void;
export declare function useBash(): void;
export declare function syncProcessCwd(flag?: boolean): void;
export declare function cd(dir: string | ProcessOutput): void;

@@ -138,0 +153,0 @@ export declare function kill(pid: number, signal?: NodeJS.Signals | undefined): Promise<void>;

2

build/goods.d.ts

@@ -5,3 +5,3 @@ import { type Duration } from './util.js';

export * as os from 'node:os';
export declare let argv: minimist.ParsedArgs;
export declare const argv: minimist.ParsedArgs;
export declare function updateArgv(args: string[]): void;

@@ -8,0 +8,0 @@ export declare function sleep(duration: Duration): Promise<unknown>;

@@ -20,1 +20,2 @@ export { isStringLiteral } from './vendor-core.js';

export declare function getCallerLocationFromString(stackString?: string): string;
export declare const once: <T extends (...args: any[]) => any>(fn: T) => (...args: Parameters<T>) => ReturnType<T>;

@@ -12,2 +12,3 @@ "use strict";

noop,
once,
parseDuration,

@@ -30,2 +31,3 @@ preferLocalBin,

noop,
once,
parseDuration,

@@ -32,0 +34,0 @@ preferLocalBin,

@@ -9,3 +9,3 @@ // Generated by dts-bundle-generator v9.5.1

export declare const isStringLiteral: (pieces: any) => any;
export declare const isStringLiteral: (pieces: any, ...rest: any[]) => pieces is TemplateStringsArray;
type TQuote = (input: string) => string;

@@ -21,3 +21,7 @@ export declare const buildCmd: (quote: TQuote, pieces: TemplateStringsArray, args: any[], subs?: TSubstitute) => string | Promise<string>;

};
type TSpawnStoreChunks = Iterable<string | Buffer> & TPushable<string | Buffer> & TJoinable;
type TArrayLike<T> = Iterable<T> & TPushable<T> & TJoinable & {
length: number;
[i: number]: T | undefined;
};
type TSpawnStoreChunks = TArrayLike<string | Buffer>;
export type TSpawnStore = {

@@ -322,3 +326,3 @@ stdout: TSpawnStoreChunks;

declare const _default: {
kill: (pid: string | number, opts?: string | number | TPsKillOptions | TPsNext | undefined, next?: TPsNext | undefined) => Promise<void>;
kill: (pid: string | number, opts?: TPsNext | TPsKillOptions | TPsKillOptions["signal"], next?: TPsNext) => Promise<void>;
lookup: {

@@ -330,6 +334,6 @@ (query?: TPsLookupQuery, cb?: TPsLookupCallback): Promise<TPsLookupEntry[]>;

tree: {
(opts?: string | number | TPsTreeOpts | undefined, cb?: TPsLookupCallback | undefined): Promise<TPsLookupEntry[]>;
sync: (opts?: string | number | TPsTreeOpts | undefined, cb?: TPsLookupCallback | undefined) => TPsLookupEntry[];
(opts?: string | number | TPsTreeOpts | undefined, cb?: TPsLookupCallback): Promise<TPsLookupEntry[]>;
sync: (opts?: string | number | TPsTreeOpts | undefined, cb?: TPsLookupCallback) => TPsLookupEntry[];
};
treeSync: (opts?: string | number | TPsTreeOpts | undefined, cb?: TPsLookupCallback | undefined) => TPsLookupEntry[];
treeSync: (opts?: string | number | TPsTreeOpts | undefined, cb?: TPsLookupCallback) => TPsLookupEntry[];
};

@@ -336,0 +340,0 @@ export type RequestInfo = Parameters<typeof globalThis.fetch>[0];

{
"name": "zx",
"version": "8.1.7",
"version": "8.1.8-dev.88a545a",
"description": "A tool for writing better scripts",

@@ -100,3 +100,3 @@ "type": "module",

"@webpod/ingrid": "^0.0.0-beta.3",
"@webpod/ps": "^0.0.0-beta.7",
"@webpod/ps": "^0.0.0-beta.8",
"c8": "^10.1.2",

@@ -129,3 +129,3 @@ "chalk": "^5.3.0",

"yaml": "^2.5.1",
"zurk": "^0.3.2"
"zurk": "^0.4.4"
},

@@ -132,0 +132,0 @@ "publishConfig": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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