@nx-dotnet/core
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -9,6 +9,6 @@ { | ||
"chokidar": "^3.5.1", | ||
"@nx-dotnet/dotnet": "0.1.2", | ||
"@nx-dotnet/utils": "0.1.2" | ||
"@nx-dotnet/dotnet": "0.1.3", | ||
"@nx-dotnet/utils": "0.1.3" | ||
}, | ||
"version": "0.1.2" | ||
"version": "0.1.3" | ||
} |
@@ -0,0 +0,0 @@ # nx-dotnet |
@@ -19,2 +19,5 @@ "use strict"; | ||
.watch(nxProjectConfiguration.root); | ||
utils_1.getDependantProjectsForNxProject(context.projectName, context.workspace, (project) => { | ||
watcher.add(project.root); | ||
}); | ||
watcher | ||
@@ -21,0 +24,0 @@ .on('all', (event, path) => { |
@@ -0,0 +0,0 @@ export interface NxDotnetGeneratorSchema { |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ export interface NxDotnetGeneratorSchema { |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ export interface NxDotnetGeneratorSchema { |
@@ -0,0 +0,0 @@ { |
@@ -6,12 +6,5 @@ "use strict"; | ||
const utils_1 = require("@nx-dotnet/utils"); | ||
const fs_1 = require("fs"); | ||
const xmldoc_1 = require("xmldoc"); | ||
const path_1 = require("path"); | ||
const projectRoots = {}; | ||
function processProjectGraph(graph, context) { | ||
const builder = new devkit_1.ProjectGraphBuilder(graph); | ||
Object.entries(context.workspace.projects).forEach(([name, project]) => { | ||
projectRoots[name] = path_1.resolve(project.root); | ||
}); | ||
Object.entries(context.workspace.projects).forEach(([name, project]) => { | ||
try { | ||
@@ -28,20 +21,7 @@ visitProject(builder, context, project, name); | ||
function visitProject(builder, context, project, projectName) { | ||
const netProjectFilePath = utils_1.getProjectFileForNxProjectSync(project); | ||
const xml = new xmldoc_1.XmlDocument(fs_1.readFileSync(netProjectFilePath).toString()); | ||
xml.childrenNamed('ItemGroup').forEach((itemGroup) => itemGroup.childrenNamed('ProjectReference').forEach((x) => { | ||
const includeFilePath = x.attr['Include']; | ||
let absoluteFilePath; | ||
if (path_1.isAbsolute(includeFilePath)) { | ||
absoluteFilePath = includeFilePath; | ||
} | ||
else { | ||
absoluteFilePath = path_1.resolve(netProjectFilePath.split('/').slice(0, -1).join('/'), includeFilePath); | ||
} | ||
Object.entries(projectRoots).forEach(([dependency, path]) => { | ||
if (absoluteFilePath.startsWith(path)) { | ||
builder.addDependency(devkit_1.DependencyType.static, projectName, dependency); | ||
} | ||
}); | ||
})); | ||
console.log('Looking for dependencies for ', projectName); | ||
utils_1.getDependantProjectsForNxProject(projectName, context.workspace, (projectConfig, dependencyName) => { | ||
builder.addDependency(devkit_1.DependencyType.static, projectName, dependencyName); | ||
}); | ||
} | ||
//# sourceMappingURL=process-project-graph.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
1
43591
893
+ Added@nx-dotnet/dotnet@0.1.3(transitive)
+ Added@nx-dotnet/utils@0.1.3(transitive)
+ Addedsax@1.4.1(transitive)
+ Addedxmldoc@1.3.0(transitive)
- Removed@nx-dotnet/dotnet@0.1.2(transitive)
- Removed@nx-dotnet/utils@0.1.2(transitive)
Updated@nx-dotnet/dotnet@0.1.3
Updated@nx-dotnet/utils@0.1.3