Comparing version 1.10.0 to 1.10.1
@@ -17,5 +17,9 @@ // Copyright 2021 Google LLC | ||
import {Readable, Writable} from 'stream' | ||
import {createReadStream, createWriteStream, promises as _fs} from 'fs' | ||
import * as _os from 'os' | ||
import * as _chalk from 'chalk' | ||
interface $ { | ||
(pieces: TemplateStringsArray, ...args: any[]): ProcessPromise<ProcessOutput> | ||
verbose: boolean | ||
@@ -28,11 +32,7 @@ shell: string | ||
export const $: $ | ||
export function cd(path: string): void | ||
export function question(query?: string, options?: QuestionOptions): Promise<string> | ||
export type cd = (path: string) => void | ||
export type sleep = (ms: number) => Promise<void> | ||
export type question = (query?: string, options?: QuestionOptions) => Promise<string> | ||
export type QuestionOptions = { choices: string[] } | ||
export function sleep(ms: number): Promise<void> | ||
export interface ProcessPromise<T> extends Promise<T> { | ||
@@ -43,3 +43,4 @@ child: ChildProcess | ||
readonly stderr: Readable | ||
pipe(dest: ProcessPromise<ProcessOutput>|Writable): ProcessPromise<ProcessOutput> | ||
pipe(dest: ProcessPromise<ProcessOutput> | Writable): ProcessPromise<ProcessOutput> | ||
} | ||
@@ -51,3 +52,17 @@ | ||
readonly stderr: string | ||
toString(): string | ||
} | ||
declare global { | ||
export const $: $ | ||
export const cd: cd | ||
export const sleep: sleep | ||
export const question: question | ||
export const chalk: typeof _chalk | ||
export const fs: typeof _fs & { | ||
createWriteStream: typeof createWriteStream | ||
createReadStream: typeof createReadStream | ||
} | ||
export const os: typeof _os | ||
} |
{ | ||
"name": "zx", | ||
"version": "1.10.0", | ||
"version": "1.10.1", | ||
"description": "A tool for writing better scripts", | ||
@@ -5,0 +5,0 @@ "main": "index.mjs", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33273
527