Sha256: d0afcf6c3a068b0ef494b8a626e76eedcf5d3af8f904401171afa23347f76e80

Contents?: true

Size: 1.17 KB

Versions: 49

Compression:

Stored size: 1.17 KB

Contents

require "project_types/node/cli"

module ShopifyCLI
  module Commands
    class App
      class Tunnel < ShopifyCLI::Command::AppSubCommand
        def call(args, _name)
          subcommand = args.shift
          case subcommand
          when "auth"
            token = args.shift
            if token.nil?
              raise ShopifyCLI::Abort, @ctx.message("core.app.tunnel.error.token_argument_missing")
            else
              Services::App::Tunnel::AuthService.call(
                token: token,
                context: @ctx
              )
            end
          when "start"
            Services::App::Tunnel::StartService.call(
              context: @ctx
            )
          when "stop"
            Services::App::Tunnel::StopService.call(
              context: @ctx
            )
          else
            @ctx.puts(self.class.help)
          end
        end

        def self.help
          ShopifyCLI::Context.message("core.app.tunnel.help", ShopifyCLI::TOOL_NAME, ShopifyCLI::TOOL_NAME)
        end

        def self.extended_help
          ShopifyCLI::Context.message("core.app.tunnel.extended_help", ShopifyCLI::TOOL_NAME)
        end
      end
    end
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
shopify-cli-2.36.0 lib/shopify_cli/commands/app/tunnel.rb
shopify-cli-2.35.0 lib/shopify_cli/commands/app/tunnel.rb
shopify-cli-2.34.0 lib/shopify_cli/commands/app/tunnel.rb
shopify-cli-2.33.1 lib/shopify_cli/commands/app/tunnel.rb
shopify-cli-2.33.0 lib/shopify_cli/commands/app/tunnel.rb
shopify-cli-2.32.1 lib/shopify_cli/commands/app/tunnel.rb
shopify-cli-2.32.0 lib/shopify_cli/commands/app/tunnel.rb
shopify-cli-2.31.0 lib/shopify_cli/commands/app/tunnel.rb
shopify-cli-2.30.0 lib/shopify_cli/commands/app/tunnel.rb
shopify-cli-2.29.0 lib/shopify_cli/commands/app/tunnel.rb
shopify-cli-2.28.0 lib/shopify_cli/commands/app/tunnel.rb
shopify-cli-2.27.0 lib/shopify_cli/commands/app/tunnel.rb
shopify-cli-2.26.0 lib/shopify_cli/commands/app/tunnel.rb
shopify-cli-2.25.0 lib/shopify_cli/commands/app/tunnel.rb
shopify-cli-2.24.0 lib/shopify_cli/commands/app/tunnel.rb
shopify-cli-2.23.0 lib/shopify_cli/commands/app/tunnel.rb
shopify-cli-2.22.0 lib/shopify_cli/commands/app/tunnel.rb
shopify-cli-2.21.0 lib/shopify_cli/commands/app/tunnel.rb
shopify-cli-2.20.1 lib/shopify_cli/commands/app/tunnel.rb
shopify-cli-2.20.0 lib/shopify_cli/commands/app/tunnel.rb