Sha256: 61170dcbd6f12a65686b1becf5a302369a6ffe3ce95fa151e2ebed2692d1d8e1

Contents?: true

Size: 972 Bytes

Versions: 26

Compression:

Stored size: 972 Bytes

Contents

# frozen_string_literal: true
require "shopify_cli"

module Extension
  module Tasks
    module ExecuteCommands
      class Serve < Base
        prepend OutdatedExtensionDetection

        property! :config_file_path, accepts: String
        property  :port, accepts: Integer, default: ShopifyCLI::Constants::Extension::DEFAULT_PORT
        property  :resource_url, accepts: String
        property! :tunnel_url, accepts: String

        def call
          ShopifyCLI::Result
            .call(&method(:merge_server_config))
            .then { |server_config| Models::DevelopmentServer.new.serve(context, server_config) }
        end

        private

        def merge_server_config
          Tasks::MergeServerConfig.call(
            context: context,
            file_path: config_file_path,
            port: port,
            resource_url: resource_url,
            tunnel_url: tunnel_url,
            type: type
          )
        end
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
shopify-cli-2.36.0 lib/project_types/extension/tasks/execute_commands/serve.rb
shopify-cli-2.35.0 lib/project_types/extension/tasks/execute_commands/serve.rb
shopify-cli-2.34.0 lib/project_types/extension/tasks/execute_commands/serve.rb
shopify-cli-2.33.1 lib/project_types/extension/tasks/execute_commands/serve.rb
shopify-cli-2.33.0 lib/project_types/extension/tasks/execute_commands/serve.rb
shopify-cli-2.32.1 lib/project_types/extension/tasks/execute_commands/serve.rb
shopify-cli-2.32.0 lib/project_types/extension/tasks/execute_commands/serve.rb
shopify-cli-2.31.0 lib/project_types/extension/tasks/execute_commands/serve.rb
shopify-cli-2.30.0 lib/project_types/extension/tasks/execute_commands/serve.rb
shopify-cli-2.29.0 lib/project_types/extension/tasks/execute_commands/serve.rb
shopify-cli-2.28.0 lib/project_types/extension/tasks/execute_commands/serve.rb
shopify-cli-2.27.0 lib/project_types/extension/tasks/execute_commands/serve.rb
shopify-cli-2.26.0 lib/project_types/extension/tasks/execute_commands/serve.rb
shopify-cli-2.25.0 lib/project_types/extension/tasks/execute_commands/serve.rb
shopify-cli-2.24.0 lib/project_types/extension/tasks/execute_commands/serve.rb
shopify-cli-2.23.0 lib/project_types/extension/tasks/execute_commands/serve.rb
shopify-cli-2.22.0 lib/project_types/extension/tasks/execute_commands/serve.rb
shopify-cli-2.21.0 lib/project_types/extension/tasks/execute_commands/serve.rb
shopify-cli-2.20.1 lib/project_types/extension/tasks/execute_commands/serve.rb
shopify-cli-2.20.0 lib/project_types/extension/tasks/execute_commands/serve.rb