Refactor: Reorganize command structure and update related files
- Add command_registry.dart for centralized command registration - Move util commands to appropriate directories (build, file, infra, notification) - Update application.dart and all affected command files
This commit is contained in:
parent
144f46bf65
commit
5066310567
41 changed files with 301 additions and 120 deletions
|
|
@ -9,6 +9,7 @@ import 'package:dart_framework/utils/string_util.dart';
|
|||
import 'package:dart_framework/utils/system_util.dart';
|
||||
import 'package:oto_cli/cli/cli.dart';
|
||||
import 'package:oto_cli/oto/commands/command.dart';
|
||||
import 'package:oto_cli/oto/commands/command_registry.dart';
|
||||
import 'package:oto_cli/oto/core/defined_data.dart';
|
||||
import 'package:oto_cli/oto/pipeline/pipeline.dart';
|
||||
import 'package:oto_cli/oto/data/command_data.dart';
|
||||
|
|
@ -64,6 +65,7 @@ class Application {
|
|||
_buildType = buildType;
|
||||
_logEnable = logEnable;
|
||||
setUTF8();
|
||||
registerAllCommands();
|
||||
|
||||
DataBuild build;
|
||||
DataComposer? composer;
|
||||
|
|
|
|||
|
|
@ -22,3 +22,7 @@ class AwsCli extends Command {
|
|||
return await completeProcess(process, command);
|
||||
}
|
||||
}
|
||||
|
||||
void registerAwsCliCommand() {
|
||||
Command.register(CommandType.AwsCli, () => AwsCli());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,3 +20,7 @@ class CreateAppData extends Command {
|
|||
return complete(0, command);
|
||||
}
|
||||
}
|
||||
|
||||
void registerAppDataCreatorCommands() {
|
||||
Command.register(CommandType.CreateAppData, () => CreateAppData());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,3 +34,7 @@ class BuildDart extends Command {
|
|||
return await completeProcess(process, command);
|
||||
}
|
||||
}
|
||||
|
||||
void registerBuildDartCommands() {
|
||||
Command.register(CommandType.BuildDart, () => BuildDart());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import 'dart:async';
|
|||
import 'dart:io';
|
||||
import 'package:dart_framework/utils/system_util.dart';
|
||||
import 'package:oto_cli/oto/commands/build/build_dart.dart';
|
||||
import 'package:oto_cli/oto/commands/command.dart';
|
||||
import 'package:oto_cli/oto/data/command_data.dart';
|
||||
// ignore: depend_on_referenced_packages
|
||||
import 'package:path/path.dart' as path;
|
||||
|
|
@ -54,3 +55,7 @@ class BuildDartCompile extends BuildDart {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void registerBuildDartCompileCommands() {
|
||||
Command.register(CommandType.BuildDartCompile, () => BuildDartCompile());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,3 +24,7 @@ class BuildDotNet extends Command {
|
|||
return await completeProcess(process, command);
|
||||
}
|
||||
}
|
||||
|
||||
void registerBuildDotNetCommands() {
|
||||
Command.register(CommandType.BuildDotNet, () => BuildDotNet());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import 'dart:async';
|
|||
|
||||
import 'package:dart_framework/utils/system_util.dart';
|
||||
import 'package:oto_cli/oto/commands/build/build_dart.dart';
|
||||
import 'package:oto_cli/oto/commands/command.dart';
|
||||
import 'package:oto_cli/oto/data/command_data.dart';
|
||||
|
||||
// ignore: constant_identifier_names
|
||||
|
|
@ -22,3 +23,7 @@ class BuildFlutter extends BuildDart {
|
|||
return dataFutrue(shell);
|
||||
}
|
||||
}
|
||||
|
||||
void registerBuildFlutterCommands() {
|
||||
Command.register(CommandType.BuildFlutter, () => BuildFlutter());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -569,3 +569,13 @@ class ExportiOS extends Command {
|
|||
return await completeProcess(process, command);
|
||||
}
|
||||
}
|
||||
|
||||
void registerBuildIosCommands() {
|
||||
Command.register(CommandType.BuildiOS, () => BuildiOS());
|
||||
Command.register(CommandType.ArchiveiOS, () => ArchiveiOS());
|
||||
Command.register(CommandType.ExportiOS, () => ExportiOS());
|
||||
Command.register(CommandType.CodeSign, () => CodeSign());
|
||||
Command.register(CommandType.CodeSignVerify, () => CodeSignVerify());
|
||||
Command.register(CommandType.ProductBuild, () => ProductBuild());
|
||||
Command.register(CommandType.Notarize, () => Notarize());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,3 +32,7 @@ class BuildMSBuild extends Command {
|
|||
return await completeProcess(process, command);
|
||||
}
|
||||
}
|
||||
|
||||
void registerBuildMsbuildCommands() {
|
||||
Command.register(CommandType.BuildMSBuild, () => BuildMSBuild());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,3 +51,7 @@ class PublishiOS extends Command {
|
|||
return complete(0, command);
|
||||
}
|
||||
}
|
||||
|
||||
void registerPublishIosCommands() {
|
||||
Command.register(CommandType.PublishiOS, () => PublishiOS());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,3 +107,9 @@ class TestflightDistribute extends Command {
|
|||
return await completeProcess(process, command, passExitCodes: [1]);
|
||||
}
|
||||
}
|
||||
|
||||
void registerTestflightCommands() {
|
||||
Command.register(CommandType.TestflightUpload, () => TestflightUpload());
|
||||
Command.register(CommandType.TestflightStatusCheck, () => TestflightStatusCheck());
|
||||
Command.register(CommandType.TestflightDistribute, () => TestflightDistribute());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,3 +55,7 @@ puts "✅ {ADD_FILE_PATH} 파일이 프로젝트에 추가되고, Copy Bundle Re
|
|||
return await completeProcess(process, command);
|
||||
}
|
||||
}
|
||||
|
||||
void registerXcodeprojCommands() {
|
||||
Command.register(CommandType.XcodeprojAddFile, () => XcodeprojAddFile());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,46 +6,8 @@ import 'package:dart_framework/platform/process.dart';
|
|||
import 'package:dart_framework/utils/path.dart';
|
||||
import 'package:dart_framework/utils/system_util.dart';
|
||||
import 'package:oto_cli/oto/application.dart';
|
||||
import 'package:oto_cli/oto/commands/build/app_data_creator.dart';
|
||||
import 'package:oto_cli/oto/commands/build/build_dart.dart';
|
||||
import 'package:oto_cli/oto/commands/build/build_dart_compile.dart';
|
||||
import 'package:oto_cli/oto/commands/build/build_dot_net.dart';
|
||||
import 'package:oto_cli/oto/commands/build/build_flutter.dart';
|
||||
import 'package:oto_cli/oto/commands/build/build_ios.dart';
|
||||
import 'package:oto_cli/oto/commands/build/build_msbuild.dart';
|
||||
import 'package:oto_cli/oto/commands/build/testflight_ios.dart';
|
||||
import 'package:oto_cli/oto/commands/build/xcodeproj.dart';
|
||||
import 'package:oto_cli/oto/commands/file/directory.dart';
|
||||
import 'package:oto_cli/oto/commands/file/file.dart';
|
||||
import 'package:oto_cli/oto/commands/file/file_diff_check.dart';
|
||||
import 'package:oto_cli/oto/commands/ftp/download.dart';
|
||||
import 'package:oto_cli/oto/commands/git/git.dart';
|
||||
import 'package:oto_cli/oto/commands/aws/awscli.dart';
|
||||
import 'package:oto_cli/oto/commands/docker/docker.dart';
|
||||
import 'package:oto_cli/oto/commands/git/git_hub.dart';
|
||||
import 'package:oto_cli/oto/commands/gradle/gradle.dart';
|
||||
import 'package:oto_cli/oto/commands/jenkins/jenkins.dart';
|
||||
import 'package:oto_cli/oto/commands/jira/jira.dart';
|
||||
import 'package:oto_cli/oto/commands/process/process.dart';
|
||||
import 'package:oto_cli/oto/commands/proto/protobuf.dart';
|
||||
import 'package:oto_cli/oto/commands/util/json.dart';
|
||||
import 'package:oto_cli/oto/commands/notification/mattermost.dart';
|
||||
import 'package:oto_cli/oto/commands/util/print.dart';
|
||||
import 'package:oto_cli/oto/commands/util/set_value.dart';
|
||||
import 'package:oto_cli/oto/commands/infra/smb_authorize.dart';
|
||||
import 'package:oto_cli/oto/commands/util/string_util.dart';
|
||||
import 'package:oto_cli/oto/commands/util/timer.dart';
|
||||
import 'package:oto_cli/oto/commands/web/web.dart';
|
||||
import 'package:oto_cli/oto/data/command_data.dart';
|
||||
import 'package:oto_cli/oto/data/jenkins_data.dart';
|
||||
import 'package:oto_cli/oto/commands/file/delete.dart';
|
||||
import 'package:oto_cli/oto/commands/file/rename.dart';
|
||||
import 'package:oto_cli/oto/commands/shell/shell.dart';
|
||||
import 'package:oto_cli/oto/commands/file/copy.dart';
|
||||
import 'package:oto_cli/oto/commands/build/publish_ios.dart';
|
||||
import 'package:oto_cli/oto/commands/notification/slack.dart';
|
||||
import 'package:oto_cli/oto/commands/file/zip.dart';
|
||||
import 'package:oto_cli/oto/commands/ftp/upload.dart';
|
||||
import 'package:oto_cli/oto/pipeline/pipeline_exe_handle.dart';
|
||||
|
||||
enum CommandType {
|
||||
|
|
@ -128,87 +90,19 @@ enum CommandType {
|
|||
}
|
||||
|
||||
abstract class Command {
|
||||
static final Map<CommandType, Command Function()> _commandMap = {
|
||||
CommandType.SimpleCommand: () => SimpleCommand(),
|
||||
CommandType.Print: () => PrintCommand(),
|
||||
CommandType.SetValue: () => SetValueCommand(),
|
||||
CommandType.CreateAppData: () => CreateAppData(),
|
||||
CommandType.BuildDart: () => BuildDart(),
|
||||
CommandType.BuildFlutter: () => BuildFlutter(),
|
||||
CommandType.BuildDartCompile: () => BuildDartCompile(),
|
||||
CommandType.BuildDotNet: () => BuildDotNet(),
|
||||
CommandType.BuildiOS: () => BuildiOS(),
|
||||
CommandType.TestflightUpload: () => TestflightUpload(),
|
||||
CommandType.TestflightStatusCheck: () => TestflightStatusCheck(),
|
||||
CommandType.TestflightDistribute: () => TestflightDistribute(),
|
||||
CommandType.XcodeprojAddFile: () => XcodeprojAddFile(),
|
||||
CommandType.BuildMSBuild: () => BuildMSBuild(),
|
||||
CommandType.CodeSign: () => CodeSign(),
|
||||
CommandType.CodeSignVerify: () => CodeSignVerify(),
|
||||
CommandType.ProductBuild: () => ProductBuild(),
|
||||
CommandType.Notarize: () => Notarize(),
|
||||
CommandType.ArchiveiOS: () => ArchiveiOS(),
|
||||
CommandType.ExportiOS: () => ExportiOS(),
|
||||
CommandType.PublishiOS: () => PublishiOS(),
|
||||
CommandType.Upload: () => Upload(),
|
||||
CommandType.Download: () => Download(),
|
||||
CommandType.Copy: () => Copy(),
|
||||
CommandType.Rename: () => Rename(),
|
||||
CommandType.Delete: () => Delete(),
|
||||
CommandType.FileDiffCheck: () => FileDiffCheck(),
|
||||
CommandType.FileRead: () => FileRead(),
|
||||
CommandType.FileWrite: () => FileWrite(),
|
||||
CommandType.Files: () => Files(),
|
||||
CommandType.FileInfo: () => FileInfo(),
|
||||
CommandType.DirectoryCreate: () => DirectoryCreate(),
|
||||
CommandType.Slack: () => Slack(),
|
||||
CommandType.SlackFile: () => SlackFile(),
|
||||
CommandType.SlackBuild: () => SlackBuild(),
|
||||
CommandType.Mattermost: () => Mattermost(),
|
||||
CommandType.MattermostBuild: () => MattermostBuild(),
|
||||
CommandType.StringSub: () => StringSub(),
|
||||
CommandType.StringReplace: () => StringReplace(),
|
||||
CommandType.StringReplacePattern: () => StringReplacePattern(),
|
||||
CommandType.StringIndex: () => StringIndex(),
|
||||
CommandType.URLInfo: () => URLInfo(),
|
||||
CommandType.Jira: () => Jira(),
|
||||
CommandType.Zip: () => Zip(),
|
||||
CommandType.Shell: () => Shell(),
|
||||
CommandType.ShellFile: () => ShellFile(),
|
||||
CommandType.Git: () => Git(),
|
||||
CommandType.GitCommit: () => GitCommit(),
|
||||
CommandType.GitPull: () => GitPull(),
|
||||
CommandType.GitPush: () => GitPush(),
|
||||
CommandType.GitCheckout: () => GitCheckout(),
|
||||
CommandType.GitRev: () => GitRev(),
|
||||
CommandType.GitCount: () => GitCount(),
|
||||
CommandType.GitReset: () => GitReset(),
|
||||
CommandType.GitStashPush: () => GitStashPush(),
|
||||
CommandType.GitStashApply: () => GitStashApply(),
|
||||
CommandType.GitBranch: () => GitBranch(),
|
||||
CommandType.GitHub: () => GitHub(),
|
||||
CommandType.GitHubPullRequestCreate: () => GitHubPullRequestCreate(),
|
||||
CommandType.GitHubPullRequestList: () => GitHubPullRequestList(),
|
||||
CommandType.GitHubPullRequestClose: () => GitHubPullRequestClose(),
|
||||
CommandType.Protobuf: () => Protobuf(),
|
||||
CommandType.JsonReader: () => JsonReader(),
|
||||
CommandType.JsonReaderFile: () => JsonReaderFile(),
|
||||
CommandType.JsonWriterFile: () => JsonWriterFile(),
|
||||
CommandType.AwsCli: () => AwsCli(),
|
||||
CommandType.Docker: () => Docker(),
|
||||
CommandType.Gradle: () => Gradle(),
|
||||
CommandType.WebRequest: () => WebRequest(),
|
||||
CommandType.WebFile: () => WebFile(),
|
||||
CommandType.ProcessPortUse: () => ProcessPortUse(),
|
||||
CommandType.ProcessRun: () => ProcessRun(),
|
||||
CommandType.ProcessKill: () => ProcessKill(),
|
||||
CommandType.SMBAuth: () => SMBAuth(),
|
||||
CommandType.Delay: () => Delay(),
|
||||
CommandType.JenkinsParameterModify: () => JenkinsParameterModify(),
|
||||
};
|
||||
static final Map<CommandType, Command Function()> _commandMap = {};
|
||||
|
||||
static void register(CommandType type, Command Function() factory) {
|
||||
_commandMap[type] = factory;
|
||||
}
|
||||
|
||||
factory Command.byType(CommandType type) {
|
||||
return _commandMap[type]!();
|
||||
final factory = _commandMap[type];
|
||||
if (factory == null) {
|
||||
throw StateError(
|
||||
'Command "$type" is not registered. Did you call registerAllCommands()?');
|
||||
}
|
||||
return factory();
|
||||
}
|
||||
|
||||
Command();
|
||||
|
|
|
|||
97
lib/oto/commands/command_registry.dart
Normal file
97
lib/oto/commands/command_registry.dart
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
import 'package:oto_cli/oto/commands/aws/awscli.dart';
|
||||
import 'package:oto_cli/oto/commands/build/app_data_creator.dart';
|
||||
import 'package:oto_cli/oto/commands/build/build_dart.dart';
|
||||
import 'package:oto_cli/oto/commands/build/build_dart_compile.dart';
|
||||
import 'package:oto_cli/oto/commands/build/build_dot_net.dart';
|
||||
import 'package:oto_cli/oto/commands/build/build_flutter.dart';
|
||||
import 'package:oto_cli/oto/commands/build/build_ios.dart';
|
||||
import 'package:oto_cli/oto/commands/build/build_msbuild.dart';
|
||||
import 'package:oto_cli/oto/commands/build/publish_ios.dart';
|
||||
import 'package:oto_cli/oto/commands/build/testflight_ios.dart';
|
||||
import 'package:oto_cli/oto/commands/build/xcodeproj.dart';
|
||||
import 'package:oto_cli/oto/commands/command.dart';
|
||||
import 'package:oto_cli/oto/commands/docker/docker.dart';
|
||||
import 'package:oto_cli/oto/commands/file/copy.dart';
|
||||
import 'package:oto_cli/oto/commands/file/delete.dart';
|
||||
import 'package:oto_cli/oto/commands/file/directory.dart';
|
||||
import 'package:oto_cli/oto/commands/file/file.dart';
|
||||
import 'package:oto_cli/oto/commands/file/file_diff_check.dart';
|
||||
import 'package:oto_cli/oto/commands/file/rename.dart';
|
||||
import 'package:oto_cli/oto/commands/file/zip.dart';
|
||||
import 'package:oto_cli/oto/commands/ftp/download.dart';
|
||||
import 'package:oto_cli/oto/commands/ftp/upload.dart';
|
||||
import 'package:oto_cli/oto/commands/git/git.dart';
|
||||
import 'package:oto_cli/oto/commands/git/git_hub.dart';
|
||||
import 'package:oto_cli/oto/commands/gradle/gradle.dart';
|
||||
import 'package:oto_cli/oto/commands/infra/smb_authorize.dart';
|
||||
import 'package:oto_cli/oto/commands/jenkins/jenkins.dart';
|
||||
import 'package:oto_cli/oto/commands/jira/jira.dart';
|
||||
import 'package:oto_cli/oto/commands/notification/mattermost.dart';
|
||||
import 'package:oto_cli/oto/commands/notification/slack.dart';
|
||||
import 'package:oto_cli/oto/commands/process/process.dart';
|
||||
import 'package:oto_cli/oto/commands/proto/protobuf.dart';
|
||||
import 'package:oto_cli/oto/commands/shell/shell.dart';
|
||||
import 'package:oto_cli/oto/commands/util/json.dart';
|
||||
import 'package:oto_cli/oto/commands/util/print.dart';
|
||||
import 'package:oto_cli/oto/commands/util/set_value.dart';
|
||||
import 'package:oto_cli/oto/commands/util/string_util.dart';
|
||||
import 'package:oto_cli/oto/commands/util/timer.dart';
|
||||
import 'package:oto_cli/oto/commands/web/web.dart';
|
||||
|
||||
void registerAllCommands() {
|
||||
Command.register(CommandType.SimpleCommand, () => SimpleCommand());
|
||||
|
||||
// build
|
||||
registerBuildIosCommands();
|
||||
registerTestflightCommands();
|
||||
registerXcodeprojCommands();
|
||||
registerAppDataCreatorCommands();
|
||||
registerBuildDartCommands();
|
||||
registerBuildDartCompileCommands();
|
||||
registerBuildDotNetCommands();
|
||||
registerBuildFlutterCommands();
|
||||
registerBuildMsbuildCommands();
|
||||
registerPublishIosCommands();
|
||||
|
||||
// git
|
||||
registerGitCommands();
|
||||
registerGitHubCommands();
|
||||
|
||||
// notification
|
||||
registerSlackCommands();
|
||||
registerMattermostCommands();
|
||||
|
||||
// file
|
||||
registerCopyCommand();
|
||||
registerDeleteCommand();
|
||||
registerRenameCommand();
|
||||
registerDirectoryCommand();
|
||||
registerFileCommands();
|
||||
registerFileDiffCheckCommand();
|
||||
registerZipCommand();
|
||||
|
||||
// ftp
|
||||
registerFtpUploadCommand();
|
||||
registerFtpDownloadCommand();
|
||||
|
||||
// util
|
||||
registerPrintCommand();
|
||||
registerSetValueCommand();
|
||||
registerStringUtilCommands();
|
||||
registerJsonCommands();
|
||||
registerTimerCommand();
|
||||
|
||||
// shell / process / infra
|
||||
registerShellCommands();
|
||||
registerProcessCommands();
|
||||
registerInfraCommands();
|
||||
|
||||
// external services
|
||||
registerJiraCommand();
|
||||
registerProtobufCommand();
|
||||
registerAwsCliCommand();
|
||||
registerDockerCommand();
|
||||
registerGradleCommand();
|
||||
registerWebCommands();
|
||||
registerJenkinsCommands();
|
||||
}
|
||||
|
|
@ -23,3 +23,7 @@ class Docker extends Command {
|
|||
return await completeProcess(process, command);
|
||||
}
|
||||
}
|
||||
|
||||
void registerDockerCommand() {
|
||||
Command.register(CommandType.Docker, () => Docker());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,3 +76,7 @@ class Copy extends Command {
|
|||
return complete(0, command);
|
||||
}
|
||||
}
|
||||
|
||||
void registerCopyCommand() {
|
||||
Command.register(CommandType.Copy, () => Copy());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,3 +59,7 @@ class Delete extends Command {
|
|||
return complete(0, command);
|
||||
}
|
||||
}
|
||||
|
||||
void registerDeleteCommand() {
|
||||
Command.register(CommandType.Delete, () => Delete());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,4 +17,7 @@ class DirectoryCreate extends Command {
|
|||
}
|
||||
return complete(0, command);
|
||||
}
|
||||
}
|
||||
}
|
||||
void registerDirectoryCommand() {
|
||||
Command.register(CommandType.DirectoryCreate, () => DirectoryCreate());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,3 +106,10 @@ class FileInfo extends Command {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void registerFileCommands() {
|
||||
Command.register(CommandType.FileRead, () => FileRead());
|
||||
Command.register(CommandType.FileWrite, () => FileWrite());
|
||||
Command.register(CommandType.Files, () => Files());
|
||||
Command.register(CommandType.FileInfo, () => FileInfo());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,3 +123,7 @@ class FileDiffCheck extends Command {
|
|||
return hex.encode(digest.bytes);
|
||||
}
|
||||
}
|
||||
|
||||
void registerFileDiffCheckCommand() {
|
||||
Command.register(CommandType.FileDiffCheck, () => FileDiffCheck());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,3 +35,7 @@ class Rename extends Command {
|
|||
return complete(0, command);
|
||||
}
|
||||
}
|
||||
|
||||
void registerRenameCommand() {
|
||||
Command.register(CommandType.Rename, () => Rename());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,3 +76,7 @@ class Zip extends Command {
|
|||
return complete(0, command);
|
||||
}
|
||||
}
|
||||
|
||||
void registerZipCommand() {
|
||||
Command.register(CommandType.Zip, () => Zip());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,3 +43,7 @@ class Download extends Command {
|
|||
return complete(0, command);
|
||||
}
|
||||
}
|
||||
|
||||
void registerFtpDownloadCommand() {
|
||||
Command.register(CommandType.Download, () => Download());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,3 +72,7 @@ class Upload extends Command {
|
|||
return complete(0, command);
|
||||
}
|
||||
}
|
||||
|
||||
void registerFtpUploadCommand() {
|
||||
Command.register(CommandType.Upload, () => Upload());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -292,3 +292,17 @@ class GitBranch extends Command {
|
|||
return await completeProcess(process, command);
|
||||
}
|
||||
}
|
||||
|
||||
void registerGitCommands() {
|
||||
Command.register(CommandType.Git, () => Git());
|
||||
Command.register(CommandType.GitCommit, () => GitCommit());
|
||||
Command.register(CommandType.GitPull, () => GitPull());
|
||||
Command.register(CommandType.GitPush, () => GitPush());
|
||||
Command.register(CommandType.GitCheckout, () => GitCheckout());
|
||||
Command.register(CommandType.GitRev, () => GitRev());
|
||||
Command.register(CommandType.GitCount, () => GitCount());
|
||||
Command.register(CommandType.GitReset, () => GitReset());
|
||||
Command.register(CommandType.GitStashPush, () => GitStashPush());
|
||||
Command.register(CommandType.GitStashApply, () => GitStashApply());
|
||||
Command.register(CommandType.GitBranch, () => GitBranch());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -122,3 +122,10 @@ class GitHubPullRequestClose extends Command {
|
|||
return await completeProcess(process, command);
|
||||
}
|
||||
}
|
||||
|
||||
void registerGitHubCommands() {
|
||||
Command.register(CommandType.GitHub, () => GitHub());
|
||||
Command.register(CommandType.GitHubPullRequestCreate, () => GitHubPullRequestCreate());
|
||||
Command.register(CommandType.GitHubPullRequestList, () => GitHubPullRequestList());
|
||||
Command.register(CommandType.GitHubPullRequestClose, () => GitHubPullRequestClose());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,3 +22,7 @@ class Gradle extends Command {
|
|||
return await completeProcess(process, command);
|
||||
}
|
||||
}
|
||||
|
||||
void registerGradleCommand() {
|
||||
Command.register(CommandType.Gradle, () => Gradle());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,3 +23,7 @@ class SMBAuth extends Command {
|
|||
return complete(process.exitCode, command);
|
||||
}
|
||||
}
|
||||
|
||||
void registerInfraCommands() {
|
||||
Command.register(CommandType.SMBAuth, () => SMBAuth());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,3 +63,7 @@ class JenkinsParameterModify extends Command {
|
|||
return await complete(0, command);
|
||||
}
|
||||
}
|
||||
|
||||
void registerJenkinsCommands() {
|
||||
Command.register(CommandType.JenkinsParameterModify, () => JenkinsParameterModify());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,4 +121,7 @@ class Jira extends Command {
|
|||
|
||||
return simpleFuture;
|
||||
}
|
||||
}
|
||||
}
|
||||
void registerJiraCommand() {
|
||||
Command.register(CommandType.Jira, () => Jira());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,3 +95,8 @@ class MattermostBuild extends Command {
|
|||
return complete(0, command);
|
||||
}
|
||||
}
|
||||
|
||||
void registerMattermostCommands() {
|
||||
Command.register(CommandType.Mattermost, () => Mattermost());
|
||||
Command.register(CommandType.MattermostBuild, () => MattermostBuild());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,3 +77,9 @@ class SlackBuild extends Command {
|
|||
return complete(0, command);
|
||||
}
|
||||
}
|
||||
|
||||
void registerSlackCommands() {
|
||||
Command.register(CommandType.Slack, () => Slack());
|
||||
Command.register(CommandType.SlackFile, () => SlackFile());
|
||||
Command.register(CommandType.SlackBuild, () => SlackBuild());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,3 +57,9 @@ class ProcessKill extends Command {
|
|||
return complete(0, command);
|
||||
}
|
||||
}
|
||||
|
||||
void registerProcessCommands() {
|
||||
Command.register(CommandType.ProcessPortUse, () => ProcessPortUse());
|
||||
Command.register(CommandType.ProcessRun, () => ProcessRun());
|
||||
Command.register(CommandType.ProcessKill, () => ProcessKill());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,3 +21,7 @@ class Protobuf extends Command {
|
|||
return await completeProcess(process, command);
|
||||
}
|
||||
}
|
||||
|
||||
void registerProtobufCommand() {
|
||||
Command.register(CommandType.Protobuf, () => Protobuf());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,3 +56,8 @@ class ShellFile extends Command {
|
|||
return success;
|
||||
}
|
||||
}
|
||||
|
||||
void registerShellCommands() {
|
||||
Command.register(CommandType.Shell, () => Shell());
|
||||
Command.register(CommandType.ShellFile, () => ShellFile());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,3 +134,9 @@ class JsonWriterFile extends Command {
|
|||
return complete(0, command);
|
||||
}
|
||||
}
|
||||
|
||||
void registerJsonCommands() {
|
||||
Command.register(CommandType.JsonReader, () => JsonReader());
|
||||
Command.register(CommandType.JsonReaderFile, () => JsonReaderFile());
|
||||
Command.register(CommandType.JsonWriterFile, () => JsonWriterFile());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,3 +15,7 @@ class PrintCommand extends Command {
|
|||
return complete(0, command);
|
||||
}
|
||||
}
|
||||
|
||||
void registerPrintCommand() {
|
||||
Command.register(CommandType.Print, () => PrintCommand());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,3 +85,7 @@ class SetValueCommand extends Command {
|
|||
return '<@property.$key>';
|
||||
}
|
||||
}
|
||||
|
||||
void registerSetValueCommand() {
|
||||
Command.register(CommandType.SetValue, () => SetValueCommand());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,3 +113,11 @@ class URLInfo extends Command {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void registerStringUtilCommands() {
|
||||
Command.register(CommandType.StringSub, () => StringSub());
|
||||
Command.register(CommandType.StringReplace, () => StringReplace());
|
||||
Command.register(CommandType.StringReplacePattern, () => StringReplacePattern());
|
||||
Command.register(CommandType.StringIndex, () => StringIndex());
|
||||
Command.register(CommandType.URLInfo, () => URLInfo());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,4 +32,7 @@ class Delay extends Command {
|
|||
|
||||
return await complete(0, command);
|
||||
}
|
||||
}
|
||||
}
|
||||
void registerTimerCommand() {
|
||||
Command.register(CommandType.Delay, () => Delay());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,3 +80,8 @@ class WebFile extends WebBase {
|
|||
return await complete(await super.request(data, form), command);
|
||||
}
|
||||
}
|
||||
|
||||
void registerWebCommands() {
|
||||
Command.register(CommandType.WebRequest, () => WebRequest());
|
||||
Command.register(CommandType.WebFile, () => WebFile());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue