Get a node configuration given a node path "obj.prop.subProp".
@param {string} nodePath - The node path you want to get.
@param {object} extendedConfiguration - The object to extend the config.
@return {object} - The node configuration.
779982
function _getNode(nodePath, extendedConfiguration) {
    checkIsString('nodePath', nodePath);
    if (!entitiesMap.hasIn(nodePath.split(SEPARATOR))) {
        console.warn(`
            It seems the definition your are trying to use does not exists in the entity definitions of your project.
            The definition you want is ${nodePath} and the definition map is:
            `, entitiesMap.toJS()
        );
        throw new Error('Wrong definition path given, see waning for more details');
    }
    let conf = entitiesMap.getIn(nodePath.split(SEPARATOR));
    if (extendedConfiguration) {
        checkIsObject(extendedConfiguration);
        conf = conf.mergeDeep(extendedConfiguration);
    }
    return conf;
}
900631
private static function getConfigurationFromInitializedTSFE($path)
    {
        /** @var $tmpl ExtendedTemplateService */
        $tmpl = GeneralUtility::makeInstance(ExtendedTemplateService::class);
        $configuration = $tmpl->ext_getSetup($GLOBALS['TSFE']->tmpl->setup, $path);
        $configurationToUse = $configuration[0];
        return $configurationToUse;
    }
1131720
function(configPath, configNames, config) {
	var configsUsed = [];

	config = config || projectConfig;

	// work with the raw configuration object
	if (config && config.root) {
		config = config.root();
	}

	config = convict(config);
	configPath = path.resolve(appPath, configPath);
	configNames = configNames || [];

	configNames.forEach(function(configName) {
		var file;

		// Ignore local config in production mode
		if (configName == 'local' && nodeEnv === 'production') { return; }

		file = path.join(configPath, 'config-'+configName);
		file += configName === 'default' ? '.js' : '.json';

		if (fs.existsSync(file)) {

			if (configName === 'default') {
				config = convict( require(file) );
				config.load(dynamicDefaults);
			}
			else {
				config.loadFile( file );
			}

			// logging
			configName === 'default' ? configsUsed.push('xtc defaults') : configsUsed.push(configName);
		}
	});

	// be informative
	!process.env.testRun
		&& configsUsed.push('env', 'args')
		&& console.log('configuration:', configsUsed.join(' < '));

	return config;
}
1296183
@NonNull
	public <T> Value<T> get(@NonNull String subPath, @NonNull Class<T> type)
	{
		return config.get(key + '.' + subPath, type);
	}
1093381
private Node makeReadOnlySetter(String propName, String qualifiedPath) {
    String setterName = "_set" + propName.substring(0, 1).toUpperCase() + propName.substring(1);
    Node fnNode = IR.function(IR.name(""), IR.paramList(IR.name(propName)), IR.block());
    compiler.reportChangeToChangeScope(fnNode);
    Node exprResNode =
        IR.exprResult(IR.assign(NodeUtil.newQName(compiler, qualifiedPath + setterName), fnNode));

    JSDocInfoBuilder info = new JSDocInfoBuilder(true);
    // This is overriding a generated function which was added to the interface in
    // {@code createExportsAndExterns}.
    info.recordOverride();
    exprResNode.getFirstChild().setJSDocInfo(info.build());

    return exprResNode;
  }
991042
function customTypeAnnotation(path) {
    if (path.typeAnnotation) {
      return path.typeAnnotation;
    }

    // We are not handling the case of literals and other base types
    // since they are already handled via getTypeAnnotation
    const { node } = path;
    const binding = path.parentPath.scope.getBinding(node.name);

    const types = [];
    if (binding && binding.constantViolations) {
      if (binding.identifier.typeAnnotation) {
        return binding.identifier.typeAnnotation;
      }
      if (binding.constantViolations) {
        const violations = binding.constantViolations;
        for (let violation of violations) {
          types.push(violation.getTypeAnnotation());
        }
      }
    }

    if (types.length > 0) {
      return t.createUnionTypeAnnotation(types);
    }
    return types;
  }
