kentico-cloud-delivery
Version:
Official Kentico Cloud Delivery SDK
32 lines • 1.18 kB
JavaScript
import { getParserAdapter } from '../../lib/parser/parser-adapter';
var Context = /** @class */ (function () {
function Context(options) {
/**
* Use browser version of html parser when running tests in browser
*/
this.richTextHtmlParser = getParserAdapter();
this.usePreviewMode = false;
this.useSecuredMode = false;
if (options) {
Object.assign(this, options);
}
}
Context.prototype.getConfig = function () {
return {
projectId: this.projectId,
typeResolvers: this.typeResolvers,
enableAdvancedLogging: this.enableAdvancedLogging,
enablePreviewMode: this.usePreviewMode,
previewApiKey: this.previewApiKey,
defaultLanguage: this.defaultLanguage,
baseUrl: this.baseUrl,
basePreviewUrl: this.basePreviewUrl,
enableSecuredMode: this.useSecuredMode,
securedApiKey: this.securedApiKey,
retryAttempts: this.retryAttempts
};
};
return Context;
}());
export { Context };
//# sourceMappingURL=context.js.map