UNPKG

@netlify/build

Version:
107 lines (106 loc) 3.68 kB
export interface NetlifyPluginConstants { /** * path to the Netlify configuration file. * `undefined` if none was used. */ CONFIG_PATH?: string; /** * directory that contains the deploy-ready HTML files and assets generated by the build. Its value is always defined, but the target might not have been created yet. */ PUBLISH_DIR: string; /** * the directory where function source code lives. * `undefined` if no `netlify/functions` directory exists in the base directory and if not specified by the user. */ FUNCTIONS_SRC?: string; /** * the directory inside a mono repository where it collects the settings from. * This is the value of the package directory field of the build settings * `undefined` if none is set. */ PACKAGE_PATH?: string; /** * the directory where internal Edge Functions source code lives. This is where build plugins should place auto-generated functions. * `undefined` if the version of @netlify/build does not support internal Edge Functions */ INTERNAL_EDGE_FUNCTIONS_SRC?: string; /** * the directory where internal function source code lives. This is where build plugins should place auto-generated functions. * `undefined` if the version of @netlify/build does not support internal functions */ INTERNAL_FUNCTIONS_SRC?: string; /** * the directory where built serverless functions are placed before deployment. Its value is always defined, but the target might not have been created yet. */ FUNCTIONS_DIST: string; /** * the directory where built Edge Functions are placed before deployment. Its value is always defined, but the target might not have been created yet. */ EDGE_FUNCTIONS_DIST: string; /** * the directory where Edge Functions source code lives. * `undefined` if no `netlify/edge-functions` directory exists. */ EDGE_FUNCTIONS_SRC?: string; /** * boolean indicating whether the build was [run locally](https://docs.netlify.com/cli/get-started/#run-builds-locally) or on Netlify */ IS_LOCAL: boolean; /** * version of Netlify Build as a `major.minor.patch` string */ NETLIFY_BUILD_VERSION: string; /** * the Netlify site ID */ SITE_ID: string; /** * the Netlify account ID */ ACCOUNT_ID?: string; /** * the Netlify API access token */ NETLIFY_API_TOKEN?: string; /** * the Netlify API host */ NETLIFY_API_HOST?: string; /** * The directory that is used for caching * @default '.netlify/cache' */ CACHE_DIR: string; } /** * Retrieve constants passed to plugins */ export declare const getConstants: ({ configPath, buildDir, packagePath, functionsDistDir, edgeFunctionsDistDir, cacheDir, netlifyConfig, siteInfo: { id: siteId, account_id: accountId }, apiHost, token, mode, }: { configPath: any; buildDir: any; packagePath: any; functionsDistDir: any; edgeFunctionsDistDir: any; cacheDir: any; netlifyConfig: any; siteInfo: { id: any; account_id: any; }; apiHost: any; token: any; mode: any; }) => Promise<NetlifyPluginConstants>; export declare const addMutableConstants: ({ constants, buildDir, netlifyConfig: { build: { publish, edge_functions: edgeFunctions }, functionsDirectory, }, }: { constants: any; buildDir: any; netlifyConfig: { build: { publish: any; edge_functions: any; }; functionsDirectory: any; }; }) => Promise<{ [k: string]: string | boolean | undefined; }>;