Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@snaplet/seed
Advanced tools
An auto-generated ORM-like library for generating seed data tailored to your own database
Automatically seed your database with production-like dummy data based on your schema for local development and testing.
Seed automatically creates relational entities so you don’t have to keep track of IDs in one table when you’re defining values in another.
await seed.posts([{
title: "Why you need Seed",
author: {
email: "snappy@snaplet.dev",
},
comments: (x) => x(3),
}]);
Seed creates a TypeScript client based off your database structure. Values are safe, and soft documented. You have the full power of the typescript language and the rich node.js infrastructure when seeding production-like data and defining data values.
Seed uses Copycat for its data generation functions, and all data generation is fully deterministic. That means if you use the same inputs, you'll always get the same data outputs. That makes seed great for consistent tests and development.
npx @snaplet/seed init
Learn more by reading our documentation.
Use a Large Language Model (LLM) to generate examples for text-based entries. To use this feature, set up one of the following environment variables in your .env
file:
OPENAI_API_KEY=<your_openai_api_key>
GROQ_API_KEY=<your_groq_api_key>
Optionally, specify the AI model name with the
AI_MODEL_NAME
environment variable. Example:AI_MODEL_NAME=gpt-4-mini
The predicted data is saved in the file .snaplet/dataExamples.json
and can be modified by the user.
Here is an example of a dataExamples.json
file:
[
{
"input": "post title",
"examples": [
"Tips for Effective Time Management",
...
],
"description": "This column is about storing the titles of the user-generated posts in the project."
},
...
]
In the above example, one could modify the description and remove the examples. Running npx @snaplet/seed sync
will then regenerate examples based on the updated description for that column.
FAQs
An auto-generated ORM-like library for generating seed data tailored to your own database
The npm package @snaplet/seed receives a total of 6,671 weekly downloads. As such, @snaplet/seed popularity was classified as popular.
We found that @snaplet/seed 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.