Firebase Update

This commit is contained in:
Lukas Nowy
2018-12-22 23:30:39 +01:00
parent befb44764d
commit acffe619b3
11523 changed files with 1614327 additions and 930246 deletions

View File

View File

@ -1,3 +1,5 @@
The MIT License (MIT)
Copyright (c) 2010 Benjamin Thomas, Robert Kieffer
Permission is hereby granted, free of charge, to any person obtaining a copy

View File

@ -43,15 +43,18 @@ assert.equal(undefined, mime.extension('unrecognized'));
assert.equal('application/font-woff', mime.lookup('file.woff'));
assert.equal('application/octet-stream', mime.lookup('file.buffer'));
assert.equal('audio/mp4', mime.lookup('file.m4a'));
assert.equal('font/opentype', mime.lookup('file.otf'));
// TODO: Uncomment once #157 is resolved
// assert.equal('audio/mp4', mime.lookup('file.m4a'));
assert.equal('font/otf', mime.lookup('file.otf'));
//
// Test charsets
//
assert.equal('UTF-8', mime.charsets.lookup('text/plain'));
assert.equal(undefined, mime.charsets.lookup(mime.types.js));
assert.equal('UTF-8', mime.charsets.lookup(mime.types.js));
assert.equal('UTF-8', mime.charsets.lookup(mime.types.json));
assert.equal(undefined, mime.charsets.lookup(mime.types.bin));
assert.equal('fallback', mime.charsets.lookup('application/octet-stream', 'fallback'));
console.log('\nAll tests passed');

View File

@ -22,9 +22,9 @@ Mime.prototype.define = function (map) {
for (var type in map) {
var exts = map[type];
for (var i = 0; i < exts.length; i++) {
if (process.env.DEBUG_MIME && this.types[exts]) {
console.warn(this._loading.replace(/.*\//, ''), 'changes "' + exts[i] + '" extension type from ' +
this.types[exts] + ' to ' + type);
if (process.env.DEBUG_MIME && this.types[exts[i]]) {
console.warn((this._loading || "define()").replace(/.*\//, ''), 'changes "' + exts[i] + '" extension type from ' +
this.types[exts[i]] + ' to ' + type);
}
this.types[exts[i]] = type;
@ -67,7 +67,7 @@ Mime.prototype.load = function(file) {
* Lookup a mime type based on extension
*/
Mime.prototype.lookup = function(path, fallback) {
var ext = path.replace(/.*[\.\/\\]/, '').toLowerCase();
var ext = path.replace(/^.*[\.\/\\]/, '').toLowerCase();
return this.types[ext] || fallback || this.default_type;
};
@ -101,7 +101,7 @@ mime.Mime = Mime;
mime.charsets = {
lookup: function(mimeType, fallback) {
// Assume text types are utf8
return (/^text\//).test(mimeType) ? 'UTF-8' : fallback;
return (/^text\/|^application\/(javascript|json)/).test(mimeType) ? 'UTF-8' : fallback;
}
};

View File

@ -1,27 +1,27 @@
{
"_from": "mime@1.3.4",
"_id": "mime@1.3.4",
"_from": "mime@1.4.1",
"_id": "mime@1.4.1",
"_inBundle": false,
"_integrity": "sha1-EV+eO2s9rylZmDyzjxSaLUDrXVM=",
"_integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==",
"_location": "/mime",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "mime@1.3.4",
"raw": "mime@1.4.1",
"name": "mime",
"escapedName": "mime",
"rawSpec": "1.3.4",
"rawSpec": "1.4.1",
"saveSpec": null,
"fetchSpec": "1.3.4"
"fetchSpec": "1.4.1"
},
"_requiredBy": [
"/send"
],
"_resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz",
"_shasum": "115f9e3b6b3daf2959983cb38f149a2d40eb5d53",
"_spec": "mime@1.3.4",
"_where": "D:\\5CHITM\\Diplomarbeit\\smart-shopper\\express-server\\node_modules\\send",
"_resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz",
"_shasum": "121f9ebc49e3766f311a76e1fa1c8003c4b03aa6",
"_spec": "mime@1.4.1",
"_where": "D:\\Desktop\\smartshopperNodeReworkFirebase\\node_modules\\send",
"author": {
"name": "Robert Kieffer",
"email": "robert@broofa.com",
@ -45,19 +45,14 @@
"deprecated": false,
"description": "A comprehensive library for mime-type mapping",
"devDependencies": {
"mime-db": "^1.2.0"
"mime-db": "1.30.0"
},
"homepage": "https://github.com/broofa/node-mime#readme",
"keywords": [
"util",
"mime"
],
"licenses": [
{
"type": "MIT",
"url": "https://raw.github.com/broofa/node-mime/master/LICENSE"
}
],
"license": "MIT",
"main": "mime.js",
"name": "mime",
"repository": {
@ -68,5 +63,5 @@
"prepublish": "node build/build.js > types.json",
"test": "node build/test.js"
},
"version": "1.3.4"
"version": "1.4.1"
}

File diff suppressed because one or more lines are too long