
Security News
Ruby's Bundler 4.0.18 Extends Cooldown to bundle lock and bundle cache
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.
do-manager-admin-hooks
Advanced tools
Admin hooks for Cloudflare Durable Objects - enables DO Manager integration
Admin hooks for Cloudflare Durable Objects that enable integration with DO Manager.
npm install do-manager-admin-hooks
import { withAdminHooks } from "do-manager-admin-hooks";
export class MyDurableObject extends withAdminHooks() {
async fetch(request: Request): Promise<Response> {
// Handle admin requests first (required for DO Manager)
const adminResponse = await this.handleAdminRequest(request);
if (adminResponse) return adminResponse;
// Your custom logic here
return new Response("Hello from my Durable Object!");
}
}
export class SecureDO extends withAdminHooks({
// Change the base path for admin endpoints (default: '/admin')
basePath: "/admin",
// Require authentication for admin endpoints (recommended for production)
requireAuth: true,
adminKey: "your-secret-key",
}) {
// ...
}
Once you extend withAdminHooks(), your Durable Object exposes these endpoints:
| Endpoint | Method | Description |
|---|---|---|
/admin/list | GET | List storage keys (KV) or tables (SQLite) |
/admin/get?key=X | GET | Get value for a key |
/admin/put | POST | Set key-value pair ({ key, value }) |
/admin/delete | POST | Delete a key ({ key }) |
/admin/sql | POST | Execute SQL ({ query }) - SQLite only |
/admin/alarm | GET | Get current alarm |
/admin/alarm | PUT | Set alarm ({ timestamp }) |
/admin/alarm | DELETE | Delete alarm |
/admin/export | GET | Export all storage as JSON |
/admin/import | POST | Import data ({ data: {...} }) |
/admin/:name/freeze | PUT | Freeze instance (block writes) |
/admin/:name/freeze | DELETE | Unfreeze instance (allow writes) |
/admin/:name/freeze | GET | Get freeze status |
Freeze functionality is used for instance migration cutover modes. When an instance is frozen:
PUT, DELETE, and IMPORT operations return 423 LockedGET, LIST, EXPORT) continue to workhttps://my-worker.workers.dev)For production, enable authentication:
export class SecureDO extends withAdminHooks({
requireAuth: true,
adminKey: process.env.ADMIN_KEY,
}) {
// ...
}
Features timing-safe key comparison to prevent timing attacks.
Full TypeScript support with exported types:
import {
withAdminHooks,
AdminHooksOptions,
AdminListResponse,
AdminExportResponse,
} from "do-manager-admin-hooks";
MIT
FAQs
Admin hooks for Cloudflare Durable Objects - enables DO Manager integration
The npm package do-manager-admin-hooks receives a total of 1 weekly downloads. As such, do-manager-admin-hooks popularity was classified as not popular.
We found that do-manager-admin-hooks 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
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.