+4
-3
@@ -6,3 +6,3 @@ var fs = require('fs') | ||
| , path = require('path') | ||
| , mimetypes = require('./mimetypes') | ||
| , mime = require('mime') | ||
| , rfc822 = require('./rfc822') | ||
@@ -34,3 +34,3 @@ ; | ||
| this.mimetype = options.mimetype || mimetypes.lookup(this.path.slice(this.path.lastIndexOf('.')+1)) | ||
| this.mimetype = options.mimetype || mime.lookup(this.path.slice(this.path.lastIndexOf('.')+1)) | ||
@@ -157,3 +157,3 @@ var stopBuffering = function () { | ||
| self.path = path.join(self.path, self.index) | ||
| self.mimetype = mimetypes.lookup(self.path.slice(self.path.lastIndexOf('.')+1)) | ||
| self.mimetype = mime.lookup(self.path.slice(self.path.lastIndexOf('.')+1)) | ||
| fs.stat(self.path, finish) | ||
@@ -184,2 +184,3 @@ return | ||
| // stream.Stream.prototype.pipe.call(this, dest, options) | ||
| return dest | ||
| } | ||
@@ -186,0 +187,0 @@ File.prototype.write = function (chunk, encoding) { |
+7
-2
| { | ||
| "name": "filed", | ||
| "description": "Simplified file library.", | ||
| "version": "0.0.7", | ||
| "version": "0.1.0", | ||
| "repository": { | ||
@@ -13,4 +13,9 @@ "type": "git", | ||
| }, | ||
| "scripts": {"test": "node test/test.js"}, | ||
| "dependencies": { | ||
| "mime": ">= 1.2.6" | ||
| }, | ||
| "scripts": { | ||
| "test": "node test/test.js" | ||
| }, | ||
| "main": "./main" | ||
| } |
+1
-1
@@ -157,3 +157,3 @@ var filed = require('../main') | ||
| assert.equal(resp.statusCode, 200) | ||
| assert.equal(resp.headers['content-type'], 'text/javascript') | ||
| assert.equal(resp.headers['content-type'], 'application/javascript') | ||
| console.log("Passed GET file without piping request") | ||
@@ -160,0 +160,0 @@ }) |
-147
| // from http://github.com/felixge/node-paperboy | ||
| exports.types = { | ||
| "aiff":"audio/x-aiff", | ||
| "arj":"application/x-arj-compressed", | ||
| "asf":"video/x-ms-asf", | ||
| "asx":"video/x-ms-asx", | ||
| "au":"audio/ulaw", | ||
| "avi":"video/x-msvideo", | ||
| "bcpio":"application/x-bcpio", | ||
| "ccad":"application/clariscad", | ||
| "cod":"application/vnd.rim.cod", | ||
| "com":"application/x-msdos-program", | ||
| "cpio":"application/x-cpio", | ||
| "cpt":"application/mac-compactpro", | ||
| "csh":"application/x-csh", | ||
| "css":"text/css", | ||
| "deb":"application/x-debian-package", | ||
| "dl":"video/dl", | ||
| "doc":"application/msword", | ||
| "drw":"application/drafting", | ||
| "dvi":"application/x-dvi", | ||
| "dwg":"application/acad", | ||
| "dxf":"application/dxf", | ||
| "dxr":"application/x-director", | ||
| "etx":"text/x-setext", | ||
| "ez":"application/andrew-inset", | ||
| "fli":"video/x-fli", | ||
| "flv":"video/x-flv", | ||
| "gif":"image/gif", | ||
| "gl":"video/gl", | ||
| "gtar":"application/x-gtar", | ||
| "gz":"application/x-gzip", | ||
| "hdf":"application/x-hdf", | ||
| "hqx":"application/mac-binhex40", | ||
| "html":"text/html", | ||
| "ice":"x-conference/x-cooltalk", | ||
| "ico":"image/x-icon", | ||
| "ief":"image/ief", | ||
| "igs":"model/iges", | ||
| "ips":"application/x-ipscript", | ||
| "ipx":"application/x-ipix", | ||
| "jad":"text/vnd.sun.j2me.app-descriptor", | ||
| "jar":"application/java-archive", | ||
| "jpeg":"image/jpeg", | ||
| "jpg":"image/jpeg", | ||
| "js":"text/javascript", | ||
| "json":"application/json", | ||
| "latex":"application/x-latex", | ||
| "lsp":"application/x-lisp", | ||
| "lzh":"application/octet-stream", | ||
| "m":"text/plain", | ||
| "m3u":"audio/x-mpegurl", | ||
| "man":"application/x-troff-man", | ||
| "me":"application/x-troff-me", | ||
| "midi":"audio/midi", | ||
| "mif":"application/x-mif", | ||
| "mime":"www/mime", | ||
| "movie":"video/x-sgi-movie", | ||
| "mustache":"text/plain", | ||
| "mp4":"video/mp4", | ||
| "mpg":"video/mpeg", | ||
| "mpga":"audio/mpeg", | ||
| "ms":"application/x-troff-ms", | ||
| "nc":"application/x-netcdf", | ||
| "oda":"application/oda", | ||
| "ogm":"application/ogg", | ||
| "pbm":"image/x-portable-bitmap", | ||
| "pdf":"application/pdf", | ||
| "pgm":"image/x-portable-graymap", | ||
| "pgn":"application/x-chess-pgn", | ||
| "pgp":"application/pgp", | ||
| "pm":"application/x-perl", | ||
| "png":"image/png", | ||
| "pnm":"image/x-portable-anymap", | ||
| "ppm":"image/x-portable-pixmap", | ||
| "ppz":"application/vnd.ms-powerpoint", | ||
| "pre":"application/x-freelance", | ||
| "prt":"application/pro_eng", | ||
| "ps":"application/postscript", | ||
| "qt":"video/quicktime", | ||
| "ra":"audio/x-realaudio", | ||
| "rar":"application/x-rar-compressed", | ||
| "ras":"image/x-cmu-raster", | ||
| "rgb":"image/x-rgb", | ||
| "rm":"audio/x-pn-realaudio", | ||
| "rpm":"audio/x-pn-realaudio-plugin", | ||
| "rtf":"text/rtf", | ||
| "rtx":"text/richtext", | ||
| "scm":"application/x-lotusscreencam", | ||
| "set":"application/set", | ||
| "sgml":"text/sgml", | ||
| "sh":"application/x-sh", | ||
| "shar":"application/x-shar", | ||
| "silo":"model/mesh", | ||
| "sit":"application/x-stuffit", | ||
| "skt":"application/x-koan", | ||
| "smil":"application/smil", | ||
| "snd":"audio/basic", | ||
| "sol":"application/solids", | ||
| "spl":"application/x-futuresplash", | ||
| "src":"application/x-wais-source", | ||
| "stl":"application/SLA", | ||
| "stp":"application/STEP", | ||
| "sv4cpio":"application/x-sv4cpio", | ||
| "sv4crc":"application/x-sv4crc", | ||
| "svg":"image/svg+xml", | ||
| "swf":"application/x-shockwave-flash", | ||
| "tar":"application/x-tar", | ||
| "tcl":"application/x-tcl", | ||
| "tex":"application/x-tex", | ||
| "texinfo":"application/x-texinfo", | ||
| "tgz":"application/x-tar-gz", | ||
| "tiff":"image/tiff", | ||
| "tr":"application/x-troff", | ||
| "tsi":"audio/TSP-audio", | ||
| "tsp":"application/dsptype", | ||
| "tsv":"text/tab-separated-values", | ||
| "txt":"text/plain", | ||
| "unv":"application/i-deas", | ||
| "ustar":"application/x-ustar", | ||
| "vcd":"application/x-cdlink", | ||
| "vda":"application/vda", | ||
| "vivo":"video/vnd.vivo", | ||
| "vrm":"x-world/x-vrml", | ||
| "wav":"audio/x-wav", | ||
| "wax":"audio/x-ms-wax", | ||
| "wma":"audio/x-ms-wma", | ||
| "wmv":"video/x-ms-wmv", | ||
| "wmx":"video/x-ms-wmx", | ||
| "wrl":"model/vrml", | ||
| "wvx":"video/x-ms-wvx", | ||
| "xbm":"image/x-xbitmap", | ||
| "xlw":"application/vnd.ms-excel", | ||
| "xml":"text/xml", | ||
| "xpm":"image/x-xpixmap", | ||
| "xwd":"image/x-xwindowdump", | ||
| "xyz":"chemical/x-pdb", | ||
| "zip":"application/zip", | ||
| }; | ||
| exports.lookup = function(ext, defaultType) { | ||
| defaultType = defaultType || 'application/octet-stream'; | ||
| return (ext in exports.types) | ||
| ? exports.types[ext] | ||
| : defaultType; | ||
| }; |
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
2
-33.33%35743
-10.44%1
Infinity%10
-9.09%417
-25.54%2
100%+ Added
+ Added