UNPKG

reg-simple-keygen-plugin

Version:

Determine snapshot key with given values

25 lines 899 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SimpleKeygenPlugin = void 0; class SimpleKeygenPlugin { init(config) { this._logger = config.logger; this._options = config.options; } getExpectedKey() { if (!this._options.expectedKey || !this._options.expectedKey.length) { this._logger.warn("Expected key must be non null string."); return Promise.reject(null); } return Promise.resolve(this._options.expectedKey); } getActualKey() { if (!this._options.actualKey || !this._options.actualKey.length) { this._logger.warn("Actual key must be non null string."); return Promise.reject(null); } return Promise.resolve(this._options.actualKey); } } exports.SimpleKeygenPlugin = SimpleKeygenPlugin; //# sourceMappingURL=plugin.js.map