Skip to content

Commit

Permalink
refactor(cli): move options definitions around
Browse files Browse the repository at this point in the history
Summary: Move command line options definitions into subfolders based on their category for better organization

Differential Revision: D39776865

fbshipit-source-id: c022ae4d906c6d9d6d5e8255808dc6a920776f1d
  • Loading branch information
JacksonGL authored and facebook-github-bot committed Sep 26, 2022
1 parent 099f94f commit 23b7102
Show file tree
Hide file tree
Showing 22 changed files with 43 additions and 43 deletions.
8 changes: 4 additions & 4 deletions packages/cli/src/commands/MemLabRunCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import CheckLeakCommand from './heap/CheckLeakCommand';
import InitDirectoryCommand from './InitDirectoryCommand';
import TakeSnapshotCommand from './snapshot/TakeSnapshotCommand';
import SetWorkingDirectoryOption from '../options/SetWorkingDirectoryOption';
import AppOption from '../options/AppOption';
import InteractionOption from '../options/InteractionOption';
import SkipSnapshotOption from '../options/SkipSnapshotOption';
import RunningModeOption from '../options/RunningModeOption';
import AppOption from '../options/e2e/AppOption';
import InteractionOption from '../options/e2e/InteractionOption';
import SkipSnapshotOption from '../options/e2e/SkipSnapshotOption';
import RunningModeOption from '../options/e2e/RunningModeOption';
import BaselineFileOption from '../options/heap/BaselineFileOption';
import TargetFileOption from '../options/heap/TargetFileOption';
import FinalFileOption from '../options/heap/FinalFileOption';
Expand Down
28 changes: 14 additions & 14 deletions packages/cli/src/commands/RunMeasureCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ import InitDirectoryCommand from './InitDirectoryCommand';
import {modes, config, BaseOption} from '@memlab/core';
import CleanRunDataCommand from './CleanRunDataCommand';
import {runPageInteractionFromCLI} from './snapshot/Snapshot';
import AppOption from '../options/AppOption';
import FullExecutionOption from '../options/FullExecutionOption';
import InteractionOption from '../options/InteractionOption';
import SkipScreenshotOption from '../options/SkipScreenshotOption';
import SkipSnapshotOption from '../options/SkipSnapshotOption';
import SkipGCOption from '../options/SkipGCOption';
import SkipScrollOption from '../options/SkipScrollOption';
import SkipExtraOperationOption from '../options/SkipExtraOperationOption';
import RunningModeOption from '../options/RunningModeOption';
import RemoteBrowserDebugOption from '../options/RemoteBrowserDebugOption';
import ScenarioFileOption from '../options/ScenarioFileOption';
import SetDeviceOption from '../options/SetDeviceOption';
import DisableXvfbOption from '../options/DisableXvfbOption';
import AppOption from '../options/e2e/AppOption';
import FullExecutionOption from '../options/e2e/FullExecutionOption';
import InteractionOption from '../options/e2e/InteractionOption';
import SkipScreenshotOption from '../options/e2e/SkipScreenshotOption';
import SkipSnapshotOption from '../options/e2e/SkipSnapshotOption';
import SkipGCOption from '../options/e2e/SkipGCOption';
import SkipScrollOption from '../options/e2e/SkipScrollOption';
import SkipExtraOperationOption from '../options/e2e/SkipExtraOperationOption';
import RunningModeOption from '../options/e2e/RunningModeOption';
import RemoteBrowserDebugOption from '../options/e2e/RemoteBrowserDebugOption';
import ScenarioFileOption from '../options/e2e/ScenarioFileOption';
import SetDeviceOption from '../options/e2e/SetDeviceOption';
import DisableXvfbOption from '../options/e2e/DisableXvfbOption';
import NumberOfRunsOption from '../options/NumberOfRunsOption';
import HeadfulBrowserOption from '../options/HeadfulBrowserOption';
import HeadfulBrowserOption from '../options/e2e/HeadfulBrowserOption';

