@sync-in/server
Version:
The secure, open-source platform for file storage, sharing, collaboration, and sync
94 lines (93 loc) • 3.51 kB
JavaScript
/*
* Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>
* This file is part of Sync-in | The open source file sync and share solution
* See the LICENSE file for licensing details
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: Object.getOwnPropertyDescriptor(all, name).get
});
}
_export(exports, {
get AuthMailConfig () {
return AuthMailConfig;
},
get MailerConfig () {
return MailerConfig;
}
});
const _classtransformer = require("class-transformer");
const _classvalidator = require("class-validator");
function _ts_decorate(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function _ts_metadata(k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
}
let AuthMailConfig = class AuthMailConfig {
};
_ts_decorate([
(0, _classvalidator.IsString)(),
(0, _classvalidator.IsNotEmpty)(),
_ts_metadata("design:type", String)
], AuthMailConfig.prototype, "user", void 0);
_ts_decorate([
(0, _classvalidator.IsString)(),
(0, _classvalidator.IsNotEmpty)(),
_ts_metadata("design:type", String)
], AuthMailConfig.prototype, "pass", void 0);
let MailerConfig = class MailerConfig {
constructor(){
this.port = 25;
this.secure = false;
this.sender = 'Sync-in<notification@sync-in.com>';
this.debug = false;
this.logger = false;
}
};
_ts_decorate([
(0, _classvalidator.IsString)(),
(0, _classvalidator.IsNotEmpty)(),
_ts_metadata("design:type", String)
], MailerConfig.prototype, "host", void 0);
_ts_decorate([
(0, _classvalidator.IsInt)(),
(0, _classvalidator.Min)(0),
(0, _classvalidator.Max)(65535),
_ts_metadata("design:type", Number)
], MailerConfig.prototype, "port", void 0);
_ts_decorate([
(0, _classvalidator.IsOptional)(),
(0, _classvalidator.IsBoolean)(),
_ts_metadata("design:type", Boolean)
], MailerConfig.prototype, "secure", void 0);
_ts_decorate([
(0, _classvalidator.IsOptional)(),
(0, _classvalidator.IsObject)(),
(0, _classvalidator.ValidateNested)(),
(0, _classtransformer.Type)(()=>AuthMailConfig),
_ts_metadata("design:type", typeof AuthMailConfig === "undefined" ? Object : AuthMailConfig)
], MailerConfig.prototype, "auth", void 0);
_ts_decorate([
(0, _classvalidator.IsOptional)(),
(0, _classvalidator.IsString)(),
_ts_metadata("design:type", String)
], MailerConfig.prototype, "sender", void 0);
_ts_decorate([
(0, _classvalidator.IsOptional)(),
(0, _classvalidator.IsBoolean)(),
_ts_metadata("design:type", Boolean)
], MailerConfig.prototype, "debug", void 0);
_ts_decorate([
(0, _classvalidator.IsOptional)(),
(0, _classvalidator.IsBoolean)(),
_ts_metadata("design:type", Boolean)
], MailerConfig.prototype, "logger", void 0);
//# sourceMappingURL=mailer.config.js.map