示例#1
0
        internal bool IncludeNodejsFile(NodejsFileNode fileNode)
        {
            var url = fileNode.Url;

            if (CommonUtils.IsSubpathOf(this._intermediateOutputPath, fileNode.Url))
            {
                return(false);
            }

            foreach (var path in this._analysisIgnoredDirs)
            {
                if (url.IndexOf(path, 0, StringComparison.OrdinalIgnoreCase) != -1)
                {
                    return(false);
                }
            }

            var fileInfo = new FileInfo(fileNode.Url);

            if (!fileInfo.Exists || fileInfo.Length > _maxFileSize)
            {
                // skip obviously generated and missing files...
                return(false);
            }

            var nestedModulesDepth = 0;

            if (this.ModulesNode.NpmController.RootPackage != null && this.ModulesNode.NpmController.RootPackage.Modules != null)
            {
                nestedModulesDepth = this.ModulesNode.NpmController.RootPackage.Modules.GetDepth(fileNode.Url);
            }

            return(true);
        }
示例#2
0
 public override CommonFileNode CreateCodeFileNode(ProjectElement item) {
     string fileName = item.Url;
     if (!String.IsNullOrWhiteSpace(fileName)
         && Path.GetExtension(fileName).Equals(NodejsConstants.TypeScriptExtension, StringComparison.OrdinalIgnoreCase)) {
         return new NodejsTypeScriptFileNode(this, item);
     }
     var res = new NodejsFileNode(this, item);
     return res;
 }
示例#3
0
        internal bool IncludeNodejsFile(NodejsFileNode fileNode)
        {
            var url = fileNode.Url;

            if (CommonUtils.IsSubpathOf(_intermediateOutputPath, fileNode.Url))
            {
                return(false);
            }
            foreach (var path in _analysisIgnoredDirs)
            {
                if (url.IndexOf(path, 0, StringComparison.OrdinalIgnoreCase) != -1)
                {
                    return(false);
                }
            }
            if (new FileInfo(fileNode.Url).Length > _maxFileSize)
            {
                // skip obviously generated files...
                return(false);
            }
            return(true);
        }
        internal bool IncludeNodejsFile(NodejsFileNode fileNode) {
            var url = fileNode.Url;
            if (CommonUtils.IsSubpathOf(_intermediateOutputPath, fileNode.Url)) {
                return false;
            }

            foreach (var path in _analysisIgnoredDirs) {
                if (url.IndexOf(path, 0, StringComparison.OrdinalIgnoreCase) != -1) {
                    return false;
                }
            }

            var fileInfo = new FileInfo(fileNode.Url);
            if (!fileInfo.Exists || fileInfo.Length > _maxFileSize) {
                // skip obviously generated and missing files...
                return false;
            }

            int nestedModulesDepth = 0;
            if (ModulesNode.NpmController.RootPackage != null && ModulesNode.NpmController.RootPackage.Modules != null) {
                nestedModulesDepth = ModulesNode.NpmController.RootPackage.Modules.GetDepth(fileNode.Url);
            }

            return true;
        }
 public override CommonFileNode CreateCodeFileNode(ProjectElement item) {
     string fileName = item.Url;
     if (!String.IsNullOrWhiteSpace(fileName)
         && Path.GetExtension(fileName).Equals(NodejsConstants.TypeScriptExtension, StringComparison.OrdinalIgnoreCase)) {
         return new NodejsTypeScriptFileNode(this, item);
     }
     var res = new NodejsFileNode(this, item);
     return res;
 }
        internal bool IncludeNodejsFile(NodejsFileNode fileNode) {
            var url = fileNode.Url;
            if (CommonUtils.IsSubpathOf(_intermediateOutputPath, fileNode.Url)) {
                return false;
            }

            foreach (var path in _analysisIgnoredDirs) {
                if (url.IndexOf(path, 0, StringComparison.OrdinalIgnoreCase) != -1) {
                    return false;
                }
            }

            var fileInfo = new FileInfo(fileNode.Url);
            if (!fileInfo.Exists || fileInfo.Length > _maxFileSize) {
                // skip obviously generated and missing files...
                return false;
            }

            var relativeFile = CommonUtils.GetRelativeFilePath(this.FullPathToChildren, fileNode.Url);
            if (this._analyzer != null && this._analyzer.Project != null 
                && this._analyzer.Project.Limits.IsPathExceedNestingLimit(relativeFile)) {
                return false;
            }

            return true;
        }
 internal void EnqueueForDelayedAnalysis(NodejsFileNode fileNode) {
     DelayedAnalysisQueue.Enqueue(fileNode);
     RestartIdleNodeModulesTimer();
 }
 internal bool IncludeNodejsFile(NodejsFileNode fileNode) {
     var url = fileNode.Url;
     if (CommonUtils.IsSubpathOf(_intermediateOutputPath, fileNode.Url)) {
         return false;
     }
     foreach (var path in _analysisIgnoredDirs) {
         if (url.IndexOf(path, 0, StringComparison.OrdinalIgnoreCase) != -1) {
             return false;
         }
     }
     if (new FileInfo(fileNode.Url).Length > _maxFileSize) {
         // skip obviously generated files...
         return false;
     }
     return true;
 }
示例#9
0
        public override CommonFileNode CreateCodeFileNode(ProjectElement item)
        {
            var res = new NodejsFileNode(this, item);

            return(res);
        }