Sha256: 5949153dc389c1b07e8402d13af42c911e1d1c602fb263b31f400b54e3007460

Contents?: true

Size: 1.32 KB

Versions: 36

Compression:

Stored size: 1.32 KB

Contents

module ShopifyCLI
  module Commands
    class App
      class Create
        class Node < ShopifyCLI::Command::AppSubCommand
          prerequisite_task :ensure_authenticated
          prerequisite_task :ensure_git_dependency

          recommend_default_node_range
          recommend_default_ruby_range

          options do |parser, flags|
            parser.on("--name=NAME") { |t| flags[:name] = t }
            parser.on("--organization-id=ID") { |id| flags[:organization_id] = id }
            parser.on("--store-domain=MYSHOPIFYDOMAIN") { |url| flags[:store_domain] = url }
            parser.on("--type=APPTYPE") { |type| flags[:type] = type }
            parser.on("--verbose") { flags[:verbose] = true }
          end

          def call(*)
            Services::App::Create::NodeService.call(
              name: options.flags[:name],
              organization_id: options.flags[:organization_id],
              store_domain: options.flags[:store_domain],
              type: options.flags[:type],
              verbose: !options.flags[:verbose].nil?,
              context: @ctx
            )
          end

          class << self
            def help
              ShopifyCLI::Context.message("core.app.create.node.help", ShopifyCLI::TOOL_NAME, ShopifyCLI::TOOL_NAME)
            end
          end
        end
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

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