
Company News
Meet the Socket Team at RSAC and BSidesSF 2026
Join Socket for live demos, rooftop happy hours, and one-on-one meetings during BSidesSF and RSA 2026 in San Francisco.
midway-bin
Advanced tools
this is a sub package for midway.
midway developer tool, extends [egg-bin].
$ npm i midway-bin --save-dev
Add midway-bin to package.json scripts like [egg-bin], but just replace command by `midway-bin:
{
"scripts": {
"dev": "midway-bin dev",
"debug": "midway-bin debug",
"test-local": "midway-bin test",
"test": "npm run lint -- --fix && npm run midway-local",
"cov": "midway-bin cov",
"lint": "eslint .",
"pkgfiles": "midway-bin pkgfiles",
"autod": "midway-bin autod",
"ci": "npm run lint && npm run autod -- --check && npm run pkgfiles -- --check && npm run cov"
}
}
midway-bin add new command
build typescript source file to dist directory like tsc and copy js/css/html file to same place.
$ midway-bin build
--clean -c clean dist directory before build--entrypoint <entrypoint-file> bundle the output with the specified file as entrypointwe can copy static file when ts file compiling.
// in package.json
"midway-bin-build": {
"include": [
"app/public",
"app/view"
]
}
it will be copy src/app/public to ${outDir}/app/public.
The outDir field is configured in the tsconfig.json File, see compiler-options.
clean a dist directory by build
$ midway-bin clean
generate application document by typedoc
$ midway-bin doc
like typedoc, see link
--options [typedoc.js] Specify a js option file that should be loaded.--out -o [outPath] Specifies the location the documentation should be written to.--mode -m default value is file, Specifies the output mode the project is used to be compiled with.--exclude Exclude files by the given pattern when a path is provided as source.--theme default value is default Specify the path to the theme that should be used.--excludeExternals default value is true Prevent externally resolved TypeScript files from being documented.--ignoreCompilerErrors default value is true Generates documentation, even if the project does not TypeScript compile.--hideGenerator default value is true Do not print the TypeDoc link at the end of the page.Tips: If the options parameter is supplied, the other default parameters are invalid
FAQs
Midway Command Tools
The npm package midway-bin receives a total of 1,253 weekly downloads. As such, midway-bin popularity was classified as popular.
We found that midway-bin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Join Socket for live demos, rooftop happy hours, and one-on-one meetings during BSidesSF and RSA 2026 in San Francisco.

Research
/Security News
Malicious Packagist packages disguised as Laravel utilities install an encrypted PHP RAT via Composer dependencies, enabling remote access and C2 callbacks.

Research
/Security News
OpenVSX releases of Aqua Trivy 1.8.12 and 1.8.13 contained injected natural-language prompts that abuse local AI coding agents for system inspection and potential data exfiltration.