import { Plugin } from "./node_modules/@types/serverless/classes/Plugin.cjs"; import { Serverless } from "./node_modules/@types/serverless/index.cjs"; import { Configuration, FileBuildResult, FunctionBuildResult, FunctionEntry, ImprovedServerlessOptions, Plugins } from "./types.cjs"; import { packExternalModules } from "./pack-externals.cjs"; import { copyPreBuiltResources, pack } from "./pack.cjs"; import { preOffline } from "./pre-offline.cjs"; import { preLocal } from "./pre-local.cjs"; import { bundle } from "./bundle.cjs"; //#region src/index.d.ts declare class SwcServerlessPlugin implements Plugin { serviceDirPath: string; outputWorkFolder: string | undefined; workDirPath: string | undefined; outputBuildFolder: string | undefined; buildDirPath: string | undefined; packageOutputPath: string; log: Plugin.Logging['log']; serverless: Serverless; options: ImprovedServerlessOptions; hooks: Plugin.Hooks; buildOptions: Configuration | undefined; buildResults: FunctionBuildResult[] | undefined; /** Used for storing previous swc build results so we can rebuild more efficiently */ buildCache: Record; packExternalModules: typeof packExternalModules; pack: typeof pack; copyPreBuiltResources: typeof copyPreBuiltResources; preOffline: typeof preOffline; preLocal: typeof preLocal; bundle: typeof bundle; constructor(serverless: Serverless, options: ImprovedServerlessOptions, logging?: Plugin.Logging); private init; /** * Checks if the runtime for the given function is nodejs. * If the runtime is not set , checks the global runtime. * @param {Serverless.FunctionDefinitionHandler} func the function to be checked * @returns {boolean} true if the function/global runtime is nodejs; false, otherwise */ private isNodeFunction; /** * Checks if the function has a handler * @param {Serverless.FunctionDefinitionHandler | Serverless.FunctionDefinitionImage} func the function to be checked * @returns {boolean} true if the function has a handler */ private isFunctionDefinitionHandler; get functions(): Record; get plugins(): Plugins; get packagePatterns(): { patterns: string[]; ignored: string[]; }; private getBuildOptions; get functionEntries(): FunctionEntry[]; watch(): void; prepare(): void; notifyServerlessOffline(): void; updateFile(op: string, filename: string): Promise; /** Link or copy extras such as node_modules or package.patterns definitions */ copyExtras(): Promise; /** * Move built code to the serverless folder, taking into account individual * packaging preferences. */ moveArtifacts(): Promise; cleanup(): Promise; } export = SwcServerlessPlugin; //# sourceMappingURL=index.d.cts.map