aboutsummaryrefslogtreecommitdiff
path: root/node_modules/simple-git
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/simple-git')
-rw-r--r--node_modules/simple-git/CHANGELOG.md65
-rw-r--r--node_modules/simple-git/LICENSE20
-rw-r--r--node_modules/simple-git/cjs/index.js3869
-rw-r--r--node_modules/simple-git/cjs/index.js.map7
-rw-r--r--node_modules/simple-git/esm/index.js3763
-rw-r--r--node_modules/simple-git/esm/index.js.map7
-rw-r--r--node_modules/simple-git/esm/package.json3
-rw-r--r--node_modules/simple-git/package.json57
-rw-r--r--node_modules/simple-git/promise.d.ts73
-rw-r--r--node_modules/simple-git/promise.js16
-rw-r--r--node_modules/simple-git/readme.md802
-rw-r--r--node_modules/simple-git/src/lib/api.d.ts11
-rw-r--r--node_modules/simple-git/src/lib/errors/git-construct-error.d.ts15
-rw-r--r--node_modules/simple-git/src/lib/errors/git-error.d.ts29
-rw-r--r--node_modules/simple-git/src/lib/errors/git-plugin-error.d.ts6
-rw-r--r--node_modules/simple-git/src/lib/errors/git-response-error.d.ts32
-rw-r--r--node_modules/simple-git/src/lib/errors/task-configuration-error.d.ts12
-rw-r--r--node_modules/simple-git/src/lib/git-factory.d.ts15
-rw-r--r--node_modules/simple-git/src/lib/git-logger.d.ts21
-rw-r--r--node_modules/simple-git/src/lib/parsers/parse-branch-delete.d.ts5
-rw-r--r--node_modules/simple-git/src/lib/parsers/parse-branch.d.ts2
-rw-r--r--node_modules/simple-git/src/lib/parsers/parse-commit.d.ts2
-rw-r--r--node_modules/simple-git/src/lib/parsers/parse-diff-summary.d.ts2
-rw-r--r--node_modules/simple-git/src/lib/parsers/parse-fetch.d.ts2
-rw-r--r--node_modules/simple-git/src/lib/parsers/parse-list-log-summary.d.ts5
-rw-r--r--node_modules/simple-git/src/lib/parsers/parse-merge.d.ts11
-rw-r--r--node_modules/simple-git/src/lib/parsers/parse-move.d.ts2
-rw-r--r--node_modules/simple-git/src/lib/parsers/parse-pull.d.ts6
-rw-r--r--node_modules/simple-git/src/lib/parsers/parse-push.d.ts4
-rw-r--r--node_modules/simple-git/src/lib/parsers/parse-remote-messages.d.ts5
-rw-r--r--node_modules/simple-git/src/lib/parsers/parse-remote-objects.d.ts3
-rw-r--r--node_modules/simple-git/src/lib/plugins/command-config-prefixing-plugin.d.ts2
-rw-r--r--node_modules/simple-git/src/lib/plugins/completion-detection.plugin.d.ts3
-rw-r--r--node_modules/simple-git/src/lib/plugins/error-detection.plugin.d.ts8
-rw-r--r--node_modules/simple-git/src/lib/plugins/index.d.ts8
-rw-r--r--node_modules/simple-git/src/lib/plugins/plugin-store.d.ts6
-rw-r--r--node_modules/simple-git/src/lib/plugins/progress-monitor-plugin.d.ts3
-rw-r--r--node_modules/simple-git/src/lib/plugins/simple-git-plugin.d.ts37
-rw-r--r--node_modules/simple-git/src/lib/plugins/spawn-options-plugin.d.ts4
-rw-r--r--node_modules/simple-git/src/lib/plugins/timout-plugin.d.ts3
-rw-r--r--node_modules/simple-git/src/lib/responses/BranchDeleteSummary.d.ts12
-rw-r--r--node_modules/simple-git/src/lib/responses/BranchSummary.d.ts10
-rw-r--r--node_modules/simple-git/src/lib/responses/CheckIgnore.d.ts4
-rw-r--r--node_modules/simple-git/src/lib/responses/CleanSummary.d.ts9
-rw-r--r--node_modules/simple-git/src/lib/responses/ConfigList.d.ts13
-rw-r--r--node_modules/simple-git/src/lib/responses/DiffSummary.d.ts10
-rw-r--r--node_modules/simple-git/src/lib/responses/FileStatusSummary.d.ts9
-rw-r--r--node_modules/simple-git/src/lib/responses/GetRemoteSummary.d.ts11
-rw-r--r--node_modules/simple-git/src/lib/responses/InitSummary.d.ts9
-rw-r--r--node_modules/simple-git/src/lib/responses/MergeSummary.d.ts16
-rw-r--r--node_modules/simple-git/src/lib/responses/PullSummary.d.ts25
-rw-r--r--node_modules/simple-git/src/lib/responses/StatusSummary.d.ts19
-rw-r--r--node_modules/simple-git/src/lib/responses/TagList.d.ts7
-rw-r--r--node_modules/simple-git/src/lib/runners/git-executor-chain.d.ts25
-rw-r--r--node_modules/simple-git/src/lib/runners/git-executor.d.ts15
-rw-r--r--node_modules/simple-git/src/lib/runners/promise-wrapped.d.ts2
-rw-r--r--node_modules/simple-git/src/lib/runners/scheduler.d.ts11
-rw-r--r--node_modules/simple-git/src/lib/runners/tasks-pending-queue.d.ts23
-rw-r--r--node_modules/simple-git/src/lib/simple-git-api.d.ts20
-rw-r--r--node_modules/simple-git/src/lib/task-callback.d.ts2
-rw-r--r--node_modules/simple-git/src/lib/tasks/apply-patch.d.ts3
-rw-r--r--node_modules/simple-git/src/lib/tasks/branch.d.ts7
-rw-r--r--node_modules/simple-git/src/lib/tasks/change-working-directory.d.ts2
-rw-r--r--node_modules/simple-git/src/lib/tasks/check-ignore.d.ts2
-rw-r--r--node_modules/simple-git/src/lib/tasks/check-is-repo.d.ts9
-rw-r--r--node_modules/simple-git/src/lib/tasks/clean.d.ts25
-rw-r--r--node_modules/simple-git/src/lib/tasks/clone.d.ts4
-rw-r--r--node_modules/simple-git/src/lib/tasks/commit.d.ts3
-rw-r--r--node_modules/simple-git/src/lib/tasks/config.d.ts8
-rw-r--r--node_modules/simple-git/src/lib/tasks/diff.d.ts3
-rw-r--r--node_modules/simple-git/src/lib/tasks/fetch.d.ts3
-rw-r--r--node_modules/simple-git/src/lib/tasks/grep.d.ts12
-rw-r--r--node_modules/simple-git/src/lib/tasks/hash-object.d.ts5
-rw-r--r--node_modules/simple-git/src/lib/tasks/init.d.ts3
-rw-r--r--node_modules/simple-git/src/lib/tasks/log.d.ts32
-rw-r--r--node_modules/simple-git/src/lib/tasks/merge.d.ts4
-rw-r--r--node_modules/simple-git/src/lib/tasks/move.d.ts3
-rw-r--r--node_modules/simple-git/src/lib/tasks/pull.d.ts3
-rw-r--r--node_modules/simple-git/src/lib/tasks/push.d.ts9
-rw-r--r--node_modules/simple-git/src/lib/tasks/remote.d.ts6
-rw-r--r--node_modules/simple-git/src/lib/tasks/reset.d.ts11
-rw-r--r--node_modules/simple-git/src/lib/tasks/stash-list.d.ts3
-rw-r--r--node_modules/simple-git/src/lib/tasks/status.d.ts3
-rw-r--r--node_modules/simple-git/src/lib/tasks/sub-module.d.ts5
-rw-r--r--node_modules/simple-git/src/lib/tasks/tag.d.ts18
-rw-r--r--node_modules/simple-git/src/lib/tasks/task.d.ts14
-rw-r--r--node_modules/simple-git/src/lib/types/handlers.d.ts21
-rw-r--r--node_modules/simple-git/src/lib/types/index.d.ts99
-rw-r--r--node_modules/simple-git/src/lib/types/tasks.d.ts20
-rw-r--r--node_modules/simple-git/src/lib/utils/argument-filters.d.ts16
-rw-r--r--node_modules/simple-git/src/lib/utils/exit-codes.d.ts9
-rw-r--r--node_modules/simple-git/src/lib/utils/git-output-streams.d.ts8
-rw-r--r--node_modules/simple-git/src/lib/utils/index.d.ts8
-rw-r--r--node_modules/simple-git/src/lib/utils/line-parser.d.ts15
-rw-r--r--node_modules/simple-git/src/lib/utils/simple-git-options.d.ts2
-rw-r--r--node_modules/simple-git/src/lib/utils/task-options.d.ts13
-rw-r--r--node_modules/simple-git/src/lib/utils/task-parser.d.ts5
-rw-r--r--node_modules/simple-git/src/lib/utils/util.d.ts45
-rw-r--r--node_modules/simple-git/typings/errors.d.ts6
-rw-r--r--node_modules/simple-git/typings/index.d.ts11
-rw-r--r--node_modules/simple-git/typings/response.d.ts538
-rw-r--r--node_modules/simple-git/typings/simple-git.d.ts650
-rw-r--r--node_modules/simple-git/typings/types.d.ts14
103 files changed, 0 insertions, 10878 deletions
diff --git a/node_modules/simple-git/CHANGELOG.md b/node_modules/simple-git/CHANGELOG.md
deleted file mode 100644
index f7f8fc8..0000000
--- a/node_modules/simple-git/CHANGELOG.md
+++ /dev/null
@@ -1,65 +0,0 @@
-# Changelog
-
-### [3.1.1](https://www.github.com/steveukx/git-js/compare/repo-v3.1.0...repo-v3.1.1) (2022-01-26)
-
-
-### Bug Fixes
-
-* specify repository with `directory` identifier to be discoverable within monorepo ([655e23c](https://www.github.com/steveukx/git-js/commit/655e23ce70e94e9213a0da2001ad883966c37b2e))
-
-## [3.1.0](https://www.github.com/steveukx/git-js/compare/repo-v3.0.4...repo-v3.1.0) (2022-01-23)
-
-
-### Features
-
-* optionally include ignored files in `StatusResult` ([70e6767](https://www.github.com/steveukx/git-js/commit/70e676759012d26ab644644e10f7957fba51ae2f)), closes [#718](https://www.github.com/steveukx/git-js/issues/718)
-
-### [3.0.4](https://www.github.com/steveukx/git-js/compare/repo-v3.0.3...repo-v3.0.4) (2022-01-23)
-
-
-### Bug Fixes
-
-* support parsing empty responses ([91eb7fb](https://www.github.com/steveukx/git-js/commit/91eb7fb01fe466468537621cb94b9f932026506e)), closes [#713](https://www.github.com/steveukx/git-js/issues/713)
-
-### [3.0.3](https://www.github.com/steveukx/git-js/compare/repo-v3.0.2...repo-v3.0.3) (2022-01-20)
-
-
-### Bug Fixes
-
-* allow branches without labels ([07a1388](https://www.github.com/steveukx/git-js/commit/07a138808fb0b78068da83030698a957e567541c))
-* implement v3 deprecations ([ed6d18e](https://www.github.com/steveukx/git-js/commit/ed6d18e88a6a4f9fd18d4733a94b491e0e9e3ba1))
-* publish v3 as `latest` ([5db4434](https://www.github.com/steveukx/git-js/commit/5db4434d00acba560fe2569c04f9813cde026468))
-
-### [3.0.2](https://www.github.com/steveukx/git-js/compare/repo-v3.0.1...repo-v3.0.2) (2022-01-18)
-
-
-### Bug Fixes
-
-* Backward compatibility - permit loading `simple-git/promise` with deprecation notice until mid-2022. ([4413c47](https://www.github.com/steveukx/git-js/commit/4413c47fa3d9893734a5bb06075b962645f73cb9))
-
-### [3.0.1](https://www.github.com/steveukx/git-js/compare/repo-v3.0.0...repo-v3.0.1) (2022-01-18)
-
-
-### Bug Fixes
-
-* Documentation update ([4e000f6](https://www.github.com/steveukx/git-js/commit/4e000f69aa876b3999ec98fe42e94186facd5790))
-* Enable releasing v3 to `npm` under `canary` tag ([14e233f](https://www.github.com/steveukx/git-js/commit/14e233f976eab8c99398dbc2c9744b6654add126))
-
-## [3.0.0](https://www.github.com/steveukx/git-js/compare/repo-v2.48.0...repo-v3.0.0) (2022-01-16)
-
-
-### ⚠ BREAKING CHANGES
-
-* monorepo structure (#716)
-
-### Features
-
-* monorepo structure ([#716](https://www.github.com/steveukx/git-js/issues/716)) ([777a02a](https://www.github.com/steveukx/git-js/commit/777a02a37b3f6345fad86e7ab0105414755c940a))
-* Support loading with ES modules ([c761863](https://www.github.com/steveukx/git-js/commit/c761863166f870e25af171e7aa8d27df869cad03))
-
-
-### Bug Fixes
-
-* typo in readme.md ([659fc9b](https://www.github.com/steveukx/git-js/commit/659fc9b8ddd6b1edf791cbefa3cf29ab9ef9edf7))
-* Upgrade `debug` dependency to latest `4.3.3` ([8b53104](https://www.github.com/steveukx/git-js/commit/8b5310491b3f0c9020bea86031a9f818fe24a9c8))
-* Upgrade `jest` dependency to latest `27.0.3` ([89a8739](https://www.github.com/steveukx/git-js/commit/89a8739240ae4ad2f3aa104b252cb6beedfe14be))
diff --git a/node_modules/simple-git/LICENSE b/node_modules/simple-git/LICENSE
deleted file mode 100644
index 4045a54..0000000
--- a/node_modules/simple-git/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2022 Steve King
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/simple-git/cjs/index.js b/node_modules/simple-git/cjs/index.js
deleted file mode 100644
index e026118..0000000
--- a/node_modules/simple-git/cjs/index.js
+++ /dev/null
@@ -1,3869 +0,0 @@
-var __create = Object.create;
-var __defProp = Object.defineProperty;
-var __defProps = Object.defineProperties;
-var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
-var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
-var __getOwnPropNames = Object.getOwnPropertyNames;
-var __getOwnPropSymbols = Object.getOwnPropertySymbols;
-var __getProtoOf = Object.getPrototypeOf;
-var __hasOwnProp = Object.prototype.hasOwnProperty;
-var __propIsEnum = Object.prototype.propertyIsEnumerable;
-var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
-var __spreadValues = (a, b) => {
- for (var prop in b || (b = {}))
- if (__hasOwnProp.call(b, prop))
- __defNormalProp(a, prop, b[prop]);
- if (__getOwnPropSymbols)
- for (var prop of __getOwnPropSymbols(b)) {
- if (__propIsEnum.call(b, prop))
- __defNormalProp(a, prop, b[prop]);
- }
- return a;
-};
-var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
-var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
-var __esm = (fn, res) => function __init() {
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
-};
-var __commonJS = (cb, mod) => function __require() {
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
-};
-var __export = (target, all) => {
- for (var name in all)
- __defProp(target, name, { get: all[name], enumerable: true });
-};
-var __reExport = (target, module2, copyDefault, desc) => {
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
- for (let key of __getOwnPropNames(module2))
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
- }
- return target;
-};
-var __toESM = (module2, isNodeMode) => {
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
-};
-var __toCommonJS = /* @__PURE__ */ ((cache) => {
- return (module2, temp) => {
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
- };
-})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
-var __async = (__this, __arguments, generator) => {
- return new Promise((resolve, reject) => {
- var fulfilled = (value) => {
- try {
- step(generator.next(value));
- } catch (e) {
- reject(e);
- }
- };
- var rejected = (value) => {
- try {
- step(generator.throw(value));
- } catch (e) {
- reject(e);
- }
- };
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
- step((generator = generator.apply(__this, __arguments)).next());
- });
-};
-
-// src/lib/errors/git-error.ts
-var GitError;
-var init_git_error = __esm({
- "src/lib/errors/git-error.ts"() {
- GitError = class extends Error {
- constructor(task, message) {
- super(message);
- this.task = task;
- Object.setPrototypeOf(this, new.target.prototype);
- }
- };
- }
-});
-
-// src/lib/errors/git-response-error.ts
-var GitResponseError;
-var init_git_response_error = __esm({
- "src/lib/errors/git-response-error.ts"() {
- init_git_error();
- GitResponseError = class extends GitError {
- constructor(git, message) {
- super(void 0, message || String(git));
- this.git = git;
- }
- };
- }
-});
-
-// src/lib/errors/git-construct-error.ts
-var GitConstructError;
-var init_git_construct_error = __esm({
- "src/lib/errors/git-construct-error.ts"() {
- init_git_error();
- GitConstructError = class extends GitError {
- constructor(config, message) {
- super(void 0, message);
- this.config = config;
- }
- };
- }
-});
-
-// src/lib/errors/git-plugin-error.ts
-var GitPluginError;
-var init_git_plugin_error = __esm({
- "src/lib/errors/git-plugin-error.ts"() {
- init_git_error();
- GitPluginError = class extends GitError {
- constructor(task, plugin, message) {
- super(task, message);
- this.task = task;
- this.plugin = plugin;
- Object.setPrototypeOf(this, new.target.prototype);
- }
- };
- }
-});
-
-// src/lib/errors/task-configuration-error.ts
-var TaskConfigurationError;
-var init_task_configuration_error = __esm({
- "src/lib/errors/task-configuration-error.ts"() {
- init_git_error();
- TaskConfigurationError = class extends GitError {
- constructor(message) {
- super(void 0, message);
- }
- };
- }
-});
-
-// src/lib/utils/util.ts
-function asFunction(source) {
- return typeof source === "function" ? source : NOOP;
-}
-function isUserFunction(source) {
- return typeof source === "function" && source !== NOOP;
-}
-function splitOn(input, char) {
- const index = input.indexOf(char);
- if (index <= 0) {
- return [input, ""];
- }
- return [
- input.substr(0, index),
- input.substr(index + 1)
- ];
-}
-function first(input, offset = 0) {
- return isArrayLike(input) && input.length > offset ? input[offset] : void 0;
-}
-function last(input, offset = 0) {
- if (isArrayLike(input) && input.length > offset) {
- return input[input.length - 1 - offset];
- }
-}
-function isArrayLike(input) {
- return !!(input && typeof input.length === "number");
-}
-function toLinesWithContent(input = "", trimmed2 = true, separator = "\n") {
- return input.split(separator).reduce((output, line) => {
- const lineContent = trimmed2 ? line.trim() : line;
- if (lineContent) {
- output.push(lineContent);
- }
- return output;
- }, []);
-}
-function forEachLineWithContent(input, callback) {
- return toLinesWithContent(input, true).map((line) => callback(line));
-}
-function folderExists(path) {
- return (0, import_file_exists.exists)(path, import_file_exists.FOLDER);
-}
-function append(target, item) {
- if (Array.isArray(target)) {
- if (!target.includes(item)) {
- target.push(item);
- }
- } else {
- target.add(item);
- }
- return item;
-}
-function including(target, item) {
- if (Array.isArray(target) && !target.includes(item)) {
- target.push(item);
- }
- return target;
-}
-function remove(target, item) {
- if (Array.isArray(target)) {
- const index = target.indexOf(item);
- if (index >= 0) {
- target.splice(index, 1);
- }
- } else {
- target.delete(item);
- }
- return item;
-}
-function asArray(source) {
- return Array.isArray(source) ? source : [source];
-}
-function asStringArray(source) {
- return asArray(source).map(String);
-}
-function asNumber(source, onNaN = 0) {
- if (source == null) {
- return onNaN;
- }
- const num = parseInt(source, 10);
- return isNaN(num) ? onNaN : num;
-}
-function prefixedArray(input, prefix) {
- const output = [];
- for (let i = 0, max = input.length; i < max; i++) {
- output.push(prefix, input[i]);
- }
- return output;
-}
-function bufferToString(input) {
- return (Array.isArray(input) ? Buffer.concat(input) : input).toString("utf-8");
-}
-function pick(source, properties) {
- return Object.assign({}, ...properties.map((property) => property in source ? { [property]: source[property] } : {}));
-}
-function delay(duration = 0) {
- return new Promise((done) => setTimeout(done, duration));
-}
-var import_file_exists, NULL, NOOP, objectToString;
-var init_util = __esm({
- "src/lib/utils/util.ts"() {
- import_file_exists = require("@kwsites/file-exists");
- NULL = "\0";
- NOOP = () => {
- };
- objectToString = Object.prototype.toString.call.bind(Object.prototype.toString);
- }
-});
-
-// src/lib/utils/argument-filters.ts
-function filterType(input, filter, def) {
- if (filter(input)) {
- return input;
- }
- return arguments.length > 2 ? def : void 0;
-}
-function filterPrimitives(input, omit) {
- return /number|string|boolean/.test(typeof input) && (!omit || !omit.includes(typeof input));
-}
-function filterPlainObject(input) {
- return !!input && objectToString(input) === "[object Object]";
-}
-function filterFunction(input) {
- return typeof input === "function";
-}
-var filterArray, filterString, filterStringArray, filterStringOrStringArray, filterHasLength;
-var init_argument_filters = __esm({
- "src/lib/utils/argument-filters.ts"() {
- init_util();
- filterArray = (input) => {
- return Array.isArray(input);
- };
- filterString = (input) => {
- return typeof input === "string";
- };
- filterStringArray = (input) => {
- return Array.isArray(input) && input.every(filterString);
- };
- filterStringOrStringArray = (input) => {
- return filterString(input) || Array.isArray(input) && input.every(filterString);
- };
- filterHasLength = (input) => {
- if (input == null || "number|boolean|function".includes(typeof input)) {
- return false;
- }
- return Array.isArray(input) || typeof input === "string" || typeof input.length === "number";
- };
- }
-});
-
-// src/lib/utils/exit-codes.ts
-var ExitCodes;
-var init_exit_codes = __esm({
- "src/lib/utils/exit-codes.ts"() {
- ExitCodes = /* @__PURE__ */ ((ExitCodes2) => {
- ExitCodes2[ExitCodes2["SUCCESS"] = 0] = "SUCCESS";
- ExitCodes2[ExitCodes2["ERROR"] = 1] = "ERROR";
- ExitCodes2[ExitCodes2["UNCLEAN"] = 128] = "UNCLEAN";
- return ExitCodes2;
- })(ExitCodes || {});
- }
-});
-
-// src/lib/utils/git-output-streams.ts
-var GitOutputStreams;
-var init_git_output_streams = __esm({
- "src/lib/utils/git-output-streams.ts"() {
- GitOutputStreams = class {
- constructor(stdOut, stdErr) {
- this.stdOut = stdOut;
- this.stdErr = stdErr;
- }
- asStrings() {
- return new GitOutputStreams(this.stdOut.toString("utf8"), this.stdErr.toString("utf8"));
- }
- };
- }
-});
-
-// src/lib/utils/line-parser.ts
-var LineParser, RemoteLineParser;
-var init_line_parser = __esm({
- "src/lib/utils/line-parser.ts"() {
- LineParser = class {
- constructor(regExp, useMatches) {
- this.matches = [];
- this.parse = (line, target) => {
- this.resetMatches();
- if (!this._regExp.every((reg, index) => this.addMatch(reg, index, line(index)))) {
- return false;
- }
- return this.useMatches(target, this.prepareMatches()) !== false;
- };
- this._regExp = Array.isArray(regExp) ? regExp : [regExp];
- if (useMatches) {
- this.useMatches = useMatches;
- }
- }
- useMatches(target, match) {
- throw new Error(`LineParser:useMatches not implemented`);
- }
- resetMatches() {
- this.matches.length = 0;
- }
- prepareMatches() {
- return this.matches;
- }
- addMatch(reg, index, line) {
- const matched = line && reg.exec(line);
- if (matched) {
- this.pushMatch(index, matched);
- }
- return !!matched;
- }
- pushMatch(_index, matched) {
- this.matches.push(...matched.slice(1));
- }
- };
- RemoteLineParser = class extends LineParser {
- addMatch(reg, index, line) {
- return /^remote:\s/.test(String(line)) && super.addMatch(reg, index, line);
- }
- pushMatch(index, matched) {
- if (index > 0 || matched.length > 1) {
- super.pushMatch(index, matched);
- }
- }
- };
- }
-});
-
-// src/lib/utils/simple-git-options.ts
-function createInstanceConfig(...options) {
- const baseDir = process.cwd();
- const config = Object.assign(__spreadValues({ baseDir }, defaultOptions), ...options.filter((o) => typeof o === "object" && o));
- config.baseDir = config.baseDir || baseDir;
- return config;
-}
-var defaultOptions;
-var init_simple_git_options = __esm({
- "src/lib/utils/simple-git-options.ts"() {
- defaultOptions = {
- binary: "git",
- maxConcurrentProcesses: 5,
- config: []
- };
- }
-});
-
-// src/lib/utils/task-options.ts
-function appendTaskOptions(options, commands = []) {
- if (!filterPlainObject(options)) {
- return commands;
- }
- return Object.keys(options).reduce((commands2, key) => {
- const value = options[key];
- if (filterPrimitives(value, ["boolean"])) {
- commands2.push(key + "=" + value);
- } else {
- commands2.push(key);
- }
- return commands2;
- }, commands);
-}
-function getTrailingOptions(args, initialPrimitive = 0, objectOnly = false) {
- const command = [];
- for (let i = 0, max = initialPrimitive < 0 ? args.length : initialPrimitive; i < max; i++) {
- if ("string|number".includes(typeof args[i])) {
- command.push(String(args[i]));
- }
- }
- appendTaskOptions(trailingOptionsArgument(args), command);
- if (!objectOnly) {
- command.push(...trailingArrayArgument(args));
- }
- return command;
-}
-function trailingArrayArgument(args) {
- const hasTrailingCallback = typeof last(args) === "function";
- return filterType(last(args, hasTrailingCallback ? 1 : 0), filterArray, []);
-}
-function trailingOptionsArgument(args) {
- const hasTrailingCallback = filterFunction(last(args));
- return filterType(last(args, hasTrailingCallback ? 1 : 0), filterPlainObject);
-}
-function trailingFunctionArgument(args, includeNoop = true) {
- const callback = asFunction(last(args));
- return includeNoop || isUserFunction(callback) ? callback : void 0;
-}
-var init_task_options = __esm({
- "src/lib/utils/task-options.ts"() {
- init_argument_filters();
- init_util();
- }
-});
-
-// src/lib/utils/task-parser.ts
-function callTaskParser(parser3, streams) {
- return parser3(streams.stdOut, streams.stdErr);
-}
-function parseStringResponse(result, parsers11, ...texts) {
- texts.forEach((text) => {
- for (let lines = toLinesWithContent(text), i = 0, max = lines.length; i < max; i++) {
- const line = (offset = 0) => {
- if (i + offset >= max) {
- return;
- }
- return lines[i + offset];
- };
- parsers11.some(({ parse }) => parse(line, result));
- }
- });
- return result;
-}
-var init_task_parser = __esm({
- "src/lib/utils/task-parser.ts"() {
- init_util();
- }
-});
-
-// src/lib/utils/index.ts
-var utils_exports = {};
-__export(utils_exports, {
- ExitCodes: () => ExitCodes,
- GitOutputStreams: () => GitOutputStreams,
- LineParser: () => LineParser,
- NOOP: () => NOOP,
- NULL: () => NULL,
- RemoteLineParser: () => RemoteLineParser,
- append: () => append,
- appendTaskOptions: () => appendTaskOptions,
- asArray: () => asArray,
- asFunction: () => asFunction,
- asNumber: () => asNumber,
- asStringArray: () => asStringArray,
- bufferToString: () => bufferToString,
- callTaskParser: () => callTaskParser,
- createInstanceConfig: () => createInstanceConfig,
- delay: () => delay,
- filterArray: () => filterArray,
- filterFunction: () => filterFunction,
- filterHasLength: () => filterHasLength,
- filterPlainObject: () => filterPlainObject,
- filterPrimitives: () => filterPrimitives,
- filterString: () => filterString,
- filterStringArray: () => filterStringArray,
- filterStringOrStringArray: () => filterStringOrStringArray,
- filterType: () => filterType,
- first: () => first,
- folderExists: () => folderExists,
- forEachLineWithContent: () => forEachLineWithContent,
- getTrailingOptions: () => getTrailingOptions,
- including: () => including,
- isUserFunction: () => isUserFunction,
- last: () => last,
- objectToString: () => objectToString,
- parseStringResponse: () => parseStringResponse,
- pick: () => pick,
- prefixedArray: () => prefixedArray,
- remove: () => remove,
- splitOn: () => splitOn,
- toLinesWithContent: () => toLinesWithContent,
- trailingFunctionArgument: () => trailingFunctionArgument,
- trailingOptionsArgument: () => trailingOptionsArgument
-});
-var init_utils = __esm({
- "src/lib/utils/index.ts"() {
- init_argument_filters();
- init_exit_codes();
- init_git_output_streams();
- init_line_parser();
- init_simple_git_options();
- init_task_options();
- init_task_parser();
- init_util();
- }
-});
-
-// src/lib/tasks/check-is-repo.ts
-var check_is_repo_exports = {};
-__export(check_is_repo_exports, {
- CheckRepoActions: () => CheckRepoActions,
- checkIsBareRepoTask: () => checkIsBareRepoTask,
- checkIsRepoRootTask: () => checkIsRepoRootTask,
- checkIsRepoTask: () => checkIsRepoTask
-});
-function checkIsRepoTask(action) {
- switch (action) {
- case "bare" /* BARE */:
- return checkIsBareRepoTask();
- case "root" /* IS_REPO_ROOT */:
- return checkIsRepoRootTask();
- }
- const commands = ["rev-parse", "--is-inside-work-tree"];
- return {
- commands,
- format: "utf-8",
- onError,
- parser
- };
-}
-function checkIsRepoRootTask() {
- const commands = ["rev-parse", "--git-dir"];
- return {
- commands,
- format: "utf-8",
- onError,
- parser(path) {
- return /^\.(git)?$/.test(path.trim());
- }
- };
-}
-function checkIsBareRepoTask() {
- const commands = ["rev-parse", "--is-bare-repository"];
- return {
- commands,
- format: "utf-8",
- onError,
- parser
- };
-}
-function isNotRepoMessage(error) {
- return /(Not a git repository|Kein Git-Repository)/i.test(String(error));
-}
-var CheckRepoActions, onError, parser;
-var init_check_is_repo = __esm({
- "src/lib/tasks/check-is-repo.ts"() {
- init_utils();
- CheckRepoActions = /* @__PURE__ */ ((CheckRepoActions2) => {
- CheckRepoActions2["BARE"] = "bare";
- CheckRepoActions2["IN_TREE"] = "tree";
- CheckRepoActions2["IS_REPO_ROOT"] = "root";
- return CheckRepoActions2;
- })(CheckRepoActions || {});
- onError = ({ exitCode }, error, done, fail) => {
- if (exitCode === 128 /* UNCLEAN */ && isNotRepoMessage(error)) {
- return done(Buffer.from("false"));
- }
- fail(error);
- };
- parser = (text) => {
- return text.trim() === "true";
- };
- }
-});
-
-// src/lib/responses/CleanSummary.ts
-function cleanSummaryParser(dryRun, text) {
- const summary = new CleanResponse(dryRun);
- const regexp = dryRun ? dryRunRemovalRegexp : removalRegexp;
- toLinesWithContent(text).forEach((line) => {
- const removed = line.replace(regexp, "");
- summary.paths.push(removed);
- (isFolderRegexp.test(removed) ? summary.folders : summary.files).push(removed);
- });
- return summary;
-}
-var CleanResponse, removalRegexp, dryRunRemovalRegexp, isFolderRegexp;
-var init_CleanSummary = __esm({
- "src/lib/responses/CleanSummary.ts"() {
- init_utils();
- CleanResponse = class {
- constructor(dryRun) {
- this.dryRun = dryRun;
- this.paths = [];
- this.files = [];
- this.folders = [];
- }
- };
- removalRegexp = /^[a-z]+\s*/i;
- dryRunRemovalRegexp = /^[a-z]+\s+[a-z]+\s*/i;
- isFolderRegexp = /\/$/;
- }
-});
-
-// src/lib/tasks/task.ts
-var task_exports = {};
-__export(task_exports, {
- EMPTY_COMMANDS: () => EMPTY_COMMANDS,
- adhocExecTask: () => adhocExecTask,
- configurationErrorTask: () => configurationErrorTask,
- isBufferTask: () => isBufferTask,
- isEmptyTask: () => isEmptyTask,
- straightThroughBufferTask: () => straightThroughBufferTask,
- straightThroughStringTask: () => straightThroughStringTask
-});
-function adhocExecTask(parser3) {
- return {
- commands: EMPTY_COMMANDS,
- format: "empty",
- parser: parser3
- };
-}
-function configurationErrorTask(error) {
- return {
- commands: EMPTY_COMMANDS,
- format: "empty",
- parser() {
- throw typeof error === "string" ? new TaskConfigurationError(error) : error;
- }
- };
-}
-function straightThroughStringTask(commands, trimmed2 = false) {
- return {
- commands,
- format: "utf-8",
- parser(text) {
- return trimmed2 ? String(text).trim() : text;
- }
- };
-}
-function straightThroughBufferTask(commands) {
- return {
- commands,
- format: "buffer",
- parser(buffer) {
- return buffer;
- }
- };
-}
-function isBufferTask(task) {
- return task.format === "buffer";
-}
-function isEmptyTask(task) {
- return task.format === "empty" || !task.commands.length;
-}
-var EMPTY_COMMANDS;
-var init_task = __esm({
- "src/lib/tasks/task.ts"() {
- init_task_configuration_error();
- EMPTY_COMMANDS = [];
- }
-});
-
-// src/lib/tasks/clean.ts
-var clean_exports = {};
-__export(clean_exports, {
- CONFIG_ERROR_INTERACTIVE_MODE: () => CONFIG_ERROR_INTERACTIVE_MODE,
- CONFIG_ERROR_MODE_REQUIRED: () => CONFIG_ERROR_MODE_REQUIRED,
- CONFIG_ERROR_UNKNOWN_OPTION: () => CONFIG_ERROR_UNKNOWN_OPTION,
- CleanOptions: () => CleanOptions,
- cleanTask: () => cleanTask,
- cleanWithOptionsTask: () => cleanWithOptionsTask,
- isCleanOptionsArray: () => isCleanOptionsArray
-});
-function cleanWithOptionsTask(mode, customArgs) {
- const { cleanMode, options, valid } = getCleanOptions(mode);
- if (!cleanMode) {
- return configurationErrorTask(CONFIG_ERROR_MODE_REQUIRED);
- }
- if (!valid.options) {
- return configurationErrorTask(CONFIG_ERROR_UNKNOWN_OPTION + JSON.stringify(mode));
- }
- options.push(...customArgs);
- if (options.some(isInteractiveMode)) {
- return configurationErrorTask(CONFIG_ERROR_INTERACTIVE_MODE);
- }
- return cleanTask(cleanMode, options);
-}
-function cleanTask(mode, customArgs) {
- const commands = ["clean", `-${mode}`, ...customArgs];
- return {
- commands,
- format: "utf-8",
- parser(text) {
- return cleanSummaryParser(mode === "n" /* DRY_RUN */, text);
- }
- };
-}
-function isCleanOptionsArray(input) {
- return Array.isArray(input) && input.every((test) => CleanOptionValues.has(test));
-}
-function getCleanOptions(input) {
- let cleanMode;
- let options = [];
- let valid = { cleanMode: false, options: true };
- input.replace(/[^a-z]i/g, "").split("").forEach((char) => {
- if (isCleanMode(char)) {
- cleanMode = char;
- valid.cleanMode = true;
- } else {
- valid.options = valid.options && isKnownOption(options[options.length] = `-${char}`);
- }
- });
- return {
- cleanMode,
- options,
- valid
- };
-}
-function isCleanMode(cleanMode) {
- return cleanMode === "f" /* FORCE */ || cleanMode === "n" /* DRY_RUN */;
-}
-function isKnownOption(option) {
- return /^-[a-z]$/i.test(option) && CleanOptionValues.has(option.charAt(1));
-}
-function isInteractiveMode(option) {
- if (/^-[^\-]/.test(option)) {
- return option.indexOf("i") > 0;
- }
- return option === "--interactive";
-}
-var CONFIG_ERROR_INTERACTIVE_MODE, CONFIG_ERROR_MODE_REQUIRED, CONFIG_ERROR_UNKNOWN_OPTION, CleanOptions, CleanOptionValues;
-var init_clean = __esm({
- "src/lib/tasks/clean.ts"() {
- init_CleanSummary();
- init_utils();
- init_task();
- CONFIG_ERROR_INTERACTIVE_MODE = "Git clean interactive mode is not supported";
- CONFIG_ERROR_MODE_REQUIRED = 'Git clean mode parameter ("n" or "f") is required';
- CONFIG_ERROR_UNKNOWN_OPTION = "Git clean unknown option found in: ";
- CleanOptions = /* @__PURE__ */ ((CleanOptions2) => {
- CleanOptions2["DRY_RUN"] = "n";
- CleanOptions2["FORCE"] = "f";
- CleanOptions2["IGNORED_INCLUDED"] = "x";
- CleanOptions2["IGNORED_ONLY"] = "X";
- CleanOptions2["EXCLUDING"] = "e";
- CleanOptions2["QUIET"] = "q";
- CleanOptions2["RECURSIVE"] = "d";
- return CleanOptions2;
- })(CleanOptions || {});
- CleanOptionValues = /* @__PURE__ */ new Set(["i", ...asStringArray(Object.values(CleanOptions))]);
- }
-});
-
-// src/lib/responses/ConfigList.ts
-function configListParser(text) {
- const config = new ConfigList();
- for (const item of configParser(text)) {
- config.addValue(item.file, String(item.key), item.value);
- }
- return config;
-}
-function configGetParser(text, key) {
- let value = null;
- const values = [];
- const scopes = /* @__PURE__ */ new Map();
- for (const item of configParser(text, key)) {
- if (item.key !== key) {
- continue;
- }
- values.push(value = item.value);
- if (!scopes.has(item.file)) {
- scopes.set(item.file, []);
- }
- scopes.get(item.file).push(value);
- }
- return {
- key,
- paths: Array.from(scopes.keys()),
- scopes,
- value,
- values
- };
-}
-function configFilePath(filePath) {
- return filePath.replace(/^(file):/, "");
-}
-function* configParser(text, requestedKey = null) {
- const lines = text.split("\0");
- for (let i = 0, max = lines.length - 1; i < max; ) {
- const file = configFilePath(lines[i++]);
- let value = lines[i++];
- let key = requestedKey;
- if (value.includes("\n")) {
- const line = splitOn(value, "\n");
- key = line[0];
- value = line[1];
- }
- yield { file, key, value };
- }
-}
-var ConfigList;
-var init_ConfigList = __esm({
- "src/lib/responses/ConfigList.ts"() {
- init_utils();
- ConfigList = class {
- constructor() {
- this.files = [];
- this.values = /* @__PURE__ */ Object.create(null);
- }
- get all() {
- if (!this._all) {
- this._all = this.files.reduce((all, file) => {
- return Object.assign(all, this.values[file]);
- }, {});
- }
- return this._all;
- }
- addFile(file) {
- if (!(file in this.values)) {
- const latest = last(this.files);
- this.values[file] = latest ? Object.create(this.values[latest]) : {};
- this.files.push(file);
- }
- return this.values[file];
- }
- addValue(file, key, value) {
- const values = this.addFile(file);
- if (!values.hasOwnProperty(key)) {
- values[key] = value;
- } else if (Array.isArray(values[key])) {
- values[key].push(value);
- } else {
- values[key] = [values[key], value];
- }
- this._all = void 0;
- }
- };
- }
-});
-
-// src/lib/tasks/config.ts
-function asConfigScope(scope, fallback) {
- if (typeof scope === "string" && GitConfigScope.hasOwnProperty(scope)) {
- return scope;
- }
- return fallback;
-}
-function addConfigTask(key, value, append2, scope) {
- const commands = ["config", `--${scope}`];
- if (append2) {
- commands.push("--add");
- }
- commands.push(key, value);
- return {
- commands,
- format: "utf-8",
- parser(text) {
- return text;
- }
- };
-}
-function getConfigTask(key, scope) {
- const commands = ["config", "--null", "--show-origin", "--get-all", key];
- if (scope) {
- commands.splice(1, 0, `--${scope}`);
- }
- return {
- commands,
- format: "utf-8",
- parser(text) {
- return configGetParser(text, key);
- }
- };
-}
-function listConfigTask(scope) {
- const commands = ["config", "--list", "--show-origin", "--null"];
- if (scope) {
- commands.push(`--${scope}`);
- }
- return {
- commands,
- format: "utf-8",
- parser(text) {
- return configListParser(text);
- }
- };
-}
-function config_default() {
- return {
- addConfig(key, value, ...rest) {
- return this._runTask(addConfigTask(key, value, rest[0] === true, asConfigScope(rest[1], "local" /* local */)), trailingFunctionArgument(arguments));
- },
- getConfig(key, scope) {
- return this._runTask(getConfigTask(key, asConfigScope(scope, void 0)), trailingFunctionArgument(arguments));
- },
- listConfig(...rest) {
- return this._runTask(listConfigTask(asConfigScope(rest[0], void 0)), trailingFunctionArgument(arguments));
- }
- };
-}
-var GitConfigScope;
-var init_config = __esm({
- "src/lib/tasks/config.ts"() {
- init_ConfigList();
- init_utils();
- GitConfigScope = /* @__PURE__ */ ((GitConfigScope2) => {
- GitConfigScope2["system"] = "system";
- GitConfigScope2["global"] = "global";
- GitConfigScope2["local"] = "local";
- GitConfigScope2["worktree"] = "worktree";
- return GitConfigScope2;
- })(GitConfigScope || {});
- }
-});
-
-// src/lib/tasks/grep.ts
-function grepQueryBuilder(...params) {
- return new GrepQuery().param(...params);
-}
-function parseGrep(grep) {
- const paths = /* @__PURE__ */ new Set();
- const results = {};
- forEachLineWithContent(grep, (input) => {
- const [path, line, preview] = input.split(NULL);
- paths.add(path);
- (results[path] = results[path] || []).push({
- line: asNumber(line),
- path,
- preview
- });
- });
- return {
- paths,
- results
- };
-}
-function grep_default() {
- return {
- grep(searchTerm) {
- const then = trailingFunctionArgument(arguments);
- const options = getTrailingOptions(arguments);
- for (const option of disallowedOptions) {
- if (options.includes(option)) {
- return this._runTask(configurationErrorTask(`git.grep: use of "${option}" is not supported.`), then);
- }
- }
- if (typeof searchTerm === "string") {
- searchTerm = grepQueryBuilder().param(searchTerm);
- }
- const commands = ["grep", "--null", "-n", "--full-name", ...options, ...searchTerm];
- return this._runTask({
- commands,
- format: "utf-8",
- parser(stdOut) {
- return parseGrep(stdOut);
- }
- }, then);
- }
- };
-}
-var disallowedOptions, Query, _a, GrepQuery;
-var init_grep = __esm({
- "src/lib/tasks/grep.ts"() {
- init_utils();
- init_task();
- disallowedOptions = ["-h"];
- Query = Symbol("grepQuery");
- GrepQuery = class {
- constructor() {
- this[_a] = [];
- }
- *[(_a = Query, Symbol.iterator)]() {
- for (const query of this[Query]) {
- yield query;
- }
- }
- and(...and) {
- and.length && this[Query].push("--and", "(", ...prefixedArray(and, "-e"), ")");
- return this;
- }
- param(...param) {
- this[Query].push(...prefixedArray(param, "-e"));
- return this;
- }
- };
- }
-});
-
-// src/lib/tasks/reset.ts
-var reset_exports = {};
-__export(reset_exports, {
- ResetMode: () => ResetMode,
- getResetMode: () => getResetMode,
- resetTask: () => resetTask
-});
-function resetTask(mode, customArgs) {
- const commands = ["reset"];
- if (isValidResetMode(mode)) {
- commands.push(`--${mode}`);
- }
- commands.push(...customArgs);
- return straightThroughStringTask(commands);
-}
-function getResetMode(mode) {
- if (isValidResetMode(mode)) {
- return mode;
- }
- switch (typeof mode) {
- case "string":
- case "undefined":
- return "soft" /* SOFT */;
- }
- return;
-}
-function isValidResetMode(mode) {
- return ResetModes.includes(mode);
-}
-var ResetMode, ResetModes;
-var init_reset = __esm({
- "src/lib/tasks/reset.ts"() {
- init_task();
- ResetMode = /* @__PURE__ */ ((ResetMode2) => {
- ResetMode2["MIXED"] = "mixed";
- ResetMode2["SOFT"] = "soft";
- ResetMode2["HARD"] = "hard";
- ResetMode2["MERGE"] = "merge";
- ResetMode2["KEEP"] = "keep";
- return ResetMode2;
- })(ResetMode || {});
- ResetModes = Array.from(Object.values(ResetMode));
- }
-});
-
-// src/lib/api.ts
-var api_exports = {};
-__export(api_exports, {
- CheckRepoActions: () => CheckRepoActions,
- CleanOptions: () => CleanOptions,
- GitConfigScope: () => GitConfigScope,
- GitConstructError: () => GitConstructError,
- GitError: () => GitError,
- GitPluginError: () => GitPluginError,
- GitResponseError: () => GitResponseError,
- ResetMode: () => ResetMode,
- TaskConfigurationError: () => TaskConfigurationError,
- grepQueryBuilder: () => grepQueryBuilder
-});
-var init_api = __esm({
- "src/lib/api.ts"() {
- init_git_construct_error();
- init_git_error();
- init_git_plugin_error();
- init_git_response_error();
- init_task_configuration_error();
- init_check_is_repo();
- init_clean();
- init_config();
- init_grep();
- init_reset();
- }
-});
-
-// src/lib/plugins/command-config-prefixing-plugin.ts
-function commandConfigPrefixingPlugin(configuration) {
- const prefix = prefixedArray(configuration, "-c");
- return {
- type: "spawn.args",
- action(data) {
- return [...prefix, ...data];
- }
- };
-}
-var init_command_config_prefixing_plugin = __esm({
- "src/lib/plugins/command-config-prefixing-plugin.ts"() {
- init_utils();
- }
-});
-
-// src/lib/plugins/completion-detection.plugin.ts
-function completionDetectionPlugin({
- onClose = true,
- onExit = 50
-} = {}) {
- function createEvents() {
- let exitCode = -1;
- const events = {
- close: (0, import_promise_deferred.deferred)(),
- closeTimeout: (0, import_promise_deferred.deferred)(),
- exit: (0, import_promise_deferred.deferred)(),
- exitTimeout: (0, import_promise_deferred.deferred)()
- };
- const result = Promise.race([
- onClose === false ? never : events.closeTimeout.promise,
- onExit === false ? never : events.exitTimeout.promise
- ]);
- configureTimeout(onClose, events.close, events.closeTimeout);
- configureTimeout(onExit, events.exit, events.exitTimeout);
- return {
- close(code) {
- exitCode = code;
- events.close.done();
- },
- exit(code) {
- exitCode = code;
- events.exit.done();
- },
- get exitCode() {
- return exitCode;
- },
- result
- };
- }
- function configureTimeout(flag, event, timeout) {
- if (flag === false) {
- return;
- }
- (flag === true ? event.promise : event.promise.then(() => delay(flag))).then(timeout.done);
- }
- return {
- type: "spawn.after",
- action(_0, _1) {
- return __async(this, arguments, function* (_data, { spawned, close }) {
- var _a2, _b;
- const events = createEvents();
- let deferClose = true;
- let quickClose = () => void (deferClose = false);
- (_a2 = spawned.stdout) == null ? void 0 : _a2.on("data", quickClose);
- (_b = spawned.stderr) == null ? void 0 : _b.on("data", quickClose);
- spawned.on("error", quickClose);
- spawned.on("close", (code) => events.close(code));
- spawned.on("exit", (code) => events.exit(code));
- try {
- yield events.result;
- if (deferClose) {
- yield delay(50);
- }
- close(events.exitCode);
- } catch (err) {
- close(events.exitCode, err);
- }
- });
- }
- };
-}
-var import_promise_deferred, never;
-var init_completion_detection_plugin = __esm({
- "src/lib/plugins/completion-detection.plugin.ts"() {
- import_promise_deferred = require("@kwsites/promise-deferred");
- init_utils();
- never = (0, import_promise_deferred.deferred)().promise;
- }
-});
-
-// src/lib/plugins/error-detection.plugin.ts
-function isTaskError(result) {
- return !!(result.exitCode && result.stdErr.length);
-}
-function getErrorMessage(result) {
- return Buffer.concat([...result.stdOut, ...result.stdErr]);
-}
-function errorDetectionHandler(overwrite = false, isError = isTaskError, errorMessage = getErrorMessage) {
- return (error, result) => {
- if (!overwrite && error || !isError(result)) {
- return error;
- }
- return errorMessage(result);
- };
-}
-function errorDetectionPlugin(config) {
- return {
- type: "task.error",
- action(data, context) {
- const error = config(data.error, {
- stdErr: context.stdErr,
- stdOut: context.stdOut,
- exitCode: context.exitCode
- });
- if (Buffer.isBuffer(error)) {
- return { error: new GitError(void 0, error.toString("utf-8")) };
- }
- return {
- error
- };
- }
- };
-}
-var init_error_detection_plugin = __esm({
- "src/lib/plugins/error-detection.plugin.ts"() {
- init_git_error();
- }
-});
-
-// src/lib/plugins/plugin-store.ts
-var PluginStore;
-var init_plugin_store = __esm({
- "src/lib/plugins/plugin-store.ts"() {
- init_utils();
- PluginStore = class {
- constructor() {
- this.plugins = /* @__PURE__ */ new Set();
- }
- add(plugin) {
- const plugins = [];
- asArray(plugin).forEach((plugin2) => plugin2 && this.plugins.add(append(plugins, plugin2)));
- return () => {
- plugins.forEach((plugin2) => this.plugins.delete(plugin2));
- };
- }
- exec(type, data, context) {
- let output = data;
- const contextual = Object.freeze(Object.create(context));
- for (const plugin of this.plugins) {
- if (plugin.type === type) {
- output = plugin.action(output, contextual);
- }
- }
- return output;
- }
- };
- }
-});
-
-// src/lib/plugins/progress-monitor-plugin.ts
-function progressMonitorPlugin(progress) {
- const progressCommand = "--progress";
- const progressMethods = ["checkout", "clone", "fetch", "pull", "push"];
- const onProgress = {
- type: "spawn.after",
- action(_data, context) {
- var _a2;
- if (!context.commands.includes(progressCommand)) {
- return;
- }
- (_a2 = context.spawned.stderr) == null ? void 0 : _a2.on("data", (chunk) => {
- const message = /^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(chunk.toString("utf8"));
- if (!message) {
- return;
- }
- progress({
- method: context.method,
- stage: progressEventStage(message[1]),
- progress: asNumber(message[2]),
- processed: asNumber(message[3]),
- total: asNumber(message[4])
- });
- });
- }
- };
- const onArgs = {
- type: "spawn.args",
- action(args, context) {
- if (!progressMethods.includes(context.method)) {
- return args;
- }
- return including(args, progressCommand);
- }
- };
- return [onArgs, onProgress];
-}
-function progressEventStage(input) {
- return String(input.toLowerCase().split(" ", 1)) || "unknown";
-}
-var init_progress_monitor_plugin = __esm({
- "src/lib/plugins/progress-monitor-plugin.ts"() {
- init_utils();
- }
-});
-
-// src/lib/plugins/simple-git-plugin.ts
-var init_simple_git_plugin = __esm({
- "src/lib/plugins/simple-git-plugin.ts"() {
- }
-});
-
-// src/lib/plugins/spawn-options-plugin.ts
-function spawnOptionsPlugin(spawnOptions) {
- const options = pick(spawnOptions, ["uid", "gid"]);
- return {
- type: "spawn.options",
- action(data) {
- return __spreadValues(__spreadValues({}, options), data);
- }
- };
-}
-var init_spawn_options_plugin = __esm({
- "src/lib/plugins/spawn-options-plugin.ts"() {
- init_utils();
- }
-});
-
-// src/lib/plugins/timout-plugin.ts
-function timeoutPlugin({ block }) {
- if (block > 0) {
- return {
- type: "spawn.after",
- action(_data, context) {
- var _a2, _b;
- let timeout;
- function wait() {
- timeout && clearTimeout(timeout);
- timeout = setTimeout(kill, block);
- }
- function stop() {
- var _a3, _b2;
- (_a3 = context.spawned.stdout) == null ? void 0 : _a3.off("data", wait);
- (_b2 = context.spawned.stderr) == null ? void 0 : _b2.off("data", wait);
- context.spawned.off("exit", stop);
- context.spawned.off("close", stop);
- }
- function kill() {
- stop();
- context.kill(new GitPluginError(void 0, "timeout", `block timeout reached`));
- }
- (_a2 = context.spawned.stdout) == null ? void 0 : _a2.on("data", wait);
- (_b = context.spawned.stderr) == null ? void 0 : _b.on("data", wait);
- context.spawned.on("exit", stop);
- context.spawned.on("close", stop);
- wait();
- }
- };
- }
-}
-var init_timout_plugin = __esm({
- "src/lib/plugins/timout-plugin.ts"() {
- init_git_plugin_error();
- }
-});
-
-// src/lib/plugins/index.ts
-var init_plugins = __esm({
- "src/lib/plugins/index.ts"() {
- init_command_config_prefixing_plugin();
- init_completion_detection_plugin();
- init_error_detection_plugin();
- init_plugin_store();
- init_progress_monitor_plugin();
- init_simple_git_plugin();
- init_spawn_options_plugin();
- init_timout_plugin();
- }
-});
-
-// src/lib/git-logger.ts
-function createLog() {
- return (0, import_debug.default)("simple-git");
-}
-function prefixedLogger(to, prefix, forward) {
- if (!prefix || !String(prefix).replace(/\s*/, "")) {
- return !forward ? to : (message, ...args) => {
- to(message, ...args);
- forward(message, ...args);
- };
- }
- return (message, ...args) => {
- to(`%s ${message}`, prefix, ...args);
- if (forward) {
- forward(message, ...args);
- }
- };
-}
-function childLoggerName(name, childDebugger, { namespace: parentNamespace }) {
- if (typeof name === "string") {
- return name;
- }
- const childNamespace = childDebugger && childDebugger.namespace || "";
- if (childNamespace.startsWith(parentNamespace)) {
- return childNamespace.substr(parentNamespace.length + 1);
- }
- return childNamespace || parentNamespace;
-}
-function createLogger(label, verbose, initialStep, infoDebugger = createLog()) {
- const labelPrefix = label && `[${label}]` || "";
- const spawned = [];
- const debugDebugger = typeof verbose === "string" ? infoDebugger.extend(verbose) : verbose;
- const key = childLoggerName(filterType(verbose, filterString), debugDebugger, infoDebugger);
- return step(initialStep);
- function sibling(name, initial) {
- return append(spawned, createLogger(label, key.replace(/^[^:]+/, name), initial, infoDebugger));
- }
- function step(phase) {
- const stepPrefix = phase && `[${phase}]` || "";
- const debug2 = debugDebugger && prefixedLogger(debugDebugger, stepPrefix) || NOOP;
- const info = prefixedLogger(infoDebugger, `${labelPrefix} ${stepPrefix}`, debug2);
- return Object.assign(debugDebugger ? debug2 : info, {
- label,
- sibling,
- info,
- step
- });
- }
-}
-var import_debug;
-var init_git_logger = __esm({
- "src/lib/git-logger.ts"() {
- import_debug = __toESM(require("debug"));
- init_utils();
- import_debug.default.formatters.L = (value) => String(filterHasLength(value) ? value.length : "-");
- import_debug.default.formatters.B = (value) => {
- if (Buffer.isBuffer(value)) {
- return value.toString("utf8");
- }
- return objectToString(value);
- };
- }
-});
-
-// src/lib/runners/tasks-pending-queue.ts
-var _TasksPendingQueue, TasksPendingQueue;
-var init_tasks_pending_queue = __esm({
- "src/lib/runners/tasks-pending-queue.ts"() {
- init_git_error();
- init_git_logger();
- _TasksPendingQueue = class {
- constructor(logLabel = "GitExecutor") {
- this.logLabel = logLabel;
- this._queue = /* @__PURE__ */ new Map();
- }
- withProgress(task) {
- return this._queue.get(task);
- }
- createProgress(task) {
- const name = _TasksPendingQueue.getName(task.commands[0]);
- const logger = createLogger(this.logLabel, name);
- return {
- task,
- logger,
- name
- };
- }
- push(task) {
- const progress = this.createProgress(task);
- progress.logger("Adding task to the queue, commands = %o", task.commands);
- this._queue.set(task, progress);
- return progress;
- }
- fatal(err) {
- for (const [task, { logger }] of Array.from(this._queue.entries())) {
- if (task === err.task) {
- logger.info(`Failed %o`, err);
- logger(`Fatal exception, any as-yet un-started tasks run through this executor will not be attempted`);
- } else {
- logger.info(`A fatal exception occurred in a previous task, the queue has been purged: %o`, err.message);
- }
- this.complete(task);
- }
- if (this._queue.size !== 0) {
- throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`);
- }
- }
- complete(task) {
- const progress = this.withProgress(task);
- if (progress) {
- this._queue.delete(task);
- }
- }
- attempt(task) {
- const progress = this.withProgress(task);
- if (!progress) {
- throw new GitError(void 0, "TasksPendingQueue: attempt called for an unknown task");
- }
- progress.logger("Starting task");
- return progress;
- }
- static getName(name = "empty") {
- return `task:${name}:${++_TasksPendingQueue.counter}`;
- }
- };
- TasksPendingQueue = _TasksPendingQueue;
- TasksPendingQueue.counter = 0;
- }
-});
-
-// src/lib/runners/git-executor-chain.ts
-function pluginContext(task, commands) {
- return {
- method: first(task.commands) || "",
- commands
- };
-}
-function onErrorReceived(target, logger) {
- return (err) => {
- logger(`[ERROR] child process exception %o`, err);
- target.push(Buffer.from(String(err.stack), "ascii"));
- };
-}
-function onDataReceived(target, name, logger, output) {
- return (buffer) => {
- logger(`%s received %L bytes`, name, buffer);
- output(`%B`, buffer);
- target.push(buffer);
- };
-}
-var import_child_process, GitExecutorChain;
-var init_git_executor_chain = __esm({
- "src/lib/runners/git-executor-chain.ts"() {
- import_child_process = require("child_process");
- init_git_error();
- init_task();
- init_utils();
- init_tasks_pending_queue();
- GitExecutorChain = class {
- constructor(_executor, _scheduler, _plugins) {
- this._executor = _executor;
- this._scheduler = _scheduler;
- this._plugins = _plugins;
- this._chain = Promise.resolve();
- this._queue = new TasksPendingQueue();
- }
- get binary() {
- return this._executor.binary;
- }
- get cwd() {
- return this._cwd || this._executor.cwd;
- }
- set cwd(cwd) {
- this._cwd = cwd;
- }
- get env() {
- return this._executor.env;
- }
- get outputHandler() {
- return this._executor.outputHandler;
- }
- chain() {
- return this;
- }
- push(task) {
- this._queue.push(task);
- return this._chain = this._chain.then(() => this.attemptTask(task));
- }
- attemptTask(task) {
- return __async(this, null, function* () {
- const onScheduleComplete = yield this._scheduler.next();
- const onQueueComplete = () => this._queue.complete(task);
- try {
- const { logger } = this._queue.attempt(task);
- return yield isEmptyTask(task) ? this.attemptEmptyTask(task, logger) : this.attemptRemoteTask(task, logger);
- } catch (e) {
- throw this.onFatalException(task, e);
- } finally {
- onQueueComplete();
- onScheduleComplete();
- }
- });
- }
- onFatalException(task, e) {
- const gitError = e instanceof GitError ? Object.assign(e, { task }) : new GitError(task, e && String(e));
- this._chain = Promise.resolve();
- this._queue.fatal(gitError);
- return gitError;
- }
- attemptRemoteTask(task, logger) {
- return __async(this, null, function* () {
- const args = this._plugins.exec("spawn.args", [...task.commands], pluginContext(task, task.commands));
- const raw = yield this.gitResponse(task, this.binary, args, this.outputHandler, logger.step("SPAWN"));
- const outputStreams = yield this.handleTaskData(task, args, raw, logger.step("HANDLE"));
- logger(`passing response to task's parser as a %s`, task.format);
- if (isBufferTask(task)) {
- return callTaskParser(task.parser, outputStreams);
- }
- return callTaskParser(task.parser, outputStreams.asStrings());
- });
- }
- attemptEmptyTask(task, logger) {
- return __async(this, null, function* () {
- logger(`empty task bypassing child process to call to task's parser`);
- return task.parser(this);
- });
- }
- handleTaskData(task, args, result, logger) {
- const { exitCode, rejection, stdOut, stdErr } = result;
- return new Promise((done, fail) => {
- logger(`Preparing to handle process response exitCode=%d stdOut=`, exitCode);
- const { error } = this._plugins.exec("task.error", { error: rejection }, __spreadValues(__spreadValues({}, pluginContext(task, args)), result));
- if (error && task.onError) {
- logger.info(`exitCode=%s handling with custom error handler`);
- return task.onError(result, error, (newStdOut) => {
- logger.info(`custom error handler treated as success`);
- logger(`custom error returned a %s`, objectToString(newStdOut));
- done(new GitOutputStreams(Array.isArray(newStdOut) ? Buffer.concat(newStdOut) : newStdOut, Buffer.concat(stdErr)));
- }, fail);
- }
- if (error) {
- logger.info(`handling as error: exitCode=%s stdErr=%s rejection=%o`, exitCode, stdErr.length, rejection);
- return fail(error);
- }
- logger.info(`retrieving task output complete`);
- done(new GitOutputStreams(Buffer.concat(stdOut), Buffer.concat(stdErr)));
- });
- }
- gitResponse(task, command, args, outputHandler, logger) {
- return __async(this, null, function* () {
- const outputLogger = logger.sibling("output");
- const spawnOptions = this._plugins.exec("spawn.options", {
- cwd: this.cwd,
- env: this.env,
- windowsHide: true
- }, pluginContext(task, task.commands));
- return new Promise((done) => {
- const stdOut = [];
- const stdErr = [];
- let rejection;
- logger.info(`%s %o`, command, args);
- logger("%O", spawnOptions);
- const spawned = (0, import_child_process.spawn)(command, args, spawnOptions);
- spawned.stdout.on("data", onDataReceived(stdOut, "stdOut", logger, outputLogger.step("stdOut")));
- spawned.stderr.on("data", onDataReceived(stdErr, "stdErr", logger, outputLogger.step("stdErr")));
- spawned.on("error", onErrorReceived(stdErr, logger));
- if (outputHandler) {
- logger(`Passing child process stdOut/stdErr to custom outputHandler`);
- outputHandler(command, spawned.stdout, spawned.stderr, [...args]);
- }
- this._plugins.exec("spawn.after", void 0, __spreadProps(__spreadValues({}, pluginContext(task, args)), {
- spawned,
- close(exitCode, reason) {
- done({
- stdOut,
- stdErr,
- exitCode,
- rejection: rejection || reason
- });
- },
- kill(reason) {
- if (spawned.killed) {
- return;
- }
- rejection = reason;
- spawned.kill("SIGINT");
- }
- }));
- });
- });
- }
- };
- }
-});
-
-// src/lib/runners/git-executor.ts
-var git_executor_exports = {};
-__export(git_executor_exports, {
- GitExecutor: () => GitExecutor
-});
-var GitExecutor;
-var init_git_executor = __esm({
- "src/lib/runners/git-executor.ts"() {
- init_git_executor_chain();
- GitExecutor = class {
- constructor(binary = "git", cwd, _scheduler, _plugins) {
- this.binary = binary;
- this.cwd = cwd;
- this._scheduler = _scheduler;
- this._plugins = _plugins;
- this._chain = new GitExecutorChain(this, this._scheduler, this._plugins);
- }
- chain() {
- return new GitExecutorChain(this, this._scheduler, this._plugins);
- }
- push(task) {
- return this._chain.push(task);
- }
- };
- }
-});
-
-// src/lib/task-callback.ts
-function taskCallback(task, response, callback = NOOP) {
- const onSuccess = (data) => {
- callback(null, data);
- };
- const onError2 = (err) => {
- if ((err == null ? void 0 : err.task) === task) {
- callback(err instanceof GitResponseError ? addDeprecationNoticeToError(err) : err, void 0);
- }
- };
- response.then(onSuccess, onError2);
-}
-function addDeprecationNoticeToError(err) {
- let log = (name) => {
- console.warn(`simple-git deprecation notice: accessing GitResponseError.${name} should be GitResponseError.git.${name}, this will no longer be available in version 3`);
- log = NOOP;
- };
- return Object.create(err, Object.getOwnPropertyNames(err.git).reduce(descriptorReducer, {}));
- function descriptorReducer(all, name) {
- if (name in err) {
- return all;
- }
- all[name] = {
- enumerable: false,
- configurable: false,
- get() {
- log(name);
- return err.git[name];
- }
- };
- return all;
- }
-}
-var init_task_callback = __esm({
- "src/lib/task-callback.ts"() {
- init_git_response_error();
- init_utils();
- }
-});
-
-// src/lib/tasks/change-working-directory.ts
-function changeWorkingDirectoryTask(directory, root) {
- return adhocExecTask((instance) => {
- if (!folderExists(directory)) {
- throw new Error(`Git.cwd: cannot change to non-directory "${directory}"`);
- }
- return (root || instance).cwd = directory;
- });
-}
-var init_change_working_directory = __esm({
- "src/lib/tasks/change-working-directory.ts"() {
- init_utils();
- init_task();
- }
-});
-
-// src/lib/tasks/hash-object.ts
-function hashObjectTask(filePath, write) {
- const commands = ["hash-object", filePath];
- if (write) {
- commands.push("-w");
- }
- return straightThroughStringTask(commands, true);
-}
-var init_hash_object = __esm({
- "src/lib/tasks/hash-object.ts"() {
- init_task();
- }
-});
-
-// src/lib/responses/InitSummary.ts
-function parseInit(bare, path, text) {
- const response = String(text).trim();
- let result;
- if (result = initResponseRegex.exec(response)) {
- return new InitSummary(bare, path, false, result[1]);
- }
- if (result = reInitResponseRegex.exec(response)) {
- return new InitSummary(bare, path, true, result[1]);
- }
- let gitDir = "";
- const tokens = response.split(" ");
- while (tokens.length) {
- const token = tokens.shift();
- if (token === "in") {
- gitDir = tokens.join(" ");
- break;
- }
- }
- return new InitSummary(bare, path, /^re/i.test(response), gitDir);
-}
-var InitSummary, initResponseRegex, reInitResponseRegex;
-var init_InitSummary = __esm({
- "src/lib/responses/InitSummary.ts"() {
- InitSummary = class {
- constructor(bare, path, existing, gitDir) {
- this.bare = bare;
- this.path = path;
- this.existing = existing;
- this.gitDir = gitDir;
- }
- };
- initResponseRegex = /^Init.+ repository in (.+)$/;
- reInitResponseRegex = /^Rein.+ in (.+)$/;
- }
-});
-
-// src/lib/tasks/init.ts
-function hasBareCommand(command) {
- return command.includes(bareCommand);
-}
-function initTask(bare = false, path, customArgs) {
- const commands = ["init", ...customArgs];
- if (bare && !hasBareCommand(commands)) {
- commands.splice(1, 0, bareCommand);
- }
- return {
- commands,
- format: "utf-8",
- parser(text) {
- return parseInit(commands.includes("--bare"), path, text);
- }
- };
-}
-var bareCommand;
-var init_init = __esm({
- "src/lib/tasks/init.ts"() {
- init_InitSummary();
- bareCommand = "--bare";
- }
-});
-
-// src/lib/responses/DiffSummary.ts
-var DiffSummary;
-var init_DiffSummary = __esm({
- "src/lib/responses/DiffSummary.ts"() {
- DiffSummary = class {
- constructor() {
- this.changed = 0;
- this.deletions = 0;
- this.insertions = 0;
- this.files = [];
- }
- };
- }
-});
-
-// src/lib/parsers/parse-diff-summary.ts
-function parseDiffResult(stdOut) {
- const lines = stdOut.trim().split("\n");
- const status = new DiffSummary();
- readSummaryLine(status, lines.pop());
- for (let i = 0, max = lines.length; i < max; i++) {
- const line = lines[i];
- textFileChange(line, status) || binaryFileChange(line, status);
- }
- return status;
-}
-function readSummaryLine(status, summary) {
- (summary || "").trim().split(", ").forEach(function(text) {
- const summary2 = /(\d+)\s([a-z]+)/.exec(text);
- if (!summary2) {
- return;
- }
- summaryType(status, summary2[2], parseInt(summary2[1], 10));
- });
-}
-function summaryType(status, key, value) {
- const match = /([a-z]+?)s?\b/.exec(key);
- if (!match || !statusUpdate[match[1]]) {
- return;
- }
- statusUpdate[match[1]](status, value);
-}
-function textFileChange(input, { files }) {
- const line = input.trim().match(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/);
- if (line) {
- var alterations = (line[3] || "").trim();
- files.push({
- file: line[1].trim(),
- changes: parseInt(line[2], 10),
- insertions: alterations.replace(/-/g, "").length,
- deletions: alterations.replace(/\+/g, "").length,
- binary: false
- });
- return true;
- }
- return false;
-}
-function binaryFileChange(input, { files }) {
- const line = input.match(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)$/);
- if (line) {
- files.push({
- file: line[1].trim(),
- before: +line[2],
- after: +line[3],
- binary: true
- });
- return true;
- }
- return false;
-}
-var statusUpdate;
-var init_parse_diff_summary = __esm({
- "src/lib/parsers/parse-diff-summary.ts"() {
- init_DiffSummary();
- statusUpdate = {
- file(status, value) {
- status.changed = value;
- },
- deletion(status, value) {
- status.deletions = value;
- },
- insertion(status, value) {
- status.insertions = value;
- }
- };
- }
-});
-
-// src/lib/parsers/parse-list-log-summary.ts
-function lineBuilder(tokens, fields) {
- return fields.reduce((line, field, index) => {
- line[field] = tokens[index] || "";
- return line;
- }, /* @__PURE__ */ Object.create({ diff: null }));
-}
-function createListLogSummaryParser(splitter = SPLITTER, fields = defaultFieldNames) {
- return function(stdOut) {
- const all = toLinesWithContent(stdOut, true, START_BOUNDARY).map(function(item) {
- const lineDetail = item.trim().split(COMMIT_BOUNDARY);
- const listLogLine = lineBuilder(lineDetail[0].trim().split(splitter), fields);
- if (lineDetail.length > 1 && !!lineDetail[1].trim()) {
- listLogLine.diff = parseDiffResult(lineDetail[1]);
- }
- return listLogLine;
- });
- return {
- all,
- latest: all.length && all[0] || null,
- total: all.length
- };
- };
-}
-var START_BOUNDARY, COMMIT_BOUNDARY, SPLITTER, defaultFieldNames;
-var init_parse_list_log_summary = __esm({
- "src/lib/parsers/parse-list-log-summary.ts"() {
- init_utils();
- init_parse_diff_summary();
- START_BOUNDARY = "\xF2\xF2\xF2\xF2\xF2\xF2 ";
- COMMIT_BOUNDARY = " \xF2\xF2";
- SPLITTER = " \xF2 ";
- defaultFieldNames = ["hash", "date", "message", "refs", "author_name", "author_email"];
- }
-});
-
-// src/lib/tasks/log.ts
-function prettyFormat(format, splitter) {
- const fields = [];
- const formatStr = [];
- Object.keys(format).forEach((field) => {
- fields.push(field);
- formatStr.push(String(format[field]));
- });
- return [
- fields,
- formatStr.join(splitter)
- ];
-}
-function userOptions(input) {
- const output = __spreadValues({}, input);
- Object.keys(input).forEach((key) => {
- if (key in excludeOptions) {
- delete output[key];
- }
- });
- return output;
-}
-function parseLogOptions(opt = {}, customArgs = []) {
- const splitter = opt.splitter || SPLITTER;
- const format = opt.format || {
- hash: "%H",
- date: opt.strictDate === false ? "%ai" : "%aI",
- message: "%s",
- refs: "%D",
- body: opt.multiLine ? "%B" : "%b",
- author_name: opt.mailMap !== false ? "%aN" : "%an",
- author_email: opt.mailMap !== false ? "%aE" : "%ae"
- };
- const [fields, formatStr] = prettyFormat(format, splitter);
- const suffix = [];
- const command = [
- `--pretty=format:${START_BOUNDARY}${formatStr}${COMMIT_BOUNDARY}`,
- ...customArgs
- ];
- const maxCount = opt.n || opt["max-count"] || opt.maxCount;
- if (maxCount) {
- command.push(`--max-count=${maxCount}`);
- }
- if (opt.from && opt.to) {
- const rangeOperator = opt.symmetric !== false ? "..." : "..";
- suffix.push(`${opt.from}${rangeOperator}${opt.to}`);
- }
- if (opt.file) {
- suffix.push("--follow", opt.file);
- }
- appendTaskOptions(userOptions(opt), command);
- return {
- fields,
- splitter,
- commands: [
- ...command,
- ...suffix
- ]
- };
-}
-function logTask(splitter, fields, customArgs) {
- return {
- commands: ["log", ...customArgs],
- format: "utf-8",
- parser: createListLogSummaryParser(splitter, fields)
- };
-}
-function log_default() {
- return {
- log(...rest) {
- const next = trailingFunctionArgument(arguments);
- const task = rejectDeprecatedSignatures(...rest) || createLogTask(parseLogOptions(trailingOptionsArgument(arguments), filterType(arguments[0], filterArray)));
- return this._runTask(task, next);
- }
- };
- function createLogTask(options) {
- return logTask(options.splitter, options.fields, options.commands);
- }
- function rejectDeprecatedSignatures(from, to) {
- return filterString(from) && filterString(to) && configurationErrorTask(`git.log(string, string) should be replaced with git.log({ from: string, to: string })`);
- }
-}
-var excludeOptions;
-var init_log = __esm({
- "src/lib/tasks/log.ts"() {
- init_parse_list_log_summary();
- init_utils();
- init_task();
- excludeOptions = /* @__PURE__ */ ((excludeOptions2) => {
- excludeOptions2[excludeOptions2["--pretty"] = 0] = "--pretty";
- excludeOptions2[excludeOptions2["max-count"] = 1] = "max-count";
- excludeOptions2[excludeOptions2["maxCount"] = 2] = "maxCount";
- excludeOptions2[excludeOptions2["n"] = 3] = "n";
- excludeOptions2[excludeOptions2["file"] = 4] = "file";
- excludeOptions2[excludeOptions2["format"] = 5] = "format";
- excludeOptions2[excludeOptions2["from"] = 6] = "from";
- excludeOptions2[excludeOptions2["to"] = 7] = "to";
- excludeOptions2[excludeOptions2["splitter"] = 8] = "splitter";
- excludeOptions2[excludeOptions2["symmetric"] = 9] = "symmetric";
- excludeOptions2[excludeOptions2["mailMap"] = 10] = "mailMap";
- excludeOptions2[excludeOptions2["multiLine"] = 11] = "multiLine";
- excludeOptions2[excludeOptions2["strictDate"] = 12] = "strictDate";
- return excludeOptions2;
- })(excludeOptions || {});
- }
-});
-
-// src/lib/responses/MergeSummary.ts
-var MergeSummaryConflict, MergeSummaryDetail;
-var init_MergeSummary = __esm({
- "src/lib/responses/MergeSummary.ts"() {
- MergeSummaryConflict = class {
- constructor(reason, file = null, meta) {
- this.reason = reason;
- this.file = file;
- this.meta = meta;
- }
- toString() {
- return `${this.file}:${this.reason}`;
- }
- };
- MergeSummaryDetail = class {
- constructor() {
- this.conflicts = [];
- this.merges = [];
- this.result = "success";
- }
- get failed() {
- return this.conflicts.length > 0;
- }
- get reason() {
- return this.result;
- }
- toString() {
- if (this.conflicts.length) {
- return `CONFLICTS: ${this.conflicts.join(", ")}`;
- }
- return "OK";
- }
- };
- }
-});
-
-// src/lib/responses/PullSummary.ts
-var PullSummary, PullFailedSummary;
-var init_PullSummary = __esm({
- "src/lib/responses/PullSummary.ts"() {
- PullSummary = class {
- constructor() {
- this.remoteMessages = {
- all: []
- };
- this.created = [];
- this.deleted = [];
- this.files = [];
- this.deletions = {};
- this.insertions = {};
- this.summary = {
- changes: 0,
- deletions: 0,
- insertions: 0
- };
- }
- };
- PullFailedSummary = class {
- constructor() {
- this.remote = "";
- this.hash = {
- local: "",
- remote: ""
- };
- this.branch = {
- local: "",
- remote: ""
- };
- this.message = "";
- }
- toString() {
- return this.message;
- }
- };
- }
-});
-
-// src/lib/parsers/parse-remote-objects.ts
-function objectEnumerationResult(remoteMessages) {
- return remoteMessages.objects = remoteMessages.objects || {
- compressing: 0,
- counting: 0,
- enumerating: 0,
- packReused: 0,
- reused: { count: 0, delta: 0 },
- total: { count: 0, delta: 0 }
- };
-}
-function asObjectCount(source) {
- const count = /^\s*(\d+)/.exec(source);
- const delta = /delta (\d+)/i.exec(source);
- return {
- count: asNumber(count && count[1] || "0"),
- delta: asNumber(delta && delta[1] || "0")
- };
-}
-var remoteMessagesObjectParsers;
-var init_parse_remote_objects = __esm({
- "src/lib/parsers/parse-remote-objects.ts"() {
- init_utils();
- remoteMessagesObjectParsers = [
- new RemoteLineParser(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i, (result, [action, count]) => {
- const key = action.toLowerCase();
- const enumeration = objectEnumerationResult(result.remoteMessages);
- Object.assign(enumeration, { [key]: asNumber(count) });
- }),
- new RemoteLineParser(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i, (result, [action, count]) => {
- const key = action.toLowerCase();
- const enumeration = objectEnumerationResult(result.remoteMessages);
- Object.assign(enumeration, { [key]: asNumber(count) });
- }),
- new RemoteLineParser(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i, (result, [total, reused, packReused]) => {
- const objects = objectEnumerationResult(result.remoteMessages);
- objects.total = asObjectCount(total);
- objects.reused = asObjectCount(reused);
- objects.packReused = asNumber(packReused);
- })
- ];
- }
-});
-
-// src/lib/parsers/parse-remote-messages.ts
-function parseRemoteMessages(_stdOut, stdErr) {
- return parseStringResponse({ remoteMessages: new RemoteMessageSummary() }, parsers, stdErr);
-}
-var parsers, RemoteMessageSummary;
-var init_parse_remote_messages = __esm({
- "src/lib/parsers/parse-remote-messages.ts"() {
- init_utils();
- init_parse_remote_objects();
- parsers = [
- new RemoteLineParser(/^remote:\s*(.+)$/, (result, [text]) => {
- result.remoteMessages.all.push(text.trim());
- return false;
- }),
- ...remoteMessagesObjectParsers,
- new RemoteLineParser([/create a (?:pull|merge) request/i, /\s(https?:\/\/\S+)$/], (result, [pullRequestUrl]) => {
- result.remoteMessages.pullRequestUrl = pullRequestUrl;
- }),
- new RemoteLineParser([/found (\d+) vulnerabilities.+\(([^)]+)\)/i, /\s(https?:\/\/\S+)$/], (result, [count, summary, url]) => {
- result.remoteMessages.vulnerabilities = {
- count: asNumber(count),
- summary,
- url
- };
- })
- ];
- RemoteMessageSummary = class {
- constructor() {
- this.all = [];
- }
- };
- }
-});
-
-// src/lib/parsers/parse-pull.ts
-function parsePullErrorResult(stdOut, stdErr) {
- const pullError = parseStringResponse(new PullFailedSummary(), errorParsers, stdOut, stdErr);
- return pullError.message && pullError;
-}
-var FILE_UPDATE_REGEX, SUMMARY_REGEX, ACTION_REGEX, parsers2, errorParsers, parsePullDetail, parsePullResult;
-var init_parse_pull = __esm({
- "src/lib/parsers/parse-pull.ts"() {
- init_PullSummary();
- init_utils();
- init_parse_remote_messages();
- FILE_UPDATE_REGEX = /^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/;
- SUMMARY_REGEX = /(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/;
- ACTION_REGEX = /^(create|delete) mode \d+ (.+)/;
- parsers2 = [
- new LineParser(FILE_UPDATE_REGEX, (result, [file, insertions, deletions]) => {
- result.files.push(file);
- if (insertions) {
- result.insertions[file] = insertions.length;
- }
- if (deletions) {
- result.deletions[file] = deletions.length;
- }
- }),
- new LineParser(SUMMARY_REGEX, (result, [changes, , insertions, , deletions]) => {
- if (insertions !== void 0 || deletions !== void 0) {
- result.summary.changes = +changes || 0;
- result.summary.insertions = +insertions || 0;
- result.summary.deletions = +deletions || 0;
- return true;
- }
- return false;
- }),
- new LineParser(ACTION_REGEX, (result, [action, file]) => {
- append(result.files, file);
- append(action === "create" ? result.created : result.deleted, file);
- })
- ];
- errorParsers = [
- new LineParser(/^from\s(.+)$/i, (result, [remote]) => void (result.remote = remote)),
- new LineParser(/^fatal:\s(.+)$/, (result, [message]) => void (result.message = message)),
- new LineParser(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/, (result, [hashLocal, hashRemote, branchLocal, branchRemote]) => {
- result.branch.local = branchLocal;
- result.hash.local = hashLocal;
- result.branch.remote = branchRemote;
- result.hash.remote = hashRemote;
- })
- ];
- parsePullDetail = (stdOut, stdErr) => {
- return parseStringResponse(new PullSummary(), parsers2, stdOut, stdErr);
- };
- parsePullResult = (stdOut, stdErr) => {
- return Object.assign(new PullSummary(), parsePullDetail(stdOut, stdErr), parseRemoteMessages(stdOut, stdErr));
- };
- }
-});
-
-// src/lib/parsers/parse-merge.ts
-var parsers3, parseMergeResult, parseMergeDetail;
-var init_parse_merge = __esm({
- "src/lib/parsers/parse-merge.ts"() {
- init_MergeSummary();
- init_utils();
- init_parse_pull();
- parsers3 = [
- new LineParser(/^Auto-merging\s+(.+)$/, (summary, [autoMerge]) => {
- summary.merges.push(autoMerge);
- }),
- new LineParser(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/, (summary, [reason, file]) => {
- summary.conflicts.push(new MergeSummaryConflict(reason, file));
- }),
- new LineParser(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/, (summary, [reason, file, deleteRef]) => {
- summary.conflicts.push(new MergeSummaryConflict(reason, file, { deleteRef }));
- }),
- new LineParser(/^CONFLICT\s+\((.+)\):/, (summary, [reason]) => {
- summary.conflicts.push(new MergeSummaryConflict(reason, null));
- }),
- new LineParser(/^Automatic merge failed;\s+(.+)$/, (summary, [result]) => {
- summary.result = result;
- })
- ];
- parseMergeResult = (stdOut, stdErr) => {
- return Object.assign(parseMergeDetail(stdOut, stdErr), parsePullResult(stdOut, stdErr));
- };
- parseMergeDetail = (stdOut) => {
- return parseStringResponse(new MergeSummaryDetail(), parsers3, stdOut);
- };
- }
-});
-
-// src/lib/tasks/merge.ts
-function mergeTask(customArgs) {
- if (!customArgs.length) {
- return configurationErrorTask("Git.merge requires at least one option");
- }
- return {
- commands: ["merge", ...customArgs],
- format: "utf-8",
- parser(stdOut, stdErr) {
- const merge = parseMergeResult(stdOut, stdErr);
- if (merge.failed) {
- throw new GitResponseError(merge);
- }
- return merge;
- }
- };
-}
-var init_merge = __esm({
- "src/lib/tasks/merge.ts"() {
- init_git_response_error();
- init_parse_merge();
- init_task();
- }
-});
-
-// src/lib/parsers/parse-push.ts
-function pushResultPushedItem(local, remote, status) {
- const deleted = status.includes("deleted");
- const tag = status.includes("tag") || /^refs\/tags/.test(local);
- const alreadyUpdated = !status.includes("new");
- return {
- deleted,
- tag,
- branch: !tag,
- new: !alreadyUpdated,
- alreadyUpdated,
- local,
- remote
- };
-}
-var parsers4, parsePushResult, parsePushDetail;
-var init_parse_push = __esm({
- "src/lib/parsers/parse-push.ts"() {
- init_utils();
- init_parse_remote_messages();
- parsers4 = [
- new LineParser(/^Pushing to (.+)$/, (result, [repo]) => {
- result.repo = repo;
- }),
- new LineParser(/^updating local tracking ref '(.+)'/, (result, [local]) => {
- result.ref = __spreadProps(__spreadValues({}, result.ref || {}), {
- local
- });
- }),
- new LineParser(/^[*-=]\s+([^:]+):(\S+)\s+\[(.+)]$/, (result, [local, remote, type]) => {
- result.pushed.push(pushResultPushedItem(local, remote, type));
- }),
- new LineParser(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/, (result, [local, remote, remoteName]) => {
- result.branch = __spreadProps(__spreadValues({}, result.branch || {}), {
- local,
- remote,
- remoteName
- });
- }),
- new LineParser(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/, (result, [local, remote, from, to]) => {
- result.update = {
- head: {
- local,
- remote
- },
- hash: {
- from,
- to
- }
- };
- })
- ];
- parsePushResult = (stdOut, stdErr) => {
- const pushDetail = parsePushDetail(stdOut, stdErr);
- const responseDetail = parseRemoteMessages(stdOut, stdErr);
- return __spreadValues(__spreadValues({}, pushDetail), responseDetail);
- };
- parsePushDetail = (stdOut, stdErr) => {
- return parseStringResponse({ pushed: [] }, parsers4, stdOut, stdErr);
- };
- }
-});
-
-// src/lib/tasks/push.ts
-var push_exports = {};
-__export(push_exports, {
- pushTagsTask: () => pushTagsTask,
- pushTask: () => pushTask
-});
-function pushTagsTask(ref = {}, customArgs) {
- append(customArgs, "--tags");
- return pushTask(ref, customArgs);
-}
-function pushTask(ref = {}, customArgs) {
- const commands = ["push", ...customArgs];
- if (ref.branch) {
- commands.splice(1, 0, ref.branch);
- }
- if (ref.remote) {
- commands.splice(1, 0, ref.remote);
- }
- remove(commands, "-v");
- append(commands, "--verbose");
- append(commands, "--porcelain");
- return {
- commands,
- format: "utf-8",
- parser: parsePushResult
- };
-}
-var init_push = __esm({
- "src/lib/tasks/push.ts"() {
- init_parse_push();
- init_utils();
- }
-});
-
-// src/lib/responses/FileStatusSummary.ts
-var fromPathRegex, FileStatusSummary;
-var init_FileStatusSummary = __esm({
- "src/lib/responses/FileStatusSummary.ts"() {
- fromPathRegex = /^(.+) -> (.+)$/;
- FileStatusSummary = class {
- constructor(path, index, working_dir) {
- this.path = path;
- this.index = index;
- this.working_dir = working_dir;
- if (index + working_dir === "R") {
- const detail = fromPathRegex.exec(path) || [null, path, path];
- this.from = detail[1] || "";
- this.path = detail[2] || "";
- }
- }
- };
- }
-});
-
-// src/lib/responses/StatusSummary.ts
-function renamedFile(line) {
- const detail = /^(.+) -> (.+)$/.exec(line);
- if (!detail) {
- return {
- from: line,
- to: line
- };
- }
- return {
- from: String(detail[1]),
- to: String(detail[2])
- };
-}
-function parser2(indexX, indexY, handler) {
- return [`${indexX}${indexY}`, handler];
-}
-function conflicts(indexX, ...indexY) {
- return indexY.map((y) => parser2(indexX, y, (result, file) => append(result.conflicted, file)));
-}
-function splitLine(result, lineStr) {
- const trimmed2 = lineStr.trim();
- switch (" ") {
- case trimmed2.charAt(2):
- return data(trimmed2.charAt(0), trimmed2.charAt(1), trimmed2.substr(3));
- case trimmed2.charAt(1):
- return data(" " /* NONE */, trimmed2.charAt(0), trimmed2.substr(2));
- default:
- return;
- }
- function data(index, workingDir, path) {
- const raw = `${index}${workingDir}`;
- const handler = parsers5.get(raw);
- if (handler) {
- handler(result, path);
- }
- if (raw !== "##" && raw !== "!!") {
- result.files.push(new FileStatusSummary(path, index, workingDir));
- }
- }
-}
-var StatusSummary, parsers5, parseStatusSummary;
-var init_StatusSummary = __esm({
- "src/lib/responses/StatusSummary.ts"() {
- init_utils();
- init_FileStatusSummary();
- StatusSummary = class {
- constructor() {
- this.not_added = [];
- this.conflicted = [];
- this.created = [];
- this.deleted = [];
- this.ignored = void 0;
- this.modified = [];
- this.renamed = [];
- this.files = [];
- this.staged = [];
- this.ahead = 0;
- this.behind = 0;
- this.current = null;
- this.tracking = null;
- this.detached = false;
- }
- isClean() {
- return !this.files.length;
- }
- };
- parsers5 = new Map([
- parser2(" " /* NONE */, "A" /* ADDED */, (result, file) => append(result.created, file)),
- parser2(" " /* NONE */, "D" /* DELETED */, (result, file) => append(result.deleted, file)),
- parser2(" " /* NONE */, "M" /* MODIFIED */, (result, file) => append(result.modified, file)),
- parser2("A" /* ADDED */, " " /* NONE */, (result, file) => append(result.created, file) && append(result.staged, file)),
- parser2("A" /* ADDED */, "M" /* MODIFIED */, (result, file) => append(result.created, file) && append(result.staged, file) && append(result.modified, file)),
- parser2("D" /* DELETED */, " " /* NONE */, (result, file) => append(result.deleted, file) && append(result.staged, file)),
- parser2("M" /* MODIFIED */, " " /* NONE */, (result, file) => append(result.modified, file) && append(result.staged, file)),
- parser2("M" /* MODIFIED */, "M" /* MODIFIED */, (result, file) => append(result.modified, file) && append(result.staged, file)),
- parser2("R" /* RENAMED */, " " /* NONE */, (result, file) => {
- append(result.renamed, renamedFile(file));
- }),
- parser2("R" /* RENAMED */, "M" /* MODIFIED */, (result, file) => {
- const renamed = renamedFile(file);
- append(result.renamed, renamed);
- append(result.modified, renamed.to);
- }),
- parser2("!" /* IGNORED */, "!" /* IGNORED */, (_result, _file) => {
- append(_result.ignored = _result.ignored || [], _file);
- }),
- parser2("?" /* UNTRACKED */, "?" /* UNTRACKED */, (result, file) => append(result.not_added, file)),
- ...conflicts("A" /* ADDED */, "A" /* ADDED */, "U" /* UNMERGED */),
- ...conflicts("D" /* DELETED */, "D" /* DELETED */, "U" /* UNMERGED */),
- ...conflicts("U" /* UNMERGED */, "A" /* ADDED */, "D" /* DELETED */, "U" /* UNMERGED */),
- ["##", (result, line) => {
- const aheadReg = /ahead (\d+)/;
- const behindReg = /behind (\d+)/;
- const currentReg = /^(.+?(?=(?:\.{3}|\s|$)))/;
- const trackingReg = /\.{3}(\S*)/;
- const onEmptyBranchReg = /\son\s([\S]+)$/;
- let regexResult;
- regexResult = aheadReg.exec(line);
- result.ahead = regexResult && +regexResult[1] || 0;
- regexResult = behindReg.exec(line);
- result.behind = regexResult && +regexResult[1] || 0;
- regexResult = currentReg.exec(line);
- result.current = regexResult && regexResult[1];
- regexResult = trackingReg.exec(line);
- result.tracking = regexResult && regexResult[1];
- regexResult = onEmptyBranchReg.exec(line);
- result.current = regexResult && regexResult[1] || result.current;
- result.detached = /\(no branch\)/.test(line);
- }]
- ]);
- parseStatusSummary = function(text) {
- const lines = text.trim().split("\n");
- const status = new StatusSummary();
- for (let i = 0, l = lines.length; i < l; i++) {
- splitLine(status, lines[i]);
- }
- return status;
- };
- }
-});
-
-// src/lib/tasks/status.ts
-function statusTask(customArgs) {
- return {
- format: "utf-8",
- commands: ["status", "--porcelain", "-b", "-u", ...customArgs],
- parser(text) {
- return parseStatusSummary(text);
- }
- };
-}
-var init_status = __esm({
- "src/lib/tasks/status.ts"() {
- init_StatusSummary();
- }
-});
-
-// src/lib/simple-git-api.ts
-var simple_git_api_exports = {};
-__export(simple_git_api_exports, {
- SimpleGitApi: () => SimpleGitApi
-});
-var SimpleGitApi;
-var init_simple_git_api = __esm({
- "src/lib/simple-git-api.ts"() {
- init_task_callback();
- init_change_working_directory();
- init_config();
- init_grep();
- init_hash_object();
- init_init();
- init_log();
- init_merge();
- init_push();
- init_status();
- init_task();
- init_utils();
- SimpleGitApi = class {
- constructor(_executor) {
- this._executor = _executor;
- }
- _runTask(task, then) {
- const chain = this._executor.chain();
- const promise = chain.push(task);
- if (then) {
- taskCallback(task, promise, then);
- }
- return Object.create(this, {
- then: { value: promise.then.bind(promise) },
- catch: { value: promise.catch.bind(promise) },
- _executor: { value: chain }
- });
- }
- add(files) {
- return this._runTask(straightThroughStringTask(["add", ...asArray(files)]), trailingFunctionArgument(arguments));
- }
- cwd(directory) {
- const next = trailingFunctionArgument(arguments);
- if (typeof directory === "string") {
- return this._runTask(changeWorkingDirectoryTask(directory, this._executor), next);
- }
- if (typeof (directory == null ? void 0 : directory.path) === "string") {
- return this._runTask(changeWorkingDirectoryTask(directory.path, directory.root && this._executor || void 0), next);
- }
- return this._runTask(configurationErrorTask("Git.cwd: workingDirectory must be supplied as a string"), next);
- }
- hashObject(path, write) {
- return this._runTask(hashObjectTask(path, write === true), trailingFunctionArgument(arguments));
- }
- init(bare) {
- return this._runTask(initTask(bare === true, this._executor.cwd, getTrailingOptions(arguments)), trailingFunctionArgument(arguments));
- }
- merge() {
- return this._runTask(mergeTask(getTrailingOptions(arguments)), trailingFunctionArgument(arguments));
- }
- mergeFromTo(remote, branch) {
- if (!(filterString(remote) && filterString(branch))) {
- return this._runTask(configurationErrorTask(`Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings`));
- }
- return this._runTask(mergeTask([remote, branch, ...getTrailingOptions(arguments)]), trailingFunctionArgument(arguments, false));
- }
- outputHandler(handler) {
- this._executor.outputHandler = handler;
- return this;
- }
- push() {
- const task = pushTask({
- remote: filterType(arguments[0], filterString),
- branch: filterType(arguments[1], filterString)
- }, getTrailingOptions(arguments));
- return this._runTask(task, trailingFunctionArgument(arguments));
- }
- stash() {
- return this._runTask(straightThroughStringTask(["stash", ...getTrailingOptions(arguments)]), trailingFunctionArgument(arguments));
- }
- status() {
- return this._runTask(statusTask(getTrailingOptions(arguments)), trailingFunctionArgument(arguments));
- }
- };
- Object.assign(SimpleGitApi.prototype, config_default(), grep_default(), log_default());
- }
-});
-
-// src/lib/runners/scheduler.ts
-var scheduler_exports = {};
-__export(scheduler_exports, {
- Scheduler: () => Scheduler
-});
-var import_promise_deferred2, createScheduledTask, Scheduler;
-var init_scheduler = __esm({
- "src/lib/runners/scheduler.ts"() {
- init_utils();
- import_promise_deferred2 = require("@kwsites/promise-deferred");
- init_git_logger();
- createScheduledTask = (() => {
- let id = 0;
- return () => {
- id++;
- const { promise, done } = (0, import_promise_deferred2.createDeferred)();
- return {
- promise,
- done,
- id
- };
- };
- })();
- Scheduler = class {
- constructor(concurrency = 2) {
- this.concurrency = concurrency;
- this.logger = createLogger("", "scheduler");
- this.pending = [];
- this.running = [];
- this.logger(`Constructed, concurrency=%s`, concurrency);
- }
- schedule() {
- if (!this.pending.length || this.running.length >= this.concurrency) {
- this.logger(`Schedule attempt ignored, pending=%s running=%s concurrency=%s`, this.pending.length, this.running.length, this.concurrency);
- return;
- }
- const task = append(this.running, this.pending.shift());
- this.logger(`Attempting id=%s`, task.id);
- task.done(() => {
- this.logger(`Completing id=`, task.id);
- remove(this.running, task);
- this.schedule();
- });
- }
- next() {
- const { promise, id } = append(this.pending, createScheduledTask());
- this.logger(`Scheduling id=%s`, id);
- this.schedule();
- return promise;
- }
- };
- }
-});
-
-// src/lib/tasks/apply-patch.ts
-var apply_patch_exports = {};
-__export(apply_patch_exports, {
- applyPatchTask: () => applyPatchTask
-});
-function applyPatchTask(patches, customArgs) {
- return straightThroughStringTask(["apply", ...customArgs, ...patches]);
-}
-var init_apply_patch = __esm({
- "src/lib/tasks/apply-patch.ts"() {
- init_task();
- }
-});
-
-// src/lib/responses/BranchDeleteSummary.ts
-function branchDeletionSuccess(branch, hash) {
- return {
- branch,
- hash,
- success: true
- };
-}
-function branchDeletionFailure(branch) {
- return {
- branch,
- hash: null,
- success: false
- };
-}
-var BranchDeletionBatch;
-var init_BranchDeleteSummary = __esm({
- "src/lib/responses/BranchDeleteSummary.ts"() {
- BranchDeletionBatch = class {
- constructor() {
- this.all = [];
- this.branches = {};
- this.errors = [];
- }
- get success() {
- return !this.errors.length;
- }
- };
- }
-});
-
-// src/lib/parsers/parse-branch-delete.ts
-function hasBranchDeletionError(data, processExitCode) {
- return processExitCode === 1 /* ERROR */ && deleteErrorRegex.test(data);
-}
-var deleteSuccessRegex, deleteErrorRegex, parsers6, parseBranchDeletions;
-var init_parse_branch_delete = __esm({
- "src/lib/parsers/parse-branch-delete.ts"() {
- init_BranchDeleteSummary();
- init_utils();
- deleteSuccessRegex = /(\S+)\s+\(\S+\s([^)]+)\)/;
- deleteErrorRegex = /^error[^']+'([^']+)'/m;
- parsers6 = [
- new LineParser(deleteSuccessRegex, (result, [branch, hash]) => {
- const deletion = branchDeletionSuccess(branch, hash);
- result.all.push(deletion);
- result.branches[branch] = deletion;
- }),
- new LineParser(deleteErrorRegex, (result, [branch]) => {
- const deletion = branchDeletionFailure(branch);
- result.errors.push(deletion);
- result.all.push(deletion);
- result.branches[branch] = deletion;
- })
- ];
- parseBranchDeletions = (stdOut, stdErr) => {
- return parseStringResponse(new BranchDeletionBatch(), parsers6, stdOut, stdErr);
- };
- }
-});
-
-// src/lib/responses/BranchSummary.ts
-var BranchSummaryResult;
-var init_BranchSummary = __esm({
- "src/lib/responses/BranchSummary.ts"() {
- BranchSummaryResult = class {
- constructor() {
- this.all = [];
- this.branches = {};
- this.current = "";
- this.detached = false;
- }
- push(current, detached, name, commit, label) {
- if (current) {
- this.detached = detached;
- this.current = name;
- }
- this.all.push(name);
- this.branches[name] = {
- current,
- name,
- commit,
- label
- };
- }
- };
- }
-});
-
-// src/lib/parsers/parse-branch.ts
-function parseBranchSummary(stdOut) {
- return parseStringResponse(new BranchSummaryResult(), parsers7, stdOut);
-}
-var parsers7;
-var init_parse_branch = __esm({
- "src/lib/parsers/parse-branch.ts"() {
- init_BranchSummary();
- init_utils();
- parsers7 = [
- new LineParser(/^(\*\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/, (result, [current, name, commit, label]) => {
- result.push(!!current, true, name, commit, label);
- }),
- new LineParser(/^(\*\s)?(\S+)\s+([a-z0-9]+)\s?(.*)$/s, (result, [current, name, commit, label]) => {
- result.push(!!current, false, name, commit, label);
- })
- ];
- }
-});
-
-// src/lib/tasks/branch.ts
-var branch_exports = {};
-__export(branch_exports, {
- branchLocalTask: () => branchLocalTask,
- branchTask: () => branchTask,
- containsDeleteBranchCommand: () => containsDeleteBranchCommand,
- deleteBranchTask: () => deleteBranchTask,
- deleteBranchesTask: () => deleteBranchesTask
-});
-function containsDeleteBranchCommand(commands) {
- const deleteCommands = ["-d", "-D", "--delete"];
- return commands.some((command) => deleteCommands.includes(command));
-}
-function branchTask(customArgs) {
- const isDelete = containsDeleteBranchCommand(customArgs);
- const commands = ["branch", ...customArgs];
- if (commands.length === 1) {
- commands.push("-a");
- }
- if (!commands.includes("-v")) {
- commands.splice(1, 0, "-v");
- }
- return {
- format: "utf-8",
- commands,
- parser(stdOut, stdErr) {
- if (isDelete) {
- return parseBranchDeletions(stdOut, stdErr).all[0];
- }
- return parseBranchSummary(stdOut);
- }
- };
-}
-function branchLocalTask() {
- const parser3 = parseBranchSummary;
- return {
- format: "utf-8",
- commands: ["branch", "-v"],
- parser: parser3
- };
-}
-function deleteBranchesTask(branches, forceDelete = false) {
- return {
- format: "utf-8",
- commands: ["branch", "-v", forceDelete ? "-D" : "-d", ...branches],
- parser(stdOut, stdErr) {
- return parseBranchDeletions(stdOut, stdErr);
- },
- onError({ exitCode, stdOut }, error, done, fail) {
- if (!hasBranchDeletionError(String(error), exitCode)) {
- return fail(error);
- }
- done(stdOut);
- }
- };
-}
-function deleteBranchTask(branch, forceDelete = false) {
- const task = {
- format: "utf-8",
- commands: ["branch", "-v", forceDelete ? "-D" : "-d", branch],
- parser(stdOut, stdErr) {
- return parseBranchDeletions(stdOut, stdErr).branches[branch];
- },
- onError({ exitCode, stdErr, stdOut }, error, _, fail) {
- if (!hasBranchDeletionError(String(error), exitCode)) {
- return fail(error);
- }
- throw new GitResponseError(task.parser(bufferToString(stdOut), bufferToString(stdErr)), String(error));
- }
- };
- return task;
-}
-var init_branch = __esm({
- "src/lib/tasks/branch.ts"() {
- init_git_response_error();
- init_parse_branch_delete();
- init_parse_branch();
- init_utils();
- }
-});
-
-// src/lib/responses/CheckIgnore.ts
-var parseCheckIgnore;
-var init_CheckIgnore = __esm({
- "src/lib/responses/CheckIgnore.ts"() {
- parseCheckIgnore = (text) => {
- return text.split(/\n/g).map((line) => line.trim()).filter((file) => !!file);
- };
- }
-});
-
-// src/lib/tasks/check-ignore.ts
-var check_ignore_exports = {};
-__export(check_ignore_exports, {
- checkIgnoreTask: () => checkIgnoreTask
-});
-function checkIgnoreTask(paths) {
- return {
- commands: ["check-ignore", ...paths],
- format: "utf-8",
- parser: parseCheckIgnore
- };
-}
-var init_check_ignore = __esm({
- "src/lib/tasks/check-ignore.ts"() {
- init_CheckIgnore();
- }
-});
-
-// src/lib/tasks/clone.ts
-var clone_exports = {};
-__export(clone_exports, {
- cloneMirrorTask: () => cloneMirrorTask,
- cloneTask: () => cloneTask
-});
-function cloneTask(repo, directory, customArgs) {
- const commands = ["clone", ...customArgs];
- if (typeof repo === "string") {
- commands.push(repo);
- }
- if (typeof directory === "string") {
- commands.push(directory);
- }
- return straightThroughStringTask(commands);
-}
-function cloneMirrorTask(repo, directory, customArgs) {
- append(customArgs, "--mirror");
- return cloneTask(repo, directory, customArgs);
-}
-var init_clone = __esm({
- "src/lib/tasks/clone.ts"() {
- init_task();
- init_utils();
- }
-});
-
-// src/lib/parsers/parse-commit.ts
-function parseCommitResult(stdOut) {
- const result = {
- author: null,
- branch: "",
- commit: "",
- root: false,
- summary: {
- changes: 0,
- insertions: 0,
- deletions: 0
- }
- };
- return parseStringResponse(result, parsers8, stdOut);
-}
-var parsers8;
-var init_parse_commit = __esm({
- "src/lib/parsers/parse-commit.ts"() {
- init_utils();
- parsers8 = [
- new LineParser(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/, (result, [branch, root, commit]) => {
- result.branch = branch;
- result.commit = commit;
- result.root = !!root;
- }),
- new LineParser(/\s*Author:\s(.+)/i, (result, [author]) => {
- const parts = author.split("<");
- const email = parts.pop();
- if (!email || !email.includes("@")) {
- return;
- }
- result.author = {
- email: email.substr(0, email.length - 1),
- name: parts.join("<").trim()
- };
- }),
- new LineParser(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g, (result, [changes, insertions, deletions]) => {
- result.summary.changes = parseInt(changes, 10) || 0;
- result.summary.insertions = parseInt(insertions, 10) || 0;
- result.summary.deletions = parseInt(deletions, 10) || 0;
- }),
- new LineParser(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/, (result, [changes, lines, direction]) => {
- result.summary.changes = parseInt(changes, 10) || 0;
- const count = parseInt(lines, 10) || 0;
- if (direction === "-") {
- result.summary.deletions = count;
- } else if (direction === "+") {
- result.summary.insertions = count;
- }
- })
- ];
- }
-});
-
-// src/lib/tasks/commit.ts
-var commit_exports = {};
-__export(commit_exports, {
- commitTask: () => commitTask
-});
-function commitTask(message, files, customArgs) {
- const commands = ["commit"];
- message.forEach((m) => commands.push("-m", m));
- commands.push(...files, ...customArgs);
- return {
- commands,
- format: "utf-8",
- parser: parseCommitResult
- };
-}
-var init_commit = __esm({
- "src/lib/tasks/commit.ts"() {
- init_parse_commit();
- }
-});
-
-// src/lib/tasks/diff.ts
-var diff_exports = {};
-__export(diff_exports, {
- diffSummaryTask: () => diffSummaryTask
-});
-function diffSummaryTask(customArgs) {
- return {
- commands: ["diff", "--stat=4096", ...customArgs],
- format: "utf-8",
- parser(stdOut) {
- return parseDiffResult(stdOut);
- }
- };
-}
-var init_diff = __esm({
- "src/lib/tasks/diff.ts"() {
- init_parse_diff_summary();
- }
-});
-
-// src/lib/parsers/parse-fetch.ts
-function parseFetchResult(stdOut, stdErr) {
- const result = {
- raw: stdOut,
- remote: null,
- branches: [],
- tags: []
- };
- return parseStringResponse(result, parsers9, stdOut, stdErr);
-}
-var parsers9;
-var init_parse_fetch = __esm({
- "src/lib/parsers/parse-fetch.ts"() {
- init_utils();
- parsers9 = [
- new LineParser(/From (.+)$/, (result, [remote]) => {
- result.remote = remote;
- }),
- new LineParser(/\* \[new branch]\s+(\S+)\s*-> (.+)$/, (result, [name, tracking]) => {
- result.branches.push({
- name,
- tracking
- });
- }),
- new LineParser(/\* \[new tag]\s+(\S+)\s*-> (.+)$/, (result, [name, tracking]) => {
- result.tags.push({
- name,
- tracking
- });
- })
- ];
- }
-});
-
-// src/lib/tasks/fetch.ts
-var fetch_exports = {};
-__export(fetch_exports, {
- fetchTask: () => fetchTask
-});
-function fetchTask(remote, branch, customArgs) {
- const commands = ["fetch", ...customArgs];
- if (remote && branch) {
- commands.push(remote, branch);
- }
- return {
- commands,
- format: "utf-8",
- parser: parseFetchResult
- };
-}
-var init_fetch = __esm({
- "src/lib/tasks/fetch.ts"() {
- init_parse_fetch();
- }
-});
-
-// src/lib/parsers/parse-move.ts
-function parseMoveResult(stdOut) {
- return parseStringResponse({ moves: [] }, parsers10, stdOut);
-}
-var parsers10;
-var init_parse_move = __esm({
- "src/lib/parsers/parse-move.ts"() {
- init_utils();
- parsers10 = [
- new LineParser(/^Renaming (.+) to (.+)$/, (result, [from, to]) => {
- result.moves.push({ from, to });
- })
- ];
- }
-});
-
-// src/lib/tasks/move.ts
-var move_exports = {};
-__export(move_exports, {
- moveTask: () => moveTask
-});
-function moveTask(from, to) {
- return {
- commands: ["mv", "-v", ...asArray(from), to],
- format: "utf-8",
- parser: parseMoveResult
- };
-}
-var init_move = __esm({
- "src/lib/tasks/move.ts"() {
- init_parse_move();
- init_utils();
- }
-});
-
-// src/lib/tasks/pull.ts
-var pull_exports = {};
-__export(pull_exports, {
- pullTask: () => pullTask
-});
-function pullTask(remote, branch, customArgs) {
- const commands = ["pull", ...customArgs];
- if (remote && branch) {
- commands.splice(1, 0, remote, branch);
- }
- return {
- commands,
- format: "utf-8",
- parser(stdOut, stdErr) {
- return parsePullResult(stdOut, stdErr);
- },
- onError(result, _error, _done, fail) {
- const pullError = parsePullErrorResult(bufferToString(result.stdOut), bufferToString(result.stdErr));
- if (pullError) {
- return fail(new GitResponseError(pullError));
- }
- fail(_error);
- }
- };
-}
-var init_pull = __esm({
- "src/lib/tasks/pull.ts"() {
- init_git_response_error();
- init_parse_pull();
- init_utils();
- }
-});
-
-// src/lib/responses/GetRemoteSummary.ts
-function parseGetRemotes(text) {
- const remotes = {};
- forEach(text, ([name]) => remotes[name] = { name });
- return Object.values(remotes);
-}
-function parseGetRemotesVerbose(text) {
- const remotes = {};
- forEach(text, ([name, url, purpose]) => {
- if (!remotes.hasOwnProperty(name)) {
- remotes[name] = {
- name,
- refs: { fetch: "", push: "" }
- };
- }
- if (purpose && url) {
- remotes[name].refs[purpose.replace(/[^a-z]/g, "")] = url;
- }
- });
- return Object.values(remotes);
-}
-function forEach(text, handler) {
- forEachLineWithContent(text, (line) => handler(line.split(/\s+/)));
-}
-var init_GetRemoteSummary = __esm({
- "src/lib/responses/GetRemoteSummary.ts"() {
- init_utils();
- }
-});
-
-// src/lib/tasks/remote.ts
-var remote_exports = {};
-__export(remote_exports, {
- addRemoteTask: () => addRemoteTask,
- getRemotesTask: () => getRemotesTask,
- listRemotesTask: () => listRemotesTask,
- remoteTask: () => remoteTask,
- removeRemoteTask: () => removeRemoteTask
-});
-function addRemoteTask(remoteName, remoteRepo, customArgs = []) {
- return straightThroughStringTask(["remote", "add", ...customArgs, remoteName, remoteRepo]);
-}
-function getRemotesTask(verbose) {
- const commands = ["remote"];
- if (verbose) {
- commands.push("-v");
- }
- return {
- commands,
- format: "utf-8",
- parser: verbose ? parseGetRemotesVerbose : parseGetRemotes
- };
-}
-function listRemotesTask(customArgs = []) {
- const commands = [...customArgs];
- if (commands[0] !== "ls-remote") {
- commands.unshift("ls-remote");
- }
- return straightThroughStringTask(commands);
-}
-function remoteTask(customArgs = []) {
- const commands = [...customArgs];
- if (commands[0] !== "remote") {
- commands.unshift("remote");
- }
- return straightThroughStringTask(commands);
-}
-function removeRemoteTask(remoteName) {
- return straightThroughStringTask(["remote", "remove", remoteName]);
-}
-var init_remote = __esm({
- "src/lib/tasks/remote.ts"() {
- init_GetRemoteSummary();
- init_task();
- }
-});
-
-// src/lib/tasks/stash-list.ts
-var stash_list_exports = {};
-__export(stash_list_exports, {
- stashListTask: () => stashListTask
-});
-function stashListTask(opt = {}, customArgs) {
- const options = parseLogOptions(opt);
- const parser3 = createListLogSummaryParser(options.splitter, options.fields);
- return {
- commands: ["stash", "list", ...options.commands, ...customArgs],
- format: "utf-8",
- parser: parser3
- };
-}
-var init_stash_list = __esm({
- "src/lib/tasks/stash-list.ts"() {
- init_parse_list_log_summary();
- init_log();
- }
-});
-
-// src/lib/tasks/sub-module.ts
-var sub_module_exports = {};
-__export(sub_module_exports, {
- addSubModuleTask: () => addSubModuleTask,
- initSubModuleTask: () => initSubModuleTask,
- subModuleTask: () => subModuleTask,
- updateSubModuleTask: () => updateSubModuleTask
-});
-function addSubModuleTask(repo, path) {
- return subModuleTask(["add", repo, path]);
-}
-function initSubModuleTask(customArgs) {
- return subModuleTask(["init", ...customArgs]);
-}
-function subModuleTask(customArgs) {
- const commands = [...customArgs];
- if (commands[0] !== "submodule") {
- commands.unshift("submodule");
- }
- return straightThroughStringTask(commands);
-}
-function updateSubModuleTask(customArgs) {
- return subModuleTask(["update", ...customArgs]);
-}
-var init_sub_module = __esm({
- "src/lib/tasks/sub-module.ts"() {
- init_task();
- }
-});
-
-// src/lib/responses/TagList.ts
-function singleSorted(a, b) {
- const aIsNum = isNaN(a);
- const bIsNum = isNaN(b);
- if (aIsNum !== bIsNum) {
- return aIsNum ? 1 : -1;
- }
- return aIsNum ? sorted(a, b) : 0;
-}
-function sorted(a, b) {
- return a === b ? 0 : a > b ? 1 : -1;
-}
-function trimmed(input) {
- return input.trim();
-}
-function toNumber(input) {
- if (typeof input === "string") {
- return parseInt(input.replace(/^\D+/g, ""), 10) || 0;
- }
- return 0;
-}
-var TagList, parseTagList;
-var init_TagList = __esm({
- "src/lib/responses/TagList.ts"() {
- TagList = class {
- constructor(all, latest) {
- this.all = all;
- this.latest = latest;
- }
- };
- parseTagList = function(data, customSort = false) {
- const tags = data.split("\n").map(trimmed).filter(Boolean);
- if (!customSort) {
- tags.sort(function(tagA, tagB) {
- const partsA = tagA.split(".");
- const partsB = tagB.split(".");
- if (partsA.length === 1 || partsB.length === 1) {
- return singleSorted(toNumber(partsA[0]), toNumber(partsB[0]));
- }
- for (let i = 0, l = Math.max(partsA.length, partsB.length); i < l; i++) {
- const diff = sorted(toNumber(partsA[i]), toNumber(partsB[i]));
- if (diff) {
- return diff;
- }
- }
- return 0;
- });
- }
- const latest = customSort ? tags[0] : [...tags].reverse().find((tag) => tag.indexOf(".") >= 0);
- return new TagList(tags, latest);
- };
- }
-});
-
-// src/lib/tasks/tag.ts
-var tag_exports = {};
-__export(tag_exports, {
- addAnnotatedTagTask: () => addAnnotatedTagTask,
- addTagTask: () => addTagTask,
- tagListTask: () => tagListTask
-});
-function tagListTask(customArgs = []) {
- const hasCustomSort = customArgs.some((option) => /^--sort=/.test(option));
- return {
- format: "utf-8",
- commands: ["tag", "-l", ...customArgs],
- parser(text) {
- return parseTagList(text, hasCustomSort);
- }
- };
-}
-function addTagTask(name) {
- return {
- format: "utf-8",
- commands: ["tag", name],
- parser() {
- return { name };
- }
- };
-}
-function addAnnotatedTagTask(name, tagMessage) {
- return {
- format: "utf-8",
- commands: ["tag", "-a", "-m", tagMessage, name],
- parser() {
- return { name };
- }
- };
-}
-var init_tag = __esm({
- "src/lib/tasks/tag.ts"() {
- init_TagList();
- }
-});
-
-// src/git.js
-var require_git = __commonJS({
- "src/git.js"(exports2, module2) {
- var { GitExecutor: GitExecutor2 } = (init_git_executor(), __toCommonJS(git_executor_exports));
- var { SimpleGitApi: SimpleGitApi2 } = (init_simple_git_api(), __toCommonJS(simple_git_api_exports));
- var { Scheduler: Scheduler2 } = (init_scheduler(), __toCommonJS(scheduler_exports));
- var { configurationErrorTask: configurationErrorTask2 } = (init_task(), __toCommonJS(task_exports));
- var {
- asArray: asArray2,
- filterArray: filterArray2,
- filterPrimitives: filterPrimitives2,
- filterString: filterString2,
- filterStringOrStringArray: filterStringOrStringArray2,
- filterType: filterType2,
- getTrailingOptions: getTrailingOptions2,
- trailingFunctionArgument: trailingFunctionArgument2,
- trailingOptionsArgument: trailingOptionsArgument2
- } = (init_utils(), __toCommonJS(utils_exports));
- var { applyPatchTask: applyPatchTask2 } = (init_apply_patch(), __toCommonJS(apply_patch_exports));
- var { branchTask: branchTask2, branchLocalTask: branchLocalTask2, deleteBranchesTask: deleteBranchesTask2, deleteBranchTask: deleteBranchTask2 } = (init_branch(), __toCommonJS(branch_exports));
- var { checkIgnoreTask: checkIgnoreTask2 } = (init_check_ignore(), __toCommonJS(check_ignore_exports));
- var { checkIsRepoTask: checkIsRepoTask2 } = (init_check_is_repo(), __toCommonJS(check_is_repo_exports));
- var { cloneTask: cloneTask2, cloneMirrorTask: cloneMirrorTask2 } = (init_clone(), __toCommonJS(clone_exports));
- var { cleanWithOptionsTask: cleanWithOptionsTask2, isCleanOptionsArray: isCleanOptionsArray2 } = (init_clean(), __toCommonJS(clean_exports));
- var { commitTask: commitTask2 } = (init_commit(), __toCommonJS(commit_exports));
- var { diffSummaryTask: diffSummaryTask2 } = (init_diff(), __toCommonJS(diff_exports));
- var { fetchTask: fetchTask2 } = (init_fetch(), __toCommonJS(fetch_exports));
- var { moveTask: moveTask2 } = (init_move(), __toCommonJS(move_exports));
- var { pullTask: pullTask2 } = (init_pull(), __toCommonJS(pull_exports));
- var { pushTagsTask: pushTagsTask2 } = (init_push(), __toCommonJS(push_exports));
- var { addRemoteTask: addRemoteTask2, getRemotesTask: getRemotesTask2, listRemotesTask: listRemotesTask2, remoteTask: remoteTask2, removeRemoteTask: removeRemoteTask2 } = (init_remote(), __toCommonJS(remote_exports));
- var { getResetMode: getResetMode2, resetTask: resetTask2 } = (init_reset(), __toCommonJS(reset_exports));
- var { stashListTask: stashListTask2 } = (init_stash_list(), __toCommonJS(stash_list_exports));
- var { addSubModuleTask: addSubModuleTask2, initSubModuleTask: initSubModuleTask2, subModuleTask: subModuleTask2, updateSubModuleTask: updateSubModuleTask2 } = (init_sub_module(), __toCommonJS(sub_module_exports));
- var { addAnnotatedTagTask: addAnnotatedTagTask2, addTagTask: addTagTask2, tagListTask: tagListTask2 } = (init_tag(), __toCommonJS(tag_exports));
- var { straightThroughBufferTask: straightThroughBufferTask2, straightThroughStringTask: straightThroughStringTask2 } = (init_task(), __toCommonJS(task_exports));
- function Git2(options, plugins) {
- this._executor = new GitExecutor2(options.binary, options.baseDir, new Scheduler2(options.maxConcurrentProcesses), plugins);
- }
- (Git2.prototype = Object.create(SimpleGitApi2.prototype)).constructor = Git2;
- Git2.prototype.customBinary = function(command) {
- this._executor.binary = command;
- return this;
- };
- Git2.prototype.env = function(name, value) {
- if (arguments.length === 1 && typeof name === "object") {
- this._executor.env = name;
- } else {
- (this._executor.env = this._executor.env || {})[name] = value;
- }
- return this;
- };
- Git2.prototype.stashList = function(options) {
- return this._runTask(stashListTask2(trailingOptionsArgument2(arguments) || {}, filterArray2(options) && options || []), trailingFunctionArgument2(arguments));
- };
- function createCloneTask(api, task, repoPath, localPath) {
- if (typeof repoPath !== "string") {
- return configurationErrorTask2(`git.${api}() requires a string 'repoPath'`);
- }
- return task(repoPath, filterType2(localPath, filterString2), getTrailingOptions2(arguments));
- }
- Git2.prototype.clone = function() {
- return this._runTask(createCloneTask("clone", cloneTask2, ...arguments), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.mirror = function() {
- return this._runTask(createCloneTask("mirror", cloneMirrorTask2, ...arguments), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.mv = function(from, to) {
- return this._runTask(moveTask2(from, to), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.checkoutLatestTag = function(then) {
- var git = this;
- return this.pull(function() {
- git.tags(function(err, tags) {
- git.checkout(tags.latest, then);
- });
- });
- };
- Git2.prototype.commit = function(message, files, options, then) {
- const next = trailingFunctionArgument2(arguments);
- if (!filterStringOrStringArray2(message)) {
- return this._runTask(configurationErrorTask2("git.commit: requires the commit message to be supplied as a string/string[]"), next);
- }
- return this._runTask(commitTask2(asArray2(message), asArray2(filterType2(files, filterStringOrStringArray2, [])), [...filterType2(options, filterArray2, []), ...getTrailingOptions2(arguments, 0, true)]), next);
- };
- Git2.prototype.pull = function(remote, branch, options, then) {
- return this._runTask(pullTask2(filterType2(remote, filterString2), filterType2(branch, filterString2), getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.fetch = function(remote, branch) {
- return this._runTask(fetchTask2(filterType2(remote, filterString2), filterType2(branch, filterString2), getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.silent = function(silence) {
- console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3");
- return this;
- };
- Git2.prototype.tags = function(options, then) {
- return this._runTask(tagListTask2(getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.rebase = function() {
- return this._runTask(straightThroughStringTask2(["rebase", ...getTrailingOptions2(arguments)]), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.reset = function(mode) {
- return this._runTask(resetTask2(getResetMode2(mode), getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.revert = function(commit) {
- const next = trailingFunctionArgument2(arguments);
- if (typeof commit !== "string") {
- return this._runTask(configurationErrorTask2("Commit must be a string"), next);
- }
- return this._runTask(straightThroughStringTask2(["revert", ...getTrailingOptions2(arguments, 0, true), commit]), next);
- };
- Git2.prototype.addTag = function(name) {
- const task = typeof name === "string" ? addTagTask2(name) : configurationErrorTask2("Git.addTag requires a tag name");
- return this._runTask(task, trailingFunctionArgument2(arguments));
- };
- Git2.prototype.addAnnotatedTag = function(tagName, tagMessage) {
- return this._runTask(addAnnotatedTagTask2(tagName, tagMessage), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.checkout = function() {
- const commands = ["checkout", ...getTrailingOptions2(arguments, true)];
- return this._runTask(straightThroughStringTask2(commands), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.checkoutBranch = function(branchName, startPoint, then) {
- return this.checkout(["-b", branchName, startPoint], trailingFunctionArgument2(arguments));
- };
- Git2.prototype.checkoutLocalBranch = function(branchName, then) {
- return this.checkout(["-b", branchName], trailingFunctionArgument2(arguments));
- };
- Git2.prototype.deleteLocalBranch = function(branchName, forceDelete, then) {
- return this._runTask(deleteBranchTask2(branchName, typeof forceDelete === "boolean" ? forceDelete : false), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.deleteLocalBranches = function(branchNames, forceDelete, then) {
- return this._runTask(deleteBranchesTask2(branchNames, typeof forceDelete === "boolean" ? forceDelete : false), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.branch = function(options, then) {
- return this._runTask(branchTask2(getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.branchLocal = function(then) {
- return this._runTask(branchLocalTask2(), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.raw = function(commands) {
- const createRestCommands = !Array.isArray(commands);
- const command = [].slice.call(createRestCommands ? arguments : commands, 0);
- for (let i = 0; i < command.length && createRestCommands; i++) {
- if (!filterPrimitives2(command[i])) {
- command.splice(i, command.length - i);
- break;
- }
- }
- command.push(...getTrailingOptions2(arguments, 0, true));
- var next = trailingFunctionArgument2(arguments);
- if (!command.length) {
- return this._runTask(configurationErrorTask2("Raw: must supply one or more command to execute"), next);
- }
- return this._runTask(straightThroughStringTask2(command), next);
- };
- Git2.prototype.submoduleAdd = function(repo, path, then) {
- return this._runTask(addSubModuleTask2(repo, path), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.submoduleUpdate = function(args, then) {
- return this._runTask(updateSubModuleTask2(getTrailingOptions2(arguments, true)), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.submoduleInit = function(args, then) {
- return this._runTask(initSubModuleTask2(getTrailingOptions2(arguments, true)), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.subModule = function(options, then) {
- return this._runTask(subModuleTask2(getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.listRemote = function() {
- return this._runTask(listRemotesTask2(getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.addRemote = function(remoteName, remoteRepo, then) {
- return this._runTask(addRemoteTask2(remoteName, remoteRepo, getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.removeRemote = function(remoteName, then) {
- return this._runTask(removeRemoteTask2(remoteName), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.getRemotes = function(verbose, then) {
- return this._runTask(getRemotesTask2(verbose === true), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.remote = function(options, then) {
- return this._runTask(remoteTask2(getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.tag = function(options, then) {
- const command = getTrailingOptions2(arguments);
- if (command[0] !== "tag") {
- command.unshift("tag");
- }
- return this._runTask(straightThroughStringTask2(command), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.updateServerInfo = function(then) {
- return this._runTask(straightThroughStringTask2(["update-server-info"]), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.pushTags = function(remote, then) {
- const task = pushTagsTask2({ remote: filterType2(remote, filterString2) }, getTrailingOptions2(arguments));
- return this._runTask(task, trailingFunctionArgument2(arguments));
- };
- Git2.prototype.rm = function(files) {
- return this._runTask(straightThroughStringTask2(["rm", "-f", ...asArray2(files)]), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.rmKeepLocal = function(files) {
- return this._runTask(straightThroughStringTask2(["rm", "--cached", ...asArray2(files)]), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.catFile = function(options, then) {
- return this._catFile("utf-8", arguments);
- };
- Git2.prototype.binaryCatFile = function() {
- return this._catFile("buffer", arguments);
- };
- Git2.prototype._catFile = function(format, args) {
- var handler = trailingFunctionArgument2(args);
- var command = ["cat-file"];
- var options = args[0];
- if (typeof options === "string") {
- return this._runTask(configurationErrorTask2("Git.catFile: options must be supplied as an array of strings"), handler);
- }
- if (Array.isArray(options)) {
- command.push.apply(command, options);
- }
- const task = format === "buffer" ? straightThroughBufferTask2(command) : straightThroughStringTask2(command);
- return this._runTask(task, handler);
- };
- Git2.prototype.diff = function(options, then) {
- const task = filterString2(options) ? configurationErrorTask2("git.diff: supplying options as a single string is no longer supported, switch to an array of strings") : straightThroughStringTask2(["diff", ...getTrailingOptions2(arguments)]);
- return this._runTask(task, trailingFunctionArgument2(arguments));
- };
- Git2.prototype.diffSummary = function() {
- return this._runTask(diffSummaryTask2(getTrailingOptions2(arguments, 1)), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.applyPatch = function(patches) {
- const task = !filterStringOrStringArray2(patches) ? configurationErrorTask2(`git.applyPatch requires one or more string patches as the first argument`) : applyPatchTask2(asArray2(patches), getTrailingOptions2([].slice.call(arguments, 1)));
- return this._runTask(task, trailingFunctionArgument2(arguments));
- };
- Git2.prototype.revparse = function() {
- const commands = ["rev-parse", ...getTrailingOptions2(arguments, true)];
- return this._runTask(straightThroughStringTask2(commands, true), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.show = function(options, then) {
- return this._runTask(straightThroughStringTask2(["show", ...getTrailingOptions2(arguments, 1)]), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.clean = function(mode, options, then) {
- const usingCleanOptionsArray = isCleanOptionsArray2(mode);
- const cleanMode = usingCleanOptionsArray && mode.join("") || filterType2(mode, filterString2) || "";
- const customArgs = getTrailingOptions2([].slice.call(arguments, usingCleanOptionsArray ? 1 : 0));
- return this._runTask(cleanWithOptionsTask2(cleanMode, customArgs), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.exec = function(then) {
- const task = {
- commands: [],
- format: "utf-8",
- parser() {
- if (typeof then === "function") {
- then();
- }
- }
- };
- return this._runTask(task);
- };
- Git2.prototype.clearQueue = function() {
- return this;
- };
- Git2.prototype.checkIgnore = function(pathnames, then) {
- return this._runTask(checkIgnoreTask2(asArray2(filterType2(pathnames, filterStringOrStringArray2, []))), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.checkIsRepo = function(checkType, then) {
- return this._runTask(checkIsRepoTask2(filterType2(checkType, filterString2)), trailingFunctionArgument2(arguments));
- };
- module2.exports = Git2;
- }
-});
-
-// src/lib/git-factory.ts
-var git_factory_exports = {};
-__export(git_factory_exports, {
- esModuleFactory: () => esModuleFactory,
- gitExportFactory: () => gitExportFactory,
- gitInstanceFactory: () => gitInstanceFactory
-});
-function esModuleFactory(defaultExport) {
- return Object.defineProperties(defaultExport, {
- __esModule: { value: true },
- default: { value: defaultExport }
- });
-}
-function gitExportFactory(factory, extra) {
- return Object.assign(function(...args) {
- return factory.apply(null, args);
- }, api_exports, extra || {});
-}
-function gitInstanceFactory(baseDir, options) {
- const plugins = new PluginStore();
- const config = createInstanceConfig(baseDir && (typeof baseDir === "string" ? { baseDir } : baseDir) || {}, options);
- if (!folderExists(config.baseDir)) {
- throw new GitConstructError(config, `Cannot use simple-git on a directory that does not exist`);
- }
- if (Array.isArray(config.config)) {
- plugins.add(commandConfigPrefixingPlugin(config.config));
- }
- plugins.add(completionDetectionPlugin(config.completion));
- config.progress && plugins.add(progressMonitorPlugin(config.progress));
- config.timeout && plugins.add(timeoutPlugin(config.timeout));
- config.spawnOptions && plugins.add(spawnOptionsPlugin(config.spawnOptions));
- plugins.add(errorDetectionPlugin(errorDetectionHandler(true)));
- config.errors && plugins.add(errorDetectionPlugin(config.errors));
- return new Git(config, plugins);
-}
-var Git;
-var init_git_factory = __esm({
- "src/lib/git-factory.ts"() {
- init_api();
- init_plugins();
- init_utils();
- Git = require_git();
- }
-});
-
-// src/lib/runners/promise-wrapped.ts
-var promise_wrapped_exports = {};
-__export(promise_wrapped_exports, {
- gitP: () => gitP
-});
-function gitP(...args) {
- let git;
- let chain = Promise.resolve();
- try {
- git = gitInstanceFactory(...args);
- } catch (e) {
- chain = Promise.reject(e);
- }
- function builderReturn() {
- return promiseApi;
- }
- function chainReturn() {
- return chain;
- }
- const promiseApi = [...functionNamesBuilderApi, ...functionNamesPromiseApi].reduce((api, name) => {
- const isAsync = functionNamesPromiseApi.includes(name);
- const valid = isAsync ? asyncWrapper(name, git) : syncWrapper(name, git, api);
- const alternative = isAsync ? chainReturn : builderReturn;
- Object.defineProperty(api, name, {
- enumerable: false,
- configurable: false,
- value: git ? valid : alternative
- });
- return api;
- }, {});
- return promiseApi;
- function asyncWrapper(fn, git2) {
- return function(...args2) {
- if (typeof args2[args2.length] === "function") {
- throw new TypeError("Promise interface requires that handlers are not supplied inline, trailing function not allowed in call to " + fn);
- }
- return chain.then(function() {
- return new Promise(function(resolve, reject) {
- const callback = (err, result) => {
- if (err) {
- return reject(toError(err));
- }
- resolve(result);
- };
- args2.push(callback);
- git2[fn].apply(git2, args2);
- });
- });
- };
- }
- function syncWrapper(fn, git2, api) {
- return (...args2) => {
- git2[fn](...args2);
- return api;
- };
- }
-}
-function toError(error) {
- if (error instanceof Error) {
- return error;
- }
- if (typeof error === "string") {
- return new Error(error);
- }
- return new GitResponseError(error);
-}
-var functionNamesBuilderApi, functionNamesPromiseApi;
-var init_promise_wrapped = __esm({
- "src/lib/runners/promise-wrapped.ts"() {
- init_git_response_error();
- init_git_factory();
- functionNamesBuilderApi = [
- "customBinary",
- "env",
- "outputHandler",
- "silent"
- ];
- functionNamesPromiseApi = [
- "add",
- "addAnnotatedTag",
- "addConfig",
- "addRemote",
- "addTag",
- "applyPatch",
- "binaryCatFile",
- "branch",
- "branchLocal",
- "catFile",
- "checkIgnore",
- "checkIsRepo",
- "checkout",
- "checkoutBranch",
- "checkoutLatestTag",
- "checkoutLocalBranch",
- "clean",
- "clone",
- "commit",
- "cwd",
- "deleteLocalBranch",
- "deleteLocalBranches",
- "diff",
- "diffSummary",
- "exec",
- "fetch",
- "getRemotes",
- "init",
- "listConfig",
- "listRemote",
- "log",
- "merge",
- "mergeFromTo",
- "mirror",
- "mv",
- "pull",
- "push",
- "pushTags",
- "raw",
- "rebase",
- "remote",
- "removeRemote",
- "reset",
- "revert",
- "revparse",
- "rm",
- "rmKeepLocal",
- "show",
- "stash",
- "stashList",
- "status",
- "subModule",
- "submoduleAdd",
- "submoduleInit",
- "submoduleUpdate",
- "tag",
- "tags",
- "updateServerInfo"
- ];
- }
-});
-
-// src/index.js
-var { gitP: gitP2 } = (init_promise_wrapped(), __toCommonJS(promise_wrapped_exports));
-var { esModuleFactory: esModuleFactory2, gitInstanceFactory: gitInstanceFactory2, gitExportFactory: gitExportFactory2 } = (init_git_factory(), __toCommonJS(git_factory_exports));
-module.exports = esModuleFactory2(gitExportFactory2(gitInstanceFactory2, { gitP: gitP2 }));
-//# sourceMappingURL=index.js.map
diff --git a/node_modules/simple-git/cjs/index.js.map b/node_modules/simple-git/cjs/index.js.map
deleted file mode 100644
index ff79c60..0000000
--- a/node_modules/simple-git/cjs/index.js.map
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "version": 3,
- "sources": ["../../src/lib/errors/git-error.ts", "../../src/lib/errors/git-response-error.ts", "../../src/lib/errors/git-construct-error.ts", "../../src/lib/errors/git-plugin-error.ts", "../../src/lib/errors/task-configuration-error.ts", "../../src/lib/utils/util.ts", "../../src/lib/utils/argument-filters.ts", "../../src/lib/utils/exit-codes.ts", "../../src/lib/utils/git-output-streams.ts", "../../src/lib/utils/line-parser.ts", "../../src/lib/utils/simple-git-options.ts", "../../src/lib/utils/task-options.ts", "../../src/lib/utils/task-parser.ts", "../../src/lib/utils/index.ts", "../../src/lib/tasks/check-is-repo.ts", "../../src/lib/responses/CleanSummary.ts", "../../src/lib/tasks/task.ts", "../../src/lib/tasks/clean.ts", "../../src/lib/responses/ConfigList.ts", "../../src/lib/tasks/config.ts", "../../src/lib/tasks/grep.ts", "../../src/lib/tasks/reset.ts", "../../src/lib/api.ts", "../../src/lib/plugins/command-config-prefixing-plugin.ts", "../../src/lib/plugins/completion-detection.plugin.ts", "../../src/lib/plugins/error-detection.plugin.ts", "../../src/lib/plugins/plugin-store.ts", "../../src/lib/plugins/progress-monitor-plugin.ts", "../../src/lib/plugins/simple-git-plugin.ts", "../../src/lib/plugins/spawn-options-plugin.ts", "../../src/lib/plugins/timout-plugin.ts", "../../src/lib/plugins/index.ts", "../../src/lib/git-logger.ts", "../../src/lib/runners/tasks-pending-queue.ts", "../../src/lib/runners/git-executor-chain.ts", "../../src/lib/runners/git-executor.ts", "../../src/lib/task-callback.ts", "../../src/lib/tasks/change-working-directory.ts", "../../src/lib/tasks/hash-object.ts", "../../src/lib/responses/InitSummary.ts", "../../src/lib/tasks/init.ts", "../../src/lib/responses/DiffSummary.ts", "../../src/lib/parsers/parse-diff-summary.ts", "../../src/lib/parsers/parse-list-log-summary.ts", "../../src/lib/tasks/log.ts", "../../src/lib/responses/MergeSummary.ts", "../../src/lib/responses/PullSummary.ts", "../../src/lib/parsers/parse-remote-objects.ts", "../../src/lib/parsers/parse-remote-messages.ts", "../../src/lib/parsers/parse-pull.ts", "../../src/lib/parsers/parse-merge.ts", "../../src/lib/tasks/merge.ts", "../../src/lib/parsers/parse-push.ts", "../../src/lib/tasks/push.ts", "../../src/lib/responses/FileStatusSummary.ts", "../../src/lib/responses/StatusSummary.ts", "../../src/lib/tasks/status.ts", "../../src/lib/simple-git-api.ts", "../../src/lib/runners/scheduler.ts", "../../src/lib/tasks/apply-patch.ts", "../../src/lib/responses/BranchDeleteSummary.ts", "../../src/lib/parsers/parse-branch-delete.ts", "../../src/lib/responses/BranchSummary.ts", "../../src/lib/parsers/parse-branch.ts", "../../src/lib/tasks/branch.ts", "../../src/lib/responses/CheckIgnore.ts", "../../src/lib/tasks/check-ignore.ts", "../../src/lib/tasks/clone.ts", "../../src/lib/parsers/parse-commit.ts", "../../src/lib/tasks/commit.ts", "../../src/lib/tasks/diff.ts", "../../src/lib/parsers/parse-fetch.ts", "../../src/lib/tasks/fetch.ts", "../../src/lib/parsers/parse-move.ts", "../../src/lib/tasks/move.ts", "../../src/lib/tasks/pull.ts", "../../src/lib/responses/GetRemoteSummary.ts", "../../src/lib/tasks/remote.ts", "../../src/lib/tasks/stash-list.ts", "../../src/lib/tasks/sub-module.ts", "../../src/lib/responses/TagList.ts", "../../src/lib/tasks/tag.ts", "../../src/git.js", "../../src/lib/git-factory.ts", "../../src/lib/runners/promise-wrapped.ts", "../../src/index.js"],
- "sourcesContent": ["import { SimpleGitTask } from '../types';\n\n/**\n * The `GitError` is thrown when the underlying `git` process throws a\n * fatal exception (eg an `ENOENT` exception when attempting to use a\n * non-writable directory as the root for your repo), and acts as the\n * base class for more specific errors thrown by the parsing of the\n * git response or errors in the configuration of the task about to\n * be run.\n *\n * When an exception is thrown, pending tasks in the same instance will\n * not be executed. The recommended way to run a series of tasks that\n * can independently fail without needing to prevent future tasks from\n * running is to catch them individually:\n *\n * ```typescript\n import { gitP, SimpleGit, GitError, PullResult } from 'simple-git';\n\n function catchTask (e: GitError) {\n return e.\n }\n\n const git = gitP(repoWorkingDir);\n const pulled: PullResult | GitError = await git.pull().catch(catchTask);\n const pushed: string | GitError = await git.pushTags().catch(catchTask);\n ```\n */\nexport class GitError extends Error {\n\n constructor (\n public task?: SimpleGitTask<any>,\n message?: string,\n ) {\n super(message);\n Object.setPrototypeOf(this, new.target.prototype);\n }\n\n}\n", "import { GitError } from './git-error';\n\n/**\n * The `GitResponseError` is the wrapper for a parsed response that is treated as\n * a fatal error, for example attempting a `merge` can leave the repo in a corrupted\n * state when there are conflicts so the task will reject rather than resolve.\n *\n * For example, catching the merge conflict exception:\n *\n * ```typescript\n import { gitP, SimpleGit, GitResponseError, MergeSummary } from 'simple-git';\n\n const git = gitP(repoRoot);\n const mergeOptions: string[] = ['--no-ff', 'other-branch'];\n const mergeSummary: MergeSummary = await git.merge(mergeOptions)\n .catch((e: GitResponseError<MergeSummary>) => e.git);\n\n if (mergeSummary.failed) {\n // deal with the error\n }\n ```\n */\nexport class GitResponseError<T = any> extends GitError {\n\n constructor(\n /**\n * `.git` access the parsed response that is treated as being an error\n */\n public readonly git: T,\n message?: string,\n ) {\n super(undefined, message || String(git));\n }\n\n}\n", "import { GitError } from './git-error';\nimport { SimpleGitOptions } from '../types';\n\n/**\n * The `GitConstructError` is thrown when an error occurs in the constructor\n * of the `simple-git` instance itself. Most commonly as a result of using\n * a `baseDir` option that points to a folder that either does not exist,\n * or cannot be read by the user the node script is running as.\n *\n * Check the `.message` property for more detail including the properties\n * passed to the constructor.\n */\nexport class GitConstructError extends GitError {\n\n constructor (\n public readonly config: SimpleGitOptions,\n message: string,\n ) {\n super(undefined, message);\n }\n\n}\n", "import { SimpleGitOptions, SimpleGitTask } from '../types';\nimport { GitError } from './git-error';\n\nexport class GitPluginError extends GitError {\n\n constructor (\n public task?: SimpleGitTask<any>,\n public readonly plugin?: keyof SimpleGitOptions,\n message?: string,\n ) {\n super(task, message);\n Object.setPrototypeOf(this, new.target.prototype);\n }\n\n}\n", "import { GitError } from './git-error';\n\n/**\n * The `TaskConfigurationError` is thrown when a command was incorrectly\n * configured. An error of this kind means that no attempt was made to\n * run your command through the underlying `git` binary.\n *\n * Check the `.message` property for more detail on why your configuration\n * resulted in an error.\n */\nexport class TaskConfigurationError extends GitError {\n\n constructor (\n message?: string,\n ) {\n super(undefined, message);\n }\n\n}\n", "import { exists, FOLDER } from '@kwsites/file-exists';\nimport { Maybe } from '../types';\n\nexport const NULL = '\\0';\n\nexport const NOOP: (...args: any[]) => void = () => {\n};\n\n/**\n * Returns either the source argument when it is a `Function`, or the default\n * `NOOP` function constant\n */\nexport function asFunction<T extends () => any>(source: T | any): T {\n return typeof source === 'function' ? source : NOOP;\n}\n\n/**\n * Determines whether the supplied argument is both a function, and is not\n * the `NOOP` function.\n */\nexport function isUserFunction<T extends Function>(source: T | any): source is T {\n return (typeof source === 'function' && source !== NOOP);\n}\n\nexport function splitOn(input: string, char: string): [string, string] {\n const index = input.indexOf(char);\n if (index <= 0) {\n return [input, ''];\n }\n\n return [\n input.substr(0, index),\n input.substr(index + 1),\n ];\n}\n\nexport function first<T extends any[]>(input: T, offset?: number): Maybe<T[number]>;\nexport function first<T extends IArguments>(input: T, offset?: number): Maybe<unknown>;\nexport function first(input: any[] | IArguments, offset = 0): Maybe<unknown> {\n return isArrayLike(input) && input.length > offset ? input[offset] : undefined;\n}\n\nexport function last<T extends any[]>(input: T, offset?: number): Maybe<T[number]>;\nexport function last<T extends IArguments>(input: T, offset?: number): Maybe<unknown>;\nexport function last<T>(input: T, offset?: number): Maybe<unknown>;\nexport function last(input: unknown, offset = 0) {\n if (isArrayLike(input) && input.length > offset) {\n return input[input.length - 1 - offset];\n }\n}\n\ntype ArrayLike<T = any> = T[] | IArguments | { [index: number]: T; length: number };\n\nfunction isArrayLike(input: any): input is ArrayLike {\n return !!(input && typeof input.length === 'number');\n}\n\nexport function toLinesWithContent(input = '', trimmed = true, separator = '\\n'): string[] {\n return input.split(separator)\n .reduce((output, line) => {\n const lineContent = trimmed ? line.trim() : line;\n if (lineContent) {\n output.push(lineContent);\n }\n return output;\n }, [] as string[]);\n}\n\ntype LineWithContentCallback<T = void> = (line: string) => T;\n\nexport function forEachLineWithContent<T>(input: string, callback: LineWithContentCallback<T>): T[] {\n return toLinesWithContent(input, true).map(line => callback(line));\n}\n\nexport function folderExists(path: string): boolean {\n return exists(path, FOLDER);\n}\n\n/**\n * Adds `item` into the `target` `Array` or `Set` when it is not already present and returns the `item`.\n */\nexport function append<T>(target: T[] | Set<T>, item: T): typeof item {\n if (Array.isArray(target)) {\n if (!target.includes(item)) {\n target.push(item);\n }\n } else {\n target.add(item);\n }\n return item;\n}\n\n/**\n * Adds `item` into the `target` `Array` when it is not already present and returns the `target`.\n */\nexport function including<T>(target: T[], item: T): typeof target {\n if (Array.isArray(target) && !target.includes(item)) {\n target.push(item);\n }\n\n return target;\n}\n\nexport function remove<T>(target: Set<T> | T[], item: T): T {\n if (Array.isArray(target)) {\n const index = target.indexOf(item);\n if (index >= 0) {\n target.splice(index, 1);\n }\n } else {\n target.delete(item);\n }\n return item;\n}\n\nexport const objectToString = Object.prototype.toString.call.bind(Object.prototype.toString) as (input: any) => string;\n\nexport function asArray<T>(source: T | T[]): T[] {\n return Array.isArray(source) ? source : [source];\n}\n\nexport function asStringArray<T>(source: T | T[]): string[] {\n return asArray(source).map(String);\n}\n\nexport function asNumber(source: string | null | undefined, onNaN = 0) {\n if (source == null) {\n return onNaN;\n }\n\n const num = parseInt(source, 10);\n return isNaN(num) ? onNaN : num;\n}\n\nexport function prefixedArray<T>(input: T[], prefix: T): T[] {\n const output: T[] = [];\n for (let i = 0, max = input.length; i < max; i++) {\n output.push(prefix, input[i]);\n }\n return output;\n}\n\nexport function bufferToString(input: Buffer | Buffer[]): string {\n return (Array.isArray(input) ? Buffer.concat(input) : input).toString('utf-8');\n}\n\n/**\n * Get a new object from a source object with only the listed properties.\n */\nexport function pick(source: Record<string, any>, properties: string[]) {\n return Object.assign({}, ...properties.map((property) => property in source ? {[property]: source[property]} : {}));\n}\n\nexport function delay(duration = 0): Promise<void> {\n return new Promise(done => setTimeout(done, duration));\n}\n", "import { Maybe, Options, Primitives } from '../types';\nimport { objectToString } from './util';\n\nexport interface ArgumentFilterPredicate<T> {\n (input: any): input is T;\n}\n\nexport function filterType<T, K>(input: K, filter: ArgumentFilterPredicate<T>): K extends T ? T : undefined;\nexport function filterType<T, K>(input: K, filter: ArgumentFilterPredicate<T>, def: T): T;\nexport function filterType<T, K>(input: K, filter: ArgumentFilterPredicate<T>, def?: T): Maybe<T> {\n if (filter(input)) {\n return input;\n }\n return (arguments.length > 2) ? def : undefined\n}\n\nexport const filterArray: ArgumentFilterPredicate<Array<any>> = (input): input is Array<any> => {\n return Array.isArray(input);\n}\n\nexport function filterPrimitives(input: unknown, omit?: Array<'boolean' | 'string' | 'number'>): input is Primitives {\n return /number|string|boolean/.test(typeof input) && (!omit || !omit.includes((typeof input) as 'boolean' | 'string' | 'number'));\n}\n\nexport const filterString: ArgumentFilterPredicate<string> = (input): input is string => {\n return typeof input === 'string';\n};\n\nexport const filterStringArray: ArgumentFilterPredicate<string[]> = (input): input is string[] => {\n return Array.isArray(input) && input.every(filterString);\n};\n\nexport const filterStringOrStringArray: ArgumentFilterPredicate<string | string[]> = (input): input is string | string[] => {\n return filterString(input) || (Array.isArray(input) && input.every(filterString));\n};\n\nexport function filterPlainObject<T extends Options>(input: T | unknown): input is T;\nexport function filterPlainObject<T extends Object>(input: T | unknown): input is T {\n return !!input && objectToString(input) === '[object Object]';\n}\n\nexport function filterFunction(input: unknown): input is Function {\n return typeof input === 'function';\n}\n\nexport const filterHasLength: ArgumentFilterPredicate<{ length: number }> = (input): input is { length: number } => {\n if (input == null || 'number|boolean|function'.includes(typeof input)) {\n return false;\n }\n return Array.isArray(input) || typeof input === 'string' || typeof input.length === 'number';\n}\n", "/**\n * Known process exit codes used by the task parsers to determine whether an error\n * was one they can automatically handle\n */\nexport enum ExitCodes {\n SUCCESS,\n ERROR,\n UNCLEAN = 128,\n}\n", "import { TaskResponseFormat } from '../types';\n\nexport class GitOutputStreams<T extends TaskResponseFormat = Buffer> {\n\n constructor(public readonly stdOut: T, public readonly stdErr: T) {\n }\n\n asStrings(): GitOutputStreams<string> {\n return new GitOutputStreams(this.stdOut.toString('utf8'), this.stdErr.toString('utf8'));\n }\n}\n", "export class LineParser<T> {\n\n protected matches: string[] = [];\n\n private _regExp: RegExp[];\n\n constructor(\n regExp: RegExp | RegExp[],\n useMatches?: (target: T, match: string[]) => boolean | void,\n ) {\n this._regExp = Array.isArray(regExp) ? regExp : [regExp];\n if (useMatches) {\n this.useMatches = useMatches;\n }\n }\n\n parse = (line: (offset: number) => (string | undefined), target: T): boolean => {\n this.resetMatches();\n\n if (!this._regExp.every((reg, index) => this.addMatch(reg, index, line(index)))) {\n return false;\n }\n\n return this.useMatches(target, this.prepareMatches()) !== false;\n }\n\n // @ts-ignore\n protected useMatches(target: T, match: string[]): boolean | void {\n throw new Error(`LineParser:useMatches not implemented`);\n }\n\n protected resetMatches() {\n this.matches.length = 0;\n }\n\n protected prepareMatches() {\n return this.matches;\n }\n\n protected addMatch(reg: RegExp, index: number, line?: string) {\n const matched = line && reg.exec(line);\n if (matched) {\n this.pushMatch(index, matched);\n }\n\n return !!matched;\n }\n\n protected pushMatch(_index: number, matched: string[]) {\n this.matches.push(...matched.slice(1));\n }\n\n}\n\nexport class RemoteLineParser<T> extends LineParser<T> {\n\n protected addMatch(reg: RegExp, index: number, line?: string): boolean {\n return /^remote:\\s/.test(String(line)) && super.addMatch(reg, index, line);\n }\n\n protected pushMatch(index: number, matched: string[]) {\n if (index > 0 || matched.length > 1) {\n super.pushMatch(index, matched);\n }\n }\n\n}\n", "import { SimpleGitOptions } from '../types';\n\nconst defaultOptions: Omit<SimpleGitOptions, 'baseDir'> = {\n binary: 'git',\n maxConcurrentProcesses: 5,\n config: [],\n};\n\nexport function createInstanceConfig(...options: Array<Partial<SimpleGitOptions> | undefined>): SimpleGitOptions {\n const baseDir = process.cwd();\n const config: SimpleGitOptions = Object.assign({baseDir, ...defaultOptions},\n ...(options.filter(o => typeof o === 'object' && o))\n );\n\n config.baseDir = config.baseDir || baseDir;\n\n return config;\n}\n", "import { filterArray, filterFunction, filterPlainObject, filterPrimitives, filterType } from './argument-filters';\nimport { asFunction, isUserFunction, last } from './util';\nimport { Maybe, Options, OptionsValues } from '../types';\n\nexport function appendTaskOptions<T extends Options = Options>(options: Maybe<T>, commands: string[] = []): string[] {\n if (!filterPlainObject<Options>(options)) {\n return commands;\n }\n\n return Object.keys(options).reduce((commands: string[], key: string) => {\n const value: OptionsValues = options[key];\n\n if (filterPrimitives(value, ['boolean'])) {\n commands.push(key + '=' + value);\n } else {\n commands.push(key);\n }\n\n return commands;\n }, commands);\n}\n\nexport function getTrailingOptions(args: IArguments, initialPrimitive = 0, objectOnly = false): string[] {\n const command: string[] = [];\n\n for (let i = 0, max = initialPrimitive < 0 ? args.length : initialPrimitive; i < max; i++) {\n if ('string|number'.includes(typeof args[i])) {\n command.push(String(args[i]));\n }\n }\n\n appendTaskOptions(trailingOptionsArgument(args), command);\n if (!objectOnly) {\n command.push(...trailingArrayArgument(args));\n }\n\n return command;\n}\n\nfunction trailingArrayArgument(args: IArguments) {\n const hasTrailingCallback = typeof last(args) === 'function';\n return filterType(\n last(args, hasTrailingCallback ? 1 : 0), filterArray, []\n );\n}\n\n/**\n * Given any number of arguments, returns the trailing options argument, ignoring a trailing function argument\n * if there is one. When not found, the return value is null.\n */\nexport function trailingOptionsArgument(args: IArguments): Maybe<Options> {\n const hasTrailingCallback = filterFunction(last(args));\n return filterType(last(args, hasTrailingCallback ? 1 : 0), filterPlainObject);\n}\n\n/**\n * Returns either the source argument when it is a `Function`, or the default\n * `NOOP` function constant\n */\nexport function trailingFunctionArgument(args: unknown[] | IArguments | unknown, includeNoop = true): Maybe<(...args: any[]) => unknown> {\n const callback = asFunction(last(args));\n return includeNoop || isUserFunction(callback) ? callback : undefined;\n}\n", "import { TaskParser, TaskResponseFormat } from '../types';\nimport { GitOutputStreams } from './git-output-streams';\nimport { LineParser } from './line-parser';\nimport { toLinesWithContent } from './util';\n\nexport function callTaskParser<INPUT extends TaskResponseFormat, RESPONSE>(parser: TaskParser<INPUT, RESPONSE>, streams: GitOutputStreams<INPUT>) {\n return parser(streams.stdOut, streams.stdErr);\n}\n\nexport function parseStringResponse<T>(result: T, parsers: LineParser<T>[], ...texts: string[]): T {\n texts.forEach(text => {\n for (let lines = toLinesWithContent(text), i = 0, max = lines.length; i < max; i++) {\n const line = (offset = 0) => {\n if ((i + offset) >= max) {\n return;\n }\n return lines[i + offset];\n }\n\n parsers.some(({parse}) => parse(line, result));\n }\n });\n\n return result;\n}\n", "\nexport * from './argument-filters';\nexport * from './exit-codes';\nexport * from './git-output-streams';\nexport * from './line-parser';\nexport * from './simple-git-options';\nexport * from './task-options';\nexport * from './task-parser';\nexport * from './util';\n", "import { ExitCodes } from '../utils';\nimport { Maybe, StringTask } from '../types';\n\nexport enum CheckRepoActions {\n BARE = 'bare',\n IN_TREE = 'tree',\n IS_REPO_ROOT = 'root',\n}\n\nconst onError: StringTask<boolean>['onError'] = ({exitCode}, error, done, fail) => {\n if (exitCode === ExitCodes.UNCLEAN && isNotRepoMessage(error)) {\n return done(Buffer.from('false'));\n }\n\n fail(error);\n}\n\nconst parser: StringTask<boolean>['parser'] = (text) => {\n return text.trim() === 'true';\n}\n\nexport function checkIsRepoTask(action: Maybe<CheckRepoActions>): StringTask<boolean> {\n switch (action) {\n case CheckRepoActions.BARE:\n return checkIsBareRepoTask();\n case CheckRepoActions.IS_REPO_ROOT:\n return checkIsRepoRootTask();\n }\n\n const commands = ['rev-parse', '--is-inside-work-tree'];\n\n return {\n commands,\n format: 'utf-8',\n onError,\n parser,\n }\n}\n\n\nexport function checkIsRepoRootTask(): StringTask<boolean> {\n const commands = ['rev-parse', '--git-dir'];\n\n return {\n commands,\n format: 'utf-8',\n onError,\n parser(path) {\n return /^\\.(git)?$/.test(path.trim());\n },\n }\n}\n\n\nexport function checkIsBareRepoTask(): StringTask<boolean> {\n const commands = ['rev-parse', '--is-bare-repository'];\n\n return {\n commands,\n format: 'utf-8',\n onError,\n parser,\n }\n}\n\n\nfunction isNotRepoMessage(error: Error): boolean {\n return /(Not a git repository|Kein Git-Repository)/i.test(String(error));\n}\n", "import { CleanSummary } from '../../../typings';\nimport { toLinesWithContent } from '../utils';\n\nexport class CleanResponse implements CleanSummary {\n\n public paths: string[] = [];\n public files: string[] = [];\n public folders: string[] = [];\n\n constructor(\n public readonly dryRun: boolean,\n ) {}\n\n}\n\nconst removalRegexp = /^[a-z]+\\s*/i;\nconst dryRunRemovalRegexp = /^[a-z]+\\s+[a-z]+\\s*/i;\nconst isFolderRegexp = /\\/$/;\n\nexport function cleanSummaryParser (dryRun: boolean, text: string): CleanSummary {\n const summary = new CleanResponse(dryRun);\n const regexp = dryRun ? dryRunRemovalRegexp : removalRegexp;\n\n toLinesWithContent(text).forEach(line => {\n const removed = line.replace(regexp, '');\n\n summary.paths.push(removed);\n (isFolderRegexp.test(removed) ? summary.folders : summary.files).push(removed);\n });\n\n return summary;\n}\n", "import { TaskConfigurationError } from '../errors/task-configuration-error';\nimport { BufferTask, EmptyTaskParser, SimpleGitTask, StringTask } from '../types';\n\nexport const EMPTY_COMMANDS: [] = [];\n\nexport type EmptyTask = {\n commands: typeof EMPTY_COMMANDS;\n format: 'empty',\n parser: EmptyTaskParser;\n onError?: undefined;\n};\n\n\nexport function adhocExecTask(parser: EmptyTaskParser): EmptyTask {\n return {\n commands: EMPTY_COMMANDS,\n format: 'empty',\n parser,\n };\n}\n\nexport function configurationErrorTask(error: Error | string): EmptyTask {\n return {\n commands: EMPTY_COMMANDS,\n format: 'empty',\n parser() {\n throw typeof error === 'string' ? new TaskConfigurationError(error) : error;\n }\n }\n}\n\nexport function straightThroughStringTask(commands: string[], trimmed = false): StringTask<string> {\n return {\n commands,\n format: 'utf-8',\n parser(text) {\n return trimmed ? String(text).trim() : text;\n },\n }\n}\n\nexport function straightThroughBufferTask(commands: string[]): BufferTask<any> {\n return {\n commands,\n format: 'buffer',\n parser(buffer) {\n return buffer;\n },\n }\n}\n\nexport function isBufferTask<R>(task: SimpleGitTask<R>): task is BufferTask<R> {\n return task.format === 'buffer';\n}\n\nexport function isEmptyTask<R>(task: SimpleGitTask<R>): task is EmptyTask {\n return task.format === 'empty' || !task.commands.length;\n}\n", "import { CleanSummary } from '../../../typings';\nimport { cleanSummaryParser } from '../responses/CleanSummary';\nimport { Maybe, StringTask } from '../types';\nimport { asStringArray } from '../utils';\nimport { configurationErrorTask } from './task';\n\nexport const CONFIG_ERROR_INTERACTIVE_MODE = 'Git clean interactive mode is not supported';\nexport const CONFIG_ERROR_MODE_REQUIRED = 'Git clean mode parameter (\"n\" or \"f\") is required';\nexport const CONFIG_ERROR_UNKNOWN_OPTION = 'Git clean unknown option found in: ';\n\n/**\n * All supported option switches available for use in a `git.clean` operation\n */\nexport enum CleanOptions {\n DRY_RUN = 'n',\n FORCE = 'f',\n IGNORED_INCLUDED = 'x',\n IGNORED_ONLY = 'X',\n EXCLUDING = 'e',\n QUIET = 'q',\n RECURSIVE = 'd',\n}\n\n/**\n * The two modes `git.clean` can run in - one of these must be supplied in order\n * for the command to not throw a `TaskConfigurationError`\n */\nexport type CleanMode = CleanOptions.FORCE | CleanOptions.DRY_RUN;\n\nconst CleanOptionValues: Set<string> = new Set(['i', ...asStringArray(Object.values(CleanOptions as any))]);\n\nexport function cleanWithOptionsTask(mode: CleanMode | string, customArgs: string[]) {\n const {cleanMode, options, valid} = getCleanOptions(mode);\n\n if (!cleanMode) {\n return configurationErrorTask(CONFIG_ERROR_MODE_REQUIRED);\n }\n\n if (!valid.options) {\n return configurationErrorTask(CONFIG_ERROR_UNKNOWN_OPTION + JSON.stringify(mode));\n }\n\n options.push(...customArgs);\n\n if (options.some(isInteractiveMode)) {\n return configurationErrorTask(CONFIG_ERROR_INTERACTIVE_MODE);\n }\n\n return cleanTask(cleanMode, options);\n}\n\nexport function cleanTask(mode: CleanMode, customArgs: string[]): StringTask<CleanSummary> {\n const commands: string[] = ['clean', `-${mode}`, ...customArgs];\n\n return {\n commands,\n format: 'utf-8',\n parser(text: string): CleanSummary {\n return cleanSummaryParser(mode === CleanOptions.DRY_RUN, text);\n }\n }\n}\n\nexport function isCleanOptionsArray (input: string[]): input is CleanOptions[] {\n return Array.isArray(input) && input.every(test => CleanOptionValues.has(test));\n}\n\nfunction getCleanOptions(input: string) {\n let cleanMode: Maybe<CleanMode>;\n let options: string[] = [];\n let valid = {cleanMode: false, options: true};\n\n input.replace(/[^a-z]i/g, '').split('').forEach(char => {\n if (isCleanMode(char)) {\n cleanMode = char;\n valid.cleanMode = true;\n }\n else {\n valid.options = valid.options && isKnownOption(options[options.length] = (`-${char}`));\n }\n });\n\n return {\n cleanMode,\n options,\n valid,\n }\n}\n\nfunction isCleanMode(cleanMode?: string): cleanMode is CleanMode {\n return cleanMode === CleanOptions.FORCE || cleanMode === CleanOptions.DRY_RUN;\n}\n\nfunction isKnownOption(option: string): boolean {\n return /^-[a-z]$/i.test(option) && CleanOptionValues.has(option.charAt(1));\n}\n\nfunction isInteractiveMode(option: string): boolean {\n if (/^-[^\\-]/.test(option)) {\n return option.indexOf('i') > 0;\n }\n\n return option === '--interactive';\n}\n", "import { ConfigGetResult, ConfigListSummary, ConfigValues } from '../../../typings';\nimport { last, splitOn } from '../utils';\n\nexport class ConfigList implements ConfigListSummary {\n\n public files: string[] = [];\n public values: { [fileName: string]: ConfigValues } = Object.create(null);\n\n private _all: ConfigValues | undefined;\n\n public get all(): ConfigValues {\n if (!this._all) {\n this._all = this.files.reduce((all: ConfigValues, file: string) => {\n return Object.assign(all, this.values[file]);\n }, {});\n }\n\n return this._all;\n }\n\n public addFile(file: string): ConfigValues {\n if (!(file in this.values)) {\n const latest = last(this.files);\n this.values[file] = latest ? Object.create(this.values[latest]) : {}\n\n this.files.push(file);\n }\n\n return this.values[file];\n }\n\n public addValue(file: string, key: string, value: string) {\n const values = this.addFile(file);\n\n if (!values.hasOwnProperty(key)) {\n values[key] = value;\n } else if (Array.isArray(values[key])) {\n (values[key] as string[]).push(value);\n } else {\n values[key] = [values[key] as string, value];\n }\n\n this._all = undefined;\n }\n\n}\n\nexport function configListParser(text: string): ConfigList {\n const config = new ConfigList();\n\n for (const item of configParser(text)) {\n config.addValue(item.file, String(item.key), item.value);\n }\n\n return config;\n}\n\nexport function configGetParser(text: string, key: string): ConfigGetResult {\n let value: string | null = null;\n const values: string[] = [];\n const scopes: Map<string, string[]> = new Map();\n\n for (const item of configParser(text, key)) {\n if (item.key !== key) {\n continue;\n }\n\n values.push(value = item.value);\n\n if (!scopes.has(item.file)) {\n scopes.set(item.file, []);\n }\n\n scopes.get(item.file)!.push(value);\n }\n\n return {\n key,\n paths: Array.from(scopes.keys()),\n scopes,\n value,\n values\n };\n}\n\nfunction configFilePath(filePath: string): string {\n return filePath.replace(/^(file):/, '');\n}\n\nfunction* configParser(text: string, requestedKey: string | null = null) {\n const lines = text.split('\\0');\n\n for (let i = 0, max = lines.length - 1; i < max;) {\n const file = configFilePath(lines[i++]);\n\n let value = lines[i++];\n let key = requestedKey;\n\n if (value.includes('\\n')) {\n const line = splitOn(value, '\\n');\n key = line[0];\n value = line[1];\n }\n\n yield {file, key, value};\n }\n}\n", "import { ConfigGetResult, ConfigListSummary, SimpleGit } from '../../../typings';\nimport { configGetParser, configListParser } from '../responses/ConfigList';\nimport { SimpleGitApi } from '../simple-git-api';\nimport { StringTask } from '../types';\nimport { trailingFunctionArgument } from '../utils';\n\nexport enum GitConfigScope {\n system = 'system',\n global = 'global',\n local = 'local',\n worktree = 'worktree',\n}\n\nfunction asConfigScope<T extends GitConfigScope | undefined>(scope: GitConfigScope | unknown, fallback: T): GitConfigScope | T {\n if (typeof scope === 'string' && GitConfigScope.hasOwnProperty(scope)) {\n return scope as GitConfigScope;\n }\n return fallback;\n}\n\nfunction addConfigTask(key: string, value: string, append: boolean, scope: GitConfigScope): StringTask<string> {\n const commands: string[] = ['config', `--${scope}`];\n\n if (append) {\n commands.push('--add');\n }\n\n commands.push(key, value);\n\n return {\n commands,\n format: 'utf-8',\n parser(text: string): string {\n return text;\n }\n }\n}\n\nfunction getConfigTask(key: string, scope?: GitConfigScope): StringTask<ConfigGetResult> {\n const commands: string[] = ['config', '--null', '--show-origin', '--get-all', key];\n\n if (scope) {\n commands.splice(1, 0, `--${scope}`);\n }\n\n return {\n commands,\n format: 'utf-8',\n parser(text) {\n return configGetParser(text, key);\n }\n };\n}\n\nfunction listConfigTask(scope?: GitConfigScope): StringTask<ConfigListSummary> {\n const commands = ['config', '--list', '--show-origin', '--null'];\n\n if (scope) {\n commands.push(`--${scope}`);\n }\n\n return {\n commands,\n format: 'utf-8',\n parser(text: string) {\n return configListParser(text);\n },\n }\n}\n\nexport default function (): Pick<SimpleGit, 'addConfig' | 'getConfig' | 'listConfig'> {\n return {\n addConfig(this: SimpleGitApi, key: string, value: string, ...rest: unknown[]) {\n return this._runTask(\n addConfigTask(key, value, rest[0] === true, asConfigScope(rest[1], GitConfigScope.local)),\n trailingFunctionArgument(arguments),\n );\n },\n\n getConfig(this: SimpleGitApi, key: string, scope?: GitConfigScope) {\n return this._runTask(\n getConfigTask(key, asConfigScope(scope, undefined)),\n trailingFunctionArgument(arguments),\n )\n },\n\n listConfig(this: SimpleGitApi, ...rest: unknown[]) {\n return this._runTask(\n listConfigTask(asConfigScope(rest[0], undefined)),\n trailingFunctionArgument(arguments),\n );\n },\n };\n}\n", "import { GrepResult, SimpleGit } from '../../../typings';\nimport { SimpleGitApi } from '../simple-git-api';\nimport {\n asNumber,\n forEachLineWithContent,\n getTrailingOptions,\n NULL,\n prefixedArray,\n trailingFunctionArgument\n} from '../utils';\n\nimport { configurationErrorTask } from './task';\n\nconst disallowedOptions = ['-h'];\n\nconst Query = Symbol('grepQuery');\n\nexport interface GitGrepQuery extends Iterable<string> {\n /** Adds one or more terms to be grouped as an \"and\" to any other terms */\n and(...and: string[]): this;\n\n /** Adds one or more search terms - git.grep will \"or\" this to other terms */\n param(...param: string[]): this;\n}\n\nclass GrepQuery implements GitGrepQuery {\n private [Query]: string[] = [];\n\n * [Symbol.iterator]() {\n for (const query of this[Query]) {\n yield query;\n }\n }\n\n and(...and: string[]) {\n and.length && this[Query].push('--and', '(', ...prefixedArray(and, '-e'), ')');\n return this;\n }\n\n param(...param: string[]) {\n this[Query].push(...prefixedArray(param, '-e'));\n return this;\n }\n}\n\n/**\n * Creates a new builder for a `git.grep` query with optional params\n */\nexport function grepQueryBuilder(...params: string[]): GitGrepQuery {\n return new GrepQuery().param(...params);\n}\n\nfunction parseGrep(grep: string): GrepResult {\n const paths: GrepResult['paths'] = new Set<string>();\n const results: GrepResult['results'] = {};\n\n forEachLineWithContent(grep, (input) => {\n const [path, line, preview] = input.split(NULL);\n paths.add(path);\n (results[path] = results[path] || []).push({\n line: asNumber(line),\n path,\n preview,\n });\n });\n\n return {\n paths,\n results,\n };\n}\n\nexport default function (): Pick<SimpleGit, 'grep'> {\n return {\n grep(this: SimpleGitApi, searchTerm: string | GitGrepQuery) {\n const then = trailingFunctionArgument(arguments);\n const options = getTrailingOptions(arguments);\n\n for (const option of disallowedOptions) {\n if (options.includes(option)) {\n return this._runTask(\n configurationErrorTask(`git.grep: use of \"${option}\" is not supported.`),\n then,\n );\n }\n }\n\n if (typeof searchTerm === 'string') {\n searchTerm = grepQueryBuilder().param(searchTerm);\n }\n\n const commands = ['grep', '--null', '-n', '--full-name', ...options, ...searchTerm];\n\n return this._runTask({\n commands,\n format: 'utf-8',\n parser(stdOut) {\n return parseGrep(stdOut);\n },\n }, then);\n }\n }\n}\n", "import { straightThroughStringTask } from './task';\nimport { Maybe, OptionFlags, Options } from '../types';\n\nexport enum ResetMode {\n MIXED = 'mixed',\n SOFT = 'soft',\n HARD = 'hard',\n MERGE = 'merge',\n KEEP = 'keep',\n}\n\nconst ResetModes = Array.from(Object.values(ResetMode));\n\nexport type ResetOptions = Options &\n OptionFlags<'-q' | '--quiet' | '--no-quiet' | '--pathspec-from-nul'> &\n OptionFlags<'--pathspec-from-file', string>;\n\nexport function resetTask(mode: Maybe<ResetMode>, customArgs: string[]) {\n const commands: string[] = ['reset'];\n if (isValidResetMode(mode)) {\n commands.push(`--${mode}`);\n }\n commands.push(...customArgs);\n\n return straightThroughStringTask(commands);\n}\n\nexport function getResetMode(mode: ResetMode | any): Maybe<ResetMode> {\n if (isValidResetMode(mode)) {\n return mode;\n }\n\n switch (typeof mode) {\n case 'string':\n case 'undefined':\n return ResetMode.SOFT;\n }\n\n return;\n}\n\nfunction isValidResetMode(mode: ResetMode | any): mode is ResetMode {\n return ResetModes.includes(mode);\n}\n", "import { GitConstructError } from './errors/git-construct-error';\nimport { GitError } from './errors/git-error';\nimport { GitPluginError } from './errors/git-plugin-error';\nimport { GitResponseError } from './errors/git-response-error';\nimport { TaskConfigurationError } from './errors/task-configuration-error';\nimport { CheckRepoActions } from './tasks/check-is-repo';\nimport { CleanOptions } from './tasks/clean';\nimport { GitConfigScope } from './tasks/config';\nimport { grepQueryBuilder } from './tasks/grep';\nimport { ResetMode } from './tasks/reset';\n\nexport {\n CheckRepoActions,\n CleanOptions,\n GitConfigScope,\n GitConstructError,\n GitError,\n GitPluginError,\n GitResponseError,\n ResetMode,\n TaskConfigurationError,\n grepQueryBuilder,\n};\n\n// export const api = {\n// CheckRepoActions,\n// CleanOptions,\n// GitConfigScope,\n// GitConstructError,\n// GitError,\n// GitPluginError,\n// GitResponseError,\n// ResetMode,\n// TaskConfigurationError,\n// grepQueryBuilder,\n// };\n", "import { prefixedArray } from '../utils';\nimport { SimpleGitPlugin } from './simple-git-plugin';\n\nexport function commandConfigPrefixingPlugin(configuration: string[]): SimpleGitPlugin<'spawn.args'> {\n const prefix = prefixedArray(configuration, '-c');\n\n return {\n type: 'spawn.args',\n action(data) {\n return [...prefix, ...data];\n },\n };\n}\n", "import { deferred, DeferredPromise } from '@kwsites/promise-deferred';\nimport { SimpleGitPluginConfig } from '../types';\nimport { delay } from '../utils';\nimport { SimpleGitPlugin } from './simple-git-plugin';\n\nconst never = deferred().promise;\n\nexport function completionDetectionPlugin({\n onClose = true,\n onExit = 50\n }: SimpleGitPluginConfig['completion'] = {}): SimpleGitPlugin<'spawn.after'> {\n\n function createEvents() {\n let exitCode = -1;\n const events = {\n close: deferred(),\n closeTimeout: deferred(),\n exit: deferred(),\n exitTimeout: deferred(),\n };\n\n const result = Promise.race([\n onClose === false ? never : events.closeTimeout.promise,\n onExit === false ? never : events.exitTimeout.promise,\n ]);\n\n configureTimeout(onClose, events.close, events.closeTimeout);\n configureTimeout(onExit, events.exit, events.exitTimeout);\n\n return {\n close(code: number) {\n exitCode = code;\n events.close.done();\n },\n exit(code: number) {\n exitCode = code;\n events.exit.done();\n },\n get exitCode() {\n return exitCode;\n },\n result,\n };\n }\n\n function configureTimeout(flag: boolean | number, event: DeferredPromise<void>, timeout: DeferredPromise<void>) {\n if (flag === false) {\n return;\n }\n\n (flag === true ? event.promise : event.promise.then(() => delay(flag))).then(timeout.done);\n }\n\n return {\n type: 'spawn.after',\n async action(_data, {spawned, close}) {\n const events = createEvents();\n\n let deferClose = true;\n let quickClose = () => void (deferClose = false);\n\n spawned.stdout?.on('data', quickClose);\n spawned.stderr?.on('data', quickClose);\n spawned.on('error', quickClose);\n\n spawned.on('close', (code: number) => events.close(code));\n spawned.on('exit', (code: number) => events.exit(code));\n\n try{\n await events.result;\n if (deferClose) {\n await delay(50);\n }\n close(events.exitCode);\n }\n catch (err) {\n close(events.exitCode, err);\n }\n }\n }\n}\n", "import { GitError } from '../errors/git-error';\nimport { GitExecutorResult, SimpleGitPluginConfig } from '../types';\nimport { SimpleGitPlugin } from './simple-git-plugin';\n\ntype TaskResult = Omit<GitExecutorResult, 'rejection'>;\n\nfunction isTaskError (result: TaskResult) {\n return !!(result.exitCode && result.stdErr.length);\n}\n\nfunction getErrorMessage (result: TaskResult) {\n return Buffer.concat([...result.stdOut, ...result.stdErr]);\n}\n\nexport function errorDetectionHandler (overwrite = false, isError = isTaskError, errorMessage: (result: TaskResult) => Buffer | Error = getErrorMessage) {\n\n return (error: Buffer | Error | undefined, result: TaskResult) => {\n if ((!overwrite && error) || !isError(result)) {\n return error;\n }\n\n return errorMessage(result);\n };\n}\n\nexport function errorDetectionPlugin(config: SimpleGitPluginConfig['errors']): SimpleGitPlugin<'task.error'> {\n\n return {\n type: 'task.error',\n action(data, context) {\n const error = config(data.error, {\n stdErr: context.stdErr,\n stdOut: context.stdOut,\n exitCode: context.exitCode\n });\n\n if (Buffer.isBuffer(error)) {\n return {error: new GitError(undefined, error.toString('utf-8'))};\n }\n\n return {\n error\n };\n },\n };\n\n}\n", "import { SimpleGitPlugin, SimpleGitPluginType, SimpleGitPluginTypes } from './simple-git-plugin';\nimport { append, asArray } from '../utils';\n\nexport class PluginStore {\n\n private plugins: Set<SimpleGitPlugin<SimpleGitPluginType>> = new Set();\n\n public add<T extends SimpleGitPluginType>(plugin: void | SimpleGitPlugin<T> | SimpleGitPlugin<T>[]) {\n const plugins: SimpleGitPlugin<T>[] = [];\n\n asArray(plugin).forEach(plugin => plugin && this.plugins.add(append(plugins, plugin)));\n\n return () => {\n plugins.forEach(plugin => this.plugins.delete(plugin));\n };\n }\n\n public exec<T extends SimpleGitPluginType>(type: T, data: SimpleGitPluginTypes[T]['data'], context: SimpleGitPluginTypes[T]['context']): typeof data {\n let output = data;\n const contextual = Object.freeze(Object.create(context));\n\n for (const plugin of this.plugins) {\n if (plugin.type === type) {\n output = plugin.action(output, contextual);\n }\n }\n\n return output;\n }\n\n}\n", "import { SimpleGitOptions } from '../types';\nimport { asNumber, including } from '../utils';\n\nimport { SimpleGitPlugin } from './simple-git-plugin';\n\nexport function progressMonitorPlugin(progress: Exclude<SimpleGitOptions['progress'], void>) {\n const progressCommand = '--progress';\n const progressMethods = ['checkout', 'clone', 'fetch', 'pull', 'push'];\n\n const onProgress: SimpleGitPlugin<'spawn.after'> = {\n type: 'spawn.after',\n action(_data, context) {\n if (!context.commands.includes(progressCommand)) {\n return;\n }\n\n context.spawned.stderr?.on('data', (chunk: Buffer) => {\n const message = /^([\\s\\S]+?):\\s*(\\d+)% \\((\\d+)\\/(\\d+)\\)/.exec(chunk.toString('utf8'));\n if (!message) {\n return;\n }\n\n progress({\n method: context.method,\n stage: progressEventStage(message[1]),\n progress: asNumber(message[2]),\n processed: asNumber(message[3]),\n total: asNumber(message[4]),\n });\n });\n }\n };\n\n const onArgs: SimpleGitPlugin<'spawn.args'> = {\n type: 'spawn.args',\n action(args, context) {\n if (!progressMethods.includes(context.method)) {\n return args;\n }\n\n return including(args, progressCommand);\n }\n }\n\n return [onArgs, onProgress];\n}\n\nfunction progressEventStage (input: string) {\n return String(input.toLowerCase().split(' ', 1)) || 'unknown';\n}\n", "import { ChildProcess, SpawnOptions } from 'child_process';\nimport { GitExecutorResult } from '../types';\n\ntype SimpleGitTaskPluginContext = {\n readonly method: string;\n readonly commands: string[];\n}\n\nexport interface SimpleGitPluginTypes {\n 'spawn.args': {\n data: string[];\n context: SimpleGitTaskPluginContext & {};\n };\n 'spawn.options': {\n data: Partial<SpawnOptions>;\n context: SimpleGitTaskPluginContext & {};\n };\n 'spawn.after': {\n data: void;\n context: SimpleGitTaskPluginContext & {\n spawned: ChildProcess;\n close (exitCode: number, reason?: Error): void;\n kill (reason: Error): void;\n };\n },\n 'task.error': {\n data: { error?: Error };\n context: SimpleGitTaskPluginContext & GitExecutorResult;\n },\n}\n\nexport type SimpleGitPluginType = keyof SimpleGitPluginTypes;\n\nexport interface SimpleGitPlugin<T extends SimpleGitPluginType> {\n action(data: SimpleGitPluginTypes[T]['data'], context: SimpleGitPluginTypes[T]['context']): typeof data;\n\n type: T;\n}\n", "import { SpawnOptions } from 'child_process';\nimport { pick } from '../utils';\nimport { SimpleGitPlugin } from './simple-git-plugin';\n\nexport function spawnOptionsPlugin(spawnOptions: Partial<SpawnOptions>): SimpleGitPlugin<'spawn.options'> {\n const options = pick(spawnOptions, ['uid', 'gid']);\n\n return {\n type: 'spawn.options',\n action(data) {\n return {...options, ...data};\n },\n };\n}\n", "import { SimpleGitOptions } from '../types';\n\nimport { SimpleGitPlugin } from './simple-git-plugin';\nimport { GitPluginError } from '../errors/git-plugin-error';\n\nexport function timeoutPlugin({block}: Exclude<SimpleGitOptions['timeout'], undefined>): SimpleGitPlugin<'spawn.after'> | void {\n\n if (block > 0) {\n return {\n type: 'spawn.after',\n action(_data, context) {\n let timeout: NodeJS.Timeout;\n\n function wait() {\n timeout && clearTimeout(timeout);\n timeout = setTimeout(kill, block);\n }\n\n function stop() {\n context.spawned.stdout?.off('data', wait);\n context.spawned.stderr?.off('data', wait);\n context.spawned.off('exit', stop);\n context.spawned.off('close', stop);\n }\n\n function kill() {\n stop()\n context.kill(\n new GitPluginError(undefined, 'timeout', `block timeout reached`)\n );\n }\n\n context.spawned.stdout?.on('data', wait);\n context.spawned.stderr?.on('data', wait);\n context.spawned.on('exit', stop);\n context.spawned.on('close', stop);\n\n wait();\n }\n }\n }\n\n}\n", "export * from './command-config-prefixing-plugin';\nexport * from './completion-detection.plugin';\nexport * from './error-detection.plugin';\nexport * from './plugin-store';\nexport * from './progress-monitor-plugin';\nexport * from './simple-git-plugin';\nexport * from './spawn-options-plugin';\nexport * from './timout-plugin';\n", "import debug, { Debugger } from 'debug';\nimport { append, filterHasLength, filterString, filterType, NOOP, objectToString, remove } from './utils';\nimport { Maybe } from './types';\n\ndebug.formatters.L = (value: any) => String(filterHasLength(value) ? value.length : '-');\ndebug.formatters.B = (value: Buffer) => {\n if (Buffer.isBuffer(value)) {\n return value.toString('utf8');\n }\n return objectToString(value);\n}\n\ntype OutputLoggingHandler = (message: string, ...args: any[]) => void;\n\nfunction createLog () {\n return debug('simple-git');\n}\n\nexport interface OutputLogger extends OutputLoggingHandler {\n readonly label: string;\n\n info: OutputLoggingHandler;\n step (nextStep?: string): OutputLogger;\n sibling (name: string): OutputLogger;\n}\n\nfunction prefixedLogger (to: Debugger, prefix: string, forward?: OutputLoggingHandler): OutputLoggingHandler {\n if (!prefix || !String(prefix).replace(/\\s*/, '')) {\n return !forward ? to : (message, ...args) => {\n to(message, ...args);\n forward(message, ...args);\n };\n }\n\n return (message, ...args) => {\n to(`%s ${message}`, prefix, ...args);\n if (forward) {\n forward(message, ...args);\n }\n };\n}\n\nfunction childLoggerName (name: Maybe<string>, childDebugger: Maybe<Debugger>, {namespace: parentNamespace}: Debugger): string {\n if (typeof name === 'string') {\n return name;\n }\n const childNamespace = childDebugger && childDebugger.namespace || '';\n\n if (childNamespace.startsWith(parentNamespace)) {\n return childNamespace.substr(parentNamespace.length + 1);\n }\n\n return childNamespace || parentNamespace;\n}\n\nexport function createLogger (label: string, verbose?: string | Debugger, initialStep?: string, infoDebugger = createLog()): OutputLogger {\n const labelPrefix = label && `[${label}]` || '';\n\n const spawned: OutputLogger[] = [];\n const debugDebugger: Maybe<Debugger> = (typeof verbose === 'string') ? infoDebugger.extend(verbose) : verbose;\n const key = childLoggerName(filterType(verbose, filterString), debugDebugger, infoDebugger);\n\n return step(initialStep);\n\n function sibling(name: string, initial?: string) {\n return append(spawned, createLogger(label, key.replace(/^[^:]+/, name), initial, infoDebugger));\n }\n\n function step(phase?: string) {\n const stepPrefix = phase && `[${phase}]` || '';\n const debug = debugDebugger && prefixedLogger(debugDebugger, stepPrefix) || NOOP;\n const info = prefixedLogger(infoDebugger, `${labelPrefix} ${ stepPrefix}`, debug);\n\n return Object.assign(debugDebugger ? debug : info, {\n label,\n sibling,\n info,\n step,\n });\n }\n}\n\n/**\n * The `GitLogger` is used by the main `SimpleGit` runner to handle logging\n * any warnings or errors.\n */\nexport class GitLogger {\n\n public error: OutputLoggingHandler;\n\n public warn: OutputLoggingHandler\n\n constructor(private _out: Debugger = createLog()) {\n this.error = prefixedLogger(_out, '[ERROR]');\n this.warn = prefixedLogger(_out, '[WARN]');\n }\n\n silent (silence = false) {\n if (silence !== this._out.enabled) {\n return;\n }\n\n const {namespace} = this._out;\n const env = (process.env.DEBUG || '').split(',').filter(s => !!s);\n const hasOn = env.includes(namespace);\n const hasOff = env.includes(`-${namespace}`);\n\n // enabling the log\n if (!silence) {\n if (hasOff) {\n remove(env, `-${namespace}`);\n }\n else {\n env.push(namespace);\n }\n }\n else {\n if (hasOn) {\n remove(env, namespace);\n }\n else {\n env.push(`-${namespace}`);\n }\n }\n\n debug.enable(env.join(','));\n }\n\n}\n", "import { SimpleGitTask } from '../types';\nimport { GitError } from '../errors/git-error';\nimport { createLogger, OutputLogger } from '../git-logger';\n\ntype AnySimpleGitTask = SimpleGitTask<any>;\n\ntype TaskInProgress = {\n name: string;\n logger: OutputLogger;\n task: AnySimpleGitTask;\n}\n\nexport class TasksPendingQueue {\n\n private _queue: Map<AnySimpleGitTask, TaskInProgress> = new Map();\n\n constructor(private logLabel = 'GitExecutor') {\n }\n\n private withProgress(task: AnySimpleGitTask) {\n return this._queue.get(task);\n }\n\n private createProgress (task: AnySimpleGitTask): TaskInProgress {\n const name = TasksPendingQueue.getName(task.commands[0]);\n const logger = createLogger(this.logLabel, name);\n\n return {\n task,\n logger,\n name,\n };\n }\n\n push(task: AnySimpleGitTask): TaskInProgress {\n const progress = this.createProgress(task);\n progress.logger('Adding task to the queue, commands = %o', task.commands);\n\n this._queue.set(task, progress);\n\n return progress;\n }\n\n fatal(err: GitError) {\n for (const [task, {logger}] of Array.from(this._queue.entries())) {\n if (task === err.task) {\n logger.info(`Failed %o`, err);\n logger(`Fatal exception, any as-yet un-started tasks run through this executor will not be attempted`);\n } else {\n logger.info(`A fatal exception occurred in a previous task, the queue has been purged: %o`, err.message);\n }\n\n this.complete(task);\n }\n\n if (this._queue.size !== 0) {\n throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`);\n }\n }\n\n complete(task: AnySimpleGitTask) {\n const progress = this.withProgress(task);\n if (progress) {\n this._queue.delete(task);\n }\n }\n\n attempt(task: AnySimpleGitTask): TaskInProgress {\n const progress = this.withProgress(task);\n if (!progress) {\n throw new GitError(undefined, 'TasksPendingQueue: attempt called for an unknown task');\n }\n progress.logger('Starting task');\n\n return progress;\n }\n\n static getName (name = 'empty') {\n return `task:${name}:${++TasksPendingQueue.counter}`;\n }\n\n private static counter = 0;\n}\n", "import { spawn, SpawnOptions } from 'child_process';\nimport { GitError } from '../errors/git-error';\nimport { OutputLogger } from '../git-logger';\nimport { PluginStore } from '../plugins';\nimport { EmptyTask, isBufferTask, isEmptyTask, } from '../tasks/task';\nimport { GitExecutorResult, Maybe, outputHandler, RunnableTask, SimpleGitExecutor, SimpleGitTask } from '../types';\nimport { callTaskParser, first, GitOutputStreams, objectToString } from '../utils';\nimport { Scheduler } from './scheduler';\nimport { TasksPendingQueue } from './tasks-pending-queue';\n\nexport class GitExecutorChain implements SimpleGitExecutor {\n\n private _chain: Promise<any> = Promise.resolve();\n private _queue = new TasksPendingQueue();\n private _cwd: string | undefined;\n\n public get binary() {\n return this._executor.binary;\n }\n\n public get cwd() {\n return this._cwd || this._executor.cwd;\n }\n\n public set cwd(cwd: string) {\n this._cwd = cwd;\n }\n\n public get env() {\n return this._executor.env;\n }\n\n public get outputHandler() {\n return this._executor.outputHandler;\n }\n\n constructor(\n private _executor: SimpleGitExecutor,\n private _scheduler: Scheduler,\n private _plugins: PluginStore\n ) {\n }\n\n public chain() {\n return this;\n }\n\n public push<R>(task: SimpleGitTask<R>): Promise<R> {\n this._queue.push(task);\n\n return this._chain = this._chain.then(() => this.attemptTask(task));\n }\n\n private async attemptTask<R>(task: SimpleGitTask<R>): Promise<void | R> {\n const onScheduleComplete = await this._scheduler.next();\n const onQueueComplete = () => this._queue.complete(task);\n\n try {\n const {logger} = this._queue.attempt(task);\n return await (isEmptyTask(task)\n ? this.attemptEmptyTask(task, logger)\n : this.attemptRemoteTask(task, logger)\n ) as R;\n } catch (e) {\n throw this.onFatalException(task, e);\n } finally {\n onQueueComplete();\n onScheduleComplete();\n }\n }\n\n private onFatalException<R>(task: SimpleGitTask<R>, e: Error) {\n const gitError = (e instanceof GitError) ? Object.assign(e, {task}) : new GitError(task, e && String(e));\n\n this._chain = Promise.resolve();\n this._queue.fatal(gitError);\n\n return gitError;\n }\n\n private async attemptRemoteTask<R>(task: RunnableTask<R>, logger: OutputLogger) {\n const args = this._plugins.exec('spawn.args', [...task.commands], pluginContext(task, task.commands));\n\n const raw = await this.gitResponse(\n task,\n this.binary, args, this.outputHandler, logger.step('SPAWN'),\n );\n const outputStreams = await this.handleTaskData(task, args, raw, logger.step('HANDLE'));\n\n logger(`passing response to task's parser as a %s`, task.format);\n\n if (isBufferTask(task)) {\n return callTaskParser(task.parser, outputStreams);\n }\n\n return callTaskParser(task.parser, outputStreams.asStrings());\n }\n\n private async attemptEmptyTask(task: EmptyTask, logger: OutputLogger) {\n logger(`empty task bypassing child process to call to task's parser`);\n return task.parser(this);\n }\n\n private handleTaskData<R>(\n task: SimpleGitTask<R>,\n args: string[],\n result: GitExecutorResult, logger: OutputLogger): Promise<GitOutputStreams> {\n\n const {exitCode, rejection, stdOut, stdErr} = result;\n\n return new Promise((done, fail) => {\n logger(`Preparing to handle process response exitCode=%d stdOut=`, exitCode);\n\n const {error} = this._plugins.exec('task.error', {error: rejection}, {\n ...pluginContext(task, args),\n ...result,\n });\n\n if (error && task.onError) {\n logger.info(`exitCode=%s handling with custom error handler`);\n\n return task.onError(\n result,\n error,\n (newStdOut) => {\n logger.info(`custom error handler treated as success`);\n logger(`custom error returned a %s`, objectToString(newStdOut));\n\n done(new GitOutputStreams(\n Array.isArray(newStdOut) ? Buffer.concat(newStdOut) : newStdOut,\n Buffer.concat(stdErr),\n ));\n },\n fail\n );\n }\n\n if (error) {\n logger.info(`handling as error: exitCode=%s stdErr=%s rejection=%o`, exitCode, stdErr.length, rejection);\n return fail(error);\n }\n\n logger.info(`retrieving task output complete`);\n done(new GitOutputStreams(\n Buffer.concat(stdOut),\n Buffer.concat(stdErr),\n ));\n });\n }\n\n private async gitResponse<R>(task: SimpleGitTask<R>, command: string, args: string[], outputHandler: Maybe<outputHandler>, logger: OutputLogger): Promise<GitExecutorResult> {\n const outputLogger = logger.sibling('output');\n const spawnOptions: SpawnOptions = this._plugins.exec('spawn.options', {\n cwd: this.cwd,\n env: this.env,\n windowsHide: true,\n }, pluginContext(task, task.commands));\n\n return new Promise((done) => {\n const stdOut: Buffer[] = [];\n const stdErr: Buffer[] = [];\n\n let rejection: Maybe<Error>;\n\n logger.info(`%s %o`, command, args);\n logger('%O', spawnOptions)\n const spawned = spawn(command, args, spawnOptions);\n\n spawned.stdout!.on('data', onDataReceived(stdOut, 'stdOut', logger, outputLogger.step('stdOut')));\n spawned.stderr!.on('data', onDataReceived(stdErr, 'stdErr', logger, outputLogger.step('stdErr')));\n\n spawned.on('error', onErrorReceived(stdErr, logger));\n\n if (outputHandler) {\n logger(`Passing child process stdOut/stdErr to custom outputHandler`);\n outputHandler(command, spawned.stdout!, spawned.stderr!, [...args]);\n }\n\n this._plugins.exec('spawn.after', undefined, {\n ...pluginContext(task, args),\n spawned,\n close(exitCode: number, reason?: Error) {\n done({\n stdOut,\n stdErr,\n exitCode,\n rejection: rejection || reason,\n });\n },\n kill(reason: Error) {\n if (spawned.killed) {\n return;\n }\n\n rejection = reason;\n spawned.kill('SIGINT');\n },\n });\n });\n }\n\n}\n\nfunction pluginContext<R>(task: SimpleGitTask<R>, commands: string[]) {\n return {\n method: first(task.commands) || '',\n commands,\n }\n}\n\nfunction onErrorReceived(target: Buffer[], logger: OutputLogger) {\n return (err: Error) => {\n logger(`[ERROR] child process exception %o`, err);\n target.push(Buffer.from(String(err.stack), 'ascii'));\n }\n}\n\nfunction onDataReceived(target: Buffer[], name: string, logger: OutputLogger, output: OutputLogger) {\n return (buffer: Buffer) => {\n logger(`%s received %L bytes`, name, buffer);\n output(`%B`, buffer);\n target.push(buffer)\n }\n}\n", "import { PluginStore } from '../plugins';\nimport { GitExecutorEnv, outputHandler, SimpleGitExecutor, SimpleGitTask } from '../types';\n\nimport { GitExecutorChain } from './git-executor-chain';\nimport { Scheduler } from './scheduler';\n\nexport class GitExecutor implements SimpleGitExecutor {\n\n private _chain = new GitExecutorChain(this, this._scheduler, this._plugins);\n\n public env: GitExecutorEnv;\n public outputHandler?: outputHandler;\n\n constructor(\n public binary: string = 'git',\n public cwd: string,\n private _scheduler: Scheduler,\n private _plugins: PluginStore,\n ) {\n }\n\n chain(): SimpleGitExecutor {\n return new GitExecutorChain(this, this._scheduler, this._plugins);\n }\n\n push<R>(task: SimpleGitTask<R>): Promise<R> {\n return this._chain.push(task);\n }\n\n}\n\n\n", "import { GitError } from './errors/git-error';\nimport { GitResponseError } from './errors/git-response-error';\nimport { SimpleGitTask, SimpleGitTaskCallback } from './types';\nimport { NOOP } from './utils';\n\nexport function taskCallback<R>(task: SimpleGitTask<R>, response: Promise<R>, callback: SimpleGitTaskCallback<R> = NOOP) {\n\n const onSuccess = (data: R) => {\n callback(null, data);\n };\n\n const onError = (err: GitError | GitResponseError) => {\n if (err?.task === task) {\n callback((err instanceof GitResponseError) ? addDeprecationNoticeToError(err) : err, undefined as any);\n }\n };\n\n response.then(onSuccess, onError);\n\n}\n\nfunction addDeprecationNoticeToError (err: GitResponseError) {\n let log = (name: string) => {\n console.warn(`simple-git deprecation notice: accessing GitResponseError.${name} should be GitResponseError.git.${name}, this will no longer be available in version 3`);\n log = NOOP;\n };\n\n return Object.create(err, Object.getOwnPropertyNames(err.git).reduce(descriptorReducer, {}));\n\n function descriptorReducer(all: PropertyDescriptorMap, name: string): typeof all {\n if (name in err) {\n return all;\n }\n\n all[name] = {\n enumerable: false,\n configurable: false,\n get () {\n log(name);\n return err.git[name];\n },\n };\n\n return all;\n }\n}\n", "import { folderExists } from '../utils';\nimport { SimpleGitExecutor } from '../types';\nimport { adhocExecTask } from './task';\n\nexport function changeWorkingDirectoryTask (directory: string, root?: SimpleGitExecutor) {\n return adhocExecTask((instance: SimpleGitExecutor) => {\n if (!folderExists(directory)) {\n throw new Error(`Git.cwd: cannot change to non-directory \"${ directory }\"`);\n }\n\n return ((root || instance).cwd = directory);\n });\n}\n", "import { straightThroughStringTask } from './task';\nimport { StringTask } from '../types';\n\n/**\n * Task used by `git.hashObject`\n */\nexport function hashObjectTask(filePath: string, write: boolean): StringTask<string> {\n const commands = ['hash-object', filePath];\n if (write) {\n commands.push('-w');\n }\n\n return straightThroughStringTask(commands, true);\n}\n", "import { InitResult } from '../../../typings';\n\nexport class InitSummary implements InitResult {\n constructor(\n public readonly bare: boolean,\n public readonly path: string,\n public readonly existing: boolean,\n public readonly gitDir: string,\n ) {}\n}\n\nconst initResponseRegex = /^Init.+ repository in (.+)$/;\nconst reInitResponseRegex = /^Rein.+ in (.+)$/;\n\nexport function parseInit(bare: boolean, path: string, text: string) {\n const response = String(text).trim();\n let result;\n\n if ((result = initResponseRegex.exec(response))) {\n return new InitSummary(bare, path, false, result[1]);\n }\n\n if ((result = reInitResponseRegex.exec(response))) {\n return new InitSummary(bare, path, true, result[1]);\n }\n\n let gitDir = '';\n const tokens = response.split(' ');\n while (tokens.length) {\n const token = tokens.shift();\n if (token === 'in') {\n gitDir = tokens.join(' ');\n break;\n }\n }\n\n return new InitSummary(bare, path, /^re/i.test(response), gitDir);\n}\n", "import { InitResult } from '../../../typings';\nimport { parseInit } from '../responses/InitSummary';\nimport { StringTask } from '../types';\n\nconst bareCommand = '--bare';\n\nfunction hasBareCommand(command: string[]) {\n return command.includes(bareCommand);\n}\n\nexport function initTask(bare = false, path: string, customArgs: string[]): StringTask<InitResult> {\n const commands = ['init', ...customArgs];\n if (bare && !hasBareCommand(commands)) {\n commands.splice(1, 0, bareCommand);\n }\n\n return {\n commands,\n format: 'utf-8',\n parser(text: string): InitResult {\n return parseInit(commands.includes('--bare'), path, text);\n }\n }\n}\n", "import { DiffResult, DiffResultBinaryFile, DiffResultTextFile } from '../../../typings';\n\n/***\n * The DiffSummary is returned as a response to getting `git().status()`\n */\nexport class DiffSummary implements DiffResult {\n changed = 0\n deletions = 0;\n insertions = 0;\n\n files: Array<DiffResultTextFile | DiffResultBinaryFile> = [];\n}\n", "import { DiffResult } from '../../../typings';\nimport { DiffSummary } from '../responses/DiffSummary';\n\nexport function parseDiffResult(stdOut: string): DiffResult {\n const lines = stdOut.trim().split('\\n');\n const status = new DiffSummary();\n readSummaryLine(status, lines.pop());\n\n for (let i = 0, max = lines.length; i < max; i++) {\n const line = lines[i];\n textFileChange(line, status) || binaryFileChange(line, status);\n }\n\n return status;\n}\n\nfunction readSummaryLine(status: DiffResult, summary?: string) {\n (summary || '')\n .trim()\n .split(', ')\n .forEach(function (text: string) {\n const summary = /(\\d+)\\s([a-z]+)/.exec(text);\n if (!summary) {\n return;\n }\n\n summaryType(status, summary[2], parseInt(summary[1], 10));\n });\n}\n\nfunction summaryType (status: DiffResult, key: string, value: number) {\n const match = (/([a-z]+?)s?\\b/.exec(key));\n if (!match || !statusUpdate[match[1]]) {\n return;\n }\n\n statusUpdate[match[1]](status, value);\n}\n\nconst statusUpdate: {[key: string]: (status: DiffResult, value: number) => void} = {\n file (status, value) {\n status.changed = value;\n },\n deletion (status, value) {\n status.deletions = value;\n },\n insertion (status, value) {\n status.insertions = value;\n }\n}\n\nfunction textFileChange(input: string, {files}: DiffResult) {\n const line = input.trim().match(/^(.+)\\s+\\|\\s+(\\d+)(\\s+[+\\-]+)?$/);\n\n if (line) {\n var alterations = (line[3] || '').trim();\n files.push({\n file: line[1].trim(),\n changes: parseInt(line[2], 10),\n insertions: alterations.replace(/-/g, '').length,\n deletions: alterations.replace(/\\+/g, '').length,\n binary: false\n });\n\n return true;\n }\n\n return false\n}\n\nfunction binaryFileChange(input: string, {files}: DiffResult) {\n const line = input.match(/^(.+) \\|\\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)$/);\n if (line) {\n files.push({\n file: line[1].trim(),\n before: +line[2],\n after: +line[3],\n binary: true\n });\n return true;\n }\n return false;\n}\n", "import { ListLogLine, LogResult } from '../../../typings';\nimport { toLinesWithContent } from '../utils';\nimport { parseDiffResult } from './parse-diff-summary';\n\nexport const START_BOUNDARY = '\u00F2\u00F2\u00F2\u00F2\u00F2\u00F2 ';\n\nexport const COMMIT_BOUNDARY = ' \u00F2\u00F2';\n\nexport const SPLITTER = ' \u00F2 ';\n\nconst defaultFieldNames = ['hash', 'date', 'message', 'refs', 'author_name', 'author_email'];\n\nfunction lineBuilder(tokens: string[], fields: string[]): any {\n return fields.reduce((line, field, index) => {\n line[field] = tokens[index] || '';\n return line;\n }, Object.create({diff: null}) as any);\n}\n\nexport function createListLogSummaryParser<T = any> (splitter = SPLITTER, fields = defaultFieldNames) {\n return function (stdOut: string): LogResult<T> {\n const all: ReadonlyArray<T & ListLogLine> = toLinesWithContent(stdOut, true, START_BOUNDARY)\n .map(function (item) {\n const lineDetail = item.trim().split(COMMIT_BOUNDARY);\n const listLogLine: T & ListLogLine = lineBuilder(lineDetail[0].trim().split(splitter), fields);\n\n if (lineDetail.length > 1 && !!lineDetail[1].trim()) {\n listLogLine.diff = parseDiffResult(lineDetail[1]);\n }\n\n return listLogLine;\n });\n\n return {\n all,\n latest: all.length && all[0] || null,\n total: all.length,\n };\n }\n}\n", "import { Options, StringTask } from '../types';\nimport { LogResult, SimpleGit } from '../../../typings';\nimport {\n COMMIT_BOUNDARY,\n createListLogSummaryParser,\n SPLITTER,\n START_BOUNDARY\n} from '../parsers/parse-list-log-summary';\nimport {\n appendTaskOptions,\n filterArray,\n filterString,\n filterType,\n trailingFunctionArgument,\n trailingOptionsArgument\n} from '../utils';\nimport { SimpleGitApi } from '../simple-git-api';\nimport { configurationErrorTask } from './task';\n\nenum excludeOptions {\n '--pretty',\n 'max-count',\n 'maxCount',\n 'n',\n 'file',\n 'format',\n 'from',\n 'to',\n 'splitter',\n 'symmetric',\n 'mailMap',\n 'multiLine',\n 'strictDate',\n}\n\nexport interface DefaultLogFields {\n hash: string;\n date: string;\n message: string;\n refs: string;\n body: string;\n author_name: string;\n author_email: string;\n}\n\nexport type LogOptions<T = DefaultLogFields> = {\n file?: string;\n format?: T;\n from?: string;\n mailMap?: boolean;\n maxCount?: number;\n multiLine?: boolean;\n splitter?: string;\n strictDate?: boolean;\n symmetric?: boolean;\n to?: string;\n};\n\ninterface ParsedLogOptions {\n fields: string[];\n splitter: string;\n commands: string[]\n}\n\nfunction prettyFormat(format: { [key: string]: string | unknown }, splitter: string): [string[], string] {\n const fields: string[] = [];\n const formatStr: string[] = [];\n\n Object.keys(format).forEach((field) => {\n fields.push(field);\n formatStr.push(String(format[field]));\n });\n\n return [\n fields, formatStr.join(splitter)\n ];\n}\n\nfunction userOptions<T>(input: T): Exclude<Omit<T, keyof typeof excludeOptions>, undefined> {\n const output = {...input};\n Object.keys(input).forEach(key => {\n if (key in excludeOptions) {\n delete output[key as keyof T];\n }\n });\n return output;\n}\n\nexport function parseLogOptions<T extends Options>(opt: LogOptions<T> = {}, customArgs: string[] = []): ParsedLogOptions {\n const splitter = opt.splitter || SPLITTER;\n const format = opt.format || {\n hash: '%H',\n date: opt.strictDate === false ? '%ai' : '%aI',\n message: '%s',\n refs: '%D',\n body: opt.multiLine ? '%B' : '%b',\n author_name: opt.mailMap !== false ? '%aN' : '%an',\n author_email: opt.mailMap !== false ? '%aE' : '%ae'\n };\n\n const [fields, formatStr] = prettyFormat(format, splitter);\n\n const suffix: string[] = [];\n const command: string[] = [\n `--pretty=format:${START_BOUNDARY}${formatStr}${COMMIT_BOUNDARY}`,\n ...customArgs,\n ];\n\n const maxCount: number | undefined = (opt as any).n || (opt as any)['max-count'] || opt.maxCount;\n if (maxCount) {\n command.push(`--max-count=${maxCount}`);\n }\n\n if (opt.from && opt.to) {\n const rangeOperator = (opt.symmetric !== false) ? '...' : '..';\n suffix.push(`${opt.from}${rangeOperator}${opt.to}`);\n }\n\n if (opt.file) {\n suffix.push('--follow', opt.file);\n }\n\n appendTaskOptions(userOptions(opt), command);\n\n return {\n fields,\n splitter,\n commands: [\n ...command,\n ...suffix,\n ],\n };\n}\n\nexport function logTask<T>(splitter: string, fields: string[], customArgs: string[]): StringTask<LogResult<T>> {\n return {\n commands: ['log', ...customArgs],\n format: 'utf-8',\n parser: createListLogSummaryParser(splitter, fields),\n };\n}\n\nexport default function (): Pick<SimpleGit, 'log'> {\n return {\n log<T extends Options>(this: SimpleGitApi, ...rest: unknown[]) {\n const next = trailingFunctionArgument(arguments);\n const task = rejectDeprecatedSignatures(...rest) ||\n createLogTask(parseLogOptions<T>(trailingOptionsArgument(arguments), filterType(arguments[0], filterArray)))\n\n return this._runTask(task, next);\n }\n }\n\n function createLogTask(options: ParsedLogOptions) {\n return logTask(options.splitter, options.fields, options.commands);\n }\n\n function rejectDeprecatedSignatures(from?: unknown, to?: unknown) {\n return (\n filterString(from) &&\n filterString(to) &&\n configurationErrorTask(`git.log(string, string) should be replaced with git.log({ from: string, to: string })`)\n );\n }\n}\n", "import { MergeConflict, MergeConflictDeletion, MergeDetail, MergeResultStatus } from '../../../typings';\n\nexport class MergeSummaryConflict implements MergeConflict {\n constructor(\n public readonly reason: string,\n public readonly file: string | null = null,\n public readonly meta?: MergeConflictDeletion,\n ) {\n }\n\n toString() {\n return `${this.file}:${this.reason}`;\n }\n}\n\nexport class MergeSummaryDetail implements MergeDetail {\n public conflicts: MergeConflict[] = [];\n public merges: string[] = [];\n public result: MergeResultStatus = 'success';\n\n get failed() {\n return this.conflicts.length > 0;\n }\n\n get reason() {\n return this.result;\n }\n\n toString() {\n if (this.conflicts.length) {\n return `CONFLICTS: ${this.conflicts.join(', ')}`;\n }\n\n return 'OK';\n }\n}\n\n", "import { PullDetailFileChanges, PullDetailSummary, PullFailedResult, PullResult } from '../../../typings';\n\nexport class PullSummary implements PullResult {\n public remoteMessages = {\n all: [],\n };\n public created = [];\n public deleted: string[] = [];\n public files: string[] = [];\n public deletions: PullDetailFileChanges = {};\n public insertions: PullDetailFileChanges = {};\n public summary: PullDetailSummary = {\n changes: 0,\n deletions: 0,\n insertions: 0,\n };\n}\n\nexport class PullFailedSummary implements PullFailedResult {\n remote = '';\n hash = {\n local: '',\n remote: '',\n };\n branch = {\n local: '',\n remote: '',\n };\n message = '';\n\n toString() {\n return this.message;\n }\n}\n\n", "import { RemoteMessageResult, RemoteMessages, RemoteMessagesObjectEnumeration } from '../../../typings';\nimport { asNumber, RemoteLineParser } from '../utils';\n\nfunction objectEnumerationResult<T extends RemoteMessages = RemoteMessages>(remoteMessages: T): RemoteMessagesObjectEnumeration {\n return (remoteMessages.objects = remoteMessages.objects || {\n compressing: 0,\n counting: 0,\n enumerating: 0,\n packReused: 0,\n reused: {count: 0, delta: 0},\n total: {count: 0, delta: 0}\n });\n}\n\nfunction asObjectCount(source: string) {\n const count = /^\\s*(\\d+)/.exec(source);\n const delta = /delta (\\d+)/i.exec(source);\n\n return {\n count: asNumber(count && count[1] || '0'),\n delta: asNumber(delta && delta[1] || '0'),\n };\n}\n\nexport const remoteMessagesObjectParsers: RemoteLineParser<RemoteMessageResult<RemoteMessages>>[] = [\n new RemoteLineParser(/^remote:\\s*(enumerating|counting|compressing) objects: (\\d+),/i, (result, [action, count]) => {\n const key = action.toLowerCase();\n const enumeration = objectEnumerationResult(result.remoteMessages);\n\n Object.assign(enumeration, {[key]: asNumber(count)});\n }),\n new RemoteLineParser(/^remote:\\s*(enumerating|counting|compressing) objects: \\d+% \\(\\d+\\/(\\d+)\\),/i, (result, [action, count]) => {\n const key = action.toLowerCase();\n const enumeration = objectEnumerationResult(result.remoteMessages);\n\n Object.assign(enumeration, {[key]: asNumber(count)});\n }),\n new RemoteLineParser(/total ([^,]+), reused ([^,]+), pack-reused (\\d+)/i, (result, [total, reused, packReused]) => {\n const objects = objectEnumerationResult(result.remoteMessages);\n objects.total = asObjectCount(total);\n objects.reused = asObjectCount(reused);\n objects.packReused = asNumber(packReused);\n }),\n];\n", "import { PushResultRemoteMessages, RemoteMessageResult, RemoteMessages } from '../../../typings';\nimport { asNumber, parseStringResponse, RemoteLineParser } from '../utils';\nimport { remoteMessagesObjectParsers } from './parse-remote-objects';\n\nconst parsers: RemoteLineParser<RemoteMessageResult<PushResultRemoteMessages | RemoteMessages>>[] = [\n new RemoteLineParser(/^remote:\\s*(.+)$/, (result, [text]) => {\n result.remoteMessages.all.push(text.trim());\n return false;\n }),\n ...remoteMessagesObjectParsers,\n new RemoteLineParser([/create a (?:pull|merge) request/i, /\\s(https?:\\/\\/\\S+)$/], (result, [pullRequestUrl]) => {\n (result.remoteMessages as PushResultRemoteMessages).pullRequestUrl = pullRequestUrl;\n }),\n new RemoteLineParser([/found (\\d+) vulnerabilities.+\\(([^)]+)\\)/i, /\\s(https?:\\/\\/\\S+)$/], (result, [count, summary, url]) => {\n (result.remoteMessages as PushResultRemoteMessages).vulnerabilities = {\n count: asNumber(count),\n summary,\n url,\n };\n }),\n];\n\nexport function parseRemoteMessages<T extends RemoteMessages = RemoteMessages>(\n _stdOut: string, stdErr: string,\n): RemoteMessageResult {\n return parseStringResponse({remoteMessages: new RemoteMessageSummary() as T}, parsers, stdErr);\n}\n\nexport class RemoteMessageSummary implements RemoteMessages {\n public readonly all: string[] = [];\n}\n", "import { PullDetail, PullFailedResult, PullResult, RemoteMessages } from '../../../typings';\nimport { PullFailedSummary, PullSummary } from '../responses/PullSummary';\nimport { TaskParser } from '../types';\nimport { append, LineParser, parseStringResponse } from '../utils';\nimport { parseRemoteMessages } from './parse-remote-messages';\n\nconst FILE_UPDATE_REGEX = /^\\s*(.+?)\\s+\\|\\s+\\d+\\s*(\\+*)(-*)/;\nconst SUMMARY_REGEX = /(\\d+)\\D+((\\d+)\\D+\\(\\+\\))?(\\D+(\\d+)\\D+\\(-\\))?/;\nconst ACTION_REGEX = /^(create|delete) mode \\d+ (.+)/;\n\nconst parsers: LineParser<PullResult>[] = [\n new LineParser(FILE_UPDATE_REGEX, (result, [file, insertions, deletions]) => {\n result.files.push(file);\n\n if (insertions) {\n result.insertions[file] = insertions.length;\n }\n\n if (deletions) {\n result.deletions[file] = deletions.length;\n }\n }),\n new LineParser(SUMMARY_REGEX, (result, [changes, , insertions, , deletions]) => {\n if (insertions !== undefined || deletions !== undefined) {\n result.summary.changes = +changes || 0;\n result.summary.insertions = +insertions || 0;\n result.summary.deletions = +deletions || 0;\n return true;\n }\n return false;\n }),\n new LineParser(ACTION_REGEX, (result, [action, file]) => {\n append(result.files, file);\n append((action === 'create') ? result.created : result.deleted, file);\n }),\n];\n\nconst errorParsers: LineParser<PullFailedResult>[] = [\n new LineParser(/^from\\s(.+)$/i, (result, [remote]) => void (result.remote = remote)),\n new LineParser(/^fatal:\\s(.+)$/, (result, [message]) => void (result.message = message)),\n new LineParser(/([a-z0-9]+)\\.\\.([a-z0-9]+)\\s+(\\S+)\\s+->\\s+(\\S+)$/, (result, [hashLocal, hashRemote, branchLocal, branchRemote]) => {\n result.branch.local = branchLocal;\n result.hash.local = hashLocal;\n result.branch.remote = branchRemote;\n result.hash.remote = hashRemote;\n }),\n];\n\nexport const parsePullDetail: TaskParser<string, PullDetail> = (stdOut, stdErr) => {\n return parseStringResponse(new PullSummary(), parsers, stdOut, stdErr);\n}\n\nexport const parsePullResult: TaskParser<string, PullResult> = (stdOut, stdErr) => {\n return Object.assign(\n new PullSummary(),\n parsePullDetail(stdOut, stdErr),\n parseRemoteMessages<RemoteMessages>(stdOut, stdErr),\n );\n}\n\nexport function parsePullErrorResult(stdOut: string, stdErr: string) {\n const pullError = parseStringResponse(new PullFailedSummary(), errorParsers, stdOut, stdErr);\n\n return pullError.message && pullError;\n}\n", "import { MergeDetail, MergeResult } from '../../../typings';\nimport { MergeSummaryConflict, MergeSummaryDetail } from '../responses/MergeSummary';\nimport { TaskParser } from '../types';\nimport { LineParser, parseStringResponse } from '../utils';\nimport { parsePullResult } from './parse-pull';\n\nconst parsers: LineParser<MergeDetail>[] = [\n new LineParser(/^Auto-merging\\s+(.+)$/, (summary, [autoMerge]) => {\n summary.merges.push(autoMerge);\n }),\n new LineParser(/^CONFLICT\\s+\\((.+)\\): Merge conflict in (.+)$/, (summary, [reason, file]) => {\n summary.conflicts.push(new MergeSummaryConflict(reason, file));\n }),\n new LineParser(/^CONFLICT\\s+\\((.+\\/delete)\\): (.+) deleted in (.+) and/, (summary, [reason, file, deleteRef]) => {\n summary.conflicts.push(new MergeSummaryConflict(reason, file, {deleteRef}));\n }),\n new LineParser(/^CONFLICT\\s+\\((.+)\\):/, (summary, [reason]) => {\n summary.conflicts.push(new MergeSummaryConflict(reason, null));\n }),\n new LineParser(/^Automatic merge failed;\\s+(.+)$/, (summary, [result]) => {\n summary.result = result;\n }),\n];\n\n/**\n * Parse the complete response from `git.merge`\n */\nexport const parseMergeResult: TaskParser<string, MergeResult> = (stdOut, stdErr) => {\n return Object.assign(\n parseMergeDetail(stdOut, stdErr),\n parsePullResult(stdOut, stdErr),\n );\n};\n\n/**\n * Parse the merge specific detail (ie: not the content also available in the pull detail) from `git.mnerge`\n * @param stdOut\n */\nexport const parseMergeDetail: TaskParser<string, MergeDetail> = (stdOut) => {\n return parseStringResponse(new MergeSummaryDetail(), parsers, stdOut);\n}\n", "import { MergeResult } from '../../../typings';\nimport { GitResponseError } from '../errors/git-response-error';\nimport { parseMergeResult } from '../parsers/parse-merge';\nimport { StringTask } from '../types';\nimport { configurationErrorTask, EmptyTask } from './task';\n\nexport function mergeTask(customArgs: string[]): EmptyTask | StringTask<MergeResult> {\n if (!customArgs.length) {\n return configurationErrorTask('Git.merge requires at least one option');\n }\n\n return {\n commands: ['merge', ...customArgs],\n format: 'utf-8',\n parser(stdOut, stdErr): MergeResult {\n const merge = parseMergeResult(stdOut, stdErr);\n if (merge.failed) {\n throw new GitResponseError(merge);\n }\n\n return merge;\n }\n }\n}\n", "import { PushDetail, PushResult, PushResultPushedItem, PushResultRemoteMessages } from '../../../typings';\nimport { TaskParser } from '../types';\nimport { LineParser, parseStringResponse } from '../utils';\nimport { parseRemoteMessages } from './parse-remote-messages';\n\nfunction pushResultPushedItem(local: string, remote: string, status: string): PushResultPushedItem {\n const deleted = status.includes('deleted');\n const tag = status.includes('tag') || /^refs\\/tags/.test(local);\n const alreadyUpdated = !status.includes('new');\n\n return {\n deleted,\n tag,\n branch: !tag,\n new: !alreadyUpdated,\n alreadyUpdated,\n local,\n remote,\n };\n}\n\nconst parsers: LineParser<PushDetail>[] = [\n new LineParser(/^Pushing to (.+)$/, (result, [repo]) => {\n result.repo = repo;\n }),\n new LineParser(/^updating local tracking ref '(.+)'/, (result, [local]) => {\n result.ref = {\n ...(result.ref || {}),\n local,\n }\n }),\n new LineParser(/^[*-=]\\s+([^:]+):(\\S+)\\s+\\[(.+)]$/, (result, [local, remote, type]) => {\n result.pushed.push(pushResultPushedItem(local, remote, type));\n }),\n new LineParser(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/, (result, [local, remote, remoteName]) => {\n result.branch = {\n ...(result.branch || {}),\n local,\n remote,\n remoteName,\n };\n }),\n new LineParser(/^([^:]+):(\\S+)\\s+([a-z0-9]+)\\.\\.([a-z0-9]+)$/, (result, [local, remote, from, to]) => {\n result.update = {\n head: {\n local,\n remote,\n },\n hash: {\n from,\n to,\n },\n };\n }),\n];\n\nexport const parsePushResult: TaskParser<string, PushResult> = (stdOut, stdErr) => {\n const pushDetail = parsePushDetail(stdOut, stdErr);\n const responseDetail = parseRemoteMessages<PushResultRemoteMessages>(stdOut, stdErr);\n\n return {\n ...pushDetail,\n ...responseDetail,\n };\n}\n\nexport const parsePushDetail: TaskParser<string, PushDetail> = (stdOut, stdErr) => {\n return parseStringResponse({pushed: []}, parsers, stdOut, stdErr);\n}\n", "import { PushResult } from '../../../typings';\nimport { parsePushResult as parser } from '../parsers/parse-push';\nimport { StringTask } from '../types';\nimport { append, remove } from '../utils';\n\ntype PushRef = { remote?: string, branch?: string };\n\nexport function pushTagsTask(ref: PushRef = {}, customArgs: string[]): StringTask<PushResult> {\n append(customArgs, '--tags');\n return pushTask(ref, customArgs);\n}\n\nexport function pushTask(ref: PushRef = {}, customArgs: string[]): StringTask<PushResult> {\n const commands = ['push', ...customArgs];\n if (ref.branch) {\n commands.splice(1, 0, ref.branch);\n }\n if (ref.remote) {\n commands.splice(1, 0, ref.remote);\n }\n\n remove(commands, '-v');\n append(commands, '--verbose');\n append(commands, '--porcelain');\n\n return {\n commands,\n format: 'utf-8',\n parser,\n };\n}\n", "import { FileStatusResult } from '../../../typings/response';\n\nexport const fromPathRegex = /^(.+) -> (.+)$/;\n\nexport class FileStatusSummary implements FileStatusResult {\n\n public readonly from: string | undefined;\n\n constructor (\n public path: string,\n public index: string,\n public working_dir: string) {\n\n if ('R' === (index + working_dir)) {\n const detail = fromPathRegex.exec(path) || [null, path, path];\n this.from = detail[1] || '';\n this.path = detail[2] || '';\n }\n }\n}\n", "import { StatusResult } from '../../../typings';\nimport { append } from '../utils';\nimport { FileStatusSummary } from './FileStatusSummary';\n\ntype StatusLineParser = (result: StatusResult, file: string) => void;\n\nexport class StatusSummary implements StatusResult {\n public not_added = [];\n public conflicted = [];\n public created = [];\n public deleted = [];\n public ignored = undefined;\n public modified = [];\n public renamed = [];\n public files = [];\n public staged = [];\n public ahead = 0;\n public behind = 0;\n public current = null;\n public tracking = null;\n public detached = false;\n\n public isClean(): boolean {\n return !this.files.length;\n }\n}\n\nenum PorcelainFileStatus {\n ADDED = 'A',\n DELETED = 'D',\n MODIFIED = 'M',\n RENAMED = 'R',\n COPIED = 'C',\n UNMERGED = 'U',\n UNTRACKED = '?',\n IGNORED = '!',\n NONE = ' ',\n}\n\nfunction renamedFile(line: string) {\n const detail = /^(.+) -> (.+)$/.exec(line);\n\n if (!detail) {\n return {\n from: line, to: line\n };\n }\n\n return {\n from: String(detail[1]),\n to: String(detail[2]),\n };\n}\n\nfunction parser(indexX: PorcelainFileStatus, indexY: PorcelainFileStatus, handler: StatusLineParser): [string, StatusLineParser] {\n return [`${indexX}${indexY}`, handler];\n}\n\nfunction conflicts(indexX: PorcelainFileStatus, ...indexY: PorcelainFileStatus[]) {\n return indexY.map(y => parser(indexX, y, (result, file) => append(result.conflicted, file)));\n}\n\nconst parsers: Map<string, StatusLineParser> = new Map([\n parser(PorcelainFileStatus.NONE, PorcelainFileStatus.ADDED, (result, file) => append(result.created, file)),\n parser(PorcelainFileStatus.NONE, PorcelainFileStatus.DELETED, (result, file) => append(result.deleted, file)),\n parser(PorcelainFileStatus.NONE, PorcelainFileStatus.MODIFIED, (result, file) => append(result.modified, file)),\n\n parser(PorcelainFileStatus.ADDED, PorcelainFileStatus.NONE, (result, file) => append(result.created, file) && append(result.staged, file)),\n parser(PorcelainFileStatus.ADDED, PorcelainFileStatus.MODIFIED, (result, file) =>\n append(result.created, file) && append(result.staged, file) && append(result.modified, file)),\n\n parser(PorcelainFileStatus.DELETED, PorcelainFileStatus.NONE, (result, file) => append(result.deleted, file) && append(result.staged, file)),\n\n parser(PorcelainFileStatus.MODIFIED, PorcelainFileStatus.NONE, (result, file) => append(result.modified, file) && append(result.staged, file)),\n parser(PorcelainFileStatus.MODIFIED, PorcelainFileStatus.MODIFIED, (result, file) => append(result.modified, file) && append(result.staged, file)),\n\n parser(PorcelainFileStatus.RENAMED, PorcelainFileStatus.NONE, (result, file) => {\n append(result.renamed, renamedFile(file));\n }),\n parser(PorcelainFileStatus.RENAMED, PorcelainFileStatus.MODIFIED, (result, file) => {\n const renamed = renamedFile(file);\n append(result.renamed, renamed);\n append(result.modified, renamed.to);\n }),\n parser(PorcelainFileStatus.IGNORED, PorcelainFileStatus.IGNORED, (_result, _file) => {\n append((_result.ignored = _result.ignored || []), _file);\n }),\n\n parser(PorcelainFileStatus.UNTRACKED, PorcelainFileStatus.UNTRACKED, (result, file) => append(result.not_added, file)),\n\n ...conflicts(PorcelainFileStatus.ADDED, PorcelainFileStatus.ADDED, PorcelainFileStatus.UNMERGED),\n ...conflicts(PorcelainFileStatus.DELETED, PorcelainFileStatus.DELETED, PorcelainFileStatus.UNMERGED),\n ...conflicts(PorcelainFileStatus.UNMERGED, PorcelainFileStatus.ADDED, PorcelainFileStatus.DELETED, PorcelainFileStatus.UNMERGED),\n\n ['##', (result, line) => {\n const aheadReg = /ahead (\\d+)/;\n const behindReg = /behind (\\d+)/;\n const currentReg = /^(.+?(?=(?:\\.{3}|\\s|$)))/;\n const trackingReg = /\\.{3}(\\S*)/;\n const onEmptyBranchReg = /\\son\\s([\\S]+)$/;\n let regexResult;\n\n regexResult = aheadReg.exec(line);\n result.ahead = regexResult && +regexResult[1] || 0;\n\n regexResult = behindReg.exec(line);\n result.behind = regexResult && +regexResult[1] || 0;\n\n regexResult = currentReg.exec(line);\n result.current = regexResult && regexResult[1];\n\n regexResult = trackingReg.exec(line);\n result.tracking = regexResult && regexResult[1];\n\n regexResult = onEmptyBranchReg.exec(line);\n result.current = regexResult && regexResult[1] || result.current;\n\n result.detached = /\\(no branch\\)/.test(line);\n }]\n]);\n\nexport const parseStatusSummary = function (text: string): StatusResult {\n const lines = text.trim().split('\\n');\n const status = new StatusSummary();\n\n for (let i = 0, l = lines.length; i < l; i++) {\n splitLine(status, lines[i]);\n }\n\n return status;\n};\n\nfunction splitLine(result: StatusResult, lineStr: string) {\n const trimmed = lineStr.trim();\n switch (' ') {\n case trimmed.charAt(2):\n return data(trimmed.charAt(0), trimmed.charAt(1), trimmed.substr(3));\n case trimmed.charAt(1):\n return data(PorcelainFileStatus.NONE, trimmed.charAt(0), trimmed.substr(2));\n default:\n return;\n }\n\n function data(index: string, workingDir: string, path: string) {\n const raw = `${index}${workingDir}`;\n const handler = parsers.get(raw);\n\n if (handler) {\n handler(result, path);\n }\n\n if (raw !== '##' && raw !== '!!') {\n result.files.push(new FileStatusSummary(path, index, workingDir));\n }\n }\n}\n", "import { StatusResult } from '../../../typings';\nimport { parseStatusSummary } from '../responses/StatusSummary';\nimport { StringTask } from '../types';\n\nexport function statusTask(customArgs: string[]): StringTask<StatusResult> {\n return {\n format: 'utf-8',\n commands: ['status', '--porcelain', '-b', '-u', ...customArgs],\n parser(text: string) {\n return parseStatusSummary(text);\n }\n }\n}\n", "import { SimpleGitBase } from '../../typings';\nimport { taskCallback } from './task-callback';\nimport { changeWorkingDirectoryTask } from './tasks/change-working-directory';\nimport config from './tasks/config';\nimport grep from './tasks/grep';\nimport { hashObjectTask } from './tasks/hash-object';\nimport { initTask } from './tasks/init';\nimport log from './tasks/log';\nimport { mergeTask } from './tasks/merge';\nimport { pushTask } from './tasks/push';\nimport { statusTask } from './tasks/status';\nimport { configurationErrorTask, straightThroughStringTask } from './tasks/task';\nimport { outputHandler, SimpleGitExecutor, SimpleGitTask, SimpleGitTaskCallback } from './types';\nimport { asArray, filterString, filterType, getTrailingOptions, trailingFunctionArgument } from './utils';\n\nexport class SimpleGitApi implements SimpleGitBase {\n\n constructor(private _executor: SimpleGitExecutor) {\n }\n\n protected _runTask<T>(task: SimpleGitTask<T>, then?: SimpleGitTaskCallback<T>) {\n const chain = this._executor.chain();\n const promise = chain.push(task);\n\n if (then) {\n taskCallback(task, promise, then);\n }\n\n return Object.create(this, {\n then: {value: promise.then.bind(promise)},\n catch: {value: promise.catch.bind(promise)},\n _executor: {value: chain},\n });\n }\n\n add(files: string | string[]) {\n return this._runTask(\n straightThroughStringTask(['add', ...asArray(files)]),\n trailingFunctionArgument(arguments),\n );\n }\n\n cwd(directory: string | { path: string, root?: boolean }) {\n const next = trailingFunctionArgument(arguments);\n\n if (typeof directory === 'string') {\n return this._runTask(changeWorkingDirectoryTask(directory, this._executor), next);\n }\n\n if (typeof directory?.path === 'string') {\n return this._runTask(changeWorkingDirectoryTask(directory.path, directory.root && this._executor || undefined), next);\n }\n\n return this._runTask(\n configurationErrorTask('Git.cwd: workingDirectory must be supplied as a string'),\n next\n );\n }\n\n hashObject(path: string, write: boolean | unknown) {\n return this._runTask(\n hashObjectTask(path, write === true),\n trailingFunctionArgument(arguments),\n );\n }\n\n init(bare?: boolean | unknown) {\n return this._runTask(\n initTask(bare === true, this._executor.cwd, getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments),\n );\n }\n\n merge() {\n return this._runTask(\n mergeTask(getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments),\n );\n }\n\n mergeFromTo(remote: string, branch: string) {\n if (!(filterString(remote) && filterString(branch))) {\n return this._runTask(configurationErrorTask(\n `Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings`\n ));\n }\n\n return this._runTask(\n mergeTask([remote, branch, ...getTrailingOptions(arguments)]),\n trailingFunctionArgument(arguments, false),\n );\n }\n\n outputHandler(handler: outputHandler) {\n this._executor.outputHandler = handler;\n return this;\n }\n\n push() {\n const task = pushTask(\n {\n remote: filterType(arguments[0], filterString),\n branch: filterType(arguments[1], filterString),\n },\n getTrailingOptions(arguments),\n );\n\n return this._runTask(\n task,\n trailingFunctionArgument(arguments),\n );\n }\n\n stash() {\n return this._runTask(\n straightThroughStringTask(['stash', ...getTrailingOptions(arguments)]),\n trailingFunctionArgument(arguments),\n );\n }\n\n status() {\n return this._runTask(statusTask(getTrailingOptions(arguments)), trailingFunctionArgument(arguments));\n }\n}\n\nObject.assign(SimpleGitApi.prototype, config(), grep(), log());\n", "import { append, remove } from '../utils';\nimport { createDeferred, DeferredPromise } from '@kwsites/promise-deferred';\nimport { createLogger } from '../git-logger';\n\ntype ScheduleCompleteCallback = () => void;\ntype ScheduledTask = Pick<DeferredPromise<ScheduleCompleteCallback>, 'promise' | 'done'> & {id: number};\n\nconst createScheduledTask: () => ScheduledTask = (() => {\n let id = 0;\n return () => {\n id++;\n const {promise, done} = createDeferred<ScheduleCompleteCallback>();\n\n return {\n promise,\n done,\n id,\n };\n }\n})();\n\nexport class Scheduler {\n private logger = createLogger('', 'scheduler');\n private pending: ScheduledTask[] = [];\n private running: ScheduledTask[] = [];\n\n constructor(private concurrency = 2) {\n this.logger(`Constructed, concurrency=%s`, concurrency);\n }\n\n private schedule() {\n if (!this.pending.length || this.running.length >= this.concurrency) {\n this.logger(`Schedule attempt ignored, pending=%s running=%s concurrency=%s`, this.pending.length, this.running.length, this.concurrency);\n return;\n }\n\n const task = append(this.running, this.pending.shift()!);\n this.logger(`Attempting id=%s`, task.id);\n task.done(() => {\n this.logger(`Completing id=`, task.id);\n remove(this.running, task);\n this.schedule();\n });\n }\n\n next(): Promise<ScheduleCompleteCallback> {\n const {promise, id} = append(this.pending, createScheduledTask());\n this.logger(`Scheduling id=%s`, id);\n\n this.schedule();\n\n return promise;\n }\n}\n", "import { straightThroughStringTask } from './task';\nimport { OptionFlags, Options, StringTask } from '../types';\n\nexport type ApplyOptions = Options &\n OptionFlags<\n | '--stat'\n | '--numstat'\n | '--summary'\n | '--check'\n | '--index'\n | '--intent-to-add'\n | '--3way'\n | '--apply'\n | '--no-add'\n | '-R'\n | '--reverse'\n | '--allow-binary-replacement'\n | '--binary'\n | '--reject'\n | '-z'\n | '--inaccurate-eof'\n | '--recount'\n | '--cached'\n | '--ignore-space-change'\n | '--ignore-whitespace'\n | '--verbose'\n | '--unsafe-paths'> &\n OptionFlags<\n '--whitespace',\n 'nowarn' | 'warn' | 'fix' | 'error' | 'error-all'> &\n OptionFlags<'--build-fake-ancestor' | '--exclude' | '--include' | '--directory',\n string> &\n OptionFlags<'-p' | '-C', number>;\n\nexport function applyPatchTask(patches: string[], customArgs: string[]): StringTask<string> {\n return straightThroughStringTask(['apply', ...customArgs, ...patches]);\n}\n", "import {\n BranchMultiDeleteResult,\n BranchSingleDeleteFailure,\n BranchSingleDeleteResult,\n BranchSingleDeleteSuccess\n} from '../../../typings';\n\nexport class BranchDeletionBatch implements BranchMultiDeleteResult {\n all: BranchSingleDeleteResult[] = [];\n branches: { [branchName: string]: BranchSingleDeleteResult } = {};\n errors: BranchSingleDeleteResult[] = [];\n\n get success(): boolean {\n return !this.errors.length;\n }\n}\n\nexport function branchDeletionSuccess (branch: string, hash: string): BranchSingleDeleteSuccess {\n return {\n branch, hash, success: true,\n };\n}\n\nexport function branchDeletionFailure (branch: string): BranchSingleDeleteFailure {\n return {\n branch, hash: null, success: false,\n };\n}\n\nexport function isSingleBranchDeleteFailure (test: BranchSingleDeleteResult): test is BranchSingleDeleteSuccess {\n return test.success;\n}\n", "import { BranchMultiDeleteResult } from '../../../typings';\nimport { BranchDeletionBatch, branchDeletionFailure, branchDeletionSuccess } from '../responses/BranchDeleteSummary';\nimport { TaskParser } from '../types';\nimport { ExitCodes, LineParser, parseStringResponse } from '../utils';\n\nconst deleteSuccessRegex = /(\\S+)\\s+\\(\\S+\\s([^)]+)\\)/;\nconst deleteErrorRegex = /^error[^']+'([^']+)'/m;\n\nconst parsers: LineParser<BranchMultiDeleteResult>[] = [\n new LineParser(deleteSuccessRegex, (result, [branch, hash]) => {\n const deletion = branchDeletionSuccess(branch, hash);\n\n result.all.push(deletion);\n result.branches[branch] = deletion;\n }),\n new LineParser(deleteErrorRegex, (result, [branch]) => {\n const deletion = branchDeletionFailure(branch);\n\n result.errors.push(deletion);\n result.all.push(deletion);\n result.branches[branch] = deletion;\n }),\n];\n\nexport const parseBranchDeletions: TaskParser<string, BranchMultiDeleteResult> = (stdOut, stdErr) => {\n return parseStringResponse(new BranchDeletionBatch(), parsers, stdOut, stdErr);\n}\n\nexport function hasBranchDeletionError(data: string, processExitCode: ExitCodes): boolean {\n return processExitCode === ExitCodes.ERROR && deleteErrorRegex.test(data);\n}\n", "import { BranchSummary, BranchSummaryBranch } from '../../../typings';\n\nexport class BranchSummaryResult implements BranchSummary {\n public all: string[] = [];\n public branches: { [p: string]: BranchSummaryBranch } = {};\n public current: string = '';\n public detached: boolean = false;\n\n push(current: boolean, detached: boolean, name: string, commit: string, label: string) {\n if (current) {\n this.detached = detached;\n this.current = name;\n }\n\n this.all.push(name);\n this.branches[name] = {\n current: current,\n name: name,\n commit: commit,\n label: label\n };\n }\n}\n\n", "import { BranchSummary } from '../../../typings';\nimport { BranchSummaryResult } from '../responses/BranchSummary';\nimport { LineParser, parseStringResponse } from '../utils';\n\nconst parsers: LineParser<BranchSummaryResult>[] = [\n new LineParser(/^(\\*\\s)?\\((?:HEAD )?detached (?:from|at) (\\S+)\\)\\s+([a-z0-9]+)\\s(.*)$/, (result, [current, name, commit, label]) => {\n result.push(\n !!current,\n true,\n name, commit, label\n );\n }),\n new LineParser(/^(\\*\\s)?(\\S+)\\s+([a-z0-9]+)\\s?(.*)$/s, (result, [current, name, commit, label]) => {\n result.push(\n !!current,\n false,\n name, commit, label\n );\n })\n];\n\nexport function parseBranchSummary (stdOut: string): BranchSummary {\n return parseStringResponse(new BranchSummaryResult(), parsers, stdOut);\n}\n", "import { BranchMultiDeleteResult, BranchSingleDeleteResult, BranchSummary } from '../../../typings';\nimport { StringTask } from '../types';\nimport { GitResponseError } from '../errors/git-response-error';\nimport { hasBranchDeletionError, parseBranchDeletions } from '../parsers/parse-branch-delete';\nimport { parseBranchSummary } from '../parsers/parse-branch';\nimport { bufferToString } from '../utils';\n\nexport function containsDeleteBranchCommand(commands: string[]) {\n const deleteCommands = ['-d', '-D', '--delete'];\n return commands.some(command => deleteCommands.includes(command));\n}\n\nexport function branchTask(customArgs: string[]): StringTask<BranchSummary | BranchSingleDeleteResult> {\n const isDelete = containsDeleteBranchCommand(customArgs);\n const commands = ['branch', ...customArgs];\n\n if (commands.length === 1) {\n commands.push('-a');\n }\n\n if (!commands.includes('-v')) {\n commands.splice(1, 0, '-v');\n }\n\n return {\n format: 'utf-8',\n commands,\n parser(stdOut, stdErr) {\n if (isDelete) {\n return parseBranchDeletions(stdOut, stdErr).all[0];\n }\n\n return parseBranchSummary(stdOut);\n },\n }\n}\n\nexport function branchLocalTask(): StringTask<BranchSummary> {\n const parser = parseBranchSummary;\n\n return {\n format: 'utf-8',\n commands: ['branch', '-v'],\n parser,\n }\n}\n\nexport function deleteBranchesTask(branches: string[], forceDelete = false): StringTask<BranchMultiDeleteResult> {\n return {\n format: 'utf-8',\n commands: ['branch', '-v', forceDelete ? '-D' : '-d', ...branches],\n parser(stdOut, stdErr) {\n return parseBranchDeletions(stdOut, stdErr);\n },\n onError({exitCode, stdOut}, error, done, fail) {\n if (!hasBranchDeletionError(String(error), exitCode)) {\n return fail(error);\n }\n\n done(stdOut);\n },\n }\n}\n\nexport function deleteBranchTask(branch: string, forceDelete = false): StringTask<BranchSingleDeleteResult> {\n const task: StringTask<BranchSingleDeleteResult> = {\n format: 'utf-8',\n commands: ['branch', '-v', forceDelete ? '-D' : '-d', branch],\n parser(stdOut, stdErr) {\n return parseBranchDeletions(stdOut, stdErr).branches[branch]!;\n },\n onError({exitCode, stdErr, stdOut}, error, _, fail) {\n if (!hasBranchDeletionError(String(error), exitCode)) {\n return fail(error);\n }\n\n throw new GitResponseError(\n task.parser(bufferToString(stdOut), bufferToString(stdErr)),\n String(error)\n );\n },\n };\n\n return task;\n}\n", "\n/**\n * Parser for the `check-ignore` command - returns each file as a string array\n */\nexport const parseCheckIgnore = (text: string): string[] => {\n return text.split(/\\n/g)\n .map(line => line.trim())\n .filter(file => !!file);\n};\n", "import { StringTask } from '../types';\nimport { parseCheckIgnore } from '../responses/CheckIgnore';\n\nexport function checkIgnoreTask(paths: string[]): StringTask<string[]> {\n return {\n commands: ['check-ignore', ...paths],\n format: 'utf-8',\n parser: parseCheckIgnore,\n };\n}\n", "import { straightThroughStringTask } from './task';\nimport { OptionFlags, Options, StringTask } from '../types';\nimport { append } from '../utils';\n\nexport type CloneOptions = Options &\n OptionFlags<\n '--bare' |\n '--dissociate' |\n '--mirror' |\n '--no-checkout' |\n '--no-remote-submodules' |\n '--no-shallow-submodules' |\n '--no-single-branch' |\n '--no-tags' |\n '--remote-submodules' |\n '--single-branch' |\n '--shallow-submodules' |\n '--verbose'\n > &\n OptionFlags<'--depth' | '-j' | '--jobs', number> &\n OptionFlags<'--branch' | '--origin' | '--recurse-submodules' | '--separate-git-dir' | '--shallow-exclude' | '--shallow-since' | '--template', string>\n\nexport function cloneTask(repo: string | undefined, directory: string | undefined, customArgs: string[]): StringTask<string> {\n const commands = ['clone', ...customArgs];\n if (typeof repo === 'string') {\n commands.push(repo);\n }\n if (typeof directory === 'string') {\n commands.push(directory);\n }\n\n return straightThroughStringTask(commands);\n}\n\nexport function cloneMirrorTask(repo: string | undefined, directory: string | undefined, customArgs: string[]): StringTask<string> {\n append(customArgs,'--mirror');\n\n return cloneTask(repo, directory, customArgs);\n}\n", "import { CommitResult } from '../../../typings';\nimport { LineParser, parseStringResponse } from '../utils';\n\nconst parsers: LineParser<CommitResult>[] = [\n new LineParser(/^\\[([^\\s]+)( \\([^)]+\\))? ([^\\]]+)/, (result, [branch, root, commit]) => {\n result.branch = branch;\n result.commit = commit;\n result.root = !!root;\n }),\n new LineParser(/\\s*Author:\\s(.+)/i, (result, [author]) => {\n const parts = author.split('<');\n const email = parts.pop();\n\n if (!email || !email.includes('@')) {\n return;\n }\n\n result.author = {\n email: email.substr(0, email.length - 1),\n name: parts.join('<').trim()\n };\n }),\n new LineParser(/(\\d+)[^,]*(?:,\\s*(\\d+)[^,]*)(?:,\\s*(\\d+))/g, (result, [changes, insertions, deletions]) => {\n result.summary.changes = parseInt(changes, 10) || 0;\n result.summary.insertions = parseInt(insertions, 10) || 0;\n result.summary.deletions = parseInt(deletions, 10) || 0;\n }),\n new LineParser(/^(\\d+)[^,]*(?:,\\s*(\\d+)[^(]+\\(([+-]))?/, (result, [changes, lines, direction]) => {\n result.summary.changes = parseInt(changes, 10) || 0;\n const count = parseInt(lines, 10) || 0;\n if (direction === '-') {\n result.summary.deletions = count;\n } else if (direction === '+') {\n result.summary.insertions = count;\n }\n }),\n];\n\nexport function parseCommitResult(stdOut: string): CommitResult {\n const result: CommitResult = {\n author: null,\n branch: '',\n commit: '',\n root: false,\n summary: {\n changes: 0,\n insertions: 0,\n deletions: 0,\n },\n };\n return parseStringResponse(result, parsers, stdOut);\n}\n", "import { CommitResult } from '../../../typings';\nimport { parseCommitResult } from '../parsers/parse-commit';\nimport { StringTask } from '../types';\n\nexport function commitTask(message: string[], files: string[], customArgs: string[]): StringTask<CommitResult> {\n const commands: string[] = ['commit'];\n\n message.forEach((m) => commands.push('-m', m));\n\n commands.push(\n ...files,\n ...customArgs,\n );\n\n return {\n commands,\n format: 'utf-8',\n parser: parseCommitResult,\n }\n}\n", "import { StringTask } from '../types';\nimport { DiffResult } from '../../../typings';\nimport { parseDiffResult } from '../parsers/parse-diff-summary';\n\nexport function diffSummaryTask(customArgs: string[]): StringTask<DiffResult> {\n return {\n commands: ['diff', '--stat=4096', ...customArgs],\n format: 'utf-8',\n parser (stdOut) {\n return parseDiffResult(stdOut);\n }\n }\n}\n", "import { FetchResult } from '../../../typings';\nimport { LineParser, parseStringResponse } from '../utils';\n\nconst parsers: LineParser<FetchResult>[] = [\n new LineParser(/From (.+)$/, (result, [remote]) => {\n result.remote = remote;\n }),\n new LineParser(/\\* \\[new branch]\\s+(\\S+)\\s*-> (.+)$/, (result, [name, tracking]) =>{\n result.branches.push({\n name,\n tracking,\n });\n }),\n new LineParser(/\\* \\[new tag]\\s+(\\S+)\\s*-> (.+)$/, (result, [name, tracking]) => {\n result.tags.push({\n name,\n tracking,\n });\n })\n];\n\nexport function parseFetchResult (stdOut: string, stdErr: string): FetchResult {\n const result: FetchResult = {\n raw: stdOut,\n remote: null,\n branches: [],\n tags: [],\n };\n return parseStringResponse(result, parsers, stdOut, stdErr);\n}\n", "import { FetchResult } from '../../../typings';\nimport { parseFetchResult } from '../parsers/parse-fetch';\nimport { StringTask } from '../types';\n\nexport function fetchTask(remote: string, branch: string, customArgs: string[]): StringTask<FetchResult> {\n const commands = ['fetch', ...customArgs];\n if (remote && branch) {\n commands.push(remote, branch);\n }\n\n return {\n commands,\n format: 'utf-8',\n parser: parseFetchResult,\n }\n}\n", "import { MoveResult } from '../../../typings';\nimport { LineParser, parseStringResponse } from '../utils';\n\nconst parsers: LineParser<MoveResult>[] = [\n new LineParser(/^Renaming (.+) to (.+)$/, (result, [from, to]) => {\n result.moves.push({from, to});\n }),\n];\n\nexport function parseMoveResult (stdOut: string): MoveResult {\n return parseStringResponse({moves: []}, parsers, stdOut);\n}\n", "import { MoveResult } from '../../../typings';\nimport { parseMoveResult } from '../parsers/parse-move';\nimport { StringTask } from '../types';\nimport { asArray } from '../utils';\n\nexport function moveTask(from: string | string[], to: string): StringTask<MoveResult> {\n return {\n commands: ['mv', '-v', ...asArray(from), to],\n format: 'utf-8',\n parser: parseMoveResult,\n };\n}\n", "import { PullResult } from '../../../typings';\nimport { GitResponseError } from '../errors/git-response-error';\nimport { parsePullErrorResult, parsePullResult } from '../parsers/parse-pull';\nimport { Maybe, StringTask } from '../types';\nimport { bufferToString } from '../utils';\n\nexport function pullTask(remote: Maybe<string>, branch: Maybe<string>, customArgs: string[]): StringTask<PullResult> {\n const commands: string[] = ['pull', ...customArgs];\n if (remote && branch) {\n commands.splice(1, 0, remote, branch);\n }\n\n return {\n commands,\n format: 'utf-8',\n parser(stdOut, stdErr): PullResult {\n return parsePullResult(stdOut, stdErr);\n },\n onError(result, _error, _done, fail) {\n const pullError = parsePullErrorResult(bufferToString(result.stdOut), bufferToString(result.stdErr));\n if (pullError) {\n return fail(new GitResponseError(pullError));\n }\n\n fail(_error);\n }\n }\n}\n", "import { forEachLineWithContent } from '../utils';\n\nexport interface RemoteWithoutRefs {\n name: string;\n}\n\nexport interface RemoteWithRefs extends RemoteWithoutRefs {\n refs: {\n fetch: string;\n push: string;\n };\n}\n\nexport function parseGetRemotes (text: string): RemoteWithoutRefs[] {\n const remotes: {[name: string]: RemoteWithoutRefs} = {};\n\n forEach(text, ([name]) => remotes[name] = { name });\n\n return Object.values(remotes);\n}\n\nexport function parseGetRemotesVerbose (text: string): RemoteWithRefs[] {\n const remotes: {[name: string]: RemoteWithRefs} = {};\n\n forEach(text, ([name, url, purpose]) => {\n if (!remotes.hasOwnProperty(name)) {\n remotes[name] = {\n name: name,\n refs: { fetch: '', push: '' },\n };\n }\n\n if (purpose && url) {\n remotes[name].refs[purpose.replace(/[^a-z]/g, '') as keyof RemoteWithRefs['refs']] = url;\n }\n });\n\n return Object.values(remotes);\n}\n\nfunction forEach(text: string, handler: (line: string[]) => void) {\n forEachLineWithContent(text, (line) => handler(line.split(/\\s+/)));\n}\n", "import { parseGetRemotes, parseGetRemotesVerbose } from '../responses/GetRemoteSummary';\nimport { StringTask } from '../types';\nimport { straightThroughStringTask } from './task';\n\nexport function addRemoteTask(remoteName: string, remoteRepo: string, customArgs: string[] = []): StringTask<string> {\n return straightThroughStringTask(['remote', 'add', ...customArgs, remoteName, remoteRepo]);\n}\n\nexport function getRemotesTask(verbose: boolean): StringTask<any> {\n const commands = ['remote'];\n if (verbose) {\n commands.push('-v');\n }\n\n return {\n commands,\n format: 'utf-8',\n parser: verbose ? parseGetRemotesVerbose : parseGetRemotes,\n };\n}\n\nexport function listRemotesTask(customArgs: string[] = []): StringTask<string> {\n const commands = [...customArgs];\n if (commands[0] !== 'ls-remote') {\n commands.unshift('ls-remote');\n }\n\n return straightThroughStringTask(commands);\n}\n\nexport function remoteTask(customArgs: string[] = []): StringTask<string> {\n const commands = [...customArgs];\n if (commands[0] !== 'remote') {\n commands.unshift('remote');\n }\n\n return straightThroughStringTask(commands);\n}\n\nexport function removeRemoteTask(remoteName: string) {\n return straightThroughStringTask(['remote', 'remove', remoteName]);\n}\n", "import { LogOptions, LogResult } from '../../../typings';\nimport { createListLogSummaryParser } from '../parsers/parse-list-log-summary';\nimport { StringTask } from '../types';\nimport { parseLogOptions } from './log';\n\nexport function stashListTask(opt: LogOptions = {}, customArgs: string[]): StringTask<LogResult> {\n const options = parseLogOptions<any>(opt);\n const parser = createListLogSummaryParser(options.splitter, options.fields);\n\n return {\n commands: ['stash', 'list', ...options.commands, ...customArgs],\n format: 'utf-8',\n parser,\n };\n}\n", "import { StringTask } from '../types';\nimport { straightThroughStringTask } from './task';\n\nexport function addSubModuleTask(repo: string, path: string): StringTask<string> {\n return subModuleTask(['add', repo, path]);\n}\n\nexport function initSubModuleTask(customArgs: string[]): StringTask<string> {\n return subModuleTask(['init', ...customArgs]);\n}\n\nexport function subModuleTask(customArgs: string[]): StringTask<string> {\n const commands = [...customArgs];\n if (commands[0] !== 'submodule') {\n commands.unshift('submodule');\n }\n\n return straightThroughStringTask(commands);\n}\n\nexport function updateSubModuleTask(customArgs: string[]): StringTask<string> {\n return subModuleTask(['update', ...customArgs]);\n}\n", "import { TagResult } from '../../../typings';\n\nexport class TagList implements TagResult {\n constructor(\n public readonly all: string[],\n public readonly latest: string | undefined,\n ) {\n }\n}\n\nexport const parseTagList = function (data: string, customSort = false) {\n const tags = data\n .split('\\n')\n .map(trimmed)\n .filter(Boolean);\n\n if (!customSort) {\n tags.sort(function (tagA, tagB) {\n const partsA = tagA.split('.');\n const partsB = tagB.split('.');\n\n if (partsA.length === 1 || partsB.length === 1) {\n return singleSorted(toNumber(partsA[0]), toNumber(partsB[0]));\n }\n\n for (let i = 0, l = Math.max(partsA.length, partsB.length); i < l; i++) {\n const diff = sorted(toNumber(partsA[i]), toNumber(partsB[i]));\n\n if (diff) {\n return diff;\n }\n }\n\n return 0;\n });\n }\n\n const latest = customSort ? tags[0] : [...tags].reverse().find((tag) => tag.indexOf('.') >= 0);\n\n return new TagList(tags, latest);\n};\n\nfunction singleSorted(a: number, b: number): number {\n const aIsNum = isNaN(a);\n const bIsNum = isNaN(b);\n\n if (aIsNum !== bIsNum) {\n return aIsNum ? 1 : -1;\n }\n\n return aIsNum ? sorted(a, b) : 0;\n}\n\nfunction sorted(a: number, b: number) {\n return a === b ? 0 : a > b ? 1 : -1;\n}\n\nfunction trimmed(input: string) {\n return input.trim();\n}\n\nfunction toNumber(input: string | undefined) {\n if (typeof input === 'string') {\n return parseInt(input.replace(/^\\D+/g, ''), 10) || 0;\n }\n\n return 0;\n}\n", "import { TagResult } from '../../../typings';\nimport { parseTagList } from '../responses/TagList';\nimport { StringTask } from '../types';\n\n/**\n * Task used by `git.tags`\n */\nexport function tagListTask (customArgs: string[] = []): StringTask<TagResult> {\n const hasCustomSort = customArgs.some((option) => /^--sort=/.test(option));\n\n return {\n format: 'utf-8',\n commands: ['tag', '-l', ...customArgs],\n parser (text: string) {\n return parseTagList(text, hasCustomSort);\n },\n }\n}\n\n/**\n * Task used by `git.addTag`\n */\nexport function addTagTask (name: string): StringTask<{name: string}> {\n return {\n format: 'utf-8',\n commands: ['tag', name],\n parser () {\n return {name};\n }\n }\n}\n\n/**\n * Task used by `git.addTag`\n */\nexport function addAnnotatedTagTask (name: string, tagMessage: string): StringTask<{name: string}> {\n return {\n format: 'utf-8',\n commands: ['tag', '-a', '-m', tagMessage, name],\n parser () {\n return {name};\n }\n }\n}\n", "const {GitExecutor} = require('./lib/runners/git-executor');\nconst {SimpleGitApi} = require('./lib/simple-git-api');\n\nconst {Scheduler} = require('./lib/runners/scheduler');\nconst {configurationErrorTask} = require('./lib/tasks/task');\nconst {\n asArray,\n filterArray,\n filterPrimitives,\n filterString,\n filterStringOrStringArray,\n filterType,\n getTrailingOptions,\n trailingFunctionArgument,\n trailingOptionsArgument\n} = require('./lib/utils');\nconst {applyPatchTask} = require('./lib/tasks/apply-patch')\nconst {branchTask, branchLocalTask, deleteBranchesTask, deleteBranchTask} = require('./lib/tasks/branch');\nconst {checkIgnoreTask} = require('./lib/tasks/check-ignore');\nconst {checkIsRepoTask} = require('./lib/tasks/check-is-repo');\nconst {cloneTask, cloneMirrorTask} = require('./lib/tasks/clone');\nconst {cleanWithOptionsTask, isCleanOptionsArray} = require('./lib/tasks/clean');\nconst {commitTask} = require('./lib/tasks/commit');\nconst {diffSummaryTask} = require('./lib/tasks/diff');\nconst {fetchTask} = require('./lib/tasks/fetch');\nconst {moveTask} = require(\"./lib/tasks/move\");\nconst {pullTask} = require('./lib/tasks/pull');\nconst {pushTagsTask} = require('./lib/tasks/push');\nconst {addRemoteTask, getRemotesTask, listRemotesTask, remoteTask, removeRemoteTask} = require('./lib/tasks/remote');\nconst {getResetMode, resetTask} = require('./lib/tasks/reset');\nconst {stashListTask} = require('./lib/tasks/stash-list');\nconst {addSubModuleTask, initSubModuleTask, subModuleTask, updateSubModuleTask} = require('./lib/tasks/sub-module');\nconst {addAnnotatedTagTask, addTagTask, tagListTask} = require('./lib/tasks/tag');\nconst {straightThroughBufferTask, straightThroughStringTask} = require('./lib/tasks/task');\n\nfunction Git (options, plugins) {\n this._executor = new GitExecutor(\n options.binary, options.baseDir,\n new Scheduler(options.maxConcurrentProcesses), plugins,\n );\n}\n\n(Git.prototype = Object.create(SimpleGitApi.prototype)).constructor = Git;\n\n/**\n * Sets the path to a custom git binary, should either be `git` when there is an installation of git available on\n * the system path, or a fully qualified path to the executable.\n *\n * @param {string} command\n * @returns {Git}\n */\nGit.prototype.customBinary = function (command) {\n this._executor.binary = command;\n return this;\n};\n\n/**\n * Sets an environment variable for the spawned child process, either supply both a name and value as strings or\n * a single object to entirely replace the current environment variables.\n *\n * @param {string|Object} name\n * @param {string} [value]\n * @returns {Git}\n */\nGit.prototype.env = function (name, value) {\n if (arguments.length === 1 && typeof name === 'object') {\n this._executor.env = name;\n } else {\n (this._executor.env = this._executor.env || {})[name] = value;\n }\n\n return this;\n};\n\n/**\n * List the stash(s) of the local repo\n */\nGit.prototype.stashList = function (options) {\n return this._runTask(\n stashListTask(\n trailingOptionsArgument(arguments) || {},\n filterArray(options) && options || []\n ),\n trailingFunctionArgument(arguments),\n );\n};\n\nfunction createCloneTask (api, task, repoPath, localPath) {\n if (typeof repoPath !== 'string') {\n return configurationErrorTask(`git.${ api }() requires a string 'repoPath'`);\n }\n\n return task(repoPath, filterType(localPath, filterString), getTrailingOptions(arguments));\n}\n\n\n/**\n * Clone a git repo\n */\nGit.prototype.clone = function () {\n return this._runTask(\n createCloneTask('clone', cloneTask, ...arguments),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Mirror a git repo\n */\nGit.prototype.mirror = function () {\n return this._runTask(\n createCloneTask('mirror', cloneMirrorTask, ...arguments),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Moves one or more files to a new destination.\n *\n * @see https://git-scm.com/docs/git-mv\n *\n * @param {string|string[]} from\n * @param {string} to\n */\nGit.prototype.mv = function (from, to) {\n return this._runTask(moveTask(from, to), trailingFunctionArgument(arguments));\n};\n\n/**\n * Internally uses pull and tags to get the list of tags then checks out the latest tag.\n *\n * @param {Function} [then]\n */\nGit.prototype.checkoutLatestTag = function (then) {\n var git = this;\n return this.pull(function () {\n git.tags(function (err, tags) {\n git.checkout(tags.latest, then);\n });\n });\n};\n\n/**\n * Commits changes in the current working directory - when specific file paths are supplied, only changes on those\n * files will be committed.\n *\n * @param {string|string[]} message\n * @param {string|string[]} [files]\n * @param {Object} [options]\n * @param {Function} [then]\n */\nGit.prototype.commit = function (message, files, options, then) {\n const next = trailingFunctionArgument(arguments);\n\n if (!filterStringOrStringArray(message)) {\n return this._runTask(\n configurationErrorTask('git.commit: requires the commit message to be supplied as a string/string[]'),\n next,\n );\n }\n\n return this._runTask(\n commitTask(\n asArray(message),\n asArray(filterType(files, filterStringOrStringArray, [])),\n [...filterType(options, filterArray, []), ...getTrailingOptions(arguments, 0, true)]\n ),\n next\n );\n};\n\n/**\n * Pull the updated contents of the current repo\n */\nGit.prototype.pull = function (remote, branch, options, then) {\n return this._runTask(\n pullTask(filterType(remote, filterString), filterType(branch, filterString), getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Fetch the updated contents of the current repo.\n *\n * @example\n * .fetch('upstream', 'master') // fetches from master on remote named upstream\n * .fetch(function () {}) // runs fetch against default remote and branch and calls function\n *\n * @param {string} [remote]\n * @param {string} [branch]\n */\nGit.prototype.fetch = function (remote, branch) {\n return this._runTask(\n fetchTask(filterType(remote, filterString), filterType(branch, filterString), getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Disables/enables the use of the console for printing warnings and errors, by default messages are not shown in\n * a production environment.\n *\n * @param {boolean} silence\n * @returns {Git}\n */\nGit.prototype.silent = function (silence) {\n console.warn('simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3');\n return this;\n};\n\n/**\n * List all tags. When using git 2.7.0 or above, include an options object with `\"--sort\": \"property-name\"` to\n * sort the tags by that property instead of using the default semantic versioning sort.\n *\n * Note, supplying this option when it is not supported by your Git version will cause the operation to fail.\n *\n * @param {Object} [options]\n * @param {Function} [then]\n */\nGit.prototype.tags = function (options, then) {\n return this._runTask(\n tagListTask(getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Rebases the current working copy. Options can be supplied either as an array of string parameters\n * to be sent to the `git rebase` command, or a standard options object.\n */\nGit.prototype.rebase = function () {\n return this._runTask(\n straightThroughStringTask(['rebase', ...getTrailingOptions(arguments)]),\n trailingFunctionArgument(arguments)\n );\n};\n\n/**\n * Reset a repo\n */\nGit.prototype.reset = function (mode) {\n return this._runTask(\n resetTask(getResetMode(mode), getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Revert one or more commits in the local working copy\n */\nGit.prototype.revert = function (commit) {\n const next = trailingFunctionArgument(arguments);\n\n if (typeof commit !== 'string') {\n return this._runTask(\n configurationErrorTask('Commit must be a string'),\n next,\n );\n }\n\n return this._runTask(\n straightThroughStringTask(['revert', ...getTrailingOptions(arguments, 0, true), commit]),\n next\n );\n};\n\n/**\n * Add a lightweight tag to the head of the current branch\n */\nGit.prototype.addTag = function (name) {\n const task = (typeof name === 'string')\n ? addTagTask(name)\n : configurationErrorTask('Git.addTag requires a tag name');\n\n return this._runTask(task, trailingFunctionArgument(arguments));\n};\n\n/**\n * Add an annotated tag to the head of the current branch\n */\nGit.prototype.addAnnotatedTag = function (tagName, tagMessage) {\n return this._runTask(\n addAnnotatedTagTask(tagName, tagMessage),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Check out a tag or revision, any number of additional arguments can be passed to the `git checkout` command\n * by supplying either a string or array of strings as the first argument.\n */\nGit.prototype.checkout = function () {\n const commands = ['checkout', ...getTrailingOptions(arguments, true)];\n return this._runTask(\n straightThroughStringTask(commands),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Check out a remote branch\n *\n * @param {string} branchName name of branch\n * @param {string} startPoint (e.g origin/development)\n * @param {Function} [then]\n */\nGit.prototype.checkoutBranch = function (branchName, startPoint, then) {\n return this.checkout(['-b', branchName, startPoint], trailingFunctionArgument(arguments));\n};\n\n/**\n * Check out a local branch\n */\nGit.prototype.checkoutLocalBranch = function (branchName, then) {\n return this.checkout(['-b', branchName], trailingFunctionArgument(arguments));\n};\n\n/**\n * Delete a local branch\n */\nGit.prototype.deleteLocalBranch = function (branchName, forceDelete, then) {\n return this._runTask(\n deleteBranchTask(branchName, typeof forceDelete === \"boolean\" ? forceDelete : false),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Delete one or more local branches\n */\nGit.prototype.deleteLocalBranches = function (branchNames, forceDelete, then) {\n return this._runTask(\n deleteBranchesTask(branchNames, typeof forceDelete === \"boolean\" ? forceDelete : false),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * List all branches\n *\n * @param {Object | string[]} [options]\n * @param {Function} [then]\n */\nGit.prototype.branch = function (options, then) {\n return this._runTask(\n branchTask(getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Return list of local branches\n *\n * @param {Function} [then]\n */\nGit.prototype.branchLocal = function (then) {\n return this._runTask(\n branchLocalTask(),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Executes any command against the git binary.\n */\nGit.prototype.raw = function (commands) {\n const createRestCommands = !Array.isArray(commands);\n const command = [].slice.call(createRestCommands ? arguments : commands, 0);\n\n for (let i = 0; i < command.length && createRestCommands; i++) {\n if (!filterPrimitives(command[i])) {\n command.splice(i, command.length - i);\n break;\n }\n }\n\n command.push(\n ...getTrailingOptions(arguments, 0, true),\n );\n\n var next = trailingFunctionArgument(arguments);\n\n if (!command.length) {\n return this._runTask(\n configurationErrorTask('Raw: must supply one or more command to execute'),\n next,\n );\n }\n\n return this._runTask(straightThroughStringTask(command), next);\n};\n\nGit.prototype.submoduleAdd = function (repo, path, then) {\n return this._runTask(\n addSubModuleTask(repo, path),\n trailingFunctionArgument(arguments),\n );\n};\n\nGit.prototype.submoduleUpdate = function (args, then) {\n return this._runTask(\n updateSubModuleTask(getTrailingOptions(arguments, true)),\n trailingFunctionArgument(arguments),\n );\n};\n\nGit.prototype.submoduleInit = function (args, then) {\n return this._runTask(\n initSubModuleTask(getTrailingOptions(arguments, true)),\n trailingFunctionArgument(arguments),\n );\n};\n\nGit.prototype.subModule = function (options, then) {\n return this._runTask(\n subModuleTask(getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments),\n );\n};\n\nGit.prototype.listRemote = function () {\n return this._runTask(\n listRemotesTask(getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Adds a remote to the list of remotes.\n */\nGit.prototype.addRemote = function (remoteName, remoteRepo, then) {\n return this._runTask(\n addRemoteTask(remoteName, remoteRepo, getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Removes an entry by name from the list of remotes.\n */\nGit.prototype.removeRemote = function (remoteName, then) {\n return this._runTask(\n removeRemoteTask(remoteName),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Gets the currently available remotes, setting the optional verbose argument to true includes additional\n * detail on the remotes themselves.\n */\nGit.prototype.getRemotes = function (verbose, then) {\n return this._runTask(\n getRemotesTask(verbose === true),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Call any `git remote` function with arguments passed as an array of strings.\n *\n * @param {string[]} options\n * @param {Function} [then]\n */\nGit.prototype.remote = function (options, then) {\n return this._runTask(\n remoteTask(getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Call any `git tag` function with arguments passed as an array of strings.\n *\n * @param {string[]} options\n * @param {Function} [then]\n */\nGit.prototype.tag = function (options, then) {\n const command = getTrailingOptions(arguments);\n\n if (command[0] !== 'tag') {\n command.unshift('tag');\n }\n\n return this._runTask(\n straightThroughStringTask(command),\n trailingFunctionArgument(arguments)\n );\n};\n\n/**\n * Updates repository server info\n *\n * @param {Function} [then]\n */\nGit.prototype.updateServerInfo = function (then) {\n return this._runTask(\n straightThroughStringTask(['update-server-info']),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Pushes the current tag changes to a remote which can be either a URL or named remote. When not specified uses the\n * default configured remote spec.\n *\n * @param {string} [remote]\n * @param {Function} [then]\n */\nGit.prototype.pushTags = function (remote, then) {\n const task = pushTagsTask({remote: filterType(remote, filterString)}, getTrailingOptions(arguments));\n\n return this._runTask(task, trailingFunctionArgument(arguments));\n};\n\n/**\n * Removes the named files from source control.\n */\nGit.prototype.rm = function (files) {\n return this._runTask(\n straightThroughStringTask(['rm', '-f', ...asArray(files)]),\n trailingFunctionArgument(arguments)\n );\n};\n\n/**\n * Removes the named files from source control but keeps them on disk rather than deleting them entirely. To\n * completely remove the files, use `rm`.\n *\n * @param {string|string[]} files\n */\nGit.prototype.rmKeepLocal = function (files) {\n return this._runTask(\n straightThroughStringTask(['rm', '--cached', ...asArray(files)]),\n trailingFunctionArgument(arguments)\n );\n};\n\n/**\n * Returns a list of objects in a tree based on commit hash. Passing in an object hash returns the object's content,\n * size, and type.\n *\n * Passing \"-p\" will instruct cat-file to determine the object type, and display its formatted contents.\n *\n * @param {string[]} [options]\n * @param {Function} [then]\n */\nGit.prototype.catFile = function (options, then) {\n return this._catFile('utf-8', arguments);\n};\n\nGit.prototype.binaryCatFile = function () {\n return this._catFile('buffer', arguments);\n};\n\nGit.prototype._catFile = function (format, args) {\n var handler = trailingFunctionArgument(args);\n var command = ['cat-file'];\n var options = args[0];\n\n if (typeof options === 'string') {\n return this._runTask(\n configurationErrorTask('Git.catFile: options must be supplied as an array of strings'),\n handler,\n );\n }\n\n if (Array.isArray(options)) {\n command.push.apply(command, options);\n }\n\n const task = format === 'buffer'\n ? straightThroughBufferTask(command)\n : straightThroughStringTask(command);\n\n return this._runTask(task, handler);\n};\n\nGit.prototype.diff = function (options, then) {\n const task = filterString(options)\n ? configurationErrorTask('git.diff: supplying options as a single string is no longer supported, switch to an array of strings')\n : straightThroughStringTask(['diff', ...getTrailingOptions(arguments)]);\n\n return this._runTask(\n task,\n trailingFunctionArgument(arguments),\n );\n};\n\nGit.prototype.diffSummary = function () {\n return this._runTask(\n diffSummaryTask(getTrailingOptions(arguments, 1)),\n trailingFunctionArgument(arguments),\n );\n};\n\nGit.prototype.applyPatch = function (patches) {\n const task = !filterStringOrStringArray(patches)\n ? configurationErrorTask(`git.applyPatch requires one or more string patches as the first argument`)\n : applyPatchTask(asArray(patches), getTrailingOptions([].slice.call(arguments, 1)));\n\n return this._runTask(\n task,\n trailingFunctionArgument(arguments),\n );\n}\n\nGit.prototype.revparse = function () {\n const commands = ['rev-parse', ...getTrailingOptions(arguments, true)];\n return this._runTask(\n straightThroughStringTask(commands, true),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Show various types of objects, for example the file at a certain commit\n *\n * @param {string[]} [options]\n * @param {Function} [then]\n */\nGit.prototype.show = function (options, then) {\n return this._runTask(\n straightThroughStringTask(['show', ...getTrailingOptions(arguments, 1)]),\n trailingFunctionArgument(arguments)\n );\n};\n\n/**\n */\nGit.prototype.clean = function (mode, options, then) {\n const usingCleanOptionsArray = isCleanOptionsArray(mode);\n const cleanMode = usingCleanOptionsArray && mode.join('') || filterType(mode, filterString) || '';\n const customArgs = getTrailingOptions([].slice.call(arguments, usingCleanOptionsArray ? 1 : 0));\n\n return this._runTask(\n cleanWithOptionsTask(cleanMode, customArgs),\n trailingFunctionArgument(arguments),\n );\n};\n\nGit.prototype.exec = function (then) {\n const task = {\n commands: [],\n format: 'utf-8',\n parser () {\n if (typeof then === 'function') {\n then();\n }\n }\n };\n\n return this._runTask(task);\n};\n\n/**\n * Clears the queue of pending commands and returns the wrapper instance for chaining.\n *\n * @returns {Git}\n */\nGit.prototype.clearQueue = function () {\n // TODO:\n // this._executor.clear();\n return this;\n};\n\n/**\n * Check if a pathname or pathnames are excluded by .gitignore\n *\n * @param {string|string[]} pathnames\n * @param {Function} [then]\n */\nGit.prototype.checkIgnore = function (pathnames, then) {\n return this._runTask(\n checkIgnoreTask(asArray((filterType(pathnames, filterStringOrStringArray, [])))),\n trailingFunctionArgument(arguments),\n );\n};\n\nGit.prototype.checkIsRepo = function (checkType, then) {\n return this._runTask(\n checkIsRepoTask(filterType(checkType, filterString)),\n trailingFunctionArgument(arguments),\n );\n};\n\nmodule.exports = Git;\n", "import { SimpleGitFactory } from '../../typings';\n\nimport * as api from './api';\nimport {\n commandConfigPrefixingPlugin,\n completionDetectionPlugin,\n errorDetectionHandler,\n errorDetectionPlugin,\n PluginStore,\n progressMonitorPlugin,\n spawnOptionsPlugin,\n timeoutPlugin\n} from './plugins';\nimport { createInstanceConfig, folderExists } from './utils';\nimport { SimpleGitOptions } from './types';\n\nconst Git = require('../git');\n\n/**\n * Adds the necessary properties to the supplied object to enable it for use as\n * the default export of a module.\n *\n * Eg: `module.exports = esModuleFactory({ something () {} })`\n */\nexport function esModuleFactory<T>(defaultExport: T): T & { __esModule: true, default: T } {\n return Object.defineProperties(defaultExport, {\n __esModule: {value: true},\n default: {value: defaultExport},\n });\n}\n\nexport function gitExportFactory<T = {}>(factory: SimpleGitFactory, extra: T) {\n return Object.assign(function (...args: Parameters<SimpleGitFactory>) {\n return factory.apply(null, args);\n },\n api,\n extra || {},\n );\n}\n\nexport function gitInstanceFactory(baseDir?: string | Partial<SimpleGitOptions>, options?: Partial<SimpleGitOptions>) {\n const plugins = new PluginStore();\n const config = createInstanceConfig(\n baseDir && (typeof baseDir === 'string' ? {baseDir} : baseDir) || {},\n options\n );\n\n if (!folderExists(config.baseDir)) {\n throw new api.GitConstructError(config, `Cannot use simple-git on a directory that does not exist`);\n }\n\n if (Array.isArray(config.config)) {\n plugins.add(commandConfigPrefixingPlugin(config.config));\n }\n\n plugins.add(completionDetectionPlugin(config.completion));\n config.progress && plugins.add(progressMonitorPlugin(config.progress));\n config.timeout && plugins.add(timeoutPlugin(config.timeout));\n config.spawnOptions && plugins.add(spawnOptionsPlugin(config.spawnOptions));\n\n plugins.add(errorDetectionPlugin(errorDetectionHandler(true)));\n config.errors && plugins.add(errorDetectionPlugin(config.errors));\n\n return new Git(config, plugins);\n}\n", "import { SimpleGit, SimpleGitOptions } from '../../../typings';\n\nimport { GitResponseError } from '../errors/git-response-error';\nimport { gitInstanceFactory } from '../git-factory';\nimport { SimpleGitTaskCallback } from '../types';\n\nconst functionNamesBuilderApi = [\n 'customBinary', 'env', 'outputHandler', 'silent',\n];\n\nconst functionNamesPromiseApi = [\n 'add',\n 'addAnnotatedTag',\n 'addConfig',\n 'addRemote',\n 'addTag',\n 'applyPatch',\n 'binaryCatFile',\n 'branch',\n 'branchLocal',\n 'catFile',\n 'checkIgnore',\n 'checkIsRepo',\n 'checkout',\n 'checkoutBranch',\n 'checkoutLatestTag',\n 'checkoutLocalBranch',\n 'clean',\n 'clone',\n 'commit',\n 'cwd',\n 'deleteLocalBranch',\n 'deleteLocalBranches',\n 'diff',\n 'diffSummary',\n 'exec',\n 'fetch',\n 'getRemotes',\n 'init',\n 'listConfig',\n 'listRemote',\n 'log',\n 'merge',\n 'mergeFromTo',\n 'mirror',\n 'mv',\n 'pull',\n 'push',\n 'pushTags',\n 'raw',\n 'rebase',\n 'remote',\n 'removeRemote',\n 'reset',\n 'revert',\n 'revparse',\n 'rm',\n 'rmKeepLocal',\n 'show',\n 'stash',\n 'stashList',\n 'status',\n 'subModule',\n 'submoduleAdd',\n 'submoduleInit',\n 'submoduleUpdate',\n 'tag',\n 'tags',\n 'updateServerInfo'\n];\n\nexport function gitP(...args: [] | [string] | [Partial<SimpleGitOptions>] | [string, Partial<SimpleGitOptions>]): SimpleGit {\n\n let git: any;\n\n let chain = Promise.resolve();\n\n try {\n git = gitInstanceFactory(...args);\n } catch (e) {\n chain = Promise.reject(e);\n }\n\n function builderReturn() {\n return promiseApi;\n }\n\n function chainReturn() {\n return chain;\n }\n\n const promiseApi = [...functionNamesBuilderApi, ...functionNamesPromiseApi].reduce((api: any, name: string) => {\n const isAsync = functionNamesPromiseApi.includes(name);\n\n const valid = isAsync ? asyncWrapper(name, git) : syncWrapper(name, git, api);\n const alternative = isAsync ? chainReturn : builderReturn;\n\n Object.defineProperty(api, name, {\n enumerable: false,\n configurable: false,\n value: git ? valid : alternative,\n });\n\n return api;\n }, {});\n\n return promiseApi as SimpleGit;\n\n function asyncWrapper(fn: string, git: any): (...args: any[]) => Promise<any> {\n return function (...args: any[]) {\n if (typeof args[args.length] === 'function') {\n throw new TypeError(\n 'Promise interface requires that handlers are not supplied inline, ' +\n 'trailing function not allowed in call to ' + fn);\n }\n\n return chain.then(function () {\n return new Promise(function (resolve, reject) {\n const callback: SimpleGitTaskCallback = (err: Error | null, result?: any) => {\n if (err) {\n return reject(toError(err));\n }\n\n resolve(result);\n };\n args.push(callback);\n\n git[fn].apply(git, args);\n });\n });\n };\n }\n\n function syncWrapper(fn: string, git: any, api: SimpleGit) {\n return (...args: any[]) => {\n git[fn](...args);\n\n return api;\n };\n }\n}\n\nfunction toError(error: Error | string | any): Error {\n\n if (error instanceof Error) {\n return error;\n }\n\n if (typeof error === 'string') {\n return new Error(error);\n }\n\n return new GitResponseError(error);\n}\n", "\nconst {gitP} = require('./lib/runners/promise-wrapped');\nconst {esModuleFactory, gitInstanceFactory, gitExportFactory} = require('./lib/git-factory');\n\nmodule.exports = esModuleFactory(\n gitExportFactory(gitInstanceFactory, {gitP})\n);\n"],
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IA2BO;AA3BP;AAAA;AA2BO,6BAAuB,MAAM;AAAA,MAEjC,YACU,MACP,SACD;AACC,cAAM;AAHC;AAIP,eAAO,eAAe,MAAM,WAAW;AAAA;AAAA;AAAA;AAAA;;;AClC7C,IAsBO;AAtBP;AAAA;AAAA;AAsBO,qCAAwC,SAAS;AAAA,MAErD,YAImB,KAChB,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A,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA;AAAA;;;ACnEH,IAAM,EAAC,gBAAQ;AACf,IAAM,EAAC,mCAAiB,yCAAoB,wCAAoB;AAEhE,OAAO,UAAU,iBACd,kBAAiB,qBAAoB,EAAC;",
- "names": []
-}
diff --git a/node_modules/simple-git/esm/index.js b/node_modules/simple-git/esm/index.js
deleted file mode 100644
index 4714cdb..0000000
--- a/node_modules/simple-git/esm/index.js
+++ /dev/null
@@ -1,3763 +0,0 @@
-var __defProp = Object.defineProperty;
-var __defProps = Object.defineProperties;
-var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
-var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
-var __getOwnPropNames = Object.getOwnPropertyNames;
-var __getOwnPropSymbols = Object.getOwnPropertySymbols;
-var __hasOwnProp = Object.prototype.hasOwnProperty;
-var __propIsEnum = Object.prototype.propertyIsEnumerable;
-var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
-var __spreadValues = (a, b) => {
- for (var prop in b || (b = {}))
- if (__hasOwnProp.call(b, prop))
- __defNormalProp(a, prop, b[prop]);
- if (__getOwnPropSymbols)
- for (var prop of __getOwnPropSymbols(b)) {
- if (__propIsEnum.call(b, prop))
- __defNormalProp(a, prop, b[prop]);
- }
- return a;
-};
-var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
-var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
-var __esm = (fn, res) => function __init() {
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
-};
-var __commonJS = (cb, mod) => function __require() {
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
-};
-var __export = (target, all) => {
- for (var name in all)
- __defProp(target, name, { get: all[name], enumerable: true });
-};
-var __reExport = (target, module, copyDefault, desc) => {
- if (module && typeof module === "object" || typeof module === "function") {
- for (let key of __getOwnPropNames(module))
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
- __defProp(target, key, { get: () => module[key], enumerable: !(desc = __getOwnPropDesc(module, key)) || desc.enumerable });
- }
- return target;
-};
-var __toCommonJS = /* @__PURE__ */ ((cache) => {
- return (module, temp) => {
- return cache && cache.get(module) || (temp = __reExport(__markAsModule({}), module, 1), cache && cache.set(module, temp), temp);
- };
-})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
-var __async = (__this, __arguments, generator) => {
- return new Promise((resolve, reject) => {
- var fulfilled = (value) => {
- try {
- step(generator.next(value));
- } catch (e) {
- reject(e);
- }
- };
- var rejected = (value) => {
- try {
- step(generator.throw(value));
- } catch (e) {
- reject(e);
- }
- };
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
- step((generator = generator.apply(__this, __arguments)).next());
- });
-};
-
-// src/lib/errors/git-error.ts
-var GitError;
-var init_git_error = __esm({
- "src/lib/errors/git-error.ts"() {
- GitError = class extends Error {
- constructor(task, message) {
- super(message);
- this.task = task;
- Object.setPrototypeOf(this, new.target.prototype);
- }
- };
- }
-});
-
-// src/lib/errors/git-response-error.ts
-var GitResponseError;
-var init_git_response_error = __esm({
- "src/lib/errors/git-response-error.ts"() {
- init_git_error();
- GitResponseError = class extends GitError {
- constructor(git, message) {
- super(void 0, message || String(git));
- this.git = git;
- }
- };
- }
-});
-
-// src/lib/errors/task-configuration-error.ts
-var TaskConfigurationError;
-var init_task_configuration_error = __esm({
- "src/lib/errors/task-configuration-error.ts"() {
- init_git_error();
- TaskConfigurationError = class extends GitError {
- constructor(message) {
- super(void 0, message);
- }
- };
- }
-});
-
-// src/lib/utils/util.ts
-import { exists, FOLDER } from "@kwsites/file-exists";
-function asFunction(source) {
- return typeof source === "function" ? source : NOOP;
-}
-function isUserFunction(source) {
- return typeof source === "function" && source !== NOOP;
-}
-function splitOn(input, char) {
- const index = input.indexOf(char);
- if (index <= 0) {
- return [input, ""];
- }
- return [
- input.substr(0, index),
- input.substr(index + 1)
- ];
-}
-function first(input, offset = 0) {
- return isArrayLike(input) && input.length > offset ? input[offset] : void 0;
-}
-function last(input, offset = 0) {
- if (isArrayLike(input) && input.length > offset) {
- return input[input.length - 1 - offset];
- }
-}
-function isArrayLike(input) {
- return !!(input && typeof input.length === "number");
-}
-function toLinesWithContent(input = "", trimmed2 = true, separator = "\n") {
- return input.split(separator).reduce((output, line) => {
- const lineContent = trimmed2 ? line.trim() : line;
- if (lineContent) {
- output.push(lineContent);
- }
- return output;
- }, []);
-}
-function forEachLineWithContent(input, callback) {
- return toLinesWithContent(input, true).map((line) => callback(line));
-}
-function folderExists(path) {
- return exists(path, FOLDER);
-}
-function append(target, item) {
- if (Array.isArray(target)) {
- if (!target.includes(item)) {
- target.push(item);
- }
- } else {
- target.add(item);
- }
- return item;
-}
-function including(target, item) {
- if (Array.isArray(target) && !target.includes(item)) {
- target.push(item);
- }
- return target;
-}
-function remove(target, item) {
- if (Array.isArray(target)) {
- const index = target.indexOf(item);
- if (index >= 0) {
- target.splice(index, 1);
- }
- } else {
- target.delete(item);
- }
- return item;
-}
-function asArray(source) {
- return Array.isArray(source) ? source : [source];
-}
-function asStringArray(source) {
- return asArray(source).map(String);
-}
-function asNumber(source, onNaN = 0) {
- if (source == null) {
- return onNaN;
- }
- const num = parseInt(source, 10);
- return isNaN(num) ? onNaN : num;
-}
-function prefixedArray(input, prefix) {
- const output = [];
- for (let i = 0, max = input.length; i < max; i++) {
- output.push(prefix, input[i]);
- }
- return output;
-}
-function bufferToString(input) {
- return (Array.isArray(input) ? Buffer.concat(input) : input).toString("utf-8");
-}
-function pick(source, properties) {
- return Object.assign({}, ...properties.map((property) => property in source ? { [property]: source[property] } : {}));
-}
-function delay(duration = 0) {
- return new Promise((done) => setTimeout(done, duration));
-}
-var NULL, NOOP, objectToString;
-var init_util = __esm({
- "src/lib/utils/util.ts"() {
- NULL = "\0";
- NOOP = () => {
- };
- objectToString = Object.prototype.toString.call.bind(Object.prototype.toString);
- }
-});
-
-// src/lib/utils/argument-filters.ts
-function filterType(input, filter, def) {
- if (filter(input)) {
- return input;
- }
- return arguments.length > 2 ? def : void 0;
-}
-function filterPrimitives(input, omit) {
- return /number|string|boolean/.test(typeof input) && (!omit || !omit.includes(typeof input));
-}
-function filterPlainObject(input) {
- return !!input && objectToString(input) === "[object Object]";
-}
-function filterFunction(input) {
- return typeof input === "function";
-}
-var filterArray, filterString, filterStringArray, filterStringOrStringArray, filterHasLength;
-var init_argument_filters = __esm({
- "src/lib/utils/argument-filters.ts"() {
- init_util();
- filterArray = (input) => {
- return Array.isArray(input);
- };
- filterString = (input) => {
- return typeof input === "string";
- };
- filterStringArray = (input) => {
- return Array.isArray(input) && input.every(filterString);
- };
- filterStringOrStringArray = (input) => {
- return filterString(input) || Array.isArray(input) && input.every(filterString);
- };
- filterHasLength = (input) => {
- if (input == null || "number|boolean|function".includes(typeof input)) {
- return false;
- }
- return Array.isArray(input) || typeof input === "string" || typeof input.length === "number";
- };
- }
-});
-
-// src/lib/utils/exit-codes.ts
-var ExitCodes;
-var init_exit_codes = __esm({
- "src/lib/utils/exit-codes.ts"() {
- ExitCodes = /* @__PURE__ */ ((ExitCodes2) => {
- ExitCodes2[ExitCodes2["SUCCESS"] = 0] = "SUCCESS";
- ExitCodes2[ExitCodes2["ERROR"] = 1] = "ERROR";
- ExitCodes2[ExitCodes2["UNCLEAN"] = 128] = "UNCLEAN";
- return ExitCodes2;
- })(ExitCodes || {});
- }
-});
-
-// src/lib/utils/git-output-streams.ts
-var GitOutputStreams;
-var init_git_output_streams = __esm({
- "src/lib/utils/git-output-streams.ts"() {
- GitOutputStreams = class {
- constructor(stdOut, stdErr) {
- this.stdOut = stdOut;
- this.stdErr = stdErr;
- }
- asStrings() {
- return new GitOutputStreams(this.stdOut.toString("utf8"), this.stdErr.toString("utf8"));
- }
- };
- }
-});
-
-// src/lib/utils/line-parser.ts
-var LineParser, RemoteLineParser;
-var init_line_parser = __esm({
- "src/lib/utils/line-parser.ts"() {
- LineParser = class {
- constructor(regExp, useMatches) {
- this.matches = [];
- this.parse = (line, target) => {
- this.resetMatches();
- if (!this._regExp.every((reg, index) => this.addMatch(reg, index, line(index)))) {
- return false;
- }
- return this.useMatches(target, this.prepareMatches()) !== false;
- };
- this._regExp = Array.isArray(regExp) ? regExp : [regExp];
- if (useMatches) {
- this.useMatches = useMatches;
- }
- }
- useMatches(target, match) {
- throw new Error(`LineParser:useMatches not implemented`);
- }
- resetMatches() {
- this.matches.length = 0;
- }
- prepareMatches() {
- return this.matches;
- }
- addMatch(reg, index, line) {
- const matched = line && reg.exec(line);
- if (matched) {
- this.pushMatch(index, matched);
- }
- return !!matched;
- }
- pushMatch(_index, matched) {
- this.matches.push(...matched.slice(1));
- }
- };
- RemoteLineParser = class extends LineParser {
- addMatch(reg, index, line) {
- return /^remote:\s/.test(String(line)) && super.addMatch(reg, index, line);
- }
- pushMatch(index, matched) {
- if (index > 0 || matched.length > 1) {
- super.pushMatch(index, matched);
- }
- }
- };
- }
-});
-
-// src/lib/utils/simple-git-options.ts
-function createInstanceConfig(...options) {
- const baseDir = process.cwd();
- const config = Object.assign(__spreadValues({ baseDir }, defaultOptions), ...options.filter((o) => typeof o === "object" && o));
- config.baseDir = config.baseDir || baseDir;
- return config;
-}
-var defaultOptions;
-var init_simple_git_options = __esm({
- "src/lib/utils/simple-git-options.ts"() {
- defaultOptions = {
- binary: "git",
- maxConcurrentProcesses: 5,
- config: []
- };
- }
-});
-
-// src/lib/utils/task-options.ts
-function appendTaskOptions(options, commands = []) {
- if (!filterPlainObject(options)) {
- return commands;
- }
- return Object.keys(options).reduce((commands2, key) => {
- const value = options[key];
- if (filterPrimitives(value, ["boolean"])) {
- commands2.push(key + "=" + value);
- } else {
- commands2.push(key);
- }
- return commands2;
- }, commands);
-}
-function getTrailingOptions(args, initialPrimitive = 0, objectOnly = false) {
- const command = [];
- for (let i = 0, max = initialPrimitive < 0 ? args.length : initialPrimitive; i < max; i++) {
- if ("string|number".includes(typeof args[i])) {
- command.push(String(args[i]));
- }
- }
- appendTaskOptions(trailingOptionsArgument(args), command);
- if (!objectOnly) {
- command.push(...trailingArrayArgument(args));
- }
- return command;
-}
-function trailingArrayArgument(args) {
- const hasTrailingCallback = typeof last(args) === "function";
- return filterType(last(args, hasTrailingCallback ? 1 : 0), filterArray, []);
-}
-function trailingOptionsArgument(args) {
- const hasTrailingCallback = filterFunction(last(args));
- return filterType(last(args, hasTrailingCallback ? 1 : 0), filterPlainObject);
-}
-function trailingFunctionArgument(args, includeNoop = true) {
- const callback = asFunction(last(args));
- return includeNoop || isUserFunction(callback) ? callback : void 0;
-}
-var init_task_options = __esm({
- "src/lib/utils/task-options.ts"() {
- init_argument_filters();
- init_util();
- }
-});
-
-// src/lib/utils/task-parser.ts
-function callTaskParser(parser3, streams) {
- return parser3(streams.stdOut, streams.stdErr);
-}
-function parseStringResponse(result, parsers11, ...texts) {
- texts.forEach((text) => {
- for (let lines = toLinesWithContent(text), i = 0, max = lines.length; i < max; i++) {
- const line = (offset = 0) => {
- if (i + offset >= max) {
- return;
- }
- return lines[i + offset];
- };
- parsers11.some(({ parse }) => parse(line, result));
- }
- });
- return result;
-}
-var init_task_parser = __esm({
- "src/lib/utils/task-parser.ts"() {
- init_util();
- }
-});
-
-// src/lib/utils/index.ts
-var utils_exports = {};
-__export(utils_exports, {
- ExitCodes: () => ExitCodes,
- GitOutputStreams: () => GitOutputStreams,
- LineParser: () => LineParser,
- NOOP: () => NOOP,
- NULL: () => NULL,
- RemoteLineParser: () => RemoteLineParser,
- append: () => append,
- appendTaskOptions: () => appendTaskOptions,
- asArray: () => asArray,
- asFunction: () => asFunction,
- asNumber: () => asNumber,
- asStringArray: () => asStringArray,
- bufferToString: () => bufferToString,
- callTaskParser: () => callTaskParser,
- createInstanceConfig: () => createInstanceConfig,
- delay: () => delay,
- filterArray: () => filterArray,
- filterFunction: () => filterFunction,
- filterHasLength: () => filterHasLength,
- filterPlainObject: () => filterPlainObject,
- filterPrimitives: () => filterPrimitives,
- filterString: () => filterString,
- filterStringArray: () => filterStringArray,
- filterStringOrStringArray: () => filterStringOrStringArray,
- filterType: () => filterType,
- first: () => first,
- folderExists: () => folderExists,
- forEachLineWithContent: () => forEachLineWithContent,
- getTrailingOptions: () => getTrailingOptions,
- including: () => including,
- isUserFunction: () => isUserFunction,
- last: () => last,
- objectToString: () => objectToString,
- parseStringResponse: () => parseStringResponse,
- pick: () => pick,
- prefixedArray: () => prefixedArray,
- remove: () => remove,
- splitOn: () => splitOn,
- toLinesWithContent: () => toLinesWithContent,
- trailingFunctionArgument: () => trailingFunctionArgument,
- trailingOptionsArgument: () => trailingOptionsArgument
-});
-var init_utils = __esm({
- "src/lib/utils/index.ts"() {
- init_argument_filters();
- init_exit_codes();
- init_git_output_streams();
- init_line_parser();
- init_simple_git_options();
- init_task_options();
- init_task_parser();
- init_util();
- }
-});
-
-// src/lib/tasks/check-is-repo.ts
-var check_is_repo_exports = {};
-__export(check_is_repo_exports, {
- CheckRepoActions: () => CheckRepoActions,
- checkIsBareRepoTask: () => checkIsBareRepoTask,
- checkIsRepoRootTask: () => checkIsRepoRootTask,
- checkIsRepoTask: () => checkIsRepoTask
-});
-function checkIsRepoTask(action) {
- switch (action) {
- case "bare" /* BARE */:
- return checkIsBareRepoTask();
- case "root" /* IS_REPO_ROOT */:
- return checkIsRepoRootTask();
- }
- const commands = ["rev-parse", "--is-inside-work-tree"];
- return {
- commands,
- format: "utf-8",
- onError,
- parser
- };
-}
-function checkIsRepoRootTask() {
- const commands = ["rev-parse", "--git-dir"];
- return {
- commands,
- format: "utf-8",
- onError,
- parser(path) {
- return /^\.(git)?$/.test(path.trim());
- }
- };
-}
-function checkIsBareRepoTask() {
- const commands = ["rev-parse", "--is-bare-repository"];
- return {
- commands,
- format: "utf-8",
- onError,
- parser
- };
-}
-function isNotRepoMessage(error) {
- return /(Not a git repository|Kein Git-Repository)/i.test(String(error));
-}
-var CheckRepoActions, onError, parser;
-var init_check_is_repo = __esm({
- "src/lib/tasks/check-is-repo.ts"() {
- init_utils();
- CheckRepoActions = /* @__PURE__ */ ((CheckRepoActions2) => {
- CheckRepoActions2["BARE"] = "bare";
- CheckRepoActions2["IN_TREE"] = "tree";
- CheckRepoActions2["IS_REPO_ROOT"] = "root";
- return CheckRepoActions2;
- })(CheckRepoActions || {});
- onError = ({ exitCode }, error, done, fail) => {
- if (exitCode === 128 /* UNCLEAN */ && isNotRepoMessage(error)) {
- return done(Buffer.from("false"));
- }
- fail(error);
- };
- parser = (text) => {
- return text.trim() === "true";
- };
- }
-});
-
-// src/lib/responses/CleanSummary.ts
-function cleanSummaryParser(dryRun, text) {
- const summary = new CleanResponse(dryRun);
- const regexp = dryRun ? dryRunRemovalRegexp : removalRegexp;
- toLinesWithContent(text).forEach((line) => {
- const removed = line.replace(regexp, "");
- summary.paths.push(removed);
- (isFolderRegexp.test(removed) ? summary.folders : summary.files).push(removed);
- });
- return summary;
-}
-var CleanResponse, removalRegexp, dryRunRemovalRegexp, isFolderRegexp;
-var init_CleanSummary = __esm({
- "src/lib/responses/CleanSummary.ts"() {
- init_utils();
- CleanResponse = class {
- constructor(dryRun) {
- this.dryRun = dryRun;
- this.paths = [];
- this.files = [];
- this.folders = [];
- }
- };
- removalRegexp = /^[a-z]+\s*/i;
- dryRunRemovalRegexp = /^[a-z]+\s+[a-z]+\s*/i;
- isFolderRegexp = /\/$/;
- }
-});
-
-// src/lib/tasks/task.ts
-var task_exports = {};
-__export(task_exports, {
- EMPTY_COMMANDS: () => EMPTY_COMMANDS,
- adhocExecTask: () => adhocExecTask,
- configurationErrorTask: () => configurationErrorTask,
- isBufferTask: () => isBufferTask,
- isEmptyTask: () => isEmptyTask,
- straightThroughBufferTask: () => straightThroughBufferTask,
- straightThroughStringTask: () => straightThroughStringTask
-});
-function adhocExecTask(parser3) {
- return {
- commands: EMPTY_COMMANDS,
- format: "empty",
- parser: parser3
- };
-}
-function configurationErrorTask(error) {
- return {
- commands: EMPTY_COMMANDS,
- format: "empty",
- parser() {
- throw typeof error === "string" ? new TaskConfigurationError(error) : error;
- }
- };
-}
-function straightThroughStringTask(commands, trimmed2 = false) {
- return {
- commands,
- format: "utf-8",
- parser(text) {
- return trimmed2 ? String(text).trim() : text;
- }
- };
-}
-function straightThroughBufferTask(commands) {
- return {
- commands,
- format: "buffer",
- parser(buffer) {
- return buffer;
- }
- };
-}
-function isBufferTask(task) {
- return task.format === "buffer";
-}
-function isEmptyTask(task) {
- return task.format === "empty" || !task.commands.length;
-}
-var EMPTY_COMMANDS;
-var init_task = __esm({
- "src/lib/tasks/task.ts"() {
- init_task_configuration_error();
- EMPTY_COMMANDS = [];
- }
-});
-
-// src/lib/tasks/clean.ts
-var clean_exports = {};
-__export(clean_exports, {
- CONFIG_ERROR_INTERACTIVE_MODE: () => CONFIG_ERROR_INTERACTIVE_MODE,
- CONFIG_ERROR_MODE_REQUIRED: () => CONFIG_ERROR_MODE_REQUIRED,
- CONFIG_ERROR_UNKNOWN_OPTION: () => CONFIG_ERROR_UNKNOWN_OPTION,
- CleanOptions: () => CleanOptions,
- cleanTask: () => cleanTask,
- cleanWithOptionsTask: () => cleanWithOptionsTask,
- isCleanOptionsArray: () => isCleanOptionsArray
-});
-function cleanWithOptionsTask(mode, customArgs) {
- const { cleanMode, options, valid } = getCleanOptions(mode);
- if (!cleanMode) {
- return configurationErrorTask(CONFIG_ERROR_MODE_REQUIRED);
- }
- if (!valid.options) {
- return configurationErrorTask(CONFIG_ERROR_UNKNOWN_OPTION + JSON.stringify(mode));
- }
- options.push(...customArgs);
- if (options.some(isInteractiveMode)) {
- return configurationErrorTask(CONFIG_ERROR_INTERACTIVE_MODE);
- }
- return cleanTask(cleanMode, options);
-}
-function cleanTask(mode, customArgs) {
- const commands = ["clean", `-${mode}`, ...customArgs];
- return {
- commands,
- format: "utf-8",
- parser(text) {
- return cleanSummaryParser(mode === "n" /* DRY_RUN */, text);
- }
- };
-}
-function isCleanOptionsArray(input) {
- return Array.isArray(input) && input.every((test) => CleanOptionValues.has(test));
-}
-function getCleanOptions(input) {
- let cleanMode;
- let options = [];
- let valid = { cleanMode: false, options: true };
- input.replace(/[^a-z]i/g, "").split("").forEach((char) => {
- if (isCleanMode(char)) {
- cleanMode = char;
- valid.cleanMode = true;
- } else {
- valid.options = valid.options && isKnownOption(options[options.length] = `-${char}`);
- }
- });
- return {
- cleanMode,
- options,
- valid
- };
-}
-function isCleanMode(cleanMode) {
- return cleanMode === "f" /* FORCE */ || cleanMode === "n" /* DRY_RUN */;
-}
-function isKnownOption(option) {
- return /^-[a-z]$/i.test(option) && CleanOptionValues.has(option.charAt(1));
-}
-function isInteractiveMode(option) {
- if (/^-[^\-]/.test(option)) {
- return option.indexOf("i") > 0;
- }
- return option === "--interactive";
-}
-var CONFIG_ERROR_INTERACTIVE_MODE, CONFIG_ERROR_MODE_REQUIRED, CONFIG_ERROR_UNKNOWN_OPTION, CleanOptions, CleanOptionValues;
-var init_clean = __esm({
- "src/lib/tasks/clean.ts"() {
- init_CleanSummary();
- init_utils();
- init_task();
- CONFIG_ERROR_INTERACTIVE_MODE = "Git clean interactive mode is not supported";
- CONFIG_ERROR_MODE_REQUIRED = 'Git clean mode parameter ("n" or "f") is required';
- CONFIG_ERROR_UNKNOWN_OPTION = "Git clean unknown option found in: ";
- CleanOptions = /* @__PURE__ */ ((CleanOptions2) => {
- CleanOptions2["DRY_RUN"] = "n";
- CleanOptions2["FORCE"] = "f";
- CleanOptions2["IGNORED_INCLUDED"] = "x";
- CleanOptions2["IGNORED_ONLY"] = "X";
- CleanOptions2["EXCLUDING"] = "e";
- CleanOptions2["QUIET"] = "q";
- CleanOptions2["RECURSIVE"] = "d";
- return CleanOptions2;
- })(CleanOptions || {});
- CleanOptionValues = /* @__PURE__ */ new Set(["i", ...asStringArray(Object.values(CleanOptions))]);
- }
-});
-
-// src/lib/responses/ConfigList.ts
-function configListParser(text) {
- const config = new ConfigList();
- for (const item of configParser(text)) {
- config.addValue(item.file, String(item.key), item.value);
- }
- return config;
-}
-function configGetParser(text, key) {
- let value = null;
- const values = [];
- const scopes = /* @__PURE__ */ new Map();
- for (const item of configParser(text, key)) {
- if (item.key !== key) {
- continue;
- }
- values.push(value = item.value);
- if (!scopes.has(item.file)) {
- scopes.set(item.file, []);
- }
- scopes.get(item.file).push(value);
- }
- return {
- key,
- paths: Array.from(scopes.keys()),
- scopes,
- value,
- values
- };
-}
-function configFilePath(filePath) {
- return filePath.replace(/^(file):/, "");
-}
-function* configParser(text, requestedKey = null) {
- const lines = text.split("\0");
- for (let i = 0, max = lines.length - 1; i < max; ) {
- const file = configFilePath(lines[i++]);
- let value = lines[i++];
- let key = requestedKey;
- if (value.includes("\n")) {
- const line = splitOn(value, "\n");
- key = line[0];
- value = line[1];
- }
- yield { file, key, value };
- }
-}
-var ConfigList;
-var init_ConfigList = __esm({
- "src/lib/responses/ConfigList.ts"() {
- init_utils();
- ConfigList = class {
- constructor() {
- this.files = [];
- this.values = /* @__PURE__ */ Object.create(null);
- }
- get all() {
- if (!this._all) {
- this._all = this.files.reduce((all, file) => {
- return Object.assign(all, this.values[file]);
- }, {});
- }
- return this._all;
- }
- addFile(file) {
- if (!(file in this.values)) {
- const latest = last(this.files);
- this.values[file] = latest ? Object.create(this.values[latest]) : {};
- this.files.push(file);
- }
- return this.values[file];
- }
- addValue(file, key, value) {
- const values = this.addFile(file);
- if (!values.hasOwnProperty(key)) {
- values[key] = value;
- } else if (Array.isArray(values[key])) {
- values[key].push(value);
- } else {
- values[key] = [values[key], value];
- }
- this._all = void 0;
- }
- };
- }
-});
-
-// src/lib/tasks/config.ts
-function asConfigScope(scope, fallback) {
- if (typeof scope === "string" && GitConfigScope.hasOwnProperty(scope)) {
- return scope;
- }
- return fallback;
-}
-function addConfigTask(key, value, append2, scope) {
- const commands = ["config", `--${scope}`];
- if (append2) {
- commands.push("--add");
- }
- commands.push(key, value);
- return {
- commands,
- format: "utf-8",
- parser(text) {
- return text;
- }
- };
-}
-function getConfigTask(key, scope) {
- const commands = ["config", "--null", "--show-origin", "--get-all", key];
- if (scope) {
- commands.splice(1, 0, `--${scope}`);
- }
- return {
- commands,
- format: "utf-8",
- parser(text) {
- return configGetParser(text, key);
- }
- };
-}
-function listConfigTask(scope) {
- const commands = ["config", "--list", "--show-origin", "--null"];
- if (scope) {
- commands.push(`--${scope}`);
- }
- return {
- commands,
- format: "utf-8",
- parser(text) {
- return configListParser(text);
- }
- };
-}
-function config_default() {
- return {
- addConfig(key, value, ...rest) {
- return this._runTask(addConfigTask(key, value, rest[0] === true, asConfigScope(rest[1], "local" /* local */)), trailingFunctionArgument(arguments));
- },
- getConfig(key, scope) {
- return this._runTask(getConfigTask(key, asConfigScope(scope, void 0)), trailingFunctionArgument(arguments));
- },
- listConfig(...rest) {
- return this._runTask(listConfigTask(asConfigScope(rest[0], void 0)), trailingFunctionArgument(arguments));
- }
- };
-}
-var GitConfigScope;
-var init_config = __esm({
- "src/lib/tasks/config.ts"() {
- init_ConfigList();
- init_utils();
- GitConfigScope = /* @__PURE__ */ ((GitConfigScope2) => {
- GitConfigScope2["system"] = "system";
- GitConfigScope2["global"] = "global";
- GitConfigScope2["local"] = "local";
- GitConfigScope2["worktree"] = "worktree";
- return GitConfigScope2;
- })(GitConfigScope || {});
- }
-});
-
-// src/lib/tasks/grep.ts
-function grepQueryBuilder(...params) {
- return new GrepQuery().param(...params);
-}
-function parseGrep(grep) {
- const paths = /* @__PURE__ */ new Set();
- const results = {};
- forEachLineWithContent(grep, (input) => {
- const [path, line, preview] = input.split(NULL);
- paths.add(path);
- (results[path] = results[path] || []).push({
- line: asNumber(line),
- path,
- preview
- });
- });
- return {
- paths,
- results
- };
-}
-function grep_default() {
- return {
- grep(searchTerm) {
- const then = trailingFunctionArgument(arguments);
- const options = getTrailingOptions(arguments);
- for (const option of disallowedOptions) {
- if (options.includes(option)) {
- return this._runTask(configurationErrorTask(`git.grep: use of "${option}" is not supported.`), then);
- }
- }
- if (typeof searchTerm === "string") {
- searchTerm = grepQueryBuilder().param(searchTerm);
- }
- const commands = ["grep", "--null", "-n", "--full-name", ...options, ...searchTerm];
- return this._runTask({
- commands,
- format: "utf-8",
- parser(stdOut) {
- return parseGrep(stdOut);
- }
- }, then);
- }
- };
-}
-var disallowedOptions, Query, _a, GrepQuery;
-var init_grep = __esm({
- "src/lib/tasks/grep.ts"() {
- init_utils();
- init_task();
- disallowedOptions = ["-h"];
- Query = Symbol("grepQuery");
- GrepQuery = class {
- constructor() {
- this[_a] = [];
- }
- *[(_a = Query, Symbol.iterator)]() {
- for (const query of this[Query]) {
- yield query;
- }
- }
- and(...and) {
- and.length && this[Query].push("--and", "(", ...prefixedArray(and, "-e"), ")");
- return this;
- }
- param(...param) {
- this[Query].push(...prefixedArray(param, "-e"));
- return this;
- }
- };
- }
-});
-
-// src/lib/tasks/reset.ts
-var reset_exports = {};
-__export(reset_exports, {
- ResetMode: () => ResetMode,
- getResetMode: () => getResetMode,
- resetTask: () => resetTask
-});
-function resetTask(mode, customArgs) {
- const commands = ["reset"];
- if (isValidResetMode(mode)) {
- commands.push(`--${mode}`);
- }
- commands.push(...customArgs);
- return straightThroughStringTask(commands);
-}
-function getResetMode(mode) {
- if (isValidResetMode(mode)) {
- return mode;
- }
- switch (typeof mode) {
- case "string":
- case "undefined":
- return "soft" /* SOFT */;
- }
- return;
-}
-function isValidResetMode(mode) {
- return ResetModes.includes(mode);
-}
-var ResetMode, ResetModes;
-var init_reset = __esm({
- "src/lib/tasks/reset.ts"() {
- init_task();
- ResetMode = /* @__PURE__ */ ((ResetMode2) => {
- ResetMode2["MIXED"] = "mixed";
- ResetMode2["SOFT"] = "soft";
- ResetMode2["HARD"] = "hard";
- ResetMode2["MERGE"] = "merge";
- ResetMode2["KEEP"] = "keep";
- return ResetMode2;
- })(ResetMode || {});
- ResetModes = Array.from(Object.values(ResetMode));
- }
-});
-
-// src/lib/git-logger.ts
-import debug from "debug";
-function createLog() {
- return debug("simple-git");
-}
-function prefixedLogger(to, prefix, forward) {
- if (!prefix || !String(prefix).replace(/\s*/, "")) {
- return !forward ? to : (message, ...args) => {
- to(message, ...args);
- forward(message, ...args);
- };
- }
- return (message, ...args) => {
- to(`%s ${message}`, prefix, ...args);
- if (forward) {
- forward(message, ...args);
- }
- };
-}
-function childLoggerName(name, childDebugger, { namespace: parentNamespace }) {
- if (typeof name === "string") {
- return name;
- }
- const childNamespace = childDebugger && childDebugger.namespace || "";
- if (childNamespace.startsWith(parentNamespace)) {
- return childNamespace.substr(parentNamespace.length + 1);
- }
- return childNamespace || parentNamespace;
-}
-function createLogger(label, verbose, initialStep, infoDebugger = createLog()) {
- const labelPrefix = label && `[${label}]` || "";
- const spawned = [];
- const debugDebugger = typeof verbose === "string" ? infoDebugger.extend(verbose) : verbose;
- const key = childLoggerName(filterType(verbose, filterString), debugDebugger, infoDebugger);
- return step(initialStep);
- function sibling(name, initial) {
- return append(spawned, createLogger(label, key.replace(/^[^:]+/, name), initial, infoDebugger));
- }
- function step(phase) {
- const stepPrefix = phase && `[${phase}]` || "";
- const debug2 = debugDebugger && prefixedLogger(debugDebugger, stepPrefix) || NOOP;
- const info = prefixedLogger(infoDebugger, `${labelPrefix} ${stepPrefix}`, debug2);
- return Object.assign(debugDebugger ? debug2 : info, {
- label,
- sibling,
- info,
- step
- });
- }
-}
-var init_git_logger = __esm({
- "src/lib/git-logger.ts"() {
- init_utils();
- debug.formatters.L = (value) => String(filterHasLength(value) ? value.length : "-");
- debug.formatters.B = (value) => {
- if (Buffer.isBuffer(value)) {
- return value.toString("utf8");
- }
- return objectToString(value);
- };
- }
-});
-
-// src/lib/runners/tasks-pending-queue.ts
-var _TasksPendingQueue, TasksPendingQueue;
-var init_tasks_pending_queue = __esm({
- "src/lib/runners/tasks-pending-queue.ts"() {
- init_git_error();
- init_git_logger();
- _TasksPendingQueue = class {
- constructor(logLabel = "GitExecutor") {
- this.logLabel = logLabel;
- this._queue = /* @__PURE__ */ new Map();
- }
- withProgress(task) {
- return this._queue.get(task);
- }
- createProgress(task) {
- const name = _TasksPendingQueue.getName(task.commands[0]);
- const logger = createLogger(this.logLabel, name);
- return {
- task,
- logger,
- name
- };
- }
- push(task) {
- const progress = this.createProgress(task);
- progress.logger("Adding task to the queue, commands = %o", task.commands);
- this._queue.set(task, progress);
- return progress;
- }
- fatal(err) {
- for (const [task, { logger }] of Array.from(this._queue.entries())) {
- if (task === err.task) {
- logger.info(`Failed %o`, err);
- logger(`Fatal exception, any as-yet un-started tasks run through this executor will not be attempted`);
- } else {
- logger.info(`A fatal exception occurred in a previous task, the queue has been purged: %o`, err.message);
- }
- this.complete(task);
- }
- if (this._queue.size !== 0) {
- throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`);
- }
- }
- complete(task) {
- const progress = this.withProgress(task);
- if (progress) {
- this._queue.delete(task);
- }
- }
- attempt(task) {
- const progress = this.withProgress(task);
- if (!progress) {
- throw new GitError(void 0, "TasksPendingQueue: attempt called for an unknown task");
- }
- progress.logger("Starting task");
- return progress;
- }
- static getName(name = "empty") {
- return `task:${name}:${++_TasksPendingQueue.counter}`;
- }
- };
- TasksPendingQueue = _TasksPendingQueue;
- TasksPendingQueue.counter = 0;
- }
-});
-
-// src/lib/runners/git-executor-chain.ts
-import { spawn } from "child_process";
-function pluginContext(task, commands) {
- return {
- method: first(task.commands) || "",
- commands
- };
-}
-function onErrorReceived(target, logger) {
- return (err) => {
- logger(`[ERROR] child process exception %o`, err);
- target.push(Buffer.from(String(err.stack), "ascii"));
- };
-}
-function onDataReceived(target, name, logger, output) {
- return (buffer) => {
- logger(`%s received %L bytes`, name, buffer);
- output(`%B`, buffer);
- target.push(buffer);
- };
-}
-var GitExecutorChain;
-var init_git_executor_chain = __esm({
- "src/lib/runners/git-executor-chain.ts"() {
- init_git_error();
- init_task();
- init_utils();
- init_tasks_pending_queue();
- GitExecutorChain = class {
- constructor(_executor, _scheduler, _plugins) {
- this._executor = _executor;
- this._scheduler = _scheduler;
- this._plugins = _plugins;
- this._chain = Promise.resolve();
- this._queue = new TasksPendingQueue();
- }
- get binary() {
- return this._executor.binary;
- }
- get cwd() {
- return this._cwd || this._executor.cwd;
- }
- set cwd(cwd) {
- this._cwd = cwd;
- }
- get env() {
- return this._executor.env;
- }
- get outputHandler() {
- return this._executor.outputHandler;
- }
- chain() {
- return this;
- }
- push(task) {
- this._queue.push(task);
- return this._chain = this._chain.then(() => this.attemptTask(task));
- }
- attemptTask(task) {
- return __async(this, null, function* () {
- const onScheduleComplete = yield this._scheduler.next();
- const onQueueComplete = () => this._queue.complete(task);
- try {
- const { logger } = this._queue.attempt(task);
- return yield isEmptyTask(task) ? this.attemptEmptyTask(task, logger) : this.attemptRemoteTask(task, logger);
- } catch (e) {
- throw this.onFatalException(task, e);
- } finally {
- onQueueComplete();
- onScheduleComplete();
- }
- });
- }
- onFatalException(task, e) {
- const gitError = e instanceof GitError ? Object.assign(e, { task }) : new GitError(task, e && String(e));
- this._chain = Promise.resolve();
- this._queue.fatal(gitError);
- return gitError;
- }
- attemptRemoteTask(task, logger) {
- return __async(this, null, function* () {
- const args = this._plugins.exec("spawn.args", [...task.commands], pluginContext(task, task.commands));
- const raw = yield this.gitResponse(task, this.binary, args, this.outputHandler, logger.step("SPAWN"));
- const outputStreams = yield this.handleTaskData(task, args, raw, logger.step("HANDLE"));
- logger(`passing response to task's parser as a %s`, task.format);
- if (isBufferTask(task)) {
- return callTaskParser(task.parser, outputStreams);
- }
- return callTaskParser(task.parser, outputStreams.asStrings());
- });
- }
- attemptEmptyTask(task, logger) {
- return __async(this, null, function* () {
- logger(`empty task bypassing child process to call to task's parser`);
- return task.parser(this);
- });
- }
- handleTaskData(task, args, result, logger) {
- const { exitCode, rejection, stdOut, stdErr } = result;
- return new Promise((done, fail) => {
- logger(`Preparing to handle process response exitCode=%d stdOut=`, exitCode);
- const { error } = this._plugins.exec("task.error", { error: rejection }, __spreadValues(__spreadValues({}, pluginContext(task, args)), result));
- if (error && task.onError) {
- logger.info(`exitCode=%s handling with custom error handler`);
- return task.onError(result, error, (newStdOut) => {
- logger.info(`custom error handler treated as success`);
- logger(`custom error returned a %s`, objectToString(newStdOut));
- done(new GitOutputStreams(Array.isArray(newStdOut) ? Buffer.concat(newStdOut) : newStdOut, Buffer.concat(stdErr)));
- }, fail);
- }
- if (error) {
- logger.info(`handling as error: exitCode=%s stdErr=%s rejection=%o`, exitCode, stdErr.length, rejection);
- return fail(error);
- }
- logger.info(`retrieving task output complete`);
- done(new GitOutputStreams(Buffer.concat(stdOut), Buffer.concat(stdErr)));
- });
- }
- gitResponse(task, command, args, outputHandler, logger) {
- return __async(this, null, function* () {
- const outputLogger = logger.sibling("output");
- const spawnOptions = this._plugins.exec("spawn.options", {
- cwd: this.cwd,
- env: this.env,
- windowsHide: true
- }, pluginContext(task, task.commands));
- return new Promise((done) => {
- const stdOut = [];
- const stdErr = [];
- let rejection;
- logger.info(`%s %o`, command, args);
- logger("%O", spawnOptions);
- const spawned = spawn(command, args, spawnOptions);
- spawned.stdout.on("data", onDataReceived(stdOut, "stdOut", logger, outputLogger.step("stdOut")));
- spawned.stderr.on("data", onDataReceived(stdErr, "stdErr", logger, outputLogger.step("stdErr")));
- spawned.on("error", onErrorReceived(stdErr, logger));
- if (outputHandler) {
- logger(`Passing child process stdOut/stdErr to custom outputHandler`);
- outputHandler(command, spawned.stdout, spawned.stderr, [...args]);
- }
- this._plugins.exec("spawn.after", void 0, __spreadProps(__spreadValues({}, pluginContext(task, args)), {
- spawned,
- close(exitCode, reason) {
- done({
- stdOut,
- stdErr,
- exitCode,
- rejection: rejection || reason
- });
- },
- kill(reason) {
- if (spawned.killed) {
- return;
- }
- rejection = reason;
- spawned.kill("SIGINT");
- }
- }));
- });
- });
- }
- };
- }
-});
-
-// src/lib/runners/git-executor.ts
-var git_executor_exports = {};
-__export(git_executor_exports, {
- GitExecutor: () => GitExecutor
-});
-var GitExecutor;
-var init_git_executor = __esm({
- "src/lib/runners/git-executor.ts"() {
- init_git_executor_chain();
- GitExecutor = class {
- constructor(binary = "git", cwd, _scheduler, _plugins) {
- this.binary = binary;
- this.cwd = cwd;
- this._scheduler = _scheduler;
- this._plugins = _plugins;
- this._chain = new GitExecutorChain(this, this._scheduler, this._plugins);
- }
- chain() {
- return new GitExecutorChain(this, this._scheduler, this._plugins);
- }
- push(task) {
- return this._chain.push(task);
- }
- };
- }
-});
-
-// src/lib/task-callback.ts
-function taskCallback(task, response, callback = NOOP) {
- const onSuccess = (data) => {
- callback(null, data);
- };
- const onError2 = (err) => {
- if ((err == null ? void 0 : err.task) === task) {
- callback(err instanceof GitResponseError ? addDeprecationNoticeToError(err) : err, void 0);
- }
- };
- response.then(onSuccess, onError2);
-}
-function addDeprecationNoticeToError(err) {
- let log = (name) => {
- console.warn(`simple-git deprecation notice: accessing GitResponseError.${name} should be GitResponseError.git.${name}, this will no longer be available in version 3`);
- log = NOOP;
- };
- return Object.create(err, Object.getOwnPropertyNames(err.git).reduce(descriptorReducer, {}));
- function descriptorReducer(all, name) {
- if (name in err) {
- return all;
- }
- all[name] = {
- enumerable: false,
- configurable: false,
- get() {
- log(name);
- return err.git[name];
- }
- };
- return all;
- }
-}
-var init_task_callback = __esm({
- "src/lib/task-callback.ts"() {
- init_git_response_error();
- init_utils();
- }
-});
-
-// src/lib/tasks/change-working-directory.ts
-function changeWorkingDirectoryTask(directory, root) {
- return adhocExecTask((instance) => {
- if (!folderExists(directory)) {
- throw new Error(`Git.cwd: cannot change to non-directory "${directory}"`);
- }
- return (root || instance).cwd = directory;
- });
-}
-var init_change_working_directory = __esm({
- "src/lib/tasks/change-working-directory.ts"() {
- init_utils();
- init_task();
- }
-});
-
-// src/lib/tasks/hash-object.ts
-function hashObjectTask(filePath, write) {
- const commands = ["hash-object", filePath];
- if (write) {
- commands.push("-w");
- }
- return straightThroughStringTask(commands, true);
-}
-var init_hash_object = __esm({
- "src/lib/tasks/hash-object.ts"() {
- init_task();
- }
-});
-
-// src/lib/responses/InitSummary.ts
-function parseInit(bare, path, text) {
- const response = String(text).trim();
- let result;
- if (result = initResponseRegex.exec(response)) {
- return new InitSummary(bare, path, false, result[1]);
- }
- if (result = reInitResponseRegex.exec(response)) {
- return new InitSummary(bare, path, true, result[1]);
- }
- let gitDir = "";
- const tokens = response.split(" ");
- while (tokens.length) {
- const token = tokens.shift();
- if (token === "in") {
- gitDir = tokens.join(" ");
- break;
- }
- }
- return new InitSummary(bare, path, /^re/i.test(response), gitDir);
-}
-var InitSummary, initResponseRegex, reInitResponseRegex;
-var init_InitSummary = __esm({
- "src/lib/responses/InitSummary.ts"() {
- InitSummary = class {
- constructor(bare, path, existing, gitDir) {
- this.bare = bare;
- this.path = path;
- this.existing = existing;
- this.gitDir = gitDir;
- }
- };
- initResponseRegex = /^Init.+ repository in (.+)$/;
- reInitResponseRegex = /^Rein.+ in (.+)$/;
- }
-});
-
-// src/lib/tasks/init.ts
-function hasBareCommand(command) {
- return command.includes(bareCommand);
-}
-function initTask(bare = false, path, customArgs) {
- const commands = ["init", ...customArgs];
- if (bare && !hasBareCommand(commands)) {
- commands.splice(1, 0, bareCommand);
- }
- return {
- commands,
- format: "utf-8",
- parser(text) {
- return parseInit(commands.includes("--bare"), path, text);
- }
- };
-}
-var bareCommand;
-var init_init = __esm({
- "src/lib/tasks/init.ts"() {
- init_InitSummary();
- bareCommand = "--bare";
- }
-});
-
-// src/lib/responses/DiffSummary.ts
-var DiffSummary;
-var init_DiffSummary = __esm({
- "src/lib/responses/DiffSummary.ts"() {
- DiffSummary = class {
- constructor() {
- this.changed = 0;
- this.deletions = 0;
- this.insertions = 0;
- this.files = [];
- }
- };
- }
-});
-
-// src/lib/parsers/parse-diff-summary.ts
-function parseDiffResult(stdOut) {
- const lines = stdOut.trim().split("\n");
- const status = new DiffSummary();
- readSummaryLine(status, lines.pop());
- for (let i = 0, max = lines.length; i < max; i++) {
- const line = lines[i];
- textFileChange(line, status) || binaryFileChange(line, status);
- }
- return status;
-}
-function readSummaryLine(status, summary) {
- (summary || "").trim().split(", ").forEach(function(text) {
- const summary2 = /(\d+)\s([a-z]+)/.exec(text);
- if (!summary2) {
- return;
- }
- summaryType(status, summary2[2], parseInt(summary2[1], 10));
- });
-}
-function summaryType(status, key, value) {
- const match = /([a-z]+?)s?\b/.exec(key);
- if (!match || !statusUpdate[match[1]]) {
- return;
- }
- statusUpdate[match[1]](status, value);
-}
-function textFileChange(input, { files }) {
- const line = input.trim().match(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/);
- if (line) {
- var alterations = (line[3] || "").trim();
- files.push({
- file: line[1].trim(),
- changes: parseInt(line[2], 10),
- insertions: alterations.replace(/-/g, "").length,
- deletions: alterations.replace(/\+/g, "").length,
- binary: false
- });
- return true;
- }
- return false;
-}
-function binaryFileChange(input, { files }) {
- const line = input.match(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)$/);
- if (line) {
- files.push({
- file: line[1].trim(),
- before: +line[2],
- after: +line[3],
- binary: true
- });
- return true;
- }
- return false;
-}
-var statusUpdate;
-var init_parse_diff_summary = __esm({
- "src/lib/parsers/parse-diff-summary.ts"() {
- init_DiffSummary();
- statusUpdate = {
- file(status, value) {
- status.changed = value;
- },
- deletion(status, value) {
- status.deletions = value;
- },
- insertion(status, value) {
- status.insertions = value;
- }
- };
- }
-});
-
-// src/lib/parsers/parse-list-log-summary.ts
-function lineBuilder(tokens, fields) {
- return fields.reduce((line, field, index) => {
- line[field] = tokens[index] || "";
- return line;
- }, /* @__PURE__ */ Object.create({ diff: null }));
-}
-function createListLogSummaryParser(splitter = SPLITTER, fields = defaultFieldNames) {
- return function(stdOut) {
- const all = toLinesWithContent(stdOut, true, START_BOUNDARY).map(function(item) {
- const lineDetail = item.trim().split(COMMIT_BOUNDARY);
- const listLogLine = lineBuilder(lineDetail[0].trim().split(splitter), fields);
- if (lineDetail.length > 1 && !!lineDetail[1].trim()) {
- listLogLine.diff = parseDiffResult(lineDetail[1]);
- }
- return listLogLine;
- });
- return {
- all,
- latest: all.length && all[0] || null,
- total: all.length
- };
- };
-}
-var START_BOUNDARY, COMMIT_BOUNDARY, SPLITTER, defaultFieldNames;
-var init_parse_list_log_summary = __esm({
- "src/lib/parsers/parse-list-log-summary.ts"() {
- init_utils();
- init_parse_diff_summary();
- START_BOUNDARY = "\xF2\xF2\xF2\xF2\xF2\xF2 ";
- COMMIT_BOUNDARY = " \xF2\xF2";
- SPLITTER = " \xF2 ";
- defaultFieldNames = ["hash", "date", "message", "refs", "author_name", "author_email"];
- }
-});
-
-// src/lib/tasks/log.ts
-function prettyFormat(format, splitter) {
- const fields = [];
- const formatStr = [];
- Object.keys(format).forEach((field) => {
- fields.push(field);
- formatStr.push(String(format[field]));
- });
- return [
- fields,
- formatStr.join(splitter)
- ];
-}
-function userOptions(input) {
- const output = __spreadValues({}, input);
- Object.keys(input).forEach((key) => {
- if (key in excludeOptions) {
- delete output[key];
- }
- });
- return output;
-}
-function parseLogOptions(opt = {}, customArgs = []) {
- const splitter = opt.splitter || SPLITTER;
- const format = opt.format || {
- hash: "%H",
- date: opt.strictDate === false ? "%ai" : "%aI",
- message: "%s",
- refs: "%D",
- body: opt.multiLine ? "%B" : "%b",
- author_name: opt.mailMap !== false ? "%aN" : "%an",
- author_email: opt.mailMap !== false ? "%aE" : "%ae"
- };
- const [fields, formatStr] = prettyFormat(format, splitter);
- const suffix = [];
- const command = [
- `--pretty=format:${START_BOUNDARY}${formatStr}${COMMIT_BOUNDARY}`,
- ...customArgs
- ];
- const maxCount = opt.n || opt["max-count"] || opt.maxCount;
- if (maxCount) {
- command.push(`--max-count=${maxCount}`);
- }
- if (opt.from && opt.to) {
- const rangeOperator = opt.symmetric !== false ? "..." : "..";
- suffix.push(`${opt.from}${rangeOperator}${opt.to}`);
- }
- if (opt.file) {
- suffix.push("--follow", opt.file);
- }
- appendTaskOptions(userOptions(opt), command);
- return {
- fields,
- splitter,
- commands: [
- ...command,
- ...suffix
- ]
- };
-}
-function logTask(splitter, fields, customArgs) {
- return {
- commands: ["log", ...customArgs],
- format: "utf-8",
- parser: createListLogSummaryParser(splitter, fields)
- };
-}
-function log_default() {
- return {
- log(...rest) {
- const next = trailingFunctionArgument(arguments);
- const task = rejectDeprecatedSignatures(...rest) || createLogTask(parseLogOptions(trailingOptionsArgument(arguments), filterType(arguments[0], filterArray)));
- return this._runTask(task, next);
- }
- };
- function createLogTask(options) {
- return logTask(options.splitter, options.fields, options.commands);
- }
- function rejectDeprecatedSignatures(from, to) {
- return filterString(from) && filterString(to) && configurationErrorTask(`git.log(string, string) should be replaced with git.log({ from: string, to: string })`);
- }
-}
-var excludeOptions;
-var init_log = __esm({
- "src/lib/tasks/log.ts"() {
- init_parse_list_log_summary();
- init_utils();
- init_task();
- excludeOptions = /* @__PURE__ */ ((excludeOptions2) => {
- excludeOptions2[excludeOptions2["--pretty"] = 0] = "--pretty";
- excludeOptions2[excludeOptions2["max-count"] = 1] = "max-count";
- excludeOptions2[excludeOptions2["maxCount"] = 2] = "maxCount";
- excludeOptions2[excludeOptions2["n"] = 3] = "n";
- excludeOptions2[excludeOptions2["file"] = 4] = "file";
- excludeOptions2[excludeOptions2["format"] = 5] = "format";
- excludeOptions2[excludeOptions2["from"] = 6] = "from";
- excludeOptions2[excludeOptions2["to"] = 7] = "to";
- excludeOptions2[excludeOptions2["splitter"] = 8] = "splitter";
- excludeOptions2[excludeOptions2["symmetric"] = 9] = "symmetric";
- excludeOptions2[excludeOptions2["mailMap"] = 10] = "mailMap";
- excludeOptions2[excludeOptions2["multiLine"] = 11] = "multiLine";
- excludeOptions2[excludeOptions2["strictDate"] = 12] = "strictDate";
- return excludeOptions2;
- })(excludeOptions || {});
- }
-});
-
-// src/lib/responses/MergeSummary.ts
-var MergeSummaryConflict, MergeSummaryDetail;
-var init_MergeSummary = __esm({
- "src/lib/responses/MergeSummary.ts"() {
- MergeSummaryConflict = class {
- constructor(reason, file = null, meta) {
- this.reason = reason;
- this.file = file;
- this.meta = meta;
- }
- toString() {
- return `${this.file}:${this.reason}`;
- }
- };
- MergeSummaryDetail = class {
- constructor() {
- this.conflicts = [];
- this.merges = [];
- this.result = "success";
- }
- get failed() {
- return this.conflicts.length > 0;
- }
- get reason() {
- return this.result;
- }
- toString() {
- if (this.conflicts.length) {
- return `CONFLICTS: ${this.conflicts.join(", ")}`;
- }
- return "OK";
- }
- };
- }
-});
-
-// src/lib/responses/PullSummary.ts
-var PullSummary, PullFailedSummary;
-var init_PullSummary = __esm({
- "src/lib/responses/PullSummary.ts"() {
- PullSummary = class {
- constructor() {
- this.remoteMessages = {
- all: []
- };
- this.created = [];
- this.deleted = [];
- this.files = [];
- this.deletions = {};
- this.insertions = {};
- this.summary = {
- changes: 0,
- deletions: 0,
- insertions: 0
- };
- }
- };
- PullFailedSummary = class {
- constructor() {
- this.remote = "";
- this.hash = {
- local: "",
- remote: ""
- };
- this.branch = {
- local: "",
- remote: ""
- };
- this.message = "";
- }
- toString() {
- return this.message;
- }
- };
- }
-});
-
-// src/lib/parsers/parse-remote-objects.ts
-function objectEnumerationResult(remoteMessages) {
- return remoteMessages.objects = remoteMessages.objects || {
- compressing: 0,
- counting: 0,
- enumerating: 0,
- packReused: 0,
- reused: { count: 0, delta: 0 },
- total: { count: 0, delta: 0 }
- };
-}
-function asObjectCount(source) {
- const count = /^\s*(\d+)/.exec(source);
- const delta = /delta (\d+)/i.exec(source);
- return {
- count: asNumber(count && count[1] || "0"),
- delta: asNumber(delta && delta[1] || "0")
- };
-}
-var remoteMessagesObjectParsers;
-var init_parse_remote_objects = __esm({
- "src/lib/parsers/parse-remote-objects.ts"() {
- init_utils();
- remoteMessagesObjectParsers = [
- new RemoteLineParser(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i, (result, [action, count]) => {
- const key = action.toLowerCase();
- const enumeration = objectEnumerationResult(result.remoteMessages);
- Object.assign(enumeration, { [key]: asNumber(count) });
- }),
- new RemoteLineParser(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i, (result, [action, count]) => {
- const key = action.toLowerCase();
- const enumeration = objectEnumerationResult(result.remoteMessages);
- Object.assign(enumeration, { [key]: asNumber(count) });
- }),
- new RemoteLineParser(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i, (result, [total, reused, packReused]) => {
- const objects = objectEnumerationResult(result.remoteMessages);
- objects.total = asObjectCount(total);
- objects.reused = asObjectCount(reused);
- objects.packReused = asNumber(packReused);
- })
- ];
- }
-});
-
-// src/lib/parsers/parse-remote-messages.ts
-function parseRemoteMessages(_stdOut, stdErr) {
- return parseStringResponse({ remoteMessages: new RemoteMessageSummary() }, parsers, stdErr);
-}
-var parsers, RemoteMessageSummary;
-var init_parse_remote_messages = __esm({
- "src/lib/parsers/parse-remote-messages.ts"() {
- init_utils();
- init_parse_remote_objects();
- parsers = [
- new RemoteLineParser(/^remote:\s*(.+)$/, (result, [text]) => {
- result.remoteMessages.all.push(text.trim());
- return false;
- }),
- ...remoteMessagesObjectParsers,
- new RemoteLineParser([/create a (?:pull|merge) request/i, /\s(https?:\/\/\S+)$/], (result, [pullRequestUrl]) => {
- result.remoteMessages.pullRequestUrl = pullRequestUrl;
- }),
- new RemoteLineParser([/found (\d+) vulnerabilities.+\(([^)]+)\)/i, /\s(https?:\/\/\S+)$/], (result, [count, summary, url]) => {
- result.remoteMessages.vulnerabilities = {
- count: asNumber(count),
- summary,
- url
- };
- })
- ];
- RemoteMessageSummary = class {
- constructor() {
- this.all = [];
- }
- };
- }
-});
-
-// src/lib/parsers/parse-pull.ts
-function parsePullErrorResult(stdOut, stdErr) {
- const pullError = parseStringResponse(new PullFailedSummary(), errorParsers, stdOut, stdErr);
- return pullError.message && pullError;
-}
-var FILE_UPDATE_REGEX, SUMMARY_REGEX, ACTION_REGEX, parsers2, errorParsers, parsePullDetail, parsePullResult;
-var init_parse_pull = __esm({
- "src/lib/parsers/parse-pull.ts"() {
- init_PullSummary();
- init_utils();
- init_parse_remote_messages();
- FILE_UPDATE_REGEX = /^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/;
- SUMMARY_REGEX = /(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/;
- ACTION_REGEX = /^(create|delete) mode \d+ (.+)/;
- parsers2 = [
- new LineParser(FILE_UPDATE_REGEX, (result, [file, insertions, deletions]) => {
- result.files.push(file);
- if (insertions) {
- result.insertions[file] = insertions.length;
- }
- if (deletions) {
- result.deletions[file] = deletions.length;
- }
- }),
- new LineParser(SUMMARY_REGEX, (result, [changes, , insertions, , deletions]) => {
- if (insertions !== void 0 || deletions !== void 0) {
- result.summary.changes = +changes || 0;
- result.summary.insertions = +insertions || 0;
- result.summary.deletions = +deletions || 0;
- return true;
- }
- return false;
- }),
- new LineParser(ACTION_REGEX, (result, [action, file]) => {
- append(result.files, file);
- append(action === "create" ? result.created : result.deleted, file);
- })
- ];
- errorParsers = [
- new LineParser(/^from\s(.+)$/i, (result, [remote]) => void (result.remote = remote)),
- new LineParser(/^fatal:\s(.+)$/, (result, [message]) => void (result.message = message)),
- new LineParser(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/, (result, [hashLocal, hashRemote, branchLocal, branchRemote]) => {
- result.branch.local = branchLocal;
- result.hash.local = hashLocal;
- result.branch.remote = branchRemote;
- result.hash.remote = hashRemote;
- })
- ];
- parsePullDetail = (stdOut, stdErr) => {
- return parseStringResponse(new PullSummary(), parsers2, stdOut, stdErr);
- };
- parsePullResult = (stdOut, stdErr) => {
- return Object.assign(new PullSummary(), parsePullDetail(stdOut, stdErr), parseRemoteMessages(stdOut, stdErr));
- };
- }
-});
-
-// src/lib/parsers/parse-merge.ts
-var parsers3, parseMergeResult, parseMergeDetail;
-var init_parse_merge = __esm({
- "src/lib/parsers/parse-merge.ts"() {
- init_MergeSummary();
- init_utils();
- init_parse_pull();
- parsers3 = [
- new LineParser(/^Auto-merging\s+(.+)$/, (summary, [autoMerge]) => {
- summary.merges.push(autoMerge);
- }),
- new LineParser(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/, (summary, [reason, file]) => {
- summary.conflicts.push(new MergeSummaryConflict(reason, file));
- }),
- new LineParser(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/, (summary, [reason, file, deleteRef]) => {
- summary.conflicts.push(new MergeSummaryConflict(reason, file, { deleteRef }));
- }),
- new LineParser(/^CONFLICT\s+\((.+)\):/, (summary, [reason]) => {
- summary.conflicts.push(new MergeSummaryConflict(reason, null));
- }),
- new LineParser(/^Automatic merge failed;\s+(.+)$/, (summary, [result]) => {
- summary.result = result;
- })
- ];
- parseMergeResult = (stdOut, stdErr) => {
- return Object.assign(parseMergeDetail(stdOut, stdErr), parsePullResult(stdOut, stdErr));
- };
- parseMergeDetail = (stdOut) => {
- return parseStringResponse(new MergeSummaryDetail(), parsers3, stdOut);
- };
- }
-});
-
-// src/lib/tasks/merge.ts
-function mergeTask(customArgs) {
- if (!customArgs.length) {
- return configurationErrorTask("Git.merge requires at least one option");
- }
- return {
- commands: ["merge", ...customArgs],
- format: "utf-8",
- parser(stdOut, stdErr) {
- const merge = parseMergeResult(stdOut, stdErr);
- if (merge.failed) {
- throw new GitResponseError(merge);
- }
- return merge;
- }
- };
-}
-var init_merge = __esm({
- "src/lib/tasks/merge.ts"() {
- init_git_response_error();
- init_parse_merge();
- init_task();
- }
-});
-
-// src/lib/parsers/parse-push.ts
-function pushResultPushedItem(local, remote, status) {
- const deleted = status.includes("deleted");
- const tag = status.includes("tag") || /^refs\/tags/.test(local);
- const alreadyUpdated = !status.includes("new");
- return {
- deleted,
- tag,
- branch: !tag,
- new: !alreadyUpdated,
- alreadyUpdated,
- local,
- remote
- };
-}
-var parsers4, parsePushResult, parsePushDetail;
-var init_parse_push = __esm({
- "src/lib/parsers/parse-push.ts"() {
- init_utils();
- init_parse_remote_messages();
- parsers4 = [
- new LineParser(/^Pushing to (.+)$/, (result, [repo]) => {
- result.repo = repo;
- }),
- new LineParser(/^updating local tracking ref '(.+)'/, (result, [local]) => {
- result.ref = __spreadProps(__spreadValues({}, result.ref || {}), {
- local
- });
- }),
- new LineParser(/^[*-=]\s+([^:]+):(\S+)\s+\[(.+)]$/, (result, [local, remote, type]) => {
- result.pushed.push(pushResultPushedItem(local, remote, type));
- }),
- new LineParser(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/, (result, [local, remote, remoteName]) => {
- result.branch = __spreadProps(__spreadValues({}, result.branch || {}), {
- local,
- remote,
- remoteName
- });
- }),
- new LineParser(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/, (result, [local, remote, from, to]) => {
- result.update = {
- head: {
- local,
- remote
- },
- hash: {
- from,
- to
- }
- };
- })
- ];
- parsePushResult = (stdOut, stdErr) => {
- const pushDetail = parsePushDetail(stdOut, stdErr);
- const responseDetail = parseRemoteMessages(stdOut, stdErr);
- return __spreadValues(__spreadValues({}, pushDetail), responseDetail);
- };
- parsePushDetail = (stdOut, stdErr) => {
- return parseStringResponse({ pushed: [] }, parsers4, stdOut, stdErr);
- };
- }
-});
-
-// src/lib/tasks/push.ts
-var push_exports = {};
-__export(push_exports, {
- pushTagsTask: () => pushTagsTask,
- pushTask: () => pushTask
-});
-function pushTagsTask(ref = {}, customArgs) {
- append(customArgs, "--tags");
- return pushTask(ref, customArgs);
-}
-function pushTask(ref = {}, customArgs) {
- const commands = ["push", ...customArgs];
- if (ref.branch) {
- commands.splice(1, 0, ref.branch);
- }
- if (ref.remote) {
- commands.splice(1, 0, ref.remote);
- }
- remove(commands, "-v");
- append(commands, "--verbose");
- append(commands, "--porcelain");
- return {
- commands,
- format: "utf-8",
- parser: parsePushResult
- };
-}
-var init_push = __esm({
- "src/lib/tasks/push.ts"() {
- init_parse_push();
- init_utils();
- }
-});
-
-// src/lib/responses/FileStatusSummary.ts
-var fromPathRegex, FileStatusSummary;
-var init_FileStatusSummary = __esm({
- "src/lib/responses/FileStatusSummary.ts"() {
- fromPathRegex = /^(.+) -> (.+)$/;
- FileStatusSummary = class {
- constructor(path, index, working_dir) {
- this.path = path;
- this.index = index;
- this.working_dir = working_dir;
- if (index + working_dir === "R") {
- const detail = fromPathRegex.exec(path) || [null, path, path];
- this.from = detail[1] || "";
- this.path = detail[2] || "";
- }
- }
- };
- }
-});
-
-// src/lib/responses/StatusSummary.ts
-function renamedFile(line) {
- const detail = /^(.+) -> (.+)$/.exec(line);
- if (!detail) {
- return {
- from: line,
- to: line
- };
- }
- return {
- from: String(detail[1]),
- to: String(detail[2])
- };
-}
-function parser2(indexX, indexY, handler) {
- return [`${indexX}${indexY}`, handler];
-}
-function conflicts(indexX, ...indexY) {
- return indexY.map((y) => parser2(indexX, y, (result, file) => append(result.conflicted, file)));
-}
-function splitLine(result, lineStr) {
- const trimmed2 = lineStr.trim();
- switch (" ") {
- case trimmed2.charAt(2):
- return data(trimmed2.charAt(0), trimmed2.charAt(1), trimmed2.substr(3));
- case trimmed2.charAt(1):
- return data(" " /* NONE */, trimmed2.charAt(0), trimmed2.substr(2));
- default:
- return;
- }
- function data(index, workingDir, path) {
- const raw = `${index}${workingDir}`;
- const handler = parsers5.get(raw);
- if (handler) {
- handler(result, path);
- }
- if (raw !== "##" && raw !== "!!") {
- result.files.push(new FileStatusSummary(path, index, workingDir));
- }
- }
-}
-var StatusSummary, parsers5, parseStatusSummary;
-var init_StatusSummary = __esm({
- "src/lib/responses/StatusSummary.ts"() {
- init_utils();
- init_FileStatusSummary();
- StatusSummary = class {
- constructor() {
- this.not_added = [];
- this.conflicted = [];
- this.created = [];
- this.deleted = [];
- this.ignored = void 0;
- this.modified = [];
- this.renamed = [];
- this.files = [];
- this.staged = [];
- this.ahead = 0;
- this.behind = 0;
- this.current = null;
- this.tracking = null;
- this.detached = false;
- }
- isClean() {
- return !this.files.length;
- }
- };
- parsers5 = new Map([
- parser2(" " /* NONE */, "A" /* ADDED */, (result, file) => append(result.created, file)),
- parser2(" " /* NONE */, "D" /* DELETED */, (result, file) => append(result.deleted, file)),
- parser2(" " /* NONE */, "M" /* MODIFIED */, (result, file) => append(result.modified, file)),
- parser2("A" /* ADDED */, " " /* NONE */, (result, file) => append(result.created, file) && append(result.staged, file)),
- parser2("A" /* ADDED */, "M" /* MODIFIED */, (result, file) => append(result.created, file) && append(result.staged, file) && append(result.modified, file)),
- parser2("D" /* DELETED */, " " /* NONE */, (result, file) => append(result.deleted, file) && append(result.staged, file)),
- parser2("M" /* MODIFIED */, " " /* NONE */, (result, file) => append(result.modified, file) && append(result.staged, file)),
- parser2("M" /* MODIFIED */, "M" /* MODIFIED */, (result, file) => append(result.modified, file) && append(result.staged, file)),
- parser2("R" /* RENAMED */, " " /* NONE */, (result, file) => {
- append(result.renamed, renamedFile(file));
- }),
- parser2("R" /* RENAMED */, "M" /* MODIFIED */, (result, file) => {
- const renamed = renamedFile(file);
- append(result.renamed, renamed);
- append(result.modified, renamed.to);
- }),
- parser2("!" /* IGNORED */, "!" /* IGNORED */, (_result, _file) => {
- append(_result.ignored = _result.ignored || [], _file);
- }),
- parser2("?" /* UNTRACKED */, "?" /* UNTRACKED */, (result, file) => append(result.not_added, file)),
- ...conflicts("A" /* ADDED */, "A" /* ADDED */, "U" /* UNMERGED */),
- ...conflicts("D" /* DELETED */, "D" /* DELETED */, "U" /* UNMERGED */),
- ...conflicts("U" /* UNMERGED */, "A" /* ADDED */, "D" /* DELETED */, "U" /* UNMERGED */),
- ["##", (result, line) => {
- const aheadReg = /ahead (\d+)/;
- const behindReg = /behind (\d+)/;
- const currentReg = /^(.+?(?=(?:\.{3}|\s|$)))/;
- const trackingReg = /\.{3}(\S*)/;
- const onEmptyBranchReg = /\son\s([\S]+)$/;
- let regexResult;
- regexResult = aheadReg.exec(line);
- result.ahead = regexResult && +regexResult[1] || 0;
- regexResult = behindReg.exec(line);
- result.behind = regexResult && +regexResult[1] || 0;
- regexResult = currentReg.exec(line);
- result.current = regexResult && regexResult[1];
- regexResult = trackingReg.exec(line);
- result.tracking = regexResult && regexResult[1];
- regexResult = onEmptyBranchReg.exec(line);
- result.current = regexResult && regexResult[1] || result.current;
- result.detached = /\(no branch\)/.test(line);
- }]
- ]);
- parseStatusSummary = function(text) {
- const lines = text.trim().split("\n");
- const status = new StatusSummary();
- for (let i = 0, l = lines.length; i < l; i++) {
- splitLine(status, lines[i]);
- }
- return status;
- };
- }
-});
-
-// src/lib/tasks/status.ts
-function statusTask(customArgs) {
- return {
- format: "utf-8",
- commands: ["status", "--porcelain", "-b", "-u", ...customArgs],
- parser(text) {
- return parseStatusSummary(text);
- }
- };
-}
-var init_status = __esm({
- "src/lib/tasks/status.ts"() {
- init_StatusSummary();
- }
-});
-
-// src/lib/simple-git-api.ts
-var simple_git_api_exports = {};
-__export(simple_git_api_exports, {
- SimpleGitApi: () => SimpleGitApi
-});
-var SimpleGitApi;
-var init_simple_git_api = __esm({
- "src/lib/simple-git-api.ts"() {
- init_task_callback();
- init_change_working_directory();
- init_config();
- init_grep();
- init_hash_object();
- init_init();
- init_log();
- init_merge();
- init_push();
- init_status();
- init_task();
- init_utils();
- SimpleGitApi = class {
- constructor(_executor) {
- this._executor = _executor;
- }
- _runTask(task, then) {
- const chain = this._executor.chain();
- const promise = chain.push(task);
- if (then) {
- taskCallback(task, promise, then);
- }
- return Object.create(this, {
- then: { value: promise.then.bind(promise) },
- catch: { value: promise.catch.bind(promise) },
- _executor: { value: chain }
- });
- }
- add(files) {
- return this._runTask(straightThroughStringTask(["add", ...asArray(files)]), trailingFunctionArgument(arguments));
- }
- cwd(directory) {
- const next = trailingFunctionArgument(arguments);
- if (typeof directory === "string") {
- return this._runTask(changeWorkingDirectoryTask(directory, this._executor), next);
- }
- if (typeof (directory == null ? void 0 : directory.path) === "string") {
- return this._runTask(changeWorkingDirectoryTask(directory.path, directory.root && this._executor || void 0), next);
- }
- return this._runTask(configurationErrorTask("Git.cwd: workingDirectory must be supplied as a string"), next);
- }
- hashObject(path, write) {
- return this._runTask(hashObjectTask(path, write === true), trailingFunctionArgument(arguments));
- }
- init(bare) {
- return this._runTask(initTask(bare === true, this._executor.cwd, getTrailingOptions(arguments)), trailingFunctionArgument(arguments));
- }
- merge() {
- return this._runTask(mergeTask(getTrailingOptions(arguments)), trailingFunctionArgument(arguments));
- }
- mergeFromTo(remote, branch) {
- if (!(filterString(remote) && filterString(branch))) {
- return this._runTask(configurationErrorTask(`Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings`));
- }
- return this._runTask(mergeTask([remote, branch, ...getTrailingOptions(arguments)]), trailingFunctionArgument(arguments, false));
- }
- outputHandler(handler) {
- this._executor.outputHandler = handler;
- return this;
- }
- push() {
- const task = pushTask({
- remote: filterType(arguments[0], filterString),
- branch: filterType(arguments[1], filterString)
- }, getTrailingOptions(arguments));
- return this._runTask(task, trailingFunctionArgument(arguments));
- }
- stash() {
- return this._runTask(straightThroughStringTask(["stash", ...getTrailingOptions(arguments)]), trailingFunctionArgument(arguments));
- }
- status() {
- return this._runTask(statusTask(getTrailingOptions(arguments)), trailingFunctionArgument(arguments));
- }
- };
- Object.assign(SimpleGitApi.prototype, config_default(), grep_default(), log_default());
- }
-});
-
-// src/lib/runners/scheduler.ts
-var scheduler_exports = {};
-__export(scheduler_exports, {
- Scheduler: () => Scheduler
-});
-import { createDeferred } from "@kwsites/promise-deferred";
-var createScheduledTask, Scheduler;
-var init_scheduler = __esm({
- "src/lib/runners/scheduler.ts"() {
- init_utils();
- init_git_logger();
- createScheduledTask = (() => {
- let id = 0;
- return () => {
- id++;
- const { promise, done } = createDeferred();
- return {
- promise,
- done,
- id
- };
- };
- })();
- Scheduler = class {
- constructor(concurrency = 2) {
- this.concurrency = concurrency;
- this.logger = createLogger("", "scheduler");
- this.pending = [];
- this.running = [];
- this.logger(`Constructed, concurrency=%s`, concurrency);
- }
- schedule() {
- if (!this.pending.length || this.running.length >= this.concurrency) {
- this.logger(`Schedule attempt ignored, pending=%s running=%s concurrency=%s`, this.pending.length, this.running.length, this.concurrency);
- return;
- }
- const task = append(this.running, this.pending.shift());
- this.logger(`Attempting id=%s`, task.id);
- task.done(() => {
- this.logger(`Completing id=`, task.id);
- remove(this.running, task);
- this.schedule();
- });
- }
- next() {
- const { promise, id } = append(this.pending, createScheduledTask());
- this.logger(`Scheduling id=%s`, id);
- this.schedule();
- return promise;
- }
- };
- }
-});
-
-// src/lib/tasks/apply-patch.ts
-var apply_patch_exports = {};
-__export(apply_patch_exports, {
- applyPatchTask: () => applyPatchTask
-});
-function applyPatchTask(patches, customArgs) {
- return straightThroughStringTask(["apply", ...customArgs, ...patches]);
-}
-var init_apply_patch = __esm({
- "src/lib/tasks/apply-patch.ts"() {
- init_task();
- }
-});
-
-// src/lib/responses/BranchDeleteSummary.ts
-function branchDeletionSuccess(branch, hash) {
- return {
- branch,
- hash,
- success: true
- };
-}
-function branchDeletionFailure(branch) {
- return {
- branch,
- hash: null,
- success: false
- };
-}
-var BranchDeletionBatch;
-var init_BranchDeleteSummary = __esm({
- "src/lib/responses/BranchDeleteSummary.ts"() {
- BranchDeletionBatch = class {
- constructor() {
- this.all = [];
- this.branches = {};
- this.errors = [];
- }
- get success() {
- return !this.errors.length;
- }
- };
- }
-});
-
-// src/lib/parsers/parse-branch-delete.ts
-function hasBranchDeletionError(data, processExitCode) {
- return processExitCode === 1 /* ERROR */ && deleteErrorRegex.test(data);
-}
-var deleteSuccessRegex, deleteErrorRegex, parsers6, parseBranchDeletions;
-var init_parse_branch_delete = __esm({
- "src/lib/parsers/parse-branch-delete.ts"() {
- init_BranchDeleteSummary();
- init_utils();
- deleteSuccessRegex = /(\S+)\s+\(\S+\s([^)]+)\)/;
- deleteErrorRegex = /^error[^']+'([^']+)'/m;
- parsers6 = [
- new LineParser(deleteSuccessRegex, (result, [branch, hash]) => {
- const deletion = branchDeletionSuccess(branch, hash);
- result.all.push(deletion);
- result.branches[branch] = deletion;
- }),
- new LineParser(deleteErrorRegex, (result, [branch]) => {
- const deletion = branchDeletionFailure(branch);
- result.errors.push(deletion);
- result.all.push(deletion);
- result.branches[branch] = deletion;
- })
- ];
- parseBranchDeletions = (stdOut, stdErr) => {
- return parseStringResponse(new BranchDeletionBatch(), parsers6, stdOut, stdErr);
- };
- }
-});
-
-// src/lib/responses/BranchSummary.ts
-var BranchSummaryResult;
-var init_BranchSummary = __esm({
- "src/lib/responses/BranchSummary.ts"() {
- BranchSummaryResult = class {
- constructor() {
- this.all = [];
- this.branches = {};
- this.current = "";
- this.detached = false;
- }
- push(current, detached, name, commit, label) {
- if (current) {
- this.detached = detached;
- this.current = name;
- }
- this.all.push(name);
- this.branches[name] = {
- current,
- name,
- commit,
- label
- };
- }
- };
- }
-});
-
-// src/lib/parsers/parse-branch.ts
-function parseBranchSummary(stdOut) {
- return parseStringResponse(new BranchSummaryResult(), parsers7, stdOut);
-}
-var parsers7;
-var init_parse_branch = __esm({
- "src/lib/parsers/parse-branch.ts"() {
- init_BranchSummary();
- init_utils();
- parsers7 = [
- new LineParser(/^(\*\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/, (result, [current, name, commit, label]) => {
- result.push(!!current, true, name, commit, label);
- }),
- new LineParser(/^(\*\s)?(\S+)\s+([a-z0-9]+)\s?(.*)$/s, (result, [current, name, commit, label]) => {
- result.push(!!current, false, name, commit, label);
- })
- ];
- }
-});
-
-// src/lib/tasks/branch.ts
-var branch_exports = {};
-__export(branch_exports, {
- branchLocalTask: () => branchLocalTask,
- branchTask: () => branchTask,
- containsDeleteBranchCommand: () => containsDeleteBranchCommand,
- deleteBranchTask: () => deleteBranchTask,
- deleteBranchesTask: () => deleteBranchesTask
-});
-function containsDeleteBranchCommand(commands) {
- const deleteCommands = ["-d", "-D", "--delete"];
- return commands.some((command) => deleteCommands.includes(command));
-}
-function branchTask(customArgs) {
- const isDelete = containsDeleteBranchCommand(customArgs);
- const commands = ["branch", ...customArgs];
- if (commands.length === 1) {
- commands.push("-a");
- }
- if (!commands.includes("-v")) {
- commands.splice(1, 0, "-v");
- }
- return {
- format: "utf-8",
- commands,
- parser(stdOut, stdErr) {
- if (isDelete) {
- return parseBranchDeletions(stdOut, stdErr).all[0];
- }
- return parseBranchSummary(stdOut);
- }
- };
-}
-function branchLocalTask() {
- const parser3 = parseBranchSummary;
- return {
- format: "utf-8",
- commands: ["branch", "-v"],
- parser: parser3
- };
-}
-function deleteBranchesTask(branches, forceDelete = false) {
- return {
- format: "utf-8",
- commands: ["branch", "-v", forceDelete ? "-D" : "-d", ...branches],
- parser(stdOut, stdErr) {
- return parseBranchDeletions(stdOut, stdErr);
- },
- onError({ exitCode, stdOut }, error, done, fail) {
- if (!hasBranchDeletionError(String(error), exitCode)) {
- return fail(error);
- }
- done(stdOut);
- }
- };
-}
-function deleteBranchTask(branch, forceDelete = false) {
- const task = {
- format: "utf-8",
- commands: ["branch", "-v", forceDelete ? "-D" : "-d", branch],
- parser(stdOut, stdErr) {
- return parseBranchDeletions(stdOut, stdErr).branches[branch];
- },
- onError({ exitCode, stdErr, stdOut }, error, _, fail) {
- if (!hasBranchDeletionError(String(error), exitCode)) {
- return fail(error);
- }
- throw new GitResponseError(task.parser(bufferToString(stdOut), bufferToString(stdErr)), String(error));
- }
- };
- return task;
-}
-var init_branch = __esm({
- "src/lib/tasks/branch.ts"() {
- init_git_response_error();
- init_parse_branch_delete();
- init_parse_branch();
- init_utils();
- }
-});
-
-// src/lib/responses/CheckIgnore.ts
-var parseCheckIgnore;
-var init_CheckIgnore = __esm({
- "src/lib/responses/CheckIgnore.ts"() {
- parseCheckIgnore = (text) => {
- return text.split(/\n/g).map((line) => line.trim()).filter((file) => !!file);
- };
- }
-});
-
-// src/lib/tasks/check-ignore.ts
-var check_ignore_exports = {};
-__export(check_ignore_exports, {
- checkIgnoreTask: () => checkIgnoreTask
-});
-function checkIgnoreTask(paths) {
- return {
- commands: ["check-ignore", ...paths],
- format: "utf-8",
- parser: parseCheckIgnore
- };
-}
-var init_check_ignore = __esm({
- "src/lib/tasks/check-ignore.ts"() {
- init_CheckIgnore();
- }
-});
-
-// src/lib/tasks/clone.ts
-var clone_exports = {};
-__export(clone_exports, {
- cloneMirrorTask: () => cloneMirrorTask,
- cloneTask: () => cloneTask
-});
-function cloneTask(repo, directory, customArgs) {
- const commands = ["clone", ...customArgs];
- if (typeof repo === "string") {
- commands.push(repo);
- }
- if (typeof directory === "string") {
- commands.push(directory);
- }
- return straightThroughStringTask(commands);
-}
-function cloneMirrorTask(repo, directory, customArgs) {
- append(customArgs, "--mirror");
- return cloneTask(repo, directory, customArgs);
-}
-var init_clone = __esm({
- "src/lib/tasks/clone.ts"() {
- init_task();
- init_utils();
- }
-});
-
-// src/lib/parsers/parse-commit.ts
-function parseCommitResult(stdOut) {
- const result = {
- author: null,
- branch: "",
- commit: "",
- root: false,
- summary: {
- changes: 0,
- insertions: 0,
- deletions: 0
- }
- };
- return parseStringResponse(result, parsers8, stdOut);
-}
-var parsers8;
-var init_parse_commit = __esm({
- "src/lib/parsers/parse-commit.ts"() {
- init_utils();
- parsers8 = [
- new LineParser(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/, (result, [branch, root, commit]) => {
- result.branch = branch;
- result.commit = commit;
- result.root = !!root;
- }),
- new LineParser(/\s*Author:\s(.+)/i, (result, [author]) => {
- const parts = author.split("<");
- const email = parts.pop();
- if (!email || !email.includes("@")) {
- return;
- }
- result.author = {
- email: email.substr(0, email.length - 1),
- name: parts.join("<").trim()
- };
- }),
- new LineParser(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g, (result, [changes, insertions, deletions]) => {
- result.summary.changes = parseInt(changes, 10) || 0;
- result.summary.insertions = parseInt(insertions, 10) || 0;
- result.summary.deletions = parseInt(deletions, 10) || 0;
- }),
- new LineParser(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/, (result, [changes, lines, direction]) => {
- result.summary.changes = parseInt(changes, 10) || 0;
- const count = parseInt(lines, 10) || 0;
- if (direction === "-") {
- result.summary.deletions = count;
- } else if (direction === "+") {
- result.summary.insertions = count;
- }
- })
- ];
- }
-});
-
-// src/lib/tasks/commit.ts
-var commit_exports = {};
-__export(commit_exports, {
- commitTask: () => commitTask
-});
-function commitTask(message, files, customArgs) {
- const commands = ["commit"];
- message.forEach((m) => commands.push("-m", m));
- commands.push(...files, ...customArgs);
- return {
- commands,
- format: "utf-8",
- parser: parseCommitResult
- };
-}
-var init_commit = __esm({
- "src/lib/tasks/commit.ts"() {
- init_parse_commit();
- }
-});
-
-// src/lib/tasks/diff.ts
-var diff_exports = {};
-__export(diff_exports, {
- diffSummaryTask: () => diffSummaryTask
-});
-function diffSummaryTask(customArgs) {
- return {
- commands: ["diff", "--stat=4096", ...customArgs],
- format: "utf-8",
- parser(stdOut) {
- return parseDiffResult(stdOut);
- }
- };
-}
-var init_diff = __esm({
- "src/lib/tasks/diff.ts"() {
- init_parse_diff_summary();
- }
-});
-
-// src/lib/parsers/parse-fetch.ts
-function parseFetchResult(stdOut, stdErr) {
- const result = {
- raw: stdOut,
- remote: null,
- branches: [],
- tags: []
- };
- return parseStringResponse(result, parsers9, stdOut, stdErr);
-}
-var parsers9;
-var init_parse_fetch = __esm({
- "src/lib/parsers/parse-fetch.ts"() {
- init_utils();
- parsers9 = [
- new LineParser(/From (.+)$/, (result, [remote]) => {
- result.remote = remote;
- }),
- new LineParser(/\* \[new branch]\s+(\S+)\s*-> (.+)$/, (result, [name, tracking]) => {
- result.branches.push({
- name,
- tracking
- });
- }),
- new LineParser(/\* \[new tag]\s+(\S+)\s*-> (.+)$/, (result, [name, tracking]) => {
- result.tags.push({
- name,
- tracking
- });
- })
- ];
- }
-});
-
-// src/lib/tasks/fetch.ts
-var fetch_exports = {};
-__export(fetch_exports, {
- fetchTask: () => fetchTask
-});
-function fetchTask(remote, branch, customArgs) {
- const commands = ["fetch", ...customArgs];
- if (remote && branch) {
- commands.push(remote, branch);
- }
- return {
- commands,
- format: "utf-8",
- parser: parseFetchResult
- };
-}
-var init_fetch = __esm({
- "src/lib/tasks/fetch.ts"() {
- init_parse_fetch();
- }
-});
-
-// src/lib/parsers/parse-move.ts
-function parseMoveResult(stdOut) {
- return parseStringResponse({ moves: [] }, parsers10, stdOut);
-}
-var parsers10;
-var init_parse_move = __esm({
- "src/lib/parsers/parse-move.ts"() {
- init_utils();
- parsers10 = [
- new LineParser(/^Renaming (.+) to (.+)$/, (result, [from, to]) => {
- result.moves.push({ from, to });
- })
- ];
- }
-});
-
-// src/lib/tasks/move.ts
-var move_exports = {};
-__export(move_exports, {
- moveTask: () => moveTask
-});
-function moveTask(from, to) {
- return {
- commands: ["mv", "-v", ...asArray(from), to],
- format: "utf-8",
- parser: parseMoveResult
- };
-}
-var init_move = __esm({
- "src/lib/tasks/move.ts"() {
- init_parse_move();
- init_utils();
- }
-});
-
-// src/lib/tasks/pull.ts
-var pull_exports = {};
-__export(pull_exports, {
- pullTask: () => pullTask
-});
-function pullTask(remote, branch, customArgs) {
- const commands = ["pull", ...customArgs];
- if (remote && branch) {
- commands.splice(1, 0, remote, branch);
- }
- return {
- commands,
- format: "utf-8",
- parser(stdOut, stdErr) {
- return parsePullResult(stdOut, stdErr);
- },
- onError(result, _error, _done, fail) {
- const pullError = parsePullErrorResult(bufferToString(result.stdOut), bufferToString(result.stdErr));
- if (pullError) {
- return fail(new GitResponseError(pullError));
- }
- fail(_error);
- }
- };
-}
-var init_pull = __esm({
- "src/lib/tasks/pull.ts"() {
- init_git_response_error();
- init_parse_pull();
- init_utils();
- }
-});
-
-// src/lib/responses/GetRemoteSummary.ts
-function parseGetRemotes(text) {
- const remotes = {};
- forEach(text, ([name]) => remotes[name] = { name });
- return Object.values(remotes);
-}
-function parseGetRemotesVerbose(text) {
- const remotes = {};
- forEach(text, ([name, url, purpose]) => {
- if (!remotes.hasOwnProperty(name)) {
- remotes[name] = {
- name,
- refs: { fetch: "", push: "" }
- };
- }
- if (purpose && url) {
- remotes[name].refs[purpose.replace(/[^a-z]/g, "")] = url;
- }
- });
- return Object.values(remotes);
-}
-function forEach(text, handler) {
- forEachLineWithContent(text, (line) => handler(line.split(/\s+/)));
-}
-var init_GetRemoteSummary = __esm({
- "src/lib/responses/GetRemoteSummary.ts"() {
- init_utils();
- }
-});
-
-// src/lib/tasks/remote.ts
-var remote_exports = {};
-__export(remote_exports, {
- addRemoteTask: () => addRemoteTask,
- getRemotesTask: () => getRemotesTask,
- listRemotesTask: () => listRemotesTask,
- remoteTask: () => remoteTask,
- removeRemoteTask: () => removeRemoteTask
-});
-function addRemoteTask(remoteName, remoteRepo, customArgs = []) {
- return straightThroughStringTask(["remote", "add", ...customArgs, remoteName, remoteRepo]);
-}
-function getRemotesTask(verbose) {
- const commands = ["remote"];
- if (verbose) {
- commands.push("-v");
- }
- return {
- commands,
- format: "utf-8",
- parser: verbose ? parseGetRemotesVerbose : parseGetRemotes
- };
-}
-function listRemotesTask(customArgs = []) {
- const commands = [...customArgs];
- if (commands[0] !== "ls-remote") {
- commands.unshift("ls-remote");
- }
- return straightThroughStringTask(commands);
-}
-function remoteTask(customArgs = []) {
- const commands = [...customArgs];
- if (commands[0] !== "remote") {
- commands.unshift("remote");
- }
- return straightThroughStringTask(commands);
-}
-function removeRemoteTask(remoteName) {
- return straightThroughStringTask(["remote", "remove", remoteName]);
-}
-var init_remote = __esm({
- "src/lib/tasks/remote.ts"() {
- init_GetRemoteSummary();
- init_task();
- }
-});
-
-// src/lib/tasks/stash-list.ts
-var stash_list_exports = {};
-__export(stash_list_exports, {
- stashListTask: () => stashListTask
-});
-function stashListTask(opt = {}, customArgs) {
- const options = parseLogOptions(opt);
- const parser3 = createListLogSummaryParser(options.splitter, options.fields);
- return {
- commands: ["stash", "list", ...options.commands, ...customArgs],
- format: "utf-8",
- parser: parser3
- };
-}
-var init_stash_list = __esm({
- "src/lib/tasks/stash-list.ts"() {
- init_parse_list_log_summary();
- init_log();
- }
-});
-
-// src/lib/tasks/sub-module.ts
-var sub_module_exports = {};
-__export(sub_module_exports, {
- addSubModuleTask: () => addSubModuleTask,
- initSubModuleTask: () => initSubModuleTask,
- subModuleTask: () => subModuleTask,
- updateSubModuleTask: () => updateSubModuleTask
-});
-function addSubModuleTask(repo, path) {
- return subModuleTask(["add", repo, path]);
-}
-function initSubModuleTask(customArgs) {
- return subModuleTask(["init", ...customArgs]);
-}
-function subModuleTask(customArgs) {
- const commands = [...customArgs];
- if (commands[0] !== "submodule") {
- commands.unshift("submodule");
- }
- return straightThroughStringTask(commands);
-}
-function updateSubModuleTask(customArgs) {
- return subModuleTask(["update", ...customArgs]);
-}
-var init_sub_module = __esm({
- "src/lib/tasks/sub-module.ts"() {
- init_task();
- }
-});
-
-// src/lib/responses/TagList.ts
-function singleSorted(a, b) {
- const aIsNum = isNaN(a);
- const bIsNum = isNaN(b);
- if (aIsNum !== bIsNum) {
- return aIsNum ? 1 : -1;
- }
- return aIsNum ? sorted(a, b) : 0;
-}
-function sorted(a, b) {
- return a === b ? 0 : a > b ? 1 : -1;
-}
-function trimmed(input) {
- return input.trim();
-}
-function toNumber(input) {
- if (typeof input === "string") {
- return parseInt(input.replace(/^\D+/g, ""), 10) || 0;
- }
- return 0;
-}
-var TagList, parseTagList;
-var init_TagList = __esm({
- "src/lib/responses/TagList.ts"() {
- TagList = class {
- constructor(all, latest) {
- this.all = all;
- this.latest = latest;
- }
- };
- parseTagList = function(data, customSort = false) {
- const tags = data.split("\n").map(trimmed).filter(Boolean);
- if (!customSort) {
- tags.sort(function(tagA, tagB) {
- const partsA = tagA.split(".");
- const partsB = tagB.split(".");
- if (partsA.length === 1 || partsB.length === 1) {
- return singleSorted(toNumber(partsA[0]), toNumber(partsB[0]));
- }
- for (let i = 0, l = Math.max(partsA.length, partsB.length); i < l; i++) {
- const diff = sorted(toNumber(partsA[i]), toNumber(partsB[i]));
- if (diff) {
- return diff;
- }
- }
- return 0;
- });
- }
- const latest = customSort ? tags[0] : [...tags].reverse().find((tag) => tag.indexOf(".") >= 0);
- return new TagList(tags, latest);
- };
- }
-});
-
-// src/lib/tasks/tag.ts
-var tag_exports = {};
-__export(tag_exports, {
- addAnnotatedTagTask: () => addAnnotatedTagTask,
- addTagTask: () => addTagTask,
- tagListTask: () => tagListTask
-});
-function tagListTask(customArgs = []) {
- const hasCustomSort = customArgs.some((option) => /^--sort=/.test(option));
- return {
- format: "utf-8",
- commands: ["tag", "-l", ...customArgs],
- parser(text) {
- return parseTagList(text, hasCustomSort);
- }
- };
-}
-function addTagTask(name) {
- return {
- format: "utf-8",
- commands: ["tag", name],
- parser() {
- return { name };
- }
- };
-}
-function addAnnotatedTagTask(name, tagMessage) {
- return {
- format: "utf-8",
- commands: ["tag", "-a", "-m", tagMessage, name],
- parser() {
- return { name };
- }
- };
-}
-var init_tag = __esm({
- "src/lib/tasks/tag.ts"() {
- init_TagList();
- }
-});
-
-// src/git.js
-var require_git = __commonJS({
- "src/git.js"(exports, module) {
- var { GitExecutor: GitExecutor2 } = (init_git_executor(), __toCommonJS(git_executor_exports));
- var { SimpleGitApi: SimpleGitApi2 } = (init_simple_git_api(), __toCommonJS(simple_git_api_exports));
- var { Scheduler: Scheduler2 } = (init_scheduler(), __toCommonJS(scheduler_exports));
- var { configurationErrorTask: configurationErrorTask2 } = (init_task(), __toCommonJS(task_exports));
- var {
- asArray: asArray2,
- filterArray: filterArray2,
- filterPrimitives: filterPrimitives2,
- filterString: filterString2,
- filterStringOrStringArray: filterStringOrStringArray2,
- filterType: filterType2,
- getTrailingOptions: getTrailingOptions2,
- trailingFunctionArgument: trailingFunctionArgument2,
- trailingOptionsArgument: trailingOptionsArgument2
- } = (init_utils(), __toCommonJS(utils_exports));
- var { applyPatchTask: applyPatchTask2 } = (init_apply_patch(), __toCommonJS(apply_patch_exports));
- var { branchTask: branchTask2, branchLocalTask: branchLocalTask2, deleteBranchesTask: deleteBranchesTask2, deleteBranchTask: deleteBranchTask2 } = (init_branch(), __toCommonJS(branch_exports));
- var { checkIgnoreTask: checkIgnoreTask2 } = (init_check_ignore(), __toCommonJS(check_ignore_exports));
- var { checkIsRepoTask: checkIsRepoTask2 } = (init_check_is_repo(), __toCommonJS(check_is_repo_exports));
- var { cloneTask: cloneTask2, cloneMirrorTask: cloneMirrorTask2 } = (init_clone(), __toCommonJS(clone_exports));
- var { cleanWithOptionsTask: cleanWithOptionsTask2, isCleanOptionsArray: isCleanOptionsArray2 } = (init_clean(), __toCommonJS(clean_exports));
- var { commitTask: commitTask2 } = (init_commit(), __toCommonJS(commit_exports));
- var { diffSummaryTask: diffSummaryTask2 } = (init_diff(), __toCommonJS(diff_exports));
- var { fetchTask: fetchTask2 } = (init_fetch(), __toCommonJS(fetch_exports));
- var { moveTask: moveTask2 } = (init_move(), __toCommonJS(move_exports));
- var { pullTask: pullTask2 } = (init_pull(), __toCommonJS(pull_exports));
- var { pushTagsTask: pushTagsTask2 } = (init_push(), __toCommonJS(push_exports));
- var { addRemoteTask: addRemoteTask2, getRemotesTask: getRemotesTask2, listRemotesTask: listRemotesTask2, remoteTask: remoteTask2, removeRemoteTask: removeRemoteTask2 } = (init_remote(), __toCommonJS(remote_exports));
- var { getResetMode: getResetMode2, resetTask: resetTask2 } = (init_reset(), __toCommonJS(reset_exports));
- var { stashListTask: stashListTask2 } = (init_stash_list(), __toCommonJS(stash_list_exports));
- var { addSubModuleTask: addSubModuleTask2, initSubModuleTask: initSubModuleTask2, subModuleTask: subModuleTask2, updateSubModuleTask: updateSubModuleTask2 } = (init_sub_module(), __toCommonJS(sub_module_exports));
- var { addAnnotatedTagTask: addAnnotatedTagTask2, addTagTask: addTagTask2, tagListTask: tagListTask2 } = (init_tag(), __toCommonJS(tag_exports));
- var { straightThroughBufferTask: straightThroughBufferTask2, straightThroughStringTask: straightThroughStringTask2 } = (init_task(), __toCommonJS(task_exports));
- function Git2(options, plugins) {
- this._executor = new GitExecutor2(options.binary, options.baseDir, new Scheduler2(options.maxConcurrentProcesses), plugins);
- }
- (Git2.prototype = Object.create(SimpleGitApi2.prototype)).constructor = Git2;
- Git2.prototype.customBinary = function(command) {
- this._executor.binary = command;
- return this;
- };
- Git2.prototype.env = function(name, value) {
- if (arguments.length === 1 && typeof name === "object") {
- this._executor.env = name;
- } else {
- (this._executor.env = this._executor.env || {})[name] = value;
- }
- return this;
- };
- Git2.prototype.stashList = function(options) {
- return this._runTask(stashListTask2(trailingOptionsArgument2(arguments) || {}, filterArray2(options) && options || []), trailingFunctionArgument2(arguments));
- };
- function createCloneTask(api, task, repoPath, localPath) {
- if (typeof repoPath !== "string") {
- return configurationErrorTask2(`git.${api}() requires a string 'repoPath'`);
- }
- return task(repoPath, filterType2(localPath, filterString2), getTrailingOptions2(arguments));
- }
- Git2.prototype.clone = function() {
- return this._runTask(createCloneTask("clone", cloneTask2, ...arguments), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.mirror = function() {
- return this._runTask(createCloneTask("mirror", cloneMirrorTask2, ...arguments), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.mv = function(from, to) {
- return this._runTask(moveTask2(from, to), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.checkoutLatestTag = function(then) {
- var git = this;
- return this.pull(function() {
- git.tags(function(err, tags) {
- git.checkout(tags.latest, then);
- });
- });
- };
- Git2.prototype.commit = function(message, files, options, then) {
- const next = trailingFunctionArgument2(arguments);
- if (!filterStringOrStringArray2(message)) {
- return this._runTask(configurationErrorTask2("git.commit: requires the commit message to be supplied as a string/string[]"), next);
- }
- return this._runTask(commitTask2(asArray2(message), asArray2(filterType2(files, filterStringOrStringArray2, [])), [...filterType2(options, filterArray2, []), ...getTrailingOptions2(arguments, 0, true)]), next);
- };
- Git2.prototype.pull = function(remote, branch, options, then) {
- return this._runTask(pullTask2(filterType2(remote, filterString2), filterType2(branch, filterString2), getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.fetch = function(remote, branch) {
- return this._runTask(fetchTask2(filterType2(remote, filterString2), filterType2(branch, filterString2), getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.silent = function(silence) {
- console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3");
- return this;
- };
- Git2.prototype.tags = function(options, then) {
- return this._runTask(tagListTask2(getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.rebase = function() {
- return this._runTask(straightThroughStringTask2(["rebase", ...getTrailingOptions2(arguments)]), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.reset = function(mode) {
- return this._runTask(resetTask2(getResetMode2(mode), getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.revert = function(commit) {
- const next = trailingFunctionArgument2(arguments);
- if (typeof commit !== "string") {
- return this._runTask(configurationErrorTask2("Commit must be a string"), next);
- }
- return this._runTask(straightThroughStringTask2(["revert", ...getTrailingOptions2(arguments, 0, true), commit]), next);
- };
- Git2.prototype.addTag = function(name) {
- const task = typeof name === "string" ? addTagTask2(name) : configurationErrorTask2("Git.addTag requires a tag name");
- return this._runTask(task, trailingFunctionArgument2(arguments));
- };
- Git2.prototype.addAnnotatedTag = function(tagName, tagMessage) {
- return this._runTask(addAnnotatedTagTask2(tagName, tagMessage), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.checkout = function() {
- const commands = ["checkout", ...getTrailingOptions2(arguments, true)];
- return this._runTask(straightThroughStringTask2(commands), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.checkoutBranch = function(branchName, startPoint, then) {
- return this.checkout(["-b", branchName, startPoint], trailingFunctionArgument2(arguments));
- };
- Git2.prototype.checkoutLocalBranch = function(branchName, then) {
- return this.checkout(["-b", branchName], trailingFunctionArgument2(arguments));
- };
- Git2.prototype.deleteLocalBranch = function(branchName, forceDelete, then) {
- return this._runTask(deleteBranchTask2(branchName, typeof forceDelete === "boolean" ? forceDelete : false), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.deleteLocalBranches = function(branchNames, forceDelete, then) {
- return this._runTask(deleteBranchesTask2(branchNames, typeof forceDelete === "boolean" ? forceDelete : false), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.branch = function(options, then) {
- return this._runTask(branchTask2(getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.branchLocal = function(then) {
- return this._runTask(branchLocalTask2(), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.raw = function(commands) {
- const createRestCommands = !Array.isArray(commands);
- const command = [].slice.call(createRestCommands ? arguments : commands, 0);
- for (let i = 0; i < command.length && createRestCommands; i++) {
- if (!filterPrimitives2(command[i])) {
- command.splice(i, command.length - i);
- break;
- }
- }
- command.push(...getTrailingOptions2(arguments, 0, true));
- var next = trailingFunctionArgument2(arguments);
- if (!command.length) {
- return this._runTask(configurationErrorTask2("Raw: must supply one or more command to execute"), next);
- }
- return this._runTask(straightThroughStringTask2(command), next);
- };
- Git2.prototype.submoduleAdd = function(repo, path, then) {
- return this._runTask(addSubModuleTask2(repo, path), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.submoduleUpdate = function(args, then) {
- return this._runTask(updateSubModuleTask2(getTrailingOptions2(arguments, true)), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.submoduleInit = function(args, then) {
- return this._runTask(initSubModuleTask2(getTrailingOptions2(arguments, true)), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.subModule = function(options, then) {
- return this._runTask(subModuleTask2(getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.listRemote = function() {
- return this._runTask(listRemotesTask2(getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.addRemote = function(remoteName, remoteRepo, then) {
- return this._runTask(addRemoteTask2(remoteName, remoteRepo, getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.removeRemote = function(remoteName, then) {
- return this._runTask(removeRemoteTask2(remoteName), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.getRemotes = function(verbose, then) {
- return this._runTask(getRemotesTask2(verbose === true), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.remote = function(options, then) {
- return this._runTask(remoteTask2(getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.tag = function(options, then) {
- const command = getTrailingOptions2(arguments);
- if (command[0] !== "tag") {
- command.unshift("tag");
- }
- return this._runTask(straightThroughStringTask2(command), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.updateServerInfo = function(then) {
- return this._runTask(straightThroughStringTask2(["update-server-info"]), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.pushTags = function(remote, then) {
- const task = pushTagsTask2({ remote: filterType2(remote, filterString2) }, getTrailingOptions2(arguments));
- return this._runTask(task, trailingFunctionArgument2(arguments));
- };
- Git2.prototype.rm = function(files) {
- return this._runTask(straightThroughStringTask2(["rm", "-f", ...asArray2(files)]), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.rmKeepLocal = function(files) {
- return this._runTask(straightThroughStringTask2(["rm", "--cached", ...asArray2(files)]), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.catFile = function(options, then) {
- return this._catFile("utf-8", arguments);
- };
- Git2.prototype.binaryCatFile = function() {
- return this._catFile("buffer", arguments);
- };
- Git2.prototype._catFile = function(format, args) {
- var handler = trailingFunctionArgument2(args);
- var command = ["cat-file"];
- var options = args[0];
- if (typeof options === "string") {
- return this._runTask(configurationErrorTask2("Git.catFile: options must be supplied as an array of strings"), handler);
- }
- if (Array.isArray(options)) {
- command.push.apply(command, options);
- }
- const task = format === "buffer" ? straightThroughBufferTask2(command) : straightThroughStringTask2(command);
- return this._runTask(task, handler);
- };
- Git2.prototype.diff = function(options, then) {
- const task = filterString2(options) ? configurationErrorTask2("git.diff: supplying options as a single string is no longer supported, switch to an array of strings") : straightThroughStringTask2(["diff", ...getTrailingOptions2(arguments)]);
- return this._runTask(task, trailingFunctionArgument2(arguments));
- };
- Git2.prototype.diffSummary = function() {
- return this._runTask(diffSummaryTask2(getTrailingOptions2(arguments, 1)), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.applyPatch = function(patches) {
- const task = !filterStringOrStringArray2(patches) ? configurationErrorTask2(`git.applyPatch requires one or more string patches as the first argument`) : applyPatchTask2(asArray2(patches), getTrailingOptions2([].slice.call(arguments, 1)));
- return this._runTask(task, trailingFunctionArgument2(arguments));
- };
- Git2.prototype.revparse = function() {
- const commands = ["rev-parse", ...getTrailingOptions2(arguments, true)];
- return this._runTask(straightThroughStringTask2(commands, true), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.show = function(options, then) {
- return this._runTask(straightThroughStringTask2(["show", ...getTrailingOptions2(arguments, 1)]), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.clean = function(mode, options, then) {
- const usingCleanOptionsArray = isCleanOptionsArray2(mode);
- const cleanMode = usingCleanOptionsArray && mode.join("") || filterType2(mode, filterString2) || "";
- const customArgs = getTrailingOptions2([].slice.call(arguments, usingCleanOptionsArray ? 1 : 0));
- return this._runTask(cleanWithOptionsTask2(cleanMode, customArgs), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.exec = function(then) {
- const task = {
- commands: [],
- format: "utf-8",
- parser() {
- if (typeof then === "function") {
- then();
- }
- }
- };
- return this._runTask(task);
- };
- Git2.prototype.clearQueue = function() {
- return this;
- };
- Git2.prototype.checkIgnore = function(pathnames, then) {
- return this._runTask(checkIgnoreTask2(asArray2(filterType2(pathnames, filterStringOrStringArray2, []))), trailingFunctionArgument2(arguments));
- };
- Git2.prototype.checkIsRepo = function(checkType, then) {
- return this._runTask(checkIsRepoTask2(filterType2(checkType, filterString2)), trailingFunctionArgument2(arguments));
- };
- module.exports = Git2;
- }
-});
-
-// src/lib/errors/git-construct-error.ts
-init_git_error();
-var GitConstructError = class extends GitError {
- constructor(config, message) {
- super(void 0, message);
- this.config = config;
- }
-};
-
-// src/lib/api.ts
-init_git_error();
-
-// src/lib/errors/git-plugin-error.ts
-init_git_error();
-var GitPluginError = class extends GitError {
- constructor(task, plugin, message) {
- super(task, message);
- this.task = task;
- this.plugin = plugin;
- Object.setPrototypeOf(this, new.target.prototype);
- }
-};
-
-// src/lib/api.ts
-init_git_response_error();
-init_task_configuration_error();
-init_check_is_repo();
-init_clean();
-init_config();
-init_grep();
-init_reset();
-
-// src/lib/plugins/command-config-prefixing-plugin.ts
-init_utils();
-function commandConfigPrefixingPlugin(configuration) {
- const prefix = prefixedArray(configuration, "-c");
- return {
- type: "spawn.args",
- action(data) {
- return [...prefix, ...data];
- }
- };
-}
-
-// src/lib/plugins/completion-detection.plugin.ts
-init_utils();
-import { deferred } from "@kwsites/promise-deferred";
-var never = deferred().promise;
-function completionDetectionPlugin({
- onClose = true,
- onExit = 50
-} = {}) {
- function createEvents() {
- let exitCode = -1;
- const events = {
- close: deferred(),
- closeTimeout: deferred(),
- exit: deferred(),
- exitTimeout: deferred()
- };
- const result = Promise.race([
- onClose === false ? never : events.closeTimeout.promise,
- onExit === false ? never : events.exitTimeout.promise
- ]);
- configureTimeout(onClose, events.close, events.closeTimeout);
- configureTimeout(onExit, events.exit, events.exitTimeout);
- return {
- close(code) {
- exitCode = code;
- events.close.done();
- },
- exit(code) {
- exitCode = code;
- events.exit.done();
- },
- get exitCode() {
- return exitCode;
- },
- result
- };
- }
- function configureTimeout(flag, event, timeout) {
- if (flag === false) {
- return;
- }
- (flag === true ? event.promise : event.promise.then(() => delay(flag))).then(timeout.done);
- }
- return {
- type: "spawn.after",
- action(_0, _1) {
- return __async(this, arguments, function* (_data, { spawned, close }) {
- var _a2, _b;
- const events = createEvents();
- let deferClose = true;
- let quickClose = () => void (deferClose = false);
- (_a2 = spawned.stdout) == null ? void 0 : _a2.on("data", quickClose);
- (_b = spawned.stderr) == null ? void 0 : _b.on("data", quickClose);
- spawned.on("error", quickClose);
- spawned.on("close", (code) => events.close(code));
- spawned.on("exit", (code) => events.exit(code));
- try {
- yield events.result;
- if (deferClose) {
- yield delay(50);
- }
- close(events.exitCode);
- } catch (err) {
- close(events.exitCode, err);
- }
- });
- }
- };
-}
-
-// src/lib/plugins/error-detection.plugin.ts
-init_git_error();
-function isTaskError(result) {
- return !!(result.exitCode && result.stdErr.length);
-}
-function getErrorMessage(result) {
- return Buffer.concat([...result.stdOut, ...result.stdErr]);
-}
-function errorDetectionHandler(overwrite = false, isError = isTaskError, errorMessage = getErrorMessage) {
- return (error, result) => {
- if (!overwrite && error || !isError(result)) {
- return error;
- }
- return errorMessage(result);
- };
-}
-function errorDetectionPlugin(config) {
- return {
- type: "task.error",
- action(data, context) {
- const error = config(data.error, {
- stdErr: context.stdErr,
- stdOut: context.stdOut,
- exitCode: context.exitCode
- });
- if (Buffer.isBuffer(error)) {
- return { error: new GitError(void 0, error.toString("utf-8")) };
- }
- return {
- error
- };
- }
- };
-}
-
-// src/lib/plugins/plugin-store.ts
-init_utils();
-var PluginStore = class {
- constructor() {
- this.plugins = /* @__PURE__ */ new Set();
- }
- add(plugin) {
- const plugins = [];
- asArray(plugin).forEach((plugin2) => plugin2 && this.plugins.add(append(plugins, plugin2)));
- return () => {
- plugins.forEach((plugin2) => this.plugins.delete(plugin2));
- };
- }
- exec(type, data, context) {
- let output = data;
- const contextual = Object.freeze(Object.create(context));
- for (const plugin of this.plugins) {
- if (plugin.type === type) {
- output = plugin.action(output, contextual);
- }
- }
- return output;
- }
-};
-
-// src/lib/plugins/progress-monitor-plugin.ts
-init_utils();
-function progressMonitorPlugin(progress) {
- const progressCommand = "--progress";
- const progressMethods = ["checkout", "clone", "fetch", "pull", "push"];
- const onProgress = {
- type: "spawn.after",
- action(_data, context) {
- var _a2;
- if (!context.commands.includes(progressCommand)) {
- return;
- }
- (_a2 = context.spawned.stderr) == null ? void 0 : _a2.on("data", (chunk) => {
- const message = /^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(chunk.toString("utf8"));
- if (!message) {
- return;
- }
- progress({
- method: context.method,
- stage: progressEventStage(message[1]),
- progress: asNumber(message[2]),
- processed: asNumber(message[3]),
- total: asNumber(message[4])
- });
- });
- }
- };
- const onArgs = {
- type: "spawn.args",
- action(args, context) {
- if (!progressMethods.includes(context.method)) {
- return args;
- }
- return including(args, progressCommand);
- }
- };
- return [onArgs, onProgress];
-}
-function progressEventStage(input) {
- return String(input.toLowerCase().split(" ", 1)) || "unknown";
-}
-
-// src/lib/plugins/spawn-options-plugin.ts
-init_utils();
-function spawnOptionsPlugin(spawnOptions) {
- const options = pick(spawnOptions, ["uid", "gid"]);
- return {
- type: "spawn.options",
- action(data) {
- return __spreadValues(__spreadValues({}, options), data);
- }
- };
-}
-
-// src/lib/plugins/timout-plugin.ts
-function timeoutPlugin({ block }) {
- if (block > 0) {
- return {
- type: "spawn.after",
- action(_data, context) {
- var _a2, _b;
- let timeout;
- function wait() {
- timeout && clearTimeout(timeout);
- timeout = setTimeout(kill, block);
- }
- function stop() {
- var _a3, _b2;
- (_a3 = context.spawned.stdout) == null ? void 0 : _a3.off("data", wait);
- (_b2 = context.spawned.stderr) == null ? void 0 : _b2.off("data", wait);
- context.spawned.off("exit", stop);
- context.spawned.off("close", stop);
- }
- function kill() {
- stop();
- context.kill(new GitPluginError(void 0, "timeout", `block timeout reached`));
- }
- (_a2 = context.spawned.stdout) == null ? void 0 : _a2.on("data", wait);
- (_b = context.spawned.stderr) == null ? void 0 : _b.on("data", wait);
- context.spawned.on("exit", stop);
- context.spawned.on("close", stop);
- wait();
- }
- };
- }
-}
-
-// src/lib/git-factory.ts
-init_utils();
-var Git = require_git();
-function gitInstanceFactory(baseDir, options) {
- const plugins = new PluginStore();
- const config = createInstanceConfig(baseDir && (typeof baseDir === "string" ? { baseDir } : baseDir) || {}, options);
- if (!folderExists(config.baseDir)) {
- throw new GitConstructError(config, `Cannot use simple-git on a directory that does not exist`);
- }
- if (Array.isArray(config.config)) {
- plugins.add(commandConfigPrefixingPlugin(config.config));
- }
- plugins.add(completionDetectionPlugin(config.completion));
- config.progress && plugins.add(progressMonitorPlugin(config.progress));
- config.timeout && plugins.add(timeoutPlugin(config.timeout));
- config.spawnOptions && plugins.add(spawnOptionsPlugin(config.spawnOptions));
- plugins.add(errorDetectionPlugin(errorDetectionHandler(true)));
- config.errors && plugins.add(errorDetectionPlugin(config.errors));
- return new Git(config, plugins);
-}
-
-// src/lib/runners/promise-wrapped.ts
-init_git_response_error();
-var functionNamesBuilderApi = [
- "customBinary",
- "env",
- "outputHandler",
- "silent"
-];
-var functionNamesPromiseApi = [
- "add",
- "addAnnotatedTag",
- "addConfig",
- "addRemote",
- "addTag",
- "applyPatch",
- "binaryCatFile",
- "branch",
- "branchLocal",
- "catFile",
- "checkIgnore",
- "checkIsRepo",
- "checkout",
- "checkoutBranch",
- "checkoutLatestTag",
- "checkoutLocalBranch",
- "clean",
- "clone",
- "commit",
- "cwd",
- "deleteLocalBranch",
- "deleteLocalBranches",
- "diff",
- "diffSummary",
- "exec",
- "fetch",
- "getRemotes",
- "init",
- "listConfig",
- "listRemote",
- "log",
- "merge",
- "mergeFromTo",
- "mirror",
- "mv",
- "pull",
- "push",
- "pushTags",
- "raw",
- "rebase",
- "remote",
- "removeRemote",
- "reset",
- "revert",
- "revparse",
- "rm",
- "rmKeepLocal",
- "show",
- "stash",
- "stashList",
- "status",
- "subModule",
- "submoduleAdd",
- "submoduleInit",
- "submoduleUpdate",
- "tag",
- "tags",
- "updateServerInfo"
-];
-function gitP(...args) {
- let git;
- let chain = Promise.resolve();
- try {
- git = gitInstanceFactory(...args);
- } catch (e) {
- chain = Promise.reject(e);
- }
- function builderReturn() {
- return promiseApi;
- }
- function chainReturn() {
- return chain;
- }
- const promiseApi = [...functionNamesBuilderApi, ...functionNamesPromiseApi].reduce((api, name) => {
- const isAsync = functionNamesPromiseApi.includes(name);
- const valid = isAsync ? asyncWrapper(name, git) : syncWrapper(name, git, api);
- const alternative = isAsync ? chainReturn : builderReturn;
- Object.defineProperty(api, name, {
- enumerable: false,
- configurable: false,
- value: git ? valid : alternative
- });
- return api;
- }, {});
- return promiseApi;
- function asyncWrapper(fn, git2) {
- return function(...args2) {
- if (typeof args2[args2.length] === "function") {
- throw new TypeError("Promise interface requires that handlers are not supplied inline, trailing function not allowed in call to " + fn);
- }
- return chain.then(function() {
- return new Promise(function(resolve, reject) {
- const callback = (err, result) => {
- if (err) {
- return reject(toError(err));
- }
- resolve(result);
- };
- args2.push(callback);
- git2[fn].apply(git2, args2);
- });
- });
- };
- }
- function syncWrapper(fn, git2, api) {
- return (...args2) => {
- git2[fn](...args2);
- return api;
- };
- }
-}
-function toError(error) {
- if (error instanceof Error) {
- return error;
- }
- if (typeof error === "string") {
- return new Error(error);
- }
- return new GitResponseError(error);
-}
-
-// src/esm.mjs
-var esm_default = gitInstanceFactory;
-export {
- CheckRepoActions,
- CleanOptions,
- GitConfigScope,
- GitConstructError,
- GitError,
- GitPluginError,
- GitResponseError,
- ResetMode,
- TaskConfigurationError,
- esm_default as default,
- gitP,
- grepQueryBuilder
-};
-//# sourceMappingURL=index.js.map
diff --git a/node_modules/simple-git/esm/index.js.map b/node_modules/simple-git/esm/index.js.map
deleted file mode 100644
index 5acc5ab..0000000
--- a/node_modules/simple-git/esm/index.js.map
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "version": 3,
- "sources": ["../../src/lib/errors/git-error.ts", "../../src/lib/errors/git-response-error.ts", "../../src/lib/errors/task-configuration-error.ts", "../../src/lib/utils/util.ts", "../../src/lib/utils/argument-filters.ts", "../../src/lib/utils/exit-codes.ts", "../../src/lib/utils/git-output-streams.ts", "../../src/lib/utils/line-parser.ts", "../../src/lib/utils/simple-git-options.ts", "../../src/lib/utils/task-options.ts", "../../src/lib/utils/task-parser.ts", "../../src/lib/utils/index.ts", "../../src/lib/tasks/check-is-repo.ts", "../../src/lib/responses/CleanSummary.ts", "../../src/lib/tasks/task.ts", "../../src/lib/tasks/clean.ts", "../../src/lib/responses/ConfigList.ts", "../../src/lib/tasks/config.ts", "../../src/lib/tasks/grep.ts", "../../src/lib/tasks/reset.ts", "../../src/lib/git-logger.ts", "../../src/lib/runners/tasks-pending-queue.ts", "../../src/lib/runners/git-executor-chain.ts", "../../src/lib/runners/git-executor.ts", "../../src/lib/task-callback.ts", "../../src/lib/tasks/change-working-directory.ts", "../../src/lib/tasks/hash-object.ts", "../../src/lib/responses/InitSummary.ts", "../../src/lib/tasks/init.ts", "../../src/lib/responses/DiffSummary.ts", "../../src/lib/parsers/parse-diff-summary.ts", "../../src/lib/parsers/parse-list-log-summary.ts", "../../src/lib/tasks/log.ts", "../../src/lib/responses/MergeSummary.ts", "../../src/lib/responses/PullSummary.ts", "../../src/lib/parsers/parse-remote-objects.ts", "../../src/lib/parsers/parse-remote-messages.ts", "../../src/lib/parsers/parse-pull.ts", "../../src/lib/parsers/parse-merge.ts", "../../src/lib/tasks/merge.ts", "../../src/lib/parsers/parse-push.ts", "../../src/lib/tasks/push.ts", "../../src/lib/responses/FileStatusSummary.ts", "../../src/lib/responses/StatusSummary.ts", "../../src/lib/tasks/status.ts", "../../src/lib/simple-git-api.ts", "../../src/lib/runners/scheduler.ts", "../../src/lib/tasks/apply-patch.ts", "../../src/lib/responses/BranchDeleteSummary.ts", "../../src/lib/parsers/parse-branch-delete.ts", "../../src/lib/responses/BranchSummary.ts", "../../src/lib/parsers/parse-branch.ts", "../../src/lib/tasks/branch.ts", "../../src/lib/responses/CheckIgnore.ts", "../../src/lib/tasks/check-ignore.ts", "../../src/lib/tasks/clone.ts", "../../src/lib/parsers/parse-commit.ts", "../../src/lib/tasks/commit.ts", "../../src/lib/tasks/diff.ts", "../../src/lib/parsers/parse-fetch.ts", "../../src/lib/tasks/fetch.ts", "../../src/lib/parsers/parse-move.ts", "../../src/lib/tasks/move.ts", "../../src/lib/tasks/pull.ts", "../../src/lib/responses/GetRemoteSummary.ts", "../../src/lib/tasks/remote.ts", "../../src/lib/tasks/stash-list.ts", "../../src/lib/tasks/sub-module.ts", "../../src/lib/responses/TagList.ts", "../../src/lib/tasks/tag.ts", "../../src/git.js", "../../src/lib/errors/git-construct-error.ts", "../../src/lib/api.ts", "../../src/lib/errors/git-plugin-error.ts", "../../src/lib/plugins/command-config-prefixing-plugin.ts", "../../src/lib/plugins/completion-detection.plugin.ts", "../../src/lib/plugins/error-detection.plugin.ts", "../../src/lib/plugins/plugin-store.ts", "../../src/lib/plugins/progress-monitor-plugin.ts", "../../src/lib/plugins/spawn-options-plugin.ts", "../../src/lib/plugins/timout-plugin.ts", "../../src/lib/git-factory.ts", "../../src/lib/runners/promise-wrapped.ts", "../../src/esm.mjs"],
- "sourcesContent": ["import { SimpleGitTask } from '../types';\n\n/**\n * The `GitError` is thrown when the underlying `git` process throws a\n * fatal exception (eg an `ENOENT` exception when attempting to use a\n * non-writable directory as the root for your repo), and acts as the\n * base class for more specific errors thrown by the parsing of the\n * git response or errors in the configuration of the task about to\n * be run.\n *\n * When an exception is thrown, pending tasks in the same instance will\n * not be executed. The recommended way to run a series of tasks that\n * can independently fail without needing to prevent future tasks from\n * running is to catch them individually:\n *\n * ```typescript\n import { gitP, SimpleGit, GitError, PullResult } from 'simple-git';\n\n function catchTask (e: GitError) {\n return e.\n }\n\n const git = gitP(repoWorkingDir);\n const pulled: PullResult | GitError = await git.pull().catch(catchTask);\n const pushed: string | GitError = await git.pushTags().catch(catchTask);\n ```\n */\nexport class GitError extends Error {\n\n constructor (\n public task?: SimpleGitTask<any>,\n message?: string,\n ) {\n super(message);\n Object.setPrototypeOf(this, new.target.prototype);\n }\n\n}\n", "import { GitError } from './git-error';\n\n/**\n * The `GitResponseError` is the wrapper for a parsed response that is treated as\n * a fatal error, for example attempting a `merge` can leave the repo in a corrupted\n * state when there are conflicts so the task will reject rather than resolve.\n *\n * For example, catching the merge conflict exception:\n *\n * ```typescript\n import { gitP, SimpleGit, GitResponseError, MergeSummary } from 'simple-git';\n\n const git = gitP(repoRoot);\n const mergeOptions: string[] = ['--no-ff', 'other-branch'];\n const mergeSummary: MergeSummary = await git.merge(mergeOptions)\n .catch((e: GitResponseError<MergeSummary>) => e.git);\n\n if (mergeSummary.failed) {\n // deal with the error\n }\n ```\n */\nexport class GitResponseError<T = any> extends GitError {\n\n constructor(\n /**\n * `.git` access the parsed response that is treated as being an error\n */\n public readonly git: T,\n message?: string,\n ) {\n super(undefined, message || String(git));\n }\n\n}\n", "import { GitError } from './git-error';\n\n/**\n * The `TaskConfigurationError` is thrown when a command was incorrectly\n * configured. An error of this kind means that no attempt was made to\n * run your command through the underlying `git` binary.\n *\n * Check the `.message` property for more detail on why your configuration\n * resulted in an error.\n */\nexport class TaskConfigurationError extends GitError {\n\n constructor (\n message?: string,\n ) {\n super(undefined, message);\n }\n\n}\n", "import { exists, FOLDER } from '@kwsites/file-exists';\nimport { Maybe } from '../types';\n\nexport const NULL = '\\0';\n\nexport const NOOP: (...args: any[]) => void = () => {\n};\n\n/**\n * Returns either the source argument when it is a `Function`, or the default\n * `NOOP` function constant\n */\nexport function asFunction<T extends () => any>(source: T | any): T {\n return typeof source === 'function' ? source : NOOP;\n}\n\n/**\n * Determines whether the supplied argument is both a function, and is not\n * the `NOOP` function.\n */\nexport function isUserFunction<T extends Function>(source: T | any): source is T {\n return (typeof source === 'function' && source !== NOOP);\n}\n\nexport function splitOn(input: string, char: string): [string, string] {\n const index = input.indexOf(char);\n if (index <= 0) {\n return [input, ''];\n }\n\n return [\n input.substr(0, index),\n input.substr(index + 1),\n ];\n}\n\nexport function first<T extends any[]>(input: T, offset?: number): Maybe<T[number]>;\nexport function first<T extends IArguments>(input: T, offset?: number): Maybe<unknown>;\nexport function first(input: any[] | IArguments, offset = 0): Maybe<unknown> {\n return isArrayLike(input) && input.length > offset ? input[offset] : undefined;\n}\n\nexport function last<T extends any[]>(input: T, offset?: number): Maybe<T[number]>;\nexport function last<T extends IArguments>(input: T, offset?: number): Maybe<unknown>;\nexport function last<T>(input: T, offset?: number): Maybe<unknown>;\nexport function last(input: unknown, offset = 0) {\n if (isArrayLike(input) && input.length > offset) {\n return input[input.length - 1 - offset];\n }\n}\n\ntype ArrayLike<T = any> = T[] | IArguments | { [index: number]: T; length: number };\n\nfunction isArrayLike(input: any): input is ArrayLike {\n return !!(input && typeof input.length === 'number');\n}\n\nexport function toLinesWithContent(input = '', trimmed = true, separator = '\\n'): string[] {\n return input.split(separator)\n .reduce((output, line) => {\n const lineContent = trimmed ? line.trim() : line;\n if (lineContent) {\n output.push(lineContent);\n }\n return output;\n }, [] as string[]);\n}\n\ntype LineWithContentCallback<T = void> = (line: string) => T;\n\nexport function forEachLineWithContent<T>(input: string, callback: LineWithContentCallback<T>): T[] {\n return toLinesWithContent(input, true).map(line => callback(line));\n}\n\nexport function folderExists(path: string): boolean {\n return exists(path, FOLDER);\n}\n\n/**\n * Adds `item` into the `target` `Array` or `Set` when it is not already present and returns the `item`.\n */\nexport function append<T>(target: T[] | Set<T>, item: T): typeof item {\n if (Array.isArray(target)) {\n if (!target.includes(item)) {\n target.push(item);\n }\n } else {\n target.add(item);\n }\n return item;\n}\n\n/**\n * Adds `item` into the `target` `Array` when it is not already present and returns the `target`.\n */\nexport function including<T>(target: T[], item: T): typeof target {\n if (Array.isArray(target) && !target.includes(item)) {\n target.push(item);\n }\n\n return target;\n}\n\nexport function remove<T>(target: Set<T> | T[], item: T): T {\n if (Array.isArray(target)) {\n const index = target.indexOf(item);\n if (index >= 0) {\n target.splice(index, 1);\n }\n } else {\n target.delete(item);\n }\n return item;\n}\n\nexport const objectToString = Object.prototype.toString.call.bind(Object.prototype.toString) as (input: any) => string;\n\nexport function asArray<T>(source: T | T[]): T[] {\n return Array.isArray(source) ? source : [source];\n}\n\nexport function asStringArray<T>(source: T | T[]): string[] {\n return asArray(source).map(String);\n}\n\nexport function asNumber(source: string | null | undefined, onNaN = 0) {\n if (source == null) {\n return onNaN;\n }\n\n const num = parseInt(source, 10);\n return isNaN(num) ? onNaN : num;\n}\n\nexport function prefixedArray<T>(input: T[], prefix: T): T[] {\n const output: T[] = [];\n for (let i = 0, max = input.length; i < max; i++) {\n output.push(prefix, input[i]);\n }\n return output;\n}\n\nexport function bufferToString(input: Buffer | Buffer[]): string {\n return (Array.isArray(input) ? Buffer.concat(input) : input).toString('utf-8');\n}\n\n/**\n * Get a new object from a source object with only the listed properties.\n */\nexport function pick(source: Record<string, any>, properties: string[]) {\n return Object.assign({}, ...properties.map((property) => property in source ? {[property]: source[property]} : {}));\n}\n\nexport function delay(duration = 0): Promise<void> {\n return new Promise(done => setTimeout(done, duration));\n}\n", "import { Maybe, Options, Primitives } from '../types';\nimport { objectToString } from './util';\n\nexport interface ArgumentFilterPredicate<T> {\n (input: any): input is T;\n}\n\nexport function filterType<T, K>(input: K, filter: ArgumentFilterPredicate<T>): K extends T ? T : undefined;\nexport function filterType<T, K>(input: K, filter: ArgumentFilterPredicate<T>, def: T): T;\nexport function filterType<T, K>(input: K, filter: ArgumentFilterPredicate<T>, def?: T): Maybe<T> {\n if (filter(input)) {\n return input;\n }\n return (arguments.length > 2) ? def : undefined\n}\n\nexport const filterArray: ArgumentFilterPredicate<Array<any>> = (input): input is Array<any> => {\n return Array.isArray(input);\n}\n\nexport function filterPrimitives(input: unknown, omit?: Array<'boolean' | 'string' | 'number'>): input is Primitives {\n return /number|string|boolean/.test(typeof input) && (!omit || !omit.includes((typeof input) as 'boolean' | 'string' | 'number'));\n}\n\nexport const filterString: ArgumentFilterPredicate<string> = (input): input is string => {\n return typeof input === 'string';\n};\n\nexport const filterStringArray: ArgumentFilterPredicate<string[]> = (input): input is string[] => {\n return Array.isArray(input) && input.every(filterString);\n};\n\nexport const filterStringOrStringArray: ArgumentFilterPredicate<string | string[]> = (input): input is string | string[] => {\n return filterString(input) || (Array.isArray(input) && input.every(filterString));\n};\n\nexport function filterPlainObject<T extends Options>(input: T | unknown): input is T;\nexport function filterPlainObject<T extends Object>(input: T | unknown): input is T {\n return !!input && objectToString(input) === '[object Object]';\n}\n\nexport function filterFunction(input: unknown): input is Function {\n return typeof input === 'function';\n}\n\nexport const filterHasLength: ArgumentFilterPredicate<{ length: number }> = (input): input is { length: number } => {\n if (input == null || 'number|boolean|function'.includes(typeof input)) {\n return false;\n }\n return Array.isArray(input) || typeof input === 'string' || typeof input.length === 'number';\n}\n", "/**\n * Known process exit codes used by the task parsers to determine whether an error\n * was one they can automatically handle\n */\nexport enum ExitCodes {\n SUCCESS,\n ERROR,\n UNCLEAN = 128,\n}\n", "import { TaskResponseFormat } from '../types';\n\nexport class GitOutputStreams<T extends TaskResponseFormat = Buffer> {\n\n constructor(public readonly stdOut: T, public readonly stdErr: T) {\n }\n\n asStrings(): GitOutputStreams<string> {\n return new GitOutputStreams(this.stdOut.toString('utf8'), this.stdErr.toString('utf8'));\n }\n}\n", "export class LineParser<T> {\n\n protected matches: string[] = [];\n\n private _regExp: RegExp[];\n\n constructor(\n regExp: RegExp | RegExp[],\n useMatches?: (target: T, match: string[]) => boolean | void,\n ) {\n this._regExp = Array.isArray(regExp) ? regExp : [regExp];\n if (useMatches) {\n this.useMatches = useMatches;\n }\n }\n\n parse = (line: (offset: number) => (string | undefined), target: T): boolean => {\n this.resetMatches();\n\n if (!this._regExp.every((reg, index) => this.addMatch(reg, index, line(index)))) {\n return false;\n }\n\n return this.useMatches(target, this.prepareMatches()) !== false;\n }\n\n // @ts-ignore\n protected useMatches(target: T, match: string[]): boolean | void {\n throw new Error(`LineParser:useMatches not implemented`);\n }\n\n protected resetMatches() {\n this.matches.length = 0;\n }\n\n protected prepareMatches() {\n return this.matches;\n }\n\n protected addMatch(reg: RegExp, index: number, line?: string) {\n const matched = line && reg.exec(line);\n if (matched) {\n this.pushMatch(index, matched);\n }\n\n return !!matched;\n }\n\n protected pushMatch(_index: number, matched: string[]) {\n this.matches.push(...matched.slice(1));\n }\n\n}\n\nexport class RemoteLineParser<T> extends LineParser<T> {\n\n protected addMatch(reg: RegExp, index: number, line?: string): boolean {\n return /^remote:\\s/.test(String(line)) && super.addMatch(reg, index, line);\n }\n\n protected pushMatch(index: number, matched: string[]) {\n if (index > 0 || matched.length > 1) {\n super.pushMatch(index, matched);\n }\n }\n\n}\n", "import { SimpleGitOptions } from '../types';\n\nconst defaultOptions: Omit<SimpleGitOptions, 'baseDir'> = {\n binary: 'git',\n maxConcurrentProcesses: 5,\n config: [],\n};\n\nexport function createInstanceConfig(...options: Array<Partial<SimpleGitOptions> | undefined>): SimpleGitOptions {\n const baseDir = process.cwd();\n const config: SimpleGitOptions = Object.assign({baseDir, ...defaultOptions},\n ...(options.filter(o => typeof o === 'object' && o))\n );\n\n config.baseDir = config.baseDir || baseDir;\n\n return config;\n}\n", "import { filterArray, filterFunction, filterPlainObject, filterPrimitives, filterType } from './argument-filters';\nimport { asFunction, isUserFunction, last } from './util';\nimport { Maybe, Options, OptionsValues } from '../types';\n\nexport function appendTaskOptions<T extends Options = Options>(options: Maybe<T>, commands: string[] = []): string[] {\n if (!filterPlainObject<Options>(options)) {\n return commands;\n }\n\n return Object.keys(options).reduce((commands: string[], key: string) => {\n const value: OptionsValues = options[key];\n\n if (filterPrimitives(value, ['boolean'])) {\n commands.push(key + '=' + value);\n } else {\n commands.push(key);\n }\n\n return commands;\n }, commands);\n}\n\nexport function getTrailingOptions(args: IArguments, initialPrimitive = 0, objectOnly = false): string[] {\n const command: string[] = [];\n\n for (let i = 0, max = initialPrimitive < 0 ? args.length : initialPrimitive; i < max; i++) {\n if ('string|number'.includes(typeof args[i])) {\n command.push(String(args[i]));\n }\n }\n\n appendTaskOptions(trailingOptionsArgument(args), command);\n if (!objectOnly) {\n command.push(...trailingArrayArgument(args));\n }\n\n return command;\n}\n\nfunction trailingArrayArgument(args: IArguments) {\n const hasTrailingCallback = typeof last(args) === 'function';\n return filterType(\n last(args, hasTrailingCallback ? 1 : 0), filterArray, []\n );\n}\n\n/**\n * Given any number of arguments, returns the trailing options argument, ignoring a trailing function argument\n * if there is one. When not found, the return value is null.\n */\nexport function trailingOptionsArgument(args: IArguments): Maybe<Options> {\n const hasTrailingCallback = filterFunction(last(args));\n return filterType(last(args, hasTrailingCallback ? 1 : 0), filterPlainObject);\n}\n\n/**\n * Returns either the source argument when it is a `Function`, or the default\n * `NOOP` function constant\n */\nexport function trailingFunctionArgument(args: unknown[] | IArguments | unknown, includeNoop = true): Maybe<(...args: any[]) => unknown> {\n const callback = asFunction(last(args));\n return includeNoop || isUserFunction(callback) ? callback : undefined;\n}\n", "import { TaskParser, TaskResponseFormat } from '../types';\nimport { GitOutputStreams } from './git-output-streams';\nimport { LineParser } from './line-parser';\nimport { toLinesWithContent } from './util';\n\nexport function callTaskParser<INPUT extends TaskResponseFormat, RESPONSE>(parser: TaskParser<INPUT, RESPONSE>, streams: GitOutputStreams<INPUT>) {\n return parser(streams.stdOut, streams.stdErr);\n}\n\nexport function parseStringResponse<T>(result: T, parsers: LineParser<T>[], ...texts: string[]): T {\n texts.forEach(text => {\n for (let lines = toLinesWithContent(text), i = 0, max = lines.length; i < max; i++) {\n const line = (offset = 0) => {\n if ((i + offset) >= max) {\n return;\n }\n return lines[i + offset];\n }\n\n parsers.some(({parse}) => parse(line, result));\n }\n });\n\n return result;\n}\n", "\nexport * from './argument-filters';\nexport * from './exit-codes';\nexport * from './git-output-streams';\nexport * from './line-parser';\nexport * from './simple-git-options';\nexport * from './task-options';\nexport * from './task-parser';\nexport * from './util';\n", "import { ExitCodes } from '../utils';\nimport { Maybe, StringTask } from '../types';\n\nexport enum CheckRepoActions {\n BARE = 'bare',\n IN_TREE = 'tree',\n IS_REPO_ROOT = 'root',\n}\n\nconst onError: StringTask<boolean>['onError'] = ({exitCode}, error, done, fail) => {\n if (exitCode === ExitCodes.UNCLEAN && isNotRepoMessage(error)) {\n return done(Buffer.from('false'));\n }\n\n fail(error);\n}\n\nconst parser: StringTask<boolean>['parser'] = (text) => {\n return text.trim() === 'true';\n}\n\nexport function checkIsRepoTask(action: Maybe<CheckRepoActions>): StringTask<boolean> {\n switch (action) {\n case CheckRepoActions.BARE:\n return checkIsBareRepoTask();\n case CheckRepoActions.IS_REPO_ROOT:\n return checkIsRepoRootTask();\n }\n\n const commands = ['rev-parse', '--is-inside-work-tree'];\n\n return {\n commands,\n format: 'utf-8',\n onError,\n parser,\n }\n}\n\n\nexport function checkIsRepoRootTask(): StringTask<boolean> {\n const commands = ['rev-parse', '--git-dir'];\n\n return {\n commands,\n format: 'utf-8',\n onError,\n parser(path) {\n return /^\\.(git)?$/.test(path.trim());\n },\n }\n}\n\n\nexport function checkIsBareRepoTask(): StringTask<boolean> {\n const commands = ['rev-parse', '--is-bare-repository'];\n\n return {\n commands,\n format: 'utf-8',\n onError,\n parser,\n }\n}\n\n\nfunction isNotRepoMessage(error: Error): boolean {\n return /(Not a git repository|Kein Git-Repository)/i.test(String(error));\n}\n", "import { CleanSummary } from '../../../typings';\nimport { toLinesWithContent } from '../utils';\n\nexport class CleanResponse implements CleanSummary {\n\n public paths: string[] = [];\n public files: string[] = [];\n public folders: string[] = [];\n\n constructor(\n public readonly dryRun: boolean,\n ) {}\n\n}\n\nconst removalRegexp = /^[a-z]+\\s*/i;\nconst dryRunRemovalRegexp = /^[a-z]+\\s+[a-z]+\\s*/i;\nconst isFolderRegexp = /\\/$/;\n\nexport function cleanSummaryParser (dryRun: boolean, text: string): CleanSummary {\n const summary = new CleanResponse(dryRun);\n const regexp = dryRun ? dryRunRemovalRegexp : removalRegexp;\n\n toLinesWithContent(text).forEach(line => {\n const removed = line.replace(regexp, '');\n\n summary.paths.push(removed);\n (isFolderRegexp.test(removed) ? summary.folders : summary.files).push(removed);\n });\n\n return summary;\n}\n", "import { TaskConfigurationError } from '../errors/task-configuration-error';\nimport { BufferTask, EmptyTaskParser, SimpleGitTask, StringTask } from '../types';\n\nexport const EMPTY_COMMANDS: [] = [];\n\nexport type EmptyTask = {\n commands: typeof EMPTY_COMMANDS;\n format: 'empty',\n parser: EmptyTaskParser;\n onError?: undefined;\n};\n\n\nexport function adhocExecTask(parser: EmptyTaskParser): EmptyTask {\n return {\n commands: EMPTY_COMMANDS,\n format: 'empty',\n parser,\n };\n}\n\nexport function configurationErrorTask(error: Error | string): EmptyTask {\n return {\n commands: EMPTY_COMMANDS,\n format: 'empty',\n parser() {\n throw typeof error === 'string' ? new TaskConfigurationError(error) : error;\n }\n }\n}\n\nexport function straightThroughStringTask(commands: string[], trimmed = false): StringTask<string> {\n return {\n commands,\n format: 'utf-8',\n parser(text) {\n return trimmed ? String(text).trim() : text;\n },\n }\n}\n\nexport function straightThroughBufferTask(commands: string[]): BufferTask<any> {\n return {\n commands,\n format: 'buffer',\n parser(buffer) {\n return buffer;\n },\n }\n}\n\nexport function isBufferTask<R>(task: SimpleGitTask<R>): task is BufferTask<R> {\n return task.format === 'buffer';\n}\n\nexport function isEmptyTask<R>(task: SimpleGitTask<R>): task is EmptyTask {\n return task.format === 'empty' || !task.commands.length;\n}\n", "import { CleanSummary } from '../../../typings';\nimport { cleanSummaryParser } from '../responses/CleanSummary';\nimport { Maybe, StringTask } from '../types';\nimport { asStringArray } from '../utils';\nimport { configurationErrorTask } from './task';\n\nexport const CONFIG_ERROR_INTERACTIVE_MODE = 'Git clean interactive mode is not supported';\nexport const CONFIG_ERROR_MODE_REQUIRED = 'Git clean mode parameter (\"n\" or \"f\") is required';\nexport const CONFIG_ERROR_UNKNOWN_OPTION = 'Git clean unknown option found in: ';\n\n/**\n * All supported option switches available for use in a `git.clean` operation\n */\nexport enum CleanOptions {\n DRY_RUN = 'n',\n FORCE = 'f',\n IGNORED_INCLUDED = 'x',\n IGNORED_ONLY = 'X',\n EXCLUDING = 'e',\n QUIET = 'q',\n RECURSIVE = 'd',\n}\n\n/**\n * The two modes `git.clean` can run in - one of these must be supplied in order\n * for the command to not throw a `TaskConfigurationError`\n */\nexport type CleanMode = CleanOptions.FORCE | CleanOptions.DRY_RUN;\n\nconst CleanOptionValues: Set<string> = new Set(['i', ...asStringArray(Object.values(CleanOptions as any))]);\n\nexport function cleanWithOptionsTask(mode: CleanMode | string, customArgs: string[]) {\n const {cleanMode, options, valid} = getCleanOptions(mode);\n\n if (!cleanMode) {\n return configurationErrorTask(CONFIG_ERROR_MODE_REQUIRED);\n }\n\n if (!valid.options) {\n return configurationErrorTask(CONFIG_ERROR_UNKNOWN_OPTION + JSON.stringify(mode));\n }\n\n options.push(...customArgs);\n\n if (options.some(isInteractiveMode)) {\n return configurationErrorTask(CONFIG_ERROR_INTERACTIVE_MODE);\n }\n\n return cleanTask(cleanMode, options);\n}\n\nexport function cleanTask(mode: CleanMode, customArgs: string[]): StringTask<CleanSummary> {\n const commands: string[] = ['clean', `-${mode}`, ...customArgs];\n\n return {\n commands,\n format: 'utf-8',\n parser(text: string): CleanSummary {\n return cleanSummaryParser(mode === CleanOptions.DRY_RUN, text);\n }\n }\n}\n\nexport function isCleanOptionsArray (input: string[]): input is CleanOptions[] {\n return Array.isArray(input) && input.every(test => CleanOptionValues.has(test));\n}\n\nfunction getCleanOptions(input: string) {\n let cleanMode: Maybe<CleanMode>;\n let options: string[] = [];\n let valid = {cleanMode: false, options: true};\n\n input.replace(/[^a-z]i/g, '').split('').forEach(char => {\n if (isCleanMode(char)) {\n cleanMode = char;\n valid.cleanMode = true;\n }\n else {\n valid.options = valid.options && isKnownOption(options[options.length] = (`-${char}`));\n }\n });\n\n return {\n cleanMode,\n options,\n valid,\n }\n}\n\nfunction isCleanMode(cleanMode?: string): cleanMode is CleanMode {\n return cleanMode === CleanOptions.FORCE || cleanMode === CleanOptions.DRY_RUN;\n}\n\nfunction isKnownOption(option: string): boolean {\n return /^-[a-z]$/i.test(option) && CleanOptionValues.has(option.charAt(1));\n}\n\nfunction isInteractiveMode(option: string): boolean {\n if (/^-[^\\-]/.test(option)) {\n return option.indexOf('i') > 0;\n }\n\n return option === '--interactive';\n}\n", "import { ConfigGetResult, ConfigListSummary, ConfigValues } from '../../../typings';\nimport { last, splitOn } from '../utils';\n\nexport class ConfigList implements ConfigListSummary {\n\n public files: string[] = [];\n public values: { [fileName: string]: ConfigValues } = Object.create(null);\n\n private _all: ConfigValues | undefined;\n\n public get all(): ConfigValues {\n if (!this._all) {\n this._all = this.files.reduce((all: ConfigValues, file: string) => {\n return Object.assign(all, this.values[file]);\n }, {});\n }\n\n return this._all;\n }\n\n public addFile(file: string): ConfigValues {\n if (!(file in this.values)) {\n const latest = last(this.files);\n this.values[file] = latest ? Object.create(this.values[latest]) : {}\n\n this.files.push(file);\n }\n\n return this.values[file];\n }\n\n public addValue(file: string, key: string, value: string) {\n const values = this.addFile(file);\n\n if (!values.hasOwnProperty(key)) {\n values[key] = value;\n } else if (Array.isArray(values[key])) {\n (values[key] as string[]).push(value);\n } else {\n values[key] = [values[key] as string, value];\n }\n\n this._all = undefined;\n }\n\n}\n\nexport function configListParser(text: string): ConfigList {\n const config = new ConfigList();\n\n for (const item of configParser(text)) {\n config.addValue(item.file, String(item.key), item.value);\n }\n\n return config;\n}\n\nexport function configGetParser(text: string, key: string): ConfigGetResult {\n let value: string | null = null;\n const values: string[] = [];\n const scopes: Map<string, string[]> = new Map();\n\n for (const item of configParser(text, key)) {\n if (item.key !== key) {\n continue;\n }\n\n values.push(value = item.value);\n\n if (!scopes.has(item.file)) {\n scopes.set(item.file, []);\n }\n\n scopes.get(item.file)!.push(value);\n }\n\n return {\n key,\n paths: Array.from(scopes.keys()),\n scopes,\n value,\n values\n };\n}\n\nfunction configFilePath(filePath: string): string {\n return filePath.replace(/^(file):/, '');\n}\n\nfunction* configParser(text: string, requestedKey: string | null = null) {\n const lines = text.split('\\0');\n\n for (let i = 0, max = lines.length - 1; i < max;) {\n const file = configFilePath(lines[i++]);\n\n let value = lines[i++];\n let key = requestedKey;\n\n if (value.includes('\\n')) {\n const line = splitOn(value, '\\n');\n key = line[0];\n value = line[1];\n }\n\n yield {file, key, value};\n }\n}\n", "import { ConfigGetResult, ConfigListSummary, SimpleGit } from '../../../typings';\nimport { configGetParser, configListParser } from '../responses/ConfigList';\nimport { SimpleGitApi } from '../simple-git-api';\nimport { StringTask } from '../types';\nimport { trailingFunctionArgument } from '../utils';\n\nexport enum GitConfigScope {\n system = 'system',\n global = 'global',\n local = 'local',\n worktree = 'worktree',\n}\n\nfunction asConfigScope<T extends GitConfigScope | undefined>(scope: GitConfigScope | unknown, fallback: T): GitConfigScope | T {\n if (typeof scope === 'string' && GitConfigScope.hasOwnProperty(scope)) {\n return scope as GitConfigScope;\n }\n return fallback;\n}\n\nfunction addConfigTask(key: string, value: string, append: boolean, scope: GitConfigScope): StringTask<string> {\n const commands: string[] = ['config', `--${scope}`];\n\n if (append) {\n commands.push('--add');\n }\n\n commands.push(key, value);\n\n return {\n commands,\n format: 'utf-8',\n parser(text: string): string {\n return text;\n }\n }\n}\n\nfunction getConfigTask(key: string, scope?: GitConfigScope): StringTask<ConfigGetResult> {\n const commands: string[] = ['config', '--null', '--show-origin', '--get-all', key];\n\n if (scope) {\n commands.splice(1, 0, `--${scope}`);\n }\n\n return {\n commands,\n format: 'utf-8',\n parser(text) {\n return configGetParser(text, key);\n }\n };\n}\n\nfunction listConfigTask(scope?: GitConfigScope): StringTask<ConfigListSummary> {\n const commands = ['config', '--list', '--show-origin', '--null'];\n\n if (scope) {\n commands.push(`--${scope}`);\n }\n\n return {\n commands,\n format: 'utf-8',\n parser(text: string) {\n return configListParser(text);\n },\n }\n}\n\nexport default function (): Pick<SimpleGit, 'addConfig' | 'getConfig' | 'listConfig'> {\n return {\n addConfig(this: SimpleGitApi, key: string, value: string, ...rest: unknown[]) {\n return this._runTask(\n addConfigTask(key, value, rest[0] === true, asConfigScope(rest[1], GitConfigScope.local)),\n trailingFunctionArgument(arguments),\n );\n },\n\n getConfig(this: SimpleGitApi, key: string, scope?: GitConfigScope) {\n return this._runTask(\n getConfigTask(key, asConfigScope(scope, undefined)),\n trailingFunctionArgument(arguments),\n )\n },\n\n listConfig(this: SimpleGitApi, ...rest: unknown[]) {\n return this._runTask(\n listConfigTask(asConfigScope(rest[0], undefined)),\n trailingFunctionArgument(arguments),\n );\n },\n };\n}\n", "import { GrepResult, SimpleGit } from '../../../typings';\nimport { SimpleGitApi } from '../simple-git-api';\nimport {\n asNumber,\n forEachLineWithContent,\n getTrailingOptions,\n NULL,\n prefixedArray,\n trailingFunctionArgument\n} from '../utils';\n\nimport { configurationErrorTask } from './task';\n\nconst disallowedOptions = ['-h'];\n\nconst Query = Symbol('grepQuery');\n\nexport interface GitGrepQuery extends Iterable<string> {\n /** Adds one or more terms to be grouped as an \"and\" to any other terms */\n and(...and: string[]): this;\n\n /** Adds one or more search terms - git.grep will \"or\" this to other terms */\n param(...param: string[]): this;\n}\n\nclass GrepQuery implements GitGrepQuery {\n private [Query]: string[] = [];\n\n * [Symbol.iterator]() {\n for (const query of this[Query]) {\n yield query;\n }\n }\n\n and(...and: string[]) {\n and.length && this[Query].push('--and', '(', ...prefixedArray(and, '-e'), ')');\n return this;\n }\n\n param(...param: string[]) {\n this[Query].push(...prefixedArray(param, '-e'));\n return this;\n }\n}\n\n/**\n * Creates a new builder for a `git.grep` query with optional params\n */\nexport function grepQueryBuilder(...params: string[]): GitGrepQuery {\n return new GrepQuery().param(...params);\n}\n\nfunction parseGrep(grep: string): GrepResult {\n const paths: GrepResult['paths'] = new Set<string>();\n const results: GrepResult['results'] = {};\n\n forEachLineWithContent(grep, (input) => {\n const [path, line, preview] = input.split(NULL);\n paths.add(path);\n (results[path] = results[path] || []).push({\n line: asNumber(line),\n path,\n preview,\n });\n });\n\n return {\n paths,\n results,\n };\n}\n\nexport default function (): Pick<SimpleGit, 'grep'> {\n return {\n grep(this: SimpleGitApi, searchTerm: string | GitGrepQuery) {\n const then = trailingFunctionArgument(arguments);\n const options = getTrailingOptions(arguments);\n\n for (const option of disallowedOptions) {\n if (options.includes(option)) {\n return this._runTask(\n configurationErrorTask(`git.grep: use of \"${option}\" is not supported.`),\n then,\n );\n }\n }\n\n if (typeof searchTerm === 'string') {\n searchTerm = grepQueryBuilder().param(searchTerm);\n }\n\n const commands = ['grep', '--null', '-n', '--full-name', ...options, ...searchTerm];\n\n return this._runTask({\n commands,\n format: 'utf-8',\n parser(stdOut) {\n return parseGrep(stdOut);\n },\n }, then);\n }\n }\n}\n", "import { straightThroughStringTask } from './task';\nimport { Maybe, OptionFlags, Options } from '../types';\n\nexport enum ResetMode {\n MIXED = 'mixed',\n SOFT = 'soft',\n HARD = 'hard',\n MERGE = 'merge',\n KEEP = 'keep',\n}\n\nconst ResetModes = Array.from(Object.values(ResetMode));\n\nexport type ResetOptions = Options &\n OptionFlags<'-q' | '--quiet' | '--no-quiet' | '--pathspec-from-nul'> &\n OptionFlags<'--pathspec-from-file', string>;\n\nexport function resetTask(mode: Maybe<ResetMode>, customArgs: string[]) {\n const commands: string[] = ['reset'];\n if (isValidResetMode(mode)) {\n commands.push(`--${mode}`);\n }\n commands.push(...customArgs);\n\n return straightThroughStringTask(commands);\n}\n\nexport function getResetMode(mode: ResetMode | any): Maybe<ResetMode> {\n if (isValidResetMode(mode)) {\n return mode;\n }\n\n switch (typeof mode) {\n case 'string':\n case 'undefined':\n return ResetMode.SOFT;\n }\n\n return;\n}\n\nfunction isValidResetMode(mode: ResetMode | any): mode is ResetMode {\n return ResetModes.includes(mode);\n}\n", "import debug, { Debugger } from 'debug';\nimport { append, filterHasLength, filterString, filterType, NOOP, objectToString, remove } from './utils';\nimport { Maybe } from './types';\n\ndebug.formatters.L = (value: any) => String(filterHasLength(value) ? value.length : '-');\ndebug.formatters.B = (value: Buffer) => {\n if (Buffer.isBuffer(value)) {\n return value.toString('utf8');\n }\n return objectToString(value);\n}\n\ntype OutputLoggingHandler = (message: string, ...args: any[]) => void;\n\nfunction createLog () {\n return debug('simple-git');\n}\n\nexport interface OutputLogger extends OutputLoggingHandler {\n readonly label: string;\n\n info: OutputLoggingHandler;\n step (nextStep?: string): OutputLogger;\n sibling (name: string): OutputLogger;\n}\n\nfunction prefixedLogger (to: Debugger, prefix: string, forward?: OutputLoggingHandler): OutputLoggingHandler {\n if (!prefix || !String(prefix).replace(/\\s*/, '')) {\n return !forward ? to : (message, ...args) => {\n to(message, ...args);\n forward(message, ...args);\n };\n }\n\n return (message, ...args) => {\n to(`%s ${message}`, prefix, ...args);\n if (forward) {\n forward(message, ...args);\n }\n };\n}\n\nfunction childLoggerName (name: Maybe<string>, childDebugger: Maybe<Debugger>, {namespace: parentNamespace}: Debugger): string {\n if (typeof name === 'string') {\n return name;\n }\n const childNamespace = childDebugger && childDebugger.namespace || '';\n\n if (childNamespace.startsWith(parentNamespace)) {\n return childNamespace.substr(parentNamespace.length + 1);\n }\n\n return childNamespace || parentNamespace;\n}\n\nexport function createLogger (label: string, verbose?: string | Debugger, initialStep?: string, infoDebugger = createLog()): OutputLogger {\n const labelPrefix = label && `[${label}]` || '';\n\n const spawned: OutputLogger[] = [];\n const debugDebugger: Maybe<Debugger> = (typeof verbose === 'string') ? infoDebugger.extend(verbose) : verbose;\n const key = childLoggerName(filterType(verbose, filterString), debugDebugger, infoDebugger);\n\n return step(initialStep);\n\n function sibling(name: string, initial?: string) {\n return append(spawned, createLogger(label, key.replace(/^[^:]+/, name), initial, infoDebugger));\n }\n\n function step(phase?: string) {\n const stepPrefix = phase && `[${phase}]` || '';\n const debug = debugDebugger && prefixedLogger(debugDebugger, stepPrefix) || NOOP;\n const info = prefixedLogger(infoDebugger, `${labelPrefix} ${ stepPrefix}`, debug);\n\n return Object.assign(debugDebugger ? debug : info, {\n label,\n sibling,\n info,\n step,\n });\n }\n}\n\n/**\n * The `GitLogger` is used by the main `SimpleGit` runner to handle logging\n * any warnings or errors.\n */\nexport class GitLogger {\n\n public error: OutputLoggingHandler;\n\n public warn: OutputLoggingHandler\n\n constructor(private _out: Debugger = createLog()) {\n this.error = prefixedLogger(_out, '[ERROR]');\n this.warn = prefixedLogger(_out, '[WARN]');\n }\n\n silent (silence = false) {\n if (silence !== this._out.enabled) {\n return;\n }\n\n const {namespace} = this._out;\n const env = (process.env.DEBUG || '').split(',').filter(s => !!s);\n const hasOn = env.includes(namespace);\n const hasOff = env.includes(`-${namespace}`);\n\n // enabling the log\n if (!silence) {\n if (hasOff) {\n remove(env, `-${namespace}`);\n }\n else {\n env.push(namespace);\n }\n }\n else {\n if (hasOn) {\n remove(env, namespace);\n }\n else {\n env.push(`-${namespace}`);\n }\n }\n\n debug.enable(env.join(','));\n }\n\n}\n", "import { SimpleGitTask } from '../types';\nimport { GitError } from '../errors/git-error';\nimport { createLogger, OutputLogger } from '../git-logger';\n\ntype AnySimpleGitTask = SimpleGitTask<any>;\n\ntype TaskInProgress = {\n name: string;\n logger: OutputLogger;\n task: AnySimpleGitTask;\n}\n\nexport class TasksPendingQueue {\n\n private _queue: Map<AnySimpleGitTask, TaskInProgress> = new Map();\n\n constructor(private logLabel = 'GitExecutor') {\n }\n\n private withProgress(task: AnySimpleGitTask) {\n return this._queue.get(task);\n }\n\n private createProgress (task: AnySimpleGitTask): TaskInProgress {\n const name = TasksPendingQueue.getName(task.commands[0]);\n const logger = createLogger(this.logLabel, name);\n\n return {\n task,\n logger,\n name,\n };\n }\n\n push(task: AnySimpleGitTask): TaskInProgress {\n const progress = this.createProgress(task);\n progress.logger('Adding task to the queue, commands = %o', task.commands);\n\n this._queue.set(task, progress);\n\n return progress;\n }\n\n fatal(err: GitError) {\n for (const [task, {logger}] of Array.from(this._queue.entries())) {\n if (task === err.task) {\n logger.info(`Failed %o`, err);\n logger(`Fatal exception, any as-yet un-started tasks run through this executor will not be attempted`);\n } else {\n logger.info(`A fatal exception occurred in a previous task, the queue has been purged: %o`, err.message);\n }\n\n this.complete(task);\n }\n\n if (this._queue.size !== 0) {\n throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`);\n }\n }\n\n complete(task: AnySimpleGitTask) {\n const progress = this.withProgress(task);\n if (progress) {\n this._queue.delete(task);\n }\n }\n\n attempt(task: AnySimpleGitTask): TaskInProgress {\n const progress = this.withProgress(task);\n if (!progress) {\n throw new GitError(undefined, 'TasksPendingQueue: attempt called for an unknown task');\n }\n progress.logger('Starting task');\n\n return progress;\n }\n\n static getName (name = 'empty') {\n return `task:${name}:${++TasksPendingQueue.counter}`;\n }\n\n private static counter = 0;\n}\n", "import { spawn, SpawnOptions } from 'child_process';\nimport { GitError } from '../errors/git-error';\nimport { OutputLogger } from '../git-logger';\nimport { PluginStore } from '../plugins';\nimport { EmptyTask, isBufferTask, isEmptyTask, } from '../tasks/task';\nimport { GitExecutorResult, Maybe, outputHandler, RunnableTask, SimpleGitExecutor, SimpleGitTask } from '../types';\nimport { callTaskParser, first, GitOutputStreams, objectToString } from '../utils';\nimport { Scheduler } from './scheduler';\nimport { TasksPendingQueue } from './tasks-pending-queue';\n\nexport class GitExecutorChain implements SimpleGitExecutor {\n\n private _chain: Promise<any> = Promise.resolve();\n private _queue = new TasksPendingQueue();\n private _cwd: string | undefined;\n\n public get binary() {\n return this._executor.binary;\n }\n\n public get cwd() {\n return this._cwd || this._executor.cwd;\n }\n\n public set cwd(cwd: string) {\n this._cwd = cwd;\n }\n\n public get env() {\n return this._executor.env;\n }\n\n public get outputHandler() {\n return this._executor.outputHandler;\n }\n\n constructor(\n private _executor: SimpleGitExecutor,\n private _scheduler: Scheduler,\n private _plugins: PluginStore\n ) {\n }\n\n public chain() {\n return this;\n }\n\n public push<R>(task: SimpleGitTask<R>): Promise<R> {\n this._queue.push(task);\n\n return this._chain = this._chain.then(() => this.attemptTask(task));\n }\n\n private async attemptTask<R>(task: SimpleGitTask<R>): Promise<void | R> {\n const onScheduleComplete = await this._scheduler.next();\n const onQueueComplete = () => this._queue.complete(task);\n\n try {\n const {logger} = this._queue.attempt(task);\n return await (isEmptyTask(task)\n ? this.attemptEmptyTask(task, logger)\n : this.attemptRemoteTask(task, logger)\n ) as R;\n } catch (e) {\n throw this.onFatalException(task, e);\n } finally {\n onQueueComplete();\n onScheduleComplete();\n }\n }\n\n private onFatalException<R>(task: SimpleGitTask<R>, e: Error) {\n const gitError = (e instanceof GitError) ? Object.assign(e, {task}) : new GitError(task, e && String(e));\n\n this._chain = Promise.resolve();\n this._queue.fatal(gitError);\n\n return gitError;\n }\n\n private async attemptRemoteTask<R>(task: RunnableTask<R>, logger: OutputLogger) {\n const args = this._plugins.exec('spawn.args', [...task.commands], pluginContext(task, task.commands));\n\n const raw = await this.gitResponse(\n task,\n this.binary, args, this.outputHandler, logger.step('SPAWN'),\n );\n const outputStreams = await this.handleTaskData(task, args, raw, logger.step('HANDLE'));\n\n logger(`passing response to task's parser as a %s`, task.format);\n\n if (isBufferTask(task)) {\n return callTaskParser(task.parser, outputStreams);\n }\n\n return callTaskParser(task.parser, outputStreams.asStrings());\n }\n\n private async attemptEmptyTask(task: EmptyTask, logger: OutputLogger) {\n logger(`empty task bypassing child process to call to task's parser`);\n return task.parser(this);\n }\n\n private handleTaskData<R>(\n task: SimpleGitTask<R>,\n args: string[],\n result: GitExecutorResult, logger: OutputLogger): Promise<GitOutputStreams> {\n\n const {exitCode, rejection, stdOut, stdErr} = result;\n\n return new Promise((done, fail) => {\n logger(`Preparing to handle process response exitCode=%d stdOut=`, exitCode);\n\n const {error} = this._plugins.exec('task.error', {error: rejection}, {\n ...pluginContext(task, args),\n ...result,\n });\n\n if (error && task.onError) {\n logger.info(`exitCode=%s handling with custom error handler`);\n\n return task.onError(\n result,\n error,\n (newStdOut) => {\n logger.info(`custom error handler treated as success`);\n logger(`custom error returned a %s`, objectToString(newStdOut));\n\n done(new GitOutputStreams(\n Array.isArray(newStdOut) ? Buffer.concat(newStdOut) : newStdOut,\n Buffer.concat(stdErr),\n ));\n },\n fail\n );\n }\n\n if (error) {\n logger.info(`handling as error: exitCode=%s stdErr=%s rejection=%o`, exitCode, stdErr.length, rejection);\n return fail(error);\n }\n\n logger.info(`retrieving task output complete`);\n done(new GitOutputStreams(\n Buffer.concat(stdOut),\n Buffer.concat(stdErr),\n ));\n });\n }\n\n private async gitResponse<R>(task: SimpleGitTask<R>, command: string, args: string[], outputHandler: Maybe<outputHandler>, logger: OutputLogger): Promise<GitExecutorResult> {\n const outputLogger = logger.sibling('output');\n const spawnOptions: SpawnOptions = this._plugins.exec('spawn.options', {\n cwd: this.cwd,\n env: this.env,\n windowsHide: true,\n }, pluginContext(task, task.commands));\n\n return new Promise((done) => {\n const stdOut: Buffer[] = [];\n const stdErr: Buffer[] = [];\n\n let rejection: Maybe<Error>;\n\n logger.info(`%s %o`, command, args);\n logger('%O', spawnOptions)\n const spawned = spawn(command, args, spawnOptions);\n\n spawned.stdout!.on('data', onDataReceived(stdOut, 'stdOut', logger, outputLogger.step('stdOut')));\n spawned.stderr!.on('data', onDataReceived(stdErr, 'stdErr', logger, outputLogger.step('stdErr')));\n\n spawned.on('error', onErrorReceived(stdErr, logger));\n\n if (outputHandler) {\n logger(`Passing child process stdOut/stdErr to custom outputHandler`);\n outputHandler(command, spawned.stdout!, spawned.stderr!, [...args]);\n }\n\n this._plugins.exec('spawn.after', undefined, {\n ...pluginContext(task, args),\n spawned,\n close(exitCode: number, reason?: Error) {\n done({\n stdOut,\n stdErr,\n exitCode,\n rejection: rejection || reason,\n });\n },\n kill(reason: Error) {\n if (spawned.killed) {\n return;\n }\n\n rejection = reason;\n spawned.kill('SIGINT');\n },\n });\n });\n }\n\n}\n\nfunction pluginContext<R>(task: SimpleGitTask<R>, commands: string[]) {\n return {\n method: first(task.commands) || '',\n commands,\n }\n}\n\nfunction onErrorReceived(target: Buffer[], logger: OutputLogger) {\n return (err: Error) => {\n logger(`[ERROR] child process exception %o`, err);\n target.push(Buffer.from(String(err.stack), 'ascii'));\n }\n}\n\nfunction onDataReceived(target: Buffer[], name: string, logger: OutputLogger, output: OutputLogger) {\n return (buffer: Buffer) => {\n logger(`%s received %L bytes`, name, buffer);\n output(`%B`, buffer);\n target.push(buffer)\n }\n}\n", "import { PluginStore } from '../plugins';\nimport { GitExecutorEnv, outputHandler, SimpleGitExecutor, SimpleGitTask } from '../types';\n\nimport { GitExecutorChain } from './git-executor-chain';\nimport { Scheduler } from './scheduler';\n\nexport class GitExecutor implements SimpleGitExecutor {\n\n private _chain = new GitExecutorChain(this, this._scheduler, this._plugins);\n\n public env: GitExecutorEnv;\n public outputHandler?: outputHandler;\n\n constructor(\n public binary: string = 'git',\n public cwd: string,\n private _scheduler: Scheduler,\n private _plugins: PluginStore,\n ) {\n }\n\n chain(): SimpleGitExecutor {\n return new GitExecutorChain(this, this._scheduler, this._plugins);\n }\n\n push<R>(task: SimpleGitTask<R>): Promise<R> {\n return this._chain.push(task);\n }\n\n}\n\n\n", "import { GitError } from './errors/git-error';\nimport { GitResponseError } from './errors/git-response-error';\nimport { SimpleGitTask, SimpleGitTaskCallback } from './types';\nimport { NOOP } from './utils';\n\nexport function taskCallback<R>(task: SimpleGitTask<R>, response: Promise<R>, callback: SimpleGitTaskCallback<R> = NOOP) {\n\n const onSuccess = (data: R) => {\n callback(null, data);\n };\n\n const onError = (err: GitError | GitResponseError) => {\n if (err?.task === task) {\n callback((err instanceof GitResponseError) ? addDeprecationNoticeToError(err) : err, undefined as any);\n }\n };\n\n response.then(onSuccess, onError);\n\n}\n\nfunction addDeprecationNoticeToError (err: GitResponseError) {\n let log = (name: string) => {\n console.warn(`simple-git deprecation notice: accessing GitResponseError.${name} should be GitResponseError.git.${name}, this will no longer be available in version 3`);\n log = NOOP;\n };\n\n return Object.create(err, Object.getOwnPropertyNames(err.git).reduce(descriptorReducer, {}));\n\n function descriptorReducer(all: PropertyDescriptorMap, name: string): typeof all {\n if (name in err) {\n return all;\n }\n\n all[name] = {\n enumerable: false,\n configurable: false,\n get () {\n log(name);\n return err.git[name];\n },\n };\n\n return all;\n }\n}\n", "import { folderExists } from '../utils';\nimport { SimpleGitExecutor } from '../types';\nimport { adhocExecTask } from './task';\n\nexport function changeWorkingDirectoryTask (directory: string, root?: SimpleGitExecutor) {\n return adhocExecTask((instance: SimpleGitExecutor) => {\n if (!folderExists(directory)) {\n throw new Error(`Git.cwd: cannot change to non-directory \"${ directory }\"`);\n }\n\n return ((root || instance).cwd = directory);\n });\n}\n", "import { straightThroughStringTask } from './task';\nimport { StringTask } from '../types';\n\n/**\n * Task used by `git.hashObject`\n */\nexport function hashObjectTask(filePath: string, write: boolean): StringTask<string> {\n const commands = ['hash-object', filePath];\n if (write) {\n commands.push('-w');\n }\n\n return straightThroughStringTask(commands, true);\n}\n", "import { InitResult } from '../../../typings';\n\nexport class InitSummary implements InitResult {\n constructor(\n public readonly bare: boolean,\n public readonly path: string,\n public readonly existing: boolean,\n public readonly gitDir: string,\n ) {}\n}\n\nconst initResponseRegex = /^Init.+ repository in (.+)$/;\nconst reInitResponseRegex = /^Rein.+ in (.+)$/;\n\nexport function parseInit(bare: boolean, path: string, text: string) {\n const response = String(text).trim();\n let result;\n\n if ((result = initResponseRegex.exec(response))) {\n return new InitSummary(bare, path, false, result[1]);\n }\n\n if ((result = reInitResponseRegex.exec(response))) {\n return new InitSummary(bare, path, true, result[1]);\n }\n\n let gitDir = '';\n const tokens = response.split(' ');\n while (tokens.length) {\n const token = tokens.shift();\n if (token === 'in') {\n gitDir = tokens.join(' ');\n break;\n }\n }\n\n return new InitSummary(bare, path, /^re/i.test(response), gitDir);\n}\n", "import { InitResult } from '../../../typings';\nimport { parseInit } from '../responses/InitSummary';\nimport { StringTask } from '../types';\n\nconst bareCommand = '--bare';\n\nfunction hasBareCommand(command: string[]) {\n return command.includes(bareCommand);\n}\n\nexport function initTask(bare = false, path: string, customArgs: string[]): StringTask<InitResult> {\n const commands = ['init', ...customArgs];\n if (bare && !hasBareCommand(commands)) {\n commands.splice(1, 0, bareCommand);\n }\n\n return {\n commands,\n format: 'utf-8',\n parser(text: string): InitResult {\n return parseInit(commands.includes('--bare'), path, text);\n }\n }\n}\n", "import { DiffResult, DiffResultBinaryFile, DiffResultTextFile } from '../../../typings';\n\n/***\n * The DiffSummary is returned as a response to getting `git().status()`\n */\nexport class DiffSummary implements DiffResult {\n changed = 0\n deletions = 0;\n insertions = 0;\n\n files: Array<DiffResultTextFile | DiffResultBinaryFile> = [];\n}\n", "import { DiffResult } from '../../../typings';\nimport { DiffSummary } from '../responses/DiffSummary';\n\nexport function parseDiffResult(stdOut: string): DiffResult {\n const lines = stdOut.trim().split('\\n');\n const status = new DiffSummary();\n readSummaryLine(status, lines.pop());\n\n for (let i = 0, max = lines.length; i < max; i++) {\n const line = lines[i];\n textFileChange(line, status) || binaryFileChange(line, status);\n }\n\n return status;\n}\n\nfunction readSummaryLine(status: DiffResult, summary?: string) {\n (summary || '')\n .trim()\n .split(', ')\n .forEach(function (text: string) {\n const summary = /(\\d+)\\s([a-z]+)/.exec(text);\n if (!summary) {\n return;\n }\n\n summaryType(status, summary[2], parseInt(summary[1], 10));\n });\n}\n\nfunction summaryType (status: DiffResult, key: string, value: number) {\n const match = (/([a-z]+?)s?\\b/.exec(key));\n if (!match || !statusUpdate[match[1]]) {\n return;\n }\n\n statusUpdate[match[1]](status, value);\n}\n\nconst statusUpdate: {[key: string]: (status: DiffResult, value: number) => void} = {\n file (status, value) {\n status.changed = value;\n },\n deletion (status, value) {\n status.deletions = value;\n },\n insertion (status, value) {\n status.insertions = value;\n }\n}\n\nfunction textFileChange(input: string, {files}: DiffResult) {\n const line = input.trim().match(/^(.+)\\s+\\|\\s+(\\d+)(\\s+[+\\-]+)?$/);\n\n if (line) {\n var alterations = (line[3] || '').trim();\n files.push({\n file: line[1].trim(),\n changes: parseInt(line[2], 10),\n insertions: alterations.replace(/-/g, '').length,\n deletions: alterations.replace(/\\+/g, '').length,\n binary: false\n });\n\n return true;\n }\n\n return false\n}\n\nfunction binaryFileChange(input: string, {files}: DiffResult) {\n const line = input.match(/^(.+) \\|\\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)$/);\n if (line) {\n files.push({\n file: line[1].trim(),\n before: +line[2],\n after: +line[3],\n binary: true\n });\n return true;\n }\n return false;\n}\n", "import { ListLogLine, LogResult } from '../../../typings';\nimport { toLinesWithContent } from '../utils';\nimport { parseDiffResult } from './parse-diff-summary';\n\nexport const START_BOUNDARY = '\u00F2\u00F2\u00F2\u00F2\u00F2\u00F2 ';\n\nexport const COMMIT_BOUNDARY = ' \u00F2\u00F2';\n\nexport const SPLITTER = ' \u00F2 ';\n\nconst defaultFieldNames = ['hash', 'date', 'message', 'refs', 'author_name', 'author_email'];\n\nfunction lineBuilder(tokens: string[], fields: string[]): any {\n return fields.reduce((line, field, index) => {\n line[field] = tokens[index] || '';\n return line;\n }, Object.create({diff: null}) as any);\n}\n\nexport function createListLogSummaryParser<T = any> (splitter = SPLITTER, fields = defaultFieldNames) {\n return function (stdOut: string): LogResult<T> {\n const all: ReadonlyArray<T & ListLogLine> = toLinesWithContent(stdOut, true, START_BOUNDARY)\n .map(function (item) {\n const lineDetail = item.trim().split(COMMIT_BOUNDARY);\n const listLogLine: T & ListLogLine = lineBuilder(lineDetail[0].trim().split(splitter), fields);\n\n if (lineDetail.length > 1 && !!lineDetail[1].trim()) {\n listLogLine.diff = parseDiffResult(lineDetail[1]);\n }\n\n return listLogLine;\n });\n\n return {\n all,\n latest: all.length && all[0] || null,\n total: all.length,\n };\n }\n}\n", "import { Options, StringTask } from '../types';\nimport { LogResult, SimpleGit } from '../../../typings';\nimport {\n COMMIT_BOUNDARY,\n createListLogSummaryParser,\n SPLITTER,\n START_BOUNDARY\n} from '../parsers/parse-list-log-summary';\nimport {\n appendTaskOptions,\n filterArray,\n filterString,\n filterType,\n trailingFunctionArgument,\n trailingOptionsArgument\n} from '../utils';\nimport { SimpleGitApi } from '../simple-git-api';\nimport { configurationErrorTask } from './task';\n\nenum excludeOptions {\n '--pretty',\n 'max-count',\n 'maxCount',\n 'n',\n 'file',\n 'format',\n 'from',\n 'to',\n 'splitter',\n 'symmetric',\n 'mailMap',\n 'multiLine',\n 'strictDate',\n}\n\nexport interface DefaultLogFields {\n hash: string;\n date: string;\n message: string;\n refs: string;\n body: string;\n author_name: string;\n author_email: string;\n}\n\nexport type LogOptions<T = DefaultLogFields> = {\n file?: string;\n format?: T;\n from?: string;\n mailMap?: boolean;\n maxCount?: number;\n multiLine?: boolean;\n splitter?: string;\n strictDate?: boolean;\n symmetric?: boolean;\n to?: string;\n};\n\ninterface ParsedLogOptions {\n fields: string[];\n splitter: string;\n commands: string[]\n}\n\nfunction prettyFormat(format: { [key: string]: string | unknown }, splitter: string): [string[], string] {\n const fields: string[] = [];\n const formatStr: string[] = [];\n\n Object.keys(format).forEach((field) => {\n fields.push(field);\n formatStr.push(String(format[field]));\n });\n\n return [\n fields, formatStr.join(splitter)\n ];\n}\n\nfunction userOptions<T>(input: T): Exclude<Omit<T, keyof typeof excludeOptions>, undefined> {\n const output = {...input};\n Object.keys(input).forEach(key => {\n if (key in excludeOptions) {\n delete output[key as keyof T];\n }\n });\n return output;\n}\n\nexport function parseLogOptions<T extends Options>(opt: LogOptions<T> = {}, customArgs: string[] = []): ParsedLogOptions {\n const splitter = opt.splitter || SPLITTER;\n const format = opt.format || {\n hash: '%H',\n date: opt.strictDate === false ? '%ai' : '%aI',\n message: '%s',\n refs: '%D',\n body: opt.multiLine ? '%B' : '%b',\n author_name: opt.mailMap !== false ? '%aN' : '%an',\n author_email: opt.mailMap !== false ? '%aE' : '%ae'\n };\n\n const [fields, formatStr] = prettyFormat(format, splitter);\n\n const suffix: string[] = [];\n const command: string[] = [\n `--pretty=format:${START_BOUNDARY}${formatStr}${COMMIT_BOUNDARY}`,\n ...customArgs,\n ];\n\n const maxCount: number | undefined = (opt as any).n || (opt as any)['max-count'] || opt.maxCount;\n if (maxCount) {\n command.push(`--max-count=${maxCount}`);\n }\n\n if (opt.from && opt.to) {\n const rangeOperator = (opt.symmetric !== false) ? '...' : '..';\n suffix.push(`${opt.from}${rangeOperator}${opt.to}`);\n }\n\n if (opt.file) {\n suffix.push('--follow', opt.file);\n }\n\n appendTaskOptions(userOptions(opt), command);\n\n return {\n fields,\n splitter,\n commands: [\n ...command,\n ...suffix,\n ],\n };\n}\n\nexport function logTask<T>(splitter: string, fields: string[], customArgs: string[]): StringTask<LogResult<T>> {\n return {\n commands: ['log', ...customArgs],\n format: 'utf-8',\n parser: createListLogSummaryParser(splitter, fields),\n };\n}\n\nexport default function (): Pick<SimpleGit, 'log'> {\n return {\n log<T extends Options>(this: SimpleGitApi, ...rest: unknown[]) {\n const next = trailingFunctionArgument(arguments);\n const task = rejectDeprecatedSignatures(...rest) ||\n createLogTask(parseLogOptions<T>(trailingOptionsArgument(arguments), filterType(arguments[0], filterArray)))\n\n return this._runTask(task, next);\n }\n }\n\n function createLogTask(options: ParsedLogOptions) {\n return logTask(options.splitter, options.fields, options.commands);\n }\n\n function rejectDeprecatedSignatures(from?: unknown, to?: unknown) {\n return (\n filterString(from) &&\n filterString(to) &&\n configurationErrorTask(`git.log(string, string) should be replaced with git.log({ from: string, to: string })`)\n );\n }\n}\n", "import { MergeConflict, MergeConflictDeletion, MergeDetail, MergeResultStatus } from '../../../typings';\n\nexport class MergeSummaryConflict implements MergeConflict {\n constructor(\n public readonly reason: string,\n public readonly file: string | null = null,\n public readonly meta?: MergeConflictDeletion,\n ) {\n }\n\n toString() {\n return `${this.file}:${this.reason}`;\n }\n}\n\nexport class MergeSummaryDetail implements MergeDetail {\n public conflicts: MergeConflict[] = [];\n public merges: string[] = [];\n public result: MergeResultStatus = 'success';\n\n get failed() {\n return this.conflicts.length > 0;\n }\n\n get reason() {\n return this.result;\n }\n\n toString() {\n if (this.conflicts.length) {\n return `CONFLICTS: ${this.conflicts.join(', ')}`;\n }\n\n return 'OK';\n }\n}\n\n", "import { PullDetailFileChanges, PullDetailSummary, PullFailedResult, PullResult } from '../../../typings';\n\nexport class PullSummary implements PullResult {\n public remoteMessages = {\n all: [],\n };\n public created = [];\n public deleted: string[] = [];\n public files: string[] = [];\n public deletions: PullDetailFileChanges = {};\n public insertions: PullDetailFileChanges = {};\n public summary: PullDetailSummary = {\n changes: 0,\n deletions: 0,\n insertions: 0,\n };\n}\n\nexport class PullFailedSummary implements PullFailedResult {\n remote = '';\n hash = {\n local: '',\n remote: '',\n };\n branch = {\n local: '',\n remote: '',\n };\n message = '';\n\n toString() {\n return this.message;\n }\n}\n\n", "import { RemoteMessageResult, RemoteMessages, RemoteMessagesObjectEnumeration } from '../../../typings';\nimport { asNumber, RemoteLineParser } from '../utils';\n\nfunction objectEnumerationResult<T extends RemoteMessages = RemoteMessages>(remoteMessages: T): RemoteMessagesObjectEnumeration {\n return (remoteMessages.objects = remoteMessages.objects || {\n compressing: 0,\n counting: 0,\n enumerating: 0,\n packReused: 0,\n reused: {count: 0, delta: 0},\n total: {count: 0, delta: 0}\n });\n}\n\nfunction asObjectCount(source: string) {\n const count = /^\\s*(\\d+)/.exec(source);\n const delta = /delta (\\d+)/i.exec(source);\n\n return {\n count: asNumber(count && count[1] || '0'),\n delta: asNumber(delta && delta[1] || '0'),\n };\n}\n\nexport const remoteMessagesObjectParsers: RemoteLineParser<RemoteMessageResult<RemoteMessages>>[] = [\n new RemoteLineParser(/^remote:\\s*(enumerating|counting|compressing) objects: (\\d+),/i, (result, [action, count]) => {\n const key = action.toLowerCase();\n const enumeration = objectEnumerationResult(result.remoteMessages);\n\n Object.assign(enumeration, {[key]: asNumber(count)});\n }),\n new RemoteLineParser(/^remote:\\s*(enumerating|counting|compressing) objects: \\d+% \\(\\d+\\/(\\d+)\\),/i, (result, [action, count]) => {\n const key = action.toLowerCase();\n const enumeration = objectEnumerationResult(result.remoteMessages);\n\n Object.assign(enumeration, {[key]: asNumber(count)});\n }),\n new RemoteLineParser(/total ([^,]+), reused ([^,]+), pack-reused (\\d+)/i, (result, [total, reused, packReused]) => {\n const objects = objectEnumerationResult(result.remoteMessages);\n objects.total = asObjectCount(total);\n objects.reused = asObjectCount(reused);\n objects.packReused = asNumber(packReused);\n }),\n];\n", "import { PushResultRemoteMessages, RemoteMessageResult, RemoteMessages } from '../../../typings';\nimport { asNumber, parseStringResponse, RemoteLineParser } from '../utils';\nimport { remoteMessagesObjectParsers } from './parse-remote-objects';\n\nconst parsers: RemoteLineParser<RemoteMessageResult<PushResultRemoteMessages | RemoteMessages>>[] = [\n new RemoteLineParser(/^remote:\\s*(.+)$/, (result, [text]) => {\n result.remoteMessages.all.push(text.trim());\n return false;\n }),\n ...remoteMessagesObjectParsers,\n new RemoteLineParser([/create a (?:pull|merge) request/i, /\\s(https?:\\/\\/\\S+)$/], (result, [pullRequestUrl]) => {\n (result.remoteMessages as PushResultRemoteMessages).pullRequestUrl = pullRequestUrl;\n }),\n new RemoteLineParser([/found (\\d+) vulnerabilities.+\\(([^)]+)\\)/i, /\\s(https?:\\/\\/\\S+)$/], (result, [count, summary, url]) => {\n (result.remoteMessages as PushResultRemoteMessages).vulnerabilities = {\n count: asNumber(count),\n summary,\n url,\n };\n }),\n];\n\nexport function parseRemoteMessages<T extends RemoteMessages = RemoteMessages>(\n _stdOut: string, stdErr: string,\n): RemoteMessageResult {\n return parseStringResponse({remoteMessages: new RemoteMessageSummary() as T}, parsers, stdErr);\n}\n\nexport class RemoteMessageSummary implements RemoteMessages {\n public readonly all: string[] = [];\n}\n", "import { PullDetail, PullFailedResult, PullResult, RemoteMessages } from '../../../typings';\nimport { PullFailedSummary, PullSummary } from '../responses/PullSummary';\nimport { TaskParser } from '../types';\nimport { append, LineParser, parseStringResponse } from '../utils';\nimport { parseRemoteMessages } from './parse-remote-messages';\n\nconst FILE_UPDATE_REGEX = /^\\s*(.+?)\\s+\\|\\s+\\d+\\s*(\\+*)(-*)/;\nconst SUMMARY_REGEX = /(\\d+)\\D+((\\d+)\\D+\\(\\+\\))?(\\D+(\\d+)\\D+\\(-\\))?/;\nconst ACTION_REGEX = /^(create|delete) mode \\d+ (.+)/;\n\nconst parsers: LineParser<PullResult>[] = [\n new LineParser(FILE_UPDATE_REGEX, (result, [file, insertions, deletions]) => {\n result.files.push(file);\n\n if (insertions) {\n result.insertions[file] = insertions.length;\n }\n\n if (deletions) {\n result.deletions[file] = deletions.length;\n }\n }),\n new LineParser(SUMMARY_REGEX, (result, [changes, , insertions, , deletions]) => {\n if (insertions !== undefined || deletions !== undefined) {\n result.summary.changes = +changes || 0;\n result.summary.insertions = +insertions || 0;\n result.summary.deletions = +deletions || 0;\n return true;\n }\n return false;\n }),\n new LineParser(ACTION_REGEX, (result, [action, file]) => {\n append(result.files, file);\n append((action === 'create') ? result.created : result.deleted, file);\n }),\n];\n\nconst errorParsers: LineParser<PullFailedResult>[] = [\n new LineParser(/^from\\s(.+)$/i, (result, [remote]) => void (result.remote = remote)),\n new LineParser(/^fatal:\\s(.+)$/, (result, [message]) => void (result.message = message)),\n new LineParser(/([a-z0-9]+)\\.\\.([a-z0-9]+)\\s+(\\S+)\\s+->\\s+(\\S+)$/, (result, [hashLocal, hashRemote, branchLocal, branchRemote]) => {\n result.branch.local = branchLocal;\n result.hash.local = hashLocal;\n result.branch.remote = branchRemote;\n result.hash.remote = hashRemote;\n }),\n];\n\nexport const parsePullDetail: TaskParser<string, PullDetail> = (stdOut, stdErr) => {\n return parseStringResponse(new PullSummary(), parsers, stdOut, stdErr);\n}\n\nexport const parsePullResult: TaskParser<string, PullResult> = (stdOut, stdErr) => {\n return Object.assign(\n new PullSummary(),\n parsePullDetail(stdOut, stdErr),\n parseRemoteMessages<RemoteMessages>(stdOut, stdErr),\n );\n}\n\nexport function parsePullErrorResult(stdOut: string, stdErr: string) {\n const pullError = parseStringResponse(new PullFailedSummary(), errorParsers, stdOut, stdErr);\n\n return pullError.message && pullError;\n}\n", "import { MergeDetail, MergeResult } from '../../../typings';\nimport { MergeSummaryConflict, MergeSummaryDetail } from '../responses/MergeSummary';\nimport { TaskParser } from '../types';\nimport { LineParser, parseStringResponse } from '../utils';\nimport { parsePullResult } from './parse-pull';\n\nconst parsers: LineParser<MergeDetail>[] = [\n new LineParser(/^Auto-merging\\s+(.+)$/, (summary, [autoMerge]) => {\n summary.merges.push(autoMerge);\n }),\n new LineParser(/^CONFLICT\\s+\\((.+)\\): Merge conflict in (.+)$/, (summary, [reason, file]) => {\n summary.conflicts.push(new MergeSummaryConflict(reason, file));\n }),\n new LineParser(/^CONFLICT\\s+\\((.+\\/delete)\\): (.+) deleted in (.+) and/, (summary, [reason, file, deleteRef]) => {\n summary.conflicts.push(new MergeSummaryConflict(reason, file, {deleteRef}));\n }),\n new LineParser(/^CONFLICT\\s+\\((.+)\\):/, (summary, [reason]) => {\n summary.conflicts.push(new MergeSummaryConflict(reason, null));\n }),\n new LineParser(/^Automatic merge failed;\\s+(.+)$/, (summary, [result]) => {\n summary.result = result;\n }),\n];\n\n/**\n * Parse the complete response from `git.merge`\n */\nexport const parseMergeResult: TaskParser<string, MergeResult> = (stdOut, stdErr) => {\n return Object.assign(\n parseMergeDetail(stdOut, stdErr),\n parsePullResult(stdOut, stdErr),\n );\n};\n\n/**\n * Parse the merge specific detail (ie: not the content also available in the pull detail) from `git.mnerge`\n * @param stdOut\n */\nexport const parseMergeDetail: TaskParser<string, MergeDetail> = (stdOut) => {\n return parseStringResponse(new MergeSummaryDetail(), parsers, stdOut);\n}\n", "import { MergeResult } from '../../../typings';\nimport { GitResponseError } from '../errors/git-response-error';\nimport { parseMergeResult } from '../parsers/parse-merge';\nimport { StringTask } from '../types';\nimport { configurationErrorTask, EmptyTask } from './task';\n\nexport function mergeTask(customArgs: string[]): EmptyTask | StringTask<MergeResult> {\n if (!customArgs.length) {\n return configurationErrorTask('Git.merge requires at least one option');\n }\n\n return {\n commands: ['merge', ...customArgs],\n format: 'utf-8',\n parser(stdOut, stdErr): MergeResult {\n const merge = parseMergeResult(stdOut, stdErr);\n if (merge.failed) {\n throw new GitResponseError(merge);\n }\n\n return merge;\n }\n }\n}\n", "import { PushDetail, PushResult, PushResultPushedItem, PushResultRemoteMessages } from '../../../typings';\nimport { TaskParser } from '../types';\nimport { LineParser, parseStringResponse } from '../utils';\nimport { parseRemoteMessages } from './parse-remote-messages';\n\nfunction pushResultPushedItem(local: string, remote: string, status: string): PushResultPushedItem {\n const deleted = status.includes('deleted');\n const tag = status.includes('tag') || /^refs\\/tags/.test(local);\n const alreadyUpdated = !status.includes('new');\n\n return {\n deleted,\n tag,\n branch: !tag,\n new: !alreadyUpdated,\n alreadyUpdated,\n local,\n remote,\n };\n}\n\nconst parsers: LineParser<PushDetail>[] = [\n new LineParser(/^Pushing to (.+)$/, (result, [repo]) => {\n result.repo = repo;\n }),\n new LineParser(/^updating local tracking ref '(.+)'/, (result, [local]) => {\n result.ref = {\n ...(result.ref || {}),\n local,\n }\n }),\n new LineParser(/^[*-=]\\s+([^:]+):(\\S+)\\s+\\[(.+)]$/, (result, [local, remote, type]) => {\n result.pushed.push(pushResultPushedItem(local, remote, type));\n }),\n new LineParser(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/, (result, [local, remote, remoteName]) => {\n result.branch = {\n ...(result.branch || {}),\n local,\n remote,\n remoteName,\n };\n }),\n new LineParser(/^([^:]+):(\\S+)\\s+([a-z0-9]+)\\.\\.([a-z0-9]+)$/, (result, [local, remote, from, to]) => {\n result.update = {\n head: {\n local,\n remote,\n },\n hash: {\n from,\n to,\n },\n };\n }),\n];\n\nexport const parsePushResult: TaskParser<string, PushResult> = (stdOut, stdErr) => {\n const pushDetail = parsePushDetail(stdOut, stdErr);\n const responseDetail = parseRemoteMessages<PushResultRemoteMessages>(stdOut, stdErr);\n\n return {\n ...pushDetail,\n ...responseDetail,\n };\n}\n\nexport const parsePushDetail: TaskParser<string, PushDetail> = (stdOut, stdErr) => {\n return parseStringResponse({pushed: []}, parsers, stdOut, stdErr);\n}\n", "import { PushResult } from '../../../typings';\nimport { parsePushResult as parser } from '../parsers/parse-push';\nimport { StringTask } from '../types';\nimport { append, remove } from '../utils';\n\ntype PushRef = { remote?: string, branch?: string };\n\nexport function pushTagsTask(ref: PushRef = {}, customArgs: string[]): StringTask<PushResult> {\n append(customArgs, '--tags');\n return pushTask(ref, customArgs);\n}\n\nexport function pushTask(ref: PushRef = {}, customArgs: string[]): StringTask<PushResult> {\n const commands = ['push', ...customArgs];\n if (ref.branch) {\n commands.splice(1, 0, ref.branch);\n }\n if (ref.remote) {\n commands.splice(1, 0, ref.remote);\n }\n\n remove(commands, '-v');\n append(commands, '--verbose');\n append(commands, '--porcelain');\n\n return {\n commands,\n format: 'utf-8',\n parser,\n };\n}\n", "import { FileStatusResult } from '../../../typings/response';\n\nexport const fromPathRegex = /^(.+) -> (.+)$/;\n\nexport class FileStatusSummary implements FileStatusResult {\n\n public readonly from: string | undefined;\n\n constructor (\n public path: string,\n public index: string,\n public working_dir: string) {\n\n if ('R' === (index + working_dir)) {\n const detail = fromPathRegex.exec(path) || [null, path, path];\n this.from = detail[1] || '';\n this.path = detail[2] || '';\n }\n }\n}\n", "import { StatusResult } from '../../../typings';\nimport { append } from '../utils';\nimport { FileStatusSummary } from './FileStatusSummary';\n\ntype StatusLineParser = (result: StatusResult, file: string) => void;\n\nexport class StatusSummary implements StatusResult {\n public not_added = [];\n public conflicted = [];\n public created = [];\n public deleted = [];\n public ignored = undefined;\n public modified = [];\n public renamed = [];\n public files = [];\n public staged = [];\n public ahead = 0;\n public behind = 0;\n public current = null;\n public tracking = null;\n public detached = false;\n\n public isClean(): boolean {\n return !this.files.length;\n }\n}\n\nenum PorcelainFileStatus {\n ADDED = 'A',\n DELETED = 'D',\n MODIFIED = 'M',\n RENAMED = 'R',\n COPIED = 'C',\n UNMERGED = 'U',\n UNTRACKED = '?',\n IGNORED = '!',\n NONE = ' ',\n}\n\nfunction renamedFile(line: string) {\n const detail = /^(.+) -> (.+)$/.exec(line);\n\n if (!detail) {\n return {\n from: line, to: line\n };\n }\n\n return {\n from: String(detail[1]),\n to: String(detail[2]),\n };\n}\n\nfunction parser(indexX: PorcelainFileStatus, indexY: PorcelainFileStatus, handler: StatusLineParser): [string, StatusLineParser] {\n return [`${indexX}${indexY}`, handler];\n}\n\nfunction conflicts(indexX: PorcelainFileStatus, ...indexY: PorcelainFileStatus[]) {\n return indexY.map(y => parser(indexX, y, (result, file) => append(result.conflicted, file)));\n}\n\nconst parsers: Map<string, StatusLineParser> = new Map([\n parser(PorcelainFileStatus.NONE, PorcelainFileStatus.ADDED, (result, file) => append(result.created, file)),\n parser(PorcelainFileStatus.NONE, PorcelainFileStatus.DELETED, (result, file) => append(result.deleted, file)),\n parser(PorcelainFileStatus.NONE, PorcelainFileStatus.MODIFIED, (result, file) => append(result.modified, file)),\n\n parser(PorcelainFileStatus.ADDED, PorcelainFileStatus.NONE, (result, file) => append(result.created, file) && append(result.staged, file)),\n parser(PorcelainFileStatus.ADDED, PorcelainFileStatus.MODIFIED, (result, file) =>\n append(result.created, file) && append(result.staged, file) && append(result.modified, file)),\n\n parser(PorcelainFileStatus.DELETED, PorcelainFileStatus.NONE, (result, file) => append(result.deleted, file) && append(result.staged, file)),\n\n parser(PorcelainFileStatus.MODIFIED, PorcelainFileStatus.NONE, (result, file) => append(result.modified, file) && append(result.staged, file)),\n parser(PorcelainFileStatus.MODIFIED, PorcelainFileStatus.MODIFIED, (result, file) => append(result.modified, file) && append(result.staged, file)),\n\n parser(PorcelainFileStatus.RENAMED, PorcelainFileStatus.NONE, (result, file) => {\n append(result.renamed, renamedFile(file));\n }),\n parser(PorcelainFileStatus.RENAMED, PorcelainFileStatus.MODIFIED, (result, file) => {\n const renamed = renamedFile(file);\n append(result.renamed, renamed);\n append(result.modified, renamed.to);\n }),\n parser(PorcelainFileStatus.IGNORED, PorcelainFileStatus.IGNORED, (_result, _file) => {\n append((_result.ignored = _result.ignored || []), _file);\n }),\n\n parser(PorcelainFileStatus.UNTRACKED, PorcelainFileStatus.UNTRACKED, (result, file) => append(result.not_added, file)),\n\n ...conflicts(PorcelainFileStatus.ADDED, PorcelainFileStatus.ADDED, PorcelainFileStatus.UNMERGED),\n ...conflicts(PorcelainFileStatus.DELETED, PorcelainFileStatus.DELETED, PorcelainFileStatus.UNMERGED),\n ...conflicts(PorcelainFileStatus.UNMERGED, PorcelainFileStatus.ADDED, PorcelainFileStatus.DELETED, PorcelainFileStatus.UNMERGED),\n\n ['##', (result, line) => {\n const aheadReg = /ahead (\\d+)/;\n const behindReg = /behind (\\d+)/;\n const currentReg = /^(.+?(?=(?:\\.{3}|\\s|$)))/;\n const trackingReg = /\\.{3}(\\S*)/;\n const onEmptyBranchReg = /\\son\\s([\\S]+)$/;\n let regexResult;\n\n regexResult = aheadReg.exec(line);\n result.ahead = regexResult && +regexResult[1] || 0;\n\n regexResult = behindReg.exec(line);\n result.behind = regexResult && +regexResult[1] || 0;\n\n regexResult = currentReg.exec(line);\n result.current = regexResult && regexResult[1];\n\n regexResult = trackingReg.exec(line);\n result.tracking = regexResult && regexResult[1];\n\n regexResult = onEmptyBranchReg.exec(line);\n result.current = regexResult && regexResult[1] || result.current;\n\n result.detached = /\\(no branch\\)/.test(line);\n }]\n]);\n\nexport const parseStatusSummary = function (text: string): StatusResult {\n const lines = text.trim().split('\\n');\n const status = new StatusSummary();\n\n for (let i = 0, l = lines.length; i < l; i++) {\n splitLine(status, lines[i]);\n }\n\n return status;\n};\n\nfunction splitLine(result: StatusResult, lineStr: string) {\n const trimmed = lineStr.trim();\n switch (' ') {\n case trimmed.charAt(2):\n return data(trimmed.charAt(0), trimmed.charAt(1), trimmed.substr(3));\n case trimmed.charAt(1):\n return data(PorcelainFileStatus.NONE, trimmed.charAt(0), trimmed.substr(2));\n default:\n return;\n }\n\n function data(index: string, workingDir: string, path: string) {\n const raw = `${index}${workingDir}`;\n const handler = parsers.get(raw);\n\n if (handler) {\n handler(result, path);\n }\n\n if (raw !== '##' && raw !== '!!') {\n result.files.push(new FileStatusSummary(path, index, workingDir));\n }\n }\n}\n", "import { StatusResult } from '../../../typings';\nimport { parseStatusSummary } from '../responses/StatusSummary';\nimport { StringTask } from '../types';\n\nexport function statusTask(customArgs: string[]): StringTask<StatusResult> {\n return {\n format: 'utf-8',\n commands: ['status', '--porcelain', '-b', '-u', ...customArgs],\n parser(text: string) {\n return parseStatusSummary(text);\n }\n }\n}\n", "import { SimpleGitBase } from '../../typings';\nimport { taskCallback } from './task-callback';\nimport { changeWorkingDirectoryTask } from './tasks/change-working-directory';\nimport config from './tasks/config';\nimport grep from './tasks/grep';\nimport { hashObjectTask } from './tasks/hash-object';\nimport { initTask } from './tasks/init';\nimport log from './tasks/log';\nimport { mergeTask } from './tasks/merge';\nimport { pushTask } from './tasks/push';\nimport { statusTask } from './tasks/status';\nimport { configurationErrorTask, straightThroughStringTask } from './tasks/task';\nimport { outputHandler, SimpleGitExecutor, SimpleGitTask, SimpleGitTaskCallback } from './types';\nimport { asArray, filterString, filterType, getTrailingOptions, trailingFunctionArgument } from './utils';\n\nexport class SimpleGitApi implements SimpleGitBase {\n\n constructor(private _executor: SimpleGitExecutor) {\n }\n\n protected _runTask<T>(task: SimpleGitTask<T>, then?: SimpleGitTaskCallback<T>) {\n const chain = this._executor.chain();\n const promise = chain.push(task);\n\n if (then) {\n taskCallback(task, promise, then);\n }\n\n return Object.create(this, {\n then: {value: promise.then.bind(promise)},\n catch: {value: promise.catch.bind(promise)},\n _executor: {value: chain},\n });\n }\n\n add(files: string | string[]) {\n return this._runTask(\n straightThroughStringTask(['add', ...asArray(files)]),\n trailingFunctionArgument(arguments),\n );\n }\n\n cwd(directory: string | { path: string, root?: boolean }) {\n const next = trailingFunctionArgument(arguments);\n\n if (typeof directory === 'string') {\n return this._runTask(changeWorkingDirectoryTask(directory, this._executor), next);\n }\n\n if (typeof directory?.path === 'string') {\n return this._runTask(changeWorkingDirectoryTask(directory.path, directory.root && this._executor || undefined), next);\n }\n\n return this._runTask(\n configurationErrorTask('Git.cwd: workingDirectory must be supplied as a string'),\n next\n );\n }\n\n hashObject(path: string, write: boolean | unknown) {\n return this._runTask(\n hashObjectTask(path, write === true),\n trailingFunctionArgument(arguments),\n );\n }\n\n init(bare?: boolean | unknown) {\n return this._runTask(\n initTask(bare === true, this._executor.cwd, getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments),\n );\n }\n\n merge() {\n return this._runTask(\n mergeTask(getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments),\n );\n }\n\n mergeFromTo(remote: string, branch: string) {\n if (!(filterString(remote) && filterString(branch))) {\n return this._runTask(configurationErrorTask(\n `Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings`\n ));\n }\n\n return this._runTask(\n mergeTask([remote, branch, ...getTrailingOptions(arguments)]),\n trailingFunctionArgument(arguments, false),\n );\n }\n\n outputHandler(handler: outputHandler) {\n this._executor.outputHandler = handler;\n return this;\n }\n\n push() {\n const task = pushTask(\n {\n remote: filterType(arguments[0], filterString),\n branch: filterType(arguments[1], filterString),\n },\n getTrailingOptions(arguments),\n );\n\n return this._runTask(\n task,\n trailingFunctionArgument(arguments),\n );\n }\n\n stash() {\n return this._runTask(\n straightThroughStringTask(['stash', ...getTrailingOptions(arguments)]),\n trailingFunctionArgument(arguments),\n );\n }\n\n status() {\n return this._runTask(statusTask(getTrailingOptions(arguments)), trailingFunctionArgument(arguments));\n }\n}\n\nObject.assign(SimpleGitApi.prototype, config(), grep(), log());\n", "import { append, remove } from '../utils';\nimport { createDeferred, DeferredPromise } from '@kwsites/promise-deferred';\nimport { createLogger } from '../git-logger';\n\ntype ScheduleCompleteCallback = () => void;\ntype ScheduledTask = Pick<DeferredPromise<ScheduleCompleteCallback>, 'promise' | 'done'> & {id: number};\n\nconst createScheduledTask: () => ScheduledTask = (() => {\n let id = 0;\n return () => {\n id++;\n const {promise, done} = createDeferred<ScheduleCompleteCallback>();\n\n return {\n promise,\n done,\n id,\n };\n }\n})();\n\nexport class Scheduler {\n private logger = createLogger('', 'scheduler');\n private pending: ScheduledTask[] = [];\n private running: ScheduledTask[] = [];\n\n constructor(private concurrency = 2) {\n this.logger(`Constructed, concurrency=%s`, concurrency);\n }\n\n private schedule() {\n if (!this.pending.length || this.running.length >= this.concurrency) {\n this.logger(`Schedule attempt ignored, pending=%s running=%s concurrency=%s`, this.pending.length, this.running.length, this.concurrency);\n return;\n }\n\n const task = append(this.running, this.pending.shift()!);\n this.logger(`Attempting id=%s`, task.id);\n task.done(() => {\n this.logger(`Completing id=`, task.id);\n remove(this.running, task);\n this.schedule();\n });\n }\n\n next(): Promise<ScheduleCompleteCallback> {\n const {promise, id} = append(this.pending, createScheduledTask());\n this.logger(`Scheduling id=%s`, id);\n\n this.schedule();\n\n return promise;\n }\n}\n", "import { straightThroughStringTask } from './task';\nimport { OptionFlags, Options, StringTask } from '../types';\n\nexport type ApplyOptions = Options &\n OptionFlags<\n | '--stat'\n | '--numstat'\n | '--summary'\n | '--check'\n | '--index'\n | '--intent-to-add'\n | '--3way'\n | '--apply'\n | '--no-add'\n | '-R'\n | '--reverse'\n | '--allow-binary-replacement'\n | '--binary'\n | '--reject'\n | '-z'\n | '--inaccurate-eof'\n | '--recount'\n | '--cached'\n | '--ignore-space-change'\n | '--ignore-whitespace'\n | '--verbose'\n | '--unsafe-paths'> &\n OptionFlags<\n '--whitespace',\n 'nowarn' | 'warn' | 'fix' | 'error' | 'error-all'> &\n OptionFlags<'--build-fake-ancestor' | '--exclude' | '--include' | '--directory',\n string> &\n OptionFlags<'-p' | '-C', number>;\n\nexport function applyPatchTask(patches: string[], customArgs: string[]): StringTask<string> {\n return straightThroughStringTask(['apply', ...customArgs, ...patches]);\n}\n", "import {\n BranchMultiDeleteResult,\n BranchSingleDeleteFailure,\n BranchSingleDeleteResult,\n BranchSingleDeleteSuccess\n} from '../../../typings';\n\nexport class BranchDeletionBatch implements BranchMultiDeleteResult {\n all: BranchSingleDeleteResult[] = [];\n branches: { [branchName: string]: BranchSingleDeleteResult } = {};\n errors: BranchSingleDeleteResult[] = [];\n\n get success(): boolean {\n return !this.errors.length;\n }\n}\n\nexport function branchDeletionSuccess (branch: string, hash: string): BranchSingleDeleteSuccess {\n return {\n branch, hash, success: true,\n };\n}\n\nexport function branchDeletionFailure (branch: string): BranchSingleDeleteFailure {\n return {\n branch, hash: null, success: false,\n };\n}\n\nexport function isSingleBranchDeleteFailure (test: BranchSingleDeleteResult): test is BranchSingleDeleteSuccess {\n return test.success;\n}\n", "import { BranchMultiDeleteResult } from '../../../typings';\nimport { BranchDeletionBatch, branchDeletionFailure, branchDeletionSuccess } from '../responses/BranchDeleteSummary';\nimport { TaskParser } from '../types';\nimport { ExitCodes, LineParser, parseStringResponse } from '../utils';\n\nconst deleteSuccessRegex = /(\\S+)\\s+\\(\\S+\\s([^)]+)\\)/;\nconst deleteErrorRegex = /^error[^']+'([^']+)'/m;\n\nconst parsers: LineParser<BranchMultiDeleteResult>[] = [\n new LineParser(deleteSuccessRegex, (result, [branch, hash]) => {\n const deletion = branchDeletionSuccess(branch, hash);\n\n result.all.push(deletion);\n result.branches[branch] = deletion;\n }),\n new LineParser(deleteErrorRegex, (result, [branch]) => {\n const deletion = branchDeletionFailure(branch);\n\n result.errors.push(deletion);\n result.all.push(deletion);\n result.branches[branch] = deletion;\n }),\n];\n\nexport const parseBranchDeletions: TaskParser<string, BranchMultiDeleteResult> = (stdOut, stdErr) => {\n return parseStringResponse(new BranchDeletionBatch(), parsers, stdOut, stdErr);\n}\n\nexport function hasBranchDeletionError(data: string, processExitCode: ExitCodes): boolean {\n return processExitCode === ExitCodes.ERROR && deleteErrorRegex.test(data);\n}\n", "import { BranchSummary, BranchSummaryBranch } from '../../../typings';\n\nexport class BranchSummaryResult implements BranchSummary {\n public all: string[] = [];\n public branches: { [p: string]: BranchSummaryBranch } = {};\n public current: string = '';\n public detached: boolean = false;\n\n push(current: boolean, detached: boolean, name: string, commit: string, label: string) {\n if (current) {\n this.detached = detached;\n this.current = name;\n }\n\n this.all.push(name);\n this.branches[name] = {\n current: current,\n name: name,\n commit: commit,\n label: label\n };\n }\n}\n\n", "import { BranchSummary } from '../../../typings';\nimport { BranchSummaryResult } from '../responses/BranchSummary';\nimport { LineParser, parseStringResponse } from '../utils';\n\nconst parsers: LineParser<BranchSummaryResult>[] = [\n new LineParser(/^(\\*\\s)?\\((?:HEAD )?detached (?:from|at) (\\S+)\\)\\s+([a-z0-9]+)\\s(.*)$/, (result, [current, name, commit, label]) => {\n result.push(\n !!current,\n true,\n name, commit, label\n );\n }),\n new LineParser(/^(\\*\\s)?(\\S+)\\s+([a-z0-9]+)\\s?(.*)$/s, (result, [current, name, commit, label]) => {\n result.push(\n !!current,\n false,\n name, commit, label\n );\n })\n];\n\nexport function parseBranchSummary (stdOut: string): BranchSummary {\n return parseStringResponse(new BranchSummaryResult(), parsers, stdOut);\n}\n", "import { BranchMultiDeleteResult, BranchSingleDeleteResult, BranchSummary } from '../../../typings';\nimport { StringTask } from '../types';\nimport { GitResponseError } from '../errors/git-response-error';\nimport { hasBranchDeletionError, parseBranchDeletions } from '../parsers/parse-branch-delete';\nimport { parseBranchSummary } from '../parsers/parse-branch';\nimport { bufferToString } from '../utils';\n\nexport function containsDeleteBranchCommand(commands: string[]) {\n const deleteCommands = ['-d', '-D', '--delete'];\n return commands.some(command => deleteCommands.includes(command));\n}\n\nexport function branchTask(customArgs: string[]): StringTask<BranchSummary | BranchSingleDeleteResult> {\n const isDelete = containsDeleteBranchCommand(customArgs);\n const commands = ['branch', ...customArgs];\n\n if (commands.length === 1) {\n commands.push('-a');\n }\n\n if (!commands.includes('-v')) {\n commands.splice(1, 0, '-v');\n }\n\n return {\n format: 'utf-8',\n commands,\n parser(stdOut, stdErr) {\n if (isDelete) {\n return parseBranchDeletions(stdOut, stdErr).all[0];\n }\n\n return parseBranchSummary(stdOut);\n },\n }\n}\n\nexport function branchLocalTask(): StringTask<BranchSummary> {\n const parser = parseBranchSummary;\n\n return {\n format: 'utf-8',\n commands: ['branch', '-v'],\n parser,\n }\n}\n\nexport function deleteBranchesTask(branches: string[], forceDelete = false): StringTask<BranchMultiDeleteResult> {\n return {\n format: 'utf-8',\n commands: ['branch', '-v', forceDelete ? '-D' : '-d', ...branches],\n parser(stdOut, stdErr) {\n return parseBranchDeletions(stdOut, stdErr);\n },\n onError({exitCode, stdOut}, error, done, fail) {\n if (!hasBranchDeletionError(String(error), exitCode)) {\n return fail(error);\n }\n\n done(stdOut);\n },\n }\n}\n\nexport function deleteBranchTask(branch: string, forceDelete = false): StringTask<BranchSingleDeleteResult> {\n const task: StringTask<BranchSingleDeleteResult> = {\n format: 'utf-8',\n commands: ['branch', '-v', forceDelete ? '-D' : '-d', branch],\n parser(stdOut, stdErr) {\n return parseBranchDeletions(stdOut, stdErr).branches[branch]!;\n },\n onError({exitCode, stdErr, stdOut}, error, _, fail) {\n if (!hasBranchDeletionError(String(error), exitCode)) {\n return fail(error);\n }\n\n throw new GitResponseError(\n task.parser(bufferToString(stdOut), bufferToString(stdErr)),\n String(error)\n );\n },\n };\n\n return task;\n}\n", "\n/**\n * Parser for the `check-ignore` command - returns each file as a string array\n */\nexport const parseCheckIgnore = (text: string): string[] => {\n return text.split(/\\n/g)\n .map(line => line.trim())\n .filter(file => !!file);\n};\n", "import { StringTask } from '../types';\nimport { parseCheckIgnore } from '../responses/CheckIgnore';\n\nexport function checkIgnoreTask(paths: string[]): StringTask<string[]> {\n return {\n commands: ['check-ignore', ...paths],\n format: 'utf-8',\n parser: parseCheckIgnore,\n };\n}\n", "import { straightThroughStringTask } from './task';\nimport { OptionFlags, Options, StringTask } from '../types';\nimport { append } from '../utils';\n\nexport type CloneOptions = Options &\n OptionFlags<\n '--bare' |\n '--dissociate' |\n '--mirror' |\n '--no-checkout' |\n '--no-remote-submodules' |\n '--no-shallow-submodules' |\n '--no-single-branch' |\n '--no-tags' |\n '--remote-submodules' |\n '--single-branch' |\n '--shallow-submodules' |\n '--verbose'\n > &\n OptionFlags<'--depth' | '-j' | '--jobs', number> &\n OptionFlags<'--branch' | '--origin' | '--recurse-submodules' | '--separate-git-dir' | '--shallow-exclude' | '--shallow-since' | '--template', string>\n\nexport function cloneTask(repo: string | undefined, directory: string | undefined, customArgs: string[]): StringTask<string> {\n const commands = ['clone', ...customArgs];\n if (typeof repo === 'string') {\n commands.push(repo);\n }\n if (typeof directory === 'string') {\n commands.push(directory);\n }\n\n return straightThroughStringTask(commands);\n}\n\nexport function cloneMirrorTask(repo: string | undefined, directory: string | undefined, customArgs: string[]): StringTask<string> {\n append(customArgs,'--mirror');\n\n return cloneTask(repo, directory, customArgs);\n}\n", "import { CommitResult } from '../../../typings';\nimport { LineParser, parseStringResponse } from '../utils';\n\nconst parsers: LineParser<CommitResult>[] = [\n new LineParser(/^\\[([^\\s]+)( \\([^)]+\\))? ([^\\]]+)/, (result, [branch, root, commit]) => {\n result.branch = branch;\n result.commit = commit;\n result.root = !!root;\n }),\n new LineParser(/\\s*Author:\\s(.+)/i, (result, [author]) => {\n const parts = author.split('<');\n const email = parts.pop();\n\n if (!email || !email.includes('@')) {\n return;\n }\n\n result.author = {\n email: email.substr(0, email.length - 1),\n name: parts.join('<').trim()\n };\n }),\n new LineParser(/(\\d+)[^,]*(?:,\\s*(\\d+)[^,]*)(?:,\\s*(\\d+))/g, (result, [changes, insertions, deletions]) => {\n result.summary.changes = parseInt(changes, 10) || 0;\n result.summary.insertions = parseInt(insertions, 10) || 0;\n result.summary.deletions = parseInt(deletions, 10) || 0;\n }),\n new LineParser(/^(\\d+)[^,]*(?:,\\s*(\\d+)[^(]+\\(([+-]))?/, (result, [changes, lines, direction]) => {\n result.summary.changes = parseInt(changes, 10) || 0;\n const count = parseInt(lines, 10) || 0;\n if (direction === '-') {\n result.summary.deletions = count;\n } else if (direction === '+') {\n result.summary.insertions = count;\n }\n }),\n];\n\nexport function parseCommitResult(stdOut: string): CommitResult {\n const result: CommitResult = {\n author: null,\n branch: '',\n commit: '',\n root: false,\n summary: {\n changes: 0,\n insertions: 0,\n deletions: 0,\n },\n };\n return parseStringResponse(result, parsers, stdOut);\n}\n", "import { CommitResult } from '../../../typings';\nimport { parseCommitResult } from '../parsers/parse-commit';\nimport { StringTask } from '../types';\n\nexport function commitTask(message: string[], files: string[], customArgs: string[]): StringTask<CommitResult> {\n const commands: string[] = ['commit'];\n\n message.forEach((m) => commands.push('-m', m));\n\n commands.push(\n ...files,\n ...customArgs,\n );\n\n return {\n commands,\n format: 'utf-8',\n parser: parseCommitResult,\n }\n}\n", "import { StringTask } from '../types';\nimport { DiffResult } from '../../../typings';\nimport { parseDiffResult } from '../parsers/parse-diff-summary';\n\nexport function diffSummaryTask(customArgs: string[]): StringTask<DiffResult> {\n return {\n commands: ['diff', '--stat=4096', ...customArgs],\n format: 'utf-8',\n parser (stdOut) {\n return parseDiffResult(stdOut);\n }\n }\n}\n", "import { FetchResult } from '../../../typings';\nimport { LineParser, parseStringResponse } from '../utils';\n\nconst parsers: LineParser<FetchResult>[] = [\n new LineParser(/From (.+)$/, (result, [remote]) => {\n result.remote = remote;\n }),\n new LineParser(/\\* \\[new branch]\\s+(\\S+)\\s*-> (.+)$/, (result, [name, tracking]) =>{\n result.branches.push({\n name,\n tracking,\n });\n }),\n new LineParser(/\\* \\[new tag]\\s+(\\S+)\\s*-> (.+)$/, (result, [name, tracking]) => {\n result.tags.push({\n name,\n tracking,\n });\n })\n];\n\nexport function parseFetchResult (stdOut: string, stdErr: string): FetchResult {\n const result: FetchResult = {\n raw: stdOut,\n remote: null,\n branches: [],\n tags: [],\n };\n return parseStringResponse(result, parsers, stdOut, stdErr);\n}\n", "import { FetchResult } from '../../../typings';\nimport { parseFetchResult } from '../parsers/parse-fetch';\nimport { StringTask } from '../types';\n\nexport function fetchTask(remote: string, branch: string, customArgs: string[]): StringTask<FetchResult> {\n const commands = ['fetch', ...customArgs];\n if (remote && branch) {\n commands.push(remote, branch);\n }\n\n return {\n commands,\n format: 'utf-8',\n parser: parseFetchResult,\n }\n}\n", "import { MoveResult } from '../../../typings';\nimport { LineParser, parseStringResponse } from '../utils';\n\nconst parsers: LineParser<MoveResult>[] = [\n new LineParser(/^Renaming (.+) to (.+)$/, (result, [from, to]) => {\n result.moves.push({from, to});\n }),\n];\n\nexport function parseMoveResult (stdOut: string): MoveResult {\n return parseStringResponse({moves: []}, parsers, stdOut);\n}\n", "import { MoveResult } from '../../../typings';\nimport { parseMoveResult } from '../parsers/parse-move';\nimport { StringTask } from '../types';\nimport { asArray } from '../utils';\n\nexport function moveTask(from: string | string[], to: string): StringTask<MoveResult> {\n return {\n commands: ['mv', '-v', ...asArray(from), to],\n format: 'utf-8',\n parser: parseMoveResult,\n };\n}\n", "import { PullResult } from '../../../typings';\nimport { GitResponseError } from '../errors/git-response-error';\nimport { parsePullErrorResult, parsePullResult } from '../parsers/parse-pull';\nimport { Maybe, StringTask } from '../types';\nimport { bufferToString } from '../utils';\n\nexport function pullTask(remote: Maybe<string>, branch: Maybe<string>, customArgs: string[]): StringTask<PullResult> {\n const commands: string[] = ['pull', ...customArgs];\n if (remote && branch) {\n commands.splice(1, 0, remote, branch);\n }\n\n return {\n commands,\n format: 'utf-8',\n parser(stdOut, stdErr): PullResult {\n return parsePullResult(stdOut, stdErr);\n },\n onError(result, _error, _done, fail) {\n const pullError = parsePullErrorResult(bufferToString(result.stdOut), bufferToString(result.stdErr));\n if (pullError) {\n return fail(new GitResponseError(pullError));\n }\n\n fail(_error);\n }\n }\n}\n", "import { forEachLineWithContent } from '../utils';\n\nexport interface RemoteWithoutRefs {\n name: string;\n}\n\nexport interface RemoteWithRefs extends RemoteWithoutRefs {\n refs: {\n fetch: string;\n push: string;\n };\n}\n\nexport function parseGetRemotes (text: string): RemoteWithoutRefs[] {\n const remotes: {[name: string]: RemoteWithoutRefs} = {};\n\n forEach(text, ([name]) => remotes[name] = { name });\n\n return Object.values(remotes);\n}\n\nexport function parseGetRemotesVerbose (text: string): RemoteWithRefs[] {\n const remotes: {[name: string]: RemoteWithRefs} = {};\n\n forEach(text, ([name, url, purpose]) => {\n if (!remotes.hasOwnProperty(name)) {\n remotes[name] = {\n name: name,\n refs: { fetch: '', push: '' },\n };\n }\n\n if (purpose && url) {\n remotes[name].refs[purpose.replace(/[^a-z]/g, '') as keyof RemoteWithRefs['refs']] = url;\n }\n });\n\n return Object.values(remotes);\n}\n\nfunction forEach(text: string, handler: (line: string[]) => void) {\n forEachLineWithContent(text, (line) => handler(line.split(/\\s+/)));\n}\n", "import { parseGetRemotes, parseGetRemotesVerbose } from '../responses/GetRemoteSummary';\nimport { StringTask } from '../types';\nimport { straightThroughStringTask } from './task';\n\nexport function addRemoteTask(remoteName: string, remoteRepo: string, customArgs: string[] = []): StringTask<string> {\n return straightThroughStringTask(['remote', 'add', ...customArgs, remoteName, remoteRepo]);\n}\n\nexport function getRemotesTask(verbose: boolean): StringTask<any> {\n const commands = ['remote'];\n if (verbose) {\n commands.push('-v');\n }\n\n return {\n commands,\n format: 'utf-8',\n parser: verbose ? parseGetRemotesVerbose : parseGetRemotes,\n };\n}\n\nexport function listRemotesTask(customArgs: string[] = []): StringTask<string> {\n const commands = [...customArgs];\n if (commands[0] !== 'ls-remote') {\n commands.unshift('ls-remote');\n }\n\n return straightThroughStringTask(commands);\n}\n\nexport function remoteTask(customArgs: string[] = []): StringTask<string> {\n const commands = [...customArgs];\n if (commands[0] !== 'remote') {\n commands.unshift('remote');\n }\n\n return straightThroughStringTask(commands);\n}\n\nexport function removeRemoteTask(remoteName: string) {\n return straightThroughStringTask(['remote', 'remove', remoteName]);\n}\n", "import { LogOptions, LogResult } from '../../../typings';\nimport { createListLogSummaryParser } from '../parsers/parse-list-log-summary';\nimport { StringTask } from '../types';\nimport { parseLogOptions } from './log';\n\nexport function stashListTask(opt: LogOptions = {}, customArgs: string[]): StringTask<LogResult> {\n const options = parseLogOptions<any>(opt);\n const parser = createListLogSummaryParser(options.splitter, options.fields);\n\n return {\n commands: ['stash', 'list', ...options.commands, ...customArgs],\n format: 'utf-8',\n parser,\n };\n}\n", "import { StringTask } from '../types';\nimport { straightThroughStringTask } from './task';\n\nexport function addSubModuleTask(repo: string, path: string): StringTask<string> {\n return subModuleTask(['add', repo, path]);\n}\n\nexport function initSubModuleTask(customArgs: string[]): StringTask<string> {\n return subModuleTask(['init', ...customArgs]);\n}\n\nexport function subModuleTask(customArgs: string[]): StringTask<string> {\n const commands = [...customArgs];\n if (commands[0] !== 'submodule') {\n commands.unshift('submodule');\n }\n\n return straightThroughStringTask(commands);\n}\n\nexport function updateSubModuleTask(customArgs: string[]): StringTask<string> {\n return subModuleTask(['update', ...customArgs]);\n}\n", "import { TagResult } from '../../../typings';\n\nexport class TagList implements TagResult {\n constructor(\n public readonly all: string[],\n public readonly latest: string | undefined,\n ) {\n }\n}\n\nexport const parseTagList = function (data: string, customSort = false) {\n const tags = data\n .split('\\n')\n .map(trimmed)\n .filter(Boolean);\n\n if (!customSort) {\n tags.sort(function (tagA, tagB) {\n const partsA = tagA.split('.');\n const partsB = tagB.split('.');\n\n if (partsA.length === 1 || partsB.length === 1) {\n return singleSorted(toNumber(partsA[0]), toNumber(partsB[0]));\n }\n\n for (let i = 0, l = Math.max(partsA.length, partsB.length); i < l; i++) {\n const diff = sorted(toNumber(partsA[i]), toNumber(partsB[i]));\n\n if (diff) {\n return diff;\n }\n }\n\n return 0;\n });\n }\n\n const latest = customSort ? tags[0] : [...tags].reverse().find((tag) => tag.indexOf('.') >= 0);\n\n return new TagList(tags, latest);\n};\n\nfunction singleSorted(a: number, b: number): number {\n const aIsNum = isNaN(a);\n const bIsNum = isNaN(b);\n\n if (aIsNum !== bIsNum) {\n return aIsNum ? 1 : -1;\n }\n\n return aIsNum ? sorted(a, b) : 0;\n}\n\nfunction sorted(a: number, b: number) {\n return a === b ? 0 : a > b ? 1 : -1;\n}\n\nfunction trimmed(input: string) {\n return input.trim();\n}\n\nfunction toNumber(input: string | undefined) {\n if (typeof input === 'string') {\n return parseInt(input.replace(/^\\D+/g, ''), 10) || 0;\n }\n\n return 0;\n}\n", "import { TagResult } from '../../../typings';\nimport { parseTagList } from '../responses/TagList';\nimport { StringTask } from '../types';\n\n/**\n * Task used by `git.tags`\n */\nexport function tagListTask (customArgs: string[] = []): StringTask<TagResult> {\n const hasCustomSort = customArgs.some((option) => /^--sort=/.test(option));\n\n return {\n format: 'utf-8',\n commands: ['tag', '-l', ...customArgs],\n parser (text: string) {\n return parseTagList(text, hasCustomSort);\n },\n }\n}\n\n/**\n * Task used by `git.addTag`\n */\nexport function addTagTask (name: string): StringTask<{name: string}> {\n return {\n format: 'utf-8',\n commands: ['tag', name],\n parser () {\n return {name};\n }\n }\n}\n\n/**\n * Task used by `git.addTag`\n */\nexport function addAnnotatedTagTask (name: string, tagMessage: string): StringTask<{name: string}> {\n return {\n format: 'utf-8',\n commands: ['tag', '-a', '-m', tagMessage, name],\n parser () {\n return {name};\n }\n }\n}\n", "const {GitExecutor} = require('./lib/runners/git-executor');\nconst {SimpleGitApi} = require('./lib/simple-git-api');\n\nconst {Scheduler} = require('./lib/runners/scheduler');\nconst {configurationErrorTask} = require('./lib/tasks/task');\nconst {\n asArray,\n filterArray,\n filterPrimitives,\n filterString,\n filterStringOrStringArray,\n filterType,\n getTrailingOptions,\n trailingFunctionArgument,\n trailingOptionsArgument\n} = require('./lib/utils');\nconst {applyPatchTask} = require('./lib/tasks/apply-patch')\nconst {branchTask, branchLocalTask, deleteBranchesTask, deleteBranchTask} = require('./lib/tasks/branch');\nconst {checkIgnoreTask} = require('./lib/tasks/check-ignore');\nconst {checkIsRepoTask} = require('./lib/tasks/check-is-repo');\nconst {cloneTask, cloneMirrorTask} = require('./lib/tasks/clone');\nconst {cleanWithOptionsTask, isCleanOptionsArray} = require('./lib/tasks/clean');\nconst {commitTask} = require('./lib/tasks/commit');\nconst {diffSummaryTask} = require('./lib/tasks/diff');\nconst {fetchTask} = require('./lib/tasks/fetch');\nconst {moveTask} = require(\"./lib/tasks/move\");\nconst {pullTask} = require('./lib/tasks/pull');\nconst {pushTagsTask} = require('./lib/tasks/push');\nconst {addRemoteTask, getRemotesTask, listRemotesTask, remoteTask, removeRemoteTask} = require('./lib/tasks/remote');\nconst {getResetMode, resetTask} = require('./lib/tasks/reset');\nconst {stashListTask} = require('./lib/tasks/stash-list');\nconst {addSubModuleTask, initSubModuleTask, subModuleTask, updateSubModuleTask} = require('./lib/tasks/sub-module');\nconst {addAnnotatedTagTask, addTagTask, tagListTask} = require('./lib/tasks/tag');\nconst {straightThroughBufferTask, straightThroughStringTask} = require('./lib/tasks/task');\n\nfunction Git (options, plugins) {\n this._executor = new GitExecutor(\n options.binary, options.baseDir,\n new Scheduler(options.maxConcurrentProcesses), plugins,\n );\n}\n\n(Git.prototype = Object.create(SimpleGitApi.prototype)).constructor = Git;\n\n/**\n * Sets the path to a custom git binary, should either be `git` when there is an installation of git available on\n * the system path, or a fully qualified path to the executable.\n *\n * @param {string} command\n * @returns {Git}\n */\nGit.prototype.customBinary = function (command) {\n this._executor.binary = command;\n return this;\n};\n\n/**\n * Sets an environment variable for the spawned child process, either supply both a name and value as strings or\n * a single object to entirely replace the current environment variables.\n *\n * @param {string|Object} name\n * @param {string} [value]\n * @returns {Git}\n */\nGit.prototype.env = function (name, value) {\n if (arguments.length === 1 && typeof name === 'object') {\n this._executor.env = name;\n } else {\n (this._executor.env = this._executor.env || {})[name] = value;\n }\n\n return this;\n};\n\n/**\n * List the stash(s) of the local repo\n */\nGit.prototype.stashList = function (options) {\n return this._runTask(\n stashListTask(\n trailingOptionsArgument(arguments) || {},\n filterArray(options) && options || []\n ),\n trailingFunctionArgument(arguments),\n );\n};\n\nfunction createCloneTask (api, task, repoPath, localPath) {\n if (typeof repoPath !== 'string') {\n return configurationErrorTask(`git.${ api }() requires a string 'repoPath'`);\n }\n\n return task(repoPath, filterType(localPath, filterString), getTrailingOptions(arguments));\n}\n\n\n/**\n * Clone a git repo\n */\nGit.prototype.clone = function () {\n return this._runTask(\n createCloneTask('clone', cloneTask, ...arguments),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Mirror a git repo\n */\nGit.prototype.mirror = function () {\n return this._runTask(\n createCloneTask('mirror', cloneMirrorTask, ...arguments),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Moves one or more files to a new destination.\n *\n * @see https://git-scm.com/docs/git-mv\n *\n * @param {string|string[]} from\n * @param {string} to\n */\nGit.prototype.mv = function (from, to) {\n return this._runTask(moveTask(from, to), trailingFunctionArgument(arguments));\n};\n\n/**\n * Internally uses pull and tags to get the list of tags then checks out the latest tag.\n *\n * @param {Function} [then]\n */\nGit.prototype.checkoutLatestTag = function (then) {\n var git = this;\n return this.pull(function () {\n git.tags(function (err, tags) {\n git.checkout(tags.latest, then);\n });\n });\n};\n\n/**\n * Commits changes in the current working directory - when specific file paths are supplied, only changes on those\n * files will be committed.\n *\n * @param {string|string[]} message\n * @param {string|string[]} [files]\n * @param {Object} [options]\n * @param {Function} [then]\n */\nGit.prototype.commit = function (message, files, options, then) {\n const next = trailingFunctionArgument(arguments);\n\n if (!filterStringOrStringArray(message)) {\n return this._runTask(\n configurationErrorTask('git.commit: requires the commit message to be supplied as a string/string[]'),\n next,\n );\n }\n\n return this._runTask(\n commitTask(\n asArray(message),\n asArray(filterType(files, filterStringOrStringArray, [])),\n [...filterType(options, filterArray, []), ...getTrailingOptions(arguments, 0, true)]\n ),\n next\n );\n};\n\n/**\n * Pull the updated contents of the current repo\n */\nGit.prototype.pull = function (remote, branch, options, then) {\n return this._runTask(\n pullTask(filterType(remote, filterString), filterType(branch, filterString), getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Fetch the updated contents of the current repo.\n *\n * @example\n * .fetch('upstream', 'master') // fetches from master on remote named upstream\n * .fetch(function () {}) // runs fetch against default remote and branch and calls function\n *\n * @param {string} [remote]\n * @param {string} [branch]\n */\nGit.prototype.fetch = function (remote, branch) {\n return this._runTask(\n fetchTask(filterType(remote, filterString), filterType(branch, filterString), getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Disables/enables the use of the console for printing warnings and errors, by default messages are not shown in\n * a production environment.\n *\n * @param {boolean} silence\n * @returns {Git}\n */\nGit.prototype.silent = function (silence) {\n console.warn('simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3');\n return this;\n};\n\n/**\n * List all tags. When using git 2.7.0 or above, include an options object with `\"--sort\": \"property-name\"` to\n * sort the tags by that property instead of using the default semantic versioning sort.\n *\n * Note, supplying this option when it is not supported by your Git version will cause the operation to fail.\n *\n * @param {Object} [options]\n * @param {Function} [then]\n */\nGit.prototype.tags = function (options, then) {\n return this._runTask(\n tagListTask(getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Rebases the current working copy. Options can be supplied either as an array of string parameters\n * to be sent to the `git rebase` command, or a standard options object.\n */\nGit.prototype.rebase = function () {\n return this._runTask(\n straightThroughStringTask(['rebase', ...getTrailingOptions(arguments)]),\n trailingFunctionArgument(arguments)\n );\n};\n\n/**\n * Reset a repo\n */\nGit.prototype.reset = function (mode) {\n return this._runTask(\n resetTask(getResetMode(mode), getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Revert one or more commits in the local working copy\n */\nGit.prototype.revert = function (commit) {\n const next = trailingFunctionArgument(arguments);\n\n if (typeof commit !== 'string') {\n return this._runTask(\n configurationErrorTask('Commit must be a string'),\n next,\n );\n }\n\n return this._runTask(\n straightThroughStringTask(['revert', ...getTrailingOptions(arguments, 0, true), commit]),\n next\n );\n};\n\n/**\n * Add a lightweight tag to the head of the current branch\n */\nGit.prototype.addTag = function (name) {\n const task = (typeof name === 'string')\n ? addTagTask(name)\n : configurationErrorTask('Git.addTag requires a tag name');\n\n return this._runTask(task, trailingFunctionArgument(arguments));\n};\n\n/**\n * Add an annotated tag to the head of the current branch\n */\nGit.prototype.addAnnotatedTag = function (tagName, tagMessage) {\n return this._runTask(\n addAnnotatedTagTask(tagName, tagMessage),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Check out a tag or revision, any number of additional arguments can be passed to the `git checkout` command\n * by supplying either a string or array of strings as the first argument.\n */\nGit.prototype.checkout = function () {\n const commands = ['checkout', ...getTrailingOptions(arguments, true)];\n return this._runTask(\n straightThroughStringTask(commands),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Check out a remote branch\n *\n * @param {string} branchName name of branch\n * @param {string} startPoint (e.g origin/development)\n * @param {Function} [then]\n */\nGit.prototype.checkoutBranch = function (branchName, startPoint, then) {\n return this.checkout(['-b', branchName, startPoint], trailingFunctionArgument(arguments));\n};\n\n/**\n * Check out a local branch\n */\nGit.prototype.checkoutLocalBranch = function (branchName, then) {\n return this.checkout(['-b', branchName], trailingFunctionArgument(arguments));\n};\n\n/**\n * Delete a local branch\n */\nGit.prototype.deleteLocalBranch = function (branchName, forceDelete, then) {\n return this._runTask(\n deleteBranchTask(branchName, typeof forceDelete === \"boolean\" ? forceDelete : false),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Delete one or more local branches\n */\nGit.prototype.deleteLocalBranches = function (branchNames, forceDelete, then) {\n return this._runTask(\n deleteBranchesTask(branchNames, typeof forceDelete === \"boolean\" ? forceDelete : false),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * List all branches\n *\n * @param {Object | string[]} [options]\n * @param {Function} [then]\n */\nGit.prototype.branch = function (options, then) {\n return this._runTask(\n branchTask(getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Return list of local branches\n *\n * @param {Function} [then]\n */\nGit.prototype.branchLocal = function (then) {\n return this._runTask(\n branchLocalTask(),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Executes any command against the git binary.\n */\nGit.prototype.raw = function (commands) {\n const createRestCommands = !Array.isArray(commands);\n const command = [].slice.call(createRestCommands ? arguments : commands, 0);\n\n for (let i = 0; i < command.length && createRestCommands; i++) {\n if (!filterPrimitives(command[i])) {\n command.splice(i, command.length - i);\n break;\n }\n }\n\n command.push(\n ...getTrailingOptions(arguments, 0, true),\n );\n\n var next = trailingFunctionArgument(arguments);\n\n if (!command.length) {\n return this._runTask(\n configurationErrorTask('Raw: must supply one or more command to execute'),\n next,\n );\n }\n\n return this._runTask(straightThroughStringTask(command), next);\n};\n\nGit.prototype.submoduleAdd = function (repo, path, then) {\n return this._runTask(\n addSubModuleTask(repo, path),\n trailingFunctionArgument(arguments),\n );\n};\n\nGit.prototype.submoduleUpdate = function (args, then) {\n return this._runTask(\n updateSubModuleTask(getTrailingOptions(arguments, true)),\n trailingFunctionArgument(arguments),\n );\n};\n\nGit.prototype.submoduleInit = function (args, then) {\n return this._runTask(\n initSubModuleTask(getTrailingOptions(arguments, true)),\n trailingFunctionArgument(arguments),\n );\n};\n\nGit.prototype.subModule = function (options, then) {\n return this._runTask(\n subModuleTask(getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments),\n );\n};\n\nGit.prototype.listRemote = function () {\n return this._runTask(\n listRemotesTask(getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Adds a remote to the list of remotes.\n */\nGit.prototype.addRemote = function (remoteName, remoteRepo, then) {\n return this._runTask(\n addRemoteTask(remoteName, remoteRepo, getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Removes an entry by name from the list of remotes.\n */\nGit.prototype.removeRemote = function (remoteName, then) {\n return this._runTask(\n removeRemoteTask(remoteName),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Gets the currently available remotes, setting the optional verbose argument to true includes additional\n * detail on the remotes themselves.\n */\nGit.prototype.getRemotes = function (verbose, then) {\n return this._runTask(\n getRemotesTask(verbose === true),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Call any `git remote` function with arguments passed as an array of strings.\n *\n * @param {string[]} options\n * @param {Function} [then]\n */\nGit.prototype.remote = function (options, then) {\n return this._runTask(\n remoteTask(getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Call any `git tag` function with arguments passed as an array of strings.\n *\n * @param {string[]} options\n * @param {Function} [then]\n */\nGit.prototype.tag = function (options, then) {\n const command = getTrailingOptions(arguments);\n\n if (command[0] !== 'tag') {\n command.unshift('tag');\n }\n\n return this._runTask(\n straightThroughStringTask(command),\n trailingFunctionArgument(arguments)\n );\n};\n\n/**\n * Updates repository server info\n *\n * @param {Function} [then]\n */\nGit.prototype.updateServerInfo = function (then) {\n return this._runTask(\n straightThroughStringTask(['update-server-info']),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Pushes the current tag changes to a remote which can be either a URL or named remote. When not specified uses the\n * default configured remote spec.\n *\n * @param {string} [remote]\n * @param {Function} [then]\n */\nGit.prototype.pushTags = function (remote, then) {\n const task = pushTagsTask({remote: filterType(remote, filterString)}, getTrailingOptions(arguments));\n\n return this._runTask(task, trailingFunctionArgument(arguments));\n};\n\n/**\n * Removes the named files from source control.\n */\nGit.prototype.rm = function (files) {\n return this._runTask(\n straightThroughStringTask(['rm', '-f', ...asArray(files)]),\n trailingFunctionArgument(arguments)\n );\n};\n\n/**\n * Removes the named files from source control but keeps them on disk rather than deleting them entirely. To\n * completely remove the files, use `rm`.\n *\n * @param {string|string[]} files\n */\nGit.prototype.rmKeepLocal = function (files) {\n return this._runTask(\n straightThroughStringTask(['rm', '--cached', ...asArray(files)]),\n trailingFunctionArgument(arguments)\n );\n};\n\n/**\n * Returns a list of objects in a tree based on commit hash. Passing in an object hash returns the object's content,\n * size, and type.\n *\n * Passing \"-p\" will instruct cat-file to determine the object type, and display its formatted contents.\n *\n * @param {string[]} [options]\n * @param {Function} [then]\n */\nGit.prototype.catFile = function (options, then) {\n return this._catFile('utf-8', arguments);\n};\n\nGit.prototype.binaryCatFile = function () {\n return this._catFile('buffer', arguments);\n};\n\nGit.prototype._catFile = function (format, args) {\n var handler = trailingFunctionArgument(args);\n var command = ['cat-file'];\n var options = args[0];\n\n if (typeof options === 'string') {\n return this._runTask(\n configurationErrorTask('Git.catFile: options must be supplied as an array of strings'),\n handler,\n );\n }\n\n if (Array.isArray(options)) {\n command.push.apply(command, options);\n }\n\n const task = format === 'buffer'\n ? straightThroughBufferTask(command)\n : straightThroughStringTask(command);\n\n return this._runTask(task, handler);\n};\n\nGit.prototype.diff = function (options, then) {\n const task = filterString(options)\n ? configurationErrorTask('git.diff: supplying options as a single string is no longer supported, switch to an array of strings')\n : straightThroughStringTask(['diff', ...getTrailingOptions(arguments)]);\n\n return this._runTask(\n task,\n trailingFunctionArgument(arguments),\n );\n};\n\nGit.prototype.diffSummary = function () {\n return this._runTask(\n diffSummaryTask(getTrailingOptions(arguments, 1)),\n trailingFunctionArgument(arguments),\n );\n};\n\nGit.prototype.applyPatch = function (patches) {\n const task = !filterStringOrStringArray(patches)\n ? configurationErrorTask(`git.applyPatch requires one or more string patches as the first argument`)\n : applyPatchTask(asArray(patches), getTrailingOptions([].slice.call(arguments, 1)));\n\n return this._runTask(\n task,\n trailingFunctionArgument(arguments),\n );\n}\n\nGit.prototype.revparse = function () {\n const commands = ['rev-parse', ...getTrailingOptions(arguments, true)];\n return this._runTask(\n straightThroughStringTask(commands, true),\n trailingFunctionArgument(arguments),\n );\n};\n\n/**\n * Show various types of objects, for example the file at a certain commit\n *\n * @param {string[]} [options]\n * @param {Function} [then]\n */\nGit.prototype.show = function (options, then) {\n return this._runTask(\n straightThroughStringTask(['show', ...getTrailingOptions(arguments, 1)]),\n trailingFunctionArgument(arguments)\n );\n};\n\n/**\n */\nGit.prototype.clean = function (mode, options, then) {\n const usingCleanOptionsArray = isCleanOptionsArray(mode);\n const cleanMode = usingCleanOptionsArray && mode.join('') || filterType(mode, filterString) || '';\n const customArgs = getTrailingOptions([].slice.call(arguments, usingCleanOptionsArray ? 1 : 0));\n\n return this._runTask(\n cleanWithOptionsTask(cleanMode, customArgs),\n trailingFunctionArgument(arguments),\n );\n};\n\nGit.prototype.exec = function (then) {\n const task = {\n commands: [],\n format: 'utf-8',\n parser () {\n if (typeof then === 'function') {\n then();\n }\n }\n };\n\n return this._runTask(task);\n};\n\n/**\n * Clears the queue of pending commands and returns the wrapper instance for chaining.\n *\n * @returns {Git}\n */\nGit.prototype.clearQueue = function () {\n // TODO:\n // this._executor.clear();\n return this;\n};\n\n/**\n * Check if a pathname or pathnames are excluded by .gitignore\n *\n * @param {string|string[]} pathnames\n * @param {Function} [then]\n */\nGit.prototype.checkIgnore = function (pathnames, then) {\n return this._runTask(\n checkIgnoreTask(asArray((filterType(pathnames, filterStringOrStringArray, [])))),\n trailingFunctionArgument(arguments),\n );\n};\n\nGit.prototype.checkIsRepo = function (checkType, then) {\n return this._runTask(\n checkIsRepoTask(filterType(checkType, filterString)),\n trailingFunctionArgument(arguments),\n );\n};\n\nmodule.exports = Git;\n", "import { GitError } from './git-error';\nimport { SimpleGitOptions } from '../types';\n\n/**\n * The `GitConstructError` is thrown when an error occurs in the constructor\n * of the `simple-git` instance itself. Most commonly as a result of using\n * a `baseDir` option that points to a folder that either does not exist,\n * or cannot be read by the user the node script is running as.\n *\n * Check the `.message` property for more detail including the properties\n * passed to the constructor.\n */\nexport class GitConstructError extends GitError {\n\n constructor (\n public readonly config: SimpleGitOptions,\n message: string,\n ) {\n super(undefined, message);\n }\n\n}\n", "import { GitConstructError } from './errors/git-construct-error';\nimport { GitError } from './errors/git-error';\nimport { GitPluginError } from './errors/git-plugin-error';\nimport { GitResponseError } from './errors/git-response-error';\nimport { TaskConfigurationError } from './errors/task-configuration-error';\nimport { CheckRepoActions } from './tasks/check-is-repo';\nimport { CleanOptions } from './tasks/clean';\nimport { GitConfigScope } from './tasks/config';\nimport { grepQueryBuilder } from './tasks/grep';\nimport { ResetMode } from './tasks/reset';\n\nexport {\n CheckRepoActions,\n CleanOptions,\n GitConfigScope,\n GitConstructError,\n GitError,\n GitPluginError,\n GitResponseError,\n ResetMode,\n TaskConfigurationError,\n grepQueryBuilder,\n};\n\n// export const api = {\n// CheckRepoActions,\n// CleanOptions,\n// GitConfigScope,\n// GitConstructError,\n// GitError,\n// GitPluginError,\n// GitResponseError,\n// ResetMode,\n// TaskConfigurationError,\n// grepQueryBuilder,\n// };\n", "import { SimpleGitOptions, SimpleGitTask } from '../types';\nimport { GitError } from './git-error';\n\nexport class GitPluginError extends GitError {\n\n constructor (\n public task?: SimpleGitTask<any>,\n public readonly plugin?: keyof SimpleGitOptions,\n message?: string,\n ) {\n super(task, message);\n Object.setPrototypeOf(this, new.target.prototype);\n }\n\n}\n", "import { prefixedArray } from '../utils';\nimport { SimpleGitPlugin } from './simple-git-plugin';\n\nexport function commandConfigPrefixingPlugin(configuration: string[]): SimpleGitPlugin<'spawn.args'> {\n const prefix = prefixedArray(configuration, '-c');\n\n return {\n type: 'spawn.args',\n action(data) {\n return [...prefix, ...data];\n },\n };\n}\n", "import { deferred, DeferredPromise } from '@kwsites/promise-deferred';\nimport { SimpleGitPluginConfig } from '../types';\nimport { delay } from '../utils';\nimport { SimpleGitPlugin } from './simple-git-plugin';\n\nconst never = deferred().promise;\n\nexport function completionDetectionPlugin({\n onClose = true,\n onExit = 50\n }: SimpleGitPluginConfig['completion'] = {}): SimpleGitPlugin<'spawn.after'> {\n\n function createEvents() {\n let exitCode = -1;\n const events = {\n close: deferred(),\n closeTimeout: deferred(),\n exit: deferred(),\n exitTimeout: deferred(),\n };\n\n const result = Promise.race([\n onClose === false ? never : events.closeTimeout.promise,\n onExit === false ? never : events.exitTimeout.promise,\n ]);\n\n configureTimeout(onClose, events.close, events.closeTimeout);\n configureTimeout(onExit, events.exit, events.exitTimeout);\n\n return {\n close(code: number) {\n exitCode = code;\n events.close.done();\n },\n exit(code: number) {\n exitCode = code;\n events.exit.done();\n },\n get exitCode() {\n return exitCode;\n },\n result,\n };\n }\n\n function configureTimeout(flag: boolean | number, event: DeferredPromise<void>, timeout: DeferredPromise<void>) {\n if (flag === false) {\n return;\n }\n\n (flag === true ? event.promise : event.promise.then(() => delay(flag))).then(timeout.done);\n }\n\n return {\n type: 'spawn.after',\n async action(_data, {spawned, close}) {\n const events = createEvents();\n\n let deferClose = true;\n let quickClose = () => void (deferClose = false);\n\n spawned.stdout?.on('data', quickClose);\n spawned.stderr?.on('data', quickClose);\n spawned.on('error', quickClose);\n\n spawned.on('close', (code: number) => events.close(code));\n spawned.on('exit', (code: number) => events.exit(code));\n\n try{\n await events.result;\n if (deferClose) {\n await delay(50);\n }\n close(events.exitCode);\n }\n catch (err) {\n close(events.exitCode, err);\n }\n }\n }\n}\n", "import { GitError } from '../errors/git-error';\nimport { GitExecutorResult, SimpleGitPluginConfig } from '../types';\nimport { SimpleGitPlugin } from './simple-git-plugin';\n\ntype TaskResult = Omit<GitExecutorResult, 'rejection'>;\n\nfunction isTaskError (result: TaskResult) {\n return !!(result.exitCode && result.stdErr.length);\n}\n\nfunction getErrorMessage (result: TaskResult) {\n return Buffer.concat([...result.stdOut, ...result.stdErr]);\n}\n\nexport function errorDetectionHandler (overwrite = false, isError = isTaskError, errorMessage: (result: TaskResult) => Buffer | Error = getErrorMessage) {\n\n return (error: Buffer | Error | undefined, result: TaskResult) => {\n if ((!overwrite && error) || !isError(result)) {\n return error;\n }\n\n return errorMessage(result);\n };\n}\n\nexport function errorDetectionPlugin(config: SimpleGitPluginConfig['errors']): SimpleGitPlugin<'task.error'> {\n\n return {\n type: 'task.error',\n action(data, context) {\n const error = config(data.error, {\n stdErr: context.stdErr,\n stdOut: context.stdOut,\n exitCode: context.exitCode\n });\n\n if (Buffer.isBuffer(error)) {\n return {error: new GitError(undefined, error.toString('utf-8'))};\n }\n\n return {\n error\n };\n },\n };\n\n}\n", "import { SimpleGitPlugin, SimpleGitPluginType, SimpleGitPluginTypes } from './simple-git-plugin';\nimport { append, asArray } from '../utils';\n\nexport class PluginStore {\n\n private plugins: Set<SimpleGitPlugin<SimpleGitPluginType>> = new Set();\n\n public add<T extends SimpleGitPluginType>(plugin: void | SimpleGitPlugin<T> | SimpleGitPlugin<T>[]) {\n const plugins: SimpleGitPlugin<T>[] = [];\n\n asArray(plugin).forEach(plugin => plugin && this.plugins.add(append(plugins, plugin)));\n\n return () => {\n plugins.forEach(plugin => this.plugins.delete(plugin));\n };\n }\n\n public exec<T extends SimpleGitPluginType>(type: T, data: SimpleGitPluginTypes[T]['data'], context: SimpleGitPluginTypes[T]['context']): typeof data {\n let output = data;\n const contextual = Object.freeze(Object.create(context));\n\n for (const plugin of this.plugins) {\n if (plugin.type === type) {\n output = plugin.action(output, contextual);\n }\n }\n\n return output;\n }\n\n}\n", "import { SimpleGitOptions } from '../types';\nimport { asNumber, including } from '../utils';\n\nimport { SimpleGitPlugin } from './simple-git-plugin';\n\nexport function progressMonitorPlugin(progress: Exclude<SimpleGitOptions['progress'], void>) {\n const progressCommand = '--progress';\n const progressMethods = ['checkout', 'clone', 'fetch', 'pull', 'push'];\n\n const onProgress: SimpleGitPlugin<'spawn.after'> = {\n type: 'spawn.after',\n action(_data, context) {\n if (!context.commands.includes(progressCommand)) {\n return;\n }\n\n context.spawned.stderr?.on('data', (chunk: Buffer) => {\n const message = /^([\\s\\S]+?):\\s*(\\d+)% \\((\\d+)\\/(\\d+)\\)/.exec(chunk.toString('utf8'));\n if (!message) {\n return;\n }\n\n progress({\n method: context.method,\n stage: progressEventStage(message[1]),\n progress: asNumber(message[2]),\n processed: asNumber(message[3]),\n total: asNumber(message[4]),\n });\n });\n }\n };\n\n const onArgs: SimpleGitPlugin<'spawn.args'> = {\n type: 'spawn.args',\n action(args, context) {\n if (!progressMethods.includes(context.method)) {\n return args;\n }\n\n return including(args, progressCommand);\n }\n }\n\n return [onArgs, onProgress];\n}\n\nfunction progressEventStage (input: string) {\n return String(input.toLowerCase().split(' ', 1)) || 'unknown';\n}\n", "import { SpawnOptions } from 'child_process';\nimport { pick } from '../utils';\nimport { SimpleGitPlugin } from './simple-git-plugin';\n\nexport function spawnOptionsPlugin(spawnOptions: Partial<SpawnOptions>): SimpleGitPlugin<'spawn.options'> {\n const options = pick(spawnOptions, ['uid', 'gid']);\n\n return {\n type: 'spawn.options',\n action(data) {\n return {...options, ...data};\n },\n };\n}\n", "import { SimpleGitOptions } from '../types';\n\nimport { SimpleGitPlugin } from './simple-git-plugin';\nimport { GitPluginError } from '../errors/git-plugin-error';\n\nexport function timeoutPlugin({block}: Exclude<SimpleGitOptions['timeout'], undefined>): SimpleGitPlugin<'spawn.after'> | void {\n\n if (block > 0) {\n return {\n type: 'spawn.after',\n action(_data, context) {\n let timeout: NodeJS.Timeout;\n\n function wait() {\n timeout && clearTimeout(timeout);\n timeout = setTimeout(kill, block);\n }\n\n function stop() {\n context.spawned.stdout?.off('data', wait);\n context.spawned.stderr?.off('data', wait);\n context.spawned.off('exit', stop);\n context.spawned.off('close', stop);\n }\n\n function kill() {\n stop()\n context.kill(\n new GitPluginError(undefined, 'timeout', `block timeout reached`)\n );\n }\n\n context.spawned.stdout?.on('data', wait);\n context.spawned.stderr?.on('data', wait);\n context.spawned.on('exit', stop);\n context.spawned.on('close', stop);\n\n wait();\n }\n }\n }\n\n}\n", "import { SimpleGitFactory } from '../../typings';\n\nimport * as api from './api';\nimport {\n commandConfigPrefixingPlugin,\n completionDetectionPlugin,\n errorDetectionHandler,\n errorDetectionPlugin,\n PluginStore,\n progressMonitorPlugin,\n spawnOptionsPlugin,\n timeoutPlugin\n} from './plugins';\nimport { createInstanceConfig, folderExists } from './utils';\nimport { SimpleGitOptions } from './types';\n\nconst Git = require('../git');\n\n/**\n * Adds the necessary properties to the supplied object to enable it for use as\n * the default export of a module.\n *\n * Eg: `module.exports = esModuleFactory({ something () {} })`\n */\nexport function esModuleFactory<T>(defaultExport: T): T & { __esModule: true, default: T } {\n return Object.defineProperties(defaultExport, {\n __esModule: {value: true},\n default: {value: defaultExport},\n });\n}\n\nexport function gitExportFactory<T = {}>(factory: SimpleGitFactory, extra: T) {\n return Object.assign(function (...args: Parameters<SimpleGitFactory>) {\n return factory.apply(null, args);\n },\n api,\n extra || {},\n );\n}\n\nexport function gitInstanceFactory(baseDir?: string | Partial<SimpleGitOptions>, options?: Partial<SimpleGitOptions>) {\n const plugins = new PluginStore();\n const config = createInstanceConfig(\n baseDir && (typeof baseDir === 'string' ? {baseDir} : baseDir) || {},\n options\n );\n\n if (!folderExists(config.baseDir)) {\n throw new api.GitConstructError(config, `Cannot use simple-git on a directory that does not exist`);\n }\n\n if (Array.isArray(config.config)) {\n plugins.add(commandConfigPrefixingPlugin(config.config));\n }\n\n plugins.add(completionDetectionPlugin(config.completion));\n config.progress && plugins.add(progressMonitorPlugin(config.progress));\n config.timeout && plugins.add(timeoutPlugin(config.timeout));\n config.spawnOptions && plugins.add(spawnOptionsPlugin(config.spawnOptions));\n\n plugins.add(errorDetectionPlugin(errorDetectionHandler(true)));\n config.errors && plugins.add(errorDetectionPlugin(config.errors));\n\n return new Git(config, plugins);\n}\n", "import { SimpleGit, SimpleGitOptions } from '../../../typings';\n\nimport { GitResponseError } from '../errors/git-response-error';\nimport { gitInstanceFactory } from '../git-factory';\nimport { SimpleGitTaskCallback } from '../types';\n\nconst functionNamesBuilderApi = [\n 'customBinary', 'env', 'outputHandler', 'silent',\n];\n\nconst functionNamesPromiseApi = [\n 'add',\n 'addAnnotatedTag',\n 'addConfig',\n 'addRemote',\n 'addTag',\n 'applyPatch',\n 'binaryCatFile',\n 'branch',\n 'branchLocal',\n 'catFile',\n 'checkIgnore',\n 'checkIsRepo',\n 'checkout',\n 'checkoutBranch',\n 'checkoutLatestTag',\n 'checkoutLocalBranch',\n 'clean',\n 'clone',\n 'commit',\n 'cwd',\n 'deleteLocalBranch',\n 'deleteLocalBranches',\n 'diff',\n 'diffSummary',\n 'exec',\n 'fetch',\n 'getRemotes',\n 'init',\n 'listConfig',\n 'listRemote',\n 'log',\n 'merge',\n 'mergeFromTo',\n 'mirror',\n 'mv',\n 'pull',\n 'push',\n 'pushTags',\n 'raw',\n 'rebase',\n 'remote',\n 'removeRemote',\n 'reset',\n 'revert',\n 'revparse',\n 'rm',\n 'rmKeepLocal',\n 'show',\n 'stash',\n 'stashList',\n 'status',\n 'subModule',\n 'submoduleAdd',\n 'submoduleInit',\n 'submoduleUpdate',\n 'tag',\n 'tags',\n 'updateServerInfo'\n];\n\nexport function gitP(...args: [] | [string] | [Partial<SimpleGitOptions>] | [string, Partial<SimpleGitOptions>]): SimpleGit {\n\n let git: any;\n\n let chain = Promise.resolve();\n\n try {\n git = gitInstanceFactory(...args);\n } catch (e) {\n chain = Promise.reject(e);\n }\n\n function builderReturn() {\n return promiseApi;\n }\n\n function chainReturn() {\n return chain;\n }\n\n const promiseApi = [...functionNamesBuilderApi, ...functionNamesPromiseApi].reduce((api: any, name: string) => {\n const isAsync = functionNamesPromiseApi.includes(name);\n\n const valid = isAsync ? asyncWrapper(name, git) : syncWrapper(name, git, api);\n const alternative = isAsync ? chainReturn : builderReturn;\n\n Object.defineProperty(api, name, {\n enumerable: false,\n configurable: false,\n value: git ? valid : alternative,\n });\n\n return api;\n }, {});\n\n return promiseApi as SimpleGit;\n\n function asyncWrapper(fn: string, git: any): (...args: any[]) => Promise<any> {\n return function (...args: any[]) {\n if (typeof args[args.length] === 'function') {\n throw new TypeError(\n 'Promise interface requires that handlers are not supplied inline, ' +\n 'trailing function not allowed in call to ' + fn);\n }\n\n return chain.then(function () {\n return new Promise(function (resolve, reject) {\n const callback: SimpleGitTaskCallback = (err: Error | null, result?: any) => {\n if (err) {\n return reject(toError(err));\n }\n\n resolve(result);\n };\n args.push(callback);\n\n git[fn].apply(git, args);\n });\n });\n };\n }\n\n function syncWrapper(fn: string, git: any, api: SimpleGit) {\n return (...args: any[]) => {\n git[fn](...args);\n\n return api;\n };\n }\n}\n\nfunction toError(error: Error | string | any): Error {\n\n if (error instanceof Error) {\n return error;\n }\n\n if (typeof error === 'string') {\n return new Error(error);\n }\n\n return new GitResponseError(error);\n}\n", "import { gitInstanceFactory } from './lib/git-factory';\n\nexport {gitP} from './lib/runners/promise-wrapped';\nexport * from './lib/api';\n\nexport default gitInstanceFactory;\n"],
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IA2BO;AA3BP;AAAA;AA2BO,6BAAuB,MAAM;AAAA,MAEjC,YACU,MACP,SACD;AACC,cAAM;AAHC;AAIP,eAAO,eAAe,MAAM,WAAW;AAAA;AAAA;AAAA;AAAA;;;AClC7C,IAsBO;AAtBP;AAAA;AAAA;AAsBO,qCAAwC,SAAS;AAAA,MAErD,YAImB,KAChB,SACD;AACC,cAAM,QAAW,WAAW,OAAO;AAHnB;AAAA;AAAA;AAAA;AAAA;;;AC5BtB,IAUO;AAVP;AAAA;AAAA;AAUO,2CAAqC,SAAS;AAAA,MAElD,YACG,SACD;AACC,cAAM,QAAW;AAAA;AAAA;AAAA;AAAA;;;ACfvB;AAYO,oBAAyC,QAAoB;AACjE,SAAO,OAAO,WAAW,aAAa,SAAS;AAAA;AAO3C,wBAA4C,QAA8B;AAC9E,SAAQ,OAAO,WAAW,cAAc,WAAW;AAAA;AAG/C,iBAAiB,OAAe,MAAgC;AACpE,QAAM,QAAQ,MAAM,QAAQ;AAC5B,MAAI,SAAS,GAAG;AACb,WAAO,CAAC,OAAO;AAAA;AAG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leted file mode 100644
index aead43d..0000000
--- a/node_modules/simple-git/esm/package.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "type": "module"
-} \ No newline at end of file
diff --git a/node_modules/simple-git/package.json b/node_modules/simple-git/package.json
deleted file mode 100644
index f916ac5..0000000
--- a/node_modules/simple-git/package.json
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- "name": "simple-git",
- "description": "Simple GIT interface for node.js",
- "private": false,
- "version": "3.1.1",
- "author": "Steve King <steve@mydev.co>",
- "contributors": [
- {
- "name": "Steve King",
- "email": "steve@mydev.co"
- }
- ],
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/steveukx/"
- },
- "dependencies": {
- "@kwsites/file-exists": "^1.1.1",
- "@kwsites/promise-deferred": "^1.1.1",
- "debug": "^4.3.3"
- },
- "devDependencies": {
- "@simple-git/babel-config": "^1.0.0",
- "@kwsites/promise-result": "^1.1.0",
- "@types/debug": "^4.1.5",
- "@types/jest": "^27.0.3",
- "@types/node": "^14.14.10",
- "esbuild": "^0.14.10",
- "esbuild-node-externals": "^1.4.1",
- "jest": "^27.4.5",
- "ts-node": "^9.0.0",
- "typescript": "^4.1.2"
- },
- "keywords": [
- "git",
- "source control",
- "vcs"
- ],
- "license": "MIT",
- "repository": {
- "type": "git",
- "url": "https://github.com/steveukx/git-js.git",
- "directory": "simple-git"
- },
- "main": "cjs/index.js",
- "module": "esm/index.js",
- "exports": {
- ".": {
- "import": "./esm/index.js",
- "require": "./cjs/index.js"
- },
- "./promise": {
- "require": "./promise.js"
- }
- },
- "types": "./typings/index.d.ts"
-} \ No newline at end of file
diff --git a/node_modules/simple-git/promise.d.ts b/node_modules/simple-git/promise.d.ts
deleted file mode 100644
index 7f70976..0000000
--- a/node_modules/simple-git/promise.d.ts
+++ /dev/null
@@ -1,73 +0,0 @@
-import * as errors from './typings/errors';
-import * as types from './typings/types';
-import * as resp from './typings/response';
-import * as simpleGit from './typings/simple-git';
-
-/**
- * @deprecated
- *
- * simple-git has supported promises / async await since version 2.6.0.
- * Importing from 'simple-git/promise' has been deprecated and will be
- * removed by July 2022.
- *
- * To upgrade, change all 'simple-git/promise' imports to just 'simple-git'
- */
-declare const simplegit: simplegit.SimpleGitExport;
-
-declare namespace simplegit {
-
- type SimpleGitExport = ((basePath?: string) => simplegit.SimpleGit) & {
- CleanOptions: typeof types.CleanOptions
- };
-
- /**
- * @deprecated
- *
- * simple-git has supported promises / async await since version 2.6.0.
- * Importing from 'simple-git/promise' has been deprecated and will be
- * removed by July 2022.
- *
- * To upgrade, change all 'simple-git/promise' imports to just 'simple-git'
- */
- type SimpleGit = simpleGit.SimpleGit;
-
- // errors
- type GitError = errors.GitError;
- type GitConstructError = errors.GitConstructError;
- type GitResponseError<T> = errors.GitResponseError<T>;
- type TaskConfigurationError = errors.TaskConfigurationError;
-
- // responses
- type BranchSummary = resp.BranchSummary
- type CleanSummary = resp.CleanSummary;
- type CleanMode = types.CleanMode;
- type DiffResult = resp.DiffResult;
- type FetchResult = resp.FetchResult;
- type CommitResult = resp.CommitResult;
- type MergeResult = resp.MergeResult;
- type PullResult = resp.PullResult;
- type StatusResult = resp.StatusResult;
- type TagResult = resp.TagResult;
-
- // types
- type outputHandler = types.outputHandler
- type LogOptions<T = types.DefaultLogFields> = types.LogOptions<T>;
- type Options = types.Options;
-
- // deprecated
- /** @deprecated use MergeResult */
- type MergeSummary = resp.MergeSummary;
- /** @deprecated use CommitResult */
- type CommitSummary = resp.CommitResult;
-}
-
-/**
- * @deprecated
- *
- * simple-git has supported promises / async await since version 2.6.0.
- * Importing from 'simple-git/promise' has been deprecated and will be
- * removed by July 2022.
- *
- * To upgrade, change all 'simple-git/promise' imports to just 'simple-git'
- */
-export = simplegit;
diff --git a/node_modules/simple-git/promise.js b/node_modules/simple-git/promise.js
deleted file mode 100644
index bae68f9..0000000
--- a/node_modules/simple-git/promise.js
+++ /dev/null
@@ -1,16 +0,0 @@
-// TODO: deprecation warning
-console.warn(`=============================================
-simple-git has supported promises / async await since version 2.6.0.
- Importing from 'simple-git/promise' has been deprecated and will be
- removed by July 2022.
-
-To upgrade, change all 'simple-git/promise' imports to just 'simple-git'
-=============================================`);
-
-const simpleGit = require('.');
-
-module.exports = Object.assign(
- function () { return simpleGit.gitP.apply(null, arguments) },
- simpleGit,
- { default: simpleGit.gitP },
-);
diff --git a/node_modules/simple-git/readme.md b/node_modules/simple-git/readme.md
deleted file mode 100644
index fa03eb0..0000000
--- a/node_modules/simple-git/readme.md
+++ /dev/null
@@ -1,802 +0,0 @@
-# Simple Git
-[![NPM version](https://img.shields.io/npm/v/simple-git.svg)](https://www.npmjs.com/package/simple-git)
-
-A lightweight interface for running `git` commands in any [node.js](https://nodejs.org) application.
-
-# Version 3 - Out Now
-
-From v3 of `simple-git` you can now import as an ES module, Common JS module or as TypeScript with bundled type
-definitions. Upgrading from v2 will be seamless for any application not relying on APIs that were marked as deprecated
-in v2 (deprecation notices were logged to `stdout` as `console.warn` in v2).
-
-# Installation
-
-Use your favourite package manager:
-
-- [npm](https://npmjs.org): `npm install simple-git`
-- [yarn](https://yarnpkg.com/): `yarn add simple-git`
-
-# System Dependencies
-
-Requires [git](https://git-scm.com/downloads) to be installed and that it can be called using the command `git`.
-
-# Usage
-
-Include into your JavaScript app using common js:
-
-```javascript
-// require the library, main export is a function
-const simpleGit = require('simple-git');
-simpleGit().clean(simpleGit.CleanOptions.FORCE);
-
-// or use named properties
-const {default: simpleGit, CleanOptions} = require('simple-git');
-simpleGit().clean(CleanOptions.FORCE);
-```
-
-Include into your JavaScript app as an ES Module:
-
-```javascript
-import simpleGit, { CleanOptions } from 'simple-git';
-
-simpleGit().clean(CleanOptions.FORCE);
-```
-
-Include in a TypeScript app using the bundled type definitions:
-
-```typescript
-import simpleGit, { SimpleGit, CleanOptions } from 'simple-git';
-
-const git: SimpleGit = simpleGit().clean(CleanOptions.FORCE);
-```
-
-## Configuration
-
-Configure each `simple-git` instance with a properties object passed to the main `simpleGit` function:
-
-```typescript
-import simpleGit, { SimpleGit, SimpleGitOptions } from 'simple-git';
-
-const options: Partial<SimpleGitOptions> = {
- baseDir: process.cwd(),
- binary: 'git',
- maxConcurrentProcesses: 6,
-};
-
-// when setting all options in a single object
-const git: SimpleGit = simpleGit(options);
-
-// or split out the baseDir, supported for backward compatibility
-const git: SimpleGit = simpleGit('/some/path', { binary: 'git' });
-```
-
-The first argument can be either a string (representing the working directory for `git` commands to run in),
-`SimpleGitOptions` object or `undefined`, the second parameter is an optional `SimpleGitOptions` object.
-
-All configuration properties are optional, the default values are shown in the example above.
-
-## Per-command Configuration
-
-To prefix the commands run by `simple-git` with custom configuration not saved in the git config (ie: using the
-`-c` command) supply a `config` option to the instance builder:
-
-```typescript
-// configure the instance with a custom configuration property
-const git: SimpleGit = simpleGit('/some/path', { config: ['http.proxy=someproxy'] });
-
-// any command executed will be prefixed with this config
-// runs: git -c http.proxy=someproxy pull
-await git.pull();
-```
-
-## Configuring Plugins
-
-- [Completion Detection](https://github.com/steveukx/git-js/blob/main/docs/PLUGIN-COMPLETION-DETECTION.md)
- Customise how `simple-git` detects the end of a `git` process.
-
-- [Error Detection](https://github.com/steveukx/git-js/blob/main/docs/PLUGIN-ERRORS.md)
- Customise the detection of errors from the underlying `git` process.
-
-- [Progress Events](https://github.com/steveukx/git-js/blob/main/docs/PLUGIN-PROGRESS-EVENTS.md)
- Receive progress events as `git` works through long-running processes.
-
-- [Spawned Process Ownership](https://github.com/steveukx/git-js/blob/main/docs/PLUGIN-SPAWN-OPTIONS.md)
- Configure the system `uid` / `gid` to use for spawned `git` processes.
-
-- [Timeout](https://github.com/steveukx/git-js/blob/main/docs/PLUGIN-TIMEOUT.md)
- Automatically kill the wrapped `git` process after a rolling timeout.
-
-## Using Task Promises
-
-Each task in the API returns the `simpleGit` instance for chaining together multiple tasks, and each
-step in the chain is also a `Promise` that can be `await` ed in an `async` function or returned in a
-`Promise` chain.
-
-```javascript
-const git = simpleGit();
-
-// chain together tasks to await final result
-await git.init().addRemote('origin', '...remote.git');
-
-// or await each step individually
-await git.init();
-await git.addRemote('origin', '...remote.git')
-```
-
-### Catching errors in async code
-
-To catch errors in async code, either wrap the whole chain in a try/catch:
-
-```javascript
-const git = simpleGit()
-try {
- await git.init();
- await git.addRemote(name, repoUrl);
-}
-catch (e) { /* handle all errors here */ }
-```
-
-or catch individual steps to permit the main chain to carry on executing rather than
-jumping to the final `catch` on the first error:
-
-```javascript
-const git = simpleGit()
-try {
- await git.init().catch(ignoreError);
- await git.addRemote(name, repoUrl);
-}
-catch (e) { /* handle all errors here */ }
-
-function ignoreError () {}
-```
-
-## Using Task Callbacks
-
-In addition to returning a promise, each method can also be called with a trailing callback argument
-to handle the result of the task.
-
-```javascript
-const git = simpleGit();
-git.init(onInit).addRemote('origin', 'git@github.com:steveukx/git-js.git', onRemoteAdd);
-
-function onInit (err, initResult) { }
-function onRemoteAdd (err, addRemoteResult) { }
-```
-
-If any of the steps in the chain result in an error, all pending steps will be cancelled, see the
-[parallel tasks]((#concurrent--parallel-requests)) section for more information on how to run tasks in parallel rather than in series .
-
-## Task Responses
-
-Whether using a trailing callback or a Promise, tasks either return the raw `string` or `Buffer` response from the
-`git` binary, or where possible a parsed interpretation of the response.
-
-For type details of the response for each of the tasks, please see the [TypeScript definitions](https://github.com/steveukx/git-js/blob/main/simple-git/typings/simple-git.d.ts).
-
-# API
-
-| API | What it does |
-|-----|--------------|
-| `.add([fileA, ...], handlerFn)` | adds one or more files to be under source control |
-| `.addAnnotatedTag(tagName, tagMessage, handlerFn)` | adds an annotated tag to the head of the current branch |
-| `.addTag(name, handlerFn)` | adds a lightweight tag to the head of the current branch |
-| `.catFile(options[, handlerFn])` | generate `cat-file` detail, `options` should be an array of strings as supported arguments to the [cat-file](https://git-scm.com/docs/git-cat-file) command |
-| `.checkIgnore([filepath, ...], handlerFn)` | checks if filepath excluded by .gitignore rules |
-| `.clearQueue()` | immediately clears the queue of pending tasks (note: any command currently in progress will still call its completion callback) |
-| `.commit(message, handlerFn)` | commits changes in the current working directory with the supplied message where the message can be either a single string or array of strings to be passed as separate arguments (the `git` command line interface converts these to be separated by double line breaks) |
-| `.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 |
-| `.diff(options, handlerFn)` | get the diff of the current repo compared to the last commit with a set of options supplied as a string |
-| `.diff(handlerFn)` | get the diff for all file in the current repo compared to the last commit |
-| `.diffSummary(handlerFn)` | gets a summary of the diff for files in the repo, uses the `git diff --stat` format to calculate changes. Handler is called with a nullable error object and an instance of the [DiffSummary](https://github.com/steveukx/git-js/blob/main/simple-git/src/lib/responses/DiffSummary.js) |
-| `.diffSummary(options, handlerFn)` | includes options in the call to `diff --stat options` and returns a [DiffSummary](https://github.com/steveukx/git-js/blob/main/simple-git/src/lib/responses/DiffSummary.js) |
-| `.env(name, value)` | Set environment variables to be passed to the spawned child processes, [see usage in detail below](#environment-variables). |
-| `.exec(handlerFn)` | calls a simple function in the current step |
-| `.fetch([options, ] handlerFn)` | update the local working copy database with changes from the default remote repo and branch, when supplied the options argument can be a standard [options object](#how-to-specify-options) either an array of string commands as supported by the [git fetch](https://git-scm.com/docs/git-fetch). |
-| `.fetch(remote, branch, handlerFn)` | update the local working copy database with changes from a remote repo |
-| `.fetch(handlerFn)` | update the local working copy database with changes from the default remote repo and branch |
-| `.outputHandler(handlerFn)` | attaches a handler that will be called with the name of the command being run and the `stdout` and `stderr` [readable streams](https://nodejs.org/api/stream.html#stream_class_stream_readable) created by the [child process](https://nodejs.org/api/child_process.html#child_process_class_childprocess) running that command |
-| `.raw(args[, handlerFn])` | Execute any arbitrary array of commands supported by the underlying git binary. When the git process returns a non-zero signal on exit and it printed something to `stderr`, the command will be treated as an error, otherwise treated as a success. |
-| `.rebase([options,] handlerFn)` | Rebases the repo, `options` should be supplied as an array of string parameters supported by the [git rebase](https://git-scm.com/docs/git-rebase) command, or an object of options (see details below for option formats). |
-| `.revert(commit [, options [, handlerFn]])` | reverts one or more commits in the working copy. The commit can be any regular commit-ish value (hash, name or offset such as `HEAD~2`) or a range of commits (eg: `master~5..master~2`). When supplied the [options](#how-to-specify-options) argument contain any options accepted by [git-revert](https://git-scm.com/docs/git-revert). |
-| `.rm([fileA, ...], handlerFn)` | removes any number of files from source control |
-| `.rmKeepLocal([fileA, ...], handlerFn)` | removes files from source control but leaves them on disk |
-| `.stash([options, ][ handlerFn])` | Stash the working directory, optional first argument can be an array of string arguments or [options](#how-to-specify-options) object to pass to the [git stash](https://git-scm.com/docs/git-stash) command. |
-| `.stashList([options, ][handlerFn])` | Retrieves the stash list, optional first argument can be an object specifying `options.splitter` to override the default value of `;;;;`, alternatively options can be a set of arguments as supported by the `git stash list` command. |
-| `.tag(args[], handlerFn)` | Runs any supported [git tag](https://git-scm.com/docs/git-tag) commands with arguments passed as an array of strings . |
-| `.tags([options, ] handlerFn)` | list all tags, use the optional [options](#how-to-specify-options) object to set any options allows by the [git tag](https://git-scm.com/docs/git-tag) command. Tags will be sorted by semantic version number by default, for git versions 2.7 and above, use the `--sort` option to set a custom sort. |
-| `.show([options], handlerFn)` | Show various types of objects, for example the file content at a certain commit. `options` is the single value string or array of string commands you want to run |
-
-## git apply
-
-- `.applyPatch(patch, [options])` applies a single string patch (as generated by `git diff`), optionally configured with the supplied [options](#how-to-specify-options) to set any arguments supported by the [apply](https://git-scm.com/docs/git-apply) command. Returns the unmodified string response from `stdout` of the `git` binary.
-- `.applyPatch(patches, [options])` applies an array of string patches (as generated by `git diff`), optionally configured with the supplied [options](#how-to-specify-options) to set any arguments supported by the [apply](https://git-scm.com/docs/git-apply) command. Returns the unmodified string response from `stdout` of the `git` binary.
-
-## git branch
-
-- `.branch([options])` uses the supplied [options](#how-to-specify-options) to run any arguments supported by the [branch](https://git-scm.com/docs/git-branch) command. Either returns a [BranchSummaryResult](https://github.com/steveukx/git-js/blob/main/simple-git/src/lib/responses/BranchSummary.ts) instance when listing branches, or a [BranchSingleDeleteResult](https://github.com/steveukx/git-js/blob/main/simple-git/typings/response.d.ts) type object when the options included `-d`, `-D` or `--delete` which cause it to delete a named branch rather than list existing branches.
-- `.branchLocal()` gets a list of local branches as a [BranchSummaryResult](https://github.com/steveukx/git-js/blob/main/simple-git/src/lib/responses/BranchSummary.ts) instance
-- `.deleteLocalBranch(branchName)` deletes a local branch - treats a failed attempt as an error
-- `.deleteLocalBranch(branchName, forceDelete)` deletes a local branch, optionally explicitly setting forceDelete to true - treats a failed attempt as an error
-- `.deleteLocalBranches(branchNames)` deletes multiple local branches
-- `.deleteLocalBranches(branchNames, forceDelete)` deletes multiple local branches, optionally explicitly setting forceDelete to true
-
-## git clean
-
-- `.clean(mode)` clean the working tree. Mode should be "n" - dry run or "f" - force
-- `.clean(cleanSwitches [,options])` set `cleanSwitches` to a string containing any number of the supported single character options, optionally with a standard [options](#how-to-specify-options) object
-
-## git checkout
-
-- `.checkout(checkoutWhat [, options])` - checks out the supplied tag, revision or branch when supplied as a string,
- additional arguments supported by [git checkout](https://git-scm.com/docs/git-checkout) can be supplied as an
- [options](#how-to-specify-options) object/array.
-
-- `.checkout(options)` - uses the checks out the supplied [options](#how-to-specify-options) object/array to check out.
-
-- `.checkoutBranch(branchName, startPoint)` - checks out a new branch from the supplied start point.
-
-- `.checkoutLocalBranch(branchName)` - checks out a new local branch
-
-## git clone
-
-- `.clone(repoPath, [localPath, [options]])` clone a remote repo at `repoPath` to a local directory at `localPath`, optionally with a standard [options](#how-to-specify-options) object of additional arguments to include between `git clone` and the trailing `repo local` arguments
-- `.clone(repoPath, [options])` clone a remote repo at `repoPath` to a directory in the current working directory with the same name as the repo
-
-- `mirror(repoPath, [localPath, [options]])` behaves the same as the `.clone` interface with the [`--mirror` flag](https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---mirror) enabled.
-
-
-## git config
-
-- `.addConfig(key, value, append = false, scope = 'local')` add a local configuration property, when `append` is set to
- `true` the configuration setting is appended to rather than overwritten in the local config. Use the `scope` argument
- to pick where to save the new configuration setting (use the exported `GitConfigScope` enum, or equivalent string
- values - `worktree | local | global | system`).
-
-- `.getConfig(key)` get the value(s) for a named key as a [ConfigGetResult](https://github.com/steveukx/git-js/blob/main/simple-git/typings/response.d.ts)
-- `.getConfig(key, scope)` get the value(s) for a named key as a [ConfigGetResult](https://github.com/steveukx/git-js/blob/main/simple-git/typings/response.d.ts) but limit the
- scope of the properties searched to a single specified scope (use the exported `GitConfigScope` enum, or equivalent
- string values - `worktree | local | global | system`)
-
-- `.listConfig()` reads the current configuration and returns a [ConfigListSummary](https://github.com/steveukx/git-js/blob/main/simple-git/src/lib/responses/ConfigList.ts)
-- `.listConfig(scope: GitConfigScope)` as with `listConfig` but returns only those items in a specified scope (note that configuration values are overlaid on top of each other to build the config `git` will actually use - to resolve the configuration you are using use `(await listConfig()).all` without the scope argument)
-
-## git grep [examples](https://github.com/steveukx/git-js/blob/main/examples/git-grep.md)
-
-- `.grep(searchTerm)` searches for a single search term across all files in the working tree, optionally passing a standard [options](#how-to-specify-options) object of additional arguments
-- `.grep(grepQueryBuilder(...))` use the `grepQueryBuilder` to create a complex query to search for, optionally passing a standard [options](#how-to-specify-options) object of additional arguments
-
-## git hash-object
-
-- `.hashObject(filePath, write = false)` computes the object ID value for the contents of the named file (which can be
- outside of the work tree), optionally writing the resulting value to the object database.
-
-## git init
-
-- `.init(bare [, options])` initialize a repository using the boolean `bare` parameter to intialise a bare repository.
- Any number of other arguments supported by [git init](https://git-scm.com/docs/git-init) can be supplied as an
- [options](#how-to-specify-options) object/array.
-
-- `.init([options])` initialize a repository using any arguments supported by
- [git init](https://git-scm.com/docs/git-init) supplied as an [options](#how-to-specify-options) object/array.
-
-## git log
-
-- `.log([options])` list commits between `options.from` and `options.to` tags or branch (if not specified will
- show all history). Use the `options` object to set any [options](#how-to-specify-options) supported by the
- [git log](https://git-scm.com/docs/git-log) command or any of the following:
-
- - `options.file` - the path to a file in your repository to only consider this path.
- - `options.format` - custom log format object, keys are the property names used on the returned object, values are the format string from [pretty formats](https://git-scm.com/docs/pretty-formats#Documentation/pretty-formats.txt)
- - `options.from` - when supplied along with `options.to` sets the range of commits to log
- - `options.mailMap` - defaults to true, enables the use of [mail map](https://git-scm.com/docs/gitmailmap) in returned values for email and name from the default format
- - `options.maxCount` - equivalent to setting the `--max-count` option
- - `options.multiLine` - enables multiline body values in the default format (disabled by default)
- - `options.splitter` - the character sequence to use as a delimiter between fields in the log, should be a value that doesn't appear in any log message (defaults to ` ò `)
- - `options.strictDate` - switches the authored date value from an ISO 8601-like format to be strict ISO 8601 format
- - `options.symmetric` - defaults to true, enables [symmetric revision range](https://git-scm.com/docs/gitrevisions#_dotted_range_notations) rather than a two-dot range
- - `options.to` - when supplied along with `options.from` sets the range of commits to log
-
-## git merge
-
-- `.merge(options)` runs a merge using any configuration [options](#how-to-specify-options) supported
- by [git merge](https://git-scm.com/docs/git-merge).
- Conflicts during the merge result in an error response, the response is an instance of
- [MergeSummary](https://github.com/steveukx/git-js/blob/main/simple-git/src/lib/responses/MergeSummary.ts) whether it was an error or success.
- When successful, the MergeSummary has all detail from a the [PullSummary](https://github.com/steveukx/git-js/blob/main/simple-git/src/lib/responses/PullSummary.ts)
- along with summary detail for the merge.
- When the merge failed, the MergeSummary contains summary detail for why the merge failed and which files
- prevented the merge.
-
-- `.mergeFromTo(remote, branch [, options])` - merge from the specified branch into the currently checked out branch,
- similar to `.merge` but with the `remote` and `branch` supplied as strings separately to any additional
- [options](#how-to-specify-options).
-
-## git mv
-
-- `.mv(from, to)` rename or move a single file at `from` to `to`
-
-- `.mv(from, to)` move all files in the `from` array to the `to` directory
-
-## git pull
-
-- `.pull([options])` pulls all updates from the default tracked remote, any arguments supported by
- [git pull](https://git-scm.com/docs/git-pull) can be supplied as an [options](#how-to-specify-options) object/array.
-
-- `.pull(remote, branch[, options])` pulls all updates from the specified remote branch (eg 'origin'/'master') along
- with any custom [options](#how-to-specify-options) object/array
-
-## git push
-
-- `.push([options])` pushes to a named remote/branch using any supported [options](#how-to-specify-options)
- from the [git push](https://git-scm.com/docs/git-push) command. Note that `simple-git` enforces the use of
- `--verbose --porcelain` options in order to parse the response. You don't need to supply these options.
-
-- `.push(remote, branch[, options])` pushes to a named remote/branch, supports additional
- [options](#how-to-specify-options) from the [git push](https://git-scm.com/docs/git-push) command.
-
-- `.pushTags(remote[, options])` pushes local tags to a named remote (equivalent to using `.push([remote, '--tags'])`)
-
-## git remote
-
-- `.addRemote(name, repo, [options])` adds a new named remote to be tracked as `name` at the path `repo`, optionally with any supported [options](#how-to-specify-options) for the [git add](https://git-scm.com/docs/git-remote#Documentation/git-remote.txt-emaddem) call.
-- `.getRemotes([verbose])` gets a list of the named remotes, supply the optional `verbose` option as `true` to include the URLs and purpose of each ref
-- `.listRemote([options])` lists remote repositories - there are so many optional arguments in the underlying `git ls-remote` call, just supply any you want to use as the optional [options](#how-to-specify-options) eg: `git.listRemote(['--heads', '--tags'], console.log)`
-- `.remote([options])` runs a `git remote` command with any number of [options](#how-to-specify-options)
-- `.removeRemote(name)` removes the named remote
-
-## git reset
-
-- `.reset(resetMode, [resetOptions])` resets the repository, sets the reset mode to one of the supported types (use a constant from
- the exported `ResetMode` enum, or a string equivalent: `mixed`, `soft`, `hard`, `merge`, `keep`). Any number of other arguments
- supported by [git reset](https://git-scm.com/docs/git-reset) can be supplied as an [options](#how-to-specify-options) object/array.
-
-- `.reset(resetOptions)` resets the repository with the supplied [options](#how-to-specify-options)
-
-- `.reset()` resets the repository in `soft` mode.
-
-## git rev-parse / repo properties
-
-- `.revparse([options])` sends the supplied [options](#how-to-specify-options) to [git rev-parse](https://git-scm.com/docs/git-rev-parse) and returns the string response from `git`.
-
-- `.checkIsRepo()` gets whether the current working directory is a descendent of a git repository.
-- `.checkIsRepo('bare')` gets whether the current working directory is within a bare git repo (see either [git clone --bare](https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---bare) or [git init --bare](https://git-scm.com/docs/git-init#Documentation/git-init.txt---bare)).
-- `.checkIsRepo('root')` gets whether the current working directory is the root directory for a repo (sub-directories will return false).
-
-## git status
-
-- `.status([options])` gets the status of the current repo, resulting in a [StatusResult](https://github.com/steveukx/git-js/blob/main/simple-git/typings/response.d.ts). Additional arguments
- supported by [git status](https://git-scm.com/docs/git-status) can be supplied as an [options](#how-to-specify-options) object/array.
-
-## git submodule
-
-- `.subModule(options)` Run a `git submodule` command with on or more arguments passed in as an [options](#how-to-specify-options) array or object
-- `.submoduleAdd(repo, path)` Adds a new sub module
-- `.submoduleInit([options]` Initialises sub modules, the optional [options](#how-to-specify-options) argument can be used to pass extra options to the `git submodule init` command.
-- `.submoduleUpdate(subModuleName, [options])` Updates sub modules, can be called with a sub module name and [options](#how-to-specify-options), just the options or with no arguments
-
-## changing the working directory [examples](https://github.com/steveukx/git-js/blob/main/examples/git-change-working-directory.md)
-
-- `.cwd(workingDirectory)` Sets the working directory for all future commands - note, this will change the working for the root instance, any chain created from the root will also be changed.
-- `.cwd({ path, root = false })` Sets the working directory for all future commands either in the current chain of commands (where `root` is omitted or set to `false`) or in the main instance (where `root` is `true`).
-
-## How to Specify Options
-
-Where the task accepts custom options (eg: `pull` or `commit`), these can be supplied as an object, the keys of which
-will all be merged as trailing arguments in the command string, or as a simple array of strings.
-
-### Options as an Object
-
-When the value of the property in the options object is a `string`, that name value
-pair will be included in the command string as `name=value`. For example:
-
-```javascript
-// results in 'git pull origin master --no-rebase'
-git().pull('origin', 'master', {'--no-rebase': null})
-
-// results in 'git pull origin master --rebase=true'
-git().pull('origin', 'master', {'--rebase': 'true'})
-```
-
-### Options as an Array
-
-Options can also be supplied as an array of strings to be merged into the task's commands
-in the same way as when an object is used:
-
-```javascript
-// results in 'git pull origin master --no-rebase'
-git.pull('origin', 'master', ['--no-rebase'])
-```
-
-# Release History
-
-Major release 3.x changes the packaging of the library, making it consumable as a CommonJS module, ES module as well as
-with TypeScript (see [usage](#usage) above). The library is now published as a single file, so please ensure your
-application hasn't been making use of non-documented APIs by importing from a sub-directory path.
-
-See also:
-
-- [release notes v2](https://github.com/steveukx/git-js/blob/main/docs/RELEASE-NOTES-V2.md)
-
-# Concurrent / Parallel Requests
-
-When the methods of `simple-git` are chained together, they create an execution chain that will run in series, useful
-for when the tasks themselves are order-dependent, eg:
-
-```typescript
-simpleGit()
- .init()
- .addRemote('origin', 'https://some-repo.git')
- .fetch();
-```
-
-Each task requires that the one before it has been run successfully before it is called, any errors in a
-step of the chain should prevent later steps from being attempted.
-
-When the methods of `simple-git` are called on the root instance (ie: `git = simpleGit()`) rather than chained
-off another task, it starts a new chain and will not be affected failures in tasks already being run. Useful
-for when the tasks are independent of each other, eg:
-
-```typescript
-const git = simpleGit();
-const results = await Promise.all([
- git.raw('rev-parse', '--show-cdup').catch(swallow),
- git.raw('rev-parse', '--show-prefix').catch(swallow),
-]);
-function swallow (err) { return null }
-```
-
-Each `simple-git` instance limits the number of spawned child processes that can be run simultaneously and
-manages the queue of pending tasks for you. Configure this value by passing an options object to the
-`simpleGit` function, eg:
-
-```typescript
-const git = simpleGit({ maxConcurrentProcesses: 10 });
-```
-
-Treating tasks called on the root instance as the start of separate chains is a change to the behaviour of
- `simple-git` and was added in version `2.11.0`.
-
-# Complex Requests
-
-When no suitable wrapper exists in the interface for creating a request, run the command directly
-using `git.raw([...], handler)`. The array of commands are passed directly to the `git` binary:
-
-```javascript
-const path = '/path/to/repo';
-const commands = ['config', '--global', 'advice.pushNonFastForward', 'false'];
-
-// using an array of commands and node-style callback
-simpleGit(path).raw(commands, (err, result) => {
-
- // err is null unless this command failed
- // result is the raw output of this command
-
-});
-
-// using a var-args of strings and awaiting rather than using the callback
-const result = await simpleGit(path).raw(...commands);
-```
-
-# Authentication
-
-The easiest way to supply a username / password to the remote host is to include it in the URL, for example:
-
-```javascript
-const USER = 'something';
-const PASS = 'somewhere';
-const REPO = 'github.com/username/private-repo';
-
-const remote = `https://${ USER }:${ PASS }@${ REPO }`;
-
-simpleGit()
- .clone(remote)
- .then(() => console.log('finished'))
- .catch((err) => console.error('failed: ', err));
-
-```
-
-Be sure to not enable debug logging when using this mechanism for authentication
-to ensure passwords aren't logged to stdout.
-
-# Environment Variables
-
-Pass one or more environment variables to the child processes spawned by `simple-git` with the `.env` method which
-supports passing either an object of name=value pairs or setting a single variable at a time:
-
-```javascript
-const GIT_SSH_COMMAND = "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no";
-
-simpleGit()
- .env('GIT_SSH_COMMAND', GIT_SSH_COMMAND)
- .status((err, status) => { /* */ })
-
-simpleGit().env({...process.env, GIT_SSH_COMMAND})
- .status()
- .then(status => { })
- .catch(err => {});
-```
-
-Note - when passing environment variables into the child process, these will replace the standard `process.env`
-variables, the example above creates a new object based on `process.env` but with the `GIT_SSH_COMMAND` property added.
-
-# Exception Handling
-
-When the `git` process exits with a non-zero status (or in some cases like `merge` the git process exits with a
-successful zero code but there are conflicts in the merge) the task will reject with a `GitError` when there is no
-available parser to handle the error or a
-`GitResponseError` for when there is.
-
-See the `err` property of the callback:
-
-```javascript
-git.merge((err, mergeSummary) => {
- if (err.git) {
- mergeSummary = err.git; // the failed mergeSummary
- }
-})
-```
-
-Catch errors with try/catch in async code:
-
-```javascript
-try {
- const mergeSummary = await git.merge();
- console.log(`Merged ${ mergeSummary.merges.length } files`);
-}
-catch (err) {
- // err.message - the string summary of the error
- // err.stack - some stack trace detail
- // err.git - where a parser was able to run, this is the parsed content
-
- console.error(`Merge resulted in ${ err.git.conflicts.length } conflicts`);
-}
-```
-
-Catch errors with a `.catch` on the promise:
-
-```javascript
-const mergeSummary = await git.merge()
- .catch(err => {
- if (err.git) { return err.git; } // the unsuccessful mergeSummary
- throw err; // some other error, so throw
- });
-
-if (mergeSummary.failed) {
- console.error(`Merge resulted in ${ mergeSummary.conflicts.length } conflicts`);
-}
-```
-
-With typed errors available in TypeScript
-
-```typescript
-import simpleGit, { MergeSummary, GitResponseError } from 'simple-git';
-try {
- const mergeSummary = await simpleGit().merge();
- console.log(`Merged ${ mergeSummary.merges.length } files`);
-}
-catch (err) {
- // err.message - the string summary of the error
- // err.stack - some stack trace detail
- // err.git - where a parser was able to run, this is the parsed content
- const mergeSummary: MergeSummary = (err as GitResponseError<MergeSummary>).git;
- const conflicts = mergeSummary?.conflicts || [];
-
- console.error(`Merge resulted in ${ conflicts.length } conflicts`);
-}
-```
-
-# Troubleshooting / FAQ
-
-### Enable logging
-
-See the [debug logging guide](https://github.com/steveukx/git-js/blob/main/docs/DEBUG-LOGGING-GUIDE.md) for logging examples and how to
-make use of the [debug](https://www.npmjs.com/package/debug) library's programmatic interface
-in your application.
-
-### Enable Verbose Logging
-
-See the [debug logging guide](https://github.com/steveukx/git-js/blob/main/docs/DEBUG-LOGGING-GUIDE.md#verbose-logging-options) for
-the full list of verbose logging options to use with the
-[debug](https://www.npmjs.com/package/debug) library.
-
-### Every command returns ENOENT error message
-
-There are a few potential reasons:
-
-- `git` isn't available as a binary for the user running the main `node` process, custom paths to the binary can be used
- with the `.customBinary(...)` api option.
-
-- the working directory passed in to the main `simple-git` function isn't accessible, check it is read/write accessible
- by the user running the `node` process. This library uses
- [@kwsites/file-exists](https://www.npmjs.com/package/@kwsites/file-exists) to validate the working directory exists,
- to output its logs add `@kwsites/file-exists` to your `DEBUG` environment variable. eg:
-
- `DEBUG=@kwsites/file-exists,simple-git node ./your-app.js`
-
-### Log format fails
-
-The properties of `git log` are fetched using the `--pretty=format` argument which supports different tokens depending
-on the version of `git` - for example the `%D` token used to show the refs was added in git `2.2.3`, for any version
-before that please ensure you are supplying your own format object with properties supported by the version of git you
-are using.
-
-For more details of the supported tokens, please see the
-[official `git log` documentation](https://git-scm.com/docs/git-log#_pretty_formats)
-
-### Log response properties are out of order
-
-The properties of `git.log` are fetched using the character sequence ` ò ` as a delimiter. If your commit messages
-use this sequence, supply a custom `splitter` in the options, for example: `git.log({ splitter: '💻' })`
-
-### Pull / Diff / Merge summary responses don't recognise any files
-
-- Enable verbose logs with the environment variable `DEBUG=simple-git:task:*,simple-git:output:*`
-- Check the output (for example: `simple-git:output:diff:1 [stdOut] 1 file changed, 1 insertion(+)`)
-- Check the `stdOut` output is the same as you would expect to see when running the command directly in terminal
-- Check the language used in the response is english locale
-
-In some cases `git` will show progress messages or additional detail on error states in the output for
-`stdErr` that will help debug your issue, these messages are also included in the verbose log.
-
-### Legacy Node Versions
-
-From `v3.x`, `simple-git` will drop support for `node.js` version 10 or below, to use in a lower version of node will
-result in errors such as:
-
-- `Object.fromEntries is not a function`
-- `Object.entries is not a function`
-- `message.flatMap is not a function`
-
-To resolve these issues, either upgrade to a newer version of node.js or ensure you are using the necessary polyfills
-from `core-js` - see [Legacy Node Versions](https://github.com/steveukx/git-js/blob/main/docs/LEGACY_NODE_VERSIONS.md).
-
-# Examples
-
-### using a pathspec to limit the scope of the task
-
-If the `simple-git` api doesn't explicitly limit the scope of the task being run (ie: `git.add()` requires the files to
-be added, but `git.status()` will run against the entire repo), add a `pathspec` to the command using trailing options:
-
-```typescript
-const git = simpleGit();
-const wholeRepoStatus = await git.status();
-const subDirStatusUsingOptArray = await git.status(['--', 'sub-dir']);
-const subDirStatusUsingOptObject = await git.status({'--': null, 'sub-dir': null});
-```
-
-### async await
-
-```javascript
-async function status (workingDir) {
- let statusSummary = null;
- try {
- statusSummary = await simpleGit(workingDir).status();
- }
- catch (e) {
- // handle the error
- }
-
- return statusSummary;
-}
-
-// using the async function
-status(__dirname + '/some-repo').then(status => console.log(status));
-```
-
-### Initialise a git repo if necessary
-
-```javascript
-const git = simpleGit(__dirname);
-
-git.checkIsRepo()
- .then(isRepo => !isRepo && initialiseRepo(git))
- .then(() => git.fetch());
-
-function initialiseRepo (git) {
- return git.init()
- .then(() => git.addRemote('origin', 'https://some.git.repo'))
-}
-```
-
-### Update repo and get a list of tags
-
-```javascript
-simpleGit(__dirname + '/some-repo')
- .pull()
- .tags((err, tags) => console.log("Latest available tag: %s", tags.latest));
-
-// update repo and when there are changes, restart the app
-simpleGit()
- .pull((err, update) => {
- if (update && update.summary.changes) {
- require('child_process').exec('npm restart');
- }
- });
-```
-
-### Starting a new repo
-
-```javascript
-simpleGit()
- .init()
- .add('./*')
- .commit("first commit!")
- .addRemote('origin', 'https://github.com/user/repo.git')
- .push('origin', 'master');
-```
-
-### push with `-u`
-
-```javascript
-simpleGit()
- .add('./*')
- .commit("first commit!")
- .addRemote('origin', 'some-repo-url')
- .push(['-u', 'origin', 'master'], () => console.log('done'));
-```
-
-### Piping to the console for long-running tasks
-
-See [progress events](https://github.com/steveukx/git-js/blob/main/docs/PLUGIN-PROGRESS-EVENTS.md) for more details on
-logging progress updates.
-
-```javascript
-const git = simpleGit({
- progress ({method, stage, progress}) {
- console.log(`git.${ method } ${ stage } stage ${ progress }% complete`);
- }
-});
-git.checkout('https://github.com/user/repo.git');
-```
-
-### Update repo and print messages when there are changes, restart the app
-
-```javascript
-// when using a chain
-simpleGit()
- .exec(() => console.log('Starting pull...'))
- .pull((err, update) => {
- if (update && update.summary.changes) {
- require('child_process').exec('npm restart');
- }
- })
- .exec(() => console.log('pull done.'));
-
-// when using async and optional chaining
-const git = simpleGit();
-console.log('Starting pull...');
-if ((await git.pull())?.summary.changes) {
- require('child_process').exec('npm restart');
-}
-console.log('pull done.');
-```
-
-### Get a full commits list, and then only between 0.11.0 and 0.12.0 tags
-
-```javascript
-console.log(await simpleGit().log());
-console.log(await simpleGit().log('0.11.0', '0.12.0'));
-```
-
-### Set the local configuration for author, then author for an individual commit
-
-```javascript
-simpleGit()
- .addConfig('user.name', 'Some One')
- .addConfig('user.email', 'some@one.com')
- .commit('committed as "Some One"', 'file-one')
- .commit('committed as "Another Person"', 'file-two', {'--author': '"Another Person <another@person.com>"'});
-```
-
-### Get remote repositories
-
-```javascript
-simpleGit()
- .listRemote(['--get-url'], (err, data) => {
- if (!err) {
- console.log('Remote url for repository at ' + __dirname + ':');
- console.log(data);
- }
- });
-```
diff --git a/node_modules/simple-git/src/lib/api.d.ts b/node_modules/simple-git/src/lib/api.d.ts
deleted file mode 100644
index 38f6fe4..0000000
--- a/node_modules/simple-git/src/lib/api.d.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { GitConstructError } from './errors/git-construct-error';
-import { GitError } from './errors/git-error';
-import { GitPluginError } from './errors/git-plugin-error';
-import { GitResponseError } from './errors/git-response-error';
-import { TaskConfigurationError } from './errors/task-configuration-error';
-import { CheckRepoActions } from './tasks/check-is-repo';
-import { CleanOptions } from './tasks/clean';
-import { GitConfigScope } from './tasks/config';
-import { grepQueryBuilder } from './tasks/grep';
-import { ResetMode } from './tasks/reset';
-export { CheckRepoActions, CleanOptions, GitConfigScope, GitConstructError, GitError, GitPluginError, GitResponseError, ResetMode, TaskConfigurationError, grepQueryBuilder, };
diff --git a/node_modules/simple-git/src/lib/errors/git-construct-error.d.ts b/node_modules/simple-git/src/lib/errors/git-construct-error.d.ts
deleted file mode 100644
index 6c6f067..0000000
--- a/node_modules/simple-git/src/lib/errors/git-construct-error.d.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { GitError } from './git-error';
-import { SimpleGitOptions } from '../types';
-/**
- * The `GitConstructError` is thrown when an error occurs in the constructor
- * of the `simple-git` instance itself. Most commonly as a result of using
- * a `baseDir` option that points to a folder that either does not exist,
- * or cannot be read by the user the node script is running as.
- *
- * Check the `.message` property for more detail including the properties
- * passed to the constructor.
- */
-export declare class GitConstructError extends GitError {
- readonly config: SimpleGitOptions;
- constructor(config: SimpleGitOptions, message: string);
-}
diff --git a/node_modules/simple-git/src/lib/errors/git-error.d.ts b/node_modules/simple-git/src/lib/errors/git-error.d.ts
deleted file mode 100644
index a0677ab..0000000
--- a/node_modules/simple-git/src/lib/errors/git-error.d.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * The `GitError` is thrown when the underlying `git` process throws a
- * fatal exception (eg an `ENOENT` exception when attempting to use a
- * non-writable directory as the root for your repo), and acts as the
- * base class for more specific errors thrown by the parsing of the
- * git response or errors in the configuration of the task about to
- * be run.
- *
- * When an exception is thrown, pending tasks in the same instance will
- * not be executed. The recommended way to run a series of tasks that
- * can independently fail without needing to prevent future tasks from
- * running is to catch them individually:
- *
- * ```typescript
- import { gitP, SimpleGit, GitError, PullResult } from 'simple-git';
-
- function catchTask (e: GitError) {
- return e.
- }
-
- const git = gitP(repoWorkingDir);
- const pulled: PullResult | GitError = await git.pull().catch(catchTask);
- const pushed: string | GitError = await git.pushTags().catch(catchTask);
- ```
- */
-export declare class GitError extends Error {
- task?: import("../tasks/task").EmptyTask | import("../types").StringTask<any> | import("../types").BufferTask<any> | undefined;
- constructor(task?: import("../tasks/task").EmptyTask | import("../types").StringTask<any> | import("../types").BufferTask<any> | undefined, message?: string);
-}
diff --git a/node_modules/simple-git/src/lib/errors/git-plugin-error.d.ts b/node_modules/simple-git/src/lib/errors/git-plugin-error.d.ts
deleted file mode 100644
index 17aed24..0000000
--- a/node_modules/simple-git/src/lib/errors/git-plugin-error.d.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { GitError } from './git-error';
-export declare class GitPluginError extends GitError {
- task?: import("../tasks/task").EmptyTask | import("../types").StringTask<any> | import("../types").BufferTask<any> | undefined;
- readonly plugin?: "progress" | "timeout" | "completion" | "errors" | "spawnOptions" | "baseDir" | "binary" | "maxConcurrentProcesses" | "config" | undefined;
- constructor(task?: import("../tasks/task").EmptyTask | import("../types").StringTask<any> | import("../types").BufferTask<any> | undefined, plugin?: "progress" | "timeout" | "completion" | "errors" | "spawnOptions" | "baseDir" | "binary" | "maxConcurrentProcesses" | "config" | undefined, message?: string);
-}
diff --git a/node_modules/simple-git/src/lib/errors/git-response-error.d.ts b/node_modules/simple-git/src/lib/errors/git-response-error.d.ts
deleted file mode 100644
index 5d77bb0..0000000
--- a/node_modules/simple-git/src/lib/errors/git-response-error.d.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-import { GitError } from './git-error';
-/**
- * The `GitResponseError` is the wrapper for a parsed response that is treated as
- * a fatal error, for example attempting a `merge` can leave the repo in a corrupted
- * state when there are conflicts so the task will reject rather than resolve.
- *
- * For example, catching the merge conflict exception:
- *
- * ```typescript
- import { gitP, SimpleGit, GitResponseError, MergeSummary } from 'simple-git';
-
- const git = gitP(repoRoot);
- const mergeOptions: string[] = ['--no-ff', 'other-branch'];
- const mergeSummary: MergeSummary = await git.merge(mergeOptions)
- .catch((e: GitResponseError<MergeSummary>) => e.git);
-
- if (mergeSummary.failed) {
- // deal with the error
- }
- ```
- */
-export declare class GitResponseError<T = any> extends GitError {
- /**
- * `.git` access the parsed response that is treated as being an error
- */
- readonly git: T;
- constructor(
- /**
- * `.git` access the parsed response that is treated as being an error
- */
- git: T, message?: string);
-}
diff --git a/node_modules/simple-git/src/lib/errors/task-configuration-error.d.ts b/node_modules/simple-git/src/lib/errors/task-configuration-error.d.ts
deleted file mode 100644
index 9f8a957..0000000
--- a/node_modules/simple-git/src/lib/errors/task-configuration-error.d.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { GitError } from './git-error';
-/**
- * The `TaskConfigurationError` is thrown when a command was incorrectly
- * configured. An error of this kind means that no attempt was made to
- * run your command through the underlying `git` binary.
- *
- * Check the `.message` property for more detail on why your configuration
- * resulted in an error.
- */
-export declare class TaskConfigurationError extends GitError {
- constructor(message?: string);
-}
diff --git a/node_modules/simple-git/src/lib/git-factory.d.ts b/node_modules/simple-git/src/lib/git-factory.d.ts
deleted file mode 100644
index ed550dd..0000000
--- a/node_modules/simple-git/src/lib/git-factory.d.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { SimpleGitFactory } from '../../typings';
-import * as api from './api';
-import { SimpleGitOptions } from './types';
-/**
- * Adds the necessary properties to the supplied object to enable it for use as
- * the default export of a module.
- *
- * Eg: `module.exports = esModuleFactory({ something () {} })`
- */
-export declare function esModuleFactory<T>(defaultExport: T): T & {
- __esModule: true;
- default: T;
-};
-export declare function gitExportFactory<T = {}>(factory: SimpleGitFactory, extra: T): ((options: Partial<SimpleGitOptions>) => import("../../typings").SimpleGit) & typeof api;
-export declare function gitInstanceFactory(baseDir?: string | Partial<SimpleGitOptions>, options?: Partial<SimpleGitOptions>): any;
diff --git a/node_modules/simple-git/src/lib/git-logger.d.ts b/node_modules/simple-git/src/lib/git-logger.d.ts
deleted file mode 100644
index 7f3748d..0000000
--- a/node_modules/simple-git/src/lib/git-logger.d.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { Debugger } from 'debug';
-declare type OutputLoggingHandler = (message: string, ...args: any[]) => void;
-export interface OutputLogger extends OutputLoggingHandler {
- readonly label: string;
- info: OutputLoggingHandler;
- step(nextStep?: string): OutputLogger;
- sibling(name: string): OutputLogger;
-}
-export declare function createLogger(label: string, verbose?: string | Debugger, initialStep?: string, infoDebugger?: Debugger): OutputLogger;
-/**
- * The `GitLogger` is used by the main `SimpleGit` runner to handle logging
- * any warnings or errors.
- */
-export declare class GitLogger {
- private _out;
- error: OutputLoggingHandler;
- warn: OutputLoggingHandler;
- constructor(_out?: Debugger);
- silent(silence?: boolean): void;
-}
-export {};
diff --git a/node_modules/simple-git/src/lib/parsers/parse-branch-delete.d.ts b/node_modules/simple-git/src/lib/parsers/parse-branch-delete.d.ts
deleted file mode 100644
index ee05b45..0000000
--- a/node_modules/simple-git/src/lib/parsers/parse-branch-delete.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { BranchMultiDeleteResult } from '../../../typings';
-import { TaskParser } from '../types';
-import { ExitCodes } from '../utils';
-export declare const parseBranchDeletions: TaskParser<string, BranchMultiDeleteResult>;
-export declare function hasBranchDeletionError(data: string, processExitCode: ExitCodes): boolean;
diff --git a/node_modules/simple-git/src/lib/parsers/parse-branch.d.ts b/node_modules/simple-git/src/lib/parsers/parse-branch.d.ts
deleted file mode 100644
index 3c39c29..0000000
--- a/node_modules/simple-git/src/lib/parsers/parse-branch.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import { BranchSummary } from '../../../typings';
-export declare function parseBranchSummary(stdOut: string): BranchSummary;
diff --git a/node_modules/simple-git/src/lib/parsers/parse-commit.d.ts b/node_modules/simple-git/src/lib/parsers/parse-commit.d.ts
deleted file mode 100644
index 1b47298..0000000
--- a/node_modules/simple-git/src/lib/parsers/parse-commit.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import { CommitResult } from '../../../typings';
-export declare function parseCommitResult(stdOut: string): CommitResult;
diff --git a/node_modules/simple-git/src/lib/parsers/parse-diff-summary.d.ts b/node_modules/simple-git/src/lib/parsers/parse-diff-summary.d.ts
deleted file mode 100644
index baaeb64..0000000
--- a/node_modules/simple-git/src/lib/parsers/parse-diff-summary.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import { DiffResult } from '../../../typings';
-export declare function parseDiffResult(stdOut: string): DiffResult;
diff --git a/node_modules/simple-git/src/lib/parsers/parse-fetch.d.ts b/node_modules/simple-git/src/lib/parsers/parse-fetch.d.ts
deleted file mode 100644
index 98dc1a3..0000000
--- a/node_modules/simple-git/src/lib/parsers/parse-fetch.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import { FetchResult } from '../../../typings';
-export declare function parseFetchResult(stdOut: string, stdErr: string): FetchResult;
diff --git a/node_modules/simple-git/src/lib/parsers/parse-list-log-summary.d.ts b/node_modules/simple-git/src/lib/parsers/parse-list-log-summary.d.ts
deleted file mode 100644
index 113af34..0000000
--- a/node_modules/simple-git/src/lib/parsers/parse-list-log-summary.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { LogResult } from '../../../typings';
-export declare const START_BOUNDARY = "\u00F2\u00F2\u00F2\u00F2\u00F2\u00F2 ";
-export declare const COMMIT_BOUNDARY = " \u00F2\u00F2";
-export declare const SPLITTER = " \u00F2 ";
-export declare function createListLogSummaryParser<T = any>(splitter?: string, fields?: string[]): (stdOut: string) => LogResult<T>;
diff --git a/node_modules/simple-git/src/lib/parsers/parse-merge.d.ts b/node_modules/simple-git/src/lib/parsers/parse-merge.d.ts
deleted file mode 100644
index 42435fd..0000000
--- a/node_modules/simple-git/src/lib/parsers/parse-merge.d.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { MergeDetail, MergeResult } from '../../../typings';
-import { TaskParser } from '../types';
-/**
- * Parse the complete response from `git.merge`
- */
-export declare const parseMergeResult: TaskParser<string, MergeResult>;
-/**
- * Parse the merge specific detail (ie: not the content also available in the pull detail) from `git.mnerge`
- * @param stdOut
- */
-export declare const parseMergeDetail: TaskParser<string, MergeDetail>;
diff --git a/node_modules/simple-git/src/lib/parsers/parse-move.d.ts b/node_modules/simple-git/src/lib/parsers/parse-move.d.ts
deleted file mode 100644
index a2af49d..0000000
--- a/node_modules/simple-git/src/lib/parsers/parse-move.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import { MoveResult } from '../../../typings';
-export declare function parseMoveResult(stdOut: string): MoveResult;
diff --git a/node_modules/simple-git/src/lib/parsers/parse-pull.d.ts b/node_modules/simple-git/src/lib/parsers/parse-pull.d.ts
deleted file mode 100644
index 95d2877..0000000
--- a/node_modules/simple-git/src/lib/parsers/parse-pull.d.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { PullDetail, PullResult } from '../../../typings';
-import { PullFailedSummary } from '../responses/PullSummary';
-import { TaskParser } from '../types';
-export declare const parsePullDetail: TaskParser<string, PullDetail>;
-export declare const parsePullResult: TaskParser<string, PullResult>;
-export declare function parsePullErrorResult(stdOut: string, stdErr: string): "" | PullFailedSummary;
diff --git a/node_modules/simple-git/src/lib/parsers/parse-push.d.ts b/node_modules/simple-git/src/lib/parsers/parse-push.d.ts
deleted file mode 100644
index 9bb39b4..0000000
--- a/node_modules/simple-git/src/lib/parsers/parse-push.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { PushDetail, PushResult } from '../../../typings';
-import { TaskParser } from '../types';
-export declare const parsePushResult: TaskParser<string, PushResult>;
-export declare const parsePushDetail: TaskParser<string, PushDetail>;
diff --git a/node_modules/simple-git/src/lib/parsers/parse-remote-messages.d.ts b/node_modules/simple-git/src/lib/parsers/parse-remote-messages.d.ts
deleted file mode 100644
index 9c24989..0000000
--- a/node_modules/simple-git/src/lib/parsers/parse-remote-messages.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { RemoteMessageResult, RemoteMessages } from '../../../typings';
-export declare function parseRemoteMessages<T extends RemoteMessages = RemoteMessages>(_stdOut: string, stdErr: string): RemoteMessageResult;
-export declare class RemoteMessageSummary implements RemoteMessages {
- readonly all: string[];
-}
diff --git a/node_modules/simple-git/src/lib/parsers/parse-remote-objects.d.ts b/node_modules/simple-git/src/lib/parsers/parse-remote-objects.d.ts
deleted file mode 100644
index 513b58a..0000000
--- a/node_modules/simple-git/src/lib/parsers/parse-remote-objects.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { RemoteMessageResult, RemoteMessages } from '../../../typings';
-import { RemoteLineParser } from '../utils';
-export declare const remoteMessagesObjectParsers: RemoteLineParser<RemoteMessageResult<RemoteMessages>>[];
diff --git a/node_modules/simple-git/src/lib/plugins/command-config-prefixing-plugin.d.ts b/node_modules/simple-git/src/lib/plugins/command-config-prefixing-plugin.d.ts
deleted file mode 100644
index b5e4181..0000000
--- a/node_modules/simple-git/src/lib/plugins/command-config-prefixing-plugin.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import { SimpleGitPlugin } from './simple-git-plugin';
-export declare function commandConfigPrefixingPlugin(configuration: string[]): SimpleGitPlugin<'spawn.args'>;
diff --git a/node_modules/simple-git/src/lib/plugins/completion-detection.plugin.d.ts b/node_modules/simple-git/src/lib/plugins/completion-detection.plugin.d.ts
deleted file mode 100644
index a3c08de..0000000
--- a/node_modules/simple-git/src/lib/plugins/completion-detection.plugin.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { SimpleGitPluginConfig } from '../types';
-import { SimpleGitPlugin } from './simple-git-plugin';
-export declare function completionDetectionPlugin({ onClose, onExit }?: SimpleGitPluginConfig['completion']): SimpleGitPlugin<'spawn.after'>;
diff --git a/node_modules/simple-git/src/lib/plugins/error-detection.plugin.d.ts b/node_modules/simple-git/src/lib/plugins/error-detection.plugin.d.ts
deleted file mode 100644
index 095c73a..0000000
--- a/node_modules/simple-git/src/lib/plugins/error-detection.plugin.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-/// <reference types="node" />
-import { GitExecutorResult, SimpleGitPluginConfig } from '../types';
-import { SimpleGitPlugin } from './simple-git-plugin';
-declare type TaskResult = Omit<GitExecutorResult, 'rejection'>;
-declare function isTaskError(result: TaskResult): boolean;
-export declare function errorDetectionHandler(overwrite?: boolean, isError?: typeof isTaskError, errorMessage?: (result: TaskResult) => Buffer | Error): (error: Buffer | Error | undefined, result: TaskResult) => Error | Buffer | undefined;
-export declare function errorDetectionPlugin(config: SimpleGitPluginConfig['errors']): SimpleGitPlugin<'task.error'>;
-export {};
diff --git a/node_modules/simple-git/src/lib/plugins/index.d.ts b/node_modules/simple-git/src/lib/plugins/index.d.ts
deleted file mode 100644
index 0cfb54e..0000000
--- a/node_modules/simple-git/src/lib/plugins/index.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-export * from './command-config-prefixing-plugin';
-export * from './completion-detection.plugin';
-export * from './error-detection.plugin';
-export * from './plugin-store';
-export * from './progress-monitor-plugin';
-export * from './simple-git-plugin';
-export * from './spawn-options-plugin';
-export * from './timout-plugin';
diff --git a/node_modules/simple-git/src/lib/plugins/plugin-store.d.ts b/node_modules/simple-git/src/lib/plugins/plugin-store.d.ts
deleted file mode 100644
index ceeef56..0000000
--- a/node_modules/simple-git/src/lib/plugins/plugin-store.d.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { SimpleGitPlugin, SimpleGitPluginType, SimpleGitPluginTypes } from './simple-git-plugin';
-export declare class PluginStore {
- private plugins;
- 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;
-}
diff --git a/node_modules/simple-git/src/lib/plugins/progress-monitor-plugin.d.ts b/node_modules/simple-git/src/lib/plugins/progress-monitor-plugin.d.ts
deleted file mode 100644
index ddd36b1..0000000
--- a/node_modules/simple-git/src/lib/plugins/progress-monitor-plugin.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { SimpleGitOptions } from '../types';
-import { SimpleGitPlugin } from './simple-git-plugin';
-export declare function progressMonitorPlugin(progress: Exclude<SimpleGitOptions['progress'], void>): (SimpleGitPlugin<"spawn.args"> | SimpleGitPlugin<"spawn.after">)[];
diff --git a/node_modules/simple-git/src/lib/plugins/simple-git-plugin.d.ts b/node_modules/simple-git/src/lib/plugins/simple-git-plugin.d.ts
deleted file mode 100644
index cdb4f0b..0000000
--- a/node_modules/simple-git/src/lib/plugins/simple-git-plugin.d.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/// <reference types="node" />
-import { ChildProcess, SpawnOptions } from 'child_process';
-import { GitExecutorResult } from '../types';
-declare type SimpleGitTaskPluginContext = {
- readonly method: string;
- readonly commands: string[];
-};
-export interface SimpleGitPluginTypes {
- 'spawn.args': {
- data: string[];
- context: SimpleGitTaskPluginContext & {};
- };
- 'spawn.options': {
- data: Partial<SpawnOptions>;
- context: SimpleGitTaskPluginContext & {};
- };
- 'spawn.after': {
- data: void;
- context: SimpleGitTaskPluginContext & {
- spawned: ChildProcess;
- close(exitCode: number, reason?: Error): void;
- kill(reason: Error): void;
- };
- };
- 'task.error': {
- data: {
- error?: Error;
- };
- context: SimpleGitTaskPluginContext & GitExecutorResult;
- };
-}
-export declare type SimpleGitPluginType = keyof SimpleGitPluginTypes;
-export interface SimpleGitPlugin<T extends SimpleGitPluginType> {
- action(data: SimpleGitPluginTypes[T]['data'], context: SimpleGitPluginTypes[T]['context']): typeof data;
- type: T;
-}
-export {};
diff --git a/node_modules/simple-git/src/lib/plugins/spawn-options-plugin.d.ts b/node_modules/simple-git/src/lib/plugins/spawn-options-plugin.d.ts
deleted file mode 100644
index 77770fe..0000000
--- a/node_modules/simple-git/src/lib/plugins/spawn-options-plugin.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-/// <reference types="node" />
-import { SpawnOptions } from 'child_process';
-import { SimpleGitPlugin } from './simple-git-plugin';
-export declare function spawnOptionsPlugin(spawnOptions: Partial<SpawnOptions>): SimpleGitPlugin<'spawn.options'>;
diff --git a/node_modules/simple-git/src/lib/plugins/timout-plugin.d.ts b/node_modules/simple-git/src/lib/plugins/timout-plugin.d.ts
deleted file mode 100644
index bebbf21..0000000
--- a/node_modules/simple-git/src/lib/plugins/timout-plugin.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { SimpleGitOptions } from '../types';
-import { SimpleGitPlugin } from './simple-git-plugin';
-export declare function timeoutPlugin({ block }: Exclude<SimpleGitOptions['timeout'], undefined>): SimpleGitPlugin<'spawn.after'> | void;
diff --git a/node_modules/simple-git/src/lib/responses/BranchDeleteSummary.d.ts b/node_modules/simple-git/src/lib/responses/BranchDeleteSummary.d.ts
deleted file mode 100644
index e7d3517..0000000
--- a/node_modules/simple-git/src/lib/responses/BranchDeleteSummary.d.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { BranchMultiDeleteResult, BranchSingleDeleteFailure, BranchSingleDeleteResult, BranchSingleDeleteSuccess } from '../../../typings';
-export declare class BranchDeletionBatch implements BranchMultiDeleteResult {
- all: BranchSingleDeleteResult[];
- branches: {
- [branchName: string]: BranchSingleDeleteResult;
- };
- errors: BranchSingleDeleteResult[];
- get success(): boolean;
-}
-export declare function branchDeletionSuccess(branch: string, hash: string): BranchSingleDeleteSuccess;
-export declare function branchDeletionFailure(branch: string): BranchSingleDeleteFailure;
-export declare function isSingleBranchDeleteFailure(test: BranchSingleDeleteResult): test is BranchSingleDeleteSuccess;
diff --git a/node_modules/simple-git/src/lib/responses/BranchSummary.d.ts b/node_modules/simple-git/src/lib/responses/BranchSummary.d.ts
deleted file mode 100644
index 69cd698..0000000
--- a/node_modules/simple-git/src/lib/responses/BranchSummary.d.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { BranchSummary, BranchSummaryBranch } from '../../../typings';
-export declare class BranchSummaryResult implements BranchSummary {
- all: string[];
- branches: {
- [p: string]: BranchSummaryBranch;
- };
- current: string;
- detached: boolean;
- push(current: boolean, detached: boolean, name: string, commit: string, label: string): void;
-}
diff --git a/node_modules/simple-git/src/lib/responses/CheckIgnore.d.ts b/node_modules/simple-git/src/lib/responses/CheckIgnore.d.ts
deleted file mode 100644
index e15478f..0000000
--- a/node_modules/simple-git/src/lib/responses/CheckIgnore.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-/**
- * Parser for the `check-ignore` command - returns each file as a string array
- */
-export declare const parseCheckIgnore: (text: string) => string[];
diff --git a/node_modules/simple-git/src/lib/responses/CleanSummary.d.ts b/node_modules/simple-git/src/lib/responses/CleanSummary.d.ts
deleted file mode 100644
index d49ef04..0000000
--- a/node_modules/simple-git/src/lib/responses/CleanSummary.d.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import { CleanSummary } from '../../../typings';
-export declare class CleanResponse implements CleanSummary {
- readonly dryRun: boolean;
- paths: string[];
- files: string[];
- folders: string[];
- constructor(dryRun: boolean);
-}
-export declare function cleanSummaryParser(dryRun: boolean, text: string): CleanSummary;
diff --git a/node_modules/simple-git/src/lib/responses/ConfigList.d.ts b/node_modules/simple-git/src/lib/responses/ConfigList.d.ts
deleted file mode 100644
index f01ed6a..0000000
--- a/node_modules/simple-git/src/lib/responses/ConfigList.d.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { ConfigGetResult, ConfigListSummary, ConfigValues } from '../../../typings';
-export declare class ConfigList implements ConfigListSummary {
- files: string[];
- values: {
- [fileName: string]: ConfigValues;
- };
- private _all;
- get all(): ConfigValues;
- addFile(file: string): ConfigValues;
- addValue(file: string, key: string, value: string): void;
-}
-export declare function configListParser(text: string): ConfigList;
-export declare function configGetParser(text: string, key: string): ConfigGetResult;
diff --git a/node_modules/simple-git/src/lib/responses/DiffSummary.d.ts b/node_modules/simple-git/src/lib/responses/DiffSummary.d.ts
deleted file mode 100644
index 16d63f0..0000000
--- a/node_modules/simple-git/src/lib/responses/DiffSummary.d.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { DiffResult, DiffResultBinaryFile, DiffResultTextFile } from '../../../typings';
-/***
- * The DiffSummary is returned as a response to getting `git().status()`
- */
-export declare class DiffSummary implements DiffResult {
- changed: number;
- deletions: number;
- insertions: number;
- files: Array<DiffResultTextFile | DiffResultBinaryFile>;
-}
diff --git a/node_modules/simple-git/src/lib/responses/FileStatusSummary.d.ts b/node_modules/simple-git/src/lib/responses/FileStatusSummary.d.ts
deleted file mode 100644
index fd680a4..0000000
--- a/node_modules/simple-git/src/lib/responses/FileStatusSummary.d.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import { FileStatusResult } from '../../../typings/response';
-export declare const fromPathRegex: RegExp;
-export declare class FileStatusSummary implements FileStatusResult {
- path: string;
- index: string;
- working_dir: string;
- readonly from: string | undefined;
- constructor(path: string, index: string, working_dir: string);
-}
diff --git a/node_modules/simple-git/src/lib/responses/GetRemoteSummary.d.ts b/node_modules/simple-git/src/lib/responses/GetRemoteSummary.d.ts
deleted file mode 100644
index 3ef9109..0000000
--- a/node_modules/simple-git/src/lib/responses/GetRemoteSummary.d.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-export interface RemoteWithoutRefs {
- name: string;
-}
-export interface RemoteWithRefs extends RemoteWithoutRefs {
- refs: {
- fetch: string;
- push: string;
- };
-}
-export declare function parseGetRemotes(text: string): RemoteWithoutRefs[];
-export declare function parseGetRemotesVerbose(text: string): RemoteWithRefs[];
diff --git a/node_modules/simple-git/src/lib/responses/InitSummary.d.ts b/node_modules/simple-git/src/lib/responses/InitSummary.d.ts
deleted file mode 100644
index 634911f..0000000
--- a/node_modules/simple-git/src/lib/responses/InitSummary.d.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import { InitResult } from '../../../typings';
-export declare class InitSummary implements InitResult {
- readonly bare: boolean;
- readonly path: string;
- readonly existing: boolean;
- readonly gitDir: string;
- constructor(bare: boolean, path: string, existing: boolean, gitDir: string);
-}
-export declare function parseInit(bare: boolean, path: string, text: string): InitSummary;
diff --git a/node_modules/simple-git/src/lib/responses/MergeSummary.d.ts b/node_modules/simple-git/src/lib/responses/MergeSummary.d.ts
deleted file mode 100644
index 519e954..0000000
--- a/node_modules/simple-git/src/lib/responses/MergeSummary.d.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { MergeConflict, MergeConflictDeletion, MergeDetail, MergeResultStatus } from '../../../typings';
-export declare class MergeSummaryConflict implements MergeConflict {
- readonly reason: string;
- readonly file: string | null;
- readonly meta?: MergeConflictDeletion | undefined;
- constructor(reason: string, file?: string | null, meta?: MergeConflictDeletion | undefined);
- toString(): string;
-}
-export declare class MergeSummaryDetail implements MergeDetail {
- conflicts: MergeConflict[];
- merges: string[];
- result: MergeResultStatus;
- get failed(): boolean;
- get reason(): string;
- toString(): string;
-}
diff --git a/node_modules/simple-git/src/lib/responses/PullSummary.d.ts b/node_modules/simple-git/src/lib/responses/PullSummary.d.ts
deleted file mode 100644
index c5bc9bc..0000000
--- a/node_modules/simple-git/src/lib/responses/PullSummary.d.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { PullDetailFileChanges, PullDetailSummary, PullFailedResult, PullResult } from '../../../typings';
-export declare class PullSummary implements PullResult {
- remoteMessages: {
- all: never[];
- };
- created: never[];
- deleted: string[];
- files: string[];
- deletions: PullDetailFileChanges;
- insertions: PullDetailFileChanges;
- summary: PullDetailSummary;
-}
-export declare class PullFailedSummary implements PullFailedResult {
- remote: string;
- hash: {
- local: string;
- remote: string;
- };
- branch: {
- local: string;
- remote: string;
- };
- message: string;
- toString(): string;
-}
diff --git a/node_modules/simple-git/src/lib/responses/StatusSummary.d.ts b/node_modules/simple-git/src/lib/responses/StatusSummary.d.ts
deleted file mode 100644
index d70ade5..0000000
--- a/node_modules/simple-git/src/lib/responses/StatusSummary.d.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { StatusResult } from '../../../typings';
-export declare class StatusSummary implements StatusResult {
- not_added: never[];
- conflicted: never[];
- created: never[];
- deleted: never[];
- ignored: undefined;
- modified: never[];
- renamed: never[];
- files: never[];
- staged: never[];
- ahead: number;
- behind: number;
- current: null;
- tracking: null;
- detached: boolean;
- isClean(): boolean;
-}
-export declare const parseStatusSummary: (text: string) => StatusResult;
diff --git a/node_modules/simple-git/src/lib/responses/TagList.d.ts b/node_modules/simple-git/src/lib/responses/TagList.d.ts
deleted file mode 100644
index b72180d..0000000
--- a/node_modules/simple-git/src/lib/responses/TagList.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { TagResult } from '../../../typings';
-export declare class TagList implements TagResult {
- readonly all: string[];
- readonly latest: string | undefined;
- constructor(all: string[], latest: string | undefined);
-}
-export declare const parseTagList: (data: string, customSort?: boolean) => TagList;
diff --git a/node_modules/simple-git/src/lib/runners/git-executor-chain.d.ts b/node_modules/simple-git/src/lib/runners/git-executor-chain.d.ts
deleted file mode 100644
index 7e13e09..0000000
--- a/node_modules/simple-git/src/lib/runners/git-executor-chain.d.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { PluginStore } from '../plugins';
-import { outputHandler, SimpleGitExecutor, SimpleGitTask } from '../types';
-import { Scheduler } from './scheduler';
-export declare class GitExecutorChain implements SimpleGitExecutor {
- private _executor;
- private _scheduler;
- private _plugins;
- private _chain;
- private _queue;
- private _cwd;
- get binary(): string;
- get cwd(): string;
- set cwd(cwd: string);
- get env(): import("../types").GitExecutorEnv;
- get outputHandler(): outputHandler | undefined;
- constructor(_executor: SimpleGitExecutor, _scheduler: Scheduler, _plugins: PluginStore);
- chain(): this;
- push<R>(task: SimpleGitTask<R>): Promise<R>;
- private attemptTask;
- private onFatalException;
- private attemptRemoteTask;
- private attemptEmptyTask;
- private handleTaskData;
- private gitResponse;
-}
diff --git a/node_modules/simple-git/src/lib/runners/git-executor.d.ts b/node_modules/simple-git/src/lib/runners/git-executor.d.ts
deleted file mode 100644
index c145af1..0000000
--- a/node_modules/simple-git/src/lib/runners/git-executor.d.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { PluginStore } from '../plugins';
-import { GitExecutorEnv, outputHandler, SimpleGitExecutor, SimpleGitTask } from '../types';
-import { Scheduler } from './scheduler';
-export declare class GitExecutor implements SimpleGitExecutor {
- binary: string;
- cwd: string;
- private _scheduler;
- private _plugins;
- private _chain;
- env: GitExecutorEnv;
- outputHandler?: outputHandler;
- constructor(binary: string, cwd: string, _scheduler: Scheduler, _plugins: PluginStore);
- chain(): SimpleGitExecutor;
- push<R>(task: SimpleGitTask<R>): Promise<R>;
-}
diff --git a/node_modules/simple-git/src/lib/runners/promise-wrapped.d.ts b/node_modules/simple-git/src/lib/runners/promise-wrapped.d.ts
deleted file mode 100644
index 4f8d694..0000000
--- a/node_modules/simple-git/src/lib/runners/promise-wrapped.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import { SimpleGit, SimpleGitOptions } from '../../../typings';
-export declare function gitP(...args: [] | [string] | [Partial<SimpleGitOptions>] | [string, Partial<SimpleGitOptions>]): SimpleGit;
diff --git a/node_modules/simple-git/src/lib/runners/scheduler.d.ts b/node_modules/simple-git/src/lib/runners/scheduler.d.ts
deleted file mode 100644
index 847ed31..0000000
--- a/node_modules/simple-git/src/lib/runners/scheduler.d.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-declare type ScheduleCompleteCallback = () => void;
-export declare class Scheduler {
- private concurrency;
- private logger;
- private pending;
- private running;
- constructor(concurrency?: number);
- private schedule;
- next(): Promise<ScheduleCompleteCallback>;
-}
-export {};
diff --git a/node_modules/simple-git/src/lib/runners/tasks-pending-queue.d.ts b/node_modules/simple-git/src/lib/runners/tasks-pending-queue.d.ts
deleted file mode 100644
index 61d6073..0000000
--- a/node_modules/simple-git/src/lib/runners/tasks-pending-queue.d.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { SimpleGitTask } from '../types';
-import { GitError } from '../errors/git-error';
-import { OutputLogger } from '../git-logger';
-declare type AnySimpleGitTask = SimpleGitTask<any>;
-declare type TaskInProgress = {
- name: string;
- logger: OutputLogger;
- task: AnySimpleGitTask;
-};
-export declare class TasksPendingQueue {
- private logLabel;
- private _queue;
- constructor(logLabel?: string);
- private withProgress;
- private createProgress;
- push(task: AnySimpleGitTask): TaskInProgress;
- fatal(err: GitError): void;
- complete(task: AnySimpleGitTask): void;
- attempt(task: AnySimpleGitTask): TaskInProgress;
- static getName(name?: string): string;
- private static counter;
-}
-export {};
diff --git a/node_modules/simple-git/src/lib/simple-git-api.d.ts b/node_modules/simple-git/src/lib/simple-git-api.d.ts
deleted file mode 100644
index 0fd7761..0000000
--- a/node_modules/simple-git/src/lib/simple-git-api.d.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { SimpleGitBase } from '../../typings';
-import { outputHandler, SimpleGitExecutor, SimpleGitTask, SimpleGitTaskCallback } from './types';
-export declare class SimpleGitApi implements SimpleGitBase {
- private _executor;
- constructor(_executor: SimpleGitExecutor);
- protected _runTask<T>(task: SimpleGitTask<T>, then?: SimpleGitTaskCallback<T>): any;
- add(files: string | string[]): any;
- cwd(directory: string | {
- path: string;
- root?: boolean;
- }): any;
- hashObject(path: string, write: boolean | unknown): any;
- init(bare?: boolean | unknown): any;
- merge(): any;
- mergeFromTo(remote: string, branch: string): any;
- outputHandler(handler: outputHandler): this;
- push(): any;
- stash(): any;
- status(): any;
-}
diff --git a/node_modules/simple-git/src/lib/task-callback.d.ts b/node_modules/simple-git/src/lib/task-callback.d.ts
deleted file mode 100644
index dda89af..0000000
--- a/node_modules/simple-git/src/lib/task-callback.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import { SimpleGitTask, SimpleGitTaskCallback } from './types';
-export declare function taskCallback<R>(task: SimpleGitTask<R>, response: Promise<R>, callback?: SimpleGitTaskCallback<R>): void;
diff --git a/node_modules/simple-git/src/lib/tasks/apply-patch.d.ts b/node_modules/simple-git/src/lib/tasks/apply-patch.d.ts
deleted file mode 100644
index c1e1551..0000000
--- a/node_modules/simple-git/src/lib/tasks/apply-patch.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { OptionFlags, Options, StringTask } from '../types';
-export declare type ApplyOptions = Options & OptionFlags<'--stat' | '--numstat' | '--summary' | '--check' | '--index' | '--intent-to-add' | '--3way' | '--apply' | '--no-add' | '-R' | '--reverse' | '--allow-binary-replacement' | '--binary' | '--reject' | '-z' | '--inaccurate-eof' | '--recount' | '--cached' | '--ignore-space-change' | '--ignore-whitespace' | '--verbose' | '--unsafe-paths'> & OptionFlags<'--whitespace', 'nowarn' | 'warn' | 'fix' | 'error' | 'error-all'> & OptionFlags<'--build-fake-ancestor' | '--exclude' | '--include' | '--directory', string> & OptionFlags<'-p' | '-C', number>;
-export declare function applyPatchTask(patches: string[], customArgs: string[]): StringTask<string>;
diff --git a/node_modules/simple-git/src/lib/tasks/branch.d.ts b/node_modules/simple-git/src/lib/tasks/branch.d.ts
deleted file mode 100644
index 157b2ae..0000000
--- a/node_modules/simple-git/src/lib/tasks/branch.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { BranchMultiDeleteResult, BranchSingleDeleteResult, BranchSummary } from '../../../typings';
-import { StringTask } from '../types';
-export declare function containsDeleteBranchCommand(commands: string[]): boolean;
-export declare function branchTask(customArgs: string[]): StringTask<BranchSummary | BranchSingleDeleteResult>;
-export declare function branchLocalTask(): StringTask<BranchSummary>;
-export declare function deleteBranchesTask(branches: string[], forceDelete?: boolean): StringTask<BranchMultiDeleteResult>;
-export declare function deleteBranchTask(branch: string, forceDelete?: boolean): StringTask<BranchSingleDeleteResult>;
diff --git a/node_modules/simple-git/src/lib/tasks/change-working-directory.d.ts b/node_modules/simple-git/src/lib/tasks/change-working-directory.d.ts
deleted file mode 100644
index 1ad1009..0000000
--- a/node_modules/simple-git/src/lib/tasks/change-working-directory.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import { SimpleGitExecutor } from '../types';
-export declare function changeWorkingDirectoryTask(directory: string, root?: SimpleGitExecutor): import("./task").EmptyTask;
diff --git a/node_modules/simple-git/src/lib/tasks/check-ignore.d.ts b/node_modules/simple-git/src/lib/tasks/check-ignore.d.ts
deleted file mode 100644
index 7b34b8d..0000000
--- a/node_modules/simple-git/src/lib/tasks/check-ignore.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import { StringTask } from '../types';
-export declare function checkIgnoreTask(paths: string[]): StringTask<string[]>;
diff --git a/node_modules/simple-git/src/lib/tasks/check-is-repo.d.ts b/node_modules/simple-git/src/lib/tasks/check-is-repo.d.ts
deleted file mode 100644
index 580846f..0000000
--- a/node_modules/simple-git/src/lib/tasks/check-is-repo.d.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import { Maybe, StringTask } from '../types';
-export declare enum CheckRepoActions {
- BARE = "bare",
- IN_TREE = "tree",
- IS_REPO_ROOT = "root"
-}
-export declare function checkIsRepoTask(action: Maybe<CheckRepoActions>): StringTask<boolean>;
-export declare function checkIsRepoRootTask(): StringTask<boolean>;
-export declare function checkIsBareRepoTask(): StringTask<boolean>;
diff --git a/node_modules/simple-git/src/lib/tasks/clean.d.ts b/node_modules/simple-git/src/lib/tasks/clean.d.ts
deleted file mode 100644
index c3f7ce7..0000000
--- a/node_modules/simple-git/src/lib/tasks/clean.d.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { CleanSummary } from '../../../typings';
-import { StringTask } from '../types';
-export declare const CONFIG_ERROR_INTERACTIVE_MODE = "Git clean interactive mode is not supported";
-export declare const CONFIG_ERROR_MODE_REQUIRED = "Git clean mode parameter (\"n\" or \"f\") is required";
-export declare const CONFIG_ERROR_UNKNOWN_OPTION = "Git clean unknown option found in: ";
-/**
- * All supported option switches available for use in a `git.clean` operation
- */
-export declare enum CleanOptions {
- DRY_RUN = "n",
- FORCE = "f",
- IGNORED_INCLUDED = "x",
- IGNORED_ONLY = "X",
- EXCLUDING = "e",
- QUIET = "q",
- RECURSIVE = "d"
-}
-/**
- * The two modes `git.clean` can run in - one of these must be supplied in order
- * for the command to not throw a `TaskConfigurationError`
- */
-export declare type CleanMode = CleanOptions.FORCE | CleanOptions.DRY_RUN;
-export declare function cleanWithOptionsTask(mode: CleanMode | string, customArgs: string[]): import("./task").EmptyTask | StringTask<CleanSummary>;
-export declare function cleanTask(mode: CleanMode, customArgs: string[]): StringTask<CleanSummary>;
-export declare function isCleanOptionsArray(input: string[]): input is CleanOptions[];
diff --git a/node_modules/simple-git/src/lib/tasks/clone.d.ts b/node_modules/simple-git/src/lib/tasks/clone.d.ts
deleted file mode 100644
index 2662ece..0000000
--- a/node_modules/simple-git/src/lib/tasks/clone.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { OptionFlags, Options, StringTask } from '../types';
-export declare type CloneOptions = Options & OptionFlags<'--bare' | '--dissociate' | '--mirror' | '--no-checkout' | '--no-remote-submodules' | '--no-shallow-submodules' | '--no-single-branch' | '--no-tags' | '--remote-submodules' | '--single-branch' | '--shallow-submodules' | '--verbose'> & OptionFlags<'--depth' | '-j' | '--jobs', number> & OptionFlags<'--branch' | '--origin' | '--recurse-submodules' | '--separate-git-dir' | '--shallow-exclude' | '--shallow-since' | '--template', string>;
-export declare function cloneTask(repo: string | undefined, directory: string | undefined, customArgs: string[]): StringTask<string>;
-export declare function cloneMirrorTask(repo: string | undefined, directory: string | undefined, customArgs: string[]): StringTask<string>;
diff --git a/node_modules/simple-git/src/lib/tasks/commit.d.ts b/node_modules/simple-git/src/lib/tasks/commit.d.ts
deleted file mode 100644
index a84d2f5..0000000
--- a/node_modules/simple-git/src/lib/tasks/commit.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { CommitResult } from '../../../typings';
-import { StringTask } from '../types';
-export declare function commitTask(message: string[], files: string[], customArgs: string[]): StringTask<CommitResult>;
diff --git a/node_modules/simple-git/src/lib/tasks/config.d.ts b/node_modules/simple-git/src/lib/tasks/config.d.ts
deleted file mode 100644
index 14bc2bb..0000000
--- a/node_modules/simple-git/src/lib/tasks/config.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { SimpleGit } from '../../../typings';
-export declare enum GitConfigScope {
- system = "system",
- global = "global",
- local = "local",
- worktree = "worktree"
-}
-export default function (): Pick<SimpleGit, 'addConfig' | 'getConfig' | 'listConfig'>;
diff --git a/node_modules/simple-git/src/lib/tasks/diff.d.ts b/node_modules/simple-git/src/lib/tasks/diff.d.ts
deleted file mode 100644
index c1e37aa..0000000
--- a/node_modules/simple-git/src/lib/tasks/diff.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { StringTask } from '../types';
-import { DiffResult } from '../../../typings';
-export declare function diffSummaryTask(customArgs: string[]): StringTask<DiffResult>;
diff --git a/node_modules/simple-git/src/lib/tasks/fetch.d.ts b/node_modules/simple-git/src/lib/tasks/fetch.d.ts
deleted file mode 100644
index db4626d..0000000
--- a/node_modules/simple-git/src/lib/tasks/fetch.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { FetchResult } from '../../../typings';
-import { StringTask } from '../types';
-export declare function fetchTask(remote: string, branch: string, customArgs: string[]): StringTask<FetchResult>;
diff --git a/node_modules/simple-git/src/lib/tasks/grep.d.ts b/node_modules/simple-git/src/lib/tasks/grep.d.ts
deleted file mode 100644
index 653159a..0000000
--- a/node_modules/simple-git/src/lib/tasks/grep.d.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { SimpleGit } from '../../../typings';
-export interface GitGrepQuery extends Iterable<string> {
- /** Adds one or more terms to be grouped as an "and" to any other terms */
- and(...and: string[]): this;
- /** Adds one or more search terms - git.grep will "or" this to other terms */
- param(...param: string[]): this;
-}
-/**
- * Creates a new builder for a `git.grep` query with optional params
- */
-export declare function grepQueryBuilder(...params: string[]): GitGrepQuery;
-export default function (): Pick<SimpleGit, 'grep'>;
diff --git a/node_modules/simple-git/src/lib/tasks/hash-object.d.ts b/node_modules/simple-git/src/lib/tasks/hash-object.d.ts
deleted file mode 100644
index cedf3e0..0000000
--- a/node_modules/simple-git/src/lib/tasks/hash-object.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { StringTask } from '../types';
-/**
- * Task used by `git.hashObject`
- */
-export declare function hashObjectTask(filePath: string, write: boolean): StringTask<string>;
diff --git a/node_modules/simple-git/src/lib/tasks/init.d.ts b/node_modules/simple-git/src/lib/tasks/init.d.ts
deleted file mode 100644
index ca7f126..0000000
--- a/node_modules/simple-git/src/lib/tasks/init.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { InitResult } from '../../../typings';
-import { StringTask } from '../types';
-export declare function initTask(bare: boolean | undefined, path: string, customArgs: string[]): StringTask<InitResult>;
diff --git a/node_modules/simple-git/src/lib/tasks/log.d.ts b/node_modules/simple-git/src/lib/tasks/log.d.ts
deleted file mode 100644
index b4ae73f..0000000
--- a/node_modules/simple-git/src/lib/tasks/log.d.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-import { Options, StringTask } from '../types';
-import { LogResult, SimpleGit } from '../../../typings';
-export interface DefaultLogFields {
- hash: string;
- date: string;
- message: string;
- refs: string;
- body: string;
- author_name: string;
- author_email: string;
-}
-export declare type LogOptions<T = DefaultLogFields> = {
- file?: string;
- format?: T;
- from?: string;
- mailMap?: boolean;
- maxCount?: number;
- multiLine?: boolean;
- splitter?: string;
- strictDate?: boolean;
- symmetric?: boolean;
- to?: string;
-};
-interface ParsedLogOptions {
- fields: string[];
- splitter: string;
- commands: string[];
-}
-export declare function parseLogOptions<T extends Options>(opt?: LogOptions<T>, customArgs?: string[]): ParsedLogOptions;
-export declare function logTask<T>(splitter: string, fields: string[], customArgs: string[]): StringTask<LogResult<T>>;
-export default function (): Pick<SimpleGit, 'log'>;
-export {};
diff --git a/node_modules/simple-git/src/lib/tasks/merge.d.ts b/node_modules/simple-git/src/lib/tasks/merge.d.ts
deleted file mode 100644
index 663e80b..0000000
--- a/node_modules/simple-git/src/lib/tasks/merge.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { MergeResult } from '../../../typings';
-import { StringTask } from '../types';
-import { EmptyTask } from './task';
-export declare function mergeTask(customArgs: string[]): EmptyTask | StringTask<MergeResult>;
diff --git a/node_modules/simple-git/src/lib/tasks/move.d.ts b/node_modules/simple-git/src/lib/tasks/move.d.ts
deleted file mode 100644
index 75ae9af..0000000
--- a/node_modules/simple-git/src/lib/tasks/move.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { MoveResult } from '../../../typings';
-import { StringTask } from '../types';
-export declare function moveTask(from: string | string[], to: string): StringTask<MoveResult>;
diff --git a/node_modules/simple-git/src/lib/tasks/pull.d.ts b/node_modules/simple-git/src/lib/tasks/pull.d.ts
deleted file mode 100644
index c08062f..0000000
--- a/node_modules/simple-git/src/lib/tasks/pull.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { PullResult } from '../../../typings';
-import { Maybe, StringTask } from '../types';
-export declare function pullTask(remote: Maybe<string>, branch: Maybe<string>, customArgs: string[]): StringTask<PullResult>;
diff --git a/node_modules/simple-git/src/lib/tasks/push.d.ts b/node_modules/simple-git/src/lib/tasks/push.d.ts
deleted file mode 100644
index 4d18c71..0000000
--- a/node_modules/simple-git/src/lib/tasks/push.d.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import { PushResult } from '../../../typings';
-import { StringTask } from '../types';
-declare type PushRef = {
- remote?: string;
- branch?: string;
-};
-export declare function pushTagsTask(ref: PushRef | undefined, customArgs: string[]): StringTask<PushResult>;
-export declare function pushTask(ref: PushRef | undefined, customArgs: string[]): StringTask<PushResult>;
-export {};
diff --git a/node_modules/simple-git/src/lib/tasks/remote.d.ts b/node_modules/simple-git/src/lib/tasks/remote.d.ts
deleted file mode 100644
index fbaae7a..0000000
--- a/node_modules/simple-git/src/lib/tasks/remote.d.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { StringTask } from '../types';
-export declare function addRemoteTask(remoteName: string, remoteRepo: string, customArgs?: string[]): StringTask<string>;
-export declare function getRemotesTask(verbose: boolean): StringTask<any>;
-export declare function listRemotesTask(customArgs?: string[]): StringTask<string>;
-export declare function remoteTask(customArgs?: string[]): StringTask<string>;
-export declare function removeRemoteTask(remoteName: string): StringTask<string>;
diff --git a/node_modules/simple-git/src/lib/tasks/reset.d.ts b/node_modules/simple-git/src/lib/tasks/reset.d.ts
deleted file mode 100644
index 468fe87..0000000
--- a/node_modules/simple-git/src/lib/tasks/reset.d.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { Maybe, OptionFlags, Options } from '../types';
-export declare enum ResetMode {
- MIXED = "mixed",
- SOFT = "soft",
- HARD = "hard",
- MERGE = "merge",
- KEEP = "keep"
-}
-export declare type ResetOptions = Options & OptionFlags<'-q' | '--quiet' | '--no-quiet' | '--pathspec-from-nul'> & OptionFlags<'--pathspec-from-file', string>;
-export declare function resetTask(mode: Maybe<ResetMode>, customArgs: string[]): import("../types").StringTask<string>;
-export declare function getResetMode(mode: ResetMode | any): Maybe<ResetMode>;
diff --git a/node_modules/simple-git/src/lib/tasks/stash-list.d.ts b/node_modules/simple-git/src/lib/tasks/stash-list.d.ts
deleted file mode 100644
index 5bf9a9c..0000000
--- a/node_modules/simple-git/src/lib/tasks/stash-list.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { LogOptions, LogResult } from '../../../typings';
-import { StringTask } from '../types';
-export declare function stashListTask(opt: LogOptions<import("./log").DefaultLogFields> | undefined, customArgs: string[]): StringTask<LogResult>;
diff --git a/node_modules/simple-git/src/lib/tasks/status.d.ts b/node_modules/simple-git/src/lib/tasks/status.d.ts
deleted file mode 100644
index 45fec0f..0000000
--- a/node_modules/simple-git/src/lib/tasks/status.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { StatusResult } from '../../../typings';
-import { StringTask } from '../types';
-export declare function statusTask(customArgs: string[]): StringTask<StatusResult>;
diff --git a/node_modules/simple-git/src/lib/tasks/sub-module.d.ts b/node_modules/simple-git/src/lib/tasks/sub-module.d.ts
deleted file mode 100644
index ac4f6f8..0000000
--- a/node_modules/simple-git/src/lib/tasks/sub-module.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { StringTask } from '../types';
-export declare function addSubModuleTask(repo: string, path: string): StringTask<string>;
-export declare function initSubModuleTask(customArgs: string[]): StringTask<string>;
-export declare function subModuleTask(customArgs: string[]): StringTask<string>;
-export declare function updateSubModuleTask(customArgs: string[]): StringTask<string>;
diff --git a/node_modules/simple-git/src/lib/tasks/tag.d.ts b/node_modules/simple-git/src/lib/tasks/tag.d.ts
deleted file mode 100644
index b1dbb31..0000000
--- a/node_modules/simple-git/src/lib/tasks/tag.d.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { TagResult } from '../../../typings';
-import { StringTask } from '../types';
-/**
- * Task used by `git.tags`
- */
-export declare function tagListTask(customArgs?: string[]): StringTask<TagResult>;
-/**
- * Task used by `git.addTag`
- */
-export declare function addTagTask(name: string): StringTask<{
- name: string;
-}>;
-/**
- * Task used by `git.addTag`
- */
-export declare function addAnnotatedTagTask(name: string, tagMessage: string): StringTask<{
- name: string;
-}>;
diff --git a/node_modules/simple-git/src/lib/tasks/task.d.ts b/node_modules/simple-git/src/lib/tasks/task.d.ts
deleted file mode 100644
index 9c64e4e..0000000
--- a/node_modules/simple-git/src/lib/tasks/task.d.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { BufferTask, EmptyTaskParser, SimpleGitTask, StringTask } from '../types';
-export declare const EMPTY_COMMANDS: [];
-export declare type EmptyTask = {
- commands: typeof EMPTY_COMMANDS;
- format: 'empty';
- parser: EmptyTaskParser;
- onError?: undefined;
-};
-export declare function adhocExecTask(parser: EmptyTaskParser): EmptyTask;
-export declare function configurationErrorTask(error: Error | string): EmptyTask;
-export declare function straightThroughStringTask(commands: string[], trimmed?: boolean): StringTask<string>;
-export declare function straightThroughBufferTask(commands: string[]): BufferTask<any>;
-export declare function isBufferTask<R>(task: SimpleGitTask<R>): task is BufferTask<R>;
-export declare function isEmptyTask<R>(task: SimpleGitTask<R>): task is EmptyTask;
diff --git a/node_modules/simple-git/src/lib/types/handlers.d.ts b/node_modules/simple-git/src/lib/types/handlers.d.ts
deleted file mode 100644
index 3a788f3..0000000
--- a/node_modules/simple-git/src/lib/types/handlers.d.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { GitError } from '../errors/git-error';
-/**
- * The node-style callback to a task accepts either two arguments with the first as a null
- * and the second as the data, or just one argument which is an error.
- */
-export declare type SimpleGitTaskCallback<T = string, E extends GitError = GitError> = (err: E | null, data: T) => void;
-/**
- * The event data emitted to the progress handler whenever progress detail is received.
- */
-export interface SimpleGitProgressEvent {
- /** The underlying method called - push, pull etc */
- method: string;
- /** The type of progress being reported, note that any one task may emit many stages - for example `git clone` emits both `receiving` and `resolving` */
- stage: 'compressing' | 'counting' | 'receiving' | 'resolving' | 'unknown' | 'writing' | string;
- /** The percent progressed as a number 0 - 100 */
- progress: number;
- /** The number of items processed so far */
- processed: number;
- /** The total number of items to be processed */
- total: number;
-}
diff --git a/node_modules/simple-git/src/lib/types/index.d.ts b/node_modules/simple-git/src/lib/types/index.d.ts
deleted file mode 100644
index 89b2f00..0000000
--- a/node_modules/simple-git/src/lib/types/index.d.ts
+++ /dev/null
@@ -1,99 +0,0 @@
-/// <reference types="node" />
-import { SpawnOptions } from 'child_process';
-import { SimpleGitTask } from './tasks';
-import { SimpleGitProgressEvent } from './handlers';
-export * from './handlers';
-export * from './tasks';
-/**
- * Most tasks accept custom options as an array of strings as well as the
- * options object. Unless the task is explicitly documented as such, the
- * tasks will not accept both formats at the same time, preferring whichever
- * appears last in the arguments.
- */
-export declare type TaskOptions<O extends Options = Options> = string[] | O;
-/**
- * Options supplied in most tasks as an optional trailing object
- */
-export declare type OptionsValues = null | string | number;
-export declare type Options = Record<string, OptionsValues>;
-export declare type OptionFlags<FLAGS extends string, VALUE = null> = Partial<Record<FLAGS, VALUE>>;
-/**
- * A function called by the executor immediately after creating a child
- * process. Allows the calling application to implement custom handling of
- * the incoming stream of data from the `git`.
- */
-export declare type outputHandler = (command: string, stdout: NodeJS.ReadableStream, stderr: NodeJS.ReadableStream, args: string[]) => void;
-/**
- * Environment variables to be passed into the child process.
- */
-export declare type GitExecutorEnv = NodeJS.ProcessEnv | undefined;
-/**
- * Public interface of the Executor
- */
-export interface SimpleGitExecutor {
- env: GitExecutorEnv;
- outputHandler?: outputHandler;
- binary: string;
- cwd: string;
- chain(): SimpleGitExecutor;
- push<R>(task: SimpleGitTask<R>): Promise<R>;
-}
-/**
- * The resulting output from running the git child process
- */
-export interface GitExecutorResult {
- stdOut: Buffer[];
- stdErr: Buffer[];
- exitCode: number;
- rejection: Maybe<Error>;
-}
-export interface SimpleGitPluginConfig {
- /**
- * Configures the events that should be used to determine when the unederlying child process has
- * been terminated.
- *
- * Version 2 will default to use `onClose=true, onExit=50` to mean the `close` event will be
- * used to immediately treat the child process as closed and start using the data from `stdOut`
- * / `stdErr`, whereas the `exit` event will wait `50ms` before treating the child process
- * as closed.
- *
- * This will be changed in version 3 to use `onClose=true, onExit=false` so that only the
- * close event is used to determine the termination of the process.
- */
- completion: {
- onClose?: boolean | number;
- onExit?: boolean | number;
- };
- /**
- * Configures the content of errors thrown by the `simple-git` instance for each task
- */
- errors(error: Buffer | Error | undefined, result: Omit<GitExecutorResult, 'rejection'>): Buffer | Error | undefined;
- /**
- * Handler to be called with progress events emitted through the progress plugin
- */
- progress(data: SimpleGitProgressEvent): void;
- /**
- * Configuration for the `timeoutPlugin`
- */
- timeout: {
- /**
- * The number of milliseconds to wait after spawning the process / receiving
- * content on the stdOut/stdErr streams before forcibly closing the git process.
- */
- block: number;
- };
- spawnOptions: Pick<SpawnOptions, 'uid' | 'gid'>;
-}
-/**
- * Optional configuration settings to be passed to the `simpleGit`
- * builder.
- */
-export interface SimpleGitOptions extends Partial<SimpleGitPluginConfig> {
- baseDir: string;
- binary: string;
- maxConcurrentProcesses: number;
- config: string[];
-}
-export declare type Maybe<T> = T | undefined;
-export declare type MaybeArray<T> = T | T[];
-export declare type Primitives = string | number | boolean;
diff --git a/node_modules/simple-git/src/lib/types/tasks.d.ts b/node_modules/simple-git/src/lib/types/tasks.d.ts
deleted file mode 100644
index db96d18..0000000
--- a/node_modules/simple-git/src/lib/types/tasks.d.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-/// <reference types="node" />
-import { GitExecutorResult, SimpleGitExecutor } from './index';
-import { EmptyTask } from '../tasks/task';
-export declare type TaskResponseFormat = Buffer | string;
-export interface TaskParser<INPUT extends TaskResponseFormat, RESPONSE> {
- (stdOut: INPUT, stdErr: INPUT): RESPONSE;
-}
-export interface EmptyTaskParser {
- (executor: SimpleGitExecutor): void;
-}
-export interface SimpleGitTaskConfiguration<RESPONSE, FORMAT, INPUT extends TaskResponseFormat> {
- commands: string[];
- format: FORMAT;
- parser: TaskParser<INPUT, RESPONSE>;
- onError?: (result: GitExecutorResult, error: Error, done: (result: Buffer | Buffer[]) => void, fail: (error: string | Error) => void) => void;
-}
-export declare type StringTask<R> = SimpleGitTaskConfiguration<R, 'utf-8', string>;
-export declare type BufferTask<R> = SimpleGitTaskConfiguration<R, 'buffer', Buffer>;
-export declare type RunnableTask<R> = StringTask<R> | BufferTask<R>;
-export declare type SimpleGitTask<R> = RunnableTask<R> | EmptyTask;
diff --git a/node_modules/simple-git/src/lib/utils/argument-filters.d.ts b/node_modules/simple-git/src/lib/utils/argument-filters.d.ts
deleted file mode 100644
index 6be6925..0000000
--- a/node_modules/simple-git/src/lib/utils/argument-filters.d.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { Options, Primitives } from '../types';
-export interface ArgumentFilterPredicate<T> {
- (input: any): input is T;
-}
-export declare function filterType<T, K>(input: K, filter: ArgumentFilterPredicate<T>): K extends T ? T : undefined;
-export declare function filterType<T, K>(input: K, filter: ArgumentFilterPredicate<T>, def: T): T;
-export declare const filterArray: ArgumentFilterPredicate<Array<any>>;
-export declare function filterPrimitives(input: unknown, omit?: Array<'boolean' | 'string' | 'number'>): input is Primitives;
-export declare const filterString: ArgumentFilterPredicate<string>;
-export declare const filterStringArray: ArgumentFilterPredicate<string[]>;
-export declare const filterStringOrStringArray: ArgumentFilterPredicate<string | string[]>;
-export declare function filterPlainObject<T extends Options>(input: T | unknown): input is T;
-export declare function filterFunction(input: unknown): input is Function;
-export declare const filterHasLength: ArgumentFilterPredicate<{
- length: number;
-}>;
diff --git a/node_modules/simple-git/src/lib/utils/exit-codes.d.ts b/node_modules/simple-git/src/lib/utils/exit-codes.d.ts
deleted file mode 100644
index 1c389c7..0000000
--- a/node_modules/simple-git/src/lib/utils/exit-codes.d.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-/**
- * Known process exit codes used by the task parsers to determine whether an error
- * was one they can automatically handle
- */
-export declare enum ExitCodes {
- SUCCESS = 0,
- ERROR = 1,
- UNCLEAN = 128
-}
diff --git a/node_modules/simple-git/src/lib/utils/git-output-streams.d.ts b/node_modules/simple-git/src/lib/utils/git-output-streams.d.ts
deleted file mode 100644
index 72db466..0000000
--- a/node_modules/simple-git/src/lib/utils/git-output-streams.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-/// <reference types="node" />
-import { TaskResponseFormat } from '../types';
-export declare class GitOutputStreams<T extends TaskResponseFormat = Buffer> {
- readonly stdOut: T;
- readonly stdErr: T;
- constructor(stdOut: T, stdErr: T);
- asStrings(): GitOutputStreams<string>;
-}
diff --git a/node_modules/simple-git/src/lib/utils/index.d.ts b/node_modules/simple-git/src/lib/utils/index.d.ts
deleted file mode 100644
index 04cb604..0000000
--- a/node_modules/simple-git/src/lib/utils/index.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-export * from './argument-filters';
-export * from './exit-codes';
-export * from './git-output-streams';
-export * from './line-parser';
-export * from './simple-git-options';
-export * from './task-options';
-export * from './task-parser';
-export * from './util';
diff --git a/node_modules/simple-git/src/lib/utils/line-parser.d.ts b/node_modules/simple-git/src/lib/utils/line-parser.d.ts
deleted file mode 100644
index c50560a..0000000
--- a/node_modules/simple-git/src/lib/utils/line-parser.d.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-export declare class LineParser<T> {
- protected matches: string[];
- private _regExp;
- constructor(regExp: RegExp | RegExp[], useMatches?: (target: T, match: string[]) => boolean | void);
- parse: (line: (offset: number) => (string | undefined), target: T) => boolean;
- protected useMatches(target: T, match: string[]): boolean | void;
- protected resetMatches(): void;
- protected prepareMatches(): string[];
- protected addMatch(reg: RegExp, index: number, line?: string): boolean;
- protected pushMatch(_index: number, matched: string[]): void;
-}
-export declare class RemoteLineParser<T> extends LineParser<T> {
- protected addMatch(reg: RegExp, index: number, line?: string): boolean;
- protected pushMatch(index: number, matched: string[]): void;
-}
diff --git a/node_modules/simple-git/src/lib/utils/simple-git-options.d.ts b/node_modules/simple-git/src/lib/utils/simple-git-options.d.ts
deleted file mode 100644
index 552d68d..0000000
--- a/node_modules/simple-git/src/lib/utils/simple-git-options.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import { SimpleGitOptions } from '../types';
-export declare function createInstanceConfig(...options: Array<Partial<SimpleGitOptions> | undefined>): SimpleGitOptions;
diff --git a/node_modules/simple-git/src/lib/utils/task-options.d.ts b/node_modules/simple-git/src/lib/utils/task-options.d.ts
deleted file mode 100644
index 23d3705..0000000
--- a/node_modules/simple-git/src/lib/utils/task-options.d.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { Maybe, Options } from '../types';
-export declare function appendTaskOptions<T extends Options = Options>(options: Maybe<T>, commands?: string[]): string[];
-export declare function getTrailingOptions(args: IArguments, initialPrimitive?: number, objectOnly?: boolean): string[];
-/**
- * Given any number of arguments, returns the trailing options argument, ignoring a trailing function argument
- * if there is one. When not found, the return value is null.
- */
-export declare function trailingOptionsArgument(args: IArguments): Maybe<Options>;
-/**
- * Returns either the source argument when it is a `Function`, or the default
- * `NOOP` function constant
- */
-export declare function trailingFunctionArgument(args: unknown[] | IArguments | unknown, includeNoop?: boolean): Maybe<(...args: any[]) => unknown>;
diff --git a/node_modules/simple-git/src/lib/utils/task-parser.d.ts b/node_modules/simple-git/src/lib/utils/task-parser.d.ts
deleted file mode 100644
index 5734495..0000000
--- a/node_modules/simple-git/src/lib/utils/task-parser.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { TaskParser, TaskResponseFormat } from '../types';
-import { GitOutputStreams } from './git-output-streams';
-import { LineParser } from './line-parser';
-export declare function callTaskParser<INPUT extends TaskResponseFormat, RESPONSE>(parser: TaskParser<INPUT, RESPONSE>, streams: GitOutputStreams<INPUT>): RESPONSE;
-export declare function parseStringResponse<T>(result: T, parsers: LineParser<T>[], ...texts: string[]): T;
diff --git a/node_modules/simple-git/src/lib/utils/util.d.ts b/node_modules/simple-git/src/lib/utils/util.d.ts
deleted file mode 100644
index 5f0b543..0000000
--- a/node_modules/simple-git/src/lib/utils/util.d.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-/// <reference types="node" />
-import { Maybe } from '../types';
-export declare const NULL = "\0";
-export declare const NOOP: (...args: any[]) => void;
-/**
- * Returns either the source argument when it is a `Function`, or the default
- * `NOOP` function constant
- */
-export declare function asFunction<T extends () => any>(source: T | any): T;
-/**
- * Determines whether the supplied argument is both a function, and is not
- * the `NOOP` function.
- */
-export declare function isUserFunction<T extends Function>(source: T | any): source is T;
-export declare function splitOn(input: string, char: string): [string, string];
-export declare function first<T extends any[]>(input: T, offset?: number): Maybe<T[number]>;
-export declare function first<T extends IArguments>(input: T, offset?: number): Maybe<unknown>;
-export declare function last<T extends any[]>(input: T, offset?: number): Maybe<T[number]>;
-export declare function last<T extends IArguments>(input: T, offset?: number): Maybe<unknown>;
-export declare function last<T>(input: T, offset?: number): Maybe<unknown>;
-export declare function toLinesWithContent(input?: string, trimmed?: boolean, separator?: string): string[];
-declare type LineWithContentCallback<T = void> = (line: string) => T;
-export declare function forEachLineWithContent<T>(input: string, callback: LineWithContentCallback<T>): T[];
-export declare function folderExists(path: string): boolean;
-/**
- * Adds `item` into the `target` `Array` or `Set` when it is not already present and returns the `item`.
- */
-export declare function append<T>(target: T[] | Set<T>, item: T): typeof item;
-/**
- * Adds `item` into the `target` `Array` when it is not already present and returns the `target`.
- */
-export declare function including<T>(target: T[], item: T): typeof target;
-export declare function remove<T>(target: Set<T> | T[], item: T): T;
-export declare const objectToString: (input: any) => string;
-export declare function asArray<T>(source: T | T[]): T[];
-export declare function asStringArray<T>(source: T | T[]): string[];
-export declare function asNumber(source: string | null | undefined, onNaN?: number): number;
-export declare function prefixedArray<T>(input: T[], prefix: T): T[];
-export declare function bufferToString(input: Buffer | Buffer[]): string;
-/**
- * Get a new object from a source object with only the listed properties.
- */
-export declare function pick(source: Record<string, any>, properties: string[]): any;
-export declare function delay(duration?: number): Promise<void>;
-export {};
diff --git a/node_modules/simple-git/typings/errors.d.ts b/node_modules/simple-git/typings/errors.d.ts
deleted file mode 100644
index a7eb176..0000000
--- a/node_modules/simple-git/typings/errors.d.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-
-export * from '../src/lib/errors/git-error';
-export * from '../src/lib/errors/git-construct-error';
-export * from '../src/lib/errors/git-plugin-error';
-export * from '../src/lib/errors/git-response-error';
-export * from '../src/lib/errors/task-configuration-error';
diff --git a/node_modules/simple-git/typings/index.d.ts b/node_modules/simple-git/typings/index.d.ts
deleted file mode 100644
index fc284f2..0000000
--- a/node_modules/simple-git/typings/index.d.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { SimpleGitFactory } from './simple-git';
-
-export * from './simple-git';
-export * from './errors';
-export * from './response';
-export * from './types';
-
-export declare const gitP: SimpleGitFactory;
-
-declare const simpleGit: SimpleGitFactory;
-export default simpleGit;
diff --git a/node_modules/simple-git/typings/response.d.ts b/node_modules/simple-git/typings/response.d.ts
deleted file mode 100644
index 795e5af..0000000
--- a/node_modules/simple-git/typings/response.d.ts
+++ /dev/null
@@ -1,538 +0,0 @@
-import { DefaultLogFields } from '../src/lib/tasks/log';
-
-export interface BranchSummaryBranch {
- current: boolean;
- name: string;
- commit: string;
- label: string;
-}
-
-export interface BranchSummary {
- detached: boolean;
- current: string;
- all: string[];
- branches: {
- [key: string]: BranchSummaryBranch;
- };
-}
-
-/**
- * Represents the successful deletion of a single branch
- */
-export interface BranchSingleDeleteSuccess {
- branch: string;
- hash: string;
- success: true;
-}
-
-/**
- * Represents the failure to delete a single branch
- */
-export interface BranchSingleDeleteFailure {
- branch: string;
- hash: null;
- success: false;
-}
-
-export type BranchSingleDeleteResult = BranchSingleDeleteFailure | BranchSingleDeleteSuccess;
-
-/**
- * Represents the status of having deleted a batch of branches
- */
-export interface BranchMultiDeleteResult {
- /**
- * All branches included in the response
- */
- all: BranchSingleDeleteResult[];
-
- /**
- * Branches mapped by their branch name
- */
- branches: { [branchName: string]: BranchSingleDeleteResult };
-
- /**
- * Array of responses that are in error
- */
- errors: BranchSingleDeleteResult[];
-
- /**
- * Flag showing whether all branches were deleted successfully
- */
- readonly success: boolean;
-}
-
-export interface CleanSummary {
- readonly dryRun: boolean;
- paths: string[];
- files: string[];
- folders: string[];
-}
-
-export interface CommitResult {
- author: null | {
- email: string;
- name: string;
- };
- branch: string;
- commit: string;
- root: boolean;
- summary: {
- changes: number;
- insertions: number;
- deletions: number;
- };
-}
-
-/** Represents the response to using `git.getConfig` */
-export interface ConfigGetResult {
- /** The key that was searched for */
- key: string;
-
- /** The single value seen by `git` for this key (equivalent to `git config --get key`) */
- value: string | null;
-
- /** All possible values for this key no matter the scope (equivalent to `git config --get-all key`) */
- values: string[];
-
- /** The file paths from which configuration was read */
- paths: string[];
-
- /**
- * The full hierarchy of values the property can have had across the
- * various scopes that were searched (keys in this Map are the strings
- * also found in the `paths` array).
- */
- scopes: Map<string, string[]>;
-}
-
-/**
- * Represents the current git configuration, as defined by the output from `git log`
- */
-export interface ConfigListSummary {
-
- /**
- * All configuration settings, where local/user settings override user/global settings
- * the overridden value will appear in this object.
- */
- readonly all: ConfigValues;
-
- /**
- * The file paths configuration was read from
- */
- files: string[];
-
- /**
- * The `ConfigValues` for each of the `files`, use this object to determine
- * local repo, user and global settings.
- */
- values: { [fileName: string]: ConfigValues };
-}
-
-/**
- * Represents the map of configuration settings
- */
-export interface ConfigValues {
- [key: string]: string | string[];
-}
-
-export interface DiffResultTextFile {
- file: string;
- changes: number;
- insertions: number;
- deletions: number;
- binary: false;
-}
-
-export interface DiffResultBinaryFile {
- file: string;
- before: number;
- after: number;
- binary: true;
-}
-
-export interface DiffResult {
- /** The total number of files changed as reported in the summary line */
- changed: number;
-
- /** When present in the diff, lists the details of each file changed */
- files: Array<DiffResultTextFile | DiffResultBinaryFile>;
-
- /** The number of files changed with insertions */
- insertions: number;
-
- /** The number of files changed with deletions */
- deletions: number;
-}
-
-export interface FetchResult {
- raw: string;
- remote: string | null;
- branches: {
- name: string;
- tracking: string;
- }[];
- tags: {
- name: string;
- tracking: string;
- }[];
-}
-
-/** Represents the response to git.grep */
-export interface GrepResult {
- paths: Set<string>;
- results: Record<string, Array<{
- line: number;
- path: string;
- preview: string;
- }>>;
-}
-
-/**
- * The `InitResult` is returned when (re)initialising a git repo.
- */
-export interface InitResult {
- /**
- * Boolean representing whether the `--bare` option was used
- */
- readonly bare: boolean;
-
- /**
- * Boolean representing whether the repo already existed (re-initialised rather than initialised)
- */
- readonly existing: boolean;
-
- /**
- * The path used when initialising
- */
- readonly path: string;
-
- /**
- * The git configuration directory - for a bare repo this is the same as `path`, in non-bare repos
- * this will usually be a sub-directory with the name `.git` (or value of the `$GIT_DIR` environment
- * variable).
- */
- readonly gitDir: string;
-}
-
-/**
- * A parsed response summary for calls to `git mv`
- */
-export interface MoveResult {
- /**
- * Array of files moved
- */
- moves: Array<{ from: string, to: string }>;
-}
-
-export interface PullDetailFileChanges {
- [fileName: string]: number;
-}
-
-export interface PullDetailSummary {
- changes: number;
- insertions: number;
- deletions: number;
-}
-
-export interface PullDetail {
- /** Array of all files that are referenced in the pull */
- files: string[];
-
- /** Map of file names to the number of insertions in that file */
- insertions: PullDetailFileChanges;
-
- /** Map of file names to the number of deletions in that file */
- deletions: PullDetailFileChanges;
-
- summary: PullDetailSummary;
-
- /** Array of file names that have been created */
- created: string[];
-
- /** Array of file names that have been deleted */
- deleted: string[];
-}
-
-export interface PullResult extends PullDetail, RemoteMessageResult {
-}
-
-/**
- * Wrapped with the `GitResponseError` as the exception thrown from a `git.pull` task
- * to provide additional detail as to what failed.
- */
-export interface PullFailedResult {
- remote: string,
- hash: {
- local: string;
- remote: string;
- },
- branch: {
- local: string;
- remote: string;
- },
- message: string;
-}
-
-/**
- * Represents file name changes in a StatusResult
- */
-export interface StatusResultRenamed {
- from: string;
- to: string;
-}
-
-export interface FileStatusResult {
-
- /** Original location of the file, when the file has been moved */
- from?: string
-
- /** Path of the file */
- path: string;
-
- /** First digit of the status code of the file, e.g. 'M' = modified.
- Represents the status of the index if no merge conflicts, otherwise represents
- status of one side of the merge. */
- index: string;
-
- /** Second digit of the status code of the file. Represents status of the working directory
- if no merge conflicts, otherwise represents status of other side of a merge. */
- working_dir: string;
-}
-
-/**
- * The StatusResult is returned for calls to `git.status()`, represents the state of the
- * working directory.
- */
-export interface StatusResult {
- not_added: string[];
- conflicted: string[];
- created: string[];
- deleted: string[];
-
- /**
- * Ignored files are not listed by default, add `--ignored` to the task options in order to see
- * this array of ignored files/paths.
- *
- * Note: ignored files will not be added to the `files` array, and will not be included in the
- * `isClean()` calculation.
- */
- ignored?: string[];
- modified: string[];
- renamed: StatusResultRenamed[];
- staged: string[];
-
- /**
- * All files represented as an array of objects containing the `path` and status in `index` and
- * in the `working_dir`.
- */
- files: FileStatusResult[];
-
- /**
- * Number of commits ahead of the tracked branch
- */
- ahead: number;
-
- /**
- *Number of commits behind the tracked branch
- */
- behind: number;
-
- /**
- * Name of the current branch
- */
- current: string | null;
-
- /**
- * Name of the branch being tracked
- */
- tracking: string | null;
-
- /**
- * Detached status of the working copy, for more detail of what the working branch
- * is detached from use `git.branch()`
- */
- detached: boolean;
-
- /**
- * Gets whether this represents a clean working branch.
- */
- isClean(): boolean;
-}
-
-/**
- * Response retrieved when using the `git.tags` method
- */
-export interface TagResult {
- /**
- * All tag names
- */
- all: string[];
-
- /**
- * The semver latest tag name or `undefined` when no tags are named in the response
- */
- latest: string | undefined;
-}
-
-/**
- * The ListLogLine represents a single entry in the `git.log`, the properties on the object
- * are mixed in depending on the names used in the format (see `DefaultLogFields`), but some
- * properties are dependent on the command used.
- */
-export interface ListLogLine {
- /**
- * When using a `--stat=4096` or `--shortstat` options in the `git.log` or `git.stashList`,
- * each entry in the `ListLogSummary` will also have a `diff` property representing as much
- * detail as was given in the response.
- */
- diff?: DiffResult;
-}
-
-export interface LogResult<T = DefaultLogFields> {
- all: ReadonlyArray<T & ListLogLine>;
- total: number;
- latest: (T & ListLogLine) | null;
-}
-
-/**
- * Where the file was deleted, if there is a modify/delete conflict
- */
-export interface MergeConflictDeletion {
- deleteRef: string;
-}
-
-/**
- * Represents a single file with conflicts in the MergeSummary
- */
-export interface MergeConflict {
-
- /**
- * Type of conflict
- */
- reason: string;
-
- /**
- * Path to file
- */
- file: string | null;
-
- /**
- * Additional detail for the specific type of conflict
- */
- meta?: MergeConflictDeletion;
-}
-
-export type MergeResultStatus = 'success' | string;
-
-export interface MergeDetail {
- conflicts: MergeConflict[];
- merges: string[];
- result: MergeResultStatus;
- readonly failed: boolean;
-}
-
-export type MergeResult = PullResult & MergeDetail;
-
-/**
- *
- */
-export interface PushResultPushedItem {
- local: string;
- remote: string;
-
- readonly deleted: boolean;
- readonly tag: boolean;
- readonly branch: boolean;
- readonly new: boolean;
- readonly alreadyUpdated: boolean;
-}
-
-export interface RemoteMessagesObjectEnumeration {
- enumerating: number,
- counting: number,
- compressing: number,
- total: {
- count: number,
- delta: number,
- },
- reused: {
- count: number,
- delta: number,
- },
- packReused: number,
-}
-
-export interface RemoteMessages {
- all: string[];
- objects?: RemoteMessagesObjectEnumeration;
-}
-
-export interface PushResultRemoteMessages extends RemoteMessages {
- pullRequestUrl?: string;
- vulnerabilities?: {
- count: number;
- summary: string;
- url: string;
- };
-}
-
-export interface RemoteMessageResult<T extends RemoteMessages = RemoteMessages> {
- remoteMessages: T;
-}
-
-export interface PushResultBranchUpdate {
- head: {
- local: string;
- remote: string;
- };
- hash: {
- from: string;
- to: string;
- };
-}
-
-export interface PushDetail {
- repo?: string;
- ref?: {
- local: string;
- };
- pushed: PushResultPushedItem[];
- branch?: {
- local: string;
- remote: string;
- remoteName: string;
- };
- update?: PushResultBranchUpdate;
-}
-
-export interface PushResult extends PushDetail, RemoteMessageResult<PushResultRemoteMessages> {
-}
-
-/**
- * @deprecated
- * For consistent naming, please use `CommitResult` instead of `CommitSummary`
- */
-export type CommitSummary = CommitResult;
-
-/**
- * @deprecated
- * For consistent naming, please use `MergeResult` instead of `MergeSummary`
- */
-export type MergeSummary = MergeResult;
-
-/**
- * @deprecated to aid consistent naming, please use `BranchSingleDeleteResult` instead of `BranchDeletionSummary`.
- */
-export type BranchDeletionSummary = BranchSingleDeleteResult;
-
-/**
- * @deprecated to aid consistent naming, please use `BranchMultiDeleteResult` instead of `BranchDeletionBatchSummary`.
- */
-export type BranchDeletionBatchSummary = BranchMultiDeleteResult;
-
-export type MoveSummary = MoveResult;
-
-/**
- * @deprecated to aid consistent naming, please use `LogResult` instead of `ListLogSummary`.
- */
-export type ListLogSummary<T = DefaultLogFields> = LogResult<T>;
diff --git a/node_modules/simple-git/typings/simple-git.d.ts b/node_modules/simple-git/typings/simple-git.d.ts
deleted file mode 100644
index af54d77..0000000
--- a/node_modules/simple-git/typings/simple-git.d.ts
+++ /dev/null
@@ -1,650 +0,0 @@
-import * as resp from './response';
-import * as types from './types';
-import { GitError } from './errors';
-
-export interface SimpleGitFactory {
- (baseDir?: string, options?: Partial<types.SimpleGitOptions>): SimpleGit;
-
- (baseDir: string): SimpleGit;
-
- (options: Partial<types.SimpleGitOptions>): SimpleGit;
-}
-
-export type Response<T> = SimpleGit & Promise<T>;
-
-export interface SimpleGitBase {
- /**
- * Adds one or more files to source control
- */
- add(files: string | string[], callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- /**
- * Sets the working directory of the subsequent commands.
- */
- cwd(directory: { path: string, root?: boolean }, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- cwd<path extends string>(directory: path, callback?: types.SimpleGitTaskCallback<path>): Response<path>;
-
- /**
- * Compute object ID from a file
- */
- hashObject(path: string, callback?: types.SimpleGitTaskCallback): Response<string>;
-
- hashObject(path: string, write ?: boolean, callback?: types.SimpleGitTaskCallback): Response<string>;
-
- /**
- * Initialize a git repo
- */
- init(bare: boolean, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<resp.InitResult>): Response<resp.InitResult>;
-
- init(bare: boolean, callback?: types.SimpleGitTaskCallback<resp.InitResult>): Response<resp.InitResult>;
-
- init(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<resp.InitResult>): Response<resp.InitResult>;
-
- init(callback?: types.SimpleGitTaskCallback<resp.InitResult>): Response<resp.InitResult>;
-
- /**
- * Runs a merge, `options` can be either an array of arguments
- * supported by the [`git merge`](https://git-scm.com/docs/git-merge)
- * or an options object.
- *
- * Conflicts during the merge result in an error response,
- * the response type whether it was an error or success will be a MergeSummary instance.
- * When successful, the MergeSummary has all detail from a the PullSummary
- *
- * @see https://github.com/steveukx/git-js/blob/master/src/responses/MergeSummary.js
- * @see https://github.com/steveukx/git-js/blob/master/src/responses/PullSummary.js
- */
- merge(options: types.TaskOptions, callback?: types.SimpleGitTaskCallback<resp.MergeResult>): Response<resp.MergeResult>;
-
- /**
- * Merges from one branch to another, equivalent to running `git merge ${remote} ${branch}`, the `options` argument can
- * either be an array of additional parameters to pass to the command or null / omitted to be ignored.
- */
- mergeFromTo<E extends GitError>(remote: string, branch: string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<resp.MergeResult, E>): Response<resp.MergeResult>;
-
- mergeFromTo<E extends GitError>(remote: string, branch: string, callback?: types.SimpleGitTaskCallback<resp.MergeResult, E>): Response<resp.MergeResult>;
-
- /**
- * Sets a handler function to be called whenever a new child process is created, the handler function will be called
- * with the name of the command being run and the stdout & stderr streams used by the ChildProcess.
- *
- * @example
- * require('simple-git')
- * .outputHandler(function (command, stdout, stderr) {
- * stdout.pipe(process.stdout);
- * })
- * .checkout('https://github.com/user/repo.git');
- *
- * @see https://nodejs.org/api/child_process.html#child_process_class_childprocess
- * @see https://nodejs.org/api/stream.html#stream_class_stream_readable
- */
- outputHandler(handler: types.outputHandler | void): this;
-
- /**
- * Pushes the current committed changes to a remote, optionally specify the names of the remote and branch to use
- * when pushing. Supply multiple options as an array of strings in the first argument - see examples below.
- */
- push(remote?: string, branch?: string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<resp.PushResult>): Response<resp.PushResult>;
-
- push(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<resp.PushResult>): Response<resp.PushResult>;
-
- push(callback?: types.SimpleGitTaskCallback<resp.PushResult>): Response<resp.PushResult>;
-
- /**
- * Stash the local repo
- */
- stash(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- stash(callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- /**
- * Show the working tree status.
- */
- status(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<resp.StatusResult>): Response<resp.StatusResult>;
-
- status(callback?: types.SimpleGitTaskCallback<resp.StatusResult>): Response<resp.StatusResult>;
-
-}
-
-export interface SimpleGit extends SimpleGitBase {
-
- /**
- * Add an annotated tag to the head of the current branch
- */
- addAnnotatedTag(tagName: string, tagMessage: string, callback?: types.SimpleGitTaskCallback<{ name: string }>): Response<{ name: string }>;
-
- /**
- * Add config to local git instance for the specified `key` (eg: user.name) and value (eg: 'your name').
- * Set `append` to true to append to rather than overwrite the key
- */
- addConfig(key: string, value: string, append?: boolean, scope?: keyof typeof types.GitConfigScope, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- addConfig(key: string, value: string, append?: boolean, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- addConfig(key: string, value: string, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- /**
- * Applies a patch to the repo
- */
- applyPatch(patches: string | string[], options: types.TaskOptions<types.ApplyOptions>, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- applyPatch(patches: string | string[], callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- /**
- * Configuration values visible to git in the current working directory
- */
- listConfig(scope: keyof typeof types.GitConfigScope, callback?: types.SimpleGitTaskCallback<resp.ConfigListSummary>): Response<resp.ConfigListSummary>;
-
- listConfig(callback?: types.SimpleGitTaskCallback<resp.ConfigListSummary>): Response<resp.ConfigListSummary>;
-
- /**
- * Adds a remote to the list of remotes.
- *
- * - `remoteName` Name of the repository - eg "upstream"
- * - `remoteRepo` Fully qualified SSH or HTTP(S) path to the remote repo
- * - `options` Optional additional settings permitted by the `git remote add` command, merged into the command prior to the repo name and remote url
- */
- addRemote(remoteName: string, remoteRepo: string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- addRemote(remoteName: string, remoteRepo: string, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- /**
- * Add a lightweight tag to the head of the current branch
- */
- addTag(name: string, callback?: types.SimpleGitTaskCallback<{ name: string }>): Response<{ name: string }>;
-
- /**
- * Equivalent to `catFile` but will return the native `Buffer` of content from the git command's stdout.
- */
- binaryCatFile(options: string[], callback?: types.SimpleGitTaskCallback<any>): Response<any>;
-
- /**
- * List all branches
- */
- branch(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<resp.BranchSummary>): Response<resp.BranchSummary>;
-
- /**
- * List of local branches
- */
- branchLocal(callback?: types.SimpleGitTaskCallback<resp.BranchSummary>): Response<resp.BranchSummary>;
-
- /**
- * Returns a list of objects in a tree based on commit hash.
- * Passing in an object hash returns the object's content, size, and type.
- *
- * Passing "-p" will instruct cat-file to determine the object type, and display its formatted contents.
- *
- * @see https://git-scm.com/docs/git-cat-file
- */
- catFile(options: string[], callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- catFile(callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- /**
- * Check if a pathname or pathnames are excluded by .gitignore
- *
- */
- checkIgnore(pathNames: string[], callback?: types.SimpleGitTaskCallback<string[]>): Response<string[]>;
-
- checkIgnore(path: string, callback?: types.SimpleGitTaskCallback<string[]>): Response<string[]>;
-
- /**
- * Validates that the current working directory is a valid git repo file path.
- *
- * To make a more specific assertion of the repo, add the `action` argument:
- *
- * - `bare` to validate that the working directory is inside a bare repo.
- * - `root` to validate that the working directory is the root of a repo.
- * - `tree` (default value when omitted) to simply validate that the working
- * directory is the descendent of a repo
- */
- checkIsRepo(action?: types.CheckRepoActions, callback?: types.SimpleGitTaskCallback<boolean>): Response<boolean>;
-
- checkIsRepo(callback?: types.SimpleGitTaskCallback<boolean>): Response<boolean>;
-
- /**
- * Checkout a tag or revision, any number of additional arguments can be passed to the `git checkout` command
- * by supplying either a string or array of strings as the `what` parameter.
- */
- checkout(what: string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- checkout(what: string, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- checkout(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- /**
- * Checkout a remote branch.
- *
- * - branchName name of branch.
- * - startPoint (e.g origin/development).
- */
- checkoutBranch(branchName: string, startPoint: string, callback?: types.SimpleGitTaskCallback<void>): Response<void>;
-
- /**
- * Internally uses pull and tags to get the list of tags then checks out the latest tag.
- */
- checkoutLatestTag(branchName: string, startPoint: string, callback?: types.SimpleGitTaskCallback<void>): Response<void>;
-
- /**
- * Checkout a local branch
- */
- checkoutLocalBranch(branchName: string, callback?: types.SimpleGitTaskCallback<void>): Response<void>;
-
- /**
- * Deletes unwanted content from the local repo - when supplying the first argument as
- * an array of `CleanOptions`, the array must include one of `CleanOptions.FORCE` or
- * `CleanOptions.DRY_RUN`.
- *
- * eg:
- *
- * ```typescript
- await git.clean(CleanOptions.FORCE);
- await git.clean(CleanOptions.DRY_RUN + CleanOptions.RECURSIVE);
- await git.clean(CleanOptions.FORCE, ['./path']);
- await git.clean(CleanOptions.IGNORED + CleanOptions.FORCE, {'./path': null});
- * ```
- */
- clean(args: types.CleanOptions[], options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<resp.CleanSummary>): Response<resp.CleanSummary>;
-
- clean(mode: types.CleanMode | string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<resp.CleanSummary>): Response<resp.CleanSummary>;
-
- clean(mode: types.CleanMode | string, callback?: types.SimpleGitTaskCallback<resp.CleanSummary>): Response<resp.CleanSummary>;
-
- clean(options?: types.TaskOptions): Response<resp.CleanSummary>;
-
- clean(callback?: types.SimpleGitTaskCallback<resp.CleanSummary>): Response<resp.CleanSummary>;
-
- /**
- * Clears the queue of pending commands and returns the wrapper instance for chaining.
- */
- clearQueue(): this;
-
- /**
- * Clone a repository into a new directory.
- *
- * - repoPath repository url to clone e.g. https://github.com/steveukx/git-js.git
- * - localPath local folder path to clone to.
- * - options supported by [git](https://git-scm.com/docs/git-clone).
- */
- clone(repoPath: string, localPath: string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- clone(repoPath: string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- /**
- * Commits changes in the current working directory - when specific file paths are supplied, only changes on those
- * files will be committed.
- */
- commit(
- message: string | string[],
- files?: string | string[],
- options?: types.Options,
- callback?: types.SimpleGitTaskCallback<resp.CommitResult>): Response<resp.CommitResult>;
-
- commit(
- message: string | string[],
- options?: types.TaskOptions,
- callback?: types.SimpleGitTaskCallback<resp.CommitResult>): Response<resp.CommitResult>;
-
- commit(
- message: string | string[],
- files?: string | string[],
- callback?: types.SimpleGitTaskCallback<resp.CommitResult>): Response<resp.CommitResult>;
-
- commit(
- message: string | string[],
- callback?: types.SimpleGitTaskCallback<resp.CommitResult>): Response<resp.CommitResult>;
-
- /**
- * Sets the path to a custom git binary, should either be `git` when there is an installation of git available on
- * the system path, or a fully qualified path to the executable.
- */
- customBinary(command: string): this;
-
- /**
- * Delete one local branch. Supply the branchName as a string to return a
- * single `BranchDeletionSummary` instances.
- *
- * - branchName name of branch
- * - forceDelete (optional, defaults to false) set to true to forcibly delete unmerged branches
- */
- deleteLocalBranch(branchName: string, forceDelete?: boolean, callback?: types.SimpleGitTaskCallback<resp.BranchSingleDeleteResult>): Response<resp.BranchSingleDeleteResult>;
-
- deleteLocalBranch(branchName: string, callback?: types.SimpleGitTaskCallback<resp.BranchSingleDeleteResult>): Response<resp.BranchSingleDeleteResult>;
-
- /**
- * Delete one or more local branches. Supply the branchName as a string to return a
- * single `BranchDeletionSummary` or as an array of branch names to return an array of
- * `BranchDeletionSummary` instances.
- *
- * - branchNames name of branch or array of branch names
- * - forceDelete (optional, defaults to false) set to true to forcibly delete unmerged branches
- */
- deleteLocalBranches(branchNames: string[], forceDelete?: boolean, callback?: types.SimpleGitTaskCallback<resp.BranchMultiDeleteResult>): Response<resp.BranchMultiDeleteResult>;
-
- /**
- * Get the diff of the current repo compared to the last commit with a set of options supplied as a string.
- */
- diff(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- /**
- * Gets a summary of the diff for files in the repo, uses the `git diff --stat` format to calculate changes.
- *
- * in order to get staged (only): `--cached` or `--staged`.
- */
- diffSummary(command: string | number, options: types.TaskOptions, callback?: types.SimpleGitTaskCallback<resp.DiffResult>): Response<resp.DiffResult>;
-
- diffSummary(command: string | number, callback?: types.SimpleGitTaskCallback<resp.DiffResult>): Response<resp.DiffResult>;
-
- diffSummary(options: types.TaskOptions, callback?: types.SimpleGitTaskCallback<resp.DiffResult>): Response<resp.DiffResult>;
-
- diffSummary(callback?: types.SimpleGitTaskCallback<resp.DiffResult>): Response<resp.DiffResult>;
-
- /**
- * Sets an environment variable for the spawned child process, either supply both a name and value as strings or
- * a single object to entirely replace the current environment variables.
- *
- * @param {string|Object} name
- * @param {string} [value]
- */
- env(name: string, value: string): this;
-
- env(env: object): this;
-
- /**
- * Calls the supplied `handle` function at the next step in the chain, used to run arbitrary functions synchronously
- * before the next task in the git api.
- */
- exec(handle: () => void): Response<void>;
-
- /**
- * Updates the local working copy database with changes from the default remote repo and branch.
- */
- fetch(remote: string, branch: string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<resp.FetchResult>): Response<resp.FetchResult>;
-
- fetch(remote: string, branch: string, callback?: types.SimpleGitTaskCallback<resp.FetchResult>): Response<resp.FetchResult>;
-
- fetch(remote: string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<resp.FetchResult>): Response<resp.FetchResult>;
-
- fetch(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<resp.FetchResult>): Response<resp.FetchResult>;
-
- fetch(callback?: types.SimpleGitTaskCallback<resp.FetchResult>): Response<resp.FetchResult>;
-
- /**
- * Gets the current value of a configuration property by it key, optionally specify the scope in which
- * to run the command (omit / set to `undefined` to check in the complete overlaid configuration visible
- * to the `git` process).
- */
- getConfig(key: string, scope?: keyof typeof types.GitConfigScope, callback?: types.SimpleGitTaskCallback<string>): Response<resp.ConfigGetResult>;
-
- /**
- * Gets the currently available remotes, setting the optional verbose argument to true includes additional
- * detail on the remotes themselves.
- */
- getRemotes(callback?: types.SimpleGitTaskCallback<types.RemoteWithoutRefs[]>): Response<types.RemoteWithoutRefs[]>;
-
- getRemotes(verbose?: false, callback?: types.SimpleGitTaskCallback<types.RemoteWithoutRefs[]>): Response<types.RemoteWithoutRefs[]>;
-
- getRemotes(verbose: true, callback?: types.SimpleGitTaskCallback<types.RemoteWithRefs[]>): Response<types.RemoteWithRefs[]>;
-
- /**
- * Search for files matching the supplied search terms
- */
- grep(searchTerm: string | types.GitGrepQuery, callback?: types.SimpleGitTaskCallback<resp.GrepResult>): Response<resp.GrepResult>;
-
- grep(searchTerm: string | types.GitGrepQuery, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<resp.GrepResult>): Response<resp.GrepResult>;
-
- /**
- * List remotes by running the `ls-remote` command with any number of arbitrary options
- * in either array of object form.
- */
- listRemote(args?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- /**
- * Show commit logs from `HEAD` to the first commit.
- * If provided between `options.from` and `options.to` tags or branch.
- *
- * You can provide `options.file`, which is the path to a file in your repository. Then only this file will be considered.
- *
- * To use a custom splitter in the log format, set `options.splitter` to be the string the log should be split on.
- *
- * By default the following fields will be part of the result:
- * `hash`: full commit hash
- * `date`: author date, ISO 8601-like format
- * `message`: subject + ref names, like the --decorate option of git-log
- * `author_name`: author name
- * `author_email`: author mail
- * You can specify `options.format` to be an mapping from key to a format option like `%H` (for commit hash).
- * The fields specified in `options.format` will be the fields in the result.
- *
- * Options can also be supplied as a standard options object for adding custom properties supported by the git log command.
- * For any other set of options, supply options as an array of strings to be appended to the git log command.
- *
- * @returns Response<ListLogSummary>
- *
- * @see https://git-scm.com/docs/git-log
- */
- log<T = types.DefaultLogFields>(options?: types.TaskOptions | types.LogOptions<T>, callback?: types.SimpleGitTaskCallback<resp.LogResult<T>>): Response<resp.LogResult<T>>;
-
- /**
- * Mirror a git repo
- *
- * Equivalent to `git.clone(repoPath, localPath, ['--mirror'])`, `clone` allows
- * for additional task options.
- */
- mirror(repoPath: string, localPath: string, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- /**
- * Moves one or more files to a new destination.
- *
- * @see https://git-scm.com/docs/git-mv
- */
- mv(from: string | string[], to: string, callback?: types.SimpleGitTaskCallback<resp.MoveSummary>): Response<resp.MoveSummary>;
-
- /**
- * Fetch from and integrate with another repository or a local branch. In the case that the `git pull` fails with a
- * recognised fatal error, the exception thrown by this function will be a `GitResponseError<PullFailedResult>`.
- */
- pull(remote?: string, branch?: string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<resp.PullResult>): Response<resp.PullResult>;
-
- pull(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<resp.PullResult>): Response<resp.PullResult>;
-
- pull(callback?: types.SimpleGitTaskCallback<resp.PullResult>): Response<resp.PullResult>;
-
- /**
- * Pushes the current tag changes to a remote which can be either a URL or named remote. When not specified uses the
- * default configured remote spec.
- */
- pushTags(remote: string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<resp.PushResult>): Response<resp.PushResult>;
-
- pushTags(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<resp.PushResult>): Response<resp.PushResult>;
-
- pushTags(callback?: types.SimpleGitTaskCallback<resp.PushResult>): Response<resp.PushResult>;
-
- /**
- * Executes any command against the git binary.
- */
- raw(commands: string | string[] | types.TaskOptions, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- raw(options: types.TaskOptions, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- raw(...commands: string[]): Response<string>;
-
- // leading varargs with trailing options/callback
- raw(a: string, options: types.TaskOptions, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- raw(a: string, b: string, options: types.TaskOptions, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- raw(a: string, b: string, c: string, options: types.TaskOptions, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- raw(a: string, b: string, c: string, d: string, options: types.TaskOptions, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- raw(a: string, b: string, c: string, d: string, e: string, options: types.TaskOptions, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- // leading varargs with trailing callback
- raw(a: string, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- raw(a: string, b: string, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- raw(a: string, b: string, c: string, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- raw(a: string, b: string, c: string, d: string, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- raw(a: string, b: string, c: string, d: string, e: string, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- /**
- * Rebases the current working copy. Options can be supplied either as an array of string parameters
- * to be sent to the `git rebase` command, or a standard options object.
- */
- rebase(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- rebase(callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- /**
- * Call any `git remote` function with arguments passed as an array of strings.
- */
- remote(options: string[], callback?: types.SimpleGitTaskCallback<void | string>): Response<void | string>;
-
- /**
- * Removes an entry from the list of remotes.
- *
- * - remoteName Name of the repository - eg "upstream"
- */
- removeRemote(remoteName: string, callback?: types.SimpleGitTaskCallback<void>): Response<void>;
-
- /**
- * Reset a repo. Called without arguments this is a soft reset for the whole repo,
- * for explicitly setting the reset mode, supply the first argument as one of the
- * supported reset modes.
- *
- * Trailing options argument can be either a string array, or an extension of the
- * ResetOptions, use this argument for supplying arbitrary additional arguments,
- * such as restricting the pathspec.
- *
- * ```typescript
- // equivalent to each other
- simpleGit().reset(ResetMode.HARD, ['--', 'my-file.txt']);
- simpleGit().reset(['--hard', '--', 'my-file.txt']);
- simpleGit().reset(ResetMode.HARD, {'--': null, 'my-file.txt': null});
- simpleGit().reset({'--hard': null, '--': null, 'my-file.txt': null});
- ```
- */
- reset(mode: types.ResetMode, options?: types.TaskOptions<types.ResetOptions>, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- reset(mode: types.ResetMode, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- reset(options?: types.TaskOptions<types.ResetOptions>, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- /**
- * Revert one or more commits in the local working copy
- *
- * - commit The commit to revert. Can be any hash, offset (eg: `HEAD~2`) or range (eg: `master~5..master~2`)
- */
- revert(commit: String, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<void>): Response<void>;
-
- revert(commit: String, callback?: types.SimpleGitTaskCallback<void>): Response<void>;
-
- /**
- * Passes the supplied options to `git rev-parse` and returns the string response. Options can be either a
- * string array or `Options` object of options compatible with the [rev-parse](https://git-scm.com/docs/git-rev-parse)
- *
- * Example uses of `rev-parse` include converting friendly commit references (ie: branch names) to SHA1 hashes
- * and retrieving meta details about the current repo (eg: the root directory, and whether it was created as
- * a bare repo).
- */
- revparse(option: string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- revparse(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- /**
- * Removes the named files from source control.
- */
- rm(paths: string | string[], callback?: types.SimpleGitTaskCallback<void>): Response<void>;
-
- /**
- * Removes the named files from source control but keeps them on disk rather than deleting them entirely. To
- * completely remove the files, use `rm`.
- */
- rmKeepLocal(paths: string | string[], callback?: types.SimpleGitTaskCallback<void>): Response<void>;
-
- /**
- * Show various types of objects, for example the file at a certain commit
- */
- show(option: string | types.TaskOptions, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- show(callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- /**
- * @deprecated
- *
- * From version 2.7.0, use of `silent` is deprecated in favour of using the `debug` library, this method will
- * be removed in version 3.x.
- *
- * Please see the [readme](https://github.com/steveukx/git-js/blob/master/readme.md#enable-logging) for more details.
- *
- * Disables/enables the use of the console for printing warnings and errors, by default messages are not shown in
- * a production environment.
- *
- * @param {boolean} silence
- */
- silent(silence?: boolean): this;
-
- /**
- * List the stash(s) of the local repo
- */
- stashList(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<resp.LogResult>): Response<resp.LogResult>;
-
- stashList(callback?: types.SimpleGitTaskCallback<resp.LogResult>): Response<resp.LogResult>;
-
- /**
- * Call any `git submodule` function with arguments passed as an array of strings.
- */
- subModule(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- /**
- * Add a submodule
- */
- submoduleAdd(repo: string, path: string, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- /**
- * Initialise submodules
- */
- submoduleInit(moduleName: string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- submoduleInit(moduleName: string, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- submoduleInit(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- submoduleInit(callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- /**
- * Update submodules
- */
- submoduleUpdate(moduleName: string, options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- submoduleUpdate(moduleName: string, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- submoduleUpdate(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- submoduleUpdate(callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- /**
- * List all tags. When using git 2.7.0 or above, include an options object with `"--sort": "property-name"` to
- * sort the tags by that property instead of using the default semantic versioning sort.
- *
- * Note, supplying this option when it is not supported by your Git version will cause the operation to fail.
- */
- tag(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-
- /**
- * Gets a list of tagged versions.
- */
- tags(options?: types.TaskOptions, callback?: types.SimpleGitTaskCallback<resp.TagResult>): Response<resp.TagResult>;
-
- tags(callback?: types.SimpleGitTaskCallback<resp.TagResult>): Response<resp.TagResult>;
-
- /**
- * Updates repository server info
- */
- updateServerInfo(callback?: types.SimpleGitTaskCallback<string>): Response<string>;
-}
diff --git a/node_modules/simple-git/typings/types.d.ts b/node_modules/simple-git/typings/types.d.ts
deleted file mode 100644
index ff3b894..0000000
--- a/node_modules/simple-git/typings/types.d.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-export { RemoteWithoutRefs, RemoteWithRefs } from '../src/lib/responses/GetRemoteSummary';
-export { LogOptions, DefaultLogFields } from '../src/lib/tasks/log';
-
-export {
- outputHandler, Options, TaskOptions, SimpleGitOptions, SimpleGitProgressEvent, SimpleGitTaskCallback
-} from '../src/lib/types';
-
-export { ApplyOptions } from '../src/lib/tasks/apply-patch';
-export { CheckRepoActions } from '../src/lib/tasks/check-is-repo';
-export { CleanOptions, CleanMode } from '../src/lib/tasks/clean';
-export { CloneOptions } from '../src/lib/tasks/clone';
-export { GitConfigScope } from '../src/lib/tasks/config';
-export { GitGrepQuery, grepQueryBuilder } from '../src/lib/tasks/grep';
-export { ResetOptions, ResetMode } from '../src/lib/tasks/reset';