import type { Bud } from '@roots/bud-framework'; import type { Contract } from '@roots/bud-framework/service'; import { BudError } from '@roots/bud-support/errors'; import { Filesystem, json, yml } from '@roots/bud-support/filesystem'; import logger from '@roots/bud-support/logger'; import { S3 } from '@roots/filesystem'; /** * {@link Filesystem} service */ export declare class FS extends Filesystem implements Contract { _app: () => Bud; /** * JSON * * @see {@link https://bud.js.org/reference/bud.fs/json} */ json: typeof json; /** * {@link Contract.label} */ label: string; /** * S3 * * @see {@link https://bud.js.org/reference/bud.fs/s3} */ s3: S3; /** * YML * * @see {@link https://bud.js.org/reference/bud.fs/yml} */ yml: typeof yml; /** * Class constructor */ constructor(_app: () => Bud); /** * {@link Contract.app} */ get app(): Bud; catch(error: BudError | string): never; /** * {@link Contract.done} */ done(): Bud; /** * {@link Contract.logger} */ get logger(): typeof logger; /** * Set bucket * * @param bucket - {@link S3.bucket} * * @see {@link https://bud.js.org/reference/bud.fs/s3#setup} */ setBucket(bucket: string): this; /** * Set credentials * * @param credentials - {@link S3.credentials} * * @see {@link https://bud.js.org/reference/bud.fs/s3#setup} */ setCredentials(credentials: S3[`config`][`credentials`]): this; /** * Set endpoint * * @param endpoint - S3 endpoint * * @see {@link https://bud.js.org/reference/bud.fs/s3#setup} */ setEndpoint(endpoint: S3[`config`][`endpoint`]): this; /** * Set S3 region * * @param region - S3 region * * @see {@link https://bud.js.org/reference/bud.fs/s3#setup} */ setRegion(region: S3[`config`][`region`]): this; /** * Upload files to S3 * * @param options - upload options * * @see {@link https://bud.js.org/reference/bud.fs/s3#uploading-files} */ upload(options?: { destination?: string; files?: string; keep?: false | number; source?: string; }): this; }