Find the original module that required the transient dependency. Returns
undefined if the module is a first level dependency.
@param {Object} issuer - Module issuer
170781
function findExternalOrigin(issuer) {
  if (!_.isNil(issuer) && _.startsWith(issuer.rawRequest, './')) {
    return findExternalOrigin(issuer.issuer);
  }
  return issuer;
}
648524
function(module) {
		var name = module.$modname;
		if (!this.$hasModule(name)) {
			this._modules.push(module);
			if (gui.Type.isFunction(module.oncontextinitialize)) {
				module.oncontextinitialize(window);
			}
			if (gui.Type.isFunction(module.onrun)) {
				module.onrun();
			}
		} else {
			throw new Error(name + ' loaded twice?');
		}
		return module;
	}
690306
function fetchUnmetDependencies() {
        var runAgain = false;
        for (var id in dependencyMap) {
            _.forEach(dependencyMap[id], function (depId) {
                if (!dependencyMap[depId] && !injectedMap[depId]) {
                    try {
                        loadExternalModule(id, depId);
                    } catch (err) {
                        throw new Error('Error loading dependency ' + depId + ' for ' + id + ': ' + err.message);
                    }

                    runAgain = true;
                }
            });
        }

        if (runAgain) { //continue until all we don't have any more unmet dependencies
            fetchUnmetDependencies();
        }
    }
145678
function brequire(module) {
  var basepath = process.env.SRC_base ? path.resolve(process.env.SRC_base)
                  : path.join(__dirname, '..');
  if (module.charAt(0) == '.')
    return require(path.join(basepath, module));
  else //by calling require() from this location we ensure base's copy of the module will get priority
    return require(module);
}
1132285
function getDependencies (injector, dependencies) {
  return dependencies.map((name) => {
    let dependency = injector.getComponent(name);

    if (!dependency) {
      /* Anything starting 'npm:' is automatically included */
      if (/^npm:/.test(name)) {
        const npmModule = name.substr(4);

        injector.registerComponent({
          // eslint-disable-next-line import/no-dynamic-require, global-require
          factory: () => require(npmModule),
          name,
        });

        dependency = injector.getComponent(name);
      } else {
        throw new Error(`Missing dependency: ${name}`);
      }
    }

    /* If instance hasn't already been processed, process it */
    if (!dependency.instance) {
      dependency.instance = injector.process(dependency.factory, dependency.deps);
    }

    return dependency.instance;
  });
}
832005
function(resolvers) {
        return function(path, name, importerPath) {
            var num_resolvers = resolvers.length;
            return new Promise(function(resolve, reject) {
                if (resolvers.length === 0 ) {
                    reject('At least 1 resolver must be provided');
                }

                function try_resolver(index) {
                    resolvers[index](path, name, importerPath)
                        .then(function(m) {
                            resolve(m);
                        })
                        .catch(function() {
                            if (index + 1 === num_resolvers) {
                                reject(new Error('Could not find module: ' + path));
                            } else {
                                try_resolver(index + 1);
                            }
                        });
                }

                try_resolver(0);
            });
        };
    }
418700
function _requireDirAll(originalModule, absDir, options) {
  var modules = {};

  var files = [];
  try {
    files = fs.readdirSync(absDir);
  } catch (e) {
    if (options.throwNoDir) {
      throw e;
    }
  }

  for (var length=files.length, i=0; i<length; ++i) {

    var reqModule = {};
    reqModule.filename = files[i];                                         // full filename without path
    reqModule.ext      = path.extname(reqModule.filename);                 // file extension
    reqModule.base     = path.basename(reqModule.filename, reqModule.ext); // filename without extension
    reqModule.filepath = path.join(absDir, reqModule.filename);            // full filename with absolute path

    //console.log('reqModule:', reqModule);

    // If this is subdirectory, then descend recursively into it (excluding matching patter excludeDirs)
    if (fs.statSync(reqModule.filepath).isDirectory() &&
      options.recursive &&
      ! isExcludedDir(reqModule, options.excludeDirs) ) {

      // use filename (with extension) instead of base name (without extension)
      // to keep complete directory name for directories with '.', like 'dir.1.2.3'
      reqModule.name = reqModule.filename;

      // go recursively into subdirectory
      //if (typeof modules === 'undefined') {
      //  modules = {};
      //}
      modules[reqModule.name] = _requireDirAll(originalModule, reqModule.filepath, options);

    } else if ( ! isExcludedFileRe(reqModule, options.includeFiles) && !isExcludedFileParent(reqModule, originalModule)) {
      reqModule.name    = reqModule.base;
      reqModule.exports = require(reqModule.filepath);
      if (options.map) {
        options.map(reqModule);
      }

      var source = reqModule.exports;
      var target = (reqModule.name === 'index' && options.indexAsParent) ? modules : modules &&  modules[ reqModule.name ];

      var sourceIsObject = (typeof source === 'object');
      var targetIsObject = (typeof target === 'object');
      //var targetUnassigned = (typeof target === 'undefined');

      if (sourceIsObject && targetIsObject) {
        //if (Object.assign) {
        //  Object.assign(target, source);
        //} else {
          deepAssign(target, source);
        //}
      } else //if (
      //(!sourceIsObject && !targetIsObject) || // if source and target both are not objects  or...
      //(targetUnassigned)   // if target is not yet assigned, we may assign any type to it
      //)
      {
        target = source;
        //} else {
        //  console.log('!!!! ' +
        //    '  source:', source,
        //    '  target:', target,
        //    '; sourceIsObject:', sourceIsObject,
        //    '; targetIsObject:', targetIsObject,
        //    '; targetUnassigned:', targetUnassigned,
        //    '');
        //  throw 'Not possible to mix objects with scalar or array values: ' +
        //  'filepath: '+ reqModule.filepath + '; ' +
        //  'modules: '+ JSON.stringify(modules) + '; ' +
        //  'exports: '+ JSON.stringify(reqModule.exports)
        //    ;
      }

      if (reqModule.name === 'index' && options.indexAsParent) {
        modules = target;
      } else {
        //if (typeof modules === 'undefined') {
        //  modules = {};
        //}
        modules[ reqModule.name ] = target;
      }
    }

  }

  return modules;
}
442007
function getModule(parent, id) {
		if ('require' === id || 'exports' === id || 'module' === id) {
			return { id:id, loaded:true, exports:parent[id] || parent, children:[] };
		}

		id = resolve(parent, id).replace(/\.js$/i, '');
		if (modules[id]) { return modules[id]; }
		var uri = canonicalize(urls[id] ? urls[id] : path.replace(/[^\/]*$/, id + '.js')),
			module = (modules[id] = { id:id, filename:uri, uri:uri, loaded:false, children:[] });
		module.require = makeRequire(module);
		waits[id] = [];
		return module;
	}
