Skip to content

Commit 2628f0b

Browse files
author
Tracy Boehrer
committed
Merge branch 'main' into releases/4.22
# Conflicts: # libraries/botbuilder-core/package.json # libraries/botbuilder/package.json # libraries/botframework-connector/package.json # yarn.lock
2 parents 581156b + dfb6043 commit 2628f0b

File tree

73 files changed

+1891
-1651
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1891
-1651
lines changed

generators/generator-botbuilder/generators/app/templates/core/bots/dialogAndWelcomeBot.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
2-
// Licensed under the MIT License.
3-
41
const { CardFactory } = require('botbuilder-core');
52
const { DialogBot } = require('./dialogBot');
63
const WelcomeCard = require('../resources/welcomeCard.json');

generators/generator-botbuilder/generators/app/templates/core/bots/dialogAndWelcomeBot.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
2-
// Licensed under the MIT License.
3-
41
import { BotState, CardFactory } from 'botbuilder';
52
import { Dialog, DialogState } from 'botbuilder-dialogs';
63
import { MainDialog } from '../dialogs/mainDialog';

generators/generator-botbuilder/generators/app/templates/core/bots/dialogBot.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
2-
// Licensed under the MIT License.
3-
41
const { ActivityHandler } = require('botbuilder');
52

63
class DialogBot extends ActivityHandler {

generators/generator-botbuilder/generators/app/templates/core/bots/dialogBot.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
2-
// Licensed under the MIT License.
3-
41
import { ActivityHandler, BotState, ConversationState, StatePropertyAccessor, UserState } from 'botbuilder';
52
import { Dialog, DialogState } from 'botbuilder-dialogs';
63
import { MainDialog } from '../dialogs/mainDialog';

generators/generator-botbuilder/generators/app/templates/core/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
2-
// Licensed under the MIT License.
3-
41
// index.js is used to setup and configure your bot
52

63
// Import required packages

generators/generator-botbuilder/generators/app/templates/core/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
2-
// Licensed under the MIT License.
3-
41
import { config } from 'dotenv';
52
import * as path from 'path';
63

generators/generator-botbuilder/generators/app/templates/core/package-with-tests.json.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
},
1818
"dependencies": {
1919
"@microsoft/recognizers-text-data-types-timex-expression": "1.1.4",
20-
"botbuilder": "~4.20.0",
21-
"botbuilder-ai": "~4.20.0",
22-
"botbuilder-dialogs": "~4.20.0",
23-
"botbuilder-testing": "~4.20.0",
20+
"botbuilder": "~4.22.1",
21+
"botbuilder-ai": "~4.22.1",
22+
"botbuilder-dialogs": "~4.22.1",
23+
"botbuilder-testing": "~4.22.1",
2424
"dotenv": "^8.2.0",
2525
"restify": "^11.1.0"
2626
},

generators/generator-botbuilder/generators/app/templates/core/package-with-tests.json.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@
3838
},
3939
"dependencies": {
4040
"@microsoft/recognizers-text-data-types-timex-expression": "1.1.4",
41-
"botbuilder": "~4.20.0",
42-
"botbuilder-ai": "~4.20.0",
43-
"botbuilder-dialogs": "~4.20.0",
44-
"botbuilder-testing": "~4.20.0",
41+
"botbuilder": "~4.22.1",
42+
"botbuilder-ai": "~4.22.1",
43+
"botbuilder-dialogs": "~4.22.1",
44+
"botbuilder-testing": "~4.22.1",
4545
"dotenv": "^8.2.0",
4646
"replace": "~1.2.0",
4747
"restify": "~11.1.0"

generators/generator-botbuilder/generators/app/templates/core/package.json.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
},
1818
"dependencies": {
1919
"@microsoft/recognizers-text-data-types-timex-expression": "1.1.4",
20-
"botbuilder": "~4.20.0",
21-
"botbuilder-ai": "~4.20.0",
22-
"botbuilder-dialogs": "~4.20.0",
20+
"botbuilder": "~4.22.1,
21+
"botbuilder-ai": "~4.22.1",
22+
"botbuilder-dialogs": "~4.22.1",
2323
"dotenv": "~8.2.0",
2424
"restify": "~11.1.0"
2525
},

