/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ import type { Package } from "@fluidframework/build-tools"; import { type Command } from "@oclif/core"; import { type PackageFilterOptions, type PackageKind, type PackageSelectionCriteria, type PackageWithKind } from "./filter.js"; import { type PackageSelectionDefault } from "./flags.js"; import { BaseCommand } from "./library/index.js"; /** * Commands that run operations per project. */ export declare abstract class PackageCommand extends BaseCommand { static readonly flags: { private: import("@oclif/core/interfaces").BooleanFlag; scope: import("@oclif/core/interfaces").OptionFlag; skipScope: import("@oclif/core/interfaces").OptionFlag; all: import("@oclif/core/interfaces").BooleanFlag; dir: import("@oclif/core/interfaces").OptionFlag; packages: import("@oclif/core/interfaces").BooleanFlag; releaseGroup: import("@oclif/core/interfaces").OptionFlag<("client" | "server" | "build-tools" | "all" | "gitrest" | "historian")[] | undefined, import("@oclif/core/interfaces").CustomOptions>; releaseGroupRoot: import("@oclif/core/interfaces").OptionFlag<("client" | "server" | "build-tools" | "all" | "gitrest" | "historian")[] | undefined, import("@oclif/core/interfaces").CustomOptions>; changed: import("@oclif/core/interfaces").BooleanFlag; branch: import("@oclif/core/interfaces").OptionFlag; concurrency: import("@oclif/core/interfaces").OptionFlag; }; /** * The default to use as selection criteria when none is explicitly provided by the user. This enables commands * without flags to operate on a collection of packages by default that make sense based on the command. */ protected abstract get defaultSelection(): PackageSelectionDefault; protected abstract set defaultSelection(value: PackageSelectionDefault); protected filterOptions: PackageFilterOptions | undefined; protected selectionOptions: PackageSelectionCriteria | undefined; /** * An array of packages selected based on the selection criteria. * * @remarks * * Note that these packages are not necessarily the ones that are acted on. Packages are selected, then that list is * further narrowed by filtering criteria, so this array may contain packages that are not acted on. */ protected selectedPackages: PackageWithKind[] | undefined; /** * The list of packages after all filters are applied to the selected packages. */ protected filteredPackages: PackageWithKind[] | undefined; /** * Called for each package that is selected/filtered based on the filter flags passed in to the command. * * @param pkg - The package being processed. * @param kind - The kind of the package. * @typeparam TPkg - Type of the package-like object being processed. */ protected abstract processPackage(pkg: TPkg, kind: PackageKind): Promise; protected parseFlags(): void; protected selectAndFilterPackages(): Promise; run(): Promise; /** * Runs the processPackage method on each package in the provided array. * * @returns An array of error strings. If the array is not empty, at least one of the calls to processPackage failed. */ protected processPackages(packages: PackageWithKind[]): Promise; } //# sourceMappingURL=BasePackageCommand.d.ts.map