import { CommonArgs } from "../index"; import { PlasmicContext, PlasmicLock } from "./config-utils"; export declare function readLock(lockFile: string): PlasmicLock; export declare function getContext(args: CommonArgs, { enableSkipAuth, skipMissingFiles, skipInit, }?: { enableSkipAuth?: boolean; skipMissingFiles?: boolean; skipInit?: boolean; }): Promise; /** * Use empty user/token to signify no auth (only returning to provide a default host). */ export declare function getCurrentOrDefaultAuth(args: CommonArgs): Promise; /** * Table of where this metadata will be set * * Source | via | * ------------------------------------------------------------------------- * cli | defaults | source=cli scheme=codegen command=sync|watch * loader | defaults | source=loader scheme=loader command=sync|watch * create-plasmic-app | env | source=create-plasmic-app * plasmic-action | env | source=plasmic-action */ export interface Metadata { platform?: string; source?: "cli" | "loader" | "create-plasmic-app" | "plasmic-action"; scheme?: "codegen" | "loader"; command?: "sync" | "watch"; } /** * Create a metadata bundle * This will be used to tag Segment events (e.g. for codegen) * Merges in: * 1. defaults * 2. PLASMIC_METADATA environment variable settings * 3. arguments from the command-line * to create a single Metadata object for Segment * @param defaults * @param fromArgs */ export declare function generateMetadata(defaults: Metadata, fromArgs?: string): Metadata; /** * This is meant to be called from consumers of the CLI to set * metadata into the PLASMIC_METADATA environment variable * @param metadata */ export declare function setMetadataEnv(metadata: Metadata): void;