{"id":24143302,"url":"https://github.com/little-core-labs/little-process-box","last_synced_at":"2025-09-19T11:31:59.525Z","repository":{"id":57290382,"uuid":"218143116","full_name":"little-core-labs/little-process-box","owner":"little-core-labs","description":"A little toolkit for running and managing child processes","archived":false,"fork":false,"pushed_at":"2020-03-16T16:34:32.000Z","size":62,"stargazers_count":7,"open_issues_count":3,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-01T21:41:05.104Z","etag":null,"topics":["box","launcher","little","management","pool","process"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/little-core-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-28T20:52:35.000Z","updated_at":"2020-03-16T16:34:35.000Z","dependencies_parsed_at":"2022-09-02T06:22:28.782Z","dependency_job_id":null,"html_url":"https://github.com/little-core-labs/little-process-box","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/little-core-labs/little-process-box","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/little-core-labs%2Flittle-process-box","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/little-core-labs%2Flittle-process-box/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/little-core-labs%2Flittle-process-box/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/little-core-labs%2Flittle-process-box/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/little-core-labs","download_url":"https://codeload.github.com/little-core-labs/little-process-box/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/little-core-labs%2Flittle-process-box/sbom","scorecard":{"id":592983,"data":{"date":"2025-08-11","repo":{"name":"github.com/little-core-labs/little-process-box","commit":"768293661ff6d77fd5f8d06855ca20ede4588a92"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 1/16 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/nodejs.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/little-core-labs/little-process-box/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/little-core-labs/little-process-box/nodejs.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/nodejs.yml:22","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T22:25:48.366Z","repository_id":57290382,"created_at":"2025-08-20T22:25:48.366Z","updated_at":"2025-08-20T22:25:48.366Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275927962,"owners_count":25554310,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-19T02:00:09.700Z","response_time":108,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["box","launcher","little","management","pool","process"],"created_at":"2025-01-12T05:14:59.361Z","updated_at":"2025-09-19T11:31:59.239Z","avatar_url":"https://github.com/little-core-labs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"little-process-box\n==================\n\n\u003e A little toolkit for running and managing child processes\n\n\u003ca name=\"installation\"\u003e\u003c/a\u003e\n## Installation\n\n```sh\n$ npm install little-process-box\n```\n\n\u003ca name=\"status\"\u003e\u003c/a\u003e\n## Status\n\n\u003e **Development/Testing/Documentation**\n\n\u003e [![Actions Status](https://github.com/little-core-labs/little-process-box/workflows/Node%20CI/badge.svg)](https://github.com/little-core-labs/little-process-box/actions)\n\n\u003ca name=\"usage\"\u003e\u003c/a\u003e\n## Usage\n\n```js\nconst { Supervisor } = require('little-process-box')\n\nconst supervisor = new Supervisor()\nconst pool = supervisor.pool()\n\nsupervisor.service('http-server', {\n  pool,\n  exec: 'node',\n  args: ['server.js'],\n  env: { PORT: 3000 }\n})\n\nsupervisor.service('discovery', {\n  pool,\n  exec: 'node',\n  args: ['discovery.js'],\n  env: { PORT: 9000 },\n})\n\nsupervisor.start((err) =\u003e {\n  // http + discovery should both started\n  supervisor.stat({name: 'http-server'}, (err, stats) =\u003e {\n    console.log(stats)\n  })\n\n  supervisor.stat({name: 'discovery'}, (err, stats) =\u003e {\n    console.log(stats)\n  })\n\n  supervisor.stop() // stops all services\n})\n```\n\n## API\n\n\u003ca name=\"process-pool\"\u003e\u003c/a\u003e\n### `const pool = new ProcessPool([Factory])`\n\nThe `ProcessPool` class represents a container of running processes\nmanaged by the instance. This class extends the `Pool` class from the\n[nanoresource-pool][nanoresource-pool] module. You can override the\n[default factory](#process]) by supplying your own `Factory` that should\nimplement the [nanoresource][nanoresource]\n\n#### `pool.spawn(command[, args[, opts]])`\n\nCreates and spawns a command in a new [process][nanoprocess] managed\nby the pool.\n\n#### `pool.stat([where], callback)`\n\nCollects the [stats][nanoprocess#stats] of all running process\ncalling `callback(err, stats)` upon success or error. The\n`where` object can be used to filter the results that get queried\nfor stats.\n\n#### `pool.launch(pathspec[, opts])`\n\nLaunches a program by way of an input `pathspec` that may be an\napplication URL, path to an application directory, or something\nsuitable for the operating system to [launch][open] (\"open\").\n\n\u003ca name=\"supervisor\"\u003e\u003c/a\u003e\n### `const supervisor = new Supervisor()`\n\nThe `Supervisor` class represents a higher level container for\n`ProcessPool` instances in which it provides abilities to manage processes\nas services with consolidated logging, mutex locks, graceful shutdowns, and\nconnected message channels.\n\n#### `supervisor.pools`\n\nA list of all pools.\n\n#### `supervisor.pool(opts)`\n\nCreates a new [`SupervisorProcessPool`](#supervisor-process-pool) instance.\n\n#### `supervisor.service(name, opts)`\n\nCreates a named service with options from a new or\ngiven pool (`opts.pool`).\n\n#### `supervisor.stat([where], callback)`\n\nQueries all services in all process pools based on an optional\n`where` filter calling `callback(err, results)` upon success or\nerror.\n\n#### `supervisor.start([callback])`\n\nStarts all services in all pools calling `callback(err)` upon success\nor error.\n\n#### `supervisor.stop([callback])`\n\nStops all services in all pools calling `callback(err)` upon success\nor error.\n\n#### `supervisor.restart([callback])`\n\nRestarts all services in all pools calling `callback(err)` upon success\nor error.\n\n\u003ca name=\"supervisor-process-pool\"\u003e\u003c/a\u003e\n### `const pool = new SupervisorProcessPool([opts])`\n\nThe `SupervisorProcessPool` class represents an extended\n[`ProcessPool`](#process-pool) that creates `Service` instances\nas the process resource.\n\n\u003ca name=\"service\"\u003e\u003c/a\u003e\n### `const service = new Service(options)`\n\nThe `Service` class represents a named process that can be started,\nrestarted, and stopped. The `Service` class inherits all properties from\nthe [`Process`](#process) class.\n\n#### `service.env`\n\nEnvironment object for the service.\n\n#### `service.pool`\n\nThe [pool](#supervisor-process-pool) that created this service.\n\n#### `service.type`\n\nThe service type. This can be anything.\n\n#### `service.name`\n\nThe service name. This can be anything.\n\n#### `service.exec`\n\nThe command used to execute the service.\n\n#### `service.args`\n\nThe command arguments used to execute the service.\n\n#### `service.description`\n\nA description of the service.\n\n#### `service.stdin`\n\nA `Writable` stream for the service's `stdin`.\n\n#### `service.stdout`\n\nA `Readable` stream for the service's `stdout`.\n\n#### `service.stderr`\n\nA `Readable` stream for the service's `stderr`.\n\n#### `service.started`\n\n`true` if the service has successfully started.\n\n#### `service.starting`\n\n`true` if the service is in the middle of starting.\n\n#### `service.stopped`\n\n`true` if the service is stopped.\n\n#### `service.start([callback])`\n\nStarts the services calling `callback(err)` upon success or error.\n\n#### `service.stop([callback])`\n\nStops the services calling `callback(err)` upon success\nor error. This function will reset the `nanoresource`\nstate (opened, opening, closed, closing, actives) to their\ninitial values.\n\n#### `service.restart([callback])`\n\nRestarts the services calling `callback(err)` upon success\nor error. This function will call `service.stop(callback)`\n\n#### `service.stat([callback])`\n\nSame as [`Process#stat()`][nanoprocess#stat].\n\n#### `service.createLogStream()`\n\nReturns a readable stream to the caller that pipes `stderr` from the\nrunning service to the stream. If the service does not have a\nreadable `stderr` stream, then the returned stream will automatically\nend.\n\n\u003ca name=\"process\"\u003e\u003c/a\u003e\n### `const childProcess = new Process(command[, args[, opts]])`\n\nThe [`Process`][nanoprocess#process] class exported from\n[nanoprocess][nanoresource].\n\n\u003ca name=\"channel\"\u003e\u003c/a\u003e\n### `const channel = new Channel(process)`\n\nThe `Channel` class represents a channel for a running process that\nleverages IPC channels falling back to `stdin` and `stdout` streams to\nsend and receive messages on where `process` can be a\n[`Process`](#process) instance, a\n[`ChildProcess`](\nhttps://nodejs.org/api/child_process.html#child_process_class_childprocess)\ninstance, or the global\n[`process`](https://nodejs.org/api/process.html#process_process) object.\n\n#### `channel.send(buffer[, opts])`\n\nSends a `buffer` to the process through the message channel where `opts` can\nbe:\n\n```js\n{\n  id: 0, // The channel ID to send this on\n  type: 0, // The message type\n}\n```\n\n#### `channel.close(callback)`\n\nCloses channel calling `callback(err)` upon success or error.\n\n#### `channel.destroy([err])`\n\nClose process message channel and cleans up all resources.\n\n#### `channel.on('message', message, id, type)`\n\nEmitted when a message a sent over the process channel where `message`\nis a `Buffer` of the message sent, `id` is the channel\nidentifier and `type` is the message type.\n\n#### `channel.on('error', err)`\n\nEmitted when an error occurs on the channel process during the life\ntime of the `Channel` instance.\n\n#### `channel.on('close')`\n\nEmitted when the channel closes.\n\n## License\n\nMIT\n\n## See Also\n\n- [open][open]\n- [nanoprocess][nanoprocess]\n- [nanoresource][nanoresource]\n- [nanoresource-pool][nanoresource-pool]\n\n\n[open]: https://github.com/sindresorhus/open\n[nanoprocess]: https://github.com/little-core-labs/nanoprocess\n[nanoprocess#stats]: https://github.com/little-core-labs/nanoprocess#childstatcallback\n[nanoprocess#process]: https://github.com/little-core-labs/nanoprocess#child-process\n[nanoresource]: https://github.com/mafintosh/nanoresource\n[nanoresource-pool]: https://github.com/little-core-labs/nanoresource-pool\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flittle-core-labs%2Flittle-process-box","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flittle-core-labs%2Flittle-process-box","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flittle-core-labs%2Flittle-process-box/lists"}