Scan your whole stack
Are you using @aglyn/shared-util-rest-api?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v1.33.0
@aglyn/shared-util-rest-api was last scanned on 1 Dec 2026 at version 1.33.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 1.33.0 LATEST | 1 Dec 2026 | No rules fired |
| 1.32.0 | 1 Dec 2026 | No rules fired |
| 1.31.0 | 26 Nov 2026 | No rules fired |
| 1.30.0 | 26 Nov 2026 | Not shown |
| 1.29.3 | 26 Nov 2026 | Not shown |
Findings for v1.33.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.33.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Helpers for writing JSON API routes in Next.js: one response envelope for both the Pages Router (NextApiResponse) and the App Router (Web Response), plus small middleware and cookie utilities. Published mainly as a building block for Aglyn's own apps; usable in any Next.js project that wants the same envelope.
Published to npm from the Aglyn monorepo. Versions follow semantic versioning.
npm install @aglyn/shared-util-rest-api
Peer dependency: next (16.3.3).
Everything is exported from the package root; each module is also reachable as @aglyn/shared-util-rest-api/<file-name>.
The envelope, JsonResponse:
type JsonResponse = {
error?: any
errorCode?: HttpRefCode
status?: HttpResponseStatus | true
statusCode?: HttpStatusCode
statusMessage?: string
data?: any
}
route.ts): appHandleJsonResponse(statusCode, options?), appHandleJsonSuccess(data), appHandleJsonError(error) - each returns a Response.nextHandleJsonResponse(res, statusCode, options?), nextHandleJsonSuccess(res, data), nextHandleJsonError(res, error) - each writes to a NextApiResponse. Both families put the same shape on the wire. The error variants take the status from error.code or error.statusCode (default 500) and the message from error.message or error.statusMessage.createNewJsonResponse(statusCode, options?) - a bare Response with a JSON content type, for middleware.httpRequestMethodMiddleware(allowed) - a next-api-middleware middleware that answers 405 for methods other than the allowed ones (OPTIONS always passes).initializeMiddleware(middleware) - wraps a Connect-style (req, res, next) middleware in a promise.requireHeader(name, key, handler) and withIdTokenHeader(handler) - wrap a Pages Router handler and answer 400 when the header (id-token for the latter) is missing.getApiRequestCookie(name, request?) and setApiResponseCookie(res, name, value, options?). setApiResponseCookie takes maxAge in milliseconds and serializes object values as j: plus JSON.// app/api/things/route.ts
import {
appHandleJsonError,
appHandleJsonSuccess,
} from '@aglyn/shared-util-rest-api'
export async function GET() {
try {
return appHandleJsonSuccess({ things: [] })
} catch (error) {
return appHandleJsonError(error)
}
}
Note that appHandleJsonError and nextHandleJsonError include the error object itself in the body, so pass them errors that are safe to show to the caller.
A shared package: generic, with no knowledge of Aglyn's model. Shared packages may only import other shared packages; this one depends on @aglyn/shared-data-enums (status codes and reference codes), @aglyn/shared-util-errors and @aglyn/shared-util-http. No other library in the monorepo depends on it; Aglyn's apps use it in their API routes.
Apache-2.0. Source: https://github.com/aglyn/aglyn/tree/main/libs/shared/util/rest-api
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.