import type { AddressInfo } from 'node:net'; import type { CliOptions, Manifest, Subprocess } from '@stacksjs/types'; import type { NpmScript } from '@stacksjs/enums'; import type { Result } from '@stacksjs/error-handling'; // Bun has native YAML support via Bun.YAML // import { semver } from './versions' export declare function packageManager(): Promise; export declare function initProject(): Promise>; export declare function ensureProjectIsInitialized(): Promise; /** * Determines whether the current working directory is a Stacks project. * * A Stacks project has a package.json plus either a config/ directory or the * vendored framework at storage/framework/core (the same marker the bootstrap * script uses to detect a source checkout). */ export declare function isStacksProject(): boolean; export declare function installIfVersionMismatch(): Promise; export declare function frameworkVersion(): Promise; export declare function isAppKeySet(): Promise; /** * Determines the utilized reset preset. * * @url https://github.com/cwcss/crosswind * @param preset */ export declare function determineResetPreset(preset?: string | null): string[]; /** * Determines whether the specified value is a package manifest. */ export declare function isManifest(obj: any): obj is Manifest; /** * Determines whether the specified value is a string, null, or undefined. */ export declare function isOptionalString(value: any): value is string | null | undefined; export declare function setEnvValue(key: string, value: string): Promise; /** * Runs the specified NPM script in the package.json file. */ export declare function runNpmScript(script: NpmScript, options?: CliOptions): Promise>; /** * Determines whether the specified NPM script exists in the given manifest. */ export declare function hasScript(manifest: Manifest, script: NpmScript): boolean; export declare function parseYaml(content: any): any; /** * Determines the level of debugging. * * The debug level is determined by the following: * 1. The --verbose flag * 2. The debug property in the app configuration * * Currently, we don't support a custom debug level, * though, we would like to in the future. * * @param options */ export declare function determineDebugLevel(options?: CliOptions): boolean; export declare function isIpv6(address: AddressInfo): boolean; export declare function dumpYaml(content: any): string; export declare function loadYaml(content: string): any;