woltlab-compiler
Version:
A compiler for WoltLab-Package Archives and WoltLab-Package Components
36 lines • 1.15 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const XMLEditor_1 = require("../../Serialization/XMLEditor");
const InstructionSet_1 = require("./InstructionSet");
/**
* Represents a collection of instructions for updating a package.
*/
class UpdateInstructionSet extends InstructionSet_1.InstructionSet {
/**
* Initializes a new instance of the `UpdateInstructionSet` class.
*/
constructor($package, fromVersion) {
super($package);
this.FromVersion = fromVersion;
}
/**
* Gets or sets the version to update the package from.
*/
get FromVersion() {
return this.fromVersion;
}
set FromVersion(value) {
this.fromVersion = value;
}
/**
* @inheritdoc
*/
Serialize() {
let editor = new XMLEditor_1.XMLEditor(super.Serialize());
editor.SetAttribute("type", "update");
editor.SetAttribute("fromversion", this.FromVersion);
return editor.Element;
}
}
exports.UpdateInstructionSet = UpdateInstructionSet;
//# sourceMappingURL=UpdateInstructionSet.js.map