Closed sw-joelmut closed 6 months ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
libraries/botbuilder-stdlib/src/stringify.ts | 24 | 25 | 96.0% | ||
libraries/botframework-connector/src/auth/botFrameworkClientImpl.ts | 2 | 17 | 11.76% | ||
<!-- | Total: | 40 | 56 | 71.43% | --> |
Totals | |
---|---|
Change from base Build 8543007355: | 0.3% |
Covered Lines: | 20419 |
Relevant Lines: | 22894 |
minor
Description
This PR replaces the
skipProperties
functionality with an internal_replacer
function when theJSON.stringify
function gets called in thecalculateChangeHash
. ThecalculateChangeHash
has been changed to use a new internalstringify
function, that allows to detect and handle Circular Structures. Additionally, the AgentSettings configuration has being added to thegetRuntimeServices
function, so internal functionalities can use them. Not only that, the SkillClient has being updated based on this configuration, that work for both Composer and non-Composer bots.Specific Changes
BotState
class has being updated, removing all theskipProperties
functionality.calculateChangeHash
has being refactored to handle Circular Structures and generate a hash, instead of a plainJSON.stringify
value, so it is easier to debug and identify.ConnectorClientOptions
to thestart
andgetRuntimeServices
functions for Composer bots, so it can be customizable, and delegate to the internalCoreBot
to use.BeginSkill
has being updated, removing theskipProperties
and introducing the new internal_replace
function, for thestringify
functionality to execute.stringify
function that encapsulates the nativeJSON.stringify
function, with the addition to handle Circular Structures and expose the internal_replacer
function to customize it.botFrameworkClientFetchImpl
function to use a single instance ofaxios
and handle its configuration fromConnectorClientOptions
.Testing
The following images show how the
ConnectorClientOptions
can be provided from a Composer bot perspective, the newstringify
functionality that detects and replaces circular references, and the generated hash string.