
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@cipherstash/stashjs-adapter
Advanced tools
Adapter helpers for Stash.js and popular ORMs like Prisma
This package provides an adapter class to simplify migrating types from existing databases (such as Prisma) to a CipherStash collection.
For new applications we recommend using Stash.js which this library uses under the hood anyway.
The main component of this package is the CollectionAPI<T>
class which takes a type with a numeric id ({id: number}
)
and maps it to a CipherStash (which uses UUID) for IDs. CollectionAPI<T>
exposes a simple API as described below. It
does not attempt to mirror existing ORM interfaces like Prisma (though it may offer than in the future).
The primary goals of this module are:
First create a module to represent a model (say User) in CipherStash.
// -- user-vault.ts ==
// Existing User type
import { User } from "@prisma/client"
import CollectionAPI from "@cipherstash/stashjs-adapter"
const ID_NAMESPACE = "1b671a64-40d5-491e-99b0-da01ff1f3341"
export const UserVault = new CollectionAPI<User>("users", ID_NAMESPACE)
Then use in other parts of your application. For example, in an API:
import type { NextApiRequest, NextApiResponse } from "next"
import UserVault from "user-vault"
export default async function handler(_req: NextApiRequest, res: NextApiResponse<any>) {
const users = await UserVault.list()
res.status(200).json(users)
}
FAQs
Adapter helpers for Stash.js and popular ORMs like Prisma
The npm package @cipherstash/stashjs-adapter receives a total of 0 weekly downloads. As such, @cipherstash/stashjs-adapter popularity was classified as not popular.
We found that @cipherstash/stashjs-adapter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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 Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.