164966
private Config getNodeConfigWithOverrides(Config nodeConfig, Path nodeFilePath) {
    String nodeId = nodeFilePath.getParent().getName();
    return nodeConfig.withValue(FlowGraphConfigurationKeys.DATA_NODE_ID_KEY, ConfigValueFactory.fromAnyRef(nodeId));
  }
352181
function extendResolvePath(basedir) {
    // using module internals isn't good, but restarting with corrected NODE_PATH looks more ugly, IMO
    module.paths.push(basedir);

    const _basedir = basedir.split('/'),
        size = basedir.length;
    let i = 0;

    while (size > i++) {
        const modulesPath = _basedir.slice(0, i).join('/') + '/node_modules';

        if (module.paths.indexOf(modulesPath) === -1) {
            module.paths.push(modulesPath);
        }
    }
}
511081
function getNodePath(node) {
    var nodePaths = [];
    var nodeParent = node;
    while (nodeParent) {
        switch (nodeParent.nodeType) {
            case NodeType.ELEM:
                nodePaths.unshift(nodeParent.tagName);
                break;

            case NodeType.IF:
                nodePaths.unshift('if');
                break;

            case NodeType.FOR:
                nodePaths.unshift('for[' + nodeParent.anode.directives['for'].raw + ']'); // eslint-disable-line dot-notation
                break;

            case NodeType.SLOT:
                nodePaths.unshift('slot[' + (nodeParent.name || 'default') + ']');
                break;

            case NodeType.TPL:
                nodePaths.unshift('template');
                break;

            case NodeType.CMPT:
                nodePaths.unshift('component[' + (nodeParent.subTag || 'root') + ']');
                break;

            case NodeType.TEXT:
                nodePaths.unshift('text');
                break;
        }

        nodeParent = nodeParent.parent;
    }

    return nodePaths;
}
474291
public static Builder getNodeConfig(String clusterName, String nodeName,
            String networkHost, String homePath, boolean nodeIngest) {
        return Settings.builder()
                // .put("path.metric", dataPath).put("http.port", httpRange)
                // .put("transport.tcp.port", transportRange)
                .put("node.name", nodeName).put("cluster.name", clusterName)
                .put("network.host", networkHost).put("path.home", homePath)
                .put("transport.type", "netty4")
                // .put("discovery.type", "none")
                .put("http.type", "netty4").put("node.ingest", nodeIngest);
    }
1359247
function extendBinding(binding, extension){
    /** @cut */ var info = basis.dev.getInfo(extension, 'map');

    binding.bindingId = bindingSeed++;

    for (var key in extension)
    {
      var def = null;
      var value = extension[key];

      // NOTE: check for Node, because first extendBinding invoke before Node class declared
      if ((Node && value instanceof Node) || basis.resource.isResource(value))
      {
        def = {
          events: 'satelliteChanged',
          getter: (function(key, satellite){
            var resource = typeof satellite == 'function' ? satellite : null;
            var init = function(node){
              init = false;

              if (resource)
              {
                satellite = resource();
                if (satellite instanceof Node == false)
                  return;
                resource = null;
              }

              node.setSatellite(key, satellite);

              /** @cut */ if (node.satellite[key] !== satellite)
              /** @cut */   basis.dev.warn('basis.ui.binding: implicit satellite `' + key + '` attach to owner failed');
            };
            return function(node){
              if (init)
                init(node);

              return resource || (node.satellite[key] ? node.satellite[key].element : null);
            };
          })(key, value)
        };
      }
      else
      {
        if (value)
        {
          if (typeof value == 'string')
            value = BINDING_PRESET.process(key, value);
          else
            // if value has bindingBridge means that it can update itself
            if (value.bindingBridge)
              value = basis.fn.$const(value);

          if (typeof value != 'object')
          {
            def = {
              getter: typeof value == 'function' ? value : basis.getter(value)
            };
          }
          else
            if (Array.isArray(value))
            {
              def = {
                events: value[0],
                getter: basis.getter(value[1])
              };
            }
            else
            {
              def = {
                events: value.events,
                getter: basis.getter(value.getter)
              };
            }
        }
      }

      /** @cut */ if (def && info && info.hasOwnProperty(key))
      /** @cut */   def.loc = info[key];

      binding[key] = def;
    }
  }
