
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
@vesta/core
Advanced tools
ConditionLow level condition for Vql [It is much easier to use Hlc -more on that later].
CultureProviding support for i18n, i10n. You may build your own culture by providing 3 arguments:
locale: An object that provides the cultural information and is of type ILocalevocabs: An object that the keys are the words to be translated and the values are the translation of keysdateTime: A class that provides support for locale dateTime and extends the DateTime classAfter proving these arguments you may register your locale like this:
import { Culture } from "@vesta/core";
// ...
Culture.register(myLocal, myVocabs, MyDateTime);
// ...
In case of multiple culture the first culture is considered to be the default culture. You may change the default culture using Culture.setDefault(cultureCode);
In any part of your application you may access these parameters by the following static methods:
// at any of the following examples, if no localeCode is provided, the default locale code will be used
// get locale object
const locale = Culture.getLocale(localeCode);
// get DateTime instance
const dateTime = Culture.getDateTimeInstance(localeCode);
// get dictionary
const vocabs = Culture.getDictionary(localeCode);
DatabaseDateTimeabstract DateTime class that any localized DateTime must extend
Dictionarydictionary is the storage of key: translation and some methods for finding vocabs and extending the translations. keys are NOT case-sensitive.
import { Dictionary } from "@vesta/core";
// ...
const dictionary = new Dictionary();
// adding vocabs to dictionary
dictionary.inject(myVocabs);
// retrieving the relevant translation of a key
var translation = dictionary.lookup(myKey);
Culture uses this class for handling vocabs. You may access the Dictionary object by Dictionary.getDictionary method;
ErrProvides a class for customr Errors since the default class has some limitations.
To create new Err you may use Err.Code.* to clarify error types.
The following errors are two most used errors so we encapsulate them into new Err classes [extends Err]:
DatabaseErrorValidationErrorFieldHlc (High Level Condition)Using this class you may create any kind of -even very complex- conditions which is used by Vql to build a query.
import { Condition, Hlc as C, Vql } from "@vesta/core";
import { MyModel } from "./path/to/model";
// ...
// let's assume a table with the fields of firstName, lastName, age,
// we want to create q WHERE statement like the following
// (firstName=lastName AND age <= 30) OR (firstName<>lastName AND age > 30)
const condition: Condition = C.or(
C.and(
C.eq("firstName", "lastName", true), // third params set to true indicates that the lastName is a field of table and not a value
C.elt("age", 30)
),
C.and(
C.not(C.eq("firstName", "lastName", true)),
C.gt("age", 30)
),
);
var query = new Vql(MyModel.schema.name);
query.where(condition);
var result = await MyModel.find(query);
MimeQuerying mime/type based on extensions.
import { Mime } from "@vesta/core";
// ... adding new mimeType
Mime.addMime("MyExt", "MyExtMimeType");
// ... returieving mimeType
const mimeType = Mime.find("jpg");
Modelabstract Model class that any other models must extend. Do not create new models manually, instead use vesta cli. Go to the root of the project directory and on command line execute vesta gen model ModelName. The tool will ask you several questions for each fields and generates the model automatically.
This model is shared between client and server.
In model file you may provide extra meta for more customization.
PlatformProvides information about the platform at which the application is executing, e.g. Platform.isServer(), Platform.isAndroid(), ...
SanitizerSchemaValidationVql (Vesta Query Language)Provides the query builder for Models to execute queries and retrieve records.
import { Vql } from "@vesta/core";
import { SomeModel } from "./pth/to/model";
// ... creating new vql
const query = new Vql(SomeModel.schema.name);
// selecting fields
query.select("firstField", "secondField");
// limiting number of result
query.limitTo(10);
// starts from 15th record
query.fromOffset(15);
// the two line before will result in LIMIT 15, 10
// soring result
query.sortBy("firstField", true);
// filtering by fieldName: value
query.filter({firstName: "first", age: 20});
// for advanced and complex condition you may use Hlc
const result = SomeModel.find(query);
You may view source files for more information
FAQs
Vesta platform core library
We found that @vesta/core demonstrated a not healthy version release cadence and project activity because the last version was released 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
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.