{"id":23763699,"url":"https://github.com/tomashubelbauer/node-wsb","last_synced_at":"2026-04-28T12:02:02.893Z","repository":{"id":107986202,"uuid":"312878398","full_name":"TomasHubelbauer/node-wsb","owner":"TomasHubelbauer","description":"Run a PowerShell script in Windows Sandbox from Node","archived":false,"fork":false,"pushed_at":"2022-04-28T08:50:55.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-01T16:40:07.715Z","etag":null,"topics":["node","wsb"],"latest_commit_sha":null,"homepage":"","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/TomasHubelbauer.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-11-14T18:35:18.000Z","updated_at":"2022-04-16T23:02:03.000Z","dependencies_parsed_at":"2024-06-02T17:51:25.051Z","dependency_job_id":null,"html_url":"https://github.com/TomasHubelbauer/node-wsb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TomasHubelbauer/node-wsb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Fnode-wsb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Fnode-wsb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Fnode-wsb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Fnode-wsb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TomasHubelbauer","download_url":"https://codeload.github.com/TomasHubelbauer/node-wsb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Fnode-wsb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32379629,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T11:25:28.583Z","status":"ssl_error","status_checked_at":"2026-04-28T11:25:05.435Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["node","wsb"],"created_at":"2024-12-31T22:13:20.201Z","updated_at":"2026-04-28T12:02:02.888Z","avatar_url":"https://github.com/TomasHubelbauer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node Windows Sandbox\r\n\r\nThis library allows running PowerShell scripts in Windows Sandbox.\r\n\r\n## Installation\r\n\r\n`git submodule add https://github.com/tomashubelbauer/node-wsb`\r\n\r\nTo update:\r\n\r\n```sh\r\ncd node-wsb\r\ngit pull\r\ncd ..\r\n```\r\n\r\n## Usage\r\n\r\n```js\r\nimport wsb from './node-wsb/index.js';\r\n\r\nconsole.log(await wsb('echo \"Hello, World!\"'));\r\n```\r\n\r\nThe return value is an object:\r\n\r\n- `stdout` (`string`): the output value in case of success\r\n- `stderr` (`string`): the output value in case of failure\r\n- `exitCode` (`number`): 0 for success, 1 for failure\r\n- `transcript` (`object`):\r\n  - `startTime` (`string`): the transcript start instant in `yyyymmddhhmmss`\r\n  - `endTime` (`string`): the transcript end instant in `yyyymmddhhmmss`\r\n  - `meta` (`object`): an object made of transcript metadata key-value pairs\r\n  - `data`: (`string[]`) an array of lines written to the transcript\r\n\r\n## Development\r\n\r\nRun tests using `npm test`.\r\n\r\n### To-Do\r\n\r\n#### Address code to-do comments\r\n\r\nUse [`todo`](https://github.com/tomashubelbauer/todo).\r\n\r\n#### Finalize the `wait` argument logic - wait or bail based on its value\r\n\r\n#### Add a \"simulation\" mode option which falls back to PowerShell direct\r\n\r\nThis would be used in the CI or when the user doesn't want to / can't enable WSB\r\non their machine.\r\n\r\n\r\n#### Consider adding a Docker backend for non-Windows and CI environments maybe\r\n\r\nPerhaps it should be a separate package though.\r\n\r\n#### Look into using PowerShell remoting for communicating with the sandbox\r\n\r\nI think we could find the sandbox' IP address and connect to it using PowerShell\r\nremoting and run the commands that way. We might need to turn it on first.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomashubelbauer%2Fnode-wsb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomashubelbauer%2Fnode-wsb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomashubelbauer%2Fnode-wsb/lists"}