@salesforce/source-deploy-retrieve
Version:
JavaScript library to run Salesforce metadata deploys and retrieves
39 lines (38 loc) • 1.4 kB
TypeScript
import type { TreeContainer } from '../treeContainers';
import { SourcePath } from '../../common/types';
type TrailingSlash = 'always' | 'never' | 'auto';
type RedirectStatusCode = 301 | 302 | 307 | 308;
export type WebApplicationRewrite = {
route?: string;
rewrite?: string;
};
export type WebApplicationRedirect = {
route?: string;
redirect?: string;
statusCode?: RedirectStatusCode;
};
export type WebApplicationHeaderKeyValue = {
key?: string;
value?: string;
};
export type WebApplicationHeaderRule = {
source?: string;
headers?: WebApplicationHeaderKeyValue[];
};
export type WebApplicationRouting = {
rewrites?: WebApplicationRewrite[];
redirects?: WebApplicationRedirect[];
fallback?: string;
trailingSlash?: TrailingSlash;
fileBasedRouting?: boolean;
};
export type WebApplicationConfig = {
outputDir?: string;
routing?: WebApplicationRouting;
headers?: WebApplicationHeaderRule[];
};
/** Basic shape check — use after field-level validation to narrow the type. */
export declare function isWebApplicationConfig(value: unknown): value is WebApplicationConfig;
/** Validate webapplication.json contents. Checks structure first, then schema, then file existence. */
export declare function validateWebApplicationJson(raw: Buffer, descriptorPath: string, contentPath: SourcePath, tree: TreeContainer): void;
export {};