{"name":"@eggjs/cluster","version":"4.0.2-beta.15","keywords":["cluster","egg","process"],"author":{"name":"dead-horse","email":"dead_horse@qq.com"},"license":"MIT","_id":"@eggjs/cluster@4.0.2-beta.15","maintainers":[{"name":"gxkl","email":"gxkl203@gmail.com"},{"name":"eggjs-admin","email":"fengmk2+eggjs@gmail.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"atian25","email":"atian25@qq.com"},{"name":"hyj1991","email":"yeekwanvong@gmail.com"},{"name":"killagu","email":"killa07071201@gmail.com"},{"name":"coolme200","email":"2001-wms@163.com"},{"name":"akitasummer","email":"644171127@qq.com"},{"name":"niania","email":"ljracm@gmail.com"}],"homepage":"https://github.com/eggjs/egg/tree/next/packages/cluster","bugs":{"url":"https://github.com/eggjs/egg/issues"},"dist":{"shasum":"dca370ebb13b5e58bcb84e2b54c4e9b0ee5a6807","tarball":"http://registry-npm.ywwl.com/@eggjs/cluster/download/@eggjs/cluster-4.0.2-beta.15.tgz","fileCount":34,"integrity":"sha512-xuyK19JHAlYd5A+Dgsp+6flwhKKJMgstcw7kfvqTJt2mcsi555Naindx13kgxBgTySNrORbvAtPjcqfY/FZy2w==","signatures":[{"sig":"MEYCIQCEbsNz1dmruoIDX4sJippA5YLXdJH5QpVAENtuZjTl/wIhAJ9a1vsN2q/wz9bQ0XvtpC9zkBacI0ZMDQPMpnkBR+gw","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@eggjs%2fcluster@4.0.2-beta.15","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":72362,"size":17662,"noattachment":false,"key":"/@eggjs/cluster/-/@eggjs/cluster-4.0.2-beta.15.tgz"},"main":"./dist/index.js","type":"module","_from":"file:eggjs-cluster-4.0.2-beta.15.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=22.18.0"},"exports":{".":"./dist/index.js","./app_worker":"./dist/app_worker.js","./agent_worker":"./dist/agent_worker.js","./package.json":"./package.json"},"scripts":{"lint":"oxlint","test":"vitest run","typecheck":"tsgo --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d3c6dbc3-6ae6-4318-8c97-f0b9722283cd"}},"_resolved":"/tmp/457feaaae73c85deeef2a52f99c65ce9/eggjs-cluster-4.0.2-beta.15.tgz","_integrity":"sha512-xuyK19JHAlYd5A+Dgsp+6flwhKKJMgstcw7kfvqTJt2mcsi555Naindx13kgxBgTySNrORbvAtPjcqfY/FZy2w==","repository":{"url":"git+https://github.com/eggjs/egg.git","type":"git","directory":"packages/cluster"},"_npmVersion":"11.13.0","description":"cluster manager for egg","directories":{},"_nodeVersion":"24.17.0","dependencies":{"cfork":"^2.0.0","utility":"^2.5.0","get-ready":"^3.1.0","egg-logger":"^3.5.0","detect-port":"^2.1.0","sendmessage":"^3.0.1","@eggjs/utils":"5.0.2-beta.15","terminal-link":"^5.0.0","cluster-reload":"^2.0.0","@fengmk2/ps-tree":"^2.0.1","graceful-process":"^2.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"coffee":"5","tsdown":"^0.18.2","urllib":"^4.8.2","vitest":"^4.0.15","address":"2","typescript":"^5.9.3","@eggjs/mock":"7.0.2-beta.15","@eggjs/errors":"3.0.2-beta.15","@eggjs/tsconfig":"3.1.2-beta.15","@eggjs/supertest":"9.0.2-beta.15"},"_npmOperationalInternal":{"tmp":"tmp/cluster_4.0.2-beta.15_1782441122334_0.8741451588907849","host":"s3://npm-registry-packages-npm-production"},"readme":"# @eggjs/cluster\n\n[![NPM version][npm-image]][npm-url]\n[![Known Vulnerabilities][snyk-image]][snyk-url]\n[![npm download][download-image]][download-url]\n[![Node.js Version](https://img.shields.io/node/v/@eggjs/cluster.svg?style=flat)](https://nodejs.org/en/download/)\n\n[npm-image]: https://img.shields.io/npm/v/@eggjs/cluster.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/@eggjs/cluster\n[snyk-image]: https://snyk.io/test/npm/@eggjs/cluster/badge.svg?style=flat-square\n[snyk-url]: https://snyk.io/test/npm/@eggjs/cluster\n[download-image]: https://img.shields.io/npm/dm/@eggjs/cluster.svg?style=flat-square\n[download-url]: https://npmjs.org/package/@eggjs/cluster\n\nCluster Manager for EggJS\n\n## Install\n\n```bash\nnpm i @eggjs/cluster\n```\n\n## Usage\n\nCommonJS\n\n```js\nconst { startCluster } = require('@eggjs/cluster');\n\nstartCluster({\n  baseDir: '/path/to/app',\n  framework: '/path/to/framework',\n});\n```\n\nYou can specify a callback that will be invoked when application has started.\nHowever, master process will exit when catch an error.\n\n```js\nstartCluster(options).then(() => {\n  console.log('started');\n});\n```\n\nESM and TypeScript\n\n```ts\nimport { startCluster } from '@eggjs/cluster';\n\nstartCluster({\n  baseDir: '/path/to/app',\n  framework: '/path/to/framework',\n});\n```\n\n## Options\n\n| Param     | Type            | Description                                                                                                       |\n| --------- | --------------- | ----------------------------------------------------------------------------------------------------------------- |\n| baseDir   | `String`        | directory of application                                                                                          |\n| framework | `String`        | specify framework that can be absolute path or npm package                                                        |\n| plugins   | `Object`        | plugins for unittest                                                                                              |\n| workers   | `Number`        | numbers of app workers                                                                                            |\n| sticky    | `Boolean`       | sticky mode server                                                                                                |\n| port      | `Number`        | port                                                                                                              |\n| debugPort | `Number`        | the debug port only listen on http protocol                                                                       |\n| https     | `Object`        | start a https server, note: `key` / `cert` / `ca` should be full path to file                                     |\n| require   | `Array\\|String` | will inject into worker/agent process                                                                             |\n| pidFile   | `String`        | will save master pid to this file                                                                                 |\n| startMode | `String`        | default is 'process', use 'worker_threads' to start the app & agent worker by worker_threads                      |\n| ports     | `Array`         | startup port of each app worker, such as: [7001, 7002, 7003], only effects when the startMode is 'worker_threads' |\n| env       | `String`        | custom env, default is process.env.EGG_SERVER_ENV                                                                 |\n\n## Env\n\n`EGG_APP_CLOSE_TIMEOUT`: app worker boot timeout value\n\n`EGG_AGENT_CLOSE_TIMEOUT`: agent worker boot timeout value\n\n## License\n\n[MIT](LICENSE)\n\n## Contributors\n\n[![Contributors](https://contrib.rocks/image?repo=eggjs/egg)](https://github.com/eggjs/egg/graphs/contributors)\n\nMade with [contributors-img](https://contrib.rocks).\n","publish_time":1782441122462,"_cnpm_publish_time":1782441122462,"dist-tags":{"beta":"4.0.2-beta.27","latest":"4.1.0","rc":"4.0.2-rc.1"}}