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.
@foundry-ai/foundry-service-loader
Advanced tools
Doc Sections |
---|
Getting Started |
Included Services |
Making Changes |
const FoundryServiceLoader = require('foundry-service-loader');
// Easy enough
const serviceLoader = FoundryServiceLoader(config);
// see README.md in config folder
const myService = new MyService();
serviceLoader.setService('myService', myService);
// later on in another file
const serviceLoader = require('foundry-service-loader')(); // no need to pass config in again after init
const myService = serviceLoader.getService('myService');
const Config = require('config');
const FoundryServiceLoader = require('foundry-service-loader');
const serviceLoader = FoundryServiceLoader(Config.get('services'))
const elasticSearchClient = serviceLoader.getElasticSearchClient();
// use the service
return new Promise((resolve, reject) => {
elasticSearchClient.indices.create({
index: 'myIndexName'
}, (err, result) => {
if (err) reject(err);
else resolve(result);
})
})
const Config = require('config');
const FoundryServiceLoader = require('foundry-service-loader');
const serviceLoader = FoundryServiceLoader(Config.get('services'))
const emailService = serviceLoader.getEmailService();
// use the service
emailService.send(emailData)
.then(authorization => { /** do something */ })
.catch(err => { /** handle error */ });
const Config = require('config');
const FoundryServiceLoader = require('foundry-service-loader');
const serviceLoader = FoundryServiceLoader(Config.get('services'))
const logger = serviceLoader.getLogger();
// use the service
logger.info('My info log', { data })
If you have never used Git, search around online to get a grounding. But here are the basic commands you will need to use to actually push code to our repository, with a little bit of Git theory to explain what's going on.
git checkout master
to checkout the master branch.git pull origin master
will update master with any new changes.git checkout -b feature/[NEW_FEATURE_NAME]
this will create a new branch (called feature/NEW_FEATURE_NAME, or whatever you want). Your branch names should be descriptive, but short. For example, if I want to create a cart on my branch, I might call it "feature/cart" (after the object) or "feature/checkout" (after the functionality).git branch
at any time to see which branch you're on and what branches you have locally.git status
git commit -am [YOUR_COMMIT_MESSAGE]
. The -a attribute tells Git to commit all changed files. If you don't want to commit all of them, you'll have to type the names of the files. The -m is required; Git needs commit messages. Try to be descriptive, maybe your first commit message will be "store skeleton", the next will be "product page", etc. NOTE git commit -a
will not commit any new files since they are not part of Git yet. If you have new files you will need to run git add .
before the above commands ("." means "all").git push origin [BRANCH_NAME]
. Here, origin represents our Bitbucket repository. Run git remote -v
to see your repository aliases.We follow the git branching model outlined in this blog post
.
FAQs
A lazy service loader for Foundry.ai projects
The npm package @foundry-ai/foundry-service-loader receives a total of 0 weekly downloads. As such, @foundry-ai/foundry-service-loader popularity was classified as not popular.
We found that @foundry-ai/foundry-service-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.