Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
barely-a-dev-server
Advanced tools
A thin, opinionated wrapper for [`esbuild`](https://github.com/evanw/esbuild) as a `.ts` web server. Given an `entryRoot` folder, it:
barely-a-dev-server
A thin, opinionated wrapper for esbuild
as a .ts
web server. Given an entryRoot
folder, it:
.ts
files under entryRoot
and uses them as entry files to run esbuild
in watch
mode, and.js
files together with a fallback to entryRoot
for static files.
/
are mapped to index.html
in the corresponding folder.When run with "dev": false
, it writes these files to an output dir (dist/
+ the entry root by default), ready to serve using your favorite static file server.
Install with:
npm install -D barely-a-dev-server
// script/build.js
import { barelyServe } from "barely-a-dev-server";
barelyServe({
entryRoot: "src", // the only required arg
dev: true,
port: 3333,
esbuildOptions: {
target: "esnext",
},
});
<!-- src/index.html -->
<script src="./index.js" href="./index.ts" type="module" defer></script>
// src/index.ts
const a: number = 4;
console.log(a);
(Note that src
must reference the generated .js
file, not .ts
. The example shows an ergonomic hack: you can use href
to store a reference to the .ts
source, so that you can e.g. "Follow link" in VSCode.)
barely-a-dev-server
?esbuild
, which is very fast and robust.
esbuild
.barely-a-dev-server
?esbuild
's --servedir
arg during dev, and cp -R
for a build.node -e 'import("barely-a-dev-server").then(s => s.barelyServe({entryRoot: "src"}))'
.ts
file under the entryRoot
as an entry point. esbuild
handles this very well, but this may result in significantly more output files than expected/needed.
These are mostly because it would make the codebase significantly larger to support them properly.
FAQs
A thin, opinionated wrapper for [`esbuild`](https://github.com/evanw/esbuild) as a `.ts` web server. Given an `entryRoot` folder, it:
The npm package barely-a-dev-server receives a total of 20 weekly downloads. As such, barely-a-dev-server popularity was classified as not popular.
We found that barely-a-dev-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.