Update npm packages (73 packages including @jqhtml 2.3.36)

Update npm registry domain from privatenpm.hanson.xyz to npm.internal.hanson.xyz

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2026-02-20 11:31:28 +00:00
parent d01a6179aa
commit b5eb27a827
1690 changed files with 47348 additions and 16848 deletions

88
node_modules/serve-index/index.js generated vendored
View File

@@ -107,10 +107,14 @@ function serveIndex(root, options) {
return;
}
// get dir
var dir = getRequestedDir(req)
// bad request
if (dir === null) return next(createError(400))
// parse URLs
var url = parseUrl(req);
var originalUrl = parseUrl.original(req);
var dir = decodeURIComponent(url.pathname);
var originalDir = decodeURIComponent(originalUrl.pathname);
// join / normalize from root dir
@@ -180,14 +184,9 @@ serveIndex.html = function _html(req, res, files, next, dir, showUp, icons, path
}
// stat all files
stat(path, files, function (err, stats) {
stat(path, files, function (err, fileList) {
if (err) return next(err);
// combine the stats into the file list
var fileList = files.map(function (file, i) {
return { name: file, stat: stats[i] };
});
// sort file list
fileList.sort(fileSort);
@@ -218,16 +217,42 @@ serveIndex.html = function _html(req, res, files, next, dir, showUp, icons, path
* Respond with application/json.
*/
serveIndex.json = function _json(req, res, files) {
send(res, 'application/json', JSON.stringify(files))
serveIndex.json = function _json (req, res, files, next, dir, showUp, icons, path) {
// stat all files
stat(path, files, function (err, fileList) {
if (err) return next(err)
// sort file list
fileList.sort(fileSort)
// serialize
var body = JSON.stringify(fileList.map(function (file) {
return file.name
}))
send(res, 'application/json', body)
})
};
/**
* Respond with text/plain.
*/
serveIndex.plain = function _plain(req, res, files) {
send(res, 'text/plain', (files.join('\n') + '\n'))
serveIndex.plain = function _plain (req, res, files, next, dir, showUp, icons, path) {
// stat all files
stat(path, files, function (err, fileList) {
if (err) return next(err)
// sort file list
fileList.sort(fileSort)
// serialize
var body = fileList.map(function (file) {
return file.name
}).join('\n') + '\n'
send(res, 'text/plain', body)
})
};
/**
@@ -237,7 +262,7 @@ serveIndex.plain = function _plain(req, res, files) {
function createHtmlFileList(files, dir, useIcons, view) {
var html = '<ul id="files" class="view-' + escapeHtml(view) + '">'
+ (view == 'details' ? (
+ (view === 'details' ? (
'<li class="header">'
+ '<span class="name">Name</span>'
+ '<span class="size">Size</span>'
@@ -327,6 +352,22 @@ function fileSort(a, b) {
String(a.name).toLocaleLowerCase().localeCompare(String(b.name).toLocaleLowerCase());
}
/**
* Get the requested directory from request.
*
* @param req
* @return {string}
* @api private
*/
function getRequestedDir (req) {
try {
return decodeURIComponent(parseUrl(req).pathname)
} catch (e) {
return null
}
}
/**
* Map html `dir`, returning a linked path.
*/
@@ -375,7 +416,7 @@ function iconLookup(filename) {
// try by mime type
if (icons[mimetype]) {
return {
className: 'icon-' + mimetype.replace('/', '-'),
className: 'icon-' + mimetype.replace('/', '-').replace('+', '_'),
fileName: icons[mimetype]
};
}
@@ -485,7 +526,7 @@ function normalizeSlashes(path) {
function removeHidden(files) {
return files.filter(function(file){
return '.' != file[0];
return file[0] !== '.'
});
}
@@ -507,8 +548,12 @@ function send (res, type, body) {
}
/**
* Stat all files and return array of stat
* in same order.
* Stat all files and return array of objects in the form
* `{ name, stat }`.
*
* @param {Array} files
* @return {Array}
* @api private
*/
function stat(dir, files, cb) {
@@ -522,7 +567,10 @@ function stat(dir, files, cb) {
if (err && err.code !== 'ENOENT') return done(err);
// pass ENOENT as null stat, not error
done(null, stat || null);
done(null, {
name: file,
stat: stat || null
})
});
});
});
@@ -540,6 +588,7 @@ var icons = {
'folder': 'folder.png',
// generic mime type icons
'font': 'font.png',
'image': 'image.png',
'text': 'page_white_text.png',
'video': 'film.png',
@@ -550,7 +599,6 @@ var icons = {
'+zip': 'box.png',
// specific mime type icons
'application/font-woff': 'font.png',
'application/javascript': 'page_white_code_red.png',
'application/json': 'page_white_code.png',
'application/msword': 'page_white_word.png',
@@ -564,7 +612,6 @@ var icons = {
'application/vnd.oasis.opendocument.text': 'page_white_word.png',
'application/x-7z-compressed': 'box.png',
'application/x-sh': 'application_xp_terminal.png',
'application/x-font-ttf': 'font.png',
'application/x-msaccess': 'page_white_database.png',
'application/x-shockwave-flash': 'page_white_flash.png',
'application/x-sql': 'page_white_database.png',
@@ -618,7 +665,6 @@ var icons = {
'.map': 'map.png',
'.msi': 'box.png',
'.mv4': 'film.png',
'.otf': 'font.png',
'.pdb': 'page_white_database.png',
'.php': 'page_white_php.png',
'.pl': 'page_white_code.png',