├── .github ├── FUNDING.yml └── workflows │ └── ci.yml ├── .gitignore ├── LICENSE ├── README-zh.md ├── README.md ├── img ├── banner.svg ├── logo.svg ├── sgo-safari.png └── sgo.png ├── package.json ├── renovate.json ├── src ├── server.ts ├── sgo.ts └── utils │ ├── 404.ejs │ ├── getFileDirectory.ts │ ├── index.ts │ ├── mimeTypes.ts │ ├── notFound.ts │ ├── props.ts │ ├── sortDirs.ts │ └── types.json └── tsconfig.json /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | ko_fi: jaywcjlove 2 | buy_me_a_coffee: jaywcjlove 3 | custom: ["https://www.paypal.me/kennyiseeyou", "https://jaywcjlove.github.io/#/sponsor"] 4 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: Build & Deploy 2 | on: 3 | push: 4 | branches: 5 | - master 6 | jobs: 7 | build-deploy: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v4 11 | - uses: actions/setup-node@v4 12 | with: 13 | node-version: 20 14 | registry-url: 'https://registry.npmjs.org' 15 | 16 | - run: npm install 17 | - run: npm run build 18 | - run: npm run type-check 19 | - run: mkdir -p docs 20 | - run: npm install typedoc@0.23.28 typescript -g 21 | - run: typedoc src/server.ts --name sgo --out docs/type 22 | 23 | - run: cp -rp img docs 24 | - run: npm i markdown-to-html-cli -g 25 | - run: markdown-to-html --output docs/index.html 26 | - run: markdown-to-html --source README-zh.md --output docs/index.zh.html 27 | 28 | - name: Deploy 29 | uses: peaceiris/actions-gh-pages@v4 30 | with: 31 | github_token: ${{ secrets.GITHUB_TOKEN }} 32 | publish_dir: ./docs 33 | 34 | - name: Is a tag created auto? 35 | id: create_tag 36 | uses: jaywcjlove/create-tag-action@main 37 | with: 38 | token: ${{ secrets.GITHUB_TOKEN }} 39 | package-path: ./package.json 40 | 41 | - name: Generate Changelog 42 | id: changelog 43 | uses: jaywcjlove/changelog-generator@main 44 | if: steps.create_tag.outputs.successful 45 | with: 46 | token: ${{ secrets.GITHUB_TOKEN }} 47 | head-ref: ${{ steps.create_tag.outputs.version }} 48 | filter-author: (小弟调调™|Renovate Bot) 49 | filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}' 50 | 51 | - name: Create Release 52 | uses: ncipollo/release-action@v1 53 | if: steps.create_tag.outputs.successful 54 | with: 55 | allowUpdates: true 56 | token: ${{ secrets.GITHUB_TOKEN }} 57 | name: ${{ steps.create_tag.outputs.version }} 58 | tag: ${{ steps.create_tag.outputs.version }} 59 | body: | 60 | [![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/sgo@${{steps.create_tag.outputs.versionNumber}}/file/README.md) 61 | 62 | ```bash 63 | npm i sgo@${{steps.create_tag.outputs.versionNumber}} 64 | ``` 65 | 66 | ${{ steps.changelog.outputs.compareurl }} 67 | 68 | ${{ steps.changelog.outputs.changelog }} 69 | 70 | # - run: npm install @jsdevtools/npm-publish -g 71 | # - run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./package.json 72 | 73 | - run: npm publish --access public 74 | name: 📦 sgo publish to NPM 75 | continue-on-error: true 76 | env: 77 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} 78 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /lib 2 | /docs 3 | /node_modules 4 | /typings 5 | package-lock.json 6 | npm-debug.log* 7 | yarn-debug.log* 8 | yarn-error.log* 9 | 10 | .DS_Store 11 | .cache 12 | .vscode 13 | 14 | *.bak 15 | *.tem 16 | *.temp 17 | #.swp 18 | *.swo 19 | *.*~ 20 | ~*.* 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 小弟调调™ 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README-zh.md: -------------------------------------------------------------------------------- 1 | [English](README.md) • [sgo](https://github.com/jaywcjlove/sgo-rs) rust 2 | 3 |

4 | 5 | sgo logo 6 | 7 |

8 | 9 |

10 | 11 | Build & Deploy 12 | 13 | 14 | Issue 15 | 16 | 17 | Forks 18 | 19 | 20 | Stars 21 | 22 | 23 | Releases 24 | 25 | 26 | npm version 27 | 28 |

29 | 30 | 31 | 32 | 用于快速原型设计的开发服务。它提供了一个简洁的界面,用于列出目录的内容并切换到子文件夹,以当前目录为根目录快速起一个静态服务。 33 | 34 | 此外,它在提供静态站点方面也很棒。 如果目录包含 `index.html` ,则serve将自动呈现它而不是提供目录内容,并将任何 `.html` 文件作为呈现页面而不是文件内容作为明文提供。 35 | 36 | 37 | > 更名: `ssr` => `sgo` 38 | > sgo: `Server Go` 的缩写 39 | 40 | ⚠️ `ssr` 已经捐赠给阿里某团队。 41 | 42 | 43 | 44 | #### `特征` 45 | 46 | 🗂 提供目录中的脚本,样式,图像等静态内容。 47 | 🖥 将所有非文件请求(如`/`或`/ admin`)重新路由到单个文件。 48 | ♻️ 添加,删除或修改项目文件时重新加载浏览器。 49 | 📚 可读的 TypeScript 源代码,鼓励学习和贡献。 50 | 💥 删除冗余的 [proxy](https://github.com/jaywcjlove/mocker-api) 功能, 代理功能请使用 [mocker-api](https://github.com/jaywcjlove/mocker-api)。 51 | ⚛️ 支持预览 React/Vue/Angular 项目的静态页面。 52 | 53 |
54 | 55 | ### 快速开始 56 | 57 | 使用 `npm i sgo -D` 添加 `sgo` 作为 `dev` 依赖项或直接从终端运行: 58 | 59 | ```bash 60 | npm install -g sgo # 全局安装 sgo 61 | sgo # 创建一个服务 62 | # 或者 63 | npx sgo [--port] [--dir] 64 | ``` 65 | 66 |
67 | 68 | ### 命令帮助 69 | 70 | ```bash 71 | Usage: sgo [options] 72 | 73 | Options: 74 | --version Show version number [boolean] 75 | --port, -p Set the port. [number] [default: 1987] 76 | --reload-port Set the reload port. [number] [default: 19872] 77 | --reload, -r browser from reloading when files change. 78 | [boolean] [default: true] 79 | --dir, -d Specified directory. [string] [default: ""] 80 | --browser, -b Browser from opening when the server starts. 81 | [boolean] [default: true] 82 | --fallback The file served for all non-file requests. 83 | [string] [default: ""] 84 | --help Show help [boolean] 85 | 86 | Examples: 87 | 88 | $ sgo Start a dev server. 89 | $ sgo --no-browser Prevents the browser from opening when the 90 | server starts. 91 | $ sgo --no-reload prevents the browser from reloading when 92 | files change. 93 | $ sgo --fallback dir/index.html The file served for all non-file requests.. 94 | $ sgo -p 2019 Designated port. 95 | $ sgo -d node_modules/dir Specified directory "node_modules/dir". 96 | 97 | Copyright 2019 98 | ``` 99 | 100 | 在项目的 `package.json` 文件中使用 `npm` 脚本的示例: 101 | 102 | ```json 103 | { 104 | "scripts": { 105 | "start": "npx sgo -p 2019" 106 | } 107 | } 108 | ``` 109 | 110 |
111 | 112 | ### 在 Node.js 中使用 113 | 114 | ```js 115 | const sgo = require('sgo'); 116 | 117 | // Create server 118 | sgo.default({ port: 1987, dir: '' }); 119 | ``` 120 | 121 | ```js 122 | import server from 'sgo'; 123 | 124 | // Create server 125 | server({ port: 1987, dir: '' }); 126 | ``` 127 | 128 |
129 | 130 | ### License 131 | 132 | MIT © [Kenny Wong](https://wangchujiang.com/) -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [简体中文](README-zh.md) • [sgo](https://github.com/jaywcjlove/sgo-rs) rust 2 | 3 |

4 | 5 | sgo logo 6 | 7 |

8 | 9 |

10 | 11 | Build & Deploy 12 | 13 | 14 | Issue 15 | 16 | 17 | Forks 18 | 19 | 20 | Stars 21 | 22 | 23 | Releases 24 | 25 | 26 | npm version 27 | 28 |

