14 changed files with 228047 additions and 2989 deletions
@ -0,0 +1,7 @@
|
||||
FROM docker.io/library/node:lts-alpine |
||||
|
||||
COPY ./dist/main.js /app/main.js |
||||
|
||||
WORKDIR /app |
||||
|
||||
CMD NODE_ENV=production node main.js |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,295 @@
|
||||
/* |
||||
object-assign |
||||
(c) Sindre Sorhus |
||||
@license MIT |
||||
*/ |
||||
|
||||
/*! |
||||
* accepts |
||||
* Copyright(c) 2014 Jonathan Ong |
||||
* Copyright(c) 2015 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* body-parser |
||||
* Copyright(c) 2014 Jonathan Ong |
||||
* Copyright(c) 2014-2015 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* body-parser |
||||
* Copyright(c) 2014-2015 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* bytes |
||||
* Copyright(c) 2012-2014 TJ Holowaychuk |
||||
* Copyright(c) 2015 Jed Watson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* content-disposition |
||||
* Copyright(c) 2014-2017 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* content-type |
||||
* Copyright(c) 2015 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* cookie |
||||
* Copyright(c) 2012-2014 Roman Shtylman |
||||
* Copyright(c) 2015 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* depd |
||||
* Copyright(c) 2014 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* depd |
||||
* Copyright(c) 2014-2015 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* depd |
||||
* Copyright(c) 2014-2017 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* depd |
||||
* Copyright(c) 2015 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* destroy |
||||
* Copyright(c) 2014 Jonathan Ong |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* ee-first |
||||
* Copyright(c) 2014 Jonathan Ong |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* encodeurl |
||||
* Copyright(c) 2016 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* escape-html |
||||
* Copyright(c) 2012-2013 TJ Holowaychuk |
||||
* Copyright(c) 2015 Andreas Lubbe |
||||
* Copyright(c) 2015 Tiancheng "Timothy" Gu |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* etag |
||||
* Copyright(c) 2014-2016 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* express |
||||
* Copyright(c) 2009-2013 TJ Holowaychuk |
||||
* Copyright(c) 2013 Roman Shtylman |
||||
* Copyright(c) 2014-2015 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* express |
||||
* Copyright(c) 2009-2013 TJ Holowaychuk |
||||
* Copyright(c) 2014-2015 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* finalhandler |
||||
* Copyright(c) 2014-2017 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* forwarded |
||||
* Copyright(c) 2014-2017 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* fresh |
||||
* Copyright(c) 2012 TJ Holowaychuk |
||||
* Copyright(c) 2016-2017 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* http-errors |
||||
* Copyright(c) 2014 Jonathan Ong |
||||
* Copyright(c) 2016 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* media-typer |
||||
* Copyright(c) 2014 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* merge-descriptors |
||||
* Copyright(c) 2014 Jonathan Ong |
||||
* Copyright(c) 2015 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* methods |
||||
* Copyright(c) 2013-2014 TJ Holowaychuk |
||||
* Copyright(c) 2015-2016 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* mime-db |
||||
* Copyright(c) 2014 Jonathan Ong |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* mime-types |
||||
* Copyright(c) 2014 Jonathan Ong |
||||
* Copyright(c) 2015 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* negotiator |
||||
* Copyright(c) 2012 Federico Romero |
||||
* Copyright(c) 2012-2014 Isaac Z. Schlueter |
||||
* Copyright(c) 2015 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* on-finished |
||||
* Copyright(c) 2013 Jonathan Ong |
||||
* Copyright(c) 2014 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* parseurl |
||||
* Copyright(c) 2014 Jonathan Ong |
||||
* Copyright(c) 2014-2017 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* proxy-addr |
||||
* Copyright(c) 2014-2016 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* range-parser |
||||
* Copyright(c) 2012-2014 TJ Holowaychuk |
||||
* Copyright(c) 2015-2016 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* raw-body |
||||
* Copyright(c) 2013-2014 Jonathan Ong |
||||
* Copyright(c) 2014-2015 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* send |
||||
* Copyright(c) 2012 TJ Holowaychuk |
||||
* Copyright(c) 2014-2016 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* serve-static |
||||
* Copyright(c) 2010 Sencha Inc. |
||||
* Copyright(c) 2011 TJ Holowaychuk |
||||
* Copyright(c) 2014-2016 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* statuses |
||||
* Copyright(c) 2014 Jonathan Ong |
||||
* Copyright(c) 2016 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* toidentifier |
||||
* Copyright(c) 2016 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* type-is |
||||
* Copyright(c) 2014 Jonathan Ong |
||||
* Copyright(c) 2014-2015 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* unpipe |
||||
* Copyright(c) 2015 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! |
||||
* vary |
||||
* Copyright(c) 2014-2017 Douglas Christopher Wilson |
||||
* MIT Licensed |
||||
*/ |
||||
|
||||
/*! ***************************************************************************** |
||||
Copyright (c) Microsoft Corporation. |
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any |
||||
purpose with or without fee is hereby granted. |
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH |
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY |
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, |
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM |
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR |
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
||||
PERFORMANCE OF THIS SOFTWARE. |
||||
***************************************************************************** */ |
||||
|
||||
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ |
||||
|
||||
/** |
||||
* @file Embedded JavaScript templating engine. {@link http://ejs.co} |
||||
* @author Matthew Eernisse <[email protected]> |
||||
* @author Tiancheng "Timothy" Gu <[email protected]> |
||||
* @project EJS |
||||
* @license {@link http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0} |
||||
*/ |
@ -0,0 +1,101 @@
|
||||
<%if(path!=="/"){path+="/"}%> |
||||
<!DOCTYPE html> |
||||
<html> |
||||
|
||||
<head> |
||||
<meta charset="utf-8" /> |
||||
<title>Index of <%= path %></title> |
||||
<style> |
||||
body { |
||||
font-size: 16px; |
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; |
||||
line-height: 1.5; |
||||
padding: 0 10px 5px |
||||
} |
||||
|
||||
table { |
||||
width: 100%; |
||||
border-collapse: collapse; |
||||
font: .85em Monaco, monospace |
||||
} |
||||
|
||||
tr.even { |
||||
background-color: #eee |
||||
} |
||||
|
||||
th { |
||||
text-align: left |
||||
} |
||||
|
||||
td, |
||||
th { |
||||
padding: .1em .25em |
||||
} |
||||
|
||||
.version-wrapper { |
||||
line-height: 2.25em; |
||||
float: right |
||||
} |
||||
|
||||
#version { |
||||
font-size: 1em |
||||
} |
||||
|
||||
address { |
||||
text-align: right |
||||
} |
||||
</style> |
||||
</head> |
||||
|
||||
<body> |
||||
<h1>Index of <%= path %></h1> |
||||
<hr /> |
||||
<table> |
||||
<thead> |
||||
<tr> |
||||
<th>Name</th> |
||||
<th>Type</th> |
||||
<th>Size</th> |
||||
<th>Last Modified</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
<% |
||||
files.sort((fileA,fileB) => { |
||||
let nameA = fileA.path.toUpperCase(); |
||||
let nameB = fileB.path.toUpperCase(); |
||||
if(fileA.type === "directory") return -1; |
||||
else if(fileB.type === "directory") return 1; |
||||
else if(nameA<nameB) return -1; |
||||
else if(nameA>nameB) return 1; |
||||
else return 0; |
||||
}) |
||||
if(path!=="/"){ |
||||
files.splice(0,0,{ |
||||
path: "..", |
||||
type: "directory", |
||||
}); |
||||
} |
||||
|
||||
%> |
||||
<% files.forEach((file,index) => { let name = `${file.path.replace(path,"")}${file.type==="directory"?"/":""}` %> |
||||
<tr class="<%= index%2===0?"even":"odd" %> "> |
||||
<td><a title="<%= name %>" href="<%= name %>"><%= name %></a></td> |
||||
<td><%= file.type==="directory"?"-":file.contentType %></td> |
||||
<td><%= file.type==="directory"?"-":(()=>{ |
||||
if(file.size<=1024) return file.size+" B"; |
||||
else if(file.size<=1024*1024) return (file.size/1024).toFixed(2)+" KiB"; |
||||
else return (file.size/1024/1024).toFixed(2)+" MB"; |
||||
})() %></td> |
||||
<td><%= file.type==="directory"?"-":new Date(Date.parse(file.lastModified)).toISOString() |
||||
%></td> |
||||
</tr> |
||||
<% }) %> |
||||
</tbody> |
||||
</table> |
||||
<hr /> |
||||
<address><%= package %> </address> |
||||
<address>186526 Edge/1.20.1</address> |
||||
</body> |
||||
|
||||
</html> |
@ -0,0 +1,18 @@
|
||||
import progress from 'rollup-plugin-progress'; |
||||
import cjs from "rollup-plugin-commonjs"; |
||||
import node from "rollup-plugin-node-resolve"; |
||||
import json from '@rollup/plugin-json'; |
||||
|
||||
|
||||
export default { |
||||
input: './modules/server.js', |
||||
output: { file: "build/main.js", format: "cjs", }, |
||||
plugins: [ |
||||
cjs(), |
||||
progress({ |
||||
clearLine: false // default: true
|
||||
}), |
||||
node(), |
||||
json(), |
||||
] |
||||
} |
Loading…
Reference in new issue