export default class RunMeasureCommand extends BaseCommand {
getCommandName(): string {
Expand Down
18 changes: 9 additions & 9 deletions packages/cli/src/commands/WarmupAppCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ import {BaseOption} from '@memlab/core';
import BaseCommand from '../BaseCommand';
import {warmup} from '@memlab/api';
import InitDirectoryCommand from './InitDirectoryCommand';
import AppOption from '../options/AppOption';
import InteractionOption from '../options/InteractionOption';
import RunningModeOption from '../options/RunningModeOption';
import RemoteBrowserDebugOption from '../options/RemoteBrowserDebugOption';
import ScenarioFileOption from '../options/ScenarioFileOption';
import SetDeviceOption from '../options/SetDeviceOption';
import DisableXvfbOption from '../options/DisableXvfbOption';
import SkipWarmupOption from '../options/SkipWarmupOption';
import AppOption from '../options/e2e/AppOption';
import InteractionOption from '../options/e2e/InteractionOption';
import RunningModeOption from '../options/e2e/RunningModeOption';
import RemoteBrowserDebugOption from '../options/e2e/RemoteBrowserDebugOption';
import ScenarioFileOption from '../options/e2e/ScenarioFileOption';
import SetDeviceOption from '../options/e2e/SetDeviceOption';
import DisableXvfbOption from '../options/e2e/DisableXvfbOption';
import SkipWarmupOption from '../options/e2e/SkipWarmupOption';
import CheckXvfbSupportCommand from './snapshot/CheckXvfbSupportCommand';
import HeadfulBrowserOption from '../options/HeadfulBrowserOption';
import HeadfulBrowserOption from '../options/e2e/HeadfulBrowserOption';

export default class FBWarmupAppCommand extends BaseCommand {
getCommandName(): string {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/heap/GetRetainerTraceCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import BaseCommand, {CommandCategory} from '../../BaseCommand';
import {BaseOption, analysis, utils} from '@memlab/core';
import SnapshotFileOption from '../../options/heap/SnapshotFileOption';
import JSEngineOption from '../../options/heap/JSEngineOption';
import HeapNodeIdOption from '../../options/HeapNodeIdOption';
import HeapNodeIdOption from '../../options/heap/HeapNodeIdOption';
import SnapshotDirectoryOption from '../../options/heap/SnapshotDirectoryOption';
import {fileManager} from '@memlab/core';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import BaseCommand, {CommandCategory} from '../../../BaseCommand';
import SnapshotFileOption from '../../../options/heap/SnapshotFileOption';
import JSEngineOption from '../../../options/heap/JSEngineOption';
import CliScreen from './ui-components/CliScreen';
import HeapNodeIdOption from '../../../options/HeapNodeIdOption';
import HeapNodeIdOption from '../../../options/heap/HeapNodeIdOption';
import MLClusteringOption from '../../../options/MLClusteringOption';

export default class InteractiveHeapViewCommand extends BaseCommand {
Expand Down
28 changes: 14 additions & 14 deletions packages/cli/src/commands/snapshot/TakeSnapshotCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ import BaseCommand from '../../BaseCommand';
import {runPageInteractionFromCLI} from './Snapshot';
import CleanRunDataCommand from '../CleanRunDataCommand';
import {BaseOption} from '@memlab/core';
import FullExecutionOption from '../../options/FullExecutionOption';
import AppOption from '../../options/AppOption';
import InteractionOption from '../../options/InteractionOption';
import SkipSnapshotOption from '../../options/SkipSnapshotOption';
import SkipScreenshotOption from '../../options/SkipScreenshotOption';
import SkipGCOption from '../../options/SkipGCOption';
import SkipScrollOption from '../../options/SkipScrollOption';
import SkipExtraOperationOption from '../../options/SkipExtraOperationOption';
import RunningModeOption from '../../options/RunningModeOption';
import RemoteBrowserDebugOption from '../../options/RemoteBrowserDebugOption';
import ScenarioFileOption from '../../options/ScenarioFileOption';
import SetDeviceOption from '../../options/SetDeviceOption';
import DisableXvfbOption from '../../options/DisableXvfbOption';
import FullExecutionOption from '../../options/e2e/FullExecutionOption';
import AppOption from '../../options/e2e/AppOption';
import InteractionOption from '../../options/e2e/InteractionOption';
import SkipSnapshotOption from '../../options/e2e/SkipSnapshotOption';
import SkipScreenshotOption from '../../options/e2e/SkipScreenshotOption';
import SkipGCOption from '../../options/e2e/SkipGCOption';
import SkipScrollOption from '../../options/e2e/SkipScrollOption';
import SkipExtraOperationOption from '../../options/e2e/SkipExtraOperationOption';
import RunningModeOption from '../../options/e2e/RunningModeOption';
import RemoteBrowserDebugOption from '../../options/e2e/RemoteBrowserDebugOption';
import ScenarioFileOption from '../../options/e2e/ScenarioFileOption';
import SetDeviceOption from '../../options/e2e/SetDeviceOption';
import DisableXvfbOption from '../../options/e2e/DisableXvfbOption';
import InitDirectoryCommand from '../InitDirectoryCommand';
import CheckXvfbSupportCommand from './CheckXvfbSupportCommand';
import HeadfulBrowserOption from '../../options/HeadfulBrowserOption';
import HeadfulBrowserOption from '../../options/e2e/HeadfulBrowserOption';

export default class TakeSnapshotCommand extends BaseCommand {
getCommandName(): string {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 23b7102

Please sign in to comment.