Socket
Socket
Sign inDemoInstall

zx

Package Overview
Dependencies
Maintainers
2
Versions
146
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.2-dev.b3fcad2 to 8.1.2-dev.d8311ce

13

build/cli.d.ts
#!/usr/bin/env node
export {};
import { minimist } from './index.js';
export declare function printUsage(): void;
export declare const argv: minimist.ParsedArgs;
export declare function main(): Promise<void>;
export declare function runScript(script: string): Promise<void>;
export declare function scriptFromStdin(): Promise<boolean>;
export declare function scriptFromHttp(remote: string): Promise<void>;
export declare function writeAndImport(script: string | Buffer, filepath: string, origin?: string): Promise<void>;
export declare function importPath(filepath: string, origin?: string): Promise<void>;
export declare function injectGlobalRequire(origin: string): void;
export declare function transformMarkdown(buf: Buffer): string;
export declare function getVersion(): string;

@@ -5,7 +5,27 @@ #!/usr/bin/env node

const {
argv,
getVersion,
importPath,
injectGlobalRequire,
main,
printUsage,
runScript,
scriptFromHttp,
scriptFromStdin,
transformMarkdown,
writeAndImport
} = require('./cli.cjs')
export {
argv,
getVersion,
importPath,
injectGlobalRequire,
main,
printUsage,
runScript,
scriptFromHttp,
scriptFromStdin,
transformMarkdown,
writeAndImport
}

6

build/core.d.ts

@@ -125,8 +125,8 @@ import { spawn, spawnSync, StdioOptions, IOType } from 'node:child_process';

export type LogEntry = {
verbose?: boolean;
} & ({
kind: 'cmd';
verbose: boolean;
cmd: string;
} | {
kind: 'stdout' | 'stderr';
verbose: boolean;
data: Buffer;

@@ -146,4 +146,4 @@ } | {

data: any;
};
});
export declare function log(entry: LogEntry): void;
export {};

@@ -575,30 +575,18 @@ // Generated by dts-bundle-generator v9.5.1

export declare const chalk: ChalkInstance;
/** Finds all instances of a specified executable in the PATH environment variable */
export declare function which(cmd: string, options: which.Options & which.AsyncOptions & which.OptionsAll): Promise<string[]>;
export declare function which(cmd: string, options?: which.Options & which.AsyncOptions & which.OptionsFirst): Promise<string>;
type AppendNullIfNothrow<TOptions, TRet> = TOptions extends {
nothrow: infer TVal;
} ? TVal extends false ? TRet : TRet | null : TRet;
type TransformToArrayIfAll<TOptions, TRet> = TOptions extends {
all: infer TVal;
} ? TVal extends true ? readonly TRet[] : TVal extends false ? TRet : readonly TRet[] | TRet : TRet;
type ReturnType$1<TOptions> = AppendNullIfNothrow<TOptions, TransformToArrayIfAll<TOptions, string>>;
type Exact<T, U extends T> = {
[Key in keyof U]: Key extends keyof T ? U[Key] : never;
};
export declare function which<TOptions extends which.Options>(cmd: string, options?: Exact<which.Options, TOptions>): Promise<ReturnType$1<Exact<which.Options, TOptions>>>;
export declare namespace which {
/** Finds all instances of a specified executable in the PATH environment variable */
function sync(cmd: string, options: Options & OptionsAll & OptionsNoThrow): readonly string[] | null;
function sync(cmd: string, options: Options & OptionsFirst & OptionsNoThrow): string | null;
function sync(cmd: string, options: Options & OptionsAll & OptionsThrow): readonly string[];
function sync(cmd: string, options?: Options & OptionsFirst & OptionsThrow): string;
function sync(cmd: string, options: Options): string | readonly string[] | null;
/** Options that ask for all matches. */
interface OptionsAll extends AsyncOptions {
all: true;
}
/** Options that ask for the first match (the default behavior) */
interface OptionsFirst extends AsyncOptions {
all?: false | undefined;
}
/** Options that ask to receive null instead of a thrown error */
interface OptionsNoThrow extends Options {
nothrow: true;
}
/** Options that ask for a thrown error if executable is not found (the default behavior) */
interface OptionsThrow extends Options {
nothrow?: false | undefined;
}
/** Options for which() async API */
interface AsyncOptions {
function sync<TOptions extends Options>(cmd: string, options?: Exact<Options, TOptions>): ReturnType$1<Exact<Options, TOptions>>;
/** Options for which() API */
interface Options {
/** If true, return all matches, instead of just the first one. Note that this means the function returns an array of strings instead of a single string. */

@@ -610,5 +598,4 @@ all?: boolean | undefined;

pathExt?: string | undefined;
}
/** Options for which() sync and async APIs */
interface Options extends AsyncOptions {
/** Use instead of the platform's native path separator. */
delimiter?: string | undefined;
/** If true, returns null when not found */

@@ -728,5 +715,13 @@ nothrow?: boolean | undefined;

declare const _default: {
lookup: (query?: TPsLookupQuery, cb?: TPsLookupCallback) => Promise<TPsLookupEntry[]>;
kill: (pid: string | number, opts?: string | number | TPsKillOptions | TPsNext | undefined, next?: TPsNext | undefined) => Promise<void>;
tree: (opts?: string | number | TPsTreeOpts | undefined, cb?: TPsLookupCallback) => Promise<TPsLookupEntry[]>;
lookup: {
(query?: TPsLookupQuery, cb?: TPsLookupCallback): Promise<TPsLookupEntry[]>;
sync: (query?: TPsLookupQuery, cb?: TPsLookupCallback) => TPsLookupEntry[];
};
lookupSync: (query?: TPsLookupQuery, cb?: TPsLookupCallback) => TPsLookupEntry[];
tree: {
(opts?: string | number | TPsTreeOpts | undefined, cb?: TPsLookupCallback | undefined): Promise<TPsLookupEntry[]>;
sync: (opts?: string | number | TPsTreeOpts | undefined, cb?: TPsLookupCallback | undefined) => TPsLookupEntry[];
};
treeSync: (opts?: string | number | TPsTreeOpts | undefined, cb?: TPsLookupCallback | undefined) => TPsLookupEntry[];
};

@@ -733,0 +728,0 @@ export declare const createRequire: (filename: string | URL$1) => NodeRequire;

{
"name": "zx",
"version": "8.1.2-dev.b3fcad2",
"version": "8.1.2-dev.d8311ce",
"description": "A tool for writing better scripts",

@@ -88,4 +88,4 @@ "type": "module",

"optionalDependencies": {
"@types/fs-extra": "^11.0.4",
"@types/node": ">=20.12.12"
"@types/fs-extra": ">=11",
"@types/node": ">=20"
},

@@ -96,5 +96,5 @@ "devDependencies": {

"@types/node": ">=20.11.30",
"@types/which": "^3.0.3",
"@types/which": "^3.0.4",
"@webpod/ingrid": "^0.0.0-beta.3",
"@webpod/ps": "^0.0.0-beta.3",
"@webpod/ps": "^0.0.0-beta.6",
"c8": "^9.1.0",

@@ -119,10 +119,10 @@ "chalk": "^5.3.0",

"node-fetch-native": "^1.6.4",
"prettier": "^3.2.5",
"prettier": "^3.3.1",
"ts-node": "^10.9.2",
"tsd": "^0.31.0",
"tsx": "^4.11.0",
"tsx": "^4.13.2",
"typescript": "^5.4.5",
"which": "^4.0.0",
"yaml": "^2.4.2",
"zurk": "^0.1.4"
"yaml": "^2.4.3",
"zurk": "^0.2.0"
},

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

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