diff --git a/bun.lock b/bun.lock index dfbfd998..7b1f533a 100644 --- a/bun.lock +++ b/bun.lock @@ -9,13 +9,13 @@ "@actions/github": "9.0.0", "@octokit/graphql-schema": "15.26.1", "@octokit/plugin-retry": "8.1.0", - "axios": "1.13.6", + "axios": "1.14.0", "bluebird": "3.7.2", "codeowners-utils": "1.0.2", "js-yaml": "4.1.1", - "lodash": "4.17.23", + "lodash": "4.18.1", "micromatch": "4.0.8", - "simple-git": "3.33.0", + "simple-git": "3.35.2", }, "devDependencies": { "@octokit/webhooks-types": "7.6.1", @@ -29,12 +29,12 @@ "@types/lodash.union": "4.6.9", "@types/lodash.uniq": "4.5.9", "@types/micromatch": "4.0.10", - "eslint": "10.1.0", + "eslint": "10.2.0", "husky": "9.1.7", "plop": "4.0.5", "prettier": "3.8.1", "typescript": "6.0.2", - "typescript-eslint": "8.57.1", + "typescript-eslint": "8.58.0", }, }, }, @@ -53,15 +53,15 @@ "@eslint-community/regexpp": ["@eslint-community/regexpp@4.12.2", "", {}, "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew=="], - "@eslint/config-array": ["@eslint/config-array@0.23.3", "", { "dependencies": { "@eslint/object-schema": "^3.0.3", "debug": "^4.3.1", "minimatch": "^10.2.4" } }, "sha512-j+eEWmB6YYLwcNOdlwQ6L2OsptI/LO6lNBuLIqe5R7RetD658HLoF+Mn7LzYmAWWNNzdC6cqP+L6r8ujeYXWLw=="], + "@eslint/config-array": ["@eslint/config-array@0.23.4", "", { "dependencies": { "@eslint/object-schema": "^3.0.4", "debug": "^4.3.1", "minimatch": "^10.2.4" } }, "sha512-lf19F24LSMfF8weXvW5QEtnLqW70u7kgit5e9PSx0MsHAFclGd1T9ynvWEMDT1w5J4Qt54tomGeAhdoAku1Xow=="], - "@eslint/config-helpers": ["@eslint/config-helpers@0.5.3", "", { "dependencies": { "@eslint/core": "^1.1.1" } }, "sha512-lzGN0onllOZCGroKJmRwY6QcEHxbjBw1gwB8SgRSqK8YbbtEXMvKynsXc3553ckIEBxsbMBU7oOZXKIPGZNeZw=="], + "@eslint/config-helpers": ["@eslint/config-helpers@0.5.4", "", { "dependencies": { "@eslint/core": "^1.2.0" } }, "sha512-jJhqiY3wPMlWWO3370M86CPJ7pt8GmEwSLglMfQhjXal07RCvhmU0as4IuUEW5SJeunfItiEetHmSxCCe9lDBg=="], - "@eslint/core": ["@eslint/core@1.1.1", "", { "dependencies": { "@types/json-schema": "^7.0.15" } }, "sha512-QUPblTtE51/7/Zhfv8BDwO0qkkzQL7P/aWWbqcf4xWLEYn1oKjdO0gglQBB4GAsu7u6wjijbCmzsUTy6mnk6oQ=="], + "@eslint/core": ["@eslint/core@1.2.0", "", { "dependencies": { "@types/json-schema": "^7.0.15" } }, "sha512-8FTGbNzTvmSlc4cZBaShkC6YvFMG0riksYWRFKXztqVdXaQbcZLXlFbSpC05s70sGEsXAw0qwhx69JiW7hQS7A=="], - "@eslint/object-schema": ["@eslint/object-schema@3.0.3", "", {}, "sha512-iM869Pugn9Nsxbh/YHRqYiqd23AmIbxJOcpUMOuWCVNdoQJ5ZtwL6h3t0bcZzJUlC3Dq9jCFCESBZnX0GTv7iQ=="], + "@eslint/object-schema": ["@eslint/object-schema@3.0.4", "", {}, "sha512-55lO/7+Yp0ISKRP0PsPtNTeNGapXaO085aELZmWCVc5SH3jfrqpuU6YgOdIxMS99ZHkQN1cXKE+cdIqwww9ptw=="], - "@eslint/plugin-kit": ["@eslint/plugin-kit@0.6.1", "", { "dependencies": { "@eslint/core": "^1.1.1", "levn": "^0.4.1" } }, "sha512-iH1B076HoAshH1mLpHMgwdGeTs0CYwL0SPMkGuSebZrwBp16v415e9NZXg2jtrqPVQjf6IANe2Vtlr5KswtcZQ=="], + "@eslint/plugin-kit": ["@eslint/plugin-kit@0.7.0", "", { "dependencies": { "@eslint/core": "^1.2.0", "levn": "^0.4.1" } }, "sha512-ejvBr8MQCbVsWNZnCwDXjUKq40MDmHalq7cJ6e9s/qzTUFIIo/afzt1Vui9T97FM/V/pN4YsFVoed5NIa96RDg=="], "@humanfs/core": ["@humanfs/core@0.19.1", "", {}, "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA=="], @@ -105,6 +105,10 @@ "@octokit/webhooks-types": ["@octokit/webhooks-types@7.6.1", "", {}, "sha512-S8u2cJzklBC0FgTwWVLaM8tMrDuDMVE4xiTK4EYXM9GntyvrdbSoxqDQa+Fh57CCNApyIpyeqPhhFEmHPfrXgw=="], + "@simple-git/args-pathspec": ["@simple-git/args-pathspec@1.0.2", "", {}, "sha512-nEFVejViHUoL8wU8GTcwqrvqfUG40S5ts6S4fr1u1Ki5CklXlRDYThPVA/qurTmCYFGnaX3XpVUmICLHdvhLaA=="], + + "@simple-git/argv-parser": ["@simple-git/argv-parser@1.0.3", "", { "dependencies": { "@simple-git/args-pathspec": "^1.0.2" } }, "sha512-NMKv9sJcSN2VvnPT9Ja7eKfGy8Q8mMFLwPTCcuZMtv3+mYcLIZflg31S/tp2XCCyiY7YAx6cgBHQ0fwA2fWHpQ=="], + "@total-typescript/ts-reset": ["@total-typescript/ts-reset@0.6.1", "", {}, "sha512-cka47fVSo6lfQDIATYqb/vO1nvFfbPw7uWLayIXIhGETj0wcOOlrlkobOMDNQOFr9QOafegUPq13V2+6vtD7yg=="], "@types/bluebird": ["@types/bluebird@3.5.42", "", {}, "sha512-Jhy+MWRlro6UjVi578V/4ZGNfeCOcNCp0YaFNIUGFKlImowqwb1O/22wDVk3FDGMLqxdpOV3qQHD5fPEH4hK6A=="], @@ -147,25 +151,25 @@ "@types/through": ["@types/through@0.0.33", "", { "dependencies": { "@types/node": "*" } }, "sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ=="], - "@typescript-eslint/eslint-plugin": ["@typescript-eslint/eslint-plugin@8.57.1", "", { "dependencies": { "@eslint-community/regexpp": "^4.12.2", "@typescript-eslint/scope-manager": "8.57.1", "@typescript-eslint/type-utils": "8.57.1", "@typescript-eslint/utils": "8.57.1", "@typescript-eslint/visitor-keys": "8.57.1", "ignore": "^7.0.5", "natural-compare": "^1.4.0", "ts-api-utils": "^2.4.0" }, "peerDependencies": { "@typescript-eslint/parser": "^8.57.1", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-Gn3aqnvNl4NGc6x3/Bqk1AOn0thyTU9bqDRhiRnUWezgvr2OnhYCWCgC8zXXRVqBsIL1pSDt7T9nJUe0oM0kDQ=="], + "@typescript-eslint/eslint-plugin": ["@typescript-eslint/eslint-plugin@8.58.0", "", { "dependencies": { "@eslint-community/regexpp": "^4.12.2", "@typescript-eslint/scope-manager": "8.58.0", "@typescript-eslint/type-utils": "8.58.0", "@typescript-eslint/utils": "8.58.0", "@typescript-eslint/visitor-keys": "8.58.0", "ignore": "^7.0.5", "natural-compare": "^1.4.0", "ts-api-utils": "^2.5.0" }, "peerDependencies": { "@typescript-eslint/parser": "^8.58.0", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-RLkVSiNuUP1C2ROIWfqX+YcUfLaSnxGE/8M+Y57lopVwg9VTYYfhuz15Yf1IzCKgZj6/rIbYTmJCUSqr76r0Wg=="], - "@typescript-eslint/parser": ["@typescript-eslint/parser@8.57.1", "", { "dependencies": { "@typescript-eslint/scope-manager": "8.57.1", "@typescript-eslint/types": "8.57.1", "@typescript-eslint/typescript-estree": "8.57.1", "@typescript-eslint/visitor-keys": "8.57.1", "debug": "^4.4.3" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-k4eNDan0EIMTT/dUKc/g+rsJ6wcHYhNPdY19VoX/EOtaAG8DLtKCykhrUnuHPYvinn5jhAPgD2Qw9hXBwrahsw=="], + "@typescript-eslint/parser": ["@typescript-eslint/parser@8.58.0", "", { "dependencies": { "@typescript-eslint/scope-manager": "8.58.0", "@typescript-eslint/types": "8.58.0", "@typescript-eslint/typescript-estree": "8.58.0", "@typescript-eslint/visitor-keys": "8.58.0", "debug": "^4.4.3" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-rLoGZIf9afaRBYsPUMtvkDWykwXwUPL60HebR4JgTI8mxfFe2cQTu3AGitANp4b9B2QlVru6WzjgB2IzJKiCSA=="], - "@typescript-eslint/project-service": ["@typescript-eslint/project-service@8.57.1", "", { "dependencies": { "@typescript-eslint/tsconfig-utils": "^8.57.1", "@typescript-eslint/types": "^8.57.1", "debug": "^4.4.3" }, "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-vx1F37BRO1OftsYlmG9xay1TqnjNVlqALymwWVuYTdo18XuKxtBpCj1QlzNIEHlvlB27osvXFWptYiEWsVdYsg=="], + "@typescript-eslint/project-service": ["@typescript-eslint/project-service@8.58.0", "", { "dependencies": { "@typescript-eslint/tsconfig-utils": "^8.58.0", "@typescript-eslint/types": "^8.58.0", "debug": "^4.4.3" }, "peerDependencies": { "typescript": ">=4.8.4 <6.1.0" } }, "sha512-8Q/wBPWLQP1j16NxoPNIKpDZFMaxl7yWIoqXWYeWO+Bbd2mjgvoF0dxP2jKZg5+x49rgKdf7Ck473M8PC3V9lg=="], - "@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.57.1", "", { "dependencies": { "@typescript-eslint/types": "8.57.1", "@typescript-eslint/visitor-keys": "8.57.1" } }, "sha512-hs/QcpCwlwT2L5S+3fT6gp0PabyGk4Q0Rv2doJXA0435/OpnSR3VRgvrp8Xdoc3UAYSg9cyUjTeFXZEPg/3OKg=="], + "@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.58.0", "", { "dependencies": { "@typescript-eslint/types": "8.58.0", "@typescript-eslint/visitor-keys": "8.58.0" } }, "sha512-W1Lur1oF50FxSnNdGp3Vs6P+yBRSmZiw4IIjEeYxd8UQJwhUF0gDgDD/W/Tgmh73mxgEU3qX0Bzdl/NGuSPEpQ=="], - "@typescript-eslint/tsconfig-utils": ["@typescript-eslint/tsconfig-utils@8.57.1", "", { "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-0lgOZB8cl19fHO4eI46YUx2EceQqhgkPSuCGLlGi79L2jwYY1cxeYc1Nae8Aw1xjgW3PKVDLlr3YJ6Bxx8HkWg=="], + "@typescript-eslint/tsconfig-utils": ["@typescript-eslint/tsconfig-utils@8.58.0", "", { "peerDependencies": { "typescript": ">=4.8.4 <6.1.0" } }, "sha512-doNSZEVJsWEu4htiVC+PR6NpM+pa+a4ClH9INRWOWCUzMst/VA9c4gXq92F8GUD1rwhNvRLkgjfYtFXegXQF7A=="], - "@typescript-eslint/type-utils": ["@typescript-eslint/type-utils@8.57.1", "", { "dependencies": { "@typescript-eslint/types": "8.57.1", "@typescript-eslint/typescript-estree": "8.57.1", "@typescript-eslint/utils": "8.57.1", "debug": "^4.4.3", "ts-api-utils": "^2.4.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-+Bwwm0ScukFdyoJsh2u6pp4S9ktegF98pYUU0hkphOOqdMB+1sNQhIz8y5E9+4pOioZijrkfNO/HUJVAFFfPKA=="], + "@typescript-eslint/type-utils": ["@typescript-eslint/type-utils@8.58.0", "", { "dependencies": { "@typescript-eslint/types": "8.58.0", "@typescript-eslint/typescript-estree": "8.58.0", "@typescript-eslint/utils": "8.58.0", "debug": "^4.4.3", "ts-api-utils": "^2.5.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-aGsCQImkDIqMyx1u4PrVlbi/krmDsQUs4zAcCV6M7yPcPev+RqVlndsJy9kJ8TLihW9TZ0kbDAzctpLn5o+lOg=="], - "@typescript-eslint/types": ["@typescript-eslint/types@8.57.1", "", {}, "sha512-S29BOBPJSFUiblEl6RzPPjJt6w25A6XsBqRVDt53tA/tlL8q7ceQNZHTjPeONt/3S7KRI4quk+yP9jK2WjBiPQ=="], + "@typescript-eslint/types": ["@typescript-eslint/types@8.58.0", "", {}, "sha512-O9CjxypDT89fbHxRfETNoAnHj/i6IpRK0CvbVN3qibxlLdo5p5hcLmUuCCrHMpxiWSwKyI8mCP7qRNYuOJ0Uww=="], - "@typescript-eslint/typescript-estree": ["@typescript-eslint/typescript-estree@8.57.1", "", { "dependencies": { "@typescript-eslint/project-service": "8.57.1", "@typescript-eslint/tsconfig-utils": "8.57.1", "@typescript-eslint/types": "8.57.1", "@typescript-eslint/visitor-keys": "8.57.1", "debug": "^4.4.3", "minimatch": "^10.2.2", "semver": "^7.7.3", "tinyglobby": "^0.2.15", "ts-api-utils": "^2.4.0" }, "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-ybe2hS9G6pXpqGtPli9Gx9quNV0TWLOmh58ADlmZe9DguLq0tiAKVjirSbtM1szG6+QH6rVXyU6GTLQbWnMY+g=="], + "@typescript-eslint/typescript-estree": ["@typescript-eslint/typescript-estree@8.58.0", "", { "dependencies": { "@typescript-eslint/project-service": "8.58.0", "@typescript-eslint/tsconfig-utils": "8.58.0", "@typescript-eslint/types": "8.58.0", "@typescript-eslint/visitor-keys": "8.58.0", "debug": "^4.4.3", "minimatch": "^10.2.2", "semver": "^7.7.3", "tinyglobby": "^0.2.15", "ts-api-utils": "^2.5.0" }, "peerDependencies": { "typescript": ">=4.8.4 <6.1.0" } }, "sha512-7vv5UWbHqew/dvs+D3e1RvLv1v2eeZ9txRHPnEEBUgSNLx5ghdzjHa0sgLWYVKssH+lYmV0JaWdoubo0ncGYLA=="], - "@typescript-eslint/utils": ["@typescript-eslint/utils@8.57.1", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", "@typescript-eslint/scope-manager": "8.57.1", "@typescript-eslint/types": "8.57.1", "@typescript-eslint/typescript-estree": "8.57.1" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-XUNSJ/lEVFttPMMoDVA2r2bwrl8/oPx8cURtczkSEswY5T3AeLmCy+EKWQNdL4u0MmAHOjcWrqJp2cdvgjn8dQ=="], + "@typescript-eslint/utils": ["@typescript-eslint/utils@8.58.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", "@typescript-eslint/scope-manager": "8.58.0", "@typescript-eslint/types": "8.58.0", "@typescript-eslint/typescript-estree": "8.58.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-RfeSqcFeHMHlAWzt4TBjWOAtoW9lnsAGiP3GbaX9uVgTYYrMbVnGONEfUCiSss+xMHFl+eHZiipmA8WkQ7FuNA=="], - "@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.57.1", "", { "dependencies": { "@typescript-eslint/types": "8.57.1", "eslint-visitor-keys": "^5.0.0" } }, "sha512-YWnmJkXbofiz9KbnbbwuA2rpGkFPLbAIetcCNO6mJ8gdhdZ/v7WDXsoGFAJuM6ikUFKTlSQnjWnVO4ux+UzS6A=="], + "@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.58.0", "", { "dependencies": { "@typescript-eslint/types": "8.58.0", "eslint-visitor-keys": "^5.0.0" } }, "sha512-XJ9UD9+bbDo4a4epraTwG3TsNPeiB9aShrUneAVXy8q4LuwowN+qu89/6ByLMINqvIMeI9H9hOHQtg/ijrYXzQ=="], "acorn": ["acorn@8.16.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw=="], @@ -187,7 +191,7 @@ "asynckit": ["asynckit@0.4.0", "", {}, "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="], - "axios": ["axios@1.13.6", "", { "dependencies": { "follow-redirects": "^1.15.11", "form-data": "^4.0.5", "proxy-from-env": "^1.1.0" } }, "sha512-ChTCHMouEe2kn713WHbQGcuYrr6fXTBiu460OTwWrWob16g1bXn4vtz07Ope7ewMozJAnEquLk5lWQWtBig9DQ=="], + "axios": ["axios@1.14.0", "", { "dependencies": { "follow-redirects": "^1.15.11", "form-data": "^4.0.5", "proxy-from-env": "^2.1.0" } }, "sha512-3Y8yrqLSwjuzpXuZ0oIYZ/XGgLwUIBU3uLvbcpb0pidD9ctpShJd43KSlEEkVQg6DS0G9NKyzOvBfUtDKEyHvQ=="], "balanced-match": ["balanced-match@4.0.4", "", {}, "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA=="], @@ -261,7 +265,7 @@ "escape-string-regexp": ["escape-string-regexp@4.0.0", "", {}, "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="], - "eslint": ["eslint@10.1.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.2", "@eslint/config-array": "^0.23.3", "@eslint/config-helpers": "^0.5.3", "@eslint/core": "^1.1.1", "@eslint/plugin-kit": "^0.6.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", "ajv": "^6.14.0", "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", "eslint-scope": "^9.1.2", "eslint-visitor-keys": "^5.0.1", "espree": "^11.2.0", "esquery": "^1.7.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", "minimatch": "^10.2.4", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, "peerDependencies": { "jiti": "*" }, "optionalPeers": ["jiti"], "bin": { "eslint": "bin/eslint.js" } }, "sha512-S9jlY/ELKEUwwQnqWDO+f+m6sercqOPSqXM5Go94l7DOmxHVDgmSFGWEzeE/gwgTAr0W103BWt0QLe/7mabIvA=="], + "eslint": ["eslint@10.2.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.2", "@eslint/config-array": "^0.23.4", "@eslint/config-helpers": "^0.5.4", "@eslint/core": "^1.2.0", "@eslint/plugin-kit": "^0.7.0", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", "ajv": "^6.14.0", "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", "eslint-scope": "^9.1.2", "eslint-visitor-keys": "^5.0.1", "espree": "^11.2.0", "esquery": "^1.7.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", "minimatch": "^10.2.4", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, "peerDependencies": { "jiti": "*" }, "optionalPeers": ["jiti"], "bin": { "eslint": "bin/eslint.js" } }, "sha512-+L0vBFYGIpSNIt/KWTpFonPrqYvgKw1eUI5Vn7mEogrQcWtWYtNQ7dNqC+px/J0idT3BAkiWrhfS7k+Tum8TUA=="], "eslint-scope": ["eslint-scope@9.1.2", "", { "dependencies": { "@types/esrecurse": "^4.3.1", "@types/estree": "^1.0.8", "esrecurse": "^4.3.0", "estraverse": "^5.2.0" } }, "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ=="], @@ -409,7 +413,7 @@ "locate-path": ["locate-path@5.0.0", "", { "dependencies": { "p-locate": "^4.1.0" } }, "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g=="], - "lodash": ["lodash@4.17.23", "", {}, "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w=="], + "lodash": ["lodash@4.18.1", "", {}, "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q=="], "log-symbols": ["log-symbols@4.1.0", "", { "dependencies": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" } }, "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg=="], @@ -481,7 +485,7 @@ "prettier": ["prettier@3.8.1", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg=="], - "proxy-from-env": ["proxy-from-env@1.1.0", "", {}, "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="], + "proxy-from-env": ["proxy-from-env@2.1.0", "", {}, "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA=="], "punycode": ["punycode@2.3.1", "", {}, "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="], @@ -511,7 +515,7 @@ "signal-exit": ["signal-exit@3.0.7", "", {}, "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="], - "simple-git": ["simple-git@3.33.0", "", { "dependencies": { "@kwsites/file-exists": "^1.1.1", "@kwsites/promise-deferred": "^1.1.1", "debug": "^4.4.0" } }, "sha512-D4V/tGC2sjsoNhoMybKyGoE+v8A60hRawKQ1iFRA1zwuDgGZCBJ4ByOzZ5J8joBbi4Oam0qiPH+GhzmSBwbJng=="], + "simple-git": ["simple-git@3.35.2", "", { "dependencies": { "@kwsites/file-exists": "^1.1.1", "@kwsites/promise-deferred": "^1.1.1", "@simple-git/args-pathspec": "^1.0.2", "@simple-git/argv-parser": "^1.0.3", "debug": "^4.4.0" } }, "sha512-ZMjl06lzTm1EScxEGuM6+mEX+NQd14h/B3x0vWU+YOXAMF8sicyi1K4cjTfj5is+35ChJEHDl1EjypzYFWH2FA=="], "source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], @@ -531,7 +535,7 @@ "to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="], - "ts-api-utils": ["ts-api-utils@2.4.0", "", { "peerDependencies": { "typescript": ">=4.8.4" } }, "sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA=="], + "ts-api-utils": ["ts-api-utils@2.5.0", "", { "peerDependencies": { "typescript": ">=4.8.4" } }, "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA=="], "tslib": ["tslib@2.6.2", "", {}, "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="], @@ -543,7 +547,7 @@ "typescript": ["typescript@6.0.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ=="], - "typescript-eslint": ["typescript-eslint@8.57.1", "", { "dependencies": { "@typescript-eslint/eslint-plugin": "8.57.1", "@typescript-eslint/parser": "8.57.1", "@typescript-eslint/typescript-estree": "8.57.1", "@typescript-eslint/utils": "8.57.1" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-fLvZWf+cAGw3tqMCYzGIU6yR8K+Y9NT2z23RwOjlNFF2HwSB3KhdEFI5lSBv8tNmFkkBShSjsCjzx1vahZfISA=="], + "typescript-eslint": ["typescript-eslint@8.58.0", "", { "dependencies": { "@typescript-eslint/eslint-plugin": "8.58.0", "@typescript-eslint/parser": "8.58.0", "@typescript-eslint/typescript-estree": "8.58.0", "@typescript-eslint/utils": "8.58.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-e2TQzKfaI85fO+F3QywtX+tCTsu/D3WW5LVU6nz8hTFKFZ8yBJ6mSYRpXqdR3mFjPWmO0eWsTa5f+UpAOe/FMA=="], "uglify-js": ["uglify-js@3.17.4", "", { "bin": { "uglifyjs": "bin/uglifyjs" } }, "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g=="], diff --git a/dist/helpers/add-pr-approval-label.js b/dist/helpers/add-pr-approval-label.js index 55a8add6..9d274e89 100644 --- a/dist/helpers/add-pr-approval-label.js +++ b/dist/helpers/add-pr-approval-label.js @@ -4,9 +4,9 @@ import { } from "../main-9c2herm2.js"; import { getCoreMemberLogins -} from "../main-fechn2dk.js"; +} from "../main-bnjtrvb4.js"; import"../main-yvnzphn1.js"; -import"../main-kzxwm80c.js"; +import"../main-pet5htdh.js"; import"../main-ttmzs6m5.js"; import { HelperInputs diff --git a/dist/helpers/approvals-satisfied.js b/dist/helpers/approvals-satisfied.js index 64913ddf..fb6db563 100644 --- a/dist/helpers/approvals-satisfied.js +++ b/dist/helpers/approvals-satisfied.js @@ -1,11 +1,11 @@ import { ApprovalsSatisfied, approvalsSatisfied -} from "../main-3eg7728e.js"; +} from "../main-n78g1rp9.js"; import"../main-twjwvv0a.js"; -import"../main-fechn2dk.js"; +import"../main-bnjtrvb4.js"; import"../main-yvnzphn1.js"; -import"../main-kzxwm80c.js"; +import"../main-pet5htdh.js"; import"../main-ttmzs6m5.js"; import"../main-8h70j5cy.js"; import"../main-4c5nddsb.js"; diff --git a/dist/helpers/are-reviewers-required.js b/dist/helpers/are-reviewers-required.js index 85017cc8..3d715829 100644 --- a/dist/helpers/are-reviewers-required.js +++ b/dist/helpers/are-reviewers-required.js @@ -1,8 +1,8 @@ import { getRequiredCodeOwnersEntries -} from "../main-fechn2dk.js"; +} from "../main-bnjtrvb4.js"; import"../main-yvnzphn1.js"; -import"../main-kzxwm80c.js"; +import"../main-pet5htdh.js"; import"../main-ttmzs6m5.js"; import { HelperInputs diff --git a/dist/helpers/assign-pr-reviewers.js b/dist/helpers/assign-pr-reviewers.js index f0e7bf3c..c0893895 100644 --- a/dist/helpers/assign-pr-reviewers.js +++ b/dist/helpers/assign-pr-reviewers.js @@ -1,6 +1,6 @@ import { notifyUser -} from "../main-m03behqp.js"; +} from "../main-cp9hn2pg.js"; import"../main-bd6vw39p.js"; import"../main-dkdfy8cx.js"; import { @@ -8,11 +8,11 @@ import { } from "../main-9c2herm2.js"; import { getCoreMemberLogins -} from "../main-fechn2dk.js"; +} from "../main-bnjtrvb4.js"; import"../main-yvnzphn1.js"; import { require_lodash -} from "../main-kzxwm80c.js"; +} from "../main-pet5htdh.js"; import { require_bluebird } from "../main-ttmzs6m5.js"; diff --git a/dist/helpers/check-merge-safety.js b/dist/helpers/check-merge-safety.js index 68672199..7b5ebd87 100644 --- a/dist/helpers/check-merge-safety.js +++ b/dist/helpers/check-merge-safety.js @@ -6,7 +6,7 @@ import { } from "../main-v9jqraeg.js"; import { simpleGit -} from "../main-91v9rx4f.js"; +} from "../main-29zhc9fw.js"; import { paginateAllOpenPullRequests } from "../main-evbzarph.js"; diff --git a/dist/helpers/create-pr.js b/dist/helpers/create-pr.js index c51256ce..51fb568e 100644 --- a/dist/helpers/create-pr.js +++ b/dist/helpers/create-pr.js @@ -1,6 +1,6 @@ import { esm_default -} from "../main-91v9rx4f.js"; +} from "../main-29zhc9fw.js"; import { getDefaultBranch } from "../main-dbfe86ee.js"; diff --git a/dist/helpers/generate-matrix.js b/dist/helpers/generate-matrix.js index 80db4431..43c5767b 100644 --- a/dist/helpers/generate-matrix.js +++ b/dist/helpers/generate-matrix.js @@ -1,6 +1,6 @@ import { require_lodash -} from "../main-kzxwm80c.js"; +} from "../main-pet5htdh.js"; import { HelperInputs } from "../main-8h70j5cy.js"; diff --git a/dist/helpers/generate-path-matrix.js b/dist/helpers/generate-path-matrix.js index 6a3593d9..09e6e6de 100644 --- a/dist/helpers/generate-path-matrix.js +++ b/dist/helpers/generate-path-matrix.js @@ -6,7 +6,7 @@ import { } from "../main-yvnzphn1.js"; import { require_lodash -} from "../main-kzxwm80c.js"; +} from "../main-pet5htdh.js"; import { HelperInputs } from "../main-8h70j5cy.js"; diff --git a/dist/helpers/is-user-core-member.js b/dist/helpers/is-user-core-member.js index 3c8b46c8..e379a589 100644 --- a/dist/helpers/is-user-core-member.js +++ b/dist/helpers/is-user-core-member.js @@ -1,8 +1,8 @@ import { getCoreMemberLogins -} from "../main-fechn2dk.js"; +} from "../main-bnjtrvb4.js"; import"../main-yvnzphn1.js"; -import"../main-kzxwm80c.js"; +import"../main-pet5htdh.js"; import"../main-ttmzs6m5.js"; import { HelperInputs diff --git a/dist/helpers/manage-merge-queue.js b/dist/helpers/manage-merge-queue.js index c8909230..874995d3 100644 --- a/dist/helpers/manage-merge-queue.js +++ b/dist/helpers/manage-merge-queue.js @@ -3,20 +3,20 @@ import { enableAutoMerge, manageMergeQueue, removePrFromQueue -} from "../main-ax321dh6.js"; +} from "../main-pffr0jwb.js"; import"../main-f3vjjmff.js"; import"../main-gea228qs.js"; import"../main-64v3thn3.js"; import"../main-evbzarph.js"; -import"../main-3eg7728e.js"; +import"../main-n78g1rp9.js"; import"../main-twjwvv0a.js"; -import"../main-m03behqp.js"; +import"../main-cp9hn2pg.js"; import"../main-bd6vw39p.js"; import"../main-dkdfy8cx.js"; import"../main-9c2herm2.js"; -import"../main-fechn2dk.js"; +import"../main-bnjtrvb4.js"; import"../main-yvnzphn1.js"; -import"../main-kzxwm80c.js"; +import"../main-pet5htdh.js"; import"../main-ttmzs6m5.js"; import"../main-8h70j5cy.js"; import"../main-4c5nddsb.js"; diff --git a/dist/helpers/prepare-queued-pr-for-merge.js b/dist/helpers/prepare-queued-pr-for-merge.js index e6c17df2..3f6798d5 100644 --- a/dist/helpers/prepare-queued-pr-for-merge.js +++ b/dist/helpers/prepare-queued-pr-for-merge.js @@ -1,20 +1,20 @@ import { prepareQueuedPrForMerge, updatePrWithDefaultBranch -} from "../main-ax321dh6.js"; +} from "../main-pffr0jwb.js"; import"../main-f3vjjmff.js"; import"../main-gea228qs.js"; import"../main-64v3thn3.js"; import"../main-evbzarph.js"; -import"../main-3eg7728e.js"; +import"../main-n78g1rp9.js"; import"../main-twjwvv0a.js"; -import"../main-m03behqp.js"; +import"../main-cp9hn2pg.js"; import"../main-bd6vw39p.js"; import"../main-dkdfy8cx.js"; import"../main-9c2herm2.js"; -import"../main-fechn2dk.js"; +import"../main-bnjtrvb4.js"; import"../main-yvnzphn1.js"; -import"../main-kzxwm80c.js"; +import"../main-pet5htdh.js"; import"../main-ttmzs6m5.js"; import"../main-8h70j5cy.js"; import"../main-4c5nddsb.js"; diff --git a/dist/helpers/remove-pr-from-merge-queue.js b/dist/helpers/remove-pr-from-merge-queue.js index 0becd365..f95522de 100644 --- a/dist/helpers/remove-pr-from-merge-queue.js +++ b/dist/helpers/remove-pr-from-merge-queue.js @@ -8,7 +8,7 @@ import { } from "../main-9c2herm2.js"; import { require_lodash -} from "../main-kzxwm80c.js"; +} from "../main-pet5htdh.js"; import { require_bluebird } from "../main-ttmzs6m5.js"; diff --git a/dist/main-91v9rx4f.js b/dist/main-29zhc9fw.js similarity index 93% rename from dist/main-91v9rx4f.js rename to dist/main-29zhc9fw.js index c86eec1a..2af8db1e 100644 --- a/dist/main-91v9rx4f.js +++ b/dist/main-29zhc9fw.js @@ -617,12 +617,363 @@ var require_dist2 = __commonJS((exports) => { // node_modules/simple-git/dist/esm/index.js var import_file_exists = __toESM(require_dist(), 1); -var import_debug = __toESM(require_src(), 1); -var import_promise_deferred = __toESM(require_dist2(), 1); -var import_promise_deferred2 = __toESM(require_dist2(), 1); import { Buffer as Buffer2 } from "node:buffer"; + +// node_modules/@simple-git/args-pathspec/dist/index.mjs +var t = /* @__PURE__ */ new WeakMap; +function c(...n) { + const e = new String(n); + return t.set(e, n), e; +} +function r(n) { + return n instanceof String && t.has(n); +} +function o(n) { + return t.get(n) ?? []; +} + +// node_modules/simple-git/dist/esm/index.js +var import_debug = __toESM(require_src(), 1); import { spawn } from "child_process"; +var import_promise_deferred = __toESM(require_dist2(), 1); import { normalize } from "node:path"; + +// node_modules/@simple-git/argv-parser/dist/index.mjs +function* w(e, t2) { + const n = t2 === "global"; + for (const o2 of e) + o2.isGlobal === n && (yield o2); +} +var x = /* @__PURE__ */ new Set([ + "--add", + "--edit", + "--remove-section", + "--rename-section", + "--replace-all", + "--unset", + "--unset-all", + "-e" +]); +var S = /* @__PURE__ */ new Set([ + "--get", + "--get-all", + "--get-color", + "--get-colorbool", + "--get-regexp", + "--get-urlmatch", + "--list", + "-l" +]); +var k = /* @__PURE__ */ new Set([ + "edit", + "remove-section", + "rename-section", + "set", + "unset" +]); +var y = /* @__PURE__ */ new Set(["get", "get-color", "get-colorbool", "list"]); +function C(e, t2) { + for (const { name: o2 } of w(e, "task")) { + if (x.has(o2)) + return f(true, t2); + if (S.has(o2)) + return f(false, t2); + } + const n = t2.at(0)?.toLowerCase(); + return n === undefined ? null : k.has(n) ? f(true, t2.slice(1)) : y.has(n) ? f(false, t2.slice(1)) : t2.length === 1 ? f(false, t2) : f(true, t2); +} +function f(e = false, t2 = []) { + const n = t2.at(0)?.toLowerCase(); + return n === undefined ? null : { + isWrite: e, + isRead: !e, + key: n, + value: t2.at(1) + }; +} +function N(e, t2) { + return t2.isWrite && t2.value !== undefined ? { key: t2.key, value: t2.value, scope: e } : { key: t2.key, scope: e }; +} +function P(e) { + const t2 = e?.indexOf("=") || -1; + return !e || t2 < 0 ? null : { + key: e.slice(0, t2).trim().toLowerCase(), + value: e.slice(t2 + 1) + }; +} +function U(e) { + for (const { name: t2 } of w(e, "task")) + switch (t2) { + case "--global": + return "global"; + case "--system": + return "system"; + case "--worktree": + return "worktree"; + case "--local": + return "local"; + case "--file": + case "-f": + return "file"; + } + return "local"; +} +function A({ name: e }) { + if (e === "-c" || e === "--config") + return "inline"; + if (e === "--config-env") + return "env"; +} +function* F(e) { + for (const t2 of e) { + const n = A(t2), o2 = n && P(t2.value); + o2 && (yield { + ...o2, + scope: n + }); + } +} +function M(e, t2, n) { + const o2 = { + read: [], + write: [...F(t2)] + }; + return e === "config" && G(o2, U(t2), C(t2, n)), o2; +} +function G(e, t2, n) { + if (n === null) + return; + const o2 = N(t2, n); + n.isWrite ? e.write.push(o2) : e.read.push(o2); +} +var v = { + short: /* @__PURE__ */ new Map([ + ["c", true] + ]) +}; +var O = { + short: new Map([ + ["C", true], + ["P", false], + ["h", false], + ["p", false], + ["v", false], + ...v.short.entries() + ]), + long: /* @__PURE__ */ new Set([ + "attr-source", + "config-env", + "exec-path", + "git-dir", + "list-cmds", + "namespace", + "super-prefix", + "work-tree" + ]) +}; +var E = { + clone: { + short: /* @__PURE__ */ new Map([ + ["b", true], + ["j", true], + ["l", false], + ["n", false], + ["o", true], + ["q", false], + ["s", false], + ["u", true] + ]), + long: /* @__PURE__ */ new Set(["branch", "config", "jobs", "origin", "upload-pack", "u"]) + }, + commit: { + short: /* @__PURE__ */ new Map([ + ["C", true], + ["F", true], + ["c", true], + ["m", true], + ["t", true] + ]), + long: /* @__PURE__ */ new Set(["file", "message", "reedit-message", "reuse-message", "template"]) + }, + config: { + short: /* @__PURE__ */ new Map([ + ["e", false], + ["f", true], + ["l", false] + ]), + long: /* @__PURE__ */ new Set(["blob", "comment", "default", "file", "type", "value"]) + }, + fetch: { + short: /* @__PURE__ */ new Map, + long: /* @__PURE__ */ new Set(["upload-pack"]) + }, + pull: { + short: /* @__PURE__ */ new Map, + long: /* @__PURE__ */ new Set(["upload-pack"]) + }, + push: { + short: /* @__PURE__ */ new Map, + long: /* @__PURE__ */ new Set(["exec", "receive-pack"]) + } +}; +var I = { short: /* @__PURE__ */ new Map, long: /* @__PURE__ */ new Set }; +function L(e) { + const t2 = E[e ?? ""] ?? I; + return { + short: new Map([...v.short.entries(), ...t2.short.entries()]), + long: t2.long + }; +} +function b(e, t2 = O) { + if (e.startsWith("--")) { + const n = e.indexOf("="); + if (n > 2) + return [{ name: e.slice(0, n), value: e.slice(n + 1), needsNext: false }]; + const o2 = e.slice(2); + return [{ name: e, needsNext: t2.long.has(o2) }]; + } + if (e.length === 2) { + const n = e.charAt(1), o2 = t2.short.get(n); + return [{ name: e, needsNext: o2 === true }]; + } + return R(e, t2.short); +} +function R(e, t2) { + const n = e.slice(1).split(""), o2 = []; + for (let a = 0;a < n.length; a++) { + const s = n[a], r2 = t2.get(s); + if (r2 === undefined) + return [{ name: e, needsNext: false }]; + if (r2) { + const l = n.slice(a + 1).join(""); + if (l && ![...l].every((h) => t2.has(h))) + return o2.push({ name: `-${s}`, value: l, needsNext: false }), o2; + } + o2.push({ name: `-${s}`, needsNext: r2 }); + } + return o2; +} +function W(e, t2 = []) { + let n = 0; + for (;n < e.length; ) { + const o2 = String(e[n]); + if (!o2.startsWith("-") || o2.length < 2) + break; + const a = b(o2); + let s = n + 1; + for (const r2 of a) { + const l = { + name: r2.name, + value: r2.value, + absorbedNext: false, + isGlobal: true + }; + r2.needsNext && l.value === undefined && s < e.length && (l.value = String(e[s]), l.absorbedNext = true, s++), t2.push(l); + } + n = s; + } + return { flags: t2, taskIndex: n }; +} +function _(e, t2, n = []) { + const o2 = L(t2), a = [], s = []; + let r2 = 0; + for (;r2 < e.length; ) { + const l = e[r2]; + if (r(l)) { + s.push(...o(l)), r2++; + continue; + } + const u = String(l); + if (u === "--") { + for (let c2 = r2 + 1;c2 < e.length; c2++) { + const i = e[c2]; + r(i) ? s.push(...o(i)) : s.push(String(i)); + } + break; + } + if (!u.startsWith("-") || u.length < 2) { + a.push(u), r2++; + continue; + } + const h = b(u, o2); + let d = r2 + 1; + for (const c2 of h) { + const i = { + name: c2.name, + value: c2.value, + absorbedNext: false, + isGlobal: false + }; + c2.needsNext && i.value === undefined && d < e.length && !r(e[d]) && (i.value = String(e[d]), i.absorbedNext = true, d++), n.push(i); + } + r2 = d; + } + return { flags: n, positionals: a, pathspecs: s }; +} +function* T({ write: e }) { + for (const t2 of e) + for (const n of $) { + const o2 = n(t2.key); + o2 && (yield o2); + } +} +function g(e, t2, n = String(e)) { + const o2 = typeof e == "string" ? new RegExp(`\\s*${e}`, "i") : e; + return function(s) { + if (o2.test(s)) + return { + category: t2, + message: `Configuring ${n} is not permitted without enabling ${t2}` + }; + }; +} +var $ = [ + g(/^\s*protocol(.[a-z]+)?.allow/i, "allowUnsafeProtocolOverride", "protocol.allow"), + g("core.sshCommand", "allowUnsafeSshCommand"), + g("core.fsmonitor", "allowUnsafeFsMonitor"), + g("core.gitProxy", "allowUnsafeGitProxy"), + g("core.hooksPath", "allowUnsafeHooksPath"), + g("diff.external", "allowUnsafeDiffExternal") +]; +function* j(e, t2) { + for (const n of t2) + /^--(upload|receive)-pack/.test(n.name) && (yield { + category: "allowUnsafePack", + message: "Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack" + }), e === "clone" && (/^-\w*u/.test(n.name) || n.name === "--u") && (yield { + category: "allowUnsafePack", + message: "Use of clone with option -u is not permitted without enabling allowUnsafePack" + }), e === "push" && /^--exec/.test(n.name) && (yield { + category: "allowUnsafePack", + message: "Use of push with option --exec is not permitted without enabling allowUnsafePack" + }); +} +function B(e, t2, n) { + const o2 = [ + ...j(e, t2), + ...T(n) + ]; + return { + categories: o2.reduce((s, r2) => s.add(r2.category), /* @__PURE__ */ new Set), + vulnerabilities: o2 + }; +} +function V(...e) { + const { flags: t2, taskIndex: n } = W(e), o2 = n < e.length ? String(e[n]).toLowerCase() : null, a = o2 !== null ? e.slice(n + 1) : [], { positionals: s, pathspecs: r2 } = _(a, o2, t2), l = M(o2, t2, s); + return { + task: o2, + flags: t2.map(D), + paths: r2, + config: l, + vulnerabilities: B(o2, t2, l) + }; +} +function D({ value: e, name: t2 }) { + return e !== undefined ? { name: t2, value: e } : { name: t2 }; +} + +// node_modules/simple-git/dist/esm/index.js +var import_promise_deferred2 = __toESM(require_dist2(), 1); import { EventEmitter } from "node:events"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; @@ -647,23 +998,6 @@ var __copyProps = (to, from, except, desc) => { return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -function pathspec(...paths) { - const key = new String(paths); - cache.set(key, paths); - return key; -} -function isPathSpec(path) { - return path instanceof String && cache.has(path); -} -function toPaths(pathSpec) { - return cache.get(pathSpec) || []; -} -var cache; -var init_pathspec = __esm({ - "src/lib/args/pathspec.ts"() { - cache = /* @__PURE__ */ new WeakMap; - } -}); var GitError; var init_git_error = __esm({ "src/lib/errors/git-error.ts"() { @@ -835,7 +1169,7 @@ function filterType(input, filter, def) { return arguments.length > 2 ? def : undefined; } function filterPrimitives(input, omit) { - const type = isPathSpec(input) ? "string" : typeof input; + const type = r(input) ? "string" : typeof input; return /number|string|boolean/.test(type) && (!omit || !omit.includes(type)); } function filterPlainObject(input) { @@ -851,7 +1185,6 @@ var filterStringOrStringArray; var filterHasLength; var init_argument_filters = __esm({ "src/lib/utils/argument-filters.ts"() { - init_pathspec(); init_util(); filterArray = (input) => { return Array.isArray(input); @@ -860,7 +1193,7 @@ var init_argument_filters = __esm({ return typeof input === "number"; }; filterString = (input) => { - return typeof input === "string" || isPathSpec(input); + return typeof input === "string" || r(input); }; filterStringOrStringArray = (input) => { return filterString(input) || Array.isArray(input) && input.every(filterString); @@ -953,7 +1286,7 @@ var init_line_parser = __esm({ }); function createInstanceConfig(...options) { const baseDir = process.cwd(); - const config = Object.assign({ baseDir, ...defaultOptions }, ...options.filter((o) => typeof o === "object" && o)); + const config = Object.assign({ baseDir, ...defaultOptions }, ...options.filter((o2) => typeof o2 === "object" && o2)); config.baseDir = config.baseDir || baseDir; config.trimmed = config.trimmed === true; return config; @@ -975,14 +1308,14 @@ function appendTaskOptions(options, commands = []) { } return Object.keys(options).reduce((commands2, key) => { const value = options[key]; - if (isPathSpec(value)) { + if (r(value)) { commands2.push(value); } else if (filterPrimitives(value, ["boolean"])) { commands2.push(key + "=" + value); } else if (Array.isArray(value)) { - for (const v of value) { - if (!filterPrimitives(v, ["string", "number"])) { - commands2.push(key + "=" + v); + for (const v2 of value) { + if (!filterPrimitives(v2, ["string", "number"])) { + commands2.push(key + "=" + v2); } } } else { @@ -1020,7 +1353,6 @@ var init_task_options = __esm({ "src/lib/utils/task-options.ts"() { init_argument_filters(); init_util(); - init_pathspec(); } }); function callTaskParser(parser4, streams) { @@ -2523,7 +2855,7 @@ function parseLogOptions(opt = {}, customArgs = []) { suffix.push(`${opt.from || ""}${rangeOperator}${opt.to || ""}`); } if (filterString(opt.file)) { - command.push("--follow", pathspec(opt.file)); + command.push("--follow", c(opt.file)); } appendTaskOptions(userOptions(opt), command); return { @@ -2560,7 +2892,6 @@ var excludeOptions; var init_log = __esm({ "src/lib/tasks/log.ts"() { init_log_format(); - init_pathspec(); init_parse_list_log_summary(); init_utils(); init_task(); @@ -3001,7 +3332,7 @@ function parser3(indexX, indexY, handler) { return [`${indexX}${indexY}`, handler]; } function conflicts(indexX, ...indexY) { - return indexY.map((y) => parser3(indexX, y, (result, file) => result.conflicted.push(file))); + return indexY.map((y2) => parser3(indexX, y2, (result, file) => result.conflicted.push(file))); } function splitLine(result, lineStr) { const trimmed2 = lineStr.trim(); @@ -3236,11 +3567,10 @@ var init_clone = __esm({ "src/lib/tasks/clone.ts"() { init_task(); init_utils(); - init_pathspec(); cloneTask = (repo, directory, customArgs) => { const commands = ["clone", ...customArgs]; - filterString(repo) && commands.push(pathspec(repo)); - filterString(directory) && commands.push(pathspec(directory)); + filterString(repo) && commands.push(c(repo)); + filterString(directory) && commands.push(c(directory)); return straightThroughStringTask(commands); }; cloneMirrorTask = (repo, directory, customArgs) => { @@ -3580,7 +3910,7 @@ function deleteBranchTask(branch, forceDelete = false) { parser(stdOut, stdErr) { return parseBranchDeletions(stdOut, stdErr).branches[branch]; }, - onError({ exitCode, stdErr, stdOut }, error, _, fail) { + onError({ exitCode, stdErr, stdOut }, error, _2, fail) { if (!hasBranchDeletionError(String(error), exitCode)) { return fail(error); } @@ -3885,16 +4215,16 @@ var init_sub_module = __esm({ init_task(); } }); -function singleSorted(a, b) { +function singleSorted(a, b2) { const aIsNum = Number.isNaN(a); - const bIsNum = Number.isNaN(b); + const bIsNum = Number.isNaN(b2); if (aIsNum !== bIsNum) { return aIsNum ? 1 : -1; } - return aIsNum ? sorted(a, b) : 0; + return aIsNum ? sorted(a, b2) : 0; } -function sorted(a, b) { - return a === b ? 0 : a > b ? 1 : -1; +function sorted(a, b2) { + return a === b2 ? 0 : a > b2 ? 1 : -1; } function trimmed(input) { return input.trim(); @@ -4230,7 +4560,6 @@ var require_git = __commonJS2({ module.exports = Git2; } }); -init_pathspec(); init_git_error(); var GitConstructError = class extends GitError { constructor(config, message) { @@ -4280,54 +4609,16 @@ function abortPlugin(signal) { }; return [onSpawnBefore, onSpawnAfter]; } -function isConfigSwitch(arg) { - return typeof arg === "string" && arg.trim().toLowerCase() === "-c"; -} -function isCloneUploadPackSwitch(char, arg) { - if (typeof arg !== "string" || !arg.includes(char)) { - return false; - } - const cleaned = arg.trim().replace(/\0/g, ""); - return /^(--no)?-{1,2}[\dlsqvnobucj]+(\s|$)/.test(cleaned); -} -function preventConfigBuilder(config, setting, message = String(config)) { - const regex = typeof config === "string" ? new RegExp(`\\s*${config}`, "i") : config; - return function preventCommand(options, arg, next) { - if (options[setting] !== true && isConfigSwitch(arg) && regex.test(next)) { - throw new GitPluginError(undefined, "unsafe", `Configuring ${message} is not permitted without enabling ${setting}`); - } - }; -} -var preventUnsafeConfig = [ - preventConfigBuilder(/^\s*protocol(.[a-z]+)?.allow/i, "allowUnsafeProtocolOverride", "protocol.allow"), - preventConfigBuilder("core.sshCommand", "allowUnsafeSshCommand"), - preventConfigBuilder("core.gitProxy", "allowUnsafeGitProxy"), - preventConfigBuilder("core.hooksPath", "allowUnsafeHooksPath"), - preventConfigBuilder("diff.external", "allowUnsafeDiffExternal") -]; -function preventUploadPack(arg, method) { - if (/^\s*--(upload|receive)-pack/.test(arg)) { - throw new GitPluginError(undefined, "unsafe", `Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack`); - } - if (method === "clone" && isCloneUploadPackSwitch("u", arg)) { - throw new GitPluginError(undefined, "unsafe", `Use of clone with option -u is not permitted without enabling allowUnsafePack`); - } - if (method === "push" && /^\s*--exec\b/.test(arg)) { - throw new GitPluginError(undefined, "unsafe", `Use of push with option --exec is not permitted without enabling allowUnsafePack`); - } -} -function blockUnsafeOperationsPlugin({ - allowUnsafePack = false, - ...options -} = {}) { +function blockUnsafeOperationsPlugin(options = {}) { return { type: "spawn.args", - action(args, context) { - args.forEach((current, index) => { - const next = index < args.length ? args[index + 1] : ""; - allowUnsafePack || preventUploadPack(current, context.method); - preventUnsafeConfig.forEach((helper) => helper(options, current, next)); - }); + action(args) { + const parsed = V(...args); + for (const vulnerability of parsed.vulnerabilities.vulnerabilities) { + if (options[vulnerability.category] !== true) { + throw new GitPluginError(undefined, "unsafe", vulnerability.message); + } + } return args; } }; @@ -4592,7 +4883,6 @@ function timeoutPlugin({ }; } } -init_pathspec(); function suffixPathsPlugin() { return { type: "spawn.args", @@ -4604,12 +4894,12 @@ function suffixPathsPlugin() { } for (let i = 0;i < data.length; i++) { const param = data[i]; - if (isPathSpec(param)) { - append2(toPaths(param)); + if (r(param)) { + append2(o(param)); continue; } if (param === "--") { - append2(data.slice(i + 1).flatMap((item) => isPathSpec(item) && toPaths(item) || item)); + append2(data.slice(i + 1).flatMap((item) => r(item) && o(item) || item)); break; } prefix.push(param); @@ -4647,4 +4937,4 @@ var esm_default = gitInstanceFactory; export { simpleGit, esm_default }; -//# debugId=6E1BAD1EB3263EAA64756E2164756E21 +//# debugId=BB05AB0AB315ED5464756E2164756E21 diff --git a/dist/main-29zhc9fw.js.map b/dist/main-29zhc9fw.js.map new file mode 100644 index 00000000..0df4e0e1 --- /dev/null +++ b/dist/main-29zhc9fw.js.map @@ -0,0 +1,19 @@ +{ + "version": 3, + "sources": ["../node_modules/@kwsites/file-exists/node_modules/debug/src/common.js", "../node_modules/@kwsites/file-exists/node_modules/debug/src/browser.js", "../node_modules/@kwsites/file-exists/node_modules/debug/src/node.js", "../node_modules/@kwsites/file-exists/node_modules/debug/src/index.js", "../node_modules/@kwsites/file-exists/dist/src/index.js", "../node_modules/@kwsites/file-exists/dist/index.js", "../node_modules/@kwsites/promise-deferred/dist/index.js", "../node_modules/simple-git/dist/esm/index.js", "../node_modules/@simple-git/args-pathspec/dist/index.mjs", "../node_modules/@simple-git/argv-parser/dist/index.mjs"], + "sourcesContent": [ + "\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '')\n\t\t\t.trim()\n\t\t\t.replace(' ', ',')\n\t\t\t.split(',')\n\t\t\t.filter(Boolean);\n\n\t\tfor (const ns of split) {\n\t\t\tif (ns[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(ns.slice(1));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(ns);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the given string matches a namespace template, honoring\n\t * asterisks as wildcards.\n\t *\n\t * @param {String} search\n\t * @param {String} template\n\t * @return {Boolean}\n\t */\n\tfunction matchesTemplate(search, template) {\n\t\tlet searchIndex = 0;\n\t\tlet templateIndex = 0;\n\t\tlet starIndex = -1;\n\t\tlet matchIndex = 0;\n\n\t\twhile (searchIndex < search.length) {\n\t\t\tif (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {\n\t\t\t\t// Match character or proceed with wildcard\n\t\t\t\tif (template[templateIndex] === '*') {\n\t\t\t\t\tstarIndex = templateIndex;\n\t\t\t\t\tmatchIndex = searchIndex;\n\t\t\t\t\ttemplateIndex++; // Skip the '*'\n\t\t\t\t} else {\n\t\t\t\t\tsearchIndex++;\n\t\t\t\t\ttemplateIndex++;\n\t\t\t\t}\n\t\t\t} else if (starIndex !== -1) { // eslint-disable-line no-negated-condition\n\t\t\t\t// Backtrack to the last '*' and try to match more characters\n\t\t\t\ttemplateIndex = starIndex + 1;\n\t\t\t\tmatchIndex++;\n\t\t\t\tsearchIndex = matchIndex;\n\t\t\t} else {\n\t\t\t\treturn false; // No match\n\t\t\t}\n\t\t}\n\n\t\t// Handle trailing '*' in template\n\t\twhile (templateIndex < template.length && template[templateIndex] === '*') {\n\t\t\ttemplateIndex++;\n\t\t}\n\n\t\treturn templateIndex === template.length;\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names,\n\t\t\t...createDebug.skips.map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tfor (const skip of createDebug.skips) {\n\t\t\tif (matchesTemplate(name, skip)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (const ns of createDebug.names) {\n\t\t\tif (matchesTemplate(name, ns)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n", + "/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\tlet m;\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t// eslint-disable-next-line no-return-assign\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)) && parseInt(m[1], 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n", + "/**\n * Module dependencies.\n */\n\nconst tty = require('tty');\nconst util = require('util');\n\n/**\n * This is the Node.js implementation of `debug()`.\n */\n\nexports.init = init;\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.destroy = util.deprecate(\n\t() => {},\n\t'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'\n);\n\n/**\n * Colors.\n */\n\nexports.colors = [6, 2, 3, 4, 5, 1];\n\ntry {\n\t// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)\n\t// eslint-disable-next-line import/no-extraneous-dependencies\n\tconst supportsColor = require('supports-color');\n\n\tif (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {\n\t\texports.colors = [\n\t\t\t20,\n\t\t\t21,\n\t\t\t26,\n\t\t\t27,\n\t\t\t32,\n\t\t\t33,\n\t\t\t38,\n\t\t\t39,\n\t\t\t40,\n\t\t\t41,\n\t\t\t42,\n\t\t\t43,\n\t\t\t44,\n\t\t\t45,\n\t\t\t56,\n\t\t\t57,\n\t\t\t62,\n\t\t\t63,\n\t\t\t68,\n\t\t\t69,\n\t\t\t74,\n\t\t\t75,\n\t\t\t76,\n\t\t\t77,\n\t\t\t78,\n\t\t\t79,\n\t\t\t80,\n\t\t\t81,\n\t\t\t92,\n\t\t\t93,\n\t\t\t98,\n\t\t\t99,\n\t\t\t112,\n\t\t\t113,\n\t\t\t128,\n\t\t\t129,\n\t\t\t134,\n\t\t\t135,\n\t\t\t148,\n\t\t\t149,\n\t\t\t160,\n\t\t\t161,\n\t\t\t162,\n\t\t\t163,\n\t\t\t164,\n\t\t\t165,\n\t\t\t166,\n\t\t\t167,\n\t\t\t168,\n\t\t\t169,\n\t\t\t170,\n\t\t\t171,\n\t\t\t172,\n\t\t\t173,\n\t\t\t178,\n\t\t\t179,\n\t\t\t184,\n\t\t\t185,\n\t\t\t196,\n\t\t\t197,\n\t\t\t198,\n\t\t\t199,\n\t\t\t200,\n\t\t\t201,\n\t\t\t202,\n\t\t\t203,\n\t\t\t204,\n\t\t\t205,\n\t\t\t206,\n\t\t\t207,\n\t\t\t208,\n\t\t\t209,\n\t\t\t214,\n\t\t\t215,\n\t\t\t220,\n\t\t\t221\n\t\t];\n\t}\n} catch (error) {\n\t// Swallow - we only care if `supports-color` is available; it doesn't have to be.\n}\n\n/**\n * Build up the default `inspectOpts` object from the environment variables.\n *\n * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js\n */\n\nexports.inspectOpts = Object.keys(process.env).filter(key => {\n\treturn /^debug_/i.test(key);\n}).reduce((obj, key) => {\n\t// Camel-case\n\tconst prop = key\n\t\t.substring(6)\n\t\t.toLowerCase()\n\t\t.replace(/_([a-z])/g, (_, k) => {\n\t\t\treturn k.toUpperCase();\n\t\t});\n\n\t// Coerce string value into JS value\n\tlet val = process.env[key];\n\tif (/^(yes|on|true|enabled)$/i.test(val)) {\n\t\tval = true;\n\t} else if (/^(no|off|false|disabled)$/i.test(val)) {\n\t\tval = false;\n\t} else if (val === 'null') {\n\t\tval = null;\n\t} else {\n\t\tval = Number(val);\n\t}\n\n\tobj[prop] = val;\n\treturn obj;\n}, {});\n\n/**\n * Is stdout a TTY? Colored output is enabled when `true`.\n */\n\nfunction useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}\n\n/**\n * Adds ANSI color escape codes if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\tconst {namespace: name, useColors} = this;\n\n\tif (useColors) {\n\t\tconst c = this.color;\n\t\tconst colorCode = '\\u001B[3' + (c < 8 ? c : '8;5;' + c);\n\t\tconst prefix = ` ${colorCode};1m${name} \\u001B[0m`;\n\n\t\targs[0] = prefix + args[0].split('\\n').join('\\n' + prefix);\n\t\targs.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\\u001B[0m');\n\t} else {\n\t\targs[0] = getDate() + name + ' ' + args[0];\n\t}\n}\n\nfunction getDate() {\n\tif (exports.inspectOpts.hideDate) {\n\t\treturn '';\n\t}\n\treturn new Date().toISOString() + ' ';\n}\n\n/**\n * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.\n */\n\nfunction log(...args) {\n\treturn process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\\n');\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\tif (namespaces) {\n\t\tprocess.env.DEBUG = namespaces;\n\t} else {\n\t\t// If you set a process.env field to null or undefined, it gets cast to the\n\t\t// string 'null' or 'undefined'. Just delete instead.\n\t\tdelete process.env.DEBUG;\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n\treturn process.env.DEBUG;\n}\n\n/**\n * Init logic for `debug` instances.\n *\n * Create a new `inspectOpts` object in case `useColors` is set\n * differently for a particular `debug` instance.\n */\n\nfunction init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %o to `util.inspect()`, all on a single line.\n */\n\nformatters.o = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts)\n\t\t.split('\\n')\n\t\t.map(str => str.trim())\n\t\t.join(' ');\n};\n\n/**\n * Map %O to `util.inspect()`, allowing multiple lines if needed.\n */\n\nformatters.O = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts);\n};\n", + "/**\n * Detect Electron renderer / nwjs process, which is node, but we should\n * treat as a browser.\n */\n\nif (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {\n\tmodule.exports = require('./browser.js');\n} else {\n\tmodule.exports = require('./node.js');\n}\n", + "\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst fs_1 = require(\"fs\");\nconst debug_1 = __importDefault(require(\"debug\"));\nconst log = debug_1.default('@kwsites/file-exists');\nfunction check(path, isFile, isDirectory) {\n log(`checking %s`, path);\n try {\n const stat = fs_1.statSync(path);\n if (stat.isFile() && isFile) {\n log(`[OK] path represents a file`);\n return true;\n }\n if (stat.isDirectory() && isDirectory) {\n log(`[OK] path represents a directory`);\n return true;\n }\n log(`[FAIL] path represents something other than a file or directory`);\n return false;\n }\n catch (e) {\n if (e.code === 'ENOENT') {\n log(`[FAIL] path is not accessible: %o`, e);\n return false;\n }\n log(`[FATAL] %o`, e);\n throw e;\n }\n}\n/**\n * Synchronous validation of a path existing either as a file or as a directory.\n *\n * @param {string} path The path to check\n * @param {number} type One or both of the exported numeric constants\n */\nfunction exists(path, type = exports.READABLE) {\n return check(path, (type & exports.FILE) > 0, (type & exports.FOLDER) > 0);\n}\nexports.exists = exists;\n/**\n * Constant representing a file\n */\nexports.FILE = 1;\n/**\n * Constant representing a folder\n */\nexports.FOLDER = 2;\n/**\n * Constant representing either a file or a folder\n */\nexports.READABLE = exports.FILE + exports.FOLDER;\n//# sourceMappingURL=index.js.map", + "\"use strict\";\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__export(require(\"./src\"));\n//# sourceMappingURL=index.js.map", + "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createDeferred = exports.deferred = void 0;\n/**\n * Creates a new `DeferredPromise`\n *\n * ```typescript\n import {deferred} from '@kwsites/promise-deferred`;\n ```\n */\nfunction deferred() {\n let done;\n let fail;\n let status = 'pending';\n const promise = new Promise((_done, _fail) => {\n done = _done;\n fail = _fail;\n });\n return {\n promise,\n done(result) {\n if (status === 'pending') {\n status = 'resolved';\n done(result);\n }\n },\n fail(error) {\n if (status === 'pending') {\n status = 'rejected';\n fail(error);\n }\n },\n get fulfilled() {\n return status !== 'pending';\n },\n get status() {\n return status;\n },\n };\n}\nexports.deferred = deferred;\n/**\n * Alias of the exported `deferred` function, to help consumers wanting to use `deferred` as the\n * local variable name rather than the factory import name, without needing to rename on import.\n *\n * ```typescript\n import {createDeferred} from '@kwsites/promise-deferred`;\n ```\n */\nexports.createDeferred = deferred;\n/**\n * Default export allows use as:\n *\n * ```typescript\n import deferred from '@kwsites/promise-deferred`;\n ```\n */\nexports.default = deferred;\n//# sourceMappingURL=index.js.map", + "var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __esm = (fn, res) => function __init() {\n return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;\n};\nvar __commonJS = (cb, mod) => function __require() {\n return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;\n};\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/lib/errors/git-error.ts\nvar GitError;\nvar init_git_error = __esm({\n \"src/lib/errors/git-error.ts\"() {\n \"use strict\";\n GitError = class extends Error {\n constructor(task, message) {\n super(message);\n this.task = task;\n Object.setPrototypeOf(this, new.target.prototype);\n }\n };\n }\n});\n\n// src/lib/errors/git-response-error.ts\nvar GitResponseError;\nvar init_git_response_error = __esm({\n \"src/lib/errors/git-response-error.ts\"() {\n \"use strict\";\n init_git_error();\n GitResponseError = class extends GitError {\n constructor(git, message) {\n super(void 0, message || String(git));\n this.git = git;\n }\n };\n }\n});\n\n// src/lib/errors/task-configuration-error.ts\nvar TaskConfigurationError;\nvar init_task_configuration_error = __esm({\n \"src/lib/errors/task-configuration-error.ts\"() {\n \"use strict\";\n init_git_error();\n TaskConfigurationError = class extends GitError {\n constructor(message) {\n super(void 0, message);\n }\n };\n }\n});\n\n// src/lib/utils/util.ts\nimport { Buffer as Buffer2 } from \"node:buffer\";\nimport { exists, FOLDER } from \"@kwsites/file-exists\";\nfunction asFunction(source) {\n if (typeof source !== \"function\") {\n return NOOP;\n }\n return source;\n}\nfunction isUserFunction(source) {\n return typeof source === \"function\" && source !== NOOP;\n}\nfunction splitOn(input, char) {\n const index = input.indexOf(char);\n if (index <= 0) {\n return [input, \"\"];\n }\n return [input.substr(0, index), input.substr(index + 1)];\n}\nfunction first(input, offset = 0) {\n return isArrayLike(input) && input.length > offset ? input[offset] : void 0;\n}\nfunction last(input, offset = 0) {\n if (isArrayLike(input) && input.length > offset) {\n return input[input.length - 1 - offset];\n }\n}\nfunction isArrayLike(input) {\n return filterHasLength(input);\n}\nfunction toLinesWithContent(input = \"\", trimmed2 = true, separator = \"\\n\") {\n return input.split(separator).reduce((output, line) => {\n const lineContent = trimmed2 ? line.trim() : line;\n if (lineContent) {\n output.push(lineContent);\n }\n return output;\n }, []);\n}\nfunction forEachLineWithContent(input, callback) {\n return toLinesWithContent(input, true).map((line) => callback(line));\n}\nfunction folderExists(path) {\n return exists(path, FOLDER);\n}\nfunction append(target, item) {\n if (Array.isArray(target)) {\n if (!target.includes(item)) {\n target.push(item);\n }\n } else {\n target.add(item);\n }\n return item;\n}\nfunction including(target, item) {\n if (Array.isArray(target) && !target.includes(item)) {\n target.push(item);\n }\n return target;\n}\nfunction remove(target, item) {\n if (Array.isArray(target)) {\n const index = target.indexOf(item);\n if (index >= 0) {\n target.splice(index, 1);\n }\n } else {\n target.delete(item);\n }\n return item;\n}\nfunction asArray(source) {\n return Array.isArray(source) ? source : [source];\n}\nfunction asCamelCase(str) {\n return str.replace(/[\\s-]+(.)/g, (_all, chr) => {\n return chr.toUpperCase();\n });\n}\nfunction asStringArray(source) {\n return asArray(source).map((item) => {\n return item instanceof String ? item : String(item);\n });\n}\nfunction asNumber(source, onNaN = 0) {\n if (source == null) {\n return onNaN;\n }\n const num = parseInt(source, 10);\n return Number.isNaN(num) ? onNaN : num;\n}\nfunction prefixedArray(input, prefix) {\n const output = [];\n for (let i = 0, max = input.length; i < max; i++) {\n output.push(prefix, input[i]);\n }\n return output;\n}\nfunction bufferToString(input) {\n return (Array.isArray(input) ? Buffer2.concat(input) : input).toString(\"utf-8\");\n}\nfunction pick(source, properties) {\n const out = {};\n properties.forEach((key) => {\n if (source[key] !== void 0) {\n out[key] = source[key];\n }\n });\n return out;\n}\nfunction delay(duration = 0) {\n return new Promise((done) => setTimeout(done, duration));\n}\nfunction orVoid(input) {\n if (input === false) {\n return void 0;\n }\n return input;\n}\nvar NULL, NOOP, objectToString;\nvar init_util = __esm({\n \"src/lib/utils/util.ts\"() {\n \"use strict\";\n init_argument_filters();\n NULL = \"\\0\";\n NOOP = () => {\n };\n objectToString = Object.prototype.toString.call.bind(Object.prototype.toString);\n }\n});\n\n// src/lib/utils/argument-filters.ts\nimport { isPathSpec } from \"@simple-git/args-pathspec\";\nfunction filterType(input, filter, def) {\n if (filter(input)) {\n return input;\n }\n return arguments.length > 2 ? def : void 0;\n}\nfunction filterPrimitives(input, omit) {\n const type = isPathSpec(input) ? \"string\" : typeof input;\n return /number|string|boolean/.test(type) && (!omit || !omit.includes(type));\n}\nfunction filterPlainObject(input) {\n return !!input && objectToString(input) === \"[object Object]\";\n}\nfunction filterFunction(input) {\n return typeof input === \"function\";\n}\nvar filterArray, filterNumber, filterString, filterStringOrStringArray, filterHasLength;\nvar init_argument_filters = __esm({\n \"src/lib/utils/argument-filters.ts\"() {\n \"use strict\";\n init_util();\n filterArray = (input) => {\n return Array.isArray(input);\n };\n filterNumber = (input) => {\n return typeof input === \"number\";\n };\n filterString = (input) => {\n return typeof input === \"string\" || isPathSpec(input);\n };\n filterStringOrStringArray = (input) => {\n return filterString(input) || Array.isArray(input) && input.every(filterString);\n };\n filterHasLength = (input) => {\n if (input == null || \"number|boolean|function\".includes(typeof input)) {\n return false;\n }\n return typeof input.length === \"number\";\n };\n }\n});\n\n// src/lib/utils/exit-codes.ts\nvar ExitCodes;\nvar init_exit_codes = __esm({\n \"src/lib/utils/exit-codes.ts\"() {\n \"use strict\";\n ExitCodes = /* @__PURE__ */ ((ExitCodes2) => {\n ExitCodes2[ExitCodes2[\"SUCCESS\"] = 0] = \"SUCCESS\";\n ExitCodes2[ExitCodes2[\"ERROR\"] = 1] = \"ERROR\";\n ExitCodes2[ExitCodes2[\"NOT_FOUND\"] = -2] = \"NOT_FOUND\";\n ExitCodes2[ExitCodes2[\"UNCLEAN\"] = 128] = \"UNCLEAN\";\n return ExitCodes2;\n })(ExitCodes || {});\n }\n});\n\n// src/lib/utils/git-output-streams.ts\nvar GitOutputStreams;\nvar init_git_output_streams = __esm({\n \"src/lib/utils/git-output-streams.ts\"() {\n \"use strict\";\n GitOutputStreams = class _GitOutputStreams {\n constructor(stdOut, stdErr) {\n this.stdOut = stdOut;\n this.stdErr = stdErr;\n }\n asStrings() {\n return new _GitOutputStreams(this.stdOut.toString(\"utf8\"), this.stdErr.toString(\"utf8\"));\n }\n };\n }\n});\n\n// src/lib/utils/line-parser.ts\nfunction useMatchesDefault() {\n throw new Error(`LineParser:useMatches not implemented`);\n}\nvar LineParser, RemoteLineParser;\nvar init_line_parser = __esm({\n \"src/lib/utils/line-parser.ts\"() {\n \"use strict\";\n LineParser = class {\n constructor(regExp, useMatches) {\n this.matches = [];\n this.useMatches = useMatchesDefault;\n this.parse = (line, target) => {\n this.resetMatches();\n if (!this._regExp.every((reg, index) => this.addMatch(reg, index, line(index)))) {\n return false;\n }\n return this.useMatches(target, this.prepareMatches()) !== false;\n };\n this._regExp = Array.isArray(regExp) ? regExp : [regExp];\n if (useMatches) {\n this.useMatches = useMatches;\n }\n }\n resetMatches() {\n this.matches.length = 0;\n }\n prepareMatches() {\n return this.matches;\n }\n addMatch(reg, index, line) {\n const matched = line && reg.exec(line);\n if (matched) {\n this.pushMatch(index, matched);\n }\n return !!matched;\n }\n pushMatch(_index, matched) {\n this.matches.push(...matched.slice(1));\n }\n };\n RemoteLineParser = class extends LineParser {\n addMatch(reg, index, line) {\n return /^remote:\\s/.test(String(line)) && super.addMatch(reg, index, line);\n }\n pushMatch(index, matched) {\n if (index > 0 || matched.length > 1) {\n super.pushMatch(index, matched);\n }\n }\n };\n }\n});\n\n// src/lib/utils/simple-git-options.ts\nfunction createInstanceConfig(...options) {\n const baseDir = process.cwd();\n const config = Object.assign(\n { baseDir, ...defaultOptions },\n ...options.filter((o) => typeof o === \"object\" && o)\n );\n config.baseDir = config.baseDir || baseDir;\n config.trimmed = config.trimmed === true;\n return config;\n}\nvar defaultOptions;\nvar init_simple_git_options = __esm({\n \"src/lib/utils/simple-git-options.ts\"() {\n \"use strict\";\n defaultOptions = {\n binary: \"git\",\n maxConcurrentProcesses: 5,\n config: [],\n trimmed: false\n };\n }\n});\n\n// src/lib/utils/task-options.ts\nimport { isPathSpec as isPathSpec2 } from \"@simple-git/args-pathspec\";\nfunction appendTaskOptions(options, commands = []) {\n if (!filterPlainObject(options)) {\n return commands;\n }\n return Object.keys(options).reduce((commands2, key) => {\n const value = options[key];\n if (isPathSpec2(value)) {\n commands2.push(value);\n } else if (filterPrimitives(value, [\"boolean\"])) {\n commands2.push(key + \"=\" + value);\n } else if (Array.isArray(value)) {\n for (const v of value) {\n if (!filterPrimitives(v, [\"string\", \"number\"])) {\n commands2.push(key + \"=\" + v);\n }\n }\n } else {\n commands2.push(key);\n }\n return commands2;\n }, commands);\n}\nfunction getTrailingOptions(args, initialPrimitive = 0, objectOnly = false) {\n const command = [];\n for (let i = 0, max = initialPrimitive < 0 ? args.length : initialPrimitive; i < max; i++) {\n if (\"string|number\".includes(typeof args[i])) {\n command.push(String(args[i]));\n }\n }\n appendTaskOptions(trailingOptionsArgument(args), command);\n if (!objectOnly) {\n command.push(...trailingArrayArgument(args));\n }\n return command;\n}\nfunction trailingArrayArgument(args) {\n const hasTrailingCallback = typeof last(args) === \"function\";\n return asStringArray(filterType(last(args, hasTrailingCallback ? 1 : 0), filterArray, []));\n}\nfunction trailingOptionsArgument(args) {\n const hasTrailingCallback = filterFunction(last(args));\n return filterType(last(args, hasTrailingCallback ? 1 : 0), filterPlainObject);\n}\nfunction trailingFunctionArgument(args, includeNoop = true) {\n const callback = asFunction(last(args));\n return includeNoop || isUserFunction(callback) ? callback : void 0;\n}\nvar init_task_options = __esm({\n \"src/lib/utils/task-options.ts\"() {\n \"use strict\";\n init_argument_filters();\n init_util();\n }\n});\n\n// src/lib/utils/task-parser.ts\nfunction callTaskParser(parser4, streams) {\n return parser4(streams.stdOut, streams.stdErr);\n}\nfunction parseStringResponse(result, parsers12, texts, trim = true) {\n asArray(texts).forEach((text) => {\n for (let lines = toLinesWithContent(text, trim), i = 0, max = lines.length; i < max; i++) {\n const line = (offset = 0) => {\n if (i + offset >= max) {\n return;\n }\n return lines[i + offset];\n };\n parsers12.some(({ parse }) => parse(line, result));\n }\n });\n return result;\n}\nvar init_task_parser = __esm({\n \"src/lib/utils/task-parser.ts\"() {\n \"use strict\";\n init_util();\n }\n});\n\n// src/lib/utils/index.ts\nvar utils_exports = {};\n__export(utils_exports, {\n ExitCodes: () => ExitCodes,\n GitOutputStreams: () => GitOutputStreams,\n LineParser: () => LineParser,\n NOOP: () => NOOP,\n NULL: () => NULL,\n RemoteLineParser: () => RemoteLineParser,\n append: () => append,\n appendTaskOptions: () => appendTaskOptions,\n asArray: () => asArray,\n asCamelCase: () => asCamelCase,\n asFunction: () => asFunction,\n asNumber: () => asNumber,\n asStringArray: () => asStringArray,\n bufferToString: () => bufferToString,\n callTaskParser: () => callTaskParser,\n createInstanceConfig: () => createInstanceConfig,\n delay: () => delay,\n filterArray: () => filterArray,\n filterFunction: () => filterFunction,\n filterHasLength: () => filterHasLength,\n filterNumber: () => filterNumber,\n filterPlainObject: () => filterPlainObject,\n filterPrimitives: () => filterPrimitives,\n filterString: () => filterString,\n filterStringOrStringArray: () => filterStringOrStringArray,\n filterType: () => filterType,\n first: () => first,\n folderExists: () => folderExists,\n forEachLineWithContent: () => forEachLineWithContent,\n getTrailingOptions: () => getTrailingOptions,\n including: () => including,\n isUserFunction: () => isUserFunction,\n last: () => last,\n objectToString: () => objectToString,\n orVoid: () => orVoid,\n parseStringResponse: () => parseStringResponse,\n pick: () => pick,\n prefixedArray: () => prefixedArray,\n remove: () => remove,\n splitOn: () => splitOn,\n toLinesWithContent: () => toLinesWithContent,\n trailingFunctionArgument: () => trailingFunctionArgument,\n trailingOptionsArgument: () => trailingOptionsArgument\n});\nvar init_utils = __esm({\n \"src/lib/utils/index.ts\"() {\n \"use strict\";\n init_argument_filters();\n init_exit_codes();\n init_git_output_streams();\n init_line_parser();\n init_simple_git_options();\n init_task_options();\n init_task_parser();\n init_util();\n }\n});\n\n// src/lib/tasks/check-is-repo.ts\nvar check_is_repo_exports = {};\n__export(check_is_repo_exports, {\n CheckRepoActions: () => CheckRepoActions,\n checkIsBareRepoTask: () => checkIsBareRepoTask,\n checkIsRepoRootTask: () => checkIsRepoRootTask,\n checkIsRepoTask: () => checkIsRepoTask\n});\nfunction checkIsRepoTask(action) {\n switch (action) {\n case \"bare\" /* BARE */:\n return checkIsBareRepoTask();\n case \"root\" /* IS_REPO_ROOT */:\n return checkIsRepoRootTask();\n }\n const commands = [\"rev-parse\", \"--is-inside-work-tree\"];\n return {\n commands,\n format: \"utf-8\",\n onError,\n parser\n };\n}\nfunction checkIsRepoRootTask() {\n const commands = [\"rev-parse\", \"--git-dir\"];\n return {\n commands,\n format: \"utf-8\",\n onError,\n parser(path) {\n return /^\\.(git)?$/.test(path.trim());\n }\n };\n}\nfunction checkIsBareRepoTask() {\n const commands = [\"rev-parse\", \"--is-bare-repository\"];\n return {\n commands,\n format: \"utf-8\",\n onError,\n parser\n };\n}\nfunction isNotRepoMessage(error) {\n return /(Not a git repository|Kein Git-Repository)/i.test(String(error));\n}\nvar CheckRepoActions, onError, parser;\nvar init_check_is_repo = __esm({\n \"src/lib/tasks/check-is-repo.ts\"() {\n \"use strict\";\n init_utils();\n CheckRepoActions = /* @__PURE__ */ ((CheckRepoActions2) => {\n CheckRepoActions2[\"BARE\"] = \"bare\";\n CheckRepoActions2[\"IN_TREE\"] = \"tree\";\n CheckRepoActions2[\"IS_REPO_ROOT\"] = \"root\";\n return CheckRepoActions2;\n })(CheckRepoActions || {});\n onError = ({ exitCode }, error, done, fail) => {\n if (exitCode === 128 /* UNCLEAN */ && isNotRepoMessage(error)) {\n return done(Buffer.from(\"false\"));\n }\n fail(error);\n };\n parser = (text) => {\n return text.trim() === \"true\";\n };\n }\n});\n\n// src/lib/responses/CleanSummary.ts\nfunction cleanSummaryParser(dryRun, text) {\n const summary = new CleanResponse(dryRun);\n const regexp = dryRun ? dryRunRemovalRegexp : removalRegexp;\n toLinesWithContent(text).forEach((line) => {\n const removed = line.replace(regexp, \"\");\n summary.paths.push(removed);\n (isFolderRegexp.test(removed) ? summary.folders : summary.files).push(removed);\n });\n return summary;\n}\nvar CleanResponse, removalRegexp, dryRunRemovalRegexp, isFolderRegexp;\nvar init_CleanSummary = __esm({\n \"src/lib/responses/CleanSummary.ts\"() {\n \"use strict\";\n init_utils();\n CleanResponse = class {\n constructor(dryRun) {\n this.dryRun = dryRun;\n this.paths = [];\n this.files = [];\n this.folders = [];\n }\n };\n removalRegexp = /^[a-z]+\\s*/i;\n dryRunRemovalRegexp = /^[a-z]+\\s+[a-z]+\\s*/i;\n isFolderRegexp = /\\/$/;\n }\n});\n\n// src/lib/tasks/task.ts\nvar task_exports = {};\n__export(task_exports, {\n EMPTY_COMMANDS: () => EMPTY_COMMANDS,\n adhocExecTask: () => adhocExecTask,\n configurationErrorTask: () => configurationErrorTask,\n isBufferTask: () => isBufferTask,\n isEmptyTask: () => isEmptyTask,\n straightThroughBufferTask: () => straightThroughBufferTask,\n straightThroughStringTask: () => straightThroughStringTask\n});\nfunction adhocExecTask(parser4) {\n return {\n commands: EMPTY_COMMANDS,\n format: \"empty\",\n parser: parser4\n };\n}\nfunction configurationErrorTask(error) {\n return {\n commands: EMPTY_COMMANDS,\n format: \"empty\",\n parser() {\n throw typeof error === \"string\" ? new TaskConfigurationError(error) : error;\n }\n };\n}\nfunction straightThroughStringTask(commands, trimmed2 = false) {\n return {\n commands,\n format: \"utf-8\",\n parser(text) {\n return trimmed2 ? String(text).trim() : text;\n }\n };\n}\nfunction straightThroughBufferTask(commands) {\n return {\n commands,\n format: \"buffer\",\n parser(buffer) {\n return buffer;\n }\n };\n}\nfunction isBufferTask(task) {\n return task.format === \"buffer\";\n}\nfunction isEmptyTask(task) {\n return task.format === \"empty\" || !task.commands.length;\n}\nvar EMPTY_COMMANDS;\nvar init_task = __esm({\n \"src/lib/tasks/task.ts\"() {\n \"use strict\";\n init_task_configuration_error();\n EMPTY_COMMANDS = [];\n }\n});\n\n// src/lib/tasks/clean.ts\nvar clean_exports = {};\n__export(clean_exports, {\n CONFIG_ERROR_INTERACTIVE_MODE: () => CONFIG_ERROR_INTERACTIVE_MODE,\n CONFIG_ERROR_MODE_REQUIRED: () => CONFIG_ERROR_MODE_REQUIRED,\n CONFIG_ERROR_UNKNOWN_OPTION: () => CONFIG_ERROR_UNKNOWN_OPTION,\n CleanOptions: () => CleanOptions,\n cleanTask: () => cleanTask,\n cleanWithOptionsTask: () => cleanWithOptionsTask,\n isCleanOptionsArray: () => isCleanOptionsArray\n});\nfunction cleanWithOptionsTask(mode, customArgs) {\n const { cleanMode, options, valid } = getCleanOptions(mode);\n if (!cleanMode) {\n return configurationErrorTask(CONFIG_ERROR_MODE_REQUIRED);\n }\n if (!valid.options) {\n return configurationErrorTask(CONFIG_ERROR_UNKNOWN_OPTION + JSON.stringify(mode));\n }\n options.push(...customArgs);\n if (options.some(isInteractiveMode)) {\n return configurationErrorTask(CONFIG_ERROR_INTERACTIVE_MODE);\n }\n return cleanTask(cleanMode, options);\n}\nfunction cleanTask(mode, customArgs) {\n const commands = [\"clean\", `-${mode}`, ...customArgs];\n return {\n commands,\n format: \"utf-8\",\n parser(text) {\n return cleanSummaryParser(mode === \"n\" /* DRY_RUN */, text);\n }\n };\n}\nfunction isCleanOptionsArray(input) {\n return Array.isArray(input) && input.every((test) => CleanOptionValues.has(test));\n}\nfunction getCleanOptions(input) {\n let cleanMode;\n let options = [];\n let valid = { cleanMode: false, options: true };\n input.replace(/[^a-z]i/g, \"\").split(\"\").forEach((char) => {\n if (isCleanMode(char)) {\n cleanMode = char;\n valid.cleanMode = true;\n } else {\n valid.options = valid.options && isKnownOption(options[options.length] = `-${char}`);\n }\n });\n return {\n cleanMode,\n options,\n valid\n };\n}\nfunction isCleanMode(cleanMode) {\n return cleanMode === \"f\" /* FORCE */ || cleanMode === \"n\" /* DRY_RUN */;\n}\nfunction isKnownOption(option) {\n return /^-[a-z]$/i.test(option) && CleanOptionValues.has(option.charAt(1));\n}\nfunction isInteractiveMode(option) {\n if (/^-[^\\-]/.test(option)) {\n return option.indexOf(\"i\") > 0;\n }\n return option === \"--interactive\";\n}\nvar CONFIG_ERROR_INTERACTIVE_MODE, CONFIG_ERROR_MODE_REQUIRED, CONFIG_ERROR_UNKNOWN_OPTION, CleanOptions, CleanOptionValues;\nvar init_clean = __esm({\n \"src/lib/tasks/clean.ts\"() {\n \"use strict\";\n init_CleanSummary();\n init_utils();\n init_task();\n CONFIG_ERROR_INTERACTIVE_MODE = \"Git clean interactive mode is not supported\";\n CONFIG_ERROR_MODE_REQUIRED = 'Git clean mode parameter (\"n\" or \"f\") is required';\n CONFIG_ERROR_UNKNOWN_OPTION = \"Git clean unknown option found in: \";\n CleanOptions = /* @__PURE__ */ ((CleanOptions2) => {\n CleanOptions2[\"DRY_RUN\"] = \"n\";\n CleanOptions2[\"FORCE\"] = \"f\";\n CleanOptions2[\"IGNORED_INCLUDED\"] = \"x\";\n CleanOptions2[\"IGNORED_ONLY\"] = \"X\";\n CleanOptions2[\"EXCLUDING\"] = \"e\";\n CleanOptions2[\"QUIET\"] = \"q\";\n CleanOptions2[\"RECURSIVE\"] = \"d\";\n return CleanOptions2;\n })(CleanOptions || {});\n CleanOptionValues = /* @__PURE__ */ new Set([\n \"i\",\n ...asStringArray(Object.values(CleanOptions))\n ]);\n }\n});\n\n// src/lib/responses/ConfigList.ts\nfunction configListParser(text) {\n const config = new ConfigList();\n for (const item of configParser(text)) {\n config.addValue(item.file, String(item.key), item.value);\n }\n return config;\n}\nfunction configGetParser(text, key) {\n let value = null;\n const values = [];\n const scopes = /* @__PURE__ */ new Map();\n for (const item of configParser(text, key)) {\n if (item.key !== key) {\n continue;\n }\n values.push(value = item.value);\n if (!scopes.has(item.file)) {\n scopes.set(item.file, []);\n }\n scopes.get(item.file).push(value);\n }\n return {\n key,\n paths: Array.from(scopes.keys()),\n scopes,\n value,\n values\n };\n}\nfunction configFilePath(filePath) {\n return filePath.replace(/^(file):/, \"\");\n}\nfunction* configParser(text, requestedKey = null) {\n const lines = text.split(\"\\0\");\n for (let i = 0, max = lines.length - 1; i < max; ) {\n const file = configFilePath(lines[i++]);\n let value = lines[i++];\n let key = requestedKey;\n if (value.includes(\"\\n\")) {\n const line = splitOn(value, \"\\n\");\n key = line[0];\n value = line[1];\n }\n yield { file, key, value };\n }\n}\nvar ConfigList;\nvar init_ConfigList = __esm({\n \"src/lib/responses/ConfigList.ts\"() {\n \"use strict\";\n init_utils();\n ConfigList = class {\n constructor() {\n this.files = [];\n this.values = /* @__PURE__ */ Object.create(null);\n }\n get all() {\n if (!this._all) {\n this._all = this.files.reduce((all, file) => {\n return Object.assign(all, this.values[file]);\n }, {});\n }\n return this._all;\n }\n addFile(file) {\n if (!(file in this.values)) {\n const latest = last(this.files);\n this.values[file] = latest ? Object.create(this.values[latest]) : {};\n this.files.push(file);\n }\n return this.values[file];\n }\n addValue(file, key, value) {\n const values = this.addFile(file);\n if (!Object.hasOwn(values, key)) {\n values[key] = value;\n } else if (Array.isArray(values[key])) {\n values[key].push(value);\n } else {\n values[key] = [values[key], value];\n }\n this._all = void 0;\n }\n };\n }\n});\n\n// src/lib/tasks/config.ts\nfunction asConfigScope(scope, fallback) {\n if (typeof scope === \"string\" && Object.hasOwn(GitConfigScope, scope)) {\n return scope;\n }\n return fallback;\n}\nfunction addConfigTask(key, value, append2, scope) {\n const commands = [\"config\", `--${scope}`];\n if (append2) {\n commands.push(\"--add\");\n }\n commands.push(key, value);\n return {\n commands,\n format: \"utf-8\",\n parser(text) {\n return text;\n }\n };\n}\nfunction getConfigTask(key, scope) {\n const commands = [\"config\", \"--null\", \"--show-origin\", \"--get-all\", key];\n if (scope) {\n commands.splice(1, 0, `--${scope}`);\n }\n return {\n commands,\n format: \"utf-8\",\n parser(text) {\n return configGetParser(text, key);\n }\n };\n}\nfunction listConfigTask(scope) {\n const commands = [\"config\", \"--list\", \"--show-origin\", \"--null\"];\n if (scope) {\n commands.push(`--${scope}`);\n }\n return {\n commands,\n format: \"utf-8\",\n parser(text) {\n return configListParser(text);\n }\n };\n}\nfunction config_default() {\n return {\n addConfig(key, value, ...rest) {\n return this._runTask(\n addConfigTask(\n key,\n value,\n rest[0] === true,\n asConfigScope(rest[1], \"local\" /* local */)\n ),\n trailingFunctionArgument(arguments)\n );\n },\n getConfig(key, scope) {\n return this._runTask(\n getConfigTask(key, asConfigScope(scope, void 0)),\n trailingFunctionArgument(arguments)\n );\n },\n listConfig(...rest) {\n return this._runTask(\n listConfigTask(asConfigScope(rest[0], void 0)),\n trailingFunctionArgument(arguments)\n );\n }\n };\n}\nvar GitConfigScope;\nvar init_config = __esm({\n \"src/lib/tasks/config.ts\"() {\n \"use strict\";\n init_ConfigList();\n init_utils();\n GitConfigScope = /* @__PURE__ */ ((GitConfigScope2) => {\n GitConfigScope2[\"system\"] = \"system\";\n GitConfigScope2[\"global\"] = \"global\";\n GitConfigScope2[\"local\"] = \"local\";\n GitConfigScope2[\"worktree\"] = \"worktree\";\n return GitConfigScope2;\n })(GitConfigScope || {});\n }\n});\n\n// src/lib/tasks/diff-name-status.ts\nfunction isDiffNameStatus(input) {\n return diffNameStatus.has(input);\n}\nvar DiffNameStatus, diffNameStatus;\nvar init_diff_name_status = __esm({\n \"src/lib/tasks/diff-name-status.ts\"() {\n \"use strict\";\n DiffNameStatus = /* @__PURE__ */ ((DiffNameStatus2) => {\n DiffNameStatus2[\"ADDED\"] = \"A\";\n DiffNameStatus2[\"COPIED\"] = \"C\";\n DiffNameStatus2[\"DELETED\"] = \"D\";\n DiffNameStatus2[\"MODIFIED\"] = \"M\";\n DiffNameStatus2[\"RENAMED\"] = \"R\";\n DiffNameStatus2[\"CHANGED\"] = \"T\";\n DiffNameStatus2[\"UNMERGED\"] = \"U\";\n DiffNameStatus2[\"UNKNOWN\"] = \"X\";\n DiffNameStatus2[\"BROKEN\"] = \"B\";\n return DiffNameStatus2;\n })(DiffNameStatus || {});\n diffNameStatus = new Set(Object.values(DiffNameStatus));\n }\n});\n\n// src/lib/tasks/grep.ts\nfunction grepQueryBuilder(...params) {\n return new GrepQuery().param(...params);\n}\nfunction parseGrep(grep) {\n const paths = /* @__PURE__ */ new Set();\n const results = {};\n forEachLineWithContent(grep, (input) => {\n const [path, line, preview] = input.split(NULL);\n paths.add(path);\n (results[path] = results[path] || []).push({\n line: asNumber(line),\n path,\n preview\n });\n });\n return {\n paths,\n results\n };\n}\nfunction grep_default() {\n return {\n grep(searchTerm) {\n const then = trailingFunctionArgument(arguments);\n const options = getTrailingOptions(arguments);\n for (const option of disallowedOptions) {\n if (options.includes(option)) {\n return this._runTask(\n configurationErrorTask(`git.grep: use of \"${option}\" is not supported.`),\n then\n );\n }\n }\n if (typeof searchTerm === \"string\") {\n searchTerm = grepQueryBuilder().param(searchTerm);\n }\n const commands = [\"grep\", \"--null\", \"-n\", \"--full-name\", ...options, ...searchTerm];\n return this._runTask(\n {\n commands,\n format: \"utf-8\",\n parser(stdOut) {\n return parseGrep(stdOut);\n }\n },\n then\n );\n }\n };\n}\nvar disallowedOptions, Query, _a, GrepQuery;\nvar init_grep = __esm({\n \"src/lib/tasks/grep.ts\"() {\n \"use strict\";\n init_utils();\n init_task();\n disallowedOptions = [\"-h\"];\n Query = Symbol(\"grepQuery\");\n GrepQuery = class {\n constructor() {\n this[_a] = [];\n }\n *[(_a = Query, Symbol.iterator)]() {\n for (const query of this[Query]) {\n yield query;\n }\n }\n and(...and) {\n and.length && this[Query].push(\"--and\", \"(\", ...prefixedArray(and, \"-e\"), \")\");\n return this;\n }\n param(...param) {\n this[Query].push(...prefixedArray(param, \"-e\"));\n return this;\n }\n };\n }\n});\n\n// src/lib/tasks/reset.ts\nvar reset_exports = {};\n__export(reset_exports, {\n ResetMode: () => ResetMode,\n getResetMode: () => getResetMode,\n resetTask: () => resetTask\n});\nfunction resetTask(mode, customArgs) {\n const commands = [\"reset\"];\n if (isValidResetMode(mode)) {\n commands.push(`--${mode}`);\n }\n commands.push(...customArgs);\n return straightThroughStringTask(commands);\n}\nfunction getResetMode(mode) {\n if (isValidResetMode(mode)) {\n return mode;\n }\n switch (typeof mode) {\n case \"string\":\n case \"undefined\":\n return \"soft\" /* SOFT */;\n }\n return;\n}\nfunction isValidResetMode(mode) {\n return typeof mode === \"string\" && validResetModes.includes(mode);\n}\nvar ResetMode, validResetModes;\nvar init_reset = __esm({\n \"src/lib/tasks/reset.ts\"() {\n \"use strict\";\n init_utils();\n init_task();\n ResetMode = /* @__PURE__ */ ((ResetMode2) => {\n ResetMode2[\"MIXED\"] = \"mixed\";\n ResetMode2[\"SOFT\"] = \"soft\";\n ResetMode2[\"HARD\"] = \"hard\";\n ResetMode2[\"MERGE\"] = \"merge\";\n ResetMode2[\"KEEP\"] = \"keep\";\n return ResetMode2;\n })(ResetMode || {});\n validResetModes = asStringArray(Object.values(ResetMode));\n }\n});\n\n// src/lib/git-logger.ts\nimport debug from \"debug\";\nfunction createLog() {\n return debug(\"simple-git\");\n}\nfunction prefixedLogger(to, prefix, forward) {\n if (!prefix || !String(prefix).replace(/\\s*/, \"\")) {\n return !forward ? to : (message, ...args) => {\n to(message, ...args);\n forward(message, ...args);\n };\n }\n return (message, ...args) => {\n to(`%s ${message}`, prefix, ...args);\n if (forward) {\n forward(message, ...args);\n }\n };\n}\nfunction childLoggerName(name, childDebugger, { namespace: parentNamespace }) {\n if (typeof name === \"string\") {\n return name;\n }\n const childNamespace = childDebugger && childDebugger.namespace || \"\";\n if (childNamespace.startsWith(parentNamespace)) {\n return childNamespace.substr(parentNamespace.length + 1);\n }\n return childNamespace || parentNamespace;\n}\nfunction createLogger(label, verbose, initialStep, infoDebugger = createLog()) {\n const labelPrefix = label && `[${label}]` || \"\";\n const spawned = [];\n const debugDebugger = typeof verbose === \"string\" ? infoDebugger.extend(verbose) : verbose;\n const key = childLoggerName(filterType(verbose, filterString), debugDebugger, infoDebugger);\n return step(initialStep);\n function sibling(name, initial) {\n return append(\n spawned,\n createLogger(label, key.replace(/^[^:]+/, name), initial, infoDebugger)\n );\n }\n function step(phase) {\n const stepPrefix = phase && `[${phase}]` || \"\";\n const debug2 = debugDebugger && prefixedLogger(debugDebugger, stepPrefix) || NOOP;\n const info = prefixedLogger(infoDebugger, `${labelPrefix} ${stepPrefix}`, debug2);\n return Object.assign(debugDebugger ? debug2 : info, {\n label,\n sibling,\n info,\n step\n });\n }\n}\nvar init_git_logger = __esm({\n \"src/lib/git-logger.ts\"() {\n \"use strict\";\n init_utils();\n debug.formatters.L = (value) => String(filterHasLength(value) ? value.length : \"-\");\n debug.formatters.B = (value) => {\n if (Buffer.isBuffer(value)) {\n return value.toString(\"utf8\");\n }\n return objectToString(value);\n };\n }\n});\n\n// src/lib/runners/tasks-pending-queue.ts\nvar TasksPendingQueue;\nvar init_tasks_pending_queue = __esm({\n \"src/lib/runners/tasks-pending-queue.ts\"() {\n \"use strict\";\n init_git_error();\n init_git_logger();\n TasksPendingQueue = class _TasksPendingQueue {\n constructor(logLabel = \"GitExecutor\") {\n this.logLabel = logLabel;\n this._queue = /* @__PURE__ */ new Map();\n }\n withProgress(task) {\n return this._queue.get(task);\n }\n createProgress(task) {\n const name = _TasksPendingQueue.getName(task.commands[0]);\n const logger = createLogger(this.logLabel, name);\n return {\n task,\n logger,\n name\n };\n }\n push(task) {\n const progress = this.createProgress(task);\n progress.logger(\"Adding task to the queue, commands = %o\", task.commands);\n this._queue.set(task, progress);\n return progress;\n }\n fatal(err) {\n for (const [task, { logger }] of Array.from(this._queue.entries())) {\n if (task === err.task) {\n logger.info(`Failed %o`, err);\n logger(\n `Fatal exception, any as-yet un-started tasks run through this executor will not be attempted`\n );\n } else {\n logger.info(\n `A fatal exception occurred in a previous task, the queue has been purged: %o`,\n err.message\n );\n }\n this.complete(task);\n }\n if (this._queue.size !== 0) {\n throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`);\n }\n }\n complete(task) {\n const progress = this.withProgress(task);\n if (progress) {\n this._queue.delete(task);\n }\n }\n attempt(task) {\n const progress = this.withProgress(task);\n if (!progress) {\n throw new GitError(void 0, \"TasksPendingQueue: attempt called for an unknown task\");\n }\n progress.logger(\"Starting task\");\n return progress;\n }\n static getName(name = \"empty\") {\n return `task:${name}:${++_TasksPendingQueue.counter}`;\n }\n static {\n this.counter = 0;\n }\n };\n }\n});\n\n// src/lib/runners/git-executor-chain.ts\nimport { spawn } from \"child_process\";\nfunction pluginContext(task, commands) {\n return {\n method: first(task.commands) || \"\",\n commands\n };\n}\nfunction onErrorReceived(target, logger) {\n return (err) => {\n logger(`[ERROR] child process exception %o`, err);\n target.push(Buffer.from(String(err.stack), \"ascii\"));\n };\n}\nfunction onDataReceived(target, name, logger, output) {\n return (buffer) => {\n logger(`%s received %L bytes`, name, buffer);\n output(`%B`, buffer);\n target.push(buffer);\n };\n}\nvar GitExecutorChain;\nvar init_git_executor_chain = __esm({\n \"src/lib/runners/git-executor-chain.ts\"() {\n \"use strict\";\n init_git_error();\n init_task();\n init_utils();\n init_tasks_pending_queue();\n GitExecutorChain = class {\n constructor(_executor, _scheduler, _plugins) {\n this._executor = _executor;\n this._scheduler = _scheduler;\n this._plugins = _plugins;\n this._chain = Promise.resolve();\n this._queue = new TasksPendingQueue();\n }\n get cwd() {\n return this._cwd || this._executor.cwd;\n }\n set cwd(cwd) {\n this._cwd = cwd;\n }\n get env() {\n return this._executor.env;\n }\n get outputHandler() {\n return this._executor.outputHandler;\n }\n chain() {\n return this;\n }\n push(task) {\n this._queue.push(task);\n return this._chain = this._chain.then(() => this.attemptTask(task));\n }\n async attemptTask(task) {\n const onScheduleComplete = await this._scheduler.next();\n const onQueueComplete = () => this._queue.complete(task);\n try {\n const { logger } = this._queue.attempt(task);\n return await (isEmptyTask(task) ? this.attemptEmptyTask(task, logger) : this.attemptRemoteTask(task, logger));\n } catch (e) {\n throw this.onFatalException(task, e);\n } finally {\n onQueueComplete();\n onScheduleComplete();\n }\n }\n onFatalException(task, e) {\n const gitError = e instanceof GitError ? Object.assign(e, { task }) : new GitError(task, e && String(e));\n this._chain = Promise.resolve();\n this._queue.fatal(gitError);\n return gitError;\n }\n async attemptRemoteTask(task, logger) {\n const binary = this._plugins.exec(\"spawn.binary\", \"\", pluginContext(task, task.commands));\n const args = this._plugins.exec(\n \"spawn.args\",\n [...task.commands],\n pluginContext(task, task.commands)\n );\n const raw = await this.gitResponse(\n task,\n binary,\n args,\n this.outputHandler,\n logger.step(\"SPAWN\")\n );\n const outputStreams = await this.handleTaskData(task, args, raw, logger.step(\"HANDLE\"));\n logger(`passing response to task's parser as a %s`, task.format);\n if (isBufferTask(task)) {\n return callTaskParser(task.parser, outputStreams);\n }\n return callTaskParser(task.parser, outputStreams.asStrings());\n }\n async attemptEmptyTask(task, logger) {\n logger(`empty task bypassing child process to call to task's parser`);\n return task.parser(this);\n }\n handleTaskData(task, args, result, logger) {\n const { exitCode, rejection, stdOut, stdErr } = result;\n return new Promise((done, fail) => {\n logger(`Preparing to handle process response exitCode=%d stdOut=`, exitCode);\n const { error } = this._plugins.exec(\n \"task.error\",\n { error: rejection },\n {\n ...pluginContext(task, args),\n ...result\n }\n );\n if (error && task.onError) {\n logger.info(`exitCode=%s handling with custom error handler`);\n return task.onError(\n result,\n error,\n (newStdOut) => {\n logger.info(`custom error handler treated as success`);\n logger(`custom error returned a %s`, objectToString(newStdOut));\n done(\n new GitOutputStreams(\n Array.isArray(newStdOut) ? Buffer.concat(newStdOut) : newStdOut,\n Buffer.concat(stdErr)\n )\n );\n },\n fail\n );\n }\n if (error) {\n logger.info(\n `handling as error: exitCode=%s stdErr=%s rejection=%o`,\n exitCode,\n stdErr.length,\n rejection\n );\n return fail(error);\n }\n logger.info(`retrieving task output complete`);\n done(new GitOutputStreams(Buffer.concat(stdOut), Buffer.concat(stdErr)));\n });\n }\n async gitResponse(task, command, args, outputHandler, logger) {\n const outputLogger = logger.sibling(\"output\");\n const spawnOptions = this._plugins.exec(\n \"spawn.options\",\n {\n cwd: this.cwd,\n env: this.env,\n windowsHide: true\n },\n pluginContext(task, task.commands)\n );\n return new Promise((done) => {\n const stdOut = [];\n const stdErr = [];\n logger.info(`%s %o`, command, args);\n logger(\"%O\", spawnOptions);\n let rejection = this._beforeSpawn(task, args);\n if (rejection) {\n return done({\n stdOut,\n stdErr,\n exitCode: 9901,\n rejection\n });\n }\n this._plugins.exec(\"spawn.before\", void 0, {\n ...pluginContext(task, args),\n kill(reason) {\n rejection = reason || rejection;\n }\n });\n const spawned = spawn(command, args, spawnOptions);\n spawned.stdout.on(\n \"data\",\n onDataReceived(stdOut, \"stdOut\", logger, outputLogger.step(\"stdOut\"))\n );\n spawned.stderr.on(\n \"data\",\n onDataReceived(stdErr, \"stdErr\", logger, outputLogger.step(\"stdErr\"))\n );\n spawned.on(\"error\", onErrorReceived(stdErr, logger));\n if (outputHandler) {\n logger(`Passing child process stdOut/stdErr to custom outputHandler`);\n outputHandler(command, spawned.stdout, spawned.stderr, [...args]);\n }\n this._plugins.exec(\"spawn.after\", void 0, {\n ...pluginContext(task, args),\n spawned,\n close(exitCode, reason) {\n done({\n stdOut,\n stdErr,\n exitCode,\n rejection: rejection || reason\n });\n },\n kill(reason) {\n if (spawned.killed) {\n return;\n }\n rejection = reason;\n spawned.kill(\"SIGINT\");\n }\n });\n });\n }\n _beforeSpawn(task, args) {\n let rejection;\n this._plugins.exec(\"spawn.before\", void 0, {\n ...pluginContext(task, args),\n kill(reason) {\n rejection = reason || rejection;\n }\n });\n return rejection;\n }\n };\n }\n});\n\n// src/lib/runners/git-executor.ts\nvar git_executor_exports = {};\n__export(git_executor_exports, {\n GitExecutor: () => GitExecutor\n});\nvar GitExecutor;\nvar init_git_executor = __esm({\n \"src/lib/runners/git-executor.ts\"() {\n \"use strict\";\n init_git_executor_chain();\n GitExecutor = class {\n constructor(cwd, _scheduler, _plugins) {\n this.cwd = cwd;\n this._scheduler = _scheduler;\n this._plugins = _plugins;\n this._chain = new GitExecutorChain(this, this._scheduler, this._plugins);\n }\n chain() {\n return new GitExecutorChain(this, this._scheduler, this._plugins);\n }\n push(task) {\n return this._chain.push(task);\n }\n };\n }\n});\n\n// src/lib/task-callback.ts\nfunction taskCallback(task, response, callback = NOOP) {\n const onSuccess = (data) => {\n callback(null, data);\n };\n const onError2 = (err) => {\n if (err?.task === task) {\n callback(\n err instanceof GitResponseError ? addDeprecationNoticeToError(err) : err,\n void 0\n );\n }\n };\n response.then(onSuccess, onError2);\n}\nfunction addDeprecationNoticeToError(err) {\n let log = (name) => {\n console.warn(\n `simple-git deprecation notice: accessing GitResponseError.${name} should be GitResponseError.git.${name}, this will no longer be available in version 3`\n );\n log = NOOP;\n };\n return Object.create(err, Object.getOwnPropertyNames(err.git).reduce(descriptorReducer, {}));\n function descriptorReducer(all, name) {\n if (name in err) {\n return all;\n }\n all[name] = {\n enumerable: false,\n configurable: false,\n get() {\n log(name);\n return err.git[name];\n }\n };\n return all;\n }\n}\nvar init_task_callback = __esm({\n \"src/lib/task-callback.ts\"() {\n \"use strict\";\n init_git_response_error();\n init_utils();\n }\n});\n\n// src/lib/tasks/change-working-directory.ts\nfunction changeWorkingDirectoryTask(directory, root) {\n return adhocExecTask((instance) => {\n if (!folderExists(directory)) {\n throw new Error(`Git.cwd: cannot change to non-directory \"${directory}\"`);\n }\n return (root || instance).cwd = directory;\n });\n}\nvar init_change_working_directory = __esm({\n \"src/lib/tasks/change-working-directory.ts\"() {\n \"use strict\";\n init_utils();\n init_task();\n }\n});\n\n// src/lib/tasks/checkout.ts\nfunction checkoutTask(args) {\n const commands = [\"checkout\", ...args];\n if (commands[1] === \"-b\" && commands.includes(\"-B\")) {\n commands[1] = remove(commands, \"-B\");\n }\n return straightThroughStringTask(commands);\n}\nfunction checkout_default() {\n return {\n checkout() {\n return this._runTask(\n checkoutTask(getTrailingOptions(arguments, 1)),\n trailingFunctionArgument(arguments)\n );\n },\n checkoutBranch(branchName, startPoint) {\n return this._runTask(\n checkoutTask([\"-b\", branchName, startPoint, ...getTrailingOptions(arguments)]),\n trailingFunctionArgument(arguments)\n );\n },\n checkoutLocalBranch(branchName) {\n return this._runTask(\n checkoutTask([\"-b\", branchName, ...getTrailingOptions(arguments)]),\n trailingFunctionArgument(arguments)\n );\n }\n };\n}\nvar init_checkout = __esm({\n \"src/lib/tasks/checkout.ts\"() {\n \"use strict\";\n init_utils();\n init_task();\n }\n});\n\n// src/lib/tasks/count-objects.ts\nfunction countObjectsResponse() {\n return {\n count: 0,\n garbage: 0,\n inPack: 0,\n packs: 0,\n prunePackable: 0,\n size: 0,\n sizeGarbage: 0,\n sizePack: 0\n };\n}\nfunction count_objects_default() {\n return {\n countObjects() {\n return this._runTask({\n commands: [\"count-objects\", \"--verbose\"],\n format: \"utf-8\",\n parser(stdOut) {\n return parseStringResponse(countObjectsResponse(), [parser2], stdOut);\n }\n });\n }\n };\n}\nvar parser2;\nvar init_count_objects = __esm({\n \"src/lib/tasks/count-objects.ts\"() {\n \"use strict\";\n init_utils();\n parser2 = new LineParser(\n /([a-z-]+): (\\d+)$/,\n (result, [key, value]) => {\n const property = asCamelCase(key);\n if (Object.hasOwn(result, property)) {\n result[property] = asNumber(value);\n }\n }\n );\n }\n});\n\n// src/lib/parsers/parse-commit.ts\nfunction parseCommitResult(stdOut) {\n const result = {\n author: null,\n branch: \"\",\n commit: \"\",\n root: false,\n summary: {\n changes: 0,\n insertions: 0,\n deletions: 0\n }\n };\n return parseStringResponse(result, parsers, stdOut);\n}\nvar parsers;\nvar init_parse_commit = __esm({\n \"src/lib/parsers/parse-commit.ts\"() {\n \"use strict\";\n init_utils();\n parsers = [\n new LineParser(/^\\[([^\\s]+)( \\([^)]+\\))? ([^\\]]+)/, (result, [branch, root, commit]) => {\n result.branch = branch;\n result.commit = commit;\n result.root = !!root;\n }),\n new LineParser(/\\s*Author:\\s(.+)/i, (result, [author]) => {\n const parts = author.split(\"<\");\n const email = parts.pop();\n if (!email || !email.includes(\"@\")) {\n return;\n }\n result.author = {\n email: email.substr(0, email.length - 1),\n name: parts.join(\"<\").trim()\n };\n }),\n new LineParser(\n /(\\d+)[^,]*(?:,\\s*(\\d+)[^,]*)(?:,\\s*(\\d+))/g,\n (result, [changes, insertions, deletions]) => {\n result.summary.changes = parseInt(changes, 10) || 0;\n result.summary.insertions = parseInt(insertions, 10) || 0;\n result.summary.deletions = parseInt(deletions, 10) || 0;\n }\n ),\n new LineParser(\n /^(\\d+)[^,]*(?:,\\s*(\\d+)[^(]+\\(([+-]))?/,\n (result, [changes, lines, direction]) => {\n result.summary.changes = parseInt(changes, 10) || 0;\n const count = parseInt(lines, 10) || 0;\n if (direction === \"-\") {\n result.summary.deletions = count;\n } else if (direction === \"+\") {\n result.summary.insertions = count;\n }\n }\n )\n ];\n }\n});\n\n// src/lib/tasks/commit.ts\nfunction commitTask(message, files, customArgs) {\n const commands = [\n \"-c\",\n \"core.abbrev=40\",\n \"commit\",\n ...prefixedArray(message, \"-m\"),\n ...files,\n ...customArgs\n ];\n return {\n commands,\n format: \"utf-8\",\n parser: parseCommitResult\n };\n}\nfunction commit_default() {\n return {\n commit(message, ...rest) {\n const next = trailingFunctionArgument(arguments);\n const task = rejectDeprecatedSignatures(message) || commitTask(\n asArray(message),\n asArray(filterType(rest[0], filterStringOrStringArray, [])),\n [\n ...asStringArray(filterType(rest[1], filterArray, [])),\n ...getTrailingOptions(arguments, 0, true)\n ]\n );\n return this._runTask(task, next);\n }\n };\n function rejectDeprecatedSignatures(message) {\n return !filterStringOrStringArray(message) && configurationErrorTask(\n `git.commit: requires the commit message to be supplied as a string/string[]`\n );\n }\n}\nvar init_commit = __esm({\n \"src/lib/tasks/commit.ts\"() {\n \"use strict\";\n init_parse_commit();\n init_utils();\n init_task();\n }\n});\n\n// src/lib/tasks/first-commit.ts\nfunction first_commit_default() {\n return {\n firstCommit() {\n return this._runTask(\n straightThroughStringTask([\"rev-list\", \"--max-parents=0\", \"HEAD\"], true),\n trailingFunctionArgument(arguments)\n );\n }\n };\n}\nvar init_first_commit = __esm({\n \"src/lib/tasks/first-commit.ts\"() {\n \"use strict\";\n init_utils();\n init_task();\n }\n});\n\n// src/lib/tasks/hash-object.ts\nfunction hashObjectTask(filePath, write) {\n const commands = [\"hash-object\", filePath];\n if (write) {\n commands.push(\"-w\");\n }\n return straightThroughStringTask(commands, true);\n}\nvar init_hash_object = __esm({\n \"src/lib/tasks/hash-object.ts\"() {\n \"use strict\";\n init_task();\n }\n});\n\n// src/lib/responses/InitSummary.ts\nfunction parseInit(bare, path, text) {\n const response = String(text).trim();\n let result;\n if (result = initResponseRegex.exec(response)) {\n return new InitSummary(bare, path, false, result[1]);\n }\n if (result = reInitResponseRegex.exec(response)) {\n return new InitSummary(bare, path, true, result[1]);\n }\n let gitDir = \"\";\n const tokens = response.split(\" \");\n while (tokens.length) {\n const token = tokens.shift();\n if (token === \"in\") {\n gitDir = tokens.join(\" \");\n break;\n }\n }\n return new InitSummary(bare, path, /^re/i.test(response), gitDir);\n}\nvar InitSummary, initResponseRegex, reInitResponseRegex;\nvar init_InitSummary = __esm({\n \"src/lib/responses/InitSummary.ts\"() {\n \"use strict\";\n InitSummary = class {\n constructor(bare, path, existing, gitDir) {\n this.bare = bare;\n this.path = path;\n this.existing = existing;\n this.gitDir = gitDir;\n }\n };\n initResponseRegex = /^Init.+ repository in (.+)$/;\n reInitResponseRegex = /^Rein.+ in (.+)$/;\n }\n});\n\n// src/lib/tasks/init.ts\nfunction hasBareCommand(command) {\n return command.includes(bareCommand);\n}\nfunction initTask(bare = false, path, customArgs) {\n const commands = [\"init\", ...customArgs];\n if (bare && !hasBareCommand(commands)) {\n commands.splice(1, 0, bareCommand);\n }\n return {\n commands,\n format: \"utf-8\",\n parser(text) {\n return parseInit(commands.includes(\"--bare\"), path, text);\n }\n };\n}\nvar bareCommand;\nvar init_init = __esm({\n \"src/lib/tasks/init.ts\"() {\n \"use strict\";\n init_InitSummary();\n bareCommand = \"--bare\";\n }\n});\n\n// src/lib/args/log-format.ts\nfunction logFormatFromCommand(customArgs) {\n for (let i = 0; i < customArgs.length; i++) {\n const format = logFormatRegex.exec(customArgs[i]);\n if (format) {\n return `--${format[1]}`;\n }\n }\n return \"\" /* NONE */;\n}\nfunction isLogFormat(customArg) {\n return logFormatRegex.test(customArg);\n}\nvar logFormatRegex;\nvar init_log_format = __esm({\n \"src/lib/args/log-format.ts\"() {\n \"use strict\";\n logFormatRegex = /^--(stat|numstat|name-only|name-status)(=|$)/;\n }\n});\n\n// src/lib/responses/DiffSummary.ts\nvar DiffSummary;\nvar init_DiffSummary = __esm({\n \"src/lib/responses/DiffSummary.ts\"() {\n \"use strict\";\n DiffSummary = class {\n constructor() {\n this.changed = 0;\n this.deletions = 0;\n this.insertions = 0;\n this.files = [];\n }\n };\n }\n});\n\n// src/lib/parsers/parse-diff-summary.ts\nfunction getDiffParser(format = \"\" /* NONE */) {\n const parser4 = diffSummaryParsers[format];\n return (stdOut) => parseStringResponse(new DiffSummary(), parser4, stdOut, false);\n}\nvar statParser, numStatParser, nameOnlyParser, nameStatusParser, diffSummaryParsers;\nvar init_parse_diff_summary = __esm({\n \"src/lib/parsers/parse-diff-summary.ts\"() {\n \"use strict\";\n init_log_format();\n init_DiffSummary();\n init_diff_name_status();\n init_utils();\n statParser = [\n new LineParser(\n /^(.+)\\s+\\|\\s+(\\d+)(\\s+[+\\-]+)?$/,\n (result, [file, changes, alterations = \"\"]) => {\n result.files.push({\n file: file.trim(),\n changes: asNumber(changes),\n insertions: alterations.replace(/[^+]/g, \"\").length,\n deletions: alterations.replace(/[^-]/g, \"\").length,\n binary: false\n });\n }\n ),\n new LineParser(\n /^(.+) \\|\\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,\n (result, [file, before, after]) => {\n result.files.push({\n file: file.trim(),\n before: asNumber(before),\n after: asNumber(after),\n binary: true\n });\n }\n ),\n new LineParser(\n /(\\d+) files? changed\\s*((?:, \\d+ [^,]+){0,2})/,\n (result, [changed, summary]) => {\n const inserted = /(\\d+) i/.exec(summary);\n const deleted = /(\\d+) d/.exec(summary);\n result.changed = asNumber(changed);\n result.insertions = asNumber(inserted?.[1]);\n result.deletions = asNumber(deleted?.[1]);\n }\n )\n ];\n numStatParser = [\n new LineParser(\n /(\\d+)\\t(\\d+)\\t(.+)$/,\n (result, [changesInsert, changesDelete, file]) => {\n const insertions = asNumber(changesInsert);\n const deletions = asNumber(changesDelete);\n result.changed++;\n result.insertions += insertions;\n result.deletions += deletions;\n result.files.push({\n file,\n changes: insertions + deletions,\n insertions,\n deletions,\n binary: false\n });\n }\n ),\n new LineParser(/-\\t-\\t(.+)$/, (result, [file]) => {\n result.changed++;\n result.files.push({\n file,\n after: 0,\n before: 0,\n binary: true\n });\n })\n ];\n nameOnlyParser = [\n new LineParser(/(.+)$/, (result, [file]) => {\n result.changed++;\n result.files.push({\n file,\n changes: 0,\n insertions: 0,\n deletions: 0,\n binary: false\n });\n })\n ];\n nameStatusParser = [\n new LineParser(\n /([ACDMRTUXB])([0-9]{0,3})\\t(.[^\\t]*)(\\t(.[^\\t]*))?$/,\n (result, [status, similarity, from, _to, to]) => {\n result.changed++;\n result.files.push({\n file: to ?? from,\n changes: 0,\n insertions: 0,\n deletions: 0,\n binary: false,\n status: orVoid(isDiffNameStatus(status) && status),\n from: orVoid(!!to && from !== to && from),\n similarity: asNumber(similarity)\n });\n }\n )\n ];\n diffSummaryParsers = {\n [\"\" /* NONE */]: statParser,\n [\"--stat\" /* STAT */]: statParser,\n [\"--numstat\" /* NUM_STAT */]: numStatParser,\n [\"--name-status\" /* NAME_STATUS */]: nameStatusParser,\n [\"--name-only\" /* NAME_ONLY */]: nameOnlyParser\n };\n }\n});\n\n// src/lib/parsers/parse-list-log-summary.ts\nfunction lineBuilder(tokens, fields) {\n return fields.reduce(\n (line, field, index) => {\n line[field] = tokens[index] || \"\";\n return line;\n },\n /* @__PURE__ */ Object.create({ diff: null })\n );\n}\nfunction createListLogSummaryParser(splitter = SPLITTER, fields = defaultFieldNames, logFormat = \"\" /* NONE */) {\n const parseDiffResult = getDiffParser(logFormat);\n return function(stdOut) {\n const all = toLinesWithContent(\n stdOut.trim(),\n false,\n START_BOUNDARY\n ).map(function(item) {\n const lineDetail = item.split(COMMIT_BOUNDARY);\n const listLogLine = lineBuilder(lineDetail[0].split(splitter), fields);\n if (lineDetail.length > 1 && !!lineDetail[1].trim()) {\n listLogLine.diff = parseDiffResult(lineDetail[1]);\n }\n return listLogLine;\n });\n return {\n all,\n latest: all.length && all[0] || null,\n total: all.length\n };\n };\n}\nvar START_BOUNDARY, COMMIT_BOUNDARY, SPLITTER, defaultFieldNames;\nvar init_parse_list_log_summary = __esm({\n \"src/lib/parsers/parse-list-log-summary.ts\"() {\n \"use strict\";\n init_utils();\n init_parse_diff_summary();\n init_log_format();\n START_BOUNDARY = \"\\xF2\\xF2\\xF2\\xF2\\xF2\\xF2 \";\n COMMIT_BOUNDARY = \" \\xF2\\xF2\";\n SPLITTER = \" \\xF2 \";\n defaultFieldNames = [\"hash\", \"date\", \"message\", \"refs\", \"author_name\", \"author_email\"];\n }\n});\n\n// src/lib/tasks/diff.ts\nvar diff_exports = {};\n__export(diff_exports, {\n diffSummaryTask: () => diffSummaryTask,\n validateLogFormatConfig: () => validateLogFormatConfig\n});\nfunction diffSummaryTask(customArgs) {\n let logFormat = logFormatFromCommand(customArgs);\n const commands = [\"diff\"];\n if (logFormat === \"\" /* NONE */) {\n logFormat = \"--stat\" /* STAT */;\n commands.push(\"--stat=4096\");\n }\n commands.push(...customArgs);\n return validateLogFormatConfig(commands) || {\n commands,\n format: \"utf-8\",\n parser: getDiffParser(logFormat)\n };\n}\nfunction validateLogFormatConfig(customArgs) {\n const flags = customArgs.filter(isLogFormat);\n if (flags.length > 1) {\n return configurationErrorTask(\n `Summary flags are mutually exclusive - pick one of ${flags.join(\",\")}`\n );\n }\n if (flags.length && customArgs.includes(\"-z\")) {\n return configurationErrorTask(\n `Summary flag ${flags} parsing is not compatible with null termination option '-z'`\n );\n }\n}\nvar init_diff = __esm({\n \"src/lib/tasks/diff.ts\"() {\n \"use strict\";\n init_log_format();\n init_parse_diff_summary();\n init_task();\n }\n});\n\n// src/lib/tasks/log.ts\nimport { pathspec as pathspec2 } from \"@simple-git/args-pathspec\";\nfunction prettyFormat(format, splitter) {\n const fields = [];\n const formatStr = [];\n Object.keys(format).forEach((field) => {\n fields.push(field);\n formatStr.push(String(format[field]));\n });\n return [fields, formatStr.join(splitter)];\n}\nfunction userOptions(input) {\n return Object.keys(input).reduce((out, key) => {\n if (!(key in excludeOptions)) {\n out[key] = input[key];\n }\n return out;\n }, {});\n}\nfunction parseLogOptions(opt = {}, customArgs = []) {\n const splitter = filterType(opt.splitter, filterString, SPLITTER);\n const format = filterPlainObject(opt.format) ? opt.format : {\n hash: \"%H\",\n date: opt.strictDate === false ? \"%ai\" : \"%aI\",\n message: \"%s\",\n refs: \"%D\",\n body: opt.multiLine ? \"%B\" : \"%b\",\n author_name: opt.mailMap !== false ? \"%aN\" : \"%an\",\n author_email: opt.mailMap !== false ? \"%aE\" : \"%ae\"\n };\n const [fields, formatStr] = prettyFormat(format, splitter);\n const suffix = [];\n const command = [\n `--pretty=format:${START_BOUNDARY}${formatStr}${COMMIT_BOUNDARY}`,\n ...customArgs\n ];\n const maxCount = opt.n || opt[\"max-count\"] || opt.maxCount;\n if (maxCount) {\n command.push(`--max-count=${maxCount}`);\n }\n if (opt.from || opt.to) {\n const rangeOperator = opt.symmetric !== false ? \"...\" : \"..\";\n suffix.push(`${opt.from || \"\"}${rangeOperator}${opt.to || \"\"}`);\n }\n if (filterString(opt.file)) {\n command.push(\"--follow\", pathspec2(opt.file));\n }\n appendTaskOptions(userOptions(opt), command);\n return {\n fields,\n splitter,\n commands: [...command, ...suffix]\n };\n}\nfunction logTask(splitter, fields, customArgs) {\n const parser4 = createListLogSummaryParser(splitter, fields, logFormatFromCommand(customArgs));\n return {\n commands: [\"log\", ...customArgs],\n format: \"utf-8\",\n parser: parser4\n };\n}\nfunction log_default() {\n return {\n log(...rest) {\n const next = trailingFunctionArgument(arguments);\n const options = parseLogOptions(\n trailingOptionsArgument(arguments),\n asStringArray(filterType(arguments[0], filterArray, []))\n );\n const task = rejectDeprecatedSignatures(...rest) || validateLogFormatConfig(options.commands) || createLogTask(options);\n return this._runTask(task, next);\n }\n };\n function createLogTask(options) {\n return logTask(options.splitter, options.fields, options.commands);\n }\n function rejectDeprecatedSignatures(from, to) {\n return filterString(from) && filterString(to) && configurationErrorTask(\n `git.log(string, string) should be replaced with git.log({ from: string, to: string })`\n );\n }\n}\nvar excludeOptions;\nvar init_log = __esm({\n \"src/lib/tasks/log.ts\"() {\n \"use strict\";\n init_log_format();\n init_parse_list_log_summary();\n init_utils();\n init_task();\n init_diff();\n excludeOptions = /* @__PURE__ */ ((excludeOptions2) => {\n excludeOptions2[excludeOptions2[\"--pretty\"] = 0] = \"--pretty\";\n excludeOptions2[excludeOptions2[\"max-count\"] = 1] = \"max-count\";\n excludeOptions2[excludeOptions2[\"maxCount\"] = 2] = \"maxCount\";\n excludeOptions2[excludeOptions2[\"n\"] = 3] = \"n\";\n excludeOptions2[excludeOptions2[\"file\"] = 4] = \"file\";\n excludeOptions2[excludeOptions2[\"format\"] = 5] = \"format\";\n excludeOptions2[excludeOptions2[\"from\"] = 6] = \"from\";\n excludeOptions2[excludeOptions2[\"to\"] = 7] = \"to\";\n excludeOptions2[excludeOptions2[\"splitter\"] = 8] = \"splitter\";\n excludeOptions2[excludeOptions2[\"symmetric\"] = 9] = \"symmetric\";\n excludeOptions2[excludeOptions2[\"mailMap\"] = 10] = \"mailMap\";\n excludeOptions2[excludeOptions2[\"multiLine\"] = 11] = \"multiLine\";\n excludeOptions2[excludeOptions2[\"strictDate\"] = 12] = \"strictDate\";\n return excludeOptions2;\n })(excludeOptions || {});\n }\n});\n\n// src/lib/responses/MergeSummary.ts\nvar MergeSummaryConflict, MergeSummaryDetail;\nvar init_MergeSummary = __esm({\n \"src/lib/responses/MergeSummary.ts\"() {\n \"use strict\";\n MergeSummaryConflict = class {\n constructor(reason, file = null, meta) {\n this.reason = reason;\n this.file = file;\n this.meta = meta;\n }\n toString() {\n return `${this.file}:${this.reason}`;\n }\n };\n MergeSummaryDetail = class {\n constructor() {\n this.conflicts = [];\n this.merges = [];\n this.result = \"success\";\n }\n get failed() {\n return this.conflicts.length > 0;\n }\n get reason() {\n return this.result;\n }\n toString() {\n if (this.conflicts.length) {\n return `CONFLICTS: ${this.conflicts.join(\", \")}`;\n }\n return \"OK\";\n }\n };\n }\n});\n\n// src/lib/responses/PullSummary.ts\nvar PullSummary, PullFailedSummary;\nvar init_PullSummary = __esm({\n \"src/lib/responses/PullSummary.ts\"() {\n \"use strict\";\n PullSummary = class {\n constructor() {\n this.remoteMessages = {\n all: []\n };\n this.created = [];\n this.deleted = [];\n this.files = [];\n this.deletions = {};\n this.insertions = {};\n this.summary = {\n changes: 0,\n deletions: 0,\n insertions: 0\n };\n }\n };\n PullFailedSummary = class {\n constructor() {\n this.remote = \"\";\n this.hash = {\n local: \"\",\n remote: \"\"\n };\n this.branch = {\n local: \"\",\n remote: \"\"\n };\n this.message = \"\";\n }\n toString() {\n return this.message;\n }\n };\n }\n});\n\n// src/lib/parsers/parse-remote-objects.ts\nfunction objectEnumerationResult(remoteMessages) {\n return remoteMessages.objects = remoteMessages.objects || {\n compressing: 0,\n counting: 0,\n enumerating: 0,\n packReused: 0,\n reused: { count: 0, delta: 0 },\n total: { count: 0, delta: 0 }\n };\n}\nfunction asObjectCount(source) {\n const count = /^\\s*(\\d+)/.exec(source);\n const delta = /delta (\\d+)/i.exec(source);\n return {\n count: asNumber(count && count[1] || \"0\"),\n delta: asNumber(delta && delta[1] || \"0\")\n };\n}\nvar remoteMessagesObjectParsers;\nvar init_parse_remote_objects = __esm({\n \"src/lib/parsers/parse-remote-objects.ts\"() {\n \"use strict\";\n init_utils();\n remoteMessagesObjectParsers = [\n new RemoteLineParser(\n /^remote:\\s*(enumerating|counting|compressing) objects: (\\d+),/i,\n (result, [action, count]) => {\n const key = action.toLowerCase();\n const enumeration = objectEnumerationResult(result.remoteMessages);\n Object.assign(enumeration, { [key]: asNumber(count) });\n }\n ),\n new RemoteLineParser(\n /^remote:\\s*(enumerating|counting|compressing) objects: \\d+% \\(\\d+\\/(\\d+)\\),/i,\n (result, [action, count]) => {\n const key = action.toLowerCase();\n const enumeration = objectEnumerationResult(result.remoteMessages);\n Object.assign(enumeration, { [key]: asNumber(count) });\n }\n ),\n new RemoteLineParser(\n /total ([^,]+), reused ([^,]+), pack-reused (\\d+)/i,\n (result, [total, reused, packReused]) => {\n const objects = objectEnumerationResult(result.remoteMessages);\n objects.total = asObjectCount(total);\n objects.reused = asObjectCount(reused);\n objects.packReused = asNumber(packReused);\n }\n )\n ];\n }\n});\n\n// src/lib/parsers/parse-remote-messages.ts\nfunction parseRemoteMessages(_stdOut, stdErr) {\n return parseStringResponse({ remoteMessages: new RemoteMessageSummary() }, parsers2, stdErr);\n}\nvar parsers2, RemoteMessageSummary;\nvar init_parse_remote_messages = __esm({\n \"src/lib/parsers/parse-remote-messages.ts\"() {\n \"use strict\";\n init_utils();\n init_parse_remote_objects();\n parsers2 = [\n new RemoteLineParser(/^remote:\\s*(.+)$/, (result, [text]) => {\n result.remoteMessages.all.push(text.trim());\n return false;\n }),\n ...remoteMessagesObjectParsers,\n new RemoteLineParser(\n [/create a (?:pull|merge) request/i, /\\s(https?:\\/\\/\\S+)$/],\n (result, [pullRequestUrl]) => {\n result.remoteMessages.pullRequestUrl = pullRequestUrl;\n }\n ),\n new RemoteLineParser(\n [/found (\\d+) vulnerabilities.+\\(([^)]+)\\)/i, /\\s(https?:\\/\\/\\S+)$/],\n (result, [count, summary, url]) => {\n result.remoteMessages.vulnerabilities = {\n count: asNumber(count),\n summary,\n url\n };\n }\n )\n ];\n RemoteMessageSummary = class {\n constructor() {\n this.all = [];\n }\n };\n }\n});\n\n// src/lib/parsers/parse-pull.ts\nfunction parsePullErrorResult(stdOut, stdErr) {\n const pullError = parseStringResponse(new PullFailedSummary(), errorParsers, [stdOut, stdErr]);\n return pullError.message && pullError;\n}\nvar FILE_UPDATE_REGEX, SUMMARY_REGEX, ACTION_REGEX, parsers3, errorParsers, parsePullDetail, parsePullResult;\nvar init_parse_pull = __esm({\n \"src/lib/parsers/parse-pull.ts\"() {\n \"use strict\";\n init_PullSummary();\n init_utils();\n init_parse_remote_messages();\n FILE_UPDATE_REGEX = /^\\s*(.+?)\\s+\\|\\s+\\d+\\s*(\\+*)(-*)/;\n SUMMARY_REGEX = /(\\d+)\\D+((\\d+)\\D+\\(\\+\\))?(\\D+(\\d+)\\D+\\(-\\))?/;\n ACTION_REGEX = /^(create|delete) mode \\d+ (.+)/;\n parsers3 = [\n new LineParser(FILE_UPDATE_REGEX, (result, [file, insertions, deletions]) => {\n result.files.push(file);\n if (insertions) {\n result.insertions[file] = insertions.length;\n }\n if (deletions) {\n result.deletions[file] = deletions.length;\n }\n }),\n new LineParser(SUMMARY_REGEX, (result, [changes, , insertions, , deletions]) => {\n if (insertions !== void 0 || deletions !== void 0) {\n result.summary.changes = +changes || 0;\n result.summary.insertions = +insertions || 0;\n result.summary.deletions = +deletions || 0;\n return true;\n }\n return false;\n }),\n new LineParser(ACTION_REGEX, (result, [action, file]) => {\n append(result.files, file);\n append(action === \"create\" ? result.created : result.deleted, file);\n })\n ];\n errorParsers = [\n new LineParser(/^from\\s(.+)$/i, (result, [remote]) => void (result.remote = remote)),\n new LineParser(/^fatal:\\s(.+)$/, (result, [message]) => void (result.message = message)),\n new LineParser(\n /([a-z0-9]+)\\.\\.([a-z0-9]+)\\s+(\\S+)\\s+->\\s+(\\S+)$/,\n (result, [hashLocal, hashRemote, branchLocal, branchRemote]) => {\n result.branch.local = branchLocal;\n result.hash.local = hashLocal;\n result.branch.remote = branchRemote;\n result.hash.remote = hashRemote;\n }\n )\n ];\n parsePullDetail = (stdOut, stdErr) => {\n return parseStringResponse(new PullSummary(), parsers3, [stdOut, stdErr]);\n };\n parsePullResult = (stdOut, stdErr) => {\n return Object.assign(\n new PullSummary(),\n parsePullDetail(stdOut, stdErr),\n parseRemoteMessages(stdOut, stdErr)\n );\n };\n }\n});\n\n// src/lib/parsers/parse-merge.ts\nvar parsers4, parseMergeResult, parseMergeDetail;\nvar init_parse_merge = __esm({\n \"src/lib/parsers/parse-merge.ts\"() {\n \"use strict\";\n init_MergeSummary();\n init_utils();\n init_parse_pull();\n parsers4 = [\n new LineParser(/^Auto-merging\\s+(.+)$/, (summary, [autoMerge]) => {\n summary.merges.push(autoMerge);\n }),\n new LineParser(/^CONFLICT\\s+\\((.+)\\): Merge conflict in (.+)$/, (summary, [reason, file]) => {\n summary.conflicts.push(new MergeSummaryConflict(reason, file));\n }),\n new LineParser(\n /^CONFLICT\\s+\\((.+\\/delete)\\): (.+) deleted in (.+) and/,\n (summary, [reason, file, deleteRef]) => {\n summary.conflicts.push(new MergeSummaryConflict(reason, file, { deleteRef }));\n }\n ),\n new LineParser(/^CONFLICT\\s+\\((.+)\\):/, (summary, [reason]) => {\n summary.conflicts.push(new MergeSummaryConflict(reason, null));\n }),\n new LineParser(/^Automatic merge failed;\\s+(.+)$/, (summary, [result]) => {\n summary.result = result;\n })\n ];\n parseMergeResult = (stdOut, stdErr) => {\n return Object.assign(parseMergeDetail(stdOut, stdErr), parsePullResult(stdOut, stdErr));\n };\n parseMergeDetail = (stdOut) => {\n return parseStringResponse(new MergeSummaryDetail(), parsers4, stdOut);\n };\n }\n});\n\n// src/lib/tasks/merge.ts\nfunction mergeTask(customArgs) {\n if (!customArgs.length) {\n return configurationErrorTask(\"Git.merge requires at least one option\");\n }\n return {\n commands: [\"merge\", ...customArgs],\n format: \"utf-8\",\n parser(stdOut, stdErr) {\n const merge = parseMergeResult(stdOut, stdErr);\n if (merge.failed) {\n throw new GitResponseError(merge);\n }\n return merge;\n }\n };\n}\nvar init_merge = __esm({\n \"src/lib/tasks/merge.ts\"() {\n \"use strict\";\n init_git_response_error();\n init_parse_merge();\n init_task();\n }\n});\n\n// src/lib/parsers/parse-push.ts\nfunction pushResultPushedItem(local, remote, status) {\n const deleted = status.includes(\"deleted\");\n const tag = status.includes(\"tag\") || /^refs\\/tags/.test(local);\n const alreadyUpdated = !status.includes(\"new\");\n return {\n deleted,\n tag,\n branch: !tag,\n new: !alreadyUpdated,\n alreadyUpdated,\n local,\n remote\n };\n}\nvar parsers5, parsePushResult, parsePushDetail;\nvar init_parse_push = __esm({\n \"src/lib/parsers/parse-push.ts\"() {\n \"use strict\";\n init_utils();\n init_parse_remote_messages();\n parsers5 = [\n new LineParser(/^Pushing to (.+)$/, (result, [repo]) => {\n result.repo = repo;\n }),\n new LineParser(/^updating local tracking ref '(.+)'/, (result, [local]) => {\n result.ref = {\n ...result.ref || {},\n local\n };\n }),\n new LineParser(/^[=*-]\\s+([^:]+):(\\S+)\\s+\\[(.+)]$/, (result, [local, remote, type]) => {\n result.pushed.push(pushResultPushedItem(local, remote, type));\n }),\n new LineParser(\n /^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,\n (result, [local, remote, remoteName]) => {\n result.branch = {\n ...result.branch || {},\n local,\n remote,\n remoteName\n };\n }\n ),\n new LineParser(\n /^([^:]+):(\\S+)\\s+([a-z0-9]+)\\.\\.([a-z0-9]+)$/,\n (result, [local, remote, from, to]) => {\n result.update = {\n head: {\n local,\n remote\n },\n hash: {\n from,\n to\n }\n };\n }\n )\n ];\n parsePushResult = (stdOut, stdErr) => {\n const pushDetail = parsePushDetail(stdOut, stdErr);\n const responseDetail = parseRemoteMessages(stdOut, stdErr);\n return {\n ...pushDetail,\n ...responseDetail\n };\n };\n parsePushDetail = (stdOut, stdErr) => {\n return parseStringResponse({ pushed: [] }, parsers5, [stdOut, stdErr]);\n };\n }\n});\n\n// src/lib/tasks/push.ts\nvar push_exports = {};\n__export(push_exports, {\n pushTagsTask: () => pushTagsTask,\n pushTask: () => pushTask\n});\nfunction pushTagsTask(ref = {}, customArgs) {\n append(customArgs, \"--tags\");\n return pushTask(ref, customArgs);\n}\nfunction pushTask(ref = {}, customArgs) {\n const commands = [\"push\", ...customArgs];\n if (ref.branch) {\n commands.splice(1, 0, ref.branch);\n }\n if (ref.remote) {\n commands.splice(1, 0, ref.remote);\n }\n remove(commands, \"-v\");\n append(commands, \"--verbose\");\n append(commands, \"--porcelain\");\n return {\n commands,\n format: \"utf-8\",\n parser: parsePushResult\n };\n}\nvar init_push = __esm({\n \"src/lib/tasks/push.ts\"() {\n \"use strict\";\n init_parse_push();\n init_utils();\n }\n});\n\n// src/lib/tasks/show.ts\nfunction show_default() {\n return {\n showBuffer() {\n const commands = [\"show\", ...getTrailingOptions(arguments, 1)];\n if (!commands.includes(\"--binary\")) {\n commands.splice(1, 0, \"--binary\");\n }\n return this._runTask(\n straightThroughBufferTask(commands),\n trailingFunctionArgument(arguments)\n );\n },\n show() {\n const commands = [\"show\", ...getTrailingOptions(arguments, 1)];\n return this._runTask(\n straightThroughStringTask(commands),\n trailingFunctionArgument(arguments)\n );\n }\n };\n}\nvar init_show = __esm({\n \"src/lib/tasks/show.ts\"() {\n \"use strict\";\n init_utils();\n init_task();\n }\n});\n\n// src/lib/responses/FileStatusSummary.ts\nvar fromPathRegex, FileStatusSummary;\nvar init_FileStatusSummary = __esm({\n \"src/lib/responses/FileStatusSummary.ts\"() {\n \"use strict\";\n fromPathRegex = /^(.+)\\0(.+)$/;\n FileStatusSummary = class {\n constructor(path, index, working_dir) {\n this.path = path;\n this.index = index;\n this.working_dir = working_dir;\n if (index === \"R\" || working_dir === \"R\") {\n const detail = fromPathRegex.exec(path) || [null, path, path];\n this.from = detail[2] || \"\";\n this.path = detail[1] || \"\";\n }\n }\n };\n }\n});\n\n// src/lib/responses/StatusSummary.ts\nfunction renamedFile(line) {\n const [to, from] = line.split(NULL);\n return {\n from: from || to,\n to\n };\n}\nfunction parser3(indexX, indexY, handler) {\n return [`${indexX}${indexY}`, handler];\n}\nfunction conflicts(indexX, ...indexY) {\n return indexY.map((y) => parser3(indexX, y, (result, file) => result.conflicted.push(file)));\n}\nfunction splitLine(result, lineStr) {\n const trimmed2 = lineStr.trim();\n switch (\" \") {\n case trimmed2.charAt(2):\n return data(trimmed2.charAt(0), trimmed2.charAt(1), trimmed2.slice(3));\n case trimmed2.charAt(1):\n return data(\" \" /* NONE */, trimmed2.charAt(0), trimmed2.slice(2));\n default:\n return;\n }\n function data(index, workingDir, path) {\n const raw = `${index}${workingDir}`;\n const handler = parsers6.get(raw);\n if (handler) {\n handler(result, path);\n }\n if (raw !== \"##\" && raw !== \"!!\") {\n result.files.push(new FileStatusSummary(path, index, workingDir));\n }\n }\n}\nvar StatusSummary, parsers6, parseStatusSummary;\nvar init_StatusSummary = __esm({\n \"src/lib/responses/StatusSummary.ts\"() {\n \"use strict\";\n init_utils();\n init_FileStatusSummary();\n StatusSummary = class {\n constructor() {\n this.not_added = [];\n this.conflicted = [];\n this.created = [];\n this.deleted = [];\n this.ignored = void 0;\n this.modified = [];\n this.renamed = [];\n this.files = [];\n this.staged = [];\n this.ahead = 0;\n this.behind = 0;\n this.current = null;\n this.tracking = null;\n this.detached = false;\n this.isClean = () => {\n return !this.files.length;\n };\n }\n };\n parsers6 = new Map([\n parser3(\n \" \" /* NONE */,\n \"A\" /* ADDED */,\n (result, file) => result.created.push(file)\n ),\n parser3(\n \" \" /* NONE */,\n \"D\" /* DELETED */,\n (result, file) => result.deleted.push(file)\n ),\n parser3(\n \" \" /* NONE */,\n \"M\" /* MODIFIED */,\n (result, file) => result.modified.push(file)\n ),\n parser3(\"A\" /* ADDED */, \" \" /* NONE */, (result, file) => {\n result.created.push(file);\n result.staged.push(file);\n }),\n parser3(\"A\" /* ADDED */, \"M\" /* MODIFIED */, (result, file) => {\n result.created.push(file);\n result.staged.push(file);\n result.modified.push(file);\n }),\n parser3(\"D\" /* DELETED */, \" \" /* NONE */, (result, file) => {\n result.deleted.push(file);\n result.staged.push(file);\n }),\n parser3(\"M\" /* MODIFIED */, \" \" /* NONE */, (result, file) => {\n result.modified.push(file);\n result.staged.push(file);\n }),\n parser3(\"M\" /* MODIFIED */, \"M\" /* MODIFIED */, (result, file) => {\n result.modified.push(file);\n result.staged.push(file);\n }),\n parser3(\"R\" /* RENAMED */, \" \" /* NONE */, (result, file) => {\n result.renamed.push(renamedFile(file));\n }),\n parser3(\"R\" /* RENAMED */, \"M\" /* MODIFIED */, (result, file) => {\n const renamed = renamedFile(file);\n result.renamed.push(renamed);\n result.modified.push(renamed.to);\n }),\n parser3(\"!\" /* IGNORED */, \"!\" /* IGNORED */, (_result, _file) => {\n (_result.ignored = _result.ignored || []).push(_file);\n }),\n parser3(\n \"?\" /* UNTRACKED */,\n \"?\" /* UNTRACKED */,\n (result, file) => result.not_added.push(file)\n ),\n ...conflicts(\"A\" /* ADDED */, \"A\" /* ADDED */, \"U\" /* UNMERGED */),\n ...conflicts(\n \"D\" /* DELETED */,\n \"D\" /* DELETED */,\n \"U\" /* UNMERGED */\n ),\n ...conflicts(\n \"U\" /* UNMERGED */,\n \"A\" /* ADDED */,\n \"D\" /* DELETED */,\n \"U\" /* UNMERGED */\n ),\n [\n \"##\",\n (result, line) => {\n const aheadReg = /ahead (\\d+)/;\n const behindReg = /behind (\\d+)/;\n const currentReg = /^(.+?(?=(?:\\.{3}|\\s|$)))/;\n const trackingReg = /\\.{3}(\\S*)/;\n const onEmptyBranchReg = /\\son\\s(\\S+?)(?=\\.{3}|$)/;\n let regexResult = aheadReg.exec(line);\n result.ahead = regexResult && +regexResult[1] || 0;\n regexResult = behindReg.exec(line);\n result.behind = regexResult && +regexResult[1] || 0;\n regexResult = currentReg.exec(line);\n result.current = filterType(regexResult?.[1], filterString, null);\n regexResult = trackingReg.exec(line);\n result.tracking = filterType(regexResult?.[1], filterString, null);\n regexResult = onEmptyBranchReg.exec(line);\n if (regexResult) {\n result.current = filterType(regexResult?.[1], filterString, result.current);\n }\n result.detached = /\\(no branch\\)/.test(line);\n }\n ]\n ]);\n parseStatusSummary = function(text) {\n const lines = text.split(NULL);\n const status = new StatusSummary();\n for (let i = 0, l = lines.length; i < l; ) {\n let line = lines[i++].trim();\n if (!line) {\n continue;\n }\n if (line.charAt(0) === \"R\" /* RENAMED */) {\n line += NULL + (lines[i++] || \"\");\n }\n splitLine(status, line);\n }\n return status;\n };\n }\n});\n\n// src/lib/tasks/status.ts\nfunction statusTask(customArgs) {\n const commands = [\n \"status\",\n \"--porcelain\",\n \"-b\",\n \"-u\",\n \"--null\",\n ...customArgs.filter((arg) => !ignoredOptions.includes(arg))\n ];\n return {\n format: \"utf-8\",\n commands,\n parser(text) {\n return parseStatusSummary(text);\n }\n };\n}\nvar ignoredOptions;\nvar init_status = __esm({\n \"src/lib/tasks/status.ts\"() {\n \"use strict\";\n init_StatusSummary();\n ignoredOptions = [\"--null\", \"-z\"];\n }\n});\n\n// src/lib/tasks/version.ts\nfunction versionResponse(major = 0, minor = 0, patch = 0, agent = \"\", installed = true) {\n return Object.defineProperty(\n {\n major,\n minor,\n patch,\n agent,\n installed\n },\n \"toString\",\n {\n value() {\n return `${this.major}.${this.minor}.${this.patch}`;\n },\n configurable: false,\n enumerable: false\n }\n );\n}\nfunction notInstalledResponse() {\n return versionResponse(0, 0, 0, \"\", false);\n}\nfunction version_default() {\n return {\n version() {\n return this._runTask({\n commands: [\"--version\"],\n format: \"utf-8\",\n parser: versionParser,\n onError(result, error, done, fail) {\n if (result.exitCode === -2 /* NOT_FOUND */) {\n return done(Buffer.from(NOT_INSTALLED));\n }\n fail(error);\n }\n });\n }\n };\n}\nfunction versionParser(stdOut) {\n if (stdOut === NOT_INSTALLED) {\n return notInstalledResponse();\n }\n return parseStringResponse(versionResponse(0, 0, 0, stdOut), parsers7, stdOut);\n}\nvar NOT_INSTALLED, parsers7;\nvar init_version = __esm({\n \"src/lib/tasks/version.ts\"() {\n \"use strict\";\n init_utils();\n NOT_INSTALLED = \"installed=false\";\n parsers7 = [\n new LineParser(\n /version (\\d+)\\.(\\d+)\\.(\\d+)(?:\\s*\\((.+)\\))?/,\n (result, [major, minor, patch, agent = \"\"]) => {\n Object.assign(\n result,\n versionResponse(asNumber(major), asNumber(minor), asNumber(patch), agent)\n );\n }\n ),\n new LineParser(\n /version (\\d+)\\.(\\d+)\\.(\\D+)(.+)?$/,\n (result, [major, minor, patch, agent = \"\"]) => {\n Object.assign(result, versionResponse(asNumber(major), asNumber(minor), patch, agent));\n }\n )\n ];\n }\n});\n\n// src/lib/tasks/clone.ts\nimport { pathspec as pathspec3 } from \"@simple-git/args-pathspec\";\nfunction createCloneTask(api, task, repoPath, ...args) {\n if (!filterString(repoPath)) {\n return configurationErrorTask(`git.${api}() requires a string 'repoPath'`);\n }\n return task(repoPath, filterType(args[0], filterString), getTrailingOptions(arguments));\n}\nfunction clone_default() {\n return {\n clone(repo, ...rest) {\n return this._runTask(\n createCloneTask(\"clone\", cloneTask, filterType(repo, filterString), ...rest),\n trailingFunctionArgument(arguments)\n );\n },\n mirror(repo, ...rest) {\n return this._runTask(\n createCloneTask(\"mirror\", cloneMirrorTask, filterType(repo, filterString), ...rest),\n trailingFunctionArgument(arguments)\n );\n }\n };\n}\nvar cloneTask, cloneMirrorTask;\nvar init_clone = __esm({\n \"src/lib/tasks/clone.ts\"() {\n \"use strict\";\n init_task();\n init_utils();\n cloneTask = (repo, directory, customArgs) => {\n const commands = [\"clone\", ...customArgs];\n filterString(repo) && commands.push(pathspec3(repo));\n filterString(directory) && commands.push(pathspec3(directory));\n return straightThroughStringTask(commands);\n };\n cloneMirrorTask = (repo, directory, customArgs) => {\n append(customArgs, \"--mirror\");\n return cloneTask(repo, directory, customArgs);\n };\n }\n});\n\n// src/lib/simple-git-api.ts\nvar simple_git_api_exports = {};\n__export(simple_git_api_exports, {\n SimpleGitApi: () => SimpleGitApi\n});\nvar SimpleGitApi;\nvar init_simple_git_api = __esm({\n \"src/lib/simple-git-api.ts\"() {\n \"use strict\";\n init_task_callback();\n init_change_working_directory();\n init_checkout();\n init_count_objects();\n init_commit();\n init_config();\n init_first_commit();\n init_grep();\n init_hash_object();\n init_init();\n init_log();\n init_merge();\n init_push();\n init_show();\n init_status();\n init_task();\n init_version();\n init_utils();\n init_clone();\n SimpleGitApi = class {\n constructor(_executor) {\n this._executor = _executor;\n }\n _runTask(task, then) {\n const chain = this._executor.chain();\n const promise = chain.push(task);\n if (then) {\n taskCallback(task, promise, then);\n }\n return Object.create(this, {\n then: { value: promise.then.bind(promise) },\n catch: { value: promise.catch.bind(promise) },\n _executor: { value: chain }\n });\n }\n add(files) {\n return this._runTask(\n straightThroughStringTask([\"add\", ...asArray(files)]),\n trailingFunctionArgument(arguments)\n );\n }\n cwd(directory) {\n const next = trailingFunctionArgument(arguments);\n if (typeof directory === \"string\") {\n return this._runTask(changeWorkingDirectoryTask(directory, this._executor), next);\n }\n if (typeof directory?.path === \"string\") {\n return this._runTask(\n changeWorkingDirectoryTask(\n directory.path,\n directory.root && this._executor || void 0\n ),\n next\n );\n }\n return this._runTask(\n configurationErrorTask(\"Git.cwd: workingDirectory must be supplied as a string\"),\n next\n );\n }\n hashObject(path, write) {\n return this._runTask(\n hashObjectTask(path, write === true),\n trailingFunctionArgument(arguments)\n );\n }\n init(bare) {\n return this._runTask(\n initTask(bare === true, this._executor.cwd, getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments)\n );\n }\n merge() {\n return this._runTask(\n mergeTask(getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments)\n );\n }\n mergeFromTo(remote, branch) {\n if (!(filterString(remote) && filterString(branch))) {\n return this._runTask(\n configurationErrorTask(\n `Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings`\n )\n );\n }\n return this._runTask(\n mergeTask([remote, branch, ...getTrailingOptions(arguments)]),\n trailingFunctionArgument(arguments, false)\n );\n }\n outputHandler(handler) {\n this._executor.outputHandler = handler;\n return this;\n }\n push() {\n const task = pushTask(\n {\n remote: filterType(arguments[0], filterString),\n branch: filterType(arguments[1], filterString)\n },\n getTrailingOptions(arguments)\n );\n return this._runTask(task, trailingFunctionArgument(arguments));\n }\n stash() {\n return this._runTask(\n straightThroughStringTask([\"stash\", ...getTrailingOptions(arguments)]),\n trailingFunctionArgument(arguments)\n );\n }\n status() {\n return this._runTask(\n statusTask(getTrailingOptions(arguments)),\n trailingFunctionArgument(arguments)\n );\n }\n };\n Object.assign(\n SimpleGitApi.prototype,\n checkout_default(),\n clone_default(),\n commit_default(),\n config_default(),\n count_objects_default(),\n first_commit_default(),\n grep_default(),\n log_default(),\n show_default(),\n version_default()\n );\n }\n});\n\n// src/lib/runners/scheduler.ts\nvar scheduler_exports = {};\n__export(scheduler_exports, {\n Scheduler: () => Scheduler\n});\nimport { createDeferred } from \"@kwsites/promise-deferred\";\nvar createScheduledTask, Scheduler;\nvar init_scheduler = __esm({\n \"src/lib/runners/scheduler.ts\"() {\n \"use strict\";\n init_utils();\n init_git_logger();\n createScheduledTask = /* @__PURE__ */ (() => {\n let id = 0;\n return () => {\n id++;\n const { promise, done } = createDeferred();\n return {\n promise,\n done,\n id\n };\n };\n })();\n Scheduler = class {\n constructor(concurrency = 2) {\n this.concurrency = concurrency;\n this.logger = createLogger(\"\", \"scheduler\");\n this.pending = [];\n this.running = [];\n this.logger(`Constructed, concurrency=%s`, concurrency);\n }\n schedule() {\n if (!this.pending.length || this.running.length >= this.concurrency) {\n this.logger(\n `Schedule attempt ignored, pending=%s running=%s concurrency=%s`,\n this.pending.length,\n this.running.length,\n this.concurrency\n );\n return;\n }\n const task = append(this.running, this.pending.shift());\n this.logger(`Attempting id=%s`, task.id);\n task.done(() => {\n this.logger(`Completing id=`, task.id);\n remove(this.running, task);\n this.schedule();\n });\n }\n next() {\n const { promise, id } = append(this.pending, createScheduledTask());\n this.logger(`Scheduling id=%s`, id);\n this.schedule();\n return promise;\n }\n };\n }\n});\n\n// src/lib/tasks/apply-patch.ts\nvar apply_patch_exports = {};\n__export(apply_patch_exports, {\n applyPatchTask: () => applyPatchTask\n});\nfunction applyPatchTask(patches, customArgs) {\n return straightThroughStringTask([\"apply\", ...customArgs, ...patches]);\n}\nvar init_apply_patch = __esm({\n \"src/lib/tasks/apply-patch.ts\"() {\n \"use strict\";\n init_task();\n }\n});\n\n// src/lib/responses/BranchDeleteSummary.ts\nfunction branchDeletionSuccess(branch, hash) {\n return {\n branch,\n hash,\n success: true\n };\n}\nfunction branchDeletionFailure(branch) {\n return {\n branch,\n hash: null,\n success: false\n };\n}\nvar BranchDeletionBatch;\nvar init_BranchDeleteSummary = __esm({\n \"src/lib/responses/BranchDeleteSummary.ts\"() {\n \"use strict\";\n BranchDeletionBatch = class {\n constructor() {\n this.all = [];\n this.branches = {};\n this.errors = [];\n }\n get success() {\n return !this.errors.length;\n }\n };\n }\n});\n\n// src/lib/parsers/parse-branch-delete.ts\nfunction hasBranchDeletionError(data, processExitCode) {\n return processExitCode === 1 /* ERROR */ && deleteErrorRegex.test(data);\n}\nvar deleteSuccessRegex, deleteErrorRegex, parsers8, parseBranchDeletions;\nvar init_parse_branch_delete = __esm({\n \"src/lib/parsers/parse-branch-delete.ts\"() {\n \"use strict\";\n init_BranchDeleteSummary();\n init_utils();\n deleteSuccessRegex = /(\\S+)\\s+\\(\\S+\\s([^)]+)\\)/;\n deleteErrorRegex = /^error[^']+'([^']+)'/m;\n parsers8 = [\n new LineParser(deleteSuccessRegex, (result, [branch, hash]) => {\n const deletion = branchDeletionSuccess(branch, hash);\n result.all.push(deletion);\n result.branches[branch] = deletion;\n }),\n new LineParser(deleteErrorRegex, (result, [branch]) => {\n const deletion = branchDeletionFailure(branch);\n result.errors.push(deletion);\n result.all.push(deletion);\n result.branches[branch] = deletion;\n })\n ];\n parseBranchDeletions = (stdOut, stdErr) => {\n return parseStringResponse(new BranchDeletionBatch(), parsers8, [stdOut, stdErr]);\n };\n }\n});\n\n// src/lib/responses/BranchSummary.ts\nvar BranchSummaryResult;\nvar init_BranchSummary = __esm({\n \"src/lib/responses/BranchSummary.ts\"() {\n \"use strict\";\n BranchSummaryResult = class {\n constructor() {\n this.all = [];\n this.branches = {};\n this.current = \"\";\n this.detached = false;\n }\n push(status, detached, name, commit, label) {\n if (status === \"*\" /* CURRENT */) {\n this.detached = detached;\n this.current = name;\n }\n this.all.push(name);\n this.branches[name] = {\n current: status === \"*\" /* CURRENT */,\n linkedWorkTree: status === \"+\" /* LINKED */,\n name,\n commit,\n label\n };\n }\n };\n }\n});\n\n// src/lib/parsers/parse-branch.ts\nfunction branchStatus(input) {\n return input ? input.charAt(0) : \"\";\n}\nfunction parseBranchSummary(stdOut, currentOnly = false) {\n return parseStringResponse(\n new BranchSummaryResult(),\n currentOnly ? [currentBranchParser] : parsers9,\n stdOut\n );\n}\nvar parsers9, currentBranchParser;\nvar init_parse_branch = __esm({\n \"src/lib/parsers/parse-branch.ts\"() {\n \"use strict\";\n init_BranchSummary();\n init_utils();\n parsers9 = [\n new LineParser(\n /^([*+]\\s)?\\((?:HEAD )?detached (?:from|at) (\\S+)\\)\\s+([a-z0-9]+)\\s(.*)$/,\n (result, [current, name, commit, label]) => {\n result.push(branchStatus(current), true, name, commit, label);\n }\n ),\n new LineParser(\n /^([*+]\\s)?(\\S+)\\s+([a-z0-9]+)\\s?(.*)$/s,\n (result, [current, name, commit, label]) => {\n result.push(branchStatus(current), false, name, commit, label);\n }\n )\n ];\n currentBranchParser = new LineParser(/^(\\S+)$/s, (result, [name]) => {\n result.push(\"*\" /* CURRENT */, false, name, \"\", \"\");\n });\n }\n});\n\n// src/lib/tasks/branch.ts\nvar branch_exports = {};\n__export(branch_exports, {\n branchLocalTask: () => branchLocalTask,\n branchTask: () => branchTask,\n containsDeleteBranchCommand: () => containsDeleteBranchCommand,\n deleteBranchTask: () => deleteBranchTask,\n deleteBranchesTask: () => deleteBranchesTask\n});\nfunction containsDeleteBranchCommand(commands) {\n const deleteCommands = [\"-d\", \"-D\", \"--delete\"];\n return commands.some((command) => deleteCommands.includes(command));\n}\nfunction branchTask(customArgs) {\n const isDelete = containsDeleteBranchCommand(customArgs);\n const isCurrentOnly = customArgs.includes(\"--show-current\");\n const commands = [\"branch\", ...customArgs];\n if (commands.length === 1) {\n commands.push(\"-a\");\n }\n if (!commands.includes(\"-v\")) {\n commands.splice(1, 0, \"-v\");\n }\n return {\n format: \"utf-8\",\n commands,\n parser(stdOut, stdErr) {\n if (isDelete) {\n return parseBranchDeletions(stdOut, stdErr).all[0];\n }\n return parseBranchSummary(stdOut, isCurrentOnly);\n }\n };\n}\nfunction branchLocalTask() {\n return {\n format: \"utf-8\",\n commands: [\"branch\", \"-v\"],\n parser(stdOut) {\n return parseBranchSummary(stdOut);\n }\n };\n}\nfunction deleteBranchesTask(branches, forceDelete = false) {\n return {\n format: \"utf-8\",\n commands: [\"branch\", \"-v\", forceDelete ? \"-D\" : \"-d\", ...branches],\n parser(stdOut, stdErr) {\n return parseBranchDeletions(stdOut, stdErr);\n },\n onError({ exitCode, stdOut }, error, done, fail) {\n if (!hasBranchDeletionError(String(error), exitCode)) {\n return fail(error);\n }\n done(stdOut);\n }\n };\n}\nfunction deleteBranchTask(branch, forceDelete = false) {\n const task = {\n format: \"utf-8\",\n commands: [\"branch\", \"-v\", forceDelete ? \"-D\" : \"-d\", branch],\n parser(stdOut, stdErr) {\n return parseBranchDeletions(stdOut, stdErr).branches[branch];\n },\n onError({ exitCode, stdErr, stdOut }, error, _, fail) {\n if (!hasBranchDeletionError(String(error), exitCode)) {\n return fail(error);\n }\n throw new GitResponseError(\n task.parser(bufferToString(stdOut), bufferToString(stdErr)),\n String(error)\n );\n }\n };\n return task;\n}\nvar init_branch = __esm({\n \"src/lib/tasks/branch.ts\"() {\n \"use strict\";\n init_git_response_error();\n init_parse_branch_delete();\n init_parse_branch();\n init_utils();\n }\n});\n\n// src/lib/responses/CheckIgnore.ts\nimport { normalize } from \"node:path\";\nfunction toPath(input) {\n const path = input.trim().replace(/^[\"']|[\"']$/g, \"\");\n return path && normalize(path);\n}\nvar parseCheckIgnore;\nvar init_CheckIgnore = __esm({\n \"src/lib/responses/CheckIgnore.ts\"() {\n \"use strict\";\n parseCheckIgnore = (text) => {\n return text.split(/\\n/g).map(toPath).filter(Boolean);\n };\n }\n});\n\n// src/lib/tasks/check-ignore.ts\nvar check_ignore_exports = {};\n__export(check_ignore_exports, {\n checkIgnoreTask: () => checkIgnoreTask\n});\nfunction checkIgnoreTask(paths) {\n return {\n commands: [\"check-ignore\", ...paths],\n format: \"utf-8\",\n parser: parseCheckIgnore\n };\n}\nvar init_check_ignore = __esm({\n \"src/lib/tasks/check-ignore.ts\"() {\n \"use strict\";\n init_CheckIgnore();\n }\n});\n\n// src/lib/parsers/parse-fetch.ts\nfunction parseFetchResult(stdOut, stdErr) {\n const result = {\n raw: stdOut,\n remote: null,\n branches: [],\n tags: [],\n updated: [],\n deleted: []\n };\n return parseStringResponse(result, parsers10, [stdOut, stdErr]);\n}\nvar parsers10;\nvar init_parse_fetch = __esm({\n \"src/lib/parsers/parse-fetch.ts\"() {\n \"use strict\";\n init_utils();\n parsers10 = [\n new LineParser(/From (.+)$/, (result, [remote]) => {\n result.remote = remote;\n }),\n new LineParser(/\\* \\[new branch]\\s+(\\S+)\\s*-> (.+)$/, (result, [name, tracking]) => {\n result.branches.push({\n name,\n tracking\n });\n }),\n new LineParser(/\\* \\[new tag]\\s+(\\S+)\\s*-> (.+)$/, (result, [name, tracking]) => {\n result.tags.push({\n name,\n tracking\n });\n }),\n new LineParser(/- \\[deleted]\\s+\\S+\\s*-> (.+)$/, (result, [tracking]) => {\n result.deleted.push({\n tracking\n });\n }),\n new LineParser(\n /\\s*([^.]+)\\.\\.(\\S+)\\s+(\\S+)\\s*-> (.+)$/,\n (result, [from, to, name, tracking]) => {\n result.updated.push({\n name,\n tracking,\n to,\n from\n });\n }\n )\n ];\n }\n});\n\n// src/lib/tasks/fetch.ts\nvar fetch_exports = {};\n__export(fetch_exports, {\n fetchTask: () => fetchTask\n});\nfunction disallowedCommand(command) {\n return /^--upload-pack(=|$)/.test(command);\n}\nfunction fetchTask(remote, branch, customArgs) {\n const commands = [\"fetch\", ...customArgs];\n if (remote && branch) {\n commands.push(remote, branch);\n }\n const banned = commands.find(disallowedCommand);\n if (banned) {\n return configurationErrorTask(`git.fetch: potential exploit argument blocked.`);\n }\n return {\n commands,\n format: \"utf-8\",\n parser: parseFetchResult\n };\n}\nvar init_fetch = __esm({\n \"src/lib/tasks/fetch.ts\"() {\n \"use strict\";\n init_parse_fetch();\n init_task();\n }\n});\n\n// src/lib/parsers/parse-move.ts\nfunction parseMoveResult(stdOut) {\n return parseStringResponse({ moves: [] }, parsers11, stdOut);\n}\nvar parsers11;\nvar init_parse_move = __esm({\n \"src/lib/parsers/parse-move.ts\"() {\n \"use strict\";\n init_utils();\n parsers11 = [\n new LineParser(/^Renaming (.+) to (.+)$/, (result, [from, to]) => {\n result.moves.push({ from, to });\n })\n ];\n }\n});\n\n// src/lib/tasks/move.ts\nvar move_exports = {};\n__export(move_exports, {\n moveTask: () => moveTask\n});\nfunction moveTask(from, to) {\n return {\n commands: [\"mv\", \"-v\", ...asArray(from), to],\n format: \"utf-8\",\n parser: parseMoveResult\n };\n}\nvar init_move = __esm({\n \"src/lib/tasks/move.ts\"() {\n \"use strict\";\n init_parse_move();\n init_utils();\n }\n});\n\n// src/lib/tasks/pull.ts\nvar pull_exports = {};\n__export(pull_exports, {\n pullTask: () => pullTask\n});\nfunction pullTask(remote, branch, customArgs) {\n const commands = [\"pull\", ...customArgs];\n if (remote && branch) {\n commands.splice(1, 0, remote, branch);\n }\n return {\n commands,\n format: \"utf-8\",\n parser(stdOut, stdErr) {\n return parsePullResult(stdOut, stdErr);\n },\n onError(result, _error, _done, fail) {\n const pullError = parsePullErrorResult(\n bufferToString(result.stdOut),\n bufferToString(result.stdErr)\n );\n if (pullError) {\n return fail(new GitResponseError(pullError));\n }\n fail(_error);\n }\n };\n}\nvar init_pull = __esm({\n \"src/lib/tasks/pull.ts\"() {\n \"use strict\";\n init_git_response_error();\n init_parse_pull();\n init_utils();\n }\n});\n\n// src/lib/responses/GetRemoteSummary.ts\nfunction parseGetRemotes(text) {\n const remotes = {};\n forEach(text, ([name]) => remotes[name] = { name });\n return Object.values(remotes);\n}\nfunction parseGetRemotesVerbose(text) {\n const remotes = {};\n forEach(text, ([name, url, purpose]) => {\n if (!Object.hasOwn(remotes, name)) {\n remotes[name] = {\n name,\n refs: { fetch: \"\", push: \"\" }\n };\n }\n if (purpose && url) {\n remotes[name].refs[purpose.replace(/[^a-z]/g, \"\")] = url;\n }\n });\n return Object.values(remotes);\n}\nfunction forEach(text, handler) {\n forEachLineWithContent(text, (line) => handler(line.split(/\\s+/)));\n}\nvar init_GetRemoteSummary = __esm({\n \"src/lib/responses/GetRemoteSummary.ts\"() {\n \"use strict\";\n init_utils();\n }\n});\n\n// src/lib/tasks/remote.ts\nvar remote_exports = {};\n__export(remote_exports, {\n addRemoteTask: () => addRemoteTask,\n getRemotesTask: () => getRemotesTask,\n listRemotesTask: () => listRemotesTask,\n remoteTask: () => remoteTask,\n removeRemoteTask: () => removeRemoteTask\n});\nfunction addRemoteTask(remoteName, remoteRepo, customArgs) {\n return straightThroughStringTask([\"remote\", \"add\", ...customArgs, remoteName, remoteRepo]);\n}\nfunction getRemotesTask(verbose) {\n const commands = [\"remote\"];\n if (verbose) {\n commands.push(\"-v\");\n }\n return {\n commands,\n format: \"utf-8\",\n parser: verbose ? parseGetRemotesVerbose : parseGetRemotes\n };\n}\nfunction listRemotesTask(customArgs) {\n const commands = [...customArgs];\n if (commands[0] !== \"ls-remote\") {\n commands.unshift(\"ls-remote\");\n }\n return straightThroughStringTask(commands);\n}\nfunction remoteTask(customArgs) {\n const commands = [...customArgs];\n if (commands[0] !== \"remote\") {\n commands.unshift(\"remote\");\n }\n return straightThroughStringTask(commands);\n}\nfunction removeRemoteTask(remoteName) {\n return straightThroughStringTask([\"remote\", \"remove\", remoteName]);\n}\nvar init_remote = __esm({\n \"src/lib/tasks/remote.ts\"() {\n \"use strict\";\n init_GetRemoteSummary();\n init_task();\n }\n});\n\n// src/lib/tasks/stash-list.ts\nvar stash_list_exports = {};\n__export(stash_list_exports, {\n stashListTask: () => stashListTask\n});\nfunction stashListTask(opt = {}, customArgs) {\n const options = parseLogOptions(opt);\n const commands = [\"stash\", \"list\", ...options.commands, ...customArgs];\n const parser4 = createListLogSummaryParser(\n options.splitter,\n options.fields,\n logFormatFromCommand(commands)\n );\n return validateLogFormatConfig(commands) || {\n commands,\n format: \"utf-8\",\n parser: parser4\n };\n}\nvar init_stash_list = __esm({\n \"src/lib/tasks/stash-list.ts\"() {\n \"use strict\";\n init_log_format();\n init_parse_list_log_summary();\n init_diff();\n init_log();\n }\n});\n\n// src/lib/tasks/sub-module.ts\nvar sub_module_exports = {};\n__export(sub_module_exports, {\n addSubModuleTask: () => addSubModuleTask,\n initSubModuleTask: () => initSubModuleTask,\n subModuleTask: () => subModuleTask,\n updateSubModuleTask: () => updateSubModuleTask\n});\nfunction addSubModuleTask(repo, path) {\n return subModuleTask([\"add\", repo, path]);\n}\nfunction initSubModuleTask(customArgs) {\n return subModuleTask([\"init\", ...customArgs]);\n}\nfunction subModuleTask(customArgs) {\n const commands = [...customArgs];\n if (commands[0] !== \"submodule\") {\n commands.unshift(\"submodule\");\n }\n return straightThroughStringTask(commands);\n}\nfunction updateSubModuleTask(customArgs) {\n return subModuleTask([\"update\", ...customArgs]);\n}\nvar init_sub_module = __esm({\n \"src/lib/tasks/sub-module.ts\"() {\n \"use strict\";\n init_task();\n }\n});\n\n// src/lib/responses/TagList.ts\nfunction singleSorted(a, b) {\n const aIsNum = Number.isNaN(a);\n const bIsNum = Number.isNaN(b);\n if (aIsNum !== bIsNum) {\n return aIsNum ? 1 : -1;\n }\n return aIsNum ? sorted(a, b) : 0;\n}\nfunction sorted(a, b) {\n return a === b ? 0 : a > b ? 1 : -1;\n}\nfunction trimmed(input) {\n return input.trim();\n}\nfunction toNumber(input) {\n if (typeof input === \"string\") {\n return parseInt(input.replace(/^\\D+/g, \"\"), 10) || 0;\n }\n return 0;\n}\nvar TagList, parseTagList;\nvar init_TagList = __esm({\n \"src/lib/responses/TagList.ts\"() {\n \"use strict\";\n TagList = class {\n constructor(all, latest) {\n this.all = all;\n this.latest = latest;\n }\n };\n parseTagList = function(data, customSort = false) {\n const tags = data.split(\"\\n\").map(trimmed).filter(Boolean);\n if (!customSort) {\n tags.sort(function(tagA, tagB) {\n const partsA = tagA.split(\".\");\n const partsB = tagB.split(\".\");\n if (partsA.length === 1 || partsB.length === 1) {\n return singleSorted(toNumber(partsA[0]), toNumber(partsB[0]));\n }\n for (let i = 0, l = Math.max(partsA.length, partsB.length); i < l; i++) {\n const diff = sorted(toNumber(partsA[i]), toNumber(partsB[i]));\n if (diff) {\n return diff;\n }\n }\n return 0;\n });\n }\n const latest = customSort ? tags[0] : [...tags].reverse().find((tag) => tag.indexOf(\".\") >= 0);\n return new TagList(tags, latest);\n };\n }\n});\n\n// src/lib/tasks/tag.ts\nvar tag_exports = {};\n__export(tag_exports, {\n addAnnotatedTagTask: () => addAnnotatedTagTask,\n addTagTask: () => addTagTask,\n tagListTask: () => tagListTask\n});\nfunction tagListTask(customArgs = []) {\n const hasCustomSort = customArgs.some((option) => /^--sort=/.test(option));\n return {\n format: \"utf-8\",\n commands: [\"tag\", \"-l\", ...customArgs],\n parser(text) {\n return parseTagList(text, hasCustomSort);\n }\n };\n}\nfunction addTagTask(name) {\n return {\n format: \"utf-8\",\n commands: [\"tag\", name],\n parser() {\n return { name };\n }\n };\n}\nfunction addAnnotatedTagTask(name, tagMessage) {\n return {\n format: \"utf-8\",\n commands: [\"tag\", \"-a\", \"-m\", tagMessage, name],\n parser() {\n return { name };\n }\n };\n}\nvar init_tag = __esm({\n \"src/lib/tasks/tag.ts\"() {\n \"use strict\";\n init_TagList();\n }\n});\n\n// src/git.js\nvar require_git = __commonJS({\n \"src/git.js\"(exports, module) {\n \"use strict\";\n var { GitExecutor: GitExecutor2 } = (init_git_executor(), __toCommonJS(git_executor_exports));\n var { SimpleGitApi: SimpleGitApi2 } = (init_simple_git_api(), __toCommonJS(simple_git_api_exports));\n var { Scheduler: Scheduler2 } = (init_scheduler(), __toCommonJS(scheduler_exports));\n var { adhocExecTask: adhocExecTask2, configurationErrorTask: configurationErrorTask2 } = (init_task(), __toCommonJS(task_exports));\n var {\n asArray: asArray2,\n filterArray: filterArray2,\n filterPrimitives: filterPrimitives2,\n filterString: filterString2,\n filterStringOrStringArray: filterStringOrStringArray2,\n filterType: filterType2,\n getTrailingOptions: getTrailingOptions2,\n trailingFunctionArgument: trailingFunctionArgument2,\n trailingOptionsArgument: trailingOptionsArgument2\n } = (init_utils(), __toCommonJS(utils_exports));\n var { applyPatchTask: applyPatchTask2 } = (init_apply_patch(), __toCommonJS(apply_patch_exports));\n var {\n branchTask: branchTask2,\n branchLocalTask: branchLocalTask2,\n deleteBranchesTask: deleteBranchesTask2,\n deleteBranchTask: deleteBranchTask2\n } = (init_branch(), __toCommonJS(branch_exports));\n var { checkIgnoreTask: checkIgnoreTask2 } = (init_check_ignore(), __toCommonJS(check_ignore_exports));\n var { checkIsRepoTask: checkIsRepoTask2 } = (init_check_is_repo(), __toCommonJS(check_is_repo_exports));\n var { cleanWithOptionsTask: cleanWithOptionsTask2, isCleanOptionsArray: isCleanOptionsArray2 } = (init_clean(), __toCommonJS(clean_exports));\n var { diffSummaryTask: diffSummaryTask2 } = (init_diff(), __toCommonJS(diff_exports));\n var { fetchTask: fetchTask2 } = (init_fetch(), __toCommonJS(fetch_exports));\n var { moveTask: moveTask2 } = (init_move(), __toCommonJS(move_exports));\n var { pullTask: pullTask2 } = (init_pull(), __toCommonJS(pull_exports));\n var { pushTagsTask: pushTagsTask2 } = (init_push(), __toCommonJS(push_exports));\n var {\n addRemoteTask: addRemoteTask2,\n getRemotesTask: getRemotesTask2,\n listRemotesTask: listRemotesTask2,\n remoteTask: remoteTask2,\n removeRemoteTask: removeRemoteTask2\n } = (init_remote(), __toCommonJS(remote_exports));\n var { getResetMode: getResetMode2, resetTask: resetTask2 } = (init_reset(), __toCommonJS(reset_exports));\n var { stashListTask: stashListTask2 } = (init_stash_list(), __toCommonJS(stash_list_exports));\n var {\n addSubModuleTask: addSubModuleTask2,\n initSubModuleTask: initSubModuleTask2,\n subModuleTask: subModuleTask2,\n updateSubModuleTask: updateSubModuleTask2\n } = (init_sub_module(), __toCommonJS(sub_module_exports));\n var { addAnnotatedTagTask: addAnnotatedTagTask2, addTagTask: addTagTask2, tagListTask: tagListTask2 } = (init_tag(), __toCommonJS(tag_exports));\n var { straightThroughBufferTask: straightThroughBufferTask2, straightThroughStringTask: straightThroughStringTask2 } = (init_task(), __toCommonJS(task_exports));\n function Git2(options, plugins) {\n this._plugins = plugins;\n this._executor = new GitExecutor2(\n options.baseDir,\n new Scheduler2(options.maxConcurrentProcesses),\n plugins\n );\n this._trimmed = options.trimmed;\n }\n (Git2.prototype = Object.create(SimpleGitApi2.prototype)).constructor = Git2;\n Git2.prototype.customBinary = function(command) {\n this._plugins.reconfigure(\"binary\", command);\n return this;\n };\n Git2.prototype.env = function(name, value) {\n if (arguments.length === 1 && typeof name === \"object\") {\n this._executor.env = name;\n } else {\n (this._executor.env = this._executor.env || {})[name] = value;\n }\n return this;\n };\n Git2.prototype.stashList = function(options) {\n return this._runTask(\n stashListTask2(\n trailingOptionsArgument2(arguments) || {},\n filterArray2(options) && options || []\n ),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.mv = function(from, to) {\n return this._runTask(moveTask2(from, to), trailingFunctionArgument2(arguments));\n };\n Git2.prototype.checkoutLatestTag = function(then) {\n var git = this;\n return this.pull(function() {\n git.tags(function(err, tags) {\n git.checkout(tags.latest, then);\n });\n });\n };\n Git2.prototype.pull = function(remote, branch, options, then) {\n return this._runTask(\n pullTask2(\n filterType2(remote, filterString2),\n filterType2(branch, filterString2),\n getTrailingOptions2(arguments)\n ),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.fetch = function(remote, branch) {\n return this._runTask(\n fetchTask2(\n filterType2(remote, filterString2),\n filterType2(branch, filterString2),\n getTrailingOptions2(arguments)\n ),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.silent = function(silence) {\n return this._runTask(\n adhocExecTask2(\n () => console.warn(\n \"simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this method will be removed.\"\n )\n )\n );\n };\n Git2.prototype.tags = function(options, then) {\n return this._runTask(\n tagListTask2(getTrailingOptions2(arguments)),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.rebase = function() {\n return this._runTask(\n straightThroughStringTask2([\"rebase\", ...getTrailingOptions2(arguments)]),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.reset = function(mode) {\n return this._runTask(\n resetTask2(getResetMode2(mode), getTrailingOptions2(arguments)),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.revert = function(commit) {\n const next = trailingFunctionArgument2(arguments);\n if (typeof commit !== \"string\") {\n return this._runTask(configurationErrorTask2(\"Commit must be a string\"), next);\n }\n return this._runTask(\n straightThroughStringTask2([\"revert\", ...getTrailingOptions2(arguments, 0, true), commit]),\n next\n );\n };\n Git2.prototype.addTag = function(name) {\n const task = typeof name === \"string\" ? addTagTask2(name) : configurationErrorTask2(\"Git.addTag requires a tag name\");\n return this._runTask(task, trailingFunctionArgument2(arguments));\n };\n Git2.prototype.addAnnotatedTag = function(tagName, tagMessage) {\n return this._runTask(\n addAnnotatedTagTask2(tagName, tagMessage),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.deleteLocalBranch = function(branchName, forceDelete, then) {\n return this._runTask(\n deleteBranchTask2(branchName, typeof forceDelete === \"boolean\" ? forceDelete : false),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.deleteLocalBranches = function(branchNames, forceDelete, then) {\n return this._runTask(\n deleteBranchesTask2(branchNames, typeof forceDelete === \"boolean\" ? forceDelete : false),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.branch = function(options, then) {\n return this._runTask(\n branchTask2(getTrailingOptions2(arguments)),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.branchLocal = function(then) {\n return this._runTask(branchLocalTask2(), trailingFunctionArgument2(arguments));\n };\n Git2.prototype.raw = function(commands) {\n const createRestCommands = !Array.isArray(commands);\n const command = [].slice.call(createRestCommands ? arguments : commands, 0);\n for (let i = 0; i < command.length && createRestCommands; i++) {\n if (!filterPrimitives2(command[i])) {\n command.splice(i, command.length - i);\n break;\n }\n }\n command.push(...getTrailingOptions2(arguments, 0, true));\n var next = trailingFunctionArgument2(arguments);\n if (!command.length) {\n return this._runTask(\n configurationErrorTask2(\"Raw: must supply one or more command to execute\"),\n next\n );\n }\n return this._runTask(straightThroughStringTask2(command, this._trimmed), next);\n };\n Git2.prototype.submoduleAdd = function(repo, path, then) {\n return this._runTask(addSubModuleTask2(repo, path), trailingFunctionArgument2(arguments));\n };\n Git2.prototype.submoduleUpdate = function(args, then) {\n return this._runTask(\n updateSubModuleTask2(getTrailingOptions2(arguments, true)),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.submoduleInit = function(args, then) {\n return this._runTask(\n initSubModuleTask2(getTrailingOptions2(arguments, true)),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.subModule = function(options, then) {\n return this._runTask(\n subModuleTask2(getTrailingOptions2(arguments)),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.listRemote = function() {\n return this._runTask(\n listRemotesTask2(getTrailingOptions2(arguments)),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.addRemote = function(remoteName, remoteRepo, then) {\n return this._runTask(\n addRemoteTask2(remoteName, remoteRepo, getTrailingOptions2(arguments)),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.removeRemote = function(remoteName, then) {\n return this._runTask(removeRemoteTask2(remoteName), trailingFunctionArgument2(arguments));\n };\n Git2.prototype.getRemotes = function(verbose, then) {\n return this._runTask(getRemotesTask2(verbose === true), trailingFunctionArgument2(arguments));\n };\n Git2.prototype.remote = function(options, then) {\n return this._runTask(\n remoteTask2(getTrailingOptions2(arguments)),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.tag = function(options, then) {\n const command = getTrailingOptions2(arguments);\n if (command[0] !== \"tag\") {\n command.unshift(\"tag\");\n }\n return this._runTask(straightThroughStringTask2(command), trailingFunctionArgument2(arguments));\n };\n Git2.prototype.updateServerInfo = function(then) {\n return this._runTask(\n straightThroughStringTask2([\"update-server-info\"]),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.pushTags = function(remote, then) {\n const task = pushTagsTask2(\n { remote: filterType2(remote, filterString2) },\n getTrailingOptions2(arguments)\n );\n return this._runTask(task, trailingFunctionArgument2(arguments));\n };\n Git2.prototype.rm = function(files) {\n return this._runTask(\n straightThroughStringTask2([\"rm\", \"-f\", ...asArray2(files)]),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.rmKeepLocal = function(files) {\n return this._runTask(\n straightThroughStringTask2([\"rm\", \"--cached\", ...asArray2(files)]),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.catFile = function(options, then) {\n return this._catFile(\"utf-8\", arguments);\n };\n Git2.prototype.binaryCatFile = function() {\n return this._catFile(\"buffer\", arguments);\n };\n Git2.prototype._catFile = function(format, args) {\n var handler = trailingFunctionArgument2(args);\n var command = [\"cat-file\"];\n var options = args[0];\n if (typeof options === \"string\") {\n return this._runTask(\n configurationErrorTask2(\"Git.catFile: options must be supplied as an array of strings\"),\n handler\n );\n }\n if (Array.isArray(options)) {\n command.push.apply(command, options);\n }\n const task = format === \"buffer\" ? straightThroughBufferTask2(command) : straightThroughStringTask2(command);\n return this._runTask(task, handler);\n };\n Git2.prototype.diff = function(options, then) {\n const task = filterString2(options) ? configurationErrorTask2(\n \"git.diff: supplying options as a single string is no longer supported, switch to an array of strings\"\n ) : straightThroughStringTask2([\"diff\", ...getTrailingOptions2(arguments)]);\n return this._runTask(task, trailingFunctionArgument2(arguments));\n };\n Git2.prototype.diffSummary = function() {\n return this._runTask(\n diffSummaryTask2(getTrailingOptions2(arguments, 1)),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.applyPatch = function(patches) {\n const task = !filterStringOrStringArray2(patches) ? configurationErrorTask2(\n `git.applyPatch requires one or more string patches as the first argument`\n ) : applyPatchTask2(asArray2(patches), getTrailingOptions2([].slice.call(arguments, 1)));\n return this._runTask(task, trailingFunctionArgument2(arguments));\n };\n Git2.prototype.revparse = function() {\n const commands = [\"rev-parse\", ...getTrailingOptions2(arguments, true)];\n return this._runTask(\n straightThroughStringTask2(commands, true),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.clean = function(mode, options, then) {\n const usingCleanOptionsArray = isCleanOptionsArray2(mode);\n const cleanMode = usingCleanOptionsArray && mode.join(\"\") || filterType2(mode, filterString2) || \"\";\n const customArgs = getTrailingOptions2([].slice.call(arguments, usingCleanOptionsArray ? 1 : 0));\n return this._runTask(\n cleanWithOptionsTask2(cleanMode, customArgs),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.exec = function(then) {\n const task = {\n commands: [],\n format: \"utf-8\",\n parser() {\n if (typeof then === \"function\") {\n then();\n }\n }\n };\n return this._runTask(task);\n };\n Git2.prototype.clearQueue = function() {\n return this._runTask(\n adhocExecTask2(\n () => console.warn(\n \"simple-git deprecation notice: clearQueue() is deprecated and will be removed, switch to using the abortPlugin instead.\"\n )\n )\n );\n };\n Git2.prototype.checkIgnore = function(pathnames, then) {\n return this._runTask(\n checkIgnoreTask2(asArray2(filterType2(pathnames, filterStringOrStringArray2, []))),\n trailingFunctionArgument2(arguments)\n );\n };\n Git2.prototype.checkIsRepo = function(checkType, then) {\n return this._runTask(\n checkIsRepoTask2(filterType2(checkType, filterString2)),\n trailingFunctionArgument2(arguments)\n );\n };\n module.exports = Git2;\n }\n});\n\n// src/lib/api.ts\nimport { pathspec } from \"@simple-git/args-pathspec\";\n\n// src/lib/errors/git-construct-error.ts\ninit_git_error();\nvar GitConstructError = class extends GitError {\n constructor(config, message) {\n super(void 0, message);\n this.config = config;\n }\n};\n\n// src/lib/api.ts\ninit_git_error();\n\n// src/lib/errors/git-plugin-error.ts\ninit_git_error();\nvar GitPluginError = class extends GitError {\n constructor(task, plugin, message) {\n super(task, message);\n this.task = task;\n this.plugin = plugin;\n Object.setPrototypeOf(this, new.target.prototype);\n }\n};\n\n// src/lib/api.ts\ninit_git_response_error();\ninit_task_configuration_error();\ninit_check_is_repo();\ninit_clean();\ninit_config();\ninit_diff_name_status();\ninit_grep();\ninit_reset();\n\n// src/lib/plugins/abort-plugin.ts\nfunction abortPlugin(signal) {\n if (!signal) {\n return;\n }\n const onSpawnAfter = {\n type: \"spawn.after\",\n action(_data, context) {\n function kill() {\n context.kill(new GitPluginError(void 0, \"abort\", \"Abort signal received\"));\n }\n signal.addEventListener(\"abort\", kill);\n context.spawned.on(\"close\", () => signal.removeEventListener(\"abort\", kill));\n }\n };\n const onSpawnBefore = {\n type: \"spawn.before\",\n action(_data, context) {\n if (signal.aborted) {\n context.kill(new GitPluginError(void 0, \"abort\", \"Abort already signaled\"));\n }\n }\n };\n return [onSpawnBefore, onSpawnAfter];\n}\n\n// src/lib/plugins/block-unsafe-operations-plugin.ts\nimport { parseArgv } from \"@simple-git/argv-parser\";\nfunction blockUnsafeOperationsPlugin(options = {}) {\n return {\n type: \"spawn.args\",\n action(args) {\n const parsed = parseArgv(...args);\n for (const vulnerability of parsed.vulnerabilities.vulnerabilities) {\n if (options[vulnerability.category] !== true) {\n throw new GitPluginError(void 0, \"unsafe\", vulnerability.message);\n }\n }\n return args;\n }\n };\n}\n\n// src/lib/plugins/command-config-prefixing-plugin.ts\ninit_utils();\nfunction commandConfigPrefixingPlugin(configuration) {\n const prefix = prefixedArray(configuration, \"-c\");\n return {\n type: \"spawn.args\",\n action(data) {\n return [...prefix, ...data];\n }\n };\n}\n\n// src/lib/plugins/completion-detection.plugin.ts\ninit_utils();\nimport { deferred } from \"@kwsites/promise-deferred\";\nvar never = deferred().promise;\nfunction completionDetectionPlugin({\n onClose = true,\n onExit = 50\n} = {}) {\n function createEvents() {\n let exitCode = -1;\n const events = {\n close: deferred(),\n closeTimeout: deferred(),\n exit: deferred(),\n exitTimeout: deferred()\n };\n const result = Promise.race([\n onClose === false ? never : events.closeTimeout.promise,\n onExit === false ? never : events.exitTimeout.promise\n ]);\n configureTimeout(onClose, events.close, events.closeTimeout);\n configureTimeout(onExit, events.exit, events.exitTimeout);\n return {\n close(code) {\n exitCode = code;\n events.close.done();\n },\n exit(code) {\n exitCode = code;\n events.exit.done();\n },\n get exitCode() {\n return exitCode;\n },\n result\n };\n }\n function configureTimeout(flag, event, timeout) {\n if (flag === false) {\n return;\n }\n (flag === true ? event.promise : event.promise.then(() => delay(flag))).then(timeout.done);\n }\n return {\n type: \"spawn.after\",\n async action(_data, { spawned, close }) {\n const events = createEvents();\n let deferClose = true;\n let quickClose = () => void (deferClose = false);\n spawned.stdout?.on(\"data\", quickClose);\n spawned.stderr?.on(\"data\", quickClose);\n spawned.on(\"error\", quickClose);\n spawned.on(\"close\", (code) => events.close(code));\n spawned.on(\"exit\", (code) => events.exit(code));\n try {\n await events.result;\n if (deferClose) {\n await delay(50);\n }\n close(events.exitCode);\n } catch (err) {\n close(events.exitCode, err);\n }\n }\n };\n}\n\n// src/lib/plugins/custom-binary.plugin.ts\ninit_utils();\nvar WRONG_NUMBER_ERR = `Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings`;\nvar WRONG_CHARS_ERR = `Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option`;\nfunction isBadArgument(arg) {\n return !arg || !/^([a-z]:)?([a-z0-9/.\\\\_~-]+)$/i.test(arg);\n}\nfunction toBinaryConfig(input, allowUnsafe) {\n if (input.length < 1 || input.length > 2) {\n throw new GitPluginError(void 0, \"binary\", WRONG_NUMBER_ERR);\n }\n const isBad = input.some(isBadArgument);\n if (isBad) {\n if (allowUnsafe) {\n console.warn(WRONG_CHARS_ERR);\n } else {\n throw new GitPluginError(void 0, \"binary\", WRONG_CHARS_ERR);\n }\n }\n const [binary, prefix] = input;\n return {\n binary,\n prefix\n };\n}\nfunction customBinaryPlugin(plugins, input = [\"git\"], allowUnsafe = false) {\n let config = toBinaryConfig(asArray(input), allowUnsafe);\n plugins.on(\"binary\", (input2) => {\n config = toBinaryConfig(asArray(input2), allowUnsafe);\n });\n plugins.append(\"spawn.binary\", () => {\n return config.binary;\n });\n plugins.append(\"spawn.args\", (data) => {\n return config.prefix ? [config.prefix, ...data] : data;\n });\n}\n\n// src/lib/plugins/error-detection.plugin.ts\ninit_git_error();\nfunction isTaskError(result) {\n return !!(result.exitCode && result.stdErr.length);\n}\nfunction getErrorMessage(result) {\n return Buffer.concat([...result.stdOut, ...result.stdErr]);\n}\nfunction errorDetectionHandler(overwrite = false, isError = isTaskError, errorMessage = getErrorMessage) {\n return (error, result) => {\n if (!overwrite && error || !isError(result)) {\n return error;\n }\n return errorMessage(result);\n };\n}\nfunction errorDetectionPlugin(config) {\n return {\n type: \"task.error\",\n action(data, context) {\n const error = config(data.error, {\n stdErr: context.stdErr,\n stdOut: context.stdOut,\n exitCode: context.exitCode\n });\n if (Buffer.isBuffer(error)) {\n return { error: new GitError(void 0, error.toString(\"utf-8\")) };\n }\n return {\n error\n };\n }\n };\n}\n\n// src/lib/plugins/plugin-store.ts\ninit_utils();\nimport { EventEmitter } from \"node:events\";\nvar PluginStore = class {\n constructor() {\n this.plugins = /* @__PURE__ */ new Set();\n this.events = new EventEmitter();\n }\n on(type, listener) {\n this.events.on(type, listener);\n }\n reconfigure(type, data) {\n this.events.emit(type, data);\n }\n append(type, action) {\n const plugin = append(this.plugins, { type, action });\n return () => this.plugins.delete(plugin);\n }\n add(plugin) {\n const plugins = [];\n asArray(plugin).forEach((plugin2) => plugin2 && this.plugins.add(append(plugins, plugin2)));\n return () => {\n plugins.forEach((plugin2) => this.plugins.delete(plugin2));\n };\n }\n exec(type, data, context) {\n let output = data;\n const contextual = Object.freeze(Object.create(context));\n for (const plugin of this.plugins) {\n if (plugin.type === type) {\n output = plugin.action(output, contextual);\n }\n }\n return output;\n }\n};\n\n// src/lib/plugins/progress-monitor-plugin.ts\ninit_utils();\nfunction progressMonitorPlugin(progress) {\n const progressCommand = \"--progress\";\n const progressMethods = [\"checkout\", \"clone\", \"fetch\", \"pull\", \"push\"];\n const onProgress = {\n type: \"spawn.after\",\n action(_data, context) {\n if (!context.commands.includes(progressCommand)) {\n return;\n }\n context.spawned.stderr?.on(\"data\", (chunk) => {\n const message = /^([\\s\\S]+?):\\s*(\\d+)% \\((\\d+)\\/(\\d+)\\)/.exec(chunk.toString(\"utf8\"));\n if (!message) {\n return;\n }\n progress({\n method: context.method,\n stage: progressEventStage(message[1]),\n progress: asNumber(message[2]),\n processed: asNumber(message[3]),\n total: asNumber(message[4])\n });\n });\n }\n };\n const onArgs = {\n type: \"spawn.args\",\n action(args, context) {\n if (!progressMethods.includes(context.method)) {\n return args;\n }\n return including(args, progressCommand);\n }\n };\n return [onArgs, onProgress];\n}\nfunction progressEventStage(input) {\n return String(input.toLowerCase().split(\" \", 1)) || \"unknown\";\n}\n\n// src/lib/plugins/spawn-options-plugin.ts\ninit_utils();\nfunction spawnOptionsPlugin(spawnOptions) {\n const options = pick(spawnOptions, [\"uid\", \"gid\"]);\n return {\n type: \"spawn.options\",\n action(data) {\n return { ...options, ...data };\n }\n };\n}\n\n// src/lib/plugins/timout-plugin.ts\nfunction timeoutPlugin({\n block,\n stdErr = true,\n stdOut = true\n}) {\n if (block > 0) {\n return {\n type: \"spawn.after\",\n action(_data, context) {\n let timeout;\n function wait() {\n timeout && clearTimeout(timeout);\n timeout = setTimeout(kill, block);\n }\n function stop() {\n context.spawned.stdout?.off(\"data\", wait);\n context.spawned.stderr?.off(\"data\", wait);\n context.spawned.off(\"exit\", stop);\n context.spawned.off(\"close\", stop);\n timeout && clearTimeout(timeout);\n }\n function kill() {\n stop();\n context.kill(new GitPluginError(void 0, \"timeout\", `block timeout reached`));\n }\n stdOut && context.spawned.stdout?.on(\"data\", wait);\n stdErr && context.spawned.stderr?.on(\"data\", wait);\n context.spawned.on(\"exit\", stop);\n context.spawned.on(\"close\", stop);\n wait();\n }\n };\n }\n}\n\n// src/lib/plugins/suffix-paths.plugin.ts\nimport { isPathSpec as isPathSpec3, toPaths } from \"@simple-git/args-pathspec\";\nfunction suffixPathsPlugin() {\n return {\n type: \"spawn.args\",\n action(data) {\n const prefix = [];\n let suffix;\n function append2(args) {\n (suffix = suffix || []).push(...args);\n }\n for (let i = 0; i < data.length; i++) {\n const param = data[i];\n if (isPathSpec3(param)) {\n append2(toPaths(param));\n continue;\n }\n if (param === \"--\") {\n append2(\n data.slice(i + 1).flatMap((item) => isPathSpec3(item) && toPaths(item) || item)\n );\n break;\n }\n prefix.push(param);\n }\n return !suffix ? prefix : [...prefix, \"--\", ...suffix.map(String)];\n }\n };\n}\n\n// src/lib/git-factory.ts\ninit_utils();\nvar Git = require_git();\nfunction gitInstanceFactory(baseDir, options) {\n const plugins = new PluginStore();\n const config = createInstanceConfig(\n baseDir && (typeof baseDir === \"string\" ? { baseDir } : baseDir) || {},\n options\n );\n if (!folderExists(config.baseDir)) {\n throw new GitConstructError(\n config,\n `Cannot use simple-git on a directory that does not exist`\n );\n }\n if (Array.isArray(config.config)) {\n plugins.add(commandConfigPrefixingPlugin(config.config));\n }\n plugins.add(blockUnsafeOperationsPlugin(config.unsafe));\n plugins.add(completionDetectionPlugin(config.completion));\n config.abort && plugins.add(abortPlugin(config.abort));\n config.progress && plugins.add(progressMonitorPlugin(config.progress));\n config.timeout && plugins.add(timeoutPlugin(config.timeout));\n config.spawnOptions && plugins.add(spawnOptionsPlugin(config.spawnOptions));\n plugins.add(suffixPathsPlugin());\n plugins.add(errorDetectionPlugin(errorDetectionHandler(true)));\n config.errors && plugins.add(errorDetectionPlugin(config.errors));\n customBinaryPlugin(plugins, config.binary, config.unsafe?.allowUnsafeCustomBinary);\n return new Git(config, plugins);\n}\n\n// src/lib/runners/promise-wrapped.ts\ninit_git_response_error();\nvar functionNamesBuilderApi = [\"customBinary\", \"env\", \"outputHandler\", \"silent\"];\nvar functionNamesPromiseApi = [\n \"add\",\n \"addAnnotatedTag\",\n \"addConfig\",\n \"addRemote\",\n \"addTag\",\n \"applyPatch\",\n \"binaryCatFile\",\n \"branch\",\n \"branchLocal\",\n \"catFile\",\n \"checkIgnore\",\n \"checkIsRepo\",\n \"checkout\",\n \"checkoutBranch\",\n \"checkoutLatestTag\",\n \"checkoutLocalBranch\",\n \"clean\",\n \"clone\",\n \"commit\",\n \"cwd\",\n \"deleteLocalBranch\",\n \"deleteLocalBranches\",\n \"diff\",\n \"diffSummary\",\n \"exec\",\n \"fetch\",\n \"getRemotes\",\n \"init\",\n \"listConfig\",\n \"listRemote\",\n \"log\",\n \"merge\",\n \"mergeFromTo\",\n \"mirror\",\n \"mv\",\n \"pull\",\n \"push\",\n \"pushTags\",\n \"raw\",\n \"rebase\",\n \"remote\",\n \"removeRemote\",\n \"reset\",\n \"revert\",\n \"revparse\",\n \"rm\",\n \"rmKeepLocal\",\n \"show\",\n \"stash\",\n \"stashList\",\n \"status\",\n \"subModule\",\n \"submoduleAdd\",\n \"submoduleInit\",\n \"submoduleUpdate\",\n \"tag\",\n \"tags\",\n \"updateServerInfo\"\n];\nfunction gitP(...args) {\n let git;\n let chain = Promise.resolve();\n try {\n git = gitInstanceFactory(...args);\n } catch (e) {\n chain = Promise.reject(e);\n }\n function builderReturn() {\n return promiseApi;\n }\n function chainReturn() {\n return chain;\n }\n const promiseApi = [...functionNamesBuilderApi, ...functionNamesPromiseApi].reduce(\n (api, name) => {\n const isAsync = functionNamesPromiseApi.includes(name);\n const valid = isAsync ? asyncWrapper(name, git) : syncWrapper(name, git, api);\n const alternative = isAsync ? chainReturn : builderReturn;\n Object.defineProperty(api, name, {\n enumerable: false,\n configurable: false,\n value: git ? valid : alternative\n });\n return api;\n },\n {}\n );\n return promiseApi;\n function asyncWrapper(fn, git2) {\n return function(...args2) {\n if (typeof args2[args2.length] === \"function\") {\n throw new TypeError(\n \"Promise interface requires that handlers are not supplied inline, trailing function not allowed in call to \" + fn\n );\n }\n return chain.then(function() {\n return new Promise(function(resolve, reject) {\n const callback = (err, result) => {\n if (err) {\n return reject(toError(err));\n }\n resolve(result);\n };\n args2.push(callback);\n git2[fn].apply(git2, args2);\n });\n });\n };\n }\n function syncWrapper(fn, git2, api) {\n return (...args2) => {\n git2[fn](...args2);\n return api;\n };\n }\n}\nfunction toError(error) {\n if (error instanceof Error) {\n return error;\n }\n if (typeof error === \"string\") {\n return new Error(error);\n }\n return new GitResponseError(error);\n}\n\n// src/esm.mjs\nvar simpleGit = gitInstanceFactory;\nvar esm_default = gitInstanceFactory;\nexport {\n CheckRepoActions,\n CleanOptions,\n DiffNameStatus,\n GitConfigScope,\n GitConstructError,\n GitError,\n GitPluginError,\n GitResponseError,\n ResetMode,\n TaskConfigurationError,\n esm_default as default,\n gitP,\n grepQueryBuilder,\n pathspec,\n simpleGit\n};\n//# sourceMappingURL=index.js.map\n", + "const t = /* @__PURE__ */ new WeakMap();\nfunction c(...n) {\n const e = new String(n);\n return t.set(e, n), e;\n}\nfunction r(n) {\n return n instanceof String && t.has(n);\n}\nfunction o(n) {\n return t.get(n) ?? [];\n}\nexport {\n r as isPathSpec,\n c as pathspec,\n o as toPaths\n};\n//# sourceMappingURL=index.mjs.map\n", + "import { isPathSpec as p, toPaths as m } from \"@simple-git/args-pathspec\";\nfunction* w(e, t) {\n const n = t === \"global\";\n for (const o of e)\n o.isGlobal === n && (yield o);\n}\nconst x = /* @__PURE__ */ new Set([\n \"--add\",\n \"--edit\",\n \"--remove-section\",\n \"--rename-section\",\n \"--replace-all\",\n \"--unset\",\n \"--unset-all\",\n \"-e\"\n]), S = /* @__PURE__ */ new Set([\n \"--get\",\n \"--get-all\",\n \"--get-color\",\n \"--get-colorbool\",\n \"--get-regexp\",\n \"--get-urlmatch\",\n \"--list\",\n \"-l\"\n]), k = /* @__PURE__ */ new Set([\n \"edit\",\n \"remove-section\",\n \"rename-section\",\n \"set\",\n \"unset\"\n]), y = /* @__PURE__ */ new Set([\"get\", \"get-color\", \"get-colorbool\", \"list\"]);\nfunction C(e, t) {\n for (const { name: o } of w(e, \"task\")) {\n if (x.has(o))\n return f(!0, t);\n if (S.has(o))\n return f(!1, t);\n }\n const n = t.at(0)?.toLowerCase();\n return n === void 0 ? null : k.has(n) ? f(!0, t.slice(1)) : y.has(n) ? f(!1, t.slice(1)) : t.length === 1 ? f(!1, t) : f(!0, t);\n}\nfunction f(e = !1, t = []) {\n const n = t.at(0)?.toLowerCase();\n return n === void 0 ? null : {\n isWrite: e,\n isRead: !e,\n key: n,\n value: t.at(1)\n };\n}\nfunction N(e, t) {\n return t.isWrite && t.value !== void 0 ? { key: t.key, value: t.value, scope: e } : { key: t.key, scope: e };\n}\nfunction P(e) {\n const t = e?.indexOf(\"=\") || -1;\n return !e || t < 0 ? null : {\n key: e.slice(0, t).trim().toLowerCase(),\n value: e.slice(t + 1)\n };\n}\nfunction U(e) {\n for (const { name: t } of w(e, \"task\"))\n switch (t) {\n case \"--global\":\n return \"global\";\n case \"--system\":\n return \"system\";\n case \"--worktree\":\n return \"worktree\";\n case \"--local\":\n return \"local\";\n case \"--file\":\n case \"-f\":\n return \"file\";\n }\n return \"local\";\n}\nfunction A({ name: e }) {\n if (e === \"-c\" || e === \"--config\")\n return \"inline\";\n if (e === \"--config-env\")\n return \"env\";\n}\nfunction* F(e) {\n for (const t of e) {\n const n = A(t), o = n && P(t.value);\n o && (yield {\n ...o,\n scope: n\n });\n }\n}\nfunction M(e, t, n) {\n const o = {\n read: [],\n write: [...F(t)]\n };\n return e === \"config\" && G(\n o,\n U(t),\n C(t, n)\n ), o;\n}\nfunction G(e, t, n) {\n if (n === null)\n return;\n const o = N(t, n);\n n.isWrite ? e.write.push(o) : e.read.push(o);\n}\nconst v = {\n short: /* @__PURE__ */ new Map([\n [\"c\", !0]\n // -c set config key for this invocation\n ])\n}, O = {\n short: new Map([\n [\"C\", !0],\n // -C change working directory\n [\"P\", !1],\n // -P no pager (alias for --no-pager)\n [\"h\", !1],\n // -h help\n [\"p\", !1],\n // -p paginate\n [\"v\", !1],\n // -v version\n ...v.short.entries()\n ]),\n long: /* @__PURE__ */ new Set([\n \"attr-source\",\n \"config-env\",\n \"exec-path\",\n \"git-dir\",\n \"list-cmds\",\n \"namespace\",\n \"super-prefix\",\n \"work-tree\"\n ])\n}, E = {\n clone: {\n short: /* @__PURE__ */ new Map([\n [\"b\", !0],\n // -b \n [\"j\", !0],\n // -j parallel jobs\n [\"l\", !1],\n // -l local\n [\"n\", !1],\n // -n no-checkout\n [\"o\", !0],\n // -o remote name\n [\"q\", !1],\n // -q quiet\n [\"s\", !1],\n // -s shared\n [\"u\", !0]\n // -u \n ]),\n long: /* @__PURE__ */ new Set([\"branch\", \"config\", \"jobs\", \"origin\", \"upload-pack\", \"u\"])\n },\n commit: {\n short: /* @__PURE__ */ new Map([\n [\"C\", !0],\n // -C reuse message\n [\"F\", !0],\n // -F read message from file\n [\"c\", !0],\n // -c reedit message\n [\"m\", !0],\n // -m \n [\"t\", !0]\n // -t