
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
@lyrasearch/plugin-astro
Advanced tools
This package is a (still experimental) Lyra integration for Astro.
// In `astro.config.mjs`
import lyra from '@lyrasearch/plugin-astro'
// https://astro.build/config
export default defineConfig({
integrations: [
lyra({
// We can generate more than one DB, with different configurations
mydb: {
// Required. Only pages matching this path regex will be indexed
pathMatcher: /blog\/[0-9]{4}\/[0-9]{2}\/[0-9]{2}\/.+$/,
// Optional. 'english' by default
language: 'spanish',
// Optional. ['body'] by default. Use it to constraint what is used to
// index a page.
contentSelectors: ['h1', 'main']
}
})
]
})
When running the astro build command, a new DB file will be persisted in the
dist/assets directory. For the particular case of this example, it will be
saved in the file dist/assets/lyraDB_mydb.json.
To use the generated DBs in your pages, you can include a script in your
<head> section, as the following one:
<head>
<!-- Other stuff -->
<script>
// Astro will do the job of bundling everything for you
import { getLyraDB, search } from "@lyrasearch/plugin-astro/client"
// We load the DB that we generated at build time, this is an asynchronous
// operation, so we must either await, or rely on `.then` calls.
const db = await getLyraDB('mydb')
// Now we can search inside our DB. Of course, feel free to use it in more
// interesting ways.
console.log('Search Results')
console.log(search(db, { term: 'mySearchTerm' }))
</script>
</head>
NOTE: For now, this plugin only supports readonly DBs. This might change in the future if there's demand for it.
FAQs
An Astro integration for Lyra
We found that @lyrasearch/plugin-astro demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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.

Security News
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.