Comparing version 8.3.1-dev.825aa9e to 8.3.1-dev.bf26083
@@ -5,7 +5,2 @@ #!/usr/bin/env node | ||
export declare function main(): Promise<void>; | ||
export declare function runScript(script: string, ext?: string): Promise<void>; | ||
export declare function scriptFromStdin(ext?: string): Promise<boolean>; | ||
export declare function scriptFromHttp(remote: string, _ext?: 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; | ||
@@ -12,0 +7,0 @@ export declare function transformMarkdown(buf: Buffer | string): string; |
#!/usr/bin/env node | ||
"use strict"; | ||
import './deno.js' | ||
import "./deno.js" | ||
import * as __module__ from "./cli.cjs" | ||
const { | ||
startRepl, | ||
argv, | ||
importPath, | ||
injectGlobalRequire, | ||
@@ -14,12 +12,6 @@ isMain, | ||
printUsage, | ||
runScript, | ||
scriptFromHttp, | ||
scriptFromStdin, | ||
transformMarkdown, | ||
writeAndImport | ||
} = __module__ | ||
transformMarkdown | ||
} = globalThis.Deno ? globalThis.require("./cli.cjs") : __module__ | ||
export { | ||
startRepl, | ||
argv, | ||
importPath, | ||
injectGlobalRequire, | ||
@@ -30,8 +22,4 @@ isMain, | ||
printUsage, | ||
runScript, | ||
scriptFromHttp, | ||
scriptFromStdin, | ||
transformMarkdown, | ||
writeAndImport | ||
transformMarkdown | ||
} | ||
@@ -1,2 +0,2 @@ | ||
import { type StdioOptions, type IOType, spawn, spawnSync, type ChildProcess } from 'node:child_process'; | ||
import { type ChildProcess, type IOType, type StdioOptions, spawn, spawnSync } from 'node:child_process'; | ||
import { type Encoding } from 'node:crypto'; | ||
@@ -52,2 +52,6 @@ import { type Readable, type Writable } from 'node:stream'; | ||
export declare const $: Shell & Options; | ||
/** | ||
* State machine stages | ||
*/ | ||
type ProcessStage = 'initial' | 'halted' | 'running' | 'fulfilled' | 'rejected'; | ||
type Resolve = (out: ProcessOutput) => void; | ||
@@ -60,2 +64,3 @@ type PipeMethod = { | ||
export declare class ProcessPromise extends Promise<ProcessOutput> { | ||
private _stage; | ||
private _id; | ||
@@ -72,7 +77,4 @@ private _command; | ||
private _timeoutId?; | ||
private _resolved; | ||
private _halted?; | ||
private _piped; | ||
private _pipedFrom?; | ||
private _run; | ||
private _ee; | ||
@@ -107,4 +109,5 @@ private _stdin; | ||
get output(): ProcessOutput | null; | ||
get stage(): ProcessStage; | ||
stdio(stdin: IOType, stdout?: IOType, stderr?: IOType): ProcessPromise; | ||
nothrow(): ProcessPromise; | ||
nothrow(v?: boolean): ProcessPromise; | ||
quiet(v?: boolean): ProcessPromise; | ||
@@ -118,6 +121,8 @@ verbose(v?: boolean): ProcessPromise; | ||
blob(type?: string): Promise<Blob>; | ||
isHalted(): boolean; | ||
isQuiet(): boolean; | ||
isVerbose(): boolean; | ||
isNothrow(): boolean; | ||
isHalted(): boolean; | ||
private isSettled; | ||
private isRunning; | ||
then<R = ProcessOutput, E = ProcessOutput>(onfulfilled?: ((value: ProcessOutput) => PromiseLike<R> | R) | undefined | null, onrejected?: ((reason: ProcessOutput) => PromiseLike<E> | E) | undefined | null): Promise<R | E>; | ||
@@ -177,2 +182,2 @@ catch<T = ProcessOutput>(onrejected?: ((reason: ProcessOutput) => PromiseLike<T> | T) | undefined | null): Promise<ProcessOutput | T>; | ||
export declare function kill(pid: number, signal?: NodeJS.Signals | undefined): Promise<void>; | ||
export declare function resolveDefaults(defs: Options, prefix?: string, env?: NodeJS.ProcessEnv): Options; | ||
export declare function resolveDefaults(defs?: Options, prefix?: string, env?: NodeJS.ProcessEnv): Options; |
"use strict"; | ||
import './deno.js' | ||
import "./deno.js" | ||
import * as __module__ from "./core.cjs" | ||
@@ -18,3 +18,3 @@ const { | ||
within | ||
} = __module__ | ||
} = globalThis.Deno ? globalThis.require("./core.cjs") : __module__ | ||
export { | ||
@@ -21,0 +21,0 @@ $, |
import { createRequire } from 'node:module' | ||
import * as process from 'node:process' | ||
const require = createRequire(import.meta.url) | ||
const __filename = new URL(import.meta.url).pathname | ||
const __dirname = new URL('.', import.meta.url).pathname | ||
// prettier-ignore | ||
if (globalThis.Deno) { | ||
globalThis.require = createRequire(import.meta.url) | ||
globalThis.__filename = new URL(import.meta.url).pathname | ||
globalThis.__dirname = new URL('.', import.meta.url).pathname | ||
globalThis.module = new Proxy({}, { set() { return true } }) | ||
if (globalThis.Deno) { | ||
globalThis.require = require | ||
globalThis.__filename = __filename | ||
globalThis.__dirname = __dirname | ||
const p = globalThis.process = globalThis.process || process | ||
p.version || (p.version = 'v18.0.0') | ||
p.version || (p.version = { node: '18.0.0' }) | ||
p.env || (p.env = globalThis.Deno.env.toObject()) | ||
p.argv || (p.argv = [globalThis.Deno.execPath(), globalThis.Deno.mainModule.replace('file://', ''), ...globalThis.Deno.args]) | ||
} | ||
export { require, __dirname, __filename } |
@@ -8,2 +8,2 @@ /** | ||
export declare function installDeps(dependencies: Record<string, string>, prefix?: string, registry?: string): Promise<void>; | ||
export declare function parseDeps(content: Buffer | string): Record<string, string>; | ||
export declare function parseDeps(content: string): Record<string, string>; |
"use strict"; | ||
import './deno.js' | ||
import "./deno.js" | ||
import * as __module__ from "./deps.cjs" | ||
@@ -7,3 +7,3 @@ const { | ||
parseDeps | ||
} = __module__ | ||
} = globalThis.Deno ? globalThis.require("./deps.cjs") : __module__ | ||
export { | ||
@@ -10,0 +10,0 @@ installDeps, |
"use strict"; | ||
import './deno.js' | ||
import "./deno.js" | ||
import * as __module__ from "./globals.cjs" | ||
const { | ||
} = __module__ | ||
} = globalThis.Deno ? globalThis.require("./globals.cjs") : __module__ | ||
export { | ||
@@ -8,0 +8,0 @@ |
import { type Duration } from './util.js'; | ||
import { minimist, type RequestInfo, type RequestInit } from './vendor.js'; | ||
import { type RequestInfo, type RequestInit, minimist } from './vendor.js'; | ||
export { default as path } from 'node:path'; | ||
@@ -4,0 +4,0 @@ export * as os from 'node:os'; |
"use strict"; | ||
import './deno.js' | ||
import "./deno.js" | ||
import * as __module__ from "./goods.cjs" | ||
@@ -18,3 +18,3 @@ const { | ||
updateArgv | ||
} = __module__ | ||
} = globalThis.Deno ? globalThis.require("./goods.cjs") : __module__ | ||
export { | ||
@@ -21,0 +21,0 @@ argv, |
"use strict"; | ||
import './deno.js' | ||
import "./deno.js" | ||
import * as __module__ from "./index.cjs" | ||
@@ -50,3 +50,3 @@ const { | ||
updateArgv | ||
} = __module__ | ||
} = globalThis.Deno ? globalThis.require("./index.cjs") : __module__ | ||
export { | ||
@@ -53,0 +53,0 @@ VERSION, |
@@ -1,5 +0,6 @@ | ||
import { type RequestInfo, type RequestInit } from './vendor-core.js'; | ||
import { type Mode } from 'node:fs'; | ||
import { type RequestInfo, type RequestInit, type TSpawnStoreChunks } from './vendor-core.js'; | ||
export { isStringLiteral } from './vendor-core.js'; | ||
export declare function tempdir(prefix?: string): string; | ||
export declare function tempfile(name?: string, data?: string | Buffer): string; | ||
export declare function tempdir(prefix?: string, mode?: Mode): string; | ||
export declare function tempfile(name?: string, data?: string | Buffer, mode?: Mode): string; | ||
export declare function noop(): void; | ||
@@ -9,2 +10,8 @@ export declare function identity<T>(v: T): T; | ||
export declare function isString(obj: any): obj is string; | ||
export declare const bufToString: (buf: Buffer | string) => string; | ||
export declare const bufArrJoin: (arr: TSpawnStoreChunks) => any; | ||
export declare const getLast: <T>(arr: { | ||
length: number; | ||
[i: number]: any; | ||
}) => T; | ||
export declare function preferLocalBin(env: NodeJS.ProcessEnv, ...dirs: (string | undefined)[]): { | ||
@@ -11,0 +18,0 @@ [x: string]: string | undefined; |
"use strict"; | ||
import './deno.js' | ||
import "./deno.js" | ||
import * as __module__ from "./util.cjs" | ||
const { | ||
bufArrJoin, | ||
bufToString, | ||
formatCmd, | ||
getLast, | ||
identity, | ||
@@ -22,5 +25,8 @@ isString, | ||
toCamelCase | ||
} = __module__ | ||
} = globalThis.Deno ? globalThis.require("./util.cjs") : __module__ | ||
export { | ||
bufArrJoin, | ||
bufToString, | ||
formatCmd, | ||
getLast, | ||
identity, | ||
@@ -27,0 +33,0 @@ isString, |
@@ -21,7 +21,10 @@ // Generated by dts-bundle-generator v9.5.1 | ||
}; | ||
type TArrayLike<T> = Iterable<T> & TPushable<T> & TJoinable & { | ||
type TReducible<T, R> = { | ||
reduce<U>(fn: (acc: U, cur: T, i: number, arr: T[]) => U, init: U): R; | ||
}; | ||
type TArrayLike<T> = Iterable<T> & TPushable<T> & TJoinable & TReducible<T, any> & { | ||
length: number; | ||
[i: number]: T | undefined; | ||
}; | ||
type TSpawnStoreChunks = TArrayLike<string | Buffer>; | ||
export type TSpawnStoreChunks = TArrayLike<string | Buffer>; | ||
export type TSpawnStore = { | ||
@@ -28,0 +31,0 @@ stdout: TSpawnStoreChunks; |
"use strict"; | ||
import './deno.js' | ||
import "./deno.js" | ||
import * as __module__ from "./vendor-core.cjs" | ||
@@ -12,3 +12,3 @@ const { | ||
which | ||
} = __module__ | ||
} = globalThis.Deno ? globalThis.require("./vendor-core.cjs") : __module__ | ||
export { | ||
@@ -15,0 +15,0 @@ VoidStream, |
"use strict"; | ||
import './deno.js' | ||
import "./deno.js" | ||
import * as __module__ from "./vendor-extra.cjs" | ||
@@ -53,3 +53,3 @@ const { | ||
default: __default__ | ||
} = __module__ | ||
} = globalThis.Deno ? globalThis.require("./vendor-extra.cjs") : __module__ | ||
export { | ||
@@ -56,0 +56,0 @@ YAML, |
"use strict"; | ||
import './deno.js' | ||
import "./deno.js" | ||
import * as __module__ from "./vendor.cjs" | ||
@@ -60,3 +60,3 @@ const { | ||
default: __default__ | ||
} = __module__ | ||
} = globalThis.Deno ? globalThis.require("./vendor.cjs") : __module__ | ||
export { | ||
@@ -63,0 +63,0 @@ VoidStream, |
{ | ||
"name": "zx", | ||
"version": "8.3.1-dev.825aa9e", | ||
"version": "8.3.1-dev.bf26083", | ||
"description": "A tool for writing better scripts", | ||
@@ -5,0 +5,0 @@ "type": "module", |
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
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
861495
24470