Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrote emulator/core package & moved to app/main. #1989

Merged
merged 2 commits into from
Nov 18, 2019
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Removed
- [main] Removed unused `VersionManager` class in PR [1991](https://github.com/microsoft/BotFramework-Emulator/pull/1991)

- [main] Rewrote the `emulator/core` package and removed the `emulator/cli` package in PR [1989](https://github.com/microsoft/BotFramework-Emulator/pull/1989)

## v4.6.0 - 2019 - 10 - 31
## Added
- [main] Added End-to-End tests using Spectron in PR [1696](https://github.com/microsoft/BotFramework-Emulator/pull/1696)
Expand Down
2 changes: 0 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
"packages/app/client",
"packages/app/main",
"packages/app/shared",
"packages/emulator/cli",
"packages/emulator/core",
"packages/sdk/client",
"packages/sdk/shared",
"packages/sdk/ui-react",
Expand Down
2,205 changes: 1,051 additions & 1,154 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion packages/app/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
"dependencies": {
"@babel/runtime": "^7.1.5",
"@bfemulator/app-shared": "^1.0.0",
"@bfemulator/emulator-core": "1.0.0-0",
"@bfemulator/sdk-client": "^1.0.0",
"@bfemulator/sdk-shared": "^1.0.0",
"@bfemulator/ui-react": "^1.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ describe('Window state actions', () => {
});

test('setAvailableThemes action', () => {
const themes = [{ name: 'light', href: './light.css' }, { name: 'dark', href: './dark.css' }];
const themes = [
{ name: 'light', href: './light.css' },
{ name: 'dark', href: './dark.css' },
];
expect(windowStateActions.setAvailableThemes(themes)).toEqual({
type: windowStateActions.SET_AVAILABLE_THEMES,
payload: { availableThemes: themes },
Expand Down
6 changes: 5 additions & 1 deletion packages/app/client/src/state/reducers/users.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ describe('users reducer', () => {
user1: {},
},
};
const action = addUsers([{ name: '', id: 'user1' }, { name: '', id: 'user2' }, { name: '', id: 'user3' }]);
const action = addUsers([
{ name: '', id: 'user1' },
{ name: '', id: 'user2' },
{ name: '', id: 'user3' },
]);
const state = users(initialState, action);

expect(state).toEqual({
Expand Down
5 changes: 4 additions & 1 deletion packages/app/client/src/state/reducers/windowState.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ describe('windowState reducer', () => {
});

it('should handle a set available themes action', () => {
const themes = [{ name: 'light', href: './light.css' }, { name: 'dark', href: './dark.css' }];
const themes = [
{ name: 'light', href: './light.css' },
{ name: 'dark', href: './dark.css' },
];
const action = setAvailableThemes(themes);
const state = windowState({} as any, action);

Expand Down
6 changes: 5 additions & 1 deletion packages/app/client/src/state/sagas/resourcesSagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ export class ResourcesSagas {
private static commandService: CommandServiceImpl;

public static *openContextMenuForResource(action: ResourcesAction<IFileService>): IterableIterator<any> {
const menuItems = [{ label: 'Open file location', id: 0 }, { label: 'Rename', id: 1 }, { label: 'Delete', id: 2 }];
const menuItems = [
{ label: 'Open file location', id: 0 },
{ label: 'Rename', id: 1 },
{ label: 'Delete', id: 2 },
];

const result = yield ResourcesSagas.commandService.remoteCall(
SharedConstants.Commands.Electron.DisplayContextMenu,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,4 @@ const mapDispatchToProps = (_dispatch: () => void): AzureLoginPromptDialogProps
};
};

export const AzureLoginPromptDialogContainer = connect(
null,
mapDispatchToProps
)(AzureLoginPromptDialog as any) as any;
export const AzureLoginPromptDialogContainer = connect(null, mapDispatchToProps)(AzureLoginPromptDialog as any) as any;
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,4 @@ const mapDispatchToProps = (_dispatch): BotCreationDialogProps => {
};
};

export const BotCreationDialogContainer = connect(
undefined,
mapDispatchToProps
)(BotCreationDialog);
export const BotCreationDialogContainer = connect(undefined, mapDispatchToProps)(BotCreationDialog);
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,4 @@ const mapDispatchToProps = dispatch => ({
sendNotification: notification => dispatch(beginAdd(notification)),
});

export const BotSettingsEditorContainer = connect(
mapStateToProps,
mapDispatchToProps
)(BotSettingsEditor);
export const BotSettingsEditorContainer = connect(mapStateToProps, mapDispatchToProps)(BotSettingsEditor);
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,4 @@ const mapDispatchToProps = dispatch => (
};
};

export const ConnectServicePromptDialogContainer = connect(
null,
mapDispatchToProps
)(ConnectServicePromptDialog);
export const ConnectServicePromptDialogContainer = connect(null, mapDispatchToProps)(ConnectServicePromptDialog);
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,4 @@ function mapDispatchToProps(dispatch: (action: Action) => void): DataCollectionD
};
}

export const DataCollectionDialogContainer = connect(
null,
mapDispatchToProps
)(DataCollectionDialog);
export const DataCollectionDialogContainer = connect(null, mapDispatchToProps)(DataCollectionDialog);
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,4 @@ const mapDispatchToProps = (dispatch: (action: Action) => void): GetStartedWithC
},
});

export const GetStartedWithCSDialogContainer = connect(
mapStateToProps,
mapDispatchToProps
)(GetStartedWithCSDialog);
export const GetStartedWithCSDialogContainer = connect(mapStateToProps, mapDispatchToProps)(GetStartedWithCSDialog);
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,4 @@ const mapStateToProps = (state: RootState, ownProps: OpenBotDialogProps): OpenBo
};
};

export const OpenBotDialogContainer = connect(
mapStateToProps,
mapDispatchToProps
)(OpenBotDialog);
export const OpenBotDialogContainer = connect(mapStateToProps, mapDispatchToProps)(OpenBotDialog);
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,4 @@ const mapDispatchToProps = (_dispatch: () => void): OpenUrlDialogProps => {
};
};

export const OpenUrlDialogContainer = connect(
null,
mapDispatchToProps
)(OpenUrlDialog);
export const OpenUrlDialogContainer = connect(null, mapDispatchToProps)(OpenUrlDialog);
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,4 @@ function mapDispatchToProps(dispatch: (action: Action) => void): PostMigrationDi
};
}

