Class: Extension::Models::DevelopmentServerRequirements

Inherits:
Object
  • Object
show all
Defined in:
lib/project_types/extension/models/development_server_requirements.rb

Constant Summary collapse

SUPPORTED_EXTENSION_TYPES =
[
  "checkout_ui_extension",
  "checkout_post_purchase",
  "product_subscription",
  "web_pixel_extension",
  "pos_ui_extension",
]

Class Method Summary collapse

Class Method Details

.beta_enabled?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/project_types/extension/models/development_server_requirements.rb', line 26

def beta_enabled?
  ShopifyCLI::Feature.enabled?(:extension_server_beta)
end

.supported?(type) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
20
21
22
23
24
# File 'lib/project_types/extension/models/development_server_requirements.rb', line 17

def supported?(type)
  if type_supported?(type) && beta_enabled?
    return true if binary_installed?
    warn_about_missing_binary
  end

  false
end

.type_supported?(type) ⇒ Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/project_types/extension/models/development_server_requirements.rb', line 30

def type_supported?(type)
  SUPPORTED_EXTENSION_TYPES.include?(type.downcase)
end