Sha256: b8d6f258b5a9a054634b1f12d87cf9614213b24da4f33ed2b7edce4e7d949b87
Contents?: true
Size: 1.06 KB
Versions: 21
Compression:
Stored size: 1.06 KB
Contents
# frozen_string_literal: true module Script module Layers module Infrastructure class PushPackageRepository include SmartProperties property! :ctx, accepts: ShopifyCLI::Context def get_push_package(script_project:, metadata:, library:) build_file_path = file_path(script_project.id) raise Domain::Errors::PushPackageNotFoundError unless ctx.file_exist?(build_file_path) script_content = ctx.binread(build_file_path) Domain::PushPackage.new( id: build_file_path, uuid: script_project.uuid, extension_point_type: script_project.extension_point_type, title: script_project.title, description: script_project.description, script_content: script_content, metadata: metadata, script_config: script_project.script_config, library: library ) end private def file_path(path_to_script) "#{path_to_script}/build/index.wasm" end end end end end
Version data entries
21 entries across 21 versions & 1 rubygems