UNPKG

2.2 kBTypeScriptView Raw
1import type { ProjectGraph, ProjectGraphProjectNode } from '@nrwl/devkit';
2import { ProjectGraphExternalNode } from '@nrwl/devkit';
3import * as ts from 'typescript';
4export declare type DependentBuildableProjectNode = {
5 name: string;
6 outputs: string[];
7 node: ProjectGraphProjectNode | ProjectGraphExternalNode;
8};
9export declare function calculateProjectDependencies(projGraph: ProjectGraph, root: string, projectName: string, targetName: string, configurationName: string, shallow?: boolean): {
10 target: ProjectGraphProjectNode;
11 dependencies: DependentBuildableProjectNode[];
12 nonBuildableDependencies: string[];
13 topLevelDependencies: DependentBuildableProjectNode[];
14};
15/**
16 * Util function to create tsconfig compilerOptions object with support for workspace libs paths.
17 *
18 * @param tsConfig String of config path or object parsed via ts.parseJsonConfigFileContent.
19 * @param dependencies Dependencies calculated by Nx.
20 */
21export declare function computeCompilerOptionsPaths(tsConfig: string | ts.ParsedCommandLine, dependencies: DependentBuildableProjectNode[]): ts.MapLike<string[]>;
22export declare function createTmpTsConfig(tsconfigPath: string, workspaceRoot: string, projectRoot: string, dependencies: DependentBuildableProjectNode[]): string;
23export declare function checkDependentProjectsHaveBeenBuilt(root: string, projectName: string, targetName: string, projectDependencies: DependentBuildableProjectNode[]): boolean;
24export declare function findMissingBuildDependencies(root: string, projectName: string, targetName: string, projectDependencies: DependentBuildableProjectNode[]): DependentBuildableProjectNode[];
25export declare function updatePaths(dependencies: DependentBuildableProjectNode[], paths: Record<string, string[]>): void;
26/**
27 * Updates the peerDependencies section in the `dist/lib/xyz/package.json` with
28 * the proper dependency and version
29 */
30export declare function updateBuildableProjectPackageJsonDependencies(root: string, projectName: string, targetName: string, configurationName: string, node: ProjectGraphProjectNode, dependencies: DependentBuildableProjectNode[], typeOfDependency?: 'dependencies' | 'peerDependencies'): void;