Sha256: ba5b77b58a29df508edb5aa63bfac0aaa30dd57ca3ea52f0076e6d73c2798302

Contents?: true

Size: 1.06 KB

Versions: 4

Compression:

Stored size: 1.06 KB

Contents

# frozen_string_literal: true

module Script
  module Layers
    module Infrastructure
      module Languages
        class TaskRunner
          attr_reader :ctx

          def self.for(ctx, language)
            task_runners = {
              "assemblyscript" => AssemblyScriptTaskRunner,
              "typescript" => TypeScriptTaskRunner,
              "wasm" => WasmTaskRunner,
            }

            raise Errors::TaskRunnerNotFoundError unless task_runners[language]
            task_runners[language].new(ctx)
          end

          def initialize(ctx)
            @ctx = ctx
          end

          def build
            raise NotImplementedError
          end

          def dependencies_installed?
            raise NotImplementedError
          end

          def install_dependencies
            raise NotImplementedError
          end

          def metadata_file_location
            raise NotImplementedError
          end

          def library_version(_library_name)
            raise NotImplementedError
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
shopify-cli-2.13.0 lib/project_types/script/layers/infrastructure/languages/task_runner.rb
shopify-cli-2.12.0 lib/project_types/script/layers/infrastructure/languages/task_runner.rb
shopify-cli-2.11.2 lib/project_types/script/layers/infrastructure/languages/task_runner.rb
shopify-cli-2.11.1 lib/project_types/script/layers/infrastructure/languages/task_runner.rb