
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@heseya/store-core
Advanced tools
[](https://gitlab.com/heseya/heseya-store-core/-/graphs/develop/charts) [](https://gitl
$ yarn add @heseya/store-core
// or
$ npm i @heseya/store-core
You can create the Heseya Api Service using the factory method.
import { createHeseyaApiService } from '@heseya/store-core'
const heseya = createHeseyaApiService(axios)
You need to pass the axios
instance to the factory method. This allows you to modify axios instance to your needs. For example you can add a custom header to the request or implement a custom interceptor. Remember to pass the BaseUrl to the axios instance!
Example of the simple axios instance:
import axios from 'axios'
const instance = axios.create({
baseURL: 'https://api.heseya.com',
headers: {
'X-Custom-Header': 'Custom Value',
},
})
In nuxt, you can inject the service into the context. This allows you to use the service in your components. To do this you need to create the following plugin:
import { Plugin } from '@nuxt/types'
import { createHeseyaApiService } from '@heseya/store-core'
const heseyaPlugin: Plugin = ({ $axios }, inject) => {
inject('heseya', createHeseyaApiService($axios))
}
export default heseyaPlugin
After creating the instance, you can use the service as you wish. Below are usage examples. Every method in the service is fully typed and documented.
heseya.Products.get({ search: 'test' }) // Returns the products that was found by the search term
heseya.Orders.getOneByCode('ORDERCODE') // Returns the order summary with the given code
TODO
FAQs
[](https://www.npmjs.com/package/@heseya/store-core) [](https://app.fossa.com/projects/g
We found that @heseya/store-core 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.