UNPKG

pocketbase-node

Version:

A Node.js compatibility layer for PocketBase JSVM

82 lines (72 loc) 3.25 kB
import { writeFileSync as writeFileSync$1, PathLike, MakeDirectoryOptions, Mode } from 'fs'; declare const readFileSync: (path: string, options?: any) => string; declare const existsSync: (pathLike: string, fileType?: "dir" | "file" | "both") => boolean; declare const writeFileSync: typeof writeFileSync$1; declare function mkdirSync(path: PathLike, options: MakeDirectoryOptions & { recursive: true; }): string | undefined; declare function mkdirSync(path: PathLike, options?: Mode | (MakeDirectoryOptions & { recursive?: false | undefined; }) | null): void; declare const fs_existsSync: typeof existsSync; declare const fs_mkdirSync: typeof mkdirSync; declare const fs_readFileSync: typeof readFileSync; declare const fs_writeFileSync: typeof writeFileSync; declare namespace fs { export { fs_existsSync as existsSync, fs_mkdirSync as mkdirSync, fs_readFileSync as readFileSync, fs_writeFileSync as writeFileSync }; } declare function resolve(...args: string[]): string; declare function normalize(path: string): string; declare function isAbsolute(path: string): boolean; declare function join(...paths: string[]): string; declare function relative(from: string, to: string): string; declare function dirname(path: string): string; declare function basename(path: string, ext: string): string; declare function extname(path: string): string; declare function format(pathObject: string): string; declare function parse(path: string): { root: string; dir: string; base: string; ext: string; name: string; }; declare const sep = "/"; declare const delimiter = ":"; declare const win32: null; declare const path_basename: typeof basename; declare const path_delimiter: typeof delimiter; declare const path_dirname: typeof dirname; declare const path_extname: typeof extname; declare const path_format: typeof format; declare const path_isAbsolute: typeof isAbsolute; declare const path_join: typeof join; declare const path_normalize: typeof normalize; declare const path_parse: typeof parse; declare const path_relative: typeof relative; declare const path_resolve: typeof resolve; declare const path_sep: typeof sep; declare const path_win32: typeof win32; declare namespace path { export { path_basename as basename, path_delimiter as delimiter, path_dirname as dirname, path_extname as extname, path_format as format, path_isAbsolute as isAbsolute, path_join as join, path_normalize as normalize, path_parse as parse, path_relative as relative, path_resolve as resolve, path_sep as sep, path_win32 as win32 }; } /** * * @param {string[]} cmdArr This is NONSTANDARD. It is an array of strings that will be joined with spaces to form the command to execute rather than a simple string like nodejs * @returns {string} */ declare const execSync: (cmdArr: string[]) => string; declare const child_process_execSync: typeof execSync; declare namespace child_process { export { child_process_execSync as execSync }; } declare const cwd: () => string; declare const env: { [key: string]: string; }; declare const process_cwd: typeof cwd; declare const process_env: typeof env; declare namespace process { export { process_cwd as cwd, process_env as env }; } export { child_process, fs, path, process };