Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Composer/packages/lib/shared/src/skillsUtils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,6 @@ export const isLocalhostUrl = (matchUrl: string) => {
export const isSkillHostUpdateRequired = (skillHostEndpoint?: string) => {
return !skillHostEndpoint || isLocalhostUrl(skillHostEndpoint);
};

export const isUsingAdaptiveRuntime = (runtime?: DialogSetting['runtime']): boolean =>
runtime?.key === 'csharp-azurewebapp-v2' || !!runtime?.key?.startsWith('adaptive-runtime-');
4 changes: 1 addition & 3 deletions Composer/packages/server/src/models/bot/botProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import fs from 'fs';
import has from 'lodash/has';
import axios from 'axios';
import { autofixReferInDialog } from '@bfc/indexers';
import { isUsingAdaptiveRuntime } from '@bfc/shared';
import {
getNewDesigner,
FileInfo,
Expand Down Expand Up @@ -47,9 +48,6 @@ const oauthInput = () => ({
});

const defaultLanguage = 'en-us'; // default value for settings.defaultLanguage

const isUsingAdaptiveRuntime = (runtime?: DialogSetting['runtime']): boolean =>
runtime?.key === 'csharp-azurewebapp-v2' || runtime?.key === 'adaptive-runtime-dotnet-webapp';
export class BotProject implements IBotProject {
public ref: LocationRef;
// TODO: address need to instantiate id - perhaps do so in constructor based on Store.get(projectLocationMap)
Expand Down
3 changes: 2 additions & 1 deletion extensions/azurePublish/src/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
PublishResponse,
PublishResult,
} from '@botframework-composer/types';
import { isUsingAdaptiveRuntime } from '@bfc/shared';

import { authConfig, ResourcesItem } from '../types';

Expand Down Expand Up @@ -190,7 +191,7 @@ export default async (composer: IExtensionRegistration): Promise<void> => {
// include both pre-release and release identifiers here
// TODO: eventually we can clean this up when the "old" runtime is deprecated
// (old runtime support is the else block below)
if (runtime.key === 'csharp-azurewebapp-v2' || runtime.key === 'adaptive-runtime-dotnet-webapp') {
if (isUsingAdaptiveRuntime(runtime)) {
const buildFolder = this.getProjectFolder(resourcekey, this.mode);

// clean up from any previous deploys
Expand Down
4 changes: 1 addition & 3 deletions extensions/azurePublish/src/node/luisAndQnA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ import * as path from 'path';

import * as fs from 'fs-extra';
import * as rp from 'request-promise';
import { isUsingAdaptiveRuntime } from '@bfc/shared';
import { ILuisConfig, FileInfo, IBotProject, RuntimeTemplate, DialogSetting } from '@botframework-composer/types';

import { AzurePublishErrors } from './utils/errorHandler';
import { BotProjectDeployLoggerType } from './types';

const isUsingAdaptiveRuntime = (runtime?: DialogSetting['runtime']): boolean =>
runtime?.key === 'csharp-azurewebapp-v2' || runtime?.key === 'adaptive-runtime-dotnet-webapp';

const botPath = (projPath: string, runtime?: DialogSetting['runtime']) =>
isUsingAdaptiveRuntime(runtime) ? projPath : path.join(projPath, 'ComposerDialogs');

Expand Down