diff --git a/Composer/packages/client/src/constants.ts b/Composer/packages/client/src/constants.ts index 56ca676496..87f8984135 100644 --- a/Composer/packages/client/src/constants.ts +++ b/Composer/packages/client/src/constants.ts @@ -103,7 +103,6 @@ export enum ActionTypes { DISPLAY_SKILL_MANIFEST_MODAL = 'DISPLAY_SKILL_MANIFEST_MODAL', DISMISS_SKILL_MANIFEST_MODAL = 'DISMISS_SKILL_MANIFEST_MODAL', SET_PUBLISH_TARGETS = 'SET_PUBLISH_TARGETS', - SET_RUNTIME_SETTINGS = 'SET_RUNTIME_SETTINGS', SET_CUSTOM_RUNTIME_TOGGLE = 'SET_CUSTOM_RUNTIME_TOGGLE', SET_RUNTIME_FIELD = 'SET_RUNTIME_FIELD', } diff --git a/Composer/packages/client/src/store/action/eject.ts b/Composer/packages/client/src/store/action/eject.ts index 2249c81068..e130f958d4 100644 --- a/Composer/packages/client/src/store/action/eject.ts +++ b/Composer/packages/client/src/store/action/eject.ts @@ -5,7 +5,6 @@ import { ActionCreator } from '../types'; import { ActionTypes } from '../../constants'; import httpClient from './../../utils/httpUtil'; -import { setRuntimeSettings } from './setting'; export const getRuntimeTemplates: ActionCreator = async ({ dispatch }) => { try { @@ -30,9 +29,6 @@ export const ejectRuntime: ActionCreator = async (store, projectId, name) => { type: ActionTypes.EJECT_SUCCESS, payload: response.data, }); - if (response.data.settings?.path) { - setRuntimeSettings(store, projectId, response.data.settings.path, response.data.settings.startCommand); - } } catch (err) { dispatch({ type: ActionTypes.SET_ERROR, diff --git a/Composer/packages/client/src/store/action/setting.ts b/Composer/packages/client/src/store/action/setting.ts index e0dce2fd29..f7a0652d54 100644 --- a/Composer/packages/client/src/store/action/setting.ts +++ b/Composer/packages/client/src/store/action/setting.ts @@ -23,17 +23,6 @@ export const setPublishTargets: ActionCreator = async ({ dispatch }, publishTarg }); }; -export const setRuntimeSettings: ActionCreator = async ({ dispatch }, projectId: string, path, command) => { - dispatch({ - type: ActionTypes.SET_RUNTIME_SETTINGS, - payload: { - projectId, - path, - command, - }, - }); -}; - export const setCustomRuntime: ActionCreator = async ({ dispatch }, _, isOn) => { dispatch({ type: ActionTypes.SET_CUSTOM_RUNTIME_TOGGLE, diff --git a/Composer/packages/client/src/store/index.tsx b/Composer/packages/client/src/store/index.tsx index 6ead1e5b4a..b050660f58 100644 --- a/Composer/packages/client/src/store/index.tsx +++ b/Composer/packages/client/src/store/index.tsx @@ -86,10 +86,7 @@ export const initialBotState: BotState = { isEnvSettingUpdated: false, settings: {}, publishVersions: {}, - publishStatus: 'inactive', - lastPublishChange: null, publishTypes: [], - publishTargets: [], publishHistory: {}, botOpening: false, }; @@ -117,10 +114,6 @@ const initialAppState: AppState = { clipboardActions: [], runtimeTemplates: [], userSettings: getUserSettings(), - runtimeSettings: { - path: '', - startCommand: '', - }, announcement: undefined, appUpdate: { progressPercent: 0, diff --git a/Composer/packages/client/src/store/persistence/FilePersistence.ts b/Composer/packages/client/src/store/persistence/FilePersistence.ts index 2806e49430..fb111261d0 100644 --- a/Composer/packages/client/src/store/persistence/FilePersistence.ts +++ b/Composer/packages/client/src/store/persistence/FilePersistence.ts @@ -26,7 +26,7 @@ const actionType2ChangeType = { [ActionTypes.UPDATE_SKILL_MANIFEST]: { changeType: ChangeType.UPDATE, fileExtension: FileExtensions.Manifest }, [ActionTypes.SYNC_ENV_SETTING]: { changeType: ChangeType.UPDATE, fileExtension: FileExtensions.Setting }, [ActionTypes.SET_PUBLISH_TARGETS]: { changeType: ChangeType.UPDATE, fileExtension: FileExtensions.Setting }, - [ActionTypes.SET_RUNTIME_SETTINGS]: { changeType: ChangeType.UPDATE, fileExtension: FileExtensions.Setting }, + [ActionTypes.EJECT_SUCCESS]: { changeType: ChangeType.UPDATE, fileExtension: FileExtensions.Setting }, }; class FilePersistence { diff --git a/Composer/packages/client/src/store/reducer/index.ts b/Composer/packages/client/src/store/reducer/index.ts index 47f7c44ce7..634be2f550 100644 --- a/Composer/packages/client/src/store/reducer/index.ts +++ b/Composer/packages/client/src/store/reducer/index.ts @@ -448,16 +448,7 @@ const syncEnvSetting: ReducerFunc = (state, { settings, projectId }) => { }; const setPublishTargets: ReducerFunc = (state, { publishTarget }) => { - state.publishTargets = publishTarget; - return state; -}; - -const setRuntimeSettings: ReducerFunc = (state, { path, command }) => { - state.settings.runtime = { - customRuntime: true, - path, - command, - }; + state.settings.publishTargets = publishTarget; return state; }; @@ -611,7 +602,13 @@ const setUserSettings: ReducerFunc> = (state, settings) => }; const ejectSuccess: ReducerFunc = (state, payload) => { - state.runtimeSettings = payload.settings; + if (payload.settings?.path) { + state.settings.runtime = { + customRuntime: true, + path: payload.settings.path, + command: payload.settings.startCommand, + }; + } return state; }; @@ -727,7 +724,6 @@ export const reducer = createReducer({ [ActionTypes.DISPLAY_SKILL_MANIFEST_MODAL]: displaySkillManifestModal, [ActionTypes.DISMISS_SKILL_MANIFEST_MODAL]: dismissSkillManifestModal, [ActionTypes.SET_PUBLISH_TARGETS]: setPublishTargets, - [ActionTypes.SET_RUNTIME_SETTINGS]: setRuntimeSettings, [ActionTypes.SET_CUSTOM_RUNTIME_TOGGLE]: setCustomRuntimeToggle, [ActionTypes.SET_RUNTIME_FIELD]: setRuntimeField, }); diff --git a/Composer/packages/client/src/store/types.ts b/Composer/packages/client/src/store/types.ts index 5445e706b0..98aa45806a 100644 --- a/Composer/packages/client/src/store/types.ts +++ b/Composer/packages/client/src/store/types.ts @@ -131,9 +131,6 @@ export interface BotState { actionsSeed: any; publishVersions: any; - publishStatus: any; - lastPublishChange: any; - publishTargets: any[]; publishTypes: PublishType[]; publishHistory: { [key: string]: any[]; @@ -176,11 +173,6 @@ export type AppState = { userSettings: UserSettings; // preferences for the editors - runtimeSettings: { - // custom runtime settings, used in ejection - path: string; - startCommand: string; - }; displaySkillManifest?: string; // currently displayed error