24 lines
1.9 KiB
JavaScript
24 lines
1.9 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.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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRuZ2lueC5jbGFzc2VzLm5naW54em9uZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0bmdpbnguY2xhc3Nlcy5uZ2lueHpvbmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLElBQVksT0FBTyxXQUFNLHNCQUFzQixDQUFDLENBQUE7QUFDaEQsSUFBWSxLQUFLLFdBQU0sb0JBQW9CLENBQUMsQ0FBQTtBQUU1QyxJQUFZLFFBQVEsV0FBTSx1QkFDMUIsQ0FBQyxDQURnRDtBQUNqRCxXQUFZLFNBQVM7SUFDZCx5REFBWSxDQUFBO0lBQ1osNkNBQU0sQ0FBQTtBQUNiLENBQUMsRUFIVyxpQkFBUyxLQUFULGlCQUFTLFFBR3BCO0FBSEQsSUF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