Registry / http-networking / nomine

nomine

JSON →
library0.0.2jsnpmunverified

Nomine is an Express.js middleware package that facilitates renaming files and folders through HTTP PUT requests. It provides a straightforward API to expose a file renaming endpoint within an Express application, which is typically used for administrative interfaces or content management systems that require remote file system manipulation. The current stable version is 4.0.0, which mandates Node.js version 10 or higher, continuing a pattern of dropping support for older Node.js versions in each major release. The package's release cadence is driven primarily by updates to its internal dependencies and adjustments to Node.js compatibility. Its main differentiator is its direct integration into the Express ecosystem, offering a pre-packaged solution for network-based file renaming operations, abstracting the underlying file system interactions by utilizing the `renamify` package for the core renaming logic.

npm install nomine
INSTALL
IMPORT
SIG · NOMINE
N
nomine
http-networkingjavascriptv0.0.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

nomine
const nomine = require('nomine');
import nomine from 'nomine';
Nomine primarily uses CommonJS `require` syntax. As of v4.0.0, there is no explicit ESM support documented or demonstrated.
MiddlewareUsage
app.use(nomine({ prefix: '/rename' }));
app.use(nomine);
The `nomine` function should be called to return the actual middleware, optionally with a `prefix` configuration object.

This quickstart initializes an Express server, integrates the `nomine` middleware, and listens on port 3000. It demonstrates how to configure a custom endpoint for rename operations and provides a `curl` example for testing.

const express = require('express'); const nomine = require('nomine'); const app = express(); // Use nomine middleware with a custom prefix app.use(nomine({ prefix: '/files/rename' // default is '/rename' })); app.listen(3000, function () { console.log('Nomine example app listening on port 3000!'); console.log('Send PUT requests to http://localhost:3000/files/rename'); console.log('Example curl: curl -X PUT -H "Content-Type: application/json" -d \'{"dir":"/tmp","from":["oldfile.txt"], "to": ["newfile.txt"]}\' http://localhost:3000/files/rename'); });
Debug
Known issues
breakingNomine v4.0.0 dropped support for Node.js versions older than 10. Applications running on Node.js 8 or earlier will not function correctly.
fix
Upgrade your Node.js environment to version 10 or higher before upgrading to nomine v4.0.0.
affects: >=4.0.0
breakingNomine v3.0.0 dropped support for Node.js versions older than 8.
fix
Upgrade your Node.js environment to version 8 or higher. For Node.js versions below 8, use nomine v2.x.
affects: >=3.0.0 <4.0.0
breakingNomine v2.0.0 dropped support for Node.js versions older than 4.
fix
Upgrade your Node.js environment to version 4 or higher. For Node.js versions below 4, use nomine v1.x.
affects: >=2.0.0 <3.0.0
gotchaExposing file system operations via HTTP, especially rename, presents significant security risks. Without robust authentication and authorization mechanisms in place, an attacker could rename critical system files.
fix
Always implement strong authentication (e.g., user sessions, API keys) and fine-grained authorization checks before using `nomine` in production. Restrict the `dir` parameter to only allow operations within designated user directories or safe zones.
affects: >=1.0.0
Errors
Common errors & fixes
EACCES: permission denied, rename '/bin' -> '/bin2'
The Node.js process does not have sufficient permissions to perform file operations (read, write, rename) in the specified directory or on the target files.
fix
Ensure the Node.js process has appropriate file system permissions for the directories and files it attempts to modify. Avoid attempting to rename system-critical directories like `/bin` on production servers. Use relative paths or explicitly designated user data directories.
Error: Router.use() requires a middleware function but got a undefined
The `nomine` package was not correctly imported or called as a function before being passed to `app.use()`, resulting in `undefined` instead of a middleware function.
fix
Ensure `const nomine = require('nomine');` is at the top of your file and that `app.use(nomine({ /* options */ }));` is used, calling `nomine()` to get the middleware function.
Upgrade
Version history
0.0.2latest on npm
Audit
Dependencies
expressrequiredRequired to integrate `nomine` as middleware into an Express.js application.
renamifyoptionalCore dependency providing the actual file and folder renaming logic, used internally by `nomine`.
Agent activity
6 hits · last 30 days
node
6
Resources
nomine — npm install nomine · libregistry