[TypeScript] Changes in TypeScript components for deprecation plan

* Fix botskills unit tests after merge

* Fix TypeScript generator vulnerabilities and deprecated unit test after merge

* Fix TypeScript VA Template disparities against sample after merge

* Fix TypeScript Bot-Soltuions package-lock after merge

* Fix authentication feature
This commit is contained in:
Martin Battaglino 2021-06-03 17:26:01 -03:00 коммит произвёл GitHub
Родитель be44c8cdc4
Коммит 03c52986ca
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
17 изменённых файлов: 48 добавлений и 49 удалений

Просмотреть файл

@ -253,14 +253,6 @@
"integrity": "sha512-6bAg36mCwuqLO0hbR+z7PHuqWiCeP7Dzg73OpQwsAB1Eb8HnGEz5xYBzCfbu+YjoaJsJs+qheDxVAuqbt3ILEw==", "integrity": "sha512-6bAg36mCwuqLO0hbR+z7PHuqWiCeP7Dzg73OpQwsAB1Eb8HnGEz5xYBzCfbu+YjoaJsJs+qheDxVAuqbt3ILEw==",
"dev": true "dev": true
}, },
"@babel/runtime": {
"version": "7.13.17",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.13.17.tgz",
"integrity": "sha512-NCdgJEelPTSh+FEFylhnP1ylq848l1z9t9N0j1Lfbcw0+KXGjsTvUmkxy+voLLXB5SOKMbLLx4jxYliGrYQseA==",
"requires": {
"regenerator-runtime": "^0.13.4"
}
},
"@babel/template": { "@babel/template": {
"version": "7.12.13", "version": "7.12.13",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz",
@ -771,9 +763,9 @@
}, },
"dependencies": { "dependencies": {
"moment": { "moment": {
"version": "2.24.0", "version": "2.29.1",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz", "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
"integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==" "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ=="
} }
} }
}, },
@ -2561,6 +2553,30 @@
"sshpk": "^1.7.0" "sshpk": "^1.7.0"
} }
}, },
"https-proxy-agent": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz",
"integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==",
"requires": {
"agent-base": "6",
"debug": "4"
},
"dependencies": {
"debug": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
"integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
"requires": {
"ms": "2.1.2"
}
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
}
}
},
"iconv-lite": { "iconv-lite": {
"version": "0.4.24", "version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
@ -4413,13 +4429,6 @@
"string_decoder": "~0.10.x", "string_decoder": "~0.10.x",
"util-deprecate": "~1.0.1" "util-deprecate": "~1.0.1"
}, },
"dependencies": {
"string_decoder": {
"version": "0.10.31",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
}
},
"dependencies": { "dependencies": {
"string_decoder": { "string_decoder": {
"version": "0.10.31", "version": "0.10.31",

Просмотреть файл

@ -37,7 +37,7 @@ export class MultiProviderAuthDialog extends ComponentDialog {
public constructor( public constructor(
authenticationConnections: IOAuthConnection[], authenticationConnections: IOAuthConnection[],
locale: string, locale: string,
promptSettings?: OAuthPromptSettings[], promptSettings: OAuthPromptSettings[],
oauthCredentials?: AppCredentials oauthCredentials?: AppCredentials
) { ) {
super(MultiProviderAuthDialog.name); super(MultiProviderAuthDialog.name);
@ -116,7 +116,7 @@ export class MultiProviderAuthDialog extends ComponentDialog {
private async promptForProvider(stepContext: WaterfallStepContext): Promise<DialogTurnResult> { private async promptForProvider(stepContext: WaterfallStepContext): Promise<DialogTurnResult> {
if (this.authenticationConnections.length === 1) { if (this.authenticationConnections.length === 1) {
const result: string = this.authenticationConnections[0].name; const result: string = this.authenticationConnections[0].name + '_' + stepContext.context.activity.locale.split('-')[0];
return await stepContext.next(result); return await stepContext.next(result);
} }

Просмотреть файл

@ -47,8 +47,8 @@ export class SkillDialogBase extends ComponentDialog {
// { // {
// throw new Error('You must configure an authentication connection in your bot file before using this component.'); // throw new Error('You must configure an authentication connection in your bot file before using this component.');
// } // }
//
// this.addDialog(new MultiProviderAuthDialog(settings.oauthConnections, this.settings.defaultLocale as string)); // this.addDialog(new MultiProviderAuthDialog(settings.oauthConnections, this.settings.defaultLocale as string, []));
} }
protected async getAuthToken(sc: WaterfallStepContext): Promise<DialogTurnResult> { protected async getAuthToken(sc: WaterfallStepContext): Promise<DialogTurnResult> {

Просмотреть файл

@ -2504,9 +2504,9 @@
} }
}, },
"lodash": { "lodash": {
"version": "4.17.19", "version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
}, },
"lodash.flattendeep": { "lodash.flattendeep": {
"version": "4.4.0", "version": "4.4.0",

Просмотреть файл

@ -30,7 +30,7 @@
], ],
"dependencies": { "dependencies": {
"chalk": "^2.4.2", "chalk": "^2.4.2",
"lodash": "^4.17.19", "lodash": "^4.17.21",
"yeoman-generator": "^3.2.0" "yeoman-generator": "^3.2.0"
}, },
"devDependencies": { "devDependencies": {

Просмотреть файл

@ -135,16 +135,6 @@ describe(`The generator-bot-virtualassistant tests`, function() {
done(); done();
}); });
}); });
describe(`and have in the bot`, function() {
it(`a private property with the given name`, function(done) {
assert.fileContent(
join(assistantGenerationPath, assistantName, botPath),
`private readonly solutionName: string = '${assistantNameCamelCase}';`
);
done();
});
});
}); });
describe(`should not create`, function () { describe(`should not create`, function () {

Просмотреть файл

@ -1,4 +1,4 @@
> # Intent definitions > # Intent definitions
## AddFlag ## AddFlag
- add a flag - add a flag

Просмотреть файл

@ -1,4 +1,4 @@
[FindPointOfInterest](./secondary/poi_navigation_find_poi.lu) [FindPointOfInterest](./secondary/poi_navigation_find_poi.lu)
[GetDirections](./secondary/poi_navigation_get_directions.lu) [GetDirections](./secondary/poi_navigation_get_directions.lu)
[FindParking](./secondary/poi_navigation_find_parking.lu) [FindParking](./secondary/poi_navigation_find_parking.lu)

Просмотреть файл

@ -1,4 +1,4 @@
## FindParking ## FindParking
- check a parking garage in my surrounding area - check a parking garage in my surrounding area
- direct me 2 the parking lot at the the intersection of {Address=springfield city} and {Address=disraeli} in that place please - direct me 2 the parking lot at the the intersection of {Address=springfield city} and {Address=disraeli} in that place please

Просмотреть файл

@ -1,4 +1,4 @@
## FindPointOfInterest ## FindPointOfInterest
> be > be

Просмотреть файл

@ -1,4 +1,4 @@
## GetDirections ## GetDirections
> bring to > bring to

Просмотреть файл

@ -1,4 +1,4 @@
> # Intent definitions > # Intent definitions
## AddToDo ## AddToDo
- add {TaskContent=schedule car maintenance} to my {ListType=to do} list - add {TaskContent=schedule car maintenance} to my {ListType=to do} list

Просмотреть файл

@ -14,7 +14,7 @@ import {
StatePropertyAccessor, StatePropertyAccessor,
TeamsActivityHandler, TeamsActivityHandler,
TurnContext, TurnContext,
UserState, UserState,
BotTelemetryClient } from 'botbuilder'; BotTelemetryClient } from 'botbuilder';
import { import {
Dialog, Dialog,

Просмотреть файл

@ -120,4 +120,4 @@ module.exports = {
getTestAdapterDefault: getTestAdapterDefault, getTestAdapterDefault: getTestAdapterDefault,
templateManager: templateManager, templateManager: templateManager,
testUserProfileState: testUserProfileState testUserProfileState: testUserProfileState
} }

Просмотреть файл

@ -47,8 +47,8 @@ export class SkillDialogBase extends ComponentDialog {
// { // {
// throw new Error('You must configure an authentication connection in your bot file before using this component.'); // throw new Error('You must configure an authentication connection in your bot file before using this component.');
// } // }
//
// this.addDialog(new MultiProviderAuthDialog(settings.oauthConnections, this.settings.defaultLocale as string)); // this.addDialog(new MultiProviderAuthDialog(settings.oauthConnections, this.settings.defaultLocale as string, []));
} }
protected async getAuthToken(sc: WaterfallStepContext): Promise<DialogTurnResult> { protected async getAuthToken(sc: WaterfallStepContext): Promise<DialogTurnResult> {

Просмотреть файл

@ -292,7 +292,7 @@ describe("The connect command", function () {
strictEqual(errorList[errorList.length - 1], `There was an error while connecting the Skill to the Assistant:${ strictEqual(errorList[errorList.length - 1], `There was an error while connecting the Skill to the Assistant:${
EOL }Error: An error ocurred while updating the Dispatch model:${ EOL }Error: An error ocurred while updating the Dispatch model:${
EOL }Error: There was an error in the bf luis:convert command:${ EOL }Error: There was an error in the bf luis:convert command:${
EOL }Command: bf luis:convert --in "${join(configuration.luisFolder, configuration.languages[0], "testSkill.lu")}" --culture ${configuration.languages[0]} --out ${join(configuration.luisFolder, configuration.languages[0], 'testSkill.luis')} --name testSkill --force${ EOL }Command: bf luis:convert --in "${join(configuration.luisFolder, configuration.languages[0], "testSkill.lu")}" --culture "${configuration.languages[0]}" --out "${join(configuration.luisFolder, configuration.languages[0], 'testSkill.luis')}" --name "testSkill" --force${
EOL }Error: Path to testSkill.luis (${join(configuration.luisFolder, configuration.languages[0], "testSkill.luis")}) leads to a nonexistent file.`); EOL }Error: Path to testSkill.luis (${join(configuration.luisFolder, configuration.languages[0], "testSkill.luis")}) leads to a nonexistent file.`);
}); });
@ -383,7 +383,7 @@ describe("The connect command", function () {
strictEqual(errorList[errorList.length - 1], `There was an error while connecting the Skill to the Assistant:${ strictEqual(errorList[errorList.length - 1], `There was an error while connecting the Skill to the Assistant:${
EOL }Error: An error ocurred while updating the Dispatch model:${ EOL }Error: An error ocurred while updating the Dispatch model:${
EOL }Error: There was an error in the bf luis:convert command:${ EOL }Error: There was an error in the bf luis:convert command:${
EOL }Command: bf luis:convert --in "${join(configuration.luisFolder, configuration.languages[0], "testSkill.lu")}" --culture ${configuration.languages[0]} --out ${join(configuration.luisFolder, configuration.languages[0], 'testSkill.luis')} --name testSkill --force${ EOL }Command: bf luis:convert --in "${join(configuration.luisFolder, configuration.languages[0], "testSkill.lu")}" --culture "${configuration.languages[0]}" --out "${join(configuration.luisFolder, configuration.languages[0], 'testSkill.luis')}" --name "testSkill" --force${
EOL }Error: The execution of the bf command failed with the following error:${ EOL }Error: The execution of the bf command failed with the following error:${
EOL }Error: Mocked function throws an Error`); EOL }Error: Mocked function throws an Error`);
}); });

Просмотреть файл

@ -145,7 +145,7 @@ describe("The refresh command", function () {
strictEqual(errorList[errorList.length - 1], `There was an error while refreshing any Skill from the Assistant:${ strictEqual(errorList[errorList.length - 1], `There was an error while refreshing any Skill from the Assistant:${
EOL }Error: There was an error in the bf luis:generate:${configuration.lgLanguage} command:${ EOL }Error: There was an error in the bf luis:generate:${configuration.lgLanguage} command:${
EOL }Command: bf luis:generate:${configuration.lgLanguage} --in "${ join(configuration.dispatchFolder, 'en-us', 'filleden-usDispatch.json') }" --out "${configuration.lgOutFolder}" --className DispatchLuis --force${ EOL }Command: bf luis:generate:${configuration.lgLanguage} --in "${ join(configuration.dispatchFolder, 'en-us', 'filleden-usDispatch.json') }" --out "${configuration.lgOutFolder}" --className "DispatchLuis" --force${
EOL }Error: Mocked function throws an Error`); EOL }Error: Mocked function throws an Error`);
}); });
}); });