127504
function getInfoFromNodeModules (presetName) {
  debug('get preset info from node_modules')

  const baseDir = getBaseDir()
  const packagePath = path.join(baseDir, 'node_modules', presetName, 'package.json')

  if (!fs.existsSync(packagePath)) {
    debug('package not exist')
    return null
  }

  debug(`package.json path: ${packagePath}`)

  const packageInfo = require(packagePath)

  debug('package info: %o', packageInfo)

  return {
    name: presetName,
    version: packageInfo.version,
    registryUrl: getRegistryUrl(packageInfo._resolved)
  }
}
946466
function (node) {
      let currentNode = node;
      let i;
      let j;
      let k;
      let l;
      // Get the component path
      const componentPath = [];
      while (currentNode) {
        if (currentNode.property && currentNode.property.type === 'Identifier') {
          componentPath.push(currentNode.property.name);
        }
        if (currentNode.object && currentNode.object.type === 'Identifier') {
          componentPath.push(currentNode.object.name);
        }
        currentNode = currentNode.object;
      }
      componentPath.reverse();

      // Find the variable in the current scope
      const variableName = componentPath.shift();
      if (!variableName) {
        return null;
      }
      let variableInScope;
      const variables = context.getScope().variables;
      for (i = 0, j = variables.length; i < j; i++) { // eslint-disable-line no-plusplus
        if (variables[i].name === variableName) {
          variableInScope = variables[i];
          break;
        }
      }
      if (!variableInScope) {
        return null;
      }

      // Find the variable declaration
      let defInScope;
      const defs = variableInScope.defs;
      for (i = 0, j = defs.length; i < j; i++) { // eslint-disable-line no-plusplus
        if (
          defs[i].type === 'ClassName' ||
          defs[i].type === 'FunctionName' ||
          defs[i].type === 'Variable'
        ) {
          defInScope = defs[i];
          break;
        }
      }
      if (!defInScope) {
        return null;
      }
      currentNode = defInScope.node.init || defInScope.node;

      // Traverse the node properties to the component declaration
      for (i = 0, j = componentPath.length; i < j; i++) { // eslint-disable-line no-plusplus
        if (!currentNode.properties) {
          continue; // eslint-disable-line no-continue
        }
        for (k = 0, l = currentNode.properties.length; k < l; k++) { // eslint-disable-line no-plusplus, max-len
          if (currentNode.properties[k].key.name === componentPath[i]) {
            currentNode = currentNode.properties[k];
            break;
          }
        }
        if (!currentNode) {
          return null;
        }
        currentNode = currentNode.value;
      }

      // Return the component
      return components.get(currentNode);
    }
987621
public Node getConfigurationOption (String optionName) {
		NodeList children = configuration.getChildNodes ();
		Node configurationOption = null;
		for (int childIndex = 0; childIndex < children.getLength (); childIndex++) {
			if (children.item (childIndex).getNodeName ().equals (optionName)) {
				configurationOption = children.item (childIndex);
				break;
			}
		}
		return configurationOption;
	}
1146427
function processShorthandPropertyConfiguration () {

  // Fetch extensions implementing .processShorthandPropertyConfiguration(...) method
  let extensions = _.filter(this.extensions, (extension) => {
    return extension.implemented.processShorthandPropertyConfiguration;
  });

  // Create a proxy .processShorthandPropertyConfiguration(...) method
  this.processShorthandPropertyConfiguration =  (propertyConfiguration) => {
    // Execute all extensions' .processShorthandPropertyConfiguration(...) method and update configuration
    _.forEach(extensions, (extension) => {
      propertyConfiguration = extension.processShorthandPropertyConfiguration(propertyConfiguration);
    });
    // Return updated configuration
    return propertyConfiguration;
  };

}
629240
public String getSchemaName(final String configurationNodeFullPath) {
        String result = "";
        Pattern pattern = Pattern.compile(getSchemaPath() + "/(\\w+)" + "(/datasource|/rule)?", Pattern.CASE_INSENSITIVE);
        Matcher matcher = pattern.matcher(configurationNodeFullPath);
        if (matcher.find()) {
            result = matcher.group(1);
        }
        return result;
    }
914185
function pathExtend(p) {
  if (!exists(p)) return false
  loaded.push(p)
  return extend(config, require(p))
}