{"_id":"@probot/get-private-key","_rev":"2956868","name":"@probot/get-private-key","description":"Get private key from a path, environment variables, or a `*.pem` file in the current working directory","dist-tags":{"latest":"1.1.1"},"maintainers":[{"name":"bkeepers","email":""},{"name":"gr2m","email":"gregor@martynus.net"},{"name":"lee-dohm","email":"lee@lee-dohm.com"}],"time":{"modified":"2023-04-27T07:40:18.000Z","created":"2020-11-18T19:58:38.609Z","1.1.1":"2021-07-13T17:26:26.920Z","1.1.0":"2020-11-18T21:32:32.605Z","1.0.0":"2020-11-18T19:58:38.609Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/probot/get-private-key.git"},"versions":{"1.1.1":{"name":"@probot/get-private-key","description":"Get private key from a path, environment variables, or a `*.pem` file in the current working directory","version":"1.1.1","license":"ISC","pika":true,"sideEffects":false,"keywords":["github-app","probot"],"repository":{"type":"git","url":"git+https://github.com/probot/get-private-key.git"},"dependencies":{"@types/is-base64":"^1.1.0","is-base64":"^1.1.0"},"devDependencies":{"@pika/pack":"^0.5.0","@pika/plugin-build-node":"^0.9.0","@pika/plugin-build-web":"^0.9.0","@pika/plugin-ts-standard-pkg":"^0.9.0","@tsconfig/node12":"^1.0.7","@types/jest":"^26.0.0","jest":"^26.0.1","prettier":"^2.1.2","semantic-release":"^17.0.0","semantic-release-plugin-update-version-in-files":"^1.0.0","ts-jest":"^26.0.0","typescript":"^4.0.5"},"publishConfig":{"access":"public"},"source":"dist-src/index.js","types":"dist-types/index.d.ts","main":"dist-node/index.js","bugs":{"url":"https://github.com/probot/get-private-key/issues"},"homepage":"https://github.com/probot/get-private-key#readme","_id":"@probot/get-private-key@1.1.1","_nodeVersion":"12.22.1","_npmVersion":"6.14.8","dist":{"shasum":"12bf61d00a15760d9b0bd713a794f9c4ba4ad5d3","size":4949,"noattachment":false,"key":"/@probot/get-private-key/-/@probot/get-private-key-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@probot/get-private-key/download/@probot/get-private-key-1.1.1.tgz"},"_npmUser":{"name":"probotbot","email":"probotbot@martynus.net"},"directories":{},"maintainers":[{"name":"bkeepers","email":""},{"name":"gr2m","email":"gregor@martynus.net"},{"name":"lee-dohm","email":"lee@lee-dohm.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-private-key_1.1.1_1626197186800_0.21993813213715163"},"_hasShrinkwrap":false,"publish_time":1626197186920,"_cnpm_publish_time":1626197186920,"_cnpmcore_publish_time":"2021-12-16T21:26:18.447Z"},"1.1.0":{"name":"@probot/get-private-key","description":"Get private key from a path, environment variables, or a `*.pem` file in the current working directory","version":"1.1.0","license":"ISC","pika":true,"sideEffects":false,"keywords":["github-app","probot"],"repository":{"type":"git","url":"git+https://github.com/probot/get-private-key.git"},"dependencies":{"@types/is-base64":"^1.1.0","is-base64":"^1.1.0"},"devDependencies":{"@pika/pack":"^0.5.0","@pika/plugin-build-node":"^0.9.0","@pika/plugin-build-web":"^0.9.0","@pika/plugin-ts-standard-pkg":"^0.9.0","@tsconfig/node12":"^1.0.7","@types/jest":"^26.0.0","jest":"^26.0.1","prettier":"^2.1.2","semantic-release":"^17.0.0","semantic-release-plugin-update-version-in-files":"^1.0.0","ts-jest":"^26.0.0","typescript":"^4.0.5"},"publishConfig":{"access":"public"},"source":"dist-src/index.js","types":"dist-types/index.d.ts","main":"dist-node/index.js","bugs":{"url":"https://github.com/probot/get-private-key/issues"},"homepage":"https://github.com/probot/get-private-key#readme","_id":"@probot/get-private-key@1.1.0","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"shasum":"d29abe3d2b5130701234dc23d0cd2f220f55bbc1","size":4443,"noattachment":false,"key":"/@probot/get-private-key/-/@probot/get-private-key-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@probot/get-private-key/download/@probot/get-private-key-1.1.0.tgz"},"_npmUser":{"name":"probotbot","email":"probotbot@martynus.net"},"directories":{},"maintainers":[{"name":"bkeepers","email":""},{"name":"gr2m","email":"gregor@martynus.net"},{"name":"lee-dohm","email":"lee@lee-dohm.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-private-key_1.1.0_1605735152490_0.6145261745693256"},"_hasShrinkwrap":false,"publish_time":1605735152605,"_cnpm_publish_time":1605735152605,"_cnpmcore_publish_time":"2021-12-16T21:26:19.076Z"},"1.0.0":{"name":"@probot/get-private-key","description":"Get private key from a path, environment variables, or a `*.pem` file in the current working directory","version":"1.0.0","license":"ISC","pika":true,"sideEffects":false,"keywords":["github-app","probot"],"repository":{"type":"git","url":"git+https://github.com/probot/get-private-key.git"},"dependencies":{"@types/is-base64":"^1.1.0","is-base64":"^1.1.0"},"devDependencies":{"@pika/pack":"^0.5.0","@pika/plugin-build-node":"^0.9.0","@pika/plugin-build-web":"^0.9.0","@pika/plugin-ts-standard-pkg":"^0.9.0","@tsconfig/node12":"^1.0.7","@types/jest":"^26.0.0","jest":"^26.0.1","prettier":"^2.1.2","semantic-release":"^17.0.0","semantic-release-plugin-update-version-in-files":"^1.0.0","ts-jest":"^26.0.0","typescript":"^4.0.5"},"publishConfig":{"access":"public"},"source":"dist-src/index.js","types":"dist-types/index.d.ts","main":"dist-node/index.js","bugs":{"url":"https://github.com/probot/get-private-key/issues"},"homepage":"https://github.com/probot/get-private-key#readme","_id":"@probot/get-private-key@1.0.0","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"shasum":"a947f3593797925f1d1dd78978f6900fe0d2828e","size":4319,"noattachment":false,"key":"/@probot/get-private-key/-/@probot/get-private-key-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@probot/get-private-key/download/@probot/get-private-key-1.0.0.tgz"},"_npmUser":{"name":"probotbot","email":"probotbot@martynus.net"},"directories":{},"maintainers":[{"name":"bkeepers","email":""},{"name":"gr2m","email":"gregor@martynus.net"},{"name":"lee-dohm","email":"lee@lee-dohm.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-private-key_1.0.0_1605729518491_0.5174197191119876"},"_hasShrinkwrap":false,"publish_time":1605729518609,"_cnpm_publish_time":1605729518609,"_cnpmcore_publish_time":"2021-12-16T21:26:19.304Z"}},"readme":"# @probot/get-private-key\n\n> Get private key from a file path, environment variables, or a `*.pem` file in the current working directory\n\n[![@latest](https://img.shields.io/npm/v/@probot/get-private-key.svg)](https://www.npmjs.com/package/@probot/get-private-key)\n[![Build Status](https://github.com/probot/get-private-key/workflows/Test/badge.svg)](https://github.com/probot/get-private-key/actions?query=workflow%3ATest)\n\nFinds a private key through various user-(un)specified methods. Order of precedence:\n\n1. Explicit file path option\n2. `PRIVATE_KEY` environment variable or explicit `env.PRIVATE_KEY` option. The private key can optionally be base64 encoded.\n3. `PRIVATE_KEY_PATH` environment variable or explicit `env.PRIVATE_KEY_PATH` option\n4. Any file w/ `.pem` extension in current working dir\n\n## Usage\n\n<table>\n<tbody valign=top align=left>\n<tr><th>\nBrowsers\n</th><td width=100%>\n\n`@probot/get-private-key` is not compatible with browser usage\n\n</td></tr>\n<tr><th>\nNode\n</th><td>\n\nInstall with <code>npm install octokit-auth-probot</code>\n\n```js\nconst { Probot } = require(\"probot\");\nconst { getPrivateKey } = require(\"@probot/get-private-key\");\n```\n\n</td></tr>\n</tbody>\n</table>\n\n```js\nconst probot = new Probot({\n  appId: 123,\n  privateKey: getPrivateKey(),\n});\n```\n\n## Options\n\n<table>\n  <thead align=left>\n    <tr>\n      <th>\n        name\n      </th>\n      <th>\n        type\n      </th>\n      <th width=100%>\n        description\n      </th>\n    </tr>\n  </thead>\n  <tbody align=left valign=top>\n    <tr>\n      <th>\n        <code>options.filepath</code>\n      </th>\n      <td>\n        <code>string<code>\n      </td>\n      <td>\n\nPass a path to a `*.pem` file. A relative path will be resolved to the current working directory (which you can set with the `cwd` option)\n\n```js\nconst privateKey = getPrivateKey({\n  filepath: \"private-key.pem\",\n});\n```\n\n</td>\n    </tr>\n    <tr>\n      <th>\n        <code>options.cwd</code>\n      </th>\n      <td>\n        <code>string<code>\n      </td>\n      <td>\n\nDefaults to `process.cwd()`. Used to resolve the `filepath` option and used as folder to find `*.pem` files.\n\n```js\nconst privateKey = getPrivateKey({\n  cwd: \"/app/current\",\n});\n```\n\n</td>\n    </tr>\n    <tr>\n      <th>\n        <code>options.env</code>\n      </th>\n      <td>\n        <code>object<code>\n      </td>\n      <td>\n\nDefaults to `process.env`. Pass `env.PRIVATE_KEY` or `env.PRIVATE_KEY_PATH` to workaround reading environment variables\n\n```js\nconst privateKey = getPrivateKey({\n  env: {\n    PRIVATE_KEY: \"-----BEGIN RSA PRIVATE KEY-----\\n...\",\n  },\n});\n```\n\n</td>\n    </tr>\n  </tbody>\n</table>\n\n## LICENSE\n\n[ISC](LICENSE)\n","_attachments":{},"homepage":"https://github.com/probot/get-private-key#readme","bugs":{"url":"https://github.com/probot/get-private-key/issues"},"license":"ISC"}