{"_id":"@npmcli/infer-owner","_rev":"93469","name":"@npmcli/infer-owner","description":"Infer the owner of a path based on the owner of its nearest existing parent","dist-tags":{"latest":"1.0.2"},"maintainers":[{"name":"fritzy","email":"fritzy@netflint.net"},{"name":"lukekarrys","email":"luke@lukekarrys.com"}],"time":{"modified":"2021-06-03T10:31:03.000Z","created":"2019-07-19T22:17:44.844Z","1.0.2":"2019-07-19T22:39:42.405Z","1.0.1":"2019-07-19T22:18:51.143Z","1.0.0":"2019-07-19T22:17:44.844Z"},"users":{},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"repository":{"type":"git","url":"git+https://github.com/npm/infer-owner.git"},"versions":{"1.0.2":{"name":"@npmcli/infer-owner","version":"1.0.2","description":"Infer the owner of a path based on the owner of its nearest existing parent","author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"ISC","scripts":{"test":"tap -J test/*.js --100","snap":"TAP_SNAPSHOT=1 tap -J test/*.js --100","preversion":"npm test","postversion":"npm publish","postpublish":"git push origin --follow-tags"},"devDependencies":{"mutate-fs":"^2.1.1","tap":"^12.4.2"},"main":"index.js","repository":{"type":"git","url":"git+https://github.com/npm/infer-owner.git"},"publishConfig":{"access":"public"},"gitHead":"910943398b79a76939abf063f42e61222a4013df","bugs":{"url":"https://github.com/npm/infer-owner/issues"},"homepage":"https://github.com/npm/infer-owner#readme","_id":"@npmcli/infer-owner@1.0.2","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"shasum":"47460a7ba542c9d1339fee1ff727b26f0d14bb04","size":24031,"noattachment":false,"key":"/@npmcli/infer-owner/-/@npmcli/infer-owner-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@npmcli/infer-owner/download/@npmcli/infer-owner-1.0.2.tgz"},"maintainers":[{"name":"fritzy","email":"fritzy@netflint.net"},{"name":"lukekarrys","email":"luke@lukekarrys.com"}],"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/infer-owner_1.0.2_1563575982171_0.6568274069376756"},"_hasShrinkwrap":false,"publish_time":1563575982405,"_cnpm_publish_time":1563575982405},"1.0.1":{"name":"@npmcli/infer-owner","version":"1.0.1","description":"Infer the owner of a path based on the owner of its nearest existing parent","author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"ISC","scripts":{"test":"tap -J test/*.js --100","snap":"TAP_SNAPSHOT=1 tap -J test/*.js --100","preversion":"npm test","postversion":"npm publish","postpublish":"git push origin --follow-tags"},"devDependencies":{"mutate-fs":"^2.1.1","tap":"^12.4.2"},"main":"index.js","repository":{"type":"git","url":"git+https://github.com/npm/infer-owner.git"},"publishConfig":{"access":"public"},"gitHead":"1284fefec1f91f8cf599f24f024e78a7594d8ae8","bugs":{"url":"https://github.com/npm/infer-owner/issues"},"homepage":"https://github.com/npm/infer-owner#readme","_id":"@npmcli/infer-owner@1.0.1","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"shasum":"f8bcc1ae1e1ef0e13a07479186aa8de1cba0ced2","size":24044,"noattachment":false,"key":"/@npmcli/infer-owner/-/@npmcli/infer-owner-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@npmcli/infer-owner/download/@npmcli/infer-owner-1.0.1.tgz"},"maintainers":[{"name":"fritzy","email":"fritzy@netflint.net"},{"name":"lukekarrys","email":"luke@lukekarrys.com"}],"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/infer-owner_1.0.1_1563574731018_0.8554907503443121"},"_hasShrinkwrap":false,"publish_time":1563574731143,"_cnpm_publish_time":1563574731143},"1.0.0":{"name":"@npmcli/infer-owner","version":"1.0.0","description":"Infer the owner of a path based on the owner of its nearest existing parent","author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"ISC","scripts":{"test":"tap -J test/*.js --100","snap":"TAP_SNAPSHOT=1 tap -J test/*.js --100","preversion":"npm test","postversion":"npm publish","postpublish":"git push origin --follow-tags"},"devDependencies":{"mutate-fs":"^2.1.1","tap":"^12.4.2"},"main":"index.js","repository":{"type":"git","url":"git+https://github.com/npm/infer-owner.git"},"gitHead":"c45c906764fba503b7429c34e4fbfb40501b8898","bugs":{"url":"https://github.com/npm/infer-owner/issues"},"homepage":"https://github.com/npm/infer-owner#readme","_id":"@npmcli/infer-owner@1.0.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"shasum":"8ace262c919e99d756737176782b9567b840b5b3","size":24027,"noattachment":false,"key":"/@npmcli/infer-owner/-/@npmcli/infer-owner-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@npmcli/infer-owner/download/@npmcli/infer-owner-1.0.0.tgz"},"maintainers":[{"name":"fritzy","email":"fritzy@netflint.net"},{"name":"lukekarrys","email":"luke@lukekarrys.com"}],"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/infer-owner_1.0.0_1563574664712_0.485457508489441"},"_hasShrinkwrap":false,"publish_time":1563574664844,"_cnpm_publish_time":1563574664844}},"readme":"# @npmcli/infer-owner\n\nInfer the owner of a path based on the owner of its nearest existing parent\n\n## USAGE\n\n```js\nconst inferOwner = require('@npmcli/infer-owner')\n\ninferOwner('/some/cache/folder/file').then(owner => {\n  // owner is {uid, gid} that should be attached to\n  // the /some/cache/folder/file, based on ownership\n  // of /some/cache/folder, /some/cache, /some, or /,\n  // whichever is the first to exist\n})\n\n// same, but not async\nconst owner = inferOwner.sync('/some/cache/folder/file')\n\n// results are cached!  to reset the cache (eg, to change\n// permissions for whatever reason), do this:\ninferOwner.clearCache()\n```\n\nThis module endeavors to be as performant as possible.  Parallel requests\nfor ownership of the same path will only stat the directories one time.\n\n## API\n\n* `inferOwner(path) -> Promise<{ uid, gid }>`\n\n    If the path exists, return its uid and gid.  If it does not, look to\n    its parent, then its grandparent, and so on.\n\n* `inferOwner(path) -> { uid, gid }`\n\n    Sync form of `inferOwner(path)`.\n\n* `inferOwner.clearCache()`\n\n    Delete all cached ownership information and in-flight tracking.\n","_attachments":{},"homepage":"https://github.com/npm/infer-owner#readme","bugs":{"url":"https://github.com/npm/infer-owner/issues"},"license":"ISC"}