565370
def check_dependency(self, operation, dependency):
        
        if isinstance(dependency[1], SQLBlob):
            # NOTE: we follow the sort order created by `assemble_changes` so we build a fixed chain
            # of operations. thus we should match exact operation here.
            return dependency[3] == operation
        return super(MigrationAutodetector, self).check_dependency(operation, dependency)
783643
function check(suppliedOptions){
    var options = assign(Object.create(defaultOptions), suppliedOptions || {});
    var packageJson = require(path.resolve(process.cwd(), options.package));
    var checkDevDependencies = !!options.checkDevDependencies;
    var checkDependencies = !!options.checkDependencies;
    var moduleTimes = {
        dependencies: {},
        devDependencies: {}
    };
    var loadTime = -1;

    if(packageJson.main){
        loadTime = execSync(execString + path.resolve(process.cwd(), packageJson.main), {encoding: "utf8"});
    }

    if(checkDependencies){
        Object.keys(packageJson.dependencies).forEach(function(depen){
            var time = execSync(execString + path.resolve(process.cwd(), "node_modules", depen), {
                encoding: "utf8",
                cwd: process.cwd()
            });

            moduleTimes.dependencies[depen] = parseFloat(time);
        });
    }

    if(checkDevDependencies){
        Object.keys(packageJson.devDependencies).forEach(function(depen){
            var time = execSync(execString + path.resolve(process.cwd(), "node_modules", depen), {
                encoding: "utf8",
                cwd: process.cwd()
            });

            moduleTimes.devDependencies[depen] = parseFloat(time);
        });
    }

    return {
        moduleTimes: moduleTimes,
        loadTime: loadTime
    };
}
950631
private boolean checkImplementer(TypeElement providerImplementer, TypeElement providerType) {

    String verify = processingEnv.getOptions().get("verify");
    if (verify == null || !Boolean.valueOf(verify)) {
      return true;
    }

    // TODO: We're currently only enforcing the subtype relationship
    // constraint. It would be nice to enforce them all.

    Types types = processingEnv.getTypeUtils();

    return types.isSubtype(providerImplementer.asType(), providerType.asType());
  }
773374
function findIndex(predicate, thisArg) {
    return function (source) { return source.lift(new _operators_find__WEBPACK_IMPORTED_MODULE_0__["FindValueOperator"](predicate, source, true, thisArg)); };
}
1143794
def dependency(self):
        
        from re import match
        if self._kind_module is not None:
            #We have already done this search at some point.
            return self._kind_module.name

        if (self.kind is not None and "len=" not in self.kind.lower()
            and not match("\d", self.kind[0])):
            #Find the module that declares this kind as:
            # 1) derived type
            # 2) parameter/member
            #The good news is that in order for the module being unit tested to compile,
            #it must have a 'use' statement for the derived type. We can just search from
            #that module with a tree find. Also, at the end of the day, it will have to
            #be declared as public, in order to be used in other modules.
            found, foundmod = self.module.parent.tree_find(self.kind.lower(),
                                                           self.module,
                                                           "publics")
            self._kind_module = foundmod #At worst this will be None again
            if found is not None:
                return foundmod.name
