This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.
2021-04-02 02:24:13 +03:00

22 lines
788 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function getHistoryItem(config, name) {
var _a, _b, _c;
return (_c = (_b = (_a = config._internal) === null || _a === void 0 ? void 0 : _a.pluginHistory) === null || _b === void 0 ? void 0 : _b[name]) !== null && _c !== void 0 ? _c : null;
}
exports.getHistoryItem = getHistoryItem;
function addHistoryItem(config, item) {
if (!config._internal) {
config._internal = {};
}
if (!config._internal.pluginHistory) {
config._internal.pluginHistory = {};
}
if (!item.version) {
item.version = 'UNVERSIONED';
}
config._internal.pluginHistory[item.name] = item;
return config;
}
exports.addHistoryItem = addHistoryItem;
//# sourceMappingURL=history.js.map