{"name":"mkcert","version":"3.2.0","description":"Create Self Signed Development Certificates","main":"dist/mkcert.js","types":"dist/mkcert.d.ts","bin":{"mkcert":"dist/cli.js"},"scripts":{"build":"tsc","clean":"rm -rf dist","dev":"npm run clean && npm run build -- --watch","prepublishOnly":"npm run clean && npm run build","prettier":"prettier src tests --write","test":"jest"},"engines":{"node":">=16"},"repository":{"type":"git","url":"git+https://github.com/Subash/mkcert.git"},"keywords":["signed","certificate","cert"],"author":{"name":"Subash Pathak"},"license":"MIT","bugs":{"url":"https://github.com/Subash/mkcert/issues"},"homepage":"https://github.com/Subash/mkcert#readme","dependencies":{"commander":"^11.0.0","node-forge":"^1.3.1"},"devDependencies":{"@types/node-forge":"^1.3.4","jest":"^29.6.4","prettier":"^3.0.2","ts-jest":"^29.1.1","typescript":"^5.1.6"},"_id":"mkcert@3.2.0","gitHead":"03dc3fff1ce67185bddb6f99855a53289fdd49c3","_nodeVersion":"21.1.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-026Eivq9RoOjOuLJGzbhGwXUAjBxRX11Z7Jbm4/7lqT/Av+XNy9SPrJte6+UpEt7i+W3e/HZYxQqlQcqXZWSzg==","shasum":"6c4d58bbb31dbf76efd24f197d454702b14020f4","tarball":"http://registry-npm.ywwl.com/mkcert/download/mkcert-3.2.0.tgz","fileCount":7,"unpackedSize":11923,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDVS8nQilUFI8/Ji2b2U0sT5lVg/YLeac4a/OYlGDBfzAiEA9/CrpTD7KzBM5+zMvQLbhhHpo5KIM/+fqplfyURV3f8="}],"size":4049,"noattachment":false,"key":"/mkcert/-/mkcert-3.2.0.tgz"},"_npmUser":{"name":"sbspk","email":"subash@subashpathak.com"},"directories":{},"maintainers":[{"name":"sbspk","email":"subash@subashpathak.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mkcert_3.2.0_1699365898254_0.46133330949571394"},"_hasShrinkwrap":false,"readme":"Create self signed tls certificates without OpenSSL.\n\n## Install\n\n```\nnpm install -g mkcert\n```\n\n## CLI\n\n### Create a Certificate Authority\n\n```\n$ mkcert create-ca --help\n\n  Options:\n    --organization [value]  organization name (default: \"Test CA\")\n    --country-code [value]  country code (default: \"US\")\n    --state [value]         state name (default: \"California\")\n    --locality [value]      locality address (default: \"San Francisco\")\n    --validity [days]       validity in days (default: 365)\n    --key [file]            output key file (default: \"ca.key\")\n    --cert [file]           output certificate file (default: \"ca.crt\")\n    -h, --help              display help for command\n```\n\n### Create a Certificate\n\n```\n$ mkcert create-cert --help\n\n  Options:\n    --ca-key [file]                  ca private key file (default: \"ca.key\")\n    --ca-cert [file]                 ca certificate file (default: \"ca.crt\")\n    --validity [days]                validity in days (default: 365)\n    --key [file]                     output key file (default: \"cert.key\")\n    --cert [file]                    output certificate file (default: \"cert.crt\")\n    --organization [value]           optional organization name\n    --email [value]                  optional email address\n    --domains, --domain [values...]  domains or ip addresses (default: [\"localhost\",\"127.0.0.1\"])\n    -h, --help                       display help for command\n```\n\n## API\n\n```js\nimport { createCA, createCert } from \"mkcert\";\n\nconst ca = await createCA({\n  organization: \"Hello CA\",\n  countryCode: \"NP\",\n  state: \"Bagmati\",\n  locality: \"Kathmandu\",\n  validity: 365\n});\n\nconst cert = await createCert({\n  ca: { key: ca.key, cert: ca.cert },\n  domains: [\"127.0.0.1\", \"localhost\"],\n  validity: 365\n});\n\nconsole.log(cert.key, cert.cert); // certificate info\nconsole.log(`${cert.cert}${ca.cert}`); // create full chain certificate by merging CA and domain certificates\n```\n","publish_time":1699365898390,"_cnpm_publish_time":1699365898390,"dist-tags":{"latest":"3.2.0"}}