appwrite-utils-cli
Version:
Appwrite Utility Functions to help with database management, data conversion, data import, migrations, and much more. Meant to be used as a CLI tool, I do not recommend installing this in frontend environments.
54 lines (53 loc) • 2.15 kB
TypeScript
/**
* Path resolution utilities for Appwrite configuration and schema directories
*/
/**
* Resolves the schema output directory path
* @param configPath - Base configuration directory path
* @returns Full path to schemas directory
*/
export declare function resolveSchemaDir(configPath: string): string;
/**
* Resolves the collections directory path
* @param configPath - Base configuration directory path
* @returns Full path to collections directory
*/
export declare function resolveCollectionsDir(configPath: string): string;
/**
* Resolves the tables directory path
* @param configPath - Base configuration directory path
* @returns Full path to tables directory
*/
export declare function resolveTablesDir(configPath: string): string;
/**
* Resolves the YAML schema directory path
* @param configPath - Base configuration directory path
* @returns Full path to .yaml_schemas directory
*/
export declare function resolveYamlSchemaDir(configPath: string): string;
/**
* Resolves the import data directory path
* @param configPath - Base configuration directory path
* @returns Full path to importData directory
*/
export declare function resolveImportDataDir(configPath: string): string;
/**
* Resolves the .appwrite configuration directory
* @param startDir - Directory to start searching from
* @returns Path to .appwrite directory or null if not found
*/
export declare function resolveAppwriteDir(startDir: string): string | null;
/**
* Resolves a collection file path within the collections directory
* @param configPath - Base configuration directory path
* @param fileName - Name of the collection file (e.g., "User.ts" or "User.yaml")
* @returns Full path to the collection file
*/
export declare function resolveCollectionFile(configPath: string, fileName: string): string;
/**
* Resolves a table file path within the tables directory
* @param configPath - Base configuration directory path
* @param fileName - Name of the table file (e.g., "User.ts" or "User.yaml")
* @returns Full path to the table file
*/
export declare function resolveTableFile(configPath: string, fileName: string): string;