
Research
/Security News
11 Malicious NuGet Tools Pose as Game Cheats to Drop a Windows Host-Surveillance Payload
11 malicious NuGet tools pose as game cheats to deploy Windows payloads, track hosts, and use Google Sheets for telemetry and control.
@oncely/client
Advanced tools
Client-side idempotency helpers for browser and frontend applications
Client-side utilities for generating idempotency keys.
npm install @oncely/client
import { store, generateKey, randomKey, compositeKey } from '@oncely/client';
// Generate a UUID-based key const key = generateKey(); // "550e8400-e29b-41d4-a716-446655440000"
// Generate a random alphanumeric key const key = randomKey(); // "x7k9m2n4p1" const key = randomKey(32); // longer key
// Create composite keys const key = compositeKey('order', orderId, 'attempt', 1); // "order:123:attempt:1"
// Store and retrieve keys (in-memory) store.set('current-order', key); const stored = store.get('current-order'); store.delete('current-order'); store.clear();
MIT // Response headers include: Idempotency-Replay: true }
// Check if response indicates a conflict (409) if (oncely.isConflict(response)) { // Request with this key is already in progress const retryAfter = oncely.getRetryAfter(response); await delay(retryAfter * 1000); // Retry... }
// Check if response indicates a mismatch (422) if (oncely.isMismatch(response)) { // Key was reused with different request body // Generate a new key and retry }
// Parse RFC 7807 problem details from error response const problem = await oncely.getProblem(response); // => { type: "https://oncely.dev/errors/conflict", title: "Request in progress", ... }
### Constants
```typescript
import { oncely } from '@oncely/client';
// Standard header name (IETF draft)
oncely.HEADER; // => "Idempotency-Key"
// Replay indicator header
oncely.HEADER_REPLAY; // => "Idempotency-Replay"
import ky from 'ky';
import { oncely } from '@oncely/client';
const api = ky.extend({
hooks: {
beforeRequest: [
(request) => {
if (['POST', 'PUT', 'PATCH'].includes(request.method)) {
request.headers.set(oncely.HEADER, oncely.key());
}
},
],
},
});
import axios from 'axios';
import { oncely } from '@oncely/client';
const api = axios.create();
api.interceptors.request.use((config) => {
if (['post', 'put', 'patch'].includes(config.method?.toLowerCase() ?? '')) {
config.headers[oncely.HEADER] = oncely.key();
}
return config;
});
Full TypeScript support with exported types:
import type { ProblemDetails } from '@oncely/client';
const problem: ProblemDetails = await oncely.getProblem(response);
Works in all modern browsers. For older browsers, ensure you have:
crypto.randomUUID() polyfill (or use custom key generator)localStorage / sessionStorage (for key store)MIT
FAQs
Client-side idempotency helpers for browser and frontend applications
The npm package @oncely/client receives a total of 0 weekly downloads. As such, @oncely/client popularity was classified as not popular.
We found that @oncely/client demonstrated a healthy version release cadence and project activity because the last version was released less than 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
11 malicious NuGet tools pose as game cheats to deploy Windows payloads, track hosts, and use Google Sheets for telemetry and control.

Research
/Security News
4 compromised asyncapi packages deliver miasma botnet loader on macOS, Linux and Windows.

Research
/Security News
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.