generators/generator-botbuilder/generators/app/templates/core/package.json.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
},
2020
"dependencies": {
2121
"@microsoft/recognizers-text-data-types-timex-expression": "1.1.4",
22-
"botbuilder": "~4.20.0",
23-
"botbuilder-ai": "~4.20.0",
24-
"botbuilder-dialogs": "~4.20.0",
22+
"botbuilder": "~4.22.1",
23+
"botbuilder-ai": "~4.22.1",
24+
"botbuilder-dialogs": "~4.22.1",
2525
"dotenv": "~8.2.0",
2626
"replace": "~1.2.0",
2727
"restify": "~11.1.0"

generators/generator-botbuilder/generators/app/templates/core/tests/bots/dialogAndWelcomeBot.test.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
/**
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License.
4-
*/
5-
61
/* eslint-env node, mocha */
72
const { TestAdapter, ActivityTypes, TurnContext, ConversationState, MemoryStorage, UserState } = require('botbuilder');
83
const { DialogSet, DialogTurnStatus, Dialog } = require('botbuilder-dialogs');

generators/generator-botbuilder/generators/app/templates/core/tests/bots/dialogAndWelcomeBot.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/**
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License.
4-
*/
51
import { ActivityTypes, ConversationState, MemoryStorage, TestAdapter, TurnContext, UserState } from 'botbuilder';
62
import { Dialog, DialogSet, DialogTurnStatus } from 'botbuilder-dialogs';
73
import { DialogAndWelcomeBot } from '../../bots/dialogAndWelcomeBot';

generators/generator-botbuilder/generators/app/templates/echo/bot.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
2-
// Licensed under the MIT License.
3-
41
const { ActivityHandler, MessageFactory } = require('botbuilder');
52

63
class EchoBot extends ActivityHandler {

generators/generator-botbuilder/generators/app/templates/echo/bot.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
2-
// Licensed under the MIT License.
3-
41
import { ActivityHandler, MessageFactory } from 'botbuilder';
52

63
export class EchoBot extends ActivityHandler {

generators/generator-botbuilder/generators/app/templates/echo/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
2-
// Licensed under the MIT License.
3-
41
const path = require('path');
52

63
const dotenv = require('dotenv');

generators/generator-botbuilder/generators/app/templates/echo/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
2-
// Licensed under the MIT License.
3-
41
import * as path from 'path';
52

63
import { config } from 'dotenv';

generators/generator-botbuilder/generators/app/templates/echo/package.json.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"url": "https://github.com"
1717
},
1818
"dependencies": {
19-
"botbuilder": "~4.20.0",
19+
"botbuilder": "~4.22.1",
2020
"dotenv": "~8.2.0",
2121
"restify": "~11.1.0"
2222
},

generators/generator-botbuilder/generators/app/templates/echo/package.json.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"url": "https://github.com"
1919
},
2020
"dependencies": {
21-
"botbuilder": "~4.20.0",
21+
"botbuilder": "~4.22.1",
2222
"dotenv": "~8.2.0",
2323
"replace": "~1.2.0",
2424
"restify": "~11.1.0"

generators/generator-botbuilder/generators/app/templates/empty/bot.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
2-
// Licensed under the MIT License.
3-
41
const { ActivityHandler } = require('botbuilder');
52

63
class EmptyBot extends ActivityHandler {

generators/generator-botbuilder/generators/app/templates/empty/bot.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
2-
// Licensed under the MIT License.
3-
41
import { ActivityHandler } from 'botbuilder';
52

63
export class EmptyBot extends ActivityHandler {

generators/generator-botbuilder/generators/app/templates/empty/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
2-
// Licensed under the MIT License.
3-
41
const restify = require('restify');
52

63
// Import required bot services.

generators/generator-botbuilder/generators/app/templates/empty/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
2-
// Licensed under the MIT License.
3-
41
import * as restify from 'restify';
52

63
// Import required bot services.

generators/generator-botbuilder/generators/app/templates/empty/package.json.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"url": "https://github.com"
1717
},
1818
"dependencies": {
19-
"botbuilder": "~4.20.0",
19+
"botbuilder": "~4.22.1",
2020
"restify": "~11.1.0"
2121
},
2222
"devDependencies": {

generators/generator-botbuilder/generators/app/templates/empty/package.json.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"url": "https://github.com"
1919
},
2020
"dependencies": {
21-
"botbuilder": "~4.20.0",
21+
"botbuilder": "~4.22.1",
2222
"replace": "~1.2.0",
2323
"restify": "~11.1.0"
2424
},

libraries/botbuilder-ai-orchestrator/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"lint": "eslint . --ext .js,.ts",
4848
"postbuild": "downlevel-dts lib _ts3.4/lib --checksum",
4949
"test": "yarn build && nyc mocha tests/",
50-
"test:compat": "api-extractor run --verbose"
50+
"test:compat": "api-extractor run --verbose",
51+
"postinstall": "npx rimraf node_modules/@microsoft/orchestrator-core/node_modules/@babel/traverse"
5152
},
5253
"files": [
5354
"_ts3.4",

libraries/botbuilder-ai/etc/botbuilder-ai.api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ import { DialogTurnResult } from 'botbuilder-dialogs';
2323
import { EnumExpression } from 'adaptive-expressions';
2424
import { Expression } from 'adaptive-expressions';
2525
import { IntExpression } from 'adaptive-expressions';
26-
import * as msRest from '@azure/ms-rest-js';
2726
import { NumberExpression } from 'adaptive-expressions';
2827
import { ObjectExpression } from 'adaptive-expressions';
2928
import { Recognizer } from 'botbuilder-dialogs';
3029
import { RecognizerConfiguration } from 'botbuilder-dialogs';
3130
import { RecognizerResult } from 'botbuilder-core';
31+
import { RequestOptionsBase } from '@azure/core-http';
3232
import { ServiceCollection } from 'botbuilder-dialogs-adaptive-runtime-core';
3333
import { StringExpression } from 'adaptive-expressions';
3434
import { TemplateInterface } from 'botbuilder-dialogs';
@@ -290,7 +290,7 @@ export class LuisComponentRegistration extends ComponentRegistration {
290290
}
291291

292292
// @public
293-
export interface LuisPredictionOptions extends msRest.RequestOptionsBase {
293+
export interface LuisPredictionOptions extends RequestOptionsBase {
294294
bingSpellCheckSubscriptionKey?: string;
295295
includeAllIntents?: boolean;
296296
includeInstanceData?: boolean;

libraries/botbuilder-ai/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,20 @@
2727
}
2828
},
2929
"dependencies": {
30-
"@azure/cognitiveservices-luis-runtime": "^4.0.0",
31-
"@azure/ms-rest-js": "^2.7.0",
30+
"@azure/core-http": "^3.0.2",
3231
"adaptive-expressions": "4.1.6",
3332
"botbuilder-core": "4.1.6",
3433
"botbuilder-dialogs": "4.1.6",
3534
"botbuilder-dialogs-adaptive-runtime-core": "4.1.6",
3635
"botbuilder-dialogs-declarative": "4.1.6",
36+
"botframework-connector": "4.1.6",
3737
"lodash": "^4.17.21",
3838
"node-fetch": "^2.6.7",
3939
"url-parse": "^1.5.9",
4040
"zod": "^3.22.4"
4141
},
4242
"resolutions": {
43-
"follow-redirects": "1.14.7"
43+
"follow-redirects": "^1.14.8"
4444
},
4545
"devDependencies": {
4646
"@types/node-fetch": "^2.5.7",

libraries/botbuilder-ai/src/luisRecognizer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Copyright (c) Microsoft Corporation. All rights reserved.
66
* Licensed under the MIT License.
77
*/
8-
import * as msRest from '@azure/ms-rest-js';
8+
import { RequestOptionsBase } from '@azure/core-http';
99

1010
import Url from 'url-parse';
1111
import { BotTelemetryClient, NullTelemetryClient, RecognizerResult, TurnContext } from 'botbuilder-core';
@@ -41,7 +41,7 @@ export interface LuisApplication {
4141
*
4242
* Options per LUIS prediction.
4343
*/
44-
export interface LuisPredictionOptions extends msRest.RequestOptionsBase {
44+
export interface LuisPredictionOptions extends RequestOptionsBase {
4545
/**
4646
* If true, return all intents instead of just the top scoring intent.
4747
*/

libraries/botbuilder-ai/src/luisRecognizerOptionsV2.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Licensed under the MIT License.
77
*/
88

9-
import * as msRest from '@azure/ms-rest-js';
9+
import { TokenCredentials } from 'botframework-connector';
1010
import * as os from 'os';
1111
import { LuisApplication, LuisRecognizerOptionsV2 } from './luisRecognizer';
1212
import { CompositeChildModel, CompositeEntityModel, EntityModel, LuisResult } from './luisV2-models/luisResult';
@@ -50,7 +50,7 @@ export class LuisRecognizerV2 extends LuisRecognizerInternal {
5050
// - We have to cast "creds as any" to avoid a build break relating to different versions
5151
// of autorest being used by our various components. This is just a build issue and
5252
// shouldn't effect production bots.
53-
const creds = new msRest.TokenCredentials(application.endpointKey);
53+
const creds = new TokenCredentials(application.endpointKey);
5454
const baseUri = application.endpoint || 'https://westus.api.cognitive.microsoft.com';
5555
// eslint-disable-next-line @typescript-eslint/no-explicit-any
5656
this.luisClient = new LuisClient(creds as any, baseUri);
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for
4+
* license information.
5+
*/
6+
7+
import { ServiceClient, ServiceClientCredentials, ServiceClientOptions } from '@azure/core-http';
8+
9+
/**
10+
* Client for LUIS context
11+
*/
12+
export class LUISRuntimeClientContext extends ServiceClient {
13+
endpoint: string;
14+
credentials: ServiceClientCredentials;
15+
16+
/**
17+
* Initializes a new instance of the LUISRuntimeClientContext class.
18+
*
19+
* @param credentials Subscription credentials which uniquely identify client subscription.
20+
* @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example:
21+
* https://westus.api.cognitive.microsoft.com).
22+
* @param [options] The parameter options
23+
*/
24+
constructor(credentials: ServiceClientCredentials, endpoint: string, options?: ServiceClientOptions) {
25+
if (endpoint == undefined) {
26+
throw new Error("'endpoint' cannot be null.");
27+
}
28+
if (credentials == undefined) {
29+
throw new Error("'credentials' cannot be null.");
30+
}
31+
32+
if (!options) {
33+
options = {};
34+
}
35+
36+
super(credentials, options);
37+
38+
this.baseUri = '{Endpoint}/luis/v3.0-preview';
39+
this.requestContentType = 'application/json; charset=utf-8';
40+
this.endpoint = endpoint;
41+
this.credentials = credentials;
42+
}
43+
}

0 commit comments

Comments
 (0)