{"_id":"@bernankez/npm-open","_rev":"2-1f41605828e13097503b2472fada3fca","name":"@bernankez/npm-open","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"@bernankez/npm-open","version":"0.0.1","keywords":[],"author":{"url":"https://github.com/Bernankez","name":"Cole","email":"bernankeic@gmail.com"},"_id":"@bernankez/npm-open@0.0.1","maintainers":[{"name":"bernankez","email":"bernankeic@gmail.com"}],"homepage":"https://github.com/Bernankez/npm-open#readme","bugs":{"url":"https://github.com/Bernankez/npm-open/issues"},"bin":{"npm-open":"bin/index.js"},"dist":{"shasum":"58c8db50b033e8ff9764870e735ca1f84d3f4641","tarball":"https://registry.npmjs.org/@bernankez/npm-open/-/npm-open-0.0.1.tgz","fileCount":7,"integrity":"sha512-2iKT7Ifhh8aV1sqVGQeAaVkOrknPUstXYF6urOhDVqIlNzO+v5fg8EBq1Hppn/ERM4/ykV/yKhR7bkIvMNiP9w==","signatures":[{"sig":"MEQCIFlpAdb6FKyGhQw+7LupBxBLRm+ShY5zwsOGVAj8OvHnAiBXnrVsgLsx/+Gm11KIyqYf6tjEeMbqRw0vNPSX/nKn3g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25691},"type":"module","gitHead":"5de8c461b5d0dd867aaa1dc30b0562c4c40b6973","scripts":{"dev":"tsup --format esm,cjs --watch","fix":"eslint . -f mo --fix","lint":"eslint . -f mo","test":"vitest","build":"tsup --format esm,cjs --clean --dts","prepack":"nr build","prepare":"simple-git-hooks","preview":"node --watch bin/index.js","release":"bumpp && npm publish","test:once":"vitest run","typecheck":"tsc --noEmit"},"_npmUser":{"name":"bernankez","email":"bernankeic@gmail.com"},"repository":{"url":"git+https://github.com/Bernankez/npm-open.git","type":"git"},"_npmVersion":"10.7.0","description":"Open npm homepage with `npm-open`, similar to `git-open`","directories":{},"lint-staged":{"*":"eslint --fix"},"sideEffects":false,"_nodeVersion":"20.15.0","dependencies":{"cac":"^6.7.14","open":"^10.1.0"},"publishConfig":{"access":"public"},"typesVersions":{"*":{"*":["./dist/*","./dist/index.d.ts"]}},"_hasShrinkwrap":false,"packageManager":"pnpm@9.9.0","devDependencies":{"tsx":"^4.19.0","tsup":"^8.2.4","vite":"^5.4.2","bumpp":"^9.5.2","eslint":"^9.9.1","rimraf":"^6.0.1","vitest":"^2.0.5","@antfu/ni":"^0.23.0","typescript":"^5.5.4","@types/node":"^22.5.1","lint-staged":"^15.2.9","@bernankez/utils":"^0.6.4","simple-git-hooks":"^2.11.1","eslint-formatter-mo":"^1.2.0","@bernankez/eslint-config":"^2.0.0"},"simple-git-hooks":{"pre-commit":"nlx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/npm-open_0.0.1_1724997269577_0.30154589589906067","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@bernankez/npm-open","version":"0.0.2","keywords":["npm","cli"],"author":{"url":"https://github.com/Bernankez","name":"Cole","email":"bernankeic@gmail.com"},"license":"MIT","_id":"@bernankez/npm-open@0.0.2","maintainers":[{"name":"bernankez","email":"bernankeic@gmail.com"}],"homepage":"https://github.com/Bernankez/npm-open#readme","bugs":{"url":"https://github.com/Bernankez/npm-open/issues"},"bin":{"npm-open":"bin/index.js"},"dist":{"shasum":"8a2519f125ea5d7cbcc90d4bc35bef2c2253f319","tarball":"https://registry.npmjs.org/@bernankez/npm-open/-/npm-open-0.0.2.tgz","fileCount":8,"integrity":"sha512-GE5jX4h9KQVYlBKhw+b1nGGKgXR8Iuj0Kq5cBo8JSAR8AsP9/74P0zSeYbKWub2Wo7yav6+vAD7ZoIuYUB1GtQ==","signatures":[{"sig":"MEQCIGsK7TagDYj+PyVnOIUePtWhx4QlJSGslbR43Ig0iPkeAiBAFfKyOku6csKQUZU4OnXWrFr6fNw2dUbuB9fN027n2w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27216},"type":"module","gitHead":"11c24848b4505f47dfe139ec910a96ae2e7ff15b","scripts":{"dev":"tsup --format esm,cjs --watch","fix":"eslint . -f mo --fix","lint":"eslint . -f mo","test":"vitest","build":"tsup --format esm,cjs --clean --dts","prepack":"nr build","prepare":"simple-git-hooks","preview":"node --watch bin/index.js","release":"bumpp && npm publish","test:once":"vitest run","typecheck":"tsc --noEmit"},"_npmUser":{"name":"bernankez","email":"bernankeic@gmail.com"},"repository":{"url":"git+https://github.com/Bernankez/npm-open.git","type":"git"},"_npmVersion":"10.7.0","description":"Open npm package homepage with `npm-open`, similar to `git-open`","directories":{},"lint-staged":{"*":"eslint --fix"},"sideEffects":false,"_nodeVersion":"20.15.0","dependencies":{"cac":"^6.7.14","open":"^10.1.0"},"publishConfig":{"access":"public"},"typesVersions":{"*":{"*":["./dist/*","./dist/index.d.ts"]}},"_hasShrinkwrap":false,"packageManager":"pnpm@9.9.0","devDependencies":{"tsx":"^4.19.0","tsup":"^8.2.4","vite":"^5.4.2","bumpp":"^9.5.2","eslint":"^9.9.1","rimraf":"^6.0.1","vitest":"^2.0.5","@antfu/ni":"^0.23.0","typescript":"^5.5.4","@types/node":"^22.5.1","lint-staged":"^15.2.9","@bernankez/utils":"^0.6.4","simple-git-hooks":"^2.11.1","eslint-formatter-mo":"^1.2.0","@bernankez/eslint-config":"^2.0.0"},"simple-git-hooks":{"pre-commit":"nlx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/npm-open_0.0.2_1724998887667_0.6465934637474764","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"@bernankez/npm-open","type":"module","version":"0.0.3","packageManager":"pnpm@9.9.0","description":"Open npm package homepage with `npm-open`, similar to `git-open`","author":{"name":"Cole","email":"bernankeic@gmail.com","url":"https://github.com/Bernankez"},"license":"MIT","homepage":"https://github.com/Bernankez/npm-open#readme","repository":{"type":"git","url":"git+https://github.com/Bernankez/npm-open.git"},"bugs":{"url":"https://github.com/Bernankez/npm-open/issues"},"keywords":["npm","cli"],"sideEffects":false,"typesVersions":{"*":{"*":["./dist/*","./dist/index.d.ts"]}},"bin":{"npm-open":"bin/index.js"},"scripts":{"build":"tsup --format esm,cjs --clean --dts","dev":"tsup --format esm,cjs --watch","start":"tsx --watch src/index.ts","fix":"eslint . -f mo --fix","lint":"eslint . -f mo","prepack":"nr build","prepare":"simple-git-hooks","preview":"node --watch bin/index.js","release":"bumpp && npm publish","test":"vitest","test:once":"vitest run","typecheck":"tsc --noEmit"},"dependencies":{"c12":"^1.11.2","cac":"^6.7.14","open":"^10.1.0"},"devDependencies":{"@antfu/ni":"^0.23.0","@bernankez/eslint-config":"^2.1.0","@bernankez/utils":"^0.6.4","@types/node":"^22.5.4","bumpp":"^9.5.2","eslint":"^9.10.0","eslint-formatter-mo":"^1.2.0","lint-staged":"^15.2.10","rimraf":"^6.0.1","simple-git-hooks":"^2.11.1","tsup":"^8.2.4","tsx":"^4.19.0","type-fest":"^4.26.1","typescript":"^5.5.4","vite":"^5.4.3","vitest":"^2.0.5"},"simple-git-hooks":{"pre-commit":"nlx lint-staged"},"lint-staged":{"*":"eslint --fix"},"publishConfig":{"access":"public"},"_id":"@bernankez/npm-open@0.0.3","gitHead":"f7efe9ab41e18b5f505a11081c7fca8e906d0707","_nodeVersion":"20.15.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-o0qxecr/3GxYyTYNvXSRfcOuZBq4whQx8hk2zDG6bB5/X7jYP9rvTtk4t6eVCk8JfJoXW+TWvLLd4rFufKbrJQ==","shasum":"c4794075b9ca64a2012ed08cf58b0b4300211875","tarball":"https://registry.npmjs.org/@bernankez/npm-open/-/npm-open-0.0.3.tgz","fileCount":13,"unpackedSize":51022,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6PtmanSbzrPTHc+Z1TdqbvjAxFReK+Q6uya9eqm2T3AIgBfrytRE/uX5o6h+B6gdTsX+oc3p00VMa5OqhBvwILQw="}]},"_npmUser":{"name":"bernankez","email":"bernankeic@gmail.com"},"directories":{},"maintainers":[{"name":"bernankez","email":"bernankeic@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/npm-open_0.0.3_1725871012495_0.5201302597217168"},"_hasShrinkwrap":false}},"time":{"created":"2024-08-30T05:54:29.459Z","modified":"2024-09-09T08:36:52.827Z","0.0.1":"2024-08-30T05:54:29.804Z","0.0.2":"2024-08-30T06:21:27.801Z","0.0.3":"2024-09-09T08:36:52.641Z"},"bugs":{"url":"https://github.com/Bernankez/npm-open/issues"},"author":{"name":"Cole","email":"bernankeic@gmail.com","url":"https://github.com/Bernankez"},"license":"MIT","homepage":"https://github.com/Bernankez/npm-open#readme","keywords":["npm","cli"],"repository":{"type":"git","url":"git+https://github.com/Bernankez/npm-open.git"},"description":"Open npm package homepage with `npm-open`, similar to `git-open`","maintainers":[{"name":"bernankez","email":"bernankeic@gmail.com"}],"readme":"# npm-open\n\n[![npm](https://img.shields.io/npm/v/@bernankez/npm-open?color=red&label=npm)](https://www.npmjs.com/package/@bernankez/npm-open)\n[![CI](https://github.com/Bernankez/npm-open/workflows/CI/badge.svg)](https://github.com/Bernankez/npm-open/actions)\n\nType `npm-open` to open the npm package page in the browser. Similar to `git-open`.\n\n## Install\n\n```sh\npnpm add -g @bernankez/npm-open\n```\n\n## Usage\n\nRun in the project root directory:\n\n```sh\nnpm-open\n```\n\nYou can also specify the root directory using the `--cwd` flag:\n\n```sh\nnpm-open --cwd <path to project>\n```\n\nBy default, it opens page with your current npm registry. If you want to open the npm package page, using the `-n` or `--npm`:\n\n```sh\nnpm-open -n\n```\n\n## Config\n\n`npm-open` suppports customizing npm registry config via `npmopen.config.ts`. You can customize the website page url.\n\n```ts\n// npmopen.config.ts\nimport { defineConfig } from \"@bernankez/npm-open\";\n\nexport default defineConfig({\n  // Always open npm package page or not\n  npm: false,\n  // Custom registry config\n  registry: [\n    {\n      name: \"custom\",\n      url: \"https://your-custom-registry/\",\n      website: pkgName => `https://your-custom-registry/page/${pkgName}`\n    }\n  ]\n});\n```\n\n## API Usage\n\n```ts\nimport { resolvePackage } from \"@bernankez/npm-open\";\n\nconst pkgName = \"@bernankez/npm-open\";\n\nasync function load(): Promise<void> {\n  const pkg = await resolvePackage(pkgName, {\n    npm: true,\n  });\n  console.log(pkg);\n  // {\n  //   name: \"npm\",\n  //   url: \"https://registry.npmjs.org/@bernankez/npm-open\",\n  //   website: \"https://www.npmjs.com/package/@bernankez/npm-open\",\n  // }\n}\n\nload();\n```\n\n## License\n\n[MIT](LICENSE) License © 2024-PRESENT [科科Cole](https://github.com/Bernankez)\n","readmeFilename":"README.md"}