
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@y-sweet/sdk
Advanced tools
Javascript/Typescript backend SDK for building collaboration features with y-sweet.
JavaScript/TypeScript backend SDK for building collaboration features with y-sweet.
npm install @y-sweet/sdk
Read the documentation for guides and API references.
Explore our collaborative examples to help you get started.
All examples are open source and live in this repository, within /examples.
Here’s how access control works in y-sweet:
The client token contains all the information needed for the client to connect to a y-sweet document, so the client doesn’t need any configuration. But you do need to tell your server how to talk to y-sweet, by passing a server token.
A server token combines a URL and a secret key. It can be represented either as a JSON object with url and token as keys, or as a JSONified string
of the same. This makes it easy to store the server token in a secret store, and pass it to your server code as an environment variable.
import { YDocProvider } from '@y-sweet/react'
import { getOrCreateDocAndToken } from '@y-sweet/sdk'
type HomeProps = {
searchParams: Record<string, string>
}
export default async function Home({ searchParams }: HomeProps) {
// Point to a local or production y-sweet server.
const connectionString = "ys://localhost:8080"
const clientToken = await getOrCreateDocAndToken(connectionString, searchParams.doc)
return (
<YDocProvider clientToken={clientToken} setQueryParam="doc">
// Call your collaborative interface here
</YDocProvider>
)
}
FAQs
Javascript/Typescript backend SDK for building collaboration features with y-sweet.
We found that @y-sweet/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.