
Security News
PolinRider: North Korea-Linked Supply Chain Campaign Expands Across Open Source Ecosystems
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.
@oncely/upstash
Advanced tools
Upstash Redis adapter for oncely. HTTP-based, perfect for serverless and edge.
npm install @oncely/core @oncely/upstash
import { upstash } from '@oncely/upstash';
import { next } from '@oncely/next';
// From environment variables
export const POST = next({ storage: upstash() })(handler);
import { upstash } from '@oncely/upstash';
// From environment variables (ONCELY_UPSTASH_REST_URL, ONCELY_UPSTASH_REST_TOKEN)
const storage = upstash();
// With explicit credentials
const storage = upstash({
url: 'https://your-redis.upstash.io',
token: 'your-rest-token',
});
// With options
const storage = upstash({
url: process.env.UPSTASH_REDIS_REST_URL,
token: process.env.UPSTASH_REDIS_REST_TOKEN,
keyPrefix: 'myapp:idem:',
});
// With existing @upstash/redis client
import { Redis } from '@upstash/redis';
const client = new Redis({ url: '...', token: '...' });
const storage = upstash({ client });
| Variable | Description |
|---|---|
ONCELY_UPSTASH_REST_URL | Upstash REST endpoint (e.g., https://xyz.upstash.io) |
ONCELY_UPSTASH_REST_TOKEN | Upstash REST token |
// app/api/orders/route.ts
import { next } from '@oncely/next';
import { upstash } from '@oncely/upstash';
export const POST = next({ storage: upstash() })(async (req) => {
const order = await createOrder(await req.json());
return Response.json(order, { status: 201 });
});
// pages/api/orders.ts
import { pages } from '@oncely/next/pages';
import { upstash } from '@oncely/upstash';
export default pages({ storage: upstash() })(async (req, res) => {
const order = await createOrder(req.body);
res.status(201).json(order);
});
// lib/idempotency.ts
import { configure } from '@oncely/next';
import { upstash } from '@oncely/upstash';
export const idempotent = configure({
storage: upstash(),
ttl: '1h',
});
// app/api/orders/route.ts
import { idempotent } from '@/lib/idempotency';
export const POST = idempotent()(handler);
Vercel KV is compatible with Upstash. Use the Vercel KV environment variables:
const storage = upstash({
url: process.env.KV_REST_API_URL,
token: process.env.KV_REST_API_TOKEN,
});
All keys are prefixed with oncely: by default. Customize with:
const storage = upstash({ keyPrefix: 'myapp:idem:' });
MIT
FAQs
Upstash Redis adapter for oncely idempotency
We found that @oncely/upstash 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.

Security News
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.

Security News
Open source attacks are accelerating as AI coding agents pull in dependencies faster, with less human review.

Research
/Security News
Malicious Chrome and Firefox extensions posed as free VPNs while stealing clipboard data through later extension updates.