export const PostMigrationDialogContainer = connect(
mapStateToProps,
mapDispatchToProps
)(PostMigrationDialog);
export const PostMigrationDialogContainer = connect(mapStateToProps, mapDispatchToProps)(PostMigrationDialog);
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,4 @@ const mapDispatchToProps = (dispatch: (action: Action) => void) => {
};
};

export const ProgressIndicatorContainer = connect(
mapStateToProps,
mapDispatchToProps
)(ProgressIndicator);
export const ProgressIndicatorContainer = connect(mapStateToProps, mapDispatchToProps)(ProgressIndicator);
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,4 @@ const mapDispatchToProps = dispatch => ({
),
cancel: () => DialogService.hideDialog(0),
});
export const ResourcesSettingsContainer = connect(
mapStateToProps,
mapDispatchToProps
)(ResourcesSettings);
export const ResourcesSettingsContainer = connect(mapStateToProps, mapDispatchToProps)(ResourcesSettings);
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,4 @@ function mapDispatchToProps(dispatch: (action: Action) => void): SecretPromptDia
};
}

export const SecretPromptDialogContainer = connect(
undefined,
mapDispatchToProps
)(SecretPromptDialog);
export const SecretPromptDialogContainer = connect(undefined, mapDispatchToProps)(SecretPromptDialog);
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,4 @@ const mapDispatchToProps = (dispatch): TabManagerProps => ({
},
});

