Sha256: 4997bbf419dbfdb6f12ab1c6b41705c7566e413b3de4c93675bfd696c12ef0d3

Contents?: true

Size: 919 Bytes

Versions: 116

Compression:

Stored size: 919 Bytes

Contents

# frozen_string_literal: true

module Dependabot
  module NpmAndYarn
    module NativeHelpers
      def self.npm_helper_path
        File.join(npm_helpers_dir, "bin/run.js")
      end

      def self.npm_helpers_dir
        helpers_root = ENV["DEPENDABOT_NATIVE_HELPERS_PATH"]
        unless helpers_root.nil?
          return File.join(helpers_root, "npm_and_yarn/npm")
        end

        File.join(default_helpers_dir, "npm")
      end

      def self.yarn_helper_path
        File.join(yarn_helpers_dir, "bin/run.js")
      end

      def self.yarn_helpers_dir
        helpers_root = ENV["DEPENDABOT_NATIVE_HELPERS_PATH"]
        unless helpers_root.nil?
          return File.join(helpers_root, "npm_and_yarn/yarn")
        end

        File.join(default_helpers_dir, "yarn")
      end

      def self.default_helpers_dir
        File.join(__dir__, "../../../../npm_and_yarn/helpers")
      end
    end
  end
end

Version data entries

116 entries across 116 versions & 1 rubygems

Version Path
dependabot-npm_and_yarn-0.95.84 lib/dependabot/npm_and_yarn/native_helpers.rb
dependabot-npm_and_yarn-0.95.83 lib/dependabot/npm_and_yarn/native_helpers.rb
dependabot-npm_and_yarn-0.95.82 lib/dependabot/npm_and_yarn/native_helpers.rb
dependabot-npm_and_yarn-0.95.81 lib/dependabot/npm_and_yarn/native_helpers.rb
dependabot-npm_and_yarn-0.95.80 lib/dependabot/npm_and_yarn/native_helpers.rb
dependabot-npm_and_yarn-0.95.79 lib/dependabot/npm_and_yarn/native_helpers.rb
dependabot-npm_and_yarn-0.95.78 lib/dependabot/npm_and_yarn/native_helpers.rb
dependabot-npm_and_yarn-0.95.77 lib/dependabot/npm_and_yarn/native_helpers.rb
dependabot-npm_and_yarn-0.95.76 lib/dependabot/npm_and_yarn/native_helpers.rb
dependabot-npm_and_yarn-0.95.75 lib/dependabot/npm_and_yarn/native_helpers.rb
dependabot-npm_and_yarn-0.95.74 lib/dependabot/npm_and_yarn/native_helpers.rb
dependabot-npm_and_yarn-0.95.73 lib/dependabot/npm_and_yarn/native_helpers.rb
dependabot-npm_and_yarn-0.95.72 lib/dependabot/npm_and_yarn/native_helpers.rb
dependabot-npm_and_yarn-0.95.71 lib/dependabot/npm_and_yarn/native_helpers.rb
dependabot-npm_and_yarn-0.95.70 lib/dependabot/npm_and_yarn/native_helpers.rb
dependabot-npm_and_yarn-0.95.69 lib/dependabot/npm_and_yarn/native_helpers.rb
dependabot-npm_and_yarn-0.95.68 lib/dependabot/npm_and_yarn/native_helpers.rb
dependabot-npm_and_yarn-0.95.67 lib/dependabot/npm_and_yarn/native_helpers.rb
dependabot-npm_and_yarn-0.95.66 lib/dependabot/npm_and_yarn/native_helpers.rb
dependabot-npm_and_yarn-0.95.65 lib/dependabot/npm_and_yarn/native_helpers.rb