{"name":"get-current-package","repository":{"type":"git","url":"git+https://github.com/fabiospampinato/get-current-package.git"},"description":"Get the package.json of the currently executing bin.","license":"MIT","version":"1.0.1","type":"module","main":"dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"clean":"tsex clean","compile":"tsex compile","compile:watch":"tsex compile --watch","test":"tsex test","test:watch":"tsex test --watch","prepublishOnly":"tsex prepare"},"keywords":["cli","get","current","package"],"dependencies":{"find-up-json":"^2.0.5"},"devDependencies":{"@types/node":"^18.19.70","fava":"^0.3.4","tsex":"^4.0.2","typescript":"^5.7.3"},"_id":"get-current-package@1.0.1","gitHead":"1000d2cc179bb9022f20ac96bd0b09fb05144f24","bugs":{"url":"https://github.com/fabiospampinato/get-current-package/issues"},"homepage":"https://github.com/fabiospampinato/get-current-package#readme","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-c/Rw5ByDQ+zg+Lh/emBWv0bDpugEFdmXPR6/srIemVtIvol0XbT0JAr8Db0cX+Jj/xY9wj1wdjeq2qNB35Tayg==","shasum":"5d29ec4262169977f363ae97d2a992423ae9f0be","tarball":"http://registry-npm.ywwl.com/get-current-package/download/get-current-package-1.0.1.tgz","fileCount":5,"unpackedSize":3316,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEip3V9ZkzMjUXYl1C/Q58RjDXSV9g5t5u6c6DwEmn83AiBAIJPEYXaqAeWUhcLr2jq1pzy3hh/6YMjkHhTejzS3Vg=="}],"size":1846,"noattachment":false,"key":"/get-current-package/-/get-current-package-1.0.1.tgz"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/get-current-package_1.0.1_1736707666694_0.7647259555424886"},"_hasShrinkwrap":false,"readme":"# Get Current Package\n\nGet the `package.json` of the currently executing bin.\n\nThis is meant to be used in combination with [`tiny-updater`](https://github.com/fabiospampinato/tiny-updater) or similar, in order to get the name and the version of the currently executing bin very conveniently, without importing a \"package.json\" and without hard-coding the values yourself.\n\n## Install\n\n```sh\nnpm install get-current-package\n```\n\n## Usage\n\nYou should have something like this in your bin app:\n\n```ts\nimport getCurrentPackage from 'get-current-package';\n\nconsole.log ( getCurrentPackage () );\n```\n\nThen executing the bin would produce this:\n\n```\n> my-bin\n< { name: 'my-bin', version: '1.0.0', ... }\n```\n\nBasically it detects which entrypoint file is being executed and retrieves its `package.json`.\n\n## License\n\nMIT © Fabio Spampinato\n","publish_time":1736707666865,"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_cnpm_publish_time":1736707666865,"dist-tags":{"latest":"1.0.1"}}