29 | 30 | 31 | 32 | A dev server for rapid prototyping. It provides a neat interface for listing the directory's contents and switching into sub folders. 33 | 34 | In addition, it's also awesome when it comes to serving static sites. If a directory contains an index.html, serve will automatically render it instead of serving directory contents, and will serve any .html file as a rendered page instead of file's content as plaintext. 35 | 36 | > Rename: `ssr` => `sgo` 37 | > sgo: `Server Go` 38 | 39 | ⚠️ `ssr` package has been donated to a certain [team](https://github.com/ykfe) in Ali. 40 | 41 | 42 | 43 | #### `Features` 44 | 45 | 🗂 Serve static content like scripts, styles, images from a directory. 46 | 🖥 Reroute all non-file requests like `/` or `/admin` to a single file. 47 | ♻️ Reload the browser when project files get added, removed or modified. 48 | 📚 Readable source code that encourages learning and contribution. 49 | 💥 Remove the redundancy [proxy](https://github.com/jaywcjlove/mocker-api) feature, Please use [mocker-api](https://github.com/jaywcjlove/mocker-api). 50 | ⚛️ Preview the static page of the React/Vue/Angular project. 51 | 52 |
53 | 54 | ### Quick Start 55 | 56 | Add sgo as a dev dependency using `npm i sgo -D` or run directly from the terminal: 57 | 58 | ```bash 59 | npm install -g sgo # install sgo 60 | sgo # Create server 61 | # or 62 | npx sgo [--port] [--dir] 63 | ``` 64 | 65 |
66 | 67 | ### Command help 68 | 69 | ```bash 70 | Usage: sgo [options] 71 | 72 | Options: 73 | --version Show version number [boolean] 74 | --port, -p Set the port. [number] [default: 1987] 75 | --reload-port Set the reload port. [number] [default: 19872] 76 | --reload, -r browser from reloading when files change. 77 | [boolean] [default: true] 78 | --dir, -d Specified directory. [string] [default: ""] 79 | --browser, -b Browser from opening when the server starts. 80 | [boolean] [default: true] 81 | --fallback The file served for all non-file requests. 82 | [string] [default: ""] 83 | --help Show help [boolean] 84 | 85 | Examples: 86 | 87 | $ sgo Start a dev server. 88 | $ sgo --no-browser Prevents the browser from opening when the 89 | server starts. 90 | $ sgo --no-reload prevents the browser from reloading when 91 | files change. 92 | $ sgo --fallback dir/index.html The file served for all non-file requests.. 93 | $ sgo -p 2019 Designated port. 94 | $ sgo -d node_modules/dir Specified directory "node_modules/dir". 95 | 96 | Copyright 2019 97 | ``` 98 | 99 | Example usage with npm scripts in a project's package.json file: 100 | 101 | ```json 102 | { 103 | "scripts": { 104 | "start": "npx sgo -p 2019" 105 | } 106 | } 107 | ``` 108 | 109 |
110 | 111 | ### Used in Node.js 112 | 113 | ```js 114 | const sgo = require('sgo'); 115 | 116 | // Create server 117 | sgo.default({ port: 1987, dir: '' }); 118 | ``` 119 | 120 | ```js 121 | import server from 'sgo'; 122 | 123 | // Create server 124 | server({ port: 1987, dir: '' }); 125 | ``` 126 | 127 |
128 | 129 | ### License 130 | 131 | MIT © [Kenny Wong](https://wangchujiang.com/) -------------------------------------------------------------------------------- /img/banner.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /img/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /img/sgo-safari.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaywcjlove/sgo/41af7035bd878c6f0b6e14523ce8b51945422468/img/sgo-safari.png -------------------------------------------------------------------------------- /img/sgo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaywcjlove/sgo/41af7035bd878c6f0b6e14523ce8b51945422468/img/sgo.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sgo", 3 | "version": "3.0.3", 4 | "description": "Setting a directory to a static server.", 5 | "homepage": "https://jaywcjlove.github.io/sgo/", 6 | "author": "kenny wang ", 7 | "main": "lib/server.js", 8 | "license": "MIT", 9 | "bin": { 10 | "sgo": "lib/sgo.js" 11 | }, 12 | "scripts": { 13 | "prepare": "npm run build", 14 | "build": "tsbb build", 15 | "watch": "tsbb watch", 16 | "type-check": "tsc --noEmit", 17 | "test:doc": "node lib/sgo.js -d node_modules/@uiw/doc/web", 18 | "test": "tsbb test", 19 | "coverage": "tsbb test --coverage" 20 | }, 21 | "keywords": [ 22 | "ssr", 23 | "sgo", 24 | "server-go", 25 | "server", 26 | "iserver", 27 | "command", 28 | "cli", 29 | "parsing", 30 | "parser", 31 | "option", 32 | "args", 33 | "argument", 34 | "tool" 35 | ], 36 | "files": [ 37 | "lib", 38 | "src", 39 | ".bin" 40 | ], 41 | "repository": { 42 | "type": "git", 43 | "url": "https://github.com/jaywcjlove/sgo.git" 44 | }, 45 | "markdown-to-html": { 46 | "reurls": { 47 | "README-zh.md": "index.zh.html", 48 | "README.md": "index.html" 49 | } 50 | }, 51 | "dependencies": { 52 | "chokidar": "^3.5.3", 53 | "ejs": "^3.1.9", 54 | "fs-extra": "^11.1.1", 55 | "get-port": "^5.1.1", 56 | "minimist": "^1.2.8" 57 | }, 58 | "devDependencies": { 59 | "@types/ejs": "^3.1.2", 60 | "@types/fs-extra": "^11.0.1", 61 | "@types/minimist": "^1.2.2", 62 | "@types/node": "^18.15.11", 63 | "@uiw/doc": "^4.21.28", 64 | "tsbb": "^4.0.1" 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "config:base" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /src/server.ts: -------------------------------------------------------------------------------- 1 | import http, { ServerResponse, IncomingMessage } from 'http'; 2 | import chokidar, { FSWatcher } from 'chokidar'; 3 | import childProcess from 'child_process'; 4 | import { ParsedArgs } from 'minimist'; 5 | import getPort from 'get-port'; 6 | import path from 'path'; 7 | import os from 'os'; 8 | import url from 'url'; 9 | import fs from 'fs-extra'; 10 | import { sendMessage, sendFile, reloadScript, getExt } from './utils'; 11 | import notFound from './utils/notFound'; 12 | import { IServerResponse } from './utils/props'; 13 | 14 | export type SgoArgs = ParsedArgs | { 15 | port: number; 16 | fallback: string; 17 | reload: boolean; 18 | 'reload-port': number; 19 | dir?: string; 20 | proxy?: boolean; 21 | browser?: boolean; 22 | } 23 | 24 | export default async (args: SgoArgs) => { 25 | const reloadPort = await getPort({ port: args['reload-port'] }); 26 | const port = await getPort({ port: args.port }); 27 | const rootDir = path.resolve(process.cwd(), args.dir || ''); 28 | if (port !== args.port) { 29 | console.log(' \x1b[43;1m', 'Warning:', '\x1b[0m', `fall back to a random port ${port}`) 30 | } 31 | 32 | let watchRes: ServerResponse; 33 | 34 | // Initialize watcher. 35 | // Watch the target directory for changes and trigger reload 36 | const watcher: FSWatcher = chokidar.watch(rootDir, { 37 | ignored: /(^|[\/\\])\../, 38 | persistent: true 39 | }); 40 | 41 | watcher.on('change', (path: string, stats) => { 42 | if (watchRes && args.reload) { 43 | sendMessage(watchRes, 'message', 'reloading page'); 44 | console.log('\n \x1b[44m', 'RELOADING', '\x1b[0m ', path.replace(rootDir, '')); 45 | } 46 | }); 47 | 48 | /** 49 | * Start file watching server 50 | */ 51 | http.createServer((req: IncomingMessage, res: ServerResponse) => { 52 | // Open the event stream for live reload 53 | res.writeHead(200, { 54 | Connection: 'keep-alive', 55 | 'Content-Type': 'text/event-stream', 56 | 'Cache-Control': 'no-cache', 57 | 'Access-Control-Allow-Origin': '*' 58 | }); 59 | // Send an initial ack event to stop request pending 60 | sendMessage(res, 'connected', 'awaiting change'); 61 | // Send a ping event every minute to prevent console errors 62 | setInterval(sendMessage, 60000, res, 'ping', 'still waiting'); 63 | if (args.reload) { 64 | watchRes = res; 65 | } 66 | }).listen(reloadPort); 67 | 68 | http.createServer(async (req: IncomingMessage, res: IServerResponse) => { 69 | let pathname = url.parse(req.url || '').pathname || ''; 70 | let filePath = path.join(rootDir, pathname); 71 | const isExists = await fs.pathExists(filePath); 72 | res.projectDir = rootDir; 73 | res.pathname = pathname; 74 | if (!isExists) { 75 | if (args.fallback) { 76 | console.log('\n \x1b[44m', 'Fallback', '\x1b[0m\n'); 77 | let fileStr = await fs.readFile(path.join(rootDir, args.fallback), 'binary') 78 | return sendFile(res, pathname, 200, fileStr, 'html'); 79 | } 80 | return notFound(res, pathname, 'Not Found'); 81 | } 82 | 83 | const stat = await fs.stat(filePath); 84 | if (stat.isDirectory()) { 85 | const isIndexExists = await fs.pathExists(path.join(filePath, 'index.html')); 86 | if (!isIndexExists) { 87 | res.fileDir = filePath; 88 | return notFound(res, path.join(pathname, 'index.html')); 89 | } 90 | filePath = path.join(filePath, 'index.html'); 91 | pathname = path.join(pathname, 'index.html'); 92 | } 93 | let fileStr = await fs.readFile(filePath, 'binary'); 94 | const ext = getExt(filePath); 95 | sendFile(res, pathname, 200, ext === 'html' ? fileStr + reloadScript(reloadPort) : fileStr, ext); 96 | }).listen(port); 97 | 98 | // ---------------------------------- 99 | // Get available IP addresses 100 | // ---------------------------------- 101 | const interfaces = os.networkInterfaces(); 102 | const ips = Object.values(interfaces) 103 | .reduce((a, b) => [...a, ...b], []) 104 | .filter(ip => ip.family === 'IPv4' && ip.internal === false) 105 | .map(ip => `http://${ip.address}:${port}`); 106 | 107 | console.log(`\n 🗂 Serving files from\x1b[33;1m ./${args.dir}\x1b[0m on \x1b[32;1m http://localhost:${port} \x1b[0m`); 108 | ips.length > 0 && console.log(` 📡 Exposed to the network on \x1b[32;1m ${ips[0]}\x1b[0m`); 109 | console.log(` 🖥 Using\x1b[32;1m index.html\x1b[0m as the fallback for route requests`); 110 | console.log(` ♻️ Reloading the browser when files under\x1b[33;1m ./${args.dir}\x1b[0m change\n`); 111 | 112 | const open = process.platform == 'darwin' ? 'open' : process.platform == 'win32' ? 'start' : 'xdg-open'; 113 | args.browser && childProcess.exec(`${open} http://localhost:${port}`) 114 | 115 | } -------------------------------------------------------------------------------- /src/sgo.ts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | import minimist from 'minimist'; 4 | import server from './server'; 5 | 6 | ;(() => { 7 | const argvs = minimist(process.argv.slice(2)); 8 | const pkg = require('../package.json'); 9 | if (argvs.v || argvs.version) { 10 | console.log(` sgo v${pkg.version}`); 11 | return; 12 | } 13 | if (argvs.h || argvs.help) { 14 | console.log(' Usage: sgo [options]'); 15 | console.log(''); 16 | console.log(' Options:'); 17 | console.log(' --version Show version number [boolean]'); 18 | console.log(' --port, -p Set the port. [number] [default: 1987]'); 19 | console.log(' --reload-port Set the reload port. [number] [default: 19872]'); 20 | console.log(' --reload, -r browser from reloading when files change.'); 21 | console.log(' [boolean] [default: true]'); 22 | console.log(' --dir, -d Specified directory. [string] [default: ""]'); 23 | console.log(' --browser, -b Browser from opening when the server starts.'); 24 | console.log(' [boolean] [default: true]'); 25 | console.log(' --fallback The file served for all non-file requests.'); 26 | console.log(' [string] [default: ""]'); 27 | console.log(' --help Show help [boolean]'); 28 | console.log(' '); 29 | console.log(' Examples:'); 30 | console.log(' '); 31 | console.log(' $ sgo Start a dev server.'); 32 | console.log(' $ sgo --no-browser Prevents the browser from opening when the'); 33 | console.log(' server starts.'); 34 | console.log(' $ sgo --no-reload prevents the browser from reloading when'); 35 | console.log(' files change.'); 36 | console.log(' $ sgo --fallback dir/index.html The file served for all non-file requests..'); 37 | console.log(' $ sgo -p 2019 Designated port.'); 38 | console.log(' $ sgo -d node_modules/dir Specified directory "node_modules/dir".'); 39 | console.log(' '); 40 | console.log(' Copyright 2020'); 41 | return; 42 | } 43 | argvs.reload = argvs.reload || argvs.b || true; 44 | argvs.b = argvs.reload; 45 | argvs.browser = argvs.browser || argvs.b || true; 46 | argvs.b = argvs.browser; 47 | argvs.port = argvs.port || argvs.p || Number(process.env.PORT) || 1987; 48 | argvs.p = argvs.port; 49 | argvs.dir = argvs.dir || argvs.d || ''; 50 | argvs.d = argvs.dir; 51 | argvs.fallback = argvs.fallback || ''; 52 | argvs['reload-port'] = argvs['reload-port'] || 19872; 53 | server(argvs); 54 | 55 | })(); 56 | -------------------------------------------------------------------------------- /src/utils/404.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | <%=title%> 8 | 56 | 57 | 58 |
59 |
60 |

61 | Index of 62 | <% nav.forEach(function(item, idx) { %> 63 | <%=item.name%> 64 | <% }) %> 65 |

