
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@compas/code-gen
Advanced tools
Code generators for routers, validators, SQL queries, API clients and more. Take a look at the documentation.
mainFn(import.meta, main);
async function main() {
const app = new App();
const T = new TypeCreator("post");
const R = T.router("/post");
app.add(
new TypeCreator("database")
.object("post")
.keys({
title: T.string().searchable(),
body: T.string(),
})
.enableQueries({ withDates: true }),
T.crud("/post").entity(T.reference("database", "post")).routes({
listRoute: true,
singleRoute: true,
createRoute: true,
updateRoute: true,
deleteRoute: true,
}),
);
await app.generate({
outputDirectory: "./src/generated/application",
dumpStructure: true,
dumpApiStructure: true,
dumpPostgres: true,
enabledGenerators: ["validator", "router", "sql", "apiClient"],
});
}
mainFn(import.meta, main);
async function main() {
const app = new App({ verbose: true });
let fromRemote = await loadApiStructureFromRemote(
Axios,
"https://some.compas.powered.backend",
);
app.extend(fromRemote);
await app.generate({
outputDirectory: "./src/generated",
isBrowser: true,
enabledGenerators: ["type", "apiClient", "reactQuery"],
});
await spawn("yarn", ["format"]);
}
formLimit
option to urlencodedLimit
in
createBodyParsers
d600ac
formLimit
to urlencodedLimit
in the first argument
to createBodyParsers
df9e43
createBodyParsers
use createBodyParser
instead.createBodyParser
by default does not parse multipart bodies. This should
be explicitly enabled with multipart: true
. Configure its options with
'multipartOptions' to set a custom maxFileSize
for example.jsonLimit
default to '5mb'.app.use(
router(
createBodyParser({
multipart: true,
multipartOptions: {
maxFileSize: 15 * 1024 * 2024,
},
}),
),
);
247aa0
@compas/code-gen/experimental
import to @compas/code-gen
26fb77
8d74da
a94ee5
727b50
28fa44
143743
FAQs
Generate various boring parts of your server
The npm package @compas/code-gen receives a total of 434 weekly downloads. As such, @compas/code-gen popularity was classified as not popular.
We found that @compas/code-gen 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.