{"_id":"@npmcli/infer-owner","_rev":"179389","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":"adam_baldwin","email":"evilpacket@gmail.com"},{"name":"ahmadnassri","email":"ahmad@ahmadnassri.com"},{"name":"isaacs","email":"i@izs.me"}],"time":{"modified":"2024-06-11T09:44:00.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":{"url":"https://izs.me","name":"Isaac Z. Schlueter","email":"i@izs.me"},"repository":{"url":"git+https://github.com/npm/infer-owner.git","type":"git"},"versions":{"1.0.2":{"name":"@npmcli/infer-owner","version":"1.0.2","author":{"url":"https://izs.me","name":"Isaac Z. Schlueter","email":"i@izs.me"},"license":"ISC","_id":"@npmcli/infer-owner@1.0.2","maintainers":[{"name":"adam_baldwin","email":"evilpacket@gmail.com"},{"name":"ahmadnassri","email":"ahmad@ahmadnassri.com"},{"name":"isaacs","email":"i@izs.me"}],"homepage":"https://github.com/npm/infer-owner#readme","bugs":{"url":"https://github.com/npm/infer-owner/issues"},"dist":{"shasum":"47460a7ba542c9d1339fee1ff727b26f0d14bb04","tarball":"http://registry-npm.ywwl.com/@npmcli/infer-owner/download/@npmcli/infer-owner-1.0.2.tgz","fileCount":7,"integrity":"sha512-AUfK26WKmdb+pE+DzxRxN8xVQYkxDiKDDafIfonWd35QEaZB0nGnGxi4Hj7Dc7GE3LPUkjiyAA0d43GXXlSfxQ==","signatures":[{"sig":"MEYCIQDWs0UO1WYIxHp42PiuBuPTyZOLCiVhIOvKJQ15kfQ5QAIhALv6Vu4AXC83M05yA1G1vDWMm+vQSPT7/Y6ctYFXImii","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":82629,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdMkauCRA9TVsSAnZWagAA86UQAIDj5rvAvpgot1iIiYGA\nylh9Guq9de7FNf+R14XEjuTotIc6CeEvoRfZMThskyqIRrVb0ixikYt3V2Ym\naBS+DPAGt/1oLlbolwGKnd4VWb+SapmhMy0ThpN58owtHsKfPpsCCDdrlnSm\neUonuhqCY5ZQ0gVPcWTN14E28FbREHtP08Lwk0jJW2pvgBMYlIgpamHx4mid\nuEQGqm92odme3NzgCmFjXlN0CFFhb+TChotAoWetD3ihPrgsKtEx4iCR51fF\nahYkEhoky5Dub5TblMBWRx5Q0cQvUh1KVjAuQP9z+mrLUEPNz3YETklIP8n/\nD5qmHlYwq6I6dYERNSW9CC6ieVcHo9PTRFa+7+uUxAusdYaP3YCaSXJMAUW7\nojMt6acXi7HGbUJWr90zkOH6tg9qvyCtlh3cXnp8cI6eX99r/i2+CFSMRv1M\nCajyKnII7Hrw9+mRJ3zifF2eUbpY9wAAeTZO49y9Jlpo0/wCbdl/OyHe8OQ9\n2fF1ZWnLGPALGrVRdgUT5ZtvMzYPtJKxNNi7jXTDvFhi9swVn6R340UXGKUz\nBz+52/uQoNZuRCw23GFp1V+LmR5FEm4QP6x6nOTZiaxvGzFidCm4XTbUt+4W\nynhq+/dZjAKtlZkwUjbjlSmlrKys5Velab/XH5tI2+GZJwLYK1AdCjRuQaDs\nUtjA\r\n=wpYl\r\n-----END PGP SIGNATURE-----\r\n","size":24031,"noattachment":false,"key":"/@npmcli/infer-owner/-/@npmcli/infer-owner-1.0.2.tgz"},"main":"index.js","gitHead":"910943398b79a76939abf063f42e61222a4013df","scripts":{"snap":"TAP_SNAPSHOT=1 tap -J test/*.js --100","test":"tap -J test/*.js --100","preversion":"npm test","postpublish":"git push origin --follow-tags","postversion":"npm publish"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"deprecated":"This package is no longer supported.","repository":{"url":"git+https://github.com/npm/infer-owner.git","type":"git"},"_npmVersion":"6.9.0","description":"Infer the owner of a path based on the owner of its nearest existing parent","directories":{},"_nodeVersion":"12.6.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^12.4.2","mutate-fs":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/infer-owner_1.0.2_1563575982171_0.6568274069376756","host":"s3://npm-registry-packages"},"publish_time":1563575982405,"_cnpm_publish_time":1563575982405},"1.0.1":{"name":"@npmcli/infer-owner","version":"1.0.1","author":{"url":"https://izs.me","name":"Isaac Z. Schlueter","email":"i@izs.me"},"license":"ISC","_id":"@npmcli/infer-owner@1.0.1","maintainers":[{"name":"adam_baldwin","email":"evilpacket@gmail.com"},{"name":"ahmadnassri","email":"ahmad@ahmadnassri.com"},{"name":"isaacs","email":"i@izs.me"}],"homepage":"https://github.com/npm/infer-owner#readme","bugs":{"url":"https://github.com/npm/infer-owner/issues"},"dist":{"shasum":"f8bcc1ae1e1ef0e13a07479186aa8de1cba0ced2","tarball":"http://registry-npm.ywwl.com/@npmcli/infer-owner/download/@npmcli/infer-owner-1.0.1.tgz","fileCount":7,"integrity":"sha512-+pkx3FtwnFgRA50Rj5ASorC/nbO730+WzpiNR20fwxZd9vyXXzfCcarFXBYX7YFxENGnf67L68rXGgXMfajLsg==","signatures":[{"sig":"MEYCIQDYD7L68tDZBNFpXHiUVHsw3knr0lf+PyCJIaZQte9VVQIhAOT9XPSug57HuzvoSL+xO6C2gQYPy+ENWUUj2CWOhQX5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":82673,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdMkHLCRA9TVsSAnZWagAAvbYQAJSspplBp7sZ2Vorvv2a\n/pZrUNNNVrbQhdMtN3fWLAvsG/NMhHY4QprLklDKXYEdLsWNhXxhaoL05sE6\nlb8pZAz6uWVobMhh2jMq5AxyUSBq+k3lzMYXqvCYxOZxb2VfvoqEffnUumap\nDQbEpgbtALO3kezb4/sEp7ZLvG1jZuUlK2pIhAIfw6PZ4Hrb91zmsoPhhK/F\nrUL3h5ZOt6rUOXJyixSfC2SKVJDxy6GJqyF5BB3spzhImd7Xz/eB0SlooVz4\nFr7MrkvJ4BEt6nfpPsZsfMVTPfX1uuAaRaRwi295DBTXvtPVCFmjp1AsEvO4\nPds0iSWlODsiruiZ61wq6rsuMgc+j62YOXnoSFcpctSFUiIYrhIabbNuxuUu\nCnoA5ScCGEeJjt37IRo0CnHfHwdLWTTxRuI3CyiZV3HIZlBbLIKkjkSrksTM\njC72RfzJu+92kOoE2COidngMM0hbC3OU4tgOfbD72D4mLL8ZamjvsucoAHDK\nJGKycRAby4Q8h+rT+dKAj0eaCdYMF+IY96yjBJDNsdvVrdXITRfqWyQHoqjQ\nAVfBH60QsHOiaofdyrmU3r/F4B4pCriRNGqdhsYZG6cxjSZle3LsKmjuXTPk\n/KAzyoi6u41WTgh2g5yARsE8JFF/zjnBRZodrLia7SiU0ShApxUQZTEWTwq4\nJIzf\r\n=Kt1O\r\n-----END PGP SIGNATURE-----\r\n","size":24044,"noattachment":false,"key":"/@npmcli/infer-owner/-/@npmcli/infer-owner-1.0.1.tgz"},"main":"index.js","gitHead":"1284fefec1f91f8cf599f24f024e78a7594d8ae8","scripts":{"snap":"TAP_SNAPSHOT=1 tap -J test/*.js --100","test":"tap -J test/*.js --100","preversion":"npm test","postpublish":"git push origin --follow-tags","postversion":"npm publish"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"deprecated":"This package is no longer supported.","repository":{"url":"git+https://github.com/npm/infer-owner.git","type":"git"},"_npmVersion":"6.9.0","description":"Infer the owner of a path based on the owner of its nearest existing parent","directories":{},"_nodeVersion":"12.6.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^12.4.2","mutate-fs":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/infer-owner_1.0.1_1563574731018_0.8554907503443121","host":"s3://npm-registry-packages"},"publish_time":1563574731143,"_cnpm_publish_time":1563574731143},"1.0.0":{"name":"@npmcli/infer-owner","version":"1.0.0","author":{"url":"https://izs.me","name":"Isaac Z. Schlueter","email":"i@izs.me"},"license":"ISC","_id":"@npmcli/infer-owner@1.0.0","maintainers":[{"name":"adam_baldwin","email":"evilpacket@gmail.com"},{"name":"ahmadnassri","email":"ahmad@ahmadnassri.com"},{"name":"isaacs","email":"i@izs.me"}],"homepage":"https://github.com/npm/infer-owner#readme","bugs":{"url":"https://github.com/npm/infer-owner/issues"},"dist":{"shasum":"8ace262c919e99d756737176782b9567b840b5b3","tarball":"http://registry-npm.ywwl.com/@npmcli/infer-owner/download/@npmcli/infer-owner-1.0.0.tgz","fileCount":7,"integrity":"sha512-tXO1bLc7krQtCgoIA9ugtUnfuZlSkWjVwqFl/IdaFPjEb0SDFondp3VkNbJqLeD0xdN1R1FLrMTR4++jGRKZTA==","signatures":[{"sig":"MEUCIAePiusS7KjuCg+UE+kDq00sYWle7x5rDzDV5+aPTeKvAiEAuf51lhILiN1pGiPCDMKERqFLJvfiaBcszBLlt22GEfE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":82624,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdMkGJCRA9TVsSAnZWagAAn3QP/2jld8C7xHhKrQgNplwX\nh8I4XT3N2LDGcfpzQr2s1FwD8hqw+gk2il+rVciLoK6l7CMOf7tY/SRAft8O\nSeLxIrV4xHqYJrbhWND+ZBdzlGJD7G3qUkcELxiogiMq1Bz+r4uO0IWNBBag\nJ0LPU/RaqEudNqA4iqJwu1b/BBBBaW+v9QcBVUw32DkdtuI6BnbJVqo9QcA2\nEOGwB2hDoopxyaLdKRQuAhLXuRH5JzWJLTmt0I0HjxbewgEqIC+Zg84s6tsM\nNK9WZKwwfxPeUDvY53CdXYcXgvk/qPBgOfRPmEb414/F+W/O2iF97Iyeqcuo\nHBj0rfOVFygarAg1jByAha906DGEBTFWv0hxJ78mi6FdAZA//eaX2/yiWXoW\nuJW1WS2hNJ+1c2ZH8BB1VbvEj3ohh3qaQU6TJaliQBZbdUtN2Zo4QAis6WFI\nuK3WQpuzvBRwUKz6fooTrWNBYyrwEhILidc0/4KlDZG9oAM94PEEIw8SZkhl\nKDlFuQ0Yf7WDUhmrpmEG1GVF7T+I/R6uswbS83tF80qtCNX8XeoiMHm85T0W\n6ed46uymaw2b2H0Y5QRzpad0K1VP9lG7h2VVYY5YuIx6H9ZailHZW0b7PyVi\n2GLiAjWIoIqJF73MMiG7XTL9JFMJg7GNyTay7VVp3rdS6dZwf/sj4dvQhZ2Z\nXC5S\r\n=E2Vp\r\n-----END PGP SIGNATURE-----\r\n","size":24027,"noattachment":false,"key":"/@npmcli/infer-owner/-/@npmcli/infer-owner-1.0.0.tgz"},"main":"index.js","gitHead":"c45c906764fba503b7429c34e4fbfb40501b8898","scripts":{"snap":"TAP_SNAPSHOT=1 tap -J test/*.js --100","test":"tap -J test/*.js --100","preversion":"npm test","postpublish":"git push origin --follow-tags","postversion":"npm publish"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"deprecated":"This package is no longer supported.","repository":{"url":"git+https://github.com/npm/infer-owner.git","type":"git"},"_npmVersion":"6.9.0","description":"Infer the owner of a path based on the owner of its nearest existing parent","directories":{},"_nodeVersion":"12.6.0","_hasShrinkwrap":false,"devDependencies":{"tap":"^12.4.2","mutate-fs":"^2.1.1"},"_npmOperationalInternal":{"tmp":"tmp/infer-owner_1.0.0_1563574664712_0.485457508489441","host":"s3://npm-registry-packages"},"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"}