MCPcopy
hub / github.com/ionic-team/capacitor / checkAppConfig

Function checkAppConfig

cli/src/common.ts:86–111  ·  view source on GitHub ↗
(config: Config)

Source from the content-addressed store, hash-verified

84}
85
86export async function checkAppConfig(config: Config): Promise<string | null> {
87 if (!config.app.appId) {
88 return (
89 `Missing ${c.input('appId')} for new platform.\n` +
90 `Please add it in ${config.app.extConfigName} or run ${c.input('npx cap init')}.`
91 );
92 }
93 if (!config.app.appName) {
94 return (
95 `Missing ${c.input('appName')} for new platform.\n` +
96 `Please add it in ${config.app.extConfigName} or run ${c.input('npx cap init')}.`
97 );
98 }
99
100 const appIdError = await checkAppId(config, config.app.appId);
101 if (appIdError) {
102 return appIdError;
103 }
104
105 const appNameError = await checkAppName(config, config.app.appName);
106 if (appNameError) {
107 return appNameError;
108 }
109
110 return null;
111}
112
113export async function checkAppDir(config: Config, dir: string): Promise<string | null> {
114 if (!/^\S*$/.test(dir)) {

Callers 1

addCommandFunction · 0.90

Calls 2

checkAppIdFunction · 0.85
checkAppNameFunction · 0.85

Tested by

no test coverage detected