/// <summary> /// Adds all known output directories /// </summary> /// <remarks> /// The project root (excluding node_modules) is always considered an output directory /// </remarks> protected virtual void ProcessOutputs(JavaScriptProject project, ProcessBuilder processBuilder) { // Each project is automatically allowed to write anything under its project root processBuilder.AddOutputDirectory(DirectoryArtifact.CreateWithZeroPartialSealId(project.ProjectFolder), SealDirectoryKind.SharedOpaque); if (m_resolverSettings.BlockWritesUnderNodeModules == true) { // There shouldn't be any writes under node_modules. So exclude it explicitly, since that also avoids a usually expensive enumeration // under node_modules when scrubbing. processBuilder.AddOutputDirectoryExclusion(project.NodeModulesFolder(m_context.PathTable)); } // Some projects share their temp folder across their build scripts (e.g. build and test) // So we cannot make them share the temp folder with the infrastructure we have today // (even though not impossible to fix, we could allow temp directories among pips that are part // of the same depedency chain and eagerly delete the folder every time a pip finishes) processBuilder.AddOutputDirectory(DirectoryArtifact.CreateWithZeroPartialSealId(project.TempFolder), SealDirectoryKind.SharedOpaque); // Add all the additional output directories that the graph knows about foreach (var outputDirectory in project.OutputDirectories) { processBuilder.AddOutputDirectory(DirectoryArtifact.CreateWithZeroPartialSealId(outputDirectory), SealDirectoryKind.SharedOpaque); } // Add additional output directories configured in the main config file AddAdditionalOutputDirectories(processBuilder, project.ProjectFolder); }