Add updated dist/ built files

This commit is contained in:
David Humphrey 2018-06-25 08:27:14 -04:00
parent b7ecae4af1
commit 31cd579682
4 changed files with 33 additions and 34 deletions

2
dist/buffer.min.js vendored

File diff suppressed because one or more lines are too long

53
dist/filer.js vendored
View File

@ -4360,8 +4360,6 @@ var Buffer = require('../buffer.js');
* and filesystem flags are examined in order to override update logic.
*/
function update_node_times(context, path, node, times, callback) {
var update = false;
// Honour mount flags for how we update times
var flags = context.flags;
if(_(flags).contains(FS_NOCTIME)) {
@ -4371,6 +4369,8 @@ function update_node_times(context, path, node, times, callback) {
delete times.mtime;
}
// Only do the update if required (i.e., times are still present)
var update = false;
if(times.ctime) {
node.ctime = times.ctime;
// We don't do atime tracking for perf reasons, but do mirror ctime
@ -4551,7 +4551,7 @@ function find_node(context, path, callback) {
if(error) {
callback(error);
} else {
if(node.type == NODE_TYPE_SYMBOLIC_LINK) {
if(node.type === NODE_TYPE_SYMBOLIC_LINK) {
followedCount++;
if(followedCount > SYMLOOP_MAX){
callback(new Errors.ELOOP(null, path));
@ -4568,14 +4568,14 @@ function find_node(context, path, callback) {
data = normalize(data);
parentPath = dirname(data);
name = basename(data);
if(ROOT_DIRECTORY_NAME == name) {
if(ROOT_DIRECTORY_NAME === name) {
context.getObject(SUPER_NODE_ID, read_root_directory_node);
} else {
find_node(context, parentPath, read_parent_directory_data);
}
}
if(ROOT_DIRECTORY_NAME == name) {
if(ROOT_DIRECTORY_NAME === name) {
context.getObject(SUPER_NODE_ID, read_root_directory_node);
} else {
find_node(context, parentPath, read_parent_directory_data);
@ -4628,7 +4628,7 @@ function ensure_root_directory(context, callback) {
} else if(error && !(error instanceof Errors.ENOENT)) {
callback(error);
} else {
SuperNode.create({ guid: context.guid }, function(error, result) {
SuperNode.create({guid: context.guid}, function(error, result) {
if(error) {
callback(error);
return;
@ -4778,7 +4778,7 @@ function remove_directory(context, path, callback) {
function check_if_node_exists(error, result) {
if(error) {
callback(error);
} else if(ROOT_DIRECTORY_NAME == name) {
} else if(ROOT_DIRECTORY_NAME === name) {
callback(new Errors.EBUSY(null, path));
} else if(!_(result).has(name)) {
callback(new Errors.ENOENT(null, path));
@ -4792,7 +4792,7 @@ function remove_directory(context, path, callback) {
function check_if_node_is_directory(error, result) {
if(error) {
callback(error);
} else if(result.type != NODE_TYPE_DIRECTORY) {
} else if(result.type !== NODE_TYPE_DIRECTORY) {
callback(new Errors.ENOTDIR(null, path));
} else {
directoryNode = result;
@ -4859,7 +4859,7 @@ function open_file(context, path, flags, callback) {
var followedCount = 0;
if(ROOT_DIRECTORY_NAME == name) {
if(ROOT_DIRECTORY_NAME === name) {
if(_(flags).contains(O_WRITE)) {
callback(new Errors.EISDIR('the named file is a directory and O_WRITE is set', path));
} else {
@ -4890,7 +4890,7 @@ function open_file(context, path, flags, callback) {
callback(new Errors.ENOENT('O_CREATE and O_EXCLUSIVE are set, and the named file exists', path));
} else {
directoryEntry = directoryData[name];
if(directoryEntry.type == NODE_TYPE_DIRECTORY && _(flags).contains(O_WRITE)) {
if(directoryEntry.type === NODE_TYPE_DIRECTORY && _(flags).contains(O_WRITE)) {
callback(new Errors.EISDIR('the named file is a directory and O_WRITE is set', path));
} else {
context.getObject(directoryEntry.id, check_if_symbolic_link);
@ -4911,7 +4911,7 @@ function open_file(context, path, flags, callback) {
callback(error);
} else {
var node = result;
if(node.type == NODE_TYPE_SYMBOLIC_LINK) {
if(node.type === NODE_TYPE_SYMBOLIC_LINK) {
followedCount++;
if(followedCount > SYMLOOP_MAX){
callback(new Errors.ELOOP(null, path));
@ -4928,7 +4928,7 @@ function open_file(context, path, flags, callback) {
data = normalize(data);
parentPath = dirname(data);
name = basename(data);
if(ROOT_DIRECTORY_NAME == name) {
if(ROOT_DIRECTORY_NAME === name) {
if(_(flags).contains(O_WRITE)) {
callback(new Errors.EISDIR('the named file is a directory and O_WRITE is set', path));
} else {
@ -5169,7 +5169,7 @@ function lstat_file(context, path, callback) {
var directoryNode;
var directoryData;
if(ROOT_DIRECTORY_NAME == name) {
if(ROOT_DIRECTORY_NAME === name) {
find_node(context, path, callback);
} else {
find_node(context, parentPath, read_directory_data);
@ -5412,7 +5412,7 @@ function make_symbolic_link(context, srcpath, dstpath, callback) {
var directoryData;
var fileNode;
if(ROOT_DIRECTORY_NAME == name) {
if(ROOT_DIRECTORY_NAME === name) {
callback(new Errors.EEXIST(null, name));
} else {
find_node(context, parentPath, read_directory_data);
@ -5521,7 +5521,7 @@ function read_link(context, path, callback) {
if(error) {
callback(error);
} else {
if(fileNode.type != NODE_TYPE_SYMBOLIC_LINK) {
if(fileNode.type !== NODE_TYPE_SYMBOLIC_LINK) {
callback(new Errors.EINVAL('path not a symbolic link', path));
} else {
// If we were originally given a relative path, return that now vs. the
@ -5541,7 +5541,7 @@ function truncate_file(context, path, length, callback) {
function read_file_data (error, node) {
if (error) {
callback(error);
} else if(node.type == NODE_TYPE_DIRECTORY ) {
} else if(node.type === NODE_TYPE_DIRECTORY ) {
callback(new Errors.EISDIR(null, path));
} else{
fileNode = node;
@ -5597,7 +5597,7 @@ function ftruncate_file(context, ofd, length, callback) {
function read_file_data (error, node) {
if (error) {
callback(error);
} else if(node.type == NODE_TYPE_DIRECTORY ) {
} else if(node.type === NODE_TYPE_DIRECTORY ) {
callback(new Errors.EISDIR());
} else{
fileNode = node;
@ -5660,7 +5660,7 @@ function utimes_file(context, path, atime, mtime, callback) {
}
}
if (typeof atime != 'number' || typeof mtime != 'number') {
if (typeof atime !== 'number' || typeof mtime !== 'number') {
callback(new Errors.EINVAL('atime and mtime must be number', path));
}
else if (atime < 0 || mtime < 0) {
@ -5681,7 +5681,7 @@ function futimes_file(context, ofd, atime, mtime, callback) {
}
}
if (typeof atime != 'number' || typeof mtime != 'number') {
if (typeof atime !== 'number' || typeof mtime !== 'number') {
callback(new Errors.EINVAL('atime and mtime must be a number'));
}
else if (atime < 0 || mtime < 0) {
@ -5702,7 +5702,7 @@ function setxattr_file(context, path, name, value, flag, callback) {
set_extended_attribute(context, path, node, name, value, flag, callback);
}
if (typeof name != 'string') {
if (typeof name !== 'string') {
callback(new Errors.EINVAL('attribute name must be a string', path));
}
else if (!name) {
@ -5758,7 +5758,7 @@ function getxattr_file (context, path, name, callback) {
}
}
if (typeof name != 'string') {
if (typeof name !== 'string') {
callback(new Errors.EINVAL('attribute name must be a string', path));
}
else if (!name) {
@ -5786,7 +5786,7 @@ function fgetxattr_file (context, ofd, name, callback) {
}
}
if (typeof name != 'string') {
if (typeof name !== 'string') {
callback(new Errors.EINVAL());
}
else if (!name) {
@ -5861,7 +5861,7 @@ function fremovexattr_file (context, ofd, name, callback) {
}
}
if (typeof name != 'string') {
if (typeof name !== 'string') {
callback(new Errors.EINVAL('attribute name must be a string'));
}
else if (!name) {
@ -6249,7 +6249,7 @@ function validateAndMaskMode(value, def, callback) {
return parsed & FULL_READ_WRITE_EXEC_PERMISSIONS;
}
// TODO(BridgeAR): Only return `def` in case `value == null`
// TODO(BridgeAR): Only return `def` in case `value === null`
if (def !== undefined) {
return def;
}
@ -6270,7 +6270,7 @@ function chmod_file(context, path, mode, callback) {
}
}
if (typeof mode != 'number') {
if (typeof mode !== 'number') {
callback(new Errors.EINVAL('mode must be number', path));
}
else {
@ -6288,7 +6288,7 @@ function fchmod_file(context, ofd, mode, callback) {
}
}
if (typeof mode != 'number') {
if (typeof mode !== 'number') {
callback(new Errors.EINVAL('mode must be a number'));
}
else {
@ -8579,7 +8579,6 @@ function Stats(path, fileNode, devName) {
this.dev = devName;
this.node = fileNode.id;
this.type = fileNode.type;
this.name = fileNode.name;
this.size = fileNode.size;
this.nlinks = fileNode.nlinks;
this.atime = fileNode.atime;

6
dist/filer.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/path.min.js vendored
View File

@ -1,2 +1,2 @@
/*! filer 0.0.44 2018-05-29 */
/*! filer 0.0.44 2018-06-25 */
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.Path=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c||a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){function d(a,b){for(var c=0,d=a.length-1;d>=0;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c--;c)a.unshift("..");return a}function e(){for(var a="",b=!1,c=arguments.length-1;c>=-1&&!b;c--){var e=c>=0?arguments[c]:"/";"string"==typeof e&&e&&(a=e+"/"+a,b="/"===e.charAt(0))}return a=d(a.split("/").filter(function(a){return!!a}),!b).join("/"),(b?"/":"")+a||"."}function f(a){var b="/"===a.charAt(0);a.substr(-1);return a=d(a.split("/").filter(function(a){return!!a}),!b).join("/"),a||b||(a="."),(b?"/":"")+a}function g(){return f(Array.prototype.slice.call(arguments,0).filter(function(a,b){return a&&"string"==typeof a}).join("/"))}function h(a,b){function c(a){for(var b=0;b<a.length&&""===a[b];b++);for(var c=a.length-1;c>=0&&""===a[c];c--);return b>c?[]:a.slice(b,c-b+1)}a=e(a).substr(1),b=e(b).substr(1);for(var d=c(a.split("/")),f=c(b.split("/")),g=Math.min(d.length,f.length),h=g,i=0;i<g;i++)if(d[i]!==f[i]){h=i;break}for(var j=[],i=h;i<d.length;i++)j.push("..");return j=j.concat(f.slice(h)),j.join("/")}function i(a){var b=q(a),c=b[0],d=b[1];return c||d?(d&&(d=d.substr(0,d.length-1)),c+d):"."}function j(a,b){var c=q(a)[2];return b&&c.substr(-1*b.length)===b&&(c=c.substr(0,c.length-b.length)),""===c?"/":c}function k(a){return q(a)[3]}function l(a){return"/"===a.charAt(0)}function m(a){return-1!==(""+a).indexOf("\0")}function n(a){return a.replace(/\/*$/,"/")}function o(a){return a=a.replace(/\/*$/,""),""===a?"/":a}var p=/^(\/?)([\s\S]+\/(?!$)|\/)?((?:\.{1,2}$|[\s\S]+?)?(\.[^.\/]*)?)$/,q=function(a){var b=p.exec(a);return[b[1]||"",b[2]||"",b[3]||"",b[4]||""]};b.exports={normalize:f,resolve:e,join:g,relative:h,sep:"/",delimiter:":",dirname:i,basename:j,extname:k,isAbsolute:l,isNull:m,addTrailing:n,removeTrailing:o}},{}]},{},[1])(1)});