Sha256: 0a15d30bca5ce04a6035b42d2c4c901739bf952c7b5fdcb94faf423ad3627174

Contents?: true

Size: 856 Bytes

Versions: 49

Compression:

Stored size: 856 Bytes

Contents

# frozen_string_literal: true
require "shopify_cli"

module Extension
  class Command
    class ExtensionCommand < ShopifyCLI::Command::SubCommand
      def project
        @project ||= ExtensionProject.current
      end

      def specification_handler
        @specification_handler ||= begin
          identifier = project.specification_identifier
          Models::LazySpecificationHandler.new(identifier) do
            specifications = Models::Specifications.new(
              fetch_specifications: Tasks::FetchSpecifications.new(api_key: project.app.api_key, context: @ctx)
            )

            unless specifications.valid?(identifier)
              @ctx.abort(@ctx.message("errors.unknown_type", project.specification_identifier))
            end

            specifications[identifier]
          end
        end
      end
    end
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

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