simple-git
Advanced tools
Comparing version 3.23.0 to 3.24.0
@@ -5,2 +5,3 @@ export * from './abort-plugin'; | ||
export * from './completion-detection.plugin'; | ||
export * from './custom-binary.plugin'; | ||
export * from './error-detection.plugin'; | ||
@@ -7,0 +8,0 @@ export * from './plugin-store'; |
@@ -1,6 +0,11 @@ | ||
import { SimpleGitPlugin, SimpleGitPluginType, SimpleGitPluginTypes } from './simple-git-plugin'; | ||
import type { SimpleGitPlugin, SimpleGitPluginType, SimpleGitPluginTypes } from './simple-git-plugin'; | ||
import type { SimpleGitPluginConfig } from '../types'; | ||
export declare class PluginStore { | ||
private plugins; | ||
private events; | ||
on<K extends keyof SimpleGitPluginConfig>(type: K, listener: (data: SimpleGitPluginConfig[K]) => void): void; | ||
reconfigure<K extends keyof SimpleGitPluginConfig>(type: K, data: SimpleGitPluginConfig[K]): void; | ||
append<T extends SimpleGitPluginType>(type: T, action: SimpleGitPlugin<T>['action']): () => boolean; | ||
add<T extends SimpleGitPluginType>(plugin: void | SimpleGitPlugin<T> | SimpleGitPlugin<T>[]): () => void; | ||
exec<T extends SimpleGitPluginType>(type: T, data: SimpleGitPluginTypes[T]['data'], context: SimpleGitPluginTypes[T]['context']): typeof data; | ||
} |
@@ -13,2 +13,6 @@ /// <reference types="node" /> | ||
}; | ||
'spawn.binary': { | ||
data: string; | ||
context: SimpleGitTaskPluginContext & {}; | ||
}; | ||
'spawn.options': { | ||
@@ -15,0 +19,0 @@ data: Partial<SpawnOptions>; |
@@ -11,3 +11,2 @@ import { PluginStore } from '../plugins'; | ||
private _cwd; | ||
get binary(): string; | ||
get cwd(): string; | ||
@@ -14,0 +13,0 @@ set cwd(cwd: string); |
@@ -5,3 +5,2 @@ import type { PluginStore } from '../plugins'; | ||
export declare class GitExecutor implements SimpleGitExecutor { | ||
binary: string; | ||
cwd: string; | ||
@@ -13,5 +12,5 @@ private _scheduler; | ||
outputHandler?: outputHandler; | ||
constructor(binary: string, cwd: string, _scheduler: Scheduler, _plugins: PluginStore); | ||
constructor(cwd: string, _scheduler: Scheduler, _plugins: PluginStore); | ||
chain(): SimpleGitExecutor; | ||
push<R>(task: SimpleGitTask<R>): Promise<R>; | ||
} |
@@ -39,3 +39,2 @@ /// <reference types="node" /> | ||
outputHandler?: outputHandler; | ||
binary: string; | ||
cwd: string; | ||
@@ -57,2 +56,10 @@ chain(): SimpleGitExecutor; | ||
/** | ||
* Name of the binary the child processes will spawn - defaults to `git`, | ||
* supply as a tuple to enable the use of platforms that require `git` to be | ||
* called through an alternative binary (eg: `wsl git ...`). | ||
* Note: commands supplied in this way support a restricted set of characters | ||
* and should not be used as a way to supply arbitrary config arguments etc. | ||
*/ | ||
binary: string | [string] | [string, string]; | ||
/** | ||
* Configures the events that should be used to determine when the unederlying child process has | ||
@@ -104,2 +111,7 @@ * been terminated. | ||
/** | ||
* Allows potentially unsafe values to be supplied in the `binary` configuration option and | ||
* `git.customBinary()` method call. | ||
*/ | ||
allowUnsafeCustomBinary?: boolean; | ||
/** | ||
* By default `simple-git` prevents the use of inline configuration | ||
@@ -135,6 +147,2 @@ * options to override the protocols available for the `git` child | ||
/** | ||
* Name of the binary the child processes will spawn - defaults to `git` | ||
*/ | ||
binary: string; | ||
/** | ||
* Limit for the number of child processes that will be spawned concurrently from a `simple-git` instance | ||
@@ -141,0 +149,0 @@ */ |
@@ -455,3 +455,3 @@ import * as resp from './response'; | ||
*/ | ||
customBinary(command: string): this; | ||
customBinary(command: Exclude<types.SimpleGitOptions['binary'], undefined>): this; | ||
@@ -458,0 +458,0 @@ /** |
{ | ||
"name": "simple-git", | ||
"description": "Simple GIT interface for node.js", | ||
"version": "3.23.0", | ||
"version": "3.24.0", | ||
"author": "Steve King <steve@mydev.co>", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
@@ -93,2 +93,5 @@ # Simple Git | ||
- [Custom Binary](https://github.com/steveukx/git-js/blob/main/docs/PLUGIN-CUSTOM-BINARY.md) | ||
Customise the `git` binary `simple-git` uses when spawning `git` child processes. | ||
- [Completion Detection](https://github.com/steveukx/git-js/blob/main/docs/PLUGIN-COMPLETION-DETECTION.md) | ||
@@ -199,3 +202,3 @@ Customise how `simple-git` detects the end of a `git` process. | ||
| `.commit(message, [fileA, ...], options, handlerFn)` | commits changes on the named files with the supplied message, when supplied, the optional options object can contain any other parameters to pass to the commit command, setting the value of the property to be a string will add `name=value` to the command string, setting any other type of value will result in just the key from the object being passed (ie: just `name`), an example of setting the author is below | | ||
| `.customBinary(gitPath)` | sets the command to use to reference git, allows for using a git binary not available on the path environment variable | | ||
| `.customBinary(gitPath)` | sets the command to use to reference git, allows for using a git binary not available on the path environment variable [docs](https://github.com/steveukx/git-js/blob/main/docs/PLUGIN-CUSTOM-BINARY.md) | | ||
| `.env(name, value)` | Set environment variables to be passed to the spawned child processes, [see usage in detail below](#environment-variables). | | ||
@@ -202,0 +205,0 @@ | `.exec(handlerFn)` | calls a simple function in the current step | |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
947053
111
11992
839