{"_id":"bin-shim","_rev":"9-ed3c874ca2f3c06b9f3912284110f49c","name":"bin-shim","dist-tags":{"bootstrap":"0.0.0-bootstrap","latest":"0.2.2"},"versions":{"0.0.0-bootstrap":{"name":"bin-shim","version":"0.0.0-bootstrap","license":"MIT","_id":"bin-shim@0.0.0-bootstrap","maintainers":[{"name":"thekevinscott","email":"me@thekevinscott.com"}],"homepage":"https://github.com/thekevinscott/bin-shim#readme","bugs":{"url":"https://github.com/thekevinscott/bin-shim/issues"},"dist":{"shasum":"4c63bc32ba00fe25d9b7694e4a1ba6e951aa71d6","tarball":"https://registry.npmjs.org/bin-shim/-/bin-shim-0.0.0-bootstrap.tgz","fileCount":1,"integrity":"sha512-QuzCTR2NTCusST5yV5tobY+bWKOWtdMd7Xudz3lXEzJekQqKIOioFovC2Ft+Ip5Lh3FtFoqvgoe53cPiBZ/qHw==","signatures":[{"sig":"MEYCIQD+ZE+BqEiPwt/iXYyHEedfCwO6vR9vfVSuREoqCOT2mgIhAMqZcox6oKgqjiD+fO8OAS8pvPuZhPFu4sHSgAxn1rxM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":277},"_npmUser":{"name":"thekevinscott","email":"me@thekevinscott.com"},"repository":{"url":"git+https://github.com/thekevinscott/bin-shim.git","type":"git"},"_npmVersion":"11.11.0","description":"Bootstrap stub; replaced on first real publish via OIDC trusted publisher.","directories":{},"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/bin-shim_0.0.0-bootstrap_1778417290690_0.3578729855012268","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"bin-shim","version":"0.1.0","keywords":["bin","shim","wrapper","native","binary","optionalDependencies"],"license":"MIT","_id":"bin-shim@0.1.0","maintainers":[{"name":"thekevinscott","email":"me@thekevinscott.com"}],"homepage":"https://github.com/thekevinscott/bin-shim#readme","bugs":{"url":"https://github.com/thekevinscott/bin-shim/issues"},"dist":{"shasum":"59fa6c420beab4f2c27fb35dc63ccb7885469b73","tarball":"https://registry.npmjs.org/bin-shim/-/bin-shim-0.1.0.tgz","fileCount":23,"integrity":"sha512-ylTtVtgclEaHtPLtCW3LuWoOtrcyojWGSV7lCYZHn/t3F84yicGZUFb+VmvmE8Roe1NO13yktyxfxEt3E3fZhA==","signatures":[{"sig":"MEYCIQDYSWLLyJExkoKiV+gv1tjP90uMJbcwOPIJ1rt3GjGrkAIhAMitcHzNG26XrAEzxclozvmdnzU4x9pbxmzTthbU86GA","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/bin-shim@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":14360},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=20.20.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"603b92e2dce166a30e3ac39ee1a7afe862c773e3","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","pretest":"pnpm run build","coverage":"vitest run --coverage","typecheck":"tsc -p tsconfig.json --noEmit","precoverage":"pnpm run build","prepublishOnly":"pnpm run build","typecheck:tests":"tsc -p tsconfig.test.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:263c5c4e-20d8-4c1d-8424-c448eade198f"}},"repository":{"url":"git+https://github.com/thekevinscott/bin-shim.git","type":"git"},"_npmVersion":"11.11.0","description":"Runtime shim for distributing native binaries as npm packages via optionalDependencies","directories":{},"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.5","typescript":"^5.6.3","@types/node":"^22.9.0","@vitest/coverage-v8":"^2.1.5"},"_npmOperationalInternal":{"tmp":"tmp/bin-shim_0.1.0_1778417575208_0.36797759843256217","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"bin-shim","version":"0.1.1","keywords":["bin","shim","wrapper","native","binary","optionalDependencies"],"license":"MIT","_id":"bin-shim@0.1.1","maintainers":[{"name":"thekevinscott","email":"me@thekevinscott.com"}],"homepage":"https://github.com/thekevinscott/bin-shim#readme","bugs":{"url":"https://github.com/thekevinscott/bin-shim/issues"},"dist":{"shasum":"d6cdcbd580c8a7460b9a82a3101bdbd225954b81","tarball":"https://registry.npmjs.org/bin-shim/-/bin-shim-0.1.1.tgz","fileCount":23,"integrity":"sha512-kcVyVQRBuVZa7aqA7Fj0CIJu1T+8YPb5rFwZAEviZzWc2Msmz6D+hxhkzjLwZD2rl9PQUD2petpNfm6TlfHHlQ==","signatures":[{"sig":"MEUCIQDOh/el0Nukks3Z2Vla3lLUFMmyVa+QIw9eUUZFu2lD3QIgSaaKdb3coIThOI443Y4EMTR4DM89Do8Ij0ASfBmd7Qk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/bin-shim@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":19222},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=20.20.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"7216d9e07a42a636d0f11708f977d635f8425f61","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","pretest":"pnpm run build","coverage":"vitest run --coverage","typecheck":"tsc -p tsconfig.json --noEmit","precoverage":"pnpm run build","prepublishOnly":"pnpm run build","typecheck:tests":"tsc -p tsconfig.test.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:263c5c4e-20d8-4c1d-8424-c448eade198f"}},"repository":{"url":"git+https://github.com/thekevinscott/bin-shim.git","type":"git"},"_npmVersion":"11.11.0","description":"Runtime shim for distributing native binaries as npm packages via optionalDependencies","directories":{},"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.5","typescript":"^5.6.3","@types/node":"^22.9.0","@vitest/coverage-v8":"^2.1.5"},"_npmOperationalInternal":{"tmp":"tmp/bin-shim_0.1.1_1778426424193_0.7896376781148893","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"bin-shim","version":"0.1.2","keywords":["bin","shim","wrapper","native","binary","optionalDependencies"],"license":"MIT","_id":"bin-shim@0.1.2","maintainers":[{"name":"thekevinscott","email":"me@thekevinscott.com"}],"homepage":"https://github.com/thekevinscott/bin-shim#readme","bugs":{"url":"https://github.com/thekevinscott/bin-shim/issues"},"dist":{"shasum":"35345dd11a2bbb03640692b1779f8bdc0270f696","tarball":"https://registry.npmjs.org/bin-shim/-/bin-shim-0.1.2.tgz","fileCount":23,"integrity":"sha512-m/gnsRg3NCUr5omQHQp9BsGS/V3and+8dqX691wrvgLLb4XcXg8L+KB9g0woEigRpBgqkdeEaYottIqFr3OE+g==","signatures":[{"sig":"MEUCIQD+xtChNFLOdZuWi7QcmCAT9pLb4fpVf50ZmvRnsOyf3AIgNhvKLzk8txg3vnlrVRA16Y0h7K3J3IjSq56vEYNLEk0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/bin-shim@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":20035},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=20.20.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"6c69832973f220bb3ce0763da47ce4969624607e","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","pretest":"pnpm run build","coverage":"vitest run --coverage","typecheck":"tsc -p tsconfig.json --noEmit","precoverage":"pnpm run build","prepublishOnly":"pnpm run build","typecheck:tests":"tsc -p tsconfig.test.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:263c5c4e-20d8-4c1d-8424-c448eade198f"}},"repository":{"url":"git+https://github.com/thekevinscott/bin-shim.git","type":"git"},"_npmVersion":"11.11.0","description":"Runtime shim for distributing native binaries as npm packages via optionalDependencies","directories":{},"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.5","typescript":"^5.6.3","@types/node":"^22.9.0","@vitest/coverage-v8":"^2.1.5"},"_npmOperationalInternal":{"tmp":"tmp/bin-shim_0.1.2_1778708007456_0.7486284401075101","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"bin-shim","version":"0.1.3","keywords":["bin","shim","wrapper","native","binary","optionalDependencies"],"license":"MIT","_id":"bin-shim@0.1.3","maintainers":[{"name":"thekevinscott","email":"me@thekevinscott.com"}],"homepage":"https://github.com/thekevinscott/bin-shim#readme","bugs":{"url":"https://github.com/thekevinscott/bin-shim/issues"},"dist":{"shasum":"0043547fd92cf75db3c79c86297cdb7115d706ce","tarball":"https://registry.npmjs.org/bin-shim/-/bin-shim-0.1.3.tgz","fileCount":35,"integrity":"sha512-/6eMjVW5wXGGMkKLMMaQf3bjJ8e2MKw9MzdLfjyA0tYPHk2PY6H4W+dyDXeKNx1Sjq0hgjMW2Td3N/9vwNo+/w==","signatures":[{"sig":"MEQCIG2Fvf8oWUXZMoB9IpsGo/pRw0ZW9mGd+Ba7zOOaxGXjAiBY6IlJ+q7ZUOHoNXkrXOoFPtYd/mjdAf66PUEUR/PXIA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/bin-shim@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":21708},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=20.20.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"602e0be6b1459451dfc118519d771375608f3ebb","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","pretest":"pnpm run build","coverage":"vitest run --coverage","typecheck":"tsc -p tsconfig.json --noEmit","precoverage":"pnpm run build","prepublishOnly":"pnpm run build","typecheck:tests":"tsc -p tsconfig.test.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:263c5c4e-20d8-4c1d-8424-c448eade198f"}},"repository":{"url":"git+https://github.com/thekevinscott/bin-shim.git","type":"git"},"_npmVersion":"11.11.0","description":"Runtime shim for distributing native binaries as npm packages via optionalDependencies","directories":{},"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.5","typescript":"^5.6.3","@types/node":"^22.9.0","@vitest/coverage-v8":"^2.1.5"},"_npmOperationalInternal":{"tmp":"tmp/bin-shim_0.1.3_1778708430991_0.7754361824715128","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"bin-shim","version":"0.1.4","keywords":["bin","shim","wrapper","native","binary","optionalDependencies"],"license":"MIT","_id":"bin-shim@0.1.4","maintainers":[{"name":"thekevinscott","email":"me@thekevinscott.com"}],"homepage":"https://github.com/thekevinscott/bin-shim#readme","bugs":{"url":"https://github.com/thekevinscott/bin-shim/issues"},"dist":{"shasum":"e7a908f7cf25b5b069d996c4c13d238662ceb099","tarball":"https://registry.npmjs.org/bin-shim/-/bin-shim-0.1.4.tgz","fileCount":62,"integrity":"sha512-DEyiBDg48DLb02/u4G684EAf9pZTaEGHgEF2KF7XfCsHWG5fSyabM3xq3weMTcBgWSePZpY57kxtbLGJi0MlHQ==","signatures":[{"sig":"MEUCIHWgMenaN6kyITF3Tgsaw7OE68/eSjeSRdjC9g/PE/lnAiEAkv0mjyegzXwbqjxbq4MM8MGPQcygoMpHRgrgfdWIq+g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/bin-shim@0.1.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":46300},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=20.20.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"ae6902731c12f723525a6137db76b9f0725079ea","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","pretest":"pnpm run build","coverage":"vitest run --coverage","typecheck":"tsc -p tsconfig.json --noEmit","precoverage":"pnpm run build","prepublishOnly":"npm run build","typecheck:tests":"tsc -p tsconfig.test.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:263c5c4e-20d8-4c1d-8424-c448eade198f"}},"repository":{"url":"git+https://github.com/thekevinscott/bin-shim.git","type":"git"},"_npmVersion":"11.16.0","description":"Runtime shim for distributing native binaries as npm packages via optionalDependencies","directories":{},"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.5","typescript":"^5.6.3","@types/node":"^22.9.0","@vitest/coverage-v8":"^2.1.5"},"_npmOperationalInternal":{"tmp":"tmp/bin-shim_0.1.4_1785779632836_0.764961565514775","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"bin-shim","version":"0.2.0","keywords":["bin","shim","wrapper","native","binary","optionalDependencies"],"license":"MIT","_id":"bin-shim@0.2.0","maintainers":[{"name":"thekevinscott","email":"me@thekevinscott.com"}],"homepage":"https://github.com/thekevinscott/bin-shim#readme","bugs":{"url":"https://github.com/thekevinscott/bin-shim/issues"},"dist":{"shasum":"8ee4e9b82e71403a15c7482f64bf3ee1ab53750b","tarball":"https://registry.npmjs.org/bin-shim/-/bin-shim-0.2.0.tgz","fileCount":62,"integrity":"sha512-N2mwF++gFxNtNd8TiW66Ev+n1DEGWF0dwukV+kLfjFzrwAG8LYyuUbIH2D0xL0UyE8LSbNhgqLQkFDWeSGoN6Q==","signatures":[{"sig":"MEUCIQCE0N0OAPXcEDtSXQ+WnqpoxZXqobdmHB9e4NcPQpmxGwIgXEYMJ2kmqP0O3qlqUX21Z6lWycUaVqjdvJBfLQI6W7s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/bin-shim@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":46300},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=20.20.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"041c6d2f974141df5ec3741cbe77dcdc4d937cd4","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","pretest":"pnpm run build","coverage":"vitest run --coverage","typecheck":"tsc -p tsconfig.json --noEmit","precoverage":"pnpm run build","prepublishOnly":"npm run build","typecheck:tests":"tsc -p tsconfig.test.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:263c5c4e-20d8-4c1d-8424-c448eade198f"}},"repository":{"url":"git+https://github.com/thekevinscott/bin-shim.git","type":"git"},"_npmVersion":"11.16.0","description":"Runtime shim for distributing native binaries as npm packages via optionalDependencies","directories":{},"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.5","typescript":"^5.6.3","@types/node":"^22.9.0","@vitest/coverage-v8":"^2.1.5"},"_npmOperationalInternal":{"tmp":"tmp/bin-shim_0.2.0_1785785412055_0.03468113793979488","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"bin-shim","version":"0.2.1","keywords":["bin","shim","wrapper","native","binary","optionalDependencies"],"license":"MIT","_id":"bin-shim@0.2.1","maintainers":[{"name":"thekevinscott","email":"me@thekevinscott.com"}],"homepage":"https://github.com/thekevinscott/bin-shim#readme","bugs":{"url":"https://github.com/thekevinscott/bin-shim/issues"},"dist":{"shasum":"2cee1ffbcc3533a21c5ca35ec5bace65c5bdd81d","tarball":"https://registry.npmjs.org/bin-shim/-/bin-shim-0.2.1.tgz","fileCount":62,"integrity":"sha512-Wm/Rrtoi9WxqtSaEvHBi5XTAa7UjTUhQWQJCPDDi+uhh4YHTMMVFFsfYEUZrJyba6n/l7pQQqSc8XD2aaAzgbg==","signatures":[{"sig":"MEYCIQDVN4XIKpr5oJcJLH7y36YV7PODsFrEpGvMzUbkKzEBhQIhANUSBf3BQfYH1QfxyF0+o4I3XnuNa9I1judNedV6m7XX","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/bin-shim@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":47457},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=20.20.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"102706aa3ea5e2d63d59295f2ac3f6fe5aac9db1","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","pretest":"pnpm run build","coverage":"vitest run --coverage","typecheck":"tsc -p tsconfig.json --noEmit","precoverage":"pnpm run build","prepublishOnly":"npm run build","typecheck:tests":"tsc -p tsconfig.test.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:263c5c4e-20d8-4c1d-8424-c448eade198f"}},"repository":{"url":"git+https://github.com/thekevinscott/bin-shim.git","type":"git"},"_npmVersion":"11.17.0","description":"Runtime shim for distributing native binaries as npm packages via optionalDependencies","directories":{},"_nodeVersion":"24.19.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.5","typescript":"^5.6.3","@types/node":"^22.9.0","@vitest/coverage-v8":"^2.1.5"},"_npmOperationalInternal":{"tmp":"tmp/bin-shim_0.2.1_1787260022664_0.9023612528288416","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"bin-shim","version":"0.2.2","description":"Runtime shim for distributing native binaries as npm packages via optionalDependencies","license":"MIT","repository":{"type":"git","url":"git+https://github.com/thekevinscott/bin-shim.git"},"type":"module","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"engines":{"node":">=20.20.0"},"packageManager":"pnpm@10.34.5","scripts":{"build":"tsc -p tsconfig.json","pretest":"pnpm run build","test":"vitest run","precoverage":"pnpm run build","coverage":"vitest run --coverage","typecheck":"tsc -p tsconfig.json --noEmit","typecheck:tests":"tsc -p tsconfig.test.json","prepublishOnly":"npm run build"},"keywords":["bin","shim","wrapper","native","binary","optionalDependencies"],"devDependencies":{"@types/node":"^22.9.0","@vitest/coverage-v8":"^2.1.5","typescript":"^5.6.3","vitest":"^2.1.5"},"gitHead":"f8ac06f1b3c1644a4df3666fcb8fc540bd1bbe7f","_id":"bin-shim@0.2.2","bugs":{"url":"https://github.com/thekevinscott/bin-shim/issues"},"homepage":"https://github.com/thekevinscott/bin-shim#readme","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-G+f67xoIHsAgoJdG03LV5ei91G6P0QH6tI1h/rKSb//EYdF8mw6eBLCUqqZBdzL9sROVz3/141X/wjutdxWFuQ==","shasum":"9b116c3950c84f6377ca1c756b362494619af57b","tarball":"https://registry.npmjs.org/bin-shim/-/bin-shim-0.2.2.tgz","fileCount":62,"unpackedSize":47493,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/bin-shim@0.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBjuDTByrwogh+XfcP7ktyNMAQFKnx/okZx7nDrQecnzAiEA78komCLY+Jp2GsRruaDQ56dA+5U2pOFTU/quyzTncaU="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:263c5c4e-20d8-4c1d-8424-c448eade198f"}},"directories":{},"maintainers":[{"name":"thekevinscott","email":"me@thekevinscott.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bin-shim_0.2.2_1787262296107_0.06064701619694546"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-10T12:48:10.610Z","modified":"2026-08-20T21:44:56.553Z","0.0.0-bootstrap":"2026-05-10T12:48:10.809Z","0.1.0":"2026-05-10T12:52:55.350Z","0.1.1":"2026-05-10T15:20:24.355Z","0.1.2":"2026-05-13T21:33:27.665Z","0.1.3":"2026-05-13T21:40:31.168Z","0.1.4":"2026-08-03T17:53:52.992Z","0.2.0":"2026-08-03T19:30:12.234Z","0.2.1":"2026-08-20T21:07:02.811Z","0.2.2":"2026-08-20T21:44:56.256Z"},"bugs":{"url":"https://github.com/thekevinscott/bin-shim/issues"},"license":"MIT","homepage":"https://github.com/thekevinscott/bin-shim#readme","keywords":["bin","shim","wrapper","native","binary","optionalDependencies"],"repository":{"type":"git","url":"git+https://github.com/thekevinscott/bin-shim.git"},"description":"Runtime shim for distributing native binaries as npm packages via optionalDependencies","maintainers":[{"name":"thekevinscott","email":"me@thekevinscott.com"}],"readme":"# bin-shim\n\nRuntime shim for distributing native CLIs as npm packages via\n`optionalDependencies`. The pattern esbuild popularized: a top-level package\nwith no real code that delegates to a per-platform package for the host.\n`bin-shim` is the wrapper your top-level package's `bin/foo.js` delegates to.\n\nIt does not generate the per-platform packages or write the\n`optionalDependencies` block — those are publishing concerns, not runtime\nconcerns.\n\n## Two strategies\n\n| | `main` (spawn) | `mainInProcess` (in-process) |\n|---|---|---|\n| Per-platform package holds | a prebuilt **binary** | a **native addon** (napi) |\n| The CLI runs | as a child process | inside this Node process |\n| Process semantics | the OS provides them — the child *is* the CLI | `bin-shim` translates `runCli`'s return code |\n| Default package name | `@{scope}/{platform}-{arch}` | `@{scope}/lib-{platform}-{arch}` |\n\nReach for **spawn** when you ship a standalone executable — it's the simpler\npattern and the original one. Reach for **in-process** when your CLI is a\nRust (or C, Zig, …) core already exposed to Node through napi bindings: there\nis one copy of the core, no process launch, and no binary to bundle\nalongside the addon.\n\nBoth are documented below; the in-process route additionally implements the\n[process-semantics conformance spec](https://github.com/thekevinscott/bin-shim/blob/main/spec/conformance.md),\nshared with the Python sibling package.\n\n## Install\n\n```sh\nnpm install bin-shim\n```\n\n## Quickstart\n\nThree pieces fit together. You need all three.\n\n### 1. Top-level `bin/foo.js`\n\n```js\n#!/usr/bin/env node\nimport { main } from 'bin-shim';\n\nmain({ scope: 'yourname', binaryName: 'foo', from: import.meta.url })\n  .then((code) => process.exit(code))\n  .catch((err) => {\n    process.stderr.write(`${err.message}\\n`);\n    process.exit(1);\n  });\n```\n\nMake it executable: `chmod +x bin/foo.js`. Track the bit in git:\n`git update-index --chmod=+x bin/foo.js`.\n\n### 2. Top-level `package.json`\n\n```json\n{\n  \"name\": \"foo\",\n  \"type\": \"module\",\n  \"bin\": { \"foo\": \"bin/foo.js\" },\n  \"files\": [\"bin/\"],\n  \"engines\": { \"node\": \">=20.20.0\" },\n  \"dependencies\": {\n    \"bin-shim\": \"^0.1.0\"\n  },\n  \"optionalDependencies\": {\n    \"@yourname/linux-x64\": \"1.0.0\",\n    \"@yourname/linux-arm64\": \"1.0.0\",\n    \"@yourname/darwin-x64\": \"1.0.0\",\n    \"@yourname/darwin-arm64\": \"1.0.0\",\n    \"@yourname/win32-x64\": \"1.0.0\"\n  }\n}\n```\n\n### 3. Per-platform package layout\n\n```\n@yourname/linux-x64/\n├── package.json\n└── bin/\n    └── foo\n```\n\n```json\n{\n  \"name\": \"@yourname/linux-x64\",\n  \"version\": \"1.0.0\",\n  \"os\": [\"linux\"],\n  \"cpu\": [\"x64\"],\n  \"preferUnplugged\": true\n}\n```\n\nWindows is the same shape with a `.exe` suffix:\n\n```\n@yourname/win32-x64/\n├── package.json\n└── bin/\n    └── foo.exe\n```\n\nThe `os` and `cpu` constraints make npm install only the matching package.\nSkip them and every user downloads every platform's binary.\n\n`preferUnplugged: true` keeps Yarn Berry from zipping the package, which\nbreaks file-path resolution.\n\n## API\n\n### `main(opts): Promise<number>`\n\nResolves the platform binary, spawns it with stdio inherited, and resolves\nwith the child's exit code. Caller is responsible for `process.exit`.\n\n```ts\nmain({\n  scope: 'yourname',         // npm scope without '@' (required unless template/fn omits {scope})\n  binaryName: 'foo',         // binary name inside the platform pkg (required)\n  from: import.meta.url,     // see \"Why `from`\" below (required)\n  argv: process.argv.slice(2),  // optional; default\n  resolveBin: () => '/path/to/foo', // optional; defaults to resolveBinary(opts)\n  spawn: customSpawner,      // optional; defaults to defaultSpawner\n  platformPackage: '@{scope}/{platform}-{arch}', // optional; default shown\n  packageName: ({ platform, arch }) => `@scope/${platform}-${arch}`, // optional escape hatch\n  triples: { 'linux-x64': 'x86_64-unknown-linux-gnu' }, // required if template uses {triple}\n  binaryDir: 'bin',          // optional; default shown. '' = package root\n});\n```\n\n### Binary location inside the platform package\n\nBy default the binary sits in `bin/`. Some publishers stage it at the\npackage root instead — putitoutthere's `bundled-cli` recipe does — so\n`binaryDir` names the directory:\n\n```ts\nmain({ scope: 'yourname', binaryName: 'foo', from: import.meta.url, binaryDir: '' });\n```\n\n```\n@yourname/linux-x64/\n├── package.json\n└── foo\n```\n\nAny relative path works (`libexec/tools`), and `.exe` is still appended on\nWindows. This is resolution only — it does not change what the platform\npackage must declare.\n\n### Platform package naming\n\nDefault: `@{scope}/{platform}-{arch}` (the JS-shape convention,\ne.g. `@yourname/linux-x64`).\n\nOverride with `platformPackage` (a template string) when your binaries are\npublished under a different shape. Available placeholders:\n\n- `{scope}` — `opts.scope` (the template is expected to omit this for unscoped distributions)\n- `{platform}` — Node's `NodeJS.Platform` value (`linux`, `darwin`, `win32`, ...)\n- `{arch}` — Node's `NodeJS.Architecture` value (`x64`, `arm64`, ...)\n- `{triple}` — value from the `triples` map keyed on `${platform}-${arch}`\n\nRust-triple shape (e.g. crates published by `putitoutthere`'s\nbundled-cli mode):\n\n```ts\nmain({\n  scope: 'dark-factory',\n  binaryName: 'darkfactory',\n  from: import.meta.url,\n  platformPackage: '@{scope}/{triple}',\n  triples: {\n    'linux-x64':    'x86_64-unknown-linux-gnu',\n    'linux-arm64':  'aarch64-unknown-linux-gnu',\n    'darwin-x64':   'x86_64-apple-darwin',\n    'darwin-arm64': 'aarch64-apple-darwin',\n    'win32-x64':    'x86_64-pc-windows-msvc',\n  },\n});\n```\n\nUse `packageName` for shapes that templating cannot express. It receives\n`{ platform, arch, scope, binaryName }` and returns the package name.\n`packageName` takes precedence over `platformPackage` when both are set.\n\n### `resolveBinary(opts): string`\n\nReturns the absolute path to the platform binary inside the matching\noptional dependency, or throws with a helpful message if none was\ninstalled.\n\n### `defaultResolver(from): Resolver`\n\nReturns `createRequire(from).resolve`. Used by `resolveBinary` when no\nexplicit `resolver` is supplied.\n\n### `defaultSpawner(cmd, args): Promise<number>`\n\nSpawns `cmd` with `stdio: 'inherit'`, resolves with the child's exit code\n(or `1` if the child was terminated by a signal), rejects if `spawn`\nitself errors.\n\n## The in-process strategy\n\nYour CLI is compiled once as a library and exposed to Node through napi\nbindings as `runCli(argv) -> number`. There is no binary to spawn: the\nper-platform package is the addon itself.\n\n```js\n#!/usr/bin/env node\nimport { mainInProcess } from 'bin-shim';\n\nmainInProcess({ scope: 'yourname', binaryName: 'foo', from: import.meta.url })\n  .then((code) => process.exit(code))\n  .catch((err) => {\n    process.stderr.write(`${err.message}\\n`);\n    process.exit(1);\n  });\n```\n\nwith `optionalDependencies` naming the addon packages:\n\n```json\n{\n  \"optionalDependencies\": {\n    \"@yourname/lib-linux-x64\": \"1.0.0\",\n    \"@yourname/lib-darwin-arm64\": \"1.0.0\",\n    \"@yourname/lib-win32-x64\": \"1.0.0\"\n  }\n}\n```\n\n### `mainInProcess(opts): Promise<number>`\n\nFlushes host stdio, loads the addon, calls `runCli(argv)`, and applies the\nprocess-semantics contract to the returned code. As with `main`, the caller\nowns exiting.\n\n```ts\nmainInProcess({\n  scope: 'yourname',            // as with main\n  binaryName: 'foo',            // used in error messages\n  from: import.meta.url,        // see \"Why `from` is required\"\n  argv: process.argv.slice(2),  // optional; default\n  entryPoint: 'runCli',         // optional; named export to call\n  runCli: (argv) => 0,          // optional; skips resolution entirely\n  load: customLoader,           // optional; defaults to defaultLoader(from)\n  platform: process.platform,   // optional; drives the semantics branch\n  raiseSignal: customRaiser,    // optional; defaults to defaultSignalRaiser\n  flush: customFlush,           // optional; defaults to flushStdio\n  platformPackage: '@{scope}/lib-{platform}-{arch}', // optional; default shown\n});\n```\n\nThe naming options (`platformPackage`, `packageName`, `triples`) behave\nexactly as they do for the spawn strategy — only the default template\ndiffers.\n\n**Exit semantics.** Ordinary codes are returned for you to exit with. On\nPOSIX, `130` and `143` — the `128 + N` codes the core returns after handling\nSIGINT/SIGTERM itself — cause `bin-shim` to restore the default handler and\nre-raise that signal, so the parent shell observes genuine signal death and\njob control behaves as it would for a spawned binary. On Windows there is no\nre-raise; codes pass through. **`mainInProcess` therefore does not always\nreturn** — for those two codes the process dies inside it.\n\n### `resolveRunCli(opts): RunCli`\n\nLoads the addon package for the host and returns its `entryPoint` export, or\nthrows with an install hint. The in-process sibling of `resolveBinary`.\n\n### `applyExitSemantics(code, opts?): number`\n\nThe translation step alone (`{ platform, raiseSignal }`). Exported for\nconsumers doing their own invocation.\n\n### `flushStdio(streams?): Promise<void>`\n\nDrains `process.stdout`/`process.stderr`. The addon writes to file\ndescriptors 1/2 directly, so pending Node buffers must go out first or\noutput interleaves out of order.\n\n### `defaultLoader(from): Loader`\n\nReturns `createRequire(from)` — the loading counterpart to\n`defaultResolver`'s `.resolve`.\n\n### `defaultSignalRaiser(signal): never`\n\nRemoves listeners for `signal`, then `process.kill(process.pid, signal)`.\n\n### The `runCli` contract\n\nWhat `bin-shim` requires of the native side:\n\n1. `runCli(argv) -> number` **always returns**; it never terminates the\n   process.\n2. It registers its own SIGINT/SIGTERM (POSIX) / ctrl-c (Windows) handling\n   for the duration of the run; on receipt it performs graceful shutdown and\n   returns 130/143. Shutdown logic lives in the core, once — launchers only\n   translate.\n3. It writes only to file descriptors 1/2; it never touches host-language\n   stdio objects.\n\n### Types\n\n```ts\ntype Resolver = (id: string) => string;\ntype Spawner = (cmd: string, args: readonly string[]) => Promise<number>;\ntype Loader = (id: string) => unknown;\ntype RunCli = (argv: readonly string[]) => number;\ntype SignalRaiser = (signal: 'SIGINT' | 'SIGTERM') => never;\n\ntype Triples = Partial<Record<string, string>>;\n\ninterface PackageNameContext {\n  platform: NodeJS.Platform;\n  arch: NodeJS.Architecture;\n  scope?: string;\n  binaryName: string;\n}\n\ntype PackageNameFn = (ctx: PackageNameContext) => string;\n\ninterface PackageNamingOpts {\n  scope?: string;\n  binaryName: string;\n  platformPackage?: string;\n  packageName?: PackageNameFn;\n  triples?: Triples;\n}\n\ninterface ResolveOpts extends PackageNamingOpts {\n  from: string | URL;\n  platform?: NodeJS.Platform;\n  arch?: NodeJS.Architecture;\n  resolver?: Resolver;\n  binaryDir?: string;\n}\n\ninterface MainOpts extends ResolveOpts {\n  argv?: readonly string[];\n  resolveBin?: () => string;\n  spawn?: Spawner;\n}\n\ninterface ResolveAddonOpts extends PackageNamingOpts {\n  from: string | URL;\n  platform?: NodeJS.Platform;\n  arch?: NodeJS.Architecture;\n  entryPoint?: string;\n  load?: Loader;\n}\n\ninterface ExitSemanticsOpts {\n  platform?: NodeJS.Platform;\n  raiseSignal?: SignalRaiser;\n}\n\ninterface InProcessOpts extends ResolveAddonOpts, ExitSemanticsOpts {\n  argv?: readonly string[];\n  runCli?: RunCli;\n  flush?: () => Promise<void>;\n}\n```\n\nThe exported constants `SIGINT_EXIT_CODE` (130) and `SIGTERM_EXIT_CODE`\n(143) name the two shutdown codes.\n\n## What `bin-shim` does not do\n\n- **Generate per-platform packages.** That's your publishing tool's job.\n- **Write the `optionalDependencies` block.** Same.\n- **Forward signals to the child (spawn strategy).** A SIGTERM to the\n  wrapper process exits the wrapper but does not propagate to the spawned\n  binary; the child is reparented to PID 1 and finishes naturally. If your\n  binary needs cooperative termination, wrap it yourself or supply a custom\n  `spawn`. This does not apply to the in-process strategy, where there is no\n  child — signals go straight to the one process, and the core's own handler\n  owns shutdown.\n- **Install signal handlers (in-process strategy).** Per the `runCli`\n  contract the core registers its own for the duration of the run;\n  `bin-shim` only translates the code it returns.\n- **Handle `--no-optional`.** A consumer who runs\n  `npm install --no-optional foo` skips all platform packages. `main` and\n  `mainInProcess` reject with the documented error. Recommend a\n  language-native install path (`cargo install`, `brew install`, direct\n  GitHub release download) as the alternative.\n- **Yarn Berry PnP zip-path workaround.** Set `preferUnplugged: true` on\n  every platform package.\n- **`*_BINARY_PATH` env var escape hatch.**\n\n## Why `from` is required\n\nWhen `bin-shim` lives in `node_modules/bin-shim/`,\n`createRequire(import.meta.url).resolve('@yourname/linux-x64/...')` from\ninside the library asks Node to find that package starting from\n`bin-shim`'s own directory. Depending on how the package manager hoists\ndeps, that lookup can fail entirely (pnpm's strict layout), succeed only\nsometimes (npm with deduplication), or succeed by accident (flat\n`node_modules`).\n\nThe platform package is installed next to the *consumer*, not next to\n`bin-shim`. So the consumer has to tell `bin-shim` where it is. Passing\n`import.meta.url` from your `bin/foo.js` is the cheapest reliable way.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}