UNPKG

@manuth/generator-wsc-package

Version:

A Generator for WoltLab Suite Core Packages.

51 lines 2.12 kB
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; import { TSProjectExtensionsProcessor } from "@manuth/generator-ts-project"; /** * Provides the functionality to process extensions for {@link WoltLabGenerator `WoltLabGenerator<TSettings, TOptions>`}s. * * @template TSettings * The type of the settings of the generator. * * @template TOptions * The type of the options of the generator. */ export class WoltLabExtensionsProcessor extends TSProjectExtensionsProcessor { /** * Initializes a new instance of the {@link WoltLabExtensionsProcessor `WoltLabExtensionsProcessor<TSettings, TOptions>`} class. * * @param component * The component of the processor. */ constructor(component) { super(component); } /** * @inheritdoc * * @param recommendations * The recommendations to filter. * * @returns * All necessary recommendations. */ FilterRecommendations(recommendations) { const _super = Object.create(null, { FilterRecommendations: { get: () => super.FilterRecommendations } }); return __awaiter(this, void 0, void 0, function* () { return (yield _super.FilterRecommendations.call(this, recommendations)).filter((extension) => { return !(extension.includes("test-explorer") || extension.includes("test-adapter")); }); }); } } //# sourceMappingURL=WoltLabExtensionsProcessor.js.map