
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
node-apollo-client
Advanced tools
node apollo client for Ctrip Apollo
Features:
local configs object
\-+= local cached config files
\-+= fetch from Apollo DB at once
\-+= fetch from Apollo cache periodically (default to 5 minutes)
\-+= subscribe notification and fetch from Apollo DB if release tag changed
\-+= update local configs by API: refreshConfigs
| scene | influence | configs source |
|---|---|---|
| failed to connect apollo at begining | x | use local configs directly |
| failed to connect apollo | x | use cached apollo configs |
| failed to connect apollo and wish to update configs | x | update cached configs temporarily |
| failed to receive notifications | x | fetch configs periodically fetch from apollo |
| failed to fetch from apollo cache | x | subscribe notification and fetch from DB |
install package from npm
npm install node-apollo-client
const Apollo = require('node-apollo-client')
// Instantiate Apollo
const apollo = new Apollo({
configServerUrl: 'your-config-server-url',
appId: 'your-app-id',
cluster: 'default', // [optional] default to `default`
namespaces: ['application'], // default to `['application']`, this is the namespaces that you want to use or maintain.
initialConfigs: {
application: { // this is default namespace name
foo: 'Mars',
bar: 'Jupiter'
},
}, // [optional]
listenOnNotification: true, // [optional] default to true
fetchCacheInterval: 5 * 60e3, // [optional] default to 5 minutes. can be customize but 30s or shorter time are not acceptable.
cachedConfigFilePath: '/tmp' // [optional] cached configs path, default to system's tmp directory, for linux it's basically '/tmp'.
});
// fetch single config
await apollo.fetchConfig({ key: 'foo' });
// return 'Mars'
// fetch multiple configs
await apollo.fetchConfigs({ keys: [ 'foo', 'bar' ] });
// return { foo: 'Mars', bar: 'Jupiter' }
// refresh local configs (merely used when Apollo is unavailable)
apollo.refreshConfigs({ configs: { foo: 'Mercury' } });
// check out key `foo`
await apollo.fetchConfig({ key: 'foo' });
// return { foo: 'Mercury' }
MIT
FAQs
node apollo client for Ctrip Apollo
The npm package node-apollo-client receives a total of 4 weekly downloads. As such, node-apollo-client popularity was classified as not popular.
We found that node-apollo-client 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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.