UNPKG

@limlabs/limo

Version:

Infrastructure as Code generator

68 lines (67 loc) 2.69 kB
import { BaseTemplate } from "../templates"; /** * Represents information about the dependencies resource group / framework. * * @typedef {Object} DependencyInfo * @property {string[]} components - An array of component names that the resource group depends on. * @property {string[]} packages - An array of package names that the resource group depends on. */ export type DependencyInfo = { files: string[]; packages: string[]; }; /** * An array containing all possible resource group types. * Currently, it includes only 'fullstack-aws'. */ export declare const AllResourceGroupTypes: readonly ["fullstack-aws", "staticsite-aws"]; /** * Represents the type of a resource group. * * Currently, the only supported resource group type is 'fullstack-aws'. */ export type ResourceGroupType = (typeof AllResourceGroupTypes)[number]; export type BaseResourceGroupInputOptions = { resourceGroupName: string; resourceGroupType: ResourceGroupType; }; /** * Imports a resource group module based on the provided resource group type. * * @param resourceGroupType - The type of the resource group to import. * @param name - The name of the resource group. * @param directory - The directory in which the resource group is to be created. * @returns A promise that resolves to the imported resource group module. */ export declare function importResourceGroupType(resourceGroupType: ResourceGroupType, name: string, directory: string): BaseTemplate | undefined; /** * Initializes a resourceGroup folder within the 'infrastructure' directory. * Creates the directory recursively if it does not exist. * * @param resourceGroupName - The name of the resourceGroup for which the folder is to be created. * @returns A promise that resolves when the directory has been created. */ export declare function ensureResourceGroupFolder(resourceGroupName: string): Promise<void>; /** * Options for generating a Pulumi project YAML file. */ export interface ProjectYamlOptions { resourceGroupType: ResourceGroupType; framework: any; resourceGroupName: string; } /** * Generates a Pulumi project YAML file with the provided options. * * @param opts - The options to use when generating the project YAML file. * @returns A promise that resolves when the project YAML file has been written. */ export declare function generatePulumiProjectYaml(opts: ProjectYamlOptions & Record<string, any>): Promise<void>; export declare function readPulumiProjectMetadata(opts: { resourceGroupName: string; }): Promise<{ resourceGroupName: string; resourceGroupType: string; resourceGroupInputs: Record<string, unknown>; framework?: string | undefined; }>;