export const TabManagerContainer = connect(
mapStateToProps,
mapDispatchToProps
)(TabManager) as any;
export const TabManagerContainer = connect(mapStateToProps, mapDispatchToProps)(TabManager) as any;
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,4 @@ function mapDispatchToProps(_dispatch: any): UpdateAvailableDialogProps {
};
}

export const UpdateAvailableDialogContainer = connect(
null,
mapDispatchToProps
)(UpdateAvailableDialog);
export const UpdateAvailableDialogContainer = connect(null, mapDispatchToProps)(UpdateAvailableDialog);
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,4 @@ function mapDispatchToProps(_dispatch: any): UpdateUnavailableDialogProps {
};
}

export const UpdateUnavailableDialogContainer = connect(
null,
mapDispatchToProps
)(UpdateUnavailableDialog);
export const UpdateUnavailableDialogContainer = connect(null, mapDispatchToProps)(UpdateUnavailableDialog);
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,4 @@ const mapDispatchToProps = (dispatch: (action: Action) => void, ownProps: AppSet
setDirtyFlag: debounce((dirty: boolean) => dispatch(EditorActions.setDirtyFlag(ownProps.documentId, dirty)), 300),
});

export const AppSettingsEditorContainer = connect(
mapStateToProps,
mapDispatchToProps
)(AppSettingsEditor);
export const AppSettingsEditorContainer = connect(mapStateToProps, mapDispatchToProps)(AppSettingsEditor);
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,4 @@ function mapStateToProps(state: RootState, { documentId }: { documentId: string
};
}

export const ChatPanelContainer = connect(
mapStateToProps,
undefined
)(ChatPanel);
export const ChatPanelContainer = connect(mapStateToProps, undefined)(ChatPanel);
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,4 @@ const mapDispatchToProps = (dispatch): EmulatorProps => ({
),
});

export const EmulatorContainer = connect(
mapStateToProps,
mapDispatchToProps
)(Emulator);
export const EmulatorContainer = connect(mapStateToProps, mapDispatchToProps)(Emulator);
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,4 @@ const mapDispatchToProps = (dispatch, ownProps: ChatProps): Partial<ChatProps> =
};
};

export const ChatContainer = connect(
mapStateToProps,
mapDispatchToProps
)(Chat);
export const ChatContainer = connect(mapStateToProps, mapDispatchToProps)(Chat);
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,4 @@ function mapStateToProps(state: RootState, { documentId }: { documentId: string
};
}

export const OuterActivityWrapperContainer = connect(
mapStateToProps,
undefined
)(OuterActivityWrapper);
export const OuterActivityWrapperContainer = connect(mapStateToProps, undefined)(OuterActivityWrapper);
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,4 @@ function mapStateToProps(state: RootState, { documentId }: { documentId: string
};
}

export const TraceActivityContainer = connect(
mapStateToProps,
undefined
)(TraceActivity);
export const TraceActivityContainer = connect(mapStateToProps, undefined)(TraceActivity);
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,4 @@ const mapDispatchToProps = dispatch => {
};
};

export const InspectorContainer = connect(
mapStateToProps,
mapDispatchToProps
)(Inspector);
export const InspectorContainer = connect(mapStateToProps, mapDispatchToProps)(Inspector);
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,4 @@ function mapStateToProps(state: RootState, { documentId }: { documentId: string
};
}

export const LogContainer = connect(
mapStateToProps,
undefined
)(Log);
export const LogContainer = connect(mapStateToProps, undefined)(Log);
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,4 @@ function mapDispatchToProps(dispatch: any): Partial<LogEntryProps> {
};
}

export const LogEntry = connect(
null,
mapDispatchToProps
)(LogEntryComponent);
export const LogEntry = connect(null, mapDispatchToProps)(LogEntryComponent);
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,4 @@ const mapDispatchToProps = (dispatch: (action: Action) => void): RecentBotsListP
};
};

export const RecentBotsListContainer = connect(
mapStateToProps,
mapDispatchToProps
)(RecentBotsList);
export const RecentBotsListContainer = connect(mapStateToProps, mapDispatchToProps)(RecentBotsList);
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,4 @@ function mapDispatchToProps(dispatch: (action: Action) => void): HowToBuildABotP
};
}

