@storm-software/build-tools
Version:
A comprehensive set of tools for building and managing projects within a Storm workspace. Includes builders such as rollup, rolldown, tsup, and unbuild, along with various utilities.
80 lines (77 loc) • 2.53 kB
text/typescript
import { S as StormWorkspaceConfig } from './types-BL-PZK84.mjs';
import 'zod';
import 'zod/mini';
type Entry = string | Record<string, string> | string[];
type Platform = "browser" | "node" | "neutral";
type Format = "cjs" | "esm" | "iife";
type FileInputOutput = {
input: string;
output: string;
};
type AssetGlob = FileInputOutput & {
glob: string;
ignore?: string[];
dot?: boolean;
};
interface AdditionalCLIOptions {
projectRoot: string;
sourceRoot?: string;
projectName?: string;
}
interface TypeScriptBuildOptions extends AdditionalCLIOptions {
name?: string;
entry?: Entry;
assets?: (AssetGlob | string)[];
tsconfig?: string | null;
format?: Format | Format[];
bundle?: boolean;
external?: string[];
outputPath?: string;
platform?: "node" | "browser" | "neutral";
sourcemap?: boolean | "linked" | "inline" | "external" | "both";
mode?: "development" | "staging" | "production";
orgName?: string;
target?: string | string[];
watch?: boolean;
clean?: boolean;
debug?: boolean;
banner?: string;
footer?: string;
define?: {
[key: string]: string;
};
env?: {
[key: string]: string;
};
plugins?: any[];
splitting?: boolean;
treeShaking?: boolean;
generatePackageJson?: boolean;
emitOnAll?: boolean;
metafile?: boolean;
minify?: boolean;
includeSrc?: boolean;
verbose?: boolean;
}
type TypeScriptBuildBaseEnv = {
STORM_BUILD: string;
STORM_MODE: TypeScriptBuildOptions["mode"];
STORM_ORG: TypeScriptBuildOptions["orgName"];
STORM_NAME: string;
STORM_PLATFORM: Platform;
STORM_FORMAT: string;
STORM_TARGET: string;
};
type TypeScriptBuildEnv = TypeScriptBuildBaseEnv & {
[key: string]: string;
};
type TypeScriptBuildResolvedOptions = Omit<TypeScriptBuildOptions, "entry" | "outputPath" | "env"> & Required<Pick<TypeScriptBuildOptions, "name" | "sourceRoot" | "projectName" | "platform" | "target" | "clean" | "define" | "generatePackageJson" | "emitOnAll" | "metafile" | "minify" | "includeSrc" | "verbose">> & {
tsconfig?: string;
config: StormWorkspaceConfig;
entryPoints: string[];
env: TypeScriptBuildEnv;
};
type DeepPartial<T> = T extends object ? {
[P in keyof T]?: DeepPartial<T[P]>;
} : T;
export type { AdditionalCLIOptions, AssetGlob, DeepPartial, Entry, FileInputOutput, Format, Platform, TypeScriptBuildBaseEnv, TypeScriptBuildEnv, TypeScriptBuildOptions, TypeScriptBuildResolvedOptions };