From feed26485a4743a11ede5baad838e16c735ae1a2 Mon Sep 17 00:00:00 2001 From: Axel Delafosse Date: Tue, 19 Jul 2022 08:20:18 +0200 Subject: [PATCH 1/2] upgrade to expo sdk 46 beta --- apps/expo/package.json | 38 +- apps/next/package.json | 6 +- apps/storybook-react-native/package.json | 18 +- apps/storybook-react/package.json | 2 +- packages/app/components/notifications.tsx | 2 +- .../blurred-background/index.tsx | 37 - .../@shopify+react-native-skia+0.1.123.patch | 27 - ...0.68.1.patch => react-native+0.69.1.patch} | 31 + patches/simple-git+3.7.1.patch | 1303 +++++++++ patches/three+0.142.0.patch | 14 + patches/zx+4.3.0.patch | 14 + yarn.lock | 2384 ++++++++++------- 12 files changed, 2820 insertions(+), 1056 deletions(-) delete mode 100644 packages/design-system/blurred-background/index.tsx delete mode 100644 patches/@shopify+react-native-skia+0.1.123.patch rename patches/{react-native+0.68.1.patch => react-native+0.69.1.patch} (63%) create mode 100644 patches/simple-git+3.7.1.patch create mode 100644 patches/three+0.142.0.patch create mode 100644 patches/zx+4.3.0.patch diff --git a/apps/expo/package.json b/apps/expo/package.json index 0dff89df37..e84d15f792 100644 --- a/apps/expo/package.json +++ b/apps/expo/package.json @@ -49,7 +49,6 @@ "@capsizecss/core": "^3.0.0", "@ethersproject/shims": "^5.5.0", "@gorhom/bottom-sheet": "4.3.2", - "@growthbook/growthbook-react": "^0.7.0", "@hookform/resolvers": "^2.8.5", "@logrocket/react-native": "^1.2.1", "@magic-sdk/react-native": "^7.0.0", @@ -67,7 +66,6 @@ "@react-three/fiber": "^8.0.12", "@rudderstack/rudder-sdk-react-native": "^1.4.1", "@sentry/react-native": "^3.3.0", - "@shopify/react-native-skia": "0.1.123", "@showtime-xyz/universal.accordion": "^0.0.22", "@showtime-xyz/universal.activity-indicator": "^0.0.19", "@showtime-xyz/universal.alert": "^0.0.31", @@ -130,7 +128,7 @@ "domain-browser": "^4.22.0", "dotenv": "^10.0.0", "events": "^3.3.0", - "expo": "^45.0.2", + "expo": "next", "expo-app-loading": "~2.0.0", "expo-application": "~4.1.0", "expo-av": "~11.2.3", @@ -138,7 +136,7 @@ "expo-camera": "~12.2.0", "expo-community-flipper": "^45.0.0", "expo-constants": "~13.1.1", - "expo-dev-client": "~0.9.5", + "expo-dev-client": "~1.0.1", "expo-device": "~4.2.0", "expo-font": "~10.1.0", "expo-gl": "~11.3.0", @@ -146,14 +144,14 @@ "expo-image-picker": "~13.1.1", "expo-linear-gradient": "~11.3.0", "expo-linking": "~3.1.0", - "expo-modules-core": "~0.9.2", + "expo-modules-core": "next", "expo-navigation-bar": "~1.2.0", "expo-next-react-navigation": "^2.0.2", - "expo-notifications": "~0.15.2", + "expo-notifications": "~0.15.4", "expo-splash-screen": "~0.15.1", "expo-status-bar": "~1.3.0", "expo-system-ui": "~1.2.0", - "expo-updates": "~0.13.1", + "expo-updates": "~0.13.3", "https-browserify": "~1.0.0", "inherits": "^2.0.1", "moti": "^0.17.1", @@ -162,10 +160,10 @@ "process": "^0.11.0", "punycode": "^2.1.1", "querystring-es3": "~0.2.0", - "react": "18.2.0", + "react": "18.0.0", "react-dom": "18.2.0", "react-hook-form": "^7.27.1", - "react-native": "0.68.2", + "react-native": "0.69.1", "react-native-blob-jsi-helper": "^0.2.1", "react-native-blurhash": "^1.1.10", "react-native-cronet": "^0.5.0", @@ -189,8 +187,8 @@ "react-native-screens": "~3.11.1", "react-native-svg": "12.3.0", "react-native-tab-view-next": "^3.1.3", - "react-native-vision-camera": "2.12.0", - "react-native-web": "0.18.0", + "react-native-vision-camera": "2.14.0", + "react-native-web": "0.18.6", "react-native-webview": "11.18.1", "react-string-replace": "^0.4.4", "readable-stream": "3.6.0", @@ -200,7 +198,7 @@ "solito": "^0.0.24", "stream-browserify": "^3.0.0", "string_decoder": "~1.3.0", - "three": "^0.139.0", + "three": "^0.142.0", "timers-browserify": "^2.0.12", "tty-browserify": "0.0.1", "twrnc": "^3.3.3", @@ -218,7 +216,7 @@ "@babel/core": "^7.16.5", "@babel/runtime": "^7.16.5", "@config-plugins/detox": "^1.1.0", - "@expo/xcpretty": "^4.1.0", + "@expo/xcpretty": "^4.2.2", "@storybook/addon-actions": "~6.3.12", "@storybook/addon-controls": "~6.3.12", "@storybook/addon-ondevice-actions": "next", @@ -228,19 +226,19 @@ "@storybook/react-native": "next", "@types/jest": "^27.4.1", "@types/react": "^18.0.1", - "@types/three": "^0.139.0", + "@types/three": "^0.141.0", "@types/uuid": "^8.3.4", "babel-jest": "^28.0.3", "babel-plugin-dynamic-import-node": "^2.3.3", "detox": "^19.4.1", "esbuild": "^0.14.11", - "expo-cli": "^5.4.12", - "jest": "^28.0.3", - "jest-circus": "^28.0.3", - "jest-expo": "^45.0.0-beta.2", + "expo-cli": "^5.5.1", + "jest": "^28.1.3", + "jest-circus": "^28.1.3", + "jest-expo": "^45.0.1", "jest-next-dynamic": "^1.0.1", - "metro-minify-esbuild": "^0.1.0", - "react-test-renderer": "18.0.0", + "metro-minify-esbuild": "^0.2.0", + "react-test-renderer": "18.2.0", "semver": "^7.3.5", "simple-git": "^3.3.0", "ts-jest": "^27.1.4", diff --git a/apps/next/package.json b/apps/next/package.json index 80cbde503a..68e990cf8f 100644 --- a/apps/next/package.json +++ b/apps/next/package.json @@ -14,7 +14,7 @@ "@biconomy/mexa": "2.0.24", "@builder.io/partytown": "^0.5.2", "@coinbase/wallet-sdk": "^3.3.0", - "@growthbook/growthbook-react": "^0.7.0", + "@growthbook/growthbook-react": "^0.9.0", "@headlessui/react": "^1.6.1", "@next/bundle-analyzer": "^12.0.4", "@radix-ui/react-popover": "^0.1.6", @@ -47,7 +47,7 @@ "postinstall-postinstall": "^2.1.0", "raf": "^3.4.1", "react-native-fast-image": "^8.5.11", - "react-native-web": "0.18.0", + "react-native-web": "0.18.6", "react-stickynode": "^4.0.0", "react-string-replace": "^0.4.4", "remove-markdown": "^0.3.0", @@ -60,7 +60,7 @@ }, "devDependencies": { "@babel/eslint-parser": "^7.16.3", - "@expo/next-adapter": "3.1.7", + "@expo/next-adapter": "4.0.8", "autoprefixer": "^10.4.7", "critters": "^0.0.14", "eslint": "7.32.0", diff --git a/apps/storybook-react-native/package.json b/apps/storybook-react-native/package.json index 7e10a01a38..b913d568ca 100644 --- a/apps/storybook-react-native/package.json +++ b/apps/storybook-react-native/package.json @@ -39,28 +39,28 @@ "@storybook/addon-ondevice-notes": "next", "@storybook/react-native": "next", "design-system": "*", - "expo": "^45.0.2", + "expo": "next", "expo-asset": "~8.5.0", "expo-av": "~11.2.3", "expo-blur": "~11.1.0", "expo-community-flipper": "^45.0.0", "expo-constants": "~13.1.1", - "expo-dev-client": "~0.10.0", + "expo-dev-client": "~1.0.1", "expo-font": "~10.1.0", "expo-gl": "~11.3.0", "expo-haptics": "~11.2.0", "expo-image-picker": "~13.1.1", "expo-linear-gradient": "~11.3.0", "expo-linking": "~3.1.0", - "expo-modules-core": "~0.9.2", + "expo-modules-core": "next", "expo-splash-screen": "~0.15.1", "expo-status-bar": "~1.3.0", "expo-system-ui": "~1.2.0", - "expo-updates": "~0.13.2", + "expo-updates": "~0.13.3", "expo-web-browser": "~10.2.1", "react": "18.2.0", "react-dom": "18.2.0", - "react-native": "0.68.2", + "react-native": "0.69.1", "react-native-blob-jsi-helper": "^0.2.1", "react-native-fast-image": "^8.5.11", "react-native-flipper": "^0.131.1", @@ -75,13 +75,13 @@ "react-native-safe-area-context": "4.2.4", "react-native-screens": "~3.11.1", "react-native-svg": "12.3.0", - "react-native-vision-camera": "2.12.0", - "react-native-web": "0.18.0", - "three": "^0.139.0" + "react-native-vision-camera": "2.14.0", + "react-native-web": "0.18.6", + "three": "^0.142.0" }, "devDependencies": { "@babel/core": "^7.16.0", - "@types/three": "^0.139.0", + "@types/three": "^0.141.0", "typescript": "4.7.4" }, "private": true diff --git a/apps/storybook-react/package.json b/apps/storybook-react/package.json index fcdc08840a..b7256ac747 100644 --- a/apps/storybook-react/package.json +++ b/apps/storybook-react/package.json @@ -15,7 +15,7 @@ "next": "12.2.3-canary.2", "react": "18.2.0", "react-dom": "18.2.0", - "react-native-web": "0.18.0" + "react-native-web": "0.18.6" }, "devDependencies": { "@babel/core": "^7.16.0", diff --git a/packages/app/components/notifications.tsx b/packages/app/components/notifications.tsx index 39c595384f..931f1cbd75 100644 --- a/packages/app/components/notifications.tsx +++ b/packages/app/components/notifications.tsx @@ -12,7 +12,7 @@ import { } from "@showtime-xyz/universal.icon"; import { ModalSheet } from "@showtime-xyz/universal.modal-sheet"; import { useRouter } from "@showtime-xyz/universal.router"; -import { Spinner } from "@showtime-xyz/universal.spinner/index"; +import { Spinner } from "@showtime-xyz/universal.spinner"; import { colors, tw } from "@showtime-xyz/universal.tailwind"; import { Text } from "@showtime-xyz/universal.text"; import { View } from "@showtime-xyz/universal.view"; diff --git a/packages/design-system/blurred-background/index.tsx b/packages/design-system/blurred-background/index.tsx deleted file mode 100644 index 83a692f530..0000000000 --- a/packages/design-system/blurred-background/index.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import { Canvas, Paint, Blur, Fill } from "@shopify/react-native-skia"; - -type BlurTint = "light" | "dark" | "default"; - -function getBackgroundColor(intensity: number, tint: BlurTint): string { - const opacity = intensity / 100; - switch (tint) { - case "dark": - // From Apple iOS 14 Sketch Kit - https://developer.apple.com/design/resources/ - return `rgba(25,25,25,${opacity * 0.78})`; - case "light": - // From Apple iOS 14 Sketch Kit - https://developer.apple.com/design/resources/ - return `rgba(249,249,249,${opacity * 0.78})`; - case "default": - // From xcode composition - return `rgba(255,255,255,${opacity * 0.3})`; - } -} - -type Props = { - isDark: boolean; - width: number; - height: number; -}; - -function BlurredBackground({ isDark }: Props) { - return ( - - - - - - - ); -} - -export { BlurredBackground }; diff --git a/patches/@shopify+react-native-skia+0.1.123.patch b/patches/@shopify+react-native-skia+0.1.123.patch deleted file mode 100644 index 20de96b6a7..0000000000 --- a/patches/@shopify+react-native-skia+0.1.123.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/node_modules/@shopify/react-native-skia/android/build.gradle b/node_modules/@shopify/react-native-skia/android/build.gradle -index de4e9bf..c5a410f 100644 ---- a/node_modules/@shopify/react-native-skia/android/build.gradle -+++ b/node_modules/@shopify/react-native-skia/android/build.gradle -@@ -157,11 +157,11 @@ repositories { - mavenLocal() - maven { - // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm -- url "$rootDir/../node_modules/react-native/android" -+ url "$rootDir/../../../node_modules/react-native/android" - } - maven { - // Android JSC is installed from npm -- url "$rootDir/../node_modules/jsc-android/dist" -+ url "$rootDir/../../../node_modules/jsc-android/dist" - } - google() - } -@@ -175,7 +175,7 @@ dependencies { - //noinspection GradleDynamicVersion - extractJNI("com.facebook.fbjni:fbjni:0.2.2") - -- def rnAAR = fileTree("${rootDir}/../node_modules/react-native/android").matching({ it.include "**/**/*.aar" }).singleFile -+ def rnAAR = fileTree("${rootDir}/../../../node_modules/react-native/android").matching({ it.include "**/**/*.aar" }).singleFile - extractJNI(files(rnAAR)) - } - \ No newline at end of file diff --git a/patches/react-native+0.68.1.patch b/patches/react-native+0.69.1.patch similarity index 63% rename from patches/react-native+0.68.1.patch rename to patches/react-native+0.69.1.patch index 6a862a09b6..5e94a0c2a1 100644 --- a/patches/react-native+0.68.1.patch +++ b/patches/react-native+0.69.1.patch @@ -74,3 +74,34 @@ index 0000000..361f5fb +++ b/node_modules/react-native/scripts/.packager.env @@ -0,0 +1 @@ +export RCT_METRO_PORT=8081 +diff --git a/node_modules/react-native/scripts/react_native_pods.rb b/node_modules/react-native/scripts/react_native_pods.rb +index 7f6ebab..0aecbc1 100644 +--- a/node_modules/react-native/scripts/react_native_pods.rb ++++ b/node_modules/react-native/scripts/react_native_pods.rb +@@ -259,6 +259,18 @@ def fix_library_search_paths(installer) + end + end + ++def fix_react_bridging_header_search_paths(installer) ++ installer.target_installation_results.pod_target_installation_results ++ .each do |pod_name, target_installation_result| ++ target_installation_result.native_target.build_configurations.each do |config| ++ # For third party modules who have React-bridging dependency to search correct headers ++ config.build_settings['HEADER_SEARCH_PATHS'] ||= '$(inherited) ' ++ config.build_settings['HEADER_SEARCH_PATHS'] << '"$(PODS_ROOT)/Headers/Private/React-bridging/react/bridging" ' ++ config.build_settings['HEADER_SEARCH_PATHS'] << '"$(PODS_CONFIGURATION_BUILD_DIR)/React-bridging/react_bridging.framework/Headers" ' ++ end ++ end ++end ++ + def set_node_modules_user_settings(installer, react_native_path) + puts "Setting REACT_NATIVE build settings" + projects = installer.aggregate_targets +@@ -282,6 +294,7 @@ def react_native_post_install(installer, react_native_path = "../node_modules/re + + exclude_architectures(installer) + fix_library_search_paths(installer) ++ fix_react_bridging_header_search_paths(installer) + + cpp_flags = DEFAULT_OTHER_CPLUSPLUSFLAGS + if ENV['RCT_NEW_ARCH_ENABLED'] == '1' diff --git a/patches/simple-git+3.7.1.patch b/patches/simple-git+3.7.1.patch new file mode 100644 index 0000000000..22c0ced708 --- /dev/null +++ b/patches/simple-git+3.7.1.patch @@ -0,0 +1,1303 @@ +diff --git a/node_modules/simple-git/dist/cjs/index.js b/node_modules/simple-git/dist/cjs/index.js +index f01617a..445e380 100644 +--- a/node_modules/simple-git/dist/cjs/index.js ++++ b/node_modules/simple-git/dist/cjs/index.js +@@ -441,9 +441,9 @@ var init_task_options = __esm({ + function callTaskParser(parser3, streams) { + return parser3(streams.stdOut, streams.stdErr); + } +-function parseStringResponse(result, parsers11, texts, trim = true) { +- asArray(texts).forEach((text) => { +- for (let lines = toLinesWithContent(text, trim), i = 0, max = lines.length; i < max; i++) { ++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; +@@ -1905,26 +1905,6 @@ var init_init = __esm({ + } + }); + +-// src/lib/args/log-format.ts +-function logFormatFromCommand(customArgs) { +- for (let i = 0; i < customArgs.length; i++) { +- const format = logFormatRegex.exec(customArgs[i]); +- if (format) { +- return `--${format[1]}`; +- } +- } +- return "" /* NONE */; +-} +-function isLogFormat(customArg) { +- return logFormatRegex.test(customArg); +-} +-var logFormatRegex; +-var init_log_format = __esm({ +- "src/lib/args/log-format.ts"() { +- logFormatRegex = /^--(stat|numstat|name-only|name-status)(=|$)/; +- } +-}); +- + // src/lib/responses/DiffSummary.ts + var DiffSummary; + var init_DiffSummary = __esm({ +@@ -1941,97 +1921,74 @@ var init_DiffSummary = __esm({ + }); + + // src/lib/parsers/parse-diff-summary.ts +-function getDiffParser(format = "" /* NONE */) { +- const parser3 = diffSummaryParsers[format]; +- return (stdOut) => parseStringResponse(new DiffSummary(), parser3, stdOut, false); ++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)); ++ }); + } +-var statParser, numStatParser, nameOnlyParser, nameStatusParser, diffSummaryParsers; ++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_log_format(); + init_DiffSummary(); +- init_utils(); +- statParser = [ +- new LineParser(/(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/, (result, [file, changes, alterations = ""]) => { +- result.files.push({ +- file: file.trim(), +- changes: asNumber(changes), +- insertions: alterations.replace(/[^+]/g, "").length, +- deletions: alterations.replace(/[^-]/g, "").length, +- binary: false +- }); +- }), +- new LineParser(/(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/, (result, [file, before, after]) => { +- result.files.push({ +- file: file.trim(), +- before: asNumber(before), +- after: asNumber(after), +- binary: true +- }); +- }), +- new LineParser(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/, (result, [changed, summary]) => { +- const inserted = /(\d+) i/.exec(summary); +- const deleted = /(\d+) d/.exec(summary); +- result.changed = asNumber(changed); +- result.insertions = asNumber(inserted == null ? void 0 : inserted[1]); +- result.deletions = asNumber(deleted == null ? void 0 : deleted[1]); +- }) +- ]; +- numStatParser = [ +- new LineParser(/(\d+)\t(\d+)\t(.+)$/, (result, [changesInsert, changesDelete, file]) => { +- const insertions = asNumber(changesInsert); +- const deletions = asNumber(changesDelete); +- result.changed++; +- result.insertions += insertions; +- result.deletions += deletions; +- result.files.push({ +- file, +- changes: insertions + deletions, +- insertions, +- deletions, +- binary: false +- }); +- }), +- new LineParser(/-\t-\t(.+)$/, (result, [file]) => { +- result.changed++; +- result.files.push({ +- file, +- after: 0, +- before: 0, +- binary: true +- }); +- }) +- ]; +- nameOnlyParser = [ +- new LineParser(/(.+)$/, (result, [file]) => { +- result.changed++; +- result.files.push({ +- file, +- changes: 0, +- insertions: 0, +- deletions: 0, +- binary: false +- }); +- }) +- ]; +- nameStatusParser = [ +- new LineParser(/([ACDMRTUXB])\s*(.+)$/, (result, [_status, file]) => { +- result.changed++; +- result.files.push({ +- file, +- changes: 0, +- insertions: 0, +- deletions: 0, +- binary: false +- }); +- }) +- ]; +- diffSummaryParsers = { +- ["" /* NONE */]: statParser, +- ["--stat" /* STAT */]: statParser, +- ["--numstat" /* NUM_STAT */]: numStatParser, +- ["--name-status" /* NAME_STATUS */]: nameStatusParser, +- ["--name-only" /* NAME_ONLY */]: nameOnlyParser ++ statusUpdate = { ++ file(status, value) { ++ status.changed = value; ++ }, ++ deletion(status, value) { ++ status.deletions = value; ++ }, ++ insertion(status, value) { ++ status.insertions = value; ++ } + }; + } + }); +@@ -2043,8 +2000,7 @@ function lineBuilder(tokens, fields) { + return line; + }, /* @__PURE__ */ Object.create({ diff: null })); + } +-function createListLogSummaryParser(splitter = SPLITTER, fields = defaultFieldNames, logFormat = "" /* NONE */) { +- const parseDiffResult = getDiffParser(logFormat); ++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); +@@ -2066,7 +2022,6 @@ var init_parse_list_log_summary = __esm({ + "src/lib/parsers/parse-list-log-summary.ts"() { + init_utils(); + init_parse_diff_summary(); +- init_log_format(); + START_BOUNDARY = "\xF2\xF2\xF2\xF2\xF2\xF2 "; + COMMIT_BOUNDARY = " \xF2\xF2"; + SPLITTER = " \xF2 "; +@@ -2074,43 +2029,6 @@ var init_parse_list_log_summary = __esm({ + } + }); + +-// src/lib/tasks/diff.ts +-var diff_exports = {}; +-__export(diff_exports, { +- diffSummaryTask: () => diffSummaryTask, +- validateLogFormatConfig: () => validateLogFormatConfig +-}); +-function diffSummaryTask(customArgs) { +- let logFormat = logFormatFromCommand(customArgs); +- const commands = ["diff"]; +- if (logFormat === "" /* NONE */) { +- logFormat = "--stat" /* STAT */; +- commands.push("--stat=4096"); +- } +- commands.push(...customArgs); +- return validateLogFormatConfig(commands) || { +- commands, +- format: "utf-8", +- parser: getDiffParser(logFormat) +- }; +-} +-function validateLogFormatConfig(customArgs) { +- const flags = customArgs.filter(isLogFormat); +- if (flags.length > 1) { +- return configurationErrorTask(`Summary flags are mutually exclusive - pick one of ${flags.join(",")}`); +- } +- if (flags.length && customArgs.includes("-z")) { +- return configurationErrorTask(`Summary flag ${flags} parsing is not compatible with null termination option '-z'`); +- } +-} +-var init_diff = __esm({ +- "src/lib/tasks/diff.ts"() { +- init_log_format(); +- init_parse_diff_summary(); +- init_task(); +- } +-}); +- + // src/lib/tasks/log.ts + function prettyFormat(format, splitter) { + const fields = []; +@@ -2171,19 +2089,17 @@ function parseLogOptions(opt = {}, customArgs = []) { + }; + } + function logTask(splitter, fields, customArgs) { +- const parser3 = createListLogSummaryParser(splitter, fields, logFormatFromCommand(customArgs)); + return { + commands: ["log", ...customArgs], + format: "utf-8", +- parser: parser3 ++ parser: createListLogSummaryParser(splitter, fields) + }; + } + function log_default() { + return { + log(...rest) { + const next = trailingFunctionArgument(arguments); +- const options = parseLogOptions(trailingOptionsArgument(arguments), filterType(arguments[0], filterArray)); +- const task = rejectDeprecatedSignatures(...rest) || validateLogFormatConfig(options.commands) || createLogTask(options); ++ const task = rejectDeprecatedSignatures(...rest) || createLogTask(parseLogOptions(trailingOptionsArgument(arguments), filterType(arguments[0], filterArray))); + return this._runTask(task, next); + } + }; +@@ -2197,11 +2113,9 @@ function log_default() { + var excludeOptions; + var init_log = __esm({ + "src/lib/tasks/log.ts"() { +- init_log_format(); + init_parse_list_log_summary(); + init_utils(); + init_task(); +- init_diff(); + excludeOptions = /* @__PURE__ */ ((excludeOptions2) => { + excludeOptions2[excludeOptions2["--pretty"] = 0] = "--pretty"; + excludeOptions2[excludeOptions2["max-count"] = 1] = "max-count"; +@@ -2378,7 +2292,7 @@ var init_parse_remote_messages = __esm({ + + // src/lib/parsers/parse-pull.ts + function parsePullErrorResult(stdOut, stdErr) { +- const pullError = parseStringResponse(new PullFailedSummary(), errorParsers, [stdOut, stdErr]); ++ const pullError = parseStringResponse(new PullFailedSummary(), errorParsers, stdOut, stdErr); + return pullError.message && pullError; + } + var FILE_UPDATE_REGEX, SUMMARY_REGEX, ACTION_REGEX, parsers3, errorParsers, parsePullDetail, parsePullResult; +@@ -2425,7 +2339,7 @@ var init_parse_pull = __esm({ + }) + ]; + parsePullDetail = (stdOut, stdErr) => { +- return parseStringResponse(new PullSummary(), parsers3, [stdOut, stdErr]); ++ return parseStringResponse(new PullSummary(), parsers3, stdOut, stdErr); + }; + parsePullResult = (stdOut, stdErr) => { + return Object.assign(new PullSummary(), parsePullDetail(stdOut, stdErr), parseRemoteMessages(stdOut, stdErr)); +@@ -2549,7 +2463,7 @@ var init_parse_push = __esm({ + return __spreadValues(__spreadValues({}, pushDetail), responseDetail); + }; + parsePushDetail = (stdOut, stdErr) => { +- return parseStringResponse({ pushed: [] }, parsers5, [stdOut, stdErr]); ++ return parseStringResponse({ pushed: [] }, parsers5, stdOut, stdErr); + }; + } + }); +@@ -2968,7 +2882,7 @@ var init_parse_branch_delete = __esm({ + }) + ]; + parseBranchDeletions = (stdOut, stdErr) => { +- return parseStringResponse(new BranchDeletionBatch(), parsers7, [stdOut, stdErr]); ++ return parseStringResponse(new BranchDeletionBatch(), parsers7, stdOut, stdErr); + }; + } + }); +@@ -2984,15 +2898,14 @@ var init_BranchSummary = __esm({ + this.current = ""; + this.detached = false; + } +- push(status, detached, name, commit, label) { +- if (status === "*" /* CURRENT */) { ++ push(current, detached, name, commit, label) { ++ if (current) { + this.detached = detached; + this.current = name; + } + this.all.push(name); + this.branches[name] = { +- current: status === "*" /* CURRENT */, +- linkedWorkTree: status === "+" /* LINKED */, ++ current, + name, + commit, + label +@@ -3003,9 +2916,6 @@ var init_BranchSummary = __esm({ + }); + + // src/lib/parsers/parse-branch.ts +-function branchStatus(input) { +- return input ? input.charAt(0) : ""; +-} + function parseBranchSummary(stdOut) { + return parseStringResponse(new BranchSummaryResult(), parsers8, stdOut); + } +@@ -3015,11 +2925,11 @@ var init_parse_branch = __esm({ + init_BranchSummary(); + init_utils(); + parsers8 = [ +- new LineParser(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/, (result, [current, name, commit, label]) => { +- result.push(branchStatus(current), true, name, commit, label); ++ 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(branchStatus(current), false, 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); + }) + ]; + } +@@ -3164,6 +3074,26 @@ var init_clone = __esm({ + } + }); + ++// 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 = { +@@ -3172,7 +3102,7 @@ function parseFetchResult(stdOut, stdErr) { + branches: [], + tags: [] + }; +- return parseStringResponse(result, parsers9, [stdOut, stdErr]); ++ return parseStringResponse(result, parsers9, stdOut, stdErr); + } + var parsers9; + var init_parse_fetch = __esm({ +@@ -3380,19 +3310,16 @@ __export(stash_list_exports, { + }); + function stashListTask(opt = {}, customArgs) { + const options = parseLogOptions(opt); +- const commands = ["stash", "list", ...options.commands, ...customArgs]; +- const parser3 = createListLogSummaryParser(options.splitter, options.fields, logFormatFromCommand(commands)); +- return validateLogFormatConfig(commands) || { +- commands, ++ 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_log_format(); + init_parse_list_log_summary(); +- init_diff(); + init_log(); + } + }); +@@ -3799,8 +3726,10 @@ function esModuleFactory(defaultExport) { + default: { value: defaultExport } + }); + } +-function gitExportFactory(factory) { +- return Object.assign(factory.bind(null), api_exports); ++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(); +@@ -3972,6 +3901,5 @@ var init_promise_wrapped = __esm({ + // 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)); +-var simpleGit = esModuleFactory2(gitExportFactory2(gitInstanceFactory2)); +-module.exports = Object.assign(simpleGit, { gitP: gitP2, simpleGit }); ++module.exports = esModuleFactory2(gitExportFactory2(gitInstanceFactory2, { gitP: gitP2 })); + //# sourceMappingURL=index.js.map +diff --git a/node_modules/simple-git/dist/cjs/index.js.map b/node_modules/simple-git/dist/cjs/index.js.map +index 79a8d8f..2779a93 100644 +--- a/node_modules/simple-git/dist/cjs/index.js.map ++++ b/node_modules/simple-git/dist/cjs/index.js.map +@@ -1,7 +1,7 @@ + { + "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/parsers/parse-commit.ts", "../../src/lib/tasks/commit.ts", "../../src/lib/tasks/hash-object.ts", "../../src/lib/responses/InitSummary.ts", "../../src/lib/tasks/init.ts", "../../src/lib/args/log-format.ts", "../../src/lib/responses/DiffSummary.ts", "../../src/lib/parsers/parse-diff-summary.ts", "../../src/lib/parsers/parse-list-log-summary.ts", "../../src/lib/tasks/diff.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-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 type { 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,\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) => e.git);\n\n if (mergeSummary.failed) {\n // deal with the error\n }\n ```\n */\nexport class GitResponseError 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,\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 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(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(input: T, offset?: number): Maybe;\nexport function first(input: T, offset?: number): Maybe;\nexport function first(input: any[] | IArguments, offset = 0): Maybe {\n return isArrayLike(input) && input.length > offset ? input[offset] : undefined;\n}\n\nexport function last(input: T, offset?: number): Maybe;\nexport function last(input: T, offset?: number): Maybe;\nexport function last(input: T, offset?: number): Maybe;\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[] | 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 = (line: string) => T;\n\nexport function forEachLineWithContent(input: string, callback: LineWithContentCallback): 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(target: T[] | Set, 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(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(target: Set | 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(source: T | T[]): T[] {\n return Array.isArray(source) ? source : [source];\n}\n\nexport function asStringArray(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(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, properties: string[]) {\n return Object.assign({}, ...properties.map((property) => property in source ? {[property]: source[property]} : {}));\n}\n\nexport function delay(duration = 0): Promise {\n return new Promise(done => setTimeout(done, duration));\n}\n", "import { Maybe, Options, Primitives } from '../types';\nimport { objectToString } from './util';\n\nexport interface ArgumentFilterPredicate {\n (input: any): input is T;\n}\n\nexport function filterType(input: K, filter: ArgumentFilterPredicate): K extends T ? T : undefined;\nexport function filterType(input: K, filter: ArgumentFilterPredicate, def: T): T;\nexport function filterType(input: K, filter: ArgumentFilterPredicate, def?: T): Maybe {\n if (filter(input)) {\n return input;\n }\n return (arguments.length > 2) ? def : undefined\n}\n\nexport const filterArray: ArgumentFilterPredicate> = (input): input is Array => {\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 = (input): input is string => {\n return typeof input === 'string';\n};\n\nexport const filterStringArray: ArgumentFilterPredicate = (input): input is string[] => {\n return Array.isArray(input) && input.every(filterString);\n};\n\nexport const filterStringOrStringArray: ArgumentFilterPredicate = (input): input is string | string[] => {\n return filterString(input) || (Array.isArray(input) && input.every(filterString));\n};\n\nexport function filterPlainObject(input: T | unknown): input is T;\nexport function filterPlainObject(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 {\n\n constructor(public readonly stdOut: T, public readonly stdErr: T) {\n }\n\n asStrings(): GitOutputStreams {\n return new GitOutputStreams(this.stdOut.toString('utf8'), this.stdErr.toString('utf8'));\n }\n}\n", "export class LineParser {\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 extends LineParser {\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 = {\n binary: 'git',\n maxConcurrentProcesses: 5,\n config: [],\n};\n\nexport function createInstanceConfig(...options: Array | 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(options: Maybe, commands: string[] = []): string[] {\n if (!filterPlainObject(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 {\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 type { MaybeArray, TaskParser, TaskResponseFormat } from '../types';\nimport { GitOutputStreams } from './git-output-streams';\nimport { LineParser } from './line-parser';\nimport { asArray, toLinesWithContent } from './util';\n\nexport function callTaskParser(parser: TaskParser, streams: GitOutputStreams) {\n return parser(streams.stdOut, streams.stdErr);\n}\n\nexport function parseStringResponse(result: T, parsers: LineParser[], texts: MaybeArray, trim = true): T {\n asArray(texts).forEach(text => {\n for (let lines = toLinesWithContent(text, trim), 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['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['parser'] = (text) => {\n return text.trim() === 'true';\n}\n\nexport function checkIsRepoTask(action: Maybe): StringTask {\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 {\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 {\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 type { 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 {\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 {\n return {\n commands,\n format: 'buffer',\n parser(buffer) {\n return buffer;\n },\n }\n}\n\nexport function isBufferTask(task: SimpleGitTask): task is BufferTask {\n return task.format === 'buffer';\n}\n\nexport function isEmptyTask(task: SimpleGitTask): 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 = 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 {\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;\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 = 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(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 {\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 {\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 {\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 {\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 {\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();\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 {\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, 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 {\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", "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, timeout: DeferredPromise) {\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 as Error);\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;\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> = new Set();\n\n public add(plugin: void | SimpleGitPlugin | SimpleGitPlugin[]) {\n const plugins: SimpleGitPlugin[] = [];\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(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) {\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;\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 {\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): 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): 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 timeout && clearTimeout(timeout);\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, childDebugger: Maybe, {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 = (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;\n\ntype TaskInProgress = {\n name: string;\n logger: OutputLogger;\n task: AnySimpleGitTask;\n}\n\nexport class TasksPendingQueue {\n\n private _queue: Map = 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 = 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(task: SimpleGitTask): Promise {\n this._queue.push(task);\n\n return this._chain = this._chain.then(() => this.attemptTask(task));\n }\n\n private async attemptTask(task: SimpleGitTask): Promise {\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 as Error);\n } finally {\n onQueueComplete();\n onScheduleComplete();\n }\n }\n\n private onFatalException(task: SimpleGitTask, 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(task: RunnableTask, 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(\n task: SimpleGitTask,\n args: string[],\n result: GitExecutorResult, logger: OutputLogger): Promise {\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(task: SimpleGitTask, command: string, args: string[], outputHandler: Maybe, logger: OutputLogger): Promise {\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;\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(task: SimpleGitTask, 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 type { PluginStore } from '../plugins';\nimport type { 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(task: SimpleGitTask): Promise {\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(task: SimpleGitTask, response: Promise, callback: SimpleGitTaskCallback = 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 { CommitResult } from '../../../typings';\nimport { LineParser, parseStringResponse } from '../utils';\n\nconst parsers: LineParser[] = [\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 type { CommitResult, SimpleGit } from '../../../typings';\nimport type { SimpleGitApi } from '../simple-git-api';\nimport type { StringTask } from '../types';\nimport { parseCommitResult } from '../parsers/parse-commit';\nimport {\n asArray,\n filterArray,\n filterStringOrStringArray,\n filterType,\n getTrailingOptions, prefixedArray,\n trailingFunctionArgument\n} from '../utils';\nimport { configurationErrorTask } from './task';\n\nexport function commitTask(message: string[], files: string[], customArgs: string[]): StringTask {\n const commands: string[] = [\n '-c',\n 'core.abbrev=40',\n 'commit',\n ...prefixedArray(message, '-m'),\n ...files,\n ...customArgs,\n ];\n\n return {\n commands,\n format: 'utf-8',\n parser: parseCommitResult,\n };\n}\n\nexport default function (): Pick {\n return {\n commit(this: SimpleGitApi, message: string | string[], ...rest: unknown[]) {\n const next = trailingFunctionArgument(arguments);\n const task = rejectDeprecatedSignatures(message) ||\n commitTask(\n asArray(message),\n asArray(filterType(rest[0], filterStringOrStringArray, [])),\n [...filterType(rest[1], filterArray, []), ...getTrailingOptions(arguments, 0, true)]\n );\n\n return this._runTask(task, next);\n },\n };\n\n function rejectDeprecatedSignatures(message?: unknown) {\n return (\n !filterStringOrStringArray(message) &&\n configurationErrorTask(`git.commit: requires the commit message to be supplied as a string/string[]`)\n );\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 {\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 {\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", "export enum LogFormat {\n NONE = '',\n STAT = '--stat',\n NUM_STAT = '--numstat',\n NAME_ONLY = '--name-only',\n NAME_STATUS = '--name-status',\n}\n\nconst logFormatRegex = /^--(stat|numstat|name-only|name-status)(=|$)/;\n\nexport function logFormatFromCommand(customArgs: string[]) {\n for (let i = 0; i < customArgs.length; i++) {\n const format = logFormatRegex.exec(customArgs[i]);\n if (format) {\n return `--${format[1]}` as LogFormat;\n }\n }\n\n return LogFormat.NONE;\n}\n\nexport function isLogFormat(customArg: string | unknown) {\n return logFormatRegex.test(customArg as string);\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 = [];\n}\n", "import { DiffResult } from '../../../typings';\nimport { LogFormat } from '../args/log-format';\nimport { DiffSummary } from '../responses/DiffSummary';\nimport { asNumber, LineParser, parseStringResponse } from '../utils';\n\nconst statParser = [\n new LineParser(/(.+)\\s+\\|\\s+(\\d+)(\\s+[+\\-]+)?$/, (result, [file, changes, alterations = '']) => {\n result.files.push({\n file: file.trim(),\n changes: asNumber(changes),\n insertions: alterations.replace(/[^+]/g, '').length,\n deletions: alterations.replace(/[^-]/g, '').length,\n binary: false\n });\n }),\n new LineParser(/(.+) \\|\\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/, (result, [file, before, after]) => {\n result.files.push({\n file: file.trim(),\n before: asNumber(before),\n after: asNumber(after),\n binary: true\n });\n }),\n new LineParser(/(\\d+) files? changed\\s*((?:, \\d+ [^,]+){0,2})/, (result, [changed, summary]) => {\n const inserted = /(\\d+) i/.exec(summary);\n const deleted = /(\\d+) d/.exec(summary);\n\n result.changed = asNumber(changed);\n result.insertions = asNumber(inserted?.[1]);\n result.deletions = asNumber(deleted?.[1]);\n })\n];\n\nconst numStatParser = [\n new LineParser(/(\\d+)\\t(\\d+)\\t(.+)$/, (result, [changesInsert, changesDelete, file]) => {\n const insertions = asNumber(changesInsert);\n const deletions = asNumber(changesDelete);\n\n result.changed++;\n result.insertions += insertions;\n result.deletions += deletions;\n\n result.files.push({\n file,\n changes: insertions + deletions,\n insertions,\n deletions,\n binary: false,\n });\n }),\n new LineParser(/-\\t-\\t(.+)$/, (result, [file]) => {\n result.changed++;\n\n result.files.push({\n file,\n after: 0,\n before: 0,\n binary: true,\n });\n })\n];\n\nconst nameOnlyParser = [\n new LineParser(/(.+)$/, (result, [file]) => {\n result.changed++;\n result.files.push({\n file,\n changes: 0,\n insertions: 0,\n deletions: 0,\n binary: false,\n });\n })\n];\n\nconst nameStatusParser = [\n new LineParser(/([ACDMRTUXB])\\s*(.+)$/, (result, [_status, file]) => {\n result.changed++;\n result.files.push({\n file,\n changes: 0,\n insertions: 0,\n deletions: 0,\n binary: false,\n });\n })\n];\n\nconst diffSummaryParsers: Record[]> = {\n [LogFormat.NONE]: statParser,\n [LogFormat.STAT]: statParser,\n [LogFormat.NUM_STAT]: numStatParser,\n [LogFormat.NAME_STATUS]: nameStatusParser,\n [LogFormat.NAME_ONLY]: nameOnlyParser,\n};\n\nexport function getDiffParser(format = LogFormat.NONE) {\n const parser = diffSummaryParsers[format];\n\n return (stdOut: string) => parseStringResponse(new DiffSummary(), parser, stdOut, false);\n}\n", "import { ListLogLine, LogResult } from '../../../typings';\nimport { toLinesWithContent } from '../utils';\nimport { getDiffParser } from './parse-diff-summary';\nimport { LogFormat } from '../args/log-format';\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 (splitter = SPLITTER, fields = defaultFieldNames, logFormat = LogFormat.NONE) {\n const parseDiffResult = getDiffParser(logFormat);\n\n return function (stdOut: string): LogResult {\n const all: ReadonlyArray = 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 { StringTask } from '../types';\nimport { DiffResult } from '../../../typings';\nimport { isLogFormat, LogFormat, logFormatFromCommand } from '../args/log-format';\nimport { getDiffParser } from '../parsers/parse-diff-summary';\nimport { configurationErrorTask, EmptyTask } from './task';\n\nexport function diffSummaryTask(customArgs: string[]): StringTask | EmptyTask {\n let logFormat = logFormatFromCommand(customArgs);\n\n const commands = ['diff'];\n\n if (logFormat === LogFormat.NONE) {\n logFormat = LogFormat.STAT;\n commands.push('--stat=4096');\n }\n\n commands.push(...customArgs);\n\n return validateLogFormatConfig(commands) || {\n commands,\n format: 'utf-8',\n parser: getDiffParser(logFormat),\n };\n}\n\nexport function validateLogFormatConfig(customArgs: unknown[]): EmptyTask | void {\n const flags = customArgs.filter(isLogFormat);\n\n if (flags.length > 1) {\n return configurationErrorTask(`Summary flags are mutually exclusive - pick one of ${flags.join(',')}`);\n }\n\n if (flags.length && customArgs.includes('-z')) {\n return configurationErrorTask(`Summary flag ${flags} parsing is not compatible with null termination option '-z'`);\n }\n}\n", "import type { Options, StringTask } from '../types';\nimport type { LogResult, SimpleGit } from '../../../typings';\nimport { logFormatFromCommand } from '../args/log-format';\nimport {\n COMMIT_BOUNDARY,\n createListLogSummaryParser,\n SPLITTER,\n START_BOUNDARY\n} from '../parsers/parse-list-log-summary';\nimport {\n appendTaskOptions,\n filterArray,\n filterPrimitives,\n filterString,\n filterType,\n trailingFunctionArgument,\n trailingOptionsArgument\n} from '../utils';\nimport { SimpleGitApi } from '../simple-git-api';\nimport { configurationErrorTask } from './task';\nimport { validateLogFormatConfig } from './diff';\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 = {\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: Record, 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(input: T): Options {\n return Object.keys(input).reduce((out, key) => {\n if (!(key in excludeOptions)) {\n out[key] = input[key];\n }\n return out;\n }, {} as Options);\n}\n\nexport function parseLogOptions(opt: Options | LogOptions = {}, customArgs: string[] = []): ParsedLogOptions {\n const splitter = filterType(opt.splitter, filterString, SPLITTER);\n const format = !filterPrimitives(opt.format) && opt.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 (filterString(opt.file)) {\n suffix.push('--follow', opt.file);\n }\n\n appendTaskOptions(userOptions(opt as Options), command);\n\n return {\n fields,\n splitter,\n commands: [\n ...command,\n ...suffix,\n ],\n };\n}\n\nexport function logTask(splitter: string, fields: string[], customArgs: string[]): StringTask> {\n const parser = createListLogSummaryParser(splitter, fields, logFormatFromCommand(customArgs));\n\n return {\n commands: ['log', ...customArgs],\n format: 'utf-8',\n parser,\n };\n}\n\nexport default function (): Pick {\n return {\n log(this: SimpleGitApi, ...rest: unknown[]) {\n const next = trailingFunctionArgument(arguments);\n const options = parseLogOptions(trailingOptionsArgument(arguments), filterType(arguments[0], filterArray));\n const task = rejectDeprecatedSignatures(...rest) ||\n validateLogFormatConfig(options.commands) ||\n createLogTask(options);\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(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>[] = [\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>[] = [\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(\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[] = [\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[] = [\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 = (stdOut, stdErr) => {\n return parseStringResponse(new PullSummary(), parsers, [stdOut, stdErr]);\n}\n\nexport const parsePullResult: TaskParser = (stdOut, stdErr) => {\n return Object.assign(\n new PullSummary(),\n parsePullDetail(stdOut, stdErr),\n parseRemoteMessages(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[] = [\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 = (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 = (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 {\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[] = [\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 = (stdOut, stdErr) => {\n const pushDetail = parsePushDetail(stdOut, stdErr);\n const responseDetail = parseRemoteMessages(stdOut, stdErr);\n\n return {\n ...pushDetail,\n ...responseDetail,\n };\n}\n\nexport const parsePushDetail: TaskParser = (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 {\n append(customArgs, '--tags');\n return pushTask(ref, customArgs);\n}\n\nexport function pushTask(ref: PushRef = {}, customArgs: string[]): StringTask {\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';\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, NULL } 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 = () => {\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 [to, from] = line.split(NULL);\n\n return {\n from: from || to,\n to,\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 = 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.split(NULL);\n const status = new StatusSummary();\n\n for (let i = 0, l = lines.length; i < l;) {\n let line = lines[i++].trim();\n\n if (!line) {\n continue;\n }\n\n if (line.charAt(0) === PorcelainFileStatus.RENAMED) {\n line += NULL + (lines[i++] || '');\n }\n\n splitLine(status, line);\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.replace(/\\0.+$/, ''), index, workingDir));\n }\n }\n}\n", "import { StatusResult } from '../../../typings';\nimport { parseStatusSummary } from '../responses/StatusSummary';\nimport { StringTask } from '../types';\n\nconst ignoredOptions = ['--null', '-z'];\n\nexport function statusTask(customArgs: string[]): StringTask {\n const commands = [\n 'status',\n '--porcelain',\n '-b',\n '-u',\n '--null',\n ...customArgs.filter(arg => !ignoredOptions.includes(arg))\n ];\n\n return {\n format: 'utf-8',\n commands,\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 commit from './tasks/commit';\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(task: SimpleGitTask, then?: SimpleGitTaskCallback) {\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, commit(), 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, 'promise' | 'done'> & {id: number};\n\nconst createScheduledTask: () => ScheduledTask = (() => {\n let id = 0;\n return () => {\n id++;\n const {promise, done} = createDeferred();\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 {\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 {\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[] = [\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 = (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 type { BranchSummary, BranchSummaryBranch } from '../../../typings';\n\nexport enum BranchStatusIdentifier {\n CURRENT = '*',\n LINKED = '+',\n}\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(status: BranchStatusIdentifier | unknown, detached: boolean, name: string, commit: string, label: string) {\n if (status === BranchStatusIdentifier.CURRENT) {\n this.detached = detached;\n this.current = name;\n }\n\n this.all.push(name);\n this.branches[name] = {\n current: status === BranchStatusIdentifier.CURRENT,\n linkedWorkTree: status === BranchStatusIdentifier.LINKED,\n name,\n commit,\n label\n };\n }\n}\n\n", "import type { BranchSummary } from '../../../typings';\nimport { BranchSummaryResult } from '../responses/BranchSummary';\nimport { LineParser, parseStringResponse } from '../utils';\n\nconst parsers: LineParser[] = [\n new LineParser(/^([*+]\\s)?\\((?:HEAD )?detached (?:from|at) (\\S+)\\)\\s+([a-z0-9]+)\\s(.*)$/, (result, [current, name, commit, label]) => {\n result.push(\n branchStatus(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 branchStatus(current),\n false,\n name, commit, label\n );\n })\n];\n\nfunction branchStatus(input?: string) {\n return input ? input.charAt(0) : '';\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 {\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 {\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 {\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 {\n const task: StringTask = {\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 {\n return {\n commands: ['check-ignore', ...paths],\n format: 'utf-8',\n parser: parseCheckIgnore,\n };\n}\n", "import { configurationErrorTask, EmptyTask, straightThroughStringTask } from './task';\nimport { OptionFlags, Options, StringTask } from '../types';\nimport { append, filterString } from '../utils';\n\nexport type CloneOptions = Options &\n OptionFlags<'--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 OptionFlags<'--depth' | '-j' | '--jobs', number> &\n OptionFlags<'--branch' | '--origin' | '--recurse-submodules' | '--separate-git-dir' | '--shallow-exclude' | '--shallow-since' | '--template', string>\n\nfunction disallowedCommand(command: string) {\n return /^--upload-pack(=|$)/.test(command);\n}\n\nexport function cloneTask(repo: string | undefined, directory: string | undefined, customArgs: string[]): StringTask | EmptyTask {\n const commands = ['clone', ...customArgs];\n\n filterString(repo) && commands.push(repo);\n filterString(directory) && commands.push(directory);\n\n const banned = commands.find(disallowedCommand);\n if (banned) {\n return configurationErrorTask(`git.fetch: potential exploit argument blocked.`);\n }\n\n return straightThroughStringTask(commands);\n}\n\nexport function cloneMirrorTask(repo: string | undefined, directory: string | undefined, customArgs: string[]) {\n append(customArgs, '--mirror');\n\n return cloneTask(repo, directory, customArgs);\n}\n", "import { FetchResult } from '../../../typings';\nimport { LineParser, parseStringResponse } from '../utils';\n\nconst parsers: LineParser[] = [\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\nimport { configurationErrorTask, EmptyTask } from './task';\n\nfunction disallowedCommand(command: string) {\n return /^--upload-pack(=|$)/.test(command);\n}\n\nexport function fetchTask(remote: string, branch: string, customArgs: string[]): StringTask | EmptyTask {\n const commands = ['fetch', ...customArgs];\n if (remote && branch) {\n commands.push(remote, branch);\n }\n\n const banned = commands.find(disallowedCommand);\n if (banned) {\n return configurationErrorTask(`git.fetch: potential exploit argument blocked.`);\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[] = [\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 {\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, branch: Maybe, customArgs: string[]): StringTask {\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 {\n return straightThroughStringTask(['remote', 'add', ...customArgs, remoteName, remoteRepo]);\n}\n\nexport function getRemotesTask(verbose: boolean): StringTask {\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 {\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 {\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 { logFormatFromCommand } from '../args/log-format';\nimport { createListLogSummaryParser } from '../parsers/parse-list-log-summary';\nimport type { StringTask } from '../types';\nimport { validateLogFormatConfig } from './diff';\nimport { parseLogOptions } from './log';\nimport type { EmptyTask } from './task';\n\nexport function stashListTask(opt: LogOptions = {}, customArgs: string[]): EmptyTask | StringTask {\n const options = parseLogOptions(opt);\n const commands = ['stash', 'list', ...options.commands, ...customArgs];\n const parser = createListLogSummaryParser(options.splitter, options.fields, logFormatFromCommand(commands));\n\n return validateLogFormatConfig(commands) || {\n commands,\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 {\n return subModuleTask(['add', repo, path]);\n}\n\nexport function initSubModuleTask(customArgs: string[]): StringTask {\n return subModuleTask(['init', ...customArgs]);\n}\n\nexport function subModuleTask(customArgs: string[]): StringTask {\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 {\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 {\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 * 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(defaultExport: T) {\n return Object.defineProperties(defaultExport, {\n __esModule: {value: true},\n default: {value: defaultExport},\n }) as T & { __esModule: true, default: T };\n}\n\nexport function gitExportFactory(factory: SimpleGitFactory) {\n return Object.assign(factory.bind(null), api);\n}\n\nexport function gitInstanceFactory(baseDir?: string | Partial, options?: Partial) {\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] | [string, Partial]): 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 {\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\nconst simpleGit = esModuleFactory(gitExportFactory(gitInstanceFactory));\n\nmodule.exports = Object.assign(simpleGit, {gitP, simpleGit});\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,S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pB,SAAO,IAAI,iBAAiB;AAAA;AAxJ/B,IAMM,yBAIA;AAVN;AAAA;AAEA;AACA;AAGA,IAAM,0BAA0B;AAAA,MAC7B;AAAA,MAAgB;AAAA,MAAO;AAAA,MAAiB;AAAA;AAG3C,IAAM,0BAA0B;AAAA,MAC7B;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,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,IAAM,YAAY,iBAAgB,kBAAiB;AAEnD,OAAO,UAAU,OAAO,OAAO,WAAW,EAAC,aAAM;", ++ "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/parsers/parse-commit.ts", "../../src/lib/tasks/commit.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/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,\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) => e.git);\n\n if (mergeSummary.failed) {\n // deal with the error\n }\n ```\n */\nexport class GitResponseError 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,\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 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(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(input: T, offset?: number): Maybe;\nexport function first(input: T, offset?: number): Maybe;\nexport function first(input: any[] | IArguments, offset = 0): Maybe {\n return isArrayLike(input) && input.length > offset ? input[offset] : undefined;\n}\n\nexport function last(input: T, offset?: number): Maybe;\nexport function last(input: T, offset?: number): Maybe;\nexport function last(input: T, offset?: number): Maybe;\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[] | 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 = (line: string) => T;\n\nexport function forEachLineWithContent(input: string, callback: LineWithContentCallback): 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(target: T[] | Set, 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(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(target: Set | 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(source: T | T[]): T[] {\n return Array.isArray(source) ? source : [source];\n}\n\nexport function asStringArray(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(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, properties: string[]) {\n return Object.assign({}, ...properties.map((property) => property in source ? {[property]: source[property]} : {}));\n}\n\nexport function delay(duration = 0): Promise {\n return new Promise(done => setTimeout(done, duration));\n}\n", "import { Maybe, Options, Primitives } from '../types';\nimport { objectToString } from './util';\n\nexport interface ArgumentFilterPredicate {\n (input: any): input is T;\n}\n\nexport function filterType(input: K, filter: ArgumentFilterPredicate): K extends T ? T : undefined;\nexport function filterType(input: K, filter: ArgumentFilterPredicate, def: T): T;\nexport function filterType(input: K, filter: ArgumentFilterPredicate, def?: T): Maybe {\n if (filter(input)) {\n return input;\n }\n return (arguments.length > 2) ? def : undefined\n}\n\nexport const filterArray: ArgumentFilterPredicate> = (input): input is Array => {\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 = (input): input is string => {\n return typeof input === 'string';\n};\n\nexport const filterStringArray: ArgumentFilterPredicate = (input): input is string[] => {\n return Array.isArray(input) && input.every(filterString);\n};\n\nexport const filterStringOrStringArray: ArgumentFilterPredicate = (input): input is string | string[] => {\n return filterString(input) || (Array.isArray(input) && input.every(filterString));\n};\n\nexport function filterPlainObject(input: T | unknown): input is T;\nexport function filterPlainObject(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 {\n\n constructor(public readonly stdOut: T, public readonly stdErr: T) {\n }\n\n asStrings(): GitOutputStreams {\n return new GitOutputStreams(this.stdOut.toString('utf8'), this.stdErr.toString('utf8'));\n }\n}\n", "export class LineParser {\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 extends LineParser {\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 = {\n binary: 'git',\n maxConcurrentProcesses: 5,\n config: [],\n};\n\nexport function createInstanceConfig(...options: Array | 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(options: Maybe, commands: string[] = []): string[] {\n if (!filterPlainObject(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 {\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(parser: TaskParser, streams: GitOutputStreams) {\n return parser(streams.stdOut, streams.stdErr);\n}\n\nexport function parseStringResponse(result: T, parsers: LineParser[], ...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['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['parser'] = (text) => {\n return text.trim() === 'true';\n}\n\nexport function checkIsRepoTask(action: Maybe): StringTask {\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 {\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 {\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 {\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 {\n return {\n commands,\n format: 'buffer',\n parser(buffer) {\n return buffer;\n },\n }\n}\n\nexport function isBufferTask(task: SimpleGitTask): task is BufferTask {\n return task.format === 'buffer';\n}\n\nexport function isEmptyTask(task: SimpleGitTask): 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 = 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 {\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;\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 = 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(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 {\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 {\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 {\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 {\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 {\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();\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 {\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, 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 {\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, timeout: DeferredPromise) {\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;\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> = new Set();\n\n public add(plugin: void | SimpleGitPlugin | SimpleGitPlugin[]) {\n const plugins: SimpleGitPlugin[] = [];\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(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) {\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;\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 {\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): 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): 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 timeout && clearTimeout(timeout);\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, childDebugger: Maybe, {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 = (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;\n\ntype TaskInProgress = {\n name: string;\n logger: OutputLogger;\n task: AnySimpleGitTask;\n}\n\nexport class TasksPendingQueue {\n\n private _queue: Map = 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 = 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(task: SimpleGitTask): Promise {\n this._queue.push(task);\n\n return this._chain = this._chain.then(() => this.attemptTask(task));\n }\n\n private async attemptTask(task: SimpleGitTask): Promise {\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(task: SimpleGitTask, 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(task: RunnableTask, 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(\n task: SimpleGitTask,\n args: string[],\n result: GitExecutorResult, logger: OutputLogger): Promise {\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(task: SimpleGitTask, command: string, args: string[], outputHandler: Maybe, logger: OutputLogger): Promise {\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;\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(task: SimpleGitTask, 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 type { PluginStore } from '../plugins';\nimport type { 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(task: SimpleGitTask): Promise {\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(task: SimpleGitTask, response: Promise, callback: SimpleGitTaskCallback = 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 { CommitResult } from '../../../typings';\nimport { LineParser, parseStringResponse } from '../utils';\n\nconst parsers: LineParser[] = [\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 type { CommitResult, SimpleGit } from '../../../typings';\nimport type { SimpleGitApi } from '../simple-git-api';\nimport type { StringTask } from '../types';\nimport { parseCommitResult } from '../parsers/parse-commit';\nimport {\n asArray,\n filterArray,\n filterStringOrStringArray,\n filterType,\n getTrailingOptions, prefixedArray,\n trailingFunctionArgument\n} from '../utils';\nimport { configurationErrorTask } from './task';\n\nexport function commitTask(message: string[], files: string[], customArgs: string[]): StringTask {\n const commands: string[] = [\n '-c',\n 'core.abbrev=40',\n 'commit',\n ...prefixedArray(message, '-m'),\n ...files,\n ...customArgs,\n ];\n\n return {\n commands,\n format: 'utf-8',\n parser: parseCommitResult,\n };\n}\n\nexport default function (): Pick {\n return {\n commit(this: SimpleGitApi, message: string | string[], ...rest: unknown[]) {\n const next = trailingFunctionArgument(arguments);\n const task = rejectDeprecatedSignatures(message) ||\n commitTask(\n asArray(message),\n asArray(filterType(rest[0], filterStringOrStringArray, [])),\n [...filterType(rest[1], filterArray, []), ...getTrailingOptions(arguments, 0, true)]\n );\n\n return this._runTask(task, next);\n },\n };\n\n function rejectDeprecatedSignatures(message?: unknown) {\n return (\n !filterStringOrStringArray(message) &&\n configurationErrorTask(`git.commit: requires the commit message to be supplied as a string/string[]`)\n );\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 {\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 {\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 = [];\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 (splitter = SPLITTER, fields = defaultFieldNames) {\n return function (stdOut: string): LogResult {\n const all: ReadonlyArray = 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 filterPrimitives,\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 = {\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: Record, 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(input: T): Options {\n return Object.keys(input).reduce((out, key) => {\n if (!(key in excludeOptions)) {\n out[key] = input[key];\n }\n return out;\n }, {} as Options);\n}\n\nexport function parseLogOptions(opt: Options | LogOptions = {}, customArgs: string[] = []): ParsedLogOptions {\n const splitter = filterType(opt.splitter, filterString, SPLITTER);\n const format = !filterPrimitives(opt.format) && opt.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 (filterString(opt.file)) {\n suffix.push('--follow', opt.file);\n }\n\n appendTaskOptions(userOptions(opt as Options), command);\n\n return {\n fields,\n splitter,\n commands: [\n ...command,\n ...suffix,\n ],\n };\n}\n\nexport function logTask(splitter: string, fields: string[], customArgs: string[]): StringTask> {\n return {\n commands: ['log', ...customArgs],\n format: 'utf-8',\n parser: createListLogSummaryParser(splitter, fields),\n };\n}\n\nexport default function (): Pick {\n return {\n log(this: SimpleGitApi, ...rest: unknown[]) {\n const next = trailingFunctionArgument(arguments);\n const task = rejectDeprecatedSignatures(...rest) ||\n createLogTask(parseLogOptions(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(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>[] = [\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>[] = [\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(\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[] = [\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[] = [\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 = (stdOut, stdErr) => {\n return parseStringResponse(new PullSummary(), parsers, stdOut, stdErr);\n}\n\nexport const parsePullResult: TaskParser = (stdOut, stdErr) => {\n return Object.assign(\n new PullSummary(),\n parsePullDetail(stdOut, stdErr),\n parseRemoteMessages(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[] = [\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 = (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 = (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 {\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[] = [\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 = (stdOut, stdErr) => {\n const pushDetail = parsePushDetail(stdOut, stdErr);\n const responseDetail = parseRemoteMessages(stdOut, stdErr);\n\n return {\n ...pushDetail,\n ...responseDetail,\n };\n}\n\nexport const parsePushDetail: TaskParser = (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 {\n append(customArgs, '--tags');\n return pushTask(ref, customArgs);\n}\n\nexport function pushTask(ref: PushRef = {}, customArgs: string[]): StringTask {\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';\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, NULL } 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 = () => {\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 [to, from] = line.split(NULL);\n\n return {\n from: from || to,\n to,\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 = 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.split(NULL);\n const status = new StatusSummary();\n\n for (let i = 0, l = lines.length; i < l;) {\n let line = lines[i++].trim();\n\n if (!line) {\n continue;\n }\n\n if (line.charAt(0) === PorcelainFileStatus.RENAMED) {\n line += NULL + (lines[i++] || '');\n }\n\n splitLine(status, line);\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.replace(/\\0.+$/, ''), index, workingDir));\n }\n }\n}\n", "import { StatusResult } from '../../../typings';\nimport { parseStatusSummary } from '../responses/StatusSummary';\nimport { StringTask } from '../types';\n\nconst ignoredOptions = ['--null', '-z'];\n\nexport function statusTask(customArgs: string[]): StringTask {\n const commands = [\n 'status',\n '--porcelain',\n '-b',\n '-u',\n '--null',\n ...customArgs.filter(arg => !ignoredOptions.includes(arg))\n ];\n\n return {\n format: 'utf-8',\n commands,\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 commit from './tasks/commit';\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(task: SimpleGitTask, then?: SimpleGitTaskCallback) {\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, commit(), 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, 'promise' | 'done'> & {id: number};\n\nconst createScheduledTask: () => ScheduledTask = (() => {\n let id = 0;\n return () => {\n id++;\n const {promise, done} = createDeferred();\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 {\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 {\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[] = [\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 = (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[] = [\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 {\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 {\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 {\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 {\n const task: StringTask = {\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 {\n return {\n commands: ['check-ignore', ...paths],\n format: 'utf-8',\n parser: parseCheckIgnore,\n };\n}\n", "import { configurationErrorTask, EmptyTask, straightThroughStringTask } from './task';\nimport { OptionFlags, Options, StringTask } from '../types';\nimport { append, filterString } from '../utils';\n\nexport type CloneOptions = Options &\n OptionFlags<'--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 OptionFlags<'--depth' | '-j' | '--jobs', number> &\n OptionFlags<'--branch' | '--origin' | '--recurse-submodules' | '--separate-git-dir' | '--shallow-exclude' | '--shallow-since' | '--template', string>\n\nfunction disallowedCommand(command: string) {\n return /^--upload-pack(=|$)/.test(command);\n}\n\nexport function cloneTask(repo: string | undefined, directory: string | undefined, customArgs: string[]): StringTask | EmptyTask {\n const commands = ['clone', ...customArgs];\n\n filterString(repo) && commands.push(repo);\n filterString(directory) && commands.push(directory);\n\n const banned = commands.find(disallowedCommand);\n if (banned) {\n return configurationErrorTask(`git.fetch: potential exploit argument blocked.`);\n }\n\n return straightThroughStringTask(commands);\n}\n\nexport function cloneMirrorTask(repo: string | undefined, directory: string | undefined, customArgs: string[]) {\n append(customArgs, '--mirror');\n\n return cloneTask(repo, directory, customArgs);\n}\n", "import { StringTask } from '../types';\nimport { DiffResult } from '../../../typings';\nimport { parseDiffResult } from '../parsers/parse-diff-summary';\n\nexport function diffSummaryTask(customArgs: string[]): StringTask {\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[] = [\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\nimport { configurationErrorTask, EmptyTask } from './task';\n\nfunction disallowedCommand(command: string) {\n return /^--upload-pack(=|$)/.test(command);\n}\n\nexport function fetchTask(remote: string, branch: string, customArgs: string[]): StringTask | EmptyTask {\n const commands = ['fetch', ...customArgs];\n if (remote && branch) {\n commands.push(remote, branch);\n }\n\n const banned = commands.find(disallowedCommand);\n if (banned) {\n return configurationErrorTask(`git.fetch: potential exploit argument blocked.`);\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[] = [\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 {\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, branch: Maybe, customArgs: string[]): StringTask {\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 {\n return straightThroughStringTask(['remote', 'add', ...customArgs, remoteName, remoteRepo]);\n}\n\nexport function getRemotesTask(verbose: boolean): StringTask {\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 {\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 {\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 {\n const options = parseLogOptions(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 {\n return subModuleTask(['add', repo, path]);\n}\n\nexport function initSubModuleTask(customArgs: string[]): StringTask {\n return subModuleTask(['init', ...customArgs]);\n}\n\nexport function subModuleTask(customArgs: string[]): StringTask {\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 {\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 {\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 * 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(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(factory: SimpleGitFactory, extra: T) {\n return Object.assign(function (...args: Parameters) {\n return factory.apply(null, args);\n },\n api,\n extra || {},\n );\n}\n\nexport function gitInstanceFactory(baseDir?: string | Partial, options?: Partial) {\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] | [string, Partial]): 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 {\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,SACD;AACC,cAAM,QAAW,WAAW,OAAO;AAHnB;AAAA;AAAA;AAAA;AAAA;;;AC5BtB,IAYO;AAZP;AAAA;AAAA;AAYO,sCAAgC,SAAS;AAAA,MAE7C,YACmB,QAChB,SACD;AACC,cAAM,QAAW;AAHD;AAAA;AAAA;AAAA;AAAA;;;ACftB,IAGO;AAHP;AAAA;AACA;AAEO,mCAA6B,SAAS;AAAA,MAE1C,YACU,MACS,QAChB,SACD;AACC,cAAM,MAAM;AAJL;AACS;AAIhB,eAAO,eAAe,MAAM,WAAW;AAAA;AAAA;AAAA;AAAA;;;ACX7C,IAUO;AAVP;AAAA;AAAA;AAUO,2CAAqC,SAAS;AAA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;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,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/dist/esm/index.js b/node_modules/simple-git/dist/esm/index.js +index e74bb3b..3550725 100644 +--- a/node_modules/simple-git/dist/esm/index.js ++++ b/node_modules/simple-git/dist/esm/index.js +@@ -406,9 +406,9 @@ var init_task_options = __esm({ + function callTaskParser(parser3, streams) { + return parser3(streams.stdOut, streams.stdErr); + } +-function parseStringResponse(result, parsers11, texts, trim = true) { +- asArray(texts).forEach((text) => { +- for (let lines = toLinesWithContent(text, trim), i = 0, max = lines.length; i < max; i++) { ++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; +@@ -1559,26 +1559,6 @@ var init_init = __esm({ + } + }); + +-// src/lib/args/log-format.ts +-function logFormatFromCommand(customArgs) { +- for (let i = 0; i < customArgs.length; i++) { +- const format = logFormatRegex.exec(customArgs[i]); +- if (format) { +- return `--${format[1]}`; +- } +- } +- return "" /* NONE */; +-} +-function isLogFormat(customArg) { +- return logFormatRegex.test(customArg); +-} +-var logFormatRegex; +-var init_log_format = __esm({ +- "src/lib/args/log-format.ts"() { +- logFormatRegex = /^--(stat|numstat|name-only|name-status)(=|$)/; +- } +-}); +- + // src/lib/responses/DiffSummary.ts + var DiffSummary; + var init_DiffSummary = __esm({ +@@ -1595,97 +1575,74 @@ var init_DiffSummary = __esm({ + }); + + // src/lib/parsers/parse-diff-summary.ts +-function getDiffParser(format = "" /* NONE */) { +- const parser3 = diffSummaryParsers[format]; +- return (stdOut) => parseStringResponse(new DiffSummary(), parser3, stdOut, false); ++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)); ++ }); + } +-var statParser, numStatParser, nameOnlyParser, nameStatusParser, diffSummaryParsers; ++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_log_format(); + init_DiffSummary(); +- init_utils(); +- statParser = [ +- new LineParser(/(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/, (result, [file, changes, alterations = ""]) => { +- result.files.push({ +- file: file.trim(), +- changes: asNumber(changes), +- insertions: alterations.replace(/[^+]/g, "").length, +- deletions: alterations.replace(/[^-]/g, "").length, +- binary: false +- }); +- }), +- new LineParser(/(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/, (result, [file, before, after]) => { +- result.files.push({ +- file: file.trim(), +- before: asNumber(before), +- after: asNumber(after), +- binary: true +- }); +- }), +- new LineParser(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/, (result, [changed, summary]) => { +- const inserted = /(\d+) i/.exec(summary); +- const deleted = /(\d+) d/.exec(summary); +- result.changed = asNumber(changed); +- result.insertions = asNumber(inserted == null ? void 0 : inserted[1]); +- result.deletions = asNumber(deleted == null ? void 0 : deleted[1]); +- }) +- ]; +- numStatParser = [ +- new LineParser(/(\d+)\t(\d+)\t(.+)$/, (result, [changesInsert, changesDelete, file]) => { +- const insertions = asNumber(changesInsert); +- const deletions = asNumber(changesDelete); +- result.changed++; +- result.insertions += insertions; +- result.deletions += deletions; +- result.files.push({ +- file, +- changes: insertions + deletions, +- insertions, +- deletions, +- binary: false +- }); +- }), +- new LineParser(/-\t-\t(.+)$/, (result, [file]) => { +- result.changed++; +- result.files.push({ +- file, +- after: 0, +- before: 0, +- binary: true +- }); +- }) +- ]; +- nameOnlyParser = [ +- new LineParser(/(.+)$/, (result, [file]) => { +- result.changed++; +- result.files.push({ +- file, +- changes: 0, +- insertions: 0, +- deletions: 0, +- binary: false +- }); +- }) +- ]; +- nameStatusParser = [ +- new LineParser(/([ACDMRTUXB])\s*(.+)$/, (result, [_status, file]) => { +- result.changed++; +- result.files.push({ +- file, +- changes: 0, +- insertions: 0, +- deletions: 0, +- binary: false +- }); +- }) +- ]; +- diffSummaryParsers = { +- ["" /* NONE */]: statParser, +- ["--stat" /* STAT */]: statParser, +- ["--numstat" /* NUM_STAT */]: numStatParser, +- ["--name-status" /* NAME_STATUS */]: nameStatusParser, +- ["--name-only" /* NAME_ONLY */]: nameOnlyParser ++ statusUpdate = { ++ file(status, value) { ++ status.changed = value; ++ }, ++ deletion(status, value) { ++ status.deletions = value; ++ }, ++ insertion(status, value) { ++ status.insertions = value; ++ } + }; + } + }); +@@ -1697,8 +1654,7 @@ function lineBuilder(tokens, fields) { + return line; + }, /* @__PURE__ */ Object.create({ diff: null })); + } +-function createListLogSummaryParser(splitter = SPLITTER, fields = defaultFieldNames, logFormat = "" /* NONE */) { +- const parseDiffResult = getDiffParser(logFormat); ++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); +@@ -1720,7 +1676,6 @@ var init_parse_list_log_summary = __esm({ + "src/lib/parsers/parse-list-log-summary.ts"() { + init_utils(); + init_parse_diff_summary(); +- init_log_format(); + START_BOUNDARY = "\xF2\xF2\xF2\xF2\xF2\xF2 "; + COMMIT_BOUNDARY = " \xF2\xF2"; + SPLITTER = " \xF2 "; +@@ -1728,43 +1683,6 @@ var init_parse_list_log_summary = __esm({ + } + }); + +-// src/lib/tasks/diff.ts +-var diff_exports = {}; +-__export(diff_exports, { +- diffSummaryTask: () => diffSummaryTask, +- validateLogFormatConfig: () => validateLogFormatConfig +-}); +-function diffSummaryTask(customArgs) { +- let logFormat = logFormatFromCommand(customArgs); +- const commands = ["diff"]; +- if (logFormat === "" /* NONE */) { +- logFormat = "--stat" /* STAT */; +- commands.push("--stat=4096"); +- } +- commands.push(...customArgs); +- return validateLogFormatConfig(commands) || { +- commands, +- format: "utf-8", +- parser: getDiffParser(logFormat) +- }; +-} +-function validateLogFormatConfig(customArgs) { +- const flags = customArgs.filter(isLogFormat); +- if (flags.length > 1) { +- return configurationErrorTask(`Summary flags are mutually exclusive - pick one of ${flags.join(",")}`); +- } +- if (flags.length && customArgs.includes("-z")) { +- return configurationErrorTask(`Summary flag ${flags} parsing is not compatible with null termination option '-z'`); +- } +-} +-var init_diff = __esm({ +- "src/lib/tasks/diff.ts"() { +- init_log_format(); +- init_parse_diff_summary(); +- init_task(); +- } +-}); +- + // src/lib/tasks/log.ts + function prettyFormat(format, splitter) { + const fields = []; +@@ -1825,19 +1743,17 @@ function parseLogOptions(opt = {}, customArgs = []) { + }; + } + function logTask(splitter, fields, customArgs) { +- const parser3 = createListLogSummaryParser(splitter, fields, logFormatFromCommand(customArgs)); + return { + commands: ["log", ...customArgs], + format: "utf-8", +- parser: parser3 ++ parser: createListLogSummaryParser(splitter, fields) + }; + } + function log_default() { + return { + log(...rest) { + const next = trailingFunctionArgument(arguments); +- const options = parseLogOptions(trailingOptionsArgument(arguments), filterType(arguments[0], filterArray)); +- const task = rejectDeprecatedSignatures(...rest) || validateLogFormatConfig(options.commands) || createLogTask(options); ++ const task = rejectDeprecatedSignatures(...rest) || createLogTask(parseLogOptions(trailingOptionsArgument(arguments), filterType(arguments[0], filterArray))); + return this._runTask(task, next); + } + }; +@@ -1851,11 +1767,9 @@ function log_default() { + var excludeOptions; + var init_log = __esm({ + "src/lib/tasks/log.ts"() { +- init_log_format(); + init_parse_list_log_summary(); + init_utils(); + init_task(); +- init_diff(); + excludeOptions = /* @__PURE__ */ ((excludeOptions2) => { + excludeOptions2[excludeOptions2["--pretty"] = 0] = "--pretty"; + excludeOptions2[excludeOptions2["max-count"] = 1] = "max-count"; +@@ -2032,7 +1946,7 @@ var init_parse_remote_messages = __esm({ + + // src/lib/parsers/parse-pull.ts + function parsePullErrorResult(stdOut, stdErr) { +- const pullError = parseStringResponse(new PullFailedSummary(), errorParsers, [stdOut, stdErr]); ++ const pullError = parseStringResponse(new PullFailedSummary(), errorParsers, stdOut, stdErr); + return pullError.message && pullError; + } + var FILE_UPDATE_REGEX, SUMMARY_REGEX, ACTION_REGEX, parsers3, errorParsers, parsePullDetail, parsePullResult; +@@ -2079,7 +1993,7 @@ var init_parse_pull = __esm({ + }) + ]; + parsePullDetail = (stdOut, stdErr) => { +- return parseStringResponse(new PullSummary(), parsers3, [stdOut, stdErr]); ++ return parseStringResponse(new PullSummary(), parsers3, stdOut, stdErr); + }; + parsePullResult = (stdOut, stdErr) => { + return Object.assign(new PullSummary(), parsePullDetail(stdOut, stdErr), parseRemoteMessages(stdOut, stdErr)); +@@ -2203,7 +2117,7 @@ var init_parse_push = __esm({ + return __spreadValues(__spreadValues({}, pushDetail), responseDetail); + }; + parsePushDetail = (stdOut, stdErr) => { +- return parseStringResponse({ pushed: [] }, parsers5, [stdOut, stdErr]); ++ return parseStringResponse({ pushed: [] }, parsers5, stdOut, stdErr); + }; + } + }); +@@ -2622,7 +2536,7 @@ var init_parse_branch_delete = __esm({ + }) + ]; + parseBranchDeletions = (stdOut, stdErr) => { +- return parseStringResponse(new BranchDeletionBatch(), parsers7, [stdOut, stdErr]); ++ return parseStringResponse(new BranchDeletionBatch(), parsers7, stdOut, stdErr); + }; + } + }); +@@ -2638,15 +2552,14 @@ var init_BranchSummary = __esm({ + this.current = ""; + this.detached = false; + } +- push(status, detached, name, commit, label) { +- if (status === "*" /* CURRENT */) { ++ push(current, detached, name, commit, label) { ++ if (current) { + this.detached = detached; + this.current = name; + } + this.all.push(name); + this.branches[name] = { +- current: status === "*" /* CURRENT */, +- linkedWorkTree: status === "+" /* LINKED */, ++ current, + name, + commit, + label +@@ -2657,9 +2570,6 @@ var init_BranchSummary = __esm({ + }); + + // src/lib/parsers/parse-branch.ts +-function branchStatus(input) { +- return input ? input.charAt(0) : ""; +-} + function parseBranchSummary(stdOut) { + return parseStringResponse(new BranchSummaryResult(), parsers8, stdOut); + } +@@ -2669,11 +2579,11 @@ var init_parse_branch = __esm({ + init_BranchSummary(); + init_utils(); + parsers8 = [ +- new LineParser(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/, (result, [current, name, commit, label]) => { +- result.push(branchStatus(current), true, name, commit, label); ++ 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(branchStatus(current), false, 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); + }) + ]; + } +@@ -2818,6 +2728,26 @@ var init_clone = __esm({ + } + }); + ++// 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 = { +@@ -2826,7 +2756,7 @@ function parseFetchResult(stdOut, stdErr) { + branches: [], + tags: [] + }; +- return parseStringResponse(result, parsers9, [stdOut, stdErr]); ++ return parseStringResponse(result, parsers9, stdOut, stdErr); + } + var parsers9; + var init_parse_fetch = __esm({ +@@ -3034,19 +2964,16 @@ __export(stash_list_exports, { + }); + function stashListTask(opt = {}, customArgs) { + const options = parseLogOptions(opt); +- const commands = ["stash", "list", ...options.commands, ...customArgs]; +- const parser3 = createListLogSummaryParser(options.splitter, options.fields, logFormatFromCommand(commands)); +- return validateLogFormatConfig(commands) || { +- commands, ++ 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_log_format(); + init_parse_list_log_summary(); +- init_diff(); + init_log(); + } + }); +@@ -3854,7 +3781,6 @@ function toError(error) { + } + + // src/esm.mjs +-var simpleGit = gitInstanceFactory; + var esm_default = gitInstanceFactory; + export { + CheckRepoActions, +@@ -3868,7 +3794,6 @@ export { + TaskConfigurationError, + esm_default as default, + gitP, +- grepQueryBuilder, +- simpleGit ++ grepQueryBuilder + }; + //# sourceMappingURL=index.js.map +diff --git a/node_modules/simple-git/dist/esm/index.js.map b/node_modules/simple-git/dist/esm/index.js.map +index dba5dc5..731ce16 100644 +--- a/node_modules/simple-git/dist/esm/index.js.map ++++ b/node_modules/simple-git/dist/esm/index.js.map +@@ -1,7 +1,7 @@ + { + "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/parsers/parse-commit.ts", "../../src/lib/tasks/commit.ts", "../../src/lib/tasks/hash-object.ts", "../../src/lib/responses/InitSummary.ts", "../../src/lib/tasks/init.ts", "../../src/lib/args/log-format.ts", "../../src/lib/responses/DiffSummary.ts", "../../src/lib/parsers/parse-diff-summary.ts", "../../src/lib/parsers/parse-list-log-summary.ts", "../../src/lib/tasks/diff.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-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 type { 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,\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) => e.git);\n\n if (mergeSummary.failed) {\n // deal with the error\n }\n ```\n */\nexport class GitResponseError 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 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(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(input: T, offset?: number): Maybe;\nexport function first(input: T, offset?: number): Maybe;\nexport function first(input: any[] | IArguments, offset = 0): Maybe {\n return isArrayLike(input) && input.length > offset ? input[offset] : undefined;\n}\n\nexport function last(input: T, offset?: number): Maybe;\nexport function last(input: T, offset?: number): Maybe;\nexport function last(input: T, offset?: number): Maybe;\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[] | 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 = (line: string) => T;\n\nexport function forEachLineWithContent(input: string, callback: LineWithContentCallback): 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(target: T[] | Set, 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(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(target: Set | 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(source: T | T[]): T[] {\n return Array.isArray(source) ? source : [source];\n}\n\nexport function asStringArray(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(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, properties: string[]) {\n return Object.assign({}, ...properties.map((property) => property in source ? {[property]: source[property]} : {}));\n}\n\nexport function delay(duration = 0): Promise {\n return new Promise(done => setTimeout(done, duration));\n}\n", "import { Maybe, Options, Primitives } from '../types';\nimport { objectToString } from './util';\n\nexport interface ArgumentFilterPredicate {\n (input: any): input is T;\n}\n\nexport function filterType(input: K, filter: ArgumentFilterPredicate): K extends T ? T : undefined;\nexport function filterType(input: K, filter: ArgumentFilterPredicate, def: T): T;\nexport function filterType(input: K, filter: ArgumentFilterPredicate, def?: T): Maybe {\n if (filter(input)) {\n return input;\n }\n return (arguments.length > 2) ? def : undefined\n}\n\nexport const filterArray: ArgumentFilterPredicate> = (input): input is Array => {\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 = (input): input is string => {\n return typeof input === 'string';\n};\n\nexport const filterStringArray: ArgumentFilterPredicate = (input): input is string[] => {\n return Array.isArray(input) && input.every(filterString);\n};\n\nexport const filterStringOrStringArray: ArgumentFilterPredicate = (input): input is string | string[] => {\n return filterString(input) || (Array.isArray(input) && input.every(filterString));\n};\n\nexport function filterPlainObject(input: T | unknown): input is T;\nexport function filterPlainObject(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 {\n\n constructor(public readonly stdOut: T, public readonly stdErr: T) {\n }\n\n asStrings(): GitOutputStreams {\n return new GitOutputStreams(this.stdOut.toString('utf8'), this.stdErr.toString('utf8'));\n }\n}\n", "export class LineParser {\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 extends LineParser {\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 = {\n binary: 'git',\n maxConcurrentProcesses: 5,\n config: [],\n};\n\nexport function createInstanceConfig(...options: Array | 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(options: Maybe, commands: string[] = []): string[] {\n if (!filterPlainObject(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 {\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 type { MaybeArray, TaskParser, TaskResponseFormat } from '../types';\nimport { GitOutputStreams } from './git-output-streams';\nimport { LineParser } from './line-parser';\nimport { asArray, toLinesWithContent } from './util';\n\nexport function callTaskParser(parser: TaskParser, streams: GitOutputStreams) {\n return parser(streams.stdOut, streams.stdErr);\n}\n\nexport function parseStringResponse(result: T, parsers: LineParser[], texts: MaybeArray, trim = true): T {\n asArray(texts).forEach(text => {\n for (let lines = toLinesWithContent(text, trim), 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['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['parser'] = (text) => {\n return text.trim() === 'true';\n}\n\nexport function checkIsRepoTask(action: Maybe): StringTask {\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 {\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 {\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 type { 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 {\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 {\n return {\n commands,\n format: 'buffer',\n parser(buffer) {\n return buffer;\n },\n }\n}\n\nexport function isBufferTask(task: SimpleGitTask): task is BufferTask {\n return task.format === 'buffer';\n}\n\nexport function isEmptyTask(task: SimpleGitTask): 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 = 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 {\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;\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 = 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(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 {\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 {\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 {\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 {\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 {\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();\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 {\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, 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 {\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, childDebugger: Maybe, {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 = (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;\n\ntype TaskInProgress = {\n name: string;\n logger: OutputLogger;\n task: AnySimpleGitTask;\n}\n\nexport class TasksPendingQueue {\n\n private _queue: Map = 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 = 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(task: SimpleGitTask): Promise {\n this._queue.push(task);\n\n return this._chain = this._chain.then(() => this.attemptTask(task));\n }\n\n private async attemptTask(task: SimpleGitTask): Promise {\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 as Error);\n } finally {\n onQueueComplete();\n onScheduleComplete();\n }\n }\n\n private onFatalException(task: SimpleGitTask, 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(task: RunnableTask, 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(\n task: SimpleGitTask,\n args: string[],\n result: GitExecutorResult, logger: OutputLogger): Promise {\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(task: SimpleGitTask, command: string, args: string[], outputHandler: Maybe, logger: OutputLogger): Promise {\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;\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(task: SimpleGitTask, 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 type { PluginStore } from '../plugins';\nimport type { 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(task: SimpleGitTask): Promise {\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(task: SimpleGitTask, response: Promise, callback: SimpleGitTaskCallback = 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 { CommitResult } from '../../../typings';\nimport { LineParser, parseStringResponse } from '../utils';\n\nconst parsers: LineParser[] = [\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 type { CommitResult, SimpleGit } from '../../../typings';\nimport type { SimpleGitApi } from '../simple-git-api';\nimport type { StringTask } from '../types';\nimport { parseCommitResult } from '../parsers/parse-commit';\nimport {\n asArray,\n filterArray,\n filterStringOrStringArray,\n filterType,\n getTrailingOptions, prefixedArray,\n trailingFunctionArgument\n} from '../utils';\nimport { configurationErrorTask } from './task';\n\nexport function commitTask(message: string[], files: string[], customArgs: string[]): StringTask {\n const commands: string[] = [\n '-c',\n 'core.abbrev=40',\n 'commit',\n ...prefixedArray(message, '-m'),\n ...files,\n ...customArgs,\n ];\n\n return {\n commands,\n format: 'utf-8',\n parser: parseCommitResult,\n };\n}\n\nexport default function (): Pick {\n return {\n commit(this: SimpleGitApi, message: string | string[], ...rest: unknown[]) {\n const next = trailingFunctionArgument(arguments);\n const task = rejectDeprecatedSignatures(message) ||\n commitTask(\n asArray(message),\n asArray(filterType(rest[0], filterStringOrStringArray, [])),\n [...filterType(rest[1], filterArray, []), ...getTrailingOptions(arguments, 0, true)]\n );\n\n return this._runTask(task, next);\n },\n };\n\n function rejectDeprecatedSignatures(message?: unknown) {\n return (\n !filterStringOrStringArray(message) &&\n configurationErrorTask(`git.commit: requires the commit message to be supplied as a string/string[]`)\n );\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 {\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 {\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", "export enum LogFormat {\n NONE = '',\n STAT = '--stat',\n NUM_STAT = '--numstat',\n NAME_ONLY = '--name-only',\n NAME_STATUS = '--name-status',\n}\n\nconst logFormatRegex = /^--(stat|numstat|name-only|name-status)(=|$)/;\n\nexport function logFormatFromCommand(customArgs: string[]) {\n for (let i = 0; i < customArgs.length; i++) {\n const format = logFormatRegex.exec(customArgs[i]);\n if (format) {\n return `--${format[1]}` as LogFormat;\n }\n }\n\n return LogFormat.NONE;\n}\n\nexport function isLogFormat(customArg: string | unknown) {\n return logFormatRegex.test(customArg as string);\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 = [];\n}\n", "import { DiffResult } from '../../../typings';\nimport { LogFormat } from '../args/log-format';\nimport { DiffSummary } from '../responses/DiffSummary';\nimport { asNumber, LineParser, parseStringResponse } from '../utils';\n\nconst statParser = [\n new LineParser(/(.+)\\s+\\|\\s+(\\d+)(\\s+[+\\-]+)?$/, (result, [file, changes, alterations = '']) => {\n result.files.push({\n file: file.trim(),\n changes: asNumber(changes),\n insertions: alterations.replace(/[^+]/g, '').length,\n deletions: alterations.replace(/[^-]/g, '').length,\n binary: false\n });\n }),\n new LineParser(/(.+) \\|\\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/, (result, [file, before, after]) => {\n result.files.push({\n file: file.trim(),\n before: asNumber(before),\n after: asNumber(after),\n binary: true\n });\n }),\n new LineParser(/(\\d+) files? changed\\s*((?:, \\d+ [^,]+){0,2})/, (result, [changed, summary]) => {\n const inserted = /(\\d+) i/.exec(summary);\n const deleted = /(\\d+) d/.exec(summary);\n\n result.changed = asNumber(changed);\n result.insertions = asNumber(inserted?.[1]);\n result.deletions = asNumber(deleted?.[1]);\n })\n];\n\nconst numStatParser = [\n new LineParser(/(\\d+)\\t(\\d+)\\t(.+)$/, (result, [changesInsert, changesDelete, file]) => {\n const insertions = asNumber(changesInsert);\n const deletions = asNumber(changesDelete);\n\n result.changed++;\n result.insertions += insertions;\n result.deletions += deletions;\n\n result.files.push({\n file,\n changes: insertions + deletions,\n insertions,\n deletions,\n binary: false,\n });\n }),\n new LineParser(/-\\t-\\t(.+)$/, (result, [file]) => {\n result.changed++;\n\n result.files.push({\n file,\n after: 0,\n before: 0,\n binary: true,\n });\n })\n];\n\nconst nameOnlyParser = [\n new LineParser(/(.+)$/, (result, [file]) => {\n result.changed++;\n result.files.push({\n file,\n changes: 0,\n insertions: 0,\n deletions: 0,\n binary: false,\n });\n })\n];\n\nconst nameStatusParser = [\n new LineParser(/([ACDMRTUXB])\\s*(.+)$/, (result, [_status, file]) => {\n result.changed++;\n result.files.push({\n file,\n changes: 0,\n insertions: 0,\n deletions: 0,\n binary: false,\n });\n })\n];\n\nconst diffSummaryParsers: Record[]> = {\n [LogFormat.NONE]: statParser,\n [LogFormat.STAT]: statParser,\n [LogFormat.NUM_STAT]: numStatParser,\n [LogFormat.NAME_STATUS]: nameStatusParser,\n [LogFormat.NAME_ONLY]: nameOnlyParser,\n};\n\nexport function getDiffParser(format = LogFormat.NONE) {\n const parser = diffSummaryParsers[format];\n\n return (stdOut: string) => parseStringResponse(new DiffSummary(), parser, stdOut, false);\n}\n", "import { ListLogLine, LogResult } from '../../../typings';\nimport { toLinesWithContent } from '../utils';\nimport { getDiffParser } from './parse-diff-summary';\nimport { LogFormat } from '../args/log-format';\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 (splitter = SPLITTER, fields = defaultFieldNames, logFormat = LogFormat.NONE) {\n const parseDiffResult = getDiffParser(logFormat);\n\n return function (stdOut: string): LogResult {\n const all: ReadonlyArray = 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 { StringTask } from '../types';\nimport { DiffResult } from '../../../typings';\nimport { isLogFormat, LogFormat, logFormatFromCommand } from '../args/log-format';\nimport { getDiffParser } from '../parsers/parse-diff-summary';\nimport { configurationErrorTask, EmptyTask } from './task';\n\nexport function diffSummaryTask(customArgs: string[]): StringTask | EmptyTask {\n let logFormat = logFormatFromCommand(customArgs);\n\n const commands = ['diff'];\n\n if (logFormat === LogFormat.NONE) {\n logFormat = LogFormat.STAT;\n commands.push('--stat=4096');\n }\n\n commands.push(...customArgs);\n\n return validateLogFormatConfig(commands) || {\n commands,\n format: 'utf-8',\n parser: getDiffParser(logFormat),\n };\n}\n\nexport function validateLogFormatConfig(customArgs: unknown[]): EmptyTask | void {\n const flags = customArgs.filter(isLogFormat);\n\n if (flags.length > 1) {\n return configurationErrorTask(`Summary flags are mutually exclusive - pick one of ${flags.join(',')}`);\n }\n\n if (flags.length && customArgs.includes('-z')) {\n return configurationErrorTask(`Summary flag ${flags} parsing is not compatible with null termination option '-z'`);\n }\n}\n", "import type { Options, StringTask } from '../types';\nimport type { LogResult, SimpleGit } from '../../../typings';\nimport { logFormatFromCommand } from '../args/log-format';\nimport {\n COMMIT_BOUNDARY,\n createListLogSummaryParser,\n SPLITTER,\n START_BOUNDARY\n} from '../parsers/parse-list-log-summary';\nimport {\n appendTaskOptions,\n filterArray,\n filterPrimitives,\n filterString,\n filterType,\n trailingFunctionArgument,\n trailingOptionsArgument\n} from '../utils';\nimport { SimpleGitApi } from '../simple-git-api';\nimport { configurationErrorTask } from './task';\nimport { validateLogFormatConfig } from './diff';\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 = {\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: Record, 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(input: T): Options {\n return Object.keys(input).reduce((out, key) => {\n if (!(key in excludeOptions)) {\n out[key] = input[key];\n }\n return out;\n }, {} as Options);\n}\n\nexport function parseLogOptions(opt: Options | LogOptions = {}, customArgs: string[] = []): ParsedLogOptions {\n const splitter = filterType(opt.splitter, filterString, SPLITTER);\n const format = !filterPrimitives(opt.format) && opt.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 (filterString(opt.file)) {\n suffix.push('--follow', opt.file);\n }\n\n appendTaskOptions(userOptions(opt as Options), command);\n\n return {\n fields,\n splitter,\n commands: [\n ...command,\n ...suffix,\n ],\n };\n}\n\nexport function logTask(splitter: string, fields: string[], customArgs: string[]): StringTask> {\n const parser = createListLogSummaryParser(splitter, fields, logFormatFromCommand(customArgs));\n\n return {\n commands: ['log', ...customArgs],\n format: 'utf-8',\n parser,\n };\n}\n\nexport default function (): Pick {\n return {\n log(this: SimpleGitApi, ...rest: unknown[]) {\n const next = trailingFunctionArgument(arguments);\n const options = parseLogOptions(trailingOptionsArgument(arguments), filterType(arguments[0], filterArray));\n const task = rejectDeprecatedSignatures(...rest) ||\n validateLogFormatConfig(options.commands) ||\n createLogTask(options);\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(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>[] = [\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>[] = [\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(\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[] = [\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[] = [\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 = (stdOut, stdErr) => {\n return parseStringResponse(new PullSummary(), parsers, [stdOut, stdErr]);\n}\n\nexport const parsePullResult: TaskParser = (stdOut, stdErr) => {\n return Object.assign(\n new PullSummary(),\n parsePullDetail(stdOut, stdErr),\n parseRemoteMessages(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[] = [\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 = (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 = (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 {\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[] = [\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 = (stdOut, stdErr) => {\n const pushDetail = parsePushDetail(stdOut, stdErr);\n const responseDetail = parseRemoteMessages(stdOut, stdErr);\n\n return {\n ...pushDetail,\n ...responseDetail,\n };\n}\n\nexport const parsePushDetail: TaskParser = (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 {\n append(customArgs, '--tags');\n return pushTask(ref, customArgs);\n}\n\nexport function pushTask(ref: PushRef = {}, customArgs: string[]): StringTask {\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';\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, NULL } 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 = () => {\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 [to, from] = line.split(NULL);\n\n return {\n from: from || to,\n to,\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 = 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.split(NULL);\n const status = new StatusSummary();\n\n for (let i = 0, l = lines.length; i < l;) {\n let line = lines[i++].trim();\n\n if (!line) {\n continue;\n }\n\n if (line.charAt(0) === PorcelainFileStatus.RENAMED) {\n line += NULL + (lines[i++] || '');\n }\n\n splitLine(status, line);\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.replace(/\\0.+$/, ''), index, workingDir));\n }\n }\n}\n", "import { StatusResult } from '../../../typings';\nimport { parseStatusSummary } from '../responses/StatusSummary';\nimport { StringTask } from '../types';\n\nconst ignoredOptions = ['--null', '-z'];\n\nexport function statusTask(customArgs: string[]): StringTask {\n const commands = [\n 'status',\n '--porcelain',\n '-b',\n '-u',\n '--null',\n ...customArgs.filter(arg => !ignoredOptions.includes(arg))\n ];\n\n return {\n format: 'utf-8',\n commands,\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 commit from './tasks/commit';\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(task: SimpleGitTask, then?: SimpleGitTaskCallback) {\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, commit(), 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, 'promise' | 'done'> & {id: number};\n\nconst createScheduledTask: () => ScheduledTask = (() => {\n let id = 0;\n return () => {\n id++;\n const {promise, done} = createDeferred();\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 {\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 {\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[] = [\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 = (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 type { BranchSummary, BranchSummaryBranch } from '../../../typings';\n\nexport enum BranchStatusIdentifier {\n CURRENT = '*',\n LINKED = '+',\n}\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(status: BranchStatusIdentifier | unknown, detached: boolean, name: string, commit: string, label: string) {\n if (status === BranchStatusIdentifier.CURRENT) {\n this.detached = detached;\n this.current = name;\n }\n\n this.all.push(name);\n this.branches[name] = {\n current: status === BranchStatusIdentifier.CURRENT,\n linkedWorkTree: status === BranchStatusIdentifier.LINKED,\n name,\n commit,\n label\n };\n }\n}\n\n", "import type { BranchSummary } from '../../../typings';\nimport { BranchSummaryResult } from '../responses/BranchSummary';\nimport { LineParser, parseStringResponse } from '../utils';\n\nconst parsers: LineParser[] = [\n new LineParser(/^([*+]\\s)?\\((?:HEAD )?detached (?:from|at) (\\S+)\\)\\s+([a-z0-9]+)\\s(.*)$/, (result, [current, name, commit, label]) => {\n result.push(\n branchStatus(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 branchStatus(current),\n false,\n name, commit, label\n );\n })\n];\n\nfunction branchStatus(input?: string) {\n return input ? input.charAt(0) : '';\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 {\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 {\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 {\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 {\n const task: StringTask = {\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 {\n return {\n commands: ['check-ignore', ...paths],\n format: 'utf-8',\n parser: parseCheckIgnore,\n };\n}\n", "import { configurationErrorTask, EmptyTask, straightThroughStringTask } from './task';\nimport { OptionFlags, Options, StringTask } from '../types';\nimport { append, filterString } from '../utils';\n\nexport type CloneOptions = Options &\n OptionFlags<'--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 OptionFlags<'--depth' | '-j' | '--jobs', number> &\n OptionFlags<'--branch' | '--origin' | '--recurse-submodules' | '--separate-git-dir' | '--shallow-exclude' | '--shallow-since' | '--template', string>\n\nfunction disallowedCommand(command: string) {\n return /^--upload-pack(=|$)/.test(command);\n}\n\nexport function cloneTask(repo: string | undefined, directory: string | undefined, customArgs: string[]): StringTask | EmptyTask {\n const commands = ['clone', ...customArgs];\n\n filterString(repo) && commands.push(repo);\n filterString(directory) && commands.push(directory);\n\n const banned = commands.find(disallowedCommand);\n if (banned) {\n return configurationErrorTask(`git.fetch: potential exploit argument blocked.`);\n }\n\n return straightThroughStringTask(commands);\n}\n\nexport function cloneMirrorTask(repo: string | undefined, directory: string | undefined, customArgs: string[]) {\n append(customArgs, '--mirror');\n\n return cloneTask(repo, directory, customArgs);\n}\n", "import { FetchResult } from '../../../typings';\nimport { LineParser, parseStringResponse } from '../utils';\n\nconst parsers: LineParser[] = [\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\nimport { configurationErrorTask, EmptyTask } from './task';\n\nfunction disallowedCommand(command: string) {\n return /^--upload-pack(=|$)/.test(command);\n}\n\nexport function fetchTask(remote: string, branch: string, customArgs: string[]): StringTask | EmptyTask {\n const commands = ['fetch', ...customArgs];\n if (remote && branch) {\n commands.push(remote, branch);\n }\n\n const banned = commands.find(disallowedCommand);\n if (banned) {\n return configurationErrorTask(`git.fetch: potential exploit argument blocked.`);\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[] = [\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 {\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, branch: Maybe, customArgs: string[]): StringTask {\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 {\n return straightThroughStringTask(['remote', 'add', ...customArgs, remoteName, remoteRepo]);\n}\n\nexport function getRemotesTask(verbose: boolean): StringTask {\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 {\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 {\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 { logFormatFromCommand } from '../args/log-format';\nimport { createListLogSummaryParser } from '../parsers/parse-list-log-summary';\nimport type { StringTask } from '../types';\nimport { validateLogFormatConfig } from './diff';\nimport { parseLogOptions } from './log';\nimport type { EmptyTask } from './task';\n\nexport function stashListTask(opt: LogOptions = {}, customArgs: string[]): EmptyTask | StringTask {\n const options = parseLogOptions(opt);\n const commands = ['stash', 'list', ...options.commands, ...customArgs];\n const parser = createListLogSummaryParser(options.splitter, options.fields, logFormatFromCommand(commands));\n\n return validateLogFormatConfig(commands) || {\n commands,\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 {\n return subModuleTask(['add', repo, path]);\n}\n\nexport function initSubModuleTask(customArgs: string[]): StringTask {\n return subModuleTask(['init', ...customArgs]);\n}\n\nexport function subModuleTask(customArgs: string[]): StringTask {\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 {\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 {\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 * 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", "import { SimpleGitOptions, SimpleGitTask } from '../types';\nimport { GitError } from './git-error';\n\nexport class GitPluginError extends GitError {\n\n constructor (\n public task?: SimpleGitTask,\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, timeout: DeferredPromise) {\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 as Error);\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;\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> = new Set();\n\n public add(plugin: void | SimpleGitPlugin | SimpleGitPlugin[]) {\n const plugins: SimpleGitPlugin[] = [];\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(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) {\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): 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): 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 timeout && clearTimeout(timeout);\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(defaultExport: T) {\n return Object.defineProperties(defaultExport, {\n __esModule: {value: true},\n default: {value: defaultExport},\n }) as T & { __esModule: true, default: T };\n}\n\nexport function gitExportFactory(factory: SimpleGitFactory) {\n return Object.assign(factory.bind(null), api);\n}\n\nexport function gitInstanceFactory(baseDir?: string | Partial, options?: Partial) {\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] | [string, Partial]): 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 {\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 const simpleGit = gitInstanceFactory;\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;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AyB,GAAG,yBAAyB,OAAO,CAAC,KAAU,SAAiB;AAC5G,UAAM,UAAU,wBAAwB,SAAS;AAEjD,UAAM,QAAQ,UAAU,aAAa,MAAM,OAAO,YAAY,MAAM,KAAK;AACzE,UAAM,cAAc,UAAU,cAAc;AAE5C,WAAO,eAAe,KAAK,MAAM;AAAA,MAC9B,YAAY;AAAA,MACZ,cAAc;AAAA,MACd,OAAO,MAAM,QAAQ;AAAA;AAGxB,WAAO;AAAA,KACP;AAEH,SAAO;AAEP,wBAAsB,IAAY,MAA4C;AAC3E,WAAO,YAAa,OAAa;AAC9B,UAAI,OAAO,MAAK,MAAK,YAAY,YAAY;AAC1C,cAAM,IAAI,UACP,gHAC8C;AAAA;AAGpD,aAAO,MAAM,KAAK,WAAY;AAC3B,eAAO,IAAI,QAAQ,SAAU,SAAS,QAAQ;AAC3C,gBAAM,WAAkC,CAAC,KAAmB,WAAiB;AAC1E,gBAAI,KAAK;AACN,qBAAO,OAAO,QAAQ;AAAA;AAGzB,oBAAQ;AAAA;AAEX,gBAAK,KAAK;AAEV,eAAI,IAAI,MAAM,MAAK;AAAA;AAAA;AAAA;AAAA;AAM/B,uBAAqB,IAAY,MAAU,KAAgB;AACxD,WAAO,IAAI,UAAgB;AACxB,WAAI,IAAI,GAAG;AAEX,aAAO;AAAA;AAAA;AAAA;AAKhB,iBAAiB,OAAoC;AAElD,MAAI,iBAAiB,OAAO;AACzB,WAAO;AAAA;AAGV,MAAI,OAAO,UAAU,UAAU;AAC5B,WAAO,IAAI,MAAM;AAAA;AAGpB,SAAO,IAAI,iBAAiB;AAAA;;;ACnJxB,IAAM,YAAY;AAEzB,IAAO,cAAQ;", ++ "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/parsers/parse-commit.ts", "../../src/lib/tasks/commit.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/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,\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) => e.git);\n\n if (mergeSummary.failed) {\n // deal with the error\n }\n ```\n */\nexport class GitResponseError 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 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(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(input: T, offset?: number): Maybe;\nexport function first(input: T, offset?: number): Maybe;\nexport function first(input: any[] | IArguments, offset = 0): Maybe {\n return isArrayLike(input) && input.length > offset ? input[offset] : undefined;\n}\n\nexport function last(input: T, offset?: number): Maybe;\nexport function last(input: T, offset?: number): Maybe;\nexport function last(input: T, offset?: number): Maybe;\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[] | 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 = (line: string) => T;\n\nexport function forEachLineWithContent(input: string, callback: LineWithContentCallback): 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(target: T[] | Set, 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(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(target: Set | 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(source: T | T[]): T[] {\n return Array.isArray(source) ? source : [source];\n}\n\nexport function asStringArray(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(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, properties: string[]) {\n return Object.assign({}, ...properties.map((property) => property in source ? {[property]: source[property]} : {}));\n}\n\nexport function delay(duration = 0): Promise {\n return new Promise(done => setTimeout(done, duration));\n}\n", "import { Maybe, Options, Primitives } from '../types';\nimport { objectToString } from './util';\n\nexport interface ArgumentFilterPredicate {\n (input: any): input is T;\n}\n\nexport function filterType(input: K, filter: ArgumentFilterPredicate): K extends T ? T : undefined;\nexport function filterType(input: K, filter: ArgumentFilterPredicate, def: T): T;\nexport function filterType(input: K, filter: ArgumentFilterPredicate, def?: T): Maybe {\n if (filter(input)) {\n return input;\n }\n return (arguments.length > 2) ? def : undefined\n}\n\nexport const filterArray: ArgumentFilterPredicate> = (input): input is Array => {\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 = (input): input is string => {\n return typeof input === 'string';\n};\n\nexport const filterStringArray: ArgumentFilterPredicate = (input): input is string[] => {\n return Array.isArray(input) && input.every(filterString);\n};\n\nexport const filterStringOrStringArray: ArgumentFilterPredicate = (input): input is string | string[] => {\n return filterString(input) || (Array.isArray(input) && input.every(filterString));\n};\n\nexport function filterPlainObject(input: T | unknown): input is T;\nexport function filterPlainObject(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 {\n\n constructor(public readonly stdOut: T, public readonly stdErr: T) {\n }\n\n asStrings(): GitOutputStreams {\n return new GitOutputStreams(this.stdOut.toString('utf8'), this.stdErr.toString('utf8'));\n }\n}\n", "export class LineParser {\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 extends LineParser {\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 = {\n binary: 'git',\n maxConcurrentProcesses: 5,\n config: [],\n};\n\nexport function createInstanceConfig(...options: Array | 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(options: Maybe, commands: string[] = []): string[] {\n if (!filterPlainObject(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 {\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(parser: TaskParser, streams: GitOutputStreams) {\n return parser(streams.stdOut, streams.stdErr);\n}\n\nexport function parseStringResponse(result: T, parsers: LineParser[], ...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['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['parser'] = (text) => {\n return text.trim() === 'true';\n}\n\nexport function checkIsRepoTask(action: Maybe): StringTask {\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 {\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 {\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 {\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 {\n return {\n commands,\n format: 'buffer',\n parser(buffer) {\n return buffer;\n },\n }\n}\n\nexport function isBufferTask(task: SimpleGitTask): task is BufferTask {\n return task.format === 'buffer';\n}\n\nexport function isEmptyTask(task: SimpleGitTask): 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 = 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 {\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;\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 = 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(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 {\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 {\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 {\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 {\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 {\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();\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 {\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, 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 {\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, childDebugger: Maybe, {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 = (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;\n\ntype TaskInProgress = {\n name: string;\n logger: OutputLogger;\n task: AnySimpleGitTask;\n}\n\nexport class TasksPendingQueue {\n\n private _queue: Map = 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 = 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(task: SimpleGitTask): Promise {\n this._queue.push(task);\n\n return this._chain = this._chain.then(() => this.attemptTask(task));\n }\n\n private async attemptTask(task: SimpleGitTask): Promise {\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(task: SimpleGitTask, 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(task: RunnableTask, 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(\n task: SimpleGitTask,\n args: string[],\n result: GitExecutorResult, logger: OutputLogger): Promise {\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(task: SimpleGitTask, command: string, args: string[], outputHandler: Maybe, logger: OutputLogger): Promise {\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;\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(task: SimpleGitTask, 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 type { PluginStore } from '../plugins';\nimport type { 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(task: SimpleGitTask): Promise {\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(task: SimpleGitTask, response: Promise, callback: SimpleGitTaskCallback = 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 { CommitResult } from '../../../typings';\nimport { LineParser, parseStringResponse } from '../utils';\n\nconst parsers: LineParser[] = [\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 type { CommitResult, SimpleGit } from '../../../typings';\nimport type { SimpleGitApi } from '../simple-git-api';\nimport type { StringTask } from '../types';\nimport { parseCommitResult } from '../parsers/parse-commit';\nimport {\n asArray,\n filterArray,\n filterStringOrStringArray,\n filterType,\n getTrailingOptions, prefixedArray,\n trailingFunctionArgument\n} from '../utils';\nimport { configurationErrorTask } from './task';\n\nexport function commitTask(message: string[], files: string[], customArgs: string[]): StringTask {\n const commands: string[] = [\n '-c',\n 'core.abbrev=40',\n 'commit',\n ...prefixedArray(message, '-m'),\n ...files,\n ...customArgs,\n ];\n\n return {\n commands,\n format: 'utf-8',\n parser: parseCommitResult,\n };\n}\n\nexport default function (): Pick {\n return {\n commit(this: SimpleGitApi, message: string | string[], ...rest: unknown[]) {\n const next = trailingFunctionArgument(arguments);\n const task = rejectDeprecatedSignatures(message) ||\n commitTask(\n asArray(message),\n asArray(filterType(rest[0], filterStringOrStringArray, [])),\n [...filterType(rest[1], filterArray, []), ...getTrailingOptions(arguments, 0, true)]\n );\n\n return this._runTask(task, next);\n },\n };\n\n function rejectDeprecatedSignatures(message?: unknown) {\n return (\n !filterStringOrStringArray(message) &&\n configurationErrorTask(`git.commit: requires the commit message to be supplied as a string/string[]`)\n );\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 {\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 {\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 = [];\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 (splitter = SPLITTER, fields = defaultFieldNames) {\n return function (stdOut: string): LogResult {\n const all: ReadonlyArray = 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 filterPrimitives,\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 = {\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: Record, 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(input: T): Options {\n return Object.keys(input).reduce((out, key) => {\n if (!(key in excludeOptions)) {\n out[key] = input[key];\n }\n return out;\n }, {} as Options);\n}\n\nexport function parseLogOptions(opt: Options | LogOptions = {}, customArgs: string[] = []): ParsedLogOptions {\n const splitter = filterType(opt.splitter, filterString, SPLITTER);\n const format = !filterPrimitives(opt.format) && opt.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 (filterString(opt.file)) {\n suffix.push('--follow', opt.file);\n }\n\n appendTaskOptions(userOptions(opt as Options), command);\n\n return {\n fields,\n splitter,\n commands: [\n ...command,\n ...suffix,\n ],\n };\n}\n\nexport function logTask(splitter: string, fields: string[], customArgs: string[]): StringTask> {\n return {\n commands: ['log', ...customArgs],\n format: 'utf-8',\n parser: createListLogSummaryParser(splitter, fields),\n };\n}\n\nexport default function (): Pick {\n return {\n log(this: SimpleGitApi, ...rest: unknown[]) {\n const next = trailingFunctionArgument(arguments);\n const task = rejectDeprecatedSignatures(...rest) ||\n createLogTask(parseLogOptions(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(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>[] = [\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>[] = [\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(\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[] = [\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[] = [\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 = (stdOut, stdErr) => {\n return parseStringResponse(new PullSummary(), parsers, stdOut, stdErr);\n}\n\nexport const parsePullResult: TaskParser = (stdOut, stdErr) => {\n return Object.assign(\n new PullSummary(),\n parsePullDetail(stdOut, stdErr),\n parseRemoteMessages(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[] = [\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 = (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 = (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 {\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[] = [\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 = (stdOut, stdErr) => {\n const pushDetail = parsePushDetail(stdOut, stdErr);\n const responseDetail = parseRemoteMessages(stdOut, stdErr);\n\n return {\n ...pushDetail,\n ...responseDetail,\n };\n}\n\nexport const parsePushDetail: TaskParser = (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 {\n append(customArgs, '--tags');\n return pushTask(ref, customArgs);\n}\n\nexport function pushTask(ref: PushRef = {}, customArgs: string[]): StringTask {\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';\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, NULL } 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 = () => {\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 [to, from] = line.split(NULL);\n\n return {\n from: from || to,\n to,\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 = 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.split(NULL);\n const status = new StatusSummary();\n\n for (let i = 0, l = lines.length; i < l;) {\n let line = lines[i++].trim();\n\n if (!line) {\n continue;\n }\n\n if (line.charAt(0) === PorcelainFileStatus.RENAMED) {\n line += NULL + (lines[i++] || '');\n }\n\n splitLine(status, line);\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.replace(/\\0.+$/, ''), index, workingDir));\n }\n }\n}\n", "import { StatusResult } from '../../../typings';\nimport { parseStatusSummary } from '../responses/StatusSummary';\nimport { StringTask } from '../types';\n\nconst ignoredOptions = ['--null', '-z'];\n\nexport function statusTask(customArgs: string[]): StringTask {\n const commands = [\n 'status',\n '--porcelain',\n '-b',\n '-u',\n '--null',\n ...customArgs.filter(arg => !ignoredOptions.includes(arg))\n ];\n\n return {\n format: 'utf-8',\n commands,\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 commit from './tasks/commit';\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(task: SimpleGitTask, then?: SimpleGitTaskCallback) {\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, commit(), 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, 'promise' | 'done'> & {id: number};\n\nconst createScheduledTask: () => ScheduledTask = (() => {\n let id = 0;\n return () => {\n id++;\n const {promise, done} = createDeferred();\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 {\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 {\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[] = [\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 = (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[] = [\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 {\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 {\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 {\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 {\n const task: StringTask = {\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 {\n return {\n commands: ['check-ignore', ...paths],\n format: 'utf-8',\n parser: parseCheckIgnore,\n };\n}\n", "import { configurationErrorTask, EmptyTask, straightThroughStringTask } from './task';\nimport { OptionFlags, Options, StringTask } from '../types';\nimport { append, filterString } from '../utils';\n\nexport type CloneOptions = Options &\n OptionFlags<'--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 OptionFlags<'--depth' | '-j' | '--jobs', number> &\n OptionFlags<'--branch' | '--origin' | '--recurse-submodules' | '--separate-git-dir' | '--shallow-exclude' | '--shallow-since' | '--template', string>\n\nfunction disallowedCommand(command: string) {\n return /^--upload-pack(=|$)/.test(command);\n}\n\nexport function cloneTask(repo: string | undefined, directory: string | undefined, customArgs: string[]): StringTask | EmptyTask {\n const commands = ['clone', ...customArgs];\n\n filterString(repo) && commands.push(repo);\n filterString(directory) && commands.push(directory);\n\n const banned = commands.find(disallowedCommand);\n if (banned) {\n return configurationErrorTask(`git.fetch: potential exploit argument blocked.`);\n }\n\n return straightThroughStringTask(commands);\n}\n\nexport function cloneMirrorTask(repo: string | undefined, directory: string | undefined, customArgs: string[]) {\n append(customArgs, '--mirror');\n\n return cloneTask(repo, directory, customArgs);\n}\n", "import { StringTask } from '../types';\nimport { DiffResult } from '../../../typings';\nimport { parseDiffResult } from '../parsers/parse-diff-summary';\n\nexport function diffSummaryTask(customArgs: string[]): StringTask {\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[] = [\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\nimport { configurationErrorTask, EmptyTask } from './task';\n\nfunction disallowedCommand(command: string) {\n return /^--upload-pack(=|$)/.test(command);\n}\n\nexport function fetchTask(remote: string, branch: string, customArgs: string[]): StringTask | EmptyTask {\n const commands = ['fetch', ...customArgs];\n if (remote && branch) {\n commands.push(remote, branch);\n }\n\n const banned = commands.find(disallowedCommand);\n if (banned) {\n return configurationErrorTask(`git.fetch: potential exploit argument blocked.`);\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[] = [\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 {\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, branch: Maybe, customArgs: string[]): StringTask {\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 {\n return straightThroughStringTask(['remote', 'add', ...customArgs, remoteName, remoteRepo]);\n}\n\nexport function getRemotesTask(verbose: boolean): StringTask {\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 {\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 {\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 {\n const options = parseLogOptions(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 {\n return subModuleTask(['add', repo, path]);\n}\n\nexport function initSubModuleTask(customArgs: string[]): StringTask {\n return subModuleTask(['init', ...customArgs]);\n}\n\nexport function subModuleTask(customArgs: string[]): StringTask {\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 {\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 {\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 * 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,\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, timeout: DeferredPromise) {\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;\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> = new Set();\n\n public add(plugin: void | SimpleGitPlugin | SimpleGitPlugin[]) {\n const plugins: SimpleGitPlugin[] = [];\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(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) {\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): 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): 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 timeout && clearTimeout(timeout);\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(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(factory: SimpleGitFactory, extra: T) {\n return Object.assign(function (...args: Parameters) {\n return factory.apply(null, args);\n },\n api,\n extra || {},\n );\n}\n\nexport function gitInstanceFactory(baseDir?: string | Partial, options?: Partial) {\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] | [string, Partial]): 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 {\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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a,CAAC,GAAG,yBAAyB,GAAG,yBAAyB,OAAO,CAAC,KAAU,SAAiB;AAC5G,UAAM,UAAU,wBAAwB,SAAS;AAEjD,UAAM,QAAQ,UAAU,aAAa,MAAM,OAAO,YAAY,MAAM,KAAK;AACzE,UAAM,cAAc,UAAU,cAAc;AAE5C,WAAO,eAAe,KAAK,MAAM;AAAA,MAC9B,YAAY;AAAA,MACZ,cAAc;AAAA,MACd,OAAO,MAAM,QAAQ;AAAA;AAGxB,WAAO;AAAA,KACP;AAEH,SAAO;AAEP,wBAAsB,IAAY,MAA4C;AAC3E,WAAO,YAAa,OAAa;AAC9B,UAAI,OAAO,MAAK,MAAK,YAAY,YAAY;AAC1C,cAAM,IAAI,UACP,gHAC8C;AAAA;AAGpD,aAAO,MAAM,KAAK,WAAY;AAC3B,eAAO,IAAI,QAAQ,SAAU,SAAS,QAAQ;AAC3C,gBAAM,WAAkC,CAAC,KAAmB,WAAiB;AAC1E,gBAAI,KAAK;AACN,qBAAO,OAAO,QAAQ;AAAA;AAGzB,oBAAQ;AAAA;AAEX,gBAAK,KAAK;AAEV,eAAI,IAAI,MAAM,MAAK;AAAA;AAAA;AAAA;AAAA;AAM/B,uBAAqB,IAAY,MAAU,KAAgB;AACxD,WAAO,IAAI,UAAgB;AACxB,WAAI,IAAI,GAAG;AAEX,aAAO;AAAA;AAAA;AAAA;AAKhB,iBAAiB,OAAoC;AAElD,MAAI,iBAAiB,OAAO;AACzB,WAAO;AAAA;AAGV,MAAI,OAAO,UAAU,UAAU;AAC5B,WAAO,IAAI,MAAM;AAAA;AAGpB,SAAO,IAAI,iBAAiB;AAAA;;;ACnJ/B,IAAO,cAAQ;", + "names": [] + } +diff --git a/node_modules/simple-git/dist/src/lib/args/log-format.d.ts b/node_modules/simple-git/dist/src/lib/args/log-format.d.ts +deleted file mode 100644 +index 4874e16..0000000 +--- a/node_modules/simple-git/dist/src/lib/args/log-format.d.ts ++++ /dev/null +@@ -1,9 +0,0 @@ +-export declare enum LogFormat { +- NONE = "", +- STAT = "--stat", +- NUM_STAT = "--numstat", +- NAME_ONLY = "--name-only", +- NAME_STATUS = "--name-status" +-} +-export declare function logFormatFromCommand(customArgs: string[]): LogFormat; +-export declare function isLogFormat(customArg: string | unknown): boolean; +diff --git a/node_modules/simple-git/dist/src/lib/errors/git-error.d.ts b/node_modules/simple-git/dist/src/lib/errors/git-error.d.ts +index 2eff39b..a0677ab 100644 +--- a/node_modules/simple-git/dist/src/lib/errors/git-error.d.ts ++++ b/node_modules/simple-git/dist/src/lib/errors/git-error.d.ts +@@ -1,4 +1,3 @@ +-import type { SimpleGitTask } from '../types'; + /** + * The `GitError` is thrown when the underlying `git` process throws a + * fatal exception (eg an `ENOENT` exception when attempting to use a +@@ -25,6 +24,6 @@ import type { SimpleGitTask } from '../types'; + ``` + */ + export declare class GitError extends Error { +- task?: SimpleGitTask | undefined; +- constructor(task?: SimpleGitTask | undefined, message?: string); ++ task?: import("../tasks/task").EmptyTask | import("../types").StringTask | import("../types").BufferTask | undefined; ++ constructor(task?: import("../tasks/task").EmptyTask | import("../types").StringTask | import("../types").BufferTask | undefined, message?: string); + } +diff --git a/node_modules/simple-git/dist/src/lib/errors/git-plugin-error.d.ts b/node_modules/simple-git/dist/src/lib/errors/git-plugin-error.d.ts +index 94d4f8b..17aed24 100644 +--- a/node_modules/simple-git/dist/src/lib/errors/git-plugin-error.d.ts ++++ b/node_modules/simple-git/dist/src/lib/errors/git-plugin-error.d.ts +@@ -1,7 +1,6 @@ +-import { SimpleGitOptions, SimpleGitTask } from '../types'; + import { GitError } from './git-error'; + export declare class GitPluginError extends GitError { +- task?: SimpleGitTask | undefined; +- readonly plugin?: keyof SimpleGitOptions | undefined; +- constructor(task?: SimpleGitTask | undefined, plugin?: keyof SimpleGitOptions | undefined, message?: string); ++ task?: import("../tasks/task").EmptyTask | import("../types").StringTask | import("../types").BufferTask | undefined; ++ readonly plugin?: "progress" | "timeout" | "completion" | "errors" | "spawnOptions" | "baseDir" | "binary" | "maxConcurrentProcesses" | "config" | undefined; ++ constructor(task?: import("../tasks/task").EmptyTask | import("../types").StringTask | import("../types").BufferTask | undefined, plugin?: "progress" | "timeout" | "completion" | "errors" | "spawnOptions" | "baseDir" | "binary" | "maxConcurrentProcesses" | "config" | undefined, message?: string); + } +diff --git a/node_modules/simple-git/dist/src/lib/git-factory.d.ts b/node_modules/simple-git/dist/src/lib/git-factory.d.ts +index 12a608f..ed550dd 100644 +--- a/node_modules/simple-git/dist/src/lib/git-factory.d.ts ++++ b/node_modules/simple-git/dist/src/lib/git-factory.d.ts +@@ -11,5 +11,5 @@ export declare function esModuleFactory(defaultExport: T): T & { + __esModule: true; + default: T; + }; +-export declare function gitExportFactory(factory: SimpleGitFactory): SimpleGitFactory & typeof api; ++export declare function gitExportFactory(factory: SimpleGitFactory, extra: T): ((options: Partial) => import("../../typings").SimpleGit) & typeof api; + export declare function gitInstanceFactory(baseDir?: string | Partial, options?: Partial): any; +diff --git a/node_modules/simple-git/dist/src/lib/parsers/parse-branch.d.ts b/node_modules/simple-git/dist/src/lib/parsers/parse-branch.d.ts +index 7c0fe2a..3c39c29 100644 +--- a/node_modules/simple-git/dist/src/lib/parsers/parse-branch.d.ts ++++ b/node_modules/simple-git/dist/src/lib/parsers/parse-branch.d.ts +@@ -1,2 +1,2 @@ +-import type { BranchSummary } from '../../../typings'; ++import { BranchSummary } from '../../../typings'; + export declare function parseBranchSummary(stdOut: string): BranchSummary; +diff --git a/node_modules/simple-git/dist/src/lib/parsers/parse-diff-summary.d.ts b/node_modules/simple-git/dist/src/lib/parsers/parse-diff-summary.d.ts +index 4528dc4..baaeb64 100644 +--- a/node_modules/simple-git/dist/src/lib/parsers/parse-diff-summary.d.ts ++++ b/node_modules/simple-git/dist/src/lib/parsers/parse-diff-summary.d.ts +@@ -1,3 +1,2 @@ +-import { LogFormat } from '../args/log-format'; +-import { DiffSummary } from '../responses/DiffSummary'; +-export declare function getDiffParser(format?: LogFormat): (stdOut: string) => DiffSummary; ++import { DiffResult } from '../../../typings'; ++export declare function parseDiffResult(stdOut: string): DiffResult; +diff --git a/node_modules/simple-git/dist/src/lib/parsers/parse-list-log-summary.d.ts b/node_modules/simple-git/dist/src/lib/parsers/parse-list-log-summary.d.ts +index e4a30da..113af34 100644 +--- a/node_modules/simple-git/dist/src/lib/parsers/parse-list-log-summary.d.ts ++++ b/node_modules/simple-git/dist/src/lib/parsers/parse-list-log-summary.d.ts +@@ -1,6 +1,5 @@ + import { LogResult } from '../../../typings'; +-import { LogFormat } from '../args/log-format'; + 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(splitter?: string, fields?: string[], logFormat?: LogFormat): (stdOut: string) => LogResult; ++export declare function createListLogSummaryParser(splitter?: string, fields?: string[]): (stdOut: string) => LogResult; +diff --git a/node_modules/simple-git/dist/src/lib/responses/BranchSummary.d.ts b/node_modules/simple-git/dist/src/lib/responses/BranchSummary.d.ts +index 9aa3342..69cd698 100644 +--- a/node_modules/simple-git/dist/src/lib/responses/BranchSummary.d.ts ++++ b/node_modules/simple-git/dist/src/lib/responses/BranchSummary.d.ts +@@ -1,8 +1,4 @@ +-import type { BranchSummary, BranchSummaryBranch } from '../../../typings'; +-export declare enum BranchStatusIdentifier { +- CURRENT = "*", +- LINKED = "+" +-} ++import { BranchSummary, BranchSummaryBranch } from '../../../typings'; + export declare class BranchSummaryResult implements BranchSummary { + all: string[]; + branches: { +@@ -10,5 +6,5 @@ export declare class BranchSummaryResult implements BranchSummary { + }; + current: string; + detached: boolean; +- push(status: BranchStatusIdentifier | unknown, detached: boolean, name: string, commit: string, label: string): void; ++ push(current: boolean, detached: boolean, name: string, commit: string, label: string): void; + } +diff --git a/node_modules/simple-git/dist/src/lib/tasks/diff.d.ts b/node_modules/simple-git/dist/src/lib/tasks/diff.d.ts +index 8bcd1f2..c1e37aa 100644 +--- a/node_modules/simple-git/dist/src/lib/tasks/diff.d.ts ++++ b/node_modules/simple-git/dist/src/lib/tasks/diff.d.ts +@@ -1,5 +1,3 @@ + import { StringTask } from '../types'; + import { DiffResult } from '../../../typings'; +-import { EmptyTask } from './task'; +-export declare function diffSummaryTask(customArgs: string[]): StringTask | EmptyTask; +-export declare function validateLogFormatConfig(customArgs: unknown[]): EmptyTask | void; ++export declare function diffSummaryTask(customArgs: string[]): StringTask; +diff --git a/node_modules/simple-git/dist/src/lib/tasks/log.d.ts b/node_modules/simple-git/dist/src/lib/tasks/log.d.ts +index cc9293b..d58a446 100644 +--- a/node_modules/simple-git/dist/src/lib/tasks/log.d.ts ++++ b/node_modules/simple-git/dist/src/lib/tasks/log.d.ts +@@ -1,5 +1,5 @@ +-import type { Options, StringTask } from '../types'; +-import type { LogResult, SimpleGit } from '../../../typings'; ++import { Options, StringTask } from '../types'; ++import { LogResult, SimpleGit } from '../../../typings'; + export interface DefaultLogFields { + hash: string; + date: string; +diff --git a/node_modules/simple-git/dist/src/lib/tasks/stash-list.d.ts b/node_modules/simple-git/dist/src/lib/tasks/stash-list.d.ts +index 9470967..5bf9a9c 100644 +--- a/node_modules/simple-git/dist/src/lib/tasks/stash-list.d.ts ++++ b/node_modules/simple-git/dist/src/lib/tasks/stash-list.d.ts +@@ -1,4 +1,3 @@ + import { LogOptions, LogResult } from '../../../typings'; +-import type { StringTask } from '../types'; +-import type { EmptyTask } from './task'; +-export declare function stashListTask(opt: LogOptions | undefined, customArgs: string[]): EmptyTask | StringTask; ++import { StringTask } from '../types'; ++export declare function stashListTask(opt: LogOptions | undefined, customArgs: string[]): StringTask; +diff --git a/node_modules/simple-git/dist/src/lib/tasks/task.d.ts b/node_modules/simple-git/dist/src/lib/tasks/task.d.ts +index 4f8c6c0..9c64e4e 100644 +--- a/node_modules/simple-git/dist/src/lib/tasks/task.d.ts ++++ b/node_modules/simple-git/dist/src/lib/tasks/task.d.ts +@@ -1,4 +1,4 @@ +-import type { BufferTask, EmptyTaskParser, SimpleGitTask, StringTask } from '../types'; ++import { BufferTask, EmptyTaskParser, SimpleGitTask, StringTask } from '../types'; + export declare const EMPTY_COMMANDS: []; + export declare type EmptyTask = { + commands: typeof EMPTY_COMMANDS; +diff --git a/node_modules/simple-git/dist/src/lib/types/index.d.ts b/node_modules/simple-git/dist/src/lib/types/index.d.ts +index 4fe0734..7dbd521 100644 +--- a/node_modules/simple-git/dist/src/lib/types/index.d.ts ++++ b/node_modules/simple-git/dist/src/lib/types/index.d.ts +@@ -1,6 +1,4 @@ + /// +-/// +-/// + import type { SpawnOptions } from 'child_process'; + import type { SimpleGitTask } from './tasks'; + import type { SimpleGitProgressEvent } from './handlers'; +diff --git a/node_modules/simple-git/dist/src/lib/utils/task-parser.d.ts b/node_modules/simple-git/dist/src/lib/utils/task-parser.d.ts +index b1a62b8..5734495 100644 +--- a/node_modules/simple-git/dist/src/lib/utils/task-parser.d.ts ++++ b/node_modules/simple-git/dist/src/lib/utils/task-parser.d.ts +@@ -1,5 +1,5 @@ +-import type { MaybeArray, TaskParser, TaskResponseFormat } from '../types'; ++import { TaskParser, TaskResponseFormat } from '../types'; + import { GitOutputStreams } from './git-output-streams'; + import { LineParser } from './line-parser'; + export declare function callTaskParser(parser: TaskParser, streams: GitOutputStreams): RESPONSE; +-export declare function parseStringResponse(result: T, parsers: LineParser[], texts: MaybeArray, trim?: boolean): T; ++export declare function parseStringResponse(result: T, parsers: LineParser[], ...texts: string[]): T; +diff --git a/node_modules/simple-git/dist/typings/index.d.ts b/node_modules/simple-git/dist/typings/index.d.ts +index 12449c3..fc284f2 100644 +--- a/node_modules/simple-git/dist/typings/index.d.ts ++++ b/node_modules/simple-git/dist/typings/index.d.ts +@@ -7,6 +7,5 @@ export * from './types'; + + export declare const gitP: SimpleGitFactory; + +-export declare const simpleGit: SimpleGitFactory; +- ++declare const simpleGit: SimpleGitFactory; + export default simpleGit; +diff --git a/node_modules/simple-git/dist/typings/response.d.ts b/node_modules/simple-git/dist/typings/response.d.ts +index 19a22ef..795e5af 100644 +--- a/node_modules/simple-git/dist/typings/response.d.ts ++++ b/node_modules/simple-git/dist/typings/response.d.ts +@@ -5,7 +5,6 @@ export interface BranchSummaryBranch { + name: string; + commit: string; + label: string; +- linkedWorkTree: boolean; + } + + export interface BranchSummary { +diff --git a/node_modules/simple-git/package.json b/node_modules/simple-git/package.json +index 02b4232..476da3e 100644 +--- a/node_modules/simple-git/package.json ++++ b/node_modules/simple-git/package.json +@@ -1,7 +1,7 @@ + { + "name": "simple-git", + "description": "Simple GIT interface for node.js", +- "version": "3.10.0", ++ "version": "3.7.1", + "author": "Steve King ", + "contributors": [ + { +@@ -11,16 +11,16 @@ + ], + "funding": { + "type": "github", +- "url": "https://github.com/steveukx/git-js?sponsor=1" ++ "url": "https://github.com/sponsors/steveukx/" + }, + "dependencies": { + "@kwsites/file-exists": "^1.1.1", + "@kwsites/promise-deferred": "^1.1.1", +- "debug": "^4.3.4" ++ "debug": "^4.3.3" + }, + "devDependencies": { +- "@kwsites/promise-result": "^1.1.0", + "@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", +@@ -51,7 +51,8 @@ + }, + "./promise": { + "require": "./promise.js" +- } ++ }, ++ "./package.json": "./package.json" + }, + "types": "./dist/typings/index.d.ts", + "files": [ +diff --git a/node_modules/simple-git/readme.md b/node_modules/simple-git/readme.md +index fc5ca3e..fa03eb0 100644 +--- a/node_modules/simple-git/readme.md ++++ b/node_modules/simple-git/readme.md +@@ -30,14 +30,14 @@ const simpleGit = require('simple-git'); + simpleGit().clean(simpleGit.CleanOptions.FORCE); + + // or use named properties +-const {simpleGit, CleanOptions} = require('simple-git'); ++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'; ++import simpleGit, { CleanOptions } from 'simple-git'; + + simpleGit().clean(CleanOptions.FORCE); + ``` +@@ -45,7 +45,7 @@ simpleGit().clean(CleanOptions.FORCE); + Include in a TypeScript app using the bundled type definitions: + + ```typescript +-import { simpleGit, SimpleGit, CleanOptions } from 'simple-git'; ++import simpleGit, { SimpleGit, CleanOptions } from 'simple-git'; + + const git: SimpleGit = simpleGit().clean(CleanOptions.FORCE); + ``` +@@ -55,7 +55,7 @@ const git: SimpleGit = simpleGit().clean(CleanOptions.FORCE); + Configure each `simple-git` instance with a properties object passed to the main `simpleGit` function: + + ```typescript +-import { simpleGit, SimpleGit, SimpleGitOptions } from 'simple-git'; ++import simpleGit, { SimpleGit, SimpleGitOptions } from 'simple-git'; + + const options: Partial = { + baseDir: process.cwd(), +@@ -186,6 +186,10 @@ For type details of the response for each of the tasks, please see the [TypeScri + | `.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). | +@@ -197,6 +201,8 @@ For type details of the response for each of the tasks, please see the [TypeScri + | `.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 | +@@ -239,6 +245,7 @@ For type details of the response for each of the tasks, please see the [TypeScri + + - `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 +@@ -254,17 +261,6 @@ For type details of the response for each of the tasks, please see the [TypeScri + - `.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 diff +- +-- `.diff([ options ])` get the diff of the current repo compared to the last commit, optionally including +- any number of other arguments supported by [git diff](https://git-scm.com/docs/git-diff) supplied as an +- [options](#how-to-specify-options) object/array. Returns the raw `diff` output as a string. +- +-- `.diffSummary([ options ])` creates a [DiffResult](https://github.com/steveukx/git-js/blob/main/simple-git/src/lib/responses/DiffSummary.ts) +- to summarise the diff for files in the repo. Uses the `--stat` format by default which can be overridden +- by passing in any of the log format commands (eg: `--numstat` or `--name-stat`) as part of the optional +- [options](#how-to-specify-options) object/array. +- + ## 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 +@@ -379,12 +375,6 @@ For type details of the response for each of the tasks, please see the [TypeScri + - `.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 + +-## git stash +- +-- `.stash([ options ])` 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 ])` Retrieves the stash list, optional first argument can be an object in the same format as used in [git log](#git-log). +- + ## 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. +@@ -580,7 +570,7 @@ if (mergeSummary.failed) { + With typed errors available in TypeScript + + ```typescript +-import { simpleGit, MergeSummary, GitResponseError } from 'simple-git'; ++import simpleGit, { MergeSummary, GitResponseError } from 'simple-git'; + try { + const mergeSummary = await simpleGit().merge(); + console.log(`Merged ${ mergeSummary.merges.length } files`); diff --git a/patches/three+0.142.0.patch b/patches/three+0.142.0.patch new file mode 100644 index 0000000000..72a8b9fa9e --- /dev/null +++ b/patches/three+0.142.0.patch @@ -0,0 +1,14 @@ +diff --git a/node_modules/three/package.json b/node_modules/three/package.json +index eed47fe..45cf472 100644 +--- a/node_modules/three/package.json ++++ b/node_modules/three/package.json +@@ -12,7 +12,8 @@ + }, + "./examples/fonts/*": "./examples/fonts/*", + "./examples/jsm/*": "./examples/jsm/*", +- "./src/*": "./src/*" ++ "./src/*": "./src/*", ++ "./package.json": "./package.json" + }, + "repository": { + "type": "git", diff --git a/patches/zx+4.3.0.patch b/patches/zx+4.3.0.patch new file mode 100644 index 0000000000..913f9bf6b4 --- /dev/null +++ b/patches/zx+4.3.0.patch @@ -0,0 +1,14 @@ +diff --git a/node_modules/zx/package.json b/node_modules/zx/package.json +index 8f0bc55..af17e60 100644 +--- a/node_modules/zx/package.json ++++ b/node_modules/zx/package.json +@@ -11,7 +11,8 @@ + "./globals": { + "import": "./globals.mjs", + "require": "./dist/globals.cjs" +- } ++ }, ++ "./package.json": "./package.json" + }, + "types": "index.d.ts", + "bin": { diff --git a/yarn.lock b/yarn.lock index 7fc14415cf..aa54775219 100644 --- a/yarn.lock +++ b/yarn.lock @@ -242,7 +242,18 @@ __metadata: languageName: node linkType: hard -"@babel/helper-annotate-as-pure@npm:^7.16.0": +"@babel/generator@npm:^7.18.9": + version: 7.18.9 + resolution: "@babel/generator@npm:7.18.9" + dependencies: + "@babel/types": ^7.18.9 + "@jridgewell/gen-mapping": ^0.3.2 + jsesc: ^2.5.1 + checksum: 1c271e0c6f33e59f7845d88a1b0b9b0dce88164e80dec9274a716efa54c260e405e9462b160843e73f45382bf5b24d8e160e0121207e480c29b30e2ed0eb16d4 + languageName: node + linkType: hard + +"@babel/helper-annotate-as-pure@npm:^7.16.0, @babel/helper-annotate-as-pure@npm:^7.18.6": version: 7.18.6 resolution: "@babel/helper-annotate-as-pure@npm:7.18.6" dependencies: @@ -344,6 +355,18 @@ __metadata: languageName: node linkType: hard +"@babel/helper-create-regexp-features-plugin@npm:^7.18.6": + version: 7.18.6 + resolution: "@babel/helper-create-regexp-features-plugin@npm:7.18.6" + dependencies: + "@babel/helper-annotate-as-pure": ^7.18.6 + regexpu-core: ^5.1.0 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 2d76e660cbfd0bfcb01ca9f177f0e9091c871a6b99f68ece6bcf4ab4a9df073485bdc2d87ecdfbde44b7f3723b26d13085d0f92082adb3ae80d31b246099f10a + languageName: node + linkType: hard + "@babel/helper-define-polyfill-provider@npm:^0.1.5": version: 0.1.5 resolution: "@babel/helper-define-polyfill-provider@npm:0.1.5" @@ -396,6 +419,13 @@ __metadata: languageName: node linkType: hard +"@babel/helper-environment-visitor@npm:^7.18.9": + version: 7.18.9 + resolution: "@babel/helper-environment-visitor@npm:7.18.9" + checksum: b25101f6162ddca2d12da73942c08ad203d7668e06663df685634a8fde54a98bc015f6f62938e8554457a592a024108d45b8f3e651fd6dcdb877275b73cc4420 + languageName: node + linkType: hard + "@babel/helper-explode-assignable-expression@npm:^7.16.7": version: 7.16.7 resolution: "@babel/helper-explode-assignable-expression@npm:7.16.7" @@ -425,6 +455,16 @@ __metadata: languageName: node linkType: hard +"@babel/helper-function-name@npm:^7.18.9": + version: 7.18.9 + resolution: "@babel/helper-function-name@npm:7.18.9" + dependencies: + "@babel/template": ^7.18.6 + "@babel/types": ^7.18.9 + checksum: d04c44e0272f887c0c868651be7fc3c5690531bea10936f00d4cca3f6d5db65e76dfb49e8d553c42ae1fe1eba61ccce9f3d93ba2df50a66408c8d4c3cc61cf0c + languageName: node + linkType: hard + "@babel/helper-hoist-variables@npm:^7.16.7": version: 7.16.7 resolution: "@babel/helper-hoist-variables@npm:7.16.7" @@ -550,6 +590,20 @@ __metadata: languageName: node linkType: hard +"@babel/helper-remap-async-to-generator@npm:^7.18.6": + version: 7.18.9 + resolution: "@babel/helper-remap-async-to-generator@npm:7.18.9" + dependencies: + "@babel/helper-annotate-as-pure": ^7.18.6 + "@babel/helper-environment-visitor": ^7.18.9 + "@babel/helper-wrap-function": ^7.18.9 + "@babel/types": ^7.18.9 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 4be6076192308671b046245899b703ba090dbe7ad03e0bea897bb2944ae5b88e5e85853c9d1f83f643474b54c578d8ac0800b80341a86e8538264a725fbbefec + languageName: node + linkType: hard + "@babel/helper-replace-supers@npm:^7.16.7": version: 7.16.7 resolution: "@babel/helper-replace-supers@npm:7.16.7" @@ -648,6 +702,18 @@ __metadata: languageName: node linkType: hard +"@babel/helper-wrap-function@npm:^7.18.9": + version: 7.18.9 + resolution: "@babel/helper-wrap-function@npm:7.18.9" + dependencies: + "@babel/helper-function-name": ^7.18.9 + "@babel/template": ^7.18.6 + "@babel/traverse": ^7.18.9 + "@babel/types": ^7.18.9 + checksum: da818e519b48bbaa748a4fa87b0ba681bc627c9eb9557008d5307d42d3f536fe435b775163088dd9639b0120c8ea1ae1021777f48806f9f83397f4df622b88d3 + languageName: node + linkType: hard + "@babel/helpers@npm:^7.12.5, @babel/helpers@npm:^7.13.10, @babel/helpers@npm:^7.17.9": version: 7.17.9 resolution: "@babel/helpers@npm:7.17.9" @@ -719,6 +785,15 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:^7.18.9": + version: 7.18.9 + resolution: "@babel/parser@npm:7.18.9" + bin: + parser: ./bin/babel-parser.js + checksum: 81a966b334e3ef397e883c64026265a5ae0ad435a86f52a84f60a5ee1efc0738c1f42c55e0dc5f191cc6a83ba0c61350433eee417bf1dff160ca5f3cfde244c6 + languageName: node + linkType: hard + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.16.7": version: 7.16.7 resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.16.7" @@ -743,6 +818,20 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-proposal-async-generator-functions@npm:^7.0.0": + version: 7.18.6 + resolution: "@babel/plugin-proposal-async-generator-functions@npm:7.18.6" + dependencies: + "@babel/helper-environment-visitor": ^7.18.6 + "@babel/helper-plugin-utils": ^7.18.6 + "@babel/helper-remap-async-to-generator": ^7.18.6 + "@babel/plugin-syntax-async-generators": ^7.8.4 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 3f708808ba6f8a9bd18805b1b22ab90ec0b362d949111a776e0bade5391f143f55479dcc444b2cec25fc89ac21035ee92e9a5ec37c02c610639197a0c2f7dcb0 + languageName: node + linkType: hard + "@babel/plugin-proposal-async-generator-functions@npm:^7.16.8": version: 7.16.8 resolution: "@babel/plugin-proposal-async-generator-functions@npm:7.16.8" @@ -1461,6 +1550,18 @@ __metadata: languageName: node linkType: hard +"@babel/plugin-transform-named-capturing-groups-regex@npm:^7.0.0": + version: 7.18.6 + resolution: "@babel/plugin-transform-named-capturing-groups-regex@npm:7.18.6" + dependencies: + "@babel/helper-create-regexp-features-plugin": ^7.18.6 + "@babel/helper-plugin-utils": ^7.18.6 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 6ef64aa3dad68df139eeaa7b6e9bb626be8f738ed5ed4db765d516944b1456d513b6bad3bb60fff22babe73de26436fd814a4228705b2d3d2fdb272c31da35e2 + languageName: node + linkType: hard + "@babel/plugin-transform-named-capturing-groups-regex@npm:^7.17.10": version: 7.17.10 resolution: "@babel/plugin-transform-named-capturing-groups-regex@npm:7.17.10" @@ -1938,6 +2039,15 @@ __metadata: languageName: node linkType: hard +"@babel/runtime@npm:^7.18.6": + version: 7.18.9 + resolution: "@babel/runtime@npm:7.18.9" + dependencies: + regenerator-runtime: ^0.13.4 + checksum: 36dd736baba7164e82b3cc9d43e081f0cb2d05ff867ad39cac515d99546cee75b7f782018b02a3dcf5f2ef3d27f319faa68965fdfec49d4912c60c6002353a2e + languageName: node + linkType: hard + "@babel/template@npm:^7.0.0, @babel/template@npm:^7.12.13, @babel/template@npm:^7.12.7, @babel/template@npm:^7.16.7, @babel/template@npm:^7.3.3": version: 7.16.7 resolution: "@babel/template@npm:7.16.7" @@ -2013,6 +2123,24 @@ __metadata: languageName: node linkType: hard +"@babel/traverse@npm:^7.18.9": + version: 7.18.9 + resolution: "@babel/traverse@npm:7.18.9" + dependencies: + "@babel/code-frame": ^7.18.6 + "@babel/generator": ^7.18.9 + "@babel/helper-environment-visitor": ^7.18.9 + "@babel/helper-function-name": ^7.18.9 + "@babel/helper-hoist-variables": ^7.18.6 + "@babel/helper-split-export-declaration": ^7.18.6 + "@babel/parser": ^7.18.9 + "@babel/types": ^7.18.9 + debug: ^4.1.0 + globals: ^11.1.0 + checksum: 0445a51952ea1664a5719d9b1f8bf04be6f1933bcf54915fecc544c844a5dad2ac56f3b555723bbf741ef680d7fd64f6a5d69cfd08d518a4089c79a734270162 + languageName: node + linkType: hard + "@babel/types@npm:7.13.0": version: 7.13.0 resolution: "@babel/types@npm:7.13.0" @@ -2044,6 +2172,16 @@ __metadata: languageName: node linkType: hard +"@babel/types@npm:^7.18.9": + version: 7.18.9 + resolution: "@babel/types@npm:7.18.9" + dependencies: + "@babel/helper-validator-identifier": ^7.18.6 + to-fast-properties: ^2.0.0 + checksum: f0e0147267895fd8a5b82133e711ce7ce99941f3ce63647e0e3b00656a7afe48a8aa48edbae27543b701794d2b29a562a08f51f88f41df401abce7c3acc5e13a + languageName: node + linkType: hard + "@base2/pretty-print-object@npm:1.0.1": version: 1.0.1 resolution: "@base2/pretty-print-object@npm:1.0.1" @@ -2932,25 +3070,25 @@ __metadata: languageName: node linkType: hard -"@expo/cli@npm:0.1.4": - version: 0.1.4 - resolution: "@expo/cli@npm:0.1.4" +"@expo/cli@npm:0.2.2": + version: 0.2.2 + resolution: "@expo/cli@npm:0.2.2" dependencies: "@babel/runtime": ^7.14.0 "@expo/code-signing-certificates": ^0.0.2 - "@expo/config": ~6.0.23 - "@expo/config-plugins": ~4.1.4 + "@expo/config": ~7.0.0 + "@expo/config-plugins": ~5.0.0 "@expo/dev-server": ~0.1.110 "@expo/devcert": ^1.0.0 "@expo/json-file": ^8.2.35 - "@expo/metro-config": ~0.3.16 + "@expo/metro-config": ~0.3.18 "@expo/osascript": ^2.0.31 - "@expo/package-manager": ~0.0.52 + "@expo/package-manager": ~0.0.53 "@expo/plist": ^0.0.18 - "@expo/prebuild-config": ~4.0.0 + "@expo/prebuild-config": ~5.0.0 "@expo/rudder-sdk-node": 1.1.1 "@expo/spawn-async": 1.5.0 - "@expo/xcpretty": ^4.1.1 + "@expo/xcpretty": ^4.2.1 "@urql/core": 2.3.6 "@urql/exchange-retry": 0.3.0 accepts: ^1.3.8 @@ -2960,6 +3098,7 @@ __metadata: cacache: ^15.3.0 chalk: ^4.0.0 ci-info: ^3.3.0 + debug: ^4.3.4 env-editor: ^0.4.1 form-data: ^3.0.1 freeport-async: 2.0.0 @@ -2985,6 +3124,7 @@ __metadata: requireg: ^0.2.2 resolve-from: ^5.0.0 semver: ^6.3.0 + send: ^0.18.0 slugify: ^1.3.4 structured-headers: ^0.4.1 tar: ^6.0.5 @@ -2995,8 +3135,8 @@ __metadata: uuid: ^3.4.0 wrap-ansi: ^7.0.0 bin: - expo: build/bin/cli - checksum: cf129cc690433f1dccc077fe9b43f4d2dba172606722519589060d126cd7659e81ff9f535f233907595fb9fb920764ea050aa1bc7cb2243898d1939efc40aa32 + expo-internal: build/bin/cli + checksum: c1c420b95d0a11ce48410196fdd75c02a1d47b45473f58f792c165ea6b88e4b8c96d4b3876b6f02ebd70a5332260f4235cb96b870a74da39654c3540a913d40b languageName: node linkType: hard @@ -3020,30 +3160,7 @@ __metadata: languageName: node linkType: hard -"@expo/config-plugins@npm:4.0.7": - version: 4.0.7 - resolution: "@expo/config-plugins@npm:4.0.7" - dependencies: - "@expo/config-types": ^43.0.1 - "@expo/json-file": 8.2.33 - "@expo/plist": 0.0.15 - "@react-native/normalize-color": ^2.0.0 - chalk: ^4.1.2 - debug: ^4.3.1 - find-up: ~5.0.0 - fs-extra: 9.0.0 - getenv: ^1.0.0 - glob: 7.1.6 - resolve-from: ^5.0.0 - semver: ^7.3.5 - slash: ^3.0.0 - xcode: ^3.0.1 - xml2js: 0.4.23 - checksum: 52b82819cd5461eb616cc5962d3ab351015933056780520932591cba6e1f6cd743ec1705564dd29765d747cc1eed5282604e423d3140d7f51a557c67b269302f - languageName: node - linkType: hard - -"@expo/config-plugins@npm:4.1.5, @expo/config-plugins@npm:^4.0.14, @expo/config-plugins@npm:^4.0.15, @expo/config-plugins@npm:^4.1.0, @expo/config-plugins@npm:~4.1.4": +"@expo/config-plugins@npm:4.1.5, @expo/config-plugins@npm:^4.0.14, @expo/config-plugins@npm:^4.0.15, @expo/config-plugins@npm:^4.1.0": version: 4.1.5 resolution: "@expo/config-plugins@npm:4.1.5" dependencies: @@ -3107,6 +3224,29 @@ __metadata: languageName: node linkType: hard +"@expo/config-plugins@npm:~5.0.0": + version: 5.0.0 + resolution: "@expo/config-plugins@npm:5.0.0" + dependencies: + "@expo/config-types": ^46.0.0 + "@expo/json-file": 8.2.36 + "@expo/plist": 0.0.18 + "@expo/sdk-runtime-versions": ^1.0.0 + "@react-native/normalize-color": ^2.0.0 + chalk: ^4.1.2 + debug: ^4.3.1 + find-up: ~5.0.0 + getenv: ^1.0.0 + glob: 7.1.6 + resolve-from: ^5.0.0 + semver: ^7.3.5 + slash: ^3.0.0 + xcode: ^3.0.1 + xml2js: 0.4.23 + checksum: a7085e7543b35062ea262b82a92383b25ea6743ee452a4fa619508b834903a745b2e83fd83b5d9c83e242177b4791439ff62ecc9f173ea9e2183d814b106068c + languageName: node + linkType: hard + "@expo/config-types@npm:^40.0.0-beta.2": version: 40.0.0-beta.2 resolution: "@expo/config-types@npm:40.0.0-beta.2" @@ -3121,13 +3261,6 @@ __metadata: languageName: node linkType: hard -"@expo/config-types@npm:^43.0.1": - version: 43.0.1 - resolution: "@expo/config-types@npm:43.0.1" - checksum: d9bed685dd5f028ea6152efba1a1cb3018adc6e17c4a09a750fc3ecda148ea60f721075ea0233cd90b7eb8a1f8e74e33688cd57bd6f6c46ab521adc4cebfec8b - languageName: node - linkType: hard - "@expo/config-types@npm:^45.0.0": version: 45.0.0 resolution: "@expo/config-types@npm:45.0.0" @@ -3135,7 +3268,14 @@ __metadata: languageName: node linkType: hard -"@expo/config@npm:6.0.24, @expo/config@npm:^6.0.14, @expo/config@npm:~6.0.23": +"@expo/config-types@npm:^46.0.0": + version: 46.0.1 + resolution: "@expo/config-types@npm:46.0.1" + checksum: 2f5b1b03d4636893f406fb934ef76e9ed0b71161bc27f2c53e94223525655111b60ed83e803065f666cca88d2d11e38f604b5513efd641805a9bde4a852b06cb + languageName: node + linkType: hard + +"@expo/config@npm:6.0.24, @expo/config@npm:^6.0.14": version: 6.0.24 resolution: "@expo/config@npm:6.0.24" dependencies: @@ -3154,14 +3294,33 @@ __metadata: languageName: node linkType: hard -"@expo/config@npm:6.0.7": - version: 6.0.7 - resolution: "@expo/config@npm:6.0.7" +"@expo/config@npm:6.0.26": + version: 6.0.26 + resolution: "@expo/config@npm:6.0.26" + dependencies: + "@babel/code-frame": ~7.10.4 + "@expo/config-plugins": 4.1.5 + "@expo/config-types": ^45.0.0 + "@expo/json-file": 8.2.36 + getenv: ^1.0.0 + glob: 7.1.6 + require-from-string: ^2.0.2 + resolve-from: ^5.0.0 + semver: 7.3.2 + slugify: ^1.3.4 + sucrase: ^3.20.0 + checksum: d9e54c16d55fc7f6c4d11360ea3ce8d883351734a21f2d42feb85e56794619f13fda993429dee9bf8b83fc4d9bcaaafc388a670da95b97a46599899604fa8c23 + languageName: node + linkType: hard + +"@expo/config@npm:7.0.0, @expo/config@npm:~7.0.0": + version: 7.0.0 + resolution: "@expo/config@npm:7.0.0" dependencies: "@babel/code-frame": ~7.10.4 - "@expo/config-plugins": 4.0.7 - "@expo/config-types": ^43.0.1 - "@expo/json-file": 8.2.33 + "@expo/config-plugins": ~5.0.0 + "@expo/config-types": ^46.0.0 + "@expo/json-file": 8.2.36 getenv: ^1.0.0 glob: 7.1.6 require-from-string: ^2.0.2 @@ -3169,7 +3328,7 @@ __metadata: semver: 7.3.2 slugify: ^1.3.4 sucrase: ^3.20.0 - checksum: a6cdd9ad86e747355ec5fab61cb16831e425f89a2bb1451d47fd54480439fe2f056d7d7d074a5d49b0fb3369e1e7d29c62d487b715169ce83f69430e1f8f4fac + checksum: e061decfc47b8bf144c54b34f788c244f2befa31604c9370eeae281d8e64a22cedf30f5d10d33be612ddc711a0c86cd6c25c14da068c51e50c3f2dd0bd8e4e49 languageName: node linkType: hard @@ -3211,12 +3370,12 @@ __metadata: languageName: node linkType: hard -"@expo/dev-server@npm:0.1.114": - version: 0.1.114 - resolution: "@expo/dev-server@npm:0.1.114" +"@expo/dev-server@npm:0.1.116": + version: 0.1.116 + resolution: "@expo/dev-server@npm:0.1.116" dependencies: "@expo/bunyan": 4.0.0 - "@expo/metro-config": 0.3.18 + "@expo/metro-config": 0.3.19 "@expo/osascript": 2.0.33 body-parser: 1.19.0 chalk: ^4.0.0 @@ -3228,7 +3387,7 @@ __metadata: semver: 7.3.2 serialize-error: 6.0.0 temp-dir: ^2.0.0 - checksum: 9b1607bf3616fe5ef1c275f21e308324e805ea268edd30e650dd75eb3db42d35f8fd068cda8970bb31b2c07c22dbc25348e2824035277bf56222ca795f6192f2 + checksum: c1abd76fcf19baf4cb641f77ae581b70418ab779f1f238db6f7733ccf776b2bdcfa5f5a28a2c7a359b141a8f76257130c1c733a4506d4c4dbeb347437853abed languageName: node linkType: hard @@ -3253,11 +3412,11 @@ __metadata: languageName: node linkType: hard -"@expo/dev-tools@npm:0.13.159": - version: 0.13.159 - resolution: "@expo/dev-tools@npm:0.13.159" +"@expo/dev-tools@npm:0.13.161": + version: 0.13.161 + resolution: "@expo/dev-tools@npm:0.13.161" dependencies: - "@expo/config": 6.0.24 + "@expo/config": 6.0.26 base64url: 3.0.1 better-opn: ^3.0.1 express: 4.16.4 @@ -3269,7 +3428,7 @@ __metadata: subscriptions-transport-ws: 0.9.8 peerDependencies: xdl: "*" - checksum: 6625910ee29bf3eb5842fe979dd753b06c96cdfe5d229a0c0bb7af83c72ada5b4df5999cfd6808e2b3b2badc12ed7ccf8d60252bc98163eb66e695d013df59f2 + checksum: c26f8de1491b8c7ec296e884fe8997d98f2e4c2ef9588fd2b2a4aa05a2dcb42cef9c1cc8364a242730668ab0dea5fc4fcb0069b3d0adb8fe15bb4ea9ca4fb002 languageName: node linkType: hard @@ -3313,25 +3472,6 @@ __metadata: languageName: node linkType: hard -"@expo/image-utils@npm:0.3.17": - version: 0.3.17 - resolution: "@expo/image-utils@npm:0.3.17" - dependencies: - "@expo/spawn-async": 1.5.0 - chalk: ^4.0.0 - fs-extra: 9.0.0 - getenv: ^1.0.0 - jimp-compact: 0.16.1 - mime: ^2.4.4 - node-fetch: ^2.6.0 - parse-png: ^2.1.0 - resolve-from: ^5.0.0 - semver: 7.3.2 - tempy: 0.3.0 - checksum: f9059837940c4f2416e8f8319c265d614ed8c8f09b5b03a63a840f89f2b9d91bae4218a14c45c252ed1176c93fbc56922460ce5763a7f4469f3ffa5ae6912b73 - languageName: node - linkType: hard - "@expo/image-utils@npm:0.3.20, @expo/image-utils@npm:^0.3.18": version: 0.3.20 resolution: "@expo/image-utils@npm:0.3.20" @@ -3382,17 +3522,6 @@ __metadata: languageName: node linkType: hard -"@expo/json-file@npm:8.2.33": - version: 8.2.33 - resolution: "@expo/json-file@npm:8.2.33" - dependencies: - "@babel/code-frame": ~7.10.4 - json5: ^1.0.1 - write-file-atomic: ^2.3.0 - checksum: 1817fd116ca3ccf7f7b6b37de679b2a5afd009c25ffd7a2179cec116d5d64ce0c465ddee79a271c98c7bf37b42cee8d75e02a9f4b3b6151c30848c4126757f46 - languageName: node - linkType: hard - "@expo/json-file@npm:8.2.36, @expo/json-file@npm:^8.2.35": version: 8.2.36 resolution: "@expo/json-file@npm:8.2.36" @@ -3404,7 +3533,7 @@ __metadata: languageName: node linkType: hard -"@expo/metro-config@npm:0.3.17, @expo/metro-config@npm:~0.3.16, @expo/metro-config@npm:~0.3.7": +"@expo/metro-config@npm:0.3.17, @expo/metro-config@npm:~0.3.7": version: 0.3.17 resolution: "@expo/metro-config@npm:0.3.17" dependencies: @@ -3420,11 +3549,11 @@ __metadata: languageName: node linkType: hard -"@expo/metro-config@npm:0.3.18": - version: 0.3.18 - resolution: "@expo/metro-config@npm:0.3.18" +"@expo/metro-config@npm:0.3.19": + version: 0.3.19 + resolution: "@expo/metro-config@npm:0.3.19" dependencies: - "@expo/config": 6.0.24 + "@expo/config": 6.0.26 "@expo/json-file": 8.2.36 chalk: ^4.1.0 debug: ^4.3.2 @@ -3432,16 +3561,32 @@ __metadata: getenv: ^1.0.0 resolve-from: ^5.0.0 sucrase: ^3.20.0 - checksum: 719157b99b5c096d7a9e2fd23e547203cf8fdd6e93533fc75217a8ac248b4cfac24a970d1a53a878e9d3ab1f722b3a4ef2267cddcdad982f763302c6b6438103 + checksum: e3b838642af61015c19ee832493aeabe7db426c327b6f02f9f2f4112ea66e86f5012f7e011168bcb501307fa3b4aeb9b9d9e70a7e3e9579ccc805628a56115ce languageName: node linkType: hard -"@expo/next-adapter@npm:3.1.7": - version: 3.1.7 - resolution: "@expo/next-adapter@npm:3.1.7" +"@expo/metro-config@npm:~0.3.18": + version: 0.3.20 + resolution: "@expo/metro-config@npm:0.3.20" dependencies: - "@expo/package-manager": 0.0.47 - "@expo/webpack-config": 0.16.7 + "@expo/config": 7.0.0 + "@expo/json-file": 8.2.36 + chalk: ^4.1.0 + debug: ^4.3.2 + find-yarn-workspace-root: ~2.0.0 + getenv: ^1.0.0 + resolve-from: ^5.0.0 + sucrase: ^3.20.0 + checksum: 431b7cc116f8221b9d3716c67dc541bd5169280a6aa1f0810b19c4bc3f86d8bb7bdd450ca00fca1a7d297d45e80070582594bb4a87fba44e6d66ceb73a987240 + languageName: node + linkType: hard + +"@expo/next-adapter@npm:4.0.8": + version: 4.0.8 + resolution: "@expo/next-adapter@npm:4.0.8" + dependencies: + "@expo/package-manager": 0.0.55 + "@expo/webpack-config": 0.16.26 babel-preset-expo: ^8.4.1 chalk: ^4.0.0 commander: ^4.0.1 @@ -3455,7 +3600,7 @@ __metadata: react-native-web: ^0.17.0 bin: next-expo: build/cli/index.js - checksum: b10e49e0791783fc3ce07cd1b74c0fe9aa829d509d5b0a96442ce97325e37a6c1d76d882068313cae9bd961c7ee7a40f833399ab54a99ae5a7146b7166691690 + checksum: 1421946571c6f4a570be2c9dbcc63a1798977049fd531624720f4415a46df37b5f2f272c834bc752016356d179492b904c11afebf3417295cdfd40cbf02bdf7b languageName: node linkType: hard @@ -3469,24 +3614,7 @@ __metadata: languageName: node linkType: hard -"@expo/package-manager@npm:0.0.47": - version: 0.0.47 - resolution: "@expo/package-manager@npm:0.0.47" - dependencies: - "@expo/json-file": 8.2.33 - "@expo/spawn-async": ^1.5.0 - ansi-regex: ^5.0.0 - chalk: ^4.0.0 - find-yarn-workspace-root: ~2.0.0 - npm-package-arg: ^7.0.0 - rimraf: ^3.0.2 - split: ^1.0.1 - sudo-prompt: 9.1.1 - checksum: f3aaf027d69ad2186dbc5cb15658ffde30d8549eddebf314aae1d32878761fc9d1a57d8523ae112c1e46c961d833111f14d755bba73051e55eea5310e4dbd620 - languageName: node - linkType: hard - -"@expo/package-manager@npm:0.0.55": +"@expo/package-manager@npm:0.0.55, @expo/package-manager@npm:~0.0.53": version: 0.0.55 resolution: "@expo/package-manager@npm:0.0.55" dependencies: @@ -3504,24 +3632,6 @@ __metadata: languageName: node linkType: hard -"@expo/package-manager@npm:~0.0.52": - version: 0.0.54 - resolution: "@expo/package-manager@npm:0.0.54" - dependencies: - "@expo/json-file": 8.2.36 - "@expo/spawn-async": ^1.5.0 - ansi-regex: ^5.0.0 - chalk: ^4.0.0 - find-up: ^5.0.0 - find-yarn-workspace-root: ~2.0.0 - npm-package-arg: ^7.0.0 - rimraf: ^3.0.2 - split: ^1.0.1 - sudo-prompt: 9.1.1 - checksum: 2615a66bbbe1f08057c123cf486fbc89aaf124fcd0daae6aa9078da580a2a063fe227cb547e0e66ae3a0c0dfe188105123d5bcbaa4fe61325f37c58e4ad5cf6e - languageName: node - linkType: hard - "@expo/plist@npm:0.0.13": version: 0.0.13 resolution: "@expo/plist@npm:0.0.13" @@ -3533,17 +3643,6 @@ __metadata: languageName: node linkType: hard -"@expo/plist@npm:0.0.15": - version: 0.0.15 - resolution: "@expo/plist@npm:0.0.15" - dependencies: - "@xmldom/xmldom": ~0.7.0 - base64-js: ^1.2.3 - xmlbuilder: ^14.0.0 - checksum: 65b10172bbdc1d0e037094ab10b787c1ff01549f30ada96a0a47ae2e1a388cf26a03ce41bd7eeee7036585c60c3a9a589fbb6522ba38f5da8c1e3d03160876b9 - languageName: node - linkType: hard - "@expo/plist@npm:0.0.18, @expo/plist@npm:^0.0.18": version: 0.0.18 resolution: "@expo/plist@npm:0.0.18" @@ -3555,11 +3654,11 @@ __metadata: languageName: node linkType: hard -"@expo/prebuild-config@npm:4.0.3": - version: 4.0.3 - resolution: "@expo/prebuild-config@npm:4.0.3" +"@expo/prebuild-config@npm:4.0.4": + version: 4.0.4 + resolution: "@expo/prebuild-config@npm:4.0.4" dependencies: - "@expo/config": 6.0.24 + "@expo/config": 6.0.26 "@expo/config-plugins": 4.1.5 "@expo/config-types": ^45.0.0 "@expo/image-utils": 0.3.21 @@ -3570,7 +3669,7 @@ __metadata: resolve-from: ^5.0.0 semver: 7.3.2 xml2js: 0.4.23 - checksum: d9db7f8f69167137e0bd4878bd49def4ce67291c95762dd9ca34644b778f2158e97dd0057c29e8f5cd56b6c24beaec73525b99871c79d0b398e80d41638eeec8 + checksum: 1122c259d4b5032e45c3cbe656ec54afcdadcdd8c0a2d1afdf777460f4323b419575d97f614abc1e6f10881a159a1d4e97971c4896468b098c4313681afb8942 languageName: node linkType: hard @@ -3593,6 +3692,26 @@ __metadata: languageName: node linkType: hard +"@expo/prebuild-config@npm:~5.0.0": + version: 5.0.1 + resolution: "@expo/prebuild-config@npm:5.0.1" + dependencies: + "@expo/config": 7.0.0 + "@expo/config-plugins": ~5.0.0 + "@expo/config-types": ^46.0.0 + "@expo/image-utils": 0.3.20 + "@expo/json-file": 8.2.36 + debug: ^4.3.1 + fs-extra: ^9.0.0 + resolve-from: ^5.0.0 + semver: 7.3.2 + xml2js: 0.4.23 + peerDependencies: + expo-modules-autolinking: ">=0.8.1" + checksum: 57808b282a505b778a1abcfa268f0a1f17954c928ea95482cae7234c039b853a35f0f5a09964e6a4acb39b7d9f7e7b7c5583656b244bbdc8d7ad8fe96440d56e + languageName: node + linkType: hard + "@expo/rudder-sdk-node@npm:1.1.1": version: 1.1.1 resolution: "@expo/rudder-sdk-node@npm:1.1.1" @@ -3653,18 +3772,18 @@ __metadata: languageName: node linkType: hard -"@expo/webpack-config@npm:0.16.25": - version: 0.16.25 - resolution: "@expo/webpack-config@npm:0.16.25" +"@expo/webpack-config@npm:0.16.26": + version: 0.16.26 + resolution: "@expo/webpack-config@npm:0.16.26" dependencies: "@babel/core": 7.9.0 - "@expo/config": 6.0.24 + "@expo/config": 6.0.26 babel-loader: 8.1.0 chalk: ^4.0.0 clean-webpack-plugin: ^3.0.0 copy-webpack-plugin: ~6.0.3 css-loader: ~3.6.0 - expo-pwa: 0.0.120 + expo-pwa: 0.0.121 file-loader: ~6.0.0 find-yarn-workspace-root: ~2.0.0 getenv: ^1.0.0 @@ -3687,50 +3806,27 @@ __metadata: webpack: 4.43.0 webpack-dev-server: 3.11.0 webpack-manifest-plugin: ~2.2.0 - checksum: 8fe245ff0091f09fb744359825505b0cac402c91ceb06e92ea550116b2d8c69c513290099ab2b5197923df9234b8c20806ca6737bf5b3b608810b20831bfcc1b + checksum: f683a76e76f903e81506d923c3502d4c06bb704ea4b7544b35f223488ae61763d16bdee89b16df406cc846b5a2033c7ca09f43802fd76df54e6dc503a210d16e languageName: node linkType: hard -"@expo/webpack-config@npm:0.16.7": - version: 0.16.7 - resolution: "@expo/webpack-config@npm:0.16.7" +"@expo/xcpretty@npm:^4.1.0": + version: 4.1.2 + resolution: "@expo/xcpretty@npm:4.1.2" dependencies: - "@babel/core": 7.9.0 - "@expo/config": 6.0.7 - babel-loader: 8.1.0 - chalk: ^4.0.0 - clean-webpack-plugin: ^3.0.0 - copy-webpack-plugin: ~6.0.3 - css-loader: ~3.6.0 - expo-pwa: 0.0.102 - file-loader: ~6.0.0 - find-yarn-workspace-root: ~2.0.0 - getenv: ^1.0.0 - html-loader: ~1.1.0 - html-webpack-plugin: ~4.3.0 - image-size: ^1.0.0 - is-wsl: ^2.0.0 - loader-utils: ^2.0.0 - mini-css-extract-plugin: ^0.5.0 - node-html-parser: ^1.2.12 - optimize-css-assets-webpack-plugin: ^5.0.3 - pnp-webpack-plugin: ^1.5.0 - postcss-safe-parser: ^4.0.2 - react-dev-utils: ~11.0.1 - schema-utils: ^3.1.1 - semver: ~7.3.2 - style-loader: ~1.2.1 - terser-webpack-plugin: ^3.0.6 - url-loader: ~4.1.0 - webpack: 4.43.0 - webpack-manifest-plugin: ~2.2.0 - checksum: 4811dfffae8a85fcc5272abeaeb7ff9a361dd2a2c51b63f364d1a3b365a4937bd519f46ffd54fd7685b5b03afa00821d3cc715b8a1f64dde14dfa5866e6294b2 + "@babel/code-frame": 7.10.4 + chalk: ^4.1.0 + find-up: ^5.0.0 + js-yaml: ^4.1.0 + bin: + excpretty: build/cli.js + checksum: 3a99d2080f6d2ba36ea21be564569acfd1901c903b94acbc0026921a05753697706a8c44c434d5d64d5b6413ad6b611f10f8cf161c7c361aeab6ad43a4b15989 languageName: node linkType: hard -"@expo/xcpretty@npm:^4.1.0, @expo/xcpretty@npm:^4.1.1": - version: 4.1.2 - resolution: "@expo/xcpretty@npm:4.1.2" +"@expo/xcpretty@npm:^4.2.1, @expo/xcpretty@npm:^4.2.2": + version: 4.2.2 + resolution: "@expo/xcpretty@npm:4.2.2" dependencies: "@babel/code-frame": 7.10.4 chalk: ^4.1.0 @@ -3738,7 +3834,7 @@ __metadata: js-yaml: ^4.1.0 bin: excpretty: build/cli.js - checksum: 3a99d2080f6d2ba36ea21be564569acfd1901c903b94acbc0026921a05753697706a8c44c434d5d64d5b6413ad6b611f10f8cf161c7c361aeab6ad43a4b15989 + checksum: 075b09567a742eb1a5730f0a191f66e15f0606864d65734bf0b51b8598fb6e5bd1aabaf4e4257b209b8c0ffbb46cb17b66cdca29d678c95c73eb0e5e4aeca538 languageName: node linkType: hard @@ -3836,21 +3932,21 @@ __metadata: languageName: node linkType: hard -"@growthbook/growthbook-react@npm:^0.7.0": - version: 0.7.0 - resolution: "@growthbook/growthbook-react@npm:0.7.0" +"@growthbook/growthbook-react@npm:^0.9.0": + version: 0.9.0 + resolution: "@growthbook/growthbook-react@npm:0.9.0" dependencies: - "@growthbook/growthbook": ^0.16.0 + "@growthbook/growthbook": ^0.18.0 peerDependencies: - react: ^16.8.0-0 || ^17.0.0-0 - checksum: 75ac5aaa686ec8d8a007e7e27e594a6cb7c74d0df58e3327086c623c60024f700e9af93031b371eaee31dc09cca863f47a2cb6629f6adc263f361520f90973e5 + react: ^16.8.0-0 || ^17.0.0-0 || ^18.0.0-0 + checksum: f222285be4e8e4cc440bb18d276575282d794f78ec3ec94c22b77a5ee5e5c5fbbc8337963c21071f94624e23717b9f28cf7133b94f5a3cb7b4367dc9c2ff59b0 languageName: node linkType: hard -"@growthbook/growthbook@npm:^0.16.0": - version: 0.16.2 - resolution: "@growthbook/growthbook@npm:0.16.2" - checksum: 531c4d4a0f388ebd867a83f7fc592afb5bf9e58b69722c531eb84c0eec5b3add3366ea2718de31d65365530a50b7f32e40ea7f4acb1ae63d9a2bb7e83aa8decf +"@growthbook/growthbook@npm:^0.18.0": + version: 0.18.0 + resolution: "@growthbook/growthbook@npm:0.18.0" + checksum: d4fccb938715ec1b9918e4803acedb9bf8e7ae5c781a124b5c49758919d6bf8ad49a7f37a42c18c1aeebe8d90649ca0788f5152c27841e0266549afade7ecfd8 languageName: node linkType: hard @@ -4001,36 +4097,50 @@ __metadata: languageName: node linkType: hard -"@jest/core@npm:^28.1.0": - version: 28.1.0 - resolution: "@jest/core@npm:28.1.0" +"@jest/console@npm:^28.1.3": + version: 28.1.3 + resolution: "@jest/console@npm:28.1.3" dependencies: - "@jest/console": ^28.1.0 - "@jest/reporters": ^28.1.0 - "@jest/test-result": ^28.1.0 - "@jest/transform": ^28.1.0 - "@jest/types": ^28.1.0 + "@jest/types": ^28.1.3 + "@types/node": "*" + chalk: ^4.0.0 + jest-message-util: ^28.1.3 + jest-util: ^28.1.3 + slash: ^3.0.0 + checksum: fe50d98d26d02ce2901c76dff4bd5429a33c13affb692c9ebf8a578ca2f38a5dd854363d40d6c394f215150791fd1f692afd8e730a4178dda24107c8dfd9750a + languageName: node + linkType: hard + +"@jest/core@npm:^28.1.3": + version: 28.1.3 + resolution: "@jest/core@npm:28.1.3" + dependencies: + "@jest/console": ^28.1.3 + "@jest/reporters": ^28.1.3 + "@jest/test-result": ^28.1.3 + "@jest/transform": ^28.1.3 + "@jest/types": ^28.1.3 "@types/node": "*" ansi-escapes: ^4.2.1 chalk: ^4.0.0 ci-info: ^3.2.0 exit: ^0.1.2 graceful-fs: ^4.2.9 - jest-changed-files: ^28.0.2 - jest-config: ^28.1.0 - jest-haste-map: ^28.1.0 - jest-message-util: ^28.1.0 + jest-changed-files: ^28.1.3 + jest-config: ^28.1.3 + jest-haste-map: ^28.1.3 + jest-message-util: ^28.1.3 jest-regex-util: ^28.0.2 - jest-resolve: ^28.1.0 - jest-resolve-dependencies: ^28.1.0 - jest-runner: ^28.1.0 - jest-runtime: ^28.1.0 - jest-snapshot: ^28.1.0 - jest-util: ^28.1.0 - jest-validate: ^28.1.0 - jest-watcher: ^28.1.0 + jest-resolve: ^28.1.3 + jest-resolve-dependencies: ^28.1.3 + jest-runner: ^28.1.3 + jest-runtime: ^28.1.3 + jest-snapshot: ^28.1.3 + jest-util: ^28.1.3 + jest-validate: ^28.1.3 + jest-watcher: ^28.1.3 micromatch: ^4.0.4 - pretty-format: ^28.1.0 + pretty-format: ^28.1.3 rimraf: ^3.0.0 slash: ^3.0.0 strip-ansi: ^6.0.0 @@ -4039,7 +4149,7 @@ __metadata: peerDependenciesMeta: node-notifier: optional: true - checksum: fb955cc5c8d7f294fd9bb85793e0633707fdbce9c10d4e3222b62d36564b17214abc9ab0e93397d1a6d224cd43681f8e54d570327a92a40d7ac3e47b5de3af1f + checksum: cb79f34bafc4637e7130df12257f5b29075892a2be2c7f45c6d4c0420853e80b5dae11016e652530eb234f4c44c00910cdca3c2cd86275721860725073f7d9b4 languageName: node linkType: hard @@ -4064,6 +4174,18 @@ __metadata: languageName: node linkType: hard +"@jest/environment@npm:^28.1.3": + version: 28.1.3 + resolution: "@jest/environment@npm:28.1.3" + dependencies: + "@jest/fake-timers": ^28.1.3 + "@jest/types": ^28.1.3 + "@types/node": "*" + jest-mock: ^28.1.3 + checksum: 14c496b84aef951df33128cea68988e9de43b2e9d62be9f9c4308d4ac307fa345642813679f80d0a4cedeb900cf6f0b6bb2b92ce089528e8721f72295fdc727f + languageName: node + linkType: hard + "@jest/expect-utils@npm:^28.1.0": version: 28.1.0 resolution: "@jest/expect-utils@npm:28.1.0" @@ -4073,6 +4195,15 @@ __metadata: languageName: node linkType: hard +"@jest/expect-utils@npm:^28.1.3": + version: 28.1.3 + resolution: "@jest/expect-utils@npm:28.1.3" + dependencies: + jest-get-type: ^28.0.2 + checksum: 808ea3a68292a7e0b95490fdd55605c430b4cf209ea76b5b61bfb2a1badcb41bc046810fe4e364bd5fe04663978aa2bd73d8f8465a761dd7c655aeb44cf22987 + languageName: node + linkType: hard + "@jest/expect@npm:^28.1.0": version: 28.1.0 resolution: "@jest/expect@npm:28.1.0" @@ -4083,6 +4214,16 @@ __metadata: languageName: node linkType: hard +"@jest/expect@npm:^28.1.3": + version: 28.1.3 + resolution: "@jest/expect@npm:28.1.3" + dependencies: + expect: ^28.1.3 + jest-snapshot: ^28.1.3 + checksum: 4197f6fdddc33dc45ba4e838f992fc61839c421d7aed0dfe665ef9c2f172bb1df8a8cac9cecee272b40e744a326da521d5e182709fe82a0b936055bfffa3b473 + languageName: node + linkType: hard + "@jest/fake-timers@npm:^28.0.2, @jest/fake-timers@npm:^28.1.0": version: 28.1.0 resolution: "@jest/fake-timers@npm:28.1.0" @@ -4097,6 +4238,20 @@ __metadata: languageName: node linkType: hard +"@jest/fake-timers@npm:^28.1.3": + version: 28.1.3 + resolution: "@jest/fake-timers@npm:28.1.3" + dependencies: + "@jest/types": ^28.1.3 + "@sinonjs/fake-timers": ^9.1.2 + "@types/node": "*" + jest-message-util: ^28.1.3 + jest-mock: ^28.1.3 + jest-util: ^28.1.3 + checksum: cec14d5b14913a54dce64a62912c5456235f5d90b509ceae19c727565073114dae1aaf960ac6be96b3eb94789a3a758b96b72c8fca7e49a6ccac415fbc0321e1 + languageName: node + linkType: hard + "@jest/globals@npm:^28.0.3": version: 28.1.0 resolution: "@jest/globals@npm:28.1.0" @@ -4108,16 +4263,16 @@ __metadata: languageName: node linkType: hard -"@jest/reporters@npm:^28.1.0": - version: 28.1.0 - resolution: "@jest/reporters@npm:28.1.0" +"@jest/reporters@npm:^28.1.3": + version: 28.1.3 + resolution: "@jest/reporters@npm:28.1.3" dependencies: "@bcoe/v8-coverage": ^0.2.3 - "@jest/console": ^28.1.0 - "@jest/test-result": ^28.1.0 - "@jest/transform": ^28.1.0 - "@jest/types": ^28.1.0 - "@jridgewell/trace-mapping": ^0.3.7 + "@jest/console": ^28.1.3 + "@jest/test-result": ^28.1.3 + "@jest/transform": ^28.1.3 + "@jest/types": ^28.1.3 + "@jridgewell/trace-mapping": ^0.3.13 "@types/node": "*" chalk: ^4.0.0 collect-v8-coverage: ^1.0.0 @@ -4129,19 +4284,20 @@ __metadata: istanbul-lib-report: ^3.0.0 istanbul-lib-source-maps: ^4.0.0 istanbul-reports: ^3.1.3 - jest-util: ^28.1.0 - jest-worker: ^28.1.0 + jest-message-util: ^28.1.3 + jest-util: ^28.1.3 + jest-worker: ^28.1.3 slash: ^3.0.0 string-length: ^4.0.1 strip-ansi: ^6.0.0 terminal-link: ^2.0.0 - v8-to-istanbul: ^9.0.0 + v8-to-istanbul: ^9.0.1 peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 peerDependenciesMeta: node-notifier: optional: true - checksum: 19ec066ba219508ce6f5e0f0b29f26f906367372b1ddcc2d615cd842e53a10bdd02b87c8b04653e103a2e22b56d96e9af99573d9a84c6adab606158e5383d09f + checksum: a7440887ce837922cbeaa64c3232eb48aae02aa9123f29fc4280ad3e1afe4b35dcba171ba1d5fd219037c396c5152d9c2d102cff1798dd5ae3bd33ac4759ae0a languageName: node linkType: hard @@ -4154,6 +4310,15 @@ __metadata: languageName: node linkType: hard +"@jest/schemas@npm:^28.1.3": + version: 28.1.3 + resolution: "@jest/schemas@npm:28.1.3" + dependencies: + "@sinclair/typebox": ^0.24.1 + checksum: 3cf1d4b66c9c4ffda58b246de1ddcba8e6ad085af63dccdf07922511f13b68c0cc480a7bc620cb4f3099a6f134801c747e1df7bfc7a4ef4dceefbdea3e31e1de + languageName: node + linkType: hard + "@jest/source-map@npm:^28.0.2": version: 28.0.2 resolution: "@jest/source-map@npm:28.0.2" @@ -4177,7 +4342,7 @@ __metadata: languageName: node linkType: hard -"@jest/test-result@npm:^28.0.2, @jest/test-result@npm:^28.1.0": +"@jest/test-result@npm:^28.0.2": version: 28.1.0 resolution: "@jest/test-result@npm:28.1.0" dependencies: @@ -4189,15 +4354,27 @@ __metadata: languageName: node linkType: hard -"@jest/test-sequencer@npm:^28.1.0": - version: 28.1.0 - resolution: "@jest/test-sequencer@npm:28.1.0" +"@jest/test-result@npm:^28.1.3": + version: 28.1.3 + resolution: "@jest/test-result@npm:28.1.3" dependencies: - "@jest/test-result": ^28.1.0 + "@jest/console": ^28.1.3 + "@jest/types": ^28.1.3 + "@types/istanbul-lib-coverage": ^2.0.0 + collect-v8-coverage: ^1.0.0 + checksum: 957a5dd2fd2e84aabe86698f93c0825e96128ccaa23abf548b159a9b08ac74e4bde7acf4bec48479243dbdb27e4ea1b68c171846d21fb64855c6b55cead9ef27 + languageName: node + linkType: hard + +"@jest/test-sequencer@npm:^28.1.3": + version: 28.1.3 + resolution: "@jest/test-sequencer@npm:28.1.3" + dependencies: + "@jest/test-result": ^28.1.3 graceful-fs: ^4.2.9 - jest-haste-map: ^28.1.0 + jest-haste-map: ^28.1.3 slash: ^3.0.0 - checksum: ecd87ca73d1e58ebc6a4de46176c49a0e92c2dc4b41fbd09945b7bd1379ec09ae37804cab3f41c452eea8d1ca71d31a32b602c4e3147ad74c0b0e3a50184cedd + checksum: 13f8905e6d1ec8286694146f7be3cf90eff801bbdea5e5c403e6881444bb390ed15494c7b9948aa94bd7e9c9a851e0d3002ed6e7371d048b478596e5b23df953 languageName: node linkType: hard @@ -4247,6 +4424,29 @@ __metadata: languageName: node linkType: hard +"@jest/transform@npm:^28.1.3": + version: 28.1.3 + resolution: "@jest/transform@npm:28.1.3" + dependencies: + "@babel/core": ^7.11.6 + "@jest/types": ^28.1.3 + "@jridgewell/trace-mapping": ^0.3.13 + babel-plugin-istanbul: ^6.1.1 + chalk: ^4.0.0 + convert-source-map: ^1.4.0 + fast-json-stable-stringify: ^2.0.0 + graceful-fs: ^4.2.9 + jest-haste-map: ^28.1.3 + jest-regex-util: ^28.0.2 + jest-util: ^28.1.3 + micromatch: ^4.0.4 + pirates: ^4.0.4 + slash: ^3.0.0 + write-file-atomic: ^4.0.1 + checksum: dadf618936e0aa84342f07f532801d5bed43cdf95d1417b929e4f8782c872cff1adc84096d5a287a796d0039a2691c06d8450cce5a713a8b52fbb9f872a1e760 + languageName: node + linkType: hard + "@jest/types@npm:^24.9.0": version: 24.9.0 resolution: "@jest/types@npm:24.9.0" @@ -4298,6 +4498,20 @@ __metadata: languageName: node linkType: hard +"@jest/types@npm:^28.1.3": + version: 28.1.3 + resolution: "@jest/types@npm:28.1.3" + dependencies: + "@jest/schemas": ^28.1.3 + "@types/istanbul-lib-coverage": ^2.0.0 + "@types/istanbul-reports": ^3.0.0 + "@types/node": "*" + "@types/yargs": ^17.0.8 + chalk: ^4.0.0 + checksum: 1e258d9c063fcf59ebc91e46d5ea5984674ac7ae6cae3e50aa780d22b4405bf2c925f40350bf30013839eb5d4b5e521d956ddf8f3b7c78debef0e75a07f57350 + languageName: node + linkType: hard + "@jimp/bmp@npm:^0.12.1": version: 0.12.1 resolution: "@jimp/bmp@npm:0.12.1" @@ -4770,6 +4984,16 @@ __metadata: languageName: node linkType: hard +"@jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.13": + version: 0.3.14 + resolution: "@jridgewell/trace-mapping@npm:0.3.14" + dependencies: + "@jridgewell/resolve-uri": ^3.0.3 + "@jridgewell/sourcemap-codec": ^1.4.10 + checksum: b9537b9630ffb631aef9651a085fe361881cde1772cd482c257fe3c78c8fd5388d681f504a9c9fe1081b1c05e8f75edf55ee10fdb58d92bbaa8dbf6a7bd6b18c + languageName: node + linkType: hard + "@jridgewell/trace-mapping@npm:^0.3.7, @jridgewell/trace-mapping@npm:^0.3.9": version: 0.3.13 resolution: "@jridgewell/trace-mapping@npm:0.3.13" @@ -5878,51 +6102,82 @@ __metadata: languageName: node linkType: hard -"@react-native-community/cli-debugger-ui@npm:^7.0.3": - version: 7.0.3 - resolution: "@react-native-community/cli-debugger-ui@npm:7.0.3" +"@react-native-community/cli-clean@npm:^8.0.0": + version: 8.0.0 + resolution: "@react-native-community/cli-clean@npm:8.0.0" + dependencies: + "@react-native-community/cli-tools": ^8.0.0 + chalk: ^4.1.2 + execa: ^1.0.0 + prompts: ^2.4.0 + checksum: e227f173ede2b904272ba19356f3ed40e3af645351620dc0abc683357cad5808a7fa7e5adeaafa392e11b64ef10041dcf557be8f306df4552ce1d13e92d01816 + languageName: node + linkType: hard + +"@react-native-community/cli-config@npm:^8.0.3": + version: 8.0.3 + resolution: "@react-native-community/cli-config@npm:8.0.3" + dependencies: + "@react-native-community/cli-tools": ^8.0.0 + cosmiconfig: ^5.1.0 + deepmerge: ^3.2.0 + glob: ^7.1.3 + joi: ^17.2.1 + checksum: 8c8c32c434e24157918788c1db867bdf12f4941ea6dc0eccfe5496dcfd49a3824b9e4d65438c3a30e51c0d32d8f15a7764e2e0cbf8b259d308ecd6e67626f4e5 + languageName: node + linkType: hard + +"@react-native-community/cli-debugger-ui@npm:^8.0.0": + version: 8.0.0 + resolution: "@react-native-community/cli-debugger-ui@npm:8.0.0" dependencies: serve-static: ^1.13.1 - checksum: ea90b321a375185f2f7d52e9ff5c13d943c193aa0301c7893f70132dbda4099e64b99adb61687ae6b9b78403e290ce2b8d40690daceb96300535b072dab67170 + checksum: 926dcbf55d3732cefbabb16d62e2ad29d9c2b85d8c231a76b4bea618715ab16e8ca4cddb5879085449423b6776b035d94d148eead3db065fc61c1d156a0550bd languageName: node linkType: hard -"@react-native-community/cli-hermes@npm:^6.3.0": - version: 6.3.0 - resolution: "@react-native-community/cli-hermes@npm:6.3.0" +"@react-native-community/cli-doctor@npm:^8.0.3": + version: 8.0.3 + resolution: "@react-native-community/cli-doctor@npm:8.0.3" dependencies: - "@react-native-community/cli-platform-android": ^6.3.0 - "@react-native-community/cli-tools": ^6.2.0 + "@react-native-community/cli-config": ^8.0.3 + "@react-native-community/cli-platform-ios": ^8.0.2 + "@react-native-community/cli-tools": ^8.0.0 chalk: ^4.1.2 + command-exists: ^1.2.8 + envinfo: ^7.7.2 + execa: ^1.0.0 hermes-profile-transformer: ^0.0.6 ip: ^1.1.5 - checksum: 47e126be04e4638850ed7318a11ecacce0226094424fde46e6c457c425d2bbb7f1e1b2ba754c2da7ef14d04b13cb7c3c7ba3a19397fc7ec7a3ba0952d6be4a05 + node-stream-zip: ^1.9.1 + ora: ^5.4.1 + prompts: ^2.4.0 + semver: ^6.3.0 + strip-ansi: ^5.2.0 + sudo-prompt: ^9.0.0 + wcwidth: ^1.0.1 + checksum: 59e57ca5598f915ab4e56783d788f84f4251c9dcd6182c55e1191196953edc3ce9ba3bb8b4bc27ea28d6447bb64d01c9100be8a8e7ce3eeadda9750b86a36de8 languageName: node linkType: hard -"@react-native-community/cli-platform-android@npm:^6.3.0": - version: 6.3.0 - resolution: "@react-native-community/cli-platform-android@npm:6.3.0" +"@react-native-community/cli-hermes@npm:^8.0.2": + version: 8.0.2 + resolution: "@react-native-community/cli-hermes@npm:8.0.2" dependencies: - "@react-native-community/cli-tools": ^6.2.0 + "@react-native-community/cli-platform-android": ^8.0.2 + "@react-native-community/cli-tools": ^8.0.0 chalk: ^4.1.2 - execa: ^1.0.0 - fs-extra: ^8.1.0 - glob: ^7.1.3 - jetifier: ^1.6.2 - lodash: ^4.17.15 - logkitty: ^0.7.1 - slash: ^3.0.0 - xmldoc: ^1.1.2 - checksum: 997d416db128b62b4d416ad01902c11a2f28ad949e10827154994693570713fef8a9d98d6d95c86552dfe4cbecc29997defdf6cb0132b23b800f8e1fbf016b67 + hermes-profile-transformer: ^0.0.6 + ip: ^1.1.5 + checksum: 933146351b68f2c6106fe1fc9301f24ce19a13dde617f0f4a1fe9df41bb77d822a8cfe76cfc0a47d33b9d528577b7a3c7defa60e1f56756ebcc1b7412badf003 languageName: node linkType: hard -"@react-native-community/cli-platform-android@npm:^7.0.1": - version: 7.0.1 - resolution: "@react-native-community/cli-platform-android@npm:7.0.1" +"@react-native-community/cli-platform-android@npm:^8.0.0, @react-native-community/cli-platform-android@npm:^8.0.2": + version: 8.0.2 + resolution: "@react-native-community/cli-platform-android@npm:8.0.2" dependencies: - "@react-native-community/cli-tools": ^7.0.1 + "@react-native-community/cli-tools": ^8.0.0 chalk: ^4.1.2 execa: ^1.0.0 fs-extra: ^8.1.0 @@ -5931,16 +6186,15 @@ __metadata: lodash: ^4.17.15 logkitty: ^0.7.1 slash: ^3.0.0 - xmldoc: ^1.1.2 - checksum: 35f741153cffc202058b6f9ba3d1d012bccc4268ab62853b455da11090fe21cd8fd90a85d4b09cc04ffc3ee97d9af70b34ced26a4003e6a18f7814566107b0d4 + checksum: 1e3ea384d29db8f1b4b89ab7778bde17755860955bf129c3b51ef2f50879f774db57a94f0be6a1300529aada2c4602b4d94e43b40e5ee865880707a922f0fe51 languageName: node linkType: hard -"@react-native-community/cli-platform-ios@npm:^7.0.1": - version: 7.0.1 - resolution: "@react-native-community/cli-platform-ios@npm:7.0.1" +"@react-native-community/cli-platform-ios@npm:^8.0.0, @react-native-community/cli-platform-ios@npm:^8.0.2": + version: 8.0.2 + resolution: "@react-native-community/cli-platform-ios@npm:8.0.2" dependencies: - "@react-native-community/cli-tools": ^7.0.1 + "@react-native-community/cli-tools": ^8.0.0 chalk: ^4.1.2 execa: ^1.0.0 glob: ^7.1.3 @@ -5948,65 +6202,48 @@ __metadata: lodash: ^4.17.15 ora: ^5.4.1 plist: ^3.0.2 - xcode: ^3.0.0 - checksum: 4b9e06cbf4232cac27a2018dce73996f9e715d4b0495c7c3cc1d9dff96ce6e7e936ea1a09fa8b32c86ed443875f226d93aeae7c68f320c8dde7813e7c28ceda3 + checksum: 10c99047575be7645eedaf9b5196e9e7912601ce730251c9f1337f24139ec0b7a66cf710cacfbaf6a4e55acc8526be6277ecfc04e82e7476a5dc6890125c3281 languageName: node linkType: hard -"@react-native-community/cli-plugin-metro@npm:^7.0.3": - version: 7.0.3 - resolution: "@react-native-community/cli-plugin-metro@npm:7.0.3" +"@react-native-community/cli-plugin-metro@npm:^8.0.0": + version: 8.0.0 + resolution: "@react-native-community/cli-plugin-metro@npm:8.0.0" dependencies: - "@react-native-community/cli-server-api": ^7.0.3 - "@react-native-community/cli-tools": ^6.2.0 + "@react-native-community/cli-server-api": ^8.0.0 + "@react-native-community/cli-tools": ^8.0.0 chalk: ^4.1.2 - metro: ^0.67.0 - metro-config: ^0.67.0 - metro-core: ^0.67.0 - metro-react-native-babel-transformer: ^0.67.0 - metro-resolver: ^0.67.0 - metro-runtime: ^0.67.0 + metro: ^0.70.1 + metro-config: ^0.70.1 + metro-core: ^0.70.1 + metro-react-native-babel-transformer: ^0.70.1 + metro-resolver: ^0.70.1 + metro-runtime: ^0.70.1 readline: ^1.3.0 - checksum: ca91f10586b40b8e43ca378c567bde8b8215d9e7dda88fe3562126aeaa1a0da150e0823fe6c511e3953cac8b47376fecbd397cc956b71dc906f31b3fcfed5e33 + checksum: c651b19078eccd0eca2d70aa295958f0068449bb382b081eb673f3d77ce1373fd77f0261c0b8fe4c77240135af1a9cd711efc3daebd73403cf0068c63c2e8d3a languageName: node linkType: hard -"@react-native-community/cli-server-api@npm:^7.0.3": - version: 7.0.3 - resolution: "@react-native-community/cli-server-api@npm:7.0.3" +"@react-native-community/cli-server-api@npm:^8.0.0": + version: 8.0.0 + resolution: "@react-native-community/cli-server-api@npm:8.0.0" dependencies: - "@react-native-community/cli-debugger-ui": ^7.0.3 - "@react-native-community/cli-tools": ^6.2.0 + "@react-native-community/cli-debugger-ui": ^8.0.0 + "@react-native-community/cli-tools": ^8.0.0 compression: ^1.7.1 connect: ^3.6.5 errorhandler: ^1.5.0 - nocache: ^2.1.0 + nocache: ^3.0.1 pretty-format: ^26.6.2 serve-static: ^1.13.1 ws: ^7.5.1 - checksum: 300ed63bd5ee9991cdca84a8026af6abc1624f32743c25389c101de1414c258676796b512d9dfb2e096c7ab8901cd624a956ea9685bc25fc6dabce3980bcff38 - languageName: node - linkType: hard - -"@react-native-community/cli-tools@npm:^6.2.0": - version: 6.2.0 - resolution: "@react-native-community/cli-tools@npm:6.2.0" - dependencies: - appdirsjs: ^1.2.4 - chalk: ^4.1.2 - lodash: ^4.17.15 - mime: ^2.4.1 - node-fetch: ^2.6.0 - open: ^6.2.0 - semver: ^6.3.0 - shell-quote: 1.6.1 - checksum: 17bb1e2e22c4e3e8c6902da4d46fcba4ed365831b41f35e24ab28720a6e36998092203e694c2a53b21b37161c1bfe10f0d63bcc05d38d149093e28a0d336602d + checksum: b77d27b0c58c51b228c6d5f45d065ed729652339372d9913512e59d081c83914116161ac03645fc3e9ef6d8a10204af26d80450f296efd791962649a1b647d0b languageName: node linkType: hard -"@react-native-community/cli-tools@npm:^7.0.1": - version: 7.0.1 - resolution: "@react-native-community/cli-tools@npm:7.0.1" +"@react-native-community/cli-tools@npm:^8.0.0": + version: 8.0.0 + resolution: "@react-native-community/cli-tools@npm:8.0.0" dependencies: appdirsjs: ^1.2.4 chalk: ^4.1.2 @@ -6017,59 +6254,48 @@ __metadata: ora: ^5.4.1 semver: ^6.3.0 shell-quote: ^1.7.3 - checksum: 11b40438499b3926b55f897f8f276be7092caccbd87b3bd8fd53513190f1743d8bb30673bfb8a6a3a0d2a57837c972b45a4847dae5a5bed3fd18d029bdbe190e + checksum: e57127dd539e3dd366b76e16ba80e55a9d2a37b5d57fe410c7ce246faed300968bfa55b6655dff2400b81a21d72ab533f6e57b0b358f08327ea7bc003caedd84 languageName: node linkType: hard -"@react-native-community/cli-types@npm:^6.0.0": - version: 6.0.0 - resolution: "@react-native-community/cli-types@npm:6.0.0" +"@react-native-community/cli-types@npm:^8.0.0": + version: 8.0.0 + resolution: "@react-native-community/cli-types@npm:8.0.0" dependencies: - ora: ^3.4.0 - checksum: 7ef1a4e5e340facca6280bc8d9f36cd44b8c6d05ba2afa228fea9bd3eabfa4d0b273e3c42f5e1f65144e126eb4f95ef7ffbd785981d30286799d74f267863265 + joi: ^17.2.1 + checksum: 536cdaf7decb67cc3f1008f11ccf334f761957c683a6e9b9e1a3fbc979f4960dc6e726d39e28f33a8ad2492cd1732eb102a52ecf25b2a760d735fc5d23c4d26a languageName: node linkType: hard -"@react-native-community/cli@npm:^7.0.3": - version: 7.0.3 - resolution: "@react-native-community/cli@npm:7.0.3" - dependencies: - "@react-native-community/cli-debugger-ui": ^7.0.3 - "@react-native-community/cli-hermes": ^6.3.0 - "@react-native-community/cli-plugin-metro": ^7.0.3 - "@react-native-community/cli-server-api": ^7.0.3 - "@react-native-community/cli-tools": ^6.2.0 - "@react-native-community/cli-types": ^6.0.0 - appdirsjs: ^1.2.4 +"@react-native-community/cli@npm:^8.0.0": + version: 8.0.3 + resolution: "@react-native-community/cli@npm:8.0.3" + dependencies: + "@react-native-community/cli-clean": ^8.0.0 + "@react-native-community/cli-config": ^8.0.3 + "@react-native-community/cli-debugger-ui": ^8.0.0 + "@react-native-community/cli-doctor": ^8.0.3 + "@react-native-community/cli-hermes": ^8.0.2 + "@react-native-community/cli-plugin-metro": ^8.0.0 + "@react-native-community/cli-server-api": ^8.0.0 + "@react-native-community/cli-tools": ^8.0.0 + "@react-native-community/cli-types": ^8.0.0 chalk: ^4.1.2 - command-exists: ^1.2.8 commander: ^2.19.0 - cosmiconfig: ^5.1.0 - deepmerge: ^3.2.0 - envinfo: ^7.7.2 execa: ^1.0.0 find-up: ^4.1.0 fs-extra: ^8.1.0 - glob: ^7.1.3 graceful-fs: ^4.1.3 - joi: ^17.2.1 leven: ^3.1.0 lodash: ^4.17.15 minimist: ^1.2.0 - node-stream-zip: ^1.9.1 - ora: ^3.4.0 - pretty-format: ^26.6.2 prompts: ^2.4.0 semver: ^6.3.0 - serve-static: ^1.13.1 - strip-ansi: ^5.2.0 - sudo-prompt: ^9.0.0 - wcwidth: ^1.0.1 peerDependencies: react-native: "*" bin: react-native: build/bin.js - checksum: 5f2907e4e77f1013f41b1f0e2ca6e2fce5e0fcefb8ba3c4163f04e8c3af022a451d5b54b7f41303f966273da88b3b16f3ec718a37179515e72d7ac1ec387e073 + checksum: f28957582f3ec18dfd774f3decb80e7fab9f7e7a44c16f86d394c2db96f58ae33ad929e537531262957286b23ee7f30bb0259fd1d93bcf2a079ebcabc8e5cd4d languageName: node linkType: hard @@ -6128,7 +6354,7 @@ __metadata: languageName: node linkType: hard -"@react-native/normalize-color@npm:*, @react-native/normalize-color@npm:2.0.0, @react-native/normalize-color@npm:^2.0.0": +"@react-native/normalize-color@npm:2.0.0, @react-native/normalize-color@npm:^2.0.0": version: 2.0.0 resolution: "@react-native/normalize-color@npm:2.0.0" checksum: 2da373297f0d22b700edb9ab1b2cca34684e94a5dfe172e1cfd114e74ac17e139e802bc671e9868e0a580190eccbf3fa804f67be8cc1d9cbd0e216e994495931 @@ -6860,19 +7086,6 @@ __metadata: languageName: node linkType: hard -"@shopify/react-native-skia@npm:0.1.123": - version: 0.1.123 - resolution: "@shopify/react-native-skia@npm:0.1.123" - dependencies: - react-reconciler: ^0.26.2 - peerDependencies: - react: ">=16.8.1" - react-native: ">=0.63.0-rc.0 <1.0.x" - react-native-reanimated: ">=2.0.0" - checksum: 05f17ba1e7a6d66630dfd5937edbdfd74cfd3280fbd369511dc99256e05a37898a84a5eaa9d756aecba5f2d31d12b8e27e822d4e5aa04b38a76c6a537f4f6c90 - languageName: node - linkType: hard - "@showtime-xyz/universal.accordion@npm:^0.0.22": version: 0.0.22 resolution: "@showtime-xyz/universal.accordion@npm:0.0.22" @@ -7660,9 +7873,8 @@ __metadata: "@capsizecss/core": ^3.0.0 "@config-plugins/detox": ^1.1.0 "@ethersproject/shims": ^5.5.0 - "@expo/xcpretty": ^4.1.0 + "@expo/xcpretty": ^4.2.2 "@gorhom/bottom-sheet": 4.3.2 - "@growthbook/growthbook-react": ^0.7.0 "@hookform/resolvers": ^2.8.5 "@logrocket/react-native": ^1.2.1 "@magic-sdk/react-native": ^7.0.0 @@ -7680,7 +7892,6 @@ __metadata: "@react-three/fiber": ^8.0.12 "@rudderstack/rudder-sdk-react-native": ^1.4.1 "@sentry/react-native": ^3.3.0 - "@shopify/react-native-skia": 0.1.123 "@showtime-xyz/universal.accordion": ^0.0.22 "@showtime-xyz/universal.activity-indicator": ^0.0.19 "@showtime-xyz/universal.alert": ^0.0.31 @@ -7737,7 +7948,7 @@ __metadata: "@tradle/react-native-http": ^2.0.0 "@types/jest": ^27.4.1 "@types/react": ^18.0.1 - "@types/three": ^0.139.0 + "@types/three": ^0.141.0 "@types/uuid": ^8.3.4 "@walletconnect/react-native-dapp": ^1.7.8 app: "*" @@ -7758,16 +7969,16 @@ __metadata: dotenv: ^10.0.0 esbuild: ^0.14.11 events: ^3.3.0 - expo: ^45.0.2 + expo: next expo-app-loading: ~2.0.0 expo-application: ~4.1.0 expo-av: ~11.2.3 expo-blur: ~11.1.0 expo-camera: ~12.2.0 - expo-cli: ^5.4.12 + expo-cli: ^5.5.1 expo-community-flipper: ^45.0.0 expo-constants: ~13.1.1 - expo-dev-client: ~0.9.5 + expo-dev-client: ~1.0.1 expo-device: ~4.2.0 expo-font: ~10.1.0 expo-gl: ~11.3.0 @@ -7775,31 +7986,31 @@ __metadata: expo-image-picker: ~13.1.1 expo-linear-gradient: ~11.3.0 expo-linking: ~3.1.0 - expo-modules-core: ~0.9.2 + expo-modules-core: next expo-navigation-bar: ~1.2.0 expo-next-react-navigation: ^2.0.2 - expo-notifications: ~0.15.2 + expo-notifications: ~0.15.4 expo-splash-screen: ~0.15.1 expo-status-bar: ~1.3.0 expo-system-ui: ~1.2.0 - expo-updates: ~0.13.1 + expo-updates: ~0.13.3 https-browserify: ~1.0.0 inherits: ^2.0.1 - jest: ^28.0.3 - jest-circus: ^28.0.3 - jest-expo: ^45.0.0-beta.2 + jest: ^28.1.3 + jest-circus: ^28.1.3 + jest-expo: ^45.0.1 jest-next-dynamic: ^1.0.1 - metro-minify-esbuild: ^0.1.0 + metro-minify-esbuild: ^0.2.0 moti: ^0.17.1 node-libs-react-native: ^1.2.1 path-browserify: 1.0.1 process: ^0.11.0 punycode: ^2.1.1 querystring-es3: ~0.2.0 - react: 18.2.0 + react: 18.0.0 react-dom: 18.2.0 react-hook-form: ^7.27.1 - react-native: 0.68.2 + react-native: 0.69.1 react-native-blob-jsi-helper: ^0.2.1 react-native-blurhash: ^1.1.10 react-native-cronet: ^0.5.0 @@ -7823,11 +8034,11 @@ __metadata: react-native-screens: ~3.11.1 react-native-svg: 12.3.0 react-native-tab-view-next: ^3.1.3 - react-native-vision-camera: 2.12.0 - react-native-web: 0.18.0 + react-native-vision-camera: 2.14.0 + react-native-web: 0.18.6 react-native-webview: 11.18.1 react-string-replace: ^0.4.4 - react-test-renderer: 18.0.0 + react-test-renderer: 18.2.0 readable-stream: 3.6.0 recyclerlistview: ^3.0.5 remove-markdown: ^0.3.0 @@ -7837,7 +8048,7 @@ __metadata: solito: ^0.0.24 stream-browserify: ^3.0.0 string_decoder: ~1.3.0 - three: ^0.139.0 + three: ^0.142.0 timers-browserify: ^2.0.12 ts-jest: ^27.1.4 tty-browserify: 0.0.1 @@ -7864,8 +8075,8 @@ __metadata: "@biconomy/mexa": 2.0.24 "@builder.io/partytown": ^0.5.2 "@coinbase/wallet-sdk": ^3.3.0 - "@expo/next-adapter": 3.1.7 - "@growthbook/growthbook-react": ^0.7.0 + "@expo/next-adapter": 4.0.8 + "@growthbook/growthbook-react": ^0.9.0 "@headlessui/react": ^1.6.1 "@next/bundle-analyzer": ^12.0.4 "@radix-ui/react-popover": ^0.1.6 @@ -7905,7 +8116,7 @@ __metadata: postinstall-postinstall: ^2.1.0 raf: ^3.4.1 react-native-fast-image: ^8.5.11 - react-native-web: 0.18.0 + react-native-web: 0.18.6 react-stickynode: ^4.0.0 react-string-replace: ^0.4.4 remove-markdown: ^0.3.0 @@ -7940,30 +8151,30 @@ __metadata: "@storybook/addon-ondevice-controls": next "@storybook/addon-ondevice-notes": next "@storybook/react-native": next - "@types/three": ^0.139.0 + "@types/three": ^0.141.0 design-system: "*" - expo: ^45.0.2 + expo: next expo-asset: ~8.5.0 expo-av: ~11.2.3 expo-blur: ~11.1.0 expo-community-flipper: ^45.0.0 expo-constants: ~13.1.1 - expo-dev-client: ~0.10.0 + expo-dev-client: ~1.0.1 expo-font: ~10.1.0 expo-gl: ~11.3.0 expo-haptics: ~11.2.0 expo-image-picker: ~13.1.1 expo-linear-gradient: ~11.3.0 expo-linking: ~3.1.0 - expo-modules-core: ~0.9.2 + expo-modules-core: next expo-splash-screen: ~0.15.1 expo-status-bar: ~1.3.0 expo-system-ui: ~1.2.0 - expo-updates: ~0.13.2 + expo-updates: ~0.13.3 expo-web-browser: ~10.2.1 react: 18.2.0 react-dom: 18.2.0 - react-native: 0.68.2 + react-native: 0.69.1 react-native-blob-jsi-helper: ^0.2.1 react-native-fast-image: ^8.5.11 react-native-flipper: ^0.131.1 @@ -7978,9 +8189,9 @@ __metadata: react-native-safe-area-context: 4.2.4 react-native-screens: ~3.11.1 react-native-svg: 12.3.0 - react-native-vision-camera: 2.12.0 - react-native-web: 0.18.0 - three: ^0.139.0 + react-native-vision-camera: 2.14.0 + react-native-web: 0.18.6 + three: ^0.142.0 typescript: 4.7.4 languageName: unknown linkType: soft @@ -8009,7 +8220,7 @@ __metadata: path-browserify: ^1.0.1 react: 18.2.0 react-dom: 18.2.0 - react-native-web: 0.18.0 + react-native-web: 0.18.6 storybook-addon-next: ^1.6.7 typescript: 4.7.4 languageName: unknown @@ -8045,6 +8256,13 @@ __metadata: languageName: node linkType: hard +"@sinclair/typebox@npm:^0.24.1": + version: 0.24.20 + resolution: "@sinclair/typebox@npm:0.24.20" + checksum: bb2e95ab60236ebbcaf3c0735b01a8ce6bea068bb1214a8016f8fea7bc2027d69b08437998425d93a3ac38ded3dbe8c64e218e635c09282cb3dd5d5a64269076 + languageName: node + linkType: hard + "@sindresorhus/is@npm:^0.14.0": version: 0.14.0 resolution: "@sindresorhus/is@npm:0.14.0" @@ -8068,7 +8286,7 @@ __metadata: languageName: node linkType: hard -"@sinonjs/fake-timers@npm:^9.1.1": +"@sinonjs/fake-timers@npm:^9.1.1, @sinonjs/fake-timers@npm:^9.1.2": version: 9.1.2 resolution: "@sinonjs/fake-timers@npm:9.1.2" dependencies: @@ -10592,10 +10810,12 @@ __metadata: languageName: node linkType: hard -"@types/three@npm:^0.139.0": - version: 0.139.0 - resolution: "@types/three@npm:0.139.0" - checksum: 811ce2dd6cfeaa8b051699b6e57f5696b30cb4d33697675c9eee500e377cdbdc872dc6932dfc094c3ae61acfb895d089043a6e5c389d563c516d99ebfef8c130 +"@types/three@npm:^0.141.0": + version: 0.141.0 + resolution: "@types/three@npm:0.141.0" + dependencies: + "@types/webxr": "*" + checksum: b4d1fd19eec01a15374a9e0a181207f0b2a27df881f3cfc63ce167b36b214c6926d80ac0eeb80c365832f69e7180db514a859808150ece1c1503a4eb58d4ac1e languageName: node linkType: hard @@ -10661,6 +10881,13 @@ __metadata: languageName: node linkType: hard +"@types/webxr@npm:*": + version: 0.4.0 + resolution: "@types/webxr@npm:0.4.0" + checksum: 4388c18a5b08ef4aa97f2177d3d80d384c5557c4b06278215d46472585923128fb316353e5fb799d22ffe99be149af90d0c27c41cb3681e82228088e48b24184 + languageName: node + linkType: hard + "@types/yargs-parser@npm:*": version: 21.0.0 resolution: "@types/yargs-parser@npm:21.0.0" @@ -12267,13 +12494,6 @@ __metadata: languageName: node linkType: hard -"array-filter@npm:~0.0.0": - version: 0.0.1 - resolution: "array-filter@npm:0.0.1" - checksum: 0e9afdf5e248c45821c6fe1232071a13a3811e1902c2c2a39d12e4495e8b0b25739fd95bffbbf9884b9693629621f6077b4ae16207b8f23d17710fc2465cebbb - languageName: node - linkType: hard - "array-find-index@npm:^1.0.1": version: 1.0.2 resolution: "array-find-index@npm:1.0.2" @@ -12308,20 +12528,6 @@ __metadata: languageName: node linkType: hard -"array-map@npm:~0.0.0": - version: 0.0.0 - resolution: "array-map@npm:0.0.0" - checksum: 30d73fdc99956c8bd70daea40db5a7d78c5c2c75a03c64fc77904885e79adf7d5a0595076534f4e58962d89435f0687182ac929e65634e3d19931698cbac8149 - languageName: node - linkType: hard - -"array-reduce@npm:~0.0.0": - version: 0.0.0 - resolution: "array-reduce@npm:0.0.0" - checksum: d6226325271f477e3dd65b4d40db8597735b8d08bebcca4972e52d3c173d6c697533664fa8865789ea2d076bdaf1989bab5bdfbb61598be92074a67f13057c3a - languageName: node - linkType: hard - "array-to-image@npm:1.0.0, array-to-image@npm:^1.0.0": version: 1.0.0 resolution: "array-to-image@npm:1.0.0" @@ -12572,6 +12778,13 @@ __metadata: languageName: node linkType: hard +"async@npm:^3.2.2": + version: 3.2.4 + resolution: "async@npm:3.2.4" + checksum: 43d07459a4e1d09b84a20772414aa684ff4de085cbcaec6eea3c7a8f8150e8c62aa6cd4e699fe8ee93c3a5b324e777d34642531875a0817a35697522c1b02e89 + languageName: node + linkType: hard + "asynckit@npm:^0.4.0": version: 0.4.0 resolution: "asynckit@npm:0.4.0" @@ -12719,7 +12932,7 @@ __metadata: languageName: node linkType: hard -"babel-jest@npm:^28.0.3, babel-jest@npm:^28.1.0": +"babel-jest@npm:^28.0.3": version: 28.1.0 resolution: "babel-jest@npm:28.1.0" dependencies: @@ -12736,6 +12949,23 @@ __metadata: languageName: node linkType: hard +"babel-jest@npm:^28.1.3": + version: 28.1.3 + resolution: "babel-jest@npm:28.1.3" + dependencies: + "@jest/transform": ^28.1.3 + "@types/babel__core": ^7.1.14 + babel-plugin-istanbul: ^6.1.1 + babel-preset-jest: ^28.1.3 + chalk: ^4.0.0 + graceful-fs: ^4.2.9 + slash: ^3.0.0 + peerDependencies: + "@babel/core": ^7.8.0 + checksum: 57ccd2296e1839687b5df2fd138c3d00717e0369e385254b012ccd4ee70e75f5d5c8e6cfcdf92d155015b468cfebb847b38e69bb5805d8aaf730e20575127cc6 + languageName: node + linkType: hard + "babel-loader@npm:8.1.0": version: 8.1.0 resolution: "babel-loader@npm:8.1.0" @@ -12873,6 +13103,18 @@ __metadata: languageName: node linkType: hard +"babel-plugin-jest-hoist@npm:^28.1.3": + version: 28.1.3 + resolution: "babel-plugin-jest-hoist@npm:28.1.3" + dependencies: + "@babel/template": ^7.3.3 + "@babel/types": ^7.3.3 + "@types/babel__core": ^7.1.14 + "@types/babel__traverse": ^7.0.6 + checksum: 648d89f9d80f6450ce7e50d0c32eb91b7f26269b47c3e37aaf2e0f2f66a980978345bd6b8c9b8c3aa6a8252ad2bc2c9fb50630e9895622c9a0972af5f70ed20e + languageName: node + linkType: hard + "babel-plugin-macros@npm:^2.0.0": version: 2.8.0 resolution: "babel-plugin-macros@npm:2.8.0" @@ -13107,6 +13349,18 @@ __metadata: languageName: node linkType: hard +"babel-preset-jest@npm:^28.1.3": + version: 28.1.3 + resolution: "babel-preset-jest@npm:28.1.3" + dependencies: + babel-plugin-jest-hoist: ^28.1.3 + babel-preset-current-node-syntax: ^1.0.0 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 8248a4a5ca4242cc06ad13b10b9183ad2664da8fb0da060c352223dcf286f0ce9c708fa17901dc44ecabec25e6d309e5e5b9830a61dd777c3925f187a345a47d + languageName: node + linkType: hard + "backo2@npm:^1.0.2": version: 1.0.2 resolution: "backo2@npm:1.0.2" @@ -16187,17 +16441,6 @@ __metadata: languageName: node linkType: hard -"deprecated-react-native-prop-types@npm:^2.3.0": - version: 2.3.0 - resolution: "deprecated-react-native-prop-types@npm:2.3.0" - dependencies: - "@react-native/normalize-color": "*" - invariant: "*" - prop-types: "*" - checksum: d14f4be1dfe780a7fa9197a31b4a9a2b409c8cf1bf677713fd92d06733dee1043578662d1a8858541cf06164ae91d295db6e595f29bf13e808d9fb37bc58c90b - languageName: node - linkType: hard - "dequal@npm:^1.0.0": version: 1.0.1 resolution: "dequal@npm:1.0.1" @@ -16434,6 +16677,13 @@ __metadata: languageName: node linkType: hard +"diff-sequences@npm:^28.1.1": + version: 28.1.1 + resolution: "diff-sequences@npm:28.1.1" + checksum: e2529036505567c7ca5a2dea86b6bcd1ca0e3ae63bf8ebf529b8a99cfa915bbf194b7021dc1c57361a4017a6d95578d4ceb29fabc3232a4f4cb866a2726c7690 + languageName: node + linkType: hard + "diffie-hellman@npm:^5.0.0": version: 5.0.3 resolution: "diffie-hellman@npm:5.0.3" @@ -18503,6 +18753,19 @@ __metadata: languageName: node linkType: hard +"expect@npm:^28.1.3": + version: 28.1.3 + resolution: "expect@npm:28.1.3" + dependencies: + "@jest/expect-utils": ^28.1.3 + jest-get-type: ^28.0.2 + jest-matcher-utils: ^28.1.3 + jest-message-util: ^28.1.3 + jest-util: ^28.1.3 + checksum: 101e0090de300bcafedb7dbfd19223368a2251ce5fe0105bbb6de5720100b89fb6b64290ebfb42febc048324c76d6a4979cdc4b61eb77747857daf7a5de9b03d + languageName: node + linkType: hard + "expo-app-loading@npm:~2.0.0": version: 2.0.0 resolution: "expo-app-loading@npm:2.0.0" @@ -18521,6 +18784,15 @@ __metadata: languageName: node linkType: hard +"expo-application@npm:~4.2.1": + version: 4.2.1 + resolution: "expo-application@npm:4.2.1" + peerDependencies: + expo: "*" + checksum: 7091b8d83f2068693ce553b45454f79a8b3bbff97c9143b900d436fa45ca0cccaeeb68bc2e2ea20945a12dae7ece6eb9166a93bec815893c583cc0522771fc5f + languageName: node + linkType: hard + "expo-asset@npm:~8.5.0": version: 8.5.0 resolution: "expo-asset@npm:8.5.0" @@ -18534,6 +18806,19 @@ __metadata: languageName: node linkType: hard +"expo-asset@npm:~8.6.0": + version: 8.6.0 + resolution: "expo-asset@npm:8.6.0" + dependencies: + blueimp-md5: ^2.10.0 + invariant: ^2.2.4 + md5-file: ^3.2.3 + path-browserify: ^1.0.0 + url-parse: ^1.5.9 + checksum: fd540c9dad1ef2015dde7eca1d92b9cc2919295332c148a2f13a3744bae84bf162b7c854f3ef0ebdd9f8a39dad4d67e063b84c9114d9905c4b3091c6136ec28d + languageName: node + linkType: hard + "expo-av@npm:~11.2.3": version: 11.2.3 resolution: "expo-av@npm:11.2.3" @@ -18567,22 +18852,22 @@ __metadata: languageName: node linkType: hard -"expo-cli@npm:^5.4.12": - version: 5.4.12 - resolution: "expo-cli@npm:5.4.12" +"expo-cli@npm:^5.5.1": + version: 5.5.1 + resolution: "expo-cli@npm:5.5.1" dependencies: "@babel/runtime": 7.9.0 "@expo/apple-utils": 0.0.0-alpha.31 "@expo/bunyan": 4.0.0 - "@expo/config": 6.0.24 + "@expo/config": 6.0.26 "@expo/config-plugins": 4.1.5 - "@expo/dev-server": 0.1.114 - "@expo/dev-tools": 0.13.159 + "@expo/dev-server": 0.1.116 + "@expo/dev-tools": 0.13.161 "@expo/json-file": 8.2.36 "@expo/osascript": 2.0.33 "@expo/package-manager": 0.0.55 "@expo/plist": 0.0.18 - "@expo/prebuild-config": 4.0.3 + "@expo/prebuild-config": 4.0.4 "@expo/spawn-async": 1.5.0 "@expo/xcpretty": ^4.1.0 better-opn: ^3.0.1 @@ -18627,11 +18912,11 @@ __metadata: url-join: 4.0.0 uuid: ^8.0.0 wrap-ansi: ^7.0.0 - xdl: 59.2.42 + xdl: 59.2.44 bin: expo: bin/expo.js expo-cli: bin/expo.js - checksum: 06b4df2c7f540ce54907641e46de08d4fe6d82b88f5a3397124d4b9bd0b408224827ec4c2c8e98fc4843ad91e6d61a76461a29e0b962c244ff600de4eb6344ff + checksum: 96a7df95456dcaebf8c8cc369831537d8378ca815c966dbfe14da79b020f67dbac96ee5acf5e04bf12a5d8329ac9b00e3ddf7b36f0fb39eb83a9affe763cc885 languageName: node linkType: hard @@ -18657,72 +18942,45 @@ __metadata: languageName: node linkType: hard -"expo-dev-client@npm:~0.10.0": - version: 0.10.0 - resolution: "expo-dev-client@npm:0.10.0" +"expo-constants@npm:~13.2.2": + version: 13.2.2 + resolution: "expo-constants@npm:13.2.2" dependencies: - "@expo/config-plugins": ^4.0.14 - expo-dev-launcher: 0.11.7 - expo-dev-menu: 0.11.0 - expo-dev-menu-interface: 0.7.0 - expo-manifests: ~0.3.0 - expo-updates-interface: ~0.6.0 + "@expo/config": ~7.0.0 + uuid: ^3.3.2 peerDependencies: expo: "*" - checksum: a98770c34737c62389de9b3850eee9691b75c6b9811156c429e63f64b16daf67c67b879fe18d325078d0f5c57af0314da20b6ca1398b165033dcd37f7fc4c3bf + checksum: 2cd3b04b2c726c5a1cdfefdef4ff39fa7e3be9850c91d9b42f92d9073248a7538c3b49b600ddecf07abdb92b54ad1c220faef79bc5a65581e17d919a2ad11d1f languageName: node linkType: hard -"expo-dev-client@npm:~0.9.5": - version: 0.9.5 - resolution: "expo-dev-client@npm:0.9.5" +"expo-dev-client@npm:~1.0.1": + version: 1.0.1 + resolution: "expo-dev-client@npm:1.0.1" dependencies: "@expo/config-plugins": ^4.0.14 - expo-dev-launcher: 0.11.5 - expo-dev-menu: 0.10.6 - expo-dev-menu-interface: 0.6.0 + expo-dev-launcher: 1.0.1 + expo-dev-menu: 1.0.1 + expo-dev-menu-interface: 0.7.0 expo-manifests: ~0.3.0 expo-updates-interface: ~0.6.0 peerDependencies: expo: "*" - checksum: cea2f2d0b7835710affd1d1508873dd450866d614ba970391ed372098b599b4a9b1c0605c128aee3c663dae8751a6cb269f66cc7bd0fe78930b47ac45d8b8cdf + checksum: aa78df986cca4ae92dc0415fea77c1949d6c6097962ef2ba79e0dc48377d97f967a2aa13b5ba916481e7cedf53fd7ced358737a492297e7b191a671f3d15a320 languageName: node linkType: hard -"expo-dev-launcher@npm:0.11.5": - version: 0.11.5 - resolution: "expo-dev-launcher@npm:0.11.5" - dependencies: - "@expo/config-plugins": ^4.0.14 - expo-dev-menu: 0.10.6 - resolve-from: ^5.0.0 - semver: ^7.3.5 - peerDependencies: - expo: "*" - checksum: bdd2e90fc145d427910c57aa0cb58974c77a8bae75e85450d954e90e095a31620f54206ddda35994e4f643c3b3ae080a55c59f8f778e5ffa9ffaa2ca9e7070e7 - languageName: node - linkType: hard - -"expo-dev-launcher@npm:0.11.7": - version: 0.11.7 - resolution: "expo-dev-launcher@npm:0.11.7" +"expo-dev-launcher@npm:1.0.1": + version: 1.0.1 + resolution: "expo-dev-launcher@npm:1.0.1" dependencies: "@expo/config-plugins": ^4.0.14 - expo-dev-menu: 0.11.0 + expo-dev-menu: 1.0.1 resolve-from: ^5.0.0 semver: ^7.3.5 peerDependencies: expo: "*" - checksum: 98e5e16489fc99a701c9c1d30f05d1a2aa42028c688f429d1aacde2c5949ff64556c40971b0e5c35425fbc2f6d8f99abb6ad73b155c55280ca7031e20dc9af46 - languageName: node - linkType: hard - -"expo-dev-menu-interface@npm:0.6.0": - version: 0.6.0 - resolution: "expo-dev-menu-interface@npm:0.6.0" - peerDependencies: - expo: "*" - checksum: e4ef76d5ff7f23b92661c03e83bc1b067fd43f5b6c56673fcd11b09b960f780a32271fcebcd10cec1f0751e83119da77a72139d88abccaf30acb095ccbcf7006 + checksum: c90f2c28092ed4e03432ad76a4c9d576704290de2e1598b742fe2170270d33fd52572b0a7f071b7875902b0e0d28e701978f20745cf937bce1c8ac6b7187db94 languageName: node linkType: hard @@ -18735,29 +18993,16 @@ __metadata: languageName: node linkType: hard -"expo-dev-menu@npm:0.10.6": - version: 0.10.6 - resolution: "expo-dev-menu@npm:0.10.6" - dependencies: - "@expo/config-plugins": ^4.0.14 - expo-dev-menu-interface: 0.6.0 - semver: ^7.3.5 - peerDependencies: - expo: "*" - checksum: 1bbef846e5480125736f1a13c1aa44d0206249c0d15a32a6b23bdb1f7ae95e87d814c63795193b93df78ba1189bbc8838c42a2ea72d4369bd728abd0748f1887 - languageName: node - linkType: hard - -"expo-dev-menu@npm:0.11.0": - version: 0.11.0 - resolution: "expo-dev-menu@npm:0.11.0" +"expo-dev-menu@npm:1.0.1": + version: 1.0.1 + resolution: "expo-dev-menu@npm:1.0.1" dependencies: "@expo/config-plugins": ^4.0.14 expo-dev-menu-interface: 0.7.0 semver: ^7.3.5 peerDependencies: expo: "*" - checksum: ecac75a2854ef4dab8455e227c4ad834707293f98e66324411c29e7d24d93befe4b7c4cc2395f360ae9e0951000a5d9ea2f5bd93b0d172f6e90b56cd05fe76b1 + checksum: 73ea582524a05c88b136eecb8556c62db9389c93ffe59faf1a5c19602a4db7270aa83cb41002c9173bacb0b5fad53256e201eb6bb3118e5b537c45cd6aaa2489 languageName: node linkType: hard @@ -18779,24 +19024,24 @@ __metadata: languageName: node linkType: hard -"expo-error-recovery@npm:~3.1.0": - version: 3.1.0 - resolution: "expo-error-recovery@npm:3.1.0" +"expo-error-recovery@npm:~3.2.0": + version: 3.2.0 + resolution: "expo-error-recovery@npm:3.2.0" peerDependencies: expo: "*" - checksum: 7f387036db76cb508b2917de2bb6b88e6c11291ef33d149e34f93cc82aecbdf14165253156d2271719a82aedf670c4681753259d869909e8bcbc368578e5b952 + checksum: fff74596bcaaaa183c0848d1fd41a77e535c02b28ec2170fc02d32388a84f9b51d07ce87ae70e8837075033bd9f8efe7285ce754f29ad8700bf172cd4e394768 languageName: node linkType: hard -"expo-file-system@npm:~14.0.0": - version: 14.0.0 - resolution: "expo-file-system@npm:14.0.0" +"expo-file-system@npm:~14.1.0": + version: 14.1.0 + resolution: "expo-file-system@npm:14.1.0" dependencies: - "@expo/config-plugins": ^4.0.14 + "@expo/config-plugins": ~5.0.0 uuid: ^3.4.0 peerDependencies: expo: "*" - checksum: bba54c98847a0d890a7d7fef67f8179a5905aa7fd46019de81cb7dadda1dfc4673e660e3e6b88f05e97f340c087229a5e54c7a5c1b2f28c3d51a1137c9df3b28 + checksum: 5db1fb9bbf57c817333fd8aa1a9ddc754195eaa39c45222e1cc5090ce51fff013f9cd1689435fff61d60a9c20783c564ebd8287d5e9c1e2390a600d9cbd41854 languageName: node linkType: hard @@ -18811,6 +19056,17 @@ __metadata: languageName: node linkType: hard +"expo-font@npm:~10.2.0": + version: 10.2.0 + resolution: "expo-font@npm:10.2.0" + dependencies: + fontfaceobserver: ^2.1.0 + peerDependencies: + expo: "*" + checksum: bffd3b4c2ae235eb5edd51dc3f27ca41056fc6ad9055d0473961f3b7097ad47b5f1622a51c8d62e6193bad8e195e2e9907ad776daefb1a183f9e9ddfa436c31a + languageName: node + linkType: hard + "expo-gl-cpp@npm:~11.3.0": version: 11.3.0 resolution: "expo-gl-cpp@npm:11.3.0" @@ -18870,12 +19126,12 @@ __metadata: languageName: node linkType: hard -"expo-keep-awake@npm:~10.1.1": - version: 10.1.1 - resolution: "expo-keep-awake@npm:10.1.1" +"expo-keep-awake@npm:~10.2.0": + version: 10.2.0 + resolution: "expo-keep-awake@npm:10.2.0" peerDependencies: expo: "*" - checksum: 7c7b54e7c721fa87e600142734fdc6c4c8814661767c9b5a4a1c0da1d41f33b5b214f2ccd5ee84e622bb5ff044123e383dd8230aff5a5ce644974a05a49d0e4b + checksum: 36efb39f3b7eedac8854da036b6497135da9893ecff830c4537256de1f7abcce4880791860baf79e0b9795e658b57fb037422875ae377fe0dc034af4485c485b languageName: node linkType: hard @@ -18909,6 +19165,21 @@ __metadata: languageName: node linkType: hard +"expo-modules-autolinking@npm:0.10.0": + version: 0.10.0 + resolution: "expo-modules-autolinking@npm:0.10.0" + dependencies: + chalk: ^4.1.0 + commander: ^7.2.0 + fast-glob: ^3.2.5 + find-up: ^5.0.0 + fs-extra: ^9.1.0 + bin: + expo-modules-autolinking: bin/expo-modules-autolinking.js + checksum: 380d5716e0bc065f0f275f46e1fb32f79ee9e07ebc718bd30ab2766864006044f7c683935323b5d61ba07d63db386d89f0353f32acc3f06174188192086a3b65 + languageName: node + linkType: hard + "expo-modules-autolinking@npm:0.8.1": version: 0.8.1 resolution: "expo-modules-autolinking@npm:0.8.1" @@ -18939,13 +19210,13 @@ __metadata: languageName: node linkType: hard -"expo-modules-core@npm:0.9.2, expo-modules-core@npm:~0.9.2": - version: 0.9.2 - resolution: "expo-modules-core@npm:0.9.2" +"expo-modules-core@npm:0.11.3, expo-modules-core@npm:next": + version: 0.11.3 + resolution: "expo-modules-core@npm:0.11.3" dependencies: compare-versions: ^3.4.0 invariant: ^2.2.4 - checksum: cc7a5efa50cdd193f3240c824276eae2aad4bbae256607529df6f039c9db3cea5bd898002096fb152026abeca33fc46755d3ea68644c7b25dfdb913d9cef383e + checksum: 7fbd9ba98d6e96877287a9f66877bcbec4859a0e4bab8e6095ce010393ae1f12728f55fbe143dc87a1f4ce95d1464d56310354bac0605f509b25bbb58d4d68fc languageName: node linkType: hard @@ -18981,9 +19252,9 @@ __metadata: languageName: node linkType: hard -"expo-notifications@npm:~0.15.2": - version: 0.15.2 - resolution: "expo-notifications@npm:0.15.2" +"expo-notifications@npm:~0.15.4": + version: 0.15.4 + resolution: "expo-notifications@npm:0.15.4" dependencies: "@expo/config-plugins": ^4.0.14 "@expo/image-utils": ^0.3.18 @@ -18997,37 +19268,22 @@ __metadata: uuid: ^3.4.0 peerDependencies: expo: "*" - checksum: 9190102bb3d5a0894bb0f625f2d30922b89d0a7e3fa7fdbe44e6fb439bae3da80cfd96d57367151e5da0829a9a3b83a7e966b8b42485af7d65bfb1b72e9a04b0 + checksum: 8c678afc1d63c5ef18659b56db2cfaca67e7b777f51b7de8f073ea5b34fe58820ea27b4816907573dcb971bbc05b6e3b96e8293f4ce216fa5fb41349626fe449 languageName: node linkType: hard -"expo-pwa@npm:0.0.102": - version: 0.0.102 - resolution: "expo-pwa@npm:0.0.102" +"expo-pwa@npm:0.0.121": + version: 0.0.121 + resolution: "expo-pwa@npm:0.0.121" dependencies: - "@expo/config": 6.0.7 - "@expo/image-utils": 0.3.17 - chalk: ^4.0.0 - commander: 2.20.0 - update-check: 1.5.3 - bin: - expo-pwa: build/cli.js - checksum: 0863157a3a8c6ec760a4661a83b4b6163ab802bb0698345d675d054531deb9fb5a10d61365f41e6d6e2f77f8c4a628aabbf6fc0539ad6ebc6b47e840de05a0e1 - languageName: node - linkType: hard - -"expo-pwa@npm:0.0.120": - version: 0.0.120 - resolution: "expo-pwa@npm:0.0.120" - dependencies: - "@expo/config": 6.0.24 + "@expo/config": 6.0.26 "@expo/image-utils": 0.3.21 chalk: ^4.0.0 commander: 2.20.0 update-check: 1.5.3 bin: expo-pwa: build/cli.js - checksum: 96f8971c5f68a5b205ed07a5d3651f80f01d02a08bfd6baf2186bd7bbe3cac5a1f343191254eae8e3d097c37653cb10d43a5782625ac95411b11980ee3e47dcb + checksum: 989f01b52aa414af30f08dfa21dcf95371391829a23a98659bf4b7bdee7d266beb26e3af7add9b0ef997e5437f790db6861f1e0eeab862cc471c1f8d94ddbb85 languageName: node linkType: hard @@ -19079,9 +19335,9 @@ __metadata: languageName: node linkType: hard -"expo-updates@npm:~0.13.1": - version: 0.13.1 - resolution: "expo-updates@npm:0.13.1" +"expo-updates@npm:~0.13.3": + version: 0.13.3 + resolution: "expo-updates@npm:0.13.3" dependencies: "@expo/code-signing-certificates": 0.0.1 "@expo/config": ^6.0.14 @@ -19099,31 +19355,7 @@ __metadata: expo: "*" bin: expo-updates: bin/cli.js - checksum: 82147c4b46414f29eb00ad9383c393067db007cb6e5c65cac113e56b2e99cd4cf0beaba52a8e6d5bdbe4f6f91d8dbec20d191238f455c682aade6db01de2ba20 - languageName: node - linkType: hard - -"expo-updates@npm:~0.13.2": - version: 0.13.2 - resolution: "expo-updates@npm:0.13.2" - dependencies: - "@expo/code-signing-certificates": 0.0.1 - "@expo/config": ^6.0.14 - "@expo/config-plugins": ^4.0.14 - "@expo/metro-config": ~0.3.7 - arg: 4.1.0 - expo-eas-client: ~0.2.0 - expo-manifests: ~0.3.0 - expo-structured-headers: ~2.2.0 - expo-updates-interface: ~0.6.0 - fbemitter: ^3.0.0 - resolve-from: ^5.0.0 - uuid: ^3.4.0 - peerDependencies: - expo: "*" - bin: - expo-updates: bin/cli.js - checksum: 2b901e714bb2440f5003323de89a2feaffd6bf4a7e33de1b29e22e020446018545260c9ebc467b18105056a0cb0d8548d4cdc2945ecda2c12a1fc550debc8a33 + checksum: 05b5f0f6152dc75c0efccd739f9882ae1a2b31b8140bf655c495854101b59fd4620387ed7a8ab8bf5317d8d206a7737b52a5596763e1cf18ca5d538a0f197900 languageName: node linkType: hard @@ -19138,24 +19370,24 @@ __metadata: languageName: node linkType: hard -"expo@npm:^45.0.2": - version: 45.0.4 - resolution: "expo@npm:45.0.4" +"expo@npm:next": + version: 46.0.0-beta.2 + resolution: "expo@npm:46.0.0-beta.2" dependencies: "@babel/runtime": ^7.14.0 - "@expo/cli": 0.1.4 + "@expo/cli": 0.2.2 "@expo/vector-icons": ^13.0.0 - babel-preset-expo: ~9.1.0 + babel-preset-expo: ~9.2.0 cross-spawn: ^6.0.5 - expo-application: ~4.1.0 - expo-asset: ~8.5.0 - expo-constants: ~13.1.1 - expo-error-recovery: ~3.1.0 - expo-file-system: ~14.0.0 - expo-font: ~10.1.0 - expo-keep-awake: ~10.1.1 - expo-modules-autolinking: 0.8.1 - expo-modules-core: 0.9.2 + expo-application: ~4.2.1 + expo-asset: ~8.6.0 + expo-constants: ~13.2.2 + expo-error-recovery: ~3.2.0 + expo-file-system: ~14.1.0 + expo-font: ~10.2.0 + expo-keep-awake: ~10.2.0 + expo-modules-autolinking: 0.10.0 + expo-modules-core: 0.11.3 fbemitter: ^3.0.0 getenv: ^1.0.0 invariant: ^2.2.4 @@ -19168,7 +19400,7 @@ __metadata: optional: true bin: expo: bin/cli.js - checksum: 24ed412245b1fd18c9353afc6181b7d3d60d50fcc610e613337c869d0cb58f1c802b5c8cac1f2d2618ac6c7ba8294f8519438d340daa8e3f2198ed45acceb62f + checksum: c2f8b9c0acf835cee2de9a56527b3d2d4806f4bcddadaf826a7a5d99a7d336434b6db33971b99c6d79a97b3053dbea4fbdebe794530fb5e992b29eb9b2d3dbb9 languageName: node linkType: hard @@ -19486,7 +19718,7 @@ __metadata: languageName: node linkType: hard -"fbjs@npm:^3.0.0": +"fbjs@npm:^3.0.0, fbjs@npm:^3.0.4": version: 3.0.4 resolution: "fbjs@npm:3.0.4" dependencies: @@ -21128,19 +21360,19 @@ __metadata: languageName: node linkType: hard -"hermes-estree@npm:0.5.0": - version: 0.5.0 - resolution: "hermes-estree@npm:0.5.0" - checksum: 16741229afcda60637b7672ccaf978784147eb21ff55e14418763dff7947717e9a0e962a121a55963aa78ae772cdfd0539b56317c4c63913c7701141335bf0de +"hermes-estree@npm:0.6.0": + version: 0.6.0 + resolution: "hermes-estree@npm:0.6.0" + checksum: 91b59543322a7c0c6d55b4e726d847eed3b9f362bc817d83098600bb72fde9f56b6fb455000f0a39f859c4d1152e1f0a45ca25a93f9716edff545b9f232eb436 languageName: node linkType: hard -"hermes-parser@npm:0.5.0": - version: 0.5.0 - resolution: "hermes-parser@npm:0.5.0" +"hermes-parser@npm:0.6.0": + version: 0.6.0 + resolution: "hermes-parser@npm:0.6.0" dependencies: - hermes-estree: 0.5.0 - checksum: ef3c9aee01162fe1958e084540aa663bd9001acb6aa5d1c724bb8d7aa947dcc2961e0d572adda60895ebfe59f2caef102925f201445698e196c5626fb21e2ba6 + hermes-estree: 0.6.0 + checksum: ea3f566e613465aee70eda6fd022195afb77fa7d65c5370c9c9d204e3e62c4c68f76a86962f41b627d131cbf69f74dec9cf1a649574078edf8058589f5832b32 languageName: node linkType: hard @@ -21839,7 +22071,7 @@ __metadata: languageName: node linkType: hard -"inline-style-prefixer@npm:^6.0.0": +"inline-style-prefixer@npm:^6.0.0, inline-style-prefixer@npm:^6.0.1": version: 6.0.1 resolution: "inline-style-prefixer@npm:6.0.1" dependencies: @@ -21909,7 +22141,7 @@ __metadata: languageName: node linkType: hard -"invariant@npm:*, invariant@npm:2.2.4, invariant@npm:^2.2.3, invariant@npm:^2.2.4": +"invariant@npm:2.2.4, invariant@npm:^2.2.3, invariant@npm:^2.2.4": version: 2.2.4 resolution: "invariant@npm:2.2.4" dependencies: @@ -22845,57 +23077,57 @@ __metadata: languageName: node linkType: hard -"jest-changed-files@npm:^28.0.2": - version: 28.0.2 - resolution: "jest-changed-files@npm:28.0.2" +"jest-changed-files@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-changed-files@npm:28.1.3" dependencies: execa: ^5.0.0 - throat: ^6.0.1 - checksum: 389d4de4b26de3d2c6e23783ef4e23f827a9a79cfebd2db7c6ff74727198814469ee1e1a89f0e6d28a94e3c632ec45b044c2400a0793b8591e18d07b4b421784 + p-limit: ^3.1.0 + checksum: c78af14a68b9b19101623ae7fde15a2488f9b3dbe8cca12a05c4a223bc9bfd3bf41ee06830f20fb560c52434435d6153c9cc6cf450b1f7b03e5e7f96a953a6a6 languageName: node linkType: hard -"jest-circus@npm:^28.0.3, jest-circus@npm:^28.1.0": - version: 28.1.0 - resolution: "jest-circus@npm:28.1.0" +"jest-circus@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-circus@npm:28.1.3" dependencies: - "@jest/environment": ^28.1.0 - "@jest/expect": ^28.1.0 - "@jest/test-result": ^28.1.0 - "@jest/types": ^28.1.0 + "@jest/environment": ^28.1.3 + "@jest/expect": ^28.1.3 + "@jest/test-result": ^28.1.3 + "@jest/types": ^28.1.3 "@types/node": "*" chalk: ^4.0.0 co: ^4.6.0 dedent: ^0.7.0 is-generator-fn: ^2.0.0 - jest-each: ^28.1.0 - jest-matcher-utils: ^28.1.0 - jest-message-util: ^28.1.0 - jest-runtime: ^28.1.0 - jest-snapshot: ^28.1.0 - jest-util: ^28.1.0 - pretty-format: ^28.1.0 + jest-each: ^28.1.3 + jest-matcher-utils: ^28.1.3 + jest-message-util: ^28.1.3 + jest-runtime: ^28.1.3 + jest-snapshot: ^28.1.3 + jest-util: ^28.1.3 + p-limit: ^3.1.0 + pretty-format: ^28.1.3 slash: ^3.0.0 stack-utils: ^2.0.3 - throat: ^6.0.1 - checksum: 29b3f6936671947b81c507132f2afeadf1789cefa1a3849d7ba6a2a32c532016c8df9a647cea6e286050b7d97f1244746175fe9fe768dd38f5bba329aa6c5bc7 + checksum: b635e60a9c92adaefc3f24def8eba691e7c2fdcf6c9fa640cddf2eb8c8b26ee62eab73ebb88798fd7c52a74c1495a984e39b748429b610426f02e9d3d56e09b2 languageName: node linkType: hard -"jest-cli@npm:^28.1.0": - version: 28.1.0 - resolution: "jest-cli@npm:28.1.0" +"jest-cli@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-cli@npm:28.1.3" dependencies: - "@jest/core": ^28.1.0 - "@jest/test-result": ^28.1.0 - "@jest/types": ^28.1.0 + "@jest/core": ^28.1.3 + "@jest/test-result": ^28.1.3 + "@jest/types": ^28.1.3 chalk: ^4.0.0 exit: ^0.1.2 graceful-fs: ^4.2.9 import-local: ^3.0.2 - jest-config: ^28.1.0 - jest-util: ^28.1.0 - jest-validate: ^28.1.0 + jest-config: ^28.1.3 + jest-util: ^28.1.3 + jest-validate: ^28.1.3 prompts: ^2.0.1 yargs: ^17.3.1 peerDependencies: @@ -22905,34 +23137,34 @@ __metadata: optional: true bin: jest: bin/jest.js - checksum: 9da98d9a7a0b670f610943be708205988030fd094029f8a64b258a5a5ef18c0b527ec7019e6b95802f2baa2241bb2d6caf31ef4fd530bcf176737e4ede1d9d79 + checksum: fb424576bf38346318daddee3fcc597cd78cb8dda1759d09c529d8ba1a748f2765c17b00671072a838826e59465a810ff8a232bc6ba2395c131bf3504425a363 languageName: node linkType: hard -"jest-config@npm:^28.1.0": - version: 28.1.0 - resolution: "jest-config@npm:28.1.0" +"jest-config@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-config@npm:28.1.3" dependencies: "@babel/core": ^7.11.6 - "@jest/test-sequencer": ^28.1.0 - "@jest/types": ^28.1.0 - babel-jest: ^28.1.0 + "@jest/test-sequencer": ^28.1.3 + "@jest/types": ^28.1.3 + babel-jest: ^28.1.3 chalk: ^4.0.0 ci-info: ^3.2.0 deepmerge: ^4.2.2 glob: ^7.1.3 graceful-fs: ^4.2.9 - jest-circus: ^28.1.0 - jest-environment-node: ^28.1.0 + jest-circus: ^28.1.3 + jest-environment-node: ^28.1.3 jest-get-type: ^28.0.2 jest-regex-util: ^28.0.2 - jest-resolve: ^28.1.0 - jest-runner: ^28.1.0 - jest-util: ^28.1.0 - jest-validate: ^28.1.0 + jest-resolve: ^28.1.3 + jest-runner: ^28.1.3 + jest-util: ^28.1.3 + jest-validate: ^28.1.3 micromatch: ^4.0.4 parse-json: ^5.2.0 - pretty-format: ^28.1.0 + pretty-format: ^28.1.3 slash: ^3.0.0 strip-json-comments: ^3.1.1 peerDependencies: @@ -22943,7 +23175,7 @@ __metadata: optional: true ts-node: optional: true - checksum: 48bfbef4334a187ce6873fd515230e521f500fe2ae57e43ec5747abee95a80583e784cfb99dd1b11664774f33da63758cc63d4a2b2ecf95c8984f2a880cd773e + checksum: ddabffd3a3a8cb6c2f58f06cdf3535157dbf8c70bcde3e5c3de7bee6a8d617840ffc8cffb0083e38c6814f2a08c225ca19f58898efaf4f351af94679f22ce6bc languageName: node linkType: hard @@ -22983,43 +23215,55 @@ __metadata: languageName: node linkType: hard -"jest-docblock@npm:^28.0.2": - version: 28.0.2 - resolution: "jest-docblock@npm:28.0.2" +"jest-diff@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-diff@npm:28.1.3" + dependencies: + chalk: ^4.0.0 + diff-sequences: ^28.1.1 + jest-get-type: ^28.0.2 + pretty-format: ^28.1.3 + checksum: fa8583e0ccbe775714ce850b009be1b0f6b17a4b6759f33ff47adef27942ebc610dbbcc8a5f7cfb7f12b3b3b05afc9fb41d5f766674616025032ff1e4f9866e0 + languageName: node + linkType: hard + +"jest-docblock@npm:^28.1.1": + version: 28.1.1 + resolution: "jest-docblock@npm:28.1.1" dependencies: detect-newline: ^3.0.0 - checksum: 97aa9707127d5bfc4589485374711bbbb7d9049067fd562132592102f0b841682357eca9b95e35496f78538a2ae400b0b0a8b03f477d6773fc093be9f4716f1f + checksum: 22fca68d988ecb2933bc65f448facdca85fc71b4bd0a188ea09a5ae1b0cc3a049a2a6ec7e7eaa2542c1d5cb5e5145e420a3df4fa280f5070f486c44da1d36151 languageName: node linkType: hard -"jest-each@npm:^28.1.0": - version: 28.1.0 - resolution: "jest-each@npm:28.1.0" +"jest-each@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-each@npm:28.1.3" dependencies: - "@jest/types": ^28.1.0 + "@jest/types": ^28.1.3 chalk: ^4.0.0 jest-get-type: ^28.0.2 - jest-util: ^28.1.0 - pretty-format: ^28.1.0 - checksum: a3d650c0c12a4bf4d4497b9de8aceb0dd96a6183dd8016ae1e4a16b11a81e0e29a58e23b0a1f5a6ca6135156041fd6bf2a4557b9d1ecd33dd417d3cb0e8005a0 + jest-util: ^28.1.3 + pretty-format: ^28.1.3 + checksum: 5c5b8ccb1484e58b027bea682cfa020a45e5bf5379cc7c23bdec972576c1dc3c3bf03df2b78416cefc1a58859dd33b7cf5fff54c370bc3c0f14a3e509eb87282 languageName: node linkType: hard -"jest-environment-node@npm:^28.1.0": - version: 28.1.0 - resolution: "jest-environment-node@npm:28.1.0" +"jest-environment-node@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-environment-node@npm:28.1.3" dependencies: - "@jest/environment": ^28.1.0 - "@jest/fake-timers": ^28.1.0 - "@jest/types": ^28.1.0 + "@jest/environment": ^28.1.3 + "@jest/fake-timers": ^28.1.3 + "@jest/types": ^28.1.3 "@types/node": "*" - jest-mock: ^28.1.0 - jest-util: ^28.1.0 - checksum: e65e83962b6d6d8879611e230d878cd2690acd20d1295071f67de7b02dfc4194438961be2a73acf005fc022fb2f73f9dafd50c23088d4e6b70156f8998b19beb + jest-mock: ^28.1.3 + jest-util: ^28.1.3 + checksum: 1048fe306a6a8b0880a4c66278ebb57479f29c12cff89aab3aa79ab77a8859cf17ab8aa9919fd21c329a7db90e35581b43664e694ad453d5b04e00f3c6420469 languageName: node linkType: hard -"jest-expo@npm:^45.0.0-beta.2": +"jest-expo@npm:^45.0.1": version: 45.0.1 resolution: "jest-expo@npm:45.0.1" dependencies: @@ -23138,13 +23382,36 @@ __metadata: languageName: node linkType: hard -"jest-leak-detector@npm:^28.1.0": - version: 28.1.0 - resolution: "jest-leak-detector@npm:28.1.0" +"jest-haste-map@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-haste-map@npm:28.1.3" + dependencies: + "@jest/types": ^28.1.3 + "@types/graceful-fs": ^4.1.3 + "@types/node": "*" + anymatch: ^3.0.3 + fb-watchman: ^2.0.0 + fsevents: ^2.3.2 + graceful-fs: ^4.2.9 + jest-regex-util: ^28.0.2 + jest-util: ^28.1.3 + jest-worker: ^28.1.3 + micromatch: ^4.0.4 + walker: ^1.0.8 + dependenciesMeta: + fsevents: + optional: true + checksum: d05fdc108645fc2b39fcd4001952cc7a8cb550e93494e98c1e9ab1fc542686f6ac67177c132e564cf94fe8f81503f3f8db8b825b9b713dc8c5748aec63ba4688 + languageName: node + linkType: hard + +"jest-leak-detector@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-leak-detector@npm:28.1.3" dependencies: jest-get-type: ^28.0.2 - pretty-format: ^28.1.0 - checksum: 911eec6b96d389c1e7741c8df85e030a9618e38105c7e71f6f2c1284a02d033fec4e6a8916385f17fd5ed0ffffb8491ac887f5b3de11d0265d8415598e9c0ae6 + pretty-format: ^28.1.3 + checksum: 2e976a4880cf9af11f53a19f6a3820e0f90b635a900737a5427fc42e337d5628ba446dcd7c020ecea3806cf92bc0bbf6982ed62a9cd84e5a13d8751aa30fbbb7 languageName: node linkType: hard @@ -23184,6 +23451,18 @@ __metadata: languageName: node linkType: hard +"jest-matcher-utils@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-matcher-utils@npm:28.1.3" + dependencies: + chalk: ^4.0.0 + jest-diff: ^28.1.3 + jest-get-type: ^28.0.2 + pretty-format: ^28.1.3 + checksum: 6b34f0cf66f6781e92e3bec97bf27796bd2ba31121e5c5997218d9adba6deea38a30df5203937d6785b68023ed95cbad73663cc9aad6fb0cb59aeb5813a58daf + languageName: node + linkType: hard + "jest-message-util@npm:^27.5.1": version: 27.5.1 resolution: "jest-message-util@npm:27.5.1" @@ -23218,6 +23497,23 @@ __metadata: languageName: node linkType: hard +"jest-message-util@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-message-util@npm:28.1.3" + dependencies: + "@babel/code-frame": ^7.12.13 + "@jest/types": ^28.1.3 + "@types/stack-utils": ^2.0.0 + chalk: ^4.0.0 + graceful-fs: ^4.2.9 + micromatch: ^4.0.4 + pretty-format: ^28.1.3 + slash: ^3.0.0 + stack-utils: ^2.0.3 + checksum: 1f266854166dcc6900d75a88b54a25225a2f3710d463063ff1c99021569045c35c7d58557b25447a17eb3a65ce763b2f9b25550248b468a9d4657db365f39e96 + languageName: node + linkType: hard + "jest-mock@npm:^28.0.2, jest-mock@npm:^28.1.0": version: 28.1.0 resolution: "jest-mock@npm:28.1.0" @@ -23228,6 +23524,16 @@ __metadata: languageName: node linkType: hard +"jest-mock@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-mock@npm:28.1.3" + dependencies: + "@jest/types": ^28.1.3 + "@types/node": "*" + checksum: a573bf8e5f12f4c29c661266c31b5c6b69a28d3195b83049983bce025b2b1a0152351567e89e63b102ef817034c2a3aa97eda4e776f3bae2aee54c5765573aa7 + languageName: node + linkType: hard + "jest-next-dynamic@npm:^1.0.1": version: 1.0.1 resolution: "jest-next-dynamic@npm:1.0.1" @@ -23268,17 +23574,17 @@ __metadata: languageName: node linkType: hard -"jest-resolve-dependencies@npm:^28.1.0": - version: 28.1.0 - resolution: "jest-resolve-dependencies@npm:28.1.0" +"jest-resolve-dependencies@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-resolve-dependencies@npm:28.1.3" dependencies: jest-regex-util: ^28.0.2 - jest-snapshot: ^28.1.0 - checksum: 0720ab19285ee64b7dad65c2feff08323660e9ff9c09380011a45d4af58dcf6a6710f10bbe80986ffe2452e11d09be0974d42163c31e832be4fab6c348b4dea5 + jest-snapshot: ^28.1.3 + checksum: 4eea9ec33aefc1c71dc5956391efbcc7be76bda986b366ab3931d99c5f7ed01c9ebd7520e405ea2c76e1bb2c7ce504be6eca2b9831df16564d1e625500f3bfe7 languageName: node linkType: hard -"jest-resolve@npm:^28.0.3, jest-resolve@npm:^28.1.0": +"jest-resolve@npm:^28.0.3": version: 28.1.0 resolution: "jest-resolve@npm:28.1.0" dependencies: @@ -23295,32 +23601,49 @@ __metadata: languageName: node linkType: hard -"jest-runner@npm:^28.1.0": - version: 28.1.0 - resolution: "jest-runner@npm:28.1.0" +"jest-resolve@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-resolve@npm:28.1.3" dependencies: - "@jest/console": ^28.1.0 - "@jest/environment": ^28.1.0 - "@jest/test-result": ^28.1.0 - "@jest/transform": ^28.1.0 - "@jest/types": ^28.1.0 + chalk: ^4.0.0 + graceful-fs: ^4.2.9 + jest-haste-map: ^28.1.3 + jest-pnp-resolver: ^1.2.2 + jest-util: ^28.1.3 + jest-validate: ^28.1.3 + resolve: ^1.20.0 + resolve.exports: ^1.1.0 + slash: ^3.0.0 + checksum: df61a490c93f4f4cf52135e43d6a4fcacb07b0b7d4acc6319e9289529c1d14f2d8e1638e095dbf96f156834802755e38db68caca69dba21a3261ee711d4426b6 + languageName: node + linkType: hard + +"jest-runner@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-runner@npm:28.1.3" + dependencies: + "@jest/console": ^28.1.3 + "@jest/environment": ^28.1.3 + "@jest/test-result": ^28.1.3 + "@jest/transform": ^28.1.3 + "@jest/types": ^28.1.3 "@types/node": "*" chalk: ^4.0.0 emittery: ^0.10.2 graceful-fs: ^4.2.9 - jest-docblock: ^28.0.2 - jest-environment-node: ^28.1.0 - jest-haste-map: ^28.1.0 - jest-leak-detector: ^28.1.0 - jest-message-util: ^28.1.0 - jest-resolve: ^28.1.0 - jest-runtime: ^28.1.0 - jest-util: ^28.1.0 - jest-watcher: ^28.1.0 - jest-worker: ^28.1.0 + jest-docblock: ^28.1.1 + jest-environment-node: ^28.1.3 + jest-haste-map: ^28.1.3 + jest-leak-detector: ^28.1.3 + jest-message-util: ^28.1.3 + jest-resolve: ^28.1.3 + jest-runtime: ^28.1.3 + jest-util: ^28.1.3 + jest-watcher: ^28.1.3 + jest-worker: ^28.1.3 + p-limit: ^3.1.0 source-map-support: 0.5.13 - throat: ^6.0.1 - checksum: 79f622a06e7b4f065b6ad14633ddb3ebabdacc479d4059a17bad4470570f941623957701cf08a3efe49c0cf04f78830fc07270ad8ad759b623a9de1bcb93c45f + checksum: 32405cd970fa6b11e039192dae699fd1bcc6f61f67d50605af81d193f24dd4373b25f5fcc1c571a028ec1b02174e8a4b6d0d608772063fb06f08a5105693533b languageName: node linkType: hard @@ -23405,6 +23728,37 @@ __metadata: languageName: node linkType: hard +"jest-snapshot@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-snapshot@npm:28.1.3" + dependencies: + "@babel/core": ^7.11.6 + "@babel/generator": ^7.7.2 + "@babel/plugin-syntax-typescript": ^7.7.2 + "@babel/traverse": ^7.7.2 + "@babel/types": ^7.3.3 + "@jest/expect-utils": ^28.1.3 + "@jest/transform": ^28.1.3 + "@jest/types": ^28.1.3 + "@types/babel__traverse": ^7.0.6 + "@types/prettier": ^2.1.5 + babel-preset-current-node-syntax: ^1.0.0 + chalk: ^4.0.0 + expect: ^28.1.3 + graceful-fs: ^4.2.9 + jest-diff: ^28.1.3 + jest-get-type: ^28.0.2 + jest-haste-map: ^28.1.3 + jest-matcher-utils: ^28.1.3 + jest-message-util: ^28.1.3 + jest-util: ^28.1.3 + natural-compare: ^1.4.0 + pretty-format: ^28.1.3 + semver: ^7.3.5 + checksum: 2a46a5493f1fb50b0a236a21f25045e7f46a244f9f3ae37ef4fbcd40249d0d68bb20c950ce77439e4e2cac985b05c3061c90b34739bf6069913a1199c8c716e1 + languageName: node + linkType: hard + "jest-util@npm:^26.6.2": version: 26.6.2 resolution: "jest-util@npm:26.6.2" @@ -23447,6 +23801,20 @@ __metadata: languageName: node linkType: hard +"jest-util@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-util@npm:28.1.3" + dependencies: + "@jest/types": ^28.1.3 + "@types/node": "*" + chalk: ^4.0.0 + ci-info: ^3.2.0 + graceful-fs: ^4.2.9 + picomatch: ^2.2.3 + checksum: fd6459742c941f070223f25e38a2ac0719aad92561591e9fb2a50d602a5d19d754750b79b4074327a42b00055662b95da3b006542ceb8b54309da44d4a62e721 + languageName: node + linkType: hard + "jest-validate@npm:^26.5.2": version: 26.6.2 resolution: "jest-validate@npm:26.6.2" @@ -23475,6 +23843,20 @@ __metadata: languageName: node linkType: hard +"jest-validate@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-validate@npm:28.1.3" + dependencies: + "@jest/types": ^28.1.3 + camelcase: ^6.2.0 + chalk: ^4.0.0 + jest-get-type: ^28.0.2 + leven: ^3.1.0 + pretty-format: ^28.1.3 + checksum: 95e0513b3803c3372a145cda86edbdb33d9dfeaa18818176f2d581e821548ceac9a179f065b6d4671a941de211354efd67f1fff8789a4fb89962565c85f646db + languageName: node + linkType: hard + "jest-watch-select-projects@npm:^2.0.0": version: 2.0.0 resolution: "jest-watch-select-projects@npm:2.0.0" @@ -23518,23 +23900,23 @@ __metadata: languageName: node linkType: hard -"jest-watcher@npm:^28.1.0": - version: 28.1.0 - resolution: "jest-watcher@npm:28.1.0" +"jest-watcher@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-watcher@npm:28.1.3" dependencies: - "@jest/test-result": ^28.1.0 - "@jest/types": ^28.1.0 + "@jest/test-result": ^28.1.3 + "@jest/types": ^28.1.3 "@types/node": "*" ansi-escapes: ^4.2.1 chalk: ^4.0.0 emittery: ^0.10.2 - jest-util: ^28.1.0 + jest-util: ^28.1.3 string-length: ^4.0.1 - checksum: 4a1ae2e1adf933cfa963b0f82cb4fecd863f1b980b7db05dfd856e83637b9380a4476a73dcbe50a70cb49d028999fae0d1bb60d75b410a682d8b3f344a073dda + checksum: 8f6d674a4865e7df251f71544f1b51f06fd36b5a3a61f2ac81aeb81fa2a196be354fba51d0f97911c88f67cd254583b3a22ee124bf2c5b6ee2fadec27356c207 languageName: node linkType: hard -"jest-worker@npm:^26.0.0, jest-worker@npm:^26.2.1, jest-worker@npm:^26.5.0, jest-worker@npm:^26.6.2": +"jest-worker@npm:^26.2.1, jest-worker@npm:^26.5.0, jest-worker@npm:^26.6.2": version: 26.6.2 resolution: "jest-worker@npm:26.6.2" dependencies: @@ -23545,7 +23927,7 @@ __metadata: languageName: node linkType: hard -"jest-worker@npm:^27.4.5, jest-worker@npm:^27.5.1": +"jest-worker@npm:^27.2.0, jest-worker@npm:^27.4.5, jest-worker@npm:^27.5.1": version: 27.5.1 resolution: "jest-worker@npm:27.5.1" dependencies: @@ -23567,13 +23949,25 @@ __metadata: languageName: node linkType: hard -"jest@npm:^28.0.3": - version: 28.1.0 - resolution: "jest@npm:28.1.0" +"jest-worker@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-worker@npm:28.1.3" dependencies: - "@jest/core": ^28.1.0 + "@types/node": "*" + merge-stream: ^2.0.0 + supports-color: ^8.0.0 + checksum: e921c9a1b8f0909da9ea07dbf3592f95b653aef3a8bb0cbcd20fc7f9a795a1304adecac31eecb308992c167e8d7e75c522061fec38a5928ace0f9571c90169ca + languageName: node + linkType: hard + +"jest@npm:^28.1.3": + version: 28.1.3 + resolution: "jest@npm:28.1.3" + dependencies: + "@jest/core": ^28.1.3 + "@jest/types": ^28.1.3 import-local: ^3.0.2 - jest-cli: ^28.1.0 + jest-cli: ^28.1.3 peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 peerDependenciesMeta: @@ -23581,7 +23975,7 @@ __metadata: optional: true bin: jest: bin/jest.js - checksum: f025164c408cf5ddb6e74dac1e8cbaf94c1c31dd1c67aba4ceee5989b2d8a77886db8ed1fb88853b45cf194b14cd802b454bbbe6b278a1e2140250297dc100d3 + checksum: b9dcb542eb7c16261c281cdc2bf37155dbb3f1205bae0b567f05051db362c85ddd4b765f126591efb88f6d298eb10336d0aa6c7d5373b4d53f918137a9a70182 languageName: node linkType: hard @@ -25121,6 +25515,13 @@ __metadata: languageName: node linkType: hard +"memoize-one@npm:^5.0.0": + version: 5.2.1 + resolution: "memoize-one@npm:5.2.1" + checksum: a3cba7b824ebcf24cdfcd234aa7f86f3ad6394b8d9be4c96ff756dafb8b51c7f71320785fbc2304f1af48a0467cbbd2a409efc9333025700ed523f254cb52e3d + languageName: node + linkType: hard + "memoizerific@npm:^1.11.3": version: 1.11.3 resolution: "memoizerific@npm:1.11.3" @@ -25244,71 +25645,70 @@ __metadata: languageName: node linkType: hard -"metro-babel-transformer@npm:0.67.0": - version: 0.67.0 - resolution: "metro-babel-transformer@npm:0.67.0" +"metro-babel-transformer@npm:0.70.3": + version: 0.70.3 + resolution: "metro-babel-transformer@npm:0.70.3" dependencies: "@babel/core": ^7.14.0 - hermes-parser: 0.5.0 - metro-source-map: 0.67.0 + hermes-parser: 0.6.0 + metro-source-map: 0.70.3 nullthrows: ^1.1.1 - checksum: f2029702c8c5f901c72ee9db47a93e4bbe188bc019051756b7a1b5c8c754c575e8727801fc058218f329dbae6a2fab9498b6bc10972433b6fe68a1aafebe1504 + checksum: 9bb4d9c9f571db110548e3662c5b061adfa1805f10c477392859bbab1da3cc6481784859e74c5ba013d48054b44c93762386375c523a72b711f3a255060a5761 languageName: node linkType: hard -"metro-cache-key@npm:0.67.0": - version: 0.67.0 - resolution: "metro-cache-key@npm:0.67.0" - checksum: 13b23f2e1a413b7a79d6f48fb739e92ba1b457c77eba14f65f6bcd1caf1832f314b319e4d690bd6bf9de94c896427b44d5da6e65ab1cde71d07306e00888e014 +"metro-cache-key@npm:0.70.3": + version: 0.70.3 + resolution: "metro-cache-key@npm:0.70.3" + checksum: 353548210ef16335840a4a00fa042f2ec053db49e1d603c13744237850b3b6da8e2cd1ed7b207d59228e55c5f2ca3d2fdd168de931ee09216b203fc8aee02ffd languageName: node linkType: hard -"metro-cache@npm:0.67.0": - version: 0.67.0 - resolution: "metro-cache@npm:0.67.0" +"metro-cache@npm:0.70.3": + version: 0.70.3 + resolution: "metro-cache@npm:0.70.3" dependencies: - metro-core: 0.67.0 - mkdirp: ^0.5.1 + metro-core: 0.70.3 rimraf: ^2.5.4 - checksum: 4d9fba435d3adbe0c4c883ef0361d41acf427ba57e74daa52f55d66bbb564e907c9ceec40c98fac792217e9d1efbc91e1531ec8db907165274c524e30a0dfcde + checksum: b2675346d4c08feffe4e30092cb0ff1361eb0ed62b7c26d1e386b86f387eb6a9c0743373d56bbad9eee6a7eccbcebf80d0193cf56b2fcd08a868d37594d9994d languageName: node linkType: hard -"metro-config@npm:0.67.0, metro-config@npm:^0.67.0": - version: 0.67.0 - resolution: "metro-config@npm:0.67.0" +"metro-config@npm:0.70.3, metro-config@npm:^0.70.1": + version: 0.70.3 + resolution: "metro-config@npm:0.70.3" dependencies: cosmiconfig: ^5.0.5 jest-validate: ^26.5.2 - metro: 0.67.0 - metro-cache: 0.67.0 - metro-core: 0.67.0 - metro-runtime: 0.67.0 - checksum: 0e8685e52f22470251fd3d56f9f71dae4dab266bc7393feebd97fb9513311d2b18c04fd019c13ad30aafe472e5515b31b2373caddd51e2cc7109d1156345aa1a + metro: 0.70.3 + metro-cache: 0.70.3 + metro-core: 0.70.3 + metro-runtime: 0.70.3 + checksum: f4eeb78fd29a09400d5a23c94227c3c168079aaa81231d6bd0f4b4724cec22281c1e5a962851596a1c75de44f14fec28e2840c39afe8288667b120686019d788 languageName: node linkType: hard -"metro-core@npm:0.67.0, metro-core@npm:^0.67.0": - version: 0.67.0 - resolution: "metro-core@npm:0.67.0" +"metro-core@npm:0.70.3, metro-core@npm:^0.70.1": + version: 0.70.3 + resolution: "metro-core@npm:0.70.3" dependencies: jest-haste-map: ^27.3.1 lodash.throttle: ^4.1.1 - metro-resolver: 0.67.0 - checksum: c3183ad2950f6e796675cb52fe7d0228f6147da617f15d43baa9362a73c3cf33b108b0084d7956a6541129599cf16ea8e68b693742df21adae45a75fd0fd5f98 + metro-resolver: 0.70.3 + checksum: a49fbfdca3bbd43ee01e6557a695b747c20037291eff3cba9f633c738cd115814143a9578dbc869e1dc7b6b257dbb43672531aee8562222863e0651dba7988e1 languageName: node linkType: hard -"metro-hermes-compiler@npm:0.67.0": - version: 0.67.0 - resolution: "metro-hermes-compiler@npm:0.67.0" - checksum: 02926d5ae44f08cfec7a80d8b23c7096a44e65e5d400e6123517efffff14b5e547a25394914b7478aedb22994b317d7a3091e659089fd182b92e5afec740bd4b +"metro-hermes-compiler@npm:0.70.3": + version: 0.70.3 + resolution: "metro-hermes-compiler@npm:0.70.3" + checksum: c7026a6e86ef53037e6b8b12eb67ac44aca883054dbe03dbdc79d7593ca9ba1a31ebee2f5971073e01666e8d9e63e05383e45b4801cd825ac24056086576067b languageName: node linkType: hard -"metro-inspector-proxy@npm:0.67.0": - version: 0.67.0 - resolution: "metro-inspector-proxy@npm:0.67.0" +"metro-inspector-proxy@npm:0.70.3": + version: 0.70.3 + resolution: "metro-inspector-proxy@npm:0.70.3" dependencies: connect: ^3.6.5 debug: ^2.2.0 @@ -25316,29 +25716,78 @@ __metadata: yargs: ^15.3.1 bin: metro-inspector-proxy: src/cli.js - checksum: db75ae358bf061d7a19b84a8833b8f7d9fedfa559568c1010953d2c681ac549baa767a4665f11e0a1994e8c964197538ceafe19d0fc5e97f855a23c778edaaeb + checksum: 71b183f2f8157acfee3106faf87d40639cc58fc5920d0e0fa7eca056009b9323a4f5a13b1cd54b2a6596c75099c5cba433cc85abb488e4194b81add5b03ebc93 languageName: node linkType: hard -"metro-minify-esbuild@npm:^0.1.0": - version: 0.1.0 - resolution: "metro-minify-esbuild@npm:0.1.0" +"metro-minify-esbuild@npm:^0.2.0": + version: 0.2.0 + resolution: "metro-minify-esbuild@npm:0.2.0" peerDependencies: esbuild: ^0.12.22 - checksum: c6111586c8bbb2f3e92b165cd22a0be3e874b8f1a2acc363006b5e3b270034b89f548088a0aa45a267c244e1817895235523dae18ed8a6066f3b5c2226938de1 + checksum: b6edda6fe608b2cf80537a4bf4da6abf0dd5a9e436ad6ee6c0719fc98afb25c390e2c739b526724f0be04a0a87af2822d041afd2ea5ef0cacf42c6f5478baee0 languageName: node linkType: hard -"metro-minify-uglify@npm:0.67.0": - version: 0.67.0 - resolution: "metro-minify-uglify@npm:0.67.0" +"metro-minify-uglify@npm:0.70.3": + version: 0.70.3 + resolution: "metro-minify-uglify@npm:0.70.3" dependencies: uglify-es: ^3.1.9 - checksum: e0d4c7bbcaedf210d4b7379cf158818a1311c65b2518599d34d374e6fd090f47e3c55bf31a018380685db8a4570e272fb57627dd0961915ab71fb08fd13dfd29 + checksum: 27f823f89c2653501c9b06e7c755bf46907541b201d691b86e1ed3171f2e398b5e25598d24079027b43012409e59919df959f7e73601e8132daf78b04d6db781 languageName: node linkType: hard -"metro-react-native-babel-preset@npm:0.67.0, metro-react-native-babel-preset@npm:~0.67.0": +"metro-react-native-babel-preset@npm:0.70.3": + version: 0.70.3 + resolution: "metro-react-native-babel-preset@npm:0.70.3" + dependencies: + "@babel/core": ^7.14.0 + "@babel/plugin-proposal-async-generator-functions": ^7.0.0 + "@babel/plugin-proposal-class-properties": ^7.0.0 + "@babel/plugin-proposal-export-default-from": ^7.0.0 + "@babel/plugin-proposal-nullish-coalescing-operator": ^7.0.0 + "@babel/plugin-proposal-object-rest-spread": ^7.0.0 + "@babel/plugin-proposal-optional-catch-binding": ^7.0.0 + "@babel/plugin-proposal-optional-chaining": ^7.0.0 + "@babel/plugin-syntax-dynamic-import": ^7.0.0 + "@babel/plugin-syntax-export-default-from": ^7.0.0 + "@babel/plugin-syntax-flow": ^7.2.0 + "@babel/plugin-syntax-nullish-coalescing-operator": ^7.0.0 + "@babel/plugin-syntax-optional-chaining": ^7.0.0 + "@babel/plugin-transform-arrow-functions": ^7.0.0 + "@babel/plugin-transform-async-to-generator": ^7.0.0 + "@babel/plugin-transform-block-scoping": ^7.0.0 + "@babel/plugin-transform-classes": ^7.0.0 + "@babel/plugin-transform-computed-properties": ^7.0.0 + "@babel/plugin-transform-destructuring": ^7.0.0 + "@babel/plugin-transform-exponentiation-operator": ^7.0.0 + "@babel/plugin-transform-flow-strip-types": ^7.0.0 + "@babel/plugin-transform-function-name": ^7.0.0 + "@babel/plugin-transform-literals": ^7.0.0 + "@babel/plugin-transform-modules-commonjs": ^7.0.0 + "@babel/plugin-transform-named-capturing-groups-regex": ^7.0.0 + "@babel/plugin-transform-parameters": ^7.0.0 + "@babel/plugin-transform-react-display-name": ^7.0.0 + "@babel/plugin-transform-react-jsx": ^7.0.0 + "@babel/plugin-transform-react-jsx-self": ^7.0.0 + "@babel/plugin-transform-react-jsx-source": ^7.0.0 + "@babel/plugin-transform-runtime": ^7.0.0 + "@babel/plugin-transform-shorthand-properties": ^7.0.0 + "@babel/plugin-transform-spread": ^7.0.0 + "@babel/plugin-transform-sticky-regex": ^7.0.0 + "@babel/plugin-transform-template-literals": ^7.0.0 + "@babel/plugin-transform-typescript": ^7.5.0 + "@babel/plugin-transform-unicode-regex": ^7.0.0 + "@babel/template": ^7.0.0 + react-refresh: ^0.4.0 + peerDependencies: + "@babel/core": "*" + checksum: 9abd3d811ad49f5e14c5ac5a62635fffbe5c3a19f0465eb1b8ad2ad2a065f709004d14d892a2d3a336de2c559ba2ef9eb5ef56401bf9718e2a02e7f89eebd227 + languageName: node + linkType: hard + +"metro-react-native-babel-preset@npm:~0.67.0": version: 0.67.0 resolution: "metro-react-native-babel-preset@npm:0.67.0" dependencies: @@ -25388,108 +25837,110 @@ __metadata: languageName: node linkType: hard -"metro-react-native-babel-transformer@npm:0.67.0, metro-react-native-babel-transformer@npm:^0.67.0": - version: 0.67.0 - resolution: "metro-react-native-babel-transformer@npm:0.67.0" +"metro-react-native-babel-transformer@npm:0.70.3, metro-react-native-babel-transformer@npm:^0.70.1": + version: 0.70.3 + resolution: "metro-react-native-babel-transformer@npm:0.70.3" dependencies: "@babel/core": ^7.14.0 babel-preset-fbjs: ^3.4.0 - hermes-parser: 0.5.0 - metro-babel-transformer: 0.67.0 - metro-react-native-babel-preset: 0.67.0 - metro-source-map: 0.67.0 + hermes-parser: 0.6.0 + metro-babel-transformer: 0.70.3 + metro-react-native-babel-preset: 0.70.3 + metro-source-map: 0.70.3 nullthrows: ^1.1.1 peerDependencies: "@babel/core": "*" - checksum: ff08b2f187a17bfed46170909d106ec042db52ad75e5facfbec8a7d8068c95b8e53c9ec28b6704f0809f9a338550d017e3e3596ef3f1373e8e7fcf1b3cd5233f + checksum: 454ece281e40816905eefbc3987af76ff1d96bc18a78badbcd1601603564fdf2bdcaefbcb5118127f1bd2999ad7a869fec782da368b4a99dbaf2ecc57447704a languageName: node linkType: hard -"metro-resolver@npm:0.67.0, metro-resolver@npm:^0.67.0": - version: 0.67.0 - resolution: "metro-resolver@npm:0.67.0" +"metro-resolver@npm:0.70.3, metro-resolver@npm:^0.70.1": + version: 0.70.3 + resolution: "metro-resolver@npm:0.70.3" dependencies: absolute-path: ^0.0.0 - checksum: 967896f26c58071720effbf310352f8c89a3279c822c8303e2bdcc07ad7fb7e39e19afcb9ae8ec47f39573b47c4217fb9afbc14636d5345528b6d410b08c0f2f + checksum: 863a9bcd26429557b5f60eb1e774e65618e77291fc2bf6151681156c1d0b5ab664ffd0daca7aec06bfd853b9b7d838861b12eb282561994422fa651c9f379367 languageName: node linkType: hard -"metro-runtime@npm:0.67.0, metro-runtime@npm:^0.67.0": - version: 0.67.0 - resolution: "metro-runtime@npm:0.67.0" - checksum: 06be8635277d594b17009d9b35bbd9cb65dd44980a0a87739e49801a6b6dae73109825ddd94e1a8195520b3fa41507d151b7b7f8a484cf61164e155bfdbb091b +"metro-runtime@npm:0.70.3, metro-runtime@npm:^0.70.1": + version: 0.70.3 + resolution: "metro-runtime@npm:0.70.3" + dependencies: + "@babel/runtime": ^7.0.0 + checksum: 88641e298ee50825b22326e5c32cbce95b1b4acd9a1c22dd0fc1135a473a3ee8aa9c4d4843b68787ba5db792370a4f4c404eb3077e172ea0bbb7aecf02402b57 languageName: node linkType: hard -"metro-source-map@npm:0.67.0": - version: 0.67.0 - resolution: "metro-source-map@npm:0.67.0" +"metro-source-map@npm:0.70.3": + version: 0.70.3 + resolution: "metro-source-map@npm:0.70.3" dependencies: "@babel/traverse": ^7.14.0 "@babel/types": ^7.0.0 invariant: ^2.2.4 - metro-symbolicate: 0.67.0 + metro-symbolicate: 0.70.3 nullthrows: ^1.1.1 - ob1: 0.67.0 + ob1: 0.70.3 source-map: ^0.5.6 vlq: ^1.0.0 - checksum: 87ae604d292c1694966cb755579aa3a0185b9b657590a2996a4184fe3cd164eedf43491b3a3369a2bdf846124f821d96a87e4a8eab0a8d133d5f04d00ba354f6 + checksum: 3ccf4864ec5644762d691ba7964ab9c7a30a33e91504b893169a3b0e51d8cf00c9269388ff13230703bd40f935be76158ab84e9b7b6b28895329338905d2af85 languageName: node linkType: hard -"metro-symbolicate@npm:0.67.0": - version: 0.67.0 - resolution: "metro-symbolicate@npm:0.67.0" +"metro-symbolicate@npm:0.70.3": + version: 0.70.3 + resolution: "metro-symbolicate@npm:0.70.3" dependencies: invariant: ^2.2.4 - metro-source-map: 0.67.0 + metro-source-map: 0.70.3 nullthrows: ^1.1.1 source-map: ^0.5.6 through2: ^2.0.1 vlq: ^1.0.0 bin: metro-symbolicate: src/index.js - checksum: 4a2bbbcf6a166473003151c2e62255a7a3e0ba0043134c303418b21fc9cf6cf362c2b5a249f533dceb94a88642805bd771c2062bc5ae8cb3a53cf11809041128 + checksum: 6fd827a416ee640f9ef1f07f9601109f49dd73aa4b86592d72fc4d8b0e88a766e54eef710454b10b226bc893f31339b7d4502d995e6c9c28bb328dd5a871127e languageName: node linkType: hard -"metro-transform-plugins@npm:0.67.0": - version: 0.67.0 - resolution: "metro-transform-plugins@npm:0.67.0" +"metro-transform-plugins@npm:0.70.3": + version: 0.70.3 + resolution: "metro-transform-plugins@npm:0.70.3" dependencies: "@babel/core": ^7.14.0 "@babel/generator": ^7.14.0 "@babel/template": ^7.0.0 "@babel/traverse": ^7.14.0 nullthrows: ^1.1.1 - checksum: 79e468e5ba0965181f56777d998ebdfcc2792c33d8b25d5a180022e62fc3e3585050bfc82bb3b238bc778baef8ad37d1083da620b68f02240597ce73ec4efff5 + checksum: d3e8309618a5bd6a3c3867e033697efb6e9b34741b74feaa9afa86b9cbfed1236ff4923b611de0177023a37337678fc559d6672982c3fad43c71e6ce50a6f207 languageName: node linkType: hard -"metro-transform-worker@npm:0.67.0": - version: 0.67.0 - resolution: "metro-transform-worker@npm:0.67.0" +"metro-transform-worker@npm:0.70.3": + version: 0.70.3 + resolution: "metro-transform-worker@npm:0.70.3" dependencies: "@babel/core": ^7.14.0 "@babel/generator": ^7.14.0 "@babel/parser": ^7.14.0 "@babel/types": ^7.0.0 babel-preset-fbjs: ^3.4.0 - metro: 0.67.0 - metro-babel-transformer: 0.67.0 - metro-cache: 0.67.0 - metro-cache-key: 0.67.0 - metro-hermes-compiler: 0.67.0 - metro-source-map: 0.67.0 - metro-transform-plugins: 0.67.0 + metro: 0.70.3 + metro-babel-transformer: 0.70.3 + metro-cache: 0.70.3 + metro-cache-key: 0.70.3 + metro-hermes-compiler: 0.70.3 + metro-source-map: 0.70.3 + metro-transform-plugins: 0.70.3 nullthrows: ^1.1.1 - checksum: 114ecd11b9945c3bf0171c2dc725bc3676a14604740d15ee8e862cd903706743407b0592ffe1b3fd53946947bcf8d00f015f823343ee1eeb843ce63e514466c6 + checksum: 514eba1a994b2bad69f81dee48078693ab99e6885d8a8782b818629f33e9d3f5e35e75285dc7a2a0d3fdba1ff79d2577a43032425974452fa6e8dd1878101da4 languageName: node linkType: hard -"metro@npm:0.67.0, metro@npm:^0.67.0": - version: 0.67.0 - resolution: "metro@npm:0.67.0" +"metro@npm:0.70.3, metro@npm:^0.70.1": + version: 0.70.3 + resolution: "metro@npm:0.70.3" dependencies: "@babel/code-frame": ^7.0.0 "@babel/core": ^7.14.0 @@ -25500,7 +25951,7 @@ __metadata: "@babel/types": ^7.0.0 absolute-path: ^0.0.0 accepts: ^1.3.7 - async: ^2.4.0 + async: ^3.2.2 chalk: ^4.0.0 ci-info: ^2.0.0 connect: ^3.6.5 @@ -25508,30 +25959,29 @@ __metadata: denodeify: ^1.2.1 error-stack-parser: ^2.0.6 fs-extra: ^1.0.0 - graceful-fs: ^4.1.3 - hermes-parser: 0.5.0 + graceful-fs: ^4.2.4 + hermes-parser: 0.6.0 image-size: ^0.6.0 invariant: ^2.2.4 jest-haste-map: ^27.3.1 - jest-worker: ^26.0.0 + jest-worker: ^27.2.0 lodash.throttle: ^4.1.1 - metro-babel-transformer: 0.67.0 - metro-cache: 0.67.0 - metro-cache-key: 0.67.0 - metro-config: 0.67.0 - metro-core: 0.67.0 - metro-hermes-compiler: 0.67.0 - metro-inspector-proxy: 0.67.0 - metro-minify-uglify: 0.67.0 - metro-react-native-babel-preset: 0.67.0 - metro-resolver: 0.67.0 - metro-runtime: 0.67.0 - metro-source-map: 0.67.0 - metro-symbolicate: 0.67.0 - metro-transform-plugins: 0.67.0 - metro-transform-worker: 0.67.0 + metro-babel-transformer: 0.70.3 + metro-cache: 0.70.3 + metro-cache-key: 0.70.3 + metro-config: 0.70.3 + metro-core: 0.70.3 + metro-hermes-compiler: 0.70.3 + metro-inspector-proxy: 0.70.3 + metro-minify-uglify: 0.70.3 + metro-react-native-babel-preset: 0.70.3 + metro-resolver: 0.70.3 + metro-runtime: 0.70.3 + metro-source-map: 0.70.3 + metro-symbolicate: 0.70.3 + metro-transform-plugins: 0.70.3 + metro-transform-worker: 0.70.3 mime-types: ^2.1.27 - mkdirp: ^0.5.1 node-fetch: ^2.2.0 nullthrows: ^1.1.1 rimraf: ^2.5.4 @@ -25544,7 +25994,7 @@ __metadata: yargs: ^15.3.1 bin: metro: src/cli.js - checksum: f106dd7f56380f734ae0d71afcee068b18774196889a6909963fd82b4c0db5508915735bc5be8027150ccea3b5bed5d286fdda41d0458ba3d156d8db29841fce + checksum: 6fb5a543d52b469edb0baa245b001b735dfb1afe673dd7cdd8853b942007e2d0445b5e5952132e7f1c4d144fb9a79408abe52cc9894844b905b94af4b5a56260 languageName: node linkType: hard @@ -26266,10 +26716,10 @@ __metadata: languageName: node linkType: hard -"nocache@npm:^2.1.0": - version: 2.1.0 - resolution: "nocache@npm:2.1.0" - checksum: 702ad516a7f8b21364c3e9b6ed982b0dfbcbdad9c28ed35331c4025025c729eb9d93523c3370947c5c8391ae33c6f69b67e35ef301d0e9424cee84f0b1d015c2 +"nocache@npm:^3.0.1": + version: 3.0.4 + resolution: "nocache@npm:3.0.4" + checksum: 6be9ee67eb561ecedc56d805c024c0fda55b9836ecba659c720073b067929aa4fe04bb7121480e004c9cf52989e62d8720f29a7fe0269f1a4941221a1e4be1c2 languageName: node linkType: hard @@ -26731,10 +27181,10 @@ __metadata: languageName: node linkType: hard -"ob1@npm:0.67.0": - version: 0.67.0 - resolution: "ob1@npm:0.67.0" - checksum: 02910732e1094dd164d6dfa674250bc404503c8a85fa60b15399f9059006329d7b1bad2cb0bca1841bcf4c2c1759d91297485361523d21066984a9130f3f3b65 +"ob1@npm:0.70.3": + version: 0.70.3 + resolution: "ob1@npm:0.70.3" + checksum: 50531606767e07cc53d7a4af1070e380789b23c543773fae34952ba7f1885762fdb241c2031310aca6b24c1181db16698f4428a5621de7e705e9492d0e748049 languageName: node linkType: hard @@ -27097,7 +27547,7 @@ __metadata: languageName: node linkType: hard -"ora@npm:3.4.0, ora@npm:^3.4.0": +"ora@npm:3.4.0": version: 3.4.0 resolution: "ora@npm:3.4.0" dependencies: @@ -27257,7 +27707,7 @@ __metadata: languageName: node linkType: hard -"p-limit@npm:^3.0.2": +"p-limit@npm:^3.0.2, p-limit@npm:^3.1.0": version: 3.1.0 resolution: "p-limit@npm:3.1.0" dependencies: @@ -28757,6 +29207,18 @@ __metadata: languageName: node linkType: hard +"pretty-format@npm:^28.1.3": + version: 28.1.3 + resolution: "pretty-format@npm:28.1.3" + dependencies: + "@jest/schemas": ^28.1.3 + ansi-regex: ^5.0.1 + ansi-styles: ^5.0.0 + react-is: ^18.0.0 + checksum: e69f857358a3e03d271252d7524bec758c35e44680287f36c1cb905187fbc82da9981a6eb07edfd8a03bc3cbeebfa6f5234c13a3d5b59f2bbdf9b4c4053e0a7f + languageName: node + linkType: hard + "pretty-hrtime@npm:^1.0.3": version: 1.0.3 resolution: "pretty-hrtime@npm:1.0.3" @@ -28907,7 +29369,16 @@ __metadata: languageName: node linkType: hard -"prop-types@npm:*, prop-types@npm:^15.0.0, prop-types@npm:^15.5.10, prop-types@npm:^15.6.0, prop-types@npm:^15.6.1, prop-types@npm:^15.6.2, prop-types@npm:^15.7.2, prop-types@npm:^15.8.1": +"prop-types@npm:15.5.8": + version: 15.5.8 + resolution: "prop-types@npm:15.5.8" + dependencies: + fbjs: ^0.8.9 + checksum: b64fcb5770c665e66e57663940864425529ea2b8c7821fb86068d1879d7b2c85778948b9a1294912e0d58f55075d1f3e19f44ae4fd5f5cd988c3bf833fa3e1f6 + languageName: node + linkType: hard + +"prop-types@npm:^15.0.0, prop-types@npm:^15.5.10, prop-types@npm:^15.6.0, prop-types@npm:^15.6.1, prop-types@npm:^15.6.2, prop-types@npm:^15.7.2, prop-types@npm:^15.8.1": version: 15.8.1 resolution: "prop-types@npm:15.8.1" dependencies: @@ -28918,15 +29389,6 @@ __metadata: languageName: node linkType: hard -"prop-types@npm:15.5.8": - version: 15.5.8 - resolution: "prop-types@npm:15.5.8" - dependencies: - fbjs: ^0.8.9 - checksum: b64fcb5770c665e66e57663940864425529ea2b8c7821fb86068d1879d7b2c85778948b9a1294912e0d58f55075d1f3e19f44ae4fd5f5cd988c3bf833fa3e1f6 - languageName: node - linkType: hard - "proper-lockfile@npm:^3.0.2": version: 3.2.0 resolution: "proper-lockfile@npm:3.2.0" @@ -29422,13 +29884,13 @@ __metadata: languageName: node linkType: hard -"react-devtools-core@npm:^4.23.0": - version: 4.24.6 - resolution: "react-devtools-core@npm:4.24.6" +"react-devtools-core@npm:4.24.0": + version: 4.24.0 + resolution: "react-devtools-core@npm:4.24.0" dependencies: shell-quote: ^1.6.1 ws: ^7 - checksum: 1c4ac2186de57c75755cb3ee2db884e49df9fb6bb4b4a718379f3d4ed5be4f17bc7a9a4175f0e249f5f91520b59703505f5e3fb155cf4d428c89b96255091e4d + checksum: c9e21ff2621447a6de51d4a350f3859e8077634f8be327f006d8da73dba349e78432ef910e432f066c615938fed697231ed3daee8f9eae049004c14ebac85625 languageName: node linkType: hard @@ -29582,6 +30044,13 @@ __metadata: languageName: node linkType: hard +"react-is@npm:^18.2.0": + version: 18.2.0 + resolution: "react-is@npm:18.2.0" + checksum: e72d0ba81b5922759e4aff17e0252bd29988f9642ed817f56b25a3e217e13eea8a7f2322af99a06edb779da12d5d636e9fda473d620df9a3da0df2a74141d53e + languageName: node + linkType: hard + "react-lifecycles-compat@npm:^3.0.4": version: 3.0.4 resolution: "react-lifecycles-compat@npm:3.0.4" @@ -29616,15 +30085,15 @@ __metadata: languageName: node linkType: hard -"react-native-codegen@npm:^0.0.17": - version: 0.0.17 - resolution: "react-native-codegen@npm:0.0.17" +"react-native-codegen@npm:^0.69.1": + version: 0.69.1 + resolution: "react-native-codegen@npm:0.69.1" dependencies: "@babel/parser": ^7.14.0 flow-parser: ^0.121.0 jscodeshift: ^0.13.1 nullthrows: ^1.1.1 - checksum: 32ac7e77851df32fdafa6721c01e3bbfe4e42ca4b8e6d6e7e64b96200060629b3c0475bd7007de6db96b4c5edef1f6dd625fb7b77efa8f7fd1869c0777b064cc + checksum: 056acf384f9cc9b1e42e20e7295d0471e62dc1369fc65670cdb3d0a8960da701ee9da0c6b91c7dd7a531500c62c3ffd576cba461d3f5f1dcbfc76a3a6dbcb97a languageName: node linkType: hard @@ -29694,10 +30163,10 @@ __metadata: languageName: node linkType: hard -"react-native-gradle-plugin@npm:^0.0.6": - version: 0.0.6 - resolution: "react-native-gradle-plugin@npm:0.0.6" - checksum: 185ad348931ef4f58065b50bbf80558af668b1ef11c31067aab7f1cd85b18809a62fcf0b7a18444726dacd098042771a570c0ac76bb8976c3ccbe7c86cff0e11 +"react-native-gradle-plugin@npm:^0.0.7": + version: 0.0.7 + resolution: "react-native-gradle-plugin@npm:0.0.7" + checksum: 959ce3bcbc8362909210fae894e4b414a0afdff39fe1683463214b7feddae6beaf8584ebe62323b1e91ba31de00311e826588e0d807c93a949e445b1770cac27 languageName: node linkType: hard @@ -29961,13 +30430,13 @@ __metadata: languageName: node linkType: hard -"react-native-vision-camera@npm:2.12.0": - version: 2.12.0 - resolution: "react-native-vision-camera@npm:2.12.0" +"react-native-vision-camera@npm:2.14.0": + version: 2.14.0 + resolution: "react-native-vision-camera@npm:2.14.0" peerDependencies: react: "*" react-native: "*" - checksum: 4072231a1e550afcc15776df629ebdbf7281e5c1547a0ecba08b1af490fcd981c1d76c8e79a99a0e1c5fc98351707f724cc48a906f8711c4e2681514b9a06eb9 + checksum: b1efa53cee564658a6d27ef17c689124be4f745f1e0a5448d752ee0a387e9402ddc12203e778a1ef9fdac487eee08763a8478c1baa8b1f4ece28ee81a8073ef8 languageName: node linkType: hard @@ -29989,6 +30458,24 @@ __metadata: languageName: node linkType: hard +"react-native-web@npm:0.18.6": + version: 0.18.6 + resolution: "react-native-web@npm:0.18.6" + dependencies: + "@babel/runtime": ^7.18.6 + create-react-class: ^15.7.0 + fbjs: ^3.0.4 + inline-style-prefixer: ^6.0.1 + normalize-css-color: ^1.0.2 + postcss-value-parser: ^4.2.0 + styleq: ^0.1.2 + peerDependencies: + react: ^17.0.2 + react-dom: ^17.0.2 + checksum: 6d12e5cc69bc9350519840ba661fc0e66a55834e3e3e43bdb76295e23ef6421064e9dfe4d6921144eb071be3657e3646b218093d5d6baccde10e082c1f138838 + languageName: node + linkType: hard + "react-native-webview@npm:11.18.1": version: 11.18.1 resolution: "react-native-webview@npm:11.18.1" @@ -30002,47 +30489,48 @@ __metadata: languageName: node linkType: hard -"react-native@npm:0.68.2": - version: 0.68.2 - resolution: "react-native@npm:0.68.2" +"react-native@npm:0.69.1": + version: 0.69.1 + resolution: "react-native@npm:0.69.1" dependencies: "@jest/create-cache-key-function": ^27.0.1 - "@react-native-community/cli": ^7.0.3 - "@react-native-community/cli-platform-android": ^7.0.1 - "@react-native-community/cli-platform-ios": ^7.0.1 + "@react-native-community/cli": ^8.0.0 + "@react-native-community/cli-platform-android": ^8.0.0 + "@react-native-community/cli-platform-ios": ^8.0.0 "@react-native/assets": 1.0.0 "@react-native/normalize-color": 2.0.0 "@react-native/polyfills": 2.0.0 abort-controller: ^3.0.0 anser: ^1.4.9 base64-js: ^1.1.2 - deprecated-react-native-prop-types: ^2.3.0 event-target-shim: ^5.0.1 hermes-engine: ~0.11.0 invariant: ^2.2.4 jsc-android: ^250230.2.1 - metro-react-native-babel-transformer: 0.67.0 - metro-runtime: 0.67.0 - metro-source-map: 0.67.0 + memoize-one: ^5.0.0 + metro-react-native-babel-transformer: 0.70.3 + metro-runtime: 0.70.3 + metro-source-map: 0.70.3 + mkdirp: ^0.5.1 nullthrows: ^1.1.1 pretty-format: ^26.5.2 promise: ^8.0.3 - react-devtools-core: ^4.23.0 - react-native-codegen: ^0.0.17 - react-native-gradle-plugin: ^0.0.6 + react-devtools-core: 4.24.0 + react-native-codegen: ^0.69.1 + react-native-gradle-plugin: ^0.0.7 react-refresh: ^0.4.0 react-shallow-renderer: 16.14.1 regenerator-runtime: ^0.13.2 - scheduler: ^0.20.2 + scheduler: ^0.21.0 stacktrace-parser: ^0.1.3 - use-subscription: ">=1.0.0 <1.6.0" + use-sync-external-store: ^1.0.0 whatwg-fetch: ^3.0.0 ws: ^6.1.4 peerDependencies: - react: 17.0.2 + react: 18.0.0 bin: react-native: cli.js - checksum: a595e7c284041d0ea6439f476d4e34239212f6ca7863321d214494ac938c83a89ae8b79f86bda7c515be727ffec7403456f8f721fca7f8670cf1fa9bf19b0b1d + checksum: 6b5a3b70c4062209ad4d890735ff312161535a6daf816ebe9deb781d736d43c705f60bd8554a820addab416e277da815aa7032a3cc3fdd171b367bcd86a68733 languageName: node linkType: hard @@ -30094,19 +30582,6 @@ __metadata: languageName: node linkType: hard -"react-reconciler@npm:^0.26.2": - version: 0.26.2 - resolution: "react-reconciler@npm:0.26.2" - dependencies: - loose-envify: ^1.1.0 - object-assign: ^4.1.1 - scheduler: ^0.20.2 - peerDependencies: - react: ^17.0.2 - checksum: 2ebceace56f547f51eaf142becefef9cca980eae4f42d90ee5a966f54a375f5082d78b71b00c40bbd9bca69e0e0f698c7d4e81cc7373437caa19831fddc1d01b - languageName: node - linkType: hard - "react-reconciler@npm:^0.27.0": version: 0.27.0 resolution: "react-reconciler@npm:0.27.0" @@ -30239,7 +30714,7 @@ __metadata: languageName: node linkType: hard -"react-shallow-renderer@npm:^16.13.1": +"react-shallow-renderer@npm:^16.13.1, react-shallow-renderer@npm:^16.15.0": version: 16.15.0 resolution: "react-shallow-renderer@npm:16.15.0" dependencies: @@ -30352,16 +30827,16 @@ __metadata: languageName: node linkType: hard -"react-test-renderer@npm:18.0.0": - version: 18.0.0 - resolution: "react-test-renderer@npm:18.0.0" +"react-test-renderer@npm:18.2.0": + version: 18.2.0 + resolution: "react-test-renderer@npm:18.2.0" dependencies: - react-is: ^18.0.0 - react-shallow-renderer: ^16.13.1 - scheduler: ^0.21.0 + react-is: ^18.2.0 + react-shallow-renderer: ^16.15.0 + scheduler: ^0.23.0 peerDependencies: - react: ^18.0.0 - checksum: c0e5250fa2e4c3650e247b986c262631bec68f18c06817269ab7a4e2cffa5a152bb58ce0fe4182ffa8c333e6c2a8d763ac92e0928e5f6914a7aa188c2de1943a + react: ^18.2.0 + checksum: 6b6980ced93fa2b72662d5e4ab3b4896833586940047ce52ca9aca801e5432adf05fcbe28289b0af3ce6a2a7c590974e25dcc8aa43d0de658bfe8bbcd686f958 languageName: node linkType: hard @@ -30743,6 +31218,20 @@ __metadata: languageName: node linkType: hard +"regexpu-core@npm:^5.1.0": + version: 5.1.0 + resolution: "regexpu-core@npm:5.1.0" + dependencies: + regenerate: ^1.4.2 + regenerate-unicode-properties: ^10.0.1 + regjsgen: ^0.6.0 + regjsparser: ^0.8.2 + unicode-match-property-ecmascript: ^2.0.0 + unicode-match-property-value-ecmascript: ^2.0.0 + checksum: 7b4eb8d182d9d10537a220a93138df5bc7eaf4ed53e36b95e8427d33ed8a2b081468f1a15d3e5fcee66517e1df7f5ca180b999e046d060badd97150f2ffe87b2 + languageName: node + linkType: hard + "registry-auth-token@npm:3.3.2": version: 3.3.2 resolution: "registry-auth-token@npm:3.3.2" @@ -31512,7 +32001,7 @@ __metadata: languageName: node linkType: hard -"sax@npm:>=0.6.0, sax@npm:^1.2.1, sax@npm:^1.2.4, sax@npm:~1.2.4": +"sax@npm:>=0.6.0, sax@npm:^1.2.4, sax@npm:~1.2.4": version: 1.2.4 resolution: "sax@npm:1.2.4" checksum: d3df7d32b897a2c2f28e941f732c71ba90e27c24f62ee918bd4d9a8cfb3553f2f81e5493c7f0be94a11c1911b643a9108f231dd6f60df3fa9586b5d2e3e9e1fe @@ -31726,7 +32215,7 @@ __metadata: languageName: node linkType: hard -"send@npm:0.18.0": +"send@npm:0.18.0, send@npm:^0.18.0": version: 0.18.0 resolution: "send@npm:0.18.0" dependencies: @@ -31994,18 +32483,6 @@ __metadata: languageName: node linkType: hard -"shell-quote@npm:1.6.1": - version: 1.6.1 - resolution: "shell-quote@npm:1.6.1" - dependencies: - array-filter: ~0.0.0 - array-map: ~0.0.0 - array-reduce: ~0.0.0 - jsonify: ~0.0.0 - checksum: 982a4fdf2d474f0dc40885de4222f100ba457d7c75d46b532bf23b01774b8617bc62522c6825cb1fa7dd4c54c18e9dcbae7df2ca8983101841b6f2e6a7cacd2f - languageName: node - linkType: hard - "shell-quote@npm:1.7.2": version: 1.7.2 resolution: "shell-quote@npm:1.7.2" @@ -33169,6 +33646,13 @@ __metadata: languageName: node linkType: hard +"styleq@npm:^0.1.2": + version: 0.1.2 + resolution: "styleq@npm:0.1.2" + checksum: 050be47448efcb4abd778629ebe09f2db138e0b59504e8442e35432387d98bd696f0efe6962965c26eff5ee54a30ba4615806761b8f040a47874a62dd237e09f + languageName: node + linkType: hard + "subscribe-ui-event@npm:^2.0.6": version: 2.0.7 resolution: "subscribe-ui-event@npm:2.0.7" @@ -33796,10 +34280,10 @@ __metadata: languageName: node linkType: hard -"three@npm:^0.139.0": - version: 0.139.2 - resolution: "three@npm:0.139.2" - checksum: 9e016065b31a2a69bba730a32bd5b61354365bf0f5072121b8695aac38c9585e4e46361275967fbb58d21e001e5189128107c3ecbf24338ca951d11b524df992 +"three@npm:^0.142.0": + version: 0.142.0 + resolution: "three@npm:0.142.0" + checksum: b920987cab222bea5fd657a498f8203546c6b613cee01d2e1a355c7e044204bbff6ef051641b026743a6d3d5261a988c84285039a94e4c94a959f1b3789ac682 languageName: node linkType: hard @@ -33810,13 +34294,6 @@ __metadata: languageName: node linkType: hard -"throat@npm:^6.0.1": - version: 6.0.1 - resolution: "throat@npm:6.0.1" - checksum: 782d4171ee4e3cf947483ed2ff1af3e17cc4354c693b9d339284f61f99fbc401d171e0b0d2db3295bb7d447630333e9319c174ebd7ef315c6fb791db9675369c - languageName: node - linkType: hard - "throttle-debounce@npm:^3.0.1": version: 3.0.1 resolution: "throttle-debounce@npm:3.0.1" @@ -35100,17 +35577,6 @@ __metadata: languageName: node linkType: hard -"use-subscription@npm:>=1.0.0 <1.6.0": - version: 1.5.1 - resolution: "use-subscription@npm:1.5.1" - dependencies: - object-assign: ^4.1.1 - peerDependencies: - react: ^16.8.0 || ^17.0.0 - checksum: 96e64977a573244fd11350a3141b2cf57fb72dd9dd902f387c8a0a565d0a948bc81588bd7378c6ef6defc0d1119f37f73aac4a7a287c8443abd444bd4e7bbea8 - languageName: node - linkType: hard - "use-sync-external-store@npm:1.1.0": version: 1.1.0 resolution: "use-sync-external-store@npm:1.1.0" @@ -35120,7 +35586,7 @@ __metadata: languageName: node linkType: hard -"use-sync-external-store@npm:1.2.0, use-sync-external-store@npm:^1.1.0": +"use-sync-external-store@npm:1.2.0, use-sync-external-store@npm:^1.0.0, use-sync-external-store@npm:^1.1.0": version: 1.2.0 resolution: "use-sync-external-store@npm:1.2.0" peerDependencies: @@ -35354,6 +35820,17 @@ __metadata: languageName: node linkType: hard +"v8-to-istanbul@npm:^9.0.1": + version: 9.0.1 + resolution: "v8-to-istanbul@npm:9.0.1" + dependencies: + "@jridgewell/trace-mapping": ^0.3.12 + "@types/istanbul-lib-coverage": ^2.0.1 + convert-source-map: ^1.6.0 + checksum: a49c34bf0a3af0c11041a3952a2600913904a983bd1bc87148b5c033bc5c1d02d5a13620fcdbfa2c60bc582a2e2970185780f0c844b4c3a220abf405f8af6311 + languageName: node + linkType: hard + "valid-url@npm:~1.0.9": version: 1.0.9 resolution: "valid-url@npm:1.0.9" @@ -35464,7 +35941,7 @@ __metadata: languageName: node linkType: hard -"walker@npm:^1.0.7, walker@npm:~1.0.5": +"walker@npm:^1.0.7, walker@npm:^1.0.8, walker@npm:~1.0.5": version: 1.0.8 resolution: "walker@npm:1.0.8" dependencies: @@ -36524,14 +37001,14 @@ __metadata: languageName: node linkType: hard -"xdl@npm:59.2.42": - version: 59.2.42 - resolution: "xdl@npm:59.2.42" +"xdl@npm:59.2.44": + version: 59.2.44 + resolution: "xdl@npm:59.2.44" dependencies: "@expo/bunyan": 4.0.0 - "@expo/config": 6.0.24 + "@expo/config": 6.0.26 "@expo/config-plugins": 4.1.5 - "@expo/dev-server": 0.1.114 + "@expo/dev-server": 0.1.116 "@expo/devcert": ^1.0.0 "@expo/json-file": 8.2.36 "@expo/osascript": 2.0.33 @@ -36541,7 +37018,7 @@ __metadata: "@expo/schemer": 1.4.2 "@expo/sdk-runtime-versions": ^1.0.0 "@expo/spawn-async": 1.5.0 - "@expo/webpack-config": 0.16.25 + "@expo/webpack-config": 0.16.26 axios: 0.21.1 better-opn: ^3.0.1 boxen: ^5.0.1 @@ -36592,7 +37069,7 @@ __metadata: webpack: 4.43.0 webpack-dev-server: 3.11.0 wrap-ansi: ^7.0.0 - checksum: 0c164907a570259293aedbbde532363945f02218cdc8805fc27925bc594ca6a82abaff5911c7cfbb5a6ec8813509bf25755959d0e2954429b7f2edc8d48cb68f + checksum: ecb87cb90b87c38a28b5c31d75f2c491ffd6ec6511e469464e3ae30fc15585541c27f43c002da8e00559c8617d29d9e294700be077a2916a5823acfe6b1d1c7e languageName: node linkType: hard @@ -36690,15 +37167,6 @@ __metadata: languageName: node linkType: hard -"xmldoc@npm:^1.1.2": - version: 1.1.2 - resolution: "xmldoc@npm:1.1.2" - dependencies: - sax: ^1.2.1 - checksum: ada5101e8221e87e3cf0f339a1bec213a7c91ad56fe453c27fc0f5b88feee67437a5604a08484f72041cd6104e23cf86c5000bc9bf658a01176b01b6daded429 - languageName: node - linkType: hard - "xmldom@npm:~0.5.0": version: 0.5.0 resolution: "xmldom@npm:0.5.0" From ba99f15dc62122db4e3a3d7051f86841565d7708 Mon Sep 17 00:00:00 2001 From: Axel Delafosse Date: Tue, 19 Jul 2022 08:27:48 +0200 Subject: [PATCH 2/2] remove simple-git --- apps/expo/package.json | 1 - patches/simple-git+3.7.1.patch | 1303 -------------------------------- yarn.lock | 28 - 3 files changed, 1332 deletions(-) delete mode 100644 patches/simple-git+3.7.1.patch diff --git a/apps/expo/package.json b/apps/expo/package.json index e84d15f792..a18ce0c05c 100644 --- a/apps/expo/package.json +++ b/apps/expo/package.json @@ -240,7 +240,6 @@ "metro-minify-esbuild": "^0.2.0", "react-test-renderer": "18.2.0", "semver": "^7.3.5", - "simple-git": "^3.3.0", "ts-jest": "^27.1.4", "typescript": "4.7.4", "zx": "4.3.0" diff --git a/patches/simple-git+3.7.1.patch b/patches/simple-git+3.7.1.patch deleted file mode 100644 index 22c0ced708..0000000000 --- a/patches/simple-git+3.7.1.patch +++ /dev/null @@ -1,1303 +0,0 @@ -diff --git a/node_modules/simple-git/dist/cjs/index.js b/node_modules/simple-git/dist/cjs/index.js -index f01617a..445e380 100644 ---- a/node_modules/simple-git/dist/cjs/index.js -+++ b/node_modules/simple-git/dist/cjs/index.js -@@ -441,9 +441,9 @@ var init_task_options = __esm({ - function callTaskParser(parser3, streams) { - return parser3(streams.stdOut, streams.stdErr); - } --function parseStringResponse(result, parsers11, texts, trim = true) { -- asArray(texts).forEach((text) => { -- for (let lines = toLinesWithContent(text, trim), i = 0, max = lines.length; i < max; i++) { -+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; -@@ -1905,26 +1905,6 @@ var init_init = __esm({ - } - }); - --// src/lib/args/log-format.ts --function logFormatFromCommand(customArgs) { -- for (let i = 0; i < customArgs.length; i++) { -- const format = logFormatRegex.exec(customArgs[i]); -- if (format) { -- return `--${format[1]}`; -- } -- } -- return "" /* NONE */; --} --function isLogFormat(customArg) { -- return logFormatRegex.test(customArg); --} --var logFormatRegex; --var init_log_format = __esm({ -- "src/lib/args/log-format.ts"() { -- logFormatRegex = /^--(stat|numstat|name-only|name-status)(=|$)/; -- } --}); -- - // src/lib/responses/DiffSummary.ts - var DiffSummary; - var init_DiffSummary = __esm({ -@@ -1941,97 +1921,74 @@ var init_DiffSummary = __esm({ - }); - - // src/lib/parsers/parse-diff-summary.ts --function getDiffParser(format = "" /* NONE */) { -- const parser3 = diffSummaryParsers[format]; -- return (stdOut) => parseStringResponse(new DiffSummary(), parser3, stdOut, false); -+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)); -+ }); - } --var statParser, numStatParser, nameOnlyParser, nameStatusParser, diffSummaryParsers; -+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_log_format(); - init_DiffSummary(); -- init_utils(); -- statParser = [ -- new LineParser(/(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/, (result, [file, changes, alterations = ""]) => { -- result.files.push({ -- file: file.trim(), -- changes: asNumber(changes), -- insertions: alterations.replace(/[^+]/g, "").length, -- deletions: alterations.replace(/[^-]/g, "").length, -- binary: false -- }); -- }), -- new LineParser(/(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/, (result, [file, before, after]) => { -- result.files.push({ -- file: file.trim(), -- before: asNumber(before), -- after: asNumber(after), -- binary: true -- }); -- }), -- new LineParser(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/, (result, [changed, summary]) => { -- const inserted = /(\d+) i/.exec(summary); -- const deleted = /(\d+) d/.exec(summary); -- result.changed = asNumber(changed); -- result.insertions = asNumber(inserted == null ? void 0 : inserted[1]); -- result.deletions = asNumber(deleted == null ? void 0 : deleted[1]); -- }) -- ]; -- numStatParser = [ -- new LineParser(/(\d+)\t(\d+)\t(.+)$/, (result, [changesInsert, changesDelete, file]) => { -- const insertions = asNumber(changesInsert); -- const deletions = asNumber(changesDelete); -- result.changed++; -- result.insertions += insertions; -- result.deletions += deletions; -- result.files.push({ -- file, -- changes: insertions + deletions, -- insertions, -- deletions, -- binary: false -- }); -- }), -- new LineParser(/-\t-\t(.+)$/, (result, [file]) => { -- result.changed++; -- result.files.push({ -- file, -- after: 0, -- before: 0, -- binary: true -- }); -- }) -- ]; -- nameOnlyParser = [ -- new LineParser(/(.+)$/, (result, [file]) => { -- result.changed++; -- result.files.push({ -- file, -- changes: 0, -- insertions: 0, -- deletions: 0, -- binary: false -- }); -- }) -- ]; -- nameStatusParser = [ -- new LineParser(/([ACDMRTUXB])\s*(.+)$/, (result, [_status, file]) => { -- result.changed++; -- result.files.push({ -- file, -- changes: 0, -- insertions: 0, -- deletions: 0, -- binary: false -- }); -- }) -- ]; -- diffSummaryParsers = { -- ["" /* NONE */]: statParser, -- ["--stat" /* STAT */]: statParser, -- ["--numstat" /* NUM_STAT */]: numStatParser, -- ["--name-status" /* NAME_STATUS */]: nameStatusParser, -- ["--name-only" /* NAME_ONLY */]: nameOnlyParser -+ statusUpdate = { -+ file(status, value) { -+ status.changed = value; -+ }, -+ deletion(status, value) { -+ status.deletions = value; -+ }, -+ insertion(status, value) { -+ status.insertions = value; -+ } - }; - } - }); -@@ -2043,8 +2000,7 @@ function lineBuilder(tokens, fields) { - return line; - }, /* @__PURE__ */ Object.create({ diff: null })); - } --function createListLogSummaryParser(splitter = SPLITTER, fields = defaultFieldNames, logFormat = "" /* NONE */) { -- const parseDiffResult = getDiffParser(logFormat); -+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); -@@ -2066,7 +2022,6 @@ var init_parse_list_log_summary = __esm({ - "src/lib/parsers/parse-list-log-summary.ts"() { - init_utils(); - init_parse_diff_summary(); -- init_log_format(); - START_BOUNDARY = "\xF2\xF2\xF2\xF2\xF2\xF2 "; - COMMIT_BOUNDARY = " \xF2\xF2"; - SPLITTER = " \xF2 "; -@@ -2074,43 +2029,6 @@ var init_parse_list_log_summary = __esm({ - } - }); - --// src/lib/tasks/diff.ts --var diff_exports = {}; --__export(diff_exports, { -- diffSummaryTask: () => diffSummaryTask, -- validateLogFormatConfig: () => validateLogFormatConfig --}); --function diffSummaryTask(customArgs) { -- let logFormat = logFormatFromCommand(customArgs); -- const commands = ["diff"]; -- if (logFormat === "" /* NONE */) { -- logFormat = "--stat" /* STAT */; -- commands.push("--stat=4096"); -- } -- commands.push(...customArgs); -- return validateLogFormatConfig(commands) || { -- commands, -- format: "utf-8", -- parser: getDiffParser(logFormat) -- }; --} --function validateLogFormatConfig(customArgs) { -- const flags = customArgs.filter(isLogFormat); -- if (flags.length > 1) { -- return configurationErrorTask(`Summary flags are mutually exclusive - pick one of ${flags.join(",")}`); -- } -- if (flags.length && customArgs.includes("-z")) { -- return configurationErrorTask(`Summary flag ${flags} parsing is not compatible with null termination option '-z'`); -- } --} --var init_diff = __esm({ -- "src/lib/tasks/diff.ts"() { -- init_log_format(); -- init_parse_diff_summary(); -- init_task(); -- } --}); -- - // src/lib/tasks/log.ts - function prettyFormat(format, splitter) { - const fields = []; -@@ -2171,19 +2089,17 @@ function parseLogOptions(opt = {}, customArgs = []) { - }; - } - function logTask(splitter, fields, customArgs) { -- const parser3 = createListLogSummaryParser(splitter, fields, logFormatFromCommand(customArgs)); - return { - commands: ["log", ...customArgs], - format: "utf-8", -- parser: parser3 -+ parser: createListLogSummaryParser(splitter, fields) - }; - } - function log_default() { - return { - log(...rest) { - const next = trailingFunctionArgument(arguments); -- const options = parseLogOptions(trailingOptionsArgument(arguments), filterType(arguments[0], filterArray)); -- const task = rejectDeprecatedSignatures(...rest) || validateLogFormatConfig(options.commands) || createLogTask(options); -+ const task = rejectDeprecatedSignatures(...rest) || createLogTask(parseLogOptions(trailingOptionsArgument(arguments), filterType(arguments[0], filterArray))); - return this._runTask(task, next); - } - }; -@@ -2197,11 +2113,9 @@ function log_default() { - var excludeOptions; - var init_log = __esm({ - "src/lib/tasks/log.ts"() { -- init_log_format(); - init_parse_list_log_summary(); - init_utils(); - init_task(); -- init_diff(); - excludeOptions = /* @__PURE__ */ ((excludeOptions2) => { - excludeOptions2[excludeOptions2["--pretty"] = 0] = "--pretty"; - excludeOptions2[excludeOptions2["max-count"] = 1] = "max-count"; -@@ -2378,7 +2292,7 @@ var init_parse_remote_messages = __esm({ - - // src/lib/parsers/parse-pull.ts - function parsePullErrorResult(stdOut, stdErr) { -- const pullError = parseStringResponse(new PullFailedSummary(), errorParsers, [stdOut, stdErr]); -+ const pullError = parseStringResponse(new PullFailedSummary(), errorParsers, stdOut, stdErr); - return pullError.message && pullError; - } - var FILE_UPDATE_REGEX, SUMMARY_REGEX, ACTION_REGEX, parsers3, errorParsers, parsePullDetail, parsePullResult; -@@ -2425,7 +2339,7 @@ var init_parse_pull = __esm({ - }) - ]; - parsePullDetail = (stdOut, stdErr) => { -- return parseStringResponse(new PullSummary(), parsers3, [stdOut, stdErr]); -+ return parseStringResponse(new PullSummary(), parsers3, stdOut, stdErr); - }; - parsePullResult = (stdOut, stdErr) => { - return Object.assign(new PullSummary(), parsePullDetail(stdOut, stdErr), parseRemoteMessages(stdOut, stdErr)); -@@ -2549,7 +2463,7 @@ var init_parse_push = __esm({ - return __spreadValues(__spreadValues({}, pushDetail), responseDetail); - }; - parsePushDetail = (stdOut, stdErr) => { -- return parseStringResponse({ pushed: [] }, parsers5, [stdOut, stdErr]); -+ return parseStringResponse({ pushed: [] }, parsers5, stdOut, stdErr); - }; - } - }); -@@ -2968,7 +2882,7 @@ var init_parse_branch_delete = __esm({ - }) - ]; - parseBranchDeletions = (stdOut, stdErr) => { -- return parseStringResponse(new BranchDeletionBatch(), parsers7, [stdOut, stdErr]); -+ return parseStringResponse(new BranchDeletionBatch(), parsers7, stdOut, stdErr); - }; - } - }); -@@ -2984,15 +2898,14 @@ var init_BranchSummary = __esm({ - this.current = ""; - this.detached = false; - } -- push(status, detached, name, commit, label) { -- if (status === "*" /* CURRENT */) { -+ push(current, detached, name, commit, label) { -+ if (current) { - this.detached = detached; - this.current = name; - } - this.all.push(name); - this.branches[name] = { -- current: status === "*" /* CURRENT */, -- linkedWorkTree: status === "+" /* LINKED */, -+ current, - name, - commit, - label -@@ -3003,9 +2916,6 @@ var init_BranchSummary = __esm({ - }); - - // src/lib/parsers/parse-branch.ts --function branchStatus(input) { -- return input ? input.charAt(0) : ""; --} - function parseBranchSummary(stdOut) { - return parseStringResponse(new BranchSummaryResult(), parsers8, stdOut); - } -@@ -3015,11 +2925,11 @@ var init_parse_branch = __esm({ - init_BranchSummary(); - init_utils(); - parsers8 = [ -- new LineParser(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/, (result, [current, name, commit, label]) => { -- result.push(branchStatus(current), true, name, commit, label); -+ 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(branchStatus(current), false, 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); - }) - ]; - } -@@ -3164,6 +3074,26 @@ var init_clone = __esm({ - } - }); - -+// 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 = { -@@ -3172,7 +3102,7 @@ function parseFetchResult(stdOut, stdErr) { - branches: [], - tags: [] - }; -- return parseStringResponse(result, parsers9, [stdOut, stdErr]); -+ return parseStringResponse(result, parsers9, stdOut, stdErr); - } - var parsers9; - var init_parse_fetch = __esm({ -@@ -3380,19 +3310,16 @@ __export(stash_list_exports, { - }); - function stashListTask(opt = {}, customArgs) { - const options = parseLogOptions(opt); -- const commands = ["stash", "list", ...options.commands, ...customArgs]; -- const parser3 = createListLogSummaryParser(options.splitter, options.fields, logFormatFromCommand(commands)); -- return validateLogFormatConfig(commands) || { -- commands, -+ 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_log_format(); - init_parse_list_log_summary(); -- init_diff(); - init_log(); - } - }); -@@ -3799,8 +3726,10 @@ function esModuleFactory(defaultExport) { - default: { value: defaultExport } - }); - } --function gitExportFactory(factory) { -- return Object.assign(factory.bind(null), api_exports); -+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(); -@@ -3972,6 +3901,5 @@ var init_promise_wrapped = __esm({ - // 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)); --var simpleGit = esModuleFactory2(gitExportFactory2(gitInstanceFactory2)); --module.exports = Object.assign(simpleGit, { gitP: gitP2, simpleGit }); -+module.exports = esModuleFactory2(gitExportFactory2(gitInstanceFactory2, { gitP: gitP2 })); - //# sourceMappingURL=index.js.map -diff --git a/node_modules/simple-git/dist/cjs/index.js.map b/node_modules/simple-git/dist/cjs/index.js.map -index 79a8d8f..2779a93 100644 ---- a/node_modules/simple-git/dist/cjs/index.js.map -+++ b/node_modules/simple-git/dist/cjs/index.js.map -@@ -1,7 +1,7 @@ - { - "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/parsers/parse-commit.ts", "../../src/lib/tasks/commit.ts", "../../src/lib/tasks/hash-object.ts", "../../src/lib/responses/InitSummary.ts", "../../src/lib/tasks/init.ts", "../../src/lib/args/log-format.ts", "../../src/lib/responses/DiffSummary.ts", "../../src/lib/parsers/parse-diff-summary.ts", "../../src/lib/parsers/parse-list-log-summary.ts", "../../src/lib/tasks/diff.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-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 type { 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,\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) => e.git);\n\n if (mergeSummary.failed) {\n // deal with the error\n }\n ```\n */\nexport class GitResponseError 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,\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 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(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(input: T, offset?: number): Maybe;\nexport function first(input: T, offset?: number): Maybe;\nexport function first(input: any[] | IArguments, offset = 0): Maybe {\n return isArrayLike(input) && input.length > offset ? input[offset] : undefined;\n}\n\nexport function last(input: T, offset?: number): Maybe;\nexport function last(input: T, offset?: number): Maybe;\nexport function last(input: T, offset?: number): Maybe;\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[] | 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 = (line: string) => T;\n\nexport function forEachLineWithContent(input: string, callback: LineWithContentCallback): 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(target: T[] | Set, 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(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(target: Set | 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(source: T | T[]): T[] {\n return Array.isArray(source) ? source : [source];\n}\n\nexport function asStringArray(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(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, properties: string[]) {\n return Object.assign({}, ...properties.map((property) => property in source ? {[property]: source[property]} : {}));\n}\n\nexport function delay(duration = 0): Promise {\n return new Promise(done => setTimeout(done, duration));\n}\n", "import { Maybe, Options, Primitives } from '../types';\nimport { objectToString } from './util';\n\nexport interface ArgumentFilterPredicate {\n (input: any): input is T;\n}\n\nexport function filterType(input: K, filter: ArgumentFilterPredicate): K extends T ? T : undefined;\nexport function filterType(input: K, filter: ArgumentFilterPredicate, def: T): T;\nexport function filterType(input: K, filter: ArgumentFilterPredicate, def?: T): Maybe {\n if (filter(input)) {\n return input;\n }\n return (arguments.length > 2) ? def : undefined\n}\n\nexport const filterArray: ArgumentFilterPredicate> = (input): input is Array => {\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 = (input): input is string => {\n return typeof input === 'string';\n};\n\nexport const filterStringArray: ArgumentFilterPredicate = (input): input is string[] => {\n return Array.isArray(input) && input.every(filterString);\n};\n\nexport const filterStringOrStringArray: ArgumentFilterPredicate = (input): input is string | string[] => {\n return filterString(input) || (Array.isArray(input) && input.every(filterString));\n};\n\nexport function filterPlainObject(input: T | unknown): input is T;\nexport function filterPlainObject(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 {\n\n constructor(public readonly stdOut: T, public readonly stdErr: T) {\n }\n\n asStrings(): GitOutputStreams {\n return new GitOutputStreams(this.stdOut.toString('utf8'), this.stdErr.toString('utf8'));\n }\n}\n", "export class LineParser {\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 extends LineParser {\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 = {\n binary: 'git',\n maxConcurrentProcesses: 5,\n config: [],\n};\n\nexport function createInstanceConfig(...options: Array | 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(options: Maybe, commands: string[] = []): string[] {\n if (!filterPlainObject(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 {\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 type { MaybeArray, TaskParser, TaskResponseFormat } from '../types';\nimport { GitOutputStreams } from './git-output-streams';\nimport { LineParser } from './line-parser';\nimport { asArray, toLinesWithContent } from './util';\n\nexport function callTaskParser(parser: TaskParser, streams: GitOutputStreams) {\n return parser(streams.stdOut, streams.stdErr);\n}\n\nexport function parseStringResponse(result: T, parsers: LineParser[], texts: MaybeArray, trim = true): T {\n asArray(texts).forEach(text => {\n for (let lines = toLinesWithContent(text, trim), 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['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['parser'] = (text) => {\n return text.trim() === 'true';\n}\n\nexport function checkIsRepoTask(action: Maybe): StringTask {\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 {\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 {\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 type { 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 {\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 {\n return {\n commands,\n format: 'buffer',\n parser(buffer) {\n return buffer;\n },\n }\n}\n\nexport function isBufferTask(task: SimpleGitTask): task is BufferTask {\n return task.format === 'buffer';\n}\n\nexport function isEmptyTask(task: SimpleGitTask): 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 = 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 {\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;\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 = 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(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 {\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 {\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 {\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 {\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 {\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();\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 {\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, 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 {\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", "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, timeout: DeferredPromise) {\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 as Error);\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;\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> = new Set();\n\n public add(plugin: void | SimpleGitPlugin | SimpleGitPlugin[]) {\n const plugins: SimpleGitPlugin[] = [];\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(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) {\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;\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 {\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): 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): 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 timeout && clearTimeout(timeout);\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, childDebugger: Maybe, {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 = (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;\n\ntype TaskInProgress = {\n name: string;\n logger: OutputLogger;\n task: AnySimpleGitTask;\n}\n\nexport class TasksPendingQueue {\n\n private _queue: Map = 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 = 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(task: SimpleGitTask): Promise {\n this._queue.push(task);\n\n return this._chain = this._chain.then(() => this.attemptTask(task));\n }\n\n private async attemptTask(task: SimpleGitTask): Promise {\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 as Error);\n } finally {\n onQueueComplete();\n onScheduleComplete();\n }\n }\n\n private onFatalException(task: SimpleGitTask, 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(task: RunnableTask, 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(\n task: SimpleGitTask,\n args: string[],\n result: GitExecutorResult, logger: OutputLogger): Promise {\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(task: SimpleGitTask, command: string, args: string[], outputHandler: Maybe, logger: OutputLogger): Promise {\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;\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(task: SimpleGitTask, 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 type { PluginStore } from '../plugins';\nimport type { 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(task: SimpleGitTask): Promise {\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(task: SimpleGitTask, response: Promise, callback: SimpleGitTaskCallback = 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 { CommitResult } from '../../../typings';\nimport { LineParser, parseStringResponse } from '../utils';\n\nconst parsers: LineParser[] = [\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 type { CommitResult, SimpleGit } from '../../../typings';\nimport type { SimpleGitApi } from '../simple-git-api';\nimport type { StringTask } from '../types';\nimport { parseCommitResult } from '../parsers/parse-commit';\nimport {\n asArray,\n filterArray,\n filterStringOrStringArray,\n filterType,\n getTrailingOptions, prefixedArray,\n trailingFunctionArgument\n} from '../utils';\nimport { configurationErrorTask } from './task';\n\nexport function commitTask(message: string[], files: string[], customArgs: string[]): StringTask {\n const commands: string[] = [\n '-c',\n 'core.abbrev=40',\n 'commit',\n ...prefixedArray(message, '-m'),\n ...files,\n ...customArgs,\n ];\n\n return {\n commands,\n format: 'utf-8',\n parser: parseCommitResult,\n };\n}\n\nexport default function (): Pick {\n return {\n commit(this: SimpleGitApi, message: string | string[], ...rest: unknown[]) {\n const next = trailingFunctionArgument(arguments);\n const task = rejectDeprecatedSignatures(message) ||\n commitTask(\n asArray(message),\n asArray(filterType(rest[0], filterStringOrStringArray, [])),\n [...filterType(rest[1], filterArray, []), ...getTrailingOptions(arguments, 0, true)]\n );\n\n return this._runTask(task, next);\n },\n };\n\n function rejectDeprecatedSignatures(message?: unknown) {\n return (\n !filterStringOrStringArray(message) &&\n configurationErrorTask(`git.commit: requires the commit message to be supplied as a string/string[]`)\n );\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 {\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 {\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", "export enum LogFormat {\n NONE = '',\n STAT = '--stat',\n NUM_STAT = '--numstat',\n NAME_ONLY = '--name-only',\n NAME_STATUS = '--name-status',\n}\n\nconst logFormatRegex = /^--(stat|numstat|name-only|name-status)(=|$)/;\n\nexport function logFormatFromCommand(customArgs: string[]) {\n for (let i = 0; i < customArgs.length; i++) {\n const format = logFormatRegex.exec(customArgs[i]);\n if (format) {\n return `--${format[1]}` as LogFormat;\n }\n }\n\n return LogFormat.NONE;\n}\n\nexport function isLogFormat(customArg: string | unknown) {\n return logFormatRegex.test(customArg as string);\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 = [];\n}\n", "import { DiffResult } from '../../../typings';\nimport { LogFormat } from '../args/log-format';\nimport { DiffSummary } from '../responses/DiffSummary';\nimport { asNumber, LineParser, parseStringResponse } from '../utils';\n\nconst statParser = [\n new LineParser(/(.+)\\s+\\|\\s+(\\d+)(\\s+[+\\-]+)?$/, (result, [file, changes, alterations = '']) => {\n result.files.push({\n file: file.trim(),\n changes: asNumber(changes),\n insertions: alterations.replace(/[^+]/g, '').length,\n deletions: alterations.replace(/[^-]/g, '').length,\n binary: false\n });\n }),\n new LineParser(/(.+) \\|\\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/, (result, [file, before, after]) => {\n result.files.push({\n file: file.trim(),\n before: asNumber(before),\n after: asNumber(after),\n binary: true\n });\n }),\n new LineParser(/(\\d+) files? changed\\s*((?:, \\d+ [^,]+){0,2})/, (result, [changed, summary]) => {\n const inserted = /(\\d+) i/.exec(summary);\n const deleted = /(\\d+) d/.exec(summary);\n\n result.changed = asNumber(changed);\n result.insertions = asNumber(inserted?.[1]);\n result.deletions = asNumber(deleted?.[1]);\n })\n];\n\nconst numStatParser = [\n new LineParser(/(\\d+)\\t(\\d+)\\t(.+)$/, (result, [changesInsert, changesDelete, file]) => {\n const insertions = asNumber(changesInsert);\n const deletions = asNumber(changesDelete);\n\n result.changed++;\n result.insertions += insertions;\n result.deletions += deletions;\n\n result.files.push({\n file,\n changes: insertions + deletions,\n insertions,\n deletions,\n binary: false,\n });\n }),\n new LineParser(/-\\t-\\t(.+)$/, (result, [file]) => {\n result.changed++;\n\n result.files.push({\n file,\n after: 0,\n before: 0,\n binary: true,\n });\n })\n];\n\nconst nameOnlyParser = [\n new LineParser(/(.+)$/, (result, [file]) => {\n result.changed++;\n result.files.push({\n file,\n changes: 0,\n insertions: 0,\n deletions: 0,\n binary: false,\n });\n })\n];\n\nconst nameStatusParser = [\n new LineParser(/([ACDMRTUXB])\\s*(.+)$/, (result, [_status, file]) => {\n result.changed++;\n result.files.push({\n file,\n changes: 0,\n insertions: 0,\n deletions: 0,\n binary: false,\n });\n })\n];\n\nconst diffSummaryParsers: Record[]> = {\n [LogFormat.NONE]: statParser,\n [LogFormat.STAT]: statParser,\n [LogFormat.NUM_STAT]: numStatParser,\n [LogFormat.NAME_STATUS]: nameStatusParser,\n [LogFormat.NAME_ONLY]: nameOnlyParser,\n};\n\nexport function getDiffParser(format = LogFormat.NONE) {\n const parser = diffSummaryParsers[format];\n\n return (stdOut: string) => parseStringResponse(new DiffSummary(), parser, stdOut, false);\n}\n", "import { ListLogLine, LogResult } from '../../../typings';\nimport { toLinesWithContent } from '../utils';\nimport { getDiffParser } from './parse-diff-summary';\nimport { LogFormat } from '../args/log-format';\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 (splitter = SPLITTER, fields = defaultFieldNames, logFormat = LogFormat.NONE) {\n const parseDiffResult = getDiffParser(logFormat);\n\n return function (stdOut: string): LogResult {\n const all: ReadonlyArray = 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 { StringTask } from '../types';\nimport { DiffResult } from '../../../typings';\nimport { isLogFormat, LogFormat, logFormatFromCommand } from '../args/log-format';\nimport { getDiffParser } from '../parsers/parse-diff-summary';\nimport { configurationErrorTask, EmptyTask } from './task';\n\nexport function diffSummaryTask(customArgs: string[]): StringTask | EmptyTask {\n let logFormat = logFormatFromCommand(customArgs);\n\n const commands = ['diff'];\n\n if (logFormat === LogFormat.NONE) {\n logFormat = LogFormat.STAT;\n commands.push('--stat=4096');\n }\n\n commands.push(...customArgs);\n\n return validateLogFormatConfig(commands) || {\n commands,\n format: 'utf-8',\n parser: getDiffParser(logFormat),\n };\n}\n\nexport function validateLogFormatConfig(customArgs: unknown[]): EmptyTask | void {\n const flags = customArgs.filter(isLogFormat);\n\n if (flags.length > 1) {\n return configurationErrorTask(`Summary flags are mutually exclusive - pick one of ${flags.join(',')}`);\n }\n\n if (flags.length && customArgs.includes('-z')) {\n return configurationErrorTask(`Summary flag ${flags} parsing is not compatible with null termination option '-z'`);\n }\n}\n", "import type { Options, StringTask } from '../types';\nimport type { LogResult, SimpleGit } from '../../../typings';\nimport { logFormatFromCommand } from '../args/log-format';\nimport {\n COMMIT_BOUNDARY,\n createListLogSummaryParser,\n SPLITTER,\n START_BOUNDARY\n} from '../parsers/parse-list-log-summary';\nimport {\n appendTaskOptions,\n filterArray,\n filterPrimitives,\n filterString,\n filterType,\n trailingFunctionArgument,\n trailingOptionsArgument\n} from '../utils';\nimport { SimpleGitApi } from '../simple-git-api';\nimport { configurationErrorTask } from './task';\nimport { validateLogFormatConfig } from './diff';\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 = {\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: Record, 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(input: T): Options {\n return Object.keys(input).reduce((out, key) => {\n if (!(key in excludeOptions)) {\n out[key] = input[key];\n }\n return out;\n }, {} as Options);\n}\n\nexport function parseLogOptions(opt: Options | LogOptions = {}, customArgs: string[] = []): ParsedLogOptions {\n const splitter = filterType(opt.splitter, filterString, SPLITTER);\n const format = !filterPrimitives(opt.format) && opt.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 (filterString(opt.file)) {\n suffix.push('--follow', opt.file);\n }\n\n appendTaskOptions(userOptions(opt as Options), command);\n\n return {\n fields,\n splitter,\n commands: [\n ...command,\n ...suffix,\n ],\n };\n}\n\nexport function logTask(splitter: string, fields: string[], customArgs: string[]): StringTask> {\n const parser = createListLogSummaryParser(splitter, fields, logFormatFromCommand(customArgs));\n\n return {\n commands: ['log', ...customArgs],\n format: 'utf-8',\n parser,\n };\n}\n\nexport default function (): Pick {\n return {\n log(this: SimpleGitApi, ...rest: unknown[]) {\n const next = trailingFunctionArgument(arguments);\n const options = parseLogOptions(trailingOptionsArgument(arguments), filterType(arguments[0], filterArray));\n const task = rejectDeprecatedSignatures(...rest) ||\n validateLogFormatConfig(options.commands) ||\n createLogTask(options);\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(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>[] = [\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>[] = [\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(\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[] = [\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[] = [\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 = (stdOut, stdErr) => {\n return parseStringResponse(new PullSummary(), parsers, [stdOut, stdErr]);\n}\n\nexport const parsePullResult: TaskParser = (stdOut, stdErr) => {\n return Object.assign(\n new PullSummary(),\n parsePullDetail(stdOut, stdErr),\n parseRemoteMessages(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[] = [\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 = (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 = (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 {\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[] = [\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 = (stdOut, stdErr) => {\n const pushDetail = parsePushDetail(stdOut, stdErr);\n const responseDetail = parseRemoteMessages(stdOut, stdErr);\n\n return {\n ...pushDetail,\n ...responseDetail,\n };\n}\n\nexport const parsePushDetail: TaskParser = (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 {\n append(customArgs, '--tags');\n return pushTask(ref, customArgs);\n}\n\nexport function pushTask(ref: PushRef = {}, customArgs: string[]): StringTask {\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';\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, NULL } 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 = () => {\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 [to, from] = line.split(NULL);\n\n return {\n from: from || to,\n to,\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 = 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.split(NULL);\n const status = new StatusSummary();\n\n for (let i = 0, l = lines.length; i < l;) {\n let line = lines[i++].trim();\n\n if (!line) {\n continue;\n }\n\n if (line.charAt(0) === PorcelainFileStatus.RENAMED) {\n line += NULL + (lines[i++] || '');\n }\n\n splitLine(status, line);\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.replace(/\\0.+$/, ''), index, workingDir));\n }\n }\n}\n", "import { StatusResult } from '../../../typings';\nimport { parseStatusSummary } from '../responses/StatusSummary';\nimport { StringTask } from '../types';\n\nconst ignoredOptions = ['--null', '-z'];\n\nexport function statusTask(customArgs: string[]): StringTask {\n const commands = [\n 'status',\n '--porcelain',\n '-b',\n '-u',\n '--null',\n ...customArgs.filter(arg => !ignoredOptions.includes(arg))\n ];\n\n return {\n format: 'utf-8',\n commands,\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 commit from './tasks/commit';\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(task: SimpleGitTask, then?: SimpleGitTaskCallback) {\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, commit(), 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, 'promise' | 'done'> & {id: number};\n\nconst createScheduledTask: () => ScheduledTask = (() => {\n let id = 0;\n return () => {\n id++;\n const {promise, done} = createDeferred();\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 {\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 {\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[] = [\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 = (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 type { BranchSummary, BranchSummaryBranch } from '../../../typings';\n\nexport enum BranchStatusIdentifier {\n CURRENT = '*',\n LINKED = '+',\n}\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(status: BranchStatusIdentifier | unknown, detached: boolean, name: string, commit: string, label: string) {\n if (status === BranchStatusIdentifier.CURRENT) {\n this.detached = detached;\n this.current = name;\n }\n\n this.all.push(name);\n this.branches[name] = {\n current: status === BranchStatusIdentifier.CURRENT,\n linkedWorkTree: status === BranchStatusIdentifier.LINKED,\n name,\n commit,\n label\n };\n }\n}\n\n", "import type { BranchSummary } from '../../../typings';\nimport { BranchSummaryResult } from '../responses/BranchSummary';\nimport { LineParser, parseStringResponse } from '../utils';\n\nconst parsers: LineParser[] = [\n new LineParser(/^([*+]\\s)?\\((?:HEAD )?detached (?:from|at) (\\S+)\\)\\s+([a-z0-9]+)\\s(.*)$/, (result, [current, name, commit, label]) => {\n result.push(\n branchStatus(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 branchStatus(current),\n false,\n name, commit, label\n );\n })\n];\n\nfunction branchStatus(input?: string) {\n return input ? input.charAt(0) : '';\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 {\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 {\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 {\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 {\n const task: StringTask = {\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 {\n return {\n commands: ['check-ignore', ...paths],\n format: 'utf-8',\n parser: parseCheckIgnore,\n };\n}\n", "import { configurationErrorTask, EmptyTask, straightThroughStringTask } from './task';\nimport { OptionFlags, Options, StringTask } from '../types';\nimport { append, filterString } from '../utils';\n\nexport type CloneOptions = Options &\n OptionFlags<'--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 OptionFlags<'--depth' | '-j' | '--jobs', number> &\n OptionFlags<'--branch' | '--origin' | '--recurse-submodules' | '--separate-git-dir' | '--shallow-exclude' | '--shallow-since' | '--template', string>\n\nfunction disallowedCommand(command: string) {\n return /^--upload-pack(=|$)/.test(command);\n}\n\nexport function cloneTask(repo: string | undefined, directory: string | undefined, customArgs: string[]): StringTask | EmptyTask {\n const commands = ['clone', ...customArgs];\n\n filterString(repo) && commands.push(repo);\n filterString(directory) && commands.push(directory);\n\n const banned = commands.find(disallowedCommand);\n if (banned) {\n return configurationErrorTask(`git.fetch: potential exploit argument blocked.`);\n }\n\n return straightThroughStringTask(commands);\n}\n\nexport function cloneMirrorTask(repo: string | undefined, directory: string | undefined, customArgs: string[]) {\n append(customArgs, '--mirror');\n\n return cloneTask(repo, directory, customArgs);\n}\n", "import { FetchResult } from '../../../typings';\nimport { LineParser, parseStringResponse } from '../utils';\n\nconst parsers: LineParser[] = [\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\nimport { configurationErrorTask, EmptyTask } from './task';\n\nfunction disallowedCommand(command: string) {\n return /^--upload-pack(=|$)/.test(command);\n}\n\nexport function fetchTask(remote: string, branch: string, customArgs: string[]): StringTask | EmptyTask {\n const commands = ['fetch', ...customArgs];\n if (remote && branch) {\n commands.push(remote, branch);\n }\n\n const banned = commands.find(disallowedCommand);\n if (banned) {\n return configurationErrorTask(`git.fetch: potential exploit argument blocked.`);\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[] = [\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 {\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, branch: Maybe, customArgs: string[]): StringTask {\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 {\n return straightThroughStringTask(['remote', 'add', ...customArgs, remoteName, remoteRepo]);\n}\n\nexport function getRemotesTask(verbose: boolean): StringTask {\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 {\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 {\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 { logFormatFromCommand } from '../args/log-format';\nimport { createListLogSummaryParser } from '../parsers/parse-list-log-summary';\nimport type { StringTask } from '../types';\nimport { validateLogFormatConfig } from './diff';\nimport { parseLogOptions } from './log';\nimport type { EmptyTask } from './task';\n\nexport function stashListTask(opt: LogOptions = {}, customArgs: string[]): EmptyTask | StringTask {\n const options = parseLogOptions(opt);\n const commands = ['stash', 'list', ...options.commands, ...customArgs];\n const parser = createListLogSummaryParser(options.splitter, options.fields, logFormatFromCommand(commands));\n\n return validateLogFormatConfig(commands) || {\n commands,\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 {\n return subModuleTask(['add', repo, path]);\n}\n\nexport function initSubModuleTask(customArgs: string[]): StringTask {\n return subModuleTask(['init', ...customArgs]);\n}\n\nexport function subModuleTask(customArgs: string[]): StringTask {\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 {\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 {\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 * 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(defaultExport: T) {\n return Object.defineProperties(defaultExport, {\n __esModule: {value: true},\n default: {value: defaultExport},\n }) as T & { __esModule: true, default: T };\n}\n\nexport function gitExportFactory(factory: SimpleGitFactory) {\n return Object.assign(factory.bind(null), api);\n}\n\nexport function gitInstanceFactory(baseDir?: string | Partial, options?: Partial) {\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] | [string, Partial]): 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 {\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\nconst simpleGit = esModuleFactory(gitExportFactory(gitInstanceFactory));\n\nmodule.exports = Object.assign(simpleGit, {gitP, simpleGit});\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,IAYO;AAZP;AAAA;AAAA;AAYO,sCAAgC,SAAS;AAAA,MAE7C,YACmB,QAChB,SACD;AACC,cAAM,QAAW;AAHD;AAAA;AAAA;AAAA;AAAA;;;ACftB,IAGO;AAHP;AAAA;AACA;AA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A;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,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,IAAM,YAAY,iBAAgB,kBAAiB;AAEnD,OAAO,UAAU,OAAO,OAAO,WAAW,EAAC,aAAM;", -+ "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/parsers/parse-commit.ts", "../../src/lib/tasks/commit.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/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,\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) => e.git);\n\n if (mergeSummary.failed) {\n // deal with the error\n }\n ```\n */\nexport class GitResponseError 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,\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 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(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(input: T, offset?: number): Maybe;\nexport function first(input: T, offset?: number): Maybe;\nexport function first(input: any[] | IArguments, offset = 0): Maybe {\n return isArrayLike(input) && input.length > offset ? input[offset] : undefined;\n}\n\nexport function last(input: T, offset?: number): Maybe;\nexport function last(input: T, offset?: number): Maybe;\nexport function last(input: T, offset?: number): Maybe;\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[] | 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 = (line: string) => T;\n\nexport function forEachLineWithContent(input: string, callback: LineWithContentCallback): 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(target: T[] | Set, 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(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(target: Set | 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(source: T | T[]): T[] {\n return Array.isArray(source) ? source : [source];\n}\n\nexport function asStringArray(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(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, properties: string[]) {\n return Object.assign({}, ...properties.map((property) => property in source ? {[property]: source[property]} : {}));\n}\n\nexport function delay(duration = 0): Promise {\n return new Promise(done => setTimeout(done, duration));\n}\n", "import { Maybe, Options, Primitives } from '../types';\nimport { objectToString } from './util';\n\nexport interface ArgumentFilterPredicate {\n (input: any): input is T;\n}\n\nexport function filterType(input: K, filter: ArgumentFilterPredicate): K extends T ? T : undefined;\nexport function filterType(input: K, filter: ArgumentFilterPredicate, def: T): T;\nexport function filterType(input: K, filter: ArgumentFilterPredicate, def?: T): Maybe {\n if (filter(input)) {\n return input;\n }\n return (arguments.length > 2) ? def : undefined\n}\n\nexport const filterArray: ArgumentFilterPredicate> = (input): input is Array => {\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 = (input): input is string => {\n return typeof input === 'string';\n};\n\nexport const filterStringArray: ArgumentFilterPredicate = (input): input is string[] => {\n return Array.isArray(input) && input.every(filterString);\n};\n\nexport const filterStringOrStringArray: ArgumentFilterPredicate = (input): input is string | string[] => {\n return filterString(input) || (Array.isArray(input) && input.every(filterString));\n};\n\nexport function filterPlainObject(input: T | unknown): input is T;\nexport function filterPlainObject(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 {\n\n constructor(public readonly stdOut: T, public readonly stdErr: T) {\n }\n\n asStrings(): GitOutputStreams {\n return new GitOutputStreams(this.stdOut.toString('utf8'), this.stdErr.toString('utf8'));\n }\n}\n", "export class LineParser {\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 extends LineParser {\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 = {\n binary: 'git',\n maxConcurrentProcesses: 5,\n config: [],\n};\n\nexport function createInstanceConfig(...options: Array | 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(options: Maybe, commands: string[] = []): string[] {\n if (!filterPlainObject(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 {\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(parser: TaskParser, streams: GitOutputStreams) {\n return parser(streams.stdOut, streams.stdErr);\n}\n\nexport function parseStringResponse(result: T, parsers: LineParser[], ...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['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['parser'] = (text) => {\n return text.trim() === 'true';\n}\n\nexport function checkIsRepoTask(action: Maybe): StringTask {\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 {\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 {\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 {\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 {\n return {\n commands,\n format: 'buffer',\n parser(buffer) {\n return buffer;\n },\n }\n}\n\nexport function isBufferTask(task: SimpleGitTask): task is BufferTask {\n return task.format === 'buffer';\n}\n\nexport function isEmptyTask(task: SimpleGitTask): 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 = 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 {\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;\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 = 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(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 {\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 {\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 {\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 {\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 {\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();\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 {\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, 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 {\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, timeout: DeferredPromise) {\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;\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> = new Set();\n\n public add(plugin: void | SimpleGitPlugin | SimpleGitPlugin[]) {\n const plugins: SimpleGitPlugin[] = [];\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(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) {\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;\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 {\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): 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): 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 timeout && clearTimeout(timeout);\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, childDebugger: Maybe, {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 = (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;\n\ntype TaskInProgress = {\n name: string;\n logger: OutputLogger;\n task: AnySimpleGitTask;\n}\n\nexport class TasksPendingQueue {\n\n private _queue: Map = 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 = 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(task: SimpleGitTask): Promise {\n this._queue.push(task);\n\n return this._chain = this._chain.then(() => this.attemptTask(task));\n }\n\n private async attemptTask(task: SimpleGitTask): Promise {\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(task: SimpleGitTask, 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(task: RunnableTask, 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(\n task: SimpleGitTask,\n args: string[],\n result: GitExecutorResult, logger: OutputLogger): Promise {\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(task: SimpleGitTask, command: string, args: string[], outputHandler: Maybe, logger: OutputLogger): Promise {\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;\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(task: SimpleGitTask, 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 type { PluginStore } from '../plugins';\nimport type { 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(task: SimpleGitTask): Promise {\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(task: SimpleGitTask, response: Promise, callback: SimpleGitTaskCallback = 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 { CommitResult } from '../../../typings';\nimport { LineParser, parseStringResponse } from '../utils';\n\nconst parsers: LineParser[] = [\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 type { CommitResult, SimpleGit } from '../../../typings';\nimport type { SimpleGitApi } from '../simple-git-api';\nimport type { StringTask } from '../types';\nimport { parseCommitResult } from '../parsers/parse-commit';\nimport {\n asArray,\n filterArray,\n filterStringOrStringArray,\n filterType,\n getTrailingOptions, prefixedArray,\n trailingFunctionArgument\n} from '../utils';\nimport { configurationErrorTask } from './task';\n\nexport function commitTask(message: string[], files: string[], customArgs: string[]): StringTask {\n const commands: string[] = [\n '-c',\n 'core.abbrev=40',\n 'commit',\n ...prefixedArray(message, '-m'),\n ...files,\n ...customArgs,\n ];\n\n return {\n commands,\n format: 'utf-8',\n parser: parseCommitResult,\n };\n}\n\nexport default function (): Pick {\n return {\n commit(this: SimpleGitApi, message: string | string[], ...rest: unknown[]) {\n const next = trailingFunctionArgument(arguments);\n const task = rejectDeprecatedSignatures(message) ||\n commitTask(\n asArray(message),\n asArray(filterType(rest[0], filterStringOrStringArray, [])),\n [...filterType(rest[1], filterArray, []), ...getTrailingOptions(arguments, 0, true)]\n );\n\n return this._runTask(task, next);\n },\n };\n\n function rejectDeprecatedSignatures(message?: unknown) {\n return (\n !filterStringOrStringArray(message) &&\n configurationErrorTask(`git.commit: requires the commit message to be supplied as a string/string[]`)\n );\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 {\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 {\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 = [];\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 (splitter = SPLITTER, fields = defaultFieldNames) {\n return function (stdOut: string): LogResult {\n const all: ReadonlyArray = 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 filterPrimitives,\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 = {\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: Record, 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(input: T): Options {\n return Object.keys(input).reduce((out, key) => {\n if (!(key in excludeOptions)) {\n out[key] = input[key];\n }\n return out;\n }, {} as Options);\n}\n\nexport function parseLogOptions(opt: Options | LogOptions = {}, customArgs: string[] = []): ParsedLogOptions {\n const splitter = filterType(opt.splitter, filterString, SPLITTER);\n const format = !filterPrimitives(opt.format) && opt.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 (filterString(opt.file)) {\n suffix.push('--follow', opt.file);\n }\n\n appendTaskOptions(userOptions(opt as Options), command);\n\n return {\n fields,\n splitter,\n commands: [\n ...command,\n ...suffix,\n ],\n };\n}\n\nexport function logTask(splitter: string, fields: string[], customArgs: string[]): StringTask> {\n return {\n commands: ['log', ...customArgs],\n format: 'utf-8',\n parser: createListLogSummaryParser(splitter, fields),\n };\n}\n\nexport default function (): Pick {\n return {\n log(this: SimpleGitApi, ...rest: unknown[]) {\n const next = trailingFunctionArgument(arguments);\n const task = rejectDeprecatedSignatures(...rest) ||\n createLogTask(parseLogOptions(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(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>[] = [\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>[] = [\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(\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[] = [\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[] = [\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 = (stdOut, stdErr) => {\n return parseStringResponse(new PullSummary(), parsers, stdOut, stdErr);\n}\n\nexport const parsePullResult: TaskParser = (stdOut, stdErr) => {\n return Object.assign(\n new PullSummary(),\n parsePullDetail(stdOut, stdErr),\n parseRemoteMessages(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[] = [\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 = (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 = (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 {\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[] = [\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 = (stdOut, stdErr) => {\n const pushDetail = parsePushDetail(stdOut, stdErr);\n const responseDetail = parseRemoteMessages(stdOut, stdErr);\n\n return {\n ...pushDetail,\n ...responseDetail,\n };\n}\n\nexport const parsePushDetail: TaskParser = (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 {\n append(customArgs, '--tags');\n return pushTask(ref, customArgs);\n}\n\nexport function pushTask(ref: PushRef = {}, customArgs: string[]): StringTask {\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';\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, NULL } 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 = () => {\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 [to, from] = line.split(NULL);\n\n return {\n from: from || to,\n to,\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 = 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.split(NULL);\n const status = new StatusSummary();\n\n for (let i = 0, l = lines.length; i < l;) {\n let line = lines[i++].trim();\n\n if (!line) {\n continue;\n }\n\n if (line.charAt(0) === PorcelainFileStatus.RENAMED) {\n line += NULL + (lines[i++] || '');\n }\n\n splitLine(status, line);\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.replace(/\\0.+$/, ''), index, workingDir));\n }\n }\n}\n", "import { StatusResult } from '../../../typings';\nimport { parseStatusSummary } from '../responses/StatusSummary';\nimport { StringTask } from '../types';\n\nconst ignoredOptions = ['--null', '-z'];\n\nexport function statusTask(customArgs: string[]): StringTask {\n const commands = [\n 'status',\n '--porcelain',\n '-b',\n '-u',\n '--null',\n ...customArgs.filter(arg => !ignoredOptions.includes(arg))\n ];\n\n return {\n format: 'utf-8',\n commands,\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 commit from './tasks/commit';\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(task: SimpleGitTask, then?: SimpleGitTaskCallback) {\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, commit(), 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, 'promise' | 'done'> & {id: number};\n\nconst createScheduledTask: () => ScheduledTask = (() => {\n let id = 0;\n return () => {\n id++;\n const {promise, done} = createDeferred();\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 {\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 {\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[] = [\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 = (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[] = [\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 {\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 {\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 {\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 {\n const task: StringTask = {\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 {\n return {\n commands: ['check-ignore', ...paths],\n format: 'utf-8',\n parser: parseCheckIgnore,\n };\n}\n", "import { configurationErrorTask, EmptyTask, straightThroughStringTask } from './task';\nimport { OptionFlags, Options, StringTask } from '../types';\nimport { append, filterString } from '../utils';\n\nexport type CloneOptions = Options &\n OptionFlags<'--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 OptionFlags<'--depth' | '-j' | '--jobs', number> &\n OptionFlags<'--branch' | '--origin' | '--recurse-submodules' | '--separate-git-dir' | '--shallow-exclude' | '--shallow-since' | '--template', string>\n\nfunction disallowedCommand(command: string) {\n return /^--upload-pack(=|$)/.test(command);\n}\n\nexport function cloneTask(repo: string | undefined, directory: string | undefined, customArgs: string[]): StringTask | EmptyTask {\n const commands = ['clone', ...customArgs];\n\n filterString(repo) && commands.push(repo);\n filterString(directory) && commands.push(directory);\n\n const banned = commands.find(disallowedCommand);\n if (banned) {\n return configurationErrorTask(`git.fetch: potential exploit argument blocked.`);\n }\n\n return straightThroughStringTask(commands);\n}\n\nexport function cloneMirrorTask(repo: string | undefined, directory: string | undefined, customArgs: string[]) {\n append(customArgs, '--mirror');\n\n return cloneTask(repo, directory, customArgs);\n}\n", "import { StringTask } from '../types';\nimport { DiffResult } from '../../../typings';\nimport { parseDiffResult } from '../parsers/parse-diff-summary';\n\nexport function diffSummaryTask(customArgs: string[]): StringTask {\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[] = [\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\nimport { configurationErrorTask, EmptyTask } from './task';\n\nfunction disallowedCommand(command: string) {\n return /^--upload-pack(=|$)/.test(command);\n}\n\nexport function fetchTask(remote: string, branch: string, customArgs: string[]): StringTask | EmptyTask {\n const commands = ['fetch', ...customArgs];\n if (remote && branch) {\n commands.push(remote, branch);\n }\n\n const banned = commands.find(disallowedCommand);\n if (banned) {\n return configurationErrorTask(`git.fetch: potential exploit argument blocked.`);\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[] = [\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 {\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, branch: Maybe, customArgs: string[]): StringTask {\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 {\n return straightThroughStringTask(['remote', 'add', ...customArgs, remoteName, remoteRepo]);\n}\n\nexport function getRemotesTask(verbose: boolean): StringTask {\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 {\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 {\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 {\n const options = parseLogOptions(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 {\n return subModuleTask(['add', repo, path]);\n}\n\nexport function initSubModuleTask(customArgs: string[]): StringTask {\n return subModuleTask(['init', ...customArgs]);\n}\n\nexport function subModuleTask(customArgs: string[]): StringTask {\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 {\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 {\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 * 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(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(factory: SimpleGitFactory, extra: T) {\n return Object.assign(function (...args: Parameters) {\n return factory.apply(null, args);\n },\n api,\n extra || {},\n );\n}\n\nexport function gitInstanceFactory(baseDir?: string | Partial, options?: Partial) {\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] | [string, Partial]): 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 {\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,SACD;AACC,cAAM,QAAW,WAAW,OAAO;AAHnB;AAAA;AAAA;AAAA;AAAA;;;AC5BtB,IAYO;AAZP;AAAA;AAAA;AAYO,sCAAgC,SAAS;AAAA,MAE7C,YACmB,QAChB,SACD;AACC,cAAM,QAAW;AAHD;AAAA;AAAA;AAAA;AAAA;;;ACftB,IAGO;AAHP;AAAA;AACA;AAEO,mCAA6B,SAAS;AAAA,MAE1C,YACU,MACS,QAChB,SACD;AACC,cAAM,MAAM;AAJL;AACS;AAIhB,eAAO,eAAe,MAAM,WAAW;AAAA;AAAA;AAAA;AAAA;;;ACX7C,IAUO;AAVP;AAAA;AAAA;AAUO,2CAAqC,SAAS;AAAA,MAElD,YACG,SACD;AACC,cAAM,QAAW;AAAA;AAAA;AAAA;AAAA;;;ACHhB,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,Q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AAA,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/dist/esm/index.js b/node_modules/simple-git/dist/esm/index.js -index e74bb3b..3550725 100644 ---- a/node_modules/simple-git/dist/esm/index.js -+++ b/node_modules/simple-git/dist/esm/index.js -@@ -406,9 +406,9 @@ var init_task_options = __esm({ - function callTaskParser(parser3, streams) { - return parser3(streams.stdOut, streams.stdErr); - } --function parseStringResponse(result, parsers11, texts, trim = true) { -- asArray(texts).forEach((text) => { -- for (let lines = toLinesWithContent(text, trim), i = 0, max = lines.length; i < max; i++) { -+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; -@@ -1559,26 +1559,6 @@ var init_init = __esm({ - } - }); - --// src/lib/args/log-format.ts --function logFormatFromCommand(customArgs) { -- for (let i = 0; i < customArgs.length; i++) { -- const format = logFormatRegex.exec(customArgs[i]); -- if (format) { -- return `--${format[1]}`; -- } -- } -- return "" /* NONE */; --} --function isLogFormat(customArg) { -- return logFormatRegex.test(customArg); --} --var logFormatRegex; --var init_log_format = __esm({ -- "src/lib/args/log-format.ts"() { -- logFormatRegex = /^--(stat|numstat|name-only|name-status)(=|$)/; -- } --}); -- - // src/lib/responses/DiffSummary.ts - var DiffSummary; - var init_DiffSummary = __esm({ -@@ -1595,97 +1575,74 @@ var init_DiffSummary = __esm({ - }); - - // src/lib/parsers/parse-diff-summary.ts --function getDiffParser(format = "" /* NONE */) { -- const parser3 = diffSummaryParsers[format]; -- return (stdOut) => parseStringResponse(new DiffSummary(), parser3, stdOut, false); -+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)); -+ }); - } --var statParser, numStatParser, nameOnlyParser, nameStatusParser, diffSummaryParsers; -+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_log_format(); - init_DiffSummary(); -- init_utils(); -- statParser = [ -- new LineParser(/(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/, (result, [file, changes, alterations = ""]) => { -- result.files.push({ -- file: file.trim(), -- changes: asNumber(changes), -- insertions: alterations.replace(/[^+]/g, "").length, -- deletions: alterations.replace(/[^-]/g, "").length, -- binary: false -- }); -- }), -- new LineParser(/(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/, (result, [file, before, after]) => { -- result.files.push({ -- file: file.trim(), -- before: asNumber(before), -- after: asNumber(after), -- binary: true -- }); -- }), -- new LineParser(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/, (result, [changed, summary]) => { -- const inserted = /(\d+) i/.exec(summary); -- const deleted = /(\d+) d/.exec(summary); -- result.changed = asNumber(changed); -- result.insertions = asNumber(inserted == null ? void 0 : inserted[1]); -- result.deletions = asNumber(deleted == null ? void 0 : deleted[1]); -- }) -- ]; -- numStatParser = [ -- new LineParser(/(\d+)\t(\d+)\t(.+)$/, (result, [changesInsert, changesDelete, file]) => { -- const insertions = asNumber(changesInsert); -- const deletions = asNumber(changesDelete); -- result.changed++; -- result.insertions += insertions; -- result.deletions += deletions; -- result.files.push({ -- file, -- changes: insertions + deletions, -- insertions, -- deletions, -- binary: false -- }); -- }), -- new LineParser(/-\t-\t(.+)$/, (result, [file]) => { -- result.changed++; -- result.files.push({ -- file, -- after: 0, -- before: 0, -- binary: true -- }); -- }) -- ]; -- nameOnlyParser = [ -- new LineParser(/(.+)$/, (result, [file]) => { -- result.changed++; -- result.files.push({ -- file, -- changes: 0, -- insertions: 0, -- deletions: 0, -- binary: false -- }); -- }) -- ]; -- nameStatusParser = [ -- new LineParser(/([ACDMRTUXB])\s*(.+)$/, (result, [_status, file]) => { -- result.changed++; -- result.files.push({ -- file, -- changes: 0, -- insertions: 0, -- deletions: 0, -- binary: false -- }); -- }) -- ]; -- diffSummaryParsers = { -- ["" /* NONE */]: statParser, -- ["--stat" /* STAT */]: statParser, -- ["--numstat" /* NUM_STAT */]: numStatParser, -- ["--name-status" /* NAME_STATUS */]: nameStatusParser, -- ["--name-only" /* NAME_ONLY */]: nameOnlyParser -+ statusUpdate = { -+ file(status, value) { -+ status.changed = value; -+ }, -+ deletion(status, value) { -+ status.deletions = value; -+ }, -+ insertion(status, value) { -+ status.insertions = value; -+ } - }; - } - }); -@@ -1697,8 +1654,7 @@ function lineBuilder(tokens, fields) { - return line; - }, /* @__PURE__ */ Object.create({ diff: null })); - } --function createListLogSummaryParser(splitter = SPLITTER, fields = defaultFieldNames, logFormat = "" /* NONE */) { -- const parseDiffResult = getDiffParser(logFormat); -+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); -@@ -1720,7 +1676,6 @@ var init_parse_list_log_summary = __esm({ - "src/lib/parsers/parse-list-log-summary.ts"() { - init_utils(); - init_parse_diff_summary(); -- init_log_format(); - START_BOUNDARY = "\xF2\xF2\xF2\xF2\xF2\xF2 "; - COMMIT_BOUNDARY = " \xF2\xF2"; - SPLITTER = " \xF2 "; -@@ -1728,43 +1683,6 @@ var init_parse_list_log_summary = __esm({ - } - }); - --// src/lib/tasks/diff.ts --var diff_exports = {}; --__export(diff_exports, { -- diffSummaryTask: () => diffSummaryTask, -- validateLogFormatConfig: () => validateLogFormatConfig --}); --function diffSummaryTask(customArgs) { -- let logFormat = logFormatFromCommand(customArgs); -- const commands = ["diff"]; -- if (logFormat === "" /* NONE */) { -- logFormat = "--stat" /* STAT */; -- commands.push("--stat=4096"); -- } -- commands.push(...customArgs); -- return validateLogFormatConfig(commands) || { -- commands, -- format: "utf-8", -- parser: getDiffParser(logFormat) -- }; --} --function validateLogFormatConfig(customArgs) { -- const flags = customArgs.filter(isLogFormat); -- if (flags.length > 1) { -- return configurationErrorTask(`Summary flags are mutually exclusive - pick one of ${flags.join(",")}`); -- } -- if (flags.length && customArgs.includes("-z")) { -- return configurationErrorTask(`Summary flag ${flags} parsing is not compatible with null termination option '-z'`); -- } --} --var init_diff = __esm({ -- "src/lib/tasks/diff.ts"() { -- init_log_format(); -- init_parse_diff_summary(); -- init_task(); -- } --}); -- - // src/lib/tasks/log.ts - function prettyFormat(format, splitter) { - const fields = []; -@@ -1825,19 +1743,17 @@ function parseLogOptions(opt = {}, customArgs = []) { - }; - } - function logTask(splitter, fields, customArgs) { -- const parser3 = createListLogSummaryParser(splitter, fields, logFormatFromCommand(customArgs)); - return { - commands: ["log", ...customArgs], - format: "utf-8", -- parser: parser3 -+ parser: createListLogSummaryParser(splitter, fields) - }; - } - function log_default() { - return { - log(...rest) { - const next = trailingFunctionArgument(arguments); -- const options = parseLogOptions(trailingOptionsArgument(arguments), filterType(arguments[0], filterArray)); -- const task = rejectDeprecatedSignatures(...rest) || validateLogFormatConfig(options.commands) || createLogTask(options); -+ const task = rejectDeprecatedSignatures(...rest) || createLogTask(parseLogOptions(trailingOptionsArgument(arguments), filterType(arguments[0], filterArray))); - return this._runTask(task, next); - } - }; -@@ -1851,11 +1767,9 @@ function log_default() { - var excludeOptions; - var init_log = __esm({ - "src/lib/tasks/log.ts"() { -- init_log_format(); - init_parse_list_log_summary(); - init_utils(); - init_task(); -- init_diff(); - excludeOptions = /* @__PURE__ */ ((excludeOptions2) => { - excludeOptions2[excludeOptions2["--pretty"] = 0] = "--pretty"; - excludeOptions2[excludeOptions2["max-count"] = 1] = "max-count"; -@@ -2032,7 +1946,7 @@ var init_parse_remote_messages = __esm({ - - // src/lib/parsers/parse-pull.ts - function parsePullErrorResult(stdOut, stdErr) { -- const pullError = parseStringResponse(new PullFailedSummary(), errorParsers, [stdOut, stdErr]); -+ const pullError = parseStringResponse(new PullFailedSummary(), errorParsers, stdOut, stdErr); - return pullError.message && pullError; - } - var FILE_UPDATE_REGEX, SUMMARY_REGEX, ACTION_REGEX, parsers3, errorParsers, parsePullDetail, parsePullResult; -@@ -2079,7 +1993,7 @@ var init_parse_pull = __esm({ - }) - ]; - parsePullDetail = (stdOut, stdErr) => { -- return parseStringResponse(new PullSummary(), parsers3, [stdOut, stdErr]); -+ return parseStringResponse(new PullSummary(), parsers3, stdOut, stdErr); - }; - parsePullResult = (stdOut, stdErr) => { - return Object.assign(new PullSummary(), parsePullDetail(stdOut, stdErr), parseRemoteMessages(stdOut, stdErr)); -@@ -2203,7 +2117,7 @@ var init_parse_push = __esm({ - return __spreadValues(__spreadValues({}, pushDetail), responseDetail); - }; - parsePushDetail = (stdOut, stdErr) => { -- return parseStringResponse({ pushed: [] }, parsers5, [stdOut, stdErr]); -+ return parseStringResponse({ pushed: [] }, parsers5, stdOut, stdErr); - }; - } - }); -@@ -2622,7 +2536,7 @@ var init_parse_branch_delete = __esm({ - }) - ]; - parseBranchDeletions = (stdOut, stdErr) => { -- return parseStringResponse(new BranchDeletionBatch(), parsers7, [stdOut, stdErr]); -+ return parseStringResponse(new BranchDeletionBatch(), parsers7, stdOut, stdErr); - }; - } - }); -@@ -2638,15 +2552,14 @@ var init_BranchSummary = __esm({ - this.current = ""; - this.detached = false; - } -- push(status, detached, name, commit, label) { -- if (status === "*" /* CURRENT */) { -+ push(current, detached, name, commit, label) { -+ if (current) { - this.detached = detached; - this.current = name; - } - this.all.push(name); - this.branches[name] = { -- current: status === "*" /* CURRENT */, -- linkedWorkTree: status === "+" /* LINKED */, -+ current, - name, - commit, - label -@@ -2657,9 +2570,6 @@ var init_BranchSummary = __esm({ - }); - - // src/lib/parsers/parse-branch.ts --function branchStatus(input) { -- return input ? input.charAt(0) : ""; --} - function parseBranchSummary(stdOut) { - return parseStringResponse(new BranchSummaryResult(), parsers8, stdOut); - } -@@ -2669,11 +2579,11 @@ var init_parse_branch = __esm({ - init_BranchSummary(); - init_utils(); - parsers8 = [ -- new LineParser(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/, (result, [current, name, commit, label]) => { -- result.push(branchStatus(current), true, name, commit, label); -+ 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(branchStatus(current), false, 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); - }) - ]; - } -@@ -2818,6 +2728,26 @@ var init_clone = __esm({ - } - }); - -+// 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 = { -@@ -2826,7 +2756,7 @@ function parseFetchResult(stdOut, stdErr) { - branches: [], - tags: [] - }; -- return parseStringResponse(result, parsers9, [stdOut, stdErr]); -+ return parseStringResponse(result, parsers9, stdOut, stdErr); - } - var parsers9; - var init_parse_fetch = __esm({ -@@ -3034,19 +2964,16 @@ __export(stash_list_exports, { - }); - function stashListTask(opt = {}, customArgs) { - const options = parseLogOptions(opt); -- const commands = ["stash", "list", ...options.commands, ...customArgs]; -- const parser3 = createListLogSummaryParser(options.splitter, options.fields, logFormatFromCommand(commands)); -- return validateLogFormatConfig(commands) || { -- commands, -+ 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_log_format(); - init_parse_list_log_summary(); -- init_diff(); - init_log(); - } - }); -@@ -3854,7 +3781,6 @@ function toError(error) { - } - - // src/esm.mjs --var simpleGit = gitInstanceFactory; - var esm_default = gitInstanceFactory; - export { - CheckRepoActions, -@@ -3868,7 +3794,6 @@ export { - TaskConfigurationError, - esm_default as default, - gitP, -- grepQueryBuilder, -- simpleGit -+ grepQueryBuilder - }; - //# sourceMappingURL=index.js.map -diff --git a/node_modules/simple-git/dist/esm/index.js.map b/node_modules/simple-git/dist/esm/index.js.map -index dba5dc5..731ce16 100644 ---- a/node_modules/simple-git/dist/esm/index.js.map -+++ b/node_modules/simple-git/dist/esm/index.js.map -@@ -1,7 +1,7 @@ - { - "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/parsers/parse-commit.ts", "../../src/lib/tasks/commit.ts", "../../src/lib/tasks/hash-object.ts", "../../src/lib/responses/InitSummary.ts", "../../src/lib/tasks/init.ts", "../../src/lib/args/log-format.ts", "../../src/lib/responses/DiffSummary.ts", "../../src/lib/parsers/parse-diff-summary.ts", "../../src/lib/parsers/parse-list-log-summary.ts", "../../src/lib/tasks/diff.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-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 type { 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,\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) => e.git);\n\n if (mergeSummary.failed) {\n // deal with the error\n }\n ```\n */\nexport class GitResponseError 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 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(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(input: T, offset?: number): Maybe;\nexport function first(input: T, offset?: number): Maybe;\nexport function first(input: any[] | IArguments, offset = 0): Maybe {\n return isArrayLike(input) && input.length > offset ? input[offset] : undefined;\n}\n\nexport function last(input: T, offset?: number): Maybe;\nexport function last(input: T, offset?: number): Maybe;\nexport function last(input: T, offset?: number): Maybe;\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[] | 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 = (line: string) => T;\n\nexport function forEachLineWithContent(input: string, callback: LineWithContentCallback): 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(target: T[] | Set, 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(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(target: Set | 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(source: T | T[]): T[] {\n return Array.isArray(source) ? source : [source];\n}\n\nexport function asStringArray(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(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, properties: string[]) {\n return Object.assign({}, ...properties.map((property) => property in source ? {[property]: source[property]} : {}));\n}\n\nexport function delay(duration = 0): Promise {\n return new Promise(done => setTimeout(done, duration));\n}\n", "import { Maybe, Options, Primitives } from '../types';\nimport { objectToString } from './util';\n\nexport interface ArgumentFilterPredicate {\n (input: any): input is T;\n}\n\nexport function filterType(input: K, filter: ArgumentFilterPredicate): K extends T ? T : undefined;\nexport function filterType(input: K, filter: ArgumentFilterPredicate, def: T): T;\nexport function filterType(input: K, filter: ArgumentFilterPredicate, def?: T): Maybe {\n if (filter(input)) {\n return input;\n }\n return (arguments.length > 2) ? def : undefined\n}\n\nexport const filterArray: ArgumentFilterPredicate> = (input): input is Array => {\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 = (input): input is string => {\n return typeof input === 'string';\n};\n\nexport const filterStringArray: ArgumentFilterPredicate = (input): input is string[] => {\n return Array.isArray(input) && input.every(filterString);\n};\n\nexport const filterStringOrStringArray: ArgumentFilterPredicate = (input): input is string | string[] => {\n return filterString(input) || (Array.isArray(input) && input.every(filterString));\n};\n\nexport function filterPlainObject(input: T | unknown): input is T;\nexport function filterPlainObject(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 {\n\n constructor(public readonly stdOut: T, public readonly stdErr: T) {\n }\n\n asStrings(): GitOutputStreams {\n return new GitOutputStreams(this.stdOut.toString('utf8'), this.stdErr.toString('utf8'));\n }\n}\n", "export class LineParser {\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 extends LineParser {\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 = {\n binary: 'git',\n maxConcurrentProcesses: 5,\n config: [],\n};\n\nexport function createInstanceConfig(...options: Array | 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(options: Maybe, commands: string[] = []): string[] {\n if (!filterPlainObject(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 {\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 type { MaybeArray, TaskParser, TaskResponseFormat } from '../types';\nimport { GitOutputStreams } from './git-output-streams';\nimport { LineParser } from './line-parser';\nimport { asArray, toLinesWithContent } from './util';\n\nexport function callTaskParser(parser: TaskParser, streams: GitOutputStreams) {\n return parser(streams.stdOut, streams.stdErr);\n}\n\nexport function parseStringResponse(result: T, parsers: LineParser[], texts: MaybeArray, trim = true): T {\n asArray(texts).forEach(text => {\n for (let lines = toLinesWithContent(text, trim), 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['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['parser'] = (text) => {\n return text.trim() === 'true';\n}\n\nexport function checkIsRepoTask(action: Maybe): StringTask {\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 {\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 {\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 type { 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 {\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 {\n return {\n commands,\n format: 'buffer',\n parser(buffer) {\n return buffer;\n },\n }\n}\n\nexport function isBufferTask(task: SimpleGitTask): task is BufferTask {\n return task.format === 'buffer';\n}\n\nexport function isEmptyTask(task: SimpleGitTask): 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 = 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 {\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;\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 = 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(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 {\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 {\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 {\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 {\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 {\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();\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 {\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, 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 {\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, childDebugger: Maybe, {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 = (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;\n\ntype TaskInProgress = {\n name: string;\n logger: OutputLogger;\n task: AnySimpleGitTask;\n}\n\nexport class TasksPendingQueue {\n\n private _queue: Map = 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 = 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(task: SimpleGitTask): Promise {\n this._queue.push(task);\n\n return this._chain = this._chain.then(() => this.attemptTask(task));\n }\n\n private async attemptTask(task: SimpleGitTask): Promise {\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 as Error);\n } finally {\n onQueueComplete();\n onScheduleComplete();\n }\n }\n\n private onFatalException(task: SimpleGitTask, 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(task: RunnableTask, 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(\n task: SimpleGitTask,\n args: string[],\n result: GitExecutorResult, logger: OutputLogger): Promise {\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(task: SimpleGitTask, command: string, args: string[], outputHandler: Maybe, logger: OutputLogger): Promise {\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;\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(task: SimpleGitTask, 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 type { PluginStore } from '../plugins';\nimport type { 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(task: SimpleGitTask): Promise {\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(task: SimpleGitTask, response: Promise, callback: SimpleGitTaskCallback = 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 { CommitResult } from '../../../typings';\nimport { LineParser, parseStringResponse } from '../utils';\n\nconst parsers: LineParser[] = [\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 type { CommitResult, SimpleGit } from '../../../typings';\nimport type { SimpleGitApi } from '../simple-git-api';\nimport type { StringTask } from '../types';\nimport { parseCommitResult } from '../parsers/parse-commit';\nimport {\n asArray,\n filterArray,\n filterStringOrStringArray,\n filterType,\n getTrailingOptions, prefixedArray,\n trailingFunctionArgument\n} from '../utils';\nimport { configurationErrorTask } from './task';\n\nexport function commitTask(message: string[], files: string[], customArgs: string[]): StringTask {\n const commands: string[] = [\n '-c',\n 'core.abbrev=40',\n 'commit',\n ...prefixedArray(message, '-m'),\n ...files,\n ...customArgs,\n ];\n\n return {\n commands,\n format: 'utf-8',\n parser: parseCommitResult,\n };\n}\n\nexport default function (): Pick {\n return {\n commit(this: SimpleGitApi, message: string | string[], ...rest: unknown[]) {\n const next = trailingFunctionArgument(arguments);\n const task = rejectDeprecatedSignatures(message) ||\n commitTask(\n asArray(message),\n asArray(filterType(rest[0], filterStringOrStringArray, [])),\n [...filterType(rest[1], filterArray, []), ...getTrailingOptions(arguments, 0, true)]\n );\n\n return this._runTask(task, next);\n },\n };\n\n function rejectDeprecatedSignatures(message?: unknown) {\n return (\n !filterStringOrStringArray(message) &&\n configurationErrorTask(`git.commit: requires the commit message to be supplied as a string/string[]`)\n );\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 {\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 {\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", "export enum LogFormat {\n NONE = '',\n STAT = '--stat',\n NUM_STAT = '--numstat',\n NAME_ONLY = '--name-only',\n NAME_STATUS = '--name-status',\n}\n\nconst logFormatRegex = /^--(stat|numstat|name-only|name-status)(=|$)/;\n\nexport function logFormatFromCommand(customArgs: string[]) {\n for (let i = 0; i < customArgs.length; i++) {\n const format = logFormatRegex.exec(customArgs[i]);\n if (format) {\n return `--${format[1]}` as LogFormat;\n }\n }\n\n return LogFormat.NONE;\n}\n\nexport function isLogFormat(customArg: string | unknown) {\n return logFormatRegex.test(customArg as string);\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 = [];\n}\n", "import { DiffResult } from '../../../typings';\nimport { LogFormat } from '../args/log-format';\nimport { DiffSummary } from '../responses/DiffSummary';\nimport { asNumber, LineParser, parseStringResponse } from '../utils';\n\nconst statParser = [\n new LineParser(/(.+)\\s+\\|\\s+(\\d+)(\\s+[+\\-]+)?$/, (result, [file, changes, alterations = '']) => {\n result.files.push({\n file: file.trim(),\n changes: asNumber(changes),\n insertions: alterations.replace(/[^+]/g, '').length,\n deletions: alterations.replace(/[^-]/g, '').length,\n binary: false\n });\n }),\n new LineParser(/(.+) \\|\\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/, (result, [file, before, after]) => {\n result.files.push({\n file: file.trim(),\n before: asNumber(before),\n after: asNumber(after),\n binary: true\n });\n }),\n new LineParser(/(\\d+) files? changed\\s*((?:, \\d+ [^,]+){0,2})/, (result, [changed, summary]) => {\n const inserted = /(\\d+) i/.exec(summary);\n const deleted = /(\\d+) d/.exec(summary);\n\n result.changed = asNumber(changed);\n result.insertions = asNumber(inserted?.[1]);\n result.deletions = asNumber(deleted?.[1]);\n })\n];\n\nconst numStatParser = [\n new LineParser(/(\\d+)\\t(\\d+)\\t(.+)$/, (result, [changesInsert, changesDelete, file]) => {\n const insertions = asNumber(changesInsert);\n const deletions = asNumber(changesDelete);\n\n result.changed++;\n result.insertions += insertions;\n result.deletions += deletions;\n\n result.files.push({\n file,\n changes: insertions + deletions,\n insertions,\n deletions,\n binary: false,\n });\n }),\n new LineParser(/-\\t-\\t(.+)$/, (result, [file]) => {\n result.changed++;\n\n result.files.push({\n file,\n after: 0,\n before: 0,\n binary: true,\n });\n })\n];\n\nconst nameOnlyParser = [\n new LineParser(/(.+)$/, (result, [file]) => {\n result.changed++;\n result.files.push({\n file,\n changes: 0,\n insertions: 0,\n deletions: 0,\n binary: false,\n });\n })\n];\n\nconst nameStatusParser = [\n new LineParser(/([ACDMRTUXB])\\s*(.+)$/, (result, [_status, file]) => {\n result.changed++;\n result.files.push({\n file,\n changes: 0,\n insertions: 0,\n deletions: 0,\n binary: false,\n });\n })\n];\n\nconst diffSummaryParsers: Record[]> = {\n [LogFormat.NONE]: statParser,\n [LogFormat.STAT]: statParser,\n [LogFormat.NUM_STAT]: numStatParser,\n [LogFormat.NAME_STATUS]: nameStatusParser,\n [LogFormat.NAME_ONLY]: nameOnlyParser,\n};\n\nexport function getDiffParser(format = LogFormat.NONE) {\n const parser = diffSummaryParsers[format];\n\n return (stdOut: string) => parseStringResponse(new DiffSummary(), parser, stdOut, false);\n}\n", "import { ListLogLine, LogResult } from '../../../typings';\nimport { toLinesWithContent } from '../utils';\nimport { getDiffParser } from './parse-diff-summary';\nimport { LogFormat } from '../args/log-format';\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 (splitter = SPLITTER, fields = defaultFieldNames, logFormat = LogFormat.NONE) {\n const parseDiffResult = getDiffParser(logFormat);\n\n return function (stdOut: string): LogResult {\n const all: ReadonlyArray = 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 { StringTask } from '../types';\nimport { DiffResult } from '../../../typings';\nimport { isLogFormat, LogFormat, logFormatFromCommand } from '../args/log-format';\nimport { getDiffParser } from '../parsers/parse-diff-summary';\nimport { configurationErrorTask, EmptyTask } from './task';\n\nexport function diffSummaryTask(customArgs: string[]): StringTask | EmptyTask {\n let logFormat = logFormatFromCommand(customArgs);\n\n const commands = ['diff'];\n\n if (logFormat === LogFormat.NONE) {\n logFormat = LogFormat.STAT;\n commands.push('--stat=4096');\n }\n\n commands.push(...customArgs);\n\n return validateLogFormatConfig(commands) || {\n commands,\n format: 'utf-8',\n parser: getDiffParser(logFormat),\n };\n}\n\nexport function validateLogFormatConfig(customArgs: unknown[]): EmptyTask | void {\n const flags = customArgs.filter(isLogFormat);\n\n if (flags.length > 1) {\n return configurationErrorTask(`Summary flags are mutually exclusive - pick one of ${flags.join(',')}`);\n }\n\n if (flags.length && customArgs.includes('-z')) {\n return configurationErrorTask(`Summary flag ${flags} parsing is not compatible with null termination option '-z'`);\n }\n}\n", "import type { Options, StringTask } from '../types';\nimport type { LogResult, SimpleGit } from '../../../typings';\nimport { logFormatFromCommand } from '../args/log-format';\nimport {\n COMMIT_BOUNDARY,\n createListLogSummaryParser,\n SPLITTER,\n START_BOUNDARY\n} from '../parsers/parse-list-log-summary';\nimport {\n appendTaskOptions,\n filterArray,\n filterPrimitives,\n filterString,\n filterType,\n trailingFunctionArgument,\n trailingOptionsArgument\n} from '../utils';\nimport { SimpleGitApi } from '../simple-git-api';\nimport { configurationErrorTask } from './task';\nimport { validateLogFormatConfig } from './diff';\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 = {\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: Record, 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(input: T): Options {\n return Object.keys(input).reduce((out, key) => {\n if (!(key in excludeOptions)) {\n out[key] = input[key];\n }\n return out;\n }, {} as Options);\n}\n\nexport function parseLogOptions(opt: Options | LogOptions = {}, customArgs: string[] = []): ParsedLogOptions {\n const splitter = filterType(opt.splitter, filterString, SPLITTER);\n const format = !filterPrimitives(opt.format) && opt.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 (filterString(opt.file)) {\n suffix.push('--follow', opt.file);\n }\n\n appendTaskOptions(userOptions(opt as Options), command);\n\n return {\n fields,\n splitter,\n commands: [\n ...command,\n ...suffix,\n ],\n };\n}\n\nexport function logTask(splitter: string, fields: string[], customArgs: string[]): StringTask> {\n const parser = createListLogSummaryParser(splitter, fields, logFormatFromCommand(customArgs));\n\n return {\n commands: ['log', ...customArgs],\n format: 'utf-8',\n parser,\n };\n}\n\nexport default function (): Pick {\n return {\n log(this: SimpleGitApi, ...rest: unknown[]) {\n const next = trailingFunctionArgument(arguments);\n const options = parseLogOptions(trailingOptionsArgument(arguments), filterType(arguments[0], filterArray));\n const task = rejectDeprecatedSignatures(...rest) ||\n validateLogFormatConfig(options.commands) ||\n createLogTask(options);\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(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>[] = [\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>[] = [\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(\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[] = [\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[] = [\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 = (stdOut, stdErr) => {\n return parseStringResponse(new PullSummary(), parsers, [stdOut, stdErr]);\n}\n\nexport const parsePullResult: TaskParser = (stdOut, stdErr) => {\n return Object.assign(\n new PullSummary(),\n parsePullDetail(stdOut, stdErr),\n parseRemoteMessages(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[] = [\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 = (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 = (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 {\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[] = [\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 = (stdOut, stdErr) => {\n const pushDetail = parsePushDetail(stdOut, stdErr);\n const responseDetail = parseRemoteMessages(stdOut, stdErr);\n\n return {\n ...pushDetail,\n ...responseDetail,\n };\n}\n\nexport const parsePushDetail: TaskParser = (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 {\n append(customArgs, '--tags');\n return pushTask(ref, customArgs);\n}\n\nexport function pushTask(ref: PushRef = {}, customArgs: string[]): StringTask {\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';\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, NULL } 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 = () => {\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 [to, from] = line.split(NULL);\n\n return {\n from: from || to,\n to,\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 = 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.split(NULL);\n const status = new StatusSummary();\n\n for (let i = 0, l = lines.length; i < l;) {\n let line = lines[i++].trim();\n\n if (!line) {\n continue;\n }\n\n if (line.charAt(0) === PorcelainFileStatus.RENAMED) {\n line += NULL + (lines[i++] || '');\n }\n\n splitLine(status, line);\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.replace(/\\0.+$/, ''), index, workingDir));\n }\n }\n}\n", "import { StatusResult } from '../../../typings';\nimport { parseStatusSummary } from '../responses/StatusSummary';\nimport { StringTask } from '../types';\n\nconst ignoredOptions = ['--null', '-z'];\n\nexport function statusTask(customArgs: string[]): StringTask {\n const commands = [\n 'status',\n '--porcelain',\n '-b',\n '-u',\n '--null',\n ...customArgs.filter(arg => !ignoredOptions.includes(arg))\n ];\n\n return {\n format: 'utf-8',\n commands,\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 commit from './tasks/commit';\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(task: SimpleGitTask, then?: SimpleGitTaskCallback) {\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, commit(), 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, 'promise' | 'done'> & {id: number};\n\nconst createScheduledTask: () => ScheduledTask = (() => {\n let id = 0;\n return () => {\n id++;\n const {promise, done} = createDeferred();\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 {\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 {\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[] = [\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 = (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 type { BranchSummary, BranchSummaryBranch } from '../../../typings';\n\nexport enum BranchStatusIdentifier {\n CURRENT = '*',\n LINKED = '+',\n}\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(status: BranchStatusIdentifier | unknown, detached: boolean, name: string, commit: string, label: string) {\n if (status === BranchStatusIdentifier.CURRENT) {\n this.detached = detached;\n this.current = name;\n }\n\n this.all.push(name);\n this.branches[name] = {\n current: status === BranchStatusIdentifier.CURRENT,\n linkedWorkTree: status === BranchStatusIdentifier.LINKED,\n name,\n commit,\n label\n };\n }\n}\n\n", "import type { BranchSummary } from '../../../typings';\nimport { BranchSummaryResult } from '../responses/BranchSummary';\nimport { LineParser, parseStringResponse } from '../utils';\n\nconst parsers: LineParser[] = [\n new LineParser(/^([*+]\\s)?\\((?:HEAD )?detached (?:from|at) (\\S+)\\)\\s+([a-z0-9]+)\\s(.*)$/, (result, [current, name, commit, label]) => {\n result.push(\n branchStatus(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 branchStatus(current),\n false,\n name, commit, label\n );\n })\n];\n\nfunction branchStatus(input?: string) {\n return input ? input.charAt(0) : '';\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 {\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 {\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 {\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 {\n const task: StringTask = {\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 {\n return {\n commands: ['check-ignore', ...paths],\n format: 'utf-8',\n parser: parseCheckIgnore,\n };\n}\n", "import { configurationErrorTask, EmptyTask, straightThroughStringTask } from './task';\nimport { OptionFlags, Options, StringTask } from '../types';\nimport { append, filterString } from '../utils';\n\nexport type CloneOptions = Options &\n OptionFlags<'--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 OptionFlags<'--depth' | '-j' | '--jobs', number> &\n OptionFlags<'--branch' | '--origin' | '--recurse-submodules' | '--separate-git-dir' | '--shallow-exclude' | '--shallow-since' | '--template', string>\n\nfunction disallowedCommand(command: string) {\n return /^--upload-pack(=|$)/.test(command);\n}\n\nexport function cloneTask(repo: string | undefined, directory: string | undefined, customArgs: string[]): StringTask | EmptyTask {\n const commands = ['clone', ...customArgs];\n\n filterString(repo) && commands.push(repo);\n filterString(directory) && commands.push(directory);\n\n const banned = commands.find(disallowedCommand);\n if (banned) {\n return configurationErrorTask(`git.fetch: potential exploit argument blocked.`);\n }\n\n return straightThroughStringTask(commands);\n}\n\nexport function cloneMirrorTask(repo: string | undefined, directory: string | undefined, customArgs: string[]) {\n append(customArgs, '--mirror');\n\n return cloneTask(repo, directory, customArgs);\n}\n", "import { FetchResult } from '../../../typings';\nimport { LineParser, parseStringResponse } from '../utils';\n\nconst parsers: LineParser[] = [\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\nimport { configurationErrorTask, EmptyTask } from './task';\n\nfunction disallowedCommand(command: string) {\n return /^--upload-pack(=|$)/.test(command);\n}\n\nexport function fetchTask(remote: string, branch: string, customArgs: string[]): StringTask | EmptyTask {\n const commands = ['fetch', ...customArgs];\n if (remote && branch) {\n commands.push(remote, branch);\n }\n\n const banned = commands.find(disallowedCommand);\n if (banned) {\n return configurationErrorTask(`git.fetch: potential exploit argument blocked.`);\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[] = [\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 {\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, branch: Maybe, customArgs: string[]): StringTask {\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 {\n return straightThroughStringTask(['remote', 'add', ...customArgs, remoteName, remoteRepo]);\n}\n\nexport function getRemotesTask(verbose: boolean): StringTask {\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 {\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 {\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 { logFormatFromCommand } from '../args/log-format';\nimport { createListLogSummaryParser } from '../parsers/parse-list-log-summary';\nimport type { StringTask } from '../types';\nimport { validateLogFormatConfig } from './diff';\nimport { parseLogOptions } from './log';\nimport type { EmptyTask } from './task';\n\nexport function stashListTask(opt: LogOptions = {}, customArgs: string[]): EmptyTask | StringTask {\n const options = parseLogOptions(opt);\n const commands = ['stash', 'list', ...options.commands, ...customArgs];\n const parser = createListLogSummaryParser(options.splitter, options.fields, logFormatFromCommand(commands));\n\n return validateLogFormatConfig(commands) || {\n commands,\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 {\n return subModuleTask(['add', repo, path]);\n}\n\nexport function initSubModuleTask(customArgs: string[]): StringTask {\n return subModuleTask(['init', ...customArgs]);\n}\n\nexport function subModuleTask(customArgs: string[]): StringTask {\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 {\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 {\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 * 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", "import { SimpleGitOptions, SimpleGitTask } from '../types';\nimport { GitError } from './git-error';\n\nexport class GitPluginError extends GitError {\n\n constructor (\n public task?: SimpleGitTask,\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, timeout: DeferredPromise) {\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 as Error);\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;\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> = new Set();\n\n public add(plugin: void | SimpleGitPlugin | SimpleGitPlugin[]) {\n const plugins: SimpleGitPlugin[] = [];\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(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) {\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): 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): 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 timeout && clearTimeout(timeout);\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(defaultExport: T) {\n return Object.defineProperties(defaultExport, {\n __esModule: {value: true},\n default: {value: defaultExport},\n }) as T & { __esModule: true, default: T };\n}\n\nexport function gitExportFactory(factory: SimpleGitFactory) {\n return Object.assign(factory.bind(null), api);\n}\n\nexport function gitInstanceFactory(baseDir?: string | Partial, options?: Partial) {\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] | [string, Partial]): 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 {\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 const simpleGit = gitInstanceFactory;\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,CAA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M,QAAQ;AAAA;AAGxB,WAAO;AAAA,KACP;AAEH,SAAO;AAEP,wBAAsB,IAAY,MAA4C;AAC3E,WAAO,YAAa,OAAa;AAC9B,UAAI,OAAO,MAAK,MAAK,YAAY,YAAY;AAC1C,cAAM,IAAI,UACP,gHAC8C;AAAA;AAGpD,aAAO,MAAM,KAAK,WAAY;AAC3B,eAAO,IAAI,QAAQ,SAAU,SAAS,QAAQ;AAC3C,gBAAM,WAAkC,CAAC,KAAmB,WAAiB;AAC1E,gBAAI,KAAK;AACN,qBAAO,OAAO,QAAQ;AAAA;AAGzB,oBAAQ;AAAA;AAEX,gBAAK,KAAK;AAEV,eAAI,IAAI,MAAM,MAAK;AAAA;AAAA;AAAA;AAAA;AAM/B,uBAAqB,IAAY,MAAU,KAAgB;AACxD,WAAO,IAAI,UAAgB;AACxB,WAAI,IAAI,GAAG;AAEX,aAAO;AAAA;AAAA;AAAA;AAKhB,iBAAiB,OAAoC;AAElD,MAAI,iBAAiB,OAAO;AACzB,WAAO;AAAA;AAGV,MAAI,OAAO,UAAU,UAAU;AAC5B,WAAO,IAAI,MAAM;AAAA;AAGpB,SAAO,IAAI,iBAAiB;AAAA;;;ACnJxB,IAAM,YAAY;AAEzB,IAAO,cAAQ;", -+ "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/parsers/parse-commit.ts", "../../src/lib/tasks/commit.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/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,\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) => e.git);\n\n if (mergeSummary.failed) {\n // deal with the error\n }\n ```\n */\nexport class GitResponseError 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 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(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(input: T, offset?: number): Maybe;\nexport function first(input: T, offset?: number): Maybe;\nexport function first(input: any[] | IArguments, offset = 0): Maybe {\n return isArrayLike(input) && input.length > offset ? input[offset] : undefined;\n}\n\nexport function last(input: T, offset?: number): Maybe;\nexport function last(input: T, offset?: number): Maybe;\nexport function last(input: T, offset?: number): Maybe;\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[] | 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 = (line: string) => T;\n\nexport function forEachLineWithContent(input: string, callback: LineWithContentCallback): 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(target: T[] | Set, 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(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(target: Set | 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(source: T | T[]): T[] {\n return Array.isArray(source) ? source : [source];\n}\n\nexport function asStringArray(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(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, properties: string[]) {\n return Object.assign({}, ...properties.map((property) => property in source ? {[property]: source[property]} : {}));\n}\n\nexport function delay(duration = 0): Promise {\n return new Promise(done => setTimeout(done, duration));\n}\n", "import { Maybe, Options, Primitives } from '../types';\nimport { objectToString } from './util';\n\nexport interface ArgumentFilterPredicate {\n (input: any): input is T;\n}\n\nexport function filterType(input: K, filter: ArgumentFilterPredicate): K extends T ? T : undefined;\nexport function filterType(input: K, filter: ArgumentFilterPredicate, def: T): T;\nexport function filterType(input: K, filter: ArgumentFilterPredicate, def?: T): Maybe {\n if (filter(input)) {\n return input;\n }\n return (arguments.length > 2) ? def : undefined\n}\n\nexport const filterArray: ArgumentFilterPredicate> = (input): input is Array => {\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 = (input): input is string => {\n return typeof input === 'string';\n};\n\nexport const filterStringArray: ArgumentFilterPredicate = (input): input is string[] => {\n return Array.isArray(input) && input.every(filterString);\n};\n\nexport const filterStringOrStringArray: ArgumentFilterPredicate = (input): input is string | string[] => {\n return filterString(input) || (Array.isArray(input) && input.every(filterString));\n};\n\nexport function filterPlainObject(input: T | unknown): input is T;\nexport function filterPlainObject(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 {\n\n constructor(public readonly stdOut: T, public readonly stdErr: T) {\n }\n\n asStrings(): GitOutputStreams {\n return new GitOutputStreams(this.stdOut.toString('utf8'), this.stdErr.toString('utf8'));\n }\n}\n", "export class LineParser {\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 extends LineParser {\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 = {\n binary: 'git',\n maxConcurrentProcesses: 5,\n config: [],\n};\n\nexport function createInstanceConfig(...options: Array | 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(options: Maybe, commands: string[] = []): string[] {\n if (!filterPlainObject(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 {\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(parser: TaskParser, streams: GitOutputStreams) {\n return parser(streams.stdOut, streams.stdErr);\n}\n\nexport function parseStringResponse(result: T, parsers: LineParser[], ...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['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['parser'] = (text) => {\n return text.trim() === 'true';\n}\n\nexport function checkIsRepoTask(action: Maybe): StringTask {\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 {\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 {\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 {\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 {\n return {\n commands,\n format: 'buffer',\n parser(buffer) {\n return buffer;\n },\n }\n}\n\nexport function isBufferTask(task: SimpleGitTask): task is BufferTask {\n return task.format === 'buffer';\n}\n\nexport function isEmptyTask(task: SimpleGitTask): 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 = 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 {\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;\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 = 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(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 {\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 {\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 {\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 {\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 {\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();\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 {\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, 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 {\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, childDebugger: Maybe, {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 = (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;\n\ntype TaskInProgress = {\n name: string;\n logger: OutputLogger;\n task: AnySimpleGitTask;\n}\n\nexport class TasksPendingQueue {\n\n private _queue: Map = 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 = 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(task: SimpleGitTask): Promise {\n this._queue.push(task);\n\n return this._chain = this._chain.then(() => this.attemptTask(task));\n }\n\n private async attemptTask(task: SimpleGitTask): Promise {\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(task: SimpleGitTask, 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(task: RunnableTask, 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(\n task: SimpleGitTask,\n args: string[],\n result: GitExecutorResult, logger: OutputLogger): Promise {\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(task: SimpleGitTask, command: string, args: string[], outputHandler: Maybe, logger: OutputLogger): Promise {\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;\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(task: SimpleGitTask, 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 type { PluginStore } from '../plugins';\nimport type { 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(task: SimpleGitTask): Promise {\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(task: SimpleGitTask, response: Promise, callback: SimpleGitTaskCallback = 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 { CommitResult } from '../../../typings';\nimport { LineParser, parseStringResponse } from '../utils';\n\nconst parsers: LineParser[] = [\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 type { CommitResult, SimpleGit } from '../../../typings';\nimport type { SimpleGitApi } from '../simple-git-api';\nimport type { StringTask } from '../types';\nimport { parseCommitResult } from '../parsers/parse-commit';\nimport {\n asArray,\n filterArray,\n filterStringOrStringArray,\n filterType,\n getTrailingOptions, prefixedArray,\n trailingFunctionArgument\n} from '../utils';\nimport { configurationErrorTask } from './task';\n\nexport function commitTask(message: string[], files: string[], customArgs: string[]): StringTask {\n const commands: string[] = [\n '-c',\n 'core.abbrev=40',\n 'commit',\n ...prefixedArray(message, '-m'),\n ...files,\n ...customArgs,\n ];\n\n return {\n commands,\n format: 'utf-8',\n parser: parseCommitResult,\n };\n}\n\nexport default function (): Pick {\n return {\n commit(this: SimpleGitApi, message: string | string[], ...rest: unknown[]) {\n const next = trailingFunctionArgument(arguments);\n const task = rejectDeprecatedSignatures(message) ||\n commitTask(\n asArray(message),\n asArray(filterType(rest[0], filterStringOrStringArray, [])),\n [...filterType(rest[1], filterArray, []), ...getTrailingOptions(arguments, 0, true)]\n );\n\n return this._runTask(task, next);\n },\n };\n\n function rejectDeprecatedSignatures(message?: unknown) {\n return (\n !filterStringOrStringArray(message) &&\n configurationErrorTask(`git.commit: requires the commit message to be supplied as a string/string[]`)\n );\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 {\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 {\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 = [];\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 (splitter = SPLITTER, fields = defaultFieldNames) {\n return function (stdOut: string): LogResult {\n const all: ReadonlyArray = 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 filterPrimitives,\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 = {\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: Record, 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(input: T): Options {\n return Object.keys(input).reduce((out, key) => {\n if (!(key in excludeOptions)) {\n out[key] = input[key];\n }\n return out;\n }, {} as Options);\n}\n\nexport function parseLogOptions(opt: Options | LogOptions = {}, customArgs: string[] = []): ParsedLogOptions {\n const splitter = filterType(opt.splitter, filterString, SPLITTER);\n const format = !filterPrimitives(opt.format) && opt.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 (filterString(opt.file)) {\n suffix.push('--follow', opt.file);\n }\n\n appendTaskOptions(userOptions(opt as Options), command);\n\n return {\n fields,\n splitter,\n commands: [\n ...command,\n ...suffix,\n ],\n };\n}\n\nexport function logTask(splitter: string, fields: string[], customArgs: string[]): StringTask> {\n return {\n commands: ['log', ...customArgs],\n format: 'utf-8',\n parser: createListLogSummaryParser(splitter, fields),\n };\n}\n\nexport default function (): Pick {\n return {\n log(this: SimpleGitApi, ...rest: unknown[]) {\n const next = trailingFunctionArgument(arguments);\n const task = rejectDeprecatedSignatures(...rest) ||\n createLogTask(parseLogOptions(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(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>[] = [\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>[] = [\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(\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[] = [\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[] = [\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 = (stdOut, stdErr) => {\n return parseStringResponse(new PullSummary(), parsers, stdOut, stdErr);\n}\n\nexport const parsePullResult: TaskParser = (stdOut, stdErr) => {\n return Object.assign(\n new PullSummary(),\n parsePullDetail(stdOut, stdErr),\n parseRemoteMessages(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[] = [\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 = (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 = (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 {\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[] = [\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 = (stdOut, stdErr) => {\n const pushDetail = parsePushDetail(stdOut, stdErr);\n const responseDetail = parseRemoteMessages(stdOut, stdErr);\n\n return {\n ...pushDetail,\n ...responseDetail,\n };\n}\n\nexport const parsePushDetail: TaskParser = (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 {\n append(customArgs, '--tags');\n return pushTask(ref, customArgs);\n}\n\nexport function pushTask(ref: PushRef = {}, customArgs: string[]): StringTask {\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';\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, NULL } 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 = () => {\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 [to, from] = line.split(NULL);\n\n return {\n from: from || to,\n to,\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 = 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.split(NULL);\n const status = new StatusSummary();\n\n for (let i = 0, l = lines.length; i < l;) {\n let line = lines[i++].trim();\n\n if (!line) {\n continue;\n }\n\n if (line.charAt(0) === PorcelainFileStatus.RENAMED) {\n line += NULL + (lines[i++] || '');\n }\n\n splitLine(status, line);\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.replace(/\\0.+$/, ''), index, workingDir));\n }\n }\n}\n", "import { StatusResult } from '../../../typings';\nimport { parseStatusSummary } from '../responses/StatusSummary';\nimport { StringTask } from '../types';\n\nconst ignoredOptions = ['--null', '-z'];\n\nexport function statusTask(customArgs: string[]): StringTask {\n const commands = [\n 'status',\n '--porcelain',\n '-b',\n '-u',\n '--null',\n ...customArgs.filter(arg => !ignoredOptions.includes(arg))\n ];\n\n return {\n format: 'utf-8',\n commands,\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 commit from './tasks/commit';\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(task: SimpleGitTask, then?: SimpleGitTaskCallback) {\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, commit(), 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, 'promise' | 'done'> & {id: number};\n\nconst createScheduledTask: () => ScheduledTask = (() => {\n let id = 0;\n return () => {\n id++;\n const {promise, done} = createDeferred();\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 {\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 {\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[] = [\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 = (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[] = [\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 {\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 {\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 {\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 {\n const task: StringTask = {\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 {\n return {\n commands: ['check-ignore', ...paths],\n format: 'utf-8',\n parser: parseCheckIgnore,\n };\n}\n", "import { configurationErrorTask, EmptyTask, straightThroughStringTask } from './task';\nimport { OptionFlags, Options, StringTask } from '../types';\nimport { append, filterString } from '../utils';\n\nexport type CloneOptions = Options &\n OptionFlags<'--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 OptionFlags<'--depth' | '-j' | '--jobs', number> &\n OptionFlags<'--branch' | '--origin' | '--recurse-submodules' | '--separate-git-dir' | '--shallow-exclude' | '--shallow-since' | '--template', string>\n\nfunction disallowedCommand(command: string) {\n return /^--upload-pack(=|$)/.test(command);\n}\n\nexport function cloneTask(repo: string | undefined, directory: string | undefined, customArgs: string[]): StringTask | EmptyTask {\n const commands = ['clone', ...customArgs];\n\n filterString(repo) && commands.push(repo);\n filterString(directory) && commands.push(directory);\n\n const banned = commands.find(disallowedCommand);\n if (banned) {\n return configurationErrorTask(`git.fetch: potential exploit argument blocked.`);\n }\n\n return straightThroughStringTask(commands);\n}\n\nexport function cloneMirrorTask(repo: string | undefined, directory: string | undefined, customArgs: string[]) {\n append(customArgs, '--mirror');\n\n return cloneTask(repo, directory, customArgs);\n}\n", "import { StringTask } from '../types';\nimport { DiffResult } from '../../../typings';\nimport { parseDiffResult } from '../parsers/parse-diff-summary';\n\nexport function diffSummaryTask(customArgs: string[]): StringTask {\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[] = [\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\nimport { configurationErrorTask, EmptyTask } from './task';\n\nfunction disallowedCommand(command: string) {\n return /^--upload-pack(=|$)/.test(command);\n}\n\nexport function fetchTask(remote: string, branch: string, customArgs: string[]): StringTask | EmptyTask {\n const commands = ['fetch', ...customArgs];\n if (remote && branch) {\n commands.push(remote, branch);\n }\n\n const banned = commands.find(disallowedCommand);\n if (banned) {\n return configurationErrorTask(`git.fetch: potential exploit argument blocked.`);\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[] = [\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 {\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, branch: Maybe, customArgs: string[]): StringTask {\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 {\n return straightThroughStringTask(['remote', 'add', ...customArgs, remoteName, remoteRepo]);\n}\n\nexport function getRemotesTask(verbose: boolean): StringTask {\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 {\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 {\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 {\n const options = parseLogOptions(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 {\n return subModuleTask(['add', repo, path]);\n}\n\nexport function initSubModuleTask(customArgs: string[]): StringTask {\n return subModuleTask(['init', ...customArgs]);\n}\n\nexport function subModuleTask(customArgs: string[]): StringTask {\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 {\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 {\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 * 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,\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, timeout: DeferredPromise) {\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;\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> = new Set();\n\n public add(plugin: void | SimpleGitPlugin | SimpleGitPlugin[]) {\n const plugins: SimpleGitPlugin[] = [];\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(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) {\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): 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): 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 timeout && clearTimeout(timeout);\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(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(factory: SimpleGitFactory, extra: T) {\n return Object.assign(function (...args: Parameters) {\n return factory.apply(null, args);\n },\n api,\n extra || {},\n );\n}\n\nexport function gitInstanceFactory(baseDir?: string | Partial, options?: Partial) {\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] | [string, Partial]): 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 {\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,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AA,MACd,OAAO,MAAM,QAAQ;AAAA;AAGxB,WAAO;AAAA,KACP;AAEH,SAAO;AAEP,wBAAsB,IAAY,MAA4C;AAC3E,WAAO,YAAa,OAAa;AAC9B,UAAI,OAAO,MAAK,MAAK,YAAY,YAAY;AAC1C,cAAM,IAAI,UACP,gHAC8C;AAAA;AAGpD,aAAO,MAAM,KAAK,WAAY;AAC3B,eAAO,IAAI,QAAQ,SAAU,SAAS,QAAQ;AAC3C,gBAAM,WAAkC,CAAC,KAAmB,WAAiB;AAC1E,gBAAI,KAAK;AACN,qBAAO,OAAO,QAAQ;AAAA;AAGzB,oBAAQ;AAAA;AAEX,gBAAK,KAAK;AAEV,eAAI,IAAI,MAAM,MAAK;AAAA;AAAA;AAAA;AAAA;AAM/B,uBAAqB,IAAY,MAAU,KAAgB;AACxD,WAAO,IAAI,UAAgB;AACxB,WAAI,IAAI,GAAG;AAEX,aAAO;AAAA;AAAA;AAAA;AAKhB,iBAAiB,OAAoC;AAElD,MAAI,iBAAiB,OAAO;AACzB,WAAO;AAAA;AAGV,MAAI,OAAO,UAAU,UAAU;AAC5B,WAAO,IAAI,MAAM;AAAA;AAGpB,SAAO,IAAI,iBAAiB;AAAA;;;ACnJ/B,IAAO,cAAQ;", - "names": [] - } -diff --git a/node_modules/simple-git/dist/src/lib/args/log-format.d.ts b/node_modules/simple-git/dist/src/lib/args/log-format.d.ts -deleted file mode 100644 -index 4874e16..0000000 ---- a/node_modules/simple-git/dist/src/lib/args/log-format.d.ts -+++ /dev/null -@@ -1,9 +0,0 @@ --export declare enum LogFormat { -- NONE = "", -- STAT = "--stat", -- NUM_STAT = "--numstat", -- NAME_ONLY = "--name-only", -- NAME_STATUS = "--name-status" --} --export declare function logFormatFromCommand(customArgs: string[]): LogFormat; --export declare function isLogFormat(customArg: string | unknown): boolean; -diff --git a/node_modules/simple-git/dist/src/lib/errors/git-error.d.ts b/node_modules/simple-git/dist/src/lib/errors/git-error.d.ts -index 2eff39b..a0677ab 100644 ---- a/node_modules/simple-git/dist/src/lib/errors/git-error.d.ts -+++ b/node_modules/simple-git/dist/src/lib/errors/git-error.d.ts -@@ -1,4 +1,3 @@ --import type { SimpleGitTask } from '../types'; - /** - * The `GitError` is thrown when the underlying `git` process throws a - * fatal exception (eg an `ENOENT` exception when attempting to use a -@@ -25,6 +24,6 @@ import type { SimpleGitTask } from '../types'; - ``` - */ - export declare class GitError extends Error { -- task?: SimpleGitTask | undefined; -- constructor(task?: SimpleGitTask | undefined, message?: string); -+ task?: import("../tasks/task").EmptyTask | import("../types").StringTask | import("../types").BufferTask | undefined; -+ constructor(task?: import("../tasks/task").EmptyTask | import("../types").StringTask | import("../types").BufferTask | undefined, message?: string); - } -diff --git a/node_modules/simple-git/dist/src/lib/errors/git-plugin-error.d.ts b/node_modules/simple-git/dist/src/lib/errors/git-plugin-error.d.ts -index 94d4f8b..17aed24 100644 ---- a/node_modules/simple-git/dist/src/lib/errors/git-plugin-error.d.ts -+++ b/node_modules/simple-git/dist/src/lib/errors/git-plugin-error.d.ts -@@ -1,7 +1,6 @@ --import { SimpleGitOptions, SimpleGitTask } from '../types'; - import { GitError } from './git-error'; - export declare class GitPluginError extends GitError { -- task?: SimpleGitTask | undefined; -- readonly plugin?: keyof SimpleGitOptions | undefined; -- constructor(task?: SimpleGitTask | undefined, plugin?: keyof SimpleGitOptions | undefined, message?: string); -+ task?: import("../tasks/task").EmptyTask | import("../types").StringTask | import("../types").BufferTask | undefined; -+ readonly plugin?: "progress" | "timeout" | "completion" | "errors" | "spawnOptions" | "baseDir" | "binary" | "maxConcurrentProcesses" | "config" | undefined; -+ constructor(task?: import("../tasks/task").EmptyTask | import("../types").StringTask | import("../types").BufferTask | undefined, plugin?: "progress" | "timeout" | "completion" | "errors" | "spawnOptions" | "baseDir" | "binary" | "maxConcurrentProcesses" | "config" | undefined, message?: string); - } -diff --git a/node_modules/simple-git/dist/src/lib/git-factory.d.ts b/node_modules/simple-git/dist/src/lib/git-factory.d.ts -index 12a608f..ed550dd 100644 ---- a/node_modules/simple-git/dist/src/lib/git-factory.d.ts -+++ b/node_modules/simple-git/dist/src/lib/git-factory.d.ts -@@ -11,5 +11,5 @@ export declare function esModuleFactory(defaultExport: T): T & { - __esModule: true; - default: T; - }; --export declare function gitExportFactory(factory: SimpleGitFactory): SimpleGitFactory & typeof api; -+export declare function gitExportFactory(factory: SimpleGitFactory, extra: T): ((options: Partial) => import("../../typings").SimpleGit) & typeof api; - export declare function gitInstanceFactory(baseDir?: string | Partial, options?: Partial): any; -diff --git a/node_modules/simple-git/dist/src/lib/parsers/parse-branch.d.ts b/node_modules/simple-git/dist/src/lib/parsers/parse-branch.d.ts -index 7c0fe2a..3c39c29 100644 ---- a/node_modules/simple-git/dist/src/lib/parsers/parse-branch.d.ts -+++ b/node_modules/simple-git/dist/src/lib/parsers/parse-branch.d.ts -@@ -1,2 +1,2 @@ --import type { BranchSummary } from '../../../typings'; -+import { BranchSummary } from '../../../typings'; - export declare function parseBranchSummary(stdOut: string): BranchSummary; -diff --git a/node_modules/simple-git/dist/src/lib/parsers/parse-diff-summary.d.ts b/node_modules/simple-git/dist/src/lib/parsers/parse-diff-summary.d.ts -index 4528dc4..baaeb64 100644 ---- a/node_modules/simple-git/dist/src/lib/parsers/parse-diff-summary.d.ts -+++ b/node_modules/simple-git/dist/src/lib/parsers/parse-diff-summary.d.ts -@@ -1,3 +1,2 @@ --import { LogFormat } from '../args/log-format'; --import { DiffSummary } from '../responses/DiffSummary'; --export declare function getDiffParser(format?: LogFormat): (stdOut: string) => DiffSummary; -+import { DiffResult } from '../../../typings'; -+export declare function parseDiffResult(stdOut: string): DiffResult; -diff --git a/node_modules/simple-git/dist/src/lib/parsers/parse-list-log-summary.d.ts b/node_modules/simple-git/dist/src/lib/parsers/parse-list-log-summary.d.ts -index e4a30da..113af34 100644 ---- a/node_modules/simple-git/dist/src/lib/parsers/parse-list-log-summary.d.ts -+++ b/node_modules/simple-git/dist/src/lib/parsers/parse-list-log-summary.d.ts -@@ -1,6 +1,5 @@ - import { LogResult } from '../../../typings'; --import { LogFormat } from '../args/log-format'; - 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(splitter?: string, fields?: string[], logFormat?: LogFormat): (stdOut: string) => LogResult; -+export declare function createListLogSummaryParser(splitter?: string, fields?: string[]): (stdOut: string) => LogResult; -diff --git a/node_modules/simple-git/dist/src/lib/responses/BranchSummary.d.ts b/node_modules/simple-git/dist/src/lib/responses/BranchSummary.d.ts -index 9aa3342..69cd698 100644 ---- a/node_modules/simple-git/dist/src/lib/responses/BranchSummary.d.ts -+++ b/node_modules/simple-git/dist/src/lib/responses/BranchSummary.d.ts -@@ -1,8 +1,4 @@ --import type { BranchSummary, BranchSummaryBranch } from '../../../typings'; --export declare enum BranchStatusIdentifier { -- CURRENT = "*", -- LINKED = "+" --} -+import { BranchSummary, BranchSummaryBranch } from '../../../typings'; - export declare class BranchSummaryResult implements BranchSummary { - all: string[]; - branches: { -@@ -10,5 +6,5 @@ export declare class BranchSummaryResult implements BranchSummary { - }; - current: string; - detached: boolean; -- push(status: BranchStatusIdentifier | unknown, detached: boolean, name: string, commit: string, label: string): void; -+ push(current: boolean, detached: boolean, name: string, commit: string, label: string): void; - } -diff --git a/node_modules/simple-git/dist/src/lib/tasks/diff.d.ts b/node_modules/simple-git/dist/src/lib/tasks/diff.d.ts -index 8bcd1f2..c1e37aa 100644 ---- a/node_modules/simple-git/dist/src/lib/tasks/diff.d.ts -+++ b/node_modules/simple-git/dist/src/lib/tasks/diff.d.ts -@@ -1,5 +1,3 @@ - import { StringTask } from '../types'; - import { DiffResult } from '../../../typings'; --import { EmptyTask } from './task'; --export declare function diffSummaryTask(customArgs: string[]): StringTask | EmptyTask; --export declare function validateLogFormatConfig(customArgs: unknown[]): EmptyTask | void; -+export declare function diffSummaryTask(customArgs: string[]): StringTask; -diff --git a/node_modules/simple-git/dist/src/lib/tasks/log.d.ts b/node_modules/simple-git/dist/src/lib/tasks/log.d.ts -index cc9293b..d58a446 100644 ---- a/node_modules/simple-git/dist/src/lib/tasks/log.d.ts -+++ b/node_modules/simple-git/dist/src/lib/tasks/log.d.ts -@@ -1,5 +1,5 @@ --import type { Options, StringTask } from '../types'; --import type { LogResult, SimpleGit } from '../../../typings'; -+import { Options, StringTask } from '../types'; -+import { LogResult, SimpleGit } from '../../../typings'; - export interface DefaultLogFields { - hash: string; - date: string; -diff --git a/node_modules/simple-git/dist/src/lib/tasks/stash-list.d.ts b/node_modules/simple-git/dist/src/lib/tasks/stash-list.d.ts -index 9470967..5bf9a9c 100644 ---- a/node_modules/simple-git/dist/src/lib/tasks/stash-list.d.ts -+++ b/node_modules/simple-git/dist/src/lib/tasks/stash-list.d.ts -@@ -1,4 +1,3 @@ - import { LogOptions, LogResult } from '../../../typings'; --import type { StringTask } from '../types'; --import type { EmptyTask } from './task'; --export declare function stashListTask(opt: LogOptions | undefined, customArgs: string[]): EmptyTask | StringTask; -+import { StringTask } from '../types'; -+export declare function stashListTask(opt: LogOptions | undefined, customArgs: string[]): StringTask; -diff --git a/node_modules/simple-git/dist/src/lib/tasks/task.d.ts b/node_modules/simple-git/dist/src/lib/tasks/task.d.ts -index 4f8c6c0..9c64e4e 100644 ---- a/node_modules/simple-git/dist/src/lib/tasks/task.d.ts -+++ b/node_modules/simple-git/dist/src/lib/tasks/task.d.ts -@@ -1,4 +1,4 @@ --import type { BufferTask, EmptyTaskParser, SimpleGitTask, StringTask } from '../types'; -+import { BufferTask, EmptyTaskParser, SimpleGitTask, StringTask } from '../types'; - export declare const EMPTY_COMMANDS: []; - export declare type EmptyTask = { - commands: typeof EMPTY_COMMANDS; -diff --git a/node_modules/simple-git/dist/src/lib/types/index.d.ts b/node_modules/simple-git/dist/src/lib/types/index.d.ts -index 4fe0734..7dbd521 100644 ---- a/node_modules/simple-git/dist/src/lib/types/index.d.ts -+++ b/node_modules/simple-git/dist/src/lib/types/index.d.ts -@@ -1,6 +1,4 @@ - /// --/// --/// - import type { SpawnOptions } from 'child_process'; - import type { SimpleGitTask } from './tasks'; - import type { SimpleGitProgressEvent } from './handlers'; -diff --git a/node_modules/simple-git/dist/src/lib/utils/task-parser.d.ts b/node_modules/simple-git/dist/src/lib/utils/task-parser.d.ts -index b1a62b8..5734495 100644 ---- a/node_modules/simple-git/dist/src/lib/utils/task-parser.d.ts -+++ b/node_modules/simple-git/dist/src/lib/utils/task-parser.d.ts -@@ -1,5 +1,5 @@ --import type { MaybeArray, TaskParser, TaskResponseFormat } from '../types'; -+import { TaskParser, TaskResponseFormat } from '../types'; - import { GitOutputStreams } from './git-output-streams'; - import { LineParser } from './line-parser'; - export declare function callTaskParser(parser: TaskParser, streams: GitOutputStreams): RESPONSE; --export declare function parseStringResponse(result: T, parsers: LineParser[], texts: MaybeArray, trim?: boolean): T; -+export declare function parseStringResponse(result: T, parsers: LineParser[], ...texts: string[]): T; -diff --git a/node_modules/simple-git/dist/typings/index.d.ts b/node_modules/simple-git/dist/typings/index.d.ts -index 12449c3..fc284f2 100644 ---- a/node_modules/simple-git/dist/typings/index.d.ts -+++ b/node_modules/simple-git/dist/typings/index.d.ts -@@ -7,6 +7,5 @@ export * from './types'; - - export declare const gitP: SimpleGitFactory; - --export declare const simpleGit: SimpleGitFactory; -- -+declare const simpleGit: SimpleGitFactory; - export default simpleGit; -diff --git a/node_modules/simple-git/dist/typings/response.d.ts b/node_modules/simple-git/dist/typings/response.d.ts -index 19a22ef..795e5af 100644 ---- a/node_modules/simple-git/dist/typings/response.d.ts -+++ b/node_modules/simple-git/dist/typings/response.d.ts -@@ -5,7 +5,6 @@ export interface BranchSummaryBranch { - name: string; - commit: string; - label: string; -- linkedWorkTree: boolean; - } - - export interface BranchSummary { -diff --git a/node_modules/simple-git/package.json b/node_modules/simple-git/package.json -index 02b4232..476da3e 100644 ---- a/node_modules/simple-git/package.json -+++ b/node_modules/simple-git/package.json -@@ -1,7 +1,7 @@ - { - "name": "simple-git", - "description": "Simple GIT interface for node.js", -- "version": "3.10.0", -+ "version": "3.7.1", - "author": "Steve King ", - "contributors": [ - { -@@ -11,16 +11,16 @@ - ], - "funding": { - "type": "github", -- "url": "https://github.com/steveukx/git-js?sponsor=1" -+ "url": "https://github.com/sponsors/steveukx/" - }, - "dependencies": { - "@kwsites/file-exists": "^1.1.1", - "@kwsites/promise-deferred": "^1.1.1", -- "debug": "^4.3.4" -+ "debug": "^4.3.3" - }, - "devDependencies": { -- "@kwsites/promise-result": "^1.1.0", - "@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", -@@ -51,7 +51,8 @@ - }, - "./promise": { - "require": "./promise.js" -- } -+ }, -+ "./package.json": "./package.json" - }, - "types": "./dist/typings/index.d.ts", - "files": [ -diff --git a/node_modules/simple-git/readme.md b/node_modules/simple-git/readme.md -index fc5ca3e..fa03eb0 100644 ---- a/node_modules/simple-git/readme.md -+++ b/node_modules/simple-git/readme.md -@@ -30,14 +30,14 @@ const simpleGit = require('simple-git'); - simpleGit().clean(simpleGit.CleanOptions.FORCE); - - // or use named properties --const {simpleGit, CleanOptions} = require('simple-git'); -+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'; -+import simpleGit, { CleanOptions } from 'simple-git'; - - simpleGit().clean(CleanOptions.FORCE); - ``` -@@ -45,7 +45,7 @@ simpleGit().clean(CleanOptions.FORCE); - Include in a TypeScript app using the bundled type definitions: - - ```typescript --import { simpleGit, SimpleGit, CleanOptions } from 'simple-git'; -+import simpleGit, { SimpleGit, CleanOptions } from 'simple-git'; - - const git: SimpleGit = simpleGit().clean(CleanOptions.FORCE); - ``` -@@ -55,7 +55,7 @@ const git: SimpleGit = simpleGit().clean(CleanOptions.FORCE); - Configure each `simple-git` instance with a properties object passed to the main `simpleGit` function: - - ```typescript --import { simpleGit, SimpleGit, SimpleGitOptions } from 'simple-git'; -+import simpleGit, { SimpleGit, SimpleGitOptions } from 'simple-git'; - - const options: Partial = { - baseDir: process.cwd(), -@@ -186,6 +186,10 @@ For type details of the response for each of the tasks, please see the [TypeScri - | `.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). | -@@ -197,6 +201,8 @@ For type details of the response for each of the tasks, please see the [TypeScri - | `.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 | -@@ -239,6 +245,7 @@ For type details of the response for each of the tasks, please see the [TypeScri - - - `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 -@@ -254,17 +261,6 @@ For type details of the response for each of the tasks, please see the [TypeScri - - `.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 diff -- --- `.diff([ options ])` get the diff of the current repo compared to the last commit, optionally including -- any number of other arguments supported by [git diff](https://git-scm.com/docs/git-diff) supplied as an -- [options](#how-to-specify-options) object/array. Returns the raw `diff` output as a string. -- --- `.diffSummary([ options ])` creates a [DiffResult](https://github.com/steveukx/git-js/blob/main/simple-git/src/lib/responses/DiffSummary.ts) -- to summarise the diff for files in the repo. Uses the `--stat` format by default which can be overridden -- by passing in any of the log format commands (eg: `--numstat` or `--name-stat`) as part of the optional -- [options](#how-to-specify-options) object/array. -- - ## 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 -@@ -379,12 +375,6 @@ For type details of the response for each of the tasks, please see the [TypeScri - - `.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 - --## git stash -- --- `.stash([ options ])` 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 ])` Retrieves the stash list, optional first argument can be an object in the same format as used in [git log](#git-log). -- - ## 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. -@@ -580,7 +570,7 @@ if (mergeSummary.failed) { - With typed errors available in TypeScript - - ```typescript --import { simpleGit, MergeSummary, GitResponseError } from 'simple-git'; -+import simpleGit, { MergeSummary, GitResponseError } from 'simple-git'; - try { - const mergeSummary = await simpleGit().merge(); - console.log(`Merged ${ mergeSummary.merges.length } files`); diff --git a/yarn.lock b/yarn.lock index aa54775219..9638e15d42 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5046,22 +5046,6 @@ __metadata: languageName: node linkType: hard -"@kwsites/file-exists@npm:^1.1.1": - version: 1.1.1 - resolution: "@kwsites/file-exists@npm:1.1.1" - dependencies: - debug: ^4.1.1 - checksum: 4ff945de7293285133aeae759caddc71e73c4a44a12fac710fdd4f574cce2671a3f89d8165fdb03d383cfc97f3f96f677d8de3c95133da3d0e12a123a23109fe - languageName: node - linkType: hard - -"@kwsites/promise-deferred@npm:^1.1.1": - version: 1.1.1 - resolution: "@kwsites/promise-deferred@npm:1.1.1" - checksum: 07455477a0123d9a38afb503739eeff2c5424afa8d3dbdcc7f9502f13604488a4b1d9742fc7288832a52a6422cf1e1c0a1d51f69a39052f14d27c9a0420b6629 - languageName: node - linkType: hard - "@logrocket/react-native@npm:^1.2.1": version: 1.3.2 resolution: "@logrocket/react-native@npm:1.3.2" @@ -8044,7 +8028,6 @@ __metadata: remove-markdown: ^0.3.0 semver: ^7.3.5 sentry-expo: ^4.1.0 - simple-git: ^3.3.0 solito: ^0.0.24 stream-browserify: ^3.0.0 string_decoder: ~1.3.0 @@ -32573,17 +32556,6 @@ __metadata: languageName: node linkType: hard -"simple-git@npm:^3.3.0": - version: 3.7.1 - resolution: "simple-git@npm:3.7.1" - dependencies: - "@kwsites/file-exists": ^1.1.1 - "@kwsites/promise-deferred": ^1.1.1 - debug: ^4.3.3 - checksum: df5361e892cadf73f0bfad2b34f3609809465c4ba1c8f3f95b2650e8a40c366c78a1a99c5e4f0eafc2acd33a85a9660d834690bb6331ef11bc1c064f526cd4a8 - languageName: node - linkType: hard - "simple-markdown@npm:^0.7.3": version: 0.7.3 resolution: "simple-markdown@npm:0.7.3"