smartnginx/dist/smartnginx.classes.nginxzone.js
2016-07-08 04:24:07 +02:00

27 lines
2.2 KiB
JavaScript

"use strict";
var plugins = require("./smartnginx.plugins");
var paths = require("./smartnginx.paths");
var snippets = require("./smartnginx.snippets");
(function (zoneTypes) {
zoneTypes[zoneTypes["reverseProxy"] = 0] = "reverseProxy";
zoneTypes[zoneTypes["static"] = 1] = "static";
})(exports.zoneTypes || (exports.zoneTypes = {}));
var zoneTypes = exports.zoneTypes;
var NginxZone = (function () {
function NginxZone(optionsArg) {
this.zoneName = optionsArg.zoneName;
this.type = optionsArg.type;
this.destination = optionsArg.destination;
this.configString = snippets.getZoneConfigString(optionsArg.zoneName, optionsArg.destination);
}
;
NginxZone.prototype.deploy = function () {
var filePath = plugins.path.join(paths.nginxZoneBase, this.zoneName + ".conf");
plugins.smartfile.memory.toFsSync(this.configString, filePath);
};
;
return NginxZone;
}());
exports.NginxZone = NginxZone;
;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRuZ2lueC5jbGFzc2VzLm5naW54em9uZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0bmdpbnguY2xhc3Nlcy5uZ2lueHpvbmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLElBQVksT0FBTyxXQUFNLHNCQUFzQixDQUFDLENBQUE7QUFDaEQsSUFBWSxLQUFLLFdBQU0sb0JBQW9CLENBQUMsQ0FBQTtBQUU1QyxJQUFZLFFBQVEsV0FBTSx1QkFDMUIsQ0FBQyxDQURnRDtBQUNqRCxXQUFZLFNBQVM7SUFDZCx5REFBWSxDQUFBO0lBQ1osNkNBQU0sQ0FBQTtBQUNiLENBQUMsRUFIVyxpQkFBUyxLQUFULGlCQUFTLFFBR3BCO0FBSEQsSUFBWSxTQUFTLEdBQVQsaUJBR1gsQ0FBQTtBQUVEO0lBS0ksbUJBQVksVUFJWDtRQUNHLElB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