Get an array of plugins and their settings that are not defined in env
777777
public function missingSettings()
    {
        $missing = [];
        foreach($this->recommendedSettings() as $plugin => $settings) {
            foreach($settings as $setting) {
                /* Get value for the setting */
                $value = $_ENV[$setting] ?? null;

                if(is_null($value)) $missing[$plugin][] = $setting;
            }
        }
        return $missing;
    }
865680
def load_plugins(self, args=None):
        """"""
        for item in os.listdir(plugins_path):
            if (item.startswith(self.header) and
                    item.endswith(".py") and
                    item != (self.header + "plugin.py")):
                # Load the plugin
                self._load_plugin(os.path.basename(item),
                                  args=args, config=self.config)

        # Log plugins list
        logger.debug("Active plugins list: {}".format(self.getPluginsList()))
191949
private function getPluginDefinition(string $handle, array $pluginInfo): array
    {
        $settings = null;
        $plugin = Craft::$app->plugins->getPlugin($handle);
        if ($plugin) {
            $settings = $plugin->getSettings();
        }

        return [
          'isEnabled' => $pluginInfo['isEnabled'],
          'isInstalled' => $pluginInfo['isInstalled'],
          'settings' => $settings ? $settings->attributes : [],
        ];
    }
1300579
protected static function pluginsWithTemplates(): array
    {
        $plugins = Plugin::loaded();

        array_walk($plugins, function ($plugin, $index) use (&$plugins) {
            $paths = App::path('Template', $plugin);

            array_walk($paths, function ($path, $index) use (&$paths) {
                if (!is_dir($path)) {
                    unset($paths[$index]);
                }
            });
        });

        return $plugins;
    }
695692
final protected function getEnv() : array
    {
        $envMask = $this->contexts['env'];
        $env = empty($envMask)
            ? $_SERVER
            : array_intersect_key($_SERVER, array_flip($envMask));

        return $env;
    }
343788
function (pluginsPath) {
    var plugins = fs.readdirSync(pluginsPath);
    var loadedPlugin = [];
    plugins.forEach(function (pluginName) {
        if (pluginName !== 'index.js') {
            loadedPlugin.push(require(path.resolve(pluginsPath, path.basename(pluginName, '.js'))));
        }
    });
    return loadedPlugin;
}
247448
def list_plugins(directory=None):
    """"""
    repo = require_repo(directory)
    plugins = get_value(repo, 'plugins')
    if not plugins or not isinstance(plugins, dict):
        return None
    return plugins.keys()
577487
def load_installed_plugins(self):
        
        result = []
        plugin_dirs = [d for d in os.listdir(self.plugin_path) if os.path.isdir(os.path.join(self.plugin_path, d))]
        settings = constants.SETTINGS

        for d in plugin_dirs:
            if d == "__pycache__":
                continue
            try:
                class_module = self.load_plugin(d)
                plugin = class_module()
                plugin.plugin_path = os.path.join(self.plugin_path, plugin.name)
                plugin.load_description()
                plugin.enabled = settings.value(plugin.name, type=bool) if plugin.name in settings.allKeys() else False
                result.append(plugin)
            except ImportError as e:
                logger.warning("Could not load plugin {0} ({1})".format(d, e))
                continue

        return result
707790
def get_plugins(cls, *args, **kwargs):
        
        return [plugin(*args, **kwargs) for plugin in cls.plugins]
1174577
def find_missing_env(self):
        """"""
        missing = []
        for e in self.env:
            if e.default_val is None and e.set_val is None:
                if e.env_name not in os.environ:
                    missing.append(e.env_name)

        if missing:
            raise BadOption("Some environment variables aren't in the current environment", missing=missing)
1118713
def get_plugins(directory):
    
    # not just plugin_*.py
    plugins = []
    files = glob.glob(directory + "/*.py")
    for p in files:
        p = p.replace(directory + "/", "").replace(".py", "")
        if not p.startswith('_'):
            plugins.append(p)
    # log.info("Loading Plugins from {0}".format(dir))
    # log.info("   {0}".format(str(plugins)))
    return plugins
1056157
def get_enabled_plugins():
    '''
    
    '''
    plugins = entrypoints.get_enabled('udata.preview', current_app).values()
    valid = [p for p in plugins if issubclass(p, PreviewPlugin)]
    for plugin in plugins:
        if plugin not in valid:
            clsname = plugin.__name__
            msg = '{0} is not a valid preview plugin'.format(clsname)
            warnings.warn(msg, PreviewWarning)
    return [p() for p in sorted(valid, key=lambda p: 1 if p.fallback else 0)]
1264157
def get_plugin(name)
      raise "Unknown plugin: #{ name }" unless Capistrano::EXTENSIONS.keys.include?(name)
      self.send(name)
    end
110660
def _load_plugins(self):
        '''
        
        '''
        plugins = self.settings['PLUGINS']

        self.plugins_dict = {}
        for key in plugins:
            # skip loading the plugin if its value is None
            if plugins[key] is None:
                continue
            # valid plugin, import and setup
            self.logger.debug("Trying to load plugin {cls}"
                              .format(cls=key))
            the_class = self.import_class(key)
            instance = the_class()
            instance.redis_conn = self.redis_conn
            instance._set_logger(self.logger)
            if not self.unit_test:
                instance.setup(self.settings)
            the_regex = instance.regex

            mini = {}
            mini['instance'] = instance
            if the_regex is None:
                raise ImportError()
                # continue
            mini['regex'] = the_regex

            self.plugins_dict[plugins[key]] = mini

        self.plugins_dict = OrderedDict(sorted(list(self.plugins_dict.items()),
                                               key=lambda t: t[0]))
185465
function getFiles () {
  const FUCK_ENV = process.env.FUCK_ENV
    || process.env.npm_package_config_FUCK_ENV
    || FUCK_ENV_DEFAULT
  return FUCK_ENV.split(',').map(file => path.resolve(root, file))
}
23284
function parsePlugins(config) {
  let plugins = [];

  function parse(plugins) {
    return plugins.map(plugin => {
      if ('string' == typeof plugin) plugin = path.resolve(plugin);
      return plugin;
    });
  }

  // Handle plugin paths defined in config file
  if (config.plugins) {
    plugins.push(...parse(config.plugins));
    delete config.plugins;
  }
  // Handle plugin paths/functions defined in runtime options
  if (config.runtimeOptions.plugins) {
    plugins.push(...parse(config.runtimeOptions.plugins));
    delete config.runtimeOptions.plugins;
  }

  return plugins;
}
121180
private static function get_network_plugins() {
            self::require_plugin_essentials();

            $all_plugins = fs_get_plugins();

            $network_active_basenames = is_multisite() ?
                get_site_option( 'active_sitewide_plugins' ) :
                array();

            foreach ( $all_plugins as $basename => &$data ) {
                // By default set to inactive (next foreach update the active plugins).
                $data['is_active'] = false;
                // Enrich with plugin slug.
                $data['slug'] = self::get_plugin_slug( $basename );
            }

            // Flag active plugins.
            foreach ( $network_active_basenames as $basename ) {
                if ( isset( $all_plugins[ $basename ] ) ) {
                    $all_plugins[ $basename ]['is_active'] = true;
                }
            }

            return $all_plugins;
        }