Comparing version 1.40.0 to 1.41.0
@@ -42,20 +42,20 @@ /** The git errors which can be parsed from failed git commands. */ | ||
export declare const GitErrorRegexes: { | ||
"ERROR: ([\\s\\S]+?)\\n+\\[EPOLICYKEYAGE\\]\\n+fatal: Could not read from remote repository.": GitError; | ||
'ERROR: ([\\s\\S]+?)\\n+\\[EPOLICYKEYAGE\\]\\n+fatal: Could not read from remote repository.': GitError; | ||
"fatal: Authentication failed for 'https://": GitError; | ||
"fatal: Authentication failed": GitError; | ||
"fatal: Could not read from remote repository.": GitError; | ||
"The requested URL returned error: 403": GitError; | ||
"fatal: The remote end hung up unexpectedly": GitError; | ||
'fatal: Authentication failed': GitError; | ||
'fatal: Could not read from remote repository.': GitError; | ||
'The requested URL returned error: 403': GitError; | ||
'fatal: The remote end hung up unexpectedly': GitError; | ||
"fatal: unable to access '(.+)': Failed to connect to (.+): Host is down": GitError; | ||
"Failed to merge in the changes.": GitError; | ||
"(Merge conflict|Automatic merge failed; fix conflicts and then commit the result)": GitError; | ||
'Failed to merge in the changes.': GitError; | ||
'(Merge conflict|Automatic merge failed; fix conflicts and then commit the result)': GitError; | ||
"fatal: repository '(.+)' not found": GitError; | ||
"ERROR: Repository not found": GitError; | ||
'ERROR: Repository not found': GitError; | ||
"\\((non-fast-forward|fetch first)\\)\nerror: failed to push some refs to '.*'": GitError; | ||
"error: unable to delete '(.+)': remote ref does not exist": GitError; | ||
"\\[remote rejected\\] (.+) \\(deletion of the current branch prohibited\\)": GitError; | ||
'\\[remote rejected\\] (.+) \\(deletion of the current branch prohibited\\)': GitError; | ||
"error: could not revert .*\nhint: after resolving the conflicts, mark the corrected paths\nhint: with 'git add <paths>' or 'git rm <paths>'\nhint: and commit the result with 'git commit'": GitError; | ||
"Applying: .*\nNo changes - did you forget to use 'git add'\\?\nIf there is nothing left to stage, chances are that something else\n.*": GitError; | ||
"There are no candidates for (rebasing|merging) among the refs that you just fetched.\nGenerally this means that you provided a wildcard refspec which had no\nmatches on the remote end.": GitError; | ||
"nothing to commit": GitError; | ||
'There are no candidates for (rebasing|merging) among the refs that you just fetched.\nGenerally this means that you provided a wildcard refspec which had no\nmatches on the remote end.': GitError; | ||
'nothing to commit': GitError; | ||
"No submodule mapping found in .gitmodules for path '(.+)'": GitError; | ||
@@ -65,17 +65,17 @@ "fatal: repository '(.+)' does not exist\nfatal: clone of '.+' into submodule path '(.+)' failed": GitError; | ||
"fatal: could not create work tree dir '(.+)'.*: Permission denied": GitError; | ||
"merge: (.+) - not something we can merge": GitError; | ||
"invalid upstream (.+)": GitError; | ||
"fatal: Non-fast-forward commit does not make sense into an empty head": GitError; | ||
"error: (.+): (patch does not apply|already exists in working directory)": GitError; | ||
'merge: (.+) - not something we can merge': GitError; | ||
'invalid upstream (.+)': GitError; | ||
'fatal: Non-fast-forward commit does not make sense into an empty head': GitError; | ||
'error: (.+): (patch does not apply|already exists in working directory)': GitError; | ||
"fatal: A branch named '(.+)' already exists.": GitError; | ||
"fatal: bad revision '(.*)'": GitError; | ||
"fatal: Not a git repository \\(or any of the parent directories\\): (.*)": GitError; | ||
"fatal: refusing to merge unrelated histories": GitError; | ||
"error: GH001: ": GitError; | ||
"error: GH002: ": GitError; | ||
"error: GH003: Sorry, force-pushing to (.+) is not allowed.": GitError; | ||
"error: GH005: Sorry, refs longer than (.+) bytes are not allowed": GitError; | ||
"error: GH006: Protected branch update failed for (.+)\nremote: error: At least one approved review is required": GitError; | ||
"error: GH006: Protected branch update failed for (.+)\nremote: error: Cannot force-push to a protected branch": GitError; | ||
"error: GH007: Your push would publish a private email address.": GitError; | ||
'fatal: Not a git repository \\(or any of the parent directories\\): (.*)': GitError; | ||
'fatal: refusing to merge unrelated histories': GitError; | ||
'error: GH001: ': GitError; | ||
'error: GH002: ': GitError; | ||
'error: GH003: Sorry, force-pushing to (.+) is not allowed.': GitError; | ||
'error: GH005: Sorry, refs longer than (.+) bytes are not allowed': GitError; | ||
'error: GH006: Protected branch update failed for (.+)\nremote: error: At least one approved review is required': GitError; | ||
'error: GH006: Protected branch update failed for (.+)\nremote: error: Cannot force-push to a protected branch': GitError; | ||
'error: GH007: Your push would publish a private email address.': GitError; | ||
}; | ||
@@ -82,0 +82,0 @@ /** |
@@ -46,20 +46,20 @@ "use strict"; | ||
exports.GitErrorRegexes = { | ||
"ERROR: ([\\s\\S]+?)\\n+\\[EPOLICYKEYAGE\\]\\n+fatal: Could not read from remote repository.": GitError.SSHKeyAuditUnverified, | ||
'ERROR: ([\\s\\S]+?)\\n+\\[EPOLICYKEYAGE\\]\\n+fatal: Could not read from remote repository.': GitError.SSHKeyAuditUnverified, | ||
"fatal: Authentication failed for 'https://": GitError.HTTPSAuthenticationFailed, | ||
"fatal: Authentication failed": GitError.SSHAuthenticationFailed, | ||
"fatal: Could not read from remote repository.": GitError.SSHPermissionDenied, | ||
"The requested URL returned error: 403": GitError.HTTPSAuthenticationFailed, | ||
"fatal: The remote end hung up unexpectedly": GitError.RemoteDisconnection, | ||
'fatal: Authentication failed': GitError.SSHAuthenticationFailed, | ||
'fatal: Could not read from remote repository.': GitError.SSHPermissionDenied, | ||
'The requested URL returned error: 403': GitError.HTTPSAuthenticationFailed, | ||
'fatal: The remote end hung up unexpectedly': GitError.RemoteDisconnection, | ||
"fatal: unable to access '(.+)': Failed to connect to (.+): Host is down": GitError.HostDown, | ||
"Failed to merge in the changes.": GitError.RebaseConflicts, | ||
"(Merge conflict|Automatic merge failed; fix conflicts and then commit the result)": GitError.MergeConflicts, | ||
'Failed to merge in the changes.': GitError.RebaseConflicts, | ||
'(Merge conflict|Automatic merge failed; fix conflicts and then commit the result)': GitError.MergeConflicts, | ||
"fatal: repository '(.+)' not found": GitError.HTTPSRepositoryNotFound, | ||
"ERROR: Repository not found": GitError.SSHRepositoryNotFound, | ||
'ERROR: Repository not found': GitError.SSHRepositoryNotFound, | ||
"\\((non-fast-forward|fetch first)\\)\nerror: failed to push some refs to '.*'": GitError.PushNotFastForward, | ||
"error: unable to delete '(.+)': remote ref does not exist": GitError.BranchDeletionFailed, | ||
"\\[remote rejected\\] (.+) \\(deletion of the current branch prohibited\\)": GitError.DefaultBranchDeletionFailed, | ||
'\\[remote rejected\\] (.+) \\(deletion of the current branch prohibited\\)': GitError.DefaultBranchDeletionFailed, | ||
"error: could not revert .*\nhint: after resolving the conflicts, mark the corrected paths\nhint: with 'git add <paths>' or 'git rm <paths>'\nhint: and commit the result with 'git commit'": GitError.RevertConflicts, | ||
"Applying: .*\nNo changes - did you forget to use 'git add'\\?\nIf there is nothing left to stage, chances are that something else\n.*": GitError.EmptyRebasePatch, | ||
"There are no candidates for (rebasing|merging) among the refs that you just fetched.\nGenerally this means that you provided a wildcard refspec which had no\nmatches on the remote end.": GitError.NoMatchingRemoteBranch, | ||
"nothing to commit": GitError.NothingToCommit, | ||
'There are no candidates for (rebasing|merging) among the refs that you just fetched.\nGenerally this means that you provided a wildcard refspec which had no\nmatches on the remote end.': GitError.NoMatchingRemoteBranch, | ||
'nothing to commit': GitError.NothingToCommit, | ||
"No submodule mapping found in .gitmodules for path '(.+)'": GitError.NoSubmoduleMapping, | ||
@@ -69,18 +69,18 @@ "fatal: repository '(.+)' does not exist\nfatal: clone of '.+' into submodule path '(.+)' failed": GitError.SubmoduleRepositoryDoesNotExist, | ||
"fatal: could not create work tree dir '(.+)'.*: Permission denied": GitError.LocalPermissionDenied, | ||
"merge: (.+) - not something we can merge": GitError.InvalidMerge, | ||
"invalid upstream (.+)": GitError.InvalidRebase, | ||
"fatal: Non-fast-forward commit does not make sense into an empty head": GitError.NonFastForwardMergeIntoEmptyHead, | ||
"error: (.+): (patch does not apply|already exists in working directory)": GitError.PatchDoesNotApply, | ||
'merge: (.+) - not something we can merge': GitError.InvalidMerge, | ||
'invalid upstream (.+)': GitError.InvalidRebase, | ||
'fatal: Non-fast-forward commit does not make sense into an empty head': GitError.NonFastForwardMergeIntoEmptyHead, | ||
'error: (.+): (patch does not apply|already exists in working directory)': GitError.PatchDoesNotApply, | ||
"fatal: A branch named '(.+)' already exists.": GitError.BranchAlreadyExists, | ||
"fatal: bad revision '(.*)'": GitError.BadRevision, | ||
"fatal: Not a git repository \\(or any of the parent directories\\): (.*)": GitError.NotAGitRepository, | ||
"fatal: refusing to merge unrelated histories": GitError.CannotMergeUnrelatedHistories, | ||
'fatal: Not a git repository \\(or any of the parent directories\\): (.*)': GitError.NotAGitRepository, | ||
'fatal: refusing to merge unrelated histories': GitError.CannotMergeUnrelatedHistories, | ||
// GitHub-specific errors | ||
"error: GH001: ": GitError.PushWithFileSizeExceedingLimit, | ||
"error: GH002: ": GitError.HexBranchNameRejected, | ||
"error: GH003: Sorry, force-pushing to (.+) is not allowed.": GitError.ForcePushRejected, | ||
"error: GH005: Sorry, refs longer than (.+) bytes are not allowed": GitError.InvalidRefLength, | ||
"error: GH006: Protected branch update failed for (.+)\nremote: error: At least one approved review is required": GitError.ProtectedBranchRequiresReview, | ||
"error: GH006: Protected branch update failed for (.+)\nremote: error: Cannot force-push to a protected branch": GitError.ProtectedBranchForcePush, | ||
"error: GH007: Your push would publish a private email address.": GitError.PushWithPrivateEmail | ||
'error: GH001: ': GitError.PushWithFileSizeExceedingLimit, | ||
'error: GH002: ': GitError.HexBranchNameRejected, | ||
'error: GH003: Sorry, force-pushing to (.+) is not allowed.': GitError.ForcePushRejected, | ||
'error: GH005: Sorry, refs longer than (.+) bytes are not allowed': GitError.InvalidRefLength, | ||
'error: GH006: Protected branch update failed for (.+)\nremote: error: At least one approved review is required': GitError.ProtectedBranchRequiresReview, | ||
'error: GH006: Protected branch update failed for (.+)\nremote: error: Cannot force-push to a protected branch': GitError.ProtectedBranchForcePush, | ||
'error: GH007: Your push would publish a private email address.': GitError.PushWithPrivateEmail | ||
}; | ||
@@ -87,0 +87,0 @@ /** |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const path = require("path"); | ||
function resolveEmbeddedGitDir() { | ||
const s = path.sep; | ||
return path | ||
.resolve(__dirname, '..', '..', 'git') | ||
.replace(/[\\\/]app.asar[\\\/]/, `${s}app.asar.unpacked${s}`); | ||
} | ||
/** | ||
@@ -15,5 +21,3 @@ * Find the path to the embedded Git environment. | ||
else { | ||
const s = path.sep; | ||
return path.resolve(__dirname, '..', '..', 'git') | ||
.replace(/[\\\/]app.asar[\\\/]/, `${s}app.asar.unpacked${s}`); | ||
return resolveEmbeddedGitDir(); | ||
} | ||
@@ -70,3 +74,3 @@ } | ||
GIT_EXEC_PATH: resolveGitExecPath(), | ||
PATH: envPath, | ||
PATH: envPath | ||
}, environmentVariables); | ||
@@ -94,6 +98,9 @@ if (process.platform === 'win32') { | ||
env.PREFIX = gitDir; | ||
// bypass whatever certificates might be set and use | ||
// the bundle included in the distribution | ||
const sslCABundle = `${gitDir}/ssl/cacert.pem`; | ||
env.GIT_SSL_CAINFO = sslCABundle; | ||
if (!env.GIT_SSL_CAINFO && !env.LOCAL_GIT_DIRECTORY) { | ||
// use the SSL certificate bundle included in the distribution only | ||
// when using embedded Git and not providing your own bundle | ||
const distDir = resolveEmbeddedGitDir(); | ||
const sslCABundle = `${distDir}/ssl/cacert.pem`; | ||
env.GIT_SSL_CAINFO = sslCABundle; | ||
} | ||
} | ||
@@ -100,0 +107,0 @@ return { env, gitLocation }; |
{ | ||
"name": "dugite", | ||
"version": "1.40.0", | ||
"version": "1.41.0", | ||
"description": "Elegant bindings for Git", | ||
@@ -9,10 +9,12 @@ "main": "./build/lib/index.js", | ||
"clean": "rimraf build", | ||
"lint": "tslint lib/**/*.ts script/**/*.ts", | ||
"build": "npm run clean && npm run lint && tsc -p ./tsconfig.json && tsc -p ./examples/tsconfig.json", | ||
"build": "npm run clean && tsc -p ./tsconfig.json && tsc -p ./examples/tsconfig.json", | ||
"prepublish": "npm run build && npm run test", | ||
"postpublish": "git push --follow-tags", | ||
"test": "npm run test:fast && npm run test:slow", | ||
"test": "npm run test:fast && npm run test:slow && npm run test:external", | ||
"test:fast": "cross-env LOCAL_GIT_DIRECTORY=./git/ mocha --require ts-node/register test/fast/*.ts test/auth/*.ts", | ||
"test:slow": "cross-env LOCAL_GIT_DIRECTORY=./git/ mocha -t 20000ms --require ts-node/register test/slow/*.ts test/auth/*.ts", | ||
"postinstall": "node ./script/download-git.js" | ||
"test:external": "mocha -t 20000ms --require ts-node/register test/external/*.ts", | ||
"postinstall": "node ./script/download-git.js", | ||
"prettify": "prettier \"{examples,lib,script,test}/**/*.ts\" --write", | ||
"is-it-pretty": "prettier \"{examples,lib,script,test}/**/*.ts\" --list-different" | ||
}, | ||
@@ -55,8 +57,9 @@ "engines": { | ||
"cross-env": "^4.0.0", | ||
"find-git-exec": "0.0.1-alpha.2", | ||
"mocha": "^3.3.0", | ||
"prettier": "^1.6.1", | ||
"temp": "^0.8.3", | ||
"ts-node": "^3.0.2", | ||
"tslint": "^5.1.0", | ||
"typescript": "^2.3.2" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
49646
22
659
18