Scan your whole stack
Are you using @stravon/scale-sdk?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v1.5.0
@stravon/scale-sdk was last scanned on 24 Nov 2026 at version 1.5.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 1.5.0 LATEST | 24 Nov 2026 | No rules fired |
| 1.4.0 | 24 Nov 2026 | No rules fired |
| 1.3.0 | 23 Nov 2026 | No rules fired |
| 1.2.0 | 12 Nov 2026 | Not shown |
| 1.1.1 | 15 Aug 2026 | Not shown |
Findings for v1.5.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 1.5.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
TypeScript client SDK for the Stravon Management Platform. Storage-only in v1 — auth-route coverage is deferred to v2.
npm install @stravon/scale-sdk
Node 18+ (uses built-in fetch — no axios, node-fetch, or any added HTTP dependency).
import { ScaleClient } from "@stravon/scale-sdk";
const scale = new ScaleClient({ apiKey: "YOUR_API_KEY" });
const result = await scale.storage.upload({
filename: "photo.jpg",
contentType: "image/jpeg",
body: fileBuffer,
});
console.log(result.usage.level); // "ok" | "warn80" | "upgrade90" | "overage"
storage.create(params)Maps to POST /v1/storage/files.
Input:
{ filename: string; contentType: string; fileSize: number }
Output:
{ uploadUrl: string; publicUrl: string; key: string; uuid: string; filename: string; usage: UsageSnapshot }
fileSize is the exact byte size of the file and is required. contentType must be image/* or video/*. fileSize must be a positive integer. The size is reserved against the project's storage quota before the URL is issued. Rejections: QuotaExceededError, SubscriptionExpiredError, ValidationError (see Error Handling).
storage.complete(params)Maps to POST /v1/storage/files/complete.
Input:
{ key: string }
Output:
{ verified: boolean; bytes: number }
storage.read(params)Maps to GET /v1/storage/files?key=....
Input:
{ key: string }
Output:
{ downloadUrl: string; publicUrl: string; key: string; filename: string }
storage.modify(params)Maps to PATCH /v1/storage/files?key=....
Input:
{ key: string; contentType: string; fileSize: number }
Output:
{ uploadUrl: string; publicUrl: string; key: string; uuid: string; filename: string; usage: UsageSnapshot }
fileSize is the byte size of the replacement file and is required. Replacing a file counts the larger of old and new size, not both.
storage.delete(params)Maps to DELETE /v1/storage/files?key=....
Input:
{ key: string }
Output:
{ success: boolean; key: string }
storage.usage()Maps to GET /v1/storage/usage.
Input: none.
Output:
{
tier: string;
billingInterval: "monthly" | "annual";
subscriptionStatus: "active" | "expired";
currentPeriodEnd: string | null;
usedBytes: number;
quotaBytes: number;
ceilingBytes: number;
percent: number;
level: "ok" | "warn80" | "upgrade90" | "overage";
overageBytes: number;
fileCount: number;
maxFileBytes: number;
}
Behavior:
level: ok under 80% of quota, warn80 from 80% to under 90%, upgrade90 from 90% to under 100%, overage at 100% or more.overageBytes. Uploads are rejected at ceilingBytes with QuotaExceededError.quotaBytes - usedBytes.storage.upload(params) — convenience methodOrchestrates: create() → direct PUT to the returned uploadUrl → complete().
Input:
{ filename: string; contentType: string; body: BodyInit; fileSize?: number }
Output:
{ key: string; uuid: string; filename: string; verified: boolean; bytes: number; usage: UsageSnapshot }
fileSize is derived automatically from string, Blob/File, ArrayBuffer, and typed-array/Buffer bodies. For streams or FormData the size cannot be determined, so pass fileSize explicitly or a ValidationError is thrown before any request is made. usage is the state at reservation time, before this file's bytes were verified.
Note: The intermediate PUT step goes directly to the storage provider (R2/Cloudflare), not through the backend. If that PUT fails, the SDK throws a plain
Error— not one of the typed error classes below — because the failure came from the storage infrastructure, not the backend API.
storage.batchRead(params)Maps to POST /v1/storage/files/batch-read.
Input:
{ keys: string[] }
Output:
{
results: Array<
{ key: string; downloadUrl: string; publicUrl: string; filename: string }
| { key: string; error: string }
>;
retryAfterMs?: number;
}
Behavior:
{ key, error } entries inside results — the call does not throw for these. Possible per-key error values: "not_found", "cross_project", "rate_limit_exceeded".RateLimitError is thrown — same as other methods, carrying retryAfterMs.results matches the order of input keys.All eight error classes are exported from the package root.
| Class | Thrown when |
|---|---|
ScaleError |
Base class for all SDK errors. Extends native Error. |
AuthError |
Backend returns 401 (bad or missing API key). |
RateLimitError |
Backend returns 429. Carries a retryAfterMs: number property matching the backend body { error: "rate_limit_exceeded", retryAfterMs }. |
QuotaExceededError |
Backend returns 403 storage_ceiling_exceeded. Carries limitBytes and usedBytes (both optional numbers). |
SubscriptionExpiredError |
Backend returns 403 subscription_expired. create() and modify() are blocked; read(), usage(), and delete() still work. |
ValidationError |
Backend returns any other 400-class response, including 403 file_too_large (file exceeds the tier's single-file limit), non-image/video contentType, and missing or invalid fileSize. |
ServerError |
Backend returns a 5xx response. |
TimeoutError |
Client-side request exceeds the configured timeout (see Configuration below). |
No retry logic exists anywhere in the SDK. The caller decides whether and how to retry.
| Option | Type | Default | Description |
|---|---|---|---|
apiKey |
string |
(required) | Your project's API key. |
baseUrl |
string |
https://stravon-management.onrender.com |
Backend base URL. Change only when targeting a dev/staging deployment. |
timeoutMs |
number |
65000 |
Client-side request timeout in milliseconds, applied to every backend request unless overridden per-call internally (e.g. read() uses a 20000ms timeout). Configurable via the constructor: new ScaleClient({ apiKey, baseUrl, timeoutMs }). |
A framework-agnostic web-component-style widget that renders a project's storage usage as an arch gauge plus a detail table. It mounts into any element and manages its own polling, refresh, and teardown.
The widget sizes its layout from its own width, so it needs a block-level or width-defined host. In a shrink-to-fit parent (an inline-block, or a flex item with width:auto inside a parent that has no width) it stays in the compact phone layout.
npm install @stravon/scale-sdk
The widget is a separate entry point: import it from @stravon/scale-sdk/widget, not the package root.
import { mountUsageWidget } from "@stravon/scale-sdk/widget";
fetchUsage contractmountUsageWidget(target, options) requires a fetchUsage function that resolves to a StorageUsageReport (the same type returned by client.storage.usage()):
interface UsageWidgetOptions {
fetchUsage: () => Promise<StorageUsageReport>;
refreshMs?: number; // poll interval; 0 disables, 1-4999 raised to 5000; default 60000
brand?: UsageWidgetBrand; // optional color/font/radius overrides (see Branding)
title?: string;
onUpgrade?: () => void; // fires for upgrade90 / overage / expired states
onError?: (err: unknown) => void;
}
interface UsageWidgetBrand {
accent?: string; // ring and header icon; default #002147
action?: string; // Upgrade/Renew button background; default #d4af37
actionInk?: string; // Upgrade/Renew button text; default #111111
ink?: string; // text color; default #002147
surface?: string; // card background; default #f6f4eb
font?: string; // CSS font-family; default Inter, system-ui, …
radius?: string; // card corner radius; default 20px
}
interface UsageWidgetHandle {
refresh(): Promise<void>; // force a reload
destroy(): void; // remove host + stop polling
}
The widget renders usedBytes, quotaBytes, ceilingBytes, percent/level, overageBytes, tier, billingInterval, subscriptionStatus, currentPeriodEnd, fileCount, and maxFileBytes. formatBytes uses decimal units (1 GB = 1,000,000,000 B). See the field mapping table below.
fetchUsage should call your own backend route, which calls the SDK server-side with the project's API key. The widget never sees the raw key.
// Server route (e.g. GET /api/storage-usage)
import { ScaleClient } from "@stravon/scale-sdk";
const client = new ScaleClient({ apiKey: process.env.STRAVON_API_KEY! });
// return await client.storage.usage();
// Client
import { mountUsageWidget } from "@stravon/scale-sdk/widget";
const w = mountUsageWidget("#usage", {
fetchUsage: () => fetch("/api/storage-usage").then((r) => r.json()),
onUpgrade: () => (location.href = "/billing"),
});
// w.destroy() on unmount
usageFromClient(client) is a server-side helper that adapts a ScaleClient to the fetchUsage shape: fetchUsage: usageFromClient(client).
Warning — API key in the browser: Do NOT construct a
ScaleClientwith a raw API key in browser/client code and pass it asfetchUsage. Any key shipped to the browser is public and can be extracted. Route through your own backend (above) and keepSTRAVON_API_KEYserver-side only.
React / SPA cleanup:
useEffect(() => {
const w = mountUsageWidget(ref.current!, { fetchUsage });
return () => w.destroy();
}, []);
The widget never talks to Stravon directly. It calls fetchUsage(), which must resolve to a StorageUsageReport. Your backend route is what calls the SDK with the API key.
mountUsageWidget -> fetchUsage() -> integrator backend route -> client.storage.usage() -> GET /v1/storage/usage -> StorageUsageReport -> widget re-renders
fetchUsage() is called once immediately on mount. Until it resolves, the card shows "Loading usage".widget.refresh() to reload on demand.refreshMs (default 60000 ms) the widget refetches on that interval; refreshMs: 0 disables polling; values 1–4999 are raised to 5000. Polls are skipped while the document is hidden, and a visibilitychange back to visible refetches only if the data is older than refreshMs. An error carrying retryAfterMs pushes the next poll out to at least that delay.Server route:
import { ScaleClient } from "@stravon/scale-sdk";
const client = new ScaleClient({ apiKey: process.env.STRAVON_API_KEY! });
// GET /api/storage-usage
return Response.json(await client.storage.usage());
Client:
import { mountUsageWidget } from "@stravon/scale-sdk/widget";
const widget = mountUsageWidget("#usage", {
fetchUsage: () => fetch("/api/storage-usage").then((r) => r.json()),
});
After uploads / mutations:
await client.storage.upload(...); // or modify(...) / delete(...)
await widget.refresh();
Call await widget.refresh() after every upload, modify, or delete. The usage snapshot returned by upload() lacks fileCount and maxFileBytes, so it cannot render the full card on its own — refetch via refresh() to get a complete StorageUsageReport.
Do not ship the API key to the browser. Never construct a
ScaleClientwith a real API key in client-side code, and never pass such a client asfetchUsage. KeepSTRAVON_API_KEYserver-side and let the browser call only your own route.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.