import { Serverless } from "./node_modules/@types/serverless/index.cjs"; import { Output } from "@swc/core"; import { WatchOptions } from "chokidar"; import { BundleOptions } from "@swc/core/spack"; //#region src/types.d.ts type ConfigFn = (sls: Serverless) => Configuration; type Plugins = any[]; type ReturnPluginsFn = (sls: Serverless) => Plugins; type ESMPluginsModule = { default: Plugins | ReturnPluginsFn; }; interface ImprovedServerlessOptions extends Serverless.Options { package?: string; } interface WatchConfiguration { pattern?: string[] | string; ignore?: string[] | string; chokidar?: WatchOptions; } interface PackagerOptions { scripts?: string[] | string; noInstall?: boolean; ignoreLockfile?: boolean; } interface NodeExternalsOptions { allowList?: string[]; } type SwcOptions = Omit; interface Configuration extends SwcOptions { external?: string[]; resolveExtensions?: string[]; concurrency?: number; zipConcurrency?: number; packager: PackagerId; packagerOptions: PackagerOptions; packagePath: string; exclude: '*' | string[]; nativeZip: boolean; watch: WatchConfiguration; installExtraArgs: string[]; plugins?: string | Plugin[]; keepOutputDirectory?: boolean; outputWorkFolder?: string; outputBuildFolder?: string; outputFileExtension: '.js' | '.cjs' | '.mjs'; nodeExternals?: NodeExternalsOptions; skipBuild?: boolean; skipBuildExcludeFns: string[]; stripEntryResolveExtensions?: boolean; } interface SwcFunctionDefinitionHandler extends Serverless.FunctionDefinitionHandler { skipSwc: boolean; swcEntrypoint?: string; } interface FunctionEntry { entry: string; func: Serverless.FunctionDefinitionHandler | null; functionAlias?: string; } interface FunctionBuildResult extends FunctionReference { bundlePath: string; } interface FunctionReference { func: Serverless.FunctionDefinitionHandler; functionAlias: string; } interface FileBuildResult { bundlePath: string; entry: string; result: Output; } type JSONObject = any; interface DependenciesResult { stdout?: string; dependencies?: DependencyMap; } type DependencyMap = Record; interface DependencyTree { version: string; dependencies?: DependencyMap; /** Indicates the dependency is available from the root node_modules folder/root of this tree */ isRootDep?: boolean; } interface IFile { readonly localPath: string; readonly rootPath: string; } type IFiles = readonly IFile[]; type PackagerId = 'npm' | 'pnpm' | 'yarn'; type PackageJSON = { name: string; version: string; dependencies?: Record; devDependencies?: Record; peerDependencies?: Record; [key: string]: unknown; }; //#endregion export { ConfigFn, Configuration, DependenciesResult, DependencyMap, DependencyTree, ESMPluginsModule, FileBuildResult, FunctionBuildResult, FunctionEntry, FunctionReference, IFile, IFiles, ImprovedServerlessOptions, JSONObject, PackageJSON, PackagerId, PackagerOptions, Plugins, ReturnPluginsFn, SwcFunctionDefinitionHandler, SwcOptions, WatchConfiguration }; //# sourceMappingURL=types.d.cts.map