config.AppConfig
The config for one environment, checked, with every optional key present.
Usage
Validate a configuration in an app-development tool.
This type is used by config.resolveConfig
// Validate a configuration in an app-development tool.
import { resolveConfig, SETTING_DEFAULTS, IOS_BACKGROUND_MODES } from 'kuito/config';
const config = resolveConfig(
{
name: 'Notes',
ios: { bundleIdentifier: 'com.example.notes' },
android: { applicationId: 'com.example.notes' },
environments: { staging: { idSuffix: '.staging' } },
},
'/project/kuito.config.ts',
'staging',
);
console.log(config.ios.bundleIdentifier, config.splash, config.icon);
console.log(SETTING_DEFAULTS.minSdk, IOS_BACKGROUND_MODES);Type declaration
export interface AppConfig {
name: string;
version: string;
buildNumber: number;
icon: IconSource | null;
orientation: Orientation;
colorScheme: ColorScheme;
backgroundColor: string | null;
statusBar: { style: StatusBarStyle; hidden: boolean };
urlSchemes: string[];
linkDomains: string[];
ios: {
bundleIdentifier: string;
icon: { light: IconSource | null; dark: IconSource | null; tinted: IconSource | null };
supportsTablet: boolean;
requiresFullScreen: boolean;
deploymentTarget: string;
teamId: string | null;
associatedDomains: string[];
pushEnvironment: PushEnvironment | null;
backgroundModes: IOSBackgroundMode[];
infoPlist: PlistDictionary;
entitlements: PlistDictionary;
};
android: {
applicationId: string;
adaptiveIcon: {
foreground: IconSource | null;
/** A `#RRGGBB` color or an image. */
background: string | IconSource | null;
monochrome: IconSource | null;
};
softInputMode: SoftInputMode;
minSdk: number;
/** The keystore as the config wrote it, relative to its file. */
signing: { keystore: string | null; keyAlias: string | null };
manifest: AndroidManifestAdditions;
theme: Record<string, string>;
};
permissions: KuitoPermissions;
backgroundTasks: string[];
fonts: FontSource[];
splash: SplashConfig | null;
/** The URL without a trailing slash. */
updates: { url: string; publicKey: string } | null;
strict: boolean;
/** Each migration's statements. */
migrations: string[][];
}Members 19
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | — |
version | string | Yes | — |
buildNumber | number | Yes | — |
icon | IconSource | Yes | — |
orientation | Orientation | Yes | — |
colorScheme | ColorScheme | Yes | — |
backgroundColor | string | Yes | — |
statusBar | { style: StatusBarStyle; hidden: boolean;} | Yes | — |
urlSchemes | string[] | Yes | — |
linkDomains | string[] | Yes | — |
ios | { bundleIdentifier: string; icon: { light: IconSource | null; dark: IconSource | null; tinted: IconSource | null; }; supportsTablet: boolean; requiresFullScreen: boolean; deploymentTarget: string; teamId: string | null; associatedDomains: string[]; pushEnvironment: PushEnvironment | null; backgroundModes: IOSBackgroundMode[]; infoPlist: PlistDictionary; entitlements: PlistDictionary;} | Yes | — |
android | { applicationId: string; adaptiveIcon: { foreground: IconSource | null; background: string | IconSource | null; monochrome: IconSource | null; }; softInputMode: SoftInputMode; minSdk: number; signing: { keystore: string | null; keyAlias: string | null; }; manifest: AndroidManifestAdditions; theme: Record<string, string>;} | Yes | — |
permissions | KuitoPermissions | Yes | — |
backgroundTasks | string[] | Yes | — |
fonts | FontSource[] | Yes | — |
splash | SplashConfig | Yes | — |
updates | { url: string; publicKey: string;} | Yes | The URL without a trailing slash. |
strict | boolean | Yes | — |
migrations | string[][] | Yes | Each migration's statements. |
statusBar — nested fields
statusBar fields
| Name | Type | Required | Description |
|---|---|---|---|
style | StatusBarStyle | Yes | — |
hidden | boolean | Yes | — |
ios — nested fields
ios fields
| Name | Type | Required | Description |
|---|---|---|---|
bundleIdentifier | string | Yes | — |
icon | { light: IconSource | null; dark: IconSource | null; tinted: IconSource | null;} | Yes | — |
supportsTablet | boolean | Yes | — |
requiresFullScreen | boolean | Yes | — |
deploymentTarget | string | Yes | — |
teamId | string | Yes | — |
associatedDomains | string[] | Yes | — |
pushEnvironment | "development" | "production" | Yes | — |
backgroundModes | ("location" | "audio" | "voip" | "fetch" | "remote-notification" | "processing" | "external-accessory" | "bluetooth-central" | "bluetooth-peripheral" | "nearby-interaction" | "push-to-talk")[] | Yes | — |
infoPlist | PlistDictionary | Yes | — |
entitlements | PlistDictionary | Yes | — |
icon — nested fields
icon fields
| Name | Type | Required | Description |
|---|---|---|---|
light | IconSource | Yes | — |
dark | IconSource | Yes | — |
tinted | IconSource | Yes | — |
android — nested fields
android fields
| Name | Type | Required | Description |
|---|---|---|---|
applicationId | string | Yes | — |
adaptiveIcon | { foreground: IconSource | null; background: string | IconSource | null; monochrome: IconSource | null;} | Yes | — |
softInputMode | SoftInputMode | Yes | — |
minSdk | number | Yes | — |
signing | { keystore: string | null; keyAlias: string | null;} | Yes | The keystore as the config wrote it, relative to its file. |
manifest | AndroidManifestAdditions | Yes | — |
theme | Record<string, string> | Yes | — |
adaptiveIcon — nested fields
adaptiveIcon fields
| Name | Type | Required | Description |
|---|---|---|---|
foreground | IconSource | Yes | — |
background | string | IconSource | Yes | A #RRGGBB color or an image. |
monochrome | IconSource | Yes | — |
signing — nested fields
signing fields
| Name | Type | Required | Description |
|---|---|---|---|
keystore | string | Yes | — |
keyAlias | string | Yes | — |
updates — nested fields
updates fields
| Name | Type | Required | Description |
|---|---|---|---|
url | string | Yes | — |
publicKey | string | Yes | — |
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.