exposes the main package + checks the config whether it should expose other packages
177276
function exposeBundles(b){
    b.add("./" + packageConfig.main, {expose: packageConfig.name });
    if(packageConfig.sniper !== undefined && packageConfig.sniper.exposed !== undefined){
        for(var i=0; i<packageConfig.sniper.exposed.length; i++){
            b.require(packageConfig.sniper.exposed[i]);
        }
    }
}
1362275
def matching(self):
        
        for sbo in self.package_not_found:
            for pkg in self.data:
                if sbo in pkg and pkg not in self.blacklist:
                    self.package_found.append(pkg)
24508
public boolean detectPotentiallyDangerousApps(String[] additionalDangerousApps) {

        // Create a list of package names to iterate over from constants any others provided
        ArrayList<String> packages = new ArrayList<>();
        packages.addAll(Arrays.asList(Const.knownDangerousAppsPackages));
        if (additionalDangerousApps!=null && additionalDangerousApps.length>0){
            packages.addAll(Arrays.asList(additionalDangerousApps));
        }

        return isAnyPackageFromListInstalled(packages);
    }
109172
def apply_check_config(self, config):
        
        self.uri = config["uri"]
        self.use_https = config.get("https", False)
        self.method = config.get("method", "GET")
1255574
private function _checkConfig() {
		if (empty($this->_config['api_key'])) {
			throw new Errbit_Exception("`api_key' must be configured");
		}

		if (empty($this->_config['host'])) {
			throw new Errbit_Exception("`host' must be configured");
		}

		if (empty($this->_config['port'])) {
			$this->_config['port'] = !empty($this->_config['secure']) ? 443 : 80;
		}

		if (!isset($this->_config['secure'])) {
			$this->_config['secure'] = ($this->_config['port'] == 443);
		}

		if (empty($this->_config['hostname'])) {
			$this->_config['hostname'] = gethostname() ? gethostname() : '<unknown>';
		}

		if (empty($this->_config['project_root'])) {
			$this->_config['project_root'] = dirname(__FILE__);
		}

		if (empty($this->_config['environment_name'])) {
			$this->_config['environment_name'] = 'development';
		}

		if (!isset($this->_config['params_filters'])) {
			$this->_config['params_filters'] = array('/password/');
		}

		if (!isset($this->_config['agent'])) {
			$this->_config['agent'] = 'errbit-php';
		}

		if (!isset($this->_config['connect_timeout'])) {
			$this->_config['connect_timeout'] = 3;
		}

		if (!isset($this->_config['write_timeout'])) {
			$this->_config['write_timeout'] = 3;
		}

		if (!isset($this->_config['backtrace_filters'])) {
			$this->_config['backtrace_filters'] = array(
				sprintf('/^%s/', preg_quote($this->_config['project_root'], '/')) => '[PROJECT_ROOT]'
			);
		}
	}
4596
public boolean shouldScanPackage(String pkg)
    {
        // assume an empty string if it wasn't specified
        if (pkg == null)
        {
            pkg = "";
        }
        WindupJavaConfigurationModel configuration = getJavaConfigurationModel(getGraphContext());
        for (PackageModel pkgModel : configuration.getExcludeJavaPackages())
        {
            String excludePkg = pkgModel.getPackageName();
            if (pkg.startsWith(excludePkg))
            {
                return false;
            }
        }

        // if the list is empty, assume it is intended to just accept all packages
        if (!configuration.getScanJavaPackages().iterator().hasNext())
        {
            return true;
        }

        for (PackageModel pkgModel : configuration.getScanJavaPackages())
        {
            String includePkg = pkgModel.getPackageName();
            if (pkg.startsWith(includePkg))
            {
                return true;
            }
        }

        return false;
    }
578388
def check
      raise Errors::ConfigurationInvalid, config.errors.join("; ") unless config.valid?
      distribution.check
    end
1301566
def _init_check_upodates():
    
    message, count, packages = check_updates()
    if count > 0:
        print(message)
        for pkg in packages:
            print("{0}".format(pkg))
    else:
        print(message)
868623
def check_package(self, package, package_dir):
        """"""
        try:
            return self.packages_checked[package]
        except KeyError:
            pass

        init_py = orig.build_py.check_package(self, package, package_dir)
        self.packages_checked[package] = init_py

        if not init_py or not self.distribution.namespace_packages:
            return init_py

        for pkg in self.distribution.namespace_packages:
            if pkg == package or pkg.startswith(package + '.'):
                break
        else:
            return init_py

        with io.open(init_py, 'rb') as f:
            contents = f.read()
        if b'declare_namespace' not in contents:
            raise distutils.errors.DistutilsError(
                "Namespace package problem: %s is a namespace package, but "
                "its\n__init__.py does not call declare_namespace()! Please "
                'fix it.\n(See the setuptools manual under '
                '"Namespace Packages" for details.)\n"' % (package,)
            )
        return init_py
268494
protected function checkBehat() {
    $this->checkLocalConfig();
    if ($this->behatLocalYmlExists()) {
      $behatDefaultLocalConfig = $this->getInspector()->getLocalBehatConfig()->export();
      $this->checkDrupalVm($behatDefaultLocalConfig);
      $this->checkBaseUrl($behatDefaultLocalConfig);
    }
  }
