Sha256: 4aff4ec120167e111b8456aa85fea5fdaea4940676a24ae0821cb8114ec48fda

Contents?: true

Size: 1.17 KB

Versions: 8

Compression:

Stored size: 1.17 KB

Contents

# frozen_string_literal: true

module Extension
  module Models
    module ServerConfig
      class DevelopmentRenderer < Base
        include SmartProperties

        VALID_RENDERERS = [
          "@shopify/admin-ui-extensions",
          "@shopify/post-purchase-ui-extensions",
          "@shopify/checkout-ui-extensions",
          "@shopify/retail-ui-extensions",
        ]

        property! :name, accepts: VALID_RENDERERS
        property! :version, accepts: String, default: "latest"

        def self.find(type)
          case type.downcase
          when "product_subscription"
            new(name: "@shopify/admin-ui-extensions", version: "^1.0.1")
          when "checkout_ui_extension"
            new(name: "@shopify/checkout-ui-extensions", version: "^0.15.0")
          when "checkout_post_purchase"
            new(name: "@shopify/post-purchase-ui-extensions", version: "^0.13.2")
          when "pos_ui_extension"
            new(name: "@shopify/retail-ui-extensions", version: "^0.1.0")
          when "web_pixel_extension"
            nil
          else
            raise ArgumentError, "Unknown extension type: #{type}"
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
shopify-cli-2.24.0 lib/project_types/extension/models/server_config/development_renderer.rb
shopify-cli-2.23.0 lib/project_types/extension/models/server_config/development_renderer.rb
shopify-cli-2.22.0 lib/project_types/extension/models/server_config/development_renderer.rb
shopify-cli-2.21.0 lib/project_types/extension/models/server_config/development_renderer.rb
shopify-cli-2.20.1 lib/project_types/extension/models/server_config/development_renderer.rb
shopify-cli-2.20.0 lib/project_types/extension/models/server_config/development_renderer.rb
shopify-cli-2.19.0 lib/project_types/extension/models/server_config/development_renderer.rb
shopify-cli-2.18.1 lib/project_types/extension/models/server_config/development_renderer.rb