import '../globals/index.js'; import type { Script, Metadata, Shortcut, Scriptlet, Snippet } from '../types/core'; import type { Stamp } from './db'; export declare function checkDbAndInvalidateCache(cacheMap: Map, cacheName: string): Promise; export declare let extensionRegex: RegExp; export declare let templatePlaceholdersRegex: RegExp; export declare let wait: (time: number) => Promise; export declare let checkProcess: (pid: string | number) => string; export declare let combinePath: (arrayOfPaths: string[]) => string; export declare const resetPATH: () => void; export declare const KIT_DEFAULT_PATH: string; export declare const KIT_BIN_PATHS: string; export declare const KIT_FIRST_PATH: string; export declare const KIT_LAST_PATH: string; export declare let assignPropsTo: (source: { [s: string]: unknown; } | ArrayLike, target: { [x: string]: unknown; }) => void; export declare let isScriptletPath: (filePath: unknown) => boolean; export declare let resolveToScriptPath: (rawScript: string, cwd?: string) => string; export declare let resolveScriptToCommand: (script: string) => string; export declare const shortcutNormalizer: (shortcut: string) => string; export declare const friendlyShortcut: (shortcut: string) => string; export declare let setMetadata: (contents: string, overrides: { [key: string]: string; }) => string; export { VALID_METADATA_KEYS, VALID_METADATA_KEYS_SET, parseMetadataComments, parseSnippetMetadata, type MetadataWarning, type ParseMetadataResult, type ParseMetadataOptions, type ValidMetadataKey } from './metadata-parser.js'; export declare let getMetadata: (contents: string) => Metadata; export declare let getLastSlashSeparated: (string: string, count: number) => string; export declare let kenvFromFilePath: (filePath: string) => string; export declare let getLogFromScriptPath: (filePath: string) => string; export declare let stripMetadata: (fileContents: string, exclude?: string[]) => string; export declare let stripName: (name: string) => string; export declare let checkIfCommandExists: (input: string) => Promise; export declare let getKenvs: (ignorePattern?: RegExp) => Promise; export declare let kitMode: () => string; export declare let run: (command: string, ...commandArgs: string[]) => Promise; export declare let updateEnv: (scriptProjectPath: string) => void; export declare let configEnv: () => import("dotenv-flow").DotenvFlowParseResult; export declare let trashScriptBin: (script: Script) => Promise; export declare let trashScript: (script: Script) => Promise; export declare let getScriptFiles: (kenv?: string) => Promise; export declare let scriptsSort: (timestamps: Stamp[]) => (a: Script, b: Script) => number; export declare let isParentOfDir: (parent: string, dir: string) => boolean; export declare let isInDir: (parentDir: string) => (dir: string) => boolean; export declare let escapeShortcut: Shortcut; export declare let backToMainShortcut: Shortcut; export declare let closeShortcut: Shortcut; export declare let editScriptShortcut: Shortcut; export declare let submitShortcut: Shortcut; export declare let viewLogShortcut: Shortcut; export declare let terminateProcessShortcut: Shortcut; export declare let terminateAllProcessesShortcut: Shortcut; export declare let smallShortcuts: Shortcut[]; export declare let argShortcuts: Shortcut[]; export declare let editorShortcuts: Shortcut[]; export declare let defaultShortcuts: Shortcut[]; export declare let divShortcuts: Shortcut[]; export declare let formShortcuts: Shortcut[]; export declare let cliShortcuts: Shortcut[]; export declare let proPane: () => string; export declare const getShellSeparator: () => string; export declare let getTrustedKenvsKey: () => string; export declare const uniq: (array: any[]) => any[]; interface DebounceSettings { leading?: boolean; trailing?: boolean; } type Procedure = (...args: any[]) => void; type DebouncedFunc = (...args: Parameters) => void; export declare const debounce: (func: T, waitMilliseconds?: number, options?: DebounceSettings) => DebouncedFunc; export declare const range: (start: number, end: number, step?: number) => number[]; type Iteratee = ((item: T) => any) | keyof T; export declare let sortBy: (collection: T[], iteratees: Iteratee[]) => T[]; export declare let isUndefined: (value: any) => value is undefined; export declare let isString: (value: any) => value is string; export declare let getCachePath: (filePath: string, type: string) => string; export declare let adjustPackageName: (packageName: string) => string; export declare let keywordInputTransformer: (keyword: string) => (input: string) => string; export declare let escapeHTML: (text: string) => string; export declare let processInBatches: (items: Promise[], batchSize?: number, maxRetries?: number) => Promise; export declare let md: (content?: string, containerClasses?: string) => string; export declare let highlight: (markdown: string, containerClass?: string, injectStyles?: string) => Promise; export declare let tagger: (script: Script) => void; export declare let getKenvFromPath: (filePath: string) => string; export declare let isScriptlet: (script: Script | Scriptlet) => script is Scriptlet; export declare let isSnippet: (script: Script) => script is Snippet; export declare let processPlatformSpecificTheme: (cssString: string) => string; export declare let infoPane: (title: string, description?: string) => string; export { parseScript, commandFromFilePath, getShebangFromContents, iconFromKenv, parseFilePath, parseMetadata, postprocessMetadata } from './parser.js'; export { defaultGroupClassName, defaultGroupNameClassName, formatChoices } from './format.js'; export { groupChoices } from './group.js'; export { parseScriptletsFromPath, parseMarkdownAsScriptlets, parseScriptlets } from './scriptlets.js'; export { getSnippet, parseSnippets } from './snippets.js'; export { createPathResolver, home, kitPath, kenvPath, kitPnpmPath, kitDotEnvPath } from './resolvers.js'; export { isBin, isFile, isJsh, isDir, isLinux, isMac, isWin } from './is.js'; export { cmd, returnOrEnter, scriptsDbPath, timestampsPath, statsPath, prefsPath, promptDbPath, themeDbPath, userDbPath, tmpClipboardDir, tmpDownloadsDir, getMainScriptPath, kitDocsPath, KENV_SCRIPTS, KENV_APP, KENV_BIN, KIT_APP, KIT_APP_PROMPT, KIT_APP_INDEX, SHELL_TOOLS } from './constants.js';