944836
def main(global_config, **settings):
    """"""
    initialize_sentry_integration()
    config = Configurator(settings=settings)
    declare_api_routes(config)
    declare_type_info(config)

    # allowing the pyramid templates to render rss and xml
    config.include('pyramid_jinja2')
    config.add_jinja2_renderer('.rss')
    config.add_jinja2_renderer('.xml')

    mandatory_settings = ['exports-directories', 'exports-allowable-types']
    for setting in mandatory_settings:
        if not settings.get(setting, None):
            raise ValueError('Missing {} config setting.'.format(setting))

    config.scan(ignore='.tests')
    config.include('cnxarchive.events.main')

    config.add_tween('cnxarchive.tweens.conditional_http_tween_factory')

    return config.make_wsgi_app()
728687
public function show()
	{
		$package = $this->arguments->getOpt('package');
		if (!empty($package))
		{
			$versions = Composer::findRemotePackages($package, '*');
			$this->output->addRawFromAssocArray($versions);
		}
		else
		{
			$installed = Composer::getLocalPackages();
			$this->output->addRawFromAssocArray($installed);
		}
	}
172311
def available(self):
        

        for module_name in self.packages:
            if importlib.util.find_spec(module_name):
                return True
        return False
934172
def run(self):
        
        self.msg.resolving()
        self.repositories()
        if self.find_pkg:
            self.dependencies_list.reverse()
            self.requires = Utils().dimensional_list(self.dependencies_list)
            self.dependencies = Utils().remove_dbs(self.requires)
            if self.dependencies == []:
                self.dependencies = ["No dependencies"]
            if "--graph=" in self.flag:
                self.deps_tree()
            self.msg.done()
            pkg_len = len(self.name) + 24
            print("")    # new line at start
            self.msg.template(pkg_len)
            print("| Package {0}{1}{2} dependencies :".format(
                self.cyan, self.name, self.endc))
            self.msg.template(pkg_len)
            print("\\")
            print(" +---{0}[ Tree of dependencies ]{1}".format(self.yellow,
                                                               self.endc))
            index = 0
            for pkg in self.dependencies:
                if "--check-deps" in self.flag:
                    used = self.check_used(pkg)
                    self.deps_used(pkg, used)
                    used = "{0} {1}{2}{3}".format(
                        "is dependency -->", self.cyan,
                        ", ".join(used), self.endc)
                else:
                    used = ""
                index += 1
                installed = ""
                if find_package(pkg + self.meta.sp, self.meta.pkg_path):
                    if self.meta.use_colors in ["off", "OFF"]:
                        installed = "* "
                    print(" |")
                    print(" {0}{1}: {2}{3}{4} {5}{6}".format(
                        "+--", index, self.green, pkg,
                        self.endc, installed, used))
                else:
                    print(" |")
                    print(" {0}{1}: {2}{3}{4} {5}".format(
                        "+--", index, self.red, pkg,
                        self.endc, installed))
            if self.meta.use_colors in ["off", "OFF"]:
                print("\n * = Installed\n")
            else:
                print("")    # new line at end
            if "--graph=" in self.flag:
                self.graph()
        else:
            self.msg.done()
            print("\nNo package was found to match\n")
            raise SystemExit(1)
1190150
function(next) {
            core.allowPackages.forEach(function(pkg) {
                try {
                    var mod = path.dirname(require.resolve(pkg)).replace(/\/lib$/, "");
                    core.packages[pkg] = { path: mod };
                    if (lib.statSync(mod + "/etc").isDirectory()) {
                        core.packages[pkg].etc = 1;
                        var cfg = lib.readFileSync(mod + "/etc/config");
                        if (cfg) {
                            config = cfg + "\n" + config;
                            core.packages[pkg].config = 1;
                            core.parseConfig(cfg, 1);
                        }
                    }
                    ["modules","locales","views","web"].forEach(function(x) {
                        if (lib.statSync(mod + "/" + x).isDirectory()) {
                            core.path[x].unshift(mod + "/" + x);
                            core.packages[pkg][x] = 1;
                        }
                    });
                    logger.debug("init:", "npm package:", pkg, core.packages[pkg]);
                } catch(e) {
                    logger.error("init:", "npm package:", pkg, e);
                }
            });
            next();
        }
994954
async def expose(self):
        
        app_facade = client.ApplicationFacade.from_connection(self.connection)

        log.debug(
            'Exposing %s', self.name)

        return await app_facade.Expose(self.name)
523031
def check_other(self):
        
        if self.reqs:
            self.stdout.write(self.style.ERROR("\nOnly pypi and github based requirements are supported:"))
            for name, req in self.reqs.items():
                if "dist" in req:
                    pkg_info = "{dist.project_name} {dist.version}".format(dist=req["dist"])
                elif "url" in req:
                    pkg_info = "{url}".format(url=req["url"])
                else:
                    pkg_info = "unknown package"
                self.stdout.write(self.style.BOLD("{pkg_info:40} is not a pypi or github requirement".format(pkg_info=pkg_info)))