{"_id":"@adam-lynch/git-rev-sync","_rev":"1-ab5b793937cbb80142df23c63bf0207b","name":"@adam-lynch/git-rev-sync","dist-tags":{"latest":"3.0.0-0"},"versions":{"3.0.0-0":{"name":"@adam-lynch/git-rev-sync","version":"3.0.0-0","author":{"name":"kurttheviking"},"bugs":{"url":"https://github.com/kurttheviking/git-rev-sync-js/issues"},"contributors":[{"name":"Kurt Ericson","email":"github@kurttheviking.com","url":"https://github.com/kurttheviking"},{"name":"Jason Denizac","email":"jason@denizac.org","url":"http://jden.us"},{"name":"Thomas Blobaum","email":"tblobaum@gmail.com","url":"https://github.com/tblobaum"},{"name":"Henrik Raitasola","url":"https://github.com/henrikra"},{"name":"Jan Nicklas","url":"https://github.com/jantimon"},{"name":"Hendrik Reker","email":"reker.opensource@gmail.com","url":"https://github.com/reker-"},{"name":"Kevin Yanuk","url":"https://github.com/fugwenna"},{"name":"Lorenz Gardner","url":"https://github.com/LorenzGardner"},{"name":"Colton Clemmer","url":"https://github.com/orbweaver-"},{"name":"Tiberiu Zuld","url":"https://github.com/tiberiuzuld"}],"description":"Synchronously get the current git commit hash, tag, or branch","homepage":"https://github.com/kurttheviking/git-rev-sync-js","license":"MIT","main":"index.js","scripts":{"examples":"node examples/simple","examples-extended":"node examples/extended","test":"node tests/index"},"repository":{"type":"git","url":"git+ssh://git@github.com/kurttheviking/git-rev-sync-js.git"},"dependencies":{"escape-string-regexp":"1.0.5","graceful-fs":"4.1.15","shelljs":"0.8.4"},"devDependencies":{},"gitHead":"8cb87acb68f36700bee1d911961303735a27a374","_id":"@adam-lynch/git-rev-sync@3.0.0-0","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-6IS4RigDrAJFUOL4n5GpObh5J3dTQRSM14DmBAzT0OKE0zb8EW/FhkOpFCEAcpux0yANupxWoBI0jelwhzPtXw==","shasum":"d9b1c4a8cc3b8f9d82d2d4fcdf5757eae33bb5d8","tarball":"https://registry.npmjs.org/@adam-lynch/git-rev-sync/-/git-rev-sync-3.0.0-0.tgz","fileCount":9,"unpackedSize":13350,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTPWTCRA9TVsSAnZWagAAeGUQAIIFOL6yxQeX+VuCp0n7\n7MZiip9qlCLS7q76ExWIO0k1m1Pww8GZmkgtL+WLSTeJpXogdFQjKWV+P6eV\n4HvJSKe3LL4/u67vBJ40mUCqE27mNXmP+hfmFsKjeXhlGfHLxbNQb93rYfS5\n2HnTvIeRZVBMiR61PZeZOhO1gsGAn6IQqoIxR+7hEYgcKCK753vJc5g5wm0j\nVzxrqGeMpaM+NNL+MCUN8/3wOfqzUHUbh4dDif3SfLBULxmjeFlMQWTg6nqR\nJbYdaVOFqY+IBvQQ8FSsiMxVl/mccMRjRTnHsUi22cyILWYTXZHYnnZd+QKh\n/zUCIlck0PLGIOI3pPMbmiUsZy+LHmCgqNJ+z0J0qO70HvClATR67jKgwjE7\nsvMp/UR6EYR9R2LS70udSAZjqXGczpQHaCtz7Q18mMmRiwfhNTYmkzen9Rlr\ni0jLawuD9OJhuWPrKfA/bLtQdwnjZj3MdR0KSODG4CEqT/Yva1qQQYXP/H7s\ncikBdOavWJQVoi74J9rOGXAmlE2bvvmsH9QVI+y/gy9+1HL+phU0p2d4Djof\n7VUdKI+6UMxpEysuspXilrlNDJj4cpTO9upl3EZauIpreyyd4pd3sOPoGA1H\neCNYnEFz4uHZ3dmzOZPi2LtMzGdmq+jltqA7B9y8+iB+cC3B81SDFB2l79O9\neKsw\r\n=sXx2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA8JNQVEME8JVCZ/x0LqMGytZBjOje979rYxOkX2qVohAiEA0nzFmfQm6rHP3BPaxbtbj2MNLO50oPRy/xTfhZ6tXBY="}]},"maintainers":[{"name":"adam-lynch","email":"contact@adamlynch.ie"}],"_npmUser":{"name":"adam-lynch","email":"contact@adamlynch.ie"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/git-rev-sync_3.0.0-0_1598879122588_0.30996669822499734"},"_hasShrinkwrap":false}},"time":{"created":"2020-08-31T13:05:22.586Z","3.0.0-0":"2020-08-31T13:05:22.690Z","modified":"2022-04-04T11:24:54.861Z"},"maintainers":[{"name":"adam-lynch","email":"contact@adamlynch.ie"}],"description":"Synchronously get the current git commit hash, tag, or branch","homepage":"https://github.com/kurttheviking/git-rev-sync-js","repository":{"type":"git","url":"git+ssh://git@github.com/kurttheviking/git-rev-sync-js.git"},"contributors":[{"name":"Kurt Ericson","email":"github@kurttheviking.com","url":"https://github.com/kurttheviking"},{"name":"Jason Denizac","email":"jason@denizac.org","url":"http://jden.us"},{"name":"Thomas Blobaum","email":"tblobaum@gmail.com","url":"https://github.com/tblobaum"},{"name":"Henrik Raitasola","url":"https://github.com/henrikra"},{"name":"Jan Nicklas","url":"https://github.com/jantimon"},{"name":"Hendrik Reker","email":"reker.opensource@gmail.com","url":"https://github.com/reker-"},{"name":"Kevin Yanuk","url":"https://github.com/fugwenna"},{"name":"Lorenz Gardner","url":"https://github.com/LorenzGardner"},{"name":"Colton Clemmer","url":"https://github.com/orbweaver-"},{"name":"Tiberiu Zuld","url":"https://github.com/tiberiuzuld"}],"author":{"name":"kurttheviking"},"bugs":{"url":"https://github.com/kurttheviking/git-rev-sync-js/issues"},"license":"MIT","readme":"git-rev-sync [![Build Status](https://travis-ci.org/kurttheviking/git-rev-sync-js.svg?branch=master)](https://travis-ci.org/kurttheviking/git-rev-sync-js)\n============\n\nSynchronously get the current git commit hash, tag, count, branch or commit message. Forked from [git-rev](https://github.com/tblobaum/git-rev).\n\n\n## Example\n\n```js\nvar git = require('git-rev-sync');\n\nconsole.log(git.short());\n// 75bf4ee\n\nconsole.log(git.long());\n// 75bf4eea9aa1a7fd6505d0d0aa43105feafa92ef\n\nconsole.log(git.branch());\n// master\n```\n\nYou can also run these examples via: `npm run examples`\n\n\n## Install\n\n`npm install git-rev-sync --save`\n\n\n## API\n\n``` js\nvar git = require('git-rev-sync');\n```\n\n#### `git.short([filePath], [length])` &rarr; &lt;String&gt;\n\nreturn the result of `git rev-parse --short HEAD`\n\n- optional `filePath` parameter can be used to run the command against a repo outside the current working directory\n- optional `length` parameter can be used to set the desired hash length (defaults to `7`)\n\n#### `git.long([filePath])` &rarr; &lt;String&gt;\n\nreturn the result of `git rev-parse HEAD`; optional `filePath` parameter can be used to run the command against a repo outside the current working directory\n\n#### `git.branch([filePath])` &rarr; &lt;String&gt;\n\nreturn the current branch; optional `filePath` parameter can be used to run the command against a repo outside the current working directory\n\n#### `git.count()` &rarr; &lt;Number&gt;\n\nreturn the count of commits across all branches; this method will fail if the `git` command is not found in `PATH`\n\n#### `git.date()` &rarr; &lt;Date&gt;\n\nreturns the date of the current commit; this method will fail if the `git` command is not found in `PATH`\n\n#### `git.hasUnstagedChanges()` &rarr; &lt;Boolean&gt;\n\nreturns true if there are unstaged changes; this method will fail if the `git` command is not found in `PATH`\n\n#### `git.isDrty()` &rarr; &lt;Boolean&gt;\n\nreturns true if there are uncommitted changes; this method will fail if the `git` command is not found in `PATH`\n\n#### `git.isTagDirty()` &rarr; &lt;Boolean&gt;\n\nreturns true if the current tag is dirty; this method will fail if the `git` command is not found in `PATH`\n\n#### `git.message()` &rarr; &lt;String&gt;\n\nreturn the current commit message; this method will fail if the `git` command is not found in `PATH`\n\n#### `git.remoteUrl()` &rarr; &lt;String&gt;\n\nreturn the current remote URL; this method will fail if the `git` command is not found in `PATH`\n\n#### `git.tag([markDirty])` &rarr; &lt;String&gt;\n\nreturn the current tag and mark as dirty if markDirty is truthful; this method will fail if the `git` command is not found in `PATH`\n\n\n## License\n\n[MIT](https://github.com/kurttheviking/git-rev-sync/blob/master/LICENSE)\n\n\n## Donations\n\n[We're all in this together](https://cash.me/$kurttheviking)\n","readmeFilename":"README.md"}