
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
@nuskin/configuration-sdk
Advanced tools
The configuration sdk gets market configuration from content stack. You can get the full configuration for a list of config maps or get partial configuration using graphql. The sdk caches the configurations for 2 minutes in memory. The sdk also allows
"The configuration sdk gets market configuration from content stack. You can get the full configuration for a list of config maps or get partial configuration using graphql. The sdk caches the configurations for 2 minutes in memory. The sdk also allows for configuraitons to be overridden. Override configurations for runtime shopping context configurations. Or use the function for testing purposes to override configuration in the browser on the fly.",
Usng npm:
npm add @nuskin/configuration-sdk
Usng yarn:
yarn add @nuskin/configuration-sdk
const {
overrideConfigurationProperty,
clearConfigurationOverrides,
overrideConfiguration,
getConfiguration,
getPartialConfig,
getCachedConfigurations,
getCachedConfiguration,
getCachedConfigField
} = require('@nuskin/configuration-sdk');
// Override a single configuration for shopping context and market. The overrides will be merged with the configuration
overrideConfigurationProperty({configMap: 'Ordering', configMapProperty: 'testing', value: true, country: 'US', shoppingContext: 'personal_offer'});
// Override configuration for shopping context and market. The overrides will be merged with the configuration
overrideConfiguration({configMap: ''});
// Expose the overrideConfiguration function so QA can change configuration in the browser
// Just expose the function on window so when you open the console in the dev tools you can access it
// Testers can also override the marketConfigurationOverrides sessionStorage object instead of using this function
window.nuskin.overrideConfiguration = overrideConfiguration;
// get partial config through graphql endpoint. Returns just the fields requested
const partialConfig = await getPartialConfig(
queryFields = {
Ordering: ['spendingRestrictionsEnabled', 'inventoryCheckEnabled'],
Cart: ['minAdrPsv']
},
options = { // optional for client usage
country: 'US',
environment: 'test',
clientId: 'Client id for you application'
}
);
// Get full configuration for config maps.
// Each config will be stored in a cache which is where it will be retrieved in subsequent calls.
const config = await getConfiguration(
configMapNames = ['Ordering', 'Cart'], // list of configMap names
options = { // optional for client usage
country: 'US',
clientId: 'clientId',
shoppingContext: 'storefront'
}
);
// The following functions are designed to be used after configuration is originally
// loaded getConfiguration above. They only look for configuration that is in
// local cache and these functions are synchronous and can be used in place of the
// current ConfigService.getMarketConfig call.
// This will return one or more configMaps from cache.
// Will throw an exception if requested config has not already been loaded by getConfiguration.
const configs = getCachedConfigurations(
configNames = [] // List of configNames to be retrieved from local cache
)
// This function returns a single configMap from cache.
// Will throw an exception if requested config has not already been loaded by getConfiguration.
const config = getCachedConfiguration(
configNames = [] // List of configNames to be retrieved from local cache
)
// This will return a single field from one of the configMaps previously loaded into
// cache. All cached configMaps are searched so no cacheName is needed. Field names
// are required to be unique across configMaps by contentStack
const configFieldValue = getCachedConfigField(
configField
)
FAQs
The configuration sdk gets market configuration from content stack. You can get the full configuration for a list of config maps or get partial configuration using graphql. The sdk caches the configurations for 2 minutes in memory. The sdk also allows
The npm package @nuskin/configuration-sdk receives a total of 1,271 weekly downloads. As such, @nuskin/configuration-sdk popularity was classified as popular.
We found that @nuskin/configuration-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 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
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.