Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@guestlinelabs/onekey
Advanced tools
Utility to download translations from the [OneSky](https://www.oneskyapp.com/) and generate typed keys in Typescript for having typed translations.
Utility to download translations from OneSky and generate typed keys in Typescript for having typed translations.
npm install @guestlinelabs/onekey
There are two main commands to use: Fetch translations and Generate translation keys
Usage: onekey fetch [options]
Options:
-o, --out Path where translations will be saved
-p, --project Numeric id of the OneSky project
-f, --files Names of the files to download from the OneSky project separated by commas
-s, --secret OneSky private key (it can be read from environment variable ONESKY_PRIVATE_KEY)
-k, --apiKey OneSky API key (it can be read from environment variable ONESKY_PUBLIC_KEY)
-c, --prettier [OPTIONAL] Path for the prettier config
Usage: onekey generate [options]
Options:
-i, --input Path for the json translations to read from
-l, --locale [OPTIONAL] Default locale to use (en-GB by default)
-c, --prettier [OPTIONAL] Path for the prettier config
This will generate a TypeScript type union with all the possible translation keys for your jsons (appended with the namespace that comes from the name of the file).
So if your translation files look like this
// main.json
{
"hello": "Hello, friend",
"friendly_hello": "Hello, {{name}}",
"goodbye": "See you soon!",
}
// errors.json
{
"hello": "Hello, seems there is a problem here!",
"unknown": "I don't know what happened, but looks bad!",
}
Generate will give you something closer to this:
type TranslationKeyWithoutOptions =
| 'main:hello'
| 'main:goodbye'
| 'errors:hello'
| 'errors:unknown';
type TranslationWithOptions = {
'main:friendly_hello': { name: string };
};
type TranslationKeyWithOptions = keyof TranslationWithOptions;
export type TranslationKey =
| TranslationKeyWithoutOptions
| TranslationKeyWithOptions;
FAQs
Utility to download translations from the [OneSky](https://www.oneskyapp.com/) and generate typed keys in Typescript for having typed translations.
We found that @guestlinelabs/onekey 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.