export const HowToBuildABotContainer = connect(
undefined,
mapDispatchToProps
)(HowToBuildABot);
export const HowToBuildABotContainer = connect(undefined, mapDispatchToProps)(HowToBuildABot);
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,4 @@ function mapDispatchToProps(dispatch: (action: Action) => void): WelcomePageProp
}

// export const WelcomePage = connect(mapStateToProps, mapDispatchToProps)(hot(module)(WelcomePageComp)) as any;
export const WelcomePageContainer = connect(
mapStateToProps,
mapDispatchToProps
)(WelcomePage);
export const WelcomePageContainer = connect(mapStateToProps, mapDispatchToProps)(WelcomePage);
6 changes: 5 additions & 1 deletion packages/app/client/src/ui/shell/appMenu/appMenu.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ describe('<AppMenu />', () => {
it('should generate the theme menu items', () => {
instance.props = {
...instance.props,
availableThemes: [{ name: 'Light', href: '' }, { name: 'Dark', href: '' }, { name: 'High contrast', href: '' }],
availableThemes: [
{ name: 'Light', href: '' },
{ name: 'Dark', href: '' },
{ name: 'High contrast', href: '' },
],
currentTheme: 'Light',
};
const themeItems: MenuItem[] = (instance as any).getThemeMenuItems();
Expand Down
5 changes: 1 addition & 4 deletions packages/app/client/src/ui/shell/appMenu/appMenuContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,4 @@ function mapDispatchToProps(dispatch): AppMenuProps {
};
}

export const AppMenuContainer = connect(
mapStateToProps,
mapDispatchToProps
)(AppMenu);
export const AppMenuContainer = connect(mapStateToProps, mapDispatchToProps)(AppMenu);
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,4 @@ const mapDispatchToProps = (dispatch: (action: Action) => void): BotNotOpenExplo
}),
});

export const BotNotOpenExplorerContainer = connect(
mapStateToProps,
mapDispatchToProps
)(BotNotOpenExplorerComp);
export const BotNotOpenExplorerContainer = connect(mapStateToProps, mapDispatchToProps)(BotNotOpenExplorerComp);
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,4 @@ const mapDispatchToProps = dispatch => (): Partial<EndpointEditorProps> => {
};
};

export const EndpointEditorContainer = connect(
mapStateToProps,
mapDispatchToProps
)(EndpointEditor) as any;
export const EndpointEditorContainer = connect(mapStateToProps, mapDispatchToProps)(EndpointEditor) as any;
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,4 @@ const mapDispatchToProps = dispatch => {
};
};

export const EndpointExplorerContainer = connect(
mapStateToProps,
mapDispatchToProps
)(EndpointExplorer as any) as any;
export const EndpointExplorerContainer = connect(mapStateToProps, mapDispatchToProps)(EndpointExplorer as any) as any;
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,4 @@ const mapDispatchToProps = (dispatch): NotificationProps => ({

const mapStateToProps = (): NotificationProps => ({});

export const Notification = connect(
mapStateToProps,
mapDispatchToProps
)(NotificationComp);
export const Notification = connect(mapStateToProps, mapDispatchToProps)(NotificationComp);
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,4 @@ const mapDispatchToProps = (dispatch): NotificationExplorerProps => {
};
};

export const NotificationsExplorer = connect(
mapStateToProps,
mapDispatchToProps
)(NotificationsExplorerComp);
export const NotificationsExplorer = connect(mapStateToProps, mapDispatchToProps)(NotificationsExplorerComp);
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,4 @@ const mapDispatchToProps = (dispatch: (...args: any[]) => void): ResourceExplore
window,
});

export const ResourceExplorerContainer = connect(
mapStateToProps,
mapDispatchToProps
)(ResourceExplorer);
export const ResourceExplorerContainer = connect(mapStateToProps, mapDispatchToProps)(ResourceExplorer);
Loading