rman 0.28.1 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/rman.mjs +1 -1
- package/cjs/cli.js +18 -18
- package/cjs/commands/build-command.js +3 -8
- package/cjs/commands/changed-command.js +6 -9
- package/cjs/commands/ci-command.js +8 -14
- package/cjs/commands/execute-command.js +23 -27
- package/cjs/commands/info-command.js +15 -21
- package/cjs/commands/list-command.js +32 -35
- package/cjs/commands/multi-task-command.js +13 -15
- package/cjs/commands/publish-command.js +24 -26
- package/cjs/commands/run-command.js +34 -34
- package/cjs/commands/version-command.js +35 -37
- package/cjs/core/command.js +19 -24
- package/cjs/core/logger.js +2 -4
- package/cjs/core/package.js +3 -5
- package/cjs/core/repository.js +9 -11
- package/cjs/index.js +2 -15
- package/cjs/utils/exec.js +7 -8
- package/cjs/utils/file-utils.js +10 -10
- package/cjs/utils/get-dirname.js +6 -9
- package/cjs/utils/git-utils.js +10 -10
- package/cjs/utils/npm-run-path.js +6 -9
- package/cjs/utils/npm-utils.js +3 -2
- package/esm/cli.js +12 -9
- package/esm/commands/build-command.js +3 -8
- package/esm/commands/changed-command.js +6 -9
- package/esm/commands/ci-command.js +4 -8
- package/esm/commands/execute-command.js +20 -22
- package/esm/commands/info-command.js +11 -15
- package/esm/commands/list-command.js +27 -28
- package/esm/commands/multi-task-command.js +11 -11
- package/esm/commands/publish-command.js +20 -20
- package/esm/commands/run-command.js +31 -29
- package/esm/commands/version-command.js +29 -29
- package/esm/core/command.js +13 -16
- package/esm/core/repository.js +3 -3
- package/esm/utils/exec.js +6 -6
- package/esm/utils/file-utils.js +4 -1
- package/esm/utils/get-dirname.js +1 -1
- package/esm/utils/git-utils.js +8 -6
- package/esm/utils/npm-utils.js +3 -2
- package/package.json +6 -54
- package/esm/cli.d.ts +0 -4
- package/esm/commands/build-command.d.ts +0 -11
- package/esm/commands/changed-command.d.ts +0 -16
- package/esm/commands/ci-command.d.ts +0 -24
- package/esm/commands/execute-command.d.ts +0 -19
- package/esm/commands/info-command.d.ts +0 -10
- package/esm/commands/list-command.d.ts +0 -38
- package/esm/commands/multi-task-command.d.ts +0 -22
- package/esm/commands/publish-command.d.ts +0 -22
- package/esm/commands/run-command.d.ts +0 -28
- package/esm/commands/version-command.d.ts +0 -25
- package/esm/core/command.d.ts +0 -35
- package/esm/core/constants.d.ts +0 -1
- package/esm/core/logger.d.ts +0 -12
- package/esm/core/package.d.ts +0 -13
- package/esm/core/repository.d.ts +0 -19
- package/esm/index.d.ts +0 -1
- package/esm/utils/exec.d.ts +0 -19
- package/esm/utils/file-utils.d.ts +0 -5
- package/esm/utils/get-dirname.d.ts +0 -2
- package/esm/utils/git-utils.d.ts +0 -25
- package/esm/utils/npm-run-path.d.ts +0 -67
- package/esm/utils/npm-utils.d.ts +0 -12
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Task } from 'power-tasks';
|
|
2
|
-
import yargs from 'yargs';
|
|
3
|
-
import { Package } from '../core/package.js';
|
|
4
|
-
import { Repository } from '../core/repository.js';
|
|
5
|
-
import { MultiTaskCommand } from './multi-task-command.js';
|
|
6
|
-
export declare class ExecuteCommand extends MultiTaskCommand<ExecuteCommand.Options> {
|
|
7
|
-
readonly repository: Repository;
|
|
8
|
-
cmd: string;
|
|
9
|
-
argv?: string[] | undefined;
|
|
10
|
-
static commandName: string;
|
|
11
|
-
constructor(repository: Repository, cmd: string, argv?: string[] | undefined, options?: ExecuteCommand.Options);
|
|
12
|
-
protected _prepareTasks(packages: Package[]): Task[];
|
|
13
|
-
}
|
|
14
|
-
export declare namespace ExecuteCommand {
|
|
15
|
-
interface Options extends MultiTaskCommand.Options {
|
|
16
|
-
}
|
|
17
|
-
const cliCommandOptions: Record<string, yargs.Options>;
|
|
18
|
-
function initCli(repository: Repository, program: yargs.Argv): void;
|
|
19
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import yargs from 'yargs';
|
|
2
|
-
import { Command } from '../core/command.js';
|
|
3
|
-
import { Repository } from '../core/repository.js';
|
|
4
|
-
export declare class InfoCommand extends Command {
|
|
5
|
-
static commandName: string;
|
|
6
|
-
protected _execute(): Promise<any>;
|
|
7
|
-
}
|
|
8
|
-
export declare namespace InfoCommand {
|
|
9
|
-
function initCli(repository: Repository, program: yargs.Argv): void;
|
|
10
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import EasyTable from 'easy-table';
|
|
2
|
-
import yargs from 'yargs';
|
|
3
|
-
import { Command } from '../core/command.js';
|
|
4
|
-
import { Package } from '../core/package.js';
|
|
5
|
-
import { Repository } from '../core/repository.js';
|
|
6
|
-
export declare class ListCommand<TOptions extends ListCommand.Options = ListCommand.Options> extends Command<TOptions> {
|
|
7
|
-
readonly repository: Repository;
|
|
8
|
-
static commandName: string;
|
|
9
|
-
onPrepare?(pkg: Package, data: ListCommand.PackageOutput): ListCommand.PackageOutput;
|
|
10
|
-
onPrintTable?(pkg: Package, data: ListCommand.PackageOutput, table: EasyTable): ListCommand.PackageOutput;
|
|
11
|
-
constructor(repository: Repository, options?: TOptions);
|
|
12
|
-
protected _filter(pkg: Package, inf: {
|
|
13
|
-
isDirty?: boolean;
|
|
14
|
-
isCommitted?: boolean;
|
|
15
|
-
}): boolean;
|
|
16
|
-
protected _execute(): Promise<any>;
|
|
17
|
-
}
|
|
18
|
-
export declare namespace ListCommand {
|
|
19
|
-
interface Options {
|
|
20
|
-
json?: boolean;
|
|
21
|
-
parseable?: boolean;
|
|
22
|
-
short?: boolean;
|
|
23
|
-
toposort?: boolean;
|
|
24
|
-
graph?: boolean;
|
|
25
|
-
changed?: boolean;
|
|
26
|
-
filter?: string | ((pkg: Package) => boolean);
|
|
27
|
-
}
|
|
28
|
-
interface PackageOutput {
|
|
29
|
-
name: string;
|
|
30
|
-
version?: string;
|
|
31
|
-
location?: string;
|
|
32
|
-
private?: boolean;
|
|
33
|
-
isDirty?: boolean;
|
|
34
|
-
isCommitted?: boolean;
|
|
35
|
-
}
|
|
36
|
-
const cliCommandOptions: Record<string, yargs.Options>;
|
|
37
|
-
function initCli(repository: Repository, program: yargs.Argv): void;
|
|
38
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Task } from 'power-tasks';
|
|
2
|
-
import yargs from 'yargs';
|
|
3
|
-
import { Command } from '../core/command.js';
|
|
4
|
-
import { Package } from '../core/package.js';
|
|
5
|
-
import { Repository } from '../core/repository.js';
|
|
6
|
-
export declare abstract class MultiTaskCommand<TOptions extends MultiTaskCommand.Options = MultiTaskCommand.Options> extends Command<TOptions> {
|
|
7
|
-
readonly repository: Repository;
|
|
8
|
-
protected _task?: Task;
|
|
9
|
-
protected constructor(repository: Repository, options?: TOptions);
|
|
10
|
-
protected _execute(): Promise<any>;
|
|
11
|
-
protected _getPackages(): Promise<Package[]>;
|
|
12
|
-
protected abstract _prepareTasks(packages: Package[]): Task[] | Promise<Task[]> | void;
|
|
13
|
-
}
|
|
14
|
-
export declare namespace MultiTaskCommand {
|
|
15
|
-
interface Options extends Command.GlobalOptions {
|
|
16
|
-
concurrency?: number;
|
|
17
|
-
parallel?: boolean;
|
|
18
|
-
bail?: boolean;
|
|
19
|
-
progress?: boolean;
|
|
20
|
-
}
|
|
21
|
-
const cliCommandOptions: Record<string, yargs.Options>;
|
|
22
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Task } from 'power-tasks';
|
|
2
|
-
import yargs from 'yargs';
|
|
3
|
-
import { Package } from '../core/package.js';
|
|
4
|
-
import { Repository } from '../core/repository.js';
|
|
5
|
-
import { ExecuteCommandResult } from '../utils/exec.js';
|
|
6
|
-
import { RunCommand } from './run-command.js';
|
|
7
|
-
export declare class PublishCommand extends RunCommand<PublishCommand.Options> {
|
|
8
|
-
readonly repository: Repository;
|
|
9
|
-
static commandName: string;
|
|
10
|
-
constructor(repository: Repository, options?: PublishCommand.Options);
|
|
11
|
-
protected _prepareTasks(packages: Package[]): Promise<Task[]>;
|
|
12
|
-
protected _exec(pkg: Package, command: string, args: {}, options?: any): Promise<ExecuteCommandResult>;
|
|
13
|
-
}
|
|
14
|
-
export declare namespace PublishCommand {
|
|
15
|
-
interface Options extends RunCommand.Options {
|
|
16
|
-
contents?: string;
|
|
17
|
-
access?: string;
|
|
18
|
-
checkOnly?: boolean;
|
|
19
|
-
}
|
|
20
|
-
const cliCommandOptions: Record<string, yargs.Options>;
|
|
21
|
-
function initCli(repository: Repository, program: yargs.Argv): void;
|
|
22
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Task } from 'power-tasks';
|
|
2
|
-
import yargs from 'yargs';
|
|
3
|
-
import { Package } from '../core/package.js';
|
|
4
|
-
import { Repository } from '../core/repository.js';
|
|
5
|
-
import { ExecuteCommandResult } from '../utils/exec.js';
|
|
6
|
-
import { MultiTaskCommand } from './multi-task-command.js';
|
|
7
|
-
export declare class RunCommand<TOptions extends RunCommand.Options> extends MultiTaskCommand<TOptions> {
|
|
8
|
-
readonly repository: Repository;
|
|
9
|
-
script: string;
|
|
10
|
-
static commandName: string;
|
|
11
|
-
constructor(repository: Repository, script: string, options?: TOptions);
|
|
12
|
-
protected _prepareTasks(packages: Package[], options?: any): Task[] | Promise<Task[]>;
|
|
13
|
-
protected _prepareScriptTask(pkg: Package, options?: any): Task | undefined;
|
|
14
|
-
protected _exec(pkg: Package, command: string, args: {
|
|
15
|
-
stdio?: 'inherit' | 'pipe';
|
|
16
|
-
cwd?: string;
|
|
17
|
-
json?: any;
|
|
18
|
-
logLevel?: string;
|
|
19
|
-
noThrow?: boolean;
|
|
20
|
-
script?: string;
|
|
21
|
-
}, options?: any): Promise<ExecuteCommandResult>;
|
|
22
|
-
}
|
|
23
|
-
export declare namespace RunCommand {
|
|
24
|
-
interface Options extends MultiTaskCommand.Options {
|
|
25
|
-
}
|
|
26
|
-
const cliCommandOptions: Record<string, yargs.Options>;
|
|
27
|
-
function initCli(repository: Repository, program: yargs.Argv): void;
|
|
28
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Task } from 'power-tasks';
|
|
2
|
-
import yargs from 'yargs';
|
|
3
|
-
import { Package } from '../core/package.js';
|
|
4
|
-
import { Repository } from '../core/repository.js';
|
|
5
|
-
import { ExecuteCommandResult } from '../utils/exec.js';
|
|
6
|
-
import { RunCommand } from './run-command.js';
|
|
7
|
-
export declare class VersionCommand extends RunCommand<VersionCommand.Options> {
|
|
8
|
-
readonly repository: Repository;
|
|
9
|
-
bump: string;
|
|
10
|
-
static commandName: string;
|
|
11
|
-
private _updatedPackages;
|
|
12
|
-
constructor(repository: Repository, bump: string, options?: VersionCommand.Options);
|
|
13
|
-
protected _prepareTasks(packages: Package[]): Promise<Task[]>;
|
|
14
|
-
protected _exec(pkg: Package, command: string, args: {}, options?: any): Promise<ExecuteCommandResult>;
|
|
15
|
-
}
|
|
16
|
-
export declare namespace VersionCommand {
|
|
17
|
-
interface Options extends RunCommand.Options {
|
|
18
|
-
unified?: boolean;
|
|
19
|
-
all?: boolean;
|
|
20
|
-
ignoreDirty?: boolean;
|
|
21
|
-
noTag?: boolean;
|
|
22
|
-
}
|
|
23
|
-
const cliCommandOptions: Record<string, yargs.Options>;
|
|
24
|
-
function initCli(repository: Repository, program: yargs.Argv): void;
|
|
25
|
-
}
|
package/esm/core/command.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import './logger.js';
|
|
2
|
-
import npmlog from 'npmlog';
|
|
3
|
-
import yargs from 'yargs';
|
|
4
|
-
export interface CommandEvents {
|
|
5
|
-
start: () => void | Promise<void>;
|
|
6
|
-
finish: (error?: any, result?: any) => void | Promise<void>;
|
|
7
|
-
error: (e: unknown) => void | Promise<void>;
|
|
8
|
-
}
|
|
9
|
-
declare const Command_base: import("strict-typed-events").Type<import("strict-typed-events").TypedEventEmitter<any, CommandEvents, CommandEvents>>;
|
|
10
|
-
export declare abstract class Command<TOptions extends Command.GlobalOptions = Command.GlobalOptions> extends Command_base {
|
|
11
|
-
protected _started: boolean;
|
|
12
|
-
protected _finished: boolean;
|
|
13
|
-
protected _options: TOptions;
|
|
14
|
-
logger: npmlog.Logger;
|
|
15
|
-
static commandName: string;
|
|
16
|
-
constructor(options?: TOptions);
|
|
17
|
-
get options(): TOptions;
|
|
18
|
-
get commandName(): string;
|
|
19
|
-
execute(): Promise<any>;
|
|
20
|
-
protected enableProgress(): Promise<void>;
|
|
21
|
-
protected disableProgress(): void;
|
|
22
|
-
protected abstract _execute(): Promise<any>;
|
|
23
|
-
protected _preExecute(): Promise<void>;
|
|
24
|
-
protected _postExecute?(): Promise<void>;
|
|
25
|
-
}
|
|
26
|
-
export declare namespace Command {
|
|
27
|
-
interface GlobalOptions {
|
|
28
|
-
logLevel?: string;
|
|
29
|
-
json?: boolean;
|
|
30
|
-
ci?: boolean;
|
|
31
|
-
}
|
|
32
|
-
const globalOptions: Record<string, yargs.Options>;
|
|
33
|
-
function composeOptions<TOptions extends GlobalOptions = GlobalOptions>(commandName: string, yargArgs: any, config: any): Partial<TOptions>;
|
|
34
|
-
}
|
|
35
|
-
export {};
|
package/esm/core/constants.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isTTY: boolean;
|
package/esm/core/logger.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
declare module 'npmlog' {
|
|
2
|
-
interface Logger {
|
|
3
|
-
output(prefix: string, message: string, ...args: any[]): void;
|
|
4
|
-
success(prefix: string, message: string, ...args: any[]): void;
|
|
5
|
-
disp: Record<string, string>;
|
|
6
|
-
showProgress(): any;
|
|
7
|
-
hideProgress(): any;
|
|
8
|
-
separator: string;
|
|
9
|
-
levelIndex: number;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
export {};
|
package/esm/core/package.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare class Package {
|
|
2
|
-
readonly dirname: string;
|
|
3
|
-
private _json;
|
|
4
|
-
dependencies: string[];
|
|
5
|
-
constructor(dirname: string);
|
|
6
|
-
get name(): string;
|
|
7
|
-
get version(): string;
|
|
8
|
-
get json(): any;
|
|
9
|
-
get jsonFileName(): string;
|
|
10
|
-
get isPrivate(): boolean;
|
|
11
|
-
reloadJson(): any;
|
|
12
|
-
writeJson(): void;
|
|
13
|
-
}
|
package/esm/core/repository.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Package } from './package.js';
|
|
2
|
-
export declare class Repository extends Package {
|
|
3
|
-
readonly dirname: string;
|
|
4
|
-
readonly config: any;
|
|
5
|
-
readonly packages: Package[];
|
|
6
|
-
readonly rootPackage: Package;
|
|
7
|
-
protected constructor(dirname: string, config: any, packages: Package[]);
|
|
8
|
-
getPackages(options?: {
|
|
9
|
-
scope?: string | string[];
|
|
10
|
-
toposort?: boolean;
|
|
11
|
-
}): Package[];
|
|
12
|
-
getPackage(name: string): Package | undefined;
|
|
13
|
-
protected _updateDependencies(): void;
|
|
14
|
-
static create(root?: string, options?: {
|
|
15
|
-
deep?: number;
|
|
16
|
-
}): Repository;
|
|
17
|
-
protected static _resolvePackages(dirname: string, patterns: string[]): Package[];
|
|
18
|
-
protected static _readConfig(dirname: string): any;
|
|
19
|
-
}
|
package/esm/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './core/repository.js';
|
package/esm/utils/exec.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { ChildProcess } from 'child_process';
|
|
3
|
-
export interface IExecutorOptions {
|
|
4
|
-
stdio?: 'inherit' | 'pipe';
|
|
5
|
-
cwd?: string;
|
|
6
|
-
argv?: string[];
|
|
7
|
-
env?: Record<string, string | undefined>;
|
|
8
|
-
shell?: boolean;
|
|
9
|
-
onSpawn?: (childProcess: ChildProcess) => void;
|
|
10
|
-
onLine?: (line: string, stdio: 'stderr' | 'stdout') => void;
|
|
11
|
-
onData?: (data: string, stdio: 'stderr' | 'stdout') => void;
|
|
12
|
-
throwOnError?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export interface ExecuteCommandResult {
|
|
15
|
-
code?: number;
|
|
16
|
-
error?: Error;
|
|
17
|
-
stdout?: string;
|
|
18
|
-
}
|
|
19
|
-
export declare function exec(command: string, options?: IExecutorOptions): Promise<ExecuteCommandResult>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { Stats } from 'node:fs';
|
|
3
|
-
export declare function fsExists(s: string): Promise<boolean>;
|
|
4
|
-
export declare function tryStat(s: any): Promise<Stats | undefined>;
|
|
5
|
-
export declare function fsDelete(fileOrDir: string): Promise<boolean>;
|
package/esm/utils/git-utils.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export declare namespace GitHelper {
|
|
2
|
-
interface FileStatus {
|
|
3
|
-
filename: string;
|
|
4
|
-
status: string;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
export interface GitOptions {
|
|
8
|
-
cwd?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare class GitHelper {
|
|
11
|
-
cwd: string;
|
|
12
|
-
constructor(options?: GitOptions);
|
|
13
|
-
listDirtyFileStatus(options?: {
|
|
14
|
-
absolute?: boolean;
|
|
15
|
-
}): Promise<GitHelper.FileStatus[]>;
|
|
16
|
-
listDirtyFiles(options?: {
|
|
17
|
-
absolute?: boolean;
|
|
18
|
-
}): Promise<string[]>;
|
|
19
|
-
listCommitSha(): Promise<string[]>;
|
|
20
|
-
listCommittedFiles(options?: {
|
|
21
|
-
absolute?: boolean;
|
|
22
|
-
commits?: string | string[];
|
|
23
|
-
}): Promise<string[]>;
|
|
24
|
-
readFileLastPublished(filePath: string, commitSha?: string): Promise<string>;
|
|
25
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
export interface RunPathOptions {
|
|
2
|
-
/**
|
|
3
|
-
Working directory.
|
|
4
|
-
@default process.cwd()
|
|
5
|
-
*/
|
|
6
|
-
readonly cwd?: string;
|
|
7
|
-
/**
|
|
8
|
-
PATH to be appended. Default: [`PATH`](https://github.com/sindresorhus/path-key).
|
|
9
|
-
Set it to an empty string to exclude the default PATH.
|
|
10
|
-
*/
|
|
11
|
-
readonly path?: string;
|
|
12
|
-
/**
|
|
13
|
-
Path to the Node.js executable to use in child processes if that is different from the current one. Its directory is pushed to the front of PATH.
|
|
14
|
-
This can be either an absolute path or a path relative to the `cwd` option.
|
|
15
|
-
@default process.execPath
|
|
16
|
-
*/
|
|
17
|
-
readonly execPath?: string;
|
|
18
|
-
}
|
|
19
|
-
export type ProcessEnv = Record<string, string | undefined>;
|
|
20
|
-
export interface EnvOptions {
|
|
21
|
-
/**
|
|
22
|
-
The working directory.
|
|
23
|
-
@default process.cwd()
|
|
24
|
-
*/
|
|
25
|
-
readonly cwd?: string;
|
|
26
|
-
/**
|
|
27
|
-
Accepts an object of environment variables, like `process.env`,
|
|
28
|
-
and modifies the PATH using the correct [PATH key](https://github.com/sindresorhus/path-key).
|
|
29
|
-
Use this if you're modifying the PATH for use in the `child_process` options.
|
|
30
|
-
*/
|
|
31
|
-
readonly env?: ProcessEnv;
|
|
32
|
-
/**
|
|
33
|
-
The path to the current Node.js executable. Its directory is pushed to the front of PATH.
|
|
34
|
-
This can be either an absolute path or a path relative to the `cwd` option.
|
|
35
|
-
@default process.execPath
|
|
36
|
-
*/
|
|
37
|
-
readonly execPath?: string;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
Get your [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) prepended with locally installed binaries.
|
|
41
|
-
@returns The augmented path string.
|
|
42
|
-
@example
|
|
43
|
-
```
|
|
44
|
-
import childProcess from 'node:child_process';
|
|
45
|
-
import {npmRunPath} from 'npm-run-path';
|
|
46
|
-
console.log(process.env.PATH);
|
|
47
|
-
//=> '/usr/local/bin'
|
|
48
|
-
console.log(npmRunPath());
|
|
49
|
-
//=> '/Users/sindresorhus/dev/foo/node_modules/.bin:/Users/sindresorhus/dev/node_modules/.bin:/Users/sindresorhus/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/usr/local/bin'
|
|
50
|
-
```
|
|
51
|
-
*/
|
|
52
|
-
export declare function npmRunPath(options?: RunPathOptions): string;
|
|
53
|
-
/**
|
|
54
|
-
@returns The augmented [`process.env`](https://nodejs.org/api/process.html#process_process_env) object.
|
|
55
|
-
@example
|
|
56
|
-
```
|
|
57
|
-
import childProcess from 'node:child_process';
|
|
58
|
-
import {npmRunPathEnv} from 'npm-run-path';
|
|
59
|
-
// `foo` is a locally installed binary
|
|
60
|
-
childProcess.execFileSync('foo', {
|
|
61
|
-
env: npmRunPathEnv()
|
|
62
|
-
});
|
|
63
|
-
```
|
|
64
|
-
*/
|
|
65
|
-
export declare function npmRunPathEnv(options?: EnvOptions): {
|
|
66
|
-
[x: string]: string | undefined;
|
|
67
|
-
};
|
package/esm/utils/npm-utils.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare class PackageNotFoundError extends Error {
|
|
2
|
-
}
|
|
3
|
-
export declare namespace NpmHelper {
|
|
4
|
-
}
|
|
5
|
-
export interface NpmOptions {
|
|
6
|
-
cwd?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare class NpmHelper {
|
|
9
|
-
cwd: string;
|
|
10
|
-
constructor(options?: NpmOptions);
|
|
11
|
-
getPackageInfo(packageName: string): Promise<any>;
|
|
12
|
-
}
|