updated dependencies

This commit is contained in:
Philipp Kunz 2016-03-26 12:12:07 +01:00
parent 32e478ef4e
commit 8fc994737b
6 changed files with 10 additions and 40 deletions

3
dist/index.js vendored
View File

@ -1,3 +1,4 @@
"use strict";
var SmartpathTransform = require("./smartpath.transform");
var SmartpathGet = require("./smartpath.get");
/**
@ -10,4 +11,4 @@ var smartpath = {
};
module.exports = smartpath;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLElBQU8sa0JBQWtCLFdBQVcsdUJBQXVCLENBQUMsQ0FBQztBQUM3RCxJQUFPLFlBQVksV0FBVyxpQkFBaUIsQ0FBQyxDQUFDO0FBRWpEOzs7R0FHRztBQUNILElBQUksU0FBUyxHQUFHO0lBQ1osU0FBUyxFQUFFLGtCQUFrQjtJQUM3QixHQUFHLEVBQUUsWUFBWTtDQUVwQixDQUFDO0FBR0YsaUJBQVMsU0FBUyxDQUFDIiwiZmlsZSI6ImluZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8vIDxyZWZlcmVuY2UgcGF0aD1cInR5cGluZ3MvbWFpbi5kLnRzXCIgLz5cbmltcG9ydCBwbHVnaW5zID0gcmVxdWlyZShcIi4vc21hcnRwYXRoLnBsdWdpbnNcIik7XG5pbXBvcnQgU21hcnRwYXRoVHJhbnNmb3JtID0gcmVxdWlyZShcIi4vc21hcnRwYXRoLnRyYW5zZm9ybVwiKTtcbmltcG9ydCBTbWFydHBhdGhHZXQgPSByZXF1aXJlKFwiLi9zbWFydHBhdGguZ2V0XCIpO1xuXG4vKipcbiAqXG4gKiBAdHlwZSB7e2dldFBhdGg6IChmdW5jdGlvbihhbnkpOiB1bmRlZmluZWQpfX1cbiAqL1xubGV0IHNtYXJ0cGF0aCA9IHtcbiAgICB0cmFuc2Zvcm06IFNtYXJ0cGF0aFRyYW5zZm9ybSxcbiAgICBnZXQ6I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

@ -1,34 +0,0 @@
/// <reference path="typings/main.d.ts" />
var plugins = require("./smartpath.plugins");
var makeAbsolute = function (localPathArg, baseArg) {
var absolutePath;
if (baseArg) {
absolutePath = plugins.path.join(baseArg, localPathArg);
}
else {
absolutePath = plugins.path.resolve(localPathArg);
}
return absolutePath;
};
var absolute = function (relativeArg, baseArg) {
if (typeof relativeArg === "string") {
return makeAbsolute(relativeArg, baseArg);
}
else if (Array.isArray(relativeArg)) {
var relativeArray = relativeArg;
var absoluteArray = [];
for (var key in relativeArray) {
absoluteArray.push(makeAbsolute(relativeArray[key], baseArg));
}
;
return absoluteArray;
}
else {
plugins.beautylog.error("smartpath.absolute() could not make sense of the input. " +
"Input is neither String nor Array");
return false;
}
};
module.exports = absolute;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0cGF0aC5hYnNvbHV0ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSwwQ0FBMEM7QUFDMUMsSUFBTyxPQUFPLFdBQVcscUJBQXFCLENBQUMsQ0FBQztBQUVoRCxJQUFJLFlBQVksR0FBRyxVQUFTLFlBQW1CLEVBQUUsT0FBZTtJQUM1RCxJQUFJLFlBQW1CLENBQUM7SUFDeEIsRUFBRSxDQUFBLENBQUMsT0FBTyxDQUFDLENBQUEsQ0FBQztRQUNSLFlBQVksR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxPQUFPLEVBQUMsWUFBWSxDQUFDLENBQUM7SUFDM0QsQ0FBQztJQUFDLElBQUksQ0FBQyxDQUFDO1FBQ0gsWUFBWSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLFlBQVksQ0FBQyxDQUFDO0lBQ3ZELENBQUM7SUFDRCxNQUFNLENBQUMsWUFBWSxDQUFDO0FBQ3hCLENBQUMsQ0FBQztBQUVGLElBQUksUUFBUSxHQUFHLFVBQVMsV0FBZSxF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2YgdGhlIGlucHV0LiBcIiArXG4gICAgICAgICAgICBcIklucHV0IGlzIG5laXRoZXIgU3RyaW5nIG5vciBBcnJheVwiKTtcbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbn07XG5cbmV4cG9ydCA9IGFic29sdXRlOyJdLCJzb3VyY2VSb290IjoiL3NvdXJjZS8ifQ==

View File

@ -1,3 +1,4 @@
"use strict";
exports.type = function (pathStringArg) {
var urlRegex = /http[s|\s]:\/\/.*/i;
if (urlRegex.exec(pathStringArg)) {
@ -9,4 +10,4 @@ exports.type = function (pathStringArg) {
;
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0cGF0aC5nZXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBR1csWUFBSSxHQUFHLFVBQVMsYUFBb0I7SUFDM0MsSUFBSSxRQUFRLEdBQUcsb0JBQW9CLENBQUE7SUFDbkMsRUFBRSxDQUFBLENBQUMsUUFBUSxDQUFDLElBQUksQ0FBQyxhQUFhLENBQUMsQ0FBQyxDQUFBLENBQUM7UUFDN0IsTUFBTSxDQUFDLEtBQUssQ0FBQztJQUNqQixDQUFDO0lBQUMsSUFBSSxDQUFDLENBQUM7UUFDSixNQUFNLENBQUMsT0FBTyxDQUFDO0lBQ25CLENBQUM7SUFBQSxDQUFDO0FBQ04sQ0FBQyxDQUFDIiwiZmlsZSI6InNtYXJ0cGF0aC5nZXQuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLy8gPHJlZmVyZW5jZSBwYXRoPVwidHlwaW5ncy9tYWluLmQudHNcIiAvPlxuaW1wb3J0IHBsdWdpbnMgPSByZXF1aXJlKFwiLi9zbWFydHBhdGgucGx1Z2luc1wiKTtcblxuZXhwb3J0IGxldCB0eXBlID0gZnVuY3Rpb24ocGF0aFN0cmluZ0FyZzpzdHJpbmcpOnN0cmluZyB7XG4gICAgbGV0IHVybFJlZ2V4ID0gL2h0dHB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AgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiBcImxvY2FsXCI7XG4gICAgfTtcbn07Il0sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9

View File

@ -1,5 +1,6 @@
"use strict";
/// <reference path="./typings/main.d.ts" />
exports.beautylog = require("beautylog");
exports.path = require("path");
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0cGF0aC5wbHVnaW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLDRDQUE0QztBQUNqQyxpQkFBUyxHQUFHLE9BQU8sQ0FBRSxXQUFXLENBQUMsQ0FBQztBQUNsQyxZQUFJLEdBQUcsT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQUFDIiwiZmlsZSI6InNtYXJ0cGF0aC5wbHVnaW5zLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8vIDxyZWZlcmVuY2UgcGF0aD1cIi4vdHlwaW5ncy9tYWluLmQudHNcIiAvPlxuZXhwb3J0IHZhciBiZWF1dHlsb2cgPSByZXF1aXJlIChcImJlYXV0eWxvZ1wiKTtcbmV4cG9ydCB2YXIgcGF0aCA9IHJlcXVpcmUoXCJwYXRoXCIpOyJdLCJzb3VyY2VSb290IjoiL3NvdXJjZS8ifQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0cGF0aC5wbHVnaW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSw0Q0FBNEM7QUFDakMsaUJBQVMsR0FBRyxPQUFPLENBQUUsV0FBVyxDQUFDLENBQUM7QUFDbEMsWUFBSSxHQUFHLE9BQU8sQ0FBQyxNQUFNLENBQUMsQ0FBQyIsImZpbGUiOiJzbWFydHBhdGgucGx1Z2lucy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vLyA8cmVmZXJlbmNlIHBhdGg9XCIuL3R5cGluZ3MvbWFpbi5kLnRzXCIgLz5cbmV4cG9ydCB2YXIgYmVhdXR5bG9nID0gcmVxdWlyZSAoXCJiZWF1dHlsb2dcIik7XG5leHBvcnQgdmFyIHBhdGggPSByZXF1aXJlKFwicGF0aFwiKTsiXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0=

View File

@ -1,3 +1,4 @@
"use strict";
/// <reference path="typings/main.d.ts" />
var plugins = require("./smartpath.plugins");
/* ------------------------------------------ *
@ -36,4 +37,4 @@ exports.toAbsolute = function (relativeArg, baseArg) {
}
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0cGF0aC50cmFuc2Zvcm0udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsMENBQTBDO0FBQzFDLElBQU8sT0FBTyxXQUFXLHFCQUFxQixDQUFDLENBQUM7QUFFaEQ7O2dEQUVnRDtBQUNoRCxJQUFJLFlBQVksR0FBRyxVQUFTLFlBQW1CLEVBQUUsT0FBZTtJQUM1RCxJQUFJLFlBQW1CLENBQUM7SUFDeEIsRUFBRSxDQUFBLENBQUMsT0FBTyxDQUFDLENBQUEsQ0FBQztRQUNSLFlBQVksR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxPQUFPLEVBQUMsWUFBWSxDQUFDLENBQUM7SUFDM0QsQ0FBQztJQUFDLElBQUksQ0FBQyxDQUFDO1FBQ0gsWUFBWSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLFlBQVksQ0FBQyxDQUFDO0lBQ3ZELENBQUM7SUFDRCxNQUFNLENBQUMsWUFBWSxDQUFDO0FBQ3hCLENBQUMsQ0FBQztBQUVGOztnREFFZ0Q7QUFDckMsa0JBQVUsR0FBRyxVQUFTLFdBQWUsRUFBRSxPQUFlO0lBQzdELEVBQUUsQ0FBQSxDQUFDLE9BQU8sV0FBVyxLQUFLLFFBQVEsQ0FBQyx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x1dGUocmVsYXRpdmVBcmcsYmFzZUFyZyk7XG4gICAgfSBlbHNlIGlmKEFycmF5LmlzQXJyYXkocmVsYXRpdmVBcmcpKXtcbiAgICAgICAgbGV0IHJlbGF0aXZlQXJyYXkgPSByZWxhdGl2ZUFyZ1xuICAgICAgICBsZXQgYWJzb2x1dGVBcnJheTpzdHJpbmdbXSA9IFtdO1xuICAgICAgICBmb3IgKGxldCBrZXkgaW4gcmVsYXRpdmVBcnJheSl7XG4gICAgICAgICAgICBhYnNvbHV0ZUFycmF5LnB1c2gobWFrZUFic29sdXRlKHJlbGF0aXZlQXJyYXlba2V5XSxiYXNlQXJnKSk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBhYnNvbHV0ZUFycmF5O1xuICAgIH0gZWxzZSB7XG4gICAgICAgIHBsdWdpbnMuYmVhdXR5bG9nLmVycm9yKFwic21hcnRwYXRoLmFic29sdXRlKCkgY291bGQgbm90IG1ha2Ugc2Vuc2Ugb2YgdGhlIGlucHV0LiBcIiArXG4gICAgICAgICAgICBcIklucHV0IGlzIG5laXRoZXIgU3RyaW5nIG5vciBBcnJheVwiKTtcbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbn07Il0sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9

View File

@ -25,7 +25,7 @@
"beautylog": "^3.1.2"
},
"devDependencies": {
"npmts": "^3.3.2",
"should": "^8.2.2"
"npmts": "^3.6.3",
"should": "^8.3.0"
}
}