{"_id":"get-current-package","_rev":"1-bd77e42a91fe93aeb2689522f6dcb183","name":"get-current-package","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"get-current-package","version":"1.0.0","keywords":["cli","get","current","package"],"_id":"get-current-package@1.0.0","maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"homepage":"https://github.com/fabiospampinato/get-current-package#readme","bugs":{"url":"https://github.com/fabiospampinato/get-current-package/issues"},"dist":{"shasum":"503679737b9247aec825efe45591fd0a1ab20f6d","tarball":"https://registry.npmjs.org/get-current-package/-/get-current-package-1.0.0.tgz","fileCount":9,"integrity":"sha512-mEZ43mmPMdRz+7vouBd/fhnEMRF0omBzcwwwf2GmbWSeZJGdWHRp9RGLZxW7ZnnZ14jPc3GreHh0s/7u7PZJpQ==","signatures":[{"sig":"MEUCID/SRnB0ZS/o/CBq/K0/XmGxe6dCTmiNp6sWar/gC/4fAiEAg0ZUBBYfSLxmOSbNjykBjYljtfoUgXJocHUjxdButF0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4351,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj5VWEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpBdg//WTAvuFyhE9cQq3gLIN1wmTPT1ijFP3P3hCVziEiRYLTuabCW\r\nEJWeR1KR//V99+p12LIfqr7Er4aOLmlbmAunW+7tKMRpOvGd39K3WYSpKNeK\r\nwJB/kQTGFTmyI1ovLSwZjuEpz71oM4zHPWTEbqXwgNdDDwjH4s51cMZ69lDw\r\nA3KvkJ2XjqcEZLU7UW7KP7wDxKPEH2aibNO5h6U0117ZlHHTeTCVqrdFvxCX\r\nruIpDvQ/a6jC/sMYjmBPOWc7zg6mPMdUu2MuRDYRjIRjjIXNZrSfBN4fZ1eb\r\nAILhw3tV6PeJY3OdnVVmc5BnZlMDychus/VXMSffj46ugU+m7VBg0TI59YQJ\r\nhsERp9RoY1SH1s37eEe7q9ooYtICCTsRCizlBblajOfMYJeBYPaw1mcc0bNw\r\nz38L6J8cuUoP1aMJYI1OBBf/fOcboNwuTt7XL+8cYHpTwDaPVPyLd6at0VmH\r\ncCg0N88dquSPaL8NMpIik16+1B8plK6F0tfd349Zia+n2LdjG6N/en67PWyz\r\n94xmgbU6TTVeKY6ENpVEKeHgStHar6Dblb8LF34sapKOxLlqYfrZdSmRFAwI\r\nLCrMAAIzLlPkGjKNiCdVwEy+GQgPjx5gjQ/Lb133ZPf9UAwPVvRswaVt2KcQ\r\nLtzZeuCUE53EI4NYJQebc1L/g9L7/ptZHSE=\r\n=3UxK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","exports":"./dist/index.js","gitHead":"6b4e1ba6ce91e0b4840e3edddde6f20d24771246","scripts":{"test":"tsex test","clean":"tsex clean","compile":"tsex compile","test:watch":"tsex test --watch","compile:watch":"tsex compile --watch","prepublishOnly":"npm run clean && npm run compile && npm run test"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"repository":{"url":"git+https://github.com/fabiospampinato/get-current-package.git","type":"git"},"_npmVersion":"8.19.2","description":"Get the package.json of the currently executing bin.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"find-up-json":"^2.0.1"},"_hasShrinkwrap":false,"devDependencies":{"fava":"^0.0.8","tsex":"^1.1.5","typescript":"^4.9.5","@types/node":"^18.13.0"},"_npmOperationalInternal":{"tmp":"tmp/get-current-package_1.0.0_1675974020224_0.054558864058529055","host":"s3://npm-registry-packages"}},"1.0.1":{"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":"https://registry.npmjs.org/get-current-package/-/get-current-package-1.0.1.tgz","fileCount":5,"unpackedSize":3316,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEip3V9ZkzMjUXYl1C/Q58RjDXSV9g5t5u6c6DwEmn83AiBAIJPEYXaqAeWUhcLr2jq1pzy3hh/6YMjkHhTejzS3Vg=="}]},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/get-current-package_1.0.1_1736707666694_0.7647259555424886"},"_hasShrinkwrap":false}},"time":{"created":"2023-02-09T20:20:20.223Z","modified":"2025-01-12T18:47:47.058Z","1.0.0":"2023-02-09T20:20:20.400Z","1.0.1":"2025-01-12T18:47:46.865Z"},"bugs":{"url":"https://github.com/fabiospampinato/get-current-package/issues"},"homepage":"https://github.com/fabiospampinato/get-current-package#readme","keywords":["cli","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.","maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"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","readmeFilename":"readme.md","license":"MIT"}