commit d99fd48813fae89d2d5948676f99768e989b0192 Author: Phil Kunz Date: Wed Jul 6 03:14:44 2016 +0200 initial diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d4cd8e8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +node_modules/ +nginxconfig/zones/ +coverage/ +docs/ \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..cab7fb3 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1 @@ +export { NginxConfig, NginxZone } from "./smartnginx.classes.nginxconfig"; diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..ec76fb5 --- /dev/null +++ b/dist/index.js @@ -0,0 +1,6 @@ +"use strict"; +// classes +var smartnginx_classes_nginxconfig_1 = require("./smartnginx.classes.nginxconfig"); +exports.NginxConfig = smartnginx_classes_nginxconfig_1.NginxConfig; +exports.NginxZone = smartnginx_classes_nginxconfig_1.NginxZone; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBRUEsVUFBVTtBQUNWLCtDQUFvQyxrQ0FBa0MsQ0FBQztBQUEvRCxtRUFBVztBQUFDLCtEQUFtRCJ9 \ No newline at end of file diff --git a/dist/smartnginx.classes.nginxconfig.d.ts b/dist/smartnginx.classes.nginxconfig.d.ts new file mode 100644 index 0000000..3d5eceb --- /dev/null +++ b/dist/smartnginx.classes.nginxconfig.d.ts @@ -0,0 +1,14 @@ +export declare enum ZoneTypes { +} +export declare class NginxConfig { + constructor(); + addZone(optionsArg: { + zoneName: string; + type: ZoneTypes; + }): void; + deploy(): void; + nginxStart(): void; + nginxStop(): void; +} +export declare class NginxZone { +} diff --git a/dist/smartnginx.classes.nginxconfig.js b/dist/smartnginx.classes.nginxconfig.js new file mode 100644 index 0000000..845c030 --- /dev/null +++ b/dist/smartnginx.classes.nginxconfig.js @@ -0,0 +1,31 @@ +"use strict"; +(function (ZoneTypes) { +})(exports.ZoneTypes || (exports.ZoneTypes = {})); +var ZoneTypes = exports.ZoneTypes; +var NginxConfig = (function () { + function NginxConfig() { + } + ; + NginxConfig.prototype.addZone = function (optionsArg) { + }; + NginxConfig.prototype.deploy = function () { + }; + ; + NginxConfig.prototype.nginxStart = function () { + }; + ; + NginxConfig.prototype.nginxStop = function () { + }; + ; + return NginxConfig; +}()); +exports.NginxConfig = NginxConfig; +; +var NginxZone = (function () { + function NginxZone() { + } + return NginxZone; +}()); +exports.NginxZone = NginxZone; +var mynginx = new NginxConfig(); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRuZ2lueC5jbGFzc2VzLm5naW54Y29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRuZ2lueC5jbGFzc2VzLm5naW54Y29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFFQSxXQUFZLFNBQVM7QUFFckIsQ0FBQyxFQUZXLGlCQUFTLEtBQVQsaUJBQVMsUUFFcEI7QUFGRCxJQUFZLFNBQVMsR0FBVCxpQkFFWCxDQUFBO0FBRUQ7SUFDSTtJQUVBLENBQUM7O0lBQ0QsNkJBQU8sR0FBUCxVQUFRLFVBR1A7SUFFRCxDQUFDO0lBQ0QsNEJBQU0sR0FBTjtJQUVBLENBQUM7O0lBQ0QsZ0NBQVUsR0FBVjtJQUVBLENBQUM7O0lBQ0QsK0JBQVMsR0FBVDtJQUVBLENBQUM7O0lBQ0wsa0JBQUM7QUFBRCxDQUFDLEFBbkJELElBbUJDO0FBbkJZLG1CQUFXLGNBbUJ2QixDQUFBO0FBQUEsQ0FBQztBQUVGO0lBQUE7SUFFQSxDQUFDO0lBQUQsZ0JBQUM7QUFBRCxDQUFDLEFBRkQsSUFFQztBQUZZLGlCQUFTLFlBRXJCLENBQUE7QUFFRCxJQUFJLE9BQU8sR0FBRyxJQUFJLFdBQVcsRUFBRSxDQUFDIn0= \ No newline at end of file diff --git a/dist/smartnginx.plugins.d.ts b/dist/smartnginx.plugins.d.ts new file mode 100644 index 0000000..0bf7550 --- /dev/null +++ b/dist/smartnginx.plugins.d.ts @@ -0,0 +1,3 @@ +export import cert = require("cert"); +export import q = require("q"); +export import smartfile = require("smartfile"); diff --git a/dist/smartnginx.plugins.js b/dist/smartnginx.plugins.js new file mode 100644 index 0000000..dcbbb74 --- /dev/null +++ b/dist/smartnginx.plugins.js @@ -0,0 +1,5 @@ +"use strict"; +exports.cert = require("cert"); +exports.q = require("q"); +exports.smartfile = require("smartfile"); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRuZ2lueC5wbHVnaW5zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRuZ2lueC5wbHVnaW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBYyxZQUFJLFdBQVcsTUFBTSxDQUFDLENBQUM7QUFDdkIsU0FBQyxXQUFXLEdBQUcsQ0FBQyxDQUFDO0FBQ2pCLGlCQUFTLFdBQVcsV0FBVyxDQUFDLENBQUMifQ== \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..a1ecc4b --- /dev/null +++ b/package.json @@ -0,0 +1,34 @@ +{ + "name": "smartnginx", + "version": "0.0.0", + "description": "control nginx from node", + "main": "dist/index.js", + "typings": "dist/index.d.ts", + "scripts": { + "test": "(npmts)" + }, + "repository": { + "type": "git", + "url": "git+ssh://git@gitlab.com/pushrocks/smartnginx.git" + }, + "keywords": [ + "nginx" + ], + "author": "Lossless GmbH", + "license": "MIT", + "bugs": { + "url": "https://gitlab.com/pushrocks/smartnginx/issues" + }, + "homepage": "https://gitlab.com/pushrocks/smartnginx#README", + "dependencies": { + "@types/q": "0.0.25-alpha", + "cert": "0.0.11", + "q": "^1.4.1", + "smartfile": "^4.0.10" + }, + "devDependencies": { + "npmts-g": "^5.2.6", + "should": "^9.0.2", + "typings-test": "^1.0.1" + } +} diff --git a/test/test.d.ts b/test/test.d.ts new file mode 100644 index 0000000..b973566 --- /dev/null +++ b/test/test.d.ts @@ -0,0 +1,2 @@ +import "typings-test"; +import "should"; diff --git a/test/test.js b/test/test.js new file mode 100644 index 0000000..cabfa46 --- /dev/null +++ b/test/test.js @@ -0,0 +1,4 @@ +"use strict"; +require("typings-test"); +require("should"); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sY0FBYyxDQUFDLENBQUE7QUFDdEIsUUFBTyxRQUFRLENBQUMsQ0FBQSJ9 \ No newline at end of file diff --git a/test/test.ts b/test/test.ts new file mode 100644 index 0000000..305518b --- /dev/null +++ b/test/test.ts @@ -0,0 +1,3 @@ +import "typings-test"; +import "should"; +import smartnginx from "../dist/index" \ No newline at end of file diff --git a/ts/index.ts b/ts/index.ts new file mode 100644 index 0000000..efe1cec --- /dev/null +++ b/ts/index.ts @@ -0,0 +1,4 @@ +import * as plugins from "./smartnginx.plugins"; + +// classes +export {NginxConfig,NginxZone} from "./smartnginx.classes.nginxconfig"; \ No newline at end of file diff --git a/ts/smartnginx.classes.nginxconfig.ts b/ts/smartnginx.classes.nginxconfig.ts new file mode 100644 index 0000000..7362fe6 --- /dev/null +++ b/ts/smartnginx.classes.nginxconfig.ts @@ -0,0 +1,47 @@ +import * as plugins from "./smartnginx.plugins"; + +export enum ZoneTypes { + +} + +export class NginxConfig { + zones:NginxZone[]; + constructor(){ + + }; + + // interact with Zones + addZone(zoneArg:NginxZone){ + + } + listZones():NginxZone[] { + return this.zones; + }; + removeZones(zoneArg:NginxZone){ + + } + + // handle deployment of zones + deploy(){ + + }; + nginxStart(){ + + }; + nginxStop(){ + + }; +}; + +export class NginxZone { + domain + constructor(optionsArg:{ + zoneName:string, + type:ZoneTypes, + destination:string + }){ + + } +} + +let mynginx = new NginxConfig(); \ No newline at end of file diff --git a/ts/smartnginx.plugins.ts b/ts/smartnginx.plugins.ts new file mode 100644 index 0000000..55177e3 --- /dev/null +++ b/ts/smartnginx.plugins.ts @@ -0,0 +1,3 @@ +export import cert = require("cert"); +export import q = require("q"); +export import smartfile = require("smartfile"); \ No newline at end of file