Coder Social home page Coder Social logo

vertx-shell's Introduction

vertx-shell's People

Contributors

afloarea avatar andrm avatar boliza avatar cescoffier avatar emadalblueshi avatar pmlopes avatar slinkydeveloper avatar tsegismont avatar vietj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vertx-shell's Issues

all 'command pack' examples are in java, not their respective languages, in http://vertx.io/docs/

the 'Command Pack' example, in each language section, is always givin in java.

package examples.pack;

import io.vertx.core.AsyncResult;
import io.vertx.core.Future;
import io.vertx.core.Handler;
import io.vertx.core.Vertx;
import io.vertx.ext.shell.command.Command;
import io.vertx.ext.shell.command.CommandBuilder;
import io.vertx.ext.shell.command.CommandResolver;
import io.vertx.ext.shell.spi.CommandResolverFactory;

import java.util.ArrayList;
import java.util.List;

public class CommandPackExample implements CommandResolverFactory {

  @Override
  public void resolver(Vertx vertx, Handler<AsyncResult<CommandResolver>> resolveHandler) {
    List<Command> commands = new ArrayList<>();

    // Add commands
    commands.add(Command.create(vertx, JavaCommandExample.class));

    // Add another command
    commands.add(CommandBuilder.command("another-command").processHandler(process -> {
      // Handle process
    }).build(vertx));

    // Resolve with the commands
    resolveHandler.handle(Future.succeededFuture(() -> commands));
  }
}

Bump Netty version to 4.1

At some point it would be nice to get a bump on the netty version. I'm assuming you are dependant on termd's netty version though based on reviewing your pom. Is this something that could be possible.

We have been trying to work with Netflix ribbon and specifically RxNetty which are moving to newer versions of netty that conflict at runtime.

verticle-deploy with options

more like a feature request: command 'verticle-deploy' doesn't come with the possibility to add deployment options. If a second argument (json-string?) is given, a verticle with deployment options could be deployed from the shell (which would be nice, since verticles without any config/options are pretty rare)

SSH authentication data availability for commands

Hi,

In case of SSH there is an AuthProvider used for authentication, but the authenticated user is not accessible in the commands, however it would be very useful (required in my case).

In my opinion this would require many changes in the different interfaces.

Are there any plans in this direction?

Thank you and best regards,
Csaba

HttpTermServer.listen() throws NPE

java.lang.NullPointerException
    at io.vertx.ext.shell.term.impl.HttpTermServer.lambda$listen$123(HttpTermServer.java:136)
    at io.vertx.ext.shell.term.impl.HttpTermServer$$Lambda$54/899380598.handle(Unknown Source)
    at io.vertx.core.http.impl.HttpServerImpl.lambda$null$21(HttpServerImpl.java:258)

Workaround : use listen(ar -> {})

non-interactive SSH run

I've set vertx-shell to connect with SSH, and everything works very well.

The only problem is, how to do non-interactive things vis ssh command?

I've tried:

ssh user@${ip} -p ${port} ls

But I failed.

Why this, instead of using CRaSH?

There was a shell for vertx 2 that was based on CRaSH. this looks like a custom term library, why not on CRaSH?

