diff --git a/dist/index.d.ts b/dist/index.d.ts
index a31e85d..7116ed8 100644
--- a/dist/index.d.ts
+++ b/dist/index.d.ts
@@ -1,6 +1,7 @@
-import SmartstringGit = require("./smartstring.git");
+import "typings-global";
import SmartstringDocker = require("./smartstring.docker");
import SmartstringTypescript = require("./smartstring.typescript");
-export declare let git: (stringArg: string, tokenArg?: string) => SmartstringGit.gitRepo;
+export { Domain } from "./smartstring.domain";
+export { GitRepo } from "./smartstring.git";
export declare let docker: typeof SmartstringDocker;
export declare let typescript: typeof SmartstringTypescript;
diff --git a/dist/index.js b/dist/index.js
index c95916a..29bd35f 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -1,10 +1,12 @@
"use strict";
-///
-var SmartstringGit = require("./smartstring.git");
+require("typings-global");
var SmartstringDocker = require("./smartstring.docker");
var SmartstringTypescript = require("./smartstring.typescript");
-exports.git = SmartstringGit.git;
+var smartstring_domain_1 = require("./smartstring.domain");
+exports.Domain = smartstring_domain_1.Domain;
+var smartstring_git_1 = require("./smartstring.git");
+exports.GitRepo = smartstring_git_1.GitRepo;
exports.docker = SmartstringDocker;
exports.typescript = SmartstringTypescript;
-//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSw0Q0FBNEM7QUFDNUMsSUFBTyxjQUFjLFdBQVcsbUJBQW1CLENBQUMsQ0FBQztBQUNyRCxJQUFPLGlCQUFpQixXQUFXLHNCQUFzQixDQUFDLENBQUM7QUFDM0QsSUFBTyxxQkFBcUIsV0FBVywwQkFBMEIsQ0FBQyxDQUFDO0FBRXhELFdBQUcsR0FBRyxjQUFjLENBQUMsR0FBRyxDQUFDO0FBQ3pCLGNBQU0sR0FBRyxpQkFBaUIsQ0FBQztBQUMzQixrQkFBVSxHQUFHLHFCQUFxQixDQUFDIiwiZmlsZSI6ImluZGV4LmpzIiwic291cmNlc0N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bWFydHN0cmluZ0RvY2tlciA9IHJlcXVpcmUoXCIuL3NtYXJ0c3RyaW5nLmRvY2tlclwiKTtcclxuaW1wb3J0IFNtYXJ0c3RyaW5nVHlwZXNjcmlwdCA9IHJlcXVpcmUoXCIuL3NtYXJ0c3RyaW5nLnR5cGVzY3JpcHRcIik7XHJcblxyXG5leHBvcnQge0RvbWFpbn0gZnJvbSBcIi4vc21hcnRzdHJpbmcuZG9tYWluXCI7XHJcbmV4cG9ydCB7R2l0UmVwb30gZnJvbSBcIi4vc21hcnRzdHJpbmcuZ2l0XCI7XHJcbmV4cG9ydCBsZXQgZG9ja2VyID0gU21hcnRzdHJpbmdEb2NrZXI7XHJcbmV4cG9ydCBsZXQgdHlwZXNjcmlwdCA9IFNtYXJ0c3RyaW5nVHlwZXNjcmlwdDsiXX0=
diff --git a/dist/smartstring.docker.d.ts b/dist/smartstring.docker.d.ts
index 2649299..ed570de 100644
--- a/dist/smartstring.docker.d.ts
+++ b/dist/smartstring.docker.d.ts
@@ -1,3 +1,4 @@
+import "typings-global";
/**
* converts an erray of env strings from docker remote api to an usable object.
* @param envArrayArg
diff --git a/dist/smartstring.docker.js b/dist/smartstring.docker.js
index e4eb100..92e69c7 100644
--- a/dist/smartstring.docker.js
+++ b/dist/smartstring.docker.js
@@ -1,4 +1,5 @@
"use strict";
+require("typings-global");
/**
* converts an erray of env strings from docker remote api to an usable object.
* @param envArrayArg
@@ -15,4 +16,4 @@ exports.makeEnvObject = function (envArrayArg) {
return returnObject;
};
-//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0c3RyaW5nLmRvY2tlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBR0E7Ozs7R0FJRztBQUNRLHFCQUFhLEdBQUcsVUFBUyxXQUFvQjtJQUNwRCxJQUFJLFlBQVksR0FBRyxFQUFFLENBQUM7SUFDdEIsSUFBSSxXQUFXLEdBQUcsV0F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VjdC5cclxuICogQHBhcmFtIGVudkFycmF5QXJnXHJcbiAqIEByZXR1cm5zIHt9XHJcbiAqL1xyXG5leHBvcnQgbGV0IG1ha2VFbnZPYmplY3QgPSBmdW5jdGlvbihlbnZBcnJheUFyZzpzdHJpbmdbXSl7XHJcbiAgICBsZXQgcmV0dXJuT2JqZWN0ID0ge307XHJcbiAgICBsZXQgcmVnZXhTdHJpbmcgPSAvKC4qKT0oLiopLztcclxuICAgIGZvcihsZXQgZW52S2V5IGluIGVudkFycmF5QXJnKXtcclxuICAgICAgICBsZXQgcmVnZXhNYXRjaGVzID0gcmVnZXhTdHJpbmcuZXhlYyhlbnZBcnJheUFyZ1tlbnZLZXldKTtcclxuICAgICAgICByZXR1cm5PYmplY3RbcmVnZXhNYXRjaGVzWzFdXSA9IHJlZ2V4TWF0Y2hlc1syXTtcclxuICAgIH07XHJcbiAgICByZXR1cm4gcmV0dXJuT2JqZWN0O1xyXG59OyJdfQ==
diff --git a/dist/smartstring.domain.d.ts b/dist/smartstring.domain.d.ts
new file mode 100644
index 0000000..fc50624
--- /dev/null
+++ b/dist/smartstring.domain.d.ts
@@ -0,0 +1,14 @@
+import "typings-global";
+export declare class Domain {
+ fullName: string;
+ level1: string;
+ level2: string;
+ level3: string;
+ level4: string;
+ level5: string;
+ protocol: string;
+ topLevel: string;
+ domainName: any;
+ subDomain: any;
+ constructor(domainStringArg: string);
+}
diff --git a/dist/smartstring.domain.js b/dist/smartstring.domain.js
new file mode 100644
index 0000000..6319435
--- /dev/null
+++ b/dist/smartstring.domain.js
@@ -0,0 +1,30 @@
+"use strict";
+require("typings-global");
+var Domain = (function () {
+ function Domain(domainStringArg) {
+ this.fullName = domainStringArg;
+ var regexMatches = domainRegex(domainStringArg);
+ this.level1 = regexMatches[0];
+ this.level2 = regexMatches[1];
+ this.level3 = regexMatches[2];
+ this.level4 = regexMatches[3];
+ this.level5 = regexMatches[4];
+ // aliases
+ this.topLevel = this.level1;
+ this.domainName = this.level2;
+ this.subDomain = this.level3;
+ }
+ return Domain;
+}());
+exports.Domain = Domain;
+var domainRegex = function (stringArg) {
+ var regexString = /([a-zA-Z0-9]*)\.{0,1}([a-zA-Z0-9]*)\.{0,1}([a-zA-Z0-9]*)\.{0,1}([a-zA-Z0-9]*)\.{0,1}([a-zA-Z0-9]*)\.{0,1}$/;
+ var regexMatches = regexString.exec(stringArg);
+ regexMatches.reverse();
+ var regexMatchesFiltered = regexMatches.filter(function (stringArg) {
+ return (stringArg != "");
+ });
+ return regexMatchesFiltered;
+};
+
+//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0c3RyaW5nLmRvbWFpbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsUUFBTyxnQkFDUCxDQUFDLENBRHNCO0FBR3ZCO0lBWUksZ0JBQVksZUFBc0I7UUFDOUIsSUFBSSxDQUFDLFFBQVEsR0FBRyxlQUFlLENBQUM7UUFDaEMsSUFBSSxZQUFZLEdBQUcsV0FBVyxDQUFDLGVBQWUsQ0FBQyxDQUFDO1FBQ2hELElBQUksQ0FBQyxNQUFNLEdBQUcsWUFBWSxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQzlCLElBQUksQ0FBQyxNQUFNLEdBQUcsWUFBWSxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQzlCLElBQUksQ0FBQyxNQUFNLEdBQUcsWUFBWSxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQzlCLElBQUksQ0FBQyxNQUFNLEdBQUcsWUFBWSxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQzlCLElBQUksQ0FBQyxNQUFNLEdBQUcsWUFBWSxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQzlCLFVBQVU7UUFDVixJQUFJLENBQUMsUUFBUSxHQUFHLElBQUksQ0FBQyxNQUFNLENBQUM7UUFDNUIsSUFBSSxDQUFDLFVBQVUsR0FBRyxJQUFJLENB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clxuICAgIGxldCByZWdleE1hdGNoZXNGaWx0ZXJlZCA9IHJlZ2V4TWF0Y2hlcy5maWx0ZXIoZnVuY3Rpb24oc3RyaW5nQXJnOnN0cmluZyl7XHJcbiAgICAgICAgcmV0dXJuKHN0cmluZ0FyZyAhPSBcIlwiKTtcclxuICAgIH0pO1xyXG4gICAgcmV0dXJuIHJlZ2V4TWF0Y2hlc0ZpbHRlcmVkO1xyXG59OyJdfQ==
diff --git a/dist/smartstring.git.d.ts b/dist/smartstring.git.d.ts
index b2dfd92..4fb01c9 100644
--- a/dist/smartstring.git.d.ts
+++ b/dist/smartstring.git.d.ts
@@ -1,4 +1,5 @@
-export declare class gitRepo {
+import "typings-global";
+export declare class GitRepo {
host: string;
user: string;
repo: string;
@@ -7,4 +8,3 @@ export declare class gitRepo {
httpsUrl: string;
constructor(stringArg: string, tokenArg?: string);
}
-export declare let git: (stringArg: string, tokenArg?: string) => gitRepo;
diff --git a/dist/smartstring.git.js b/dist/smartstring.git.js
index 6b07f82..92a4687 100644
--- a/dist/smartstring.git.js
+++ b/dist/smartstring.git.js
@@ -1,11 +1,11 @@
"use strict";
-///
+require("typings-global");
var plugins = require("./smartstring.plugins");
/* ---------------------------------------------- *
* ------------------ classes ------------------- *
* ---------------------------------------------- */
-var gitRepo = (function () {
- function gitRepo(stringArg, tokenArg) {
+var GitRepo = (function () {
+ function GitRepo(stringArg, tokenArg) {
var regexMatches = gitRegex(stringArg);
this.host = regexMatches[1];
this.user = regexMatches[2];
@@ -15,9 +15,9 @@ var gitRepo = (function () {
this.httpsUrl = gitLink(this.host, this.user, this.repo, this.accessToken, "https");
}
;
- return gitRepo;
+ return GitRepo;
}());
-exports.gitRepo = gitRepo;
+exports.GitRepo = GitRepo;
/* ---------------------------------------------- *
* ------------------ helpers ------------------- *
* ---------------------------------------------- */
@@ -47,12 +47,5 @@ var gitLink = function (hostArg, userArg, repoArg, tokenArg, linkTypeArg) {
}
return returnString;
};
-/* ---------------------------------------------- *
- * ------------------ exports ------------------- *
- * ---------------------------------------------- */
-exports.git = function (stringArg, tokenArg) {
- var localGitRepo = new gitRepo(stringArg, tokenArg);
- return localGitRepo;
-};
-//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0c3RyaW5nLmdpdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsNENBQTRDO0FBQzVDLElBQU8sT0FBTyxXQUFXLHVCQUF1QixDQUFDLENBQUM7QUFFbEQ7O29EQUVvRDtBQUNwRDtJQU9JLGlCQUFZLFNBQWdCLEVBQUMsUUFBZ0I7UUFDekMsSUFBSSxZQUFZLEdBQUcsUUFBUSxDQUFDLFNBQVMsQ0FBQyxDQUFDO1FBQ3ZDLElBQUksQ0FBQyxJQUFJLEdBQUcsWUFBWSxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQzVCLElBQUksQ0FBQyxJQUFJLEdBQUcsWUFBWSxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQzVCLElBQUksQ0FBQyxJQUFJLEdBQUcsWUFBWSxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQzVCLElBQUksQ0FBQyxXQUFXLEdBQUcsUUFBUSxDQUFDO1FBQzVCLElBQUksQ0FBQyxNQUFNLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxJQUFJLEVBQUMsSUFBSSxDQUFDLElBQUksRUFBQyxJQUFJLENBQUMsSUFBSSxFQUFDLElBQUksQ0FBQyxXQUFXLEVBQUUsS0FBSyxDQUFDLENBQUM7UUFDN0UsSUFBSSxDQUFDLFFBQVEsR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLElBQUksRUFBQyxJQUFJLENBQUMsSUFBSSxFQUFDLElBQUksQ0FBQyxJQUFJLEVBQUMsSUFBSSxDQUFDLFdBQVcsRUFBRSxPQUFPLENBQUMsQ0FBQztJQUNyRixDQUFDOztJQUNMLGNBQUM7QUFBRCxDQWhCQSx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WdleE1hdGNoZXM7XHJcbn07XHJcblxyXG5sZXQgZ2l0TGluayA9IGZ1bmN0aW9uKGhvc3RBcmc6c3RyaW5nLCB1c2VyQXJnOnN0cmluZywgcmVwb0FyZzpzdHJpbmcsIHRva2VuQXJnOnN0cmluZyA9IFwiXCIsIGxpbmtUeXBlQXJnKTpzdHJpbmd7XHJcbiAgICBsZXQgcmV0dXJuU3RyaW5nO1xyXG4gICAgaWYgKHRva2VuQXJnICE9PSBcIlwiKXtcclxuICAgICAgICB0b2tlbkFyZyA9IHRva2VuQXJnICsgXCJAXCJcclxuICAgIH1cclxuICAgIHN3aXRjaCAobGlua1R5cGVBcmcpIHtcclxuICAgICAgICBjYXNlIFwiaHR0cHNcIjpcclxuICAgICAgICAgICAgcmV0dXJuU3RyaW5nID0gIFwiaHR0cHM6Ly9cIiArXHJcbiAgICAgICAgICAgICAgICB0b2tlbkFyZyArIGhvc3RBcmcgKyBcIi9cIiArIHVzZXJBcmcgKyBcIi9cIiArIHJlcG9BcmcgKyBcIi5naXRcIjtcclxuICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgY2FzZSBcInNzaFwiOlxyXG4gICAgICAgICAgICByZXR1cm5TdHJpbmcgPSBcImdpdEBcIiArXHJcbiAgICAgICAgICAgICAgICBob3N0QXJnICsgXCI6XCIgKyB1c2VyQXJnICsgXCIvXCIgKyByZXBvQXJnICsgXCIuZ2l0XCI7XHJcbiAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgIHBsdWdpbnMuYmVhdXR5bG9nLmVycm9yKFwiTGluayBUeXBlIFwiICsgbGlua1R5cGVBcmcgKyBcIiBub3Qga25vd25cIik7XHJcbiAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgfVxyXG4gICAgcmV0dXJuIHJldHVyblN0cmluZztcclxufTsiXX0=
diff --git a/dist/smartstring.plugins.d.ts b/dist/smartstring.plugins.d.ts
index c0709dc..97148bf 100644
--- a/dist/smartstring.plugins.d.ts
+++ b/dist/smartstring.plugins.d.ts
@@ -1,4 +1,2 @@
-declare let plugins: {
- beautylog: any;
-};
-export = plugins;
+import "typings-global";
+export import beautylog = require("beautylog");
diff --git a/dist/smartstring.plugins.js b/dist/smartstring.plugins.js
index 2fa4c31..92b52e3 100644
--- a/dist/smartstring.plugins.js
+++ b/dist/smartstring.plugins.js
@@ -1,8 +1,5 @@
"use strict";
-///
-var plugins = {
- beautylog: require("beautylog")
-};
-module.exports = plugins;
+require("typings-global");
+exports.beautylog = require("beautylog");
-//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0c3RyaW5nLnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDRDQUE0QztBQUM1QyxJQUFJLE9BQU8sR0FBRztJQUNWLFNBQVMsRUFBRSxPQUFPLENBQUMsV0FBVyxDQUFDO0NBQ2xDLENBQUM7QUFFRixpQkFBUyxPQUFPLENBQUMiLCJmaWxlIjoic21hcnRzdHJpbmcucGx1Z2lucy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vLyA8cmVmZXJlbmNlIHBhdGg9XCIuL3R5cGluZ3MvbWFpbi5kLnRzXCIgLz5cclxubGV0IHBsdWdpbnMgPSB7XHJcbiAgICBiZWF1dHlsb2c6IHJlcXVpcmUoXCJiZWF1dHlsb2dcIilcclxufTtcclxuXHJcbmV4cG9ydCA9IHBsdWdpbnM7Il19
+//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0c3RyaW5nLnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sZ0JBRVAsQ0FBQyxDQUZzQjtBQUVULGlCQUFTLFdBQVcsV0FBVyxDQUFDLENBQUMiLCJmaWxlIjoic21hcnRzdHJpbmcucGx1Z2lucy5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBcInR5cGluZ3MtZ2xvYmFsXCJcclxuXHJcbmV4cG9ydCBpbXBvcnQgYmVhdXR5bG9nID0gcmVxdWlyZShcImJlYXV0eWxvZ1wiKTsiXX0=
diff --git a/dist/smartstring.typescript.d.ts b/dist/smartstring.typescript.d.ts
index bed6024..1b6a23a 100644
--- a/dist/smartstring.typescript.d.ts
+++ b/dist/smartstring.typescript.d.ts
@@ -1 +1,2 @@
+import "typings-global";
export declare let regexReferencePath: RegExp;
diff --git a/dist/smartstring.typescript.js b/dist/smartstring.typescript.js
index ae44fae..198c370 100644
--- a/dist/smartstring.typescript.js
+++ b/dist/smartstring.typescript.js
@@ -1,4 +1,5 @@
"use strict";
+require("typings-global");
exports.regexReferencePath = /\/\/\/\s*\s*[\\n]?/;
-//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0c3RyaW5nLnR5cGVzY3JpcHQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUVXLDBCQUFrQixHQUFHLDhEQUE4RCxDQUFBIiwiZmlsZSI6InNtYXJ0c3RyaW5nLnR5cGVzY3JpcHQuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgcGx1Z2lucyA9IHJlcXVpcmUoXCIuL3NtYXJ0c3RyaW5nLnBsdWdpbnNcIik7XHJcblxyXG5leHBvcnQgbGV0IHJlZ2V4UmVmZXJlbmNlUGF0aCA9IC9cXC9cXC9cXC9cXHMqPHJlZmVyZW5jZVxccytwYXRoXFxzKj1cXHMqW1wifCddLipbXCJ8J11cXHMqXFwvPlxccypbXFxcXG5dPy8iXX0=
+//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0c3RyaW5nLnR5cGVzY3JpcHQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sZ0JBQ1AsQ0FBQyxDQURzQjtBQUdaLDBCQUFrQixHQUFHLDhEQUE4RCxDQUFBIiwiZmlsZSI6InNtYXJ0c3RyaW5nLnR5cGVzY3JpcHQuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgXCJ0eXBpbmdzLWdsb2JhbFwiXHJcbmltcG9ydCBwbHVnaW5zID0gcmVxdWlyZShcIi4vc21hcnRzdHJpbmcucGx1Z2luc1wiKTtcclxuXHJcbmV4cG9ydCBsZXQgcmVnZXhSZWZlcmVuY2VQYXRoID0gL1xcL1xcL1xcL1xccyo8cmVmZXJlbmNlXFxzK3BhdGhcXHMqPVxccypbXCJ8J10uKltcInwnXVxccypcXC8+XFxzKltcXFxcbl0/LyJdfQ==
diff --git a/package.json b/package.json
index 93f93e9..30c5826 100644
--- a/package.json
+++ b/package.json
@@ -22,10 +22,12 @@
},
"homepage": "https://github.com/pushrocks/smartstring#readme",
"devDependencies": {
- "npmts": "^5.1.5",
- "should": "^8.3.1"
+ "npmts": "^5.1.13",
+ "should": "^8.4.0",
+ "typings-test": "^1.0.1"
},
"dependencies": {
- "beautylog": "^5.0.0"
+ "beautylog": "^5.0.6",
+ "typings-global": "^1.0.3"
}
}
diff --git a/test/test.d.ts b/test/test.d.ts
index c5adfed..e7cc8ee 100644
--- a/test/test.d.ts
+++ b/test/test.d.ts
@@ -1,2 +1 @@
-declare let smartstring: any;
-declare let should: any;
+import "typings-test";
diff --git a/test/test.js b/test/test.js
index 20e92e7..75bac34 100644
--- a/test/test.js
+++ b/test/test.js
@@ -1,9 +1,30 @@
-///
-var smartstring = require("../dist/index.js");
+"use strict";
+require("typings-test");
+var smartstring = require("../dist/index");
var should = require("should");
describe("smartstring", function () {
- describe(".git()", function () {
- var testGit = smartstring.git("git+https://github.com/pushrocks/smartstring.git");
+ describe(".Domain class", function () {
+ var testDomain;
+ it("should create a new Domain object", function () {
+ testDomain = new smartstring.Domain("level3D.level2D.level1D");
+ testDomain.should.be.instanceof(smartstring.Domain);
+ });
+ it("should have a .topLevel", function () {
+ testDomain.topLevel.should.equal("level1D");
+ });
+ it("should have a .level2", function () {
+ testDomain.level2.should.equal("level2D");
+ });
+ it("should have a .level3", function () {
+ testDomain.level3.should.equal("level3D");
+ });
+ });
+ describe(".Git class", function () {
+ var testGit;
+ it("should create a new Git class GitRepo", function () {
+ testGit = new smartstring.GitRepo("git+https://github.com/pushrocks/smartstring.git");
+ testGit.should.be.instanceof(smartstring.GitRepo);
+ });
it("should return a .host", function () {
testGit.host
.should.equal("github.com");
@@ -49,4 +70,4 @@ describe("smartstring", function () {
});
});
-//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsZ0RBQWdEO0FBQ2hELElBQUksV0FBVyxHQUFHLE9BQU8sQ0FBQyxrQkFBa0IsQ0FBQyxDQUFDO0FBQzlDLElBQUksTUFBTSxHQUFHLE9BQU8sQ0FBQyxRQUFRLENBQUMsQ0FBQztBQUUvQixRQUFRLENBQUMsYUFBYSxFQUFDO0lBQ25CLFFBQVEsQ0FBQyxRQUFRLEVBQUM7UUFDZCxJQUFJLE9BQU8sR0FBRyxXQUFXLENBQUMsR0FBRyxDQUFDLGtEQUFrRCxDQUFDLENBQUM7UUFDbEYsRUFBRSxDQUFDLHVCQUF1QixFQUFDO1lBQ3ZCLE9BQU8sQ0FBQyxJQUFJO2lCQUNQLE1BQU0sQ0FBQyxLQUFLLENBQUMsWUFBWSxDQUFDLENBQUM7UUFDcEMsQ0FBQyxDQUFDLENBQUM7UUFDSCxFQUFFLENBQUMsdUJBQXVCLEVBQUM7WUFDdkIsT0FBTyxDQUFDLElBQUk7aUJBQ1AsTUFBTSxDQUFDLEtBQUssQ0FBQyxXQUFXLENBQUMsQ0FBQztRQUNuQyxDQUFDLENBQUMsQ0FBQztRQUNILEVBQUUsQ0FBQyx1QkFBdU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5jZVBhdGgudGVzdChcIi8vLyA8cmVmZXJlbmNlIHBhdGg9JycgLz5cIilcclxuICAgICAgICAgICAgICAgICAgICAuc2hvdWxkLmJlLnRydWUoKTtcclxuICAgICAgICAgICAgICAgIHNtYXJ0c3RyaW5nLnR5cGVzY3JpcHQucmVnZXhSZWZlcmVuY2VQYXRoLnRlc3QoXCIvLy8gPHJlZmVyZW5jZXBhdGg9XFxcIlxcXCIgLz5cIilcclxuICAgICAgICAgICAgICAgICAgICAuc2hvdWxkLmJlLmZhbHNlKCk7XHJcbiAgICAgICAgICAgIH0pXHJcbiAgICAgICAgfSlcclxuICAgIH0pXHJcbn0pOyJdfQ==
diff --git a/test/test.ts b/test/test.ts
index 07c3373..67c35b4 100644
--- a/test/test.ts
+++ b/test/test.ts
@@ -1,10 +1,30 @@
-///
-let smartstring = require("../dist/index.js");
+import "typings-test"
+import * as smartstring from "../dist/index";
let should = require("should");
describe("smartstring",function(){
- describe(".git()",function(){
- let testGit = smartstring.git("git+https://github.com/pushrocks/smartstring.git");
+ describe(".Domain class",function(){
+ let testDomain:smartstring.Domain;
+ it("should create a new Domain object",function(){
+ testDomain = new smartstring.Domain("level3D.level2D.level1D");
+ testDomain.should.be.instanceof(smartstring.Domain);
+ });
+ it("should have a .topLevel",function(){
+ testDomain.topLevel.should.equal("level1D");
+ });
+ it("should have a .level2",function(){
+ testDomain.level2.should.equal("level2D");
+ });
+ it("should have a .level3",function(){
+ testDomain.level3.should.equal("level3D");
+ });
+ })
+ describe(".Git class",function(){
+ let testGit:smartstring.GitRepo;
+ it("should create a new Git class GitRepo",function(){
+ testGit = new smartstring.GitRepo("git+https://github.com/pushrocks/smartstring.git");
+ testGit.should.be.instanceof(smartstring.GitRepo);
+ })
it("should return a .host",function(){
testGit.host
.should.equal("github.com");
diff --git a/ts/index.ts b/ts/index.ts
index 3d48679..90189dd 100644
--- a/ts/index.ts
+++ b/ts/index.ts
@@ -1,8 +1,8 @@
-///
-import SmartstringGit = require("./smartstring.git");
+import "typings-global"
import SmartstringDocker = require("./smartstring.docker");
import SmartstringTypescript = require("./smartstring.typescript");
-export let git = SmartstringGit.git;
+export {Domain} from "./smartstring.domain";
+export {GitRepo} from "./smartstring.git";
export let docker = SmartstringDocker;
export let typescript = SmartstringTypescript;
\ No newline at end of file
diff --git a/ts/smartstring.docker.ts b/ts/smartstring.docker.ts
index bece546..fb29813 100644
--- a/ts/smartstring.docker.ts
+++ b/ts/smartstring.docker.ts
@@ -1,4 +1,4 @@
-///
+import "typings-global"
import plugins = require("./smartstring.plugins");
/**
diff --git a/ts/smartstring.domain.ts b/ts/smartstring.domain.ts
new file mode 100644
index 0000000..878b374
--- /dev/null
+++ b/ts/smartstring.domain.ts
@@ -0,0 +1,40 @@
+import "typings-global"
+import plugins = require("./smartstring.plugins");
+
+export class Domain {
+ fullName:string;
+ level1:string;
+ level2:string;
+ level3:string;
+ level4:string;
+ level5:string;
+ protocol:string;
+ //aliases
+ topLevel:string;
+ domainName;
+ subDomain;
+ constructor(domainStringArg:string){
+ this.fullName = domainStringArg;
+ let regexMatches = domainRegex(domainStringArg);
+ this.level1 = regexMatches[0];
+ this.level2 = regexMatches[1];
+ this.level3 = regexMatches[2];
+ this.level4 = regexMatches[3];
+ this.level5 = regexMatches[4];
+ // aliases
+ this.topLevel = this.level1;
+ this.domainName = this.level2;
+ this.subDomain = this.level3;
+ }
+}
+
+
+let domainRegex = function(stringArg:string){
+ let regexString = /([a-zA-Z0-9]*)\.{0,1}([a-zA-Z0-9]*)\.{0,1}([a-zA-Z0-9]*)\.{0,1}([a-zA-Z0-9]*)\.{0,1}([a-zA-Z0-9]*)\.{0,1}$/;
+ let regexMatches = regexString.exec(stringArg);
+ regexMatches.reverse();
+ let regexMatchesFiltered = regexMatches.filter(function(stringArg:string){
+ return(stringArg != "");
+ });
+ return regexMatchesFiltered;
+};
\ No newline at end of file
diff --git a/ts/smartstring.git.ts b/ts/smartstring.git.ts
index 54deac4..e5594dc 100644
--- a/ts/smartstring.git.ts
+++ b/ts/smartstring.git.ts
@@ -1,10 +1,10 @@
-///
+import "typings-global"
import plugins = require("./smartstring.plugins");
/* ---------------------------------------------- *
* ------------------ classes ------------------- *
* ---------------------------------------------- */
-export class gitRepo {
+export class GitRepo {
host:string;
user:string;
repo:string;
@@ -50,12 +50,4 @@ let gitLink = function(hostArg:string, userArg:string, repoArg:string, tokenArg:
break;
}
return returnString;
-};
-
-/* ---------------------------------------------- *
- * ------------------ exports ------------------- *
- * ---------------------------------------------- */
-export let git = function(stringArg:string,tokenArg?:string){
- let localGitRepo = new gitRepo(stringArg,tokenArg);
- return localGitRepo;
};
\ No newline at end of file
diff --git a/ts/smartstring.plugins.ts b/ts/smartstring.plugins.ts
index 41036f6..9744518 100644
--- a/ts/smartstring.plugins.ts
+++ b/ts/smartstring.plugins.ts
@@ -1,3 +1,3 @@
-///
+import "typings-global"
export import beautylog = require("beautylog");
\ No newline at end of file
diff --git a/ts/smartstring.typescript.ts b/ts/smartstring.typescript.ts
index e43c825..1333a20 100644
--- a/ts/smartstring.typescript.ts
+++ b/ts/smartstring.typescript.ts
@@ -1,3 +1,4 @@
+import "typings-global"
import plugins = require("./smartstring.plugins");
export let regexReferencePath = /\/\/\/\s*\s*[\\n]?/
\ No newline at end of file