66 |
67 | <% if(message) { %> 68 |
<%=message%>. Back to home
69 | <% } %> 70 | 82 |
83 | 86 | 87 | -------------------------------------------------------------------------------- /src/utils/getFileDirectory.ts: -------------------------------------------------------------------------------- 1 | import fs from 'fs-extra'; 2 | import path from 'path'; 3 | import { getExt } from './'; 4 | 5 | export interface IFileDirStat { 6 | name: string; 7 | file: string; 8 | url: string; 9 | extCls?: string; 10 | size?: number; 11 | isDirectory?: boolean; 12 | isFile?: boolean; 13 | } 14 | 15 | export default async (dir: string, projectPath: string) => { 16 | const files = await fs.readdir(dir); 17 | const fileDir: IFileDirStat[] = files.map(file => ({ 18 | name: file, 19 | file: path.join(dir, file), 20 | url: path.join(dir, file).replace(projectPath, ''), 21 | })); 22 | return Promise.all(fileDir.map(async (item: IFileDirStat) => { 23 | const stat = await fs.stat(item.file); 24 | item.size = stat.size; 25 | item.extCls = ''; 26 | if (stat.isDirectory()) { 27 | item.extCls = 'dir'; 28 | item.isDirectory = true; 29 | } else if (stat.isFile()) { 30 | item.extCls = getExt(item.file); 31 | item.isFile = true; 32 | } 33 | return item; 34 | })); 35 | } -------------------------------------------------------------------------------- /src/utils/index.ts: -------------------------------------------------------------------------------- 1 | import { ServerResponse } from 'http'; 2 | import types from './types.json'; 3 | import mimeTypes from './mimeTypes'; 4 | 5 | const mime: Record = Object.entries(types).reduce( 6 | (all, [type, exts]) => Object.assign(all, [...exts].map(ext => ({ [ext]: type }))), {} 7 | ); 8 | 9 | export const isRouteRequest = (uri: string = '') => { 10 | const arr = uri.split('/').pop(); 11 | return (arr || '').indexOf('.') === -1 ? true : false 12 | } 13 | 14 | export const sendMessage = (res: ServerResponse, channel: string, data: string) => { 15 | res.write(`event: ${channel}\nid: 0\ndata: ${data}\n`); 16 | res.write("\n\n"); 17 | }; 18 | 19 | export const sendFile = (res: ServerResponse, resource: string, status: number, file: string, ext: string) => { 20 | res.writeHead(status, { 21 | "Content-Type": mimeTypes(ext), 22 | "Access-Control-Allow-Origin": "*" 23 | }); 24 | res.write(file, 'binary'); 25 | res.end(); 26 | if (status !== 404) { 27 | console.log(" \x1b[42m", status, "\x1b[0m", `${resource}`); 28 | } 29 | }; 30 | 31 | export const sendError = (res: ServerResponse, resource: string, status: number) => { 32 | res.writeHead(status); 33 | res.end(); 34 | console.log(" \x1b[41m", status, "\x1b[0m", `${resource}`); 35 | }; 36 | 37 | 38 | export const reloadScript = (reloadPort: number) => ` 39 | 45 | `; 46 | 47 | /** 48 | * Get ext 49 | * @param {String} filePath `/a/b.jpg` => `jpg` 50 | */ 51 | export const getExt = (filePath: string) => filePath.replace(/^.*[\.\/\\]/, "").toLowerCase(); 52 | 53 | 54 | export interface ISplitPath { 55 | name: string; 56 | path: string; 57 | } 58 | 59 | /** 60 | * Decompose the path to break the deep route into a level 61 | * 62 | * @param paths 63 | * @returns {String[]} 64 | * Process the data `['/exceptions/not-found/users']` into the following results 65 | * 66 | * ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ 67 | * ```js 68 | * [ 69 | * { name: 'exceptions', path: '/exceptions' }, 70 | * { name: 'not-found', path: '/exceptions/not-found'}, 71 | * { name: 'users', path: '/exceptions/not-found/users'] 72 | * } 73 | * ``` 74 | */ 75 | export function splitPath(paths: string): ISplitPath[] { 76 | let result: ISplitPath[] = []; 77 | if (paths === '/') { 78 | return result; 79 | } 80 | const arr = paths.split('/'); 81 | if (arr.length < 3) { 82 | result.push({ 83 | name: paths.replace(/^\//, ''), 84 | path: paths 85 | }); 86 | } else { 87 | let tempPath: string = ''; 88 | arr.forEach((pt: string) => { 89 | tempPath += `${pt ? '/' : ''}${pt || ''}`; 90 | if (!!tempPath && !result.find(item => item.path === tempPath)) { 91 | result.push({ 92 | name: pt, 93 | path: tempPath, 94 | }); 95 | } 96 | }); 97 | } 98 | return result; 99 | } 100 | -------------------------------------------------------------------------------- /src/utils/mimeTypes.ts: -------------------------------------------------------------------------------- 1 | import types from './types.json'; 2 | 3 | const mimes = Object.entries(types).reduce( 4 | (all, [type, exts]) => 5 | Object.assign(all, ...(exts as any[]).map((ext: string) => ({ [ext]: type }))), 6 | {} 7 | ); 8 | 9 | export default (ext: string) => mimes[ext] || 'application/octet-stream'; 10 | -------------------------------------------------------------------------------- /src/utils/notFound.ts: -------------------------------------------------------------------------------- 1 | import path from 'path'; 2 | import fs from 'fs-extra'; 3 | import ejs from 'ejs'; 4 | import { sendFile, sendError, splitPath } from './index'; 5 | import { IServerResponse } from './props'; 6 | import getFileDirectory from './getFileDirectory'; 7 | import sortDirs from './sortDirs'; 8 | 9 | 10 | export default async (res: IServerResponse, resource: string, message: string = '') => { 11 | const filename: string = path.join(__dirname, '404.ejs'); 12 | const projectName: string = path.basename(res.projectDir) 13 | let html: string = ''; 14 | const pgk = require('../../package.json'); 15 | try { 16 | let nav = [{ name: projectName, path: '/' }]; 17 | html = (await fs.readFile(filename)).toString(); 18 | if (res.fileDir && res.projectDir) { 19 | let dirs = await getFileDirectory(res.fileDir, res.projectDir); 20 | dirs = sortDirs(dirs); 21 | nav = [...nav, ...splitPath(res.pathname)]; 22 | html = ejs.render(html, { 23 | title: `Files within sgo${(nav[nav.length - 1] && nav[nav.length - 1].path) || '/'}`, 24 | nav, 25 | version: pgk.version, 26 | projectName, 27 | date: [...dirs], 28 | message, 29 | }, { filename }); 30 | } else { 31 | html = await ejs.render(html, { title: message, projectName, nav, date: [], message, version: pgk.version }, { filename }); 32 | } 33 | } catch (error) { 34 | console.log(error.message); 35 | } 36 | 37 | sendFile(res, resource, 404, html, 'html'); 38 | return sendError(res, decodeURI(resource), 404); 39 | } -------------------------------------------------------------------------------- /src/utils/props.ts: -------------------------------------------------------------------------------- 1 | import { ServerResponse } from 'http'; 2 | 3 | export interface IServerResponse extends ServerResponse { 4 | fileDir: string; 5 | projectDir: string; 6 | pathname: string; 7 | } 8 | -------------------------------------------------------------------------------- /src/utils/sortDirs.ts: -------------------------------------------------------------------------------- 1 | 2 | import { IFileDirStat } from './getFileDirectory'; 3 | 4 | interface IData { 5 | files: IFileDirStat[]; 6 | dotFiles: IFileDirStat[]; 7 | dirs: IFileDirStat[]; 8 | dotDirs: IFileDirStat[]; 9 | others: IFileDirStat[]; 10 | } 11 | 12 | export default (dirs: IFileDirStat[]) => { 13 | const data: IData = { files: [], dotFiles: [], dirs: [], dotDirs: [], others: [] }; 14 | dirs.forEach((item) => { 15 | if (item.isDirectory && /^\./.test(item.name)) { 16 | data.dotDirs.push(item); 17 | } else if (item.isDirectory) { 18 | data.dirs.push(item); 19 | } else if (item.isFile && /^\./.test(item.name)) { 20 | data.dotFiles.push(item); 21 | } else if (item.isFile && /^\./.test(item.name)) { 22 | data.files.push(item); 23 | } else { 24 | data.others.push(item) 25 | } 26 | }); 27 | const temp: IFileDirStat[] = []; 28 | data.dirs.sort((a, b) => a.name.localeCompare(b.name, undefined, { numeric: true, sensitivity: 'base' })); 29 | data.dotDirs.sort((a, b) => a.name.localeCompare(b.name, undefined, { numeric: true, sensitivity: 'base' })); 30 | data.files.sort((a, b) => a.name.localeCompare(b.name, undefined, { numeric: true, sensitivity: 'base' })); 31 | data.dotFiles.sort((a, b) => a.name.localeCompare(b.name, undefined, { numeric: true, sensitivity: 'base' })); 32 | data.others.sort((a, b) => a.name.localeCompare(b.name, undefined, { numeric: true, sensitivity: 'base' })); 33 | return temp.concat(data.dotDirs).concat(data.dirs).concat(data.dotFiles).concat(data.files).concat(data.others); 34 | } -------------------------------------------------------------------------------- /src/utils/types.json: -------------------------------------------------------------------------------- 1 | { 2 | "application/andrew-inset": [ 3 | "ez" 4 | ], 5 | "application/applixware": [ 6 | "aw" 7 | ], 8 | "application/atom+xml": [ 9 | "atom" 10 | ], 11 | "application/atomcat+xml": [ 12 | "atomcat" 13 | ], 14 | "application/atomsvc+xml": [ 15 | "atomsvc" 16 | ], 17 | "application/bdoc": [ 18 | "bdoc" 19 | ], 20 | "application/ccxml+xml": [ 21 | "ccxml" 22 | ], 23 | "application/cdmi-capability": [ 24 | "cdmia" 25 | ], 26 | "application/cdmi-container": [ 27 | "cdmic" 28 | ], 29 | "application/cdmi-domain": [ 30 | "cdmid" 31 | ], 32 | "application/cdmi-object": [ 33 | "cdmio" 34 | ], 35 | "application/cdmi-queue": [ 36 | "cdmiq" 37 | ], 38 | "application/cu-seeme": [ 39 | "cu" 40 | ], 41 | "application/dash+xml": [ 42 | "mpd" 43 | ], 44 | "application/davmount+xml": [ 45 | "davmount" 46 | ], 47 | "application/docbook+xml": [ 48 | "dbk" 49 | ], 50 | "application/dssc+der": [ 51 | "dssc" 52 | ], 53 | "application/dssc+xml": [ 54 | "xdssc" 55 | ], 56 | "application/ecmascript": [ 57 | "ecma" 58 | ], 59 | "application/emma+xml": [ 60 | "emma" 61 | ], 62 | "application/epub+zip": [ 63 | "epub" 64 | ], 65 | "application/exi": [ 66 | "exi" 67 | ], 68 | "application/font-tdpfr": [ 69 | "pfr" 70 | ], 71 | "application/font-woff": [], 72 | "application/font-woff2": [], 73 | "application/geo+json": [ 74 | "geojson" 75 | ], 76 | "application/gml+xml": [ 77 | "gml" 78 | ], 79 | "application/gpx+xml": [ 80 | "gpx" 81 | ], 82 | "application/gxf": [ 83 | "gxf" 84 | ], 85 | "application/gzip": [ 86 | "gz" 87 | ], 88 | "application/hyperstudio": [ 89 | "stk" 90 | ], 91 | "application/inkml+xml": [ 92 | "ink", 93 | "inkml" 94 | ], 95 | "application/ipfix": [ 96 | "ipfix" 97 | ], 98 | "application/java-archive": [ 99 | "jar", 100 | "war", 101 | "ear" 102 | ], 103 | "application/java-serialized-object": [ 104 | "ser" 105 | ], 106 | "application/java-vm": [ 107 | "class" 108 | ], 109 | "application/javascript": [ 110 | "js", 111 | "mjs" 112 | ], 113 | "application/json": [ 114 | "json", 115 | "map" 116 | ], 117 | "application/json5": [ 118 | "json5" 119 | ], 120 | "application/jsonml+json": [ 121 | "jsonml" 122 | ], 123 | "application/ld+json": [ 124 | "jsonld" 125 | ], 126 | "application/lost+xml": [ 127 | "lostxml" 128 | ], 129 | "application/mac-binhex40": [ 130 | "hqx" 131 | ], 132 | "application/mac-compactpro": [ 133 | "cpt" 134 | ], 135 | "application/mads+xml": [ 136 | "mads" 137 | ], 138 | "application/manifest+json": [ 139 | "webmanifest" 140 | ], 141 | "application/marc": [ 142 | "mrc" 143 | ], 144 | "application/marcxml+xml": [ 145 | "mrcx" 146 | ], 147 | "application/mathematica": [ 148 | "ma", 149 | "nb", 150 | "mb" 151 | ], 152 | "application/mathml+xml": [ 153 | "mathml" 154 | ], 155 | "application/mbox": [ 156 | "mbox" 157 | ], 158 | "application/mediaservercontrol+xml": [ 159 | "mscml" 160 | ], 161 | "application/metalink+xml": [ 162 | "metalink" 163 | ], 164 | "application/metalink4+xml": [ 165 | "meta4" 166 | ], 167 | "application/mets+xml": [ 168 | "mets" 169 | ], 170 | "application/mods+xml": [ 171 | "mods" 172 | ], 173 | "application/mp21": [ 174 | "m21", 175 | "mp21" 176 | ], 177 | "application/mp4": [ 178 | "mp4s", 179 | "m4p" 180 | ], 181 | "application/msword": [ 182 | "doc", 183 | "dot" 184 | ], 185 | "application/mxf": [ 186 | "mxf" 187 | ], 188 | "application/octet-stream": [ 189 | "bin", 190 | "dms", 191 | "lrf", 192 | "mar", 193 | "so", 194 | "dist", 195 | "distz", 196 | "pkg", 197 | "bpk", 198 | "dump", 199 | "elc", 200 | "deploy", 201 | "exe", 202 | "dll", 203 | "deb", 204 | "dmg", 205 | "iso", 206 | "img", 207 | "msi", 208 | "msp", 209 | "msm", 210 | "buffer" 211 | ], 212 | "application/oda": [ 213 | "oda" 214 | ], 215 | "application/oebps-package+xml": [ 216 | "opf" 217 | ], 218 | "application/ogg": [ 219 | "ogx" 220 | ], 221 | "application/omdoc+xml": [ 222 | "omdoc" 223 | ], 224 | "application/onenote": [ 225 | "onetoc", 226 | "onetoc2", 227 | "onetmp", 228 | "onepkg" 229 | ], 230 | "application/oxps": [ 231 | "oxps" 232 | ], 233 | "application/patch-ops-error+xml": [ 234 | "xer" 235 | ], 236 | "application/pdf": [ 237 | "pdf" 238 | ], 239 | "application/pgp-encrypted": [ 240 | "pgp" 241 | ], 242 | "application/pgp-signature": [ 243 | "asc", 244 | "sig" 245 | ], 246 | "application/pics-rules": [ 247 | "prf" 248 | ], 249 | "application/pkcs10": [ 250 | "p10" 251 | ], 252 | "application/pkcs7-mime": [ 253 | "p7m", 254 | "p7c" 255 | ], 256 | "application/pkcs7-signature": [ 257 | "p7s" 258 | ], 259 | "application/pkcs8": [ 260 | "p8" 261 | ], 262 | "application/pkix-attr-cert": [ 263 | "ac" 264 | ], 265 | "application/pkix-cert": [ 266 | "cer" 267 | ], 268 | "application/pkix-crl": [ 269 | "crl" 270 | ], 271 | "application/pkix-pkipath": [ 272 | "pkipath" 273 | ], 274 | "application/pkixcmp": [ 275 | "pki" 276 | ], 277 | "application/pls+xml": [ 278 | "pls" 279 | ], 280 | "application/postscript": [ 281 | "ai", 282 | "eps", 283 | "ps" 284 | ], 285 | "application/prs.cww": [ 286 | "cww" 287 | ], 288 | "application/pskc+xml": [ 289 | "pskcxml" 290 | ], 291 | "application/raml+yaml": [ 292 | "raml" 293 | ], 294 | "application/rdf+xml": [ 295 | "rdf" 296 | ], 297 | "application/reginfo+xml": [ 298 | "rif" 299 | ], 300 | "application/relax-ng-compact-syntax": [ 301 | "rnc" 302 | ], 303 | "application/resource-lists+xml": [ 304 | "rl" 305 | ], 306 | "application/resource-lists-diff+xml": [ 307 | "rld" 308 | ], 309 | "application/rls-services+xml": [ 310 | "rs" 311 | ], 312 | "application/rpki-ghostbusters": [ 313 | "gbr" 314 | ], 315 | "application/rpki-manifest": [ 316 | "mft" 317 | ], 318 | "application/rpki-roa": [ 319 | "roa" 320 | ], 321 | "application/rsd+xml": [ 322 | "rsd" 323 | ], 324 | "application/rss+xml": [ 325 | "rss" 326 | ], 327 | "application/rtf": [ 328 | "rtf" 329 | ], 330 | "application/sbml+xml": [ 331 | "sbml" 332 | ], 333 | "application/scvp-cv-request": [ 334 | "scq" 335 | ], 336 | "application/scvp-cv-response": [ 337 | "scs" 338 | ], 339 | "application/scvp-vp-request": [ 340 | "spq" 341 | ], 342 | "application/scvp-vp-response": [ 343 | "spp" 344 | ], 345 | "application/sdp": [ 346 | "sdp" 347 | ], 348 | "application/set-payment-initiation": [ 349 | "setpay" 350 | ], 351 | "application/set-registration-initiation": [ 352 | "setreg" 353 | ], 354 | "application/shf+xml": [ 355 | "shf" 356 | ], 357 | "application/smil+xml": [ 358 | "smi", 359 | "smil" 360 | ], 361 | "application/sparql-query": [ 362 | "rq" 363 | ], 364 | "application/sparql-results+xml": [ 365 | "srx" 366 | ], 367 | "application/srgs": [ 368 | "gram" 369 | ], 370 | "application/srgs+xml": [ 371 | "grxml" 372 | ], 373 | "application/sru+xml": [ 374 | "sru" 375 | ], 376 | "application/ssdl+xml": [ 377 | "ssdl" 378 | ], 379 | "application/ssml+xml": [ 380 | "ssml" 381 | ], 382 | "application/tei+xml": [ 383 | "tei", 384 | "teicorpus" 385 | ], 386 | "application/thraud+xml": [ 387 | "tfi" 388 | ], 389 | "application/timestamped-data": [ 390 | "tsd" 391 | ], 392 | "application/vnd.3gpp.pic-bw-large": [ 393 | "plb" 394 | ], 395 | "application/vnd.3gpp.pic-bw-small": [ 396 | "psb" 397 | ], 398 | "application/vnd.3gpp.pic-bw-var": [ 399 | "pvb" 400 | ], 401 | "application/vnd.3gpp2.tcap": [ 402 | "tcap" 403 | ], 404 | "application/vnd.3m.post-it-notes": [ 405 | "pwn" 406 | ], 407 | "application/vnd.accpac.simply.aso": [ 408 | "aso" 409 | ], 410 | "application/vnd.accpac.simply.imp": [ 411 | "imp" 412 | ], 413 | "application/vnd.acucobol": [ 414 | "acu" 415 | ], 416 | "application/vnd.acucorp": [ 417 | "atc", 418 | "acutc" 419 | ], 420 | "application/vnd.adobe.air-application-installer-package+zip": [ 421 | "air" 422 | ], 423 | "application/vnd.adobe.formscentral.fcdt": [ 424 | "fcdt" 425 | ], 426 | "application/vnd.adobe.fxp": [ 427 | "fxp", 428 | "fxpl" 429 | ], 430 | "application/vnd.adobe.xdp+xml": [ 431 | "xdp" 432 | ], 433 | "application/vnd.adobe.xfdf": [ 434 | "xfdf" 435 | ], 436 | "application/vnd.ahead.space": [ 437 | "ahead" 438 | ], 439 | "application/vnd.airzip.filesecure.azf": [ 440 | "azf" 441 | ], 442 | "application/vnd.airzip.filesecure.azs": [ 443 | "azs" 444 | ], 445 | "application/vnd.amazon.ebook": [ 446 | "azw" 447 | ], 448 | "application/vnd.americandynamics.acc": [ 449 | "acc" 450 | ], 451 | "application/vnd.amiga.ami": [ 452 | "ami" 453 | ], 454 | "application/vnd.android.package-archive": [ 455 | "apk" 456 | ], 457 | "application/vnd.anser-web-certificate-issue-initiation": [ 458 | "cii" 459 | ], 460 | "application/vnd.anser-web-funds-transfer-initiation": [ 461 | "fti" 462 | ], 463 | "application/vnd.antix.game-component": [ 464 | "atx" 465 | ], 466 | "application/vnd.apple.installer+xml": [ 467 | "mpkg" 468 | ], 469 | "application/vnd.apple.mpegurl": [ 470 | "m3u8" 471 | ], 472 | "application/vnd.apple.pkpass": [ 473 | "pkpass" 474 | ], 475 | "application/vnd.aristanetworks.swi": [ 476 | "swi" 477 | ], 478 | "application/vnd.astraea-software.iota": [ 479 | "iota" 480 | ], 481 | "application/vnd.audiograph": [ 482 | "aep" 483 | ], 484 | "application/vnd.blueice.multipass": [ 485 | "mpm" 486 | ], 487 | "application/vnd.bmi": [ 488 | "bmi" 489 | ], 490 | "application/vnd.businessobjects": [ 491 | "rep" 492 | ], 493 | "application/vnd.chemdraw+xml": [ 494 | "cdxml" 495 | ], 496 | "application/vnd.chipnuts.karaoke-mmd": [ 497 | "mmd" 498 | ], 499 | "application/vnd.cinderella": [ 500 | "cdy" 501 | ], 502 | "application/vnd.claymore": [ 503 | "cla" 504 | ], 505 | "application/vnd.cloanto.rp9": [ 506 | "rp9" 507 | ], 508 | "application/vnd.clonk.c4group": [ 509 | "c4g", 510 | "c4d", 511 | "c4f", 512 | "c4p", 513 | "c4u" 514 | ], 515 | "application/vnd.cluetrust.cartomobile-config": [ 516 | "c11amc" 517 | ], 518 | "application/vnd.cluetrust.cartomobile-config-pkg": [ 519 | "c11amz" 520 | ], 521 | "application/vnd.commonspace": [ 522 | "csp" 523 | ], 524 | "application/vnd.contact.cmsg": [ 525 | "cdbcmsg" 526 | ], 527 | "application/vnd.cosmocaller": [ 528 | "cmc" 529 | ], 530 | "application/vnd.crick.clicker": [ 531 | "clkx" 532 | ], 533 | "application/vnd.crick.clicker.keyboard": [ 534 | "clkk" 535 | ], 536 | "application/vnd.crick.clicker.palette": [ 537 | "clkp" 538 | ], 539 | "application/vnd.crick.clicker.template": [ 540 | "clkt" 541 | ], 542 | "application/vnd.crick.clicker.wordbank": [ 543 | "clkw" 544 | ], 545 | "application/vnd.criticaltools.wbs+xml": [ 546 | "wbs" 547 | ], 548 | "application/vnd.ctc-posml": [ 549 | "pml" 550 | ], 551 | "application/vnd.cups-ppd": [ 552 | "ppd" 553 | ], 554 | "application/vnd.curl.car": [ 555 | "car" 556 | ], 557 | "application/vnd.curl.pcurl": [ 558 | "pcurl" 559 | ], 560 | "application/vnd.dart": [ 561 | "dart" 562 | ], 563 | "application/vnd.data-vision.rdz": [ 564 | "rdz" 565 | ], 566 | "application/vnd.dece.data": [ 567 | "uvf", 568 | "uvvf", 569 | "uvd", 570 | "uvvd" 571 | ], 572 | "application/vnd.dece.ttml+xml": [ 573 | "uvt", 574 | "uvvt" 575 | ], 576 | "application/vnd.dece.unspecified": [ 577 | "uvx", 578 | "uvvx" 579 | ], 580 | "application/vnd.dece.zip": [ 581 | "uvz", 582 | "uvvz" 583 | ], 584 | "application/vnd.denovo.fcselayout-link": [ 585 | "fe_launch" 586 | ], 587 | "application/vnd.dna": [ 588 | "dna" 589 | ], 590 | "application/vnd.dolby.mlp": [ 591 | "mlp" 592 | ], 593 | "application/vnd.dpgraph": [ 594 | "dpg" 595 | ], 596 | "application/vnd.dreamfactory": [ 597 | "dfac" 598 | ], 599 | "application/vnd.ds-keypoint": [ 600 | "kpxx" 601 | ], 602 | "application/vnd.dvb.ait": [ 603 | "ait" 604 | ], 605 | "application/vnd.dvb.service": [ 606 | "svc" 607 | ], 608 | "application/vnd.dynageo": [ 609 | "geo" 610 | ], 611 | "application/vnd.ecowin.chart": [ 612 | "mag" 613 | ], 614 | "application/vnd.enliven": [ 615 | "nml" 616 | ], 617 | "application/vnd.epson.esf": [ 618 | "esf" 619 | ], 620 | "application/vnd.epson.msf": [ 621 | "msf" 622 | ], 623 | "application/vnd.epson.quickanime": [ 624 | "qam" 625 | ], 626 | "application/vnd.epson.salt": [ 627 | "slt" 628 | ], 629 | "application/vnd.epson.ssf": [ 630 | "ssf" 631 | ], 632 | "application/vnd.eszigno3+xml": [ 633 | "es3", 634 | "et3" 635 | ], 636 | "application/vnd.ezpix-album": [ 637 | "ez2" 638 | ], 639 | "application/vnd.ezpix-package": [ 640 | "ez3" 641 | ], 642 | "application/vnd.fdf": [ 643 | "fdf" 644 | ], 645 | "application/vnd.fdsn.mseed": [ 646 | "mseed" 647 | ], 648 | "application/vnd.fdsn.seed": [ 649 | "seed", 650 | "dataless" 651 | ], 652 | "application/vnd.flographit": [ 653 | "gph" 654 | ], 655 | "application/vnd.fluxtime.clip": [ 656 | "ftc" 657 | ], 658 | "application/vnd.framemaker": [ 659 | "fm", 660 | "frame", 661 | "maker", 662 | "book" 663 | ], 664 | "application/vnd.frogans.fnc": [ 665 | "fnc" 666 | ], 667 | "application/vnd.frogans.ltf": [ 668 | "ltf" 669 | ], 670 | "application/vnd.fsc.weblaunch": [ 671 | "fsc" 672 | ], 673 | "application/vnd.fujitsu.oasys": [ 674 | "oas" 675 | ], 676 | "application/vnd.fujitsu.oasys2": [ 677 | "oa2" 678 | ], 679 | "application/vnd.fujitsu.oasys3": [ 680 | "oa3" 681 | ], 682 | "application/vnd.fujitsu.oasysgp": [ 683 | "fg5" 684 | ], 685 | "application/vnd.fujitsu.oasysprs": [ 686 | "bh2" 687 | ], 688 | "application/vnd.fujixerox.ddd": [ 689 | "ddd" 690 | ], 691 | "application/vnd.fujixerox.docuworks": [ 692 | "xdw" 693 | ], 694 | "application/vnd.fujixerox.docuworks.binder": [ 695 | "xbd" 696 | ], 697 | "application/vnd.fuzzysheet": [ 698 | "fzs" 699 | ], 700 | "application/vnd.genomatix.tuxedo": [ 701 | "txd" 702 | ], 703 | "application/vnd.geogebra.file": [ 704 | "ggb" 705 | ], 706 | "application/vnd.geogebra.tool": [ 707 | "ggt" 708 | ], 709 | "application/vnd.geometry-explorer": [ 710 | "gex", 711 | "gre" 712 | ], 713 | "application/vnd.geonext": [ 714 | "gxt" 715 | ], 716 | "application/vnd.geoplan": [ 717 | "g2w" 718 | ], 719 | "application/vnd.geospace": [ 720 | "g3w" 721 | ], 722 | "application/vnd.gmx": [ 723 | "gmx" 724 | ], 725 | "application/vnd.google-apps.document": [ 726 | "gdoc" 727 | ], 728 | "application/vnd.google-apps.presentation": [ 729 | "gslides" 730 | ], 731 | "application/vnd.google-apps.spreadsheet": [ 732 | "gsheet" 733 | ], 734 | "application/vnd.google-earth.kml+xml": [ 735 | "kml" 736 | ], 737 | "application/vnd.google-earth.kmz": [ 738 | "kmz" 739 | ], 740 | "application/vnd.grafeq": [ 741 | "gqf", 742 | "gqs" 743 | ], 744 | "application/vnd.groove-account": [ 745 | "gac" 746 | ], 747 | "application/vnd.groove-help": [ 748 | "ghf" 749 | ], 750 | "application/vnd.groove-identity-message": [ 751 | "gim" 752 | ], 753 | "application/vnd.groove-injector": [ 754 | "grv" 755 | ], 756 | "application/vnd.groove-tool-message": [ 757 | "gtm" 758 | ], 759 | "application/vnd.groove-tool-template": [ 760 | "tpl" 761 | ], 762 | "application/vnd.groove-vcard": [ 763 | "vcg" 764 | ], 765 | "application/vnd.hal+xml": [ 766 | "hal" 767 | ], 768 | "application/vnd.handheld-entertainment+xml": [ 769 | "zmm" 770 | ], 771 | "application/vnd.hbci": [ 772 | "hbci" 773 | ], 774 | "application/vnd.hhe.lesson-player": [ 775 | "les" 776 | ], 777 | "application/vnd.hp-hpgl": [ 778 | "hpgl" 779 | ], 780 | "application/vnd.hp-hpid": [ 781 | "hpid" 782 | ], 783 | "application/vnd.hp-hps": [ 784 | "hps" 785 | ], 786 | "application/vnd.hp-jlyt": [ 787 | "jlt" 788 | ], 789 | "application/vnd.hp-pcl": [ 790 | "pcl" 791 | ], 792 | "application/vnd.hp-pclxl": [ 793 | "pclxl" 794 | ], 795 | "application/vnd.hydrostatix.sof-data": [ 796 | "sfd-hdstx" 797 | ], 798 | "application/vnd.ibm.minipay": [ 799 | "mpy" 800 | ], 801 | "application/vnd.ibm.modcap": [ 802 | "afp", 803 | "listafp", 804 | "list3820" 805 | ], 806 | "application/vnd.ibm.rights-management": [ 807 | "irm" 808 | ], 809 | "application/vnd.ibm.secure-container": [ 810 | "sc" 811 | ], 812 | "application/vnd.iccprofile": [ 813 | "icc", 814 | "icm" 815 | ], 816 | "application/vnd.igloader": [ 817 | "igl" 818 | ], 819 | "application/vnd.immervision-ivp": [ 820 | "ivp" 821 | ], 822 | "application/vnd.immervision-ivu": [ 823 | "ivu" 824 | ], 825 | "application/vnd.insors.igm": [ 826 | "igm" 827 | ], 828 | "application/vnd.intercon.formnet": [ 829 | "xpw", 830 | "xpx" 831 | ], 832 | "application/vnd.intergeo": [ 833 | "i2g" 834 | ], 835 | "application/vnd.intu.qbo": [ 836 | "qbo" 837 | ], 838 | "application/vnd.intu.qfx": [ 839 | "qfx" 840 | ], 841 | "application/vnd.ipunplugged.rcprofile": [ 842 | "rcprofile" 843 | ], 844 | "application/vnd.irepository.package+xml": [ 845 | "irp" 846 | ], 847 | "application/vnd.is-xpr": [ 848 | "xpr" 849 | ], 850 | "application/vnd.isac.fcs": [ 851 | "fcs" 852 | ], 853 | "application/vnd.jam": [ 854 | "jam" 855 | ], 856 | "application/vnd.jcp.javame.midlet-rms": [ 857 | "rms" 858 | ], 859 | "application/vnd.jisp": [ 860 | "jisp" 861 | ], 862 | "application/vnd.joost.joda-archive": [ 863 | "joda" 864 | ], 865 | "application/vnd.kahootz": [ 866 | "ktz", 867 | "ktr" 868 | ], 869 | "application/vnd.kde.karbon": [ 870 | "karbon" 871 | ], 872 | "application/vnd.kde.kchart": [ 873 | "chrt" 874 | ], 875 | "application/vnd.kde.kformula": [ 876 | "kfo" 877 | ], 878 | "application/vnd.kde.kivio": [ 879 | "flw" 880 | ], 881 | "application/vnd.kde.kontour": [ 882 | "kon" 883 | ], 884 | "application/vnd.kde.kpresenter": [ 885 | "kpr", 886 | "kpt" 887 | ], 888 | "application/vnd.kde.kspread": [ 889 | "ksp" 890 | ], 891 | "application/vnd.kde.kword": [ 892 | "kwd", 893 | "kwt" 894 | ], 895 | "application/vnd.kenameaapp": [ 896 | "htke" 897 | ], 898 | "application/vnd.kidspiration": [ 899 | "kia" 900 | ], 901 | "application/vnd.kinar": [ 902 | "kne", 903 | "knp" 904 | ], 905 | "application/vnd.koan": [ 906 | "skp", 907 | "skd", 908 | "skt", 909 | "skm" 910 | ], 911 | "application/vnd.kodak-descriptor": [ 912 | "sse" 913 | ], 914 | "application/vnd.las.las+xml": [ 915 | "lasxml" 916 | ], 917 | "application/vnd.llamagraphics.life-balance.desktop": [ 918 | "lbd" 919 | ], 920 | "application/vnd.llamagraphics.life-balance.exchange+xml": [ 921 | "lbe" 922 | ], 923 | "application/vnd.lotus-1-2-3": [ 924 | "123" 925 | ], 926 | "application/vnd.lotus-approach": [ 927 | "apr" 928 | ], 929 | "application/vnd.lotus-freelance": [ 930 | "pre" 931 | ], 932 | "application/vnd.lotus-notes": [ 933 | "nsf" 934 | ], 935 | "application/vnd.lotus-organizer": [ 936 | "org" 937 | ], 938 | "application/vnd.lotus-screencam": [ 939 | "scm" 940 | ], 941 | "application/vnd.lotus-wordpro": [ 942 | "lwp" 943 | ], 944 | "application/vnd.macports.portpkg": [ 945 | "portpkg" 946 | ], 947 | "application/vnd.mcd": [ 948 | "mcd" 949 | ], 950 | "application/vnd.medcalcdata": [ 951 | "mc1" 952 | ], 953 | "application/vnd.mediastation.cdkey": [ 954 | "cdkey" 955 | ], 956 | "application/vnd.mfer": [ 957 | "mwf" 958 | ], 959 | "application/vnd.mfmp": [ 960 | "mfm" 961 | ], 962 | "application/vnd.micrografx.flo": [ 963 | "flo" 964 | ], 965 | "application/vnd.micrografx.igx": [ 966 | "igx" 967 | ], 968 | "application/vnd.mif": [ 969 | "mif" 970 | ], 971 | "application/vnd.mobius.daf": [ 972 | "daf" 973 | ], 974 | "application/vnd.mobius.dis": [ 975 | "dis" 976 | ], 977 | "application/vnd.mobius.mbk": [ 978 | "mbk" 979 | ], 980 | "application/vnd.mobius.mqy": [ 981 | "mqy" 982 | ], 983 | "application/vnd.mobius.msl": [ 984 | "msl" 985 | ], 986 | "application/vnd.mobius.plc": [ 987 | "plc" 988 | ], 989 | "application/vnd.mobius.txf": [ 990 | "txf" 991 | ], 992 | "application/vnd.mophun.application": [ 993 | "mpn" 994 | ], 995 | "application/vnd.mophun.certificate": [ 996 | "mpc" 997 | ], 998 | "application/vnd.mozilla.xul+xml": [ 999 | "xul" 1000 | ], 1001 | "application/vnd.ms-artgalry": [ 1002 | "cil" 1003 | ], 1004 | "application/vnd.ms-cab-compressed": [ 1005 | "cab" 1006 | ], 1007 | "application/vnd.ms-excel": [ 1008 | "xls", 1009 | "xlm", 1010 | "xla", 1011 | "xlc", 1012 | "xlt", 1013 | "xlw" 1014 | ], 1015 | "application/vnd.ms-excel.addin.macroenabled.12": [ 1016 | "xlam" 1017 | ], 1018 | "application/vnd.ms-excel.sheet.binary.macroenabled.12": [ 1019 | "xlsb" 1020 | ], 1021 | "application/vnd.ms-excel.sheet.macroenabled.12": [ 1022 | "xlsm" 1023 | ], 1024 | "application/vnd.ms-excel.template.macroenabled.12": [ 1025 | "xltm" 1026 | ], 1027 | "application/vnd.ms-fontobject": [ 1028 | "eot" 1029 | ], 1030 | "application/vnd.ms-htmlhelp": [ 1031 | "chm" 1032 | ], 1033 | "application/vnd.ms-ims": [ 1034 | "ims" 1035 | ], 1036 | "application/vnd.ms-lrm": [ 1037 | "lrm" 1038 | ], 1039 | "application/vnd.ms-officetheme": [ 1040 | "thmx" 1041 | ], 1042 | "application/vnd.ms-outlook": [ 1043 | "msg" 1044 | ], 1045 | "application/vnd.ms-pki.seccat": [ 1046 | "cat" 1047 | ], 1048 | "application/vnd.ms-pki.stl": [ 1049 | "stl" 1050 | ], 1051 | "application/vnd.ms-powerpoint": [ 1052 | "ppt", 1053 | "pps", 1054 | "pot" 1055 | ], 1056 | "application/vnd.ms-powerpoint.addin.macroenabled.12": [ 1057 | "ppam" 1058 | ], 1059 | "application/vnd.ms-powerpoint.presentation.macroenabled.12": [ 1060 | "pptm" 1061 | ], 1062 | "application/vnd.ms-powerpoint.slide.macroenabled.12": [ 1063 | "sldm" 1064 | ], 1065 | "application/vnd.ms-powerpoint.slideshow.macroenabled.12": [ 1066 | "ppsm" 1067 | ], 1068 | "application/vnd.ms-powerpoint.template.macroenabled.12": [ 1069 | "potm" 1070 | ], 1071 | "application/vnd.ms-project": [ 1072 | "mpp", 1073 | "mpt" 1074 | ], 1075 | "application/vnd.ms-word.document.macroenabled.12": [ 1076 | "docm" 1077 | ], 1078 | "application/vnd.ms-word.template.macroenabled.12": [ 1079 | "dotm" 1080 | ], 1081 | "application/vnd.ms-works": [ 1082 | "wps", 1083 | "wks", 1084 | "wcm", 1085 | "wdb" 1086 | ], 1087 | "application/vnd.ms-wpl": [ 1088 | "wpl" 1089 | ], 1090 | "application/vnd.ms-xpsdocument": [ 1091 | "xps" 1092 | ], 1093 | "application/vnd.mseq": [ 1094 | "mseq" 1095 | ], 1096 | "application/vnd.musician": [ 1097 | "mus" 1098 | ], 1099 | "application/vnd.muvee.style": [ 1100 | "msty" 1101 | ], 1102 | "application/vnd.mynfc": [ 1103 | "taglet" 1104 | ], 1105 | "application/vnd.neurolanguage.nlu": [ 1106 | "nlu" 1107 | ], 1108 | "application/vnd.nitf": [ 1109 | "ntf", 1110 | "nitf" 1111 | ], 1112 | "application/vnd.noblenet-directory": [ 1113 | "nnd" 1114 | ], 1115 | "application/vnd.noblenet-sealer": [ 1116 | "nns" 1117 | ], 1118 | "application/vnd.noblenet-web": [ 1119 | "nnw" 1120 | ], 1121 | "application/vnd.nokia.n-gage.data": [ 1122 | "ngdat" 1123 | ], 1124 | "application/vnd.nokia.n-gage.symbian.install": [ 1125 | "n-gage" 1126 | ], 1127 | "application/vnd.nokia.radio-preset": [ 1128 | "rpst" 1129 | ], 1130 | "application/vnd.nokia.radio-presets": [ 1131 | "rpss" 1132 | ], 1133 | "application/vnd.novadigm.edm": [ 1134 | "edm" 1135 | ], 1136 | "application/vnd.novadigm.edx": [ 1137 | "edx" 1138 | ], 1139 | "application/vnd.novadigm.ext": [ 1140 | "ext" 1141 | ], 1142 | "application/vnd.oasis.opendocument.chart": [ 1143 | "odc" 1144 | ], 1145 | "application/vnd.oasis.opendocument.chart-template": [ 1146 | "otc" 1147 | ], 1148 | "application/vnd.oasis.opendocument.database": [ 1149 | "odb" 1150 | ], 1151 | "application/vnd.oasis.opendocument.formula": [ 1152 | "odf" 1153 | ], 1154 | "application/vnd.oasis.opendocument.formula-template": [ 1155 | "odft" 1156 | ], 1157 | "application/vnd.oasis.opendocument.graphics": [ 1158 | "odg" 1159 | ], 1160 | "application/vnd.oasis.opendocument.graphics-template": [ 1161 | "otg" 1162 | ], 1163 | "application/vnd.oasis.opendocument.image": [ 1164 | "odi" 1165 | ], 1166 | "application/vnd.oasis.opendocument.image-template": [ 1167 | "oti" 1168 | ], 1169 | "application/vnd.oasis.opendocument.presentation": [ 1170 | "odp" 1171 | ], 1172 | "application/vnd.oasis.opendocument.presentation-template": [ 1173 | "otp" 1174 | ], 1175 | "application/vnd.oasis.opendocument.spreadsheet": [ 1176 | "ods" 1177 | ], 1178 | "application/vnd.oasis.opendocument.spreadsheet-template": [ 1179 | "ots" 1180 | ], 1181 | "application/vnd.oasis.opendocument.text": [ 1182 | "odt" 1183 | ], 1184 | "application/vnd.oasis.opendocument.text-master": [ 1185 | "odm" 1186 | ], 1187 | "application/vnd.oasis.opendocument.text-template": [ 1188 | "ott" 1189 | ], 1190 | "application/vnd.oasis.opendocument.text-web": [ 1191 | "oth" 1192 | ], 1193 | "application/vnd.olpc-sugar": [ 1194 | "xo" 1195 | ], 1196 | "application/vnd.oma.dd2+xml": [ 1197 | "dd2" 1198 | ], 1199 | "application/vnd.openofficeorg.extension": [ 1200 | "oxt" 1201 | ], 1202 | "application/vnd.openxmlformats-officedocument.presentationml.presentation": [ 1203 | "pptx" 1204 | ], 1205 | "application/vnd.openxmlformats-officedocument.presentationml.slide": [ 1206 | "sldx" 1207 | ], 1208 | "application/vnd.openxmlformats-officedocument.presentationml.slideshow": [ 1209 | "ppsx" 1210 | ], 1211 | "application/vnd.openxmlformats-officedocument.presentationml.template": [ 1212 | "potx" 1213 | ], 1214 | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": [ 1215 | "xlsx" 1216 | ], 1217 | "application/vnd.openxmlformats-officedocument.spreadsheetml.template": [ 1218 | "xltx" 1219 | ], 1220 | "application/vnd.openxmlformats-officedocument.wordprocessingml.document": [ 1221 | "docx" 1222 | ], 1223 | "application/vnd.openxmlformats-officedocument.wordprocessingml.template": [ 1224 | "dotx" 1225 | ], 1226 | "application/vnd.osgeo.mapguide.package": [ 1227 | "mgp" 1228 | ], 1229 | "application/vnd.osgi.dp": [ 1230 | "dp" 1231 | ], 1232 | "application/vnd.osgi.subsystem": [ 1233 | "esa" 1234 | ], 1235 | "application/vnd.palm": [ 1236 | "pdb", 1237 | "pqa", 1238 | "oprc" 1239 | ], 1240 | "application/vnd.pawaafile": [ 1241 | "paw" 1242 | ], 1243 | "application/vnd.pg.format": [ 1244 | "str" 1245 | ], 1246 | "application/vnd.pg.osasli": [ 1247 | "ei6" 1248 | ], 1249 | "application/vnd.picsel": [ 1250 | "efif" 1251 | ], 1252 | "application/vnd.pmi.widget": [ 1253 | "wg" 1254 | ], 1255 | "application/vnd.pocketlearn": [ 1256 | "plf" 1257 | ], 1258 | "application/vnd.powerbuilder6": [ 1259 | "pbd" 1260 | ], 1261 | "application/vnd.previewsystems.box": [ 1262 | "box" 1263 | ], 1264 | "application/vnd.proteus.magazine": [ 1265 | "mgz" 1266 | ], 1267 | "application/vnd.publishare-delta-tree": [ 1268 | "qps" 1269 | ], 1270 | "application/vnd.pvi.ptid1": [ 1271 | "ptid" 1272 | ], 1273 | "application/vnd.quark.quarkxpress": [ 1274 | "qxd", 1275 | "qxt", 1276 | "qwd", 1277 | "qwt", 1278 | "qxl", 1279 | "qxb" 1280 | ], 1281 | "application/vnd.realvnc.bed": [ 1282 | "bed" 1283 | ], 1284 | "application/vnd.recordare.musicxml": [ 1285 | "mxl" 1286 | ], 1287 | "application/vnd.recordare.musicxml+xml": [ 1288 | "musicxml" 1289 | ], 1290 | "application/vnd.rig.cryptonote": [ 1291 | "cryptonote" 1292 | ], 1293 | "application/vnd.rim.cod": [ 1294 | "cod" 1295 | ], 1296 | "application/vnd.rn-realmedia": [ 1297 | "rm" 1298 | ], 1299 | "application/vnd.rn-realmedia-vbr": [ 1300 | "rmvb" 1301 | ], 1302 | "application/vnd.route66.link66+xml": [ 1303 | "link66" 1304 | ], 1305 | "application/vnd.sailingtracker.track": [ 1306 | "st" 1307 | ], 1308 | "application/vnd.seemail": [ 1309 | "see" 1310 | ], 1311 | "application/vnd.sema": [ 1312 | "sema" 1313 | ], 1314 | "application/vnd.semd": [ 1315 | "semd" 1316 | ], 1317 | "application/vnd.semf": [ 1318 | "semf" 1319 | ], 1320 | "application/vnd.shana.informed.formdata": [ 1321 | "ifm" 1322 | ], 1323 | "application/vnd.shana.informed.formtemplate": [ 1324 | "itp" 1325 | ], 1326 | "application/vnd.shana.informed.interchange": [ 1327 | "iif" 1328 | ], 1329 | "application/vnd.shana.informed.package": [ 1330 | "ipk" 1331 | ], 1332 | "application/vnd.simtech-mindmapper": [ 1333 | "twd", 1334 | "twds" 1335 | ], 1336 | "application/vnd.smaf": [ 1337 | "mmf" 1338 | ], 1339 | "application/vnd.smart.teacher": [ 1340 | "teacher" 1341 | ], 1342 | "application/vnd.solent.sdkm+xml": [ 1343 | "sdkm", 1344 | "sdkd" 1345 | ], 1346 | "application/vnd.spotfire.dxp": [ 1347 | "dxp" 1348 | ], 1349 | "application/vnd.spotfire.sfs": [ 1350 | "sfs" 1351 | ], 1352 | "application/vnd.stardivision.calc": [ 1353 | "sdc" 1354 | ], 1355 | "application/vnd.stardivision.draw": [ 1356 | "sda" 1357 | ], 1358 | "application/vnd.stardivision.impress": [ 1359 | "sdd" 1360 | ], 1361 | "application/vnd.stardivision.math": [ 1362 | "smf" 1363 | ], 1364 | "application/vnd.stardivision.writer": [ 1365 | "sdw", 1366 | "vor" 1367 | ], 1368 | "application/vnd.stardivision.writer-global": [ 1369 | "sgl" 1370 | ], 1371 | "application/vnd.stepmania.package": [ 1372 | "smzip" 1373 | ], 1374 | "application/vnd.stepmania.stepchart": [ 1375 | "sm" 1376 | ], 1377 | "application/vnd.sun.wadl+xml": [ 1378 | "wadl" 1379 | ], 1380 | "application/vnd.sun.xml.calc": [ 1381 | "sxc" 1382 | ], 1383 | "application/vnd.sun.xml.calc.template": [ 1384 | "stc" 1385 | ], 1386 | "application/vnd.sun.xml.draw": [ 1387 | "sxd" 1388 | ], 1389 | "application/vnd.sun.xml.draw.template": [ 1390 | "std" 1391 | ], 1392 | "application/vnd.sun.xml.impress": [ 1393 | "sxi" 1394 | ], 1395 | "application/vnd.sun.xml.impress.template": [ 1396 | "sti" 1397 | ], 1398 | "application/vnd.sun.xml.math": [ 1399 | "sxm" 1400 | ], 1401 | "application/vnd.sun.xml.writer": [ 1402 | "sxw" 1403 | ], 1404 | "application/vnd.sun.xml.writer.global": [ 1405 | "sxg" 1406 | ], 1407 | "application/vnd.sun.xml.writer.template": [ 1408 | "stw" 1409 | ], 1410 | "application/vnd.sus-calendar": [ 1411 | "sus", 1412 | "susp" 1413 | ], 1414 | "application/vnd.svd": [ 1415 | "svd" 1416 | ], 1417 | "application/vnd.symbian.install": [ 1418 | "sis", 1419 | "sisx" 1420 | ], 1421 | "application/vnd.syncml+xml": [ 1422 | "xsm" 1423 | ], 1424 | "application/vnd.syncml.dm+wbxml": [ 1425 | "bdm" 1426 | ], 1427 | "application/vnd.syncml.dm+xml": [ 1428 | "xdm" 1429 | ], 1430 | "application/vnd.tao.intent-module-archive": [ 1431 | "tao" 1432 | ], 1433 | "application/vnd.tcpdump.pcap": [ 1434 | "pcap", 1435 | "cap", 1436 | "dmp" 1437 | ], 1438 | "application/vnd.tmobile-livetv": [ 1439 | "tmo" 1440 | ], 1441 | "application/vnd.trid.tpt": [ 1442 | "tpt" 1443 | ], 1444 | "application/vnd.triscape.mxs": [ 1445 | "mxs" 1446 | ], 1447 | "application/vnd.trueapp": [ 1448 | "tra" 1449 | ], 1450 | "application/vnd.ufdl": [ 1451 | "ufd", 1452 | "ufdl" 1453 | ], 1454 | "application/vnd.uiq.theme": [ 1455 | "utz" 1456 | ], 1457 | "application/vnd.umajin": [ 1458 | "umj" 1459 | ], 1460 | "application/vnd.unity": [ 1461 | "unityweb" 1462 | ], 1463 | "application/vnd.uoml+xml": [ 1464 | "uoml" 1465 | ], 1466 | "application/vnd.vcx": [ 1467 | "vcx" 1468 | ], 1469 | "application/vnd.visio": [ 1470 | "vsd", 1471 | "vst", 1472 | "vss", 1473 | "vsw" 1474 | ], 1475 | "application/vnd.visionary": [ 1476 | "vis" 1477 | ], 1478 | "application/vnd.vsf": [ 1479 | "vsf" 1480 | ], 1481 | "application/vnd.wap.wbxml": [ 1482 | "wbxml" 1483 | ], 1484 | "application/vnd.wap.wmlc": [ 1485 | "wmlc" 1486 | ], 1487 | "application/vnd.wap.wmlscriptc": [ 1488 | "wmlsc" 1489 | ], 1490 | "application/vnd.webturbo": [ 1491 | "wtb" 1492 | ], 1493 | "application/vnd.wolfram.player": [ 1494 | "nbp" 1495 | ], 1496 | "application/vnd.wordperfect": [ 1497 | "wpd" 1498 | ], 1499 | "application/vnd.wqd": [ 1500 | "wqd" 1501 | ], 1502 | "application/vnd.wt.stf": [ 1503 | "stf" 1504 | ], 1505 | "application/vnd.xara": [ 1506 | "xar" 1507 | ], 1508 | "application/vnd.xfdl": [ 1509 | "xfdl" 1510 | ], 1511 | "application/vnd.yamaha.hv-dic": [ 1512 | "hvd" 1513 | ], 1514 | "application/vnd.yamaha.hv-script": [ 1515 | "hvs" 1516 | ], 1517 | "application/vnd.yamaha.hv-voice": [ 1518 | "hvp" 1519 | ], 1520 | "application/vnd.yamaha.openscoreformat": [ 1521 | "osf" 1522 | ], 1523 | "application/vnd.yamaha.openscoreformat.osfpvg+xml": [ 1524 | "osfpvg" 1525 | ], 1526 | "application/vnd.yamaha.smaf-audio": [ 1527 | "saf" 1528 | ], 1529 | "application/vnd.yamaha.smaf-phrase": [ 1530 | "spf" 1531 | ], 1532 | "application/vnd.yellowriver-custom-menu": [ 1533 | "cmp" 1534 | ], 1535 | "application/vnd.zul": [ 1536 | "zir", 1537 | "zirz" 1538 | ], 1539 | "application/vnd.zzazz.deck+xml": [ 1540 | "zaz" 1541 | ], 1542 | "application/voicexml+xml": [ 1543 | "vxml" 1544 | ], 1545 | "application/wasm": [ 1546 | "wasm" 1547 | ], 1548 | "application/widget": [ 1549 | "wgt" 1550 | ], 1551 | "application/winhlp": [ 1552 | "hlp" 1553 | ], 1554 | "application/wsdl+xml": [ 1555 | "wsdl" 1556 | ], 1557 | "application/wspolicy+xml": [ 1558 | "wspolicy" 1559 | ], 1560 | "application/x-7z-compressed": [ 1561 | "7z" 1562 | ], 1563 | "application/x-abiword": [ 1564 | "abw" 1565 | ], 1566 | "application/x-ace-compressed": [ 1567 | "ace" 1568 | ], 1569 | "application/x-apple-diskimage": [], 1570 | "application/x-arj": [ 1571 | "arj" 1572 | ], 1573 | "application/x-authorware-bin": [ 1574 | "aab", 1575 | "x32", 1576 | "u32", 1577 | "vox" 1578 | ], 1579 | "application/x-authorware-map": [ 1580 | "aam" 1581 | ], 1582 | "application/x-authorware-seg": [ 1583 | "aas" 1584 | ], 1585 | "application/x-bcpio": [ 1586 | "bcpio" 1587 | ], 1588 | "application/x-bdoc": [], 1589 | "application/x-bittorrent": [ 1590 | "torrent" 1591 | ], 1592 | "application/x-blorb": [ 1593 | "blb", 1594 | "blorb" 1595 | ], 1596 | "application/x-bzip": [ 1597 | "bz" 1598 | ], 1599 | "application/x-bzip2": [ 1600 | "bz2", 1601 | "boz" 1602 | ], 1603 | "application/x-cbr": [ 1604 | "cbr", 1605 | "cba", 1606 | "cbt", 1607 | "cbz", 1608 | "cb7" 1609 | ], 1610 | "application/x-cdlink": [ 1611 | "vcd" 1612 | ], 1613 | "application/x-cfs-compressed": [ 1614 | "cfs" 1615 | ], 1616 | "application/x-chat": [ 1617 | "chat" 1618 | ], 1619 | "application/x-chess-pgn": [ 1620 | "pgn" 1621 | ], 1622 | "application/x-chrome-extension": [ 1623 | "crx" 1624 | ], 1625 | "application/x-cocoa": [ 1626 | "cco" 1627 | ], 1628 | "application/x-conference": [ 1629 | "nsc" 1630 | ], 1631 | "application/x-cpio": [ 1632 | "cpio" 1633 | ], 1634 | "application/x-csh": [ 1635 | "csh" 1636 | ], 1637 | "application/x-debian-package": [ 1638 | "udeb" 1639 | ], 1640 | "application/x-dgc-compressed": [ 1641 | "dgc" 1642 | ], 1643 | "application/x-director": [ 1644 | "dir", 1645 | "dcr", 1646 | "dxr", 1647 | "cst", 1648 | "cct", 1649 | "cxt", 1650 | "w3d", 1651 | "fgd", 1652 | "swa" 1653 | ], 1654 | "application/x-doom": [ 1655 | "wad" 1656 | ], 1657 | "application/x-dtbncx+xml": [ 1658 | "ncx" 1659 | ], 1660 | "application/x-dtbook+xml": [ 1661 | "dtb" 1662 | ], 1663 | "application/x-dtbresource+xml": [ 1664 | "res" 1665 | ], 1666 | "application/x-dvi": [ 1667 | "dvi" 1668 | ], 1669 | "application/x-envoy": [ 1670 | "evy" 1671 | ], 1672 | "application/x-eva": [ 1673 | "eva" 1674 | ], 1675 | "application/x-font-bdf": [ 1676 | "bdf" 1677 | ], 1678 | "application/x-font-ghostscript": [ 1679 | "gsf" 1680 | ], 1681 | "application/x-font-linux-psf": [ 1682 | "psf" 1683 | ], 1684 | "application/x-font-pcf": [ 1685 | "pcf" 1686 | ], 1687 | "application/x-font-snf": [ 1688 | "snf" 1689 | ], 1690 | "application/x-font-type1": [ 1691 | "pfa", 1692 | "pfb", 1693 | "pfm", 1694 | "afm" 1695 | ], 1696 | "application/x-freearc": [ 1697 | "arc" 1698 | ], 1699 | "application/x-futuresplash": [ 1700 | "spl" 1701 | ], 1702 | "application/x-gca-compressed": [ 1703 | "gca" 1704 | ], 1705 | "application/x-glulx": [ 1706 | "ulx" 1707 | ], 1708 | "application/x-gnumeric": [ 1709 | "gnumeric" 1710 | ], 1711 | "application/x-gramps-xml": [ 1712 | "gramps" 1713 | ], 1714 | "application/x-gtar": [ 1715 | "gtar" 1716 | ], 1717 | "application/x-hdf": [ 1718 | "hdf" 1719 | ], 1720 | "application/x-httpd-php": [ 1721 | "php" 1722 | ], 1723 | "application/x-install-instructions": [ 1724 | "install" 1725 | ], 1726 | "application/x-iso9660-image": [], 1727 | "application/x-java-archive-diff": [ 1728 | "jardiff" 1729 | ], 1730 | "application/x-java-jnlp-file": [ 1731 | "jnlp" 1732 | ], 1733 | "application/x-latex": [ 1734 | "latex" 1735 | ], 1736 | "application/x-lua-bytecode": [ 1737 | "luac" 1738 | ], 1739 | "application/x-lzh-compressed": [ 1740 | "lzh", 1741 | "lha" 1742 | ], 1743 | "application/x-makeself": [ 1744 | "run" 1745 | ], 1746 | "application/x-mie": [ 1747 | "mie" 1748 | ], 1749 | "application/x-mobipocket-ebook": [ 1750 | "prc", 1751 | "mobi" 1752 | ], 1753 | "application/x-ms-application": [ 1754 | "application" 1755 | ], 1756 | "application/x-ms-shortcut": [ 1757 | "lnk" 1758 | ], 1759 | "application/x-ms-wmd": [ 1760 | "wmd" 1761 | ], 1762 | "application/x-ms-wmz": [ 1763 | "wmz" 1764 | ], 1765 | "application/x-ms-xbap": [ 1766 | "xbap" 1767 | ], 1768 | "application/x-msaccess": [ 1769 | "mdb" 1770 | ], 1771 | "application/x-msbinder": [ 1772 | "obd" 1773 | ], 1774 | "application/x-mscardfile": [ 1775 | "crd" 1776 | ], 1777 | "application/x-msclip": [ 1778 | "clp" 1779 | ], 1780 | "application/x-msdos-program": [], 1781 | "application/x-msdownload": [ 1782 | "com", 1783 | "bat" 1784 | ], 1785 | "application/x-msmediaview": [ 1786 | "mvb", 1787 | "m13", 1788 | "m14" 1789 | ], 1790 | "application/x-msmetafile": [ 1791 | "wmf", 1792 | "emf", 1793 | "emz" 1794 | ], 1795 | "application/x-msmoney": [ 1796 | "mny" 1797 | ], 1798 | "application/x-mspublisher": [ 1799 | "pub" 1800 | ], 1801 | "application/x-msschedule": [ 1802 | "scd" 1803 | ], 1804 | "application/x-msterminal": [ 1805 | "trm" 1806 | ], 1807 | "application/x-mswrite": [ 1808 | "wri" 1809 | ], 1810 | "application/x-netcdf": [ 1811 | "nc", 1812 | "cdf" 1813 | ], 1814 | "application/x-ns-proxy-autoconfig": [ 1815 | "pac" 1816 | ], 1817 | "application/x-nzb": [ 1818 | "nzb" 1819 | ], 1820 | "application/x-perl": [ 1821 | "pl", 1822 | "pm" 1823 | ], 1824 | "application/x-pilot": [], 1825 | "application/x-pkcs12": [ 1826 | "p12", 1827 | "pfx" 1828 | ], 1829 | "application/x-pkcs7-certificates": [ 1830 | "p7b", 1831 | "spc" 1832 | ], 1833 | "application/x-pkcs7-certreqresp": [ 1834 | "p7r" 1835 | ], 1836 | "application/x-rar-compressed": [ 1837 | "rar" 1838 | ], 1839 | "application/x-redhat-package-manager": [ 1840 | "rpm" 1841 | ], 1842 | "application/x-research-info-systems": [ 1843 | "ris" 1844 | ], 1845 | "application/x-sea": [ 1846 | "sea" 1847 | ], 1848 | "application/x-sh": [ 1849 | "sh" 1850 | ], 1851 | "application/x-shar": [ 1852 | "shar" 1853 | ], 1854 | "application/x-shockwave-flash": [ 1855 | "swf" 1856 | ], 1857 | "application/x-silverlight-app": [ 1858 | "xap" 1859 | ], 1860 | "application/x-sql": [ 1861 | "sql" 1862 | ], 1863 | "application/x-stuffit": [ 1864 | "sit" 1865 | ], 1866 | "application/x-stuffitx": [ 1867 | "sitx" 1868 | ], 1869 | "application/x-subrip": [ 1870 | "srt" 1871 | ], 1872 | "application/x-sv4cpio": [ 1873 | "sv4cpio" 1874 | ], 1875 | "application/x-sv4crc": [ 1876 | "sv4crc" 1877 | ], 1878 | "application/x-t3vm-image": [ 1879 | "t3" 1880 | ], 1881 | "application/x-tads": [ 1882 | "gam" 1883 | ], 1884 | "application/x-tar": [ 1885 | "tar" 1886 | ], 1887 | "application/x-tcl": [ 1888 | "tcl", 1889 | "tk" 1890 | ], 1891 | "application/x-tex": [ 1892 | "tex" 1893 | ], 1894 | "application/x-tex-tfm": [ 1895 | "tfm" 1896 | ], 1897 | "application/x-texinfo": [ 1898 | "texinfo", 1899 | "texi" 1900 | ], 1901 | "application/x-tgif": [ 1902 | "obj" 1903 | ], 1904 | "application/x-ustar": [ 1905 | "ustar" 1906 | ], 1907 | "application/x-virtualbox-hdd": [ 1908 | "hdd" 1909 | ], 1910 | "application/x-virtualbox-ova": [ 1911 | "ova" 1912 | ], 1913 | "application/x-virtualbox-ovf": [ 1914 | "ovf" 1915 | ], 1916 | "application/x-virtualbox-vbox": [ 1917 | "vbox" 1918 | ], 1919 | "application/x-virtualbox-vbox-extpack": [ 1920 | "vbox-extpack" 1921 | ], 1922 | "application/x-virtualbox-vdi": [ 1923 | "vdi" 1924 | ], 1925 | "application/x-virtualbox-vhd": [ 1926 | "vhd" 1927 | ], 1928 | "application/x-virtualbox-vmdk": [ 1929 | "vmdk" 1930 | ], 1931 | "application/x-wais-source": [ 1932 | "src" 1933 | ], 1934 | "application/x-web-app-manifest+json": [ 1935 | "webapp" 1936 | ], 1937 | "application/x-x509-ca-cert": [ 1938 | "der", 1939 | "crt", 1940 | "pem" 1941 | ], 1942 | "application/x-xfig": [ 1943 | "fig" 1944 | ], 1945 | "application/x-xliff+xml": [ 1946 | "xlf" 1947 | ], 1948 | "application/x-xpinstall": [ 1949 | "xpi" 1950 | ], 1951 | "application/x-xz": [ 1952 | "xz" 1953 | ], 1954 | "application/x-zmachine": [ 1955 | "z1", 1956 | "z2", 1957 | "z3", 1958 | "z4", 1959 | "z5", 1960 | "z6", 1961 | "z7", 1962 | "z8" 1963 | ], 1964 | "application/xaml+xml": [ 1965 | "xaml" 1966 | ], 1967 | "application/xcap-diff+xml": [ 1968 | "xdf" 1969 | ], 1970 | "application/xenc+xml": [ 1971 | "xenc" 1972 | ], 1973 | "application/xhtml+xml": [ 1974 | "xhtml", 1975 | "xht" 1976 | ], 1977 | "application/xml": [ 1978 | "xml", 1979 | "xsl", 1980 | "xsd", 1981 | "rng" 1982 | ], 1983 | "application/xml-dtd": [ 1984 | "dtd" 1985 | ], 1986 | "application/xop+xml": [ 1987 | "xop" 1988 | ], 1989 | "application/xproc+xml": [ 1990 | "xpl" 1991 | ], 1992 | "application/xslt+xml": [ 1993 | "xslt" 1994 | ], 1995 | "application/xspf+xml": [ 1996 | "xspf" 1997 | ], 1998 | "application/xv+xml": [ 1999 | "mxml", 2000 | "xhvml", 2001 | "xvml", 2002 | "xvm" 2003 | ], 2004 | "application/yang": [ 2005 | "yang" 2006 | ], 2007 | "application/yin+xml": [ 2008 | "yin" 2009 | ], 2010 | "application/zip": [ 2011 | "zip" 2012 | ], 2013 | "audio/3gpp": [], 2014 | "audio/adpcm": [ 2015 | "adp" 2016 | ], 2017 | "audio/basic": [ 2018 | "au", 2019 | "snd" 2020 | ], 2021 | "audio/midi": [ 2022 | "mid", 2023 | "midi", 2024 | "kar", 2025 | "rmi" 2026 | ], 2027 | "audio/mp3": [], 2028 | "audio/mp4": [ 2029 | "m4a", 2030 | "mp4a" 2031 | ], 2032 | "audio/mpeg": [ 2033 | "mpga", 2034 | "mp2", 2035 | "mp2a", 2036 | "mp3", 2037 | "m2a", 2038 | "m3a" 2039 | ], 2040 | "audio/ogg": [ 2041 | "oga", 2042 | "ogg", 2043 | "spx" 2044 | ], 2045 | "audio/s3m": [ 2046 | "s3m" 2047 | ], 2048 | "audio/silk": [ 2049 | "sil" 2050 | ], 2051 | "audio/vnd.dece.audio": [ 2052 | "uva", 2053 | "uvva" 2054 | ], 2055 | "audio/vnd.digital-winds": [ 2056 | "eol" 2057 | ], 2058 | "audio/vnd.dra": [ 2059 | "dra" 2060 | ], 2061 | "audio/vnd.dts": [ 2062 | "dts" 2063 | ], 2064 | "audio/vnd.dts.hd": [ 2065 | "dtshd" 2066 | ], 2067 | "audio/vnd.lucent.voice": [ 2068 | "lvp" 2069 | ], 2070 | "audio/vnd.ms-playready.media.pya": [ 2071 | "pya" 2072 | ], 2073 | "audio/vnd.nuera.ecelp4800": [ 2074 | "ecelp4800" 2075 | ], 2076 | "audio/vnd.nuera.ecelp7470": [ 2077 | "ecelp7470" 2078 | ], 2079 | "audio/vnd.nuera.ecelp9600": [ 2080 | "ecelp9600" 2081 | ], 2082 | "audio/vnd.rip": [ 2083 | "rip" 2084 | ], 2085 | "audio/wav": [ 2086 | "wav" 2087 | ], 2088 | "audio/wave": [], 2089 | "audio/webm": [ 2090 | "weba" 2091 | ], 2092 | "audio/x-aac": [ 2093 | "aac" 2094 | ], 2095 | "audio/x-aiff": [ 2096 | "aif", 2097 | "aiff", 2098 | "aifc" 2099 | ], 2100 | "audio/x-caf": [ 2101 | "caf" 2102 | ], 2103 | "audio/x-flac": [ 2104 | "flac" 2105 | ], 2106 | "audio/x-m4a": [], 2107 | "audio/x-matroska": [ 2108 | "mka" 2109 | ], 2110 | "audio/x-mpegurl": [ 2111 | "m3u" 2112 | ], 2113 | "audio/x-ms-wax": [ 2114 | "wax" 2115 | ], 2116 | "audio/x-ms-wma": [ 2117 | "wma" 2118 | ], 2119 | "audio/x-pn-realaudio": [ 2120 | "ram", 2121 | "ra" 2122 | ], 2123 | "audio/x-pn-realaudio-plugin": [ 2124 | "rmp" 2125 | ], 2126 | "audio/x-realaudio": [], 2127 | "audio/x-wav": [], 2128 | "audio/xm": [ 2129 | "xm" 2130 | ], 2131 | "chemical/x-cdx": [ 2132 | "cdx" 2133 | ], 2134 | "chemical/x-cif": [ 2135 | "cif" 2136 | ], 2137 | "chemical/x-cmdf": [ 2138 | "cmdf" 2139 | ], 2140 | "chemical/x-cml": [ 2141 | "cml" 2142 | ], 2143 | "chemical/x-csml": [ 2144 | "csml" 2145 | ], 2146 | "chemical/x-xyz": [ 2147 | "xyz" 2148 | ], 2149 | "font/collection": [ 2150 | "ttc" 2151 | ], 2152 | "font/otf": [ 2153 | "otf" 2154 | ], 2155 | "font/ttf": [ 2156 | "ttf" 2157 | ], 2158 | "font/woff": [ 2159 | "woff" 2160 | ], 2161 | "font/woff2": [ 2162 | "woff2" 2163 | ], 2164 | "image/apng": [ 2165 | "apng" 2166 | ], 2167 | "image/bmp": [ 2168 | "bmp" 2169 | ], 2170 | "image/cgm": [ 2171 | "cgm" 2172 | ], 2173 | "image/g3fax": [ 2174 | "g3" 2175 | ], 2176 | "image/gif": [ 2177 | "gif" 2178 | ], 2179 | "image/ief": [ 2180 | "ief" 2181 | ], 2182 | "image/jp2": [ 2183 | "jp2", 2184 | "jpg2" 2185 | ], 2186 | "image/jpeg": [ 2187 | "jpeg", 2188 | "jpg", 2189 | "jpe" 2190 | ], 2191 | "image/jpm": [ 2192 | "jpm" 2193 | ], 2194 | "image/jpx": [ 2195 | "jpx", 2196 | "jpf" 2197 | ], 2198 | "image/ktx": [ 2199 | "ktx" 2200 | ], 2201 | "image/png": [ 2202 | "png" 2203 | ], 2204 | "image/prs.btif": [ 2205 | "btif" 2206 | ], 2207 | "image/sgi": [ 2208 | "sgi" 2209 | ], 2210 | "image/svg+xml": [ 2211 | "svg", 2212 | "svgz" 2213 | ], 2214 | "image/tiff": [ 2215 | "tiff", 2216 | "tif" 2217 | ], 2218 | "image/vnd.adobe.photoshop": [ 2219 | "psd" 2220 | ], 2221 | "image/vnd.dece.graphic": [ 2222 | "uvi", 2223 | "uvvi", 2224 | "uvg", 2225 | "uvvg" 2226 | ], 2227 | "image/vnd.djvu": [ 2228 | "djvu", 2229 | "djv" 2230 | ], 2231 | "image/vnd.dvb.subtitle": [], 2232 | "image/vnd.dwg": [ 2233 | "dwg" 2234 | ], 2235 | "image/vnd.dxf": [ 2236 | "dxf" 2237 | ], 2238 | "image/vnd.fastbidsheet": [ 2239 | "fbs" 2240 | ], 2241 | "image/vnd.fpx": [ 2242 | "fpx" 2243 | ], 2244 | "image/vnd.fst": [ 2245 | "fst" 2246 | ], 2247 | "image/vnd.fujixerox.edmics-mmr": [ 2248 | "mmr" 2249 | ], 2250 | "image/vnd.fujixerox.edmics-rlc": [ 2251 | "rlc" 2252 | ], 2253 | "image/vnd.ms-modi": [ 2254 | "mdi" 2255 | ], 2256 | "image/vnd.ms-photo": [ 2257 | "wdp" 2258 | ], 2259 | "image/vnd.net-fpx": [ 2260 | "npx" 2261 | ], 2262 | "image/vnd.wap.wbmp": [ 2263 | "wbmp" 2264 | ], 2265 | "image/vnd.xiff": [ 2266 | "xif" 2267 | ], 2268 | "image/webp": [ 2269 | "webp" 2270 | ], 2271 | "image/x-3ds": [ 2272 | "3ds" 2273 | ], 2274 | "image/x-cmu-raster": [ 2275 | "ras" 2276 | ], 2277 | "image/x-cmx": [ 2278 | "cmx" 2279 | ], 2280 | "image/x-freehand": [ 2281 | "fh", 2282 | "fhc", 2283 | "fh4", 2284 | "fh5", 2285 | "fh7" 2286 | ], 2287 | "image/x-icon": [ 2288 | "ico" 2289 | ], 2290 | "image/x-jng": [ 2291 | "jng" 2292 | ], 2293 | "image/x-mrsid-image": [ 2294 | "sid" 2295 | ], 2296 | "image/x-ms-bmp": [], 2297 | "image/x-pcx": [ 2298 | "pcx" 2299 | ], 2300 | "image/x-pict": [ 2301 | "pic", 2302 | "pct" 2303 | ], 2304 | "image/x-portable-anymap": [ 2305 | "pnm" 2306 | ], 2307 | "image/x-portable-bitmap": [ 2308 | "pbm" 2309 | ], 2310 | "image/x-portable-graymap": [ 2311 | "pgm" 2312 | ], 2313 | "image/x-portable-pixmap": [ 2314 | "ppm" 2315 | ], 2316 | "image/x-rgb": [ 2317 | "rgb" 2318 | ], 2319 | "image/x-tga": [ 2320 | "tga" 2321 | ], 2322 | "image/x-xbitmap": [ 2323 | "xbm" 2324 | ], 2325 | "image/x-xpixmap": [ 2326 | "xpm" 2327 | ], 2328 | "image/x-xwindowdump": [ 2329 | "xwd" 2330 | ], 2331 | "message/rfc822": [ 2332 | "eml", 2333 | "mime" 2334 | ], 2335 | "model/gltf+json": [ 2336 | "gltf" 2337 | ], 2338 | "model/gltf-binary": [ 2339 | "glb" 2340 | ], 2341 | "model/iges": [ 2342 | "igs", 2343 | "iges" 2344 | ], 2345 | "model/mesh": [ 2346 | "msh", 2347 | "mesh", 2348 | "silo" 2349 | ], 2350 | "model/vnd.collada+xml": [ 2351 | "dae" 2352 | ], 2353 | "model/vnd.dwf": [ 2354 | "dwf" 2355 | ], 2356 | "model/vnd.gdl": [ 2357 | "gdl" 2358 | ], 2359 | "model/vnd.gtw": [ 2360 | "gtw" 2361 | ], 2362 | "model/vnd.mts": [ 2363 | "mts" 2364 | ], 2365 | "model/vnd.vtu": [ 2366 | "vtu" 2367 | ], 2368 | "model/vrml": [ 2369 | "wrl", 2370 | "vrml" 2371 | ], 2372 | "model/x3d+binary": [ 2373 | "x3db", 2374 | "x3dbz" 2375 | ], 2376 | "model/x3d+vrml": [ 2377 | "x3dv", 2378 | "x3dvz" 2379 | ], 2380 | "model/x3d+xml": [ 2381 | "x3d", 2382 | "x3dz" 2383 | ], 2384 | "text/cache-manifest": [ 2385 | "appcache", 2386 | "manifest" 2387 | ], 2388 | "text/calendar": [ 2389 | "ics", 2390 | "ifb" 2391 | ], 2392 | "text/coffeescript": [ 2393 | "coffee", 2394 | "litcoffee" 2395 | ], 2396 | "text/css": [ 2397 | "css" 2398 | ], 2399 | "text/csv": [ 2400 | "csv" 2401 | ], 2402 | "text/hjson": [ 2403 | "hjson" 2404 | ], 2405 | "text/html": [ 2406 | "html", 2407 | "htm", 2408 | "shtml" 2409 | ], 2410 | "text/jade": [ 2411 | "jade" 2412 | ], 2413 | "text/jsx": [ 2414 | "jsx" 2415 | ], 2416 | "text/less": [ 2417 | "less" 2418 | ], 2419 | "text/markdown": [ 2420 | "markdown", 2421 | "md" 2422 | ], 2423 | "text/mathml": [ 2424 | "mml" 2425 | ], 2426 | "text/n3": [ 2427 | "n3" 2428 | ], 2429 | "text/plain": [ 2430 | "license", 2431 | "gitignore", 2432 | "ejs", 2433 | "txt", 2434 | "text", 2435 | "conf", 2436 | "def", 2437 | "list", 2438 | "log", 2439 | "in", 2440 | "ini" 2441 | ], 2442 | "text/prs.lines.tag": [ 2443 | "dsc" 2444 | ], 2445 | "text/richtext": [ 2446 | "rtx" 2447 | ], 2448 | "text/rtf": [], 2449 | "text/sgml": [ 2450 | "sgml", 2451 | "sgm" 2452 | ], 2453 | "text/slim": [ 2454 | "slim", 2455 | "slm" 2456 | ], 2457 | "text/stylus": [ 2458 | "stylus", 2459 | "styl" 2460 | ], 2461 | "text/tab-separated-values": [ 2462 | "tsv" 2463 | ], 2464 | "text/troff": [ 2465 | "t", 2466 | "tr", 2467 | "roff", 2468 | "man", 2469 | "me", 2470 | "ms" 2471 | ], 2472 | "text/turtle": [ 2473 | "ttl" 2474 | ], 2475 | "text/uri-list": [ 2476 | "uri", 2477 | "uris", 2478 | "urls" 2479 | ], 2480 | "text/vcard": [ 2481 | "vcard" 2482 | ], 2483 | "text/vnd.curl": [ 2484 | "curl" 2485 | ], 2486 | "text/vnd.curl.dcurl": [ 2487 | "dcurl" 2488 | ], 2489 | "text/vnd.curl.mcurl": [ 2490 | "mcurl" 2491 | ], 2492 | "text/vnd.curl.scurl": [ 2493 | "scurl" 2494 | ], 2495 | "text/vnd.dvb.subtitle": [ 2496 | "sub" 2497 | ], 2498 | "text/vnd.fly": [ 2499 | "fly" 2500 | ], 2501 | "text/vnd.fmi.flexstor": [ 2502 | "flx" 2503 | ], 2504 | "text/vnd.graphviz": [ 2505 | "gv" 2506 | ], 2507 | "text/vnd.in3d.3dml": [ 2508 | "3dml" 2509 | ], 2510 | "text/vnd.in3d.spot": [ 2511 | "spot" 2512 | ], 2513 | "text/vnd.sun.j2me.app-descriptor": [ 2514 | "jad" 2515 | ], 2516 | "text/vnd.wap.wml": [ 2517 | "wml" 2518 | ], 2519 | "text/vnd.wap.wmlscript": [ 2520 | "wmls" 2521 | ], 2522 | "text/vtt": [ 2523 | "vtt" 2524 | ], 2525 | "text/x-asm": [ 2526 | "s", 2527 | "asm" 2528 | ], 2529 | "text/x-c": [ 2530 | "c", 2531 | "cc", 2532 | "cxx", 2533 | "cpp", 2534 | "h", 2535 | "hh", 2536 | "dic" 2537 | ], 2538 | "text/x-component": [ 2539 | "htc" 2540 | ], 2541 | "text/x-fortran": [ 2542 | "f", 2543 | "for", 2544 | "f77", 2545 | "f90" 2546 | ], 2547 | "text/x-handlebars-template": [ 2548 | "hbs" 2549 | ], 2550 | "text/x-java-source": [ 2551 | "java" 2552 | ], 2553 | "text/x-lua": [ 2554 | "lua" 2555 | ], 2556 | "text/x-markdown": [ 2557 | "mkd" 2558 | ], 2559 | "text/x-nfo": [ 2560 | "nfo" 2561 | ], 2562 | "text/x-opml": [ 2563 | "opml" 2564 | ], 2565 | "text/x-org": [], 2566 | "text/x-pascal": [ 2567 | "p", 2568 | "pas" 2569 | ], 2570 | "text/x-processing": [ 2571 | "pde" 2572 | ], 2573 | "text/x-sass": [ 2574 | "sass" 2575 | ], 2576 | "text/x-scss": [ 2577 | "scss" 2578 | ], 2579 | "text/x-setext": [ 2580 | "etx" 2581 | ], 2582 | "text/x-sfv": [ 2583 | "sfv" 2584 | ], 2585 | "text/x-suse-ymp": [ 2586 | "ymp" 2587 | ], 2588 | "text/x-uuencode": [ 2589 | "uu" 2590 | ], 2591 | "text/x-vcalendar": [ 2592 | "vcs" 2593 | ], 2594 | "text/x-vcard": [ 2595 | "vcf" 2596 | ], 2597 | "text/xml": [], 2598 | "text/yaml": [ 2599 | "yaml", 2600 | "yml" 2601 | ], 2602 | "video/3gpp": [ 2603 | "3gp", 2604 | "3gpp" 2605 | ], 2606 | "video/3gpp2": [ 2607 | "3g2" 2608 | ], 2609 | "video/h261": [ 2610 | "h261" 2611 | ], 2612 | "video/h263": [ 2613 | "h263" 2614 | ], 2615 | "video/h264": [ 2616 | "h264" 2617 | ], 2618 | "video/jpeg": [ 2619 | "jpgv" 2620 | ], 2621 | "video/jpm": [ 2622 | "jpgm" 2623 | ], 2624 | "video/mj2": [ 2625 | "mj2", 2626 | "mjp2" 2627 | ], 2628 | "video/mp2t": [ 2629 | "ts" 2630 | ], 2631 | "video/mp4": [ 2632 | "mp4", 2633 | "mp4v", 2634 | "mpg4" 2635 | ], 2636 | "video/mpeg": [ 2637 | "mpeg", 2638 | "mpg", 2639 | "mpe", 2640 | "m1v", 2641 | "m2v" 2642 | ], 2643 | "video/ogg": [ 2644 | "ogv" 2645 | ], 2646 | "video/quicktime": [ 2647 | "qt", 2648 | "mov" 2649 | ], 2650 | "video/vnd.dece.hd": [ 2651 | "uvh", 2652 | "uvvh" 2653 | ], 2654 | "video/vnd.dece.mobile": [ 2655 | "uvm", 2656 | "uvvm" 2657 | ], 2658 | "video/vnd.dece.pd": [ 2659 | "uvp", 2660 | "uvvp" 2661 | ], 2662 | "video/vnd.dece.sd": [ 2663 | "uvs", 2664 | "uvvs" 2665 | ], 2666 | "video/vnd.dece.video": [ 2667 | "uvv", 2668 | "uvvv" 2669 | ], 2670 | "video/vnd.dvb.file": [ 2671 | "dvb" 2672 | ], 2673 | "video/vnd.fvt": [ 2674 | "fvt" 2675 | ], 2676 | "video/vnd.mpegurl": [ 2677 | "mxu", 2678 | "m4u" 2679 | ], 2680 | "video/vnd.ms-playready.media.pyv": [ 2681 | "pyv" 2682 | ], 2683 | "video/vnd.uvvu.mp4": [ 2684 | "uvu", 2685 | "uvvu" 2686 | ], 2687 | "video/vnd.vivo": [ 2688 | "viv" 2689 | ], 2690 | "video/webm": [ 2691 | "webm" 2692 | ], 2693 | "video/x-f4v": [ 2694 | "f4v" 2695 | ], 2696 | "video/x-fli": [ 2697 | "fli" 2698 | ], 2699 | "video/x-flv": [ 2700 | "flv" 2701 | ], 2702 | "video/x-m4v": [ 2703 | "m4v" 2704 | ], 2705 | "video/x-matroska": [ 2706 | "mkv", 2707 | "mk3d", 2708 | "mks" 2709 | ], 2710 | "video/x-mng": [ 2711 | "mng" 2712 | ], 2713 | "video/x-ms-asf": [ 2714 | "asf", 2715 | "asx" 2716 | ], 2717 | "video/x-ms-vob": [ 2718 | "vob" 2719 | ], 2720 | "video/x-ms-wm": [ 2721 | "wm" 2722 | ], 2723 | "video/x-ms-wmv": [ 2724 | "wmv" 2725 | ], 2726 | "video/x-ms-wmx": [ 2727 | "wmx" 2728 | ], 2729 | "video/x-ms-wvx": [ 2730 | "wvx" 2731 | ], 2732 | "video/x-msvideo": [ 2733 | "avi" 2734 | ], 2735 | "video/x-sgi-movie": [ 2736 | "movie" 2737 | ], 2738 | "video/x-smv": [ 2739 | "smv" 2740 | ], 2741 | "x-conference/x-cooltalk": [ 2742 | "ice" 2743 | ] 2744 | } -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "esModuleInterop": true, 5 | "declaration": true, 6 | "target": "es2017", 7 | "noImplicitAny": true, 8 | "resolveJsonModule": true, 9 | "moduleResolution": "node", 10 | "emitDecoratorMetadata": true, 11 | "experimentalDecorators": true, 12 | "sourceMap": true, 13 | "strict": false, 14 | "skipLibCheck": true, 15 | "outDir": "lib", 16 | "baseUrl": "." 17 | }, 18 | "include": [ 19 | "src/**/*" 20 | ] 21 | } 22 | --------------------------------------------------------------------------------