Sha256: d271f7a55d14070f400cd8996d4be92c25c313a854d786cbd6f03bf44a016de9

Contents?: true

Size: 962 Bytes

Versions: 37

Compression:

Stored size: 962 Bytes

Contents

module Script
  module Layers
    module Application
      class ProjectDependencies
        def self.install(ctx:, task_runner:)
          CLI::UI::Frame.open(ctx.message("script.project_deps.checking_with_npm")) do
            begin
              if task_runner.dependencies_installed?
                ctx.puts(ctx.message("script.project_deps.none_required"))
              else
                UI::StrictSpinner.spin(ctx.message("script.project_deps.installing")) do |spinner|
                  task_runner.install_dependencies
                  spinner.update_title(ctx.message("script.project_deps.installed"))
                end
              end
              true
            rescue Infrastructure::Errors::DependencyInstallError => e
              CLI::UI::Frame.with_frame_color_override(:red) do
                ctx.puts("\n#{e.message}")
              end
              raise e
            end
          end
        end
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
shopify-cli-2.10.1 lib/project_types/script/layers/application/project_dependencies.rb
shopify-cli-2.10.0 lib/project_types/script/layers/application/project_dependencies.rb
shopify-cli-2.9.0 lib/project_types/script/layers/application/project_dependencies.rb
shopify-cli-2.8.0 lib/project_types/script/layers/application/project_dependencies.rb
shopify-cli-2.7.4 lib/project_types/script/layers/application/project_dependencies.rb
shopify-cli-2.7.3 lib/project_types/script/layers/application/project_dependencies.rb
shopify-cli-2.7.2 lib/project_types/script/layers/application/project_dependencies.rb
shopify-cli-2.7.1 lib/project_types/script/layers/application/project_dependencies.rb
shopify-cli-2.7.0 lib/project_types/script/layers/application/project_dependencies.rb
shopify-cli-2.6.6 lib/project_types/script/layers/application/project_dependencies.rb
shopify-cli-2.6.5 lib/project_types/script/layers/application/project_dependencies.rb
shopify-cli-2.6.4 lib/project_types/script/layers/application/project_dependencies.rb
shopify-cli-2.6.3 lib/project_types/script/layers/application/project_dependencies.rb
shopify-cli-2.6.2 lib/project_types/script/layers/application/project_dependencies.rb
shopify-cli-2.6.1 lib/project_types/script/layers/application/project_dependencies.rb
shopify-cli-2.6.0 lib/project_types/script/layers/application/project_dependencies.rb
shopify-cli-2.5.0 lib/project_types/script/layers/application/project_dependencies.rb
shopify-cli-2.4.0 lib/project_types/script/layers/application/project_dependencies.rb
shopify-cli-2.3.0 lib/project_types/script/layers/application/project_dependencies.rb
shopify-cli-2.2.2 lib/project_types/script/layers/application/project_dependencies.rb