mongodb-stitch
Version:
[](https://gitter.im/mongodb/stitch?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
53 lines • 2.44 kB
JavaScript
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import { StitchClientConfiguration } from "./StitchClientConfiguration";
var StitchAppClientConfiguration = (function (_super) {
__extends(StitchAppClientConfiguration, _super);
function StitchAppClientConfiguration(config, localAppName, localAppVersion) {
var _this = _super.call(this, config.baseUrl, config.storage, config.dataDirectory, config.transport) || this;
_this.localAppVersion = localAppVersion;
_this.localAppName = localAppName;
return _this;
}
StitchAppClientConfiguration.prototype.builder = function () {
return new StitchAppClientConfiguration.Builder(this);
};
return StitchAppClientConfiguration;
}(StitchClientConfiguration));
export { StitchAppClientConfiguration };
(function (StitchAppClientConfiguration) {
var Builder = (function (_super) {
__extends(Builder, _super);
function Builder(config) {
var _this = _super.call(this, config) || this;
if (config) {
_this.localAppVersion = config.localAppVersion;
_this.localAppName = config.localAppName;
}
return _this;
}
Builder.prototype.withLocalAppName = function (localAppName) {
this.localAppName = localAppName;
return this;
};
Builder.prototype.withLocalAppVersion = function (localAppVersion) {
this.localAppVersion = localAppVersion;
return this;
};
Builder.prototype.build = function () {
var config = _super.prototype.build.call(this);
return new StitchAppClientConfiguration(config, this.localAppName, this.localAppVersion);
};
return Builder;
}(StitchClientConfiguration.Builder));
StitchAppClientConfiguration.Builder = Builder;
})(StitchAppClientConfiguration || (StitchAppClientConfiguration = {}));
//# sourceMappingURL=StitchAppClientConfiguration.js.map