Commit ·
1b21241
0
Parent(s):
feat: Initial commit for Hugging Face Spaces
Browse files- .gitattributes +35 -0
- .gitignore +3 -0
- Dockerfile +20 -0
- README.md +79 -0
- index.js +146 -0
- package-lock.json +906 -0
- package.json +18 -0
- src/largeFile.js +101 -0
- src/performance.js +46 -0
- src/xmlJson.js +151 -0
.gitattributes
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
.gitignore
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
node_modules/
|
| 2 |
+
data/
|
| 3 |
+
.DS_Store
|
Dockerfile
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 使用 Node.js 官方镜像
|
| 2 |
+
FROM node:18-alpine
|
| 3 |
+
|
| 4 |
+
# 设置工作目录
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# 复制 package.json 和 package-lock.json
|
| 8 |
+
COPY package*.json ./
|
| 9 |
+
|
| 10 |
+
# 安装依赖
|
| 11 |
+
RUN npm install
|
| 12 |
+
|
| 13 |
+
# 复制源代码
|
| 14 |
+
COPY . .
|
| 15 |
+
|
| 16 |
+
# 暴露端口
|
| 17 |
+
EXPOSE 7860
|
| 18 |
+
|
| 19 |
+
# 启动命令
|
| 20 |
+
CMD ["node", "index.js"]
|
README.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Node.js 性能优化与大文件处理演示
|
| 3 |
+
emoji: 🚀
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: green
|
| 6 |
+
sdk: docker
|
| 7 |
+
app_port: 7860
|
| 8 |
+
short_description: 演示 Node.js 大文件流式读写、XML/JSON 处理及性能监控的完整示例项目。
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Node.js 性能优化与大文件处理演示项目
|
| 12 |
+
|
| 13 |
+
本项目演示了在 Node.js 中处理大规模数据和优化性能的最佳实践。包含以下核心功能:
|
| 14 |
+
|
| 15 |
+
1. **大文件流式处理**:使用 Stream API 高效读写 GB 级文件,避免内存溢出。
|
| 16 |
+
2. **XML 与 JSON 处理**:演示 `fast-xml-parser` 和 `stream-json` 的使用。
|
| 17 |
+
3. **性能监控**:使用 `perf_hooks` 和 `process.memoryUsage` 实时监控执行时间和内存占用。
|
| 18 |
+
|
| 19 |
+
## 功能特性
|
| 20 |
+
|
| 21 |
+
- **流式架构**:核心模块均采用流式处理,适用于高并发和大数据量场景。
|
| 22 |
+
- **性能分析**:内置简单的性能监控工具,可直观看到各操作耗时。
|
| 23 |
+
- **模块化设计**:功能拆分为独立模块,易于扩展和维护。
|
| 24 |
+
|
| 25 |
+
## 快速开始
|
| 26 |
+
|
| 27 |
+
### 本地运行
|
| 28 |
+
|
| 29 |
+
1. 克隆项目并进入目录:
|
| 30 |
+
```bash
|
| 31 |
+
git clone <repository-url>
|
| 32 |
+
cd nodejs-performance-project
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
2. 安装依赖:
|
| 36 |
+
```bash
|
| 37 |
+
npm install
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
3. 运行演示脚本:
|
| 41 |
+
```bash
|
| 42 |
+
node index.js
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
### Docker 运行
|
| 46 |
+
|
| 47 |
+
1. 构建镜像:
|
| 48 |
+
```bash
|
| 49 |
+
docker build -t nodejs-perf-demo .
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
2. 运行容器:
|
| 53 |
+
```bash
|
| 54 |
+
docker run --rm nodejs-perf-demo
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
## 目录结构
|
| 58 |
+
|
| 59 |
+
```
|
| 60 |
+
.
|
| 61 |
+
├── Dockerfile # Docker 构建文件
|
| 62 |
+
├── README.md # 项目文档
|
| 63 |
+
├── index.js # 主入口文件
|
| 64 |
+
├── package.json # 项目配置
|
| 65 |
+
└── src # 源代码目录
|
| 66 |
+
├── largeFile.js # 大文件处理模块
|
| 67 |
+
├── performance.js # 性能监控工具
|
| 68 |
+
└── xmlJson.js # XML/JSON 处理模块
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
## 性能调优建议
|
| 72 |
+
|
| 73 |
+
- **优先使用 Stream**:处理大文件时,永远优先选择流式操作。
|
| 74 |
+
- **减少对象创建**:在高频循环中避免不必要的对象分配。
|
| 75 |
+
- **异步非阻塞**:充分利用 Node.js 的异步特性,避免阻塞事件循环。
|
| 76 |
+
|
| 77 |
+
## 许可证
|
| 78 |
+
|
| 79 |
+
MIT
|
index.js
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const express = require('express');
|
| 2 |
+
const path = require('path');
|
| 3 |
+
const fs = require('fs');
|
| 4 |
+
const LargeFileHandler = require('./src/largeFile');
|
| 5 |
+
const xmlJsonHandler = require('./src/xmlJson');
|
| 6 |
+
const performanceMonitor = require('./src/performance');
|
| 7 |
+
|
| 8 |
+
const app = express();
|
| 9 |
+
const PORT = 7860;
|
| 10 |
+
|
| 11 |
+
const DATA_DIR = path.join(__dirname, 'data');
|
| 12 |
+
|
| 13 |
+
// Ensure data directory exists
|
| 14 |
+
if (!fs.existsSync(DATA_DIR)) {
|
| 15 |
+
fs.mkdirSync(DATA_DIR);
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
const LARGE_FILE_PATH = path.join(DATA_DIR, 'large_data.csv');
|
| 19 |
+
const XML_FILE_PATH = path.join(DATA_DIR, 'data.xml');
|
| 20 |
+
const LARGE_JSON_PATH = path.join(DATA_DIR, 'large_data.json');
|
| 21 |
+
|
| 22 |
+
// Custom logger to capture output
|
| 23 |
+
class StringLogger {
|
| 24 |
+
constructor() {
|
| 25 |
+
this.logs = [];
|
| 26 |
+
}
|
| 27 |
+
log(...args) {
|
| 28 |
+
const msg = args.map(arg => (typeof arg === 'object' ? JSON.stringify(arg, null, 2) : String(arg))).join(' ');
|
| 29 |
+
this.logs.push(msg);
|
| 30 |
+
}
|
| 31 |
+
error(...args) {
|
| 32 |
+
const msg = args.map(arg => (typeof arg === 'object' ? JSON.stringify(arg, null, 2) : String(arg))).join(' ');
|
| 33 |
+
this.logs.push(`ERROR: ${msg}`);
|
| 34 |
+
}
|
| 35 |
+
getOutput() {
|
| 36 |
+
return this.logs.join('\n');
|
| 37 |
+
}
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
async function runDemo() {
|
| 41 |
+
console.log('=== Node.js 性能优化与大文件处理演示 ===\n');
|
| 42 |
+
|
| 43 |
+
try {
|
| 44 |
+
// 1. Large File Processing Demo
|
| 45 |
+
console.log('--- 1. 大文件流式处理 ---');
|
| 46 |
+
const largeFileHandler = new LargeFileHandler(LARGE_FILE_PATH);
|
| 47 |
+
|
| 48 |
+
// Generate 100k lines (reduced for demo speed on web request)
|
| 49 |
+
const lineCount = 100000;
|
| 50 |
+
console.log(`正在生成测试数据 (${lineCount} 行)...`);
|
| 51 |
+
await largeFileHandler.generateTestFile(lineCount);
|
| 52 |
+
|
| 53 |
+
// Stream processing
|
| 54 |
+
console.log('开始流式处理...');
|
| 55 |
+
await largeFileHandler.processFileStream();
|
| 56 |
+
|
| 57 |
+
console.log('\n--- 2. XML 处理 ---');
|
| 58 |
+
// Generate XML
|
| 59 |
+
const xmlContent = xmlJsonHandler.generateXml(1000); // Reduced size
|
| 60 |
+
fs.writeFileSync(XML_FILE_PATH, xmlContent);
|
| 61 |
+
console.log(`XML 文件已保存: ${XML_FILE_PATH}`);
|
| 62 |
+
|
| 63 |
+
// Parse XML
|
| 64 |
+
const parsedXml = xmlJsonHandler.parseXml(xmlContent);
|
| 65 |
+
console.log('XML 解析完成');
|
| 66 |
+
|
| 67 |
+
console.log('\n--- 3. JSON 大文件流式处理 ---');
|
| 68 |
+
// Generate large JSON
|
| 69 |
+
console.log('正在生成 JSON 数据...');
|
| 70 |
+
await xmlJsonHandler.generateLargeJson(LARGE_JSON_PATH, 10000); // Reduced size
|
| 71 |
+
|
| 72 |
+
// Stream parse JSON
|
| 73 |
+
console.log('开始流式解析 JSON...');
|
| 74 |
+
await xmlJsonHandler.processLargeJsonStream(LARGE_JSON_PATH);
|
| 75 |
+
|
| 76 |
+
console.log('\n=== 演示结束 ===');
|
| 77 |
+
|
| 78 |
+
// Capture memory usage
|
| 79 |
+
const used = process.memoryUsage();
|
| 80 |
+
console.log('Memory Usage:');
|
| 81 |
+
for (let key in used) {
|
| 82 |
+
console.log(`${key}: ${Math.round(used[key] / 1024 / 1024 * 100) / 100} MB`);
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
} catch (err) {
|
| 86 |
+
console.error('发生错误:', err);
|
| 87 |
+
}
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
app.get('/', async (req, res) => {
|
| 91 |
+
const logger = new StringLogger();
|
| 92 |
+
|
| 93 |
+
// Check if running
|
| 94 |
+
if (global.isDemoRunning) {
|
| 95 |
+
return res.send('Demo is already running, please wait...');
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
global.isDemoRunning = true;
|
| 99 |
+
|
| 100 |
+
// Override console methods to capture output
|
| 101 |
+
const originalConsoleLog = console.log;
|
| 102 |
+
const originalConsoleError = console.error;
|
| 103 |
+
|
| 104 |
+
console.log = (...args) => {
|
| 105 |
+
logger.log(...args);
|
| 106 |
+
originalConsoleLog.apply(console, args);
|
| 107 |
+
};
|
| 108 |
+
console.error = (...args) => {
|
| 109 |
+
logger.error(...args);
|
| 110 |
+
originalConsoleError.apply(console, args);
|
| 111 |
+
};
|
| 112 |
+
|
| 113 |
+
try {
|
| 114 |
+
await runDemo();
|
| 115 |
+
} catch (e) {
|
| 116 |
+
console.error('Unhandled error in demo:', e);
|
| 117 |
+
} finally {
|
| 118 |
+
// Restore console methods
|
| 119 |
+
console.log = originalConsoleLog;
|
| 120 |
+
console.error = originalConsoleError;
|
| 121 |
+
global.isDemoRunning = false;
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
const output = logger.getOutput();
|
| 125 |
+
res.send(`
|
| 126 |
+
<html>
|
| 127 |
+
<head>
|
| 128 |
+
<title>Node.js Performance Demo</title>
|
| 129 |
+
<style>
|
| 130 |
+
body { font-family: monospace; background: #f0f0f0; padding: 20px; }
|
| 131 |
+
pre { background: #fff; padding: 20px; border-radius: 5px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); white-space: pre-wrap; }
|
| 132 |
+
h1 { color: #333; }
|
| 133 |
+
</style>
|
| 134 |
+
</head>
|
| 135 |
+
<body>
|
| 136 |
+
<h1>Node.js Performance Demo Output</h1>
|
| 137 |
+
<pre>${output}</pre>
|
| 138 |
+
<p>Refresh to run again.</p>
|
| 139 |
+
</body>
|
| 140 |
+
</html>
|
| 141 |
+
`);
|
| 142 |
+
});
|
| 143 |
+
|
| 144 |
+
app.listen(PORT, () => {
|
| 145 |
+
console.log(`Server is running on http://localhost:${PORT}`);
|
| 146 |
+
});
|
package-lock.json
ADDED
|
@@ -0,0 +1,906 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "nodejs-performance-project",
|
| 3 |
+
"version": "1.0.0",
|
| 4 |
+
"lockfileVersion": 3,
|
| 5 |
+
"requires": true,
|
| 6 |
+
"packages": {
|
| 7 |
+
"": {
|
| 8 |
+
"name": "nodejs-performance-project",
|
| 9 |
+
"version": "1.0.0",
|
| 10 |
+
"license": "ISC",
|
| 11 |
+
"dependencies": {
|
| 12 |
+
"express": "^5.2.1",
|
| 13 |
+
"fast-xml-parser": "^5.5.1",
|
| 14 |
+
"stream-json": "^1.9.1"
|
| 15 |
+
}
|
| 16 |
+
},
|
| 17 |
+
"node_modules/accepts": {
|
| 18 |
+
"version": "2.0.0",
|
| 19 |
+
"resolved": "https://registry.npmmirror.com/accepts/-/accepts-2.0.0.tgz",
|
| 20 |
+
"integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==",
|
| 21 |
+
"license": "MIT",
|
| 22 |
+
"dependencies": {
|
| 23 |
+
"mime-types": "^3.0.0",
|
| 24 |
+
"negotiator": "^1.0.0"
|
| 25 |
+
},
|
| 26 |
+
"engines": {
|
| 27 |
+
"node": ">= 0.6"
|
| 28 |
+
}
|
| 29 |
+
},
|
| 30 |
+
"node_modules/body-parser": {
|
| 31 |
+
"version": "2.2.2",
|
| 32 |
+
"resolved": "https://registry.npmmirror.com/body-parser/-/body-parser-2.2.2.tgz",
|
| 33 |
+
"integrity": "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==",
|
| 34 |
+
"license": "MIT",
|
| 35 |
+
"dependencies": {
|
| 36 |
+
"bytes": "^3.1.2",
|
| 37 |
+
"content-type": "^1.0.5",
|
| 38 |
+
"debug": "^4.4.3",
|
| 39 |
+
"http-errors": "^2.0.0",
|
| 40 |
+
"iconv-lite": "^0.7.0",
|
| 41 |
+
"on-finished": "^2.4.1",
|
| 42 |
+
"qs": "^6.14.1",
|
| 43 |
+
"raw-body": "^3.0.1",
|
| 44 |
+
"type-is": "^2.0.1"
|
| 45 |
+
},
|
| 46 |
+
"engines": {
|
| 47 |
+
"node": ">=18"
|
| 48 |
+
},
|
| 49 |
+
"funding": {
|
| 50 |
+
"type": "opencollective",
|
| 51 |
+
"url": "https://opencollective.com/express"
|
| 52 |
+
}
|
| 53 |
+
},
|
| 54 |
+
"node_modules/bytes": {
|
| 55 |
+
"version": "3.1.2",
|
| 56 |
+
"resolved": "https://registry.npmmirror.com/bytes/-/bytes-3.1.2.tgz",
|
| 57 |
+
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
|
| 58 |
+
"license": "MIT",
|
| 59 |
+
"engines": {
|
| 60 |
+
"node": ">= 0.8"
|
| 61 |
+
}
|
| 62 |
+
},
|
| 63 |
+
"node_modules/call-bind-apply-helpers": {
|
| 64 |
+
"version": "1.0.2",
|
| 65 |
+
"resolved": "https://registry.npmmirror.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
|
| 66 |
+
"integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
|
| 67 |
+
"license": "MIT",
|
| 68 |
+
"dependencies": {
|
| 69 |
+
"es-errors": "^1.3.0",
|
| 70 |
+
"function-bind": "^1.1.2"
|
| 71 |
+
},
|
| 72 |
+
"engines": {
|
| 73 |
+
"node": ">= 0.4"
|
| 74 |
+
}
|
| 75 |
+
},
|
| 76 |
+
"node_modules/call-bound": {
|
| 77 |
+
"version": "1.0.4",
|
| 78 |
+
"resolved": "https://registry.npmmirror.com/call-bound/-/call-bound-1.0.4.tgz",
|
| 79 |
+
"integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
|
| 80 |
+
"license": "MIT",
|
| 81 |
+
"dependencies": {
|
| 82 |
+
"call-bind-apply-helpers": "^1.0.2",
|
| 83 |
+
"get-intrinsic": "^1.3.0"
|
| 84 |
+
},
|
| 85 |
+
"engines": {
|
| 86 |
+
"node": ">= 0.4"
|
| 87 |
+
},
|
| 88 |
+
"funding": {
|
| 89 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 90 |
+
}
|
| 91 |
+
},
|
| 92 |
+
"node_modules/content-disposition": {
|
| 93 |
+
"version": "1.0.1",
|
| 94 |
+
"resolved": "https://registry.npmmirror.com/content-disposition/-/content-disposition-1.0.1.tgz",
|
| 95 |
+
"integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==",
|
| 96 |
+
"license": "MIT",
|
| 97 |
+
"engines": {
|
| 98 |
+
"node": ">=18"
|
| 99 |
+
},
|
| 100 |
+
"funding": {
|
| 101 |
+
"type": "opencollective",
|
| 102 |
+
"url": "https://opencollective.com/express"
|
| 103 |
+
}
|
| 104 |
+
},
|
| 105 |
+
"node_modules/content-type": {
|
| 106 |
+
"version": "1.0.5",
|
| 107 |
+
"resolved": "https://registry.npmmirror.com/content-type/-/content-type-1.0.5.tgz",
|
| 108 |
+
"integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
|
| 109 |
+
"license": "MIT",
|
| 110 |
+
"engines": {
|
| 111 |
+
"node": ">= 0.6"
|
| 112 |
+
}
|
| 113 |
+
},
|
| 114 |
+
"node_modules/cookie": {
|
| 115 |
+
"version": "0.7.2",
|
| 116 |
+
"resolved": "https://registry.npmmirror.com/cookie/-/cookie-0.7.2.tgz",
|
| 117 |
+
"integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
|
| 118 |
+
"license": "MIT",
|
| 119 |
+
"engines": {
|
| 120 |
+
"node": ">= 0.6"
|
| 121 |
+
}
|
| 122 |
+
},
|
| 123 |
+
"node_modules/cookie-signature": {
|
| 124 |
+
"version": "1.2.2",
|
| 125 |
+
"resolved": "https://registry.npmmirror.com/cookie-signature/-/cookie-signature-1.2.2.tgz",
|
| 126 |
+
"integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==",
|
| 127 |
+
"license": "MIT",
|
| 128 |
+
"engines": {
|
| 129 |
+
"node": ">=6.6.0"
|
| 130 |
+
}
|
| 131 |
+
},
|
| 132 |
+
"node_modules/debug": {
|
| 133 |
+
"version": "4.4.3",
|
| 134 |
+
"resolved": "https://registry.npmmirror.com/debug/-/debug-4.4.3.tgz",
|
| 135 |
+
"integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
|
| 136 |
+
"license": "MIT",
|
| 137 |
+
"dependencies": {
|
| 138 |
+
"ms": "^2.1.3"
|
| 139 |
+
},
|
| 140 |
+
"engines": {
|
| 141 |
+
"node": ">=6.0"
|
| 142 |
+
},
|
| 143 |
+
"peerDependenciesMeta": {
|
| 144 |
+
"supports-color": {
|
| 145 |
+
"optional": true
|
| 146 |
+
}
|
| 147 |
+
}
|
| 148 |
+
},
|
| 149 |
+
"node_modules/depd": {
|
| 150 |
+
"version": "2.0.0",
|
| 151 |
+
"resolved": "https://registry.npmmirror.com/depd/-/depd-2.0.0.tgz",
|
| 152 |
+
"integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
|
| 153 |
+
"license": "MIT",
|
| 154 |
+
"engines": {
|
| 155 |
+
"node": ">= 0.8"
|
| 156 |
+
}
|
| 157 |
+
},
|
| 158 |
+
"node_modules/dunder-proto": {
|
| 159 |
+
"version": "1.0.1",
|
| 160 |
+
"resolved": "https://registry.npmmirror.com/dunder-proto/-/dunder-proto-1.0.1.tgz",
|
| 161 |
+
"integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
|
| 162 |
+
"license": "MIT",
|
| 163 |
+
"dependencies": {
|
| 164 |
+
"call-bind-apply-helpers": "^1.0.1",
|
| 165 |
+
"es-errors": "^1.3.0",
|
| 166 |
+
"gopd": "^1.2.0"
|
| 167 |
+
},
|
| 168 |
+
"engines": {
|
| 169 |
+
"node": ">= 0.4"
|
| 170 |
+
}
|
| 171 |
+
},
|
| 172 |
+
"node_modules/ee-first": {
|
| 173 |
+
"version": "1.1.1",
|
| 174 |
+
"resolved": "https://registry.npmmirror.com/ee-first/-/ee-first-1.1.1.tgz",
|
| 175 |
+
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
|
| 176 |
+
"license": "MIT"
|
| 177 |
+
},
|
| 178 |
+
"node_modules/encodeurl": {
|
| 179 |
+
"version": "2.0.0",
|
| 180 |
+
"resolved": "https://registry.npmmirror.com/encodeurl/-/encodeurl-2.0.0.tgz",
|
| 181 |
+
"integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
|
| 182 |
+
"license": "MIT",
|
| 183 |
+
"engines": {
|
| 184 |
+
"node": ">= 0.8"
|
| 185 |
+
}
|
| 186 |
+
},
|
| 187 |
+
"node_modules/es-define-property": {
|
| 188 |
+
"version": "1.0.1",
|
| 189 |
+
"resolved": "https://registry.npmmirror.com/es-define-property/-/es-define-property-1.0.1.tgz",
|
| 190 |
+
"integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
|
| 191 |
+
"license": "MIT",
|
| 192 |
+
"engines": {
|
| 193 |
+
"node": ">= 0.4"
|
| 194 |
+
}
|
| 195 |
+
},
|
| 196 |
+
"node_modules/es-errors": {
|
| 197 |
+
"version": "1.3.0",
|
| 198 |
+
"resolved": "https://registry.npmmirror.com/es-errors/-/es-errors-1.3.0.tgz",
|
| 199 |
+
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
|
| 200 |
+
"license": "MIT",
|
| 201 |
+
"engines": {
|
| 202 |
+
"node": ">= 0.4"
|
| 203 |
+
}
|
| 204 |
+
},
|
| 205 |
+
"node_modules/es-object-atoms": {
|
| 206 |
+
"version": "1.1.1",
|
| 207 |
+
"resolved": "https://registry.npmmirror.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
|
| 208 |
+
"integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
|
| 209 |
+
"license": "MIT",
|
| 210 |
+
"dependencies": {
|
| 211 |
+
"es-errors": "^1.3.0"
|
| 212 |
+
},
|
| 213 |
+
"engines": {
|
| 214 |
+
"node": ">= 0.4"
|
| 215 |
+
}
|
| 216 |
+
},
|
| 217 |
+
"node_modules/escape-html": {
|
| 218 |
+
"version": "1.0.3",
|
| 219 |
+
"resolved": "https://registry.npmmirror.com/escape-html/-/escape-html-1.0.3.tgz",
|
| 220 |
+
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
|
| 221 |
+
"license": "MIT"
|
| 222 |
+
},
|
| 223 |
+
"node_modules/etag": {
|
| 224 |
+
"version": "1.8.1",
|
| 225 |
+
"resolved": "https://registry.npmmirror.com/etag/-/etag-1.8.1.tgz",
|
| 226 |
+
"integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
|
| 227 |
+
"license": "MIT",
|
| 228 |
+
"engines": {
|
| 229 |
+
"node": ">= 0.6"
|
| 230 |
+
}
|
| 231 |
+
},
|
| 232 |
+
"node_modules/express": {
|
| 233 |
+
"version": "5.2.1",
|
| 234 |
+
"resolved": "https://registry.npmmirror.com/express/-/express-5.2.1.tgz",
|
| 235 |
+
"integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==",
|
| 236 |
+
"license": "MIT",
|
| 237 |
+
"dependencies": {
|
| 238 |
+
"accepts": "^2.0.0",
|
| 239 |
+
"body-parser": "^2.2.1",
|
| 240 |
+
"content-disposition": "^1.0.0",
|
| 241 |
+
"content-type": "^1.0.5",
|
| 242 |
+
"cookie": "^0.7.1",
|
| 243 |
+
"cookie-signature": "^1.2.1",
|
| 244 |
+
"debug": "^4.4.0",
|
| 245 |
+
"depd": "^2.0.0",
|
| 246 |
+
"encodeurl": "^2.0.0",
|
| 247 |
+
"escape-html": "^1.0.3",
|
| 248 |
+
"etag": "^1.8.1",
|
| 249 |
+
"finalhandler": "^2.1.0",
|
| 250 |
+
"fresh": "^2.0.0",
|
| 251 |
+
"http-errors": "^2.0.0",
|
| 252 |
+
"merge-descriptors": "^2.0.0",
|
| 253 |
+
"mime-types": "^3.0.0",
|
| 254 |
+
"on-finished": "^2.4.1",
|
| 255 |
+
"once": "^1.4.0",
|
| 256 |
+
"parseurl": "^1.3.3",
|
| 257 |
+
"proxy-addr": "^2.0.7",
|
| 258 |
+
"qs": "^6.14.0",
|
| 259 |
+
"range-parser": "^1.2.1",
|
| 260 |
+
"router": "^2.2.0",
|
| 261 |
+
"send": "^1.1.0",
|
| 262 |
+
"serve-static": "^2.2.0",
|
| 263 |
+
"statuses": "^2.0.1",
|
| 264 |
+
"type-is": "^2.0.1",
|
| 265 |
+
"vary": "^1.1.2"
|
| 266 |
+
},
|
| 267 |
+
"engines": {
|
| 268 |
+
"node": ">= 18"
|
| 269 |
+
},
|
| 270 |
+
"funding": {
|
| 271 |
+
"type": "opencollective",
|
| 272 |
+
"url": "https://opencollective.com/express"
|
| 273 |
+
}
|
| 274 |
+
},
|
| 275 |
+
"node_modules/fast-xml-builder": {
|
| 276 |
+
"version": "1.1.0",
|
| 277 |
+
"resolved": "https://registry.npmmirror.com/fast-xml-builder/-/fast-xml-builder-1.1.0.tgz",
|
| 278 |
+
"integrity": "sha512-7mtITW/we2/wTUZqMyBOR2F8xP4CRxMiSEcQxPIqdRWdO2L/HZSOlzoNyghmyDwNB8BDxePooV1ZTJpkOUhdRg==",
|
| 279 |
+
"funding": [
|
| 280 |
+
{
|
| 281 |
+
"type": "github",
|
| 282 |
+
"url": "https://github.com/sponsors/NaturalIntelligence"
|
| 283 |
+
}
|
| 284 |
+
],
|
| 285 |
+
"license": "MIT",
|
| 286 |
+
"dependencies": {
|
| 287 |
+
"path-expression-matcher": "^1.1.2"
|
| 288 |
+
}
|
| 289 |
+
},
|
| 290 |
+
"node_modules/fast-xml-parser": {
|
| 291 |
+
"version": "5.5.1",
|
| 292 |
+
"resolved": "https://registry.npmmirror.com/fast-xml-parser/-/fast-xml-parser-5.5.1.tgz",
|
| 293 |
+
"integrity": "sha512-JTpMz8P5mDoNYzXTmTT/xzWjFiCWi0U+UQTJtrFH9muXsr2RqtXZPbnCW5h2mKsOd4u3XcPWCvDSrnaBPlUcMQ==",
|
| 294 |
+
"funding": [
|
| 295 |
+
{
|
| 296 |
+
"type": "github",
|
| 297 |
+
"url": "https://github.com/sponsors/NaturalIntelligence"
|
| 298 |
+
}
|
| 299 |
+
],
|
| 300 |
+
"license": "MIT",
|
| 301 |
+
"dependencies": {
|
| 302 |
+
"fast-xml-builder": "^1.1.0",
|
| 303 |
+
"path-expression-matcher": "^1.1.2",
|
| 304 |
+
"strnum": "^2.1.2"
|
| 305 |
+
},
|
| 306 |
+
"bin": {
|
| 307 |
+
"fxparser": "src/cli/cli.js"
|
| 308 |
+
}
|
| 309 |
+
},
|
| 310 |
+
"node_modules/finalhandler": {
|
| 311 |
+
"version": "2.1.1",
|
| 312 |
+
"resolved": "https://registry.npmmirror.com/finalhandler/-/finalhandler-2.1.1.tgz",
|
| 313 |
+
"integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==",
|
| 314 |
+
"license": "MIT",
|
| 315 |
+
"dependencies": {
|
| 316 |
+
"debug": "^4.4.0",
|
| 317 |
+
"encodeurl": "^2.0.0",
|
| 318 |
+
"escape-html": "^1.0.3",
|
| 319 |
+
"on-finished": "^2.4.1",
|
| 320 |
+
"parseurl": "^1.3.3",
|
| 321 |
+
"statuses": "^2.0.1"
|
| 322 |
+
},
|
| 323 |
+
"engines": {
|
| 324 |
+
"node": ">= 18.0.0"
|
| 325 |
+
},
|
| 326 |
+
"funding": {
|
| 327 |
+
"type": "opencollective",
|
| 328 |
+
"url": "https://opencollective.com/express"
|
| 329 |
+
}
|
| 330 |
+
},
|
| 331 |
+
"node_modules/forwarded": {
|
| 332 |
+
"version": "0.2.0",
|
| 333 |
+
"resolved": "https://registry.npmmirror.com/forwarded/-/forwarded-0.2.0.tgz",
|
| 334 |
+
"integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
|
| 335 |
+
"license": "MIT",
|
| 336 |
+
"engines": {
|
| 337 |
+
"node": ">= 0.6"
|
| 338 |
+
}
|
| 339 |
+
},
|
| 340 |
+
"node_modules/fresh": {
|
| 341 |
+
"version": "2.0.0",
|
| 342 |
+
"resolved": "https://registry.npmmirror.com/fresh/-/fresh-2.0.0.tgz",
|
| 343 |
+
"integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==",
|
| 344 |
+
"license": "MIT",
|
| 345 |
+
"engines": {
|
| 346 |
+
"node": ">= 0.8"
|
| 347 |
+
}
|
| 348 |
+
},
|
| 349 |
+
"node_modules/function-bind": {
|
| 350 |
+
"version": "1.1.2",
|
| 351 |
+
"resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz",
|
| 352 |
+
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
|
| 353 |
+
"license": "MIT",
|
| 354 |
+
"funding": {
|
| 355 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 356 |
+
}
|
| 357 |
+
},
|
| 358 |
+
"node_modules/get-intrinsic": {
|
| 359 |
+
"version": "1.3.0",
|
| 360 |
+
"resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
|
| 361 |
+
"integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
|
| 362 |
+
"license": "MIT",
|
| 363 |
+
"dependencies": {
|
| 364 |
+
"call-bind-apply-helpers": "^1.0.2",
|
| 365 |
+
"es-define-property": "^1.0.1",
|
| 366 |
+
"es-errors": "^1.3.0",
|
| 367 |
+
"es-object-atoms": "^1.1.1",
|
| 368 |
+
"function-bind": "^1.1.2",
|
| 369 |
+
"get-proto": "^1.0.1",
|
| 370 |
+
"gopd": "^1.2.0",
|
| 371 |
+
"has-symbols": "^1.1.0",
|
| 372 |
+
"hasown": "^2.0.2",
|
| 373 |
+
"math-intrinsics": "^1.1.0"
|
| 374 |
+
},
|
| 375 |
+
"engines": {
|
| 376 |
+
"node": ">= 0.4"
|
| 377 |
+
},
|
| 378 |
+
"funding": {
|
| 379 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 380 |
+
}
|
| 381 |
+
},
|
| 382 |
+
"node_modules/get-proto": {
|
| 383 |
+
"version": "1.0.1",
|
| 384 |
+
"resolved": "https://registry.npmmirror.com/get-proto/-/get-proto-1.0.1.tgz",
|
| 385 |
+
"integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
|
| 386 |
+
"license": "MIT",
|
| 387 |
+
"dependencies": {
|
| 388 |
+
"dunder-proto": "^1.0.1",
|
| 389 |
+
"es-object-atoms": "^1.0.0"
|
| 390 |
+
},
|
| 391 |
+
"engines": {
|
| 392 |
+
"node": ">= 0.4"
|
| 393 |
+
}
|
| 394 |
+
},
|
| 395 |
+
"node_modules/gopd": {
|
| 396 |
+
"version": "1.2.0",
|
| 397 |
+
"resolved": "https://registry.npmmirror.com/gopd/-/gopd-1.2.0.tgz",
|
| 398 |
+
"integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
|
| 399 |
+
"license": "MIT",
|
| 400 |
+
"engines": {
|
| 401 |
+
"node": ">= 0.4"
|
| 402 |
+
},
|
| 403 |
+
"funding": {
|
| 404 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 405 |
+
}
|
| 406 |
+
},
|
| 407 |
+
"node_modules/has-symbols": {
|
| 408 |
+
"version": "1.1.0",
|
| 409 |
+
"resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.1.0.tgz",
|
| 410 |
+
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
|
| 411 |
+
"license": "MIT",
|
| 412 |
+
"engines": {
|
| 413 |
+
"node": ">= 0.4"
|
| 414 |
+
},
|
| 415 |
+
"funding": {
|
| 416 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 417 |
+
}
|
| 418 |
+
},
|
| 419 |
+
"node_modules/hasown": {
|
| 420 |
+
"version": "2.0.2",
|
| 421 |
+
"resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.2.tgz",
|
| 422 |
+
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
| 423 |
+
"license": "MIT",
|
| 424 |
+
"dependencies": {
|
| 425 |
+
"function-bind": "^1.1.2"
|
| 426 |
+
},
|
| 427 |
+
"engines": {
|
| 428 |
+
"node": ">= 0.4"
|
| 429 |
+
}
|
| 430 |
+
},
|
| 431 |
+
"node_modules/http-errors": {
|
| 432 |
+
"version": "2.0.1",
|
| 433 |
+
"resolved": "https://registry.npmmirror.com/http-errors/-/http-errors-2.0.1.tgz",
|
| 434 |
+
"integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
|
| 435 |
+
"license": "MIT",
|
| 436 |
+
"dependencies": {
|
| 437 |
+
"depd": "~2.0.0",
|
| 438 |
+
"inherits": "~2.0.4",
|
| 439 |
+
"setprototypeof": "~1.2.0",
|
| 440 |
+
"statuses": "~2.0.2",
|
| 441 |
+
"toidentifier": "~1.0.1"
|
| 442 |
+
},
|
| 443 |
+
"engines": {
|
| 444 |
+
"node": ">= 0.8"
|
| 445 |
+
},
|
| 446 |
+
"funding": {
|
| 447 |
+
"type": "opencollective",
|
| 448 |
+
"url": "https://opencollective.com/express"
|
| 449 |
+
}
|
| 450 |
+
},
|
| 451 |
+
"node_modules/iconv-lite": {
|
| 452 |
+
"version": "0.7.2",
|
| 453 |
+
"resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.7.2.tgz",
|
| 454 |
+
"integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==",
|
| 455 |
+
"license": "MIT",
|
| 456 |
+
"dependencies": {
|
| 457 |
+
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
| 458 |
+
},
|
| 459 |
+
"engines": {
|
| 460 |
+
"node": ">=0.10.0"
|
| 461 |
+
},
|
| 462 |
+
"funding": {
|
| 463 |
+
"type": "opencollective",
|
| 464 |
+
"url": "https://opencollective.com/express"
|
| 465 |
+
}
|
| 466 |
+
},
|
| 467 |
+
"node_modules/inherits": {
|
| 468 |
+
"version": "2.0.4",
|
| 469 |
+
"resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz",
|
| 470 |
+
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
| 471 |
+
"license": "ISC"
|
| 472 |
+
},
|
| 473 |
+
"node_modules/ipaddr.js": {
|
| 474 |
+
"version": "1.9.1",
|
| 475 |
+
"resolved": "https://registry.npmmirror.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
|
| 476 |
+
"integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
|
| 477 |
+
"license": "MIT",
|
| 478 |
+
"engines": {
|
| 479 |
+
"node": ">= 0.10"
|
| 480 |
+
}
|
| 481 |
+
},
|
| 482 |
+
"node_modules/is-promise": {
|
| 483 |
+
"version": "4.0.0",
|
| 484 |
+
"resolved": "https://registry.npmmirror.com/is-promise/-/is-promise-4.0.0.tgz",
|
| 485 |
+
"integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",
|
| 486 |
+
"license": "MIT"
|
| 487 |
+
},
|
| 488 |
+
"node_modules/math-intrinsics": {
|
| 489 |
+
"version": "1.1.0",
|
| 490 |
+
"resolved": "https://registry.npmmirror.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
|
| 491 |
+
"integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
|
| 492 |
+
"license": "MIT",
|
| 493 |
+
"engines": {
|
| 494 |
+
"node": ">= 0.4"
|
| 495 |
+
}
|
| 496 |
+
},
|
| 497 |
+
"node_modules/media-typer": {
|
| 498 |
+
"version": "1.1.0",
|
| 499 |
+
"resolved": "https://registry.npmmirror.com/media-typer/-/media-typer-1.1.0.tgz",
|
| 500 |
+
"integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==",
|
| 501 |
+
"license": "MIT",
|
| 502 |
+
"engines": {
|
| 503 |
+
"node": ">= 0.8"
|
| 504 |
+
}
|
| 505 |
+
},
|
| 506 |
+
"node_modules/merge-descriptors": {
|
| 507 |
+
"version": "2.0.0",
|
| 508 |
+
"resolved": "https://registry.npmmirror.com/merge-descriptors/-/merge-descriptors-2.0.0.tgz",
|
| 509 |
+
"integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==",
|
| 510 |
+
"license": "MIT",
|
| 511 |
+
"engines": {
|
| 512 |
+
"node": ">=18"
|
| 513 |
+
},
|
| 514 |
+
"funding": {
|
| 515 |
+
"url": "https://github.com/sponsors/sindresorhus"
|
| 516 |
+
}
|
| 517 |
+
},
|
| 518 |
+
"node_modules/mime-db": {
|
| 519 |
+
"version": "1.54.0",
|
| 520 |
+
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.54.0.tgz",
|
| 521 |
+
"integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==",
|
| 522 |
+
"license": "MIT",
|
| 523 |
+
"engines": {
|
| 524 |
+
"node": ">= 0.6"
|
| 525 |
+
}
|
| 526 |
+
},
|
| 527 |
+
"node_modules/mime-types": {
|
| 528 |
+
"version": "3.0.2",
|
| 529 |
+
"resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-3.0.2.tgz",
|
| 530 |
+
"integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==",
|
| 531 |
+
"license": "MIT",
|
| 532 |
+
"dependencies": {
|
| 533 |
+
"mime-db": "^1.54.0"
|
| 534 |
+
},
|
| 535 |
+
"engines": {
|
| 536 |
+
"node": ">=18"
|
| 537 |
+
},
|
| 538 |
+
"funding": {
|
| 539 |
+
"type": "opencollective",
|
| 540 |
+
"url": "https://opencollective.com/express"
|
| 541 |
+
}
|
| 542 |
+
},
|
| 543 |
+
"node_modules/ms": {
|
| 544 |
+
"version": "2.1.3",
|
| 545 |
+
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz",
|
| 546 |
+
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
| 547 |
+
"license": "MIT"
|
| 548 |
+
},
|
| 549 |
+
"node_modules/negotiator": {
|
| 550 |
+
"version": "1.0.0",
|
| 551 |
+
"resolved": "https://registry.npmmirror.com/negotiator/-/negotiator-1.0.0.tgz",
|
| 552 |
+
"integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==",
|
| 553 |
+
"license": "MIT",
|
| 554 |
+
"engines": {
|
| 555 |
+
"node": ">= 0.6"
|
| 556 |
+
}
|
| 557 |
+
},
|
| 558 |
+
"node_modules/object-inspect": {
|
| 559 |
+
"version": "1.13.4",
|
| 560 |
+
"resolved": "https://registry.npmmirror.com/object-inspect/-/object-inspect-1.13.4.tgz",
|
| 561 |
+
"integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
|
| 562 |
+
"license": "MIT",
|
| 563 |
+
"engines": {
|
| 564 |
+
"node": ">= 0.4"
|
| 565 |
+
},
|
| 566 |
+
"funding": {
|
| 567 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 568 |
+
}
|
| 569 |
+
},
|
| 570 |
+
"node_modules/on-finished": {
|
| 571 |
+
"version": "2.4.1",
|
| 572 |
+
"resolved": "https://registry.npmmirror.com/on-finished/-/on-finished-2.4.1.tgz",
|
| 573 |
+
"integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
|
| 574 |
+
"license": "MIT",
|
| 575 |
+
"dependencies": {
|
| 576 |
+
"ee-first": "1.1.1"
|
| 577 |
+
},
|
| 578 |
+
"engines": {
|
| 579 |
+
"node": ">= 0.8"
|
| 580 |
+
}
|
| 581 |
+
},
|
| 582 |
+
"node_modules/once": {
|
| 583 |
+
"version": "1.4.0",
|
| 584 |
+
"resolved": "https://registry.npmmirror.com/once/-/once-1.4.0.tgz",
|
| 585 |
+
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
| 586 |
+
"license": "ISC",
|
| 587 |
+
"dependencies": {
|
| 588 |
+
"wrappy": "1"
|
| 589 |
+
}
|
| 590 |
+
},
|
| 591 |
+
"node_modules/parseurl": {
|
| 592 |
+
"version": "1.3.3",
|
| 593 |
+
"resolved": "https://registry.npmmirror.com/parseurl/-/parseurl-1.3.3.tgz",
|
| 594 |
+
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
|
| 595 |
+
"license": "MIT",
|
| 596 |
+
"engines": {
|
| 597 |
+
"node": ">= 0.8"
|
| 598 |
+
}
|
| 599 |
+
},
|
| 600 |
+
"node_modules/path-expression-matcher": {
|
| 601 |
+
"version": "1.1.2",
|
| 602 |
+
"resolved": "https://registry.npmmirror.com/path-expression-matcher/-/path-expression-matcher-1.1.2.tgz",
|
| 603 |
+
"integrity": "sha512-LXWqJmcpp2BKOEmgt4CyuESFmBfPuhJlAHKJsFzuJU6CxErWk75BrO+Ni77M9OxHN6dCYKM4vj+21Z6cOL96YQ==",
|
| 604 |
+
"funding": [
|
| 605 |
+
{
|
| 606 |
+
"type": "github",
|
| 607 |
+
"url": "https://github.com/sponsors/NaturalIntelligence"
|
| 608 |
+
}
|
| 609 |
+
],
|
| 610 |
+
"license": "MIT",
|
| 611 |
+
"engines": {
|
| 612 |
+
"node": ">=14.0.0"
|
| 613 |
+
}
|
| 614 |
+
},
|
| 615 |
+
"node_modules/path-to-regexp": {
|
| 616 |
+
"version": "8.3.0",
|
| 617 |
+
"resolved": "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-8.3.0.tgz",
|
| 618 |
+
"integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==",
|
| 619 |
+
"license": "MIT",
|
| 620 |
+
"funding": {
|
| 621 |
+
"type": "opencollective",
|
| 622 |
+
"url": "https://opencollective.com/express"
|
| 623 |
+
}
|
| 624 |
+
},
|
| 625 |
+
"node_modules/proxy-addr": {
|
| 626 |
+
"version": "2.0.7",
|
| 627 |
+
"resolved": "https://registry.npmmirror.com/proxy-addr/-/proxy-addr-2.0.7.tgz",
|
| 628 |
+
"integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
|
| 629 |
+
"license": "MIT",
|
| 630 |
+
"dependencies": {
|
| 631 |
+
"forwarded": "0.2.0",
|
| 632 |
+
"ipaddr.js": "1.9.1"
|
| 633 |
+
},
|
| 634 |
+
"engines": {
|
| 635 |
+
"node": ">= 0.10"
|
| 636 |
+
}
|
| 637 |
+
},
|
| 638 |
+
"node_modules/qs": {
|
| 639 |
+
"version": "6.15.0",
|
| 640 |
+
"resolved": "https://registry.npmmirror.com/qs/-/qs-6.15.0.tgz",
|
| 641 |
+
"integrity": "sha512-mAZTtNCeetKMH+pSjrb76NAM8V9a05I9aBZOHztWy/UqcJdQYNsf59vrRKWnojAT9Y+GbIvoTBC++CPHqpDBhQ==",
|
| 642 |
+
"license": "BSD-3-Clause",
|
| 643 |
+
"dependencies": {
|
| 644 |
+
"side-channel": "^1.1.0"
|
| 645 |
+
},
|
| 646 |
+
"engines": {
|
| 647 |
+
"node": ">=0.6"
|
| 648 |
+
},
|
| 649 |
+
"funding": {
|
| 650 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 651 |
+
}
|
| 652 |
+
},
|
| 653 |
+
"node_modules/range-parser": {
|
| 654 |
+
"version": "1.2.1",
|
| 655 |
+
"resolved": "https://registry.npmmirror.com/range-parser/-/range-parser-1.2.1.tgz",
|
| 656 |
+
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
|
| 657 |
+
"license": "MIT",
|
| 658 |
+
"engines": {
|
| 659 |
+
"node": ">= 0.6"
|
| 660 |
+
}
|
| 661 |
+
},
|
| 662 |
+
"node_modules/raw-body": {
|
| 663 |
+
"version": "3.0.2",
|
| 664 |
+
"resolved": "https://registry.npmmirror.com/raw-body/-/raw-body-3.0.2.tgz",
|
| 665 |
+
"integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==",
|
| 666 |
+
"license": "MIT",
|
| 667 |
+
"dependencies": {
|
| 668 |
+
"bytes": "~3.1.2",
|
| 669 |
+
"http-errors": "~2.0.1",
|
| 670 |
+
"iconv-lite": "~0.7.0",
|
| 671 |
+
"unpipe": "~1.0.0"
|
| 672 |
+
},
|
| 673 |
+
"engines": {
|
| 674 |
+
"node": ">= 0.10"
|
| 675 |
+
}
|
| 676 |
+
},
|
| 677 |
+
"node_modules/router": {
|
| 678 |
+
"version": "2.2.0",
|
| 679 |
+
"resolved": "https://registry.npmmirror.com/router/-/router-2.2.0.tgz",
|
| 680 |
+
"integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==",
|
| 681 |
+
"license": "MIT",
|
| 682 |
+
"dependencies": {
|
| 683 |
+
"debug": "^4.4.0",
|
| 684 |
+
"depd": "^2.0.0",
|
| 685 |
+
"is-promise": "^4.0.0",
|
| 686 |
+
"parseurl": "^1.3.3",
|
| 687 |
+
"path-to-regexp": "^8.0.0"
|
| 688 |
+
},
|
| 689 |
+
"engines": {
|
| 690 |
+
"node": ">= 18"
|
| 691 |
+
}
|
| 692 |
+
},
|
| 693 |
+
"node_modules/safer-buffer": {
|
| 694 |
+
"version": "2.1.2",
|
| 695 |
+
"resolved": "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
| 696 |
+
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
|
| 697 |
+
"license": "MIT"
|
| 698 |
+
},
|
| 699 |
+
"node_modules/send": {
|
| 700 |
+
"version": "1.2.1",
|
| 701 |
+
"resolved": "https://registry.npmmirror.com/send/-/send-1.2.1.tgz",
|
| 702 |
+
"integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==",
|
| 703 |
+
"license": "MIT",
|
| 704 |
+
"dependencies": {
|
| 705 |
+
"debug": "^4.4.3",
|
| 706 |
+
"encodeurl": "^2.0.0",
|
| 707 |
+
"escape-html": "^1.0.3",
|
| 708 |
+
"etag": "^1.8.1",
|
| 709 |
+
"fresh": "^2.0.0",
|
| 710 |
+
"http-errors": "^2.0.1",
|
| 711 |
+
"mime-types": "^3.0.2",
|
| 712 |
+
"ms": "^2.1.3",
|
| 713 |
+
"on-finished": "^2.4.1",
|
| 714 |
+
"range-parser": "^1.2.1",
|
| 715 |
+
"statuses": "^2.0.2"
|
| 716 |
+
},
|
| 717 |
+
"engines": {
|
| 718 |
+
"node": ">= 18"
|
| 719 |
+
},
|
| 720 |
+
"funding": {
|
| 721 |
+
"type": "opencollective",
|
| 722 |
+
"url": "https://opencollective.com/express"
|
| 723 |
+
}
|
| 724 |
+
},
|
| 725 |
+
"node_modules/serve-static": {
|
| 726 |
+
"version": "2.2.1",
|
| 727 |
+
"resolved": "https://registry.npmmirror.com/serve-static/-/serve-static-2.2.1.tgz",
|
| 728 |
+
"integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==",
|
| 729 |
+
"license": "MIT",
|
| 730 |
+
"dependencies": {
|
| 731 |
+
"encodeurl": "^2.0.0",
|
| 732 |
+
"escape-html": "^1.0.3",
|
| 733 |
+
"parseurl": "^1.3.3",
|
| 734 |
+
"send": "^1.2.0"
|
| 735 |
+
},
|
| 736 |
+
"engines": {
|
| 737 |
+
"node": ">= 18"
|
| 738 |
+
},
|
| 739 |
+
"funding": {
|
| 740 |
+
"type": "opencollective",
|
| 741 |
+
"url": "https://opencollective.com/express"
|
| 742 |
+
}
|
| 743 |
+
},
|
| 744 |
+
"node_modules/setprototypeof": {
|
| 745 |
+
"version": "1.2.0",
|
| 746 |
+
"resolved": "https://registry.npmmirror.com/setprototypeof/-/setprototypeof-1.2.0.tgz",
|
| 747 |
+
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
|
| 748 |
+
"license": "ISC"
|
| 749 |
+
},
|
| 750 |
+
"node_modules/side-channel": {
|
| 751 |
+
"version": "1.1.0",
|
| 752 |
+
"resolved": "https://registry.npmmirror.com/side-channel/-/side-channel-1.1.0.tgz",
|
| 753 |
+
"integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
|
| 754 |
+
"license": "MIT",
|
| 755 |
+
"dependencies": {
|
| 756 |
+
"es-errors": "^1.3.0",
|
| 757 |
+
"object-inspect": "^1.13.3",
|
| 758 |
+
"side-channel-list": "^1.0.0",
|
| 759 |
+
"side-channel-map": "^1.0.1",
|
| 760 |
+
"side-channel-weakmap": "^1.0.2"
|
| 761 |
+
},
|
| 762 |
+
"engines": {
|
| 763 |
+
"node": ">= 0.4"
|
| 764 |
+
},
|
| 765 |
+
"funding": {
|
| 766 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 767 |
+
}
|
| 768 |
+
},
|
| 769 |
+
"node_modules/side-channel-list": {
|
| 770 |
+
"version": "1.0.0",
|
| 771 |
+
"resolved": "https://registry.npmmirror.com/side-channel-list/-/side-channel-list-1.0.0.tgz",
|
| 772 |
+
"integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
|
| 773 |
+
"license": "MIT",
|
| 774 |
+
"dependencies": {
|
| 775 |
+
"es-errors": "^1.3.0",
|
| 776 |
+
"object-inspect": "^1.13.3"
|
| 777 |
+
},
|
| 778 |
+
"engines": {
|
| 779 |
+
"node": ">= 0.4"
|
| 780 |
+
},
|
| 781 |
+
"funding": {
|
| 782 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 783 |
+
}
|
| 784 |
+
},
|
| 785 |
+
"node_modules/side-channel-map": {
|
| 786 |
+
"version": "1.0.1",
|
| 787 |
+
"resolved": "https://registry.npmmirror.com/side-channel-map/-/side-channel-map-1.0.1.tgz",
|
| 788 |
+
"integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
|
| 789 |
+
"license": "MIT",
|
| 790 |
+
"dependencies": {
|
| 791 |
+
"call-bound": "^1.0.2",
|
| 792 |
+
"es-errors": "^1.3.0",
|
| 793 |
+
"get-intrinsic": "^1.2.5",
|
| 794 |
+
"object-inspect": "^1.13.3"
|
| 795 |
+
},
|
| 796 |
+
"engines": {
|
| 797 |
+
"node": ">= 0.4"
|
| 798 |
+
},
|
| 799 |
+
"funding": {
|
| 800 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 801 |
+
}
|
| 802 |
+
},
|
| 803 |
+
"node_modules/side-channel-weakmap": {
|
| 804 |
+
"version": "1.0.2",
|
| 805 |
+
"resolved": "https://registry.npmmirror.com/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
|
| 806 |
+
"integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
|
| 807 |
+
"license": "MIT",
|
| 808 |
+
"dependencies": {
|
| 809 |
+
"call-bound": "^1.0.2",
|
| 810 |
+
"es-errors": "^1.3.0",
|
| 811 |
+
"get-intrinsic": "^1.2.5",
|
| 812 |
+
"object-inspect": "^1.13.3",
|
| 813 |
+
"side-channel-map": "^1.0.1"
|
| 814 |
+
},
|
| 815 |
+
"engines": {
|
| 816 |
+
"node": ">= 0.4"
|
| 817 |
+
},
|
| 818 |
+
"funding": {
|
| 819 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 820 |
+
}
|
| 821 |
+
},
|
| 822 |
+
"node_modules/statuses": {
|
| 823 |
+
"version": "2.0.2",
|
| 824 |
+
"resolved": "https://registry.npmmirror.com/statuses/-/statuses-2.0.2.tgz",
|
| 825 |
+
"integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
|
| 826 |
+
"license": "MIT",
|
| 827 |
+
"engines": {
|
| 828 |
+
"node": ">= 0.8"
|
| 829 |
+
}
|
| 830 |
+
},
|
| 831 |
+
"node_modules/stream-chain": {
|
| 832 |
+
"version": "2.2.5",
|
| 833 |
+
"resolved": "https://registry.npmmirror.com/stream-chain/-/stream-chain-2.2.5.tgz",
|
| 834 |
+
"integrity": "sha512-1TJmBx6aSWqZ4tx7aTpBDXK0/e2hhcNSTV8+CbFJtDjbb+I1mZ8lHit0Grw9GRT+6JbIrrDd8esncgBi8aBXGA==",
|
| 835 |
+
"license": "BSD-3-Clause"
|
| 836 |
+
},
|
| 837 |
+
"node_modules/stream-json": {
|
| 838 |
+
"version": "1.9.1",
|
| 839 |
+
"resolved": "https://registry.npmmirror.com/stream-json/-/stream-json-1.9.1.tgz",
|
| 840 |
+
"integrity": "sha512-uWkjJ+2Nt/LO9Z/JyKZbMusL8Dkh97uUBTv3AJQ74y07lVahLY4eEFsPsE97pxYBwr8nnjMAIch5eqI0gPShyw==",
|
| 841 |
+
"license": "BSD-3-Clause",
|
| 842 |
+
"dependencies": {
|
| 843 |
+
"stream-chain": "^2.2.5"
|
| 844 |
+
}
|
| 845 |
+
},
|
| 846 |
+
"node_modules/strnum": {
|
| 847 |
+
"version": "2.2.0",
|
| 848 |
+
"resolved": "https://registry.npmmirror.com/strnum/-/strnum-2.2.0.tgz",
|
| 849 |
+
"integrity": "sha512-Y7Bj8XyJxnPAORMZj/xltsfo55uOiyHcU2tnAVzHUnSJR/KsEX+9RoDeXEnsXtl/CX4fAcrt64gZ13aGaWPeBg==",
|
| 850 |
+
"funding": [
|
| 851 |
+
{
|
| 852 |
+
"type": "github",
|
| 853 |
+
"url": "https://github.com/sponsors/NaturalIntelligence"
|
| 854 |
+
}
|
| 855 |
+
],
|
| 856 |
+
"license": "MIT"
|
| 857 |
+
},
|
| 858 |
+
"node_modules/toidentifier": {
|
| 859 |
+
"version": "1.0.1",
|
| 860 |
+
"resolved": "https://registry.npmmirror.com/toidentifier/-/toidentifier-1.0.1.tgz",
|
| 861 |
+
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
|
| 862 |
+
"license": "MIT",
|
| 863 |
+
"engines": {
|
| 864 |
+
"node": ">=0.6"
|
| 865 |
+
}
|
| 866 |
+
},
|
| 867 |
+
"node_modules/type-is": {
|
| 868 |
+
"version": "2.0.1",
|
| 869 |
+
"resolved": "https://registry.npmmirror.com/type-is/-/type-is-2.0.1.tgz",
|
| 870 |
+
"integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==",
|
| 871 |
+
"license": "MIT",
|
| 872 |
+
"dependencies": {
|
| 873 |
+
"content-type": "^1.0.5",
|
| 874 |
+
"media-typer": "^1.1.0",
|
| 875 |
+
"mime-types": "^3.0.0"
|
| 876 |
+
},
|
| 877 |
+
"engines": {
|
| 878 |
+
"node": ">= 0.6"
|
| 879 |
+
}
|
| 880 |
+
},
|
| 881 |
+
"node_modules/unpipe": {
|
| 882 |
+
"version": "1.0.0",
|
| 883 |
+
"resolved": "https://registry.npmmirror.com/unpipe/-/unpipe-1.0.0.tgz",
|
| 884 |
+
"integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
|
| 885 |
+
"license": "MIT",
|
| 886 |
+
"engines": {
|
| 887 |
+
"node": ">= 0.8"
|
| 888 |
+
}
|
| 889 |
+
},
|
| 890 |
+
"node_modules/vary": {
|
| 891 |
+
"version": "1.1.2",
|
| 892 |
+
"resolved": "https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz",
|
| 893 |
+
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
|
| 894 |
+
"license": "MIT",
|
| 895 |
+
"engines": {
|
| 896 |
+
"node": ">= 0.8"
|
| 897 |
+
}
|
| 898 |
+
},
|
| 899 |
+
"node_modules/wrappy": {
|
| 900 |
+
"version": "1.0.2",
|
| 901 |
+
"resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz",
|
| 902 |
+
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
|
| 903 |
+
"license": "ISC"
|
| 904 |
+
}
|
| 905 |
+
}
|
| 906 |
+
}
|
package.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "nodejs-performance-project",
|
| 3 |
+
"version": "1.0.0",
|
| 4 |
+
"description": "",
|
| 5 |
+
"main": "index.js",
|
| 6 |
+
"scripts": {
|
| 7 |
+
"test": "echo \"Error: no test specified\" && exit 1"
|
| 8 |
+
},
|
| 9 |
+
"keywords": [],
|
| 10 |
+
"author": "",
|
| 11 |
+
"license": "ISC",
|
| 12 |
+
"type": "commonjs",
|
| 13 |
+
"dependencies": {
|
| 14 |
+
"express": "^5.2.1",
|
| 15 |
+
"fast-xml-parser": "^5.5.1",
|
| 16 |
+
"stream-json": "^1.9.1"
|
| 17 |
+
}
|
| 18 |
+
}
|
src/largeFile.js
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const fs = require('fs');
|
| 2 |
+
const path = require('path');
|
| 3 |
+
const readline = require('readline');
|
| 4 |
+
const performanceMonitor = require('./performance');
|
| 5 |
+
|
| 6 |
+
/**
|
| 7 |
+
* 大文件处理模块
|
| 8 |
+
* 使用流(Stream)处理大文件,避免一次性加载到内存导致溢出
|
| 9 |
+
*/
|
| 10 |
+
class LargeFileHandler {
|
| 11 |
+
constructor(filePath) {
|
| 12 |
+
this.filePath = filePath;
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
/**
|
| 16 |
+
* 生成测试用的大文件
|
| 17 |
+
* @param {number} lines - 行数
|
| 18 |
+
*/
|
| 19 |
+
async generateTestFile(lines = 100000) {
|
| 20 |
+
performanceMonitor.start('生成大文件');
|
| 21 |
+
return new Promise((resolve, reject) => {
|
| 22 |
+
const stream = fs.createWriteStream(this.filePath);
|
| 23 |
+
|
| 24 |
+
// 使用 Buffer 写入可以提高性能,但为了演示简单这里直接写字符串
|
| 25 |
+
for (let i = 0; i < lines; i++) {
|
| 26 |
+
// 模拟 CSV 格式数据:ID,Name,Timestamp,Value
|
| 27 |
+
const data = `${i},User_${i},${Date.now()},${Math.random() * 1000}\n`;
|
| 28 |
+
if (!stream.write(data)) {
|
| 29 |
+
// 如果缓冲区满了,等待 drain 事件
|
| 30 |
+
// 这里为了简化演示没有处理背压(backpressure),实际生产中应该处理
|
| 31 |
+
}
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
stream.end();
|
| 35 |
+
stream.on('finish', () => {
|
| 36 |
+
performanceMonitor.end('生成大文件');
|
| 37 |
+
console.log(`[大文件] 已生成测试文件: ${this.filePath}`);
|
| 38 |
+
resolve();
|
| 39 |
+
});
|
| 40 |
+
stream.on('error', reject);
|
| 41 |
+
});
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
/**
|
| 45 |
+
* 使用流读取并处理大文件
|
| 46 |
+
* 演示逐行读取并进行简单的数据聚合
|
| 47 |
+
*/
|
| 48 |
+
async processFileStream() {
|
| 49 |
+
performanceMonitor.start('流式处理大文件');
|
| 50 |
+
|
| 51 |
+
const fileStream = fs.createReadStream(this.filePath);
|
| 52 |
+
const rl = readline.createInterface({
|
| 53 |
+
input: fileStream,
|
| 54 |
+
crlfDelay: Infinity
|
| 55 |
+
});
|
| 56 |
+
|
| 57 |
+
let lineCount = 0;
|
| 58 |
+
let sumValue = 0;
|
| 59 |
+
|
| 60 |
+
for await (const line of rl) {
|
| 61 |
+
lineCount++;
|
| 62 |
+
// 简单的处理逻辑:解析每行数据并累加 Value 字段
|
| 63 |
+
const parts = line.split(',');
|
| 64 |
+
if (parts.length >= 4) {
|
| 65 |
+
sumValue += parseFloat(parts[3]);
|
| 66 |
+
}
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
console.log(`[大文件] 处理完成。总行数: ${lineCount}, Value总和: ${sumValue.toFixed(2)}`);
|
| 70 |
+
performanceMonitor.end('流式处理大文件');
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
/**
|
| 74 |
+
* 对比测试:尝试一次性读取(慎用,可能会导致内存溢出)
|
| 75 |
+
* 仅用于展示小文件或性能对比
|
| 76 |
+
*/
|
| 77 |
+
async processFileSync() {
|
| 78 |
+
console.log('[大文件] 警告:尝试一次性读取文件(不推荐用于大文件)...');
|
| 79 |
+
try {
|
| 80 |
+
performanceMonitor.start('同步读取文件');
|
| 81 |
+
const data = fs.readFileSync(this.filePath, 'utf-8');
|
| 82 |
+
const lines = data.split('\n');
|
| 83 |
+
let sumValue = 0;
|
| 84 |
+
|
| 85 |
+
lines.forEach(line => {
|
| 86 |
+
if (!line) return;
|
| 87 |
+
const parts = line.split(',');
|
| 88 |
+
if (parts.length >= 4) {
|
| 89 |
+
sumValue += parseFloat(parts[3]);
|
| 90 |
+
}
|
| 91 |
+
});
|
| 92 |
+
|
| 93 |
+
console.log(`[大文件] 同步处理完成。Value总和: ${sumValue.toFixed(2)}`);
|
| 94 |
+
performanceMonitor.end('同步读取文件');
|
| 95 |
+
} catch (err) {
|
| 96 |
+
console.error('[大文件] 读取失败:', err.message);
|
| 97 |
+
}
|
| 98 |
+
}
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
module.exports = LargeFileHandler;
|
src/performance.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const { performance } = require('perf_hooks');
|
| 2 |
+
|
| 3 |
+
/**
|
| 4 |
+
* 性能监控工具模块
|
| 5 |
+
*/
|
| 6 |
+
class PerformanceMonitor {
|
| 7 |
+
constructor() {
|
| 8 |
+
this.timers = new Map();
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
/**
|
| 12 |
+
* 开始计时
|
| 13 |
+
* @param {string} label - 计时器标签
|
| 14 |
+
*/
|
| 15 |
+
start(label) {
|
| 16 |
+
this.timers.set(label, performance.now());
|
| 17 |
+
console.log(`[性能监控] 开始任务: ${label}`);
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
/**
|
| 21 |
+
* 结束计时并输出结果
|
| 22 |
+
* @param {string} label - 计时器标签
|
| 23 |
+
*/
|
| 24 |
+
end(label) {
|
| 25 |
+
const startTime = this.timers.get(label);
|
| 26 |
+
if (!startTime) {
|
| 27 |
+
console.warn(`[性能监控] 未找到标签为 "${label}" 的计时器`);
|
| 28 |
+
return;
|
| 29 |
+
}
|
| 30 |
+
const endTime = performance.now();
|
| 31 |
+
const duration = (endTime - startTime).toFixed(3);
|
| 32 |
+
console.log(`[性能监控] 结束任务: ${label}, 耗时: ${duration}ms`);
|
| 33 |
+
this.timers.delete(label);
|
| 34 |
+
this.logMemoryUsage();
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
/**
|
| 38 |
+
* 输出当前内存使用情况
|
| 39 |
+
*/
|
| 40 |
+
logMemoryUsage() {
|
| 41 |
+
const used = process.memoryUsage();
|
| 42 |
+
console.log(`[内存监控] RSS: ${(used.rss / 1024 / 1024).toFixed(2)} MB, Heap Total: ${(used.heapTotal / 1024 / 1024).toFixed(2)} MB, Heap Used: ${(used.heapUsed / 1024 / 1024).toFixed(2)} MB`);
|
| 43 |
+
}
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
module.exports = new PerformanceMonitor();
|
src/xmlJson.js
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const fs = require('fs');
|
| 2 |
+
const path = require('path');
|
| 3 |
+
const { XMLParser, XMLBuilder } = require('fast-xml-parser');
|
| 4 |
+
const StreamArray = require('stream-json/streamers/StreamArray');
|
| 5 |
+
const { chain } = require('stream-chain');
|
| 6 |
+
const { parser } = require('stream-json');
|
| 7 |
+
const { pick } = require('stream-json/filters/Pick');
|
| 8 |
+
const { ignore } = require('stream-json/filters/Ignore');
|
| 9 |
+
const performanceMonitor = require('./performance');
|
| 10 |
+
|
| 11 |
+
/**
|
| 12 |
+
* XML与JSON处理模块
|
| 13 |
+
* 演示:
|
| 14 |
+
* 1. 使用 fast-xml-parser 解析和生成XML
|
| 15 |
+
* 2. 使用 stream-json 流式处理大型JSON文件
|
| 16 |
+
*/
|
| 17 |
+
class XmlJsonHandler {
|
| 18 |
+
constructor() {
|
| 19 |
+
this.xmlParser = new XMLParser();
|
| 20 |
+
this.xmlBuilder = new XMLBuilder();
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
/**
|
| 24 |
+
* 生成测试用的 XML 数据
|
| 25 |
+
*/
|
| 26 |
+
generateXml(itemCount = 1000) {
|
| 27 |
+
performanceMonitor.start('生成XML');
|
| 28 |
+
const items = [];
|
| 29 |
+
for (let i = 0; i < itemCount; i++) {
|
| 30 |
+
items.push({
|
| 31 |
+
id: i,
|
| 32 |
+
name: `Item_${i}`,
|
| 33 |
+
price: Math.random() * 100,
|
| 34 |
+
description: `Description for item ${i}`
|
| 35 |
+
});
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
const xmlObj = {
|
| 39 |
+
root: {
|
| 40 |
+
metadata: { timestamp: Date.now() },
|
| 41 |
+
items: { item: items }
|
| 42 |
+
}
|
| 43 |
+
};
|
| 44 |
+
|
| 45 |
+
const xmlContent = this.xmlBuilder.build(xmlObj);
|
| 46 |
+
performanceMonitor.end('生成XML');
|
| 47 |
+
return xmlContent;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
/**
|
| 51 |
+
* 解析 XML 数据
|
| 52 |
+
*/
|
| 53 |
+
parseXml(xmlContent) {
|
| 54 |
+
performanceMonitor.start('解析XML');
|
| 55 |
+
const result = this.xmlParser.parse(xmlContent);
|
| 56 |
+
// 简单处理:统计 items 数量
|
| 57 |
+
const count = result.root.items.item.length;
|
| 58 |
+
console.log(`[XML处理] 解析完成,包含 ${count} 个条目`);
|
| 59 |
+
performanceMonitor.end('解析XML');
|
| 60 |
+
return result;
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
/**
|
| 64 |
+
* 生成测试用的大型 JSON 文件
|
| 65 |
+
*/
|
| 66 |
+
async generateLargeJson(filePath, itemCount = 50000) {
|
| 67 |
+
performanceMonitor.start('生成大JSON文件');
|
| 68 |
+
return new Promise((resolve, reject) => {
|
| 69 |
+
const stream = fs.createWriteStream(filePath);
|
| 70 |
+
stream.write('[\n'); // 开始 JSON 数组
|
| 71 |
+
|
| 72 |
+
let i = 0;
|
| 73 |
+
const writeNext = () => {
|
| 74 |
+
let ok = true;
|
| 75 |
+
do {
|
| 76 |
+
i++;
|
| 77 |
+
const item = {
|
| 78 |
+
id: i,
|
| 79 |
+
data: `Data_${i}`,
|
| 80 |
+
timestamp: Date.now(),
|
| 81 |
+
nested: { info: `Nested info ${i}` }
|
| 82 |
+
};
|
| 83 |
+
const isLast = i === itemCount;
|
| 84 |
+
const content = JSON.stringify(item) + (isLast ? '' : ',\n');
|
| 85 |
+
|
| 86 |
+
if (isLast) {
|
| 87 |
+
stream.write(content);
|
| 88 |
+
stream.write('\n]'); // 结束 JSON 数组
|
| 89 |
+
stream.end();
|
| 90 |
+
} else {
|
| 91 |
+
ok = stream.write(content);
|
| 92 |
+
}
|
| 93 |
+
} while (i < itemCount && ok);
|
| 94 |
+
|
| 95 |
+
if (i < itemCount) {
|
| 96 |
+
stream.once('drain', writeNext);
|
| 97 |
+
}
|
| 98 |
+
};
|
| 99 |
+
|
| 100 |
+
writeNext();
|
| 101 |
+
|
| 102 |
+
stream.on('finish', () => {
|
| 103 |
+
performanceMonitor.end('生成大JSON文件');
|
| 104 |
+
console.log(`[JSON处理] 已生成大JSON文件: ${filePath}`);
|
| 105 |
+
resolve();
|
| 106 |
+
});
|
| 107 |
+
stream.on('error', reject);
|
| 108 |
+
});
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
/**
|
| 112 |
+
* 流式解析大型 JSON 文件
|
| 113 |
+
* 使用 stream-json 避免将整个大数组加载进内存
|
| 114 |
+
*/
|
| 115 |
+
async processLargeJsonStream(filePath) {
|
| 116 |
+
performanceMonitor.start('流式处理大JSON');
|
| 117 |
+
|
| 118 |
+
return new Promise((resolve, reject) => {
|
| 119 |
+
let counter = 0;
|
| 120 |
+
|
| 121 |
+
// 构建流处理链:读取 -> 解析 -> 提取数组元素 -> 处理每个对象
|
| 122 |
+
const pipeline = chain([
|
| 123 |
+
fs.createReadStream(filePath),
|
| 124 |
+
parser(),
|
| 125 |
+
StreamArray.streamArray(), // 假设顶层是一个数组
|
| 126 |
+
]);
|
| 127 |
+
|
| 128 |
+
pipeline.on('data', (data) => {
|
| 129 |
+
// data 结构: { key: number, value: object }
|
| 130 |
+
counter++;
|
| 131 |
+
// 模拟处理逻辑,比如每处理 10000 条打印一次进度
|
| 132 |
+
if (counter % 10000 === 0) {
|
| 133 |
+
// console.log(`[JSON流] 已处理 ${counter} 条记录...`);
|
| 134 |
+
}
|
| 135 |
+
});
|
| 136 |
+
|
| 137 |
+
pipeline.on('end', () => {
|
| 138 |
+
console.log(`[JSON流] 处理完成,共计 ${counter} 条记录`);
|
| 139 |
+
performanceMonitor.end('流式处理大JSON');
|
| 140 |
+
resolve();
|
| 141 |
+
});
|
| 142 |
+
|
| 143 |
+
pipeline.on('error', (err) => {
|
| 144 |
+
console.error('[JSON流] 处理出错:', err);
|
| 145 |
+
reject(err);
|
| 146 |
+
});
|
| 147 |
+
});
|
| 148 |
+
}
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
module.exports = new XmlJsonHandler();
|