* Intitial commit for bot state diffing
* Transfered the bf-extension buttons from the botState to the json extension
* Progress on extension bot state diffing
* Lint
* Highlighting and pagination
* Fixed accessory button styling.
* Completed major work
* removed botState extension
* Unit tests
* added missing unit test
* Lint fixes
* Removed unused extension
* Removed commented code
* Removed unneeded code
* Middleware and Emulator config for auto-connecting bot
* Changed Connector API to use X headers for bot related info
* 1. Completed 'sidecard' debug mode\n2. Added renderers for trace activities so webchat displays them\n3. Added a dendrogram json viewer
* Added the new 'Bot State Visualizer' extension and wired it up
* Completed diffing for bot state objects
* Updated unit tests
* Added unit tests - lint fixes
* Rebase adjustments
* Integrated 'deep-diff' library
* Added switching between Graph and Json views
* Corrected errant inport
* Moved the valueType for the bot state to a const
* Simplified the chat panel. Fixed#1387
* Updated selection of messages in WebChat when trace activities are rendered
* Cured divergent schemas and aligned with the botbuilder-schema package
* Updated errant import from rebase
* Added inspecable log items for the nested activities that come with the traces
* Mapped highlighing in the log to either traces or nested activities within the trace
* Lint fixes
* Build fix
* Applied color treatment to json viewer for bot state diffing
* Update packages/emulator/core/src/facility/conversationSet.ts
Co-Authored-By: justinwilaby <juwilaby@microsoft.com>
* fixed#1285. Fixed#825. Added collapsed service pane when in debug mode
* Unit test remediation
* Unit test fixes
* Unit test corection
* Updated code to fix breaking changes when moving to electron 4
* Attempt to fix unit tests run on the build server
* Fixed issue where conversation restart was using a new port every time. (#1434)
* Fixed issue where conversation update was not being sent when opening a livechat via url. (#1436)
* Remove showInInspector from the JSON object before sending it to the JSON inspector (#1437)
* Drill livechat mode (#1438)
* Allows injection of Conversation "mode" to support conversations started via connecting by url.
* Clean up the types
* Fix a test
* Save transcript fix (#1440)
* Changes to support saving a transcript for a conversation opened via url
* add tests for getTranscriptsPath
* Lint issue
* Add some additional typings
* Lint fixes
* Disabled the restart conversation button when in sidecard debug mode
# How to use
Call `new Bot(...).mount(restifyServer)`. You may want to keep the `Bot` instance.
> Bring your own Restify + CORS server. We now support multi-tenant (one HTTP server to host multiple `bot.js`)
> Look at `/packages/emulator/cli/index.ts` for more usage.
# Added
## Conversation object
Call `Bot.facilities.conversations.conversationById()` to get a conversation objects for manipulation.
- Will fire events, e.g. `.emit('addactivity')`, `activitychange`, `deleteactivity`, `join`, `left`, etc
- To get transcript, call `Conversation.getTranscript()`
- Currently, we only export transcript records marked as "activity add", we internally keep "activity remove/update", "member add/remove", "typing", etc
- We currently expose APIs on `/emulator/*` to support manipulation on conversation (e.g. payment, typing, ping), but since we now have an object model for doing the same thing, we may deprecate the REST APIs
# Changed
- Activities ACK-ed by the client will not be resent, the client need to preserve the history itself
- We moved from `got` to `node-fetch`. You can also bring your own `fetch` implementation (e.g. [`electron-fetch`](https://www.npmjs.com/package/electron-fetch) for WinINet-compatible calls)
- Because we support multi-tenant now, `ConversationManager` has been removed
- Speech token moved to `Bot.getSpeechToken()`
# Planned
- `Conversation.feedActivities()` still here, but we will deprecate it over a new interface that support step-by-step playback and automated testing
##### ChannelAccount.Role
- Added custom-botframework-directlinejs
-- Added `role` to `ChannelAccount` type
- Updated custom-botframework-webchat to respect `role`, if it is present
##### Inspect Event
- Argument to 'inspect' is now an object of type `any`
##### Inspector webview
- Fixed a bug where we weren't sending the inspect object at the right time, causing the inspector view to be empty
##### File Explorer
- Watch for directory deletions
##### Build scripts
- Added LUIS extension to the build scripts
Added two new sections to bf-extension.json's "client" section:
#### Summary Text
Allows the inspector of a message to specify what summary text to display in log entries. Each entry in the array is a jsonpath query to a field in the message. First one to return something non-empty wins.
```js
"summaryText": string[]
```
#### Accessory buttons
Adds toolbar buttons to the header above the inspector view. Clicks are sent to the inspector.
```js
"accessories": [
{
"id": string,
"label": string
},
...
]
```
###### How to handle a click
In your inspector page, add this:
```js
window.host.on('accessory-click', id => {
// console.log('button clicked:', id);
}
```
Notes:
* There isn't yet a way for the inspector page to disable a button. I will add that tomorrow.
* The toolbar button isn't styled yet, and only a label is shown currently. Will add support for icon later.
#### Toggle Dev Tools
I now add an accessory button to all inspectors to toggle the Chrome Dev Tools. No more need to do this from inside the page.
Related work items: #21814
READ READ: You'll need to run bootstrap lerna
This is very much a work in progress and will drastically change over the next few days, I just want to checkin not to diverge too much from master. The only E2E feature working now is displaying the LUIS json. You'll need the latest C# botbuilder SDK to try this e2e.
Related work items: #21805
NOTE: You must `lerna bootstrap` after pulling this change.
Extensions can now consist of a node process and a client build as separate projects. Both are optional. See the debug extension for an example.
I've updated the bf-extension.json schema to include separate configurations for node and client parts. Here's an example:
```json
{
"name": "My Cool Extension",
"node": {
"main": "main/built/index.js",
"debug": {
"enabled": false,
"websocket": {
"port": 8081
}
}
},
"client": {
"debug": {
"enabled": false,
"webpack": {
"port": 3031
}
},
"portals": [],
"filetypes": [],
"inspectors": [
{
"name": "Inspect Cool Things",
"path": "client/public/index.html"
}
]
}
}
```
Notice the "debug" sections. I've added per-extension debug configuration to let the emulator know whether this extension is being debugged and how to load it if so.
##### node.debug section
The node debug section configures which port the emulator should listen on for connections from this extension.
##### client.debug section
The client debug section configures which port the webpack dev server is running on for this extension.
## READ READ: You must run `lerna bootstrap` after syncing this change.
This is just some code cleanup for the most part, for future extension development. I want to get it off my plate in order to focus on getting Mac build working.
### READ READ: After syncing to this change you must update your global gulp:
```
npm install -g gulp@4.0.0
```
Be sure to also run
```
lerna bootstrap
```
# Changelog
* Put `devDependencies` to root, fixed `package-lock.json`
* Removed unnecessary `devDependencies`
* Please use `lerna add` from now on, don't use `npm install` or edit `package.json`
* To add `jest` as `devDependencies` to `botframework-emulator-shared` package
* At root, run `npm install jest --save-dev` followed by `lerna add jest --dev --scope=botframework-emulator-shared`
* Please commit `package-lock.json` if you have any changes
* Lerna [bug](https://github.com/lerna/lerna/pull/1290) may cause unnecessary changes in `package-lock.json`, `#master` or `@3.0.0` will fix it
* Until their next drop, please verify/tweak your changes in `package-lock.json` before committing the file
* Bumped all dependencies to latest version
* We are on latest `typescript@2.7.2` 🎉
* `electron@1.8.1`
* `restify@4.3.2` (@6 now, but their plugins architecture changed)
* Scoping internal packages with `@bfemulator` for CI/CD on our NPM feed
* `/app/client` (`botframework-emulator-client`) is now `@bfemulator/client`
* `/app/shared` (`botframework-emulator-shared`) is now `@bfemulator/app-shared`
* Revisited all `.gitignore` files
* Added `npm test` scripts to all `package.json`, by default, use `jest`
* Temporarily added `react-app-rewired` to mix JSX in TypeScript React app (broken since `react-scripts-ts@>2.9.0`)
* [Tracking bug](https://github.com/wmonk/create-react-app-typescript/issues/266) at `react-scripts-ts`, their [next drop](https://github.com/wmonk/create-react-app-typescript/pull/242) should have it
# Notes
Added few TypeScript ignores because:
* Some typings are wrong (added `skipLibCheck`)
* Some typings are outdated (using `any` type)
## After syncing this change, you must run `lerna bootstrap` again.
This change moves project files around in order to put shared code in its own npm package.
### Here's the new layout:
* packages/app/client <-- client project
* packages/app/main <-- electron project
* packages/app/shared <-- shared code
* Add lerna.
* Add custom_botframework_webchat
* Add custom_ngrok.
After syncing this change, you must run the following commands in the root of the project:
`npm install -g lerna`
then
`lerna bootstrap`
Lerna is a tool that sets up symlinks allowing multiple packages in the same repo to refer to each other via node_modules, like they would in production.