(this is curiosity question since I'm about to write a REPL interface to an app)

remove builtin commands?

is there a way to remove or disable the builtin commands like 'ls'?

id like to create a restricted cli that exposes application specific commands

documentation bug, the documented example leads to: io.vertx.core.cli.MissingValueException: The option 'help' requires a value

when i use

addOption(new Option()
                    .setArgName("help")
                    .setShortName("h")
                    .setLongName("help"));

and type a command like

% shadowone -h

i get

io.vertx.core.cli.MissingValueException: The option 'help' requires a value
        at io.vertx.core.cli.impl.DefaultParser.checkRequiredValues(DefaultParser.java:201)
        at io.vertx.core.cli.impl.DefaultParser.parse(DefaultParser.java:125)
        at io.vertx.core.cli.impl.DefaultParser.parse(DefaultParser.java:82)
        at io.vertx.core.cli.impl.DefaultCLI.parse(DefaultCLI.java:47)
        at io.vertx.core.cli.CLI$parse$3.call(Unknown Source)
        at net.iowntheinter.cintershell.impl.cmds.example.TestOneShot$__clinit__closure1.doCall(TestOneShot.groovy:43)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
        at groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1249)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1212)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:810)
        at net.iowntheinter.cintershell.impl.commandOneShot.invokeMethod(commandOneShot.groovy)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeOnDelegationObjects(ClosureMetaClass.java:430)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:369)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019)
        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174)
        at net.iowntheinter.cintershell.impl.commandOneShot$_closure1.doCall(commandOneShot.groovy:56)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019)
        at groovy.lang.Closure.call(Closure.java:426)
        at org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:53)
        at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:105)
        at com.sun.proxy.$Proxy13.handle(Unknown Source)
        at io.vertx.ext.shell.command.impl.ProcessImpl.lambda$run$132(ProcessImpl.java:470)
        at io.vertx.core.impl.ContextImpl.lambda$wrapTask$18(ContextImpl.java:335)
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:358)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
        at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
        at java.lang.Thread.run(Thread.java:745)

i believe it should work as described here:
http://vertx.io/docs/vertx-shell/java/#_command_arguments

http client command

Allow to use the HTTP client to perform cURL like operations - SSL/TLS config should be supported

java.lang.NoClassDefFoundError for CommandResolverFactory

I'm trying to test out the vert.x shell, but am having trouble getting it started. When I run the command
vertx run -conf '{"telnetOptions":{"port":5000}}' maven:io.vertx:vertx-shell:3.6.2

I get the following stack trace

Failed in deploying verticle
java.lang.NoClassDefFoundError: io/vertx/ext/shell/spi/CommandResolverFactory
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
        at io.vertx.core.impl.IsolatingClassLoader.loadClass(IsolatingClassLoader.java:62)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:370)
        at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
        at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
        at io.vertx.ext.shell.impl.ShellServiceImpl.start(ShellServiceImpl.java:92)
        at io.vertx.ext.shell.ShellVerticle.start(ShellVerticle.java:47)
        at io.vertx.core.impl.DeploymentManager.lambda$doDeploy$8(DeploymentManager.java:494)
        at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:320)
        at io.vertx.core.impl.EventLoopContext.lambda$executeAsync$0(EventLoopContext.java:38)
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:462)
        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: io.vertx.ext.shell.spi.CommandResolverFactory
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 30 more

I'm running

java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)

And Vert.x version 3.6.2 in the CLI on Windows 10 Pro.

Is there something I'm missing?

Group context per verticle to undeploy

the recent patch deploys one verticle per command, perhaps we can group them to have less verticle deployed (not for performance reason but rather for not cluttering the verticle space) and have a map Context->Verticle .

bus-tail Consumes Message

The bus-tail command actually consumes an event bus message before it arrives at its destination which prevents the consumer from receiving it. I'm assuming that this is not by design. I am observing this in 3.6.0.

Shell close

Need a Shell#close method for proper shutdown of the interactive shell session.

HTTP term: java.lang.UnsupportedOperationException

The HTTP term does not work after login.

Try the deploy service http example:

You will see:

java.lang.UnsupportedOperationException: Mount the router as a sub-router instead. This method will not properly handle errors.
	at io.vertx.ext.web.handler.sockjs.impl.SockJSImpl.handle(SockJSImpl.java:87)
	at io.vertx.ext.web.handler.sockjs.impl.SockJSImpl.handle(SockJSImpl.java:64)
	at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1284)
	at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:173)
	at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:140)
	at io.vertx.ext.web.handler.impl.AuthenticationHandlerInternal.postAuthentication(AuthenticationHandlerInternal.java:43)
	at io.vertx.ext.web.handler.impl.AuthenticationHandlerImpl.lambda$handle$0(AuthenticationHandlerImpl.java:90)
	at io.vertx.ext.web.handler.impl.BasicAuthHandlerImpl.lambda$null$0(BasicAuthHandlerImpl.java:76)

Command pipeline

should reuse eventbus for exchanging objects or at least the eventbus codecs to encode / decode objects to/from buffer/string

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.