You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -177,6 +151,15 @@ export async function deploy(options: SWACLIConfig) {
177
151
}
178
152
}
179
153
154
+
if(!isUserOrConfigOption("apiLanguage")){
155
+
logger.log(`Consider providing api-language and version using --api-language and --api-version flags,
156
+
otherwise default values apiLanguage: ${apiLanguage} and apiVersion: ${apiVersion} will apply`);
157
+
}elseif(!isUserOrConfigOption("apiVersion")){
158
+
apiVersion=getDefaultVersion(apiLanguage);
159
+
logger.log(`Api language "${apiLanguage}" is provided but api version is not provided.
160
+
Assuming default version "${apiVersion}"`);
161
+
}
162
+
180
163
// resolve the deployment token
181
164
if(deploymentToken){
182
165
deploymentToken=deploymentToken;
@@ -362,7 +345,7 @@ export async function deploy(options: SWACLIConfig) {
362
345
elseif(line.includes("[31m")){
363
346
if(line.includes("Cannot deploy to the function app because Function language info isn't provided.")){
364
347
line=chalk.red(
365
-
`Cannot deploy to the function app because Function language info isn't provided, use flags "--api-language" and "--api-version" or add a "platform.apiRuntime" property to your staticwebapp.config.json file, or create one in ${options.outputLocation!}. Please consult the documentation for more information about staticwebapp.config.json: https://docs.microsoft.com/azure/static-web-apps/configuration`
348
+
`Cannot deploy to the function app because Function language info isn't provided, use flags "--api-language" and "--api-version" or add a "platform.apiRuntime" property to your staticwebapp.config.json file, or create one in ${options.outputLocation!}. Please consult the documentation for more information about staticwebapp.config.json: https://learn.microsoft.com/en-us/azure/static-web-apps/build-configuration?tabs=github-actions#skip-building-the-api`
// Refer to this for functions and versions - https://learn.microsoft.com/en-us/azure/static-web-apps/configuration#selecting-the-api-language-runtime-version
0 commit comments