🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@axiosleo/koapp

Package Overview
Dependencies
Maintainers
1
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@axiosleo/koapp - npm Package Compare versions

Comparing version
1.1.0
to
1.1.1
+1
-1
assets/tmpl/services/package.json.tmpl

@@ -22,3 +22,3 @@ {

"dependencies": {
"@axiosleo/koapp": "^1.1.0",
"@axiosleo/koapp": "^1.1.1",
"@axiosleo/orm-mysql": "^0.11.2",

@@ -25,0 +25,0 @@ "cluster": "^0.7.7",

@@ -12,3 +12,3 @@ #!/usr/bin/env node

bin: 'koapp',
version: '1.1.0',
version: '1.1.1',
commands_dir: path.join(__dirname, '../commands'),

@@ -15,0 +15,0 @@ });

@@ -121,4 +121,4 @@ 'use strict';

const url = new URL(context.url, 'http://localhost');
let d = path.join(dir, url.pathname);
printer.yellow(_fixed('[' + context.method + ']', 12, 'r')).green(context.url).println();
let d = path.join(dir, decodeURIComponent(url.pathname));
printer.yellow(_fixed('[' + context.method + ']', 12, 'r')).green(decodeURIComponent(context.url)).println();
if (!await _exists(d)) {

@@ -204,4 +204,18 @@ if (!this.html404Content) {

if (url.pathname !== '/') {
// 计算正确的上级目录路径
let parentPath = url.pathname;
// 移除末尾的斜杠(如果有)
if (parentPath.endsWith('/')) {
parentPath = parentPath.slice(0, -1);
}
// 获取上级目录路径
const lastSlashIndex = parentPath.lastIndexOf('/');
parentPath = lastSlashIndex > 0 ? parentPath.substring(0, lastSlashIndex) : '/';
// 确保路径以斜杠结尾(除了根目录)
if (parentPath !== '/' && !parentPath.endsWith('/')) {
parentPath += '/';
}
fileItemsHTML += `
<div class="file-item" data-type="folder" onclick="window.location.href='../'">
<div class="file-item" data-type="folder" onclick="window.location.href='${parentPath}'">
<div class="file-icon folder">📁</div>

@@ -218,3 +232,8 @@ <div class="file-info">

let p = url.pathname === '/' ? '.' : url.pathname;
p = p + '/' + f.filename;
// 确保路径正确拼接,避免双斜杠
if (p.endsWith('/')) {
p = p + f.filename;
} else {
p = p + '/' + f.filename;
}
const fileType = this.getFileType(f.filename, f.is_dir, f.ext);

@@ -221,0 +240,0 @@ const fileIcon = this.getFileIcon(fileType);

{
"name": "@axiosleo/koapp",
"version": "1.1.0",
"version": "1.1.1",
"description": "",

@@ -5,0 +5,0 @@ "author": "AxiosLeo",