Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
09d424e972 | |||
f66864d0af | |||
930d90345a | |||
39835a4d27 | |||
13c001c48a | |||
7916929550 | |||
c52c1902ee | |||
06c60d42c1 | |||
38668239d4 | |||
3d0257768d | |||
e09ce0edc0 | |||
3d4c2e64b4 | |||
139478965b |
8
.gitignore
vendored
8
.gitignore
vendored
@ -1,8 +1,4 @@
|
||||
node_modules/
|
||||
.settings/
|
||||
.idea/
|
||||
docs/
|
||||
ts/typings/
|
||||
ts/**/*.js
|
||||
ts/**/*.js.map
|
||||
coverage/
|
||||
pages/
|
||||
public/
|
||||
|
@ -1,10 +1,14 @@
|
||||
image: hosttoday/ht-docker-node:latest
|
||||
|
||||
image: hosttoday/ht-docker-node:npmts
|
||||
stages:
|
||||
- test
|
||||
- release
|
||||
- page
|
||||
|
||||
testLEGACY:
|
||||
stage: test
|
||||
script:
|
||||
- npmci test legacy
|
||||
tags:
|
||||
- docker
|
||||
allow_failure: true
|
||||
testLTS:
|
||||
stage: test
|
||||
script:
|
||||
@ -18,23 +22,12 @@ testSTABLE:
|
||||
- npmci test stable
|
||||
tags:
|
||||
- docker
|
||||
|
||||
release:
|
||||
stage: release
|
||||
environment: npm_registry
|
||||
script:
|
||||
- npmci publish
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- docker
|
||||
|
||||
pages:
|
||||
stage: page
|
||||
script:
|
||||
- mkdir public
|
||||
- npmci npmpage
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
only:
|
||||
- tags
|
@ -1,4 +0,0 @@
|
||||
docs/
|
||||
coverage/
|
||||
ts/
|
||||
test/
|
15
.travis.yml
15
.travis.yml
@ -1,15 +0,0 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- 4
|
||||
- stable
|
||||
deploy:
|
||||
provider: npm
|
||||
email: npm@lossless.digital
|
||||
api_key:
|
||||
secure: C21gKjjg4W61RQlDo9vCjXjJ5NRvEoLuKe8IcKrTXEnn5R3ewnHfpgAQtXuBLvYuP6mIS6N2UxhcIo3BpsII1oOC4iJ4i3wqf6CH9hkmD1ejJe7qRiMKxltN0/4DHioySuolfcimKnOKSMGNQpOnze9lxqNi/qjUIgdsEY7soJRLIR9JQmhBBcRHoSzhxm6AnDmgEO75QsDIyhDH4wkWkOCOhRhjSfFNI6rm/om0XBRYkCKeNfz+Oqosnr8EkMVzsiRebLLXwZxzyCGSVFYQobtLxVqZDK5fvcz/GPyCbpDG/pZq5lxEkFYRiq+OmlIQn9Hz4C0i8VlXevS0ZatwS9iCGmG0/4ayUc2ksasY8o+bUfPJju0vKsCJJhtIj1e4GEj0ubisKirBOb5Oj8tMdf9RGLeNztFKRZEaM/ZoJ0gN//R9p4vWUZGMqJeIWh4I0hXA5Lv2OTUSl2h9bJ+Z678cb1k40w8bEVOij9GnUGQHybNwXV+8LZckap29/XDxguxtnYnuoX7L/dUfjkhK6JQRS9c7NDWOSzsnsy5kx0jHNaHac7vxMzmbdSRK71rNkzudtu2ECxONDc8aUNJLmUfL1tgYWt9/t9ramBqtmpp3w0S+s82PDHtoxAn02lWi2pz8pSp9ACP105qtUD9/1TCWtQUbYoL00QhFmlKzWwg=
|
||||
on:
|
||||
tags: true
|
||||
repo: pushrocks/smartpath
|
||||
notifications:
|
||||
slack:
|
||||
secure: f5Uss0z9RPl/QcA/DroB8loyE93aOYI6bqCkrsiUscmZtlv/TVQtT4dxqGA6uvcG6iTQDBi3Ul88dQxWkRm4IqbhY35/iMaV2dHW4FVYMAh8GQMbsfL2sALCcufxD9blw47awv3iFcwhV1EeyesscjgL0JIjduk96v/7G/6QIO2838M1lzlgtj+kRUkim8qkaEs1je3gRrhMUIjLuAdscMXyUKYFMjWo9ACSjVUl30R/ZNemb18itIja6i92GotreBgcfEMczvy58ovDC7xdJUsY8LjMI01DwY+WPRnI0tAhsuI8moBwwcdM4e3bAjKjucQRjO33O5bMWRZ6QCiYd0DnCEFyCPQLJ4GSy/tkD00n8ijLHAOSV3AH1zNbdK1EAdSPQXDvlI36KJn/2hyQLoitGHVUPr76ujJWP82ypO2tgIp3XQU0dJVCxDuHnwJO2+hjdI+gCPqxNTpjeujHx3UdkTGNRjuuf9dlZ/D08fApjYxy2fxItTqo3QjP/nrqvBXUOPP8yPHpjIT4H2t5Pr4SJjBGI6X4qhKyFj6s9rA/Xu1rL+45zu1C3uC3z+u3T9UwrbzJ/cZM6r6UQvQmUvIfBNaMlg4I/diQCDIPL+Rhop2nylY3IcHmJnk2itn7kOqj1tohCpFEml5pRuSZy4udWywkdtyBAsHWFLF7oiQ=
|
26
README.md
26
README.md
@ -1,6 +1,28 @@
|
||||
# smartpath
|
||||
offers smart ways to handle paths
|
||||
|
||||
## Status
|
||||
## Availabililty
|
||||
[](https://www.npmjs.com/package/smartpath)
|
||||
[](https://GitLab.com/pushrocks/smartpath)
|
||||
[](https://github.com/pushrocks/smartpath)
|
||||
[](https://pushrocks.gitlab.io/smartpath/)
|
||||
|
||||
## Documentation
|
||||
## Status for master
|
||||
[](https://GitLab.com/pushrocks/smartpath/commits/master)
|
||||
[](https://GitLab.com/pushrocks/smartpath/commits/master)
|
||||
[](https://www.npmjs.com/package/smartpath)
|
||||
[](https://david-dm.org/pushrocks/smartpath)
|
||||
[](https://www.bithound.io/github/pushrocks/smartpath/master/dependencies/npm)
|
||||
[](https://www.bithound.io/github/pushrocks/smartpath)
|
||||
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||
[](http://standardjs.com/)
|
||||
|
||||
## Usage
|
||||
Use TypeScript for best in class instellisense.
|
||||
|
||||
For further information read the linked docs at the top of this README.
|
||||
|
||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||
|
||||
[](https://push.rocks)
|
||||
|
18
dist/index.d.ts
vendored
18
dist/index.d.ts
vendored
@ -1,13 +1,5 @@
|
||||
import SmartpathCheck = require("./smartpath.check");
|
||||
import SmartpathGet = require("./smartpath.get");
|
||||
import SmartpathTransform = require("./smartpath.transform");
|
||||
/**
|
||||
*
|
||||
* @type {{getPath: (function(any): undefined)}}
|
||||
*/
|
||||
declare let smartpath: {
|
||||
check: typeof SmartpathCheck;
|
||||
get: typeof SmartpathGet;
|
||||
transform: typeof SmartpathTransform;
|
||||
};
|
||||
export = smartpath;
|
||||
import * as check from './smartpath.check';
|
||||
import * as get from './smartpath.get';
|
||||
import * as transform from './smartpath.transform';
|
||||
export { check, get, transform };
|
||||
export * from './smartpath.classes.smartpath';
|
||||
|
27
dist/index.js
vendored
27
dist/index.js
vendored
@ -1,16 +1,13 @@
|
||||
"use strict";
|
||||
var SmartpathCheck = require("./smartpath.check");
|
||||
var SmartpathGet = require("./smartpath.get");
|
||||
var SmartpathTransform = require("./smartpath.transform");
|
||||
/**
|
||||
*
|
||||
* @type {{getPath: (function(any): undefined)}}
|
||||
*/
|
||||
var smartpath = {
|
||||
check: SmartpathCheck,
|
||||
get: SmartpathGet,
|
||||
transform: SmartpathTransform
|
||||
};
|
||||
module.exports = smartpath;
|
||||
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFFQSxJQUFPLGNBQWMsV0FBVyxtQkFBbUIsQ0FBQyxDQUFDO0FBQ3JELElBQU8sWUFBWSxXQUFXLGlCQUFpQixDQUFDLENBQUM7QUFDakQsSUFBTyxrQkFBa0IsV0FBVyx1QkFBdUIsQ0FBQyxDQUFDO0FBRTdEOzs7R0FHRztBQUNILElBQUksU0FBUyxHQUFHO0lBQ1osS0FBSyxFQUFFLGNBQWM7SUFDckIsR0FBRyxFQUFFLFlBQVk7SUFDakIsU0FBUyxFQUFFLGtCQUFrQjtDQUNoQyxDQUFDO0FBR0YsaUJBQVMsU0FBUyxDQUFDIiwiZmlsZSI6ImluZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8vIDxyZWZlcmVuY2UgcGF0aD1cInR5cGluZ3MvbWFpbi5kLnRzXCIgLz5cclxuaW1wb3J0IHBsdWdpbnMgPSByZXF1aXJlKFwiLi9zbWFydHBhdGgucGx1Z2luc1wiKTtcclxuaW1wb3J0IFNtYXJ0cGF0aENoZWNrID0gcmVxdWlyZShcIi4vc21hcnRwYXRoLmNoZWNrXCIpO1xyXG5pbXBvcnQgU21hcnRwYXRoR2V0ID0gcmVxdWlyZShcIi4vc21hcnRwYXRoLmdldFwiKTtcclxuaW1wb3J0IFNtYXJ0cGF0aFRyYW5zZm9ybSA9IHJlcXVpcmUoXCIuL3NtYXJ0cGF0aC50cmFuc2Zvcm1cIik7XHJcblxyXG4vKipcclxuICpcclxuICogQHR5cGUge3tnZXRQYXRoOiAoZnVuY3Rpb24oYW55KTogdW5kZWZpbmVkKX19XHJcbiAqL1xyXG5sZXQgc21hcnRwYXRoID0ge1xyXG4gICAgY2hlY2s6IFNtYXJ0cGF0aENoZWNrLFxyXG4gICAgZ2V0OiBTbWFydHBhdGhHZXQsXHJcbiAgICB0cmFuc2Zvcm06IFNtYXJ0cGF0aFRyYW5zZm9ybVxyXG59O1xyXG5cclxuXHJcbmV4cG9ydCA9IHNtYXJ0cGF0aDtcclxuIl19
|
||||
function __export(m) {
|
||||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
||||
}
|
||||
// import modules
|
||||
const check = require("./smartpath.check");
|
||||
exports.check = check;
|
||||
const get = require("./smartpath.get");
|
||||
exports.get = get;
|
||||
const transform = require("./smartpath.transform");
|
||||
exports.transform = transform;
|
||||
__export(require("./smartpath.classes.smartpath"));
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsaUJBQWlCO0FBQ2pCLDJDQUEwQztBQU10QyxzQkFBSztBQUxULHVDQUFzQztBQU1sQyxrQkFBRztBQUxQLG1EQUFrRDtBQU05Qyw4QkFBUztBQUdiLG1EQUE2QyJ9
|
2
dist/smartpath.check.d.ts
vendored
2
dist/smartpath.check.d.ts
vendored
@ -1,3 +1,3 @@
|
||||
import "typings-global";
|
||||
import 'typings-global';
|
||||
export declare let isDir: (pathArg: string) => boolean;
|
||||
export declare let isFile: (pathArg: any) => boolean;
|
||||
|
3
dist/smartpath.check.js
vendored
3
dist/smartpath.check.js
vendored
@ -6,5 +6,4 @@ exports.isDir = function (pathArg) {
|
||||
exports.isFile = function (pathArg) {
|
||||
return /\.[a-zA-Z]*$/.test(pathArg); // checks if there is a .anything at the end
|
||||
};
|
||||
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0cGF0aC5jaGVjay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsUUFBTyxnQkFBZ0IsQ0FBQyxDQUFBO0FBR2IsYUFBSyxHQUFHLFVBQVMsT0FBYztJQUN0QyxNQUFNLENBQUMsQ0FBQyxjQUFNLENBQUMsT0FBTyxDQUFDLENBQUM7QUFDNUIsQ0FBQyxDQUFBO0FBRVUsY0FBTSxHQUFHLFVBQVMsT0FBTztJQUNoQyxNQUFNLENBQUMsY0FBYyxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLDRDQUE0QztBQUNyRixDQUFDLENBQUEiLCJmaWxlIjoic21hcnRwYXRoLmNoZWNrLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFwidHlwaW5ncy1nbG9iYWxcIjtcclxuaW1wb3J0ICogYXMgcGx1Z2lucyBmcm9tIFwiLi9zbWFydHBhdGgucGx1Z2luc1wiO1xyXG5cclxuZXhwb3J0IGxldCBpc0RpciA9IGZ1bmN0aW9uKHBhdGhBcmc6c3RyaW5nKXtcclxuICAgIHJldHVybiAhaXNGaWxlKHBhdGhBcmcpO1xyXG59XHJcblxyXG5leHBvcnQgbGV0IGlzRmlsZSA9IGZ1bmN0aW9uKHBhdGhBcmcpe1xyXG4gICAgcmV0dXJuIC9cXC5bYS16QS1aXSokLy50ZXN0KHBhdGhBcmcpOyAvLyBjaGVja3MgaWYgdGhlcmUgaXMgYSAuYW55dGhpbmcgYXQgdGhlIGVuZFxyXG59Il19
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRwYXRoLmNoZWNrLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRwYXRoLmNoZWNrLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSwwQkFBdUI7QUFHWixRQUFBLEtBQUssR0FBRyxVQUFVLE9BQWU7SUFDMUMsTUFBTSxDQUFDLENBQUMsY0FBTSxDQUFDLE9BQU8sQ0FBQyxDQUFBO0FBQ3pCLENBQUMsQ0FBQTtBQUVVLFFBQUEsTUFBTSxHQUFHLFVBQVUsT0FBTztJQUNuQyxNQUFNLENBQUMsY0FBYyxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsQ0FBQSxDQUFDLDRDQUE0QztBQUNsRixDQUFDLENBQUEifQ==
|
8
dist/smartpath.classes.smartpath.d.ts
vendored
Normal file
8
dist/smartpath.classes.smartpath.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
import * as getMod from './smartpath.get';
|
||||
export declare class Smartpath {
|
||||
originalPath: string;
|
||||
type: getMod.TPathType;
|
||||
pathLevels: string[];
|
||||
pathLevelsBackwards: string[];
|
||||
constructor(pathArg: string);
|
||||
}
|
12
dist/smartpath.classes.smartpath.js
vendored
Normal file
12
dist/smartpath.classes.smartpath.js
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
const getMod = require("./smartpath.get");
|
||||
class Smartpath {
|
||||
constructor(pathArg) {
|
||||
this.originalPath = pathArg;
|
||||
this.type = getMod.type(this.originalPath);
|
||||
this.pathLevels = getMod.pathLevels(this.originalPath);
|
||||
this.pathLevelsBackwards = getMod.pathLevelsBackwards(this.originalPath);
|
||||
}
|
||||
}
|
||||
exports.Smartpath = Smartpath;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRwYXRoLmNsYXNzZXMuc21hcnRwYXRoLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRwYXRoLmNsYXNzZXMuc21hcnRwYXRoLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFDQSwwQ0FBeUM7QUFFekM7SUFLRSxZQUFZLE9BQWU7UUFDekIsSUFBSSxDQUFDLFlBQVksR0FBRyxPQUFPLENBQUE7UUFDM0IsSUFBSSxDQUFDLElBQUksR0FBRyxNQUFNLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxZQUFZLENBQUMsQ0FBQTtRQUMxQyxJQUFJLENBQUMsVUFBVSxHQUFHLE1BQU0sQ0FBQyxVQUFVLENBQUMsSUFBSSxDQUFDLFlBQVksQ0FBQyxDQUFBO1FBQ3RELElBQUksQ0FBQyxtQkFBbUIsR0FBRyxNQUFNLENBQUMsbUJBQW1CLENBQUMsSUFBSSxDQUFDLFlBQVksQ0FBQyxDQUFBO0lBQzFFLENBQUM7Q0FDRjtBQVhELDhCQVdDIn0=
|
7
dist/smartpath.get.d.ts
vendored
7
dist/smartpath.get.d.ts
vendored
@ -1,6 +1,9 @@
|
||||
import "typings-global";
|
||||
export declare type TPathType = 'url' | 'local';
|
||||
/**
|
||||
* returns the type of the given path. Can be "url" or "local"
|
||||
*/
|
||||
export declare let type: (pathStringArg: string) => string;
|
||||
export declare let type: (pathStringArg: string) => TPathType;
|
||||
export declare let home: (pathArgument?: string) => any;
|
||||
export declare type TSystemArg = 'dynamic' | 'windows' | 'linux' | 'osx';
|
||||
export declare let pathLevels: (pathArg: string, systemArg?: TSystemArg) => string[];
|
||||
export declare let pathLevelsBackwards: (pathArg: string, systemArg?: TSystemArg) => string[];
|
||||
|
22
dist/smartpath.get.js
vendored
22
dist/smartpath.get.js
vendored
@ -1,16 +1,15 @@
|
||||
"use strict";
|
||||
require("typings-global");
|
||||
var plugins = require("./smartpath.plugins");
|
||||
const plugins = require("./smartpath.plugins");
|
||||
/**
|
||||
* returns the type of the given path. Can be "url" or "local"
|
||||
*/
|
||||
exports.type = function (pathStringArg) {
|
||||
var urlRegex = /http[s|\s]:\/\/.*/i;
|
||||
let urlRegex = /http[s|\s]:\/\/.*/i;
|
||||
if (urlRegex.exec(pathStringArg)) {
|
||||
return "url";
|
||||
return 'url';
|
||||
}
|
||||
else {
|
||||
return "local";
|
||||
return 'local';
|
||||
}
|
||||
;
|
||||
};
|
||||
@ -22,5 +21,14 @@ exports.home = function (pathArgument) {
|
||||
return plugins.home();
|
||||
}
|
||||
};
|
||||
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0cGF0aC5nZXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sZ0JBQWdCLENBQUMsQ0FBQTtBQUN4QixJQUFZLE9BQU8sV0FBTSxxQkFBcUIsQ0FBQyxDQUFBO0FBRS9DOztHQUVHO0FBQ1EsWUFBSSxHQUFHLFVBQVMsYUFBb0I7SUFDM0MsSUFBSSxRQUFRLEdBQUcsb0JBQW9CLENBQUE7SUFDbkMsRUFBRSxDQUFBLENBQUMsUUFBUSxDQUFDLElBQUksQ0FBQyxhQUFhLENBQUMsQ0FBQyxDQUFBLENBQUM7UUFDN0IsTUFBTSxDQUFDLEtBQUssQ0FBQztJQUNqQixDQUFDO0lBQUMsSUFBSSxDQUFDLENBQUM7UUFDSixNQUFNLENBQUMsT0FBTyxDQUFDO0lBQ25CLENBQUM7SUFBQSxD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5yZXNvbHZlKHBhdGhBcmd1bWVudCk7XHJcbiAgICB9IGVsc2Uge1xyXG4gICAgICAgIHJldHVybiBwbHVnaW5zLmhvbWUoKTtcclxuICAgIH1cclxufTsiXX0=
|
||||
exports.pathLevels = (pathArg, systemArg = 'dynamic') => {
|
||||
let pathLevelArray;
|
||||
if (systemArg === 'dynamic') {
|
||||
pathLevelArray = pathArg.split(plugins.path.sep);
|
||||
}
|
||||
return pathLevelArray;
|
||||
};
|
||||
exports.pathLevelsBackwards = (pathArg, systemArg) => {
|
||||
return exports.pathLevels(pathArg, systemArg).reverse();
|
||||
};
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRwYXRoLmdldC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0cGF0aC5nZXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLCtDQUErQztBQUcvQzs7R0FFRztBQUNRLFFBQUEsSUFBSSxHQUFHLFVBQVUsYUFBcUI7SUFDN0MsSUFBSSxRQUFRLEdBQUcsb0JBQW9CLENBQUE7SUFDbkMsRUFBRSxDQUFDLENBQUMsUUFBUSxDQUFDLElBQUksQ0FBQyxhQUFhLENBQUMsQ0FBQyxDQUFDLENBQUM7UUFDL0IsTUFBTSxDQUFDLEtBQUssQ0FBQTtJQUNoQixDQUFDO0lBQUMsSUFBSSxDQUFDLENBQUM7UUFDSixNQUFNLENBQUMsT0FBTyxDQUFBO0lBQ2xCLENBQUM7SUFBQSxDQUFDO0FBQ04sQ0FBQyxDQUFBO0FBRVUsUUFBQSxJQUFJLEdBQUcsVUFBVSxZQUFxQjtJQUM3QyxFQUFFLENBQUMsQ0FBQyxZQUFZLENBQUMsQ0FBQyxDQUFDO1FBQ2YsTUFBTSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLFlBQVksQ0FBQyxDQUFBO0lBQzdDLENBQUM7SUFBQyxJQUFJLENBQUMsQ0FBQztRQUNKLE1BQU0sQ0FBQyxPQUFPLENBQUMsSUFBSSxFQUFFLENBQUE7SUFDekIsQ0FBQztBQUNMLENBQUMsQ0FBQTtBQUlVLFFBQUEsVUFBVSxHQUFHLENBQUMsT0FBZSxFQUFFLFlBQXdCLFNBQVM7SUFDdkUsSUFBSSxjQUF3QixDQUFBO0lBQzVCLEVBQUUsQ0FBQyxDQUFDLFNBQVMsS0FBSyxTQUFTLENBQUMsQ0FBQyxDQUFDO1FBQzFCLGNBQWMsR0FBRyxPQUFPLENBQUMsS0FBSyxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUE7SUFDcEQsQ0FBQztJQUNELE1BQU0sQ0FBQyxjQUFjLENBQUE7QUFDekIsQ0FBQyxDQUFBO0FBRVUsUUFBQSxtQkFBbUIsR0FBRyxDQUFDLE9BQWUsRUFBRSxTQUFzQjtJQUNyRSxNQUFNLENBQUMsa0JBQVUsQ0FBQyxPQUFPLEVBQUUsU0FBUyxDQUFDLENBQUMsT0FBTyxFQUFFLENBQUE7QUFDbkQsQ0FBQyxDQUFBIn0=
|
8
dist/smartpath.plugins.d.ts
vendored
8
dist/smartpath.plugins.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
import "typings-global";
|
||||
export declare var beautylog: any;
|
||||
export declare var home: any;
|
||||
export declare var path: any;
|
||||
import 'typings-global';
|
||||
declare let home: any;
|
||||
import * as path from 'path';
|
||||
export { home, path };
|
||||
|
10
dist/smartpath.plugins.js
vendored
10
dist/smartpath.plugins.js
vendored
@ -1,7 +1,7 @@
|
||||
"use strict";
|
||||
require("typings-global");
|
||||
exports.beautylog = require("beautylog");
|
||||
exports.home = require("home");
|
||||
exports.path = require("path");
|
||||
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0cGF0aC5wbHVnaW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxRQUFPLGdCQUFnQixDQUFDLENBQUE7QUFDYixpQkFBUyxHQUFHLE9BQU8sQ0FBRSxXQUFXLENBQUMsQ0FBQztBQUNsQyxZQUFJLEdBQUcsT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQUFDO0FBQ3ZCLFlBQUksR0FBRyxPQUFPLENBQUMsTUFBTSxDQUFDLENBQUMiLCJmaWxlIjoic21hcnRwYXRoLnBsdWdpbnMuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgXCJ0eXBpbmdzLWdsb2JhbFwiO1xyXG5leHBvcnQgdmFyIGJlYXV0eWxvZyA9IHJlcXVpcmUgKFwiYmVhdXR5bG9nXCIpO1xyXG5leHBvcnQgdmFyIGhvbWUgPSByZXF1aXJlKFwiaG9tZVwiKTtcclxuZXhwb3J0IHZhciBwYXRoID0gcmVxdWlyZShcInBhdGhcIik7XHJcblxyXG4iXX0=
|
||||
let home = require('home');
|
||||
exports.home = home;
|
||||
const path = require("path");
|
||||
exports.path = path;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRwYXRoLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydHBhdGgucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsMEJBQXVCO0FBQ3ZCLElBQUksSUFBSSxHQUFHLE9BQU8sQ0FBQyxNQUFNLENBQUMsQ0FBQTtBQUl4QixvQkFBSTtBQUhOLDZCQUE0QjtBQUkxQixvQkFBSSJ9
|
4
dist/smartpath.transform.d.ts
vendored
4
dist/smartpath.transform.d.ts
vendored
@ -1,2 +1,2 @@
|
||||
import "typings-global";
|
||||
export declare let toAbsolute: (relativeArg: any, baseArg?: string) => any;
|
||||
import 'typings-global';
|
||||
export declare let toAbsolute: (relativeArg: string | string[], baseArg?: string) => any;
|
||||
|
31
dist/smartpath.transform.js
vendored
31
dist/smartpath.transform.js
vendored
@ -1,40 +1,43 @@
|
||||
"use strict";
|
||||
require("typings-global");
|
||||
var plugins = require("./smartpath.plugins");
|
||||
const plugins = require("./smartpath.plugins");
|
||||
/* ------------------------------------------ *
|
||||
* ------------ helpers --------------------- *
|
||||
* ------------------------------------------ */
|
||||
var makeAbsolute = function (localPathArg, baseArg) {
|
||||
var absolutePath;
|
||||
if (baseArg) {
|
||||
// checks a file
|
||||
let makeAbsolute = function (localPathArg, baseArg) {
|
||||
let absolutePath;
|
||||
let alreadyAbsolute = plugins.path.isAbsolute(localPathArg);
|
||||
if (baseArg && !alreadyAbsolute) {
|
||||
absolutePath = plugins.path.join(baseArg, localPathArg);
|
||||
}
|
||||
else {
|
||||
else if (!alreadyAbsolute) {
|
||||
absolutePath = plugins.path.resolve(localPathArg);
|
||||
}
|
||||
else {
|
||||
absolutePath = localPathArg;
|
||||
}
|
||||
return absolutePath;
|
||||
};
|
||||
/* ------------------------------------------ *
|
||||
* ------- export functions ----------------- *
|
||||
* ------------------------------------------ */
|
||||
exports.toAbsolute = function (relativeArg, baseArg) {
|
||||
if (typeof relativeArg === "string") {
|
||||
if (typeof relativeArg === 'string') {
|
||||
return makeAbsolute(relativeArg, baseArg);
|
||||
}
|
||||
else if (Array.isArray(relativeArg)) {
|
||||
var relativeArray = relativeArg;
|
||||
var absoluteArray = [];
|
||||
for (var key in relativeArray) {
|
||||
let relativeArray = relativeArg;
|
||||
let absoluteArray = [];
|
||||
for (let 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");
|
||||
console.error('smartpath.absolute() could not make sense of the input. ' +
|
||||
'Input is neither String nor Array');
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
//# sour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2.8",
|
||||
"description": "offers smart ways to handle paths",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
@ -23,13 +23,12 @@
|
||||
},
|
||||
"homepage": "https://github.com/pushrocks/smartpath",
|
||||
"dependencies": {
|
||||
"beautylog": "^5.0.8",
|
||||
"home": "^1.0.1",
|
||||
"typings-global": "^1.0.3"
|
||||
"typings-global": "^1.0.14"
|
||||
},
|
||||
"devDependencies": {
|
||||
"npmts": "^5.1.19",
|
||||
"should": "^9.0.0",
|
||||
"typings-test": "^1.0.1"
|
||||
"npmts-g": "^6.0.0",
|
||||
"smartchai": "^1.0.3",
|
||||
"typings-test": "^1.0.3"
|
||||
}
|
||||
}
|
||||
|
2
test/test.d.ts
vendored
2
test/test.d.ts
vendored
@ -1 +1 @@
|
||||
import "typings-test";
|
||||
import 'typings-test';
|
||||
|
112
test/test.js
112
test/test.js
File diff suppressed because one or more lines are too long
153
test/test.ts
153
test/test.ts
@ -1,77 +1,92 @@
|
||||
import "typings-test"
|
||||
let should = require("should");
|
||||
let smartpath = require("../dist/index.js");
|
||||
import 'typings-test'
|
||||
import { expect } from 'smartchai'
|
||||
import * as smartpath from '../dist/index.js'
|
||||
|
||||
describe("smartpath",function(){
|
||||
describe(".check",function(){
|
||||
let filePathString = "./somedir/somefile.json"
|
||||
let dirPathString = "./somedir/anotherdir"
|
||||
let dirPathString2 = "./somedir/another.dir/"
|
||||
describe(".isFile",function(){
|
||||
it("should be true for a file path",function(){
|
||||
describe('smartpath', function () {
|
||||
describe('class Smartpath', function () {
|
||||
let mySmartpath: smartpath.Smartpath
|
||||
it('expect create a valid instance', function () {
|
||||
mySmartpath = new smartpath.Smartpath('/some/path/to/some.file')
|
||||
expect(mySmartpath).to.be.instanceof(smartpath.Smartpath)
|
||||
expect(mySmartpath.pathLevelsBackwards).to.be.of.length(5)
|
||||
})
|
||||
})
|
||||
describe('.check', function () {
|
||||
let filePathString = './somedir/somefile.json'
|
||||
let dirPathString = './somedir/anotherdir'
|
||||
let dirPathString2 = './somedir/another.dir/'
|
||||
describe('.isFile', function () {
|
||||
it('expect be true for a file path', function () {
|
||||
expect(
|
||||
smartpath.check.isFile(filePathString)
|
||||
.should.be.true();
|
||||
});
|
||||
it("should be false for a directory path",function(){
|
||||
).to.be.true
|
||||
})
|
||||
it('expect be false for a directory path', function () {
|
||||
expect(
|
||||
smartpath.check.isFile(dirPathString)
|
||||
.should.be.false();
|
||||
).to.be.false
|
||||
expect(
|
||||
smartpath.check.isFile(dirPathString2)
|
||||
.should.be.false();
|
||||
});
|
||||
});
|
||||
describe(".isDir",function(){
|
||||
it("should be true for a directory path",function(){
|
||||
).to.be.false
|
||||
})
|
||||
})
|
||||
describe('.isDir', function () {
|
||||
it('expect be true for a directory path', function () {
|
||||
|
||||
expect(
|
||||
smartpath.check.isDir(dirPathString)
|
||||
.should.be.true();
|
||||
).to.be.true
|
||||
|
||||
expect(
|
||||
smartpath.check.isDir(dirPathString2)
|
||||
.should.be.true();
|
||||
});
|
||||
it("should be false for a file path",function(){
|
||||
smartpath.check.isDir(filePathString)
|
||||
.should.be.false();
|
||||
});
|
||||
});
|
||||
});
|
||||
describe(".transform",function(){
|
||||
describe("toAbsolute()",function(){
|
||||
let baseString = "/basedir";
|
||||
let relativeString = "somedir/somefile.txt";
|
||||
let relativeString2 = "anotherdir/anotherfile.txt";
|
||||
let relativeArray = [relativeString,relativeString,relativeString2];
|
||||
it("should make a string absolute",function(){
|
||||
smartpath.transform.toAbsolute(relativeString).should.startWith("/");
|
||||
smartpath.transform.toAbsolute(relativeString).should.endWith(relativeString);
|
||||
smartpath.transform.toAbsolute(relativeString,baseString).should.equal("/basedir/somedir/somefile.txt");
|
||||
});
|
||||
it("should make an array of relative Strings an Array of absolute Strings",function(){
|
||||
let absoluteArray = smartpath.transform.toAbsolute(relativeArray,baseString);
|
||||
absoluteArray[2].should.startWith("/");
|
||||
absoluteArray[2].should.endWith(relativeString2);
|
||||
).to.be.true
|
||||
|
||||
})
|
||||
it("should return false if neither String nor Array",function(){
|
||||
smartpath.transform.toAbsolute(3).should.be.false();
|
||||
});
|
||||
});
|
||||
});
|
||||
describe(".get",function(){
|
||||
describe(".type()",function(){
|
||||
it("should return 'url' for an URL",function(){
|
||||
smartpath.get.type("https://push.rocks/some/url").should.equal("url");
|
||||
smartpath.get.type("https://push.rocks/some/url").should.not.equal("local");
|
||||
});
|
||||
it("should return 'path' for a Path",function(){
|
||||
smartpath.get.type("/some/absolute/path/").should.equal("local");
|
||||
smartpath.get.type("./some/relative/path/").should.not.equal("url");
|
||||
});
|
||||
});
|
||||
describe(".get()",function(){
|
||||
it("should a absolute path for an home relative URL",function(){
|
||||
console.log(smartpath.get.home("~/test"));
|
||||
});
|
||||
it("should return the home directory path when no argument is specified",function(){
|
||||
console.log(smartpath.get.home());
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('expect be false for a file path', function () {
|
||||
expect(
|
||||
smartpath.check.isDir(filePathString)
|
||||
).to.be.false
|
||||
})
|
||||
})
|
||||
})
|
||||
describe('.transform', function () {
|
||||
describe('toAbsolute()', function () {
|
||||
let baseString = '/basedir'
|
||||
let relativeString = 'somedir/somefile.txt'
|
||||
let relativeString2 = 'anotherdir/anotherfile.txt'
|
||||
let relativeArray = [ relativeString, relativeString, relativeString2 ]
|
||||
it('expect make a string absolute', function () {
|
||||
expect(smartpath.transform.toAbsolute(relativeString)).startWith('/')
|
||||
expect(smartpath.transform.toAbsolute(relativeString)).endWith(relativeString)
|
||||
expect(smartpath.transform.toAbsolute(relativeString, baseString)).equal('/basedir/somedir/somefile.txt')
|
||||
})
|
||||
it('expect make an array of relative Strings an Array of absolute Strings', function () {
|
||||
let absoluteArray = smartpath.transform.toAbsolute(relativeArray, baseString)
|
||||
expect(absoluteArray[ 2 ]).to.startWith('/')
|
||||
expect(absoluteArray[ 2 ]).endWith(relativeString2)
|
||||
|
||||
})
|
||||
})
|
||||
})
|
||||
describe('.get', function () {
|
||||
describe('.type()', function () {
|
||||
it("expect return 'url' for an URL", function () {
|
||||
expect(smartpath.get.type('https://push.rocks/some/url')).equal('url')
|
||||
expect(smartpath.get.type('https://push.rocks/some/url')).not.equal('local')
|
||||
})
|
||||
it("expect return 'path' for a Path", function () {
|
||||
expect(smartpath.get.type('/some/absolute/path/')).equal('local')
|
||||
expect(smartpath.get.type('./some/relative/path/')).not.equal('url')
|
||||
})
|
||||
})
|
||||
describe('.get()', function () {
|
||||
it('expect a absolute path for an home relative URL', function () {
|
||||
console.log(smartpath.get.home('~/test'))
|
||||
})
|
||||
it('expect return the home directory path when no argument is specified', function () {
|
||||
console.log(smartpath.get.home())
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
27
ts/index.ts
27
ts/index.ts
@ -1,18 +1,13 @@
|
||||
/// <reference path="typings/main.d.ts" />
|
||||
import plugins = require("./smartpath.plugins");
|
||||
import SmartpathCheck = require("./smartpath.check");
|
||||
import SmartpathGet = require("./smartpath.get");
|
||||
import SmartpathTransform = require("./smartpath.transform");
|
||||
|
||||
/**
|
||||
*
|
||||
* @type {{getPath: (function(any): undefined)}}
|
||||
*/
|
||||
let smartpath = {
|
||||
check: SmartpathCheck,
|
||||
get: SmartpathGet,
|
||||
transform: SmartpathTransform
|
||||
};
|
||||
// import modules
|
||||
import * as check from './smartpath.check'
|
||||
import * as get from './smartpath.get'
|
||||
import * as transform from './smartpath.transform'
|
||||
|
||||
|
||||
export = smartpath;
|
||||
export {
|
||||
check,
|
||||
get,
|
||||
transform
|
||||
}
|
||||
|
||||
export * from './smartpath.classes.smartpath'
|
||||
|
@ -1,10 +1,10 @@
|
||||
import "typings-global";
|
||||
import * as plugins from "./smartpath.plugins";
|
||||
import 'typings-global'
|
||||
import plugins = require('./smartpath.plugins')
|
||||
|
||||
export let isDir = function (pathArg: string) {
|
||||
return !isFile(pathArg);
|
||||
return !isFile(pathArg)
|
||||
}
|
||||
|
||||
export let isFile = function (pathArg) {
|
||||
return /\.[a-zA-Z]*$/.test(pathArg); // checks if there is a .anything at the end
|
||||
return /\.[a-zA-Z]*$/.test(pathArg) // checks if there is a .anything at the end
|
||||
}
|
15
ts/smartpath.classes.smartpath.ts
Normal file
15
ts/smartpath.classes.smartpath.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import * as plugins from './smartpath.plugins'
|
||||
import * as getMod from './smartpath.get'
|
||||
|
||||
export class Smartpath {
|
||||
originalPath: string
|
||||
type: getMod.TPathType
|
||||
pathLevels: string[]
|
||||
pathLevelsBackwards: string[]
|
||||
constructor(pathArg: string) {
|
||||
this.originalPath = pathArg
|
||||
this.type = getMod.type(this.originalPath)
|
||||
this.pathLevels = getMod.pathLevels(this.originalPath)
|
||||
this.pathLevelsBackwards = getMod.pathLevelsBackwards(this.originalPath)
|
||||
}
|
||||
}
|
@ -1,22 +1,36 @@
|
||||
import "typings-global";
|
||||
import * as plugins from "./smartpath.plugins";
|
||||
import plugins = require('./smartpath.plugins')
|
||||
export type TPathType = 'url' | 'local'
|
||||
|
||||
/**
|
||||
* returns the type of the given path. Can be "url" or "local"
|
||||
*/
|
||||
export let type = function(pathStringArg:string):string {
|
||||
export let type = function (pathStringArg: string): TPathType {
|
||||
let urlRegex = /http[s|\s]:\/\/.*/i
|
||||
if (urlRegex.exec(pathStringArg)) {
|
||||
return "url";
|
||||
return 'url'
|
||||
} else {
|
||||
return "local";
|
||||
};
|
||||
return 'local'
|
||||
};
|
||||
}
|
||||
|
||||
export let home = function (pathArgument?: string) {
|
||||
if (pathArgument) {
|
||||
return plugins.home.resolve(pathArgument);
|
||||
return plugins.home.resolve(pathArgument)
|
||||
} else {
|
||||
return plugins.home();
|
||||
return plugins.home()
|
||||
}
|
||||
}
|
||||
|
||||
export type TSystemArg = 'dynamic' | 'windows' | 'linux' | 'osx'
|
||||
|
||||
export let pathLevels = (pathArg: string, systemArg: TSystemArg = 'dynamic') => {
|
||||
let pathLevelArray: string[]
|
||||
if (systemArg === 'dynamic') {
|
||||
pathLevelArray = pathArg.split(plugins.path.sep)
|
||||
}
|
||||
return pathLevelArray
|
||||
}
|
||||
|
||||
export let pathLevelsBackwards = (pathArg: string, systemArg?: TSystemArg) => {
|
||||
return pathLevels(pathArg, systemArg).reverse()
|
||||
}
|
||||
};
|
@ -1,5 +1,8 @@
|
||||
import "typings-global";
|
||||
export var beautylog = require ("beautylog");
|
||||
export var home = require("home");
|
||||
export var path = require("path");
|
||||
import 'typings-global'
|
||||
let home = require('home')
|
||||
import * as path from 'path'
|
||||
|
||||
export {
|
||||
home,
|
||||
path
|
||||
}
|
||||
|
@ -1,35 +1,40 @@
|
||||
import "typings-global";
|
||||
import * as plugins from "./smartpath.plugins";
|
||||
import 'typings-global'
|
||||
import plugins = require('./smartpath.plugins')
|
||||
|
||||
/* ------------------------------------------ *
|
||||
* ------------ helpers --------------------- *
|
||||
* ------------------------------------------ */
|
||||
|
||||
// checks a file
|
||||
let makeAbsolute = function(localPathArg: string, baseArg?: string): string {
|
||||
let absolutePath:string;
|
||||
if(baseArg){
|
||||
absolutePath = plugins.path.join(baseArg,localPathArg);
|
||||
let absolutePath: string
|
||||
let alreadyAbsolute = plugins.path.isAbsolute(localPathArg)
|
||||
if (baseArg && !alreadyAbsolute) {
|
||||
absolutePath = plugins.path.join(baseArg,localPathArg)
|
||||
} else if (!alreadyAbsolute) {
|
||||
absolutePath = plugins.path.resolve(localPathArg)
|
||||
} else {
|
||||
absolutePath = plugins.path.resolve(localPathArg);
|
||||
absolutePath = localPathArg
|
||||
}
|
||||
return absolutePath
|
||||
}
|
||||
return absolutePath;
|
||||
};
|
||||
|
||||
/* ------------------------------------------ *
|
||||
* ------- export functions ----------------- *
|
||||
* ------------------------------------------ */
|
||||
export let toAbsolute = function(relativeArg:any, baseArg?:string):any {
|
||||
if(typeof relativeArg === "string"){
|
||||
return makeAbsolute(relativeArg,baseArg);
|
||||
export let toAbsolute = function(relativeArg: string | string[], baseArg?: string): any {
|
||||
if (typeof relativeArg === 'string') {
|
||||
return makeAbsolute(relativeArg,baseArg)
|
||||
} else if (Array.isArray(relativeArg)) {
|
||||
let relativeArray = relativeArg
|
||||
let absoluteArray:string[] = [];
|
||||
let absoluteArray: string[] = []
|
||||
for (let 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;
|
||||
absoluteArray.push(makeAbsolute(relativeArray[key],baseArg))
|
||||
}
|
||||
return absoluteArray
|
||||
} else {
|
||||
console.error('smartpath.absolute() could not make sense of the input. ' +
|
||||
'Input is neither String nor Array')
|
||||
return false
|
||||
}
|
||||
}
|
||||
};
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"ambientDependencies": {
|
||||
"mocha": "github:DefinitelyTyped/DefinitelyTyped/mocha/mocha.d.ts#d6dd320291705694ba8e1a79497a908e9f5e6617",
|
||||
"node": "github:DefinitelyTyped/DefinitelyTyped/node/node.d.ts#efa0c1196d7280640e624ac1e7fa604502e7bd63"
|
||||
}
|
||||
}
|
3
tslint.json
Normal file
3
tslint.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "tslint-config-standard"
|
||||
}
|
209
yarn.lock
Normal file
209
yarn.lock
Normal file
@ -0,0 +1,209 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@types/chai-as-promised@0.0.29":
|
||||
version "0.0.29"
|
||||
resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-0.0.29.tgz#43d52892aa998e185a3de3e2477edb8573be1d77"
|
||||
dependencies:
|
||||
"@types/chai" "*"
|
||||
"@types/promises-a-plus" "*"
|
||||
|
||||
"@types/chai-string@^1.1.30":
|
||||
version "1.1.30"
|
||||
resolved "https://registry.yarnpkg.com/@types/chai-string/-/chai-string-1.1.30.tgz#4d8744b31a5a2295fc01c981ed1e2d4c8a070f0a"
|
||||
dependencies:
|
||||
"@types/chai" "*"
|
||||
|
||||
"@types/chai@*", "@types/chai@^3.4.35":
|
||||
version "3.4.35"
|
||||
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-3.4.35.tgz#e8d65f83492d2944f816fc620741821c28a8c900"
|
||||
|
||||
"@types/mocha@^2.2.31":
|
||||
version "2.2.39"
|
||||
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-2.2.39.tgz#f68d63db8b69c38e9558b4073525cf96c4f7a829"
|
||||
|
||||
"@types/node@*":
|
||||
version "7.0.5"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.5.tgz#96a0f0a618b7b606f1ec547403c00650210bfbb7"
|
||||
|
||||
"@types/promises-a-plus@*":
|
||||
version "0.0.27"
|
||||
resolved "https://registry.yarnpkg.com/@types/promises-a-plus/-/promises-a-plus-0.0.27.tgz#c64651134614c84b8f5d7114ce8901d36a609780"
|
||||
|
||||
"@types/shelljs@^0.3.33":
|
||||
version "0.3.33"
|
||||
resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.3.33.tgz#df613bddb88225ed09ce5c835f620dcaaf155e6b"
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
assertion-error@^1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c"
|
||||
|
||||
balanced-match@^0.4.1:
|
||||
version "0.4.2"
|
||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
|
||||
|
||||
brace-expansion@^1.0.0:
|
||||
version "1.1.6"
|
||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9"
|
||||
dependencies:
|
||||
balanced-match "^0.4.1"
|
||||
concat-map "0.0.1"
|
||||
|
||||
chai-as-promised@^6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-6.0.0.tgz#1a02a433a6f24dafac63b9c96fa1684db1aa8da6"
|
||||
dependencies:
|
||||
check-error "^1.0.2"
|
||||
|
||||
chai-string@^1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/chai-string/-/chai-string-1.3.0.tgz#df6139f294391b1035be5606f60a843b3a5041e7"
|
||||
|
||||
chai@^3.5.0:
|
||||
version "3.5.0"
|
||||
resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247"
|
||||
dependencies:
|
||||
assertion-error "^1.0.1"
|
||||
deep-eql "^0.1.3"
|
||||
type-detect "^1.0.0"
|
||||
|
||||
check-error@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"
|
||||
|
||||
concat-map@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
|
||||
|
||||
deep-eql@^0.1.3:
|
||||
version "0.1.3"
|
||||
resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-0.1.3.tgz#ef558acab8de25206cd713906d74e56930eb69f2"
|
||||
dependencies:
|
||||
type-detect "0.1.1"
|
||||
|
||||
fs.realpath@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
||||
|
||||
glob@^7.0.0:
|
||||
version "7.1.1"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
|
||||
dependencies:
|
||||
fs.realpath "^1.0.0"
|
||||
inflight "^1.0.4"
|
||||
inherits "2"
|
||||
minimatch "^3.0.2"
|
||||
once "^1.3.0"
|
||||
path-is-absolute "^1.0.0"
|
||||
|
||||
home@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/home/-/home-1.0.1.tgz#96a423ceb49b98378ff5ef3ceae059a557f9dd35"
|
||||
dependencies:
|
||||
os-homedir "^1.0.1"
|
||||
|
||||
inflight@^1.0.4:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
||||
dependencies:
|
||||
once "^1.3.0"
|
||||
wrappy "1"
|
||||
|
||||
inherits@2:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
|
||||
|
||||
interpret@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.1.tgz#d579fb7f693b858004947af39fa0db49f795602c"
|
||||
|
||||
minimatch@^3.0.2:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774"
|
||||
dependencies:
|
||||
brace-expansion "^1.0.0"
|
||||
|
||||
npmts-g@^6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/npmts-g/-/npmts-g-6.0.0.tgz#491fd50f110967f1b68f14237e7ea5157bf4ddb3"
|
||||
dependencies:
|
||||
"@types/shelljs" "^0.3.33"
|
||||
semver "^5.3.0"
|
||||
shelljs "^0.7.5"
|
||||
typings-global "^1.0.14"
|
||||
|
||||
once@^1.3.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||
dependencies:
|
||||
wrappy "1"
|
||||
|
||||
os-homedir@^1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
|
||||
|
||||
path-is-absolute@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
|
||||
|
||||
rechoir@^0.6.2:
|
||||
version "0.6.2"
|
||||
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
|
||||
dependencies:
|
||||
resolve "^1.1.6"
|
||||
|
||||
resolve@^1.1.6:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.2.0.tgz#9589c3f2f6149d1417a40becc1663db6ec6bc26c"
|
||||
|
||||
semver@^5.3.0:
|
||||
version "5.3.0"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
|
||||
|
||||
shelljs@^0.7.4, shelljs@^0.7.5:
|
||||
version "0.7.6"
|
||||
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.6.tgz#379cccfb56b91c8601e4793356eb5382924de9ad"
|
||||
dependencies:
|
||||
glob "^7.0.0"
|
||||
interpret "^1.0.0"
|
||||
rechoir "^0.6.2"
|
||||
|
||||
smartchai@^1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/smartchai/-/smartchai-1.0.3.tgz#de6d010bb8b5aef24cb70b31a5f5334e8c41b72f"
|
||||
dependencies:
|
||||
"@types/chai" "^3.4.35"
|
||||
"@types/chai-as-promised" "0.0.29"
|
||||
"@types/chai-string" "^1.1.30"
|
||||
chai "^3.5.0"
|
||||
chai-as-promised "^6.0.0"
|
||||
chai-string "^1.3.0"
|
||||
|
||||
type-detect@0.1.1:
|
||||
version "0.1.1"
|
||||
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822"
|
||||
|
||||
type-detect@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2"
|
||||
|
||||
typings-global@*, typings-global@^1.0.14:
|
||||
version "1.0.14"
|
||||
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.14.tgz#ab682720a03d6b9278869fb5c30c30d7dc61d12c"
|
||||
dependencies:
|
||||
semver "^5.3.0"
|
||||
shelljs "^0.7.4"
|
||||
|
||||
typings-test@^1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/typings-test/-/typings-test-1.0.3.tgz#fbab895eb3f0c44842e73db059f65946b971e369"
|
||||
dependencies:
|
||||
"@types/mocha" "^2.2.31"
|
||||
typings-global "*"
|
||||
|
||||
wrappy@1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
Reference in New Issue
Block a user