import { Plugin } from "./node_modules/@types/serverless/classes/Plugin.mjs"; import { Serverless } from "./node_modules/@types/serverless/index.mjs"; import { Configuration, DependencyMap, FunctionEntry, IFile } from "./types.mjs"; //#region src/helper.d.ts declare function asArray(data: T | T[]): T[]; declare function assertIsString(input: unknown, message?: string): asserts input is string; declare function extractFunctionEntries(cwd: string, provider: string, functions: Record, resolveExtensions?: string[]): FunctionEntry[]; /** * Takes a dependency graph and returns a flat list of required production dependencies for all or the filtered deps * @param root the root of the dependency tree * @param rootDeps array of top level root dependencies to whitelist */ declare const flatDep: (root: DependencyMap, rootDepsFilter: string[]) => string[]; declare const isESM: (buildOptions: Configuration | undefined) => boolean; /** * Extracts the list of dependencies that appear in a bundle as `import 'XXX'`, `import('XXX')`, or `require('XXX')`. * @param bundlePath Absolute path to a bundled JS file * @param useESM Should the bundle be treated as ESM */ declare const getDepsFromBundle: (bundlePath: string, useESM: boolean) => string[]; declare const doSharePath: (child: string, parent: string) => boolean; type AwsNodeProviderRuntimeMatcher = { [Version in Versions as `nodejs${Version}.x`]: `node${Version}` }; type AzureNodeProviderRuntimeMatcher = { [Version in Versions as `nodejs${Version}`]: `node${Version}` }; type GoogleNodeProviderRuntimeMatcher = { [Version in Versions as `nodejs${Version}`]: `node${Version}` }; type ScalewayNodeProviderRuntimeMatcher = { [Version in Versions as `node${Version}`]: `node${Version}` }; type AwsNodeMatcher = AwsNodeProviderRuntimeMatcher<12 | 14 | 16 | 18 | 20 | 22 | 24>; type AzureNodeMatcher = AzureNodeProviderRuntimeMatcher<12 | 14 | 16 | 18>; type GoogleNodeMatcher = GoogleNodeProviderRuntimeMatcher<12 | 14 | 16 | 18 | 20 | 22 | 24>; type ScalewayNodeMatcher = ScalewayNodeProviderRuntimeMatcher<12 | 14 | 16 | 18 | 20 | 22>; type NodeMatcher = AwsNodeMatcher & AzureNodeMatcher & GoogleNodeMatcher & ScalewayNodeMatcher; type AwsNodeMatcherKey = keyof AwsNodeMatcher; type AzureNodeMatcherKey = keyof AzureNodeMatcher; type GoogleNodeMatcherKey = keyof GoogleNodeMatcher; type ScalewayNodeMatcherKey = keyof ScalewayNodeMatcher; type NodeMatcherKey = AwsNodeMatcherKey | AzureNodeMatcherKey | GoogleNodeMatcherKey | ScalewayNodeMatcherKey; declare const providerRuntimeMatcher: Readonly>; declare const isNodeMatcherKey: (input: unknown) => input is NodeMatcherKey; declare function assertIsSupportedRuntime(input: unknown): asserts input is NodeMatcherKey; declare const buildServerlessV3LoggerFromLegacyLogger: (legacyLogger: Serverless["cli"], verbose?: boolean) => Plugin.Logging["log"]; declare const stripEntryResolveExtensions: (file: IFile, extensions: string[]) => IFile; //#endregion export { AwsNodeMatcher, AwsNodeMatcherKey, AwsNodeProviderRuntimeMatcher, AzureNodeMatcher, AzureNodeMatcherKey, AzureNodeProviderRuntimeMatcher, GoogleNodeMatcher, GoogleNodeMatcherKey, GoogleNodeProviderRuntimeMatcher, NodeMatcher, NodeMatcherKey, ScalewayNodeMatcher, ScalewayNodeMatcherKey, ScalewayNodeProviderRuntimeMatcher, asArray, assertIsString, assertIsSupportedRuntime, buildServerlessV3LoggerFromLegacyLogger, doSharePath, extractFunctionEntries, flatDep, getDepsFromBundle, isESM, isNodeMatcherKey, providerRuntimeMatcher, stripEntryResolveExtensions }; //# sourceMappingURL=helper.d.mts.map