UNPKG

woltlab-compiler

Version:

A compiler for WoltLab-Package Archives and WoltLab-Package Components

55 lines 1.69 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const util_1 = require("util"); const FileInstructionCompiler_1 = require("../../../Compilation/PackageSystem/Instructions/FileInstructionCompiler"); const FileSystemInstruction_1 = require("./FileSystemInstruction"); /** * Represents an instruction which uploads files for a specific application. */ class ApplicationFileSystemInstruction extends FileSystemInstruction_1.FileSystemInstruction { /** * Initializes a new instance of the `ApplicationFileSystemInstruction`. */ constructor(options) { super({ Source: options.Source, FileName: options.FileName }); /** * The application to upload the files to. */ this.application = null; if (!util_1.isNullOrUndefined(options.Application)) { this.Application = options.Application; } } /** * @inheritdoc */ get Type() { return "file"; } /** * Gets or sets the application to upload the files to. */ get Application() { return this.application; } set Application(value) { this.application = value; } /** * @inheritdoc */ get Compiler() { return new FileInstructionCompiler_1.FileInstructionCompiler(this); } /** * @inheritdoc */ MakeDefaultFileName(source) { return `${super.MakeDefaultFileName(source)}.tar`; } } exports.ApplicationFileSystemInstruction = ApplicationFileSystemInstruction; //# sourceMappingURL=ApplicationFileSystemInstruction.js.map