class Importmap::Commands

def json

def json
  puts Rails.application.config.importmap.to_json(resolver: ActionController::Base.helpers)
end

def pin(*packages)

def pin(*packages)
  if imports = Importmap::Pinner.new.pin(*packages, env: options[:env], from: options[:from])
    imports.each do |package, url|
      puts "Pinned '#{package}' to #{url}"
    end
  else
    puts "Couldn't find any packages in #{packages.inspect} on #{options[:provider]}"
  end
end