Class: Dependabot::Bun::DependencyGrapher::LockfileGenerator

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/dependabot/bun/dependency_grapher/lockfile_generator.rb

Instance Method Summary collapse

Constructor Details

#initialize(dependency_files:, credentials:) ⇒ LockfileGenerator

Returns a new instance of LockfileGenerator.



24
25
26
27
# File 'lib/dependabot/bun/dependency_grapher/lockfile_generator.rb', line 24

def initialize(dependency_files:, credentials:)
  @dependency_files = dependency_files
  @credentials = credentials
end

Instance Method Details

#generateObject



30
31
32
33
34
35
36
37
38
39
# File 'lib/dependabot/bun/dependency_grapher/lockfile_generator.rb', line 30

def generate
  SharedHelpers.in_a_temporary_directory do
    write_temporary_files
    run_lockfile_generation
    read_generated_lockfile
  end
rescue SharedHelpers::HelperSubprocessFailed => e
  handle_generation_error(e)
  raise
end