UNPKG

@storm-stack/core

Version:

A build toolkit and runtime used by Storm Software in TypeScript applications

144 lines (141 loc) 4.95 kB
import { Context, InlineConfig, WorkspaceConfig, NewInlineConfig, CleanInlineConfig, PrepareInlineConfig, LintInlineConfig, BuildInlineConfig, DocsInlineConfig } from '../types/index.cjs'; import '@babel/core'; import '@babel/types'; import '@storm-stack/types/shared/error'; import '@stryke/types/base'; import 'magic-string'; import '@storm-software/config-tools/types'; import '@stryke/types/configuration'; import 'hookable'; import '@storm-software/build-tools/types'; import '@storm-software/config/types'; import '@storm-software/esbuild/types'; import '@storm-software/unbuild/types'; import 'c12'; import 'esbuild'; import 'unbuild'; import '@deepkit/type'; import '../reflection-DTM1oT21.cjs'; import '@stryke/capnp'; import '@storm-stack/types/shared/log'; import '@stryke/env/get-env-paths'; import '@stryke/types/package-json'; import 'jest-worker'; import 'jiti'; import 'memfs'; import 'unimport'; import '../types/tsconfig.cjs'; import '@stryke/types/tsconfig'; import 'typescript'; import '../types/vfs.cjs'; import 'memfs/lib/volume'; import 'node:fs'; import 'unionfs'; /** * The Storm Stack Engine class * * @remarks * This class is responsible for managing the Storm Stack project lifecycle, including initialization, building, and finalization. * * @public */ declare class Engine { #private; private inlineConfig; private workspaceConfig?; /** * The options provided to Storm Stack */ /** * The resolved options provided to Storm Stack */ protected context: Context; /** * Create a new Storm Stack Engine instance * * @param inlineConfig - The inline configuration for the Storm Stack engine * @param workspaceConfig - The workspace configuration for the Storm Stack engine */ constructor(inlineConfig: InlineConfig, workspaceConfig?: WorkspaceConfig | undefined); /** * Initialize the engine */ init(inlineConfig: InlineConfig): Promise<Context>; /** * Create a new Storm Stack project * * @remarks * This method will create a new Storm Stack project in the current directory. * * @param inlineConfig - The inline configuration for the new command * @returns A promise that resolves when the project has been created */ new(inlineConfig?: NewInlineConfig): Promise<void>; /** * Clean any previously prepared artifacts * * @remarks * This method will remove the previous Storm Stack artifacts from the project. * * @param inlineConfig - The inline configuration for the clean command * @returns A promise that resolves when the clean command has completed */ clean(inlineConfig?: CleanInlineConfig | PrepareInlineConfig): Promise<void>; /** * Prepare the Storm Stack project prior to building * * @remarks * This method will create the necessary directories, and write the artifacts files to the project. * * @param inlineConfig - The inline configuration for the prepare command * @returns A promise that resolves when the prepare command has completed */ prepare(inlineConfig?: PrepareInlineConfig | LintInlineConfig | BuildInlineConfig | DocsInlineConfig): Promise<void>; /** * Lint the project * * @param inlineConfig - The inline configuration for the lint command * @returns A promise that resolves when the lint command has completed */ lint(inlineConfig?: LintInlineConfig | BuildInlineConfig): Promise<void>; /** * Build the project * * @remarks * This method will build the Storm Stack project, generating the necessary artifacts. * * @param inlineConfig - The inline configuration for the build command * @returns A promise that resolves when the build command has completed */ build(inlineConfig?: BuildInlineConfig): Promise<void>; /** * Generate the documentation for the project * * @param inlineConfig - The inline configuration for the docs command * @returns A promise that resolves when the documentation generation has completed */ docs(inlineConfig?: DocsInlineConfig): Promise<void>; /** * Finalization process * * @remarks * This step includes any final processes or clean up required by Storm Stack. It will be run after each Storm Stack command. * * @param inlineConfig - The inline configuration for the Storm Stack engine * @returns A promise that resolves when the finalization process has completed */ finalize(inlineConfig: InlineConfig): Promise<void>; /** * Add a Storm Stack plugin used in the build process * * @param config - The import path of the plugin to add */ private addPlugin; /** * Initialize a Storm Stack plugin * * @param plugin - The import path of the plugin to add */ private initPlugin; } export { Engine };