config.AppConfig
The config for one environment, checked, with every optional key present.
Verwendung
Validate a configuration in an app-development tool.
Dieser Typ wird verwendet von 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);Typdeklaration
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[][];
}Mitglieder 19
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
name | string | Ja | — |
version | string | Ja | — |
buildNumber | number | Ja | — |
icon | IconSource | Ja | — |
orientation | Orientation | Ja | — |
colorScheme | ColorScheme | Ja | — |
backgroundColor | string | Ja | — |
statusBar | { style: StatusBarStyle; hidden: boolean;} | Ja | — |
urlSchemes | string[] | Ja | — |
linkDomains | string[] | Ja | — |
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;} | Ja | — |
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>;} | Ja | — |
permissions | KuitoPermissions | Ja | — |
backgroundTasks | string[] | Ja | — |
fonts | FontSource[] | Ja | — |
splash | SplashConfig | Ja | — |
updates | { url: string; publicKey: string;} | Ja | The URL without a trailing slash. |
strict | boolean | Ja | — |
migrations | string[][] | Ja | Each migration's statements. |
statusBar — verschachtelte Felder
statusBar Felder
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
style | StatusBarStyle | Ja | — |
hidden | boolean | Ja | — |
ios — verschachtelte Felder
ios Felder
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
bundleIdentifier | string | Ja | — |
icon | { light: IconSource | null; dark: IconSource | null; tinted: IconSource | null;} | Ja | — |
supportsTablet | boolean | Ja | — |
requiresFullScreen | boolean | Ja | — |
deploymentTarget | string | Ja | — |
teamId | string | Ja | — |
associatedDomains | string[] | Ja | — |
pushEnvironment | "development" | "production" | Ja | — |
backgroundModes | ("location" | "audio" | "voip" | "fetch" | "remote-notification" | "processing" | "external-accessory" | "bluetooth-central" | "bluetooth-peripheral" | "nearby-interaction" | "push-to-talk")[] | Ja | — |
infoPlist | PlistDictionary | Ja | — |
entitlements | PlistDictionary | Ja | — |
icon — verschachtelte Felder
icon Felder
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
light | IconSource | Ja | — |
dark | IconSource | Ja | — |
tinted | IconSource | Ja | — |
android — verschachtelte Felder
android Felder
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
applicationId | string | Ja | — |
adaptiveIcon | { foreground: IconSource | null; background: string | IconSource | null; monochrome: IconSource | null;} | Ja | — |
softInputMode | SoftInputMode | Ja | — |
minSdk | number | Ja | — |
signing | { keystore: string | null; keyAlias: string | null;} | Ja | The keystore as the config wrote it, relative to its file. |
manifest | AndroidManifestAdditions | Ja | — |
theme | Record<string, string> | Ja | — |
adaptiveIcon — verschachtelte Felder
adaptiveIcon Felder
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
foreground | IconSource | Ja | — |
background | string | IconSource | Ja | A #RRGGBB color or an image. |
monochrome | IconSource | Ja | — |
signing — verschachtelte Felder
signing Felder
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
keystore | string | Ja | — |
keyAlias | string | Ja | — |
updates — verschachtelte Felder
updates Felder
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
url | string | Ja | — |
publicKey | string | Ja | — |
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.