1195905
function () {
      var getConflictingDependencies = function (dependencies) {
        var conflicts = [];
        if (!dependencies) {
          return conflicts;
        }
        // for each dependency, extract and check the qualified artifactId
        dependencies.forEach(function (dependency) {
          function filterByDependencyString (dep) {
            return typeof dependency === 'string' ? dependency === dep : _.isEqual(dependency, dep);
          }

          var arrayOfEqualDependencies = dependencies.filter(
            filterByDependencyString);

          // find dependency in conflicts if dependency is n object
          var findedDep;
          if (typeof dependency === 'object') {
            findedDep = conflicts.find(function (dep) {
              return dep.artifactId === dependency.artifactId && dep.webpackageId === dependency.webpackageId && dep.endpointId === dependency.endpointId;
            });
          }
          if (arrayOfEqualDependencies.length > 1 && conflicts.indexOf(dependency) < 0 && !findedDep) {
            conflicts.push(dependency);
          }
        });
        return conflicts;
      };

      var doUniqueDependenciesCheck = function (artifact) {
        var conflictingDependencies = [];
        if (doc.modelVersion.indexOf('8.') === 0) { // we do have at least one endpoints for each artifact (modelVersion 8.x.x)
          // for each artifacts endpoint, check it's dependencies
          artifact.endpoints.forEach(function (endpoint) {
            conflictingDependencies = endpoint.dependencies ? getConflictingDependencies(endpoint.dependencies) : [];

            conflictingDependencies.forEach(function (dependency) {
              errors.push('RuleViolation identified: Artifact \'' + artifact.artifactId + '\' / endpoint \'' +
                endpoint.endpointId + '\' contains multiple references to dependency \'' + dependency +
                '\'');
            });
          });
        } else { // we don't have endpoints in artifact (modelVersion 9.x.x)
          // for each artifact, check it's dependencies
          conflictingDependencies = artifact.dependencies ? getConflictingDependencies(artifact.dependencies) : [];

          conflictingDependencies.forEach(function (dependency) {
            var dependencyStr = typeof dependency === 'object' ? JSON.stringify(dependency) : dependency;
            errors.push('RuleViolation identified: Artifact \'' + artifact.artifactId +
              '\' contains multiple references to dependency \'' + dependencyStr + '\'');
          });
        }
      };
      //
      var allArtifacts = [];
      // collect artifacts
      if (doc.artifacts) {
        var artifactTypes = Object.keys(doc.artifacts);
        artifactTypes.forEach(function (artifactType) {
          allArtifacts = allArtifacts.concat(doc.artifacts[ artifactType ]);
        });
      }
      // call rule for each artifact
      allArtifacts.forEach(function (artifact) {
        if (artifact.endpoints || artifact.dependencies) {
          doUniqueDependenciesCheck(artifact);
        }
      });
    }
897495
public CmsModuleDependency checkDependency(CmsModule module) {

        CmsModuleDependency otherDepdendency = new CmsModuleDependency(module.getName(), module.getVersion());

        // loop through all the dependencies
        for (int i = 0; i < m_dependencies.size(); i++) {
            CmsModuleDependency dependency = m_dependencies.get(i);
            if (dependency.dependesOn(otherDepdendency)) {
                // short circuit here
                return dependency;
            }
        }

        // no dependency was found
        return null;
    }
1158672
function findModule(store, namespace) {
    return namespace.split('/').reduce(function (obj, key) {
        // root modules will exist directly on the store
        if (obj && obj[key]) {
            return obj[key];
        }

        // child stores will exist in a modules object
        if (obj && obj.modules && obj.modules[key]) {
            return obj.modules[key];
        }

        // if we couldn't find the module, throw an error
        // istanbul ignore next
        throw new Error('Could not find module "' + namespace + '" in store.');
    }, store);
}
1173882
function findDependencies(startFile, class2Path, deps) {
    // Create a new regex object to reset the readIndex
    const depRegEx = /global ([a-zA-Z0-9,\s]+) \*/g;

    // Get global variable
    const contents = fs.readFileSync(startFile).toString();
    /** @type {string[]} */
    let fileDeps = [];
    let fileDepMatch;
    while ((fileDepMatch = depRegEx.exec(contents)) !== null) { // eslint-disable-line no-cond-assign
        const fileDep = fileDepMatch[1];
        fileDeps = fileDeps.concat(fileDep.split(/,\s*/g));
    }

    fileDeps.forEach(dep => {
        // CustomError classes
        if (dep.slice(-5) === 'Error') dep = 'errors';
        if (dep === 'runKeyguard' || dep === 'loadNimiq') dep = 'common';

        if (deps.indexOf(dep) > -1) return;

        deps.push(dep);

        if (dep === 'Nimiq') return;

        const depPath = class2Path.get(dep);
        if (!depPath) throw new Error(`Unknown dependency ${dep} referenced from ${startFile}`);

        // deps are passed by reference
        findDependencies(depPath, class2Path, deps); // recurse
    });

    return deps;
}