From 04b119a5597830f6e3526ca9e5679acbd812a6bf Mon Sep 17 00:00:00 2001 From: Aleksandar Stojanov Date: Mon, 18 Mar 2024 11:10:38 +0100 Subject: [PATCH 1/2] update npm packages Signed-off-by: Aleksandar Stojanov --- package-lock.json | 182 ++++++++++++++++++++++++++++++++-------------- package.json | 5 +- 2 files changed, 130 insertions(+), 57 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2324d6d..9655485 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@actions/core": "^1.10.1", "@actions/exec": "^1.1.1", "@actions/tool-cache": "^2.0.1", - "simple-git": "^3.22.0" + "simple-git": "^3.23.0" }, "devDependencies": { "@types/jest": "^29.5.12", @@ -2118,15 +2118,6 @@ "integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==", "dev": true }, - "node_modules/asynciterator.prototype": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/asynciterator.prototype/-/asynciterator.prototype-1.0.0.tgz", - "integrity": "sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.3" - } - }, "node_modules/available-typed-arrays": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", @@ -2391,9 +2382,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001597", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001597.tgz", - "integrity": "sha512-7LjJvmQU6Sj7bL0j5b5WY/3n7utXUJvAe1lxhsHDbLmwX9mdL86Yjtr+5SRCyf8qME4M7pU2hswj0FpyBVCv9w==", + "version": "1.0.30001599", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001599.tgz", + "integrity": "sha512-LRAQHZ4yT1+f9LemSMeqdMpMxZcc4RMWdj4tiFe3G8tNkWK+E58g+/tzotb5cU6TbcVJLr4fySiAW7XmxQvZQA==", "dev": true, "funding": [ { @@ -2566,6 +2557,57 @@ "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", "dev": true }, + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -2703,9 +2745,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.707", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.707.tgz", - "integrity": "sha512-qRq74Mo7ChePOU6GHdfAJ0NREXU8vQTlVlfWz3wNygFay6xrd/fY2J7oGHwrhFeU30OVctGLdTh/FcnokTWpng==", + "version": "1.4.708", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.708.tgz", + "integrity": "sha512-iWgEEvREL4GTXXHKohhh33+6Y8XkPI5eHihDmm8zUk5Zo7HICEW+wI/j5kJ2tbuNUCXJ/sNXa03ajW635DiJXA==", "dev": true }, "node_modules/emittery": { @@ -2736,17 +2778,21 @@ } }, "node_modules/es-abstract": { - "version": "1.22.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.5.tgz", - "integrity": "sha512-oW69R+4q2wG+Hc3KZePPZxOiisRIqfKBVo/HLx94QcJeWGU/8sZhCvc829rd1kS366vlJbzBfXf9yWwf0+Ko7w==", + "version": "1.23.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.2.tgz", + "integrity": "sha512-60s3Xv2T2p1ICykc7c+DNDPLDMm9t4QxCOUU0K9JxiLjM3C1zB9YVdN7tjxrFd4+AkZ8CdX1ovUga4P2+1e+/w==", "dev": true, "dependencies": { "array-buffer-byte-length": "^1.0.1", "arraybuffer.prototype.slice": "^1.0.3", "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", "es-define-property": "^1.0.0", "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", "es-set-tostringtag": "^2.0.3", "es-to-primitive": "^1.2.1", "function.prototype.name": "^1.1.6", @@ -2757,10 +2803,11 @@ "has-property-descriptors": "^1.0.2", "has-proto": "^1.0.3", "has-symbols": "^1.0.3", - "hasown": "^2.0.1", + "hasown": "^2.0.2", "internal-slot": "^1.0.7", "is-array-buffer": "^3.0.4", "is-callable": "^1.2.7", + "is-data-view": "^1.0.1", "is-negative-zero": "^2.0.3", "is-regex": "^1.1.4", "is-shared-array-buffer": "^1.0.3", @@ -2771,17 +2818,17 @@ "object-keys": "^1.1.1", "object.assign": "^4.1.5", "regexp.prototype.flags": "^1.5.2", - "safe-array-concat": "^1.1.0", + "safe-array-concat": "^1.1.2", "safe-regex-test": "^1.0.3", - "string.prototype.trim": "^1.2.8", - "string.prototype.trimend": "^1.0.7", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", "string.prototype.trimstart": "^1.0.7", "typed-array-buffer": "^1.0.2", "typed-array-byte-length": "^1.0.1", "typed-array-byte-offset": "^1.0.2", "typed-array-length": "^1.0.5", "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.14" + "which-typed-array": "^1.1.15" }, "engines": { "node": ">= 0.4" @@ -2818,26 +2865,37 @@ } }, "node_modules/es-iterator-helpers": { - "version": "1.0.17", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.17.tgz", - "integrity": "sha512-lh7BsUqelv4KUbR5a/ZTaGGIMLCjPGPqJ6q+Oq24YP0RdyptX1uzm4vvaqzk7Zx3bpl/76YLTTDj9L7uYQ92oQ==", + "version": "1.0.18", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.18.tgz", + "integrity": "sha512-scxAJaewsahbqTYrGKJihhViaM6DDZDDoucfvzNbK0pOren1g/daDQ3IAhzn+1G14rBG7w+i5N+qul60++zlKA==", "dev": true, "dependencies": { - "asynciterator.prototype": "^1.0.0", "call-bind": "^1.0.7", "define-properties": "^1.2.1", - "es-abstract": "^1.22.4", + "es-abstract": "^1.23.0", "es-errors": "^1.3.0", - "es-set-tostringtag": "^2.0.2", + "es-set-tostringtag": "^2.0.3", "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", "globalthis": "^1.0.3", "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.1", + "has-proto": "^1.0.3", "has-symbols": "^1.0.3", "internal-slot": "^1.0.7", "iterator.prototype": "^1.1.2", - "safe-array-concat": "^1.1.0" + "safe-array-concat": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0" }, "engines": { "node": ">= 0.4" @@ -4420,6 +4478,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dev": true, + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-date-object": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", @@ -6599,16 +6672,16 @@ "dev": true }, "node_modules/reflect.getprototypeof": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.5.tgz", - "integrity": "sha512-62wgfC8dJWrmxv44CA36pLDnP6KKl3Vhxb7PL+8+qrrFMMoJij4vgiMP8zV4O8+CBMXY1mHxI5fITGHXFHVmQQ==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz", + "integrity": "sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==", "dev": true, "dependencies": { - "call-bind": "^1.0.5", + "call-bind": "^1.0.7", "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.0.0", - "get-intrinsic": "^1.2.3", + "es-abstract": "^1.23.1", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", "globalthis": "^1.0.3", "which-builtin-type": "^1.1.3" }, @@ -6883,9 +6956,9 @@ "dev": true }, "node_modules/simple-git": { - "version": "3.22.0", - "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.22.0.tgz", - "integrity": "sha512-6JujwSs0ac82jkGjMHiCnTifvf1crOiY/+tfs/Pqih6iow7VrpNKRRNdWm6RtaXpvvv/JGNYhlUtLhGFqHF+Yw==", + "version": "3.23.0", + "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.23.0.tgz", + "integrity": "sha512-P9ggTW8vb/21CAL/AmnACAhqBDfnqSSZVpV7WuFtsFR9HLunf5IqQvk+OXAQTfkcZep8pKnt3DV3o7w3TegEkQ==", "dependencies": { "@kwsites/file-exists": "^1.1.1", "@kwsites/promise-deferred": "^1.1.1", @@ -6991,14 +7064,15 @@ "dev": true }, "node_modules/string.prototype.trim": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", - "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -7008,14 +7082,14 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", - "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" diff --git a/package.json b/package.json index 2971c04..779013d 100644 --- a/package.json +++ b/package.json @@ -33,8 +33,7 @@ "lint": "npx eslint . -c ./.github/linters/.eslintrc.yaml", "package": "ncc build src/index.ts --license licenses.txt", "package:watch": "npm run package -- --watch", - "test": "jest", - "all": "npm run format:write && npm run lint && npm run test && npm run coverage && npm run package" + "all": "npm run format:write && npm run lint && npm run ci-test && npm run coverage && npm run package" }, "license": "MIT", "jest": { @@ -70,7 +69,7 @@ "@actions/core": "^1.10.1", "@actions/exec": "^1.1.1", "@actions/tool-cache": "^2.0.1", - "simple-git": "^3.22.0" + "simple-git": "^3.23.0" }, "devDependencies": { "@types/jest": "^29.5.12", From f0a7f8e27ccb6d0b5d3b3b4308b8064ba2fbd837 Mon Sep 17 00:00:00 2001 From: Aleksandar Stojanov Date: Mon, 18 Mar 2024 11:10:50 +0100 Subject: [PATCH 2/2] build dist Signed-off-by: Aleksandar Stojanov --- dist/index.js | 1146 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 841 insertions(+), 305 deletions(-) diff --git a/dist/index.js b/dist/index.js index eebb29f..eb813bf 100644 --- a/dist/index.js +++ b/dist/index.js @@ -6866,6 +6866,8 @@ function coerce (version, options) { /***/ 9103: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +"use strict"; + var __create = Object.create; var __defProp = Object.defineProperty; var __defProps = Object.defineProperties; @@ -6889,7 +6891,6 @@ var __spreadValues = (a, b) => { return a; }; var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); -var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); var __esm = (fn, res) => function __init() { return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; }; @@ -6900,22 +6901,19 @@ var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; -var __reExport = (target, module2, copyDefault, desc) => { - if (module2 && typeof module2 === "object" || typeof module2 === "function") { - for (let key of __getOwnPropNames(module2)) - if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default")) - __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable }); +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } - return target; -}; -var __toESM = (module2, isNodeMode) => { - return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2); + return to; }; -var __toCommonJS = /* @__PURE__ */ ((cache2) => { - return (module2, temp) => { - return cache2 && cache2.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache2 && cache2.set(module2, temp), temp); - }; -})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0); +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var __async = (__this, __arguments, generator) => { return new Promise((resolve, reject) => { var fulfilled = (value) => { @@ -6941,6 +6939,7 @@ var __async = (__this, __arguments, generator) => { var GitError; var init_git_error = __esm({ "src/lib/errors/git-error.ts"() { + "use strict"; GitError = class extends Error { constructor(task, message) { super(message); @@ -6955,6 +6954,7 @@ var init_git_error = __esm({ var GitResponseError; var init_git_response_error = __esm({ "src/lib/errors/git-response-error.ts"() { + "use strict"; init_git_error(); GitResponseError = class extends GitError { constructor(git, message) { @@ -6980,6 +6980,7 @@ function toPaths(pathSpec) { var cache; var init_pathspec = __esm({ "src/lib/args/pathspec.ts"() { + "use strict"; cache = /* @__PURE__ */ new WeakMap(); } }); @@ -6988,6 +6989,7 @@ var init_pathspec = __esm({ var GitConstructError; var init_git_construct_error = __esm({ "src/lib/errors/git-construct-error.ts"() { + "use strict"; init_git_error(); GitConstructError = class extends GitError { constructor(config, message) { @@ -7002,6 +7004,7 @@ var init_git_construct_error = __esm({ var GitPluginError; var init_git_plugin_error = __esm({ "src/lib/errors/git-plugin-error.ts"() { + "use strict"; init_git_error(); GitPluginError = class extends GitError { constructor(task, plugin, message) { @@ -7018,6 +7021,7 @@ var init_git_plugin_error = __esm({ var TaskConfigurationError; var init_task_configuration_error = __esm({ "src/lib/errors/task-configuration-error.ts"() { + "use strict"; init_git_error(); TaskConfigurationError = class extends GitError { constructor(message) { @@ -7118,7 +7122,10 @@ function bufferToString(input) { return (Array.isArray(input) ? Buffer.concat(input) : input).toString("utf-8"); } function pick(source, properties) { - return Object.assign({}, ...properties.map((property) => property in source ? { [property]: source[property] } : {})); + return Object.assign( + {}, + ...properties.map((property) => property in source ? { [property]: source[property] } : {}) + ); } function delay(duration = 0) { return new Promise((done) => setTimeout(done, duration)); @@ -7132,6 +7139,7 @@ function orVoid(input) { var import_file_exists, NULL, NOOP, objectToString; var init_util = __esm({ "src/lib/utils/util.ts"() { + "use strict"; import_file_exists = __nccwpck_require__(4751); NULL = "\0"; NOOP = () => { @@ -7160,6 +7168,7 @@ function filterFunction(input) { var filterArray, filterString, filterStringArray, filterStringOrStringArray, filterHasLength; var init_argument_filters = __esm({ "src/lib/utils/argument-filters.ts"() { + "use strict"; init_util(); init_pathspec(); filterArray = (input) => { @@ -7187,6 +7196,7 @@ var init_argument_filters = __esm({ var ExitCodes; var init_exit_codes = __esm({ "src/lib/utils/exit-codes.ts"() { + "use strict"; ExitCodes = /* @__PURE__ */ ((ExitCodes2) => { ExitCodes2[ExitCodes2["SUCCESS"] = 0] = "SUCCESS"; ExitCodes2[ExitCodes2["ERROR"] = 1] = "ERROR"; @@ -7201,6 +7211,7 @@ var init_exit_codes = __esm({ var GitOutputStreams; var init_git_output_streams = __esm({ "src/lib/utils/git-output-streams.ts"() { + "use strict"; GitOutputStreams = class { constructor(stdOut, stdErr) { this.stdOut = stdOut; @@ -7217,6 +7228,7 @@ var init_git_output_streams = __esm({ var LineParser, RemoteLineParser; var init_line_parser = __esm({ "src/lib/utils/line-parser.ts"() { + "use strict"; LineParser = class { constructor(regExp, useMatches) { this.matches = []; @@ -7268,7 +7280,10 @@ var init_line_parser = __esm({ // src/lib/utils/simple-git-options.ts function createInstanceConfig(...options) { const baseDir = process.cwd(); - const config = Object.assign(__spreadValues({ baseDir }, defaultOptions), ...options.filter((o) => typeof o === "object" && o)); + const config = Object.assign( + __spreadValues({ baseDir }, defaultOptions), + ...options.filter((o) => typeof o === "object" && o) + ); config.baseDir = config.baseDir || baseDir; config.trimmed = config.trimmed === true; return config; @@ -7276,6 +7291,7 @@ function createInstanceConfig(...options) { var defaultOptions; var init_simple_git_options = __esm({ "src/lib/utils/simple-git-options.ts"() { + "use strict"; defaultOptions = { binary: "git", maxConcurrentProcesses: 5, @@ -7329,6 +7345,7 @@ function trailingFunctionArgument(args, includeNoop = true) { } var init_task_options = __esm({ "src/lib/utils/task-options.ts"() { + "use strict"; init_argument_filters(); init_util(); init_pathspec(); @@ -7355,6 +7372,7 @@ function parseStringResponse(result, parsers12, texts, trim = true) { } var init_task_parser = __esm({ "src/lib/utils/task-parser.ts"() { + "use strict"; init_util(); } }); @@ -7407,6 +7425,7 @@ __export(utils_exports, { }); var init_utils = __esm({ "src/lib/utils/index.ts"() { + "use strict"; init_argument_filters(); init_exit_codes(); init_git_output_streams(); @@ -7467,6 +7486,7 @@ function isNotRepoMessage(error) { var CheckRepoActions, onError, parser; var init_check_is_repo = __esm({ "src/lib/tasks/check-is-repo.ts"() { + "use strict"; init_utils(); CheckRepoActions = /* @__PURE__ */ ((CheckRepoActions2) => { CheckRepoActions2["BARE"] = "bare"; @@ -7500,6 +7520,7 @@ function cleanSummaryParser(dryRun, text) { var CleanResponse, removalRegexp, dryRunRemovalRegexp, isFolderRegexp; var init_CleanSummary = __esm({ "src/lib/responses/CleanSummary.ts"() { + "use strict"; init_utils(); CleanResponse = class { constructor(dryRun) { @@ -7569,6 +7590,7 @@ function isEmptyTask(task) { var EMPTY_COMMANDS; var init_task = __esm({ "src/lib/tasks/task.ts"() { + "use strict"; init_task_configuration_error(); EMPTY_COMMANDS = []; } @@ -7645,6 +7667,7 @@ function isInteractiveMode(option) { var CONFIG_ERROR_INTERACTIVE_MODE, CONFIG_ERROR_MODE_REQUIRED, CONFIG_ERROR_UNKNOWN_OPTION, CleanOptions, CleanOptionValues; var init_clean = __esm({ "src/lib/tasks/clean.ts"() { + "use strict"; init_CleanSummary(); init_utils(); init_task(); @@ -7718,6 +7741,7 @@ function* configParser(text, requestedKey = null) { var ConfigList; var init_ConfigList = __esm({ "src/lib/responses/ConfigList.ts"() { + "use strict"; init_utils(); ConfigList = class { constructor() { @@ -7805,19 +7829,34 @@ function listConfigTask(scope) { function config_default() { return { addConfig(key, value, ...rest) { - return this._runTask(addConfigTask(key, value, rest[0] === true, asConfigScope(rest[1], "local" /* local */)), trailingFunctionArgument(arguments)); + return this._runTask( + addConfigTask( + key, + value, + rest[0] === true, + asConfigScope(rest[1], "local" /* local */) + ), + trailingFunctionArgument(arguments) + ); }, getConfig(key, scope) { - return this._runTask(getConfigTask(key, asConfigScope(scope, void 0)), trailingFunctionArgument(arguments)); + return this._runTask( + getConfigTask(key, asConfigScope(scope, void 0)), + trailingFunctionArgument(arguments) + ); }, listConfig(...rest) { - return this._runTask(listConfigTask(asConfigScope(rest[0], void 0)), trailingFunctionArgument(arguments)); + return this._runTask( + listConfigTask(asConfigScope(rest[0], void 0)), + trailingFunctionArgument(arguments) + ); } }; } var GitConfigScope; var init_config = __esm({ "src/lib/tasks/config.ts"() { + "use strict"; init_ConfigList(); init_utils(); GitConfigScope = /* @__PURE__ */ ((GitConfigScope2) => { @@ -7837,6 +7876,7 @@ function isDiffNameStatus(input) { var DiffNameStatus, diffNameStatus; var init_diff_name_status = __esm({ "src/lib/tasks/diff-name-status.ts"() { + "use strict"; DiffNameStatus = /* @__PURE__ */ ((DiffNameStatus2) => { DiffNameStatus2["ADDED"] = "A"; DiffNameStatus2["COPIED"] = "C"; @@ -7881,26 +7921,33 @@ function grep_default() { const options = getTrailingOptions(arguments); for (const option of disallowedOptions) { if (options.includes(option)) { - return this._runTask(configurationErrorTask(`git.grep: use of "${option}" is not supported.`), then); + return this._runTask( + configurationErrorTask(`git.grep: use of "${option}" is not supported.`), + then + ); } } if (typeof searchTerm === "string") { searchTerm = grepQueryBuilder().param(searchTerm); } const commands = ["grep", "--null", "-n", "--full-name", ...options, ...searchTerm]; - return this._runTask({ - commands, - format: "utf-8", - parser(stdOut) { - return parseGrep(stdOut); - } - }, then); + return this._runTask( + { + commands, + format: "utf-8", + parser(stdOut) { + return parseGrep(stdOut); + } + }, + then + ); } }; } var disallowedOptions, Query, _a, GrepQuery; var init_grep = __esm({ "src/lib/tasks/grep.ts"() { + "use strict"; init_utils(); init_task(); disallowedOptions = ["-h"]; @@ -7958,6 +8005,7 @@ function isValidResetMode(mode) { var ResetMode, ResetModes; var init_reset = __esm({ "src/lib/tasks/reset.ts"() { + "use strict"; init_task(); ResetMode = /* @__PURE__ */ ((ResetMode2) => { ResetMode2["MIXED"] = "mixed"; @@ -7989,6 +8037,7 @@ __export(api_exports, { }); var init_api = __esm({ "src/lib/api.ts"() { + "use strict"; init_pathspec(); init_git_construct_error(); init_git_error(); @@ -8031,6 +8080,7 @@ function abortPlugin(signal) { } var init_abort_plugin = __esm({ "src/lib/plugins/abort-plugin.ts"() { + "use strict"; init_git_plugin_error(); } }); @@ -8046,17 +8096,33 @@ function preventProtocolOverride(arg, next) { if (!/^\s*protocol(.[a-z]+)?.allow/.test(next)) { return; } - throw new GitPluginError(void 0, "unsafe", "Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol"); + throw new GitPluginError( + void 0, + "unsafe", + "Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol" + ); } function preventUploadPack(arg, method) { if (/^\s*--(upload|receive)-pack/.test(arg)) { - throw new GitPluginError(void 0, "unsafe", `Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack`); + throw new GitPluginError( + void 0, + "unsafe", + `Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack` + ); } if (method === "clone" && /^\s*-u\b/.test(arg)) { - throw new GitPluginError(void 0, "unsafe", `Use of clone with option -u is not permitted without enabling allowUnsafePack`); + throw new GitPluginError( + void 0, + "unsafe", + `Use of clone with option -u is not permitted without enabling allowUnsafePack` + ); } if (method === "push" && /^\s*--exec\b/.test(arg)) { - throw new GitPluginError(void 0, "unsafe", `Use of push with option --exec is not permitted without enabling allowUnsafePack`); + throw new GitPluginError( + void 0, + "unsafe", + `Use of push with option --exec is not permitted without enabling allowUnsafePack` + ); } } function blockUnsafeOperationsPlugin({ @@ -8077,6 +8143,7 @@ function blockUnsafeOperationsPlugin({ } var init_block_unsafe_operations_plugin = __esm({ "src/lib/plugins/block-unsafe-operations-plugin.ts"() { + "use strict"; init_git_plugin_error(); } }); @@ -8093,6 +8160,7 @@ function commandConfigPrefixingPlugin(configuration) { } var init_command_config_prefixing_plugin = __esm({ "src/lib/plugins/command-config-prefixing-plugin.ts"() { + "use strict"; init_utils(); } }); @@ -8141,11 +8209,11 @@ function completionDetectionPlugin({ type: "spawn.after", action(_0, _1) { return __async(this, arguments, function* (_data, { spawned, close }) { - var _a2, _b; + var _a3, _b; const events = createEvents(); let deferClose = true; let quickClose = () => void (deferClose = false); - (_a2 = spawned.stdout) == null ? void 0 : _a2.on("data", quickClose); + (_a3 = spawned.stdout) == null ? void 0 : _a3.on("data", quickClose); (_b = spawned.stderr) == null ? void 0 : _b.on("data", quickClose); spawned.on("error", quickClose); spawned.on("close", (code) => events.close(code)); @@ -8166,6 +8234,7 @@ function completionDetectionPlugin({ var import_promise_deferred, never; var init_completion_detection_plugin = __esm({ "src/lib/plugins/completion-detection.plugin.ts"() { + "use strict"; import_promise_deferred = __nccwpck_require__(9819); init_utils(); never = (0, import_promise_deferred.deferred)().promise; @@ -8207,6 +8276,7 @@ function errorDetectionPlugin(config) { } var init_error_detection_plugin = __esm({ "src/lib/plugins/error-detection.plugin.ts"() { + "use strict"; init_git_error(); } }); @@ -8215,6 +8285,7 @@ var init_error_detection_plugin = __esm({ var PluginStore; var init_plugin_store = __esm({ "src/lib/plugins/plugin-store.ts"() { + "use strict"; init_utils(); PluginStore = class { constructor() { @@ -8283,6 +8354,7 @@ function progressEventStage(input) { } var init_progress_monitor_plugin = __esm({ "src/lib/plugins/progress-monitor-plugin.ts"() { + "use strict"; init_utils(); } }); @@ -8290,6 +8362,7 @@ var init_progress_monitor_plugin = __esm({ // src/lib/plugins/simple-git-plugin.ts var init_simple_git_plugin = __esm({ "src/lib/plugins/simple-git-plugin.ts"() { + "use strict"; } }); @@ -8305,6 +8378,7 @@ function spawnOptionsPlugin(spawnOptions) { } var init_spawn_options_plugin = __esm({ "src/lib/plugins/spawn-options-plugin.ts"() { + "use strict"; init_utils(); } }); @@ -8348,6 +8422,7 @@ function timeoutPlugin({ } var init_timout_plugin = __esm({ "src/lib/plugins/timout-plugin.ts"() { + "use strict"; init_git_plugin_error(); } }); @@ -8355,6 +8430,7 @@ var init_timout_plugin = __esm({ // src/lib/plugins/index.ts var init_plugins = __esm({ "src/lib/plugins/index.ts"() { + "use strict"; init_abort_plugin(); init_block_unsafe_operations_plugin(); init_command_config_prefixing_plugin(); @@ -8385,7 +8461,9 @@ function suffixPathsPlugin() { continue; } if (param === "--") { - append2(data.slice(i + 1).flatMap((item) => isPathSpec(item) && toPaths(item) || item)); + append2( + data.slice(i + 1).flatMap((item) => isPathSpec(item) && toPaths(item) || item) + ); break; } prefix.push(param); @@ -8396,6 +8474,7 @@ function suffixPathsPlugin() { } var init_suffix_paths_plugin = __esm({ "src/lib/plugins/suffix-paths.plugin.ts"() { + "use strict"; init_pathspec(); } }); @@ -8435,7 +8514,10 @@ function createLogger(label, verbose, initialStep, infoDebugger = createLog()) { const key = childLoggerName(filterType(verbose, filterString), debugDebugger, infoDebugger); return step(initialStep); function sibling(name, initial) { - return append(spawned, createLogger(label, key.replace(/^[^:]+/, name), initial, infoDebugger)); + return append( + spawned, + createLogger(label, key.replace(/^[^:]+/, name), initial, infoDebugger) + ); } function step(phase) { const stepPrefix = phase && `[${phase}]` || ""; @@ -8452,6 +8534,7 @@ function createLogger(label, verbose, initialStep, infoDebugger = createLog()) { var import_debug; var init_git_logger = __esm({ "src/lib/git-logger.ts"() { + "use strict"; import_debug = __toESM(__nccwpck_require__(8237)); init_utils(); import_debug.default.formatters.L = (value) => String(filterHasLength(value) ? value.length : "-"); @@ -8468,6 +8551,7 @@ var init_git_logger = __esm({ var _TasksPendingQueue, TasksPendingQueue; var init_tasks_pending_queue = __esm({ "src/lib/runners/tasks-pending-queue.ts"() { + "use strict"; init_git_error(); init_git_logger(); _TasksPendingQueue = class { @@ -8497,9 +8581,14 @@ var init_tasks_pending_queue = __esm({ for (const [task, { logger }] of Array.from(this._queue.entries())) { if (task === err.task) { logger.info(`Failed %o`, err); - logger(`Fatal exception, any as-yet un-started tasks run through this executor will not be attempted`); + logger( + `Fatal exception, any as-yet un-started tasks run through this executor will not be attempted` + ); } else { - logger.info(`A fatal exception occurred in a previous task, the queue has been purged: %o`, err.message); + logger.info( + `A fatal exception occurred in a previous task, the queue has been purged: %o`, + err.message + ); } this.complete(task); } @@ -8553,6 +8642,7 @@ function onDataReceived(target, name, logger, output) { var import_child_process, GitExecutorChain; var init_git_executor_chain = __esm({ "src/lib/runners/git-executor-chain.ts"() { + "use strict"; import_child_process = __nccwpck_require__(2081); init_git_error(); init_task(); @@ -8611,8 +8701,18 @@ var init_git_executor_chain = __esm({ } attemptRemoteTask(task, logger) { return __async(this, null, function* () { - const args = this._plugins.exec("spawn.args", [...task.commands], pluginContext(task, task.commands)); - const raw = yield this.gitResponse(task, this.binary, args, this.outputHandler, logger.step("SPAWN")); + const args = this._plugins.exec( + "spawn.args", + [...task.commands], + pluginContext(task, task.commands) + ); + const raw = yield this.gitResponse( + task, + this.binary, + args, + this.outputHandler, + logger.step("SPAWN") + ); const outputStreams = yield this.handleTaskData(task, args, raw, logger.step("HANDLE")); logger(`passing response to task's parser as a %s`, task.format); if (isBufferTask(task)) { @@ -8631,17 +8731,36 @@ var init_git_executor_chain = __esm({ const { exitCode, rejection, stdOut, stdErr } = result; return new Promise((done, fail) => { logger(`Preparing to handle process response exitCode=%d stdOut=`, exitCode); - const { error } = this._plugins.exec("task.error", { error: rejection }, __spreadValues(__spreadValues({}, pluginContext(task, args)), result)); + const { error } = this._plugins.exec( + "task.error", + { error: rejection }, + __spreadValues(__spreadValues({}, pluginContext(task, args)), result) + ); if (error && task.onError) { logger.info(`exitCode=%s handling with custom error handler`); - return task.onError(result, error, (newStdOut) => { - logger.info(`custom error handler treated as success`); - logger(`custom error returned a %s`, objectToString(newStdOut)); - done(new GitOutputStreams(Array.isArray(newStdOut) ? Buffer.concat(newStdOut) : newStdOut, Buffer.concat(stdErr))); - }, fail); + return task.onError( + result, + error, + (newStdOut) => { + logger.info(`custom error handler treated as success`); + logger(`custom error returned a %s`, objectToString(newStdOut)); + done( + new GitOutputStreams( + Array.isArray(newStdOut) ? Buffer.concat(newStdOut) : newStdOut, + Buffer.concat(stdErr) + ) + ); + }, + fail + ); } if (error) { - logger.info(`handling as error: exitCode=%s stdErr=%s rejection=%o`, exitCode, stdErr.length, rejection); + logger.info( + `handling as error: exitCode=%s stdErr=%s rejection=%o`, + exitCode, + stdErr.length, + rejection + ); return fail(error); } logger.info(`retrieving task output complete`); @@ -8651,11 +8770,15 @@ var init_git_executor_chain = __esm({ gitResponse(task, command, args, outputHandler, logger) { return __async(this, null, function* () { const outputLogger = logger.sibling("output"); - const spawnOptions = this._plugins.exec("spawn.options", { - cwd: this.cwd, - env: this.env, - windowsHide: true - }, pluginContext(task, task.commands)); + const spawnOptions = this._plugins.exec( + "spawn.options", + { + cwd: this.cwd, + env: this.env, + windowsHide: true + }, + pluginContext(task, task.commands) + ); return new Promise((done) => { const stdOut = []; const stdErr = []; @@ -8676,8 +8799,14 @@ var init_git_executor_chain = __esm({ } })); const spawned = (0, import_child_process.spawn)(command, args, spawnOptions); - spawned.stdout.on("data", onDataReceived(stdOut, "stdOut", logger, outputLogger.step("stdOut"))); - spawned.stderr.on("data", onDataReceived(stdErr, "stdErr", logger, outputLogger.step("stdErr"))); + spawned.stdout.on( + "data", + onDataReceived(stdOut, "stdOut", logger, outputLogger.step("stdOut")) + ); + spawned.stderr.on( + "data", + onDataReceived(stdErr, "stdErr", logger, outputLogger.step("stdErr")) + ); spawned.on("error", onErrorReceived(stdErr, logger)); if (outputHandler) { logger(`Passing child process stdOut/stdErr to custom outputHandler`); @@ -8725,6 +8854,7 @@ __export(git_executor_exports, { var GitExecutor; var init_git_executor = __esm({ "src/lib/runners/git-executor.ts"() { + "use strict"; init_git_executor_chain(); GitExecutor = class { constructor(binary = "git", cwd, _scheduler, _plugins) { @@ -8751,14 +8881,19 @@ function taskCallback(task, response, callback = NOOP) { }; const onError2 = (err) => { if ((err == null ? void 0 : err.task) === task) { - callback(err instanceof GitResponseError ? addDeprecationNoticeToError(err) : err, void 0); + callback( + err instanceof GitResponseError ? addDeprecationNoticeToError(err) : err, + void 0 + ); } }; response.then(onSuccess, onError2); } function addDeprecationNoticeToError(err) { let log = (name) => { - console.warn(`simple-git deprecation notice: accessing GitResponseError.${name} should be GitResponseError.git.${name}, this will no longer be available in version 3`); + console.warn( + `simple-git deprecation notice: accessing GitResponseError.${name} should be GitResponseError.git.${name}, this will no longer be available in version 3` + ); log = NOOP; }; return Object.create(err, Object.getOwnPropertyNames(err.git).reduce(descriptorReducer, {})); @@ -8779,6 +8914,7 @@ function addDeprecationNoticeToError(err) { } var init_task_callback = __esm({ "src/lib/task-callback.ts"() { + "use strict"; init_git_response_error(); init_utils(); } @@ -8795,6 +8931,7 @@ function changeWorkingDirectoryTask(directory, root) { } var init_change_working_directory = __esm({ "src/lib/tasks/change-working-directory.ts"() { + "use strict"; init_utils(); init_task(); } @@ -8811,18 +8948,28 @@ function checkoutTask(args) { function checkout_default() { return { checkout() { - return this._runTask(checkoutTask(getTrailingOptions(arguments, 1)), trailingFunctionArgument(arguments)); + return this._runTask( + checkoutTask(getTrailingOptions(arguments, 1)), + trailingFunctionArgument(arguments) + ); }, checkoutBranch(branchName, startPoint) { - return this._runTask(checkoutTask(["-b", branchName, startPoint, ...getTrailingOptions(arguments)]), trailingFunctionArgument(arguments)); + return this._runTask( + checkoutTask(["-b", branchName, startPoint, ...getTrailingOptions(arguments)]), + trailingFunctionArgument(arguments) + ); }, checkoutLocalBranch(branchName) { - return this._runTask(checkoutTask(["-b", branchName, ...getTrailingOptions(arguments)]), trailingFunctionArgument(arguments)); + return this._runTask( + checkoutTask(["-b", branchName, ...getTrailingOptions(arguments)]), + trailingFunctionArgument(arguments) + ); } }; } var init_checkout = __esm({ "src/lib/tasks/checkout.ts"() { + "use strict"; init_utils(); init_task(); } @@ -8846,6 +8993,7 @@ function parseCommitResult(stdOut) { var parsers; var init_parse_commit = __esm({ "src/lib/parsers/parse-commit.ts"() { + "use strict"; init_utils(); parsers = [ new LineParser(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/, (result, [branch, root, commit]) => { @@ -8864,20 +9012,26 @@ var init_parse_commit = __esm({ name: parts.join("<").trim() }; }), - new LineParser(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g, (result, [changes, insertions, deletions]) => { - result.summary.changes = parseInt(changes, 10) || 0; - result.summary.insertions = parseInt(insertions, 10) || 0; - result.summary.deletions = parseInt(deletions, 10) || 0; - }), - new LineParser(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/, (result, [changes, lines, direction]) => { - result.summary.changes = parseInt(changes, 10) || 0; - const count = parseInt(lines, 10) || 0; - if (direction === "-") { - result.summary.deletions = count; - } else if (direction === "+") { - result.summary.insertions = count; + new LineParser( + /(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g, + (result, [changes, insertions, deletions]) => { + result.summary.changes = parseInt(changes, 10) || 0; + result.summary.insertions = parseInt(insertions, 10) || 0; + result.summary.deletions = parseInt(deletions, 10) || 0; + } + ), + new LineParser( + /^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/, + (result, [changes, lines, direction]) => { + result.summary.changes = parseInt(changes, 10) || 0; + const count = parseInt(lines, 10) || 0; + if (direction === "-") { + result.summary.deletions = count; + } else if (direction === "+") { + result.summary.insertions = count; + } } - }) + ) ]; } }); @@ -8902,16 +9056,23 @@ function commit_default() { return { commit(message, ...rest) { const next = trailingFunctionArgument(arguments); - const task = rejectDeprecatedSignatures(message) || commitTask(asArray(message), asArray(filterType(rest[0], filterStringOrStringArray, [])), [...filterType(rest[1], filterArray, []), ...getTrailingOptions(arguments, 0, true)]); + const task = rejectDeprecatedSignatures(message) || commitTask( + asArray(message), + asArray(filterType(rest[0], filterStringOrStringArray, [])), + [...filterType(rest[1], filterArray, []), ...getTrailingOptions(arguments, 0, true)] + ); return this._runTask(task, next); } }; function rejectDeprecatedSignatures(message) { - return !filterStringOrStringArray(message) && configurationErrorTask(`git.commit: requires the commit message to be supplied as a string/string[]`); + return !filterStringOrStringArray(message) && configurationErrorTask( + `git.commit: requires the commit message to be supplied as a string/string[]` + ); } } var init_commit = __esm({ "src/lib/tasks/commit.ts"() { + "use strict"; init_parse_commit(); init_utils(); init_task(); @@ -8922,12 +9083,16 @@ var init_commit = __esm({ function first_commit_default() { return { firstCommit() { - return this._runTask(straightThroughStringTask(["rev-list", "--max-parents=0", "HEAD"], true), trailingFunctionArgument(arguments)); + return this._runTask( + straightThroughStringTask(["rev-list", "--max-parents=0", "HEAD"], true), + trailingFunctionArgument(arguments) + ); } }; } var init_first_commit = __esm({ "src/lib/tasks/first-commit.ts"() { + "use strict"; init_utils(); init_task(); } @@ -8943,6 +9108,7 @@ function hashObjectTask(filePath, write) { } var init_hash_object = __esm({ "src/lib/tasks/hash-object.ts"() { + "use strict"; init_task(); } }); @@ -8971,6 +9137,7 @@ function parseInit(bare, path, text) { var InitSummary, initResponseRegex, reInitResponseRegex; var init_InitSummary = __esm({ "src/lib/responses/InitSummary.ts"() { + "use strict"; InitSummary = class { constructor(bare, path, existing, gitDir) { this.bare = bare; @@ -9004,6 +9171,7 @@ function initTask(bare = false, path, customArgs) { var bareCommand; var init_init = __esm({ "src/lib/tasks/init.ts"() { + "use strict"; init_InitSummary(); bareCommand = "--bare"; } @@ -9025,6 +9193,7 @@ function isLogFormat(customArg) { var logFormatRegex; var init_log_format = __esm({ "src/lib/args/log-format.ts"() { + "use strict"; logFormatRegex = /^--(stat|numstat|name-only|name-status)(=|$)/; } }); @@ -9033,6 +9202,7 @@ var init_log_format = __esm({ var DiffSummary; var init_DiffSummary = __esm({ "src/lib/responses/DiffSummary.ts"() { + "use strict"; DiffSummary = class { constructor() { this.changed = 0; @@ -9052,51 +9222,64 @@ function getDiffParser(format = "" /* NONE */) { var statParser, numStatParser, nameOnlyParser, nameStatusParser, diffSummaryParsers; var init_parse_diff_summary = __esm({ "src/lib/parsers/parse-diff-summary.ts"() { + "use strict"; init_log_format(); init_DiffSummary(); init_diff_name_status(); 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]); - }) + 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( + /(\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({ @@ -9120,17 +9303,20 @@ var init_parse_diff_summary = __esm({ }) ]; nameStatusParser = [ - new LineParser(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/, (result, [status, _similarity, from, _to, to]) => { - result.changed++; - result.files.push({ - file: to != null ? to : from, - changes: 0, - status: orVoid(isDiffNameStatus(status) && status), - insertions: 0, - deletions: 0, - binary: false - }); - }) + new LineParser( + /([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/, + (result, [status, _similarity, from, _to, to]) => { + result.changed++; + result.files.push({ + file: to != null ? to : from, + changes: 0, + status: orVoid(isDiffNameStatus(status) && status), + insertions: 0, + deletions: 0, + binary: false + }); + } + ) ]; diffSummaryParsers = { ["" /* NONE */]: statParser, @@ -9144,17 +9330,27 @@ var init_parse_diff_summary = __esm({ // src/lib/parsers/parse-list-log-summary.ts function lineBuilder(tokens, fields) { - return fields.reduce((line, field, index) => { - line[field] = tokens[index] || ""; - return line; - }, /* @__PURE__ */ Object.create({ diff: null })); + return fields.reduce( + (line, field, index) => { + line[field] = tokens[index] || ""; + return line; + }, + /* @__PURE__ */ Object.create({ diff: null }) + ); } function createListLogSummaryParser(splitter = SPLITTER, fields = defaultFieldNames, logFormat = "" /* NONE */) { const parseDiffResult = getDiffParser(logFormat); return function(stdOut) { - const all = toLinesWithContent(stdOut, true, START_BOUNDARY).map(function(item) { + const all = toLinesWithContent( + stdOut, + true, + START_BOUNDARY + ).map(function(item) { const lineDetail = item.trim().split(COMMIT_BOUNDARY); - const listLogLine = lineBuilder(lineDetail[0].trim().split(splitter), fields); + const listLogLine = lineBuilder( + lineDetail[0].trim().split(splitter), + fields + ); if (lineDetail.length > 1 && !!lineDetail[1].trim()) { listLogLine.diff = parseDiffResult(lineDetail[1]); } @@ -9170,6 +9366,7 @@ function createListLogSummaryParser(splitter = SPLITTER, fields = defaultFieldNa var START_BOUNDARY, COMMIT_BOUNDARY, SPLITTER, defaultFieldNames; var init_parse_list_log_summary = __esm({ "src/lib/parsers/parse-list-log-summary.ts"() { + "use strict"; init_utils(); init_parse_diff_summary(); init_log_format(); @@ -9203,14 +9400,19 @@ function diffSummaryTask(customArgs) { function validateLogFormatConfig(customArgs) { const flags = customArgs.filter(isLogFormat); if (flags.length > 1) { - return configurationErrorTask(`Summary flags are mutually exclusive - pick one of ${flags.join(",")}`); + 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'`); + return configurationErrorTask( + `Summary flag ${flags} parsing is not compatible with null termination option '-z'` + ); } } var init_diff = __esm({ "src/lib/tasks/diff.ts"() { + "use strict"; init_log_format(); init_parse_diff_summary(); init_task(); @@ -9282,7 +9484,10 @@ function log_default() { return { log(...rest) { const next = trailingFunctionArgument(arguments); - const options = parseLogOptions(trailingOptionsArgument(arguments), filterType(arguments[0], filterArray)); + const options = parseLogOptions( + trailingOptionsArgument(arguments), + filterType(arguments[0], filterArray) + ); const task = rejectDeprecatedSignatures(...rest) || validateLogFormatConfig(options.commands) || createLogTask(options); return this._runTask(task, next); } @@ -9291,12 +9496,15 @@ function log_default() { return logTask(options.splitter, options.fields, options.commands); } function rejectDeprecatedSignatures(from, to) { - return filterString(from) && filterString(to) && configurationErrorTask(`git.log(string, string) should be replaced with git.log({ from: string, to: string })`); + return filterString(from) && filterString(to) && configurationErrorTask( + `git.log(string, string) should be replaced with git.log({ from: string, to: string })` + ); } } var excludeOptions; var init_log = __esm({ "src/lib/tasks/log.ts"() { + "use strict"; init_log_format(); init_pathspec(); init_parse_list_log_summary(); @@ -9326,6 +9534,7 @@ var init_log = __esm({ var MergeSummaryConflict, MergeSummaryDetail; var init_MergeSummary = __esm({ "src/lib/responses/MergeSummary.ts"() { + "use strict"; MergeSummaryConflict = class { constructor(reason, file = null, meta) { this.reason = reason; @@ -9362,6 +9571,7 @@ var init_MergeSummary = __esm({ var PullSummary, PullFailedSummary; var init_PullSummary = __esm({ "src/lib/responses/PullSummary.ts"() { + "use strict"; PullSummary = class { constructor() { this.remoteMessages = { @@ -9421,24 +9631,34 @@ function asObjectCount(source) { var remoteMessagesObjectParsers; var init_parse_remote_objects = __esm({ "src/lib/parsers/parse-remote-objects.ts"() { + "use strict"; init_utils(); remoteMessagesObjectParsers = [ - new RemoteLineParser(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i, (result, [action, count]) => { - const key = action.toLowerCase(); - const enumeration = objectEnumerationResult(result.remoteMessages); - Object.assign(enumeration, { [key]: asNumber(count) }); - }), - new RemoteLineParser(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i, (result, [action, count]) => { - const key = action.toLowerCase(); - const enumeration = objectEnumerationResult(result.remoteMessages); - Object.assign(enumeration, { [key]: asNumber(count) }); - }), - new RemoteLineParser(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i, (result, [total, reused, packReused]) => { - const objects = objectEnumerationResult(result.remoteMessages); - objects.total = asObjectCount(total); - objects.reused = asObjectCount(reused); - objects.packReused = asNumber(packReused); - }) + new RemoteLineParser( + /^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i, + (result, [action, count]) => { + const key = action.toLowerCase(); + const enumeration = objectEnumerationResult(result.remoteMessages); + Object.assign(enumeration, { [key]: asNumber(count) }); + } + ), + new RemoteLineParser( + /^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i, + (result, [action, count]) => { + const key = action.toLowerCase(); + const enumeration = objectEnumerationResult(result.remoteMessages); + Object.assign(enumeration, { [key]: asNumber(count) }); + } + ), + new RemoteLineParser( + /total ([^,]+), reused ([^,]+), pack-reused (\d+)/i, + (result, [total, reused, packReused]) => { + const objects = objectEnumerationResult(result.remoteMessages); + objects.total = asObjectCount(total); + objects.reused = asObjectCount(reused); + objects.packReused = asNumber(packReused); + } + ) ]; } }); @@ -9450,6 +9670,7 @@ function parseRemoteMessages(_stdOut, stdErr) { var parsers2, RemoteMessageSummary; var init_parse_remote_messages = __esm({ "src/lib/parsers/parse-remote-messages.ts"() { + "use strict"; init_utils(); init_parse_remote_objects(); parsers2 = [ @@ -9458,16 +9679,22 @@ var init_parse_remote_messages = __esm({ return false; }), ...remoteMessagesObjectParsers, - new RemoteLineParser([/create a (?:pull|merge) request/i, /\s(https?:\/\/\S+)$/], (result, [pullRequestUrl]) => { - result.remoteMessages.pullRequestUrl = pullRequestUrl; - }), - new RemoteLineParser([/found (\d+) vulnerabilities.+\(([^)]+)\)/i, /\s(https?:\/\/\S+)$/], (result, [count, summary, url]) => { - result.remoteMessages.vulnerabilities = { - count: asNumber(count), - summary, - url - }; - }) + new RemoteLineParser( + [/create a (?:pull|merge) request/i, /\s(https?:\/\/\S+)$/], + (result, [pullRequestUrl]) => { + result.remoteMessages.pullRequestUrl = pullRequestUrl; + } + ), + new RemoteLineParser( + [/found (\d+) vulnerabilities.+\(([^)]+)\)/i, /\s(https?:\/\/\S+)$/], + (result, [count, summary, url]) => { + result.remoteMessages.vulnerabilities = { + count: asNumber(count), + summary, + url + }; + } + ) ]; RemoteMessageSummary = class { constructor() { @@ -9485,6 +9712,7 @@ function parsePullErrorResult(stdOut, stdErr) { var FILE_UPDATE_REGEX, SUMMARY_REGEX, ACTION_REGEX, parsers3, errorParsers, parsePullDetail, parsePullResult; var init_parse_pull = __esm({ "src/lib/parsers/parse-pull.ts"() { + "use strict"; init_PullSummary(); init_utils(); init_parse_remote_messages(); @@ -9518,18 +9746,25 @@ var init_parse_pull = __esm({ errorParsers = [ new LineParser(/^from\s(.+)$/i, (result, [remote]) => void (result.remote = remote)), new LineParser(/^fatal:\s(.+)$/, (result, [message]) => void (result.message = message)), - new LineParser(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/, (result, [hashLocal, hashRemote, branchLocal, branchRemote]) => { - result.branch.local = branchLocal; - result.hash.local = hashLocal; - result.branch.remote = branchRemote; - result.hash.remote = hashRemote; - }) + new LineParser( + /([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/, + (result, [hashLocal, hashRemote, branchLocal, branchRemote]) => { + result.branch.local = branchLocal; + result.hash.local = hashLocal; + result.branch.remote = branchRemote; + result.hash.remote = hashRemote; + } + ) ]; parsePullDetail = (stdOut, stdErr) => { return parseStringResponse(new PullSummary(), parsers3, [stdOut, stdErr]); }; parsePullResult = (stdOut, stdErr) => { - return Object.assign(new PullSummary(), parsePullDetail(stdOut, stdErr), parseRemoteMessages(stdOut, stdErr)); + return Object.assign( + new PullSummary(), + parsePullDetail(stdOut, stdErr), + parseRemoteMessages(stdOut, stdErr) + ); }; } }); @@ -9538,6 +9773,7 @@ var init_parse_pull = __esm({ var parsers4, parseMergeResult, parseMergeDetail; var init_parse_merge = __esm({ "src/lib/parsers/parse-merge.ts"() { + "use strict"; init_MergeSummary(); init_utils(); init_parse_pull(); @@ -9548,9 +9784,12 @@ var init_parse_merge = __esm({ new LineParser(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/, (summary, [reason, file]) => { summary.conflicts.push(new MergeSummaryConflict(reason, file)); }), - new LineParser(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/, (summary, [reason, file, deleteRef]) => { - summary.conflicts.push(new MergeSummaryConflict(reason, file, { deleteRef })); - }), + new LineParser( + /^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/, + (summary, [reason, file, deleteRef]) => { + summary.conflicts.push(new MergeSummaryConflict(reason, file, { deleteRef })); + } + ), new LineParser(/^CONFLICT\s+\((.+)\):/, (summary, [reason]) => { summary.conflicts.push(new MergeSummaryConflict(reason, null)); }), @@ -9586,6 +9825,7 @@ function mergeTask(customArgs) { } var init_merge = __esm({ "src/lib/tasks/merge.ts"() { + "use strict"; init_git_response_error(); init_parse_merge(); init_task(); @@ -9610,6 +9850,7 @@ function pushResultPushedItem(local, remote, status) { var parsers5, parsePushResult, parsePushDetail; var init_parse_push = __esm({ "src/lib/parsers/parse-push.ts"() { + "use strict"; init_utils(); init_parse_remote_messages(); parsers5 = [ @@ -9624,25 +9865,31 @@ var init_parse_push = __esm({ new LineParser(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/, (result, [local, remote, type]) => { result.pushed.push(pushResultPushedItem(local, remote, type)); }), - new LineParser(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/, (result, [local, remote, remoteName]) => { - result.branch = __spreadProps(__spreadValues({}, result.branch || {}), { - local, - remote, - remoteName - }); - }), - new LineParser(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/, (result, [local, remote, from, to]) => { - result.update = { - head: { + new LineParser( + /^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/, + (result, [local, remote, remoteName]) => { + result.branch = __spreadProps(__spreadValues({}, result.branch || {}), { local, - remote - }, - hash: { - from, - to - } - }; - }) + remote, + remoteName + }); + } + ), + new LineParser( + /^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/, + (result, [local, remote, from, to]) => { + result.update = { + head: { + local, + remote + }, + hash: { + from, + to + } + }; + } + ) ]; parsePushResult = (stdOut, stdErr) => { const pushDetail = parsePushDetail(stdOut, stdErr); @@ -9684,6 +9931,7 @@ function pushTask(ref = {}, customArgs) { } var init_push = __esm({ "src/lib/tasks/push.ts"() { + "use strict"; init_parse_push(); init_utils(); } @@ -9697,16 +9945,23 @@ function show_default() { if (!commands.includes("--binary")) { commands.splice(1, 0, "--binary"); } - return this._runTask(straightThroughBufferTask(commands), trailingFunctionArgument(arguments)); + return this._runTask( + straightThroughBufferTask(commands), + trailingFunctionArgument(arguments) + ); }, show() { const commands = ["show", ...getTrailingOptions(arguments, 1)]; - return this._runTask(straightThroughStringTask(commands), trailingFunctionArgument(arguments)); + return this._runTask( + straightThroughStringTask(commands), + trailingFunctionArgument(arguments) + ); } }; } var init_show = __esm({ "src/lib/tasks/show.ts"() { + "use strict"; init_utils(); init_task(); } @@ -9716,13 +9971,14 @@ var init_show = __esm({ var fromPathRegex, FileStatusSummary; var init_FileStatusSummary = __esm({ "src/lib/responses/FileStatusSummary.ts"() { + "use strict"; fromPathRegex = /^(.+) -> (.+)$/; FileStatusSummary = class { constructor(path, index, working_dir) { this.path = path; this.index = index; this.working_dir = working_dir; - if (index + working_dir === "R") { + if ("R" === index + working_dir) { const detail = fromPathRegex.exec(path) || [null, path, path]; this.from = detail[1] || ""; this.path = detail[2] || ""; @@ -9770,6 +10026,7 @@ function splitLine(result, lineStr) { var StatusSummary, parsers6, parseStatusSummary; var init_StatusSummary = __esm({ "src/lib/responses/StatusSummary.ts"() { + "use strict"; init_utils(); init_FileStatusSummary(); StatusSummary = class { @@ -9794,14 +10051,46 @@ var init_StatusSummary = __esm({ } }; parsers6 = new Map([ - parser2(" " /* NONE */, "A" /* ADDED */, (result, file) => append(result.created, file)), - parser2(" " /* NONE */, "D" /* DELETED */, (result, file) => append(result.deleted, file)), - parser2(" " /* NONE */, "M" /* MODIFIED */, (result, file) => append(result.modified, file)), - parser2("A" /* ADDED */, " " /* NONE */, (result, file) => append(result.created, file) && append(result.staged, file)), - parser2("A" /* ADDED */, "M" /* MODIFIED */, (result, file) => append(result.created, file) && append(result.staged, file) && append(result.modified, file)), - parser2("D" /* DELETED */, " " /* NONE */, (result, file) => append(result.deleted, file) && append(result.staged, file)), - parser2("M" /* MODIFIED */, " " /* NONE */, (result, file) => append(result.modified, file) && append(result.staged, file)), - parser2("M" /* MODIFIED */, "M" /* MODIFIED */, (result, file) => append(result.modified, file) && append(result.staged, file)), + parser2( + " " /* NONE */, + "A" /* ADDED */, + (result, file) => append(result.created, file) + ), + parser2( + " " /* NONE */, + "D" /* DELETED */, + (result, file) => append(result.deleted, file) + ), + parser2( + " " /* NONE */, + "M" /* MODIFIED */, + (result, file) => append(result.modified, file) + ), + parser2( + "A" /* ADDED */, + " " /* NONE */, + (result, file) => append(result.created, file) && append(result.staged, file) + ), + parser2( + "A" /* ADDED */, + "M" /* MODIFIED */, + (result, file) => append(result.created, file) && append(result.staged, file) && append(result.modified, file) + ), + parser2( + "D" /* DELETED */, + " " /* NONE */, + (result, file) => append(result.deleted, file) && append(result.staged, file) + ), + parser2( + "M" /* MODIFIED */, + " " /* NONE */, + (result, file) => append(result.modified, file) && append(result.staged, file) + ), + parser2( + "M" /* MODIFIED */, + "M" /* MODIFIED */, + (result, file) => append(result.modified, file) && append(result.staged, file) + ), parser2("R" /* RENAMED */, " " /* NONE */, (result, file) => { append(result.renamed, renamedFile(file)); }), @@ -9813,10 +10102,23 @@ var init_StatusSummary = __esm({ parser2("!" /* IGNORED */, "!" /* IGNORED */, (_result, _file) => { append(_result.ignored = _result.ignored || [], _file); }), - parser2("?" /* UNTRACKED */, "?" /* UNTRACKED */, (result, file) => append(result.not_added, file)), + parser2( + "?" /* UNTRACKED */, + "?" /* UNTRACKED */, + (result, file) => append(result.not_added, file) + ), ...conflicts("A" /* ADDED */, "A" /* ADDED */, "U" /* UNMERGED */), - ...conflicts("D" /* DELETED */, "D" /* DELETED */, "U" /* UNMERGED */), - ...conflicts("U" /* UNMERGED */, "A" /* ADDED */, "D" /* DELETED */, "U" /* UNMERGED */), + ...conflicts( + "D" /* DELETED */, + "D" /* DELETED */, + "U" /* UNMERGED */ + ), + ...conflicts( + "U" /* UNMERGED */, + "A" /* ADDED */, + "D" /* DELETED */, + "U" /* UNMERGED */ + ), [ "##", (result, line) => { @@ -9879,6 +10181,7 @@ function statusTask(customArgs) { var ignoredOptions; var init_status = __esm({ "src/lib/tasks/status.ts"() { + "use strict"; init_StatusSummary(); ignoredOptions = ["--null", "-z"]; } @@ -9886,19 +10189,23 @@ var init_status = __esm({ // src/lib/tasks/version.ts function versionResponse(major = 0, minor = 0, patch = 0, agent = "", installed = true) { - return Object.defineProperty({ - major, - minor, - patch, - agent, - installed - }, "toString", { - value() { - return `${this.major}.${this.minor}.${this.patch}`; + return Object.defineProperty( + { + major, + minor, + patch, + agent, + installed }, - configurable: false, - enumerable: false - }); + "toString", + { + value() { + return `${this.major}.${this.minor}.${this.patch}`; + }, + configurable: false, + enumerable: false + } + ); } function notInstalledResponse() { return versionResponse(0, 0, 0, "", false); @@ -9929,15 +10236,25 @@ function versionParser(stdOut) { var NOT_INSTALLED, parsers7; var init_version = __esm({ "src/lib/tasks/version.ts"() { + "use strict"; init_utils(); NOT_INSTALLED = "installed=false"; parsers7 = [ - new LineParser(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/, (result, [major, minor, patch, agent = ""]) => { - Object.assign(result, versionResponse(asNumber(major), asNumber(minor), asNumber(patch), agent)); - }), - new LineParser(/version (\d+)\.(\d+)\.(\D+)(.+)?$/, (result, [major, minor, patch, agent = ""]) => { - Object.assign(result, versionResponse(asNumber(major), asNumber(minor), patch, agent)); - }) + new LineParser( + /version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/, + (result, [major, minor, patch, agent = ""]) => { + Object.assign( + result, + versionResponse(asNumber(major), asNumber(minor), asNumber(patch), agent) + ); + } + ), + new LineParser( + /version (\d+)\.(\d+)\.(\D+)(.+)?$/, + (result, [major, minor, patch, agent = ""]) => { + Object.assign(result, versionResponse(asNumber(major), asNumber(minor), patch, agent)); + } + ) ]; } }); @@ -9950,6 +10267,7 @@ __export(simple_git_api_exports, { var SimpleGitApi; var init_simple_git_api = __esm({ "src/lib/simple-git-api.ts"() { + "use strict"; init_task_callback(); init_change_working_directory(); init_checkout(); @@ -9984,7 +10302,10 @@ var init_simple_git_api = __esm({ }); } add(files) { - return this._runTask(straightThroughStringTask(["add", ...asArray(files)]), trailingFunctionArgument(arguments)); + return this._runTask( + straightThroughStringTask(["add", ...asArray(files)]), + trailingFunctionArgument(arguments) + ); } cwd(directory) { const next = trailingFunctionArgument(arguments); @@ -9992,44 +10313,88 @@ var init_simple_git_api = __esm({ return this._runTask(changeWorkingDirectoryTask(directory, this._executor), next); } if (typeof (directory == null ? void 0 : directory.path) === "string") { - return this._runTask(changeWorkingDirectoryTask(directory.path, directory.root && this._executor || void 0), next); - } - return this._runTask(configurationErrorTask("Git.cwd: workingDirectory must be supplied as a string"), next); + return this._runTask( + changeWorkingDirectoryTask( + directory.path, + directory.root && this._executor || void 0 + ), + next + ); + } + return this._runTask( + configurationErrorTask("Git.cwd: workingDirectory must be supplied as a string"), + next + ); } hashObject(path, write) { - return this._runTask(hashObjectTask(path, write === true), trailingFunctionArgument(arguments)); + return this._runTask( + hashObjectTask(path, write === true), + trailingFunctionArgument(arguments) + ); } init(bare) { - return this._runTask(initTask(bare === true, this._executor.cwd, getTrailingOptions(arguments)), trailingFunctionArgument(arguments)); + return this._runTask( + initTask(bare === true, this._executor.cwd, getTrailingOptions(arguments)), + trailingFunctionArgument(arguments) + ); } merge() { - return this._runTask(mergeTask(getTrailingOptions(arguments)), trailingFunctionArgument(arguments)); + return this._runTask( + mergeTask(getTrailingOptions(arguments)), + trailingFunctionArgument(arguments) + ); } mergeFromTo(remote, branch) { if (!(filterString(remote) && filterString(branch))) { - return this._runTask(configurationErrorTask(`Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings`)); + return this._runTask( + configurationErrorTask( + `Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings` + ) + ); } - return this._runTask(mergeTask([remote, branch, ...getTrailingOptions(arguments)]), trailingFunctionArgument(arguments, false)); + return this._runTask( + mergeTask([remote, branch, ...getTrailingOptions(arguments)]), + trailingFunctionArgument(arguments, false) + ); } outputHandler(handler) { this._executor.outputHandler = handler; return this; } push() { - const task = pushTask({ - remote: filterType(arguments[0], filterString), - branch: filterType(arguments[1], filterString) - }, getTrailingOptions(arguments)); + const task = pushTask( + { + remote: filterType(arguments[0], filterString), + branch: filterType(arguments[1], filterString) + }, + getTrailingOptions(arguments) + ); return this._runTask(task, trailingFunctionArgument(arguments)); } stash() { - return this._runTask(straightThroughStringTask(["stash", ...getTrailingOptions(arguments)]), trailingFunctionArgument(arguments)); + return this._runTask( + straightThroughStringTask(["stash", ...getTrailingOptions(arguments)]), + trailingFunctionArgument(arguments) + ); } status() { - return this._runTask(statusTask(getTrailingOptions(arguments)), trailingFunctionArgument(arguments)); + return this._runTask( + statusTask(getTrailingOptions(arguments)), + trailingFunctionArgument(arguments) + ); } }; - Object.assign(SimpleGitApi.prototype, checkout_default(), commit_default(), config_default(), first_commit_default(), grep_default(), log_default(), show_default(), version_default()); + Object.assign( + SimpleGitApi.prototype, + checkout_default(), + commit_default(), + config_default(), + first_commit_default(), + grep_default(), + log_default(), + show_default(), + version_default() + ); } }); @@ -10041,6 +10406,7 @@ __export(scheduler_exports, { var import_promise_deferred2, createScheduledTask, Scheduler; var init_scheduler = __esm({ "src/lib/runners/scheduler.ts"() { + "use strict"; init_utils(); import_promise_deferred2 = __nccwpck_require__(9819); init_git_logger(); @@ -10066,7 +10432,12 @@ var init_scheduler = __esm({ } schedule() { if (!this.pending.length || this.running.length >= this.concurrency) { - this.logger(`Schedule attempt ignored, pending=%s running=%s concurrency=%s`, this.pending.length, this.running.length, this.concurrency); + this.logger( + `Schedule attempt ignored, pending=%s running=%s concurrency=%s`, + this.pending.length, + this.running.length, + this.concurrency + ); return; } const task = append(this.running, this.pending.shift()); @@ -10097,6 +10468,7 @@ function applyPatchTask(patches, customArgs) { } var init_apply_patch = __esm({ "src/lib/tasks/apply-patch.ts"() { + "use strict"; init_task(); } }); @@ -10119,6 +10491,7 @@ function branchDeletionFailure(branch) { var BranchDeletionBatch; var init_BranchDeleteSummary = __esm({ "src/lib/responses/BranchDeleteSummary.ts"() { + "use strict"; BranchDeletionBatch = class { constructor() { this.all = []; @@ -10139,6 +10512,7 @@ function hasBranchDeletionError(data, processExitCode) { var deleteSuccessRegex, deleteErrorRegex, parsers8, parseBranchDeletions; var init_parse_branch_delete = __esm({ "src/lib/parsers/parse-branch-delete.ts"() { + "use strict"; init_BranchDeleteSummary(); init_utils(); deleteSuccessRegex = /(\S+)\s+\(\S+\s([^)]+)\)/; @@ -10166,6 +10540,7 @@ var init_parse_branch_delete = __esm({ var BranchSummaryResult; var init_BranchSummary = __esm({ "src/lib/responses/BranchSummary.ts"() { + "use strict"; BranchSummaryResult = class { constructor() { this.all = []; @@ -10201,15 +10576,22 @@ function parseBranchSummary(stdOut) { var parsers9; var init_parse_branch = __esm({ "src/lib/parsers/parse-branch.ts"() { + "use strict"; init_BranchSummary(); init_utils(); parsers9 = [ - 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)?(\S+)\s+([a-z0-9]+)\s?(.*)$/s, (result, [current, name, commit, label]) => { - result.push(branchStatus(current), false, name, commit, label); - }) + 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( + new RegExp("^([*+]\\s)?(\\S+)\\s+([a-z0-9]+)\\s?(.*)$", "s"), + (result, [current, name, commit, label]) => { + result.push(branchStatus(current), false, name, commit, label); + } + ) ]; } }); @@ -10281,13 +10663,17 @@ function deleteBranchTask(branch, forceDelete = false) { if (!hasBranchDeletionError(String(error), exitCode)) { return fail(error); } - throw new GitResponseError(task.parser(bufferToString(stdOut), bufferToString(stdErr)), String(error)); + throw new GitResponseError( + task.parser(bufferToString(stdOut), bufferToString(stdErr)), + String(error) + ); } }; return task; } var init_branch = __esm({ "src/lib/tasks/branch.ts"() { + "use strict"; init_git_response_error(); init_parse_branch_delete(); init_parse_branch(); @@ -10299,6 +10685,7 @@ var init_branch = __esm({ var parseCheckIgnore; var init_CheckIgnore = __esm({ "src/lib/responses/CheckIgnore.ts"() { + "use strict"; parseCheckIgnore = (text) => { return text.split(/\n/g).map((line) => line.trim()).filter((file) => !!file); }; @@ -10319,6 +10706,7 @@ function checkIgnoreTask(paths) { } var init_check_ignore = __esm({ "src/lib/tasks/check-ignore.ts"() { + "use strict"; init_CheckIgnore(); } }); @@ -10348,6 +10736,7 @@ function cloneMirrorTask(repo, directory, customArgs) { } var init_clone = __esm({ "src/lib/tasks/clone.ts"() { + "use strict"; init_task(); init_utils(); } @@ -10368,6 +10757,7 @@ function parseFetchResult(stdOut, stdErr) { var parsers10; var init_parse_fetch = __esm({ "src/lib/parsers/parse-fetch.ts"() { + "use strict"; init_utils(); parsers10 = [ new LineParser(/From (.+)$/, (result, [remote]) => { @@ -10390,14 +10780,17 @@ var init_parse_fetch = __esm({ tracking }); }), - new LineParser(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/, (result, [from, to, name, tracking]) => { - result.updated.push({ - name, - tracking, - to, - from - }); - }) + new LineParser( + /\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/, + (result, [from, to, name, tracking]) => { + result.updated.push({ + name, + tracking, + to, + from + }); + } + ) ]; } }); @@ -10427,6 +10820,7 @@ function fetchTask(remote, branch, customArgs) { } var init_fetch = __esm({ "src/lib/tasks/fetch.ts"() { + "use strict"; init_parse_fetch(); init_task(); } @@ -10439,6 +10833,7 @@ function parseMoveResult(stdOut) { var parsers11; var init_parse_move = __esm({ "src/lib/parsers/parse-move.ts"() { + "use strict"; init_utils(); parsers11 = [ new LineParser(/^Renaming (.+) to (.+)$/, (result, [from, to]) => { @@ -10462,6 +10857,7 @@ function moveTask(from, to) { } var init_move = __esm({ "src/lib/tasks/move.ts"() { + "use strict"; init_parse_move(); init_utils(); } @@ -10484,7 +10880,10 @@ function pullTask(remote, branch, customArgs) { return parsePullResult(stdOut, stdErr); }, onError(result, _error, _done, fail) { - const pullError = parsePullErrorResult(bufferToString(result.stdOut), bufferToString(result.stdErr)); + const pullError = parsePullErrorResult( + bufferToString(result.stdOut), + bufferToString(result.stdErr) + ); if (pullError) { return fail(new GitResponseError(pullError)); } @@ -10494,6 +10893,7 @@ function pullTask(remote, branch, customArgs) { } var init_pull = __esm({ "src/lib/tasks/pull.ts"() { + "use strict"; init_git_response_error(); init_parse_pull(); init_utils(); @@ -10526,6 +10926,7 @@ function forEach(text, handler) { } var init_GetRemoteSummary = __esm({ "src/lib/responses/GetRemoteSummary.ts"() { + "use strict"; init_utils(); } }); @@ -10539,7 +10940,7 @@ __export(remote_exports, { remoteTask: () => remoteTask, removeRemoteTask: () => removeRemoteTask }); -function addRemoteTask(remoteName, remoteRepo, customArgs = []) { +function addRemoteTask(remoteName, remoteRepo, customArgs) { return straightThroughStringTask(["remote", "add", ...customArgs, remoteName, remoteRepo]); } function getRemotesTask(verbose) { @@ -10553,14 +10954,14 @@ function getRemotesTask(verbose) { parser: verbose ? parseGetRemotesVerbose : parseGetRemotes }; } -function listRemotesTask(customArgs = []) { +function listRemotesTask(customArgs) { const commands = [...customArgs]; if (commands[0] !== "ls-remote") { commands.unshift("ls-remote"); } return straightThroughStringTask(commands); } -function remoteTask(customArgs = []) { +function remoteTask(customArgs) { const commands = [...customArgs]; if (commands[0] !== "remote") { commands.unshift("remote"); @@ -10572,6 +10973,7 @@ function removeRemoteTask(remoteName) { } var init_remote = __esm({ "src/lib/tasks/remote.ts"() { + "use strict"; init_GetRemoteSummary(); init_task(); } @@ -10585,7 +10987,11 @@ __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)); + const parser3 = createListLogSummaryParser( + options.splitter, + options.fields, + logFormatFromCommand(commands) + ); return validateLogFormatConfig(commands) || { commands, format: "utf-8", @@ -10594,6 +11000,7 @@ function stashListTask(opt = {}, customArgs) { } var init_stash_list = __esm({ "src/lib/tasks/stash-list.ts"() { + "use strict"; init_log_format(); init_parse_list_log_summary(); init_diff(); @@ -10627,6 +11034,7 @@ function updateSubModuleTask(customArgs) { } var init_sub_module = __esm({ "src/lib/tasks/sub-module.ts"() { + "use strict"; init_task(); } }); @@ -10655,6 +11063,7 @@ function toNumber(input) { var TagList, parseTagList; var init_TagList = __esm({ "src/lib/responses/TagList.ts"() { + "use strict"; TagList = class { constructor(all, latest) { this.all = all; @@ -10722,6 +11131,7 @@ function addAnnotatedTagTask(name, tagMessage) { } var init_tag = __esm({ "src/lib/tasks/tag.ts"() { + "use strict"; init_TagList(); } }); @@ -10729,6 +11139,7 @@ var init_tag = __esm({ // src/git.js var require_git = __commonJS({ "src/git.js"(exports2, module2) { + "use strict"; var { GitExecutor: GitExecutor2 } = (init_git_executor(), __toCommonJS(git_executor_exports)); var { SimpleGitApi: SimpleGitApi2 } = (init_simple_git_api(), __toCommonJS(simple_git_api_exports)); var { Scheduler: Scheduler2 } = (init_scheduler(), __toCommonJS(scheduler_exports)); @@ -10778,7 +11189,12 @@ var require_git = __commonJS({ var { addAnnotatedTagTask: addAnnotatedTagTask2, addTagTask: addTagTask2, tagListTask: tagListTask2 } = (init_tag(), __toCommonJS(tag_exports)); var { straightThroughBufferTask: straightThroughBufferTask2, straightThroughStringTask: straightThroughStringTask2 } = (init_task(), __toCommonJS(task_exports)); function Git2(options, plugins) { - this._executor = new GitExecutor2(options.binary, options.baseDir, new Scheduler2(options.maxConcurrentProcesses), plugins); + this._executor = new GitExecutor2( + options.binary, + options.baseDir, + new Scheduler2(options.maxConcurrentProcesses), + plugins + ); this._trimmed = options.trimmed; } (Git2.prototype = Object.create(SimpleGitApi2.prototype)).constructor = Git2; @@ -10795,7 +11211,13 @@ var require_git = __commonJS({ return this; }; Git2.prototype.stashList = function(options) { - return this._runTask(stashListTask2(trailingOptionsArgument2(arguments) || {}, filterArray2(options) && options || []), trailingFunctionArgument2(arguments)); + return this._runTask( + stashListTask2( + trailingOptionsArgument2(arguments) || {}, + filterArray2(options) && options || [] + ), + trailingFunctionArgument2(arguments) + ); }; function createCloneTask(api, task, repoPath, localPath) { if (typeof repoPath !== "string") { @@ -10804,10 +11226,16 @@ var require_git = __commonJS({ return task(repoPath, filterType2(localPath, filterString2), getTrailingOptions2(arguments)); } Git2.prototype.clone = function() { - return this._runTask(createCloneTask("clone", cloneTask2, ...arguments), trailingFunctionArgument2(arguments)); + return this._runTask( + createCloneTask("clone", cloneTask2, ...arguments), + trailingFunctionArgument2(arguments) + ); }; Git2.prototype.mirror = function() { - return this._runTask(createCloneTask("mirror", cloneMirrorTask2, ...arguments), trailingFunctionArgument2(arguments)); + return this._runTask( + createCloneTask("mirror", cloneMirrorTask2, ...arguments), + trailingFunctionArgument2(arguments) + ); }; Git2.prototype.mv = function(from, to) { return this._runTask(moveTask2(from, to), trailingFunctionArgument2(arguments)); @@ -10821,46 +11249,86 @@ var require_git = __commonJS({ }); }; Git2.prototype.pull = function(remote, branch, options, then) { - return this._runTask(pullTask2(filterType2(remote, filterString2), filterType2(branch, filterString2), getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments)); + return this._runTask( + pullTask2( + filterType2(remote, filterString2), + filterType2(branch, filterString2), + getTrailingOptions2(arguments) + ), + trailingFunctionArgument2(arguments) + ); }; Git2.prototype.fetch = function(remote, branch) { - return this._runTask(fetchTask2(filterType2(remote, filterString2), filterType2(branch, filterString2), getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments)); + return this._runTask( + fetchTask2( + filterType2(remote, filterString2), + filterType2(branch, filterString2), + getTrailingOptions2(arguments) + ), + trailingFunctionArgument2(arguments) + ); }; Git2.prototype.silent = function(silence) { - console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"); + console.warn( + "simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3" + ); return this; }; Git2.prototype.tags = function(options, then) { - return this._runTask(tagListTask2(getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments)); + return this._runTask( + tagListTask2(getTrailingOptions2(arguments)), + trailingFunctionArgument2(arguments) + ); }; Git2.prototype.rebase = function() { - return this._runTask(straightThroughStringTask2(["rebase", ...getTrailingOptions2(arguments)]), trailingFunctionArgument2(arguments)); + return this._runTask( + straightThroughStringTask2(["rebase", ...getTrailingOptions2(arguments)]), + trailingFunctionArgument2(arguments) + ); }; Git2.prototype.reset = function(mode) { - return this._runTask(resetTask2(getResetMode2(mode), getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments)); + return this._runTask( + resetTask2(getResetMode2(mode), getTrailingOptions2(arguments)), + trailingFunctionArgument2(arguments) + ); }; Git2.prototype.revert = function(commit) { const next = trailingFunctionArgument2(arguments); if (typeof commit !== "string") { return this._runTask(configurationErrorTask2("Commit must be a string"), next); } - return this._runTask(straightThroughStringTask2(["revert", ...getTrailingOptions2(arguments, 0, true), commit]), next); + return this._runTask( + straightThroughStringTask2(["revert", ...getTrailingOptions2(arguments, 0, true), commit]), + next + ); }; Git2.prototype.addTag = function(name) { const task = typeof name === "string" ? addTagTask2(name) : configurationErrorTask2("Git.addTag requires a tag name"); return this._runTask(task, trailingFunctionArgument2(arguments)); }; Git2.prototype.addAnnotatedTag = function(tagName, tagMessage) { - return this._runTask(addAnnotatedTagTask2(tagName, tagMessage), trailingFunctionArgument2(arguments)); + return this._runTask( + addAnnotatedTagTask2(tagName, tagMessage), + trailingFunctionArgument2(arguments) + ); }; Git2.prototype.deleteLocalBranch = function(branchName, forceDelete, then) { - return this._runTask(deleteBranchTask2(branchName, typeof forceDelete === "boolean" ? forceDelete : false), trailingFunctionArgument2(arguments)); + return this._runTask( + deleteBranchTask2(branchName, typeof forceDelete === "boolean" ? forceDelete : false), + trailingFunctionArgument2(arguments) + ); }; Git2.prototype.deleteLocalBranches = function(branchNames, forceDelete, then) { - return this._runTask(deleteBranchesTask2(branchNames, typeof forceDelete === "boolean" ? forceDelete : false), trailingFunctionArgument2(arguments)); + return this._runTask( + deleteBranchesTask2(branchNames, typeof forceDelete === "boolean" ? forceDelete : false), + trailingFunctionArgument2(arguments) + ); }; Git2.prototype.branch = function(options, then) { - return this._runTask(branchTask2(getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments)); + return this._runTask( + branchTask2(getTrailingOptions2(arguments)), + trailingFunctionArgument2(arguments) + ); }; Git2.prototype.branchLocal = function(then) { return this._runTask(branchLocalTask2(), trailingFunctionArgument2(arguments)); @@ -10877,7 +11345,10 @@ var require_git = __commonJS({ command.push(...getTrailingOptions2(arguments, 0, true)); var next = trailingFunctionArgument2(arguments); if (!command.length) { - return this._runTask(configurationErrorTask2("Raw: must supply one or more command to execute"), next); + return this._runTask( + configurationErrorTask2("Raw: must supply one or more command to execute"), + next + ); } return this._runTask(straightThroughStringTask2(command, this._trimmed), next); }; @@ -10885,19 +11356,34 @@ var require_git = __commonJS({ return this._runTask(addSubModuleTask2(repo, path), trailingFunctionArgument2(arguments)); }; Git2.prototype.submoduleUpdate = function(args, then) { - return this._runTask(updateSubModuleTask2(getTrailingOptions2(arguments, true)), trailingFunctionArgument2(arguments)); + return this._runTask( + updateSubModuleTask2(getTrailingOptions2(arguments, true)), + trailingFunctionArgument2(arguments) + ); }; Git2.prototype.submoduleInit = function(args, then) { - return this._runTask(initSubModuleTask2(getTrailingOptions2(arguments, true)), trailingFunctionArgument2(arguments)); + return this._runTask( + initSubModuleTask2(getTrailingOptions2(arguments, true)), + trailingFunctionArgument2(arguments) + ); }; Git2.prototype.subModule = function(options, then) { - return this._runTask(subModuleTask2(getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments)); + return this._runTask( + subModuleTask2(getTrailingOptions2(arguments)), + trailingFunctionArgument2(arguments) + ); }; Git2.prototype.listRemote = function() { - return this._runTask(listRemotesTask2(getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments)); + return this._runTask( + listRemotesTask2(getTrailingOptions2(arguments)), + trailingFunctionArgument2(arguments) + ); }; Git2.prototype.addRemote = function(remoteName, remoteRepo, then) { - return this._runTask(addRemoteTask2(remoteName, remoteRepo, getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments)); + return this._runTask( + addRemoteTask2(remoteName, remoteRepo, getTrailingOptions2(arguments)), + trailingFunctionArgument2(arguments) + ); }; Git2.prototype.removeRemote = function(remoteName, then) { return this._runTask(removeRemoteTask2(remoteName), trailingFunctionArgument2(arguments)); @@ -10906,7 +11392,10 @@ var require_git = __commonJS({ return this._runTask(getRemotesTask2(verbose === true), trailingFunctionArgument2(arguments)); }; Git2.prototype.remote = function(options, then) { - return this._runTask(remoteTask2(getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments)); + return this._runTask( + remoteTask2(getTrailingOptions2(arguments)), + trailingFunctionArgument2(arguments) + ); }; Git2.prototype.tag = function(options, then) { const command = getTrailingOptions2(arguments); @@ -10916,17 +11405,29 @@ var require_git = __commonJS({ return this._runTask(straightThroughStringTask2(command), trailingFunctionArgument2(arguments)); }; Git2.prototype.updateServerInfo = function(then) { - return this._runTask(straightThroughStringTask2(["update-server-info"]), trailingFunctionArgument2(arguments)); + return this._runTask( + straightThroughStringTask2(["update-server-info"]), + trailingFunctionArgument2(arguments) + ); }; Git2.prototype.pushTags = function(remote, then) { - const task = pushTagsTask2({ remote: filterType2(remote, filterString2) }, getTrailingOptions2(arguments)); + const task = pushTagsTask2( + { remote: filterType2(remote, filterString2) }, + getTrailingOptions2(arguments) + ); return this._runTask(task, trailingFunctionArgument2(arguments)); }; Git2.prototype.rm = function(files) { - return this._runTask(straightThroughStringTask2(["rm", "-f", ...asArray2(files)]), trailingFunctionArgument2(arguments)); + return this._runTask( + straightThroughStringTask2(["rm", "-f", ...asArray2(files)]), + trailingFunctionArgument2(arguments) + ); }; Git2.prototype.rmKeepLocal = function(files) { - return this._runTask(straightThroughStringTask2(["rm", "--cached", ...asArray2(files)]), trailingFunctionArgument2(arguments)); + return this._runTask( + straightThroughStringTask2(["rm", "--cached", ...asArray2(files)]), + trailingFunctionArgument2(arguments) + ); }; Git2.prototype.catFile = function(options, then) { return this._catFile("utf-8", arguments); @@ -10939,7 +11440,10 @@ var require_git = __commonJS({ var command = ["cat-file"]; var options = args[0]; if (typeof options === "string") { - return this._runTask(configurationErrorTask2("Git.catFile: options must be supplied as an array of strings"), handler); + return this._runTask( + configurationErrorTask2("Git.catFile: options must be supplied as an array of strings"), + handler + ); } if (Array.isArray(options)) { command.push.apply(command, options); @@ -10948,25 +11452,38 @@ var require_git = __commonJS({ return this._runTask(task, handler); }; Git2.prototype.diff = function(options, then) { - const task = filterString2(options) ? configurationErrorTask2("git.diff: supplying options as a single string is no longer supported, switch to an array of strings") : straightThroughStringTask2(["diff", ...getTrailingOptions2(arguments)]); + const task = filterString2(options) ? configurationErrorTask2( + "git.diff: supplying options as a single string is no longer supported, switch to an array of strings" + ) : straightThroughStringTask2(["diff", ...getTrailingOptions2(arguments)]); return this._runTask(task, trailingFunctionArgument2(arguments)); }; Git2.prototype.diffSummary = function() { - return this._runTask(diffSummaryTask2(getTrailingOptions2(arguments, 1)), trailingFunctionArgument2(arguments)); + return this._runTask( + diffSummaryTask2(getTrailingOptions2(arguments, 1)), + trailingFunctionArgument2(arguments) + ); }; Git2.prototype.applyPatch = function(patches) { - const task = !filterStringOrStringArray2(patches) ? configurationErrorTask2(`git.applyPatch requires one or more string patches as the first argument`) : applyPatchTask2(asArray2(patches), getTrailingOptions2([].slice.call(arguments, 1))); + const task = !filterStringOrStringArray2(patches) ? configurationErrorTask2( + `git.applyPatch requires one or more string patches as the first argument` + ) : applyPatchTask2(asArray2(patches), getTrailingOptions2([].slice.call(arguments, 1))); return this._runTask(task, trailingFunctionArgument2(arguments)); }; Git2.prototype.revparse = function() { const commands = ["rev-parse", ...getTrailingOptions2(arguments, true)]; - return this._runTask(straightThroughStringTask2(commands, true), trailingFunctionArgument2(arguments)); + return this._runTask( + straightThroughStringTask2(commands, true), + trailingFunctionArgument2(arguments) + ); }; Git2.prototype.clean = function(mode, options, then) { const usingCleanOptionsArray = isCleanOptionsArray2(mode); const cleanMode = usingCleanOptionsArray && mode.join("") || filterType2(mode, filterString2) || ""; const customArgs = getTrailingOptions2([].slice.call(arguments, usingCleanOptionsArray ? 1 : 0)); - return this._runTask(cleanWithOptionsTask2(cleanMode, customArgs), trailingFunctionArgument2(arguments)); + return this._runTask( + cleanWithOptionsTask2(cleanMode, customArgs), + trailingFunctionArgument2(arguments) + ); }; Git2.prototype.exec = function(then) { const task = { @@ -10984,10 +11501,16 @@ var require_git = __commonJS({ return this; }; Git2.prototype.checkIgnore = function(pathnames, then) { - return this._runTask(checkIgnoreTask2(asArray2(filterType2(pathnames, filterStringOrStringArray2, []))), trailingFunctionArgument2(arguments)); + return this._runTask( + checkIgnoreTask2(asArray2(filterType2(pathnames, filterStringOrStringArray2, []))), + trailingFunctionArgument2(arguments) + ); }; Git2.prototype.checkIsRepo = function(checkType, then) { - return this._runTask(checkIsRepoTask2(filterType2(checkType, filterString2)), trailingFunctionArgument2(arguments)); + return this._runTask( + checkIsRepoTask2(filterType2(checkType, filterString2)), + trailingFunctionArgument2(arguments) + ); }; module2.exports = Git2; } @@ -11011,9 +11534,15 @@ function gitExportFactory(factory) { } function gitInstanceFactory(baseDir, options) { const plugins = new PluginStore(); - const config = createInstanceConfig(baseDir && (typeof baseDir === "string" ? { baseDir } : baseDir) || {}, options); + const config = createInstanceConfig( + baseDir && (typeof baseDir === "string" ? { baseDir } : baseDir) || {}, + options + ); if (!folderExists(config.baseDir)) { - throw new GitConstructError(config, `Cannot use simple-git on a directory that does not exist`); + throw new GitConstructError( + config, + `Cannot use simple-git on a directory that does not exist` + ); } if (Array.isArray(config.config)) { plugins.add(commandConfigPrefixingPlugin(config.config)); @@ -11032,6 +11561,7 @@ function gitInstanceFactory(baseDir, options) { var Git; var init_git_factory = __esm({ "src/lib/git-factory.ts"() { + "use strict"; init_api(); init_plugins(); init_suffix_paths_plugin(); @@ -11059,22 +11589,27 @@ function gitP(...args) { function chainReturn() { return chain; } - const promiseApi = [...functionNamesBuilderApi, ...functionNamesPromiseApi].reduce((api, name) => { - const isAsync = functionNamesPromiseApi.includes(name); - const valid = isAsync ? asyncWrapper(name, git) : syncWrapper(name, git, api); - const alternative = isAsync ? chainReturn : builderReturn; - Object.defineProperty(api, name, { - enumerable: false, - configurable: false, - value: git ? valid : alternative - }); - return api; - }, {}); + const promiseApi = [...functionNamesBuilderApi, ...functionNamesPromiseApi].reduce( + (api, name) => { + const isAsync = functionNamesPromiseApi.includes(name); + const valid = isAsync ? asyncWrapper(name, git) : syncWrapper(name, git, api); + const alternative = isAsync ? chainReturn : builderReturn; + Object.defineProperty(api, name, { + enumerable: false, + configurable: false, + value: git ? valid : alternative + }); + return api; + }, + {} + ); return promiseApi; function asyncWrapper(fn, git2) { return function(...args2) { if (typeof args2[args2.length] === "function") { - throw new TypeError("Promise interface requires that handlers are not supplied inline, trailing function not allowed in call to " + fn); + throw new TypeError( + "Promise interface requires that handlers are not supplied inline, trailing function not allowed in call to " + fn + ); } return chain.then(function() { return new Promise(function(resolve, reject) { @@ -11109,6 +11644,7 @@ function toError(error) { var functionNamesBuilderApi, functionNamesPromiseApi; var init_promise_wrapped = __esm({ "src/lib/runners/promise-wrapped.ts"() { + "use strict"; init_git_response_error(); init_git_factory(); functionNamesBuilderApi = ["customBinary", "env", "outputHandler", "silent"];