
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@bss-sbc/shopify-api-fetcher
Advanced tools
From: BSS Group > BSS Commerce > Division Shopify/Blockchain
BucketManager
: Manage Token bucket rate limiter of active store
initializeAll: (activeStores: Shop[]) => number;
: Initialize rate limiter for all given stores
initializeOne: (domain: string) => TokenBucketRateLimiter
: Initialize rate limiter for specific domain
get: (domain: string) => TokenBucketRateLimiter
: Get initialized rate limiter of a specific domain
clear: (domain: string) => void
: Clear rate limiter of a specific domain, used when app is uninstalled
safeFetch: (domain: string, url: RequestInfo, params?: RequestInit) => Promise<Response>
: use this instead of normal fetch
, with additional parameter domain
, which specify a store.
// To bulk initialize
const shops = [
{ id: 1, domain: 'dev-mida-dean.myshopify.com' },
{ id: 2, domain: 'dev-mida-store.myshopify.com' },
]
const intialized = BucketManager.initializeAll(shops);
// To initialize
BucketManager.initializeOne({
id: 1,
domain: 'dev-mida-dean.myshopify.com',
});
// To get specific bucket
const bucket = BucketManager.get('dev-mida-dean.myshopify.com');
// To clean up specific bucket
BucketManager.clear('dev-mida-dean.myshopify.com');
// Auto initialize bucket,
// using safeFetch
const response = await safeFetch(domain, url, params);
Because of numbers of services
, it is difficult to listen to app/uninstalled
webhook event. So, auto clear bucket is necessary
FAQs
README.md
The npm package @bss-sbc/shopify-api-fetcher receives a total of 42 weekly downloads. As such, @bss-sbc/shopify-api-fetcher popularity was classified as not popular.
We found that @bss-sbc/shopify-api-fetcher demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.