import type { ServerConfig } from './ServerConfig.js'; import type { Features } from './allFeatures.js'; import type { PackageSettings } from './PackageSettings.js'; import type { RemoteCacheConfig } from './RemoteCacheConfig.js'; import type { ShorthandRoute } from './Route.js'; import type { TelemetryConfig } from './TelemetryConfig.js'; import type { DefineFlags } from '@ms-cloudpack/common-types-browser'; import type { ModuleResolutionConfig } from './ModuleResolutionConfig.js'; /** * Per-application user-provided configuration for Cloudpack. */ export interface AppConfig { /** * Extend the configuration from another file: either an import path or a relative path * (resolved from the config file's location). Relative paths or deep imports into another * package (without an exports map) must include the file extension. * * If an array, later files will take precedence when merging. * (The current file's config always takes precedence over any extended config.) * * Config merging approach: * - Objects will be deeply merged. * - Primitive values will be overwritten. * - Arrays will be overwritten, EXCEPT for `packageSettings`, which will be concatenated. */ extends?: string | string[]; /** * @deprecated - use "server" instead. */ devServer?: ServerConfig; /** * Configuration for the dev server. */ server?: ServerConfig; /** * Configuration for telemetry. */ telemetry?: TelemetryConfig; /** * Enable additional Cloudpack features. */ features?: Features; /** * Help message to display when Cloudpack starts up. */ helpMessage?: string; /** * Settings to customize how packages are bundled. * Later settings in the array take precedence over earlier ones. */ packageSettings?: PackageSettings[]; /** * Commands to execute prior to Cloudpack bundling. * Each entry has a command and an array of arguments: `['command', ['arg1', 'arg2']]`. */ dependsOn?: [string, string[]][]; /** * Glob pattern to match `patch-package` patch files, relative to the project root * (usually the same as the repository root). * * Note that if you're using `yarn patch` (v2+), those patches will be handled automatically * (not by this glob pattern). * @default "patches/*.patch" */ patchFilesGlobPattern?: string; /** * Azure Blob Storage configuration for remote cache - uploading and downloading packages * via `cloudpack sync`. If this is not provided, the remote cache will not be used. */ remoteCache?: RemoteCacheConfig; /** * Defines what routes to support from the app server, and which scripts will be loaded * for each. */ routes?: ShorthandRoute[]; /** * Ignore these package names when calculating included and excluded dependencies. * This is mainly intended for helper packages such as `tslib`. * * Include `...` to merge with the default list (`tslib` and `@babel/runtime` as of writing). */ neverExcludeDependencies?: string[]; /** * Key value pairs of external bundler capabilities that can be enabled in the package settings. * - Key is the name of the capability, which will be used in `PackageSettings.bundlerCapabilities`. * - Value is the import specifier (local path or package name) for the capability module. */ bundlerCapabilitiesRegistry?: Record; /** * Key value pairs that will be used to define global variables in the runtime. */ define?: DefineFlags; /** * Advanced use only: Override the bundler that's used by default (if a package's source type * doesn't indicate that a specific bundler should be used, and there are no applicable package * settings). This will **significantly** decrease performance and should only be modified if * `ori` is incompatible with your repo/build for some reason. * * In most cases, you should use `packageSettings` to change the bundler instead: for example, * if your repo's packages must be built with rspack/webpack to support some custom config, * use `packageSettings: [{ match: ["@yourscope/*", "your-unscoped-package"], bundler: "rspack" }]`. * @default 'ori' */ defaultBundler?: string; /** * Configuration for module resolution, specifying where to look for modules. */ resolve?: ModuleResolutionConfig; /** * Enables Relay support for generated artifacts. * * Note: Root directory will be resolved relative to the config directory. */ relay?: { rootDir: string; artifactDirectory?: string; }; } //# sourceMappingURL=AppConfig.d.ts.map