mirror of
https://github.com/joelwmale/webhook-action.git
synced 2024-11-26 01:16:56 +01:00
17 lines
712 B
JavaScript
17 lines
712 B
JavaScript
|
"use strict";
|
||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||
|
const fs = require("./adapters/fs");
|
||
|
class Settings {
|
||
|
constructor(_options = {}) {
|
||
|
this._options = _options;
|
||
|
this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
|
||
|
this.fs = fs.createFileSystemAdapter(this._options.fs);
|
||
|
this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
|
||
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
||
|
}
|
||
|
_getValue(option, value) {
|
||
|
return option !== null && option !== void 0 ? option : value;
|
||
|
}
|
||
|
}
|
||
|
exports.default = Settings;
|