nx-serverless-cdk
Version:
nx-serverless-cdk is an Nx plugin for creating AWS CDK applications and libraries inside an Nx monorepo. It offers the possibility to test and debug CDK applications as well as AWS Lambda functions locally. The plugin provides the full flexibility of the
50 lines (49 loc) • 1.94 kB
TypeScript
import { Tree } from '@nx/devkit';
import { ProjectType } from '@nx/workspace';
export type ProjectOptions = ProjectOptionsApplication | ProjectOptionsLibrary;
export interface ProjectOptionsApplication {
name: string;
directory: string | undefined;
projectType: ProjectType.Application;
}
export interface ProjectOptionsLibrary {
name: string;
directory: string | undefined;
projectType: ProjectType.Library;
importPath: string | undefined;
}
export type NormalizedProjectOptions<T extends ProjectOptions> = T extends ProjectOptionsLibrary ? NormalizedProjectOptionsLibrary : NormalizedProjectOptionsApplication;
export interface NormalizedProjectOptionsApplication {
/**
* Normalized full project name that can contain a npm scope (e.g '@org/example').
*/
projectName: string;
/**
* Normalized project root that represents the path to the project from the workspace root.
*/
projectRoot: string;
/**
* Normalized project name without scope. It's meant to be used when generating file names that contain the project name.
*/
projectFileName: string;
}
export interface NormalizedProjectOptionsLibrary {
/**
* Normalized full project name that can contain a npm scope (e.g '@org/example').
*/
projectName: string;
/**
* Normalized project root that represents the path to the project from the workspace root.
*/
projectRoot: string;
/**
* Normalized project name without scope. It's meant to be used when generating file names that contain the project name.
*/
projectFileName: string;
/**
* Normalized import path for the project. Defines the npm package name for publishable projects.
*/
importPath: string;
}
export declare const normalizeProjectOptions: <T extends ProjectOptions>(tree: Tree, options: T) => NormalizedProjectOptions<T>;
export default normalizeProjectOptions;