-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: #68 Added "up" command. NPM macos initial layout
- Loading branch information
Showing
15 changed files
with
400 additions
and
133 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
applications/cli/src/main/java/com/bloxbean/cardano/yacicli/CustomShellRunner.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.bloxbean.cardano.yacicli; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.boot.ApplicationArguments; | ||
import org.springframework.core.annotation.Order; | ||
import org.springframework.shell.ShellRunner; | ||
import org.springframework.shell.jline.InteractiveShellRunner; | ||
import org.springframework.shell.jline.NonInteractiveShellRunner; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
@RequiredArgsConstructor | ||
@Order(-100) | ||
public class CustomShellRunner implements ShellRunner { | ||
private final NonInteractiveShellRunner nonInteractiveShellRunner; | ||
private final InteractiveShellRunner interactiveShellRunner; | ||
|
||
@Override | ||
public boolean canRun(ApplicationArguments args) { | ||
return true; | ||
} | ||
|
||
@Override | ||
public void run(ApplicationArguments args) throws Exception { | ||
boolean canRun = nonInteractiveShellRunner.canRun(args); | ||
if (canRun) | ||
nonInteractiveShellRunner.run(args); | ||
|
||
var interactive = args.containsOption("i") || args.containsOption("interactive"); | ||
|
||
if (interactive) { | ||
interactiveShellRunner.run(args); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.