From 0ca2d23561d528368c10804d46d9badcf4077ed6 Mon Sep 17 00:00:00 2001 From: tracyboehrer Date: Tue, 26 Aug 2025 08:07:20 -0500 Subject: [PATCH 01/10] bump: Update from main for 4.23.3 (#4899) * Fix actions/cache deprecation (#4858) * fix: Update generators and remove Core Bot templates (#4867) * Update empty bot templates * Update echo bot templates * Remove core bot templates and its references * Fix unit tests * chore(deps): bump elliptic from 6.6.0 to 6.6.1 (#4863) Bumps [elliptic](https://github.com/indutny/elliptic) from 6.6.0 to 6.6.1. - [Commits](https://github.com/indutny/elliptic/compare/v6.6.0...v6.6.1) --- updated-dependencies: - dependency-name: elliptic dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * refactor: [#4759] Migrate off @azure/core-http (#4834) * Migrate deprecated core-http to new libraries * Fix ESLint * Remove unused dependency * Fix node_modules pathing * Remove unused folder declaration * Fix TypeScript modifying .js and .d.ts files * Fix eslint * Update elliptic, esbuild, and serialize-javascript (#4862) * fix: [#4853] ConfigurationBotFrameworkAuthentication errors when initialized with process.env (#4857) * Fix config options type to support process.env * Fix eslint * Fix test:compat * Allow null value for Configuration parameter (#4856) * chore(deps): bump axios from 1.7.7 to 1.8.2 (#4869) Bumps [axios](https://github.com/axios/axios) from 1.7.7 to 1.8.2. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v1.7.7...v1.8.2) --- updated-dependencies: - dependency-name: axios dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update babel-runtime (#4868) Co-authored-by: Cecilia Avila <44245136+ceciliaavila@users.noreply.github.com> * fix: Add signInSso cardviewType to SignInCardViewParameters (#4872) * initial commit * update api md file --------- Co-authored-by: bentsai * chore(deps): bump tar-fs from 2.1.1 to 2.1.2 (#4871) Bumps [tar-fs](https://github.com/mafintosh/tar-fs) from 2.1.1 to 2.1.2. - [Commits](https://github.com/mafintosh/tar-fs/compare/v2.1.1...v2.1.2) --- updated-dependencies: - dependency-name: tar-fs dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump pbkdf2 version to fix issue (#4891) * fix: CodeQL issues with severity High (#4892) * Fix issue in transcriptUtilities * Fix codeql issue in parameterizedBotFrameworkAuthentication * Fix codeql issue in jwtTokenValidation * Fix codeql issue in channelServiceHandler * Fix condition * Use same logic in JwtTokenValidation_authenticateRequest * Fix failing unit test * port: CQA to support TokenCredential instead of key (#4879) * Add MSI support for CQA * Apply minor improvements * Fix previous implementation wrong error message * Fix validation of parameters --------- Co-authored-by: CeciliaAvila * chore(deps): bump tmp from 0.2.3 to 0.2.4 (#4895) Bumps [tmp](https://github.com/raszi/node-tmp) from 0.2.3 to 0.2.4. - [Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md) - [Commits](https://github.com/raszi/node-tmp/compare/v0.2.3...v0.2.4) --- updated-dependencies: - dependency-name: tmp dependency-version: 0.2.4 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump pbkdf2 from 3.1.1 to 3.1.3 (#4888) Bumps [pbkdf2](https://github.com/crypto-browserify/pbkdf2) from 3.1.1 to 3.1.3. - [Changelog](https://github.com/browserify/pbkdf2/blob/master/CHANGELOG.md) - [Commits](https://github.com/crypto-browserify/pbkdf2/compare/v3.1.1...v3.1.3) --- updated-dependencies: - dependency-name: pbkdf2 dependency-version: 3.1.3 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: CodeQL issues with Medium and Error severity (#4893) * Fix codeql issue in channelServiceRoutes * Fix codeql issue in dialogs tests * Extend timeout for failing unit test * Replace console.log with console.error * feat: Enable configuration of the OpenIdmetadata's refresh interval (#4877) * Add tokenRefreshInterval to ConnectorClientOptions * Add unit tests * Add documentation to new property. * bump: dependencies to safe versions (#4896) * Bump dependencies to safe versions * Add flag to avoid test failing in Node > 22.18 * Add flag to avoid test failing in Node > 22.18 to test:min * Mark activity as optional in ConversationParameters (#4873) * fix: [#4840] The use of the package browserify-sign could violate Microsoft crypto policy (#4875) * Replace crypto-browserify with Web Crypto API * Fix conflicts in yarn.lock file * Fix yarn.lock versions * feat: [#4894] Add support for typescript 5.9 (#4897) * Update TS and types/node versions * Fix issue in INodeBuffer * Update test:consumer testing matrix * fix: Remaining CodeQL issues (#4898) * Fix remaining codeQL issues * Rephrase suppression message in storage --------- Signed-off-by: dependabot[bot] Co-authored-by: Joel Mut <62260472+sw-joelmut@users.noreply.github.com> Co-authored-by: Cecilia Avila <44245136+ceciliaavila@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Benjamin Tsai <52517294+bentsai10@users.noreply.github.com> Co-authored-by: bentsai Co-authored-by: CeciliaAvila --- .github/workflows/depcheck.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/test-compat.yml | 2 +- .github/workflows/test-consumer.yml | 2 +- .github/workflows/test-repoutils.yml | 2 +- .github/workflows/test-schemas.yml | 2 +- .github/workflows/tests.yml | 2 +- generators/generator-botbuilder/README.md | 60 +- .../components/commonFilesWriter.js | 1 - .../components/constants.js | 3 - .../components/coreTemplateWriter.js | 379 ----- .../components/prompts.js | 28 +- .../generators/app/index.js | 24 +- .../app/templates/core/README.md.js | 86 -- .../app/templates/core/README.md.ts | 99 -- .../generators/app/templates/core/_env | 7 - .../app/templates/core/_eslintrc.js | 15 - .../generators/app/templates/core/_gitignore | 5 - .../core/bots/dialogAndWelcomeBot.js | 25 - .../core/bots/dialogAndWelcomeBot.ts | 25 - .../app/templates/core/bots/dialogBot.js | 42 - .../app/templates/core/bots/dialogBot.ts | 53 - .../core/cognitiveModels/FlightBooking.json | 339 ----- .../core/deploymentScripts/webConfigPrep.js | 21 - ...ameters-for-template-AzureBot-with-rg.json | 33 - ...arameters-for-template-BotApp-with-rg.json | 48 - .../deployUseExistResourceGroup/readme.md | 48 - .../template-AzureBot-with-rg.json | 119 -- .../template-BotApp-with-rg.json | 189 --- ...rameters-for-template-AzureBot-new-rg.json | 39 - ...parameters-for-template-BotApp-new-rg.json | 48 - .../deployWithNewResourceGroup/readme.md | 45 - .../template-AzureBot-new-rg.json | 157 -- .../template-BotApp-new-rg.json | 211 --- .../templates/core/dialogs/bookingDetails.ts | 9 - .../templates/core/dialogs/bookingDialog.js | 110 -- .../templates/core/dialogs/bookingDialog.ts | 119 -- .../core/dialogs/cancelAndHelpDialog.js | 42 - .../core/dialogs/cancelAndHelpDialog.ts | 42 - .../core/dialogs/dateResolverDialog.js | 69 - .../core/dialogs/dateResolverDialog.ts | 68 - .../core/dialogs/flightBookingRecognizer.js | 72 - .../core/dialogs/flightBookingRecognizer.ts | 73 - .../app/templates/core/dialogs/mainDialog.js | 162 --- .../app/templates/core/dialogs/mainDialog.ts | 172 --- .../generators/app/templates/core/index.js | 120 -- .../generators/app/templates/core/index.ts | 122 -- .../templates/core/package-with-tests.json.js | 38 - .../templates/core/package-with-tests.json.ts | 60 - .../app/templates/core/package.json.js | 37 - .../app/templates/core/package.json.ts | 40 - .../templates/core/resources/welcomeCard.json | 46 - .../app/templates/core/tests/README.md | 58 - .../tests/bots/dialogAndWelcomeBot.test.js | 70 - .../tests/bots/dialogAndWelcomeBot.test.ts | 69 - .../core/tests/dialogs/bookingDialog.test.js | 41 - .../core/tests/dialogs/bookingDialog.test.ts | 39 - .../tests/dialogs/cancelAndHelpDialog.test.js | 78 - .../tests/dialogs/cancelAndHelpDialog.test.ts | 76 - .../tests/dialogs/dateResolverDialog.test.js | 30 - .../tests/dialogs/dateResolverDialog.test.ts | 28 - .../core/tests/dialogs/mainDialog.test.js | 156 -- .../core/tests/dialogs/mainDialog.test.ts | 156 -- .../dialogs/testData/FlightFromCdgToJfk.json | 103 -- .../testData/FlightFromMadridToChicago.json | 63 - .../testData/FlightFromParisToNewYork.json | 115 -- .../dialogs/testData/FlightToMadrid.json | 41 - .../testData/bookingDialogTestCases.js | 152 -- .../testData/bookingDialogTestCases.ts | 152 -- .../dialogs/testData/dateResolverTestCases.js | 77 - .../dialogs/testData/dateResolverTestCases.ts | 77 - .../app/templates/core/tsconfig.json | 17 - .../generators/app/templates/core/tslint.json | 18 - .../generators/app/templates/echo/bot.js | 2 +- .../generators/app/templates/echo/index.js | 15 +- .../generators/app/templates/echo/index.ts | 16 +- .../app/templates/echo/package.json.js | 2 +- .../app/templates/echo/package.json.ts | 7 +- .../generators/app/templates/empty/bot.js | 2 +- .../generators/app/templates/empty/index.js | 29 +- .../generators/app/templates/empty/index.ts | 28 +- .../app/templates/empty/package.json.js | 3 +- .../app/templates/empty/package.json.ts | 8 +- generators/generator-botbuilder/testGen.cmd | 71 - libraries/adaptive-expressions/package.json | 2 +- .../botbuilder-ai/etc/botbuilder-ai.api.md | 9 +- libraries/botbuilder-ai/package.json | 3 +- libraries/botbuilder-ai/src/luisRecognizer.ts | 2 +- .../src/luisRuntimeClientContext.ts | 16 +- .../src/luisV2-models/luisMappers.ts | 2 +- .../src/luisV2-models/luisModels.ts | 2 +- .../src/luisV2-models/luisParameters.ts | 2 +- .../src/luisV2-models/luisPrediction.ts | 4 +- .../src/luisV2-models/luisResult.ts | 2 +- .../src/luisV2-models/luisRuntimeClientV2.ts | 6 +- libraries/botbuilder-ai/src/qnaMakerDialog.ts | 68 +- .../qnamaker-interfaces/qnamakerEndpoint.ts | 7 +- .../src/qnamaker-utils/httpRequestUtils.ts | 17 +- .../qnamaker-utils/languageServiceUtils.ts | 2 +- .../etc/botbuilder-azure-blobs.api.md | 2 +- libraries/botbuilder-azure-blobs/package.json | 3 +- .../src/blobsStorage.ts | 2 +- .../src/blobsTranscriptStore.ts | 2 +- .../tests/cosmosDbPartitionedStorage.test.js | 15 +- .../etc/botbuilder-core.api.md | 9 +- libraries/botbuilder-core/package.json | 2 +- ...configurationBotFrameworkAuthentication.ts | 8 +- libraries/botbuilder-core/src/storage.ts | 2 +- libraries/botbuilder-core/tests/chatdown.js | 2 +- .../tests/transcriptUtilities.js | 10 +- .../package.json | 4 +- .../tests/action.test.js | 4 +- .../tests/beginSkill.test.js | 4 +- .../tests/jsonLoad.test.js | 2 +- .../tests/skillDialog.test.js | 4 +- libraries/botbuilder-lg/package.json | 2 +- libraries/botbuilder-repo-utils/package.json | 2 +- .../botbuilder-repo-utils/src/workspace.ts | 4 +- .../tests/updateVersions.test.ts | 4 +- libraries/botbuilder-stdlib/.gitignore | 2 + libraries/botbuilder-stdlib/package.json | 16 +- .../src/azureCoreHttpCompat.ts | 5 + .../src/azureCoreHttpCompat/compat.ts | 59 + .../src/azureCoreHttpCompat/interfaces.ts | 221 +++ .../serviceClientContext.ts | 242 ++++ libraries/botbuilder-stdlib/src/index.ts | 1 + libraries/botbuilder/etc/botbuilder.api.md | 8 +- libraries/botbuilder/package.json | 4 +- .../botbuilder/src/botFrameworkAdapter.ts | 73 +- .../botbuilder/src/channelServiceHandler.ts | 29 +- .../botbuilder/src/channelServiceRoutes.ts | 7 +- libraries/botbuilder/src/cloudAdapter.ts | 7 +- .../src/streaming/streamingHttpClient.ts | 6 +- .../tests/botFrameworkAdapter.test.js | 41 +- .../tests/channelServiceHandler.test.js | 2 +- .../botbuilder/tests/cloudAdapter.test.js | 4 +- libraries/botframework-connector/package.json | 8 +- .../src/auth/appCredentials.ts | 2 +- .../src/auth/botFrameworkClientImpl.ts | 18 +- ...tificateServiceClientCredentialsFactory.ts | 2 +- .../src/auth/connectorFactoryImpl.ts | 76 +- ...ederatedServiceClientCredentialsFactory.ts | 2 +- .../src/auth/jwtTokenExtractor.ts | 18 +- .../src/auth/jwtTokenProviderFactory.ts | 2 +- .../src/auth/jwtTokenValidation.ts | 59 +- ...IdentityServiceClientCredentialsFactory.ts | 2 +- .../msalServiceClientCredentialsFactory.ts | 2 +- .../src/auth/openIdMetadata.ts | 8 +- ...parameterizedBotFrameworkAuthentication.ts | 50 +- .../passwordServiceClientCredentialFactory.ts | 2 +- .../auth/serviceClientCredentialsFactory.ts | 2 +- .../src/auth/tokenCredentials.ts | 18 +- .../src/auth/userTokenClientImpl.ts | 2 +- .../src/connectorApi/connectorClient.ts | 3 +- .../connectorApi/connectorClientContext.ts | 48 +- .../src/connectorApi/models/index.ts | 12 +- .../src/connectorApi/models/mappers.ts | 2 +- .../src/connectorApi/models/parameters.ts | 2 +- .../connectorApi/operations/attachments.ts | 4 +- .../connectorApi/operations/conversations.ts | 4 +- .../src/teams/models/index.ts | 6 +- .../src/teams/models/mappers.ts | 2 +- .../src/teams/models/parameters.ts | 2 +- .../src/teams/operations/teams.ts | 4 +- .../src/teams/teamsConnectorClient.ts | 2 +- .../src/teams/teamsConnectorClientContext.ts | 19 +- .../src/tokenApi/models/index.ts | 2 +- .../src/tokenApi/models/mappers.ts | 2 +- .../src/tokenApi/models/parameters.ts | 2 +- .../src/tokenApi/operations/botSignIn.ts | 4 +- .../src/tokenApi/operations/userToken.ts | 4 +- .../src/tokenApi/tokenApiClient.ts | 2 +- .../src/tokenApi/tokenApiClientContext.ts | 50 +- .../tests/appCredentials.test.js | 6 +- .../botFrameworkAuthenticationFactory.test.js | 22 +- .../tests/ms-rest-mappers-test.js | 4 +- .../tests/openIdMetadata.test.js | 37 +- .../etc/botframework-schema.api.md | 4 +- libraries/botframework-schema/src/index.ts | 2 +- .../sharepoint/cardView/cardViewParameters.ts | 2 +- .../etc/botframework-streaming.api.md | 2 - libraries/botframework-streaming/package.json | 2 +- .../src/interfaces/INodeBuffer.ts | 1 - package.json | 21 +- .../browser-echo-bot/crypto-shim.js | 58 + .../browser-echo-bot/package.json | 3 +- .../browser-echo-bot/webpack.config.js | 5 +- testing/browser-functional/package.json | 2 +- testing/consumer-test/generateTests.ts | 2 +- .../dialogToDialog/dialogRootBot/package.json | 2 +- .../dialogSkillBot/package.json | 2 +- .../operations/deploymentOperations.js | 9 +- .../lib/resource/operations/deployments.js | 21 +- .../lib/resource/operations/providers.js | 13 +- .../lib/resource/operations/resourceGroups.js | 19 +- .../lib/resource/operations/resources.js | 31 +- .../lib/resource/operations/tags.js | 15 +- .../lib/resource/resourceManagementClient.js | 6 +- .../resourceManagement/lib/resource/utils.js | 31 + tools/resourceManagement/package.json | 3 + tsup/browser.config.ts | 2 +- tsup/crypto-shim.js | 1 + yarn.lock | 1274 ++++++----------- 203 files changed, 1734 insertions(+), 6638 deletions(-) delete mode 100644 generators/generator-botbuilder/components/coreTemplateWriter.js delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/README.md.js delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/README.md.ts delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/_env delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/_eslintrc.js delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/_gitignore delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/bots/dialogAndWelcomeBot.js delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/bots/dialogAndWelcomeBot.ts delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/bots/dialogBot.js delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/bots/dialogBot.ts delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/cognitiveModels/FlightBooking.json delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/deploymentScripts/webConfigPrep.js delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployUseExistResourceGroup/parameters-for-template-AzureBot-with-rg.json delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployUseExistResourceGroup/parameters-for-template-BotApp-with-rg.json delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployUseExistResourceGroup/readme.md delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployUseExistResourceGroup/template-AzureBot-with-rg.json delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployWithNewResourceGroup/parameters-for-template-AzureBot-new-rg.json delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployWithNewResourceGroup/parameters-for-template-BotApp-new-rg.json delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployWithNewResourceGroup/readme.md delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployWithNewResourceGroup/template-AzureBot-new-rg.json delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/dialogs/bookingDetails.ts delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/dialogs/bookingDialog.js delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/dialogs/bookingDialog.ts delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/dialogs/cancelAndHelpDialog.js delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/dialogs/cancelAndHelpDialog.ts delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/dialogs/dateResolverDialog.js delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/dialogs/dateResolverDialog.ts delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/dialogs/flightBookingRecognizer.js delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/dialogs/flightBookingRecognizer.ts delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/dialogs/mainDialog.js delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/dialogs/mainDialog.ts delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/index.js delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/index.ts delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/package-with-tests.json.js delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/package-with-tests.json.ts delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/package.json.js delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/package.json.ts delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/resources/welcomeCard.json delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/tests/README.md delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/tests/bots/dialogAndWelcomeBot.test.js delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/tests/bots/dialogAndWelcomeBot.test.ts delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/bookingDialog.test.js delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/bookingDialog.test.ts delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/cancelAndHelpDialog.test.js delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/cancelAndHelpDialog.test.ts delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/dateResolverDialog.test.js delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/dateResolverDialog.test.ts delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/mainDialog.test.js delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/mainDialog.test.ts delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/FlightFromCdgToJfk.json delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/FlightFromMadridToChicago.json delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/FlightFromParisToNewYork.json delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/FlightToMadrid.json delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/bookingDialogTestCases.js delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/bookingDialogTestCases.ts delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/dateResolverTestCases.js delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/dateResolverTestCases.ts delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/tsconfig.json delete mode 100644 generators/generator-botbuilder/generators/app/templates/core/tslint.json create mode 100644 libraries/botbuilder-stdlib/src/azureCoreHttpCompat.ts create mode 100644 libraries/botbuilder-stdlib/src/azureCoreHttpCompat/compat.ts create mode 100644 libraries/botbuilder-stdlib/src/azureCoreHttpCompat/interfaces.ts create mode 100644 libraries/botbuilder-stdlib/src/azureCoreHttpCompat/serviceClientContext.ts create mode 100644 testing/browser-functional/browser-echo-bot/crypto-shim.js create mode 100644 tools/resourceManagement/lib/resource/utils.js create mode 100644 tsup/crypto-shim.js diff --git a/.github/workflows/depcheck.yml b/.github/workflows/depcheck.yml index f500606830..e6d2d3fbba 100644 --- a/.github/workflows/depcheck.yml +++ b/.github/workflows/depcheck.yml @@ -30,7 +30,7 @@ jobs: id: yarn-cache-dir run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: ${{ steps.yarn-cache-dir.outputs.dir }} key: ${{ runner.os }}-node22.x-yarn-${{ hashFiles('**/yarn.lock') }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 80604516ba..917c659603 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -30,7 +30,7 @@ jobs: id: yarn-cache-dir run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: ${{ steps.yarn-cache-dir.outputs.dir }} key: ${{ runner.os }}-node22.x-yarn-${{ hashFiles('**/yarn.lock') }} diff --git a/.github/workflows/test-compat.yml b/.github/workflows/test-compat.yml index 6db8ccbc01..1ff38dc30c 100644 --- a/.github/workflows/test-compat.yml +++ b/.github/workflows/test-compat.yml @@ -30,7 +30,7 @@ jobs: id: yarn-cache-dir run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: ${{ steps.yarn-cache-dir.outputs.dir }} key: ${{ runner.os }}-node22.x-yarn-${{ hashFiles('**/yarn.lock') }} diff --git a/.github/workflows/test-consumer.yml b/.github/workflows/test-consumer.yml index 45091af3a7..414bc6b395 100644 --- a/.github/workflows/test-consumer.yml +++ b/.github/workflows/test-consumer.yml @@ -30,7 +30,7 @@ jobs: id: yarn-cache-dir run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: ${{ steps.yarn-cache-dir.outputs.dir }} key: ${{ runner.os }}-node22.x-yarn-${{ hashFiles('**/yarn.lock') }} diff --git a/.github/workflows/test-repoutils.yml b/.github/workflows/test-repoutils.yml index c958ac69fb..89052ef360 100644 --- a/.github/workflows/test-repoutils.yml +++ b/.github/workflows/test-repoutils.yml @@ -30,7 +30,7 @@ jobs: id: yarn-cache-dir run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: ${{ steps.yarn-cache-dir.outputs.dir }} key: ${{ runner.os }}-node22.x-yarn-${{ hashFiles('**/yarn.lock') }} diff --git a/.github/workflows/test-schemas.yml b/.github/workflows/test-schemas.yml index 69e9359a97..caeee3b85b 100644 --- a/.github/workflows/test-schemas.yml +++ b/.github/workflows/test-schemas.yml @@ -30,7 +30,7 @@ jobs: id: yarn-cache-dir run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: ${{ steps.yarn-cache-dir.outputs.dir }} key: ${{ runner.os }}-node22.x-yarn-${{ hashFiles('**/yarn.lock') }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bde786251e..6c9d06969c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,7 +35,7 @@ jobs: id: yarn-cache-dir run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: ${{ steps.yarn-cache-dir.outputs.dir }} key: ${{ runner.os }}-node${{ matrix.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }} diff --git a/generators/generator-botbuilder/README.md b/generators/generator-botbuilder/README.md index eb6e9700ee..df996c5844 100644 --- a/generators/generator-botbuilder/README.md +++ b/generators/generator-botbuilder/README.md @@ -14,7 +14,6 @@ The generator supports three different template options. The table below can he | Template | Description | | ---------- | --------- | | Echo Bot | A good template if you want a little more than "Hello World!", but not much more. This template handles the very basics of sending messages to a bot, and having the bot process the messages by repeating them back to the user. This template produces a bot that simply "echoes" back to the user anything the user says to the bot. | -| Core Bot | Our most advanced template, the Core template provides 6 core features every bot is likely to have. This template covers the core features of a Conversational-AI bot using [LUIS](https://www.luis.ai). See the **Core Bot Features** table below for more details. | | Empty Bot | A good template if you are familiar with Bot Framework v4, and simply want a basic skeleton project. Also a good option if you want to take sample code from the documentation and paste it into a minimal bot in order to learn. | ### How to Choose a Template @@ -22,7 +21,6 @@ The generator supports three different template options. The table below can he | Template | When This Template is a Good Choice | | -------- | -------- | | Echo Bot | You are new to Bot Framework v4 and want a working bot with minimal features. | -| Core Bot | You understand some of the core concepts of Bot Framework v4 and are beyond the concepts introduced in the Echo Bot template. You're familiar with or are ready to learn concepts such as language understanding using LUIS, managing multi-turn conversations with Dialogs, handling user initiated Dialog interruptions, and using Adaptive Cards to welcome your users. | | Empty Bot | You are a seasoned Bot Framework v4 developer. You've built bots before, and want the minimum skeleton of a bot. | ### Template Overview @@ -31,38 +29,18 @@ The generator supports three different template options. The table below can he The Echo Bot template is slightly more than the a classic "Hello World!" example, but not by much. This template shows the basic structure of a bot, how a bot recieves messages from a user, and how a bot sends messages to a user. The bot will "echo" back to the user, what the user says to the bot. It is a good choice for first time, new to Bot Framework v4 developers. -#### Core Bot Template - -The Core Bot template consists of set of core features most every bot is likely to have. Building off of the core message processing features found in the Echo Bot template, this template adds a number of more sophisticated features. The table below lists these features and provides links to additional documentation. - -| Core Bot Features | Description | -| ------------------ | ----------- | -| [Send and receive messages](https://docs.microsoft.com/azure/bot-service/bot-builder-howto-send-messages?view=azure-bot-service-4.0&tabs=javascript) | The primary way your bot will communicate with users, and likewise receive communication, is through message activities. Some messages may simply consist of plain text, while others may contain richer content such as cards or attachments. | -| [Proactive messaging](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-howto-proactive-message?view=azure-bot-service-4.0) using [Adaptive Cards](https://docs.microsoft.com/azure/bot-service/bot-builder-send-welcome-message?view=azure-bot-service-4.0?#using-adaptive-card-greeting) | The primary goal when creating any bot is to engage your user in a meaningful conversation. One of the best ways to achieve this goal is to ensure that from the moment a user first connects to your bot, they understand your bot’s main purpose and capabilities. We refer to this as "welcoming the user." The Core template uses an [Adaptive Card](http://adaptivecards.io) to implement this behavior. | -| [Language understanding using LUIS](https://docs.microsoft.com/azure/bot-service/bot-builder-howto-v4-luis?view=azure-bot-service-4.0) | The ability to understand what your user means conversationally and contextually can be a difficult task, but can provide your bot a more natural conversation feel. Language Understanding, called LUIS, enables you to do just that so that your bot can recognize the intent of user messages, allow for more natural language from your user, and better direct the conversation flow. | -| [Multi-turn conversation support using Dialogs](https://docs.microsoft.com/azure/bot-service/bot-builder-concept-dialog?view=azure-bot-service-4.0) | The ability to manage conversations is an important part of the bot/user interation. Bot Framework introduces the concept of a Dialog to handle this conversational pattern. Dialog objects process inbound Activities and generate outbound responses. The business logic of the bot runs either directly or indirectly within Dialog classes. | -| [Managing conversation state](https://docs.microsoft.com/azure/bot-service/bot-builder-howto-v4-state?view=azure-bot-service-4.0) | A key to good bot design is to track the context of a conversation, so that your bot remembers things like the answers to previous questions. | -| [How to handle user-initiated interruptions](https://docs.microsoft.com/azure/bot-service/bot-builder-howto-handle-user-interrupt?view=azure-bot-service-4.0) | While you may think that your users will follow your defined conversation flow step by step, chances are good that they will change their minds or ask a question in the middle of the process instead of answering the question. Handling interruptions means making sure your bot is prepared to handle situations like this. | -| [How to unit test a bot](https://aka.ms/cs-unit-test-docs) | Optionally, the Core Bot template can generate corresponding unit tests that shows how to use the testing framework introduced in Bot Framework version 4.5. Selecting this option provides a complete set of units tests for Core Bot. It shows how to write unit tests to test the various features of Core Bot. To add the Core Bot unit tests, run the generator and answer `yes` when prompted. See below for an example of how to do this from the command line. | - #### Empty Bot Template The Empty Bot template is the minimal skeleton code for a bot. It provides a stub `onTurn` handler but does not perform any actions. If you are experienced writing bots with Bot Framework v4 and want the minimum scaffolding, the Empty template is for you. ## Features by Template -| Feature | Empty Bot | Echo Bot | Core Bot | -| --------- | :-----: | :-----: | :-----: | -| Generate code in JavaScript or TypesScript | X | X | X | -| Support local development and testing using the [Bot Framework Emulator v4](https://www.github.com/microsoft/botframework-emulator) | X | X | X | -| Core bot message processing | | X | X | -| Deploy your bot to Microsoft Azure | | X | X | -| Welcome new users using Adaptive Card technology | | | X | -| Support AI-based greetings using [LUIS](https://www.luis.ai) | | | X | -| Use Dialogs to manage more in-depth conversations | | | X | -| Manage conversation state | | | X | -| Handle user interruptions | | | X | -| Unit test a bot using Bot Framework Testing framework (optional) | | | X | +| Feature | Empty Bot | Echo Bot | +| --------- | :-----: | :-----: | +| Generate code in JavaScript or TypesScript | X | X | +| Support local development and testing using the [Bot Framework Emulator v4](https://www.github.com/microsoft/botframework-emulator) | X | X | +| Core bot message processing | | X | +| Deploy your bot to Microsoft Azure | | X | ## Installation @@ -108,17 +86,16 @@ The generator supports a number of command line options that can be used to chan | --botname, -N | The name given to the bot project | | --description, -D | A brief bit of text that describes the purpose of the bot | | --language, -L | The programming language for the project. Options are `JavaScript` or `TypeScript`. | -| --template, -T | The template used to generate the project. Options are `empty`, `echo`, or `core`. See [https://aka.ms/botbuilder-generator](https://aka.ms/botbuilder-generator) for additional information regarding the different template option and their functional differences. | -| --addtests | _A Core Bot Template Only Feature_. The generator will add unit tests to the Core Bot generated bot. This option is not available to other templates at this time. To learn more about the test framework released with Bot Framework v4.5, see [How to unit test bots](https://aka.ms/js-unit-test-docs). This option is intended to enable automated bot generation for testing purposes. | +| --template, -T | The template used to generate the project. Options are `empty` or `echo`. See [https://aka.ms/botbuilder-generator](https://aka.ms/botbuilder-generator) for additional information regarding the different template option and their functional differences. | | --noprompt | The generator will not prompt for confirmation before creating a new bot. Any requirement options not passed on the command line will use a reasonable default value. This option is intended to enable automated bot generation for testing purposes. | #### Example Using Command Line Options -This example shows how to pass command line options to the generator, setting the default language to TypeScript and the default template to Core. +This example shows how to pass command line options to the generator, setting the default language to TypeScript and the default template to Echo. ```bash -# Run the generator defaulting the language to TypeScript and the template to core -yo botbuilder --L "TypeScript" --T "core" +# Run the generator defaulting the language to TypeScript and the template to echo +yo botbuilder --L "TypeScript" --T "Echo" ``` ### Generating a Bot Using --noprompt @@ -133,7 +110,6 @@ The generator can be run in `--noprompt` mode, which can be used for automated b | --description, -D | "Demonstrate the core capabilities of the Microsoft Bot Framework" | | --language, -L | `JavaScript` | | --template, -T | `echo` | -| --addtests | When specified, will cause the Core Bot template to add unit tests. | #### Examples Using --noprompt @@ -151,13 +127,6 @@ This example shows how to run the generator in --noprompt mode, using all the de yo botbuilder --noprompt ``` -This example shows how to run the generator in --noprompt mode, generating a TypeScript Core Bot with unit tests. - -```bash -# Run the generator using all default options -yo botbuilder -N "my-core-bot-with-tests" -D "A core bot with tests in TypeScript" -L "TypeScript" -T "core" --addtests --noprompt -``` - ## Running Your Bot ### Running Your Bot Locally @@ -202,15 +171,6 @@ The code generated by the botbuilder generator is lint compliant. Depending on npm run lint ``` -#### Testing Core Bots with Tests - -Core Bot templates generated with unit tests can be tested using the following: - -```bash -# launch mocha, run unit tests, report code coverage -npm test -``` - ## Deploy Your Bot to Azure After creating the bot and testing it locally, you can deploy it to Azure to make it accessible from anywhere. diff --git a/generators/generator-botbuilder/components/commonFilesWriter.js b/generators/generator-botbuilder/components/commonFilesWriter.js index 9d2615274e..9b04bb1293 100644 --- a/generators/generator-botbuilder/components/commonFilesWriter.js +++ b/generators/generator-botbuilder/components/commonFilesWriter.js @@ -40,7 +40,6 @@ module.exports.commonFilesWriter = (generator, templatePath) => { // write the project files common to all templates // do any text token processing where required - // NOTE: core bot with tests overwrites this file to add a npm test script command generator.fs.copyTpl( generator.templatePath(path.join(templatePath, 'package.json.' + extension)), generator.destinationPath('package.json'), diff --git a/generators/generator-botbuilder/components/constants.js b/generators/generator-botbuilder/components/constants.js index 2dcbd60847..4f5cad8c4d 100644 --- a/generators/generator-botbuilder/components/constants.js +++ b/generators/generator-botbuilder/components/constants.js @@ -4,17 +4,14 @@ // display names of the template options module.exports.BOT_TEMPLATE_NAME_EMPTY = 'Empty Bot'; module.exports.BOT_TEMPLATE_NAME_SIMPLE = 'Echo Bot'; -module.exports.BOT_TEMPLATE_NAME_CORE = 'Core Bot'; // aka.ms links to documentation for each template option module.exports.BOT_HELP_URL_EMPTY = 'https://aka.ms/bot-template-empty'; module.exports.BOT_HELP_URL_SIMPLE = 'https://aka.ms/bot-template-echo'; -module.exports.BOT_HELP_URL_CORE = 'https://aka.ms/bot-template-core'; // --noprompt template values module.exports.BOT_TEMPLATE_NOPROMPT_EMPTY = 'empty'; module.exports.BOT_TEMPLATE_NOPROMPT_SIMPLE = 'echo'; -module.exports.BOT_TEMPLATE_NOPROMPT_CORE = 'core'; // programming language name options module.exports.BOT_LANG_NAME_JAVASCRIPT = 'JavaScript'; diff --git a/generators/generator-botbuilder/components/coreTemplateWriter.js b/generators/generator-botbuilder/components/coreTemplateWriter.js deleted file mode 100644 index 32dd19d5bb..0000000000 --- a/generators/generator-botbuilder/components/coreTemplateWriter.js +++ /dev/null @@ -1,379 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -const _ = require('lodash'); -const mkdirp = require('mkdirp'); -const path = require('path'); - -const { commonFilesWriter } = require('./commonFilesWriter'); -const { BOT_TEMPLATE_NAME_CORE, BOT_TEMPLATE_NOPROMPT_CORE } = require('./constants'); -const pkg = require('../package.json'); - -// generators/app/templates folder name -const GENERATOR_TEMPLATE_NAME = 'core'; - -const LANG_JS = 'javascript'; -const LANG_TS = 'typescript'; - -/** - * - * @param {String} language either 'javascript' or 'typescript' - */ -const _getSourceFolders = language => { - if(!language || (_.toLower(language) !== LANG_JS && _.toLower(language) !== LANG_TS)) { - throw new Error(`coreTemplateWriter._getTargetFolders called for invalid language: ${ language }`); - } - - // get the folder structure, based on language - let folders = [ - 'bots', - 'cognitiveModels', - 'dialogs', - 'resources', - ]; - // if we're generating TypeScript, then we need a deploymentScripts folder - if(_.toLower(language) === LANG_TS) { - folders = folders.concat(['deploymentScripts']); - } - return folders; -} - -/** - * - * @param {String} language either 'javascript' or 'typescript' - */ -const _getTargetFolders = language => { - if(!language || (_.toLower(language) !== LANG_JS && _.toLower(language) !== LANG_TS)) { - throw new Error(`coreTemplateWriter._getTargetFolders called for invalid language: ${ language }`); - } - - let folders; - if(_.toLower(language) === LANG_TS) { - folders = [ - path.join('src', 'bots'), - 'cognitiveModels', - path.join('src', 'dialogs'), - 'resources', - 'deploymentScripts', - ]; - } else { - folders = [ - 'bots', - 'cognitiveModels', - 'dialogs', - 'resources', - ]; - } - return folders; -} - -/** - * - * @param {String} language either 'javascript' or 'typescript' - */ -const _getSourceTestFolders = language => { - const lang = _.toLower(language); - if(!lang || (lang !== LANG_JS && lang !== LANG_TS)) { - throw new Error(`coreTemplateWriter._getTargetFolders called for invalid language: ${ language }`); - } - - // get the folder structure, based on language - const folders = [ - 'tests', - path.join('tests', 'bots'), - path.join('tests', 'dialogs'), - path.join('tests', 'dialogs', 'testData'), - path.join('tests', 'dialogs', 'testData'), - ]; - return folders; -} - -/** - * - * @param {String} language either 'javascript' or 'typescript' - */ -const _getTargetTestFolders = language => { - const lang = _.toLower(language); - if(!lang || (lang !== LANG_JS && lang !== LANG_TS)) { - throw new Error(`coreTemplateWriter._getTargetTestFolders called for invalid language: ${ language }`); - } - - let folders; - if(_.toLower(language) === LANG_TS) { - folders = [ - path.join('src', 'tests'), - path.join('src', 'tests', 'bots'), - path.join('src', 'tests', 'dialogs'), - path.join('src', 'tests', 'dialogs', 'testData'), - 'testResources', - ]; - } else { - folders = [ - 'tests', - path.join('tests', 'bots'), - path.join('tests', 'dialogs'), - path.join('tests', 'dialogs', 'testData'), - path.join('tests', 'dialogs', 'testData'), - ]; - } - return folders; -} - -/** - * Write the files that are specific to the core bot template - * - * @param {Generator} generator Yeoman's generator object - * @param {String} templatePath file path to write the generated code - */ -const writeCoreTemplateTestFiles = (generator, templatePath) => { - // lets validate that we should be called - if(generator.templateConfig.addtests !== true) { - throw new Error(`writeCoreTemplateTestFiles called when 'addtests' flag is false: ${ generator.templateConfig.addtests }`); - } - // declare some constants that map to srcFolder and destFolder array offsets - const TEST_FOLDER = 0; - const BOTS_TEST_FOLDER = 1; - const DIALOGS_TEST_FOLDER = 2; - const DIALOGS_TESTDATA_FOLDER = 3; - const DIALOGS_TESTDATA_JSON_FOLDER = 4; - - // get the folder structure, based on language - const srcFolders = _getSourceTestFolders(_.toLower(generator.templateConfig.language)); - const destFolders = _getTargetTestFolders(_.toLower(generator.templateConfig.language)); - - const extension = _.toLower(generator.templateConfig.language) === 'javascript' ? 'js' : 'ts'; - - // create the core bot tests folder structure - for (let cnt = 0; cnt < destFolders.length; ++cnt) { - mkdirp.sync(destFolders[cnt]); - } - - // overwrite the commonFilesWriter version as we want to version that has - // the npm test script command `npm test' - generator.fs.copyTpl( - generator.templatePath(path.join(templatePath, 'package-with-tests.json.' + extension)), - generator.destinationPath('package.json'), - { - botname: generator.templateConfig.botname, - botDescription: generator.templateConfig.description, - version: pkg.version, - npmMain: (extension === 'js' ? `index.js` : `./lib/index.js`) - } - ); - - - - // write out the test folder's README.md file - let sourcePath = path.join(templatePath, srcFolders[TEST_FOLDER]); - let destinationPath = path.join(generator.destinationPath(), destFolders[TEST_FOLDER]); - generator.fs.copyTpl( - path.join(sourcePath, 'README.md'), - path.join(destinationPath, 'README.md'), - { - botname: generator.templateConfig.botname - } - ); - - // write out the bots test folder - sourcePath = path.join(templatePath, srcFolders[BOTS_TEST_FOLDER]); - destinationPath = path.join(generator.destinationPath(), destFolders[BOTS_TEST_FOLDER]); - generator.fs.copy( - path.join(sourcePath, `dialogAndWelcomeBot.test.${extension}`), - path.join(destinationPath, `dialogAndWelcomeBot.test.${extension}`) - ); - - // write out the dialogs test folder - sourcePath = path.join(templatePath, srcFolders[DIALOGS_TEST_FOLDER]); - destinationPath = path.join(generator.destinationPath(), destFolders[DIALOGS_TEST_FOLDER]); - generator.fs.copy( - path.join(sourcePath, `bookingDialog.test.${extension}`), - path.join(destinationPath, `bookingDialog.test.${extension}`) - ); - generator.fs.copy( - path.join(sourcePath, `cancelAndHelpDialog.test.${extension}`), - path.join(destinationPath, `cancelAndHelpDialog.test.${extension}`) - ); - generator.fs.copy( - path.join(sourcePath, `dateResolverDialog.test.${extension}`), - path.join(destinationPath, `dateResolverDialog.test.${extension}`) - ); - generator.fs.copy( - path.join(sourcePath, `mainDialog.test.${extension}`), - path.join(destinationPath, `mainDialog.test.${extension}`) - ); - - // write out the dialogs testData folder (treat .json files separately) - sourcePath = path.join(templatePath, srcFolders[DIALOGS_TESTDATA_FOLDER]); - destinationPath = path.join(generator.destinationPath(), destFolders[DIALOGS_TESTDATA_FOLDER]); - generator.fs.copy( - path.join(sourcePath, `bookingDialogTestCases.${extension}`), - path.join(destinationPath, `bookingDialogTestCases.${extension}`) - ); - generator.fs.copy( - path.join(sourcePath, `dateResolverTestCases.${extension}`), - path.join(destinationPath, `dateResolverTestCases.${extension}`) - ); - - // write out the dialogs testData folder (treat .json files separately) - // tsc won't copy these where I want them, so we move them up to a root folder - sourcePath = path.join(templatePath, srcFolders[DIALOGS_TESTDATA_JSON_FOLDER]); - destinationPath = path.join(generator.destinationPath(), destFolders[DIALOGS_TESTDATA_JSON_FOLDER]); - generator.fs.copy( - path.join(sourcePath, 'FlightFromCdgToJfk.json'), - path.join(destinationPath, 'FlightFromCdgToJfk.json') - ); - generator.fs.copy( - path.join(sourcePath, 'FlightFromMadridToChicago.json'), - path.join(destinationPath, 'FlightFromMadridToChicago.json') - ); - generator.fs.copy( - path.join(sourcePath, 'FlightFromParisToNewYork.json'), - path.join(destinationPath, 'FlightFromParisToNewYork.json') - ); - generator.fs.copy( - path.join(sourcePath, 'FlightToMadrid.json'), - path.join(destinationPath, 'FlightToMadrid.json') - ); -} - -/** - * Write the files that are specific to the core bot template - * - * @param {Generator} generator Yeoman's generator object - * @param {String} templatePath file path to write the generated code - */ -const writeCoreTemplateFiles = (generator, templatePath) => { - const BOTS_FOLDER = 0; - const COGNITIVE_MODELS_FOLDER = 1; - const DIALOGS_FOLDER = 2; - const RESOURCES_FOLDER = 3; - const DEPLOYMENT_SCRIPTS_FOLDER = 4; - const TS_SRC_FOLDER = 'src'; - - // get the folder structure, based on language - const srcFolders = _getSourceFolders(_.toLower(generator.templateConfig.language), generator.options.addtests); - const destFolders = _getTargetFolders(_.toLower(generator.templateConfig.language), generator.options.addtests); - - const extension = _.toLower(generator.templateConfig.language) === 'javascript' ? 'js' : 'ts'; - const srcFolder = _.toLower(generator.templateConfig.language) === 'javascript' ? '' : TS_SRC_FOLDER; - - // create the core bot folder structure - for (let cnt = 0; cnt < destFolders.length; ++cnt) { - mkdirp.sync(destFolders[cnt]); - } - - // write out the bots folder - let sourcePath = path.join(templatePath, srcFolders[BOTS_FOLDER]); - let destinationPath = path.join(generator.destinationPath(), destFolders[BOTS_FOLDER]); - generator.fs.copy( - path.join(sourcePath, `dialogAndWelcomeBot.${extension}`), - path.join(destinationPath, `dialogAndWelcomeBot.${extension}`), - { - botname: generator.templateConfig.botname - } - ); - generator.fs.copy( - path.join(sourcePath, `dialogBot.${extension}`), - path.join(destinationPath, `dialogBot.${extension}`) - ); - - // write out the LUIS model - sourcePath = path.join(templatePath, srcFolders[COGNITIVE_MODELS_FOLDER]); - destinationPath = path.join(generator.destinationPath(), destFolders[COGNITIVE_MODELS_FOLDER]); - generator.fs.copy( - path.join(sourcePath, 'FlightBooking.json'), - path.join(destinationPath, 'FlightBooking.json') - ); - - // if we're writing out TypeScript, then we need to add a webConfigPrep.js - if(_.toLower(generator.templateConfig.language) === LANG_TS) { - sourcePath = path.join(templatePath, srcFolders[DEPLOYMENT_SCRIPTS_FOLDER]); - destinationPath = path.join(generator.destinationPath(), destFolders[DEPLOYMENT_SCRIPTS_FOLDER]); - generator.fs.copy( - path.join(sourcePath, 'webConfigPrep.js'), - path.join(destinationPath, 'webConfigPrep.js') - ); - } - - // write out the dialogs folder - sourcePath = path.join(templatePath, srcFolders[DIALOGS_FOLDER]); - destinationPath = path.join(generator.destinationPath(), destFolders[DIALOGS_FOLDER]); - if(_.toLower(generator.templateConfig.language) === LANG_TS) { - generator.fs.copy( - path.join(sourcePath, `bookingDetails.${extension}`), - path.join(destinationPath, `bookingDetails.${extension}`) - ); - } - generator.fs.copy( - path.join(sourcePath, `bookingDialog.${extension}`), - path.join(destinationPath, `bookingDialog.${extension}`) - ); - generator.fs.copy( - path.join(sourcePath, `cancelAndHelpDialog.${extension}`), - path.join(destinationPath, `cancelAndHelpDialog.${extension}`) - ); - generator.fs.copy( - path.join(sourcePath, `dateResolverDialog.${extension}`), - path.join(destinationPath, `dateResolverDialog.${extension}`) - ); - generator.fs.copy( - path.join(sourcePath, `flightBookingRecognizer.${extension}`), - path.join(destinationPath, `flightBookingRecognizer.${extension}`) - ); - generator.fs.copy( - path.join(sourcePath, `mainDialog.${extension}`), - path.join(destinationPath, `mainDialog.${extension}`) - ); - - // write out the resources folder - // which contains the welcome adaptive card - sourcePath = path.join(templatePath, srcFolders[RESOURCES_FOLDER]); - destinationPath = path.join(generator.destinationPath(), destFolders[RESOURCES_FOLDER]); - generator.fs.copy( - path.join(sourcePath, 'welcomeCard.json'), - path.join(destinationPath, 'welcomeCard.json') - ); - - // write out the index.js and bot.js - destinationPath = path.join(generator.destinationPath(), srcFolder); - - // gen index and main dialog files - generator.fs.copyTpl( - generator.templatePath(path.join(templatePath, `index.${extension}`)), - path.join(destinationPath, `index.${extension}`), - { - botname: generator.templateConfig.botname - } - ); - - // if asked to write out unit tests, then let's have a go at it - if(generator.options.addtests) { - writeCoreTemplateTestFiles(generator, templatePath); - } -} - -/** - * Write project files for Core template - * - * @param {Generator} generator Yeoman's generator object - */ -module.exports.coreTemplateWriter = generator => { - // do some simple sanity checking to ensure we're being - // called correctly - const template = _.toLower(generator.templateConfig.template) - if (template !== _.toLower(BOT_TEMPLATE_NAME_CORE) && template !== _.toLower(BOT_TEMPLATE_NOPROMPT_CORE)) { - throw new Error(`coreTemplateWriter called for wrong template: ${ generator.templateConfig.template }`); - } - const templatePath = path.join(generator.templatePath(), GENERATOR_TEMPLATE_NAME); - - // write files common to all template options - commonFilesWriter(generator, templatePath); - - // write files specific to the core bot template - writeCoreTemplateFiles(generator, templatePath); - - // write out unit tests if asked to do so - if(generator.templateConfig.addtests === true) { - writeCoreTemplateTestFiles(generator, templatePath); - } -} diff --git a/generators/generator-botbuilder/components/prompts.js b/generators/generator-botbuilder/components/prompts.js index 5e9bc81769..7b1101da67 100644 --- a/generators/generator-botbuilder/components/prompts.js +++ b/generators/generator-botbuilder/components/prompts.js @@ -6,13 +6,10 @@ const _ = require('lodash'); const { BOT_TEMPLATE_NAME_EMPTY, BOT_TEMPLATE_NAME_SIMPLE, - BOT_TEMPLATE_NAME_CORE, BOT_TEMPLATE_NOPROMPT_EMPTY, BOT_TEMPLATE_NOPROMPT_SIMPLE, - BOT_TEMPLATE_NOPROMPT_CORE, BOT_HELP_URL_EMPTY, BOT_HELP_URL_SIMPLE, - BOT_HELP_URL_CORE, BOT_LANG_NAME_JAVASCRIPT, BOT_LANG_NAME_TYPESCRIPT } = require('./constants'); @@ -45,7 +42,7 @@ module.exports.configureCommandlineOptions = gen => { alias: 'L' }); - const templateDesc = `The initial bot capabilities. (${BOT_TEMPLATE_NAME_EMPTY} | ${BOT_TEMPLATE_NAME_SIMPLE} | ${BOT_TEMPLATE_NAME_CORE})`; + const templateDesc = `The initial bot capabilities. (${BOT_TEMPLATE_NAME_EMPTY} | ${BOT_TEMPLATE_NAME_SIMPLE})`; gen.option('template', { desc: templateDesc, type: String, @@ -53,13 +50,6 @@ module.exports.configureCommandlineOptions = gen => { alias: 'T' }); - gen.argument('addtests', { - desc: `Generate unit tests (${BOT_TEMPLATE_NAME_CORE} only).`, - type: Boolean, - required: false, - default: false - }); - gen.argument('noprompt', { desc: 'Do not prompt for any information or confirmation', type: Boolean, @@ -153,10 +143,6 @@ module.exports.getPrompts = (generator) => { name: `${BOT_TEMPLATE_NAME_SIMPLE} - ${BOT_HELP_URL_SIMPLE}`, value: BOT_TEMPLATE_NOPROMPT_SIMPLE }, - { - name: `${BOT_TEMPLATE_NAME_CORE} - ${BOT_HELP_URL_CORE}`, - value: BOT_TEMPLATE_NOPROMPT_CORE - }, { name: `${BOT_TEMPLATE_NAME_EMPTY} - ${BOT_HELP_URL_EMPTY}`, value: BOT_TEMPLATE_NOPROMPT_EMPTY @@ -166,18 +152,6 @@ module.exports.getPrompts = (generator) => { }).then(answer => { // store the template prompt answer generator.templateConfig.template = answer.template; - - if(_.toLower(answer.template) === _.toLower(BOT_TEMPLATE_NOPROMPT_CORE)) { - return generator.prompt({ - type: 'confirm', - name: 'addtests', - message: 'Would you like to add unit tests to test your new bot?', - default: true - }).then(answer => { - // store the addtests prompt answer - generator.templateConfig.addtests = answer.addtests; - }); - } }); }, diff --git a/generators/generator-botbuilder/generators/app/index.js b/generators/generator-botbuilder/generators/app/index.js index 676429b8e8..cae3e4c708 100644 --- a/generators/generator-botbuilder/generators/app/index.js +++ b/generators/generator-botbuilder/generators/app/index.js @@ -8,7 +8,6 @@ const chalk = require('chalk'); const pkg = require('../../package.json'); const prompts = require('../../components/prompts'); -const { coreTemplateWriter } = require('../../components/coreTemplateWriter'); const { echoTemplateWriter } = require('../../components/echoTemplateWriter'); const { emptyTemplateWriter } = require('../../components/emptyTemplateWriter'); const { @@ -16,10 +15,8 @@ const { BOT_LANG_NAME_TYPESCRIPT, BOT_TEMPLATE_NAME_EMPTY, BOT_TEMPLATE_NAME_SIMPLE, - BOT_TEMPLATE_NAME_CORE, BOT_TEMPLATE_NOPROMPT_EMPTY, BOT_TEMPLATE_NOPROMPT_SIMPLE, - BOT_TEMPLATE_NOPROMPT_CORE } = require('../../components/constants'); _.extend(Generator.prototype, require('yeoman-generator/lib/actions/install')); @@ -131,11 +128,6 @@ module.exports = class extends Generator { echoTemplateWriter(this); break; - case _.toLower(BOT_TEMPLATE_NAME_CORE): - case _.toLower(BOT_TEMPLATE_NOPROMPT_CORE): - coreTemplateWriter(this); - break; - default: const errorMsg = `ERROR: Unable to generate a new bot. Invalid template: [${template}]`; this.log(chalk.red(errorMsg)); @@ -170,23 +162,11 @@ module.exports = class extends Generator { const template = (this.templateConfig.template ? _.toLower(this.templateConfig.template) : undefined); const tmplEmpty = _.toLower(BOT_TEMPLATE_NOPROMPT_EMPTY); const tmplSimple = _.toLower(BOT_TEMPLATE_NOPROMPT_SIMPLE); - const tmplCore = _.toLower(BOT_TEMPLATE_NOPROMPT_CORE); - if (!template || (template !== tmplEmpty && template !== tmplSimple && template !== tmplCore)) { + if (!template || (template !== tmplEmpty && template !== tmplSimple)) { throw new Error('Must specify a template when using --noprompt argument. Use --template or -T'); } - // let's see if unit tests are requested - if(this.templateConfig.addtests) { - // so they're asking for tests, let's make sure they've specified the corebot template - // or else we have an invalid set of command line arguments. unit tests are only available - // with the corebot template - if(template !== tmplCore) { - throw new Error('Invalid use of --addtests. Can only be specified when using --template "core" or -T "core" '); - } - } else { - this.templateConfig.addtests = false; - } - // when run using --noprompt and we have all the required templateConfig, then set final confirmation to true + // when run using --noprompt and we have all the required templateConfig, then set final confirmation to true // so we can go forward and create the new bot without prompting the user for confirmation this.templateConfig.finalConfirmation = true; } diff --git a/generators/generator-botbuilder/generators/app/templates/core/README.md.js b/generators/generator-botbuilder/generators/app/templates/core/README.md.js deleted file mode 100644 index 68a97ab200..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/README.md.js +++ /dev/null @@ -1,86 +0,0 @@ -# <%= botname %> - -<%= description %> - -This bot has been created using [Bot Framework](https://dev.botframework.com), it shows how to: - -- Use [LUIS](https://www.luis.ai) to implement core AI capabilities -- Implement a multi-turn conversation using Dialogs -- Handle user interruptions for such things as `Help` or `Cancel` -- Prompt for and validate requests for information from the user - -## Prerequisites - -This sample **requires** prerequisites in order to run. - -### Overview - -This bot uses [LUIS](https://www.luis.ai), an AI based cognitive service, to implement language understanding. - -- [Node.js](https://nodejs.org) version 10.14.1 or higher - - ```bash - # determine node version - node --version - ``` - -### Create a LUIS Application to enable language understanding - -The LUIS model for this example can be found under `cognitiveModels/FlightBooking.json` and the LUIS language model setup, training, and application configuration steps can be found [here](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-howto-v4-luis?view=azure-bot-service-4.0&tabs=javascript). - -Once you created the LUIS model, update `.env` with your `LuisAppId`, `LuisAPIKey` and `LuisAPIHostName`. - -```text -LuisAppId="Your LUIS App Id" -LuisAPIKey="Your LUIS Subscription key here" -LuisAPIHostName="Your LUIS App region here (i.e: westus.api.cognitive.microsoft.com)" -``` - -# To run the bot - -- Install modules - - ```bash - npm install - ``` -- Setup LUIS - -The prerequisite outlined above contain the steps necessary to provision a language understanding model on www.luis.ai. Refer to _Create a LUIS Application to enable language understanding_ above for directions to setup and configure LUIS. - -- Start the bot - - ```bash - npm start - ``` -## Testing the bot using Bot Framework Emulator - -[Bot Framework Emulator](https://github.com/microsoft/botframework-emulator) is a desktop application that allows bot developers to test and debug their bots on localhost or running remotely through a tunnel. - -- Install the Bot Framework Emulator version 4.9.0 or greater from [here](https://github.com/Microsoft/BotFramework-Emulator/releases) - -### Connect to the bot using Bot Framework Emulator - -- Launch Bot Framework Emulator -- File -> Open Bot -- Enter a Bot URL of `http://localhost:3978/api/messages` - -## Deploy the bot to Azure - -To learn more about deploying a bot to Azure, see [Deploy your bot to Azure](https://aka.ms/azuredeployment) for a complete list of deployment instructions. - - -## Further reading - -- [Bot Framework Documentation](https://docs.botframework.com) -- [Bot Basics](https://docs.microsoft.com/azure/bot-service/bot-builder-basics?view=azure-bot-service-4.0) -- [Dialogs](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-concept-dialog?view=azure-bot-service-4.0) -- [Gathering Input Using Prompts](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-prompts?view=azure-bot-service-4.0) -- [Activity processing](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-concept-activity-processing?view=azure-bot-service-4.0) -- [Azure Bot Service Introduction](https://docs.microsoft.com/azure/bot-service/bot-service-overview-introduction?view=azure-bot-service-4.0) -- [Azure Bot Service Documentation](https://docs.microsoft.com/azure/bot-service/?view=azure-bot-service-4.0) -- [Azure CLI](https://docs.microsoft.com/cli/azure/?view=azure-cli-latest) -- [Azure Portal](https://portal.azure.com) -- [Language Understanding using LUIS](https://docs.microsoft.com/en-us/azure/cognitive-services/luis/) -- [Channels and Bot Connector Service](https://docs.microsoft.com/en-us/azure/bot-service/bot-concepts?view=azure-bot-service-4.0) -- [Restify](https://www.npmjs.com/package/restify) -- [dotenv](https://www.npmjs.com/package/dotenv) diff --git a/generators/generator-botbuilder/generators/app/templates/core/README.md.ts b/generators/generator-botbuilder/generators/app/templates/core/README.md.ts deleted file mode 100644 index 0e3fe548f2..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/README.md.ts +++ /dev/null @@ -1,99 +0,0 @@ -# <%= botname %> - -<%= description %> - -This bot has been created using [Bot Framework](https://dev.botframework.com), it shows how to: - -- Use [LUIS](https://www.luis.ai) to implement core AI capabilities -- Implement a multi-turn conversation using Dialogs -- Handle user interruptions for such things as `Help` or `Cancel` -- Prompt for and validate requests for information from the user - -## Prerequisites - -This sample **requires** prerequisites in order to run. - -### Overview - -This bot uses [LUIS](https://www.luis.ai), an AI based cognitive service, to implement language understanding. - -- [Node.js](https://nodejs.org) version 10.14.1 or higher - - - ```bash - # determine node version - node --version - ``` - -### Create a LUIS Application to enable language understanding - -The LUIS model for this example can be found under `cognitiveModels/FlightBooking.json` and the LUIS language model setup, training, and application configuration steps can be found [here](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-howto-v4-luis?view=azure-bot-service-4.0&tabs=javascript). - -Once you created the LUIS model, update `.env` with your `LuisAppId`, `LuisAPIKey` and `LuisAPIHostName`. - -```text -LuisAppId="Your LUIS App Id" -LuisAPIKey="Your LUIS Subscription key here" -LuisAPIHostName="Your LUIS App region here (i.e: westus.api.cognitive.microsoft.com)" -``` - -## To run the bot - -- Install modules - - ```bash - npm install - ``` -- Build the bot source code - - ```bash - npm run build - ``` -- Setup LUIS - -The prerequisite outlined above contain the steps necessary to provision a language understanding model on www.luis.ai. Refer to _Create a LUIS Application to enable language understanding_ above for directions to setup and configure LUIS. - -- Start the bot - - ```bash - npm start - ``` -## Testing the bot using Bot Framework Emulator - -[Bot Framework Emulator](https://github.com/microsoft/botframework-emulator) is a desktop application that allows bot developers to test and debug their bots on localhost or running remotely through a tunnel. - -- Install the Bot Framework Emulator version 4.9.0 or greater from [here](https://github.com/Microsoft/BotFramework-Emulator/releases) - -### Connect to the bot using Bot Framework Emulator - -- Launch Bot Framework Emulator -- File -> Open Bot -- Enter a Bot URL of `http://localhost:3978/api/messages` - -## Deploy the bot to Azure - -### Publishing Changes to Azure Bot Service - - ```bash - # build the TypeScript bot before you publish - npm run build - ``` - -To learn more about deploying a bot to Azure, see [Deploy your bot to Azure](https://aka.ms/azuredeployment) for a complete list of deployment instructions. - -## Further reading - -- [Bot Framework Documentation](https://docs.botframework.com) -- [Bot Basics](https://docs.microsoft.com/azure/bot-service/bot-builder-basics?view=azure-bot-service-4.0) -- [Dialogs](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-concept-dialog?view=azure-bot-service-4.0) -- [Gathering Input Using Prompts](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-prompts?view=azure-bot-service-4.0) -- [Activity processing](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-concept-activity-processing?view=azure-bot-service-4.0) -- [Azure Bot Service Introduction](https://docs.microsoft.com/azure/bot-service/bot-service-overview-introduction?view=azure-bot-service-4.0) -- [Azure Bot Service Documentation](https://docs.microsoft.com/azure/bot-service/?view=azure-bot-service-4.0) -- [Azure CLI](https://docs.microsoft.com/cli/azure/?view=azure-cli-latest) -- [Azure Portal](https://portal.azure.com) -- [Language Understanding using LUIS](https://docs.microsoft.com/en-us/azure/cognitive-services/luis/) -- [Channels and Bot Connector Service](https://docs.microsoft.com/en-us/azure/bot-service/bot-concepts?view=azure-bot-service-4.0) -- [TypeScript](https://www.typescriptlang.org) -- [Restify](https://www.npmjs.com/package/restify) -- [dotenv](https://www.npmjs.com/package/dotenv) diff --git a/generators/generator-botbuilder/generators/app/templates/core/_env b/generators/generator-botbuilder/generators/app/templates/core/_env deleted file mode 100644 index 98a9adcd35..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/_env +++ /dev/null @@ -1,7 +0,0 @@ -MicrosoftAppType= -MicrosoftAppId= -MicrosoftAppPassword= -MicrosoftAppTenantId= -LuisAppId= -LuisAPIKey= -LuisAPIHostName= diff --git a/generators/generator-botbuilder/generators/app/templates/core/_eslintrc.js b/generators/generator-botbuilder/generators/app/templates/core/_eslintrc.js deleted file mode 100644 index 73a8094046..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/_eslintrc.js +++ /dev/null @@ -1,15 +0,0 @@ -/* eslint-disable */ -module.exports = { - "extends": "standard", - "rules": { - "semi": [2, "always"], - "indent": [2, 4], - "no-return-await": 0, - "space-before-function-paren": [2, { - "named": "never", - "anonymous": "never", - "asyncArrow": "always" - }], - "template-curly-spacing": [2, "always"] - } -}; diff --git a/generators/generator-botbuilder/generators/app/templates/core/_gitignore b/generators/generator-botbuilder/generators/app/templates/core/_gitignore deleted file mode 100644 index d2e4927b5c..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/_gitignore +++ /dev/null @@ -1,5 +0,0 @@ -lib/ -node_modules/ -.nyc_output/ -.vscode/ -.env \ No newline at end of file diff --git a/generators/generator-botbuilder/generators/app/templates/core/bots/dialogAndWelcomeBot.js b/generators/generator-botbuilder/generators/app/templates/core/bots/dialogAndWelcomeBot.js deleted file mode 100644 index edc32b2750..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/bots/dialogAndWelcomeBot.js +++ /dev/null @@ -1,25 +0,0 @@ -const { CardFactory } = require('botbuilder-core'); -const { DialogBot } = require('./dialogBot'); -const WelcomeCard = require('../resources/welcomeCard.json'); - -class DialogAndWelcomeBot extends DialogBot { - constructor(conversationState, userState, dialog) { - super(conversationState, userState, dialog); - - this.onMembersAdded(async (context, next) => { - const membersAdded = context.activity.membersAdded; - for (let cnt = 0; cnt < membersAdded.length; cnt++) { - if (membersAdded[cnt].id !== context.activity.recipient.id) { - const welcomeCard = CardFactory.adaptiveCard(WelcomeCard); - await context.sendActivity({ attachments: [welcomeCard] }); - await dialog.run(context, conversationState.createProperty('DialogState')); - } - } - - // By calling next() you ensure that the next BotHandler is run. - await next(); - }); - } -} - -module.exports.DialogAndWelcomeBot = DialogAndWelcomeBot; diff --git a/generators/generator-botbuilder/generators/app/templates/core/bots/dialogAndWelcomeBot.ts b/generators/generator-botbuilder/generators/app/templates/core/bots/dialogAndWelcomeBot.ts deleted file mode 100644 index 372e4ef059..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/bots/dialogAndWelcomeBot.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { BotState, CardFactory } from 'botbuilder'; -import { Dialog, DialogState } from 'botbuilder-dialogs'; -import { MainDialog } from '../dialogs/mainDialog'; -import { DialogBot } from './dialogBot'; - -const WelcomeCard = require('../../resources/welcomeCard.json'); - -export class DialogAndWelcomeBot extends DialogBot { - constructor(conversationState: BotState, userState: BotState, dialog: Dialog) { - super(conversationState, userState, dialog); - - this.onMembersAdded(async (context, next) => { - const membersAdded = context.activity.membersAdded; - for (const member of membersAdded) { - if (member.id !== context.activity.recipient.id) { - const welcomeCard = CardFactory.adaptiveCard(WelcomeCard); - await context.sendActivity({ attachments: [welcomeCard] }); - await (dialog as MainDialog).run(context, conversationState.createProperty('DialogState')); - } - } - // By calling next() you ensure that the next BotHandler is run. - await next(); - }); - } -} diff --git a/generators/generator-botbuilder/generators/app/templates/core/bots/dialogBot.js b/generators/generator-botbuilder/generators/app/templates/core/bots/dialogBot.js deleted file mode 100644 index 055354f36c..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/bots/dialogBot.js +++ /dev/null @@ -1,42 +0,0 @@ -const { ActivityHandler } = require('botbuilder'); - -class DialogBot extends ActivityHandler { - /** - * - * @param {ConversationState} conversationState - * @param {UserState} userState - * @param {Dialog} dialog - */ - constructor(conversationState, userState, dialog) { - super(); - if (!conversationState) throw new Error('[DialogBot]: Missing parameter. conversationState is required'); - if (!userState) throw new Error('[DialogBot]: Missing parameter. userState is required'); - if (!dialog) throw new Error('[DialogBot]: Missing parameter. dialog is required'); - - this.conversationState = conversationState; - this.userState = userState; - this.dialog = dialog; - this.dialogState = this.conversationState.createProperty('DialogState'); - - this.onMessage(async (context, next) => { - console.log('Running dialog with Message Activity.'); - - // Run the Dialog with the new message Activity. - await this.dialog.run(context, this.dialogState); - - // By calling next() you ensure that the next BotHandler is run. - await next(); - }); - - this.onDialog(async (context, next) => { - // Save any state changes. The load happened during the execution of the Dialog. - await this.conversationState.saveChanges(context, false); - await this.userState.saveChanges(context, false); - - // By calling next() you ensure that the next BotHandler is run. - await next(); - }); - } -} - -module.exports.DialogBot = DialogBot; diff --git a/generators/generator-botbuilder/generators/app/templates/core/bots/dialogBot.ts b/generators/generator-botbuilder/generators/app/templates/core/bots/dialogBot.ts deleted file mode 100644 index 7b015b1f8c..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/bots/dialogBot.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { ActivityHandler, BotState, ConversationState, StatePropertyAccessor, UserState } from 'botbuilder'; -import { Dialog, DialogState } from 'botbuilder-dialogs'; -import { MainDialog } from '../dialogs/mainDialog'; - -export class DialogBot extends ActivityHandler { - private conversationState: BotState; - private userState: BotState; - private dialog: Dialog; - private dialogState: StatePropertyAccessor; - - /** - * - * @param {BotState} conversationState - * @param {BotState} userState - * @param {Dialog} dialog - */ - constructor(conversationState: BotState, userState: BotState, dialog: Dialog) { - super(); - if (!conversationState) { - throw new Error('[DialogBot]: Missing parameter. conversationState is required'); - } - if (!userState) { - throw new Error('[DialogBot]: Missing parameter. userState is required'); - } - if (!dialog) { - throw new Error('[DialogBot]: Missing parameter. dialog is required'); - } - - this.conversationState = conversationState as ConversationState; - this.userState = userState as UserState; - this.dialog = dialog; - this.dialogState = this.conversationState.createProperty('DialogState'); - - this.onMessage(async (context, next) => { - console.log('Running dialog with Message Activity.'); - - // Run the Dialog with the new message Activity. - await (this.dialog as MainDialog).run(context, this.dialogState); - - // By calling next() you ensure that the next BotHandler is run. - await next(); - }); - - this.onDialog(async (context, next) => { - // Save any state changes. The load happened during the execution of the Dialog. - await this.conversationState.saveChanges(context, false); - await this.userState.saveChanges(context, false); - - // By calling next() you ensure that the next BotHandler is run. - await next(); - }); - } -} diff --git a/generators/generator-botbuilder/generators/app/templates/core/cognitiveModels/FlightBooking.json b/generators/generator-botbuilder/generators/app/templates/core/cognitiveModels/FlightBooking.json deleted file mode 100644 index d44c61eb95..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/cognitiveModels/FlightBooking.json +++ /dev/null @@ -1,339 +0,0 @@ -{ - "luis_schema_version": "3.2.0", - "versionId": "0.1", - "name": "FlightBooking", - "desc": "Luis Model for CoreBot", - "culture": "en-us", - "tokenizerVersion": "1.0.0", - "intents": [ - { - "name": "BookFlight" - }, - { - "name": "Cancel" - }, - { - "name": "GetWeather" - }, - { - "name": "None" - } - ], - "entities": [], - "composites": [ - { - "name": "From", - "children": [ - "Airport" - ], - "roles": [] - }, - { - "name": "To", - "children": [ - "Airport" - ], - "roles": [] - } - ], - "closedLists": [ - { - "name": "Airport", - "subLists": [ - { - "canonicalForm": "Paris", - "list": [ - "paris", - "cdg" - ] - }, - { - "canonicalForm": "London", - "list": [ - "london", - "lhr" - ] - }, - { - "canonicalForm": "Berlin", - "list": [ - "berlin", - "txl" - ] - }, - { - "canonicalForm": "New York", - "list": [ - "new york", - "jfk" - ] - }, - { - "canonicalForm": "Seattle", - "list": [ - "seattle", - "sea" - ] - } - ], - "roles": [] - } - ], - "patternAnyEntities": [], - "regex_entities": [], - "prebuiltEntities": [ - { - "name": "datetimeV2", - "roles": [] - } - ], - "model_features": [], - "regex_features": [], - "patterns": [], - "utterances": [ - { - "text": "book a flight", - "intent": "BookFlight", - "entities": [] - }, - { - "text": "book a flight from new york", - "intent": "BookFlight", - "entities": [ - { - "entity": "From", - "startPos": 19, - "endPos": 26 - } - ] - }, - { - "text": "book a flight from seattle", - "intent": "BookFlight", - "entities": [ - { - "entity": "From", - "startPos": 19, - "endPos": 25 - } - ] - }, - { - "text": "book a hotel in new york", - "intent": "None", - "entities": [] - }, - { - "text": "book a restaurant", - "intent": "None", - "entities": [] - }, - { - "text": "book flight from london to paris on feb 14th", - "intent": "BookFlight", - "entities": [ - { - "entity": "From", - "startPos": 17, - "endPos": 22 - }, - { - "entity": "To", - "startPos": 27, - "endPos": 31 - } - ] - }, - { - "text": "book flight to berlin on feb 14th", - "intent": "BookFlight", - "entities": [ - { - "entity": "To", - "startPos": 15, - "endPos": 20 - } - ] - }, - { - "text": "book me a flight from london to paris", - "intent": "BookFlight", - "entities": [ - { - "entity": "From", - "startPos": 22, - "endPos": 27 - }, - { - "entity": "To", - "startPos": 32, - "endPos": 36 - } - ] - }, - { - "text": "bye", - "intent": "Cancel", - "entities": [] - }, - { - "text": "cancel booking", - "intent": "Cancel", - "entities": [] - }, - { - "text": "exit", - "intent": "Cancel", - "entities": [] - }, - { - "text": "find an airport near me", - "intent": "None", - "entities": [] - }, - { - "text": "flight to paris", - "intent": "BookFlight", - "entities": [ - { - "entity": "To", - "startPos": 10, - "endPos": 14 - } - ] - }, - { - "text": "flight to paris from london on feb 14th", - "intent": "BookFlight", - "entities": [ - { - "entity": "To", - "startPos": 10, - "endPos": 14 - }, - { - "entity": "From", - "startPos": 21, - "endPos": 26 - } - ] - }, - { - "text": "fly from berlin to paris on may 5th", - "intent": "BookFlight", - "entities": [ - { - "entity": "From", - "startPos": 9, - "endPos": 14 - }, - { - "entity": "To", - "startPos": 19, - "endPos": 23 - } - ] - }, - { - "text": "go to paris", - "intent": "BookFlight", - "entities": [ - { - "entity": "To", - "startPos": 6, - "endPos": 10 - } - ] - }, - { - "text": "going from paris to berlin", - "intent": "BookFlight", - "entities": [ - { - "entity": "From", - "startPos": 11, - "endPos": 15 - }, - { - "entity": "To", - "startPos": 20, - "endPos": 25 - } - ] - }, - { - "text": "i'd like to rent a car", - "intent": "None", - "entities": [] - }, - { - "text": "ignore", - "intent": "Cancel", - "entities": [] - }, - { - "text": "travel from new york to paris", - "intent": "BookFlight", - "entities": [ - { - "entity": "From", - "startPos": 12, - "endPos": 19 - }, - { - "entity": "To", - "startPos": 24, - "endPos": 28 - } - ] - }, - { - "text": "travel to new york", - "intent": "BookFlight", - "entities": [ - { - "entity": "To", - "startPos": 10, - "endPos": 17 - } - ] - }, - { - "text": "travel to paris", - "intent": "BookFlight", - "entities": [ - { - "entity": "To", - "startPos": 10, - "endPos": 14 - } - ] - }, - { - "text": "what's the forecast for this friday?", - "intent": "GetWeather", - "entities": [] - }, - { - "text": "what's the weather like for tomorrow", - "intent": "GetWeather", - "entities": [] - }, - { - "text": "what's the weather like in new york", - "intent": "GetWeather", - "entities": [] - }, - { - "text": "what's the weather like?", - "intent": "GetWeather", - "entities": [] - }, - { - "text": "winter is coming", - "intent": "None", - "entities": [] - } - ], - "settings": [] -} diff --git a/generators/generator-botbuilder/generators/app/templates/core/deploymentScripts/webConfigPrep.js b/generators/generator-botbuilder/generators/app/templates/core/deploymentScripts/webConfigPrep.js deleted file mode 100644 index 25191ee0f9..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/deploymentScripts/webConfigPrep.js +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// DO NOT MODIFY THIS CODE -// This script is run as part of the Post Deploy step when -// deploying the bot to Azure. It ensures the Azure Web App -// is configured correctly to host a TypeScript authored bot. -const fs = require('fs'); -const path = require('path'); -const replace = require('replace'); -const WEB_CONFIG_FILE = './web.config'; - -if (fs.existsSync(path.resolve(WEB_CONFIG_FILE))) { - replace({ - regex: "url=\"index.js\"", - replacement: "url=\"lib/index.js\"", - paths: ['./web.config'], - recursive: false, - silent: true, - }) -} diff --git a/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployUseExistResourceGroup/parameters-for-template-AzureBot-with-rg.json b/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployUseExistResourceGroup/parameters-for-template-AzureBot-with-rg.json deleted file mode 100644 index c2c03ef307..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployUseExistResourceGroup/parameters-for-template-AzureBot-with-rg.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "azureBotId": { - "value": "" - }, - "azureBotSku": { - "value": "S1" - }, - "azureBotRegion": { - "value": "global" - }, - "botEndpoint": { - "value": "" - }, - "appType": { - "value": "MultiTenant" - }, - "appId": { - "value": "" - }, - "UMSIName": { - "value": "" - }, - "UMSIResourceGroupName": { - "value": "" - }, - "tenantId": { - "value": "" - } - } -} \ No newline at end of file diff --git a/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployUseExistResourceGroup/parameters-for-template-BotApp-with-rg.json b/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployUseExistResourceGroup/parameters-for-template-BotApp-with-rg.json deleted file mode 100644 index c4b2909008..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployUseExistResourceGroup/parameters-for-template-BotApp-with-rg.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "appServiceName": { - "value": "" - }, - "existingAppServicePlanName": { - "value": "" - }, - "existingAppServicePlanLocation": { - "value": "" - }, - "newAppServicePlanName": { - "value": "" - }, - "newAppServicePlanLocation": { - "value": "" - }, - "newAppServicePlanSku": { - "value": { - "name": "S1", - "tier": "Standard", - "size": "S1", - "family": "S", - "capacity": 1 - } - }, - "appType": { - "value": "MultiTenant" - }, - "appId": { - "value": "" - }, - "appSecret": { - "value": "" - }, - "UMSIName": { - "value": "" - }, - "UMSIResourceGroupName": { - "value": "" - }, - "tenantId": { - "value": "" - } - } -} \ No newline at end of file diff --git a/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployUseExistResourceGroup/readme.md b/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployUseExistResourceGroup/readme.md deleted file mode 100644 index 628f0a9546..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployUseExistResourceGroup/readme.md +++ /dev/null @@ -1,48 +0,0 @@ -# Usage -The BotApp must be deployed prior to AzureBot. - -Command line: -- az login -- az deployment group create --resource-group --template-file --parameters @ - -# parameters-for-template-BotApp-with-rg: - -- **appServiceName**:(required) The Name of the Bot App Service. - -- (choose an existingAppServicePlan or create a new AppServicePlan) - - **existingAppServicePlanName**: The name of the App Service Plan. - - **existingAppServicePlanLocation**: The location of the App Service Plan. - - **newAppServicePlanName**: The name of the App Service Plan. - - **newAppServicePlanLocation**: The location of the App Service Plan. - - **newAppServicePlanSku**: The SKU of the App Service Plan. Defaults to Standard values. - -- **appType**: Type of Bot Authentication. set as MicrosoftAppType in the Web App's Application Settings. **Allowed values are: MultiTenant(default), SingleTenant, UserAssignedMSI.** - -- **appId**:(required) Active Directory App ID or User-Assigned Managed Identity Client ID, set as MicrosoftAppId in the Web App's Application Settings. - -- **appSecret**:(required for MultiTenant and SingleTenant) Active Directory App Password, set as MicrosoftAppPassword in the Web App's Application Settings. - -- **UMSIName**:(required for UserAssignedMSI) The User-Assigned Managed Identity Resource used for the Bot's Authentication. - -- **UMSIResourceGroupName**:(required for UserAssignedMSI) The User-Assigned Managed Identity Resource Group used for the Bot's Authentication. - -- **tenantId**: The Azure AD Tenant ID to use as part of the Bot's Authentication. Only used for SingleTenant and UserAssignedMSI app types. Defaults to . - -MoreInfo: https://docs.microsoft.com/en-us/azure/bot-service/tutorial-provision-a-bot?view=azure-bot-service-4.0&tabs=userassigned%2Cnewgroup#create-an-identity-resource - - - -# parameters-for-template-AzureBot-with-rg: - -- **azureBotId**:(required) The globally unique and immutable bot ID. -- **azureBotSku**: The pricing tier of the Bot Service Registration. **Allowed values are: F0, S1(default)**. -- **azureBotRegion**: Specifies the location of the new AzureBot. **Allowed values are: global(default), westeurope**. -- **botEndpoint**: Use to handle client messages, Such as https://.azurewebsites.net/api/messages. - -- **appType**: Type of Bot Authentication. set as MicrosoftAppType in the Web App's Application Settings. **Allowed values are: MultiTenant(default), SingleTenant, UserAssignedMSI.** -- **appId**:(required) Active Directory App ID or User-Assigned Managed Identity Client ID, set as MicrosoftAppId in the Web App's Application Settings. -- **UMSIName**:(required for UserAssignedMSI) The User-Assigned Managed Identity Resource used for the Bot's Authentication. -- **UMSIResourceGroupName**:(required for UserAssignedMSI) The User-Assigned Managed Identity Resource Group used for the Bot's Authentication. -- **tenantId**: The Azure AD Tenant ID to use as part of the Bot's Authentication. Only used for SingleTenant and UserAssignedMSI app types. Defaults to . - -MoreInfo: https://docs.microsoft.com/en-us/azure/bot-service/tutorial-provision-a-bot?view=azure-bot-service-4.0&tabs=userassigned%2Cnewgroup#create-an-identity-resource \ No newline at end of file diff --git a/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployUseExistResourceGroup/template-AzureBot-with-rg.json b/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployUseExistResourceGroup/template-AzureBot-with-rg.json deleted file mode 100644 index 103ca19e27..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployUseExistResourceGroup/template-AzureBot-with-rg.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "azureBotId": { - "type": "string", - "metadata": { - "description": "The globally unique and immutable bot ID." - } - }, - "azureBotSku": { - "defaultValue": "S1", - "type": "string", - "metadata": { - "description": "The pricing tier of the Bot Service Registration. Allowed values are: F0, S1(default)." - } - }, - "azureBotRegion": { - "type": "string", - "defaultValue": "global", - "metadata": { - "description": "Specifies the location of the new AzureBot. Allowed values are: global(default), westeurope." - } - }, - "botEndpoint": { - "type": "string", - "metadata": { - "description": "Use to handle client messages, Such as https://.azurewebsites.net/api/messages." - } - }, - "appType": { - "type": "string", - "defaultValue": "MultiTenant", - "allowedValues": [ - "MultiTenant", - "SingleTenant", - "UserAssignedMSI" - ], - "metadata": { - "description": "Type of Bot Authentication. set as MicrosoftAppType in the Web App's Application Settings. Allowed values are: MultiTenant, SingleTenant, UserAssignedMSI. Defaults to \"MultiTenant\"." - } - }, - "appId": { - "type": "string", - "metadata": { - "description": "Active Directory App ID or User-Assigned Managed Identity Client ID, set as MicrosoftAppId in the Web App's Application Settings." - } - }, - "UMSIName": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "The User-Assigned Managed Identity Resource used for the Bot's Authentication." - } - }, - "UMSIResourceGroupName": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "The User-Assigned Managed Identity Resource Group used for the Bot's Authentication." - } - }, - "tenantId": { - "type": "string", - "defaultValue": "[subscription().tenantId]", - "metadata": { - "description": "The Azure AD Tenant ID to use as part of the Bot's Authentication. Only used for SingleTenant and UserAssignedMSI app types. Defaults to \"Subscription Tenant ID\"." - } - } - }, - "variables": { - "tenantId": "[if(empty(parameters('tenantId')), subscription().tenantId, parameters('tenantId'))]", - "msiResourceId": "[concat(subscription().id, '/resourceGroups/', parameters('UMSIResourceGroupName'), '/providers/', 'Microsoft.ManagedIdentity/userAssignedIdentities/', parameters('UMSIName'))]", - "appTypeDef": { - "MultiTenant": { - "tenantId": "", - "msiResourceId": "" - }, - "SingleTenant": { - "tenantId": "[variables('tenantId')]", - "msiResourceId": "" - }, - "UserAssignedMSI": { - "tenantId": "[variables('tenantId')]", - "msiResourceId": "[variables('msiResourceId')]" - } - }, - "appType": { - "tenantId": "[variables('appTypeDef')[parameters('appType')].tenantId]", - "msiResourceId": "[variables('appTypeDef')[parameters('appType')].msiResourceId]" - } - }, - "resources": [ - { - "apiVersion": "2021-05-01-preview", - "type": "Microsoft.BotService/botServices", - "name": "[parameters('azureBotId')]", - "location": "[parameters('azureBotRegion')]", - "kind": "azurebot", - "sku": { - "name": "[parameters('azureBotSku')]" - }, - "properties": { - "displayName": "[parameters('azureBotId')]", - "iconUrl": "https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png", - "endpoint": "[parameters('botEndpoint')]", - "msaAppId": "[parameters('appId')]", - "msaAppTenantId": "[variables('appType').tenantId]", - "msaAppMSIResourceId": "[variables('appType').msiResourceId]", - "msaAppType": "[parameters('appType')]", - "luisAppIds": [], - "schemaTransformationVersion": "1.3", - "isCmekEnabled": false, - "isIsolated": false - }, - "dependsOn": [] - } - ] -} \ No newline at end of file diff --git a/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json b/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json deleted file mode 100644 index be94279ecc..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json +++ /dev/null @@ -1,189 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "appServiceName": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "The globally unique name of the Web App." - } - }, - "existingAppServicePlanName": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Name of the existing App Service Plan used to create the Web App for the bot." - } - }, - "existingAppServicePlanLocation": { - "type": "string", - "metadata": { - "description": "The location of the App Service Plan." - } - }, - "newAppServicePlanName": { - "type": "string", - "metadata": { - "description": "The name of the new App Service Plan." - } - }, - "newAppServicePlanLocation": { - "type": "string", - "metadata": { - "description": "The location of the App Service Plan." - } - }, - "newAppServicePlanSku": { - "type": "object", - "defaultValue": { - "name": "S1", - "tier": "Standard", - "size": "S1", - "family": "S", - "capacity": 1 - }, - "metadata": { - "description": "The SKU of the App Service Plan. Defaults to Standard values." - } - }, - "appType": { - "type": "string", - "defaultValue": "MultiTenant", - "allowedValues": [ - "MultiTenant", - "SingleTenant", - "UserAssignedMSI" - ], - "metadata": { - "description": "Type of Bot Authentication. set as MicrosoftAppType in the Web App's Application Settings. Allowed values are: MultiTenant, SingleTenant, UserAssignedMSI. Defaults to \"MultiTenant\"." - } - }, - "appId": { - "type": "string", - "metadata": { - "description": "Active Directory App ID or User-Assigned Managed Identity Client ID, set as MicrosoftAppId in the Web App's Application Settings." - } - }, - "appSecret": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Active Directory App Password, set as MicrosoftAppPassword in the Web App's Application Settings. Required for MultiTenant and SingleTenant app types. Defaults to \"\"." - } - }, - "UMSIName": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "The User-Assigned Managed Identity Resource used for the Bot's Authentication. Defaults to \"\"." - } - }, - "UMSIResourceGroupName": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "The User-Assigned Managed Identity Resource Group used for the Bot's Authentication. Defaults to \"\"." - } - }, - "tenantId": { - "type": "string", - "defaultValue": "[subscription().tenantId]", - "metadata": { - "description": "The Azure AD Tenant ID to use as part of the Bot's Authentication. Only used for SingleTenant and UserAssignedMSI app types. Defaults to \"Subscription Tenant ID\"." - } - } - }, - "variables": { - "tenantId": "[if(empty(parameters('tenantId')), subscription().tenantId, parameters('tenantId'))]", - "defaultAppServicePlanName": "[if(empty(parameters('existingAppServicePlanName')), 'createNewAppServicePlan', parameters('existingAppServicePlanName'))]", - "useExistingServicePlan": "[not(equals(variables('defaultAppServicePlanName'), 'createNewAppServicePlan'))]", - "servicePlanName": "[if(variables('useExistingServicePlan'), parameters('existingAppServicePlanName'), parameters('newAppServicePlanName'))]", - "servicePlanLocation": "[if(variables('useExistingServicePlan'), parameters('existingAppServicePlanLocation'), parameters('newAppServicePlanLocation'))]", - "msiResourceId": "[concat(subscription().id, '/resourceGroups/', parameters('UMSIResourceGroupName'), '/providers/', 'Microsoft.ManagedIdentity/userAssignedIdentities/', parameters('UMSIName'))]", - "appTypeDef": { - "MultiTenant": { - "tenantId": "", - "identity": { "type": "None" } - }, - "SingleTenant": { - "tenantId": "[variables('tenantId')]", - "identity": { "type": "None" } - }, - "UserAssignedMSI": { - "tenantId": "[variables('tenantId')]", - "identity": { - "type": "UserAssigned", - "userAssignedIdentities": { - "[variables('msiResourceId')]": {} - } - } - } - }, - "appType": { - "tenantId": "[variables('appTypeDef')[parameters('appType')].tenantId]", - "identity": "[variables('appTypeDef')[parameters('appType')].identity]" - } - }, - "resources": [ - { - "comments": "Create a new App Service Plan if no existing App Service Plan name was passed in.", - "type": "Microsoft.Web/serverfarms", - "condition": "[not(variables('useExistingServicePlan'))]", - "name": "[variables('servicePlanName')]", - "apiVersion": "2018-02-01", - "location": "[parameters('newAppServicePlanLocation')]", - "sku": "[parameters('newAppServicePlanSku')]", - "properties": { - "name": "[variables('servicePlanName')]" - } - }, - { - "comments": "Create a Web App using an App Service Plan", - "type": "Microsoft.Web/sites", - "apiVersion": "2015-08-01", - "location": "[variables('servicePlanLocation')]", - "kind": "app", - "dependsOn": [ - "[resourceId('Microsoft.Web/serverfarms', variables('servicePlanName'))]" - ], - "name": "[parameters('appServiceName')]", - "identity": "[variables('appType').identity]", - "properties": { - "name": "[parameters('appServiceName')]", - "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('servicePlanName'))]", - "siteConfig": { - "appSettings": [ - { - "name": "WEBSITE_NODE_DEFAULT_VERSION", - "value": "10.14.1" - }, - { - "name": "MicrosoftAppType", - "value": "[parameters('appType')]" - }, - { - "name": "MicrosoftAppId", - "value": "[parameters('appId')]" - }, - { - "name": "MicrosoftAppPassword", - "value": "[parameters('appSecret')]" - }, - { - "name": "MicrosoftAppTenantId", - "value": "[variables('appType').tenantId]" - } - ], - "cors": { - "allowedOrigins": [ - "https://botservice.hosting.portal.azure.net", - "https://hosting.onecloud.azure-test.net/" - ] - }, - "webSocketsEnabled": true - } - } - } - ] -} \ No newline at end of file diff --git a/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployWithNewResourceGroup/parameters-for-template-AzureBot-new-rg.json b/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployWithNewResourceGroup/parameters-for-template-AzureBot-new-rg.json deleted file mode 100644 index 44f169e4d5..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployWithNewResourceGroup/parameters-for-template-AzureBot-new-rg.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "groupName": { - "value": "" - }, - "groupLocation": { - "value": "" - }, - "azureBotId": { - "value": "" - }, - "azureBotSku": { - "value": "S1" - }, - "azureBotRegion": { - "value": "global" - }, - "botEndpoint": { - "value": "" - }, - "appType": { - "value": "MultiTenant" - }, - "appId": { - "value": "" - }, - "UMSIName": { - "value": "" - }, - "UMSIResourceGroupName": { - "value": "" - }, - "tenantId": { - "value": "" - } - } -} \ No newline at end of file diff --git a/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployWithNewResourceGroup/parameters-for-template-BotApp-new-rg.json b/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployWithNewResourceGroup/parameters-for-template-BotApp-new-rg.json deleted file mode 100644 index 8abb03d597..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployWithNewResourceGroup/parameters-for-template-BotApp-new-rg.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "groupName": { - "value": "" - }, - "groupLocation": { - "value": "" - }, - "appServiceName": { - "value": "" - }, - "appServicePlanName": { - "value": "" - }, - "appServicePlanLocation": { - "value": "" - }, - "appServicePlanSku": { - "value": { - "name": "S1", - "tier": "Standard", - "size": "S1", - "family": "S", - "capacity": 1 - } - }, - "appType": { - "value": "MultiTenant" - }, - "appId": { - "value": "" - }, - "appSecret": { - "value": "" - }, - "UMSIName": { - "value": "" - }, - "UMSIResourceGroupName": { - "value": "" - }, - "tenantId": { - "value": "" - } - } -} \ No newline at end of file diff --git a/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployWithNewResourceGroup/readme.md b/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployWithNewResourceGroup/readme.md deleted file mode 100644 index 23bf7a5a51..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployWithNewResourceGroup/readme.md +++ /dev/null @@ -1,45 +0,0 @@ -# Usage -The BotApp must be deployed prior to AzureBot. - -Command line: -- az login -- az deployment sub create --template-file --location --parameters @ - -# parameters-for-template-BotApp-new-rg: - -- **groupName**:(required) Specifies the name of the new Resource Group. -- **groupLocation**:(required) Specifies the location of the new Resource Group. - -- **appServiceName**:(required) The location of the App Service Plan. -- **appServicePlanName**:(required) The name of the App Service Plan. -- **appServicePlanLocation**: The location of the App Service Plan. Defaults to use groupLocation. -- **appServicePlanSku**: The SKU of the App Service Plan. Defaults to Standard values. - -- **appType**: Type of Bot Authentication. set as MicrosoftAppType in the Web App's Application Settings. **Allowed values are: MultiTenant(default), SingleTenant, UserAssignedMSI.** -- **appId**:(required) Active Directory App ID or User-Assigned Managed Identity Client ID, set as MicrosoftAppId in the Web App's Application Settings. -- **appSecret**:(required for MultiTenant and SingleTenant) Active Directory App Password, set as MicrosoftAppPassword in the Web App's Application Settings. -- **UMSIName**:(required for UserAssignedMSI) The User-Assigned Managed Identity Resource used for the Bot's Authentication. -- **UMSIResourceGroupName**:(required for UserAssignedMSI) The User-Assigned Managed Identity Resource Group used for the Bot's Authentication. -- **tenantId**: The Azure AD Tenant ID to use as part of the Bot's Authentication. Only used for SingleTenant and UserAssignedMSI app types. Defaults to . - -MoreInfo: https://docs.microsoft.com/en-us/azure/bot-service/tutorial-provision-a-bot?view=azure-bot-service-4.0&tabs=userassigned%2Cnewgroup#create-an-identity-resource - - - -# parameters-for-template-AzureBot-new-rg: - -- **groupName**:(required) Specifies the name of the new Resource Group. -- **groupLocation**:(required) Specifies the location of the new Resource Group. - -- **azureBotId**:(required) The globally unique and immutable bot ID. Also used to configure the displayName of the bot, which is mutable. -- **azureBotSku**: The pricing tier of the Bot Service Registration. **Allowed values are: F0, S1(default)**. -- **azureBotRegion**: Specifies the location of the new AzureBot. **Allowed values are: global(default), westeurope**. -- **botEndpoint**: Use to handle client messages, Such as https://.azurewebsites.net/api/messages. - -- **appType**: Type of Bot Authentication. set as MicrosoftAppType in the Web App's Application Settings. **Allowed values are: MultiTenant(default), SingleTenant, UserAssignedMSI.** -- **appId**:(required) Active Directory App ID or User-Assigned Managed Identity Client ID, set as MicrosoftAppId in the Web App's Application Settings. -- **UMSIName**:(required for UserAssignedMSI) The User-Assigned Managed Identity Resource used for the Bot's Authentication. -- **UMSIResourceGroupName**:(required for UserAssignedMSI) The User-Assigned Managed Identity Resource Group used for the Bot's Authentication. -- **tenantId**: The Azure AD Tenant ID to use as part of the Bot's Authentication. Only used for SingleTenant and UserAssignedMSI app types. Defaults to . - -MoreInfo: https://docs.microsoft.com/en-us/azure/bot-service/tutorial-provision-a-bot?view=azure-bot-service-4.0&tabs=userassigned%2Cnewgroup#create-an-identity-resource \ No newline at end of file diff --git a/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployWithNewResourceGroup/template-AzureBot-new-rg.json b/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployWithNewResourceGroup/template-AzureBot-new-rg.json deleted file mode 100644 index da68591251..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployWithNewResourceGroup/template-AzureBot-new-rg.json +++ /dev/null @@ -1,157 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "groupName": { - "type": "string", - "metadata": { - "description": "Specifies the name of the Resource Group." - } - }, - "groupLocation": { - "type": "string", - "metadata": { - "description": "Specifies the location of the Resource Group." - } - }, - "azureBotId": { - "type": "string", - "metadata": { - "description": "The globally unique and immutable bot ID." - } - }, - "azureBotSku": { - "type": "string", - "defaultValue": "S1", - "metadata": { - "description": "The pricing tier of the Bot Service Registration. Acceptable values are F0 and S1." - } - }, - "azureBotRegion": { - "type": "string", - "defaultValue": "global", - "metadata": { - "description": "" - } - }, - "botEndpoint": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Use to handle client messages, Such as https://.azurewebsites.net/api/messages." - } - }, - "appType": { - "type": "string", - "defaultValue": "MultiTenant", - "allowedValues": [ - "MultiTenant", - "SingleTenant", - "UserAssignedMSI" - ], - "metadata": { - "description": "Type of Bot Authentication. set as MicrosoftAppType in the Web App's Application Settings. Allowed values are: MultiTenant, SingleTenant, UserAssignedMSI. Defaults to \"MultiTenant\"." - } - }, - "appId": { - "type": "string", - "metadata": { - "description": "Active Directory App ID or User-Assigned Managed Identity Client ID, set as MicrosoftAppId in the Web App's Application Settings." - } - }, - "tenantId": { - "type": "string", - "defaultValue": "[subscription().tenantId]", - "metadata": { - "description": "The Azure AD Tenant ID to use as part of the Bot's Authentication. Only used for SingleTenant and UserAssignedMSI app types. Defaults to \"Subscription Tenant ID\"." - } - }, - "UMSIName": { - "type": "string", - "metadata": { - "description": "The User-Assigned Managed Identity Resource used for the Bot's Authentication." - } - }, - "UMSIResourceGroupName": { - "type": "string", - "metadata": { - "description": "The User-Assigned Managed Identity Resource Group used for the Bot's Authentication." - } - } - }, - "variables": { - "tenantId": "[if(empty(parameters('tenantId')), subscription().tenantId, parameters('tenantId'))]", - "msiResourceId": "[concat(subscription().id, '/resourceGroups/', parameters('UMSIResourceGroupName'), '/providers/', 'Microsoft.ManagedIdentity/userAssignedIdentities/', parameters('UMSIName'))]", - "appTypeDef": { - "MultiTenant": { - "tenantId": "", - "msiResourceId": "" - }, - "SingleTenant": { - "tenantId": "[variables('tenantId')]", - "msiResourceId": "" - }, - "UserAssignedMSI": { - "tenantId": "[variables('tenantId')]", - "msiResourceId": "[variables('msiResourceId')]" - } - }, - "appType": { - "tenantId": "[variables('appTypeDef')[parameters('appType')].tenantId]", - "msiResourceId": "[variables('appTypeDef')[parameters('appType')].msiResourceId]" - } - }, - "resources": [ - { - "name": "[parameters('groupName')]", - "type": "Microsoft.Resources/resourceGroups", - "apiVersion": "2018-05-01", - "location": "[parameters('groupLocation')]", - "properties": {} - }, - { - "type": "Microsoft.Resources/deployments", - "apiVersion": "2018-05-01", - "name": "storageDeployment", - "resourceGroup": "[parameters('groupName')]", - "dependsOn": [ - "[resourceId('Microsoft.Resources/resourceGroups/', parameters('groupName'))]" - ], - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "variables": {}, - "resources": [ - { - "apiVersion": "2021-03-01", - "type": "Microsoft.BotService/botServices", - "name": "[parameters('azureBotId')]", - "location": "[parameters('azureBotRegion')]", - "kind": "azurebot", - "sku": { - "name": "[parameters('azureBotSku')]" - }, - "properties": { - "name": "[parameters('azureBotId')]", - "displayName": "[parameters('azureBotId')]", - "iconUrl": "https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png", - "endpoint": "[parameters('botEndpoint')]", - "msaAppId": "[parameters('appId')]", - "msaAppTenantId": "[variables('appType').tenantId]", - "msaAppMSIResourceId": "[variables('appType').msiResourceId]", - "msaAppType": "[parameters('appType')]", - "luisAppIds": [], - "schemaTransformationVersion": "1.3", - "isCmekEnabled": false, - "isIsolated": false - } - } - ] - } - } - } - ] -} \ No newline at end of file diff --git a/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json b/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json deleted file mode 100644 index ad06507010..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json +++ /dev/null @@ -1,211 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "groupName": { - "type": "string", - "metadata": { - "description": "Specifies the name of the Resource Group." - } - }, - "groupLocation": { - "type": "string", - "metadata": { - "description": "Specifies the location of the Resource Group." - } - }, - "appServiceName": { - "type": "string", - "metadata": { - "description": "The globally unique name of the Web App." - } - }, - "appServicePlanName": { - "type": "string", - "metadata": { - "description": "The name of the App Service Plan." - } - }, - "appServicePlanLocation": { - "type": "string", - "metadata": { - "description": "The location of the App Service Plan." - } - }, - "appServicePlanSku": { - "type": "object", - "defaultValue": { - "name": "S1", - "tier": "Standard", - "size": "S1", - "family": "S", - "capacity": 1 - }, - "metadata": { - "description": "The SKU of the App Service Plan. Defaults to Standard values." - } - }, - "tenantId": { - "type": "string", - "defaultValue": "[subscription().tenantId]", - "metadata": { - "description": "The Azure AD Tenant ID to use as part of the Bot's Authentication. Only used for SingleTenant and UserAssignedMSI app types. Defaults to \"Subscription Tenant ID\"." - } - }, - "appType": { - "type": "string", - "defaultValue": "MultiTenant", - "allowedValues": [ - "MultiTenant", - "SingleTenant", - "UserAssignedMSI" - ], - "metadata": { - "description": "Type of Bot Authentication. set as MicrosoftAppType in the Web App's Application Settings. Allowed values are: MultiTenant, SingleTenant, UserAssignedMSI. Defaults to \"MultiTenant\"." - } - }, - "appId": { - "type": "string", - "metadata": { - "description": "Active Directory App ID or User-Assigned Managed Identity Client ID, set as MicrosoftAppId in the Web App's Application Settings." - } - }, - "appSecret": { - "type": "string", - "metadata": { - "description": "Active Directory App Password, set as MicrosoftAppPassword in the Web App's Application Settings. Required for MultiTenant and SingleTenant app types." - } - }, - "UMSIName": { - "type": "string", - "metadata": { - "description": "The User-Assigned Managed Identity Resource used for the Bot's Authentication." - } - }, - "UMSIResourceGroupName": { - "type": "string", - "metadata": { - "description": "The User-Assigned Managed Identity Resource Group used for the Bot's Authentication." - } - } - }, - "variables": { - "tenantId": "[if(empty(parameters('tenantId')), subscription().tenantId, parameters('tenantId'))]", - "appServicePlanName": "[parameters('appServicePlanName')]", - "resourcesLocation": "[if(empty(parameters('appServicePlanLocation')), parameters('groupLocation'), parameters('appServicePlanLocation'))]", - "appServiceName": "[parameters('appServiceName')]", - "resourceGroupId": "[concat(subscription().id, '/resourceGroups/', parameters('groupName'))]", - "msiResourceId": "[concat(subscription().id, '/resourceGroups/', parameters('UMSIResourceGroupName'), '/providers/', 'Microsoft.ManagedIdentity/userAssignedIdentities/', parameters('UMSIName'))]", - "appTypeDef": { - "MultiTenant": { - "tenantId": "", - "identity": { "type": "None" } - }, - "SingleTenant": { - "tenantId": "[variables('tenantId')]", - "identity": { "type": "None" } - }, - "UserAssignedMSI": { - "tenantId": "[variables('tenantId')]", - "identity": { - "type": "UserAssigned", - "userAssignedIdentities": { - "[variables('msiResourceId')]": {} - } - } - } - }, - "appType": { - "tenantId": "[variables('appTypeDef')[parameters('appType')].tenantId]", - "identity": "[variables('appTypeDef')[parameters('appType')].identity]" - } - }, - "resources": [ - { - "name": "[parameters('groupName')]", - "type": "Microsoft.Resources/resourceGroups", - "apiVersion": "2018-05-01", - "location": "[parameters('groupLocation')]", - "properties": {} - }, - { - "type": "Microsoft.Resources/deployments", - "apiVersion": "2018-05-01", - "name": "storageDeployment", - "resourceGroup": "[parameters('groupName')]", - "dependsOn": [ - "[resourceId('Microsoft.Resources/resourceGroups/', parameters('groupName'))]" - ], - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "variables": {}, - "resources": [ - { - "comments": "Create a new App Service Plan", - "type": "Microsoft.Web/serverfarms", - "name": "[variables('appServicePlanName')]", - "apiVersion": "2018-02-01", - "location": "[variables('resourcesLocation')]", - "sku": "[parameters('appServicePlanSku')]", - "properties": { - "name": "[variables('appServicePlanName')]" - } - }, - { - "comments": "Create a Web App using the new App Service Plan", - "type": "Microsoft.Web/sites", - "apiVersion": "2015-08-01", - "location": "[variables('resourcesLocation')]", - "kind": "app", - "dependsOn": [ - "[concat(variables('resourceGroupId'), '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]" - ], - "name": "[variables('appServiceName')]", - "identity": "[variables('appType').identity]", - "properties": { - "name": "[variables('appServiceName')]", - "serverFarmId": "[variables('appServicePlanName')]", - "siteConfig": { - "appSettings": [ - { - "name": "WEBSITE_NODE_DEFAULT_VERSION", - "value": "10.14.1" - }, - { - "name": "MicrosoftAppType", - "value": "[parameters('appType')]" - }, - { - "name": "MicrosoftAppId", - "value": "[parameters('appId')]" - }, - { - "name": "MicrosoftAppPassword", - "value": "[parameters('appSecret')]" - }, - { - "name": "MicrosoftAppTenantId", - "value": "[variables('appType').tenantId]" - } - ], - "cors": { - "allowedOrigins": [ - "https://botservice.hosting.portal.azure.net", - "https://hosting.onecloud.azure-test.net/" - ] - }, - "webSocketsEnabled": true - } - } - } - ], - "outputs": {} - } - } - } - ] -} \ No newline at end of file diff --git a/generators/generator-botbuilder/generators/app/templates/core/dialogs/bookingDetails.ts b/generators/generator-botbuilder/generators/app/templates/core/dialogs/bookingDetails.ts deleted file mode 100644 index 45259caa9d..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/dialogs/bookingDetails.ts +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -export class BookingDetails { - intent: string; - origin: string; - destination: string; - travelDate: string; -} diff --git a/generators/generator-botbuilder/generators/app/templates/core/dialogs/bookingDialog.js b/generators/generator-botbuilder/generators/app/templates/core/dialogs/bookingDialog.js deleted file mode 100644 index 1933a315f3..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/dialogs/bookingDialog.js +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -const { TimexProperty } = require('@microsoft/recognizers-text-data-types-timex-expression'); -const { InputHints, MessageFactory } = require('botbuilder'); -const { ConfirmPrompt, TextPrompt, WaterfallDialog } = require('botbuilder-dialogs'); -const { CancelAndHelpDialog } = require('./cancelAndHelpDialog'); -const { DateResolverDialog } = require('./dateResolverDialog'); - -const CONFIRM_PROMPT = 'confirmPrompt'; -const DATE_RESOLVER_DIALOG = 'dateResolverDialog'; -const TEXT_PROMPT = 'textPrompt'; -const WATERFALL_DIALOG = 'waterfallDialog'; - -class BookingDialog extends CancelAndHelpDialog { - constructor(id) { - super(id || 'bookingDialog'); - - this.addDialog(new TextPrompt(TEXT_PROMPT)) - .addDialog(new ConfirmPrompt(CONFIRM_PROMPT)) - .addDialog(new DateResolverDialog(DATE_RESOLVER_DIALOG)) - .addDialog(new WaterfallDialog(WATERFALL_DIALOG, [ - this.destinationStep.bind(this), - this.originStep.bind(this), - this.travelDateStep.bind(this), - this.confirmStep.bind(this), - this.finalStep.bind(this) - ])); - - this.initialDialogId = WATERFALL_DIALOG; - } - - /** - * If a destination city has not been provided, prompt for one. - */ - async destinationStep(stepContext) { - const bookingDetails = stepContext.options; - - if (!bookingDetails.destination) { - const messageText = 'To what city would you like to travel?'; - const msg = MessageFactory.text(messageText, messageText, InputHints.ExpectingInput); - return await stepContext.prompt(TEXT_PROMPT, { prompt: msg }); - } - return await stepContext.next(bookingDetails.destination); - } - - /** - * If an origin city has not been provided, prompt for one. - */ - async originStep(stepContext) { - const bookingDetails = stepContext.options; - - // Capture the response to the previous step's prompt - bookingDetails.destination = stepContext.result; - if (!bookingDetails.origin) { - const messageText = 'From what city will you be travelling?'; - const msg = MessageFactory.text(messageText, 'From what city will you be travelling?', InputHints.ExpectingInput); - return await stepContext.prompt(TEXT_PROMPT, { prompt: msg }); - } - return await stepContext.next(bookingDetails.origin); - } - - /** - * If a travel date has not been provided, prompt for one. - * This will use the DATE_RESOLVER_DIALOG. - */ - async travelDateStep(stepContext) { - const bookingDetails = stepContext.options; - - // Capture the results of the previous step - bookingDetails.origin = stepContext.result; - if (!bookingDetails.travelDate || this.isAmbiguous(bookingDetails.travelDate)) { - return await stepContext.beginDialog(DATE_RESOLVER_DIALOG, { date: bookingDetails.travelDate }); - } - return await stepContext.next(bookingDetails.travelDate); - } - - /** - * Confirm the information the user has provided. - */ - async confirmStep(stepContext) { - const bookingDetails = stepContext.options; - - // Capture the results of the previous step - bookingDetails.travelDate = stepContext.result; - const messageText = `Please confirm, I have you traveling to: ${ bookingDetails.destination } from: ${ bookingDetails.origin } on: ${ bookingDetails.travelDate }. Is this correct?`; - const msg = MessageFactory.text(messageText, messageText, InputHints.ExpectingInput); - - // Offer a YES/NO prompt. - return await stepContext.prompt(CONFIRM_PROMPT, { prompt: msg }); - } - - /** - * Complete the interaction and end the dialog. - */ - async finalStep(stepContext) { - if (stepContext.result === true) { - const bookingDetails = stepContext.options; - return await stepContext.endDialog(bookingDetails); - } - return await stepContext.endDialog(); - } - - isAmbiguous(timex) { - const timexPropery = new TimexProperty(timex); - return !timexPropery.types.has('definite'); - } -} - -module.exports.BookingDialog = BookingDialog; diff --git a/generators/generator-botbuilder/generators/app/templates/core/dialogs/bookingDialog.ts b/generators/generator-botbuilder/generators/app/templates/core/dialogs/bookingDialog.ts deleted file mode 100644 index 63510c0e21..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/dialogs/bookingDialog.ts +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -import { TimexProperty } from '@microsoft/recognizers-text-data-types-timex-expression'; -import { InputHints, MessageFactory } from 'botbuilder'; -import { - ConfirmPrompt, - DialogTurnResult, - TextPrompt, - WaterfallDialog, - WaterfallStepContext -} from 'botbuilder-dialogs'; -import { BookingDetails } from './bookingDetails'; -import { CancelAndHelpDialog } from './cancelAndHelpDialog'; -import { DateResolverDialog } from './dateResolverDialog'; - -const CONFIRM_PROMPT = 'confirmPrompt'; -const DATE_RESOLVER_DIALOG = 'dateResolverDialog'; -const TEXT_PROMPT = 'textPrompt'; -const WATERFALL_DIALOG = 'waterfallDialog'; - -export class BookingDialog extends CancelAndHelpDialog { - constructor(id: string) { - super(id || 'bookingDialog'); - - this.addDialog(new TextPrompt(TEXT_PROMPT)) - .addDialog(new ConfirmPrompt(CONFIRM_PROMPT)) - .addDialog(new DateResolverDialog(DATE_RESOLVER_DIALOG)) - .addDialog(new WaterfallDialog(WATERFALL_DIALOG, [ - this.destinationStep.bind(this), - this.originStep.bind(this), - this.travelDateStep.bind(this), - this.confirmStep.bind(this), - this.finalStep.bind(this) - ])); - - this.initialDialogId = WATERFALL_DIALOG; - } - - /** - * If a destination city has not been provided, prompt for one. - */ - private async destinationStep(stepContext: WaterfallStepContext): Promise { - const bookingDetails = stepContext.options as BookingDetails; - - if (!bookingDetails.destination) { - const messageText = 'To what city would you like to travel?'; - const msg = MessageFactory.text(messageText, messageText, InputHints.ExpectingInput); - return await stepContext.prompt(TEXT_PROMPT, { prompt: msg }); - } else { - return await stepContext.next(bookingDetails.destination); - } - } - - /** - * If an origin city has not been provided, prompt for one. - */ - private async originStep(stepContext: WaterfallStepContext): Promise { - const bookingDetails = stepContext.options as BookingDetails; - - // Capture the response to the previous step's prompt - bookingDetails.destination = stepContext.result; - if (!bookingDetails.origin) { - const messageText = 'From what city will you be travelling?'; - const msg = MessageFactory.text(messageText, messageText, InputHints.ExpectingInput); - return await stepContext.prompt(TEXT_PROMPT, { prompt: msg }); - } else { - return await stepContext.next(bookingDetails.origin); - } - } - - /** - * If a travel date has not been provided, prompt for one. - * This will use the DATE_RESOLVER_DIALOG. - */ - private async travelDateStep(stepContext: WaterfallStepContext): Promise { - const bookingDetails = stepContext.options as BookingDetails; - - // Capture the results of the previous step - bookingDetails.origin = stepContext.result; - if (!bookingDetails.travelDate || this.isAmbiguous(bookingDetails.travelDate)) { - return await stepContext.beginDialog(DATE_RESOLVER_DIALOG, { date: bookingDetails.travelDate }); - } else { - return await stepContext.next(bookingDetails.travelDate); - } - } - - /** - * Confirm the information the user has provided. - */ - private async confirmStep(stepContext: WaterfallStepContext): Promise { - const bookingDetails = stepContext.options as BookingDetails; - - // Capture the results of the previous step - bookingDetails.travelDate = stepContext.result; - const messageText = `Please confirm, I have you traveling to: ${ bookingDetails.destination } from: ${ bookingDetails.origin } on: ${ bookingDetails.travelDate }. Is this correct?`; - const msg = MessageFactory.text(messageText, messageText, InputHints.ExpectingInput); - - // Offer a YES/NO prompt. - return await stepContext.prompt(CONFIRM_PROMPT, { prompt: msg }); - } - - /** - * Complete the interaction and end the dialog. - */ - private async finalStep(stepContext: WaterfallStepContext): Promise { - if (stepContext.result === true) { - const bookingDetails = stepContext.options as BookingDetails; - - return await stepContext.endDialog(bookingDetails); - } - return await stepContext.endDialog(); - } - - private isAmbiguous(timex: string): boolean { - const timexPropery = new TimexProperty(timex); - return !timexPropery.types.has('definite'); - } -} diff --git a/generators/generator-botbuilder/generators/app/templates/core/dialogs/cancelAndHelpDialog.js b/generators/generator-botbuilder/generators/app/templates/core/dialogs/cancelAndHelpDialog.js deleted file mode 100644 index b6bcf29877..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/dialogs/cancelAndHelpDialog.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -const { InputHints } = require('botbuilder'); -const { ComponentDialog, DialogTurnStatus } = require('botbuilder-dialogs'); - -/** - * This base class watches for common phrases like "help" and "cancel" and takes action on them - * BEFORE they reach the normal bot logic. - */ -class CancelAndHelpDialog extends ComponentDialog { - async onContinueDialog(innerDc) { - const result = await this.interrupt(innerDc); - if (result) { - return result; - } - return await super.onContinueDialog(innerDc); - } - - async interrupt(innerDc) { - if (innerDc.context.activity.text) { - const text = innerDc.context.activity.text.toLowerCase(); - - switch (text) { - case 'help': - case '?': { - const helpMessageText = 'Show help here'; - await innerDc.context.sendActivity(helpMessageText, helpMessageText, InputHints.ExpectingInput); - return { status: DialogTurnStatus.waiting }; - } - case 'cancel': - case 'quit': { - const cancelMessageText = 'Cancelling...'; - await innerDc.context.sendActivity(cancelMessageText, cancelMessageText, InputHints.IgnoringInput); - return await innerDc.cancelAllDialogs(); - } - } - } - } -} - -module.exports.CancelAndHelpDialog = CancelAndHelpDialog; diff --git a/generators/generator-botbuilder/generators/app/templates/core/dialogs/cancelAndHelpDialog.ts b/generators/generator-botbuilder/generators/app/templates/core/dialogs/cancelAndHelpDialog.ts deleted file mode 100644 index ed590f6749..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/dialogs/cancelAndHelpDialog.ts +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -import { InputHints } from 'botbuilder'; -import { ComponentDialog, DialogContext, DialogTurnResult, DialogTurnStatus } from 'botbuilder-dialogs'; - -/** - * This base class watches for common phrases like "help" and "cancel" and takes action on them - * BEFORE they reach the normal bot logic. - */ -export class CancelAndHelpDialog extends ComponentDialog { - constructor(id: string) { - super(id); - } - - async onContinueDialog(innerDc: DialogContext): Promise { - const result = await this.interrupt(innerDc); - if (result) { - return result; - } - return await super.onContinueDialog(innerDc); - } - - private async interrupt(innerDc: DialogContext): Promise { - if (innerDc.context.activity.text) { - const text = innerDc.context.activity.text.toLowerCase(); - - switch (text) { - case 'help': - case '?': - const helpMessageText = 'Show help here'; - await innerDc.context.sendActivity(helpMessageText, helpMessageText, InputHints.ExpectingInput); - return { status: DialogTurnStatus.waiting }; - case 'cancel': - case 'quit': - const cancelMessageText = 'Cancelling...'; - await innerDc.context.sendActivity(cancelMessageText, cancelMessageText, InputHints.IgnoringInput); - return await innerDc.cancelAllDialogs(); - } - } - } -} diff --git a/generators/generator-botbuilder/generators/app/templates/core/dialogs/dateResolverDialog.js b/generators/generator-botbuilder/generators/app/templates/core/dialogs/dateResolverDialog.js deleted file mode 100644 index 1779c6cb07..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/dialogs/dateResolverDialog.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -const { InputHints, MessageFactory } = require('botbuilder'); -const { DateTimePrompt, WaterfallDialog } = require('botbuilder-dialogs'); -const { CancelAndHelpDialog } = require('./cancelAndHelpDialog'); -const { TimexProperty } = require('@microsoft/recognizers-text-data-types-timex-expression'); - -const DATETIME_PROMPT = 'datetimePrompt'; -const WATERFALL_DIALOG = 'waterfallDialog'; - -class DateResolverDialog extends CancelAndHelpDialog { - constructor(id) { - super(id || 'dateResolverDialog'); - this.addDialog(new DateTimePrompt(DATETIME_PROMPT, this.dateTimePromptValidator.bind(this))) - .addDialog(new WaterfallDialog(WATERFALL_DIALOG, [ - this.initialStep.bind(this), - this.finalStep.bind(this) - ])); - - this.initialDialogId = WATERFALL_DIALOG; - } - - async initialStep(stepContext) { - const timex = stepContext.options.date; - - const promptMessageText = 'On what date would you like to travel?'; - const promptMessage = MessageFactory.text(promptMessageText, promptMessageText, InputHints.ExpectingInput); - - const repromptMessageText = "I'm sorry, for best results, please enter your travel date including the month, day and year."; - const repromptMessage = MessageFactory.text(repromptMessageText, repromptMessageText, InputHints.ExpectingInput); - - if (!timex) { - // We were not given any date at all so prompt the user. - return await stepContext.prompt(DATETIME_PROMPT, - { - prompt: promptMessage, - retryPrompt: repromptMessage - }); - } - // We have a Date we just need to check it is unambiguous. - const timexProperty = new TimexProperty(timex); - if (!timexProperty.types.has('definite')) { - // This is essentially a "reprompt" of the data we were given up front. - return await stepContext.prompt(DATETIME_PROMPT, { prompt: repromptMessage }); - } - return await stepContext.next([{ timex: timex }]); - } - - async finalStep(stepContext) { - const timex = stepContext.result[0].timex; - return await stepContext.endDialog(timex); - } - - async dateTimePromptValidator(promptContext) { - if (promptContext.recognized.succeeded) { - // This value will be a TIMEX. And we are only interested in a Date so grab the first result and drop the Time part. - // TIMEX is a format that represents DateTime expressions that include some ambiguity. e.g. missing a Year. - const timex = promptContext.recognized.value[0].timex.split('T')[0]; - - // If this is a definite Date including year, month and day we are good otherwise reprompt. - // A better solution might be to let the user know what part is actually missing. - return new TimexProperty(timex).types.has('definite'); - } - return false; - } -} - -module.exports.DateResolverDialog = DateResolverDialog; diff --git a/generators/generator-botbuilder/generators/app/templates/core/dialogs/dateResolverDialog.ts b/generators/generator-botbuilder/generators/app/templates/core/dialogs/dateResolverDialog.ts deleted file mode 100644 index 447526281d..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/dialogs/dateResolverDialog.ts +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -import { TimexProperty } from '@microsoft/recognizers-text-data-types-timex-expression'; -import { InputHints, MessageFactory } from 'botbuilder'; -import { DateTimePrompt, DateTimeResolution, DialogTurnResult, PromptValidatorContext, WaterfallDialog, WaterfallStepContext } from 'botbuilder-dialogs'; -import { CancelAndHelpDialog } from './cancelAndHelpDialog'; - -const DATETIME_PROMPT = 'datetimePrompt'; -const WATERFALL_DIALOG = 'waterfallDialog'; - -export class DateResolverDialog extends CancelAndHelpDialog { - - private static async dateTimePromptValidator(promptContext: PromptValidatorContext): Promise { - if (promptContext.recognized.succeeded) { - // This value will be a TIMEX. And we are only interested in a Date so grab the first result and drop the Time part. - // TIMEX is a format that represents DateTime expressions that include some ambiguity. e.g. missing a Year. - const timex = promptContext.recognized.value[0].timex.split('T')[0]; - - // If this is a definite Date including year, month and day we are good otherwise reprompt. - // A better solution might be to let the user know what part is actually missing. - return new TimexProperty(timex).types.has('definite'); - } - return false; - } - - constructor(id: string) { - super(id || 'dateResolverDialog'); - this.addDialog(new DateTimePrompt(DATETIME_PROMPT, DateResolverDialog.dateTimePromptValidator.bind(this))) - .addDialog(new WaterfallDialog(WATERFALL_DIALOG, [ - this.initialStep.bind(this), - this.finalStep.bind(this) - ])); - - this.initialDialogId = WATERFALL_DIALOG; - } - - private async initialStep(stepContext: WaterfallStepContext): Promise { - const timex = (stepContext.options as any).date; - - const promptMessageText = 'On what date would you like to travel?'; - const promptMessage = MessageFactory.text(promptMessageText, promptMessageText, InputHints.ExpectingInput); - - const repromptMessageText = 'I\'m sorry, for best results, please enter your travel date including the month, day and year.'; - const repromptMessage = MessageFactory.text(repromptMessageText, repromptMessageText, InputHints.ExpectingInput); - - if (!timex) { - // We were not given any date at all so prompt the user. - return await stepContext.prompt(DATETIME_PROMPT, - { - prompt: promptMessage, - retryPrompt: repromptMessage - }); - } - // We have a Date we just need to check it is unambiguous. - const timexProperty = new TimexProperty(timex); - if (!timexProperty.types.has('definite')) { - // This is essentially a "reprompt" of the data we were given up front. - return await stepContext.prompt(DATETIME_PROMPT, { prompt: repromptMessage }); - } - return await stepContext.next([{ timex }]); - } - - private async finalStep(stepContext: WaterfallStepContext): Promise { - const timex = stepContext.result[0].timex; - return await stepContext.endDialog(timex); - } -} diff --git a/generators/generator-botbuilder/generators/app/templates/core/dialogs/flightBookingRecognizer.js b/generators/generator-botbuilder/generators/app/templates/core/dialogs/flightBookingRecognizer.js deleted file mode 100644 index 10c69a952b..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/dialogs/flightBookingRecognizer.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -const { LuisRecognizer } = require('botbuilder-ai'); - -class FlightBookingRecognizer { - constructor(config) { - const luisIsConfigured = config && config.applicationId && config.endpointKey && config.endpoint; - if (luisIsConfigured) { - // Set the recognizer options depending on which endpoint version you want to use e.g v2 or v3. - // More details can be found in https://docs.microsoft.com/en-gb/azure/cognitive-services/luis/luis-migration-api-v3 - const recognizerOptions = { - apiVersion: 'v3' - }; - - this.recognizer = new LuisRecognizer(config, recognizerOptions); - } - } - - get isConfigured() { - return (this.recognizer !== undefined); - } - - /** - * Returns an object with preformatted LUIS results for the bot's dialogs to consume. - * @param {TurnContext} context - */ - async executeLuisQuery(context) { - return await this.recognizer.recognize(context); - } - - getFromEntities(result) { - let fromValue, fromAirportValue; - if (result.entities.$instance.From) { - fromValue = result.entities.$instance.From[0].text; - } - if (fromValue && result.entities.From[0].Airport) { - fromAirportValue = result.entities.From[0].Airport[0][0]; - } - - return { from: fromValue, airport: fromAirportValue }; - } - - getToEntities(result) { - let toValue, toAirportValue; - if (result.entities.$instance.To) { - toValue = result.entities.$instance.To[0].text; - } - if (toValue && result.entities.To[0].Airport) { - toAirportValue = result.entities.To[0].Airport[0][0]; - } - - return { to: toValue, airport: toAirportValue }; - } - - /** - * This value will be a TIMEX. And we are only interested in a Date so grab the first result and drop the Time part. - * TIMEX is a format that represents DateTime expressions that include some ambiguity. e.g. missing a Year. - */ - getTravelDate(result) { - const datetimeEntity = result.entities.datetime; - if (!datetimeEntity || !datetimeEntity[0]) return undefined; - - const timex = datetimeEntity[0].timex; - if (!timex || !timex[0]) return undefined; - - const datetime = timex[0].split('T')[0]; - return datetime; - } -} - -module.exports.FlightBookingRecognizer = FlightBookingRecognizer; diff --git a/generators/generator-botbuilder/generators/app/templates/core/dialogs/flightBookingRecognizer.ts b/generators/generator-botbuilder/generators/app/templates/core/dialogs/flightBookingRecognizer.ts deleted file mode 100644 index d92b66d2cb..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/dialogs/flightBookingRecognizer.ts +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -import { RecognizerResult, TurnContext } from 'botbuilder'; -import { LuisApplication, LuisRecognizer, LuisRecognizerOptionsV3 } from 'botbuilder-ai'; - -export class FlightBookingRecognizer { - private recognizer: LuisRecognizer; - - constructor(config: LuisApplication) { - const luisIsConfigured = config && config.applicationId && config.endpoint && config.endpointKey; - if (luisIsConfigured) { - // Set the recognizer options depending on which endpoint version you want to use e.g LuisRecognizerOptionsV2 or LuisRecognizerOptionsV3. - // More details can be found in https://docs.microsoft.com/en-gb/azure/cognitive-services/luis/luis-migration-api-v3 - const recognizerOptions: LuisRecognizerOptionsV3 = { - apiVersion : 'v3' - }; - - this.recognizer = new LuisRecognizer(config, recognizerOptions); - } - } - - get isConfigured(): boolean { - return (this.recognizer !== undefined); - } - - /** - * Returns an object with preformatted LUIS results for the bot's dialogs to consume. - * @param {TurnContext} context - */ - async executeLuisQuery(context: TurnContext): Promise { - return this.recognizer.recognize(context); - } - - getFromEntities(result) { - let fromValue, fromAirportValue; - if (result.entities.$instance.From) { - fromValue = result.entities.$instance.From[0].text; - } - if (fromValue && result.entities.From[0].Airport) { - fromAirportValue = result.entities.From[0].Airport[0][0]; - } - - return { from: fromValue, airport: fromAirportValue }; - } - - getToEntities(result) { - let toValue, toAirportValue; - if (result.entities.$instance.To) { - toValue = result.entities.$instance.To[0].text; - } - if (toValue && result.entities.To[0].Airport) { - toAirportValue = result.entities.To[0].Airport[0][0]; - } - - return { to: toValue, airport: toAirportValue }; - } - - /** - * This value will be a TIMEX. And we are only interested in a Date so grab the first result and drop the Time part. - * TIMEX is a format that represents DateTime expressions that include some ambiguity. e.g. missing a Year. - */ - getTravelDate(result) { - const datetimeEntity = result.entities.datetime; - if (!datetimeEntity || !datetimeEntity[0]) return undefined; - - const timex = datetimeEntity[0].timex; - if (!timex || !timex[0]) return undefined; - - const datetime = timex[0].split('T')[0]; - return datetime; - } -} diff --git a/generators/generator-botbuilder/generators/app/templates/core/dialogs/mainDialog.js b/generators/generator-botbuilder/generators/app/templates/core/dialogs/mainDialog.js deleted file mode 100644 index 2dc5697587..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/dialogs/mainDialog.js +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -const { TimexProperty } = require('@microsoft/recognizers-text-data-types-timex-expression'); -const { MessageFactory, InputHints } = require('botbuilder'); -const { LuisRecognizer } = require('botbuilder-ai'); -const { ComponentDialog, DialogSet, DialogTurnStatus, TextPrompt, WaterfallDialog } = require('botbuilder-dialogs'); - -const MAIN_WATERFALL_DIALOG = 'mainWaterfallDialog'; - -class MainDialog extends ComponentDialog { - constructor(luisRecognizer, bookingDialog) { - super('MainDialog'); - - if (!luisRecognizer) throw new Error('[MainDialog]: Missing parameter \'luisRecognizer\' is required'); - this.luisRecognizer = luisRecognizer; - - if (!bookingDialog) throw new Error('[MainDialog]: Missing parameter \'bookingDialog\' is required'); - - // Define the main dialog and its related components. - // This is a sample "book a flight" dialog. - this.addDialog(new TextPrompt('TextPrompt')) - .addDialog(bookingDialog) - .addDialog(new WaterfallDialog(MAIN_WATERFALL_DIALOG, [ - this.introStep.bind(this), - this.actStep.bind(this), - this.finalStep.bind(this) - ])); - - this.initialDialogId = MAIN_WATERFALL_DIALOG; - } - - /** - * The run method handles the incoming activity (in the form of a TurnContext) and passes it through the dialog system. - * If no dialog is active, it will start the default dialog. - * @param {*} turnContext - * @param {*} accessor - */ - async run(turnContext, accessor) { - const dialogSet = new DialogSet(accessor); - dialogSet.add(this); - - const dialogContext = await dialogSet.createContext(turnContext); - const results = await dialogContext.continueDialog(); - if (results.status === DialogTurnStatus.empty) { - await dialogContext.beginDialog(this.id); - } - } - - /** - * First step in the waterfall dialog. Prompts the user for a command. - * Currently, this expects a booking request, like "book me a flight from Paris to Berlin on march 22" - * Note that the sample LUIS model will only recognize Paris, Berlin, New York and London as airport cities. - */ - async introStep(stepContext) { - if (!this.luisRecognizer.isConfigured) { - const messageText = 'NOTE: LUIS is not configured. To enable all capabilities, add `LuisAppId`, `LuisAPIKey` and `LuisAPIHostName` to the .env file.'; - await stepContext.context.sendActivity(messageText, null, InputHints.IgnoringInput); - return await stepContext.next(); - } - - const messageText = stepContext.options.restartMsg ? stepContext.options.restartMsg : 'What can I help you with today?\nSay something like "Book a flight from Paris to Berlin on March 22, 2020"'; - const promptMessage = MessageFactory.text(messageText, messageText, InputHints.ExpectingInput); - return await stepContext.prompt('TextPrompt', { prompt: promptMessage }); - } - - /** - * Second step in the waterfall. This will use LUIS to attempt to extract the origin, destination and travel dates. - * Then, it hands off to the bookingDialog child dialog to collect any remaining details. - */ - async actStep(stepContext) { - const bookingDetails = {}; - - if (!this.luisRecognizer.isConfigured) { - // LUIS is not configured, we just run the BookingDialog path. - return await stepContext.beginDialog('bookingDialog', bookingDetails); - } - - // Call LUIS and gather any potential booking details. (Note the TurnContext has the response to the prompt) - const luisResult = await this.luisRecognizer.executeLuisQuery(stepContext.context); - switch (LuisRecognizer.topIntent(luisResult)) { - case 'BookFlight': { - // Extract the values for the composite entities from the LUIS result. - const fromEntities = this.luisRecognizer.getFromEntities(luisResult); - const toEntities = this.luisRecognizer.getToEntities(luisResult); - - // Show a warning for Origin and Destination if we can't resolve them. - await this.showWarningForUnsupportedCities(stepContext.context, fromEntities, toEntities); - - // Initialize BookingDetails with any entities we may have found in the response. - bookingDetails.destination = toEntities.airport; - bookingDetails.origin = fromEntities.airport; - bookingDetails.travelDate = this.luisRecognizer.getTravelDate(luisResult); - console.log('LUIS extracted these booking details:', JSON.stringify(bookingDetails)); - - // Run the BookingDialog passing in whatever details we have from the LUIS call, it will fill out the remainder. - return await stepContext.beginDialog('bookingDialog', bookingDetails); - } - - case 'GetWeather': { - // We haven't implemented the GetWeatherDialog so we just display a TODO message. - const getWeatherMessageText = 'TODO: get weather flow here'; - await stepContext.context.sendActivity(getWeatherMessageText, getWeatherMessageText, InputHints.IgnoringInput); - break; - } - - default: { - // Catch all for unhandled intents - const didntUnderstandMessageText = `Sorry, I didn't get that. Please try asking in a different way (intent was ${ LuisRecognizer.topIntent(luisResult) })`; - await stepContext.context.sendActivity(didntUnderstandMessageText, didntUnderstandMessageText, InputHints.IgnoringInput); - } - } - - return await stepContext.next(); - } - - /** - * Shows a warning if the requested From or To cities are recognized as entities but they are not in the Airport entity list. - * In some cases LUIS will recognize the From and To composite entities as a valid cities but the From and To Airport values - * will be empty if those entity values can't be mapped to a canonical item in the Airport. - */ - async showWarningForUnsupportedCities(context, fromEntities, toEntities) { - const unsupportedCities = []; - if (fromEntities.from && !fromEntities.airport) { - unsupportedCities.push(fromEntities.from); - } - - if (toEntities.to && !toEntities.airport) { - unsupportedCities.push(toEntities.to); - } - - if (unsupportedCities.length) { - const messageText = `Sorry but the following airports are not supported: ${ unsupportedCities.join(', ') }`; - await context.sendActivity(messageText, messageText, InputHints.IgnoringInput); - } - } - - /** - * This is the final step in the main waterfall dialog. - * It wraps up the sample "book a flight" interaction with a simple confirmation. - */ - async finalStep(stepContext) { - // If the child dialog ("bookingDialog") was cancelled or the user failed to confirm, the Result here will be null. - if (stepContext.result) { - const result = stepContext.result; - // Now we have all the booking details. - - // This is where calls to the booking AOU service or database would go. - - // If the call to the booking service was successful tell the user. - const timeProperty = new TimexProperty(result.travelDate); - const travelDateMsg = timeProperty.toNaturalLanguage(new Date(Date.now())); - const msg = `I have you booked to ${ result.destination } from ${ result.origin } on ${ travelDateMsg }.`; - await stepContext.context.sendActivity(msg, msg, InputHints.IgnoringInput); - } - - // Restart the main dialog with a different message the second time around - return await stepContext.replaceDialog(this.initialDialogId, { restartMsg: 'What else can I do for you?' }); - } -} - -module.exports.MainDialog = MainDialog; diff --git a/generators/generator-botbuilder/generators/app/templates/core/dialogs/mainDialog.ts b/generators/generator-botbuilder/generators/app/templates/core/dialogs/mainDialog.ts deleted file mode 100644 index a1913b9235..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/dialogs/mainDialog.ts +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -import { TimexProperty } from '@microsoft/recognizers-text-data-types-timex-expression'; -import { BookingDetails } from './bookingDetails'; - -import { InputHints, MessageFactory, StatePropertyAccessor, TurnContext } from 'botbuilder'; -import { LuisRecognizer } from 'botbuilder-ai'; - -import { - ComponentDialog, - DialogSet, - DialogState, - DialogTurnResult, - DialogTurnStatus, - TextPrompt, - WaterfallDialog, - WaterfallStepContext -} from 'botbuilder-dialogs'; -import { BookingDialog } from './bookingDialog'; -import { FlightBookingRecognizer } from './flightBookingRecognizer'; - -const MAIN_WATERFALL_DIALOG = 'mainWaterfallDialog'; - -export class MainDialog extends ComponentDialog { - private luisRecognizer: FlightBookingRecognizer; - - constructor(luisRecognizer: FlightBookingRecognizer, bookingDialog: BookingDialog) { - super('MainDialog'); - - if (!luisRecognizer) throw new Error('[MainDialog]: Missing parameter \'luisRecognizer\' is required'); - this.luisRecognizer = luisRecognizer; - - if (!bookingDialog) throw new Error('[MainDialog]: Missing parameter \'bookingDialog\' is required'); - - // Define the main dialog and its related components. - // This is a sample "book a flight" dialog. - this.addDialog(new TextPrompt('TextPrompt')) - .addDialog(bookingDialog) - .addDialog(new WaterfallDialog(MAIN_WATERFALL_DIALOG, [ - this.introStep.bind(this), - this.actStep.bind(this), - this.finalStep.bind(this) - ])); - - this.initialDialogId = MAIN_WATERFALL_DIALOG; - } - - /** - * The run method handles the incoming activity (in the form of a DialogContext) and passes it through the dialog system. - * If no dialog is active, it will start the default dialog. - * @param {TurnContext} context - */ - async run(context: TurnContext, accessor: StatePropertyAccessor) { - const dialogSet = new DialogSet(accessor); - dialogSet.add(this); - - const dialogContext = await dialogSet.createContext(context); - const results = await dialogContext.continueDialog(); - if (results.status === DialogTurnStatus.empty) { - await dialogContext.beginDialog(this.id); - } - } - - /** - * First step in the waterfall dialog. Prompts the user for a command. - * Currently, this expects a booking request, like "book me a flight from Paris to Berlin on march 22" - * Note that the sample LUIS model will only recognize Paris, Berlin, New York and London as airport cities. - */ - private async introStep(stepContext: WaterfallStepContext): Promise { - if (!this.luisRecognizer.isConfigured) { - const luisConfigMsg = 'NOTE: LUIS is not configured. To enable all capabilities, add `LuisAppId`, `LuisAPIKey` and `LuisAPIHostName` to the .env file.'; - await stepContext.context.sendActivity(luisConfigMsg, null, InputHints.IgnoringInput); - return await stepContext.next(); - } - - const messageText = (stepContext.options as any).restartMsg ? (stepContext.options as any).restartMsg : 'What can I help you with today?\nSay something like "Book a flight from Paris to Berlin on March 22, 2020"'; - const promptMessage = MessageFactory.text(messageText, messageText, InputHints.ExpectingInput); - return await stepContext.prompt('TextPrompt', { prompt: promptMessage }); - } - - /** - * Second step in the waterall. This will use LUIS to attempt to extract the origin, destination and travel dates. - * Then, it hands off to the bookingDialog child dialog to collect any remaining details. - */ - private async actStep(stepContext: WaterfallStepContext): Promise { - const bookingDetails = new BookingDetails(); - - if (!this.luisRecognizer.isConfigured) { - // LUIS is not configured, we just run the BookingDialog path. - return await stepContext.beginDialog('bookingDialog', bookingDetails); - } - - // Call LUIS and gather any potential booking details. (Note the TurnContext has the response to the prompt) - const luisResult = await this.luisRecognizer.executeLuisQuery(stepContext.context); - switch (LuisRecognizer.topIntent(luisResult)) { - case 'BookFlight': - // Extract the values for the composite entities from the LUIS result. - const fromEntities = this.luisRecognizer.getFromEntities(luisResult); - const toEntities = this.luisRecognizer.getToEntities(luisResult); - - // Show a warning for Origin and Destination if we can't resolve them. - await this.showWarningForUnsupportedCities(stepContext.context, fromEntities, toEntities); - - // Initialize BookingDetails with any entities we may have found in the response. - bookingDetails.destination = toEntities.airport; - bookingDetails.origin = fromEntities.airport; - bookingDetails.travelDate = this.luisRecognizer.getTravelDate(luisResult); - console.log('LUIS extracted these booking details:', JSON.stringify(bookingDetails)); - - // Run the BookingDialog passing in whatever details we have from the LUIS call, it will fill out the remainder. - return await stepContext.beginDialog('bookingDialog', bookingDetails); - - case 'GetWeather': - // We haven't implemented the GetWeatherDialog so we just display a TODO message. - const getWeatherMessageText = 'TODO: get weather flow here'; - await stepContext.context.sendActivity(getWeatherMessageText, getWeatherMessageText, InputHints.IgnoringInput); - break; - - default: - // Catch all for unhandled intents - const didntUnderstandMessageText = `Sorry, I didn't get that. Please try asking in a different way (intent was ${ LuisRecognizer.topIntent(luisResult) })`; - await stepContext.context.sendActivity(didntUnderstandMessageText, didntUnderstandMessageText, InputHints.IgnoringInput); - } - - return await stepContext.next(); - } - - /** - * Shows a warning if the requested From or To cities are recognized as entities but they are not in the Airport entity list. - * In some cases LUIS will recognize the From and To composite entities as a valid cities but the From and To Airport values - * will be empty if those entity values can't be mapped to a canonical item in the Airport. - */ - private async showWarningForUnsupportedCities(context, fromEntities, toEntities) { - const unsupportedCities = []; - if (fromEntities.from && !fromEntities.airport) { - unsupportedCities.push(fromEntities.from); - } - - if (toEntities.to && !toEntities.airport) { - unsupportedCities.push(toEntities.to); - } - - if (unsupportedCities.length) { - const messageText = `Sorry but the following airports are not supported: ${ unsupportedCities.join(', ') }`; - await context.sendActivity(messageText, messageText, InputHints.IgnoringInput); - } - } - - /** - * This is the final step in the main waterfall dialog. - * It wraps up the sample "book a flight" interaction with a simple confirmation. - */ - private async finalStep(stepContext: WaterfallStepContext): Promise { - // If the child dialog ("bookingDialog") was cancelled or the user failed to confirm, the Result here will be null. - if (stepContext.result) { - const result = stepContext.result as BookingDetails; - // Now we have all the booking details. - - // This is where calls to the booking AOU service or database would go. - - // If the call to the booking service was successful tell the user. - const timeProperty = new TimexProperty(result.travelDate); - const travelDateMsg = timeProperty.toNaturalLanguage(new Date(Date.now())); - const msg = `I have you booked to ${ result.destination } from ${ result.origin } on ${ travelDateMsg }.`; - await stepContext.context.sendActivity(msg); - } - - // Restart the main dialog waterfall with a different message the second time around - return await stepContext.replaceDialog(this.initialDialogId, { restartMsg: 'What else can I do for you?' }); - } -} diff --git a/generators/generator-botbuilder/generators/app/templates/core/index.js b/generators/generator-botbuilder/generators/app/templates/core/index.js deleted file mode 100644 index f98bd26d85..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/index.js +++ /dev/null @@ -1,120 +0,0 @@ -// index.js is used to setup and configure your bot - -// Import required packages -const path = require('path'); - -// Note: Ensure you have a .env file and include LuisAppId, LuisAPIKey and LuisAPIHostName. -const ENV_FILE = path.join(__dirname, '.env'); -require('dotenv').config({ path: ENV_FILE }); - -const restify = require('restify'); - -// Import required bot services. -// See https://aka.ms/bot-services to learn more about the different parts of a bot. -const { - CloudAdapter, - ConfigurationServiceClientCredentialFactory, - ConversationState, - createBotFrameworkAuthenticationFromConfiguration, - InputHints, - MemoryStorage, - UserState -} = require('botbuilder'); - -const { FlightBookingRecognizer } = require('./dialogs/flightBookingRecognizer'); - -// This bot's main dialog. -const { DialogAndWelcomeBot } = require('./bots/dialogAndWelcomeBot'); -const { MainDialog } = require('./dialogs/mainDialog'); - -// the bot's booking dialog -const { BookingDialog } = require('./dialogs/bookingDialog'); -const BOOKING_DIALOG = 'bookingDialog'; - -const credentialsFactory = new ConfigurationServiceClientCredentialFactory({ - MicrosoftAppId: process.env.MicrosoftAppId, - MicrosoftAppPassword: process.env.MicrosoftAppPassword, - MicrosoftAppType: process.env.MicrosoftAppType, - MicrosoftAppTenantId: process.env.MicrosoftAppTenantId -}); - -const botFrameworkAuthentication = createBotFrameworkAuthenticationFromConfiguration(null, credentialsFactory); - -// Create adapter. -// See https://aka.ms/about-bot-adapter to learn more about adapters. -const adapter = new CloudAdapter(botFrameworkAuthentication); - -// Catch-all for errors. -const onTurnErrorHandler = async (context, error) => { - // This check writes out errors to console log .vs. app insights. - // NOTE: In production environment, you should consider logging this to Azure - // application insights. - console.error(`\n [onTurnError] unhandled error: ${ error }`); - - // Send a trace activity, which will be displayed in Bot Framework Emulator - await context.sendTraceActivity( - 'OnTurnError Trace', - `${ error }`, - 'https://www.botframework.com/schemas/error', - 'TurnError' - ); - - // Send a message to the user - let onTurnErrorMessage = 'The bot encountered an error or bug.'; - await context.sendActivity(onTurnErrorMessage, onTurnErrorMessage, InputHints.ExpectingInput); - onTurnErrorMessage = 'To continue to run this bot, please fix the bot source code.'; - await context.sendActivity(onTurnErrorMessage, onTurnErrorMessage, InputHints.ExpectingInput); - // Clear out state - await conversationState.delete(context); -}; - -// Set the onTurnError for the singleton CloudAdapter. -adapter.onTurnError = onTurnErrorHandler; - -// Define a state store for your bot. See https://aka.ms/about-bot-state to learn more about using MemoryStorage. -// A bot requires a state store to persist the dialog and user state between messages. - -// For local development, in-memory storage is used. -// CAUTION: The Memory Storage used here is for local bot debugging only. When the bot -// is restarted, anything stored in memory will be gone. -const memoryStorage = new MemoryStorage(); -const conversationState = new ConversationState(memoryStorage); -const userState = new UserState(memoryStorage); - -// If configured, pass in the FlightBookingRecognizer. (Defining it externally allows it to be mocked for tests) -const { LuisAppId, LuisAPIKey, LuisAPIHostName } = process.env; -const luisConfig = { applicationId: LuisAppId, endpointKey: LuisAPIKey, endpoint: `https://${ LuisAPIHostName }` }; - -const luisRecognizer = new FlightBookingRecognizer(luisConfig); - -// Create the main dialog. -const bookingDialog = new BookingDialog(BOOKING_DIALOG); -const dialog = new MainDialog(luisRecognizer, bookingDialog); -const bot = new DialogAndWelcomeBot(conversationState, userState, dialog); - -// Create HTTP server -const server = restify.createServer(); -server.use(restify.plugins.bodyParser()); - -server.listen(process.env.port || process.env.PORT || 3978, function() { - console.log(`\n${ server.name } listening to ${ server.url }`); - console.log('\nGet Bot Framework Emulator: https://aka.ms/botframework-emulator'); - console.log('\nTo talk to your bot, open the emulator select "Open Bot"'); -}); - -// Listen for incoming activities and route them to your bot main dialog. -server.post('/api/messages', async (req, res) => { - // Route received a request to adapter for processing - await adapter.process(req, res, (context) => bot.run(context)); -}); - -// Listen for Upgrade requests for Streaming. -server.on('upgrade', async (req, socket, head) => { - // Create an adapter scoped to this WebSocket connection to allow storing session data. - const streamingAdapter = new CloudAdapter(botFrameworkAuthentication); - - // Set onTurnError for the CloudAdapter created for each connection. - streamingAdapter.onTurnError = onTurnErrorHandler; - - await streamingAdapter.process(req, socket, head, (context) => bot.run(context)); -}); diff --git a/generators/generator-botbuilder/generators/app/templates/core/index.ts b/generators/generator-botbuilder/generators/app/templates/core/index.ts deleted file mode 100644 index db81db1846..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/index.ts +++ /dev/null @@ -1,122 +0,0 @@ -import { config } from 'dotenv'; -import * as path from 'path'; - -// Note: Ensure you have a .env file and include LuisAppId, LuisAPIKey and LuisAPIHostName. -const ENV_FILE = path.join(__dirname, '..', '.env'); -config({ path: ENV_FILE }); - -import * as restify from 'restify'; - -import { INodeSocket } from 'botframework-streaming'; - -// Import required bot services. -// See https://aka.ms/bot-services to learn more about the different parts of a bot. -import { - CloudAdapter, - ConfigurationServiceClientCredentialFactory, - ConversationState, - createBotFrameworkAuthenticationFromConfiguration, - MemoryStorage, - UserState -} from 'botbuilder'; -import { LuisApplication } from 'botbuilder-ai'; - -// The bot and its main dialog. -import { DialogAndWelcomeBot } from './bots/dialogAndWelcomeBot'; -import { MainDialog } from './dialogs/mainDialog'; - -// The bot's booking dialog -import { BookingDialog } from './dialogs/bookingDialog'; -const BOOKING_DIALOG = 'bookingDialog'; - -// The helper-class recognizer that calls LUIS -import { FlightBookingRecognizer } from './dialogs/flightBookingRecognizer'; - -const credentialsFactory = new ConfigurationServiceClientCredentialFactory({ - MicrosoftAppId: process.env.MicrosoftAppId, - MicrosoftAppPassword: process.env.MicrosoftAppPassword, - MicrosoftAppType: process.env.MicrosoftAppType, - MicrosoftAppTenantId: process.env.MicrosoftAppTenantId -}); - -const botFrameworkAuthentication = createBotFrameworkAuthenticationFromConfiguration(null, credentialsFactory); - -// Create adapter. -// See https://aka.ms/about-bot-adapter to learn more about adapters. -const adapter = new CloudAdapter(botFrameworkAuthentication); - -// Catch-all for errors. -const onTurnErrorHandler = async (context, error) => { - // This check writes out errors to console log .vs. app insights. - // NOTE: In production environment, you should consider logging this to Azure - // application insights. - console.error(`\n [onTurnError] unhandled error: ${ error }`); - - // Send a trace activity, which will be displayed in Bot Framework Emulator - await context.sendTraceActivity( - 'OnTurnError Trace', - `${ error }`, - 'https://www.botframework.com/schemas/error', - 'TurnError' - ); - - // Send a message to the user - await context.sendActivity('The bot encountered an error or bug.'); - await context.sendActivity('To continue to run this bot, please fix the bot source code.'); - // Clear out state - await conversationState.delete(context); -}; - -// Set the onTurnError for the singleton CloudAdapter. -adapter.onTurnError = onTurnErrorHandler; - -// Define a state store for your bot. See https://aka.ms/about-bot-state to learn more about using MemoryStorage. -// A bot requires a state store to persist the dialog and user state between messages. -let conversationState: ConversationState; -let userState: UserState; - -// For local development, in-memory storage is used. -// CAUTION: The Memory Storage used here is for local bot debugging only. When the bot -// is restarted, anything stored in memory will be gone. -const memoryStorage = new MemoryStorage(); -conversationState = new ConversationState(memoryStorage); -userState = new UserState(memoryStorage); - -// If configured, pass in the FlightBookingRecognizer. (Defining it externally allows it to be mocked for tests) -let luisRecognizer; -const { LuisAppId, LuisAPIKey, LuisAPIHostName } = process.env; -const luisConfig: LuisApplication = { applicationId: LuisAppId, endpointKey: LuisAPIKey, endpoint: `https://${ LuisAPIHostName }` }; - -luisRecognizer = new FlightBookingRecognizer(luisConfig); - -// Create the main dialog. -const bookingDialog = new BookingDialog(BOOKING_DIALOG); -const dialog = new MainDialog(luisRecognizer, bookingDialog); -const bot = new DialogAndWelcomeBot(conversationState, userState, dialog); - -// Create HTTP server -const server = restify.createServer(); -server.use(restify.plugins.bodyParser()); - -server.listen(process.env.port || process.env.PORT || 3978, () => { - console.log(`\n${ server.name } listening to ${ server.url }`); - console.log('\nGet Bot Framework Emulator: https://aka.ms/botframework-emulator'); - console.log('\nTo talk to your bot, open the emulator select "Open Bot"'); -}); - -// Listen for incoming activities and route them to your bot main dialog. -server.post('/api/messages', async (req, res) => { - // Route received a request to adapter for processing - await adapter.process(req, res, (context) => bot.run(context)); -}); - -// Listen for Upgrade requests for Streaming. -server.on('upgrade', async (req, socket, head) => { - // Create an adapter scoped to this WebSocket connection to allow storing session data. - const streamingAdapter = new CloudAdapter(botFrameworkAuthentication); - - // Set onTurnError for the CloudAdapter created for each connection. - streamingAdapter.onTurnError = onTurnErrorHandler; - - await streamingAdapter.process(req, socket as unknown as INodeSocket, head, (context) => bot.run(context)); -}); diff --git a/generators/generator-botbuilder/generators/app/templates/core/package-with-tests.json.js b/generators/generator-botbuilder/generators/app/templates/core/package-with-tests.json.js deleted file mode 100644 index 34fa721c40..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/package-with-tests.json.js +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "<%= botname %>", - "version": "4.1.6", - "description": "<%= botDescription %>", - "author": "Generated using Microsoft Bot Builder Yeoman generator v<%= version %>", - "license": "MIT", - "main": "<%= npmMain %>", - "scripts": { - "start": "node ./index.js", - "watch": "nodemon ./index.js", - "lint": "eslint .", - "test": "nyc mocha tests/**/*.test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com" - }, - "dependencies": { - "@microsoft/recognizers-text-data-types-timex-expression": "1.1.4", - "botbuilder": "4.1.6", - "botbuilder-ai": "4.1.6", - "botbuilder-dialogs": "4.1.6", - "botbuilder-testing": "4.1.6", - "dotenv": "^8.2.0", - "restify": "^11.1.0" - }, - "devDependencies": { - "eslint": "^7.0.0", - "eslint-config-standard": "^14.1.1", - "eslint-plugin-import": "^2.20.2", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-standard": "^4.0.1", - "mocha": "^7.1.2", - "nodemon": "^2.0.4", - "nyc": "^15.0.1" - } -} diff --git a/generators/generator-botbuilder/generators/app/templates/core/package-with-tests.json.ts b/generators/generator-botbuilder/generators/app/templates/core/package-with-tests.json.ts deleted file mode 100644 index bc24385700..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/package-with-tests.json.ts +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "<%= botname %>", - "version": "4.1.6", - "description": "<%= botDescription %>", - "author": "Generated using Microsoft Bot Builder Yeoman generator v<%= version %>", - "license": "MIT", - "main": "<%= npmMain %>", - "scripts": { - "build": "tsc --build", - "lint": "tslint -c tslint.json 'src/**/*.ts'", - "postinstall": "npm run build && node ./deploymentScripts/webConfigPrep.js", - "start": "tsc --build && node ./lib/index.js", - "test": "tsc --build && nyc mocha lib/tests/**/*.test.js", - "watch": "nodemon --watch ./src -e ts --exec \"npm run start\"" - }, - "repository": { - "type": "git", - "url": "https://github.com" - }, - "nyc": { - "extension": [ - ".ts", - ".tsx" - ], - "exclude": [ - "**/.eslintrc.js", - "**/*.d.ts", - "**/*.test.*", - "**/tests", - "**/coverage", - "**/deploymentScripts", - "**/src/index.ts" - ], - "reporter": [ - "text" - ], - "all": true - }, - "dependencies": { - "@microsoft/recognizers-text-data-types-timex-expression": "1.1.4", - "botbuilder": "4.1.6", - "botbuilder-ai": "4.1.6", - "botbuilder-dialogs": "4.1.6", - "botbuilder-testing": "4.1.6", - "dotenv": "^8.2.0", - "replace": "~1.2.0", - "restify": "~11.1.0" -}, - "devDependencies": { - "@types/mocha": "^7.0.2", - "@types/node": "^18.19.47", - "@types/restify": "8.4.2", - "mocha": "^7.1.2", - "nodemon": "^2.0.4", - "nyc": "^15.0.1", - "ts-node": "^8.10.1", - "tslint": "^6.1.2", - "typescript": "^5.6.3" - } -} diff --git a/generators/generator-botbuilder/generators/app/templates/core/package.json.js b/generators/generator-botbuilder/generators/app/templates/core/package.json.js deleted file mode 100644 index 6b8ae1f9c1..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/package.json.js +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "<%= botname %>", - "version": "4.1.6", - "description": "<%= botDescription %>", - "author": "Generated using Microsoft Bot Builder Yeoman generator v<%= version %>", - "license": "MIT", - "main": "<%= npmMain %>", - "scripts": { - "start": "node ./index.js", - "watch": "nodemon ./index.js", - "lint": "eslint .", - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "https://github.com" - }, - "dependencies": { - "@microsoft/recognizers-text-data-types-timex-expression": "1.1.4", - "botbuilder": "4.1.6", - "botbuilder-ai": "4.1.6", - "botbuilder-dialogs": "4.1.6", - "dotenv": "~8.2.0", - "restify": "~11.1.0" - }, - "devDependencies": { - "eslint": "^7.0.0", - "eslint-config-standard": "^14.1.1", - "eslint-plugin-import": "^2.20.2", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-standard": "^4.0.1", - "mocha": "^7.1.2", - "nodemon": "^2.0.4", - "nyc": "^15.0.1" - } -} diff --git a/generators/generator-botbuilder/generators/app/templates/core/package.json.ts b/generators/generator-botbuilder/generators/app/templates/core/package.json.ts deleted file mode 100644 index 9514e6dc6f..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/package.json.ts +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "<%= botname %>", - "version": "4.1.6", - "description": "<%= botDescription %>", - "author": "Generated using Microsoft Bot Builder Yeoman generator v<%= version %>", - "license": "MIT", - "main": "<%= npmMain %>", - "scripts": { - "build": "tsc --build", - "lint": "tslint -c tslint.json 'src/**/*.ts'", - "postinstall": "npm run build && node ./deploymentScripts/webConfigPrep.js", - "start": "tsc --build && node ./lib/index.js", - "test": "echo \"Error: no test specified\" && exit 1", - "watch": "nodemon --watch ./src -e ts --exec \"npm run start\"" - }, - "repository": { - "type": "git", - "url": "https://github.com" - }, - "dependencies": { - "@microsoft/recognizers-text-data-types-timex-expression": "1.1.4", - "botbuilder": "4.1.6", - "botbuilder-ai": "4.1.6", - "botbuilder-dialogs": "4.1.6", - "dotenv": "~8.2.0", - "replace": "~1.2.0", - "restify": "~11.1.0" - }, - "devDependencies": { - "@types/mocha": "^7.0.2", - "@types/node": "^18.19.47", - "@types/restify": "8.4.2", - "mocha": "^7.1.2", - "nodemon": "^2.0.4", - "nyc": "^15.0.1", - "ts-node": "^8.10.1", - "tslint": "^6.1.2", - "typescript": "^5.6.3" - } -} diff --git a/generators/generator-botbuilder/generators/app/templates/core/resources/welcomeCard.json b/generators/generator-botbuilder/generators/app/templates/core/resources/welcomeCard.json deleted file mode 100644 index dd69d43431..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/resources/welcomeCard.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", - "type": "AdaptiveCard", - "version": "1.0", - "body": [ - { - "type": "Image", - "url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQtB3AwMUeNoq4gUBGe6Ocj8kyh3bXa9ZbV7u1fVKQoyKFHdkqU", - "size": "stretch" - }, - { - "type": "TextBlock", - "spacing": "medium", - "size": "default", - "weight": "bolder", - "text": "Welcome to Bot Framework!", - "wrap": true, - "maxLines": 0 - }, - { - "type": "TextBlock", - "size": "default", - "isSubtle": true, - "text": "Now that you have successfully run your bot, follow the links in this Adaptive Card to expand your knowledge of Bot Framework.", - "wrap": true, - "maxLines": 0 - } - ], - "actions": [ - { - "type": "Action.OpenUrl", - "title": "Get an overview", - "url": "https://docs.microsoft.com/en-us/azure/bot-service/?view=azure-bot-service-4.0" - }, - { - "type": "Action.OpenUrl", - "title": "Ask a question", - "url": "https://stackoverflow.com/questions/tagged/botframework" - }, - { - "type": "Action.OpenUrl", - "title": "Learn how to deploy", - "url": "https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-howto-deploy-azure?view=azure-bot-service-4.0" - } - ] -} diff --git a/generators/generator-botbuilder/generators/app/templates/core/tests/README.md b/generators/generator-botbuilder/generators/app/templates/core/tests/README.md deleted file mode 100644 index fe05f77659..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/tests/README.md +++ /dev/null @@ -1,58 +0,0 @@ - -# <%= botname %> tests - -Bot Framework v4 bot tests for `<%= botname %>` bot. - -This project uses the [botbuilder-testing](https://www.npmjs.com/package/botbuilder-testing) package and [mocha](https://github.com/mochajs/mocha) to create unit tests for your bot. - -This project shows how to: - -- Create unit tests for dialogs and bots -- Create different types of data driven tests using mocha tests -- Create mock objects for the different dependencies of a dialog (i.e. LUIS recognizers, other dialogs, configuration, etc.) -- Assert the activities returned by a dialog turn against expected values -- Assert the results returned by a dialog - -## Overview - -In this sample, dialogs are unit tested through the `DialogTestClient` class which provides a mechanism for testing them in isolation outside of a bot and without having to deploy your code to a web service. - -This class is used to write unit tests for dialogs that test their responses on a turn-by-turn basis. Any dialog built using the botbuilder dialogs library should work. - -Here is a simple example on how a test that uses `DialogTestClient` looks like: - -```javascript -const sut = new BookingDialog(); -const testClient = new DialogTestClient('msteams', sut); - -let reply = await testClient.sendActivity('hi'); -assert.strictEqual(reply.text, 'Where would you like to travel to?'); - -reply = await testClient.sendActivity('Seattle'); -assert.strictEqual(reply.text, 'Where are you traveling from?'); - -reply = await testClient.sendActivity('New York'); -assert.strictEqual(reply.text, 'When would you like to travel?'); - -reply = await testClient.sendActivity('tomorrow'); -assert.strictEqual(reply.text, 'OK, I will book a flight from Seattle to New York for tomorrow, Is this Correct?'); - -reply = await testClient.sendActivity('yes'); -assert.strictEqual(reply.text, 'Sure thing, wait while I finalize your reservation...'); - -reply = testClient.getNextReply(); -assert.strictEqual(reply.text, 'All set, I have booked your flight to Seattle for tomorrow'); -``` - -The project includes several examples on how to test different bot components: - -- [cancelAndHelpDialog.test](dialogs/cancelAndHelpDialog.test.js) shows how to write a simple data driven test for `CancelAndHelpDialog` using a test case array. -- [bookingDialog.test](dialogs/bookingDialog.test.js) shows how to write a data driven test using a `bookingDialogTestCases` module to generate the test cases. -- [mainDialog.test](dialogs/mainDialog.test.js) showcases how to use mock objects to mock the dialog's LUIS and `BookingDialog` dependencies to test `MainDialog` in isolation. -- [dialogAndWelcomeBot.test](bots/dialogAndWelcomeBot.test.js) provides an example on how to write a test for the bot's `ActivityHandler` using `TestAdapter`. - -## Further reading - -- [How to unit test bots](https://aka.ms/js-unit-test-docs) -- [Mocha](https://github.com/mochajs/mocha) -- [Bot Testing](https://github.com/microsoft/botframework-sdk/blob/master/specs/testing/testing.md) diff --git a/generators/generator-botbuilder/generators/app/templates/core/tests/bots/dialogAndWelcomeBot.test.js b/generators/generator-botbuilder/generators/app/templates/core/tests/bots/dialogAndWelcomeBot.test.js deleted file mode 100644 index b8413628e5..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/tests/bots/dialogAndWelcomeBot.test.js +++ /dev/null @@ -1,70 +0,0 @@ -/* eslint-env node, mocha */ -const { TestAdapter, ActivityTypes, TurnContext, ConversationState, MemoryStorage, UserState } = require('botbuilder'); -const { DialogSet, DialogTurnStatus, Dialog } = require('botbuilder-dialogs'); -const { DialogAndWelcomeBot } = require('../../bots/dialogAndWelcomeBot'); -const assert = require('assert'); - -/** - * A simple mock for a root dialog that gets invoked by the bot. - */ -class MockRootDialog extends Dialog { - constructor() { - super('mockRootDialog'); - } - - async beginDialog(dc, options) { - await dc.context.sendActivity(`${ this.id } mock invoked`); - return await dc.endDialog(); - } - - async run(turnContext, accessor) { - const dialogSet = new DialogSet(accessor); - dialogSet.add(this); - - const dialogContext = await dialogSet.createContext(turnContext); - const results = await dialogContext.continueDialog(); - if (results.status === DialogTurnStatus.empty) { - await dialogContext.beginDialog(this.id); - } - } -} - -describe('DialogAndWelcomeBot', () => { - const testAdapter = new TestAdapter(); - - async function processActivity(activity, bot) { - const context = new TurnContext(testAdapter, activity); - await bot.run(context); - } - - it('Shows welcome card on member added and starts main dialog', async () => { - const mockRootDialog = new MockRootDialog(); - const memoryStorage = new MemoryStorage(); - const sut = new DialogAndWelcomeBot(new ConversationState(memoryStorage), new UserState(memoryStorage), mockRootDialog, console); - - // Create conversationUpdate activity - const conversationUpdateActivity = { - type: ActivityTypes.ConversationUpdate, - channelId: 'test', - conversation: { - id: 'someId' - }, - membersAdded: [ - { id: 'theUser' } - ], - recipient: { id: 'theBot' } - }; - - // Send the conversation update activity to the bot. - await processActivity(conversationUpdateActivity, sut); - - // Assert we got the welcome card - let reply = testAdapter.activityBuffer.shift(); - assert.strictEqual(reply.attachments.length, 1); - assert.strictEqual(reply.attachments[0].contentType, 'application/vnd.microsoft.card.adaptive'); - - // Assert that we started the main dialog. - reply = testAdapter.activityBuffer.shift(); - assert.strictEqual(reply.text, 'mockRootDialog mock invoked'); - }); -}); diff --git a/generators/generator-botbuilder/generators/app/templates/core/tests/bots/dialogAndWelcomeBot.test.ts b/generators/generator-botbuilder/generators/app/templates/core/tests/bots/dialogAndWelcomeBot.test.ts deleted file mode 100644 index 57d31b0115..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/tests/bots/dialogAndWelcomeBot.test.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { ActivityTypes, ConversationState, MemoryStorage, TestAdapter, TurnContext, UserState } from 'botbuilder'; -import { Dialog, DialogSet, DialogTurnStatus } from 'botbuilder-dialogs'; -import { DialogAndWelcomeBot } from '../../bots/dialogAndWelcomeBot'; -const assert = require('assert'); - -/** - * A simple mock for a root dialog that gets invoked by the bot. - */ -class MockRootDialog extends Dialog { - constructor() { - super('mockRootDialog'); - } - - async beginDialog(dc, options) { - await dc.context.sendActivity(`${ this.id } mock invoked`); - return await dc.endDialog(); - } - - async run(turnContext, accessor) { - const dialogSet = new DialogSet(accessor); - dialogSet.add(this); - - const dialogContext = await dialogSet.createContext(turnContext); - const results = await dialogContext.continueDialog(); - if (results.status === DialogTurnStatus.empty) { - await dialogContext.beginDialog(this.id); - } - } -} - -describe('DialogAndWelcomeBot', () => { - const testAdapter = new TestAdapter(async (context) => undefined); - - async function processActivity(activity, bot) { - const context = new TurnContext(testAdapter, activity); - await bot.run(context); - } - - it('Shows welcome card on member added and starts main dialog', async () => { - const mockRootDialog = new MockRootDialog(); - const memoryStorage = new MemoryStorage(); - const sut = new DialogAndWelcomeBot(new ConversationState(memoryStorage), new UserState(memoryStorage), mockRootDialog); - - // Create conversationUpdate activity - const conversationUpdateActivity = { - channelId: 'test', - conversation: { - id: 'someId' - }, - membersAdded: [ - { id: 'theUser' } - ], - recipient: { id: 'theBot' }, - type: ActivityTypes.ConversationUpdate - }; - - // Send the conversation update activity to the bot. - await processActivity(conversationUpdateActivity, sut); - - // Assert we got the welcome card - let reply = testAdapter.activityBuffer.shift(); - assert.strictEqual(reply.attachments.length, 1); - assert.strictEqual(reply.attachments[0].contentType, 'application/vnd.microsoft.card.adaptive'); - - // Assert that we started the main dialog. - reply = testAdapter.activityBuffer.shift(); - assert.strictEqual(reply.text, 'mockRootDialog mock invoked'); - }); -}); diff --git a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/bookingDialog.test.js b/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/bookingDialog.test.js deleted file mode 100644 index 9048c70fdf..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/bookingDialog.test.js +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/* eslint-env node, mocha */ -const { DialogTestClient, DialogTestLogger } = require('botbuilder-testing'); -const { BookingDialog } = require('../../dialogs/bookingDialog'); -const assert = require('assert'); - -describe('BookingDialog', () => { - const testCases = require('./testData/bookingDialogTestCases.js'); - const sut = new BookingDialog('bookingDialog'); - - testCases.map(testData => { - it(testData.name, async () => { - const client = new DialogTestClient('test', sut, testData.initialData, [new DialogTestLogger()]); - - // Execute the test case - console.log(`Test Case: ${ testData.name }`); - console.log(`Dialog Input ${ JSON.stringify(testData.initialData) }`); - for (let i = 0; i < testData.steps.length; i++) { - const reply = await client.sendActivity(testData.steps[i][0]); - assert.strictEqual((reply ? reply.text : null), testData.steps[i][1], `${ reply ? reply.text : null } != ${ testData.steps[i][1] }`); - } - - assert.strictEqual(client.dialogTurnResult.status, testData.expectedStatus, `${ testData.expectedStatus } != ${ client.dialogTurnResult.status }`); - - console.log(`Dialog result: ${ JSON.stringify(client.dialogTurnResult.result) }`); - if (testData.expectedResult !== undefined) { - // Check dialog results - const result = client.dialogTurnResult.result; - assert.strictEqual(result.destination, testData.expectedResult.destination); - assert.strictEqual(result.origin, testData.expectedResult.origin); - assert.strictEqual(result.travelDate, testData.expectedResult.travelDate); - } else { - assert.strictEqual(client.dialogTurnResult.result, undefined); - } - }); - }); -}); diff --git a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/bookingDialog.test.ts b/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/bookingDialog.test.ts deleted file mode 100644 index 905c12acf6..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/bookingDialog.test.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -import { DialogTestClient, DialogTestLogger } from 'botbuilder-testing'; -import { BookingDialog } from '../../dialogs/bookingDialog'; -const assert = require('assert'); - -describe('BookingDialog', () => { - const testCases = require('./testData/bookingDialogTestCases'); - const sut = new BookingDialog('bookingDialog'); - - testCases.map((testData) => { - it(testData.name, async () => { - const client = new DialogTestClient('test', sut, testData.initialData, [new DialogTestLogger()]); - - // Execute the test case - console.log(`Test Case: ${ testData.name }`); - console.log(`Dialog Input ${ JSON.stringify(testData.initialData) }`); - for (const step of testData.steps) { - const reply = await client.sendActivity(step[0]); - assert.strictEqual((reply ? reply.text : null), step[1], `${ reply ? reply.text : null } != ${ step[1] }`); - } - - assert.strictEqual(client.dialogTurnResult.status, testData.expectedStatus, `${ testData.expectedStatus } != ${ client.dialogTurnResult.status }`); - - console.log(`Dialog result: ${ JSON.stringify(client.dialogTurnResult.result) }`); - if (testData.expectedResult !== undefined) { - // Check dialog results - const result = client.dialogTurnResult.result; - assert.strictEqual(result.destination, testData.expectedResult.destination); - assert.strictEqual(result.origin, testData.expectedResult.origin); - assert.strictEqual(result.travelDate, testData.expectedResult.travelDate); - } else { - assert.strictEqual(client.dialogTurnResult.result, undefined); - } - }); - }); -}); diff --git a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/cancelAndHelpDialog.test.js b/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/cancelAndHelpDialog.test.js deleted file mode 100644 index f37982ee40..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/cancelAndHelpDialog.test.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/* eslint-env node, mocha */ -const { MessageFactory } = require('botbuilder'); -const { DialogTestClient, DialogTestLogger } = require('botbuilder-testing'); -const { TextPrompt, WaterfallDialog } = require('botbuilder-dialogs'); -const { CancelAndHelpDialog } = require('../../dialogs/cancelAndHelpDialog'); -const assert = require('assert'); - -/** - * An waterfall dialog derived from CancelAndHelpDialog for testing - */ -class TestCancelAndHelpDialog extends CancelAndHelpDialog { - constructor() { - super('TestCancelAndHelpDialog'); - - this.addDialog(new TextPrompt('TextPrompt')) - .addDialog(new WaterfallDialog('WaterfallDialog', [ - this.promptStep.bind(this), - this.finalStep.bind(this) - ])); - - this.initialDialogId = 'WaterfallDialog'; - } - - async promptStep(stepContext) { - return await stepContext.prompt('TextPrompt', { prompt: MessageFactory.text('Hi there') }); - } - - async finalStep(stepContext) { - return await stepContext.endDialog(); - } -} - -describe('CancelAndHelpDialog', () => { - describe('Should be able to cancel', () => { - const testCases = ['cancel', 'quit']; - - testCases.map(testData => { - it(testData, async () => { - const sut = new TestCancelAndHelpDialog(); - const client = new DialogTestClient('test', sut, null, [new DialogTestLogger()]); - - // Execute the test case - let reply = await client.sendActivity('Hi'); - assert.strictEqual(reply.text, 'Hi there'); - assert.strictEqual(client.dialogTurnResult.status, 'waiting'); - - reply = await client.sendActivity(testData); - assert.strictEqual(reply.text, 'Cancelling...'); - assert.strictEqual(client.dialogTurnResult.status, 'complete'); - }); - }); - }); - - describe('Should be able to get help', () => { - const testCases = ['help', '?']; - - testCases.map(testData => { - it(testData, async () => { - const sut = new TestCancelAndHelpDialog(); - const client = new DialogTestClient('test', sut, null, [new DialogTestLogger()]); - - // Execute the test case - let reply = await client.sendActivity('Hi'); - assert.strictEqual(reply.text, 'Hi there'); - assert.strictEqual(client.dialogTurnResult.status, 'waiting'); - - reply = await client.sendActivity(testData); - assert.strictEqual(reply.text, 'Show help here'); - assert.strictEqual(client.dialogTurnResult.status, 'waiting'); - }); - }); - }); -}); diff --git a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/cancelAndHelpDialog.test.ts b/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/cancelAndHelpDialog.test.ts deleted file mode 100644 index 42d6060cbb..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/cancelAndHelpDialog.test.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -import { MessageFactory } from 'botbuilder'; -import { TextPrompt, WaterfallDialog } from 'botbuilder-dialogs'; -import { DialogTestClient, DialogTestLogger } from 'botbuilder-testing'; -import { CancelAndHelpDialog } from '../../dialogs/cancelAndHelpDialog'; -const assert = require('assert'); - -/** - * An waterfall dialog derived from CancelAndHelpDialog for testing - */ -class TestCancelAndHelpDialog extends CancelAndHelpDialog { - constructor() { - super('TestCancelAndHelpDialog'); - - this.addDialog(new TextPrompt('TextPrompt')) - .addDialog(new WaterfallDialog('WaterfallDialog', [ - this.promptStep.bind(this), - this.finalStep.bind(this) - ])); - - this.initialDialogId = 'WaterfallDialog'; - } - - async promptStep(stepContext) { - return await stepContext.prompt('TextPrompt', { prompt: MessageFactory.text('Hi there') }); - } - - async finalStep(stepContext) { - return await stepContext.endDialog(); - } -} - -describe('CancelAndHelpDialog', () => { - describe('Should be able to cancel', () => { - const testCases = ['cancel', 'quit']; - - testCases.map((testData) => { - it(testData, async () => { - const sut = new TestCancelAndHelpDialog(); - const client = new DialogTestClient('test', sut, null, [new DialogTestLogger()]); - - // Execute the test case - let reply = await client.sendActivity('Hi'); - assert.strictEqual(reply.text, 'Hi there'); - assert.strictEqual(client.dialogTurnResult.status, 'waiting'); - - reply = await client.sendActivity(testData); - assert.strictEqual(reply.text, 'Cancelling...'); - assert.strictEqual(client.dialogTurnResult.status, 'complete'); - }); - }); - }); - - describe('Should be able to get help', () => { - const testCases = ['help', '?']; - - testCases.map((testData) => { - it(testData, async () => { - const sut = new TestCancelAndHelpDialog(); - const client = new DialogTestClient('test', sut, null, [new DialogTestLogger()]); - - // Execute the test case - let reply = await client.sendActivity('Hi'); - assert.strictEqual(reply.text, 'Hi there'); - assert.strictEqual(client.dialogTurnResult.status, 'waiting'); - - reply = await client.sendActivity(testData); - assert.strictEqual(reply.text, 'Show help here'); - assert.strictEqual(client.dialogTurnResult.status, 'waiting'); - }); - }); - }); -}); diff --git a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/dateResolverDialog.test.js b/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/dateResolverDialog.test.js deleted file mode 100644 index 4a63b9b66d..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/dateResolverDialog.test.js +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/* eslint-env node, mocha */ -const { DialogTestClient, DialogTestLogger } = require('botbuilder-testing'); -const { DateResolverDialog } = require('../../dialogs/dateResolverDialog'); -const assert = require('assert'); - -describe('DateResolverDialog', () => { - const testCases = require('./testData/dateResolverTestCases.js'); - const sut = new DateResolverDialog('dateResolver'); - - testCases.map(testData => { - it(testData.name, async () => { - const client = new DialogTestClient('test', sut, testData.initialData, [new DialogTestLogger()]); - - // Execute the test case - console.log(`Test Case: ${ testData.name }`); - console.log(`Dialog Input ${ JSON.stringify(testData.initialData) }`); - for (let i = 0; i < testData.steps.length; i++) { - const reply = await client.sendActivity(testData.steps[i][0]); - assert.strictEqual((reply ? reply.text : null), testData.steps[i][1], `${ reply ? reply.text : null } != ${ testData.steps[i][1] }`); - } - console.log(`Dialog result: ${ client.dialogTurnResult.result }`); - assert.strictEqual(client.dialogTurnResult.result, testData.expectedResult, `${ testData.expectedResult } != ${ client.dialogTurnResult.result }`); - }); - }); -}); diff --git a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/dateResolverDialog.test.ts b/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/dateResolverDialog.test.ts deleted file mode 100644 index 8e35dbda1b..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/dateResolverDialog.test.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -import { DialogTestClient, DialogTestLogger } from 'botbuilder-testing'; -import { DateResolverDialog } from '../../dialogs/dateResolverDialog'; -const assert = require('assert'); - -describe('DateResolverDialog', () => { - const testCases = require('./testData/dateResolverTestCases'); - const sut = new DateResolverDialog('dateResolver'); - - testCases.map((testData) => { - it(testData.name, async () => { - const client = new DialogTestClient('test', sut, testData.initialData, [new DialogTestLogger()]); - - // Execute the test case - console.log(`Test Case: ${ testData.name }`); - console.log(`Dialog Input ${ JSON.stringify(testData.initialData) }`); - for (const step of testData.steps) { - const reply = await client.sendActivity(step[0]); - assert.strictEqual((reply ? reply.text : null), step[1], `${ reply ? reply.text : null } != ${ step[1] }`); - } - console.log(`Dialog result: ${ client.dialogTurnResult.result }`); - assert.strictEqual(client.dialogTurnResult.result, testData.expectedResult, `${ testData.expectedResult } != ${ client.dialogTurnResult.result }`); - }); - }); -}); diff --git a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/mainDialog.test.js b/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/mainDialog.test.js deleted file mode 100644 index 34666bfe1f..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/mainDialog.test.js +++ /dev/null @@ -1,156 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ - -/* eslint-env node, mocha */ -const { TextPrompt } = require('botbuilder-dialogs'); -const { DialogTestClient, DialogTestLogger } = require('botbuilder-testing'); -const { FlightBookingRecognizer } = require('../../dialogs/flightBookingRecognizer'); -const { MainDialog } = require('../../dialogs/mainDialog'); -const { BookingDialog } = require('../../dialogs/bookingDialog'); -const assert = require('assert'); - -/** - * A mock FlightBookingRecognizer for our main dialog tests that takes - * a mock luis result and can set as isConfigured === false. - */ -class MockFlightBookingRecognizer extends FlightBookingRecognizer { - constructor(isConfigured, mockResult) { - super(isConfigured); - this.isLuisConfigured = isConfigured; - this.mockResult = mockResult; - } - - async executeLuisQuery(context) { - return this.mockResult; - } - - get isConfigured() { - return (this.isLuisConfigured); - } -} - -/** - * A simple mock for Booking dialog that just returns a preset booking info for tests. - */ -class MockBookingDialog extends BookingDialog { - constructor() { - super('bookingDialog'); - } - - async beginDialog(dc, options) { - const bookingDetails = { - origin: 'New York', - destination: 'Seattle', - travelDate: '2025-07-08' - }; - await dc.context.sendActivity(`${ this.id } mock invoked`); - return await dc.endDialog(bookingDetails); - } -} - -/** -* A specialized mock for BookingDialog that displays a dummy TextPrompt. -* The dummy prompt is used to prevent the MainDialog waterfall from moving to the next step -* and assert that the main dialog was called. -*/ -class MockBookingDialogWithPrompt extends BookingDialog { - constructor() { - super('bookingDialog'); - } - - async beginDialog(dc, options) { - dc.dialogs.add(new TextPrompt('MockDialog')); - return await dc.prompt('MockDialog', { prompt: `${ this.id } mock invoked` }); - } -}; - -describe('MainDialog', () => { - it('Shows message if LUIS is not configured and calls BookingDialogDirectly', async () => { - const mockRecognizer = new MockFlightBookingRecognizer(false); - const mockBookingDialog = new MockBookingDialogWithPrompt(); - const sut = new MainDialog(mockRecognizer, mockBookingDialog); - const client = new DialogTestClient('test', sut, null, [new DialogTestLogger()]); - - const reply = await client.sendActivity('hi'); - assert.strictEqual(reply.text, 'NOTE: LUIS is not configured. To enable all capabilities, add `LuisAppId`, `LuisAPIKey` and `LuisAPIHostName` to the .env file.', 'Did not warn about missing luis'); - }); - - it('Shows prompt if LUIS is configured', async () => { - const mockRecognizer = new MockFlightBookingRecognizer(true); - const mockBookingDialog = new MockBookingDialog(); - const sut = new MainDialog(mockRecognizer, mockBookingDialog); - const client = new DialogTestClient('test', sut, null, [new DialogTestLogger()]); - - const reply = await client.sendActivity('hi'); - assert.strictEqual(reply.text, 'What can I help you with today?\nSay something like "Book a flight from Paris to Berlin on March 22, 2020"', 'Did not show prompt'); - }); - - describe('Invokes tasks based on LUIS intent', () => { - // Create array with test case data. - const testCases = [ - { utterance: 'I want to book a flight', intent: 'BookFlight', invokedDialogResponse: 'bookingDialog mock invoked', taskConfirmationMessage: 'I have you booked to Seattle from New York' }, - { utterance: 'What\'s the weather like?', intent: 'GetWeather', invokedDialogResponse: 'TODO: get weather flow here', taskConfirmationMessage: undefined }, - { utterance: 'bananas', intent: 'None', invokedDialogResponse: 'Sorry, I didn\'t get that. Please try asking in a different way (intent was None)', taskConfirmationMessage: undefined } - ]; - - testCases.map(testData => { - it(testData.intent, async () => { - // Create LuisResult for the mock recognizer. - const mockLuisResult = JSON.parse(`{"intents": {"${ testData.intent }": {"score": 1}}, "entities": {"$instance": {}}}`); - const mockRecognizer = new MockFlightBookingRecognizer(true, mockLuisResult); - const bookingDialog = new MockBookingDialog(); - const sut = new MainDialog(mockRecognizer, bookingDialog); - const client = new DialogTestClient('test', sut, null, [new DialogTestLogger()]); - - // Execute the test case - console.log(`Test Case: ${ testData.intent }`); - let reply = await client.sendActivity('Hi'); - assert.strictEqual(reply.text, 'What can I help you with today?\nSay something like "Book a flight from Paris to Berlin on March 22, 2020"'); - - reply = await client.sendActivity(testData.utterance); - assert.strictEqual(reply.text, testData.invokedDialogResponse); - - // The Booking dialog displays an additional confirmation message, assert that it is what we expect. - if (testData.taskConfirmationMessage) { - reply = client.getNextReply(); - assert(reply.text.startsWith(testData.taskConfirmationMessage)); - } - - // Validate that the MainDialog starts over once the task is completed. - reply = client.getNextReply(); - assert.strictEqual(reply.text, 'What else can I do for you?'); - }); - }); - }); - - describe('Shows unsupported cities warning', () => { - // Create array with test case data. - const testCases = [ - { jsonFile: 'FlightToMadrid.json', expectedMessage: 'Sorry but the following airports are not supported: madrid' }, - { jsonFile: 'FlightFromMadridToChicago.json', expectedMessage: 'Sorry but the following airports are not supported: madrid, chicago' }, - { jsonFile: 'FlightFromCdgToJfk.json', expectedMessage: 'Sorry but the following airports are not supported: cdg' }, - { jsonFile: 'FlightFromParisToNewYork.json', expectedMessage: 'bookingDialog mock invoked' } - ]; - - testCases.map(testData => { - it(testData.jsonFile, async () => { - // Create LuisResult for the mock recognizer. - const mockLuisResult = require(`./testData/${ testData.jsonFile }`); - const mockRecognizer = new MockFlightBookingRecognizer(true, mockLuisResult); - const bookingDialog = new MockBookingDialog(); - const sut = new MainDialog(mockRecognizer, bookingDialog); - const client = new DialogTestClient('test', sut, null, [new DialogTestLogger()]); - - // Execute the test case - console.log(`Test Case: ${ mockLuisResult.text }`); - let reply = await client.sendActivity('Hi'); - assert.strictEqual(reply.text, 'What can I help you with today?\nSay something like "Book a flight from Paris to Berlin on March 22, 2020"'); - - reply = await client.sendActivity(mockLuisResult.text); - assert.strictEqual(reply.text, testData.expectedMessage); - }); - }); - }); -}); diff --git a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/mainDialog.test.ts b/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/mainDialog.test.ts deleted file mode 100644 index f8f1f34e56..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/mainDialog.test.ts +++ /dev/null @@ -1,156 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -import { TextPrompt } from 'botbuilder-dialogs'; -import { DialogTestClient, DialogTestLogger } from 'botbuilder-testing'; -import { BookingDialog } from '../../dialogs/bookingDialog'; -import { FlightBookingRecognizer } from '../../dialogs/flightBookingRecognizer'; -import { MainDialog } from '../../dialogs/mainDialog'; -const assert = require('assert'); - -// tslint:disable max-classes-per-file -/** - * A mock FlightBookingRecognizer for our main dialog tests that takes - * a mock luis result and can set as isConfigured === false. - */ -class MockFlightBookingRecognizer extends FlightBookingRecognizer { - private isLuisConfigured: boolean; - constructor(isConfigured, private mockResult?: any) { - super(isConfigured); - this.isLuisConfigured = isConfigured; - this.mockResult = mockResult; - } - - async executeLuisQuery(context) { - return this.mockResult; - } - - get isConfigured() { - return (this.isLuisConfigured); - } -} - -/** - * A simple mock for Booking dialog that just returns a preset booking info for tests. - */ -class MockBookingDialog extends BookingDialog { - constructor() { - super('bookingDialog'); - } - - async beginDialog(dc, options) { - const bookingDetails = { - destination: 'Seattle', - origin: 'New York', - travelDate: '2025-07-08' - }; - await dc.context.sendActivity(`${ this.id } mock invoked`); - return await dc.endDialog(bookingDetails); - } -} - -/** - * A specialized mock for BookingDialog that displays a dummy TextPrompt. - * The dummy prompt is used to prevent the MainDialog waterfall from moving to the next step - * and assert that the main dialog was called. - */ -class MockBookingDialogWithPrompt extends BookingDialog { - constructor() { - super('bookingDialog'); - } - - async beginDialog(dc, options) { - dc.dialogs.add(new TextPrompt('MockDialog')); - return await dc.prompt('MockDialog', { prompt: `${ this.id } mock invoked` }); - } -} - -describe('MainDialog', () => { - it('Shows message if LUIS is not configured and calls BookingDialogDirectly', async () => { - const mockRecognizer = new MockFlightBookingRecognizer(false); - const mockBookingDialog = new MockBookingDialogWithPrompt(); - const sut = new MainDialog(mockRecognizer, mockBookingDialog); - const client = new DialogTestClient('test', sut, null, [new DialogTestLogger()]); - - const reply = await client.sendActivity('hi'); - assert.strictEqual(reply.text, 'NOTE: LUIS is not configured. To enable all capabilities, add `LuisAppId`, `LuisAPIKey` and `LuisAPIHostName` to the .env file.', 'Did not warn about missing luis'); - }); - - it('Shows prompt if LUIS is configured', async () => { - const mockRecognizer = new MockFlightBookingRecognizer(true); - const mockBookingDialog = new MockBookingDialog(); - const sut = new MainDialog(mockRecognizer, mockBookingDialog); - const client = new DialogTestClient('test', sut, null, [new DialogTestLogger()]); - - const reply = await client.sendActivity('hi'); - assert.strictEqual(reply.text, 'What can I help you with today?\nSay something like "Book a flight from Paris to Berlin on March 22, 2020"', 'Did not show prompt'); - }); - - describe('Invokes tasks based on LUIS intent', () => { - // Create array with test case data. - const testCases = [ - { utterance: 'I want to book a flight', intent: 'BookFlight', invokedDialogResponse: 'bookingDialog mock invoked', taskConfirmationMessage: 'I have you booked to Seattle from New York' }, - { utterance: `What's the weather like?`, intent: 'GetWeather', invokedDialogResponse: 'TODO: get weather flow here', taskConfirmationMessage: undefined }, - { utterance: 'bananas', intent: 'None', invokedDialogResponse: `Sorry, I didn't get that. Please try asking in a different way (intent was None)`, taskConfirmationMessage: undefined } - ]; - - testCases.map((testData) => { - it(testData.intent, async () => { - // Create LuisResult for the mock recognizer. - const mockLuisResult = JSON.parse(`{"intents": {"${ testData.intent }": {"score": 1}}, "entities": {"$instance": {}}}`); - const mockRecognizer = new MockFlightBookingRecognizer(true, mockLuisResult); - const bookingDialog = new MockBookingDialog(); - const sut = new MainDialog(mockRecognizer, bookingDialog); - const client = new DialogTestClient('test', sut, null, [new DialogTestLogger()]); - - // Execute the test case - console.log(`Test Case: ${ testData.intent }`); - let reply = await client.sendActivity('Hi'); - assert.strictEqual(reply.text, 'What can I help you with today?\nSay something like "Book a flight from Paris to Berlin on March 22, 2020"'); - - reply = await client.sendActivity(testData.utterance); - assert.strictEqual(reply.text, testData.invokedDialogResponse); - - // The Booking dialog displays an additional confirmation message, assert that it is what we expect. - if (testData.taskConfirmationMessage) { - reply = client.getNextReply(); - assert(reply.text.startsWith(testData.taskConfirmationMessage)); - } - - // Validate that the MainDialog starts over once the task is completed. - reply = client.getNextReply(); - assert.strictEqual(reply.text, 'What else can I do for you?'); - }); - }); - }); - - describe('Shows unsupported cities warning', () => { - // Create array with test case data. - const testCases = [ - { jsonFile: 'FlightToMadrid.json', expectedMessage: 'Sorry but the following airports are not supported: madrid' }, - { jsonFile: 'FlightFromMadridToChicago.json', expectedMessage: 'Sorry but the following airports are not supported: madrid, chicago' }, - { jsonFile: 'FlightFromCdgToJfk.json', expectedMessage: 'Sorry but the following airports are not supported: cdg' }, - { jsonFile: 'FlightFromParisToNewYork.json', expectedMessage: 'bookingDialog mock invoked' } - ]; - - testCases.map((testData) => { - it(testData.jsonFile, async () => { - // Create LuisResult for the mock recognizer. - const mockLuisResult = require(`../../../testResources/${ testData.jsonFile }`); - const mockRecognizer = new MockFlightBookingRecognizer(true, mockLuisResult); - const bookingDialog = new MockBookingDialog(); - const sut = new MainDialog(mockRecognizer, bookingDialog); - const client = new DialogTestClient('test', sut, null, [new DialogTestLogger()]); - - // Execute the test case - console.log(`Test Case: ${ mockLuisResult.text }`); - let reply = await client.sendActivity('Hi'); - assert.strictEqual(reply.text, 'What can I help you with today?\nSay something like "Book a flight from Paris to Berlin on March 22, 2020"'); - - reply = await client.sendActivity(mockLuisResult.text); - assert.strictEqual(reply.text, testData.expectedMessage); - }); - }); - }); -}); diff --git a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/FlightFromCdgToJfk.json b/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/FlightFromCdgToJfk.json deleted file mode 100644 index 679604f79c..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/FlightFromCdgToJfk.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "text": "flight from cdg to jfk", - "intents": { - "BookFlight": { - "score": 0.712058365 - } - }, - "entities": { - "$instance": { - "From": [ - { - "startIndex": 12, - "endIndex": 15, - "score": 0.9553623, - "text": "cdg", - "type": "From" - } - ], - "To": [ - { - "startIndex": 19, - "endIndex": 22, - "score": 0.8905674, - "text": "jfk", - "type": "To" - } - ] - }, - "From": [ { "$instance": {} } ], - - "To": [ - { - "$instance": { - "Airport": [ - { - "startIndex": 19, - "endIndex": 22, - "text": "jfk", - "type": "Airport" - } - ] - }, - "Airport": [ - [ - "New York" - ] - ] - } - ] - }, - "luisResult": { - "query": "flight from cdg to jfk", - "topScoringIntent": { - "intent": "BookFlight", - "score": 0.712058365 - }, - "entities": [ - { - "entity": "cdg", - "type": "From", - "startIndex": 12, - "endIndex": 14, - "score": 0.9553623 - }, - { - "entity": "jfk", - "type": "To", - "startIndex": 19, - "endIndex": 21, - "score": 0.8905674 - }, - { - "entity": "jfk", - "type": "Airport", - "startIndex": 19, - "endIndex": 21, - "resolution": { - "values": [ - "New York" - ] - } - } - ], - "compositeEntities": [ - { - "parentType": "From", - "value": "cdg", - "children": [] - - }, - { - "parentType": "To", - "value": "jfk", - "children": [ - { - "type": "Airport", - "value": "jfk" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/FlightFromMadridToChicago.json b/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/FlightFromMadridToChicago.json deleted file mode 100644 index a001904c8f..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/FlightFromMadridToChicago.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "text": "flight from madrid to chicago", - "intents": { "BookFlight": { "score": 0.8837919 } }, - "entities": { - "$instance": { - "From": [ - { - "startIndex": 12, - "endIndex": 18, - "score": 0.888236344, - "text": "madrid", - "type": "From" - } - ], - "To": [ - { - "startIndex": 22, - "endIndex": 29, - "score": 0.640484631, - "text": "chicago", - "type": "To" - } - ] - }, - "From": [ { "$instance": {} } ], - "To": [ { "$instance": {} } ] - }, - "luisResult": { - "query": "flight from madrid to chicago", - "topScoringIntent": { - "intent": "BookFlight", - "score": 0.8837919 - }, - "entities": [ - { - "entity": "madrid", - "type": "From", - "startIndex": 12, - "endIndex": 17, - "score": 0.888236344 - }, - { - "entity": "chicago", - "type": "To", - "startIndex": 22, - "endIndex": 28, - "score": 0.640484631 - } - ], - "compositeEntities": [ - { - "parentType": "From", - "value": "madrid", - "children": [] - }, - { - "parentType": "To", - "value": "chicago", - "children": [] - } - ] - } -} \ No newline at end of file diff --git a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/FlightFromParisToNewYork.json b/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/FlightFromParisToNewYork.json deleted file mode 100644 index be15e91eb6..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/FlightFromParisToNewYork.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "text": "flight from paris to new york", - "intents": { "BookFlight": { "score": 0.9953049 } }, - "entities": { - "$instance": { - "From": [ - { - "startIndex": 12, - "endIndex": 17, - "score": 0.94712317, - "text": "paris", - "type": "From" - } - ], - "To": [ - { - "startIndex": 21, - "endIndex": 29, - "score": 0.8602996, - "text": "new york", - "type": "To" - } - ] - }, - "From": [ - { - "$instance": { - "Airport": [ - { - "startIndex": 12, - "endIndex": 17, - "text": "paris", - "type": "Airport" - } - ] - }, - "Airport": [ [ "Paris" ] ] - } - ], - "To": [ - { - "$instance": { - "Airport": [ - { - "startIndex": 21, - "endIndex": 29, - "text": "new york", - "type": "Airport" - } - ] - }, - "Airport": [ [ "New York" ] ] - } - ] - }, - "luisResult": { - "query": "flight from paris to new york", - "topScoringIntent": { - "intent": "BookFlight", - "score": 0.9953049 - }, - "entities": [ - { - "entity": "paris", - "type": "From", - "startIndex": 12, - "endIndex": 16, - "score": 0.94712317 - }, - { - "entity": "new york", - "type": "To", - "startIndex": 21, - "endIndex": 28, - "score": 0.8602996 - }, - { - "entity": "paris", - "type": "Airport", - "startIndex": 12, - "endIndex": 16, - "resolution": { "values": [ "Paris" ] } - }, - { - "entity": "new york", - "type": "Airport", - "startIndex": 21, - "endIndex": 28, - "resolution": { "values": [ "New York" ] } - } - ], - "compositeEntities": [ - { - "parentType": "From", - "value": "paris", - "children": [ - { - "type": "Airport", - "value": "paris" - } - ] - }, - { - "parentType": "To", - "value": "new york", - "children": [ - { - "type": "Airport", - "value": "new york" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/FlightToMadrid.json b/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/FlightToMadrid.json deleted file mode 100644 index 992d8f1ed9..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/FlightToMadrid.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "text": "flight to madrid", - "intents": { "BookFlight": { "score": 0.8476145 } }, - "entities": { - "$instance": { - "To": [ - { - "startIndex": 10, - "endIndex": 16, - "score": 0.7892059, - "text": "madrid", - "type": "To" - } - ] - }, - "To": [ { "$instance": {} } ] - }, - "luisResult": { - "query": "flight to madrid", - "topScoringIntent": { - "intent": "BookFlight", - "score": 0.8476145 - }, - "entities": [ - { - "entity": "madrid", - "type": "To", - "startIndex": 10, - "endIndex": 15, - "score": 0.7892059 - } - ], - "compositeEntities": [ - { - "parentType": "To", - "value": "madrid", - "children": [] - } - ] - } -} \ No newline at end of file diff --git a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/bookingDialogTestCases.js b/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/bookingDialogTestCases.js deleted file mode 100644 index 4869b1e203..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/bookingDialogTestCases.js +++ /dev/null @@ -1,152 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const now = new Date(); -const today = formatDate(new Date()); -const tomorrow = formatDate(new Date().setDate(now.getDate() + 1)); - -function formatDate(date) { - const d = new Date(date); - let month = '' + (d.getMonth() + 1); - let day = '' + d.getDate(); - const year = d.getFullYear(); - - if (month.length < 2) month = '0' + month; - if (day.length < 2) day = '0' + day; - - return [year, month, day].join('-'); -} - -module.exports = [ - { - name: 'Full flow', - initialData: {}, - steps: [ - ['hi', 'To what city would you like to travel?'], - ['Seattle', 'From what city will you be travelling?'], - ['New York', 'On what date would you like to travel?'], - ['tomorrow', `Please confirm, I have you traveling to: Seattle from: New York on: ${ tomorrow }. Is this correct? (1) Yes or (2) No`], - ['yes', null] - ], - expectedStatus: 'complete', - expectedResult: { - destination: 'Seattle', - origin: 'New York', - travelDate: tomorrow - } - }, - { - name: 'Full flow with \'no\' at confirmation', - initialData: {}, - steps: [ - ['hi', 'To what city would you like to travel?'], - ['Seattle', 'From what city will you be travelling?'], - ['New York', 'On what date would you like to travel?'], - ['tomorrow', `Please confirm, I have you traveling to: Seattle from: New York on: ${ tomorrow }. Is this correct? (1) Yes or (2) No`], - ['no', null] - ], - expectedStatus: 'complete', - expectedResult: undefined - }, - { - name: 'Destination given', - initialData: { - destination: 'Bahamas' - }, - steps: [ - ['hi', 'From what city will you be travelling?'], - ['New York', 'On what date would you like to travel?'], - ['tomorrow', `Please confirm, I have you traveling to: Bahamas from: New York on: ${ tomorrow }. Is this correct? (1) Yes or (2) No`], - ['yes', null] - ], - expectedStatus: 'complete', - expectedResult: { - origin: 'New York', - destination: 'Bahamas', - travelDate: tomorrow - } - }, - { - name: 'Destination and origin given', - initialData: { - destination: 'Seattle', - origin: 'New York' - }, - steps: [ - ['hi', 'On what date would you like to travel?'], - ['tomorrow', `Please confirm, I have you traveling to: Seattle from: New York on: ${ tomorrow }. Is this correct? (1) Yes or (2) No`], - ['yes', null] - ], - expectedStatus: 'complete', - expectedResult: { - destination: 'Seattle', - origin: 'New York', - travelDate: tomorrow - } - }, - { - name: 'All booking details given for today', - initialData: { - destination: 'Seattle', - origin: 'Bahamas', - travelDate: today - }, - steps: [ - ['hi', `Please confirm, I have you traveling to: Seattle from: Bahamas on: ${ today }. Is this correct? (1) Yes or (2) No`], - ['yes', null] - ], - expectedStatus: 'complete', - expectedResult: { - destination: 'Seattle', - origin: 'Bahamas', - travelDate: today - } - }, - { - name: 'Cancel on origin prompt', - initialData: {}, - steps: [ - ['hi', 'To what city would you like to travel?'], - ['cancel', 'Cancelling...'] - ], - expectedStatus: 'complete', - expectedResult: undefined - }, - { - name: 'Cancel on destination prompt', - initialData: {}, - steps: [ - ['hi', 'To what city would you like to travel?'], - ['Seattle', 'From what city will you be travelling?'], - ['cancel', 'Cancelling...'] - ], - expectedStatus: 'complete', - expectedResult: undefined - }, - { - name: 'Cancel on date prompt', - initialData: {}, - steps: [ - ['hi', 'To what city would you like to travel?'], - ['Seattle', 'From what city will you be travelling?'], - ['New York', 'On what date would you like to travel?'], - ['cancel', 'Cancelling...'] - ], - expectedStatus: 'complete', - expectedResult: undefined - }, - { - name: 'Cancel on confirm prompt', - initialData: {}, - steps: [ - ['hi', 'To what city would you like to travel?'], - ['Seattle', 'From what city will you be travelling?'], - ['New York', 'On what date would you like to travel?'], - ['tomorrow', `Please confirm, I have you traveling to: Seattle from: New York on: ${ tomorrow }. Is this correct? (1) Yes or (2) No`], - ['cancel', 'Cancelling...'] - ], - expectedStatus: 'complete', - expectedResult: undefined - } -]; diff --git a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/bookingDialogTestCases.ts b/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/bookingDialogTestCases.ts deleted file mode 100644 index a42457e6cc..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/bookingDialogTestCases.ts +++ /dev/null @@ -1,152 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const bookingDialogNow = new Date(); -const bookingDialogToday = formatBookingDialogDate(new Date()); -const bookingDialogTomorrow = formatBookingDialogDate(new Date().setDate(bookingDialogNow.getDate() + 1)); - -function formatBookingDialogDate(date) { - const d = new Date(date); - let month = '' + (d.getMonth() + 1); - let day = '' + d.getDate(); - const year = d.getFullYear(); - - if (month.length < 2) month = '0' + month; - if (day.length < 2) day = '0' + day; - - return [year, month, day].join('-'); -} - -module.exports = [ - { - expectedResult: { - destination: 'Seattle', - origin: 'New York', - travelDate: bookingDialogTomorrow - }, - expectedStatus: 'complete', - initialData: {}, - name: 'Full flow', - steps: [ - ['hi', 'To what city would you like to travel?'], - ['Seattle', 'From what city will you be travelling?'], - ['New York', 'On what date would you like to travel?'], - ['tomorrow', `Please confirm, I have you traveling to: Seattle from: New York on: ${ bookingDialogTomorrow }. Is this correct? (1) Yes or (2) No`], - ['yes', null] - ] - }, - { - expectedResult: undefined, - expectedStatus: 'complete', - initialData: {}, - name: 'Full flow with \'no\' at confirmation', - steps: [ - ['hi', 'To what city would you like to travel?'], - ['Seattle', 'From what city will you be travelling?'], - ['New York', 'On what date would you like to travel?'], - ['tomorrow', `Please confirm, I have you traveling to: Seattle from: New York on: ${ bookingDialogTomorrow }. Is this correct? (1) Yes or (2) No`], - ['no', null] - ] - }, - { - expectedResult: { - destination: 'Bahamas', - origin: 'New York', - travelDate: bookingDialogTomorrow - }, - expectedStatus: 'complete', - initialData: { - destination: 'Bahamas' - }, - name: 'Destination given', - steps: [ - ['hi', 'From what city will you be travelling?'], - ['New York', 'On what date would you like to travel?'], - ['tomorrow', `Please confirm, I have you traveling to: Bahamas from: New York on: ${ bookingDialogTomorrow }. Is this correct? (1) Yes or (2) No`], - ['yes', null] - ] - }, - { - expectedResult: { - destination: 'Seattle', - origin: 'New York', - travelDate: bookingDialogTomorrow - }, - expectedStatus: 'complete', - initialData: { - destination: 'Seattle', - origin: 'New York' - }, - name: 'Destination and origin given', - steps: [ - ['hi', 'On what date would you like to travel?'], - ['tomorrow', `Please confirm, I have you traveling to: Seattle from: New York on: ${ bookingDialogTomorrow }. Is this correct? (1) Yes or (2) No`], - ['yes', null] - ] - }, - { - expectedResult: { - destination: 'Seattle', - origin: 'Bahamas', - travelDate: bookingDialogToday - }, - expectedStatus: 'complete', - initialData: { - destination: 'Seattle', - origin: 'Bahamas', - travelDate: bookingDialogToday - }, - name: 'All booking details given for today', - steps: [ - ['hi', `Please confirm, I have you traveling to: Seattle from: Bahamas on: ${ bookingDialogToday }. Is this correct? (1) Yes or (2) No`], - ['yes', null] - ] - }, - { - expectedResult: undefined, - expectedStatus: 'complete', - initialData: {}, - name: 'Cancel on origin prompt', - steps: [ - ['hi', 'To what city would you like to travel?'], - ['cancel', 'Cancelling...'] - ] - }, - { - expectedResult: undefined, - expectedStatus: 'complete', - initialData: {}, - name: 'Cancel on destination prompt', - steps: [ - ['hi', 'To what city would you like to travel?'], - ['Seattle', 'From what city will you be travelling?'], - ['cancel', 'Cancelling...'] - ] - }, - { - expectedResult: undefined, - expectedStatus: 'complete', - initialData: {}, - name: 'Cancel on date prompt', - steps: [ - ['hi', 'To what city would you like to travel?'], - ['Seattle', 'From what city will you be travelling?'], - ['New York', 'On what date would you like to travel?'], - ['cancel', 'Cancelling...'] - ] - }, - { - expectedResult: undefined, - expectedStatus: 'complete', - initialData: {}, - name: 'Cancel on confirm prompt', - steps: [ - ['hi', 'To what city would you like to travel?'], - ['Seattle', 'From what city will you be travelling?'], - ['New York', 'On what date would you like to travel?'], - ['tomorrow', `Please confirm, I have you traveling to: Seattle from: New York on: ${ bookingDialogTomorrow }. Is this correct? (1) Yes or (2) No`], - ['cancel', 'Cancelling...'] - ] - } -]; diff --git a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/dateResolverTestCases.js b/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/dateResolverTestCases.js deleted file mode 100644 index 66857238f8..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/dateResolverTestCases.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const now = new Date(); -const tomorrow = formatDate(new Date().setDate(now.getDate() + 1)); -const dayAfterTomorrow = formatDate(new Date().setDate(now.getDate() + 2)); - -function formatDate(date) { - const d = new Date(date); - let month = '' + (d.getMonth() + 1); - let day = '' + d.getDate(); - const year = d.getFullYear(); - - if (month.length < 2) month = '0' + month; - if (day.length < 2) day = '0' + day; - - return [year, month, day].join('-'); -} - -module.exports = [ - { - name: 'tomorrow', - initialData: null, - steps: [ - ['hi', 'On what date would you like to travel?'], - ['tomorrow', null] - ], - expectedResult: tomorrow - }, - { - name: 'the day after tomorrow', - initialData: null, - steps: [ - ['hi', 'On what date would you like to travel?'], - ['the day after tomorrow', null] - ], - expectedResult: dayAfterTomorrow - }, - { - name: 'two days from now', - initialData: null, - steps: [ - ['hi', 'On what date would you like to travel?'], - ['two days from now', null] - ], - expectedResult: dayAfterTomorrow - }, - { - name: 'valid input given (tomorrow)', - initialData: { date: tomorrow }, - steps: [ - ['hi', null] - ], - expectedResult: tomorrow - }, - { - name: 'retry prompt', - initialData: {}, - steps: [ - ['hi', 'On what date would you like to travel?'], - ['bananas', 'I\'m sorry, for best results, please enter your travel date including the month, day and year.'], - ['tomorrow', null] - ], - expectedResult: tomorrow - }, - { - name: 'fuzzy time', - initialData: {}, - steps: [ - ['hi', 'On what date would you like to travel?'], - ['may 5th', 'I\'m sorry, for best results, please enter your travel date including the month, day and year.'], - ['may 5th 2055', null] - ], - expectedResult: '2055-05-05' - } -]; diff --git a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/dateResolverTestCases.ts b/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/dateResolverTestCases.ts deleted file mode 100644 index 241a430836..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/tests/dialogs/testData/dateResolverTestCases.ts +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const now = new Date(); -const tomorrow = formatDate(new Date().setDate(now.getDate() + 1)); -const dayAfterTomorrow = formatDate(new Date().setDate(now.getDate() + 2)); - -function formatDate(date) { - const d = new Date(date); - let month = '' + (d.getMonth() + 1); - let day = '' + d.getDate(); - const year = d.getFullYear(); - - if (month.length < 2) month = '0' + month; - if (day.length < 2) day = '0' + day; - - return [year, month, day].join('-'); -} - -module.exports = [ - { - expectedResult: tomorrow, - initialData: null, - name: 'tomorrow', - steps: [ - ['hi', 'On what date would you like to travel?'], - ['tomorrow', null] - ] - }, - { - expectedResult: dayAfterTomorrow, - initialData: null, - name: 'the day after tomorrow', - steps: [ - ['hi', 'On what date would you like to travel?'], - ['the day after tomorrow', null] - ] - }, - { - expectedResult: dayAfterTomorrow, - initialData: null, - name: 'two days from now', - steps: [ - ['hi', 'On what date would you like to travel?'], - ['two days from now', null] - ] - }, - { - expectedResult: tomorrow, - initialData: { date: tomorrow }, - name: 'valid input given (tomorrow)', - steps: [ - ['hi', null] - ] - }, - { - expectedResult: tomorrow, - initialData: {}, - name: 'retry prompt', - steps: [ - ['hi', 'On what date would you like to travel?'], - ['bananas', 'I\'m sorry, for best results, please enter your travel date including the month, day and year.'], - ['tomorrow', null] - ] - }, - { - expectedResult: '2055-05-05', - initialData: {}, - name: 'fuzzy time', - steps: [ - ['hi', 'On what date would you like to travel?'], - ['may 5th', 'I\'m sorry, for best results, please enter your travel date including the month, day and year.'], - ['may 5th 2055', null] - ] - } -]; diff --git a/generators/generator-botbuilder/generators/app/templates/core/tsconfig.json b/generators/generator-botbuilder/generators/app/templates/core/tsconfig.json deleted file mode 100644 index 7c70e81a34..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "composite": true, - "declaration": true, - "target": "es2017", - "module": "NodeNext", - "moduleResolution": "NodeNext", - "outDir": "./lib", - "rootDir": "./src", - "resolveJsonModule": true, - "rootDirs": ["./src", "./resources"], - "sourceMap": true, - "incremental": true, - "tsBuildInfoFile": "./lib/.tsbuildinfo", - "esModuleInterop": true - } -} diff --git a/generators/generator-botbuilder/generators/app/templates/core/tslint.json b/generators/generator-botbuilder/generators/app/templates/core/tslint.json deleted file mode 100644 index ad00715f85..0000000000 --- a/generators/generator-botbuilder/generators/app/templates/core/tslint.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "defaultSeverity": "error", - "extends": [ - "tslint:recommended" - ], - "jsRules": {}, - "rules": { - "interface-name" : [true, "never-prefix"], - "max-line-length": [false], - "no-console": [false, "log", "error"], - "no-var-requires": false, - "quotemark": [true, "single"], - "one-variable-per-declaration": false, - "curly": [true, "ignore-same-line"], - "trailing-comma": [true, {"multiline": "never", "singleline": "never"}] - }, - "rulesDirectory": [] -} diff --git a/generators/generator-botbuilder/generators/app/templates/echo/bot.js b/generators/generator-botbuilder/generators/app/templates/echo/bot.js index 2c4c88e95c..14f16cd9ec 100644 --- a/generators/generator-botbuilder/generators/app/templates/echo/bot.js +++ b/generators/generator-botbuilder/generators/app/templates/echo/bot.js @@ -12,7 +12,7 @@ class EchoBot extends ActivityHandler { }); this.onMembersAdded(async (context, next) => { - const membersAdded = context.activity.membersAdded; + const membersAdded = context.activity.membersAdded ?? []; const welcomeText = 'Hello and welcome!'; for (let cnt = 0; cnt < membersAdded.length; ++cnt) { if (membersAdded[cnt].id !== context.activity.recipient.id) { diff --git a/generators/generator-botbuilder/generators/app/templates/echo/index.js b/generators/generator-botbuilder/generators/app/templates/echo/index.js index ebfeaeeb76..ea198f1f8c 100644 --- a/generators/generator-botbuilder/generators/app/templates/echo/index.js +++ b/generators/generator-botbuilder/generators/app/templates/echo/index.js @@ -11,8 +11,7 @@ const restify = require('restify'); // See https://aka.ms/bot-services to learn more about the different parts of a bot. const { CloudAdapter, - ConfigurationServiceClientCredentialFactory, - createBotFrameworkAuthenticationFromConfiguration + ConfigurationBotFrameworkAuthentication } = require('botbuilder'); // This bot's main dialog. @@ -28,14 +27,7 @@ server.listen(process.env.port || process.env.PORT || 3978, () => { console.log('\nTo talk to your bot, open the emulator select "Open Bot"'); }); -const credentialsFactory = new ConfigurationServiceClientCredentialFactory({ - MicrosoftAppId: process.env.MicrosoftAppId, - MicrosoftAppPassword: process.env.MicrosoftAppPassword, - MicrosoftAppType: process.env.MicrosoftAppType, - MicrosoftAppTenantId: process.env.MicrosoftAppTenantId -}); - -const botFrameworkAuthentication = createBotFrameworkAuthenticationFromConfiguration(null, credentialsFactory); +const botFrameworkAuthentication = new ConfigurationBotFrameworkAuthentication(process.env); // Create adapter. // See https://aka.ms/about-bot-adapter to learn more about adapters. @@ -45,7 +37,8 @@ const adapter = new CloudAdapter(botFrameworkAuthentication); const onTurnErrorHandler = async (context, error) => { // This check writes out errors to console log .vs. app insights. // NOTE: In production environment, you should consider logging this to Azure - // application insights. + // application insights. See https://aka.ms/bottelemetry for telemetry + // configuration instructions. console.error(`\n [onTurnError] unhandled error: ${ error }`); // Send a trace activity, which will be displayed in Bot Framework Emulator diff --git a/generators/generator-botbuilder/generators/app/templates/echo/index.ts b/generators/generator-botbuilder/generators/app/templates/echo/index.ts index fe89d48876..0717124cf5 100644 --- a/generators/generator-botbuilder/generators/app/templates/echo/index.ts +++ b/generators/generator-botbuilder/generators/app/templates/echo/index.ts @@ -12,14 +12,13 @@ import { INodeSocket } from 'botframework-streaming'; // See https://aka.ms/bot-services to learn more about the different parts of a bot. import { CloudAdapter, - ConfigurationServiceClientCredentialFactory, - createBotFrameworkAuthenticationFromConfiguration + ConfigurationBotFrameworkAuthentication, + ConfigurationBotFrameworkAuthenticationOptions } from 'botbuilder'; // This bot's main dialog. import { EchoBot } from './bot'; - // Create HTTP server. const server = restify.createServer(); server.use(restify.plugins.bodyParser()); @@ -30,14 +29,9 @@ server.listen(process.env.port || process.env.PORT || 3978, () => { console.log('\nTo talk to your bot, open the emulator select "Open Bot"'); }); -const credentialsFactory = new ConfigurationServiceClientCredentialFactory({ - MicrosoftAppId: process.env.MicrosoftAppId, - MicrosoftAppPassword: process.env.MicrosoftAppPassword, - MicrosoftAppType: process.env.MicrosoftAppType, - MicrosoftAppTenantId: process.env.MicrosoftAppTenantId -}); - -const botFrameworkAuthentication = createBotFrameworkAuthenticationFromConfiguration(null, credentialsFactory); +const botFrameworkAuthentication = new ConfigurationBotFrameworkAuthentication( + process.env as ConfigurationBotFrameworkAuthenticationOptions +); // Create adapter. // See https://aka.ms/about-bot-adapter to learn more about adapters. diff --git a/generators/generator-botbuilder/generators/app/templates/echo/package.json.js b/generators/generator-botbuilder/generators/app/templates/echo/package.json.js index 775968502c..d5b8d7f888 100644 --- a/generators/generator-botbuilder/generators/app/templates/echo/package.json.js +++ b/generators/generator-botbuilder/generators/app/templates/echo/package.json.js @@ -2,7 +2,7 @@ "name": "<%= botname %>", "version": "4.1.6", "description": "<%= botDescription %>", - "author": "Generated using Microsoft Bot Builder Yeoman generator v<%= version %>", + "author": "Generated using Microsoft Bot Builder Yeoman generator v5", "license": "MIT", "main": "<%= npmMain %>", "scripts": { diff --git a/generators/generator-botbuilder/generators/app/templates/echo/package.json.ts b/generators/generator-botbuilder/generators/app/templates/echo/package.json.ts index a585870422..73479c8696 100644 --- a/generators/generator-botbuilder/generators/app/templates/echo/package.json.ts +++ b/generators/generator-botbuilder/generators/app/templates/echo/package.json.ts @@ -2,7 +2,7 @@ "name": "<%= botname %>", "version": "4.1.6", "description": "<%= botDescription %>", - "author": "Generated using Microsoft Bot Builder Yeoman generator v<%= version %>", + "author": "Generated using Microsoft Bot Builder Yeoman generator v5", "license": "MIT", "main": "<%= npmMain %>", "scripts": { @@ -24,10 +24,11 @@ "restify": "~11.1.0" }, "devDependencies": { - "@types/node": "^18.19.47", + "@types/dotenv": "6.1.1", + "@types/node": "^18.19.123", "@types/restify": "8.4.2", "nodemon": "^2.0.4", "tslint": "^6.1.2", - "typescript": "^5.6.3" + "typescript": "^5.9.0" } } diff --git a/generators/generator-botbuilder/generators/app/templates/empty/bot.js b/generators/generator-botbuilder/generators/app/templates/empty/bot.js index 13eccbf38d..3cd1da631e 100644 --- a/generators/generator-botbuilder/generators/app/templates/empty/bot.js +++ b/generators/generator-botbuilder/generators/app/templates/empty/bot.js @@ -4,7 +4,7 @@ class EmptyBot extends ActivityHandler { constructor() { super(); this.onMembersAdded(async (context, next) => { - const membersAdded = context.activity.membersAdded; + const membersAdded = context.activity.membersAdded ?? []; for (let cnt = 0; cnt < membersAdded.length; ++cnt) { if (membersAdded[cnt].id !== context.activity.recipient.id) { await context.sendActivity('Hello world!'); diff --git a/generators/generator-botbuilder/generators/app/templates/empty/index.js b/generators/generator-botbuilder/generators/app/templates/empty/index.js index 7d4c1bf143..95be34e3aa 100644 --- a/generators/generator-botbuilder/generators/app/templates/empty/index.js +++ b/generators/generator-botbuilder/generators/app/templates/empty/index.js @@ -1,11 +1,17 @@ +const path = require('path'); +const dotenv = require('dotenv'); + +// Import required bot configuration. +const ENV_FILE = path.join(__dirname, '.env'); +dotenv.config({ path: ENV_FILE }); + const restify = require('restify'); // Import required bot services. // See https://aka.ms/bot-services to learn more about the different parts of a bot. const { CloudAdapter, - ConfigurationServiceClientCredentialFactory, - createBotFrameworkAuthenticationFromConfiguration + ConfigurationBotFrameworkAuthentication } = require('botbuilder'); // This bot's main dialog. @@ -17,26 +23,22 @@ server.use(restify.plugins.bodyParser()); server.listen(process.env.port || process.env.PORT || 3978, () => { console.log(`\n${ server.name } listening to ${ server.url }`); + console.log('\nGet Bot Framework Emulator: https://aka.ms/botframework-emulator'); + console.log('\nTo talk to your bot, open the emulator select "Open Bot"'); }); -const credentialsFactory = new ConfigurationServiceClientCredentialFactory({ - MicrosoftAppId: process.env.MicrosoftAppId, - MicrosoftAppPassword: process.env.MicrosoftAppPassword, - MicrosoftAppType: process.env.MicrosoftAppType, - MicrosoftAppTenantId: process.env.MicrosoftAppTenantId -}); - -const botFrameworkAuthentication = createBotFrameworkAuthenticationFromConfiguration(null, credentialsFactory); +const botFrameworkAuthentication = new ConfigurationBotFrameworkAuthentication(process.env); // Create adapter. // See https://aka.ms/about-bot-adapter to learn more about adapters. const adapter = new CloudAdapter(botFrameworkAuthentication); // Catch-all for errors. -adapter.onTurnError = async (context, error) => { +const onTurnErrorHandler = async (context, error) => { // This check writes out errors to console log .vs. app insights. // NOTE: In production environment, you should consider logging this to Azure - // application insights. + // application insights. See https://aka.ms/bottelemetry for telemetry + // configuration instructions. console.error(`\n [onTurnError] unhandled error: ${ error }`); // Send a trace activity, which will be displayed in Bot Framework Emulator @@ -52,6 +54,9 @@ adapter.onTurnError = async (context, error) => { await context.sendActivity('To continue to run this bot, please fix the bot source code.'); }; +// Set the onTurnError for the singleton CloudAdapter. +adapter.onTurnError = onTurnErrorHandler; + // Create the main dialog. const myBot = new EmptyBot(); diff --git a/generators/generator-botbuilder/generators/app/templates/empty/index.ts b/generators/generator-botbuilder/generators/app/templates/empty/index.ts index ec8ab1e295..b72f18bdee 100644 --- a/generators/generator-botbuilder/generators/app/templates/empty/index.ts +++ b/generators/generator-botbuilder/generators/app/templates/empty/index.ts @@ -1,39 +1,42 @@ +import * as path from 'path'; import * as restify from 'restify'; // Import required bot services. // See https://aka.ms/bot-services to learn more about the different parts of a bot. import { CloudAdapter, - ConfigurationServiceClientCredentialFactory, - createBotFrameworkAuthenticationFromConfiguration + ConfigurationBotFrameworkAuthentication, + ConfigurationBotFrameworkAuthenticationOptions } from 'botbuilder'; // This bot's main dialog. import { EmptyBot } from './bot'; +import { config } from 'dotenv'; + +const ENV_FILE = path.join(__dirname, '..', '.env'); +config({ path: ENV_FILE }); + // Create HTTP server. const server = restify.createServer(); server.use(restify.plugins.bodyParser()); server.listen(process.env.port || process.env.PORT || 3978, () => { console.log(`\n${ server.name } listening to ${ server.url }`); + console.log('\nGet Bot Framework Emulator: https://aka.ms/botframework-emulator'); + console.log('\nTo talk to your bot, open the emulator select "Open Bot"'); }); -const credentialsFactory = new ConfigurationServiceClientCredentialFactory({ - MicrosoftAppId: process.env.MicrosoftAppId, - MicrosoftAppPassword: process.env.MicrosoftAppPassword, - MicrosoftAppType: process.env.MicrosoftAppType, - MicrosoftAppTenantId: process.env.MicrosoftAppTenantId -}); - -const botFrameworkAuthentication = createBotFrameworkAuthenticationFromConfiguration(null, credentialsFactory); +const botFrameworkAuthentication = new ConfigurationBotFrameworkAuthentication( + process.env as ConfigurationBotFrameworkAuthenticationOptions +); // Create adapter. // See https://aka.ms/about-bot-adapter to learn more about adapters. const adapter = new CloudAdapter(botFrameworkAuthentication); // Catch-all for errors. -adapter.onTurnError = async (context, error) => { +const onTurnErrorHandler = async (context, error) => { // This check writes out errors to console log .vs. app insights. // NOTE: In production environment, you should consider logging this to Azure // application insights. @@ -52,6 +55,9 @@ adapter.onTurnError = async (context, error) => { await context.sendActivity('To continue to run this bot, please fix the bot source code.'); }; +// Set the onTurnError for the singleton CloudAdapter. +adapter.onTurnError = onTurnErrorHandler; + // Create the main dialog. const myBot = new EmptyBot(); diff --git a/generators/generator-botbuilder/generators/app/templates/empty/package.json.js b/generators/generator-botbuilder/generators/app/templates/empty/package.json.js index 1789e68fcd..d5b8d7f888 100644 --- a/generators/generator-botbuilder/generators/app/templates/empty/package.json.js +++ b/generators/generator-botbuilder/generators/app/templates/empty/package.json.js @@ -2,7 +2,7 @@ "name": "<%= botname %>", "version": "4.1.6", "description": "<%= botDescription %>", - "author": "Generated using Microsoft Bot Builder Yeoman generator v<%= version %>", + "author": "Generated using Microsoft Bot Builder Yeoman generator v5", "license": "MIT", "main": "<%= npmMain %>", "scripts": { @@ -17,6 +17,7 @@ }, "dependencies": { "botbuilder": "4.1.6", + "dotenv": "~8.2.0", "restify": "~11.1.0" }, "devDependencies": { diff --git a/generators/generator-botbuilder/generators/app/templates/empty/package.json.ts b/generators/generator-botbuilder/generators/app/templates/empty/package.json.ts index 37fd94e37c..4799f4d216 100644 --- a/generators/generator-botbuilder/generators/app/templates/empty/package.json.ts +++ b/generators/generator-botbuilder/generators/app/templates/empty/package.json.ts @@ -2,7 +2,7 @@ "name": "<%= botname %>", "version": "4.1.6", "description": "<%= botDescription %>", - "author": "Generated using Microsoft Bot Builder Yeoman generator v<%= version %>", + "author": "Generated using Microsoft Bot Builder Yeoman generator v5", "license": "MIT", "main": "<%= npmMain %>", "scripts": { @@ -20,13 +20,15 @@ "dependencies": { "botbuilder": "4.1.6", "replace": "~1.2.0", + "dotenv": "~8.2.0", "restify": "~11.1.0" }, "devDependencies": { - "@types/node": "^18.19.47", + "@types/dotenv": "6.1.1", + "@types/node": "^18.19.123", "@types/restify": "8.4.2", "nodemon": "^2.0.4", "tslint": "^6.1.2", - "typescript": "^5.6.3" + "typescript": "^5.9.0" } } diff --git a/generators/generator-botbuilder/testGen.cmd b/generators/generator-botbuilder/testGen.cmd index af744cf507..38afc03acb 100644 --- a/generators/generator-botbuilder/testGen.cmd +++ b/generators/generator-botbuilder/testGen.cmd @@ -58,53 +58,6 @@ npm run lint cd .. -# -# Core bot in TypeScript -# -echo Generating my-core-bot-ts -yo botbuilder -N "my-core-bot-ts" -D "A core bot in ts" -L "TypeScript" -T "core" --noprompt -cd ./my-core-bot-ts -echo building and linting my-core-bot-ts -npm run build -npm run lint -cd .. - - -# -# Core bot with tests in TypeScript -# -echo Generating my-core-bot-with-tests-ts -yo botbuilder -N "my-core-bot-with-tests-ts" -D "A core bot with tests in ts" -L "TypeScript" -T "core" --addtests --noprompt -cd ./my-core-bot-with-tests-ts -echo building and linting my-core-bot-with-tests-ts -npm run build -npm run lint -npm test -cd .. - - -# -# Core bot in JavaScript -# -echo Generating my-core-bot-js -yo botbuilder -N "my-core-bot-js" -D "A core bot in js" -L "JavaScript" -T "core" --noprompt -cd ./my-core-bot-js -echo linting my-core-bot-js -npm run lint -cd .. - - -# -# Core bot with tests in JavaScript -# -echo Generating my-core-bot-with-tests-js -yo botbuilder -N "my-core-bot-with-tests-js" -D "A core bot with tests in js" -L "JavaScript" -T "core" --addtests --noprompt -cd ./my-core-bot-with-tests-js -echo linting my-core-bot-with-tests-js -npm run lint -npm test -cd .. - if [ "$1" = nocleanup ] || [ "$1" = noclean ] then echo "*****************************************************************************" @@ -135,28 +88,4 @@ else # Echo bot in JavaScript # rm -rf ./my-echo-bot-js - - - # - # Core bot in TypeScript - # - rm -rf ./my-core-bot-ts - - - # - # Core bot with tests in TypeScript - # - rm -rf ./my-core-bot-with-tests-ts - - - # - # Core bot in JavaScript - # - rm -rf ./my-core-bot-js - - - # - # Core bot with tests in JavaScript - # - rm -rf ./my-core-bot-with-tests-js fi diff --git a/libraries/adaptive-expressions/package.json b/libraries/adaptive-expressions/package.json index a04a096a20..f76625ae55 100644 --- a/libraries/adaptive-expressions/package.json +++ b/libraries/adaptive-expressions/package.json @@ -49,7 +49,7 @@ "devDependencies": { "@types/jspath": "^0.4.2", "antlr4ts-cli": "0.5.0-alpha.4", - "typescript": "~4.7" + "typescript": "~4.8" }, "scripts": { "build": "npm-run-all build:src build:tests build:browser", diff --git a/libraries/botbuilder-ai/etc/botbuilder-ai.api.md b/libraries/botbuilder-ai/etc/botbuilder-ai.api.md index 780e37e44e..27f2599fa2 100644 --- a/libraries/botbuilder-ai/etc/botbuilder-ai.api.md +++ b/libraries/botbuilder-ai/etc/botbuilder-ai.api.md @@ -28,7 +28,7 @@ import { ObjectExpression } from 'adaptive-expressions'; import { Recognizer } from 'botbuilder-dialogs'; import { RecognizerConfiguration } from 'botbuilder-dialogs'; import { RecognizerResult } from 'botbuilder-core'; -import { RequestOptionsBase } from '@azure/core-http'; +import { RequestOptionsBase } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; import { ServiceCollection } from 'botbuilder-dialogs-adaptive-runtime-core'; import { StringExpression } from 'adaptive-expressions'; import { TemplateInterface } from 'botbuilder-dialogs'; @@ -531,6 +531,7 @@ export class QnAMakerDialog extends WaterfallDialog implements QnAMakerDialogCon isTest: boolean; knowledgeBaseId: StringExpression; logPersonalInformation: BoolExpression; + managedIdentityClientId: StringExpression; noAnswer: TemplateInterface, DialogStateManager>; protected onPreBubbleEvent(dc: DialogContext, e: DialogEvent): Promise; protected options: string; @@ -543,6 +544,9 @@ export class QnAMakerDialog extends WaterfallDialog implements QnAMakerDialogCon threshold: NumberExpression; top: IntExpression; useTeamsAdaptiveCard: boolean; + // Warning: (ae-forgotten-export) The symbol "QnAMakerDialogWithoutOtherAuthorization" needs to be exported by the entry point index.d.ts + withEndpointKey(endpointKey: string): QnAMakerDialogWithoutOtherAuthorization; + withManagedIdentityClientId(managedIdentityClientId: string): QnAMakerDialogWithoutOtherAuthorization; } // @public @@ -562,9 +566,10 @@ export interface QnAMakerDialogResponseOptions { // @public export interface QnAMakerEndpoint { - endpointKey: string; + endpointKey?: string; host: string; knowledgeBaseId: string; + managedIdentityClientId?: string; qnaServiceType?: ServiceType; } diff --git a/libraries/botbuilder-ai/package.json b/libraries/botbuilder-ai/package.json index 01c382a39f..8f709b84a0 100644 --- a/libraries/botbuilder-ai/package.json +++ b/libraries/botbuilder-ai/package.json @@ -27,12 +27,13 @@ } }, "dependencies": { - "@azure/core-http": "^3.0.4", + "@azure/identity": "^4.4.1", "adaptive-expressions": "4.1.6", "botbuilder-core": "4.1.6", "botbuilder-dialogs": "4.1.6", "botbuilder-dialogs-adaptive-runtime-core": "4.1.6", "botbuilder-dialogs-declarative": "4.1.6", + "botbuilder-stdlib": "4.1.6", "botframework-connector": "4.1.6", "lodash": "^4.17.21", "node-fetch": "^2.7.0", diff --git a/libraries/botbuilder-ai/src/luisRecognizer.ts b/libraries/botbuilder-ai/src/luisRecognizer.ts index a40b8afb6e..310c240b9c 100644 --- a/libraries/botbuilder-ai/src/luisRecognizer.ts +++ b/libraries/botbuilder-ai/src/luisRecognizer.ts @@ -5,7 +5,7 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ -import { RequestOptionsBase } from '@azure/core-http'; +import { RequestOptionsBase } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; import Url from 'url-parse'; import { BotTelemetryClient, NullTelemetryClient, RecognizerResult, TurnContext } from 'botbuilder-core'; diff --git a/libraries/botbuilder-ai/src/luisRuntimeClientContext.ts b/libraries/botbuilder-ai/src/luisRuntimeClientContext.ts index c7df9e844c..dd6a5635df 100644 --- a/libraries/botbuilder-ai/src/luisRuntimeClientContext.ts +++ b/libraries/botbuilder-ai/src/luisRuntimeClientContext.ts @@ -4,14 +4,17 @@ * license information. */ -import { ServiceClient, ServiceClientCredentials, ServiceClientOptions } from '@azure/core-http'; +import { + ServiceClientContext, + ServiceClientCredentials, + ServiceClientOptions, +} from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; /** * Client for LUIS context */ -export class LUISRuntimeClientContext extends ServiceClient { +export class LUISRuntimeClientContext extends ServiceClientContext { endpoint: string; - credentials: ServiceClientCredentials; /** * Initializes a new instance of the LUISRuntimeClientContext class. @@ -33,11 +36,10 @@ export class LUISRuntimeClientContext extends ServiceClient { options = {}; } - super(credentials, options); + const baseUri = options?.baseUri || `${endpoint}/luis/v3.0-preview`; + + super(credentials, { ...options, baseUri }); - this.baseUri = '{Endpoint}/luis/v3.0-preview'; - this.requestContentType = 'application/json; charset=utf-8'; this.endpoint = endpoint; - this.credentials = credentials; } } diff --git a/libraries/botbuilder-ai/src/luisV2-models/luisMappers.ts b/libraries/botbuilder-ai/src/luisV2-models/luisMappers.ts index a33169405b..cd84bff8ad 100644 --- a/libraries/botbuilder-ai/src/luisV2-models/luisMappers.ts +++ b/libraries/botbuilder-ai/src/luisV2-models/luisMappers.ts @@ -6,7 +6,7 @@ * Licensed under the MIT License. */ -import { CompositeMapper } from '@azure/core-http'; +import { CompositeMapper } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; export const IntentModel: CompositeMapper = { serializedName: 'IntentModel', diff --git a/libraries/botbuilder-ai/src/luisV2-models/luisModels.ts b/libraries/botbuilder-ai/src/luisV2-models/luisModels.ts index 367bb25983..1c065ab869 100644 --- a/libraries/botbuilder-ai/src/luisV2-models/luisModels.ts +++ b/libraries/botbuilder-ai/src/luisV2-models/luisModels.ts @@ -4,7 +4,7 @@ * license information. */ -import { RequestOptionsBase, HttpResponse } from '@azure/core-http'; +import { RequestOptionsBase, HttpOperationResponse as HttpResponse } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; /** * Represents an intent prediction. diff --git a/libraries/botbuilder-ai/src/luisV2-models/luisParameters.ts b/libraries/botbuilder-ai/src/luisV2-models/luisParameters.ts index 8ff31939a0..2b8ce3a5e2 100644 --- a/libraries/botbuilder-ai/src/luisV2-models/luisParameters.ts +++ b/libraries/botbuilder-ai/src/luisV2-models/luisParameters.ts @@ -6,7 +6,7 @@ * Licensed under the MIT License. */ -import { OperationURLParameter, OperationQueryParameter } from '@azure/core-http'; +import { OperationURLParameter, OperationQueryParameter } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; export const appId: OperationURLParameter = { parameterPath: 'appId', diff --git a/libraries/botbuilder-ai/src/luisV2-models/luisPrediction.ts b/libraries/botbuilder-ai/src/luisV2-models/luisPrediction.ts index 54c1e950d8..9a4aeadaf9 100644 --- a/libraries/botbuilder-ai/src/luisV2-models/luisPrediction.ts +++ b/libraries/botbuilder-ai/src/luisV2-models/luisPrediction.ts @@ -6,7 +6,7 @@ * Licensed under the MIT License. */ -import { ServiceCallback, OperationSpec, Serializer } from '@azure/core-http'; +import { ServiceCallback, OperationSpec, createSerializer } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; import { LUISRuntimeClientContext } from '../luisRuntimeClientContext'; import { LuisResult, PredictionResolveOptionalParams, PredictionResolveResponse } from './luisResult'; import * as Parameters from './luisParameters'; @@ -83,7 +83,7 @@ export class LuisPrediction { } // Operation Specifications -const serializer = new Serializer(Mappers); +const serializer = createSerializer(Mappers); const resolveOperationSpec: OperationSpec = { httpMethod: 'POST', path: 'apps/{appId}', diff --git a/libraries/botbuilder-ai/src/luisV2-models/luisResult.ts b/libraries/botbuilder-ai/src/luisV2-models/luisResult.ts index 3c4feb8ffd..2094bf5c83 100644 --- a/libraries/botbuilder-ai/src/luisV2-models/luisResult.ts +++ b/libraries/botbuilder-ai/src/luisV2-models/luisResult.ts @@ -7,7 +7,7 @@ */ import { Sentiment } from './luisModels'; -import { HttpResponse, RequestOptionsBase } from '@azure/core-http'; +import { HttpOperationResponse as HttpResponse, RequestOptionsBase } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; /** * Prediction, based on the input query, containing intent(s) and entities. diff --git a/libraries/botbuilder-ai/src/luisV2-models/luisRuntimeClientV2.ts b/libraries/botbuilder-ai/src/luisV2-models/luisRuntimeClientV2.ts index 8e1ee25a77..d9a6df1413 100644 --- a/libraries/botbuilder-ai/src/luisV2-models/luisRuntimeClientV2.ts +++ b/libraries/botbuilder-ai/src/luisV2-models/luisRuntimeClientV2.ts @@ -6,7 +6,7 @@ * Licensed under the MIT License. */ -import { ServiceClientCredentials, ServiceClientOptions } from '@azure/core-http'; +import { ServiceClientCredentials, ServiceClientOptions } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; import * as Models from './luisResult'; import * as Mappers from './luisMappers'; import { LuisPrediction } from './luisPrediction'; @@ -30,9 +30,9 @@ class LUISRuntimeClientV2 extends LUISRuntimeClientContext { * @param [options] The parameter options */ constructor(credentials: ServiceClientCredentials, endpoint: string, options?: ServiceClientOptions) { - super(credentials, endpoint, options); + const baseUri = options?.baseUri || `${endpoint}/luis/v2.0`; + super(credentials, endpoint, { ...options, baseUri }); this.prediction = new LuisPrediction(this); - super.baseUri = '{Endpoint}/luis/v2.0'; } } diff --git a/libraries/botbuilder-ai/src/qnaMakerDialog.ts b/libraries/botbuilder-ai/src/qnaMakerDialog.ts index df5e4f19e7..d3b15e4f22 100644 --- a/libraries/botbuilder-ai/src/qnaMakerDialog.ts +++ b/libraries/botbuilder-ai/src/qnaMakerDialog.ts @@ -116,6 +116,7 @@ export interface QnAMakerDialogConfiguration extends DialogConfiguration { knowledgeBaseId?: string | Expression | StringExpression; hostname?: string | Expression | StringExpression; endpointKey?: string | Expression | StringExpression; + managedIdentityClientId?: string | Expression | StringExpression; threshold?: number | string | Expression | NumberExpression; top?: number | string | Expression | IntExpression; noAnswer?: string | Partial | TemplateInterface, DialogStateManager>; @@ -146,6 +147,8 @@ const qnaSuggestionsActivityFactory = z.custom((v message: 'QnASuggestionsActivityFactory', }); +type QnAMakerDialogWithoutOtherAuthorization = Omit; + /** * A dialog that supports multi-step and adaptive-learning QnA Maker services. * @@ -224,7 +227,12 @@ export class QnAMakerDialog extends WaterfallDialog implements QnAMakerDialogCon /** * Gets or sets the QnA Maker endpoint key to use to query the knowledge base. */ - endpointKey: StringExpression; + endpointKey: StringExpression = new StringExpression(''); + + /** + * Gets or sets the Managed Identity ClientId to use to query the knowledge base. + */ + managedIdentityClientId: StringExpression = new StringExpression(''); /** * Gets or sets the threshold for answers returned, based on score. @@ -335,7 +343,7 @@ export class QnAMakerDialog extends WaterfallDialog implements QnAMakerDialogCon * Initializes a new instance of the [QnAMakerDialog](xref:QnAMakerDialog) class. * * @param {string} knowledgeBaseId The ID of the QnA Maker knowledge base to query. - * @param {string} endpointKey The QnA Maker endpoint key to use to query the knowledge base. + * @param {string} endpointKey **Deprecated - use withEndpointKey() instead**. The QnA Maker endpoint key to use to query the knowledge base. * @param {string} hostname The QnA Maker host URL for the knowledge base, starting with "https://" and ending with "/qnamaker". * @param {string} noAnswer (Optional) The activity to send the user when QnA Maker does not find an answer. * @param {number} threshold (Optional) The threshold above which to treat answers found from the knowledgebase as a match. @@ -372,7 +380,7 @@ export class QnAMakerDialog extends WaterfallDialog implements QnAMakerDialogCon * Initializes a new instance of the [QnAMakerDialog](xref:QnAMakerDialog) class. * * @param {string} knowledgeBaseId The ID of the QnA Maker knowledge base to query. - * @param {string} endpointKey The QnA Maker endpoint key to use to query the knowledge base. + * @param {string} endpointKey **Deprecated - use withEndpointKey() instead**. The QnA Maker endpoint key to use to query the knowledge base. * @param {string} hostname The QnA Maker host URL for the knowledge base, starting with "https://" and ending with "/qnamaker". * @param {string} noAnswer (Optional) The activity to send the user when QnA Maker does not find an answer. * @param {number} threshold (Optional) The threshold above which to treat answers found from the knowledgebase as a match. @@ -435,6 +443,9 @@ export class QnAMakerDialog extends WaterfallDialog implements QnAMakerDialogCon } if (endpointKey) { + console.warn( + "Providing an endpointKey in the QnAMakerDialog constructor is deprecated, use withEndpointKey() method instead and provide 'null' or 'empty' value in the constructor.", + ); this.endpointKey = new StringExpression(endpointKey); } @@ -507,6 +518,44 @@ export class QnAMakerDialog extends WaterfallDialog implements QnAMakerDialogCon this.addStep(this.displayQnAResult.bind(this)); } + /** + * Uses the provided QnA Maker EndpointKey to authenticate against the resource to query the knowledge base. + * + * @param endpointKey The QnA Maker endpoint key to use to query the knowledge base. + * @returns The QnAMakerDialog instance. + */ + withEndpointKey(endpointKey: string): QnAMakerDialogWithoutOtherAuthorization { + if (!endpointKey?.trim()) { + throw new Error('EndpointKey cannot be null or empty.'); + } + + if (this.managedIdentityClientId.value) { + throw new Error('Cannot set EndpointKey when ManagedIdentityClientId is already set.'); + } + + this.endpointKey = new StringExpression(endpointKey); + return this; + } + + /** + * Uses the provided QnA Maker ManagedIdentityClientId to authenticate against the resource to query the knowledge base. + * + * @param managedIdentityClientId The QnA Maker managed identity client id to use to query the knowledge base. + * @returns The QnAMakerDialog instance. + */ + withManagedIdentityClientId(managedIdentityClientId: string): QnAMakerDialogWithoutOtherAuthorization { + if (!managedIdentityClientId?.trim()) { + throw new Error('ManagedIdentityClientId cannot be null or empty.'); + } + + if (this.endpointKey.value) { + throw new Error('Cannot set ManagedIdentityClientId when EndpointKey is already set.'); + } + + this.managedIdentityClientId = new StringExpression(managedIdentityClientId); + return this; + } + /** * @param property Properties that extend QnAMakerDialogConfiguration. * @returns The expression converter. @@ -519,6 +568,8 @@ export class QnAMakerDialog extends WaterfallDialog implements QnAMakerDialogCon return new StringExpressionConverter(); case 'endpointKey': return new StringExpressionConverter(); + case 'managedIdentityClientId': + return new StringExpressionConverter(); case 'threshold': return new NumberExpressionConverter(); case 'top': @@ -655,9 +706,18 @@ export class QnAMakerDialog extends WaterfallDialog implements QnAMakerDialogCon return qnaClient; } + const endpointKey = this.endpointKey?.getValue(dc.state); + const managedIdentityClientId = this.managedIdentityClientId?.getValue(dc.state); + if (!endpointKey?.trim() && !managedIdentityClientId?.trim()) { + throw new Error( + 'An authorization method is required. Either EndpointKey or ManagedIdentityClientId must be set, use withEndpointKey() or withManagedIdentityClientId() respectively.', + ); + } + const endpoint = { knowledgeBaseId: this.knowledgeBaseId.getValue(dc.state), - endpointKey: this.endpointKey.getValue(dc.state), + endpointKey, + managedIdentityClientId, host: this.qnaServiceType === ServiceType.language ? this.hostname.getValue(dc.state) : this.getHost(dc), qnaServiceType: this.qnaServiceType, }; diff --git a/libraries/botbuilder-ai/src/qnamaker-interfaces/qnamakerEndpoint.ts b/libraries/botbuilder-ai/src/qnamaker-interfaces/qnamakerEndpoint.ts index 7ba9eca09f..6f7c356a33 100644 --- a/libraries/botbuilder-ai/src/qnamaker-interfaces/qnamakerEndpoint.ts +++ b/libraries/botbuilder-ai/src/qnamaker-interfaces/qnamakerEndpoint.ts @@ -21,7 +21,7 @@ export interface QnAMakerEndpoint { * Your endpoint key. For `v2` or `v3` knowledge bases this is your subscription key. * For example: `4cb65a02697745eca369XXXXXXXXXXXX` */ - endpointKey: string; + endpointKey?: string; /** * The host path. For example: `https://testqnamaker.azurewebsites.net/qnamaker` @@ -32,4 +32,9 @@ export interface QnAMakerEndpoint { * QnA service type '' - qnamaker, language */ qnaServiceType?: ServiceType; + + /** + * The ClientId of the Managed Identity resource. Access control (IAM) role `Cognitive Services User` must be assigned in the Language resource to the Managed Identity resource. + */ + managedIdentityClientId?: string; } diff --git a/libraries/botbuilder-ai/src/qnamaker-utils/httpRequestUtils.ts b/libraries/botbuilder-ai/src/qnamaker-utils/httpRequestUtils.ts index cbb8005ec1..49638b1d8a 100644 --- a/libraries/botbuilder-ai/src/qnamaker-utils/httpRequestUtils.ts +++ b/libraries/botbuilder-ai/src/qnamaker-utils/httpRequestUtils.ts @@ -7,6 +7,7 @@ */ import * as os from 'os'; +import { ManagedIdentityCredential } from '@azure/identity'; import { KnowledgeBaseAnswers } from '../qnamaker-interfaces/knowledgeBaseAnswers'; import { QnAMakerEndpoint } from '../qnamaker-interfaces/qnamakerEndpoint'; @@ -48,10 +49,10 @@ export class HttpRequestUtils { } if (!endpoint) { - throw new TypeError('Payload body cannot be null.'); + throw new TypeError('Endpoint body cannot be null.'); } - const headers = this.getHeaders(endpoint); + const headers = await this.getHeaders(endpoint); const qnaResult = await fetch(requestUrl, { method: 'POST', @@ -75,11 +76,17 @@ export class HttpRequestUtils { * * @private */ - private getHeaders(endpoint: QnAMakerEndpoint): Record { + private async getHeaders(endpoint: QnAMakerEndpoint): Promise> { const headers = {}; - headers['Ocp-Apim-Subscription-Key'] = endpoint.endpointKey; - headers['Authorization'] = `EndpointKey ${endpoint.endpointKey}`; + if (endpoint.endpointKey) { + headers['Ocp-Apim-Subscription-Key'] = endpoint.endpointKey; + headers['Authorization'] = `EndpointKey ${endpoint.endpointKey}`; + } else if (endpoint.managedIdentityClientId) { + const client = new ManagedIdentityCredential({ clientId: endpoint.managedIdentityClientId }); + const tokenResponse = await client.getToken('https://cognitiveservices.azure.com/.default'); + headers['Authorization'] = `Bearer ${tokenResponse.token}`; + } headers['User-Agent'] = this.getUserAgent(); headers['Content-Type'] = 'application/json'; diff --git a/libraries/botbuilder-ai/src/qnamaker-utils/languageServiceUtils.ts b/libraries/botbuilder-ai/src/qnamaker-utils/languageServiceUtils.ts index ba3d016946..91d577a2f0 100644 --- a/libraries/botbuilder-ai/src/qnamaker-utils/languageServiceUtils.ts +++ b/libraries/botbuilder-ai/src/qnamaker-utils/languageServiceUtils.ts @@ -116,7 +116,7 @@ export class LanguageServiceUtils { return this.formatQnaResult(qnaResults as KnowledgeBaseAnswers); } - throw new Error(`Failed to query knowledgebase: ${qnaResults}`); + throw new Error(`Failed to query knowledgebase: ${JSON.stringify(qnaResults)}`); } /** diff --git a/libraries/botbuilder-azure-blobs/etc/botbuilder-azure-blobs.api.md b/libraries/botbuilder-azure-blobs/etc/botbuilder-azure-blobs.api.md index c3b31d86db..37e0e771b4 100644 --- a/libraries/botbuilder-azure-blobs/etc/botbuilder-azure-blobs.api.md +++ b/libraries/botbuilder-azure-blobs/etc/botbuilder-azure-blobs.api.md @@ -11,7 +11,7 @@ import { Storage as Storage_2 } from 'botbuilder-core'; import { StoragePipelineOptions } from '@azure/storage-blob'; import { StorageSharedKeyCredential } from '@azure/storage-blob'; import { StoreItems } from 'botbuilder-core'; -import { TokenCredential } from '@azure/core-http'; +import { TokenCredential } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; import { TranscriptInfo } from 'botbuilder-core'; import { TranscriptStore } from 'botbuilder-core'; diff --git a/libraries/botbuilder-azure-blobs/package.json b/libraries/botbuilder-azure-blobs/package.json index 9bb90266e1..d16f7ef726 100644 --- a/libraries/botbuilder-azure-blobs/package.json +++ b/libraries/botbuilder-azure-blobs/package.json @@ -31,8 +31,7 @@ "botbuilder-core": "4.1.6", "botbuilder-stdlib": "4.1.6", "p-map": "^7.0.3", - "zod": "^3.23.8", - "@azure/core-http": "^3.0.4" + "zod": "^3.23.8" }, "scripts": { "build": "tsc -b", diff --git a/libraries/botbuilder-azure-blobs/src/blobsStorage.ts b/libraries/botbuilder-azure-blobs/src/blobsStorage.ts index 3ebe584dcb..6020d18dd0 100644 --- a/libraries/botbuilder-azure-blobs/src/blobsStorage.ts +++ b/libraries/botbuilder-azure-blobs/src/blobsStorage.ts @@ -13,7 +13,7 @@ import { import { Storage, StoreItems } from 'botbuilder-core'; import { ignoreError, isStatusCodeError } from './ignoreError'; import { sanitizeBlobKey } from './sanitizeBlobKey'; -import { TokenCredential, isTokenCredential } from '@azure/core-http'; +import { TokenCredential, isTokenCredential } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; /** * Optional settings for BlobsStorage diff --git a/libraries/botbuilder-azure-blobs/src/blobsTranscriptStore.ts b/libraries/botbuilder-azure-blobs/src/blobsTranscriptStore.ts index 1b69a77d15..af84488d51 100644 --- a/libraries/botbuilder-azure-blobs/src/blobsTranscriptStore.ts +++ b/libraries/botbuilder-azure-blobs/src/blobsTranscriptStore.ts @@ -15,7 +15,7 @@ import { StoragePipelineOptions, StorageSharedKeyCredential, } from '@azure/storage-blob'; -import { isTokenCredential, TokenCredential } from '@azure/core-http'; +import { isTokenCredential, TokenCredential } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; // Formats a timestamp in a way that is consistent with the C# SDK function formatTicks(timestamp: Date): string { diff --git a/libraries/botbuilder-azure/tests/cosmosDbPartitionedStorage.test.js b/libraries/botbuilder-azure/tests/cosmosDbPartitionedStorage.test.js index e945c514cc..a084e026d4 100644 --- a/libraries/botbuilder-azure/tests/cosmosDbPartitionedStorage.test.js +++ b/libraries/botbuilder-azure/tests/cosmosDbPartitionedStorage.test.js @@ -39,7 +39,8 @@ const getSettings = (test = null) => { databaseId: 'CosmosPartitionedStorageTestDb', containerId: `CosmosPartitionedStorageTestContainer-${testId}`, cosmosClientOptions: { - agent: new https.Agent({ rejectUnauthorized: false }), // rejectUnauthorized disables the SSL verification for the locally-hosted Emulator + // rejectUnauthorized disables the SSL verification for the locally-hosted Emulator + agent: new https.Agent({ rejectUnauthorized: false }), // CodeQL [SM03616] Used only in tests with local cosmosdb emulator }, }; }; @@ -53,7 +54,7 @@ const checkEmulator = async () => { } else { try { const agent = new https.Agent({ - rejectUnauthorized: false, + rejectUnauthorized: false, // CodeQL [SM03616] Used only in tests with local cosmosdb emulator }); await fetch(emulatorEndpoint, { agent }); canConnectToEmulator = true; @@ -84,7 +85,7 @@ const cleanup = async () => { const client = new CosmosClient({ endpoint: settings.cosmosDbEndpoint, key: settings.authKey, - agent: new https.Agent({ rejectUnauthorized: false }), + agent: new https.Agent({ rejectUnauthorized: false }), // CodeQL [SM03616] Used only in tests with local cosmosdb emulator }); try { await client.database(settings.databaseId).delete(); @@ -111,7 +112,7 @@ const prep = async function () { const client = new CosmosClient({ endpoint: settings.cosmosDbEndpoint, key: settings.authKey, - agent: new https.Agent({ rejectUnauthorized: false }), + agent: new https.Agent({ rejectUnauthorized: false }), // CodeQL [SM03616] Used only in tests with local cosmosdb emulator }); // This throws if the db is already created. We want to always create it if it doesn't exist, @@ -190,7 +191,7 @@ describe('CosmosDbPartitionedStorage', function () { const settingsWithClientOptions = getSettings(this.test); settingsWithClientOptions.cosmosClientOptions = { - agent: new https.Agent({ rejectUnauthorized: false }), + agent: new https.Agent({ rejectUnauthorized: false }), // CodeQL [SM03616] Used only in tests with local cosmosdb emulator connectionPolicy: { requestTimeout: 999 }, userAgentSuffix: 'test', }; @@ -209,7 +210,7 @@ describe('CosmosDbPartitionedStorage', function () { const settingsWithClientOptions = getSettings(this.test); settingsWithClientOptions.cosmosClientOptions = { - agent: new https.Agent({ rejectUnauthorized: false }), + agent: new https.Agent({ rejectUnauthorized: false }), // CodeQL [SM03616] Used only in tests with local cosmosdb emulator connectionPolicy: { requestTimeout: 999 }, }; @@ -340,7 +341,7 @@ describe('CosmosDbPartitionedStorage', function () { const dbCreateClient = new CosmosClient({ endpoint: settingsWithNewDb.cosmosDbEndpoint, key: settingsWithNewDb.authKey, - agent: new https.Agent({ rejectUnauthorized: false }), + agent: new https.Agent({ rejectUnauthorized: false }), // CodeQL [SM03616] Used only in tests with local cosmosdb emulator }); try { await dbCreateClient.database(newDb).delete(); diff --git a/libraries/botbuilder-core/etc/botbuilder-core.api.md b/libraries/botbuilder-core/etc/botbuilder-core.api.md index cde4b222af..2b56a1f8b5 100644 --- a/libraries/botbuilder-core/etc/botbuilder-core.api.md +++ b/libraries/botbuilder-core/etc/botbuilder-core.api.md @@ -352,10 +352,13 @@ export class ConfigurationBotFrameworkAuthentication extends BotFrameworkAuthent createUserTokenClient(claimsIdentity: ClaimsIdentity): Promise; } -// Warning: (ae-forgotten-export) The symbol "TypedOptions" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "ZodOptions" needs to be exported by the entry point index.d.ts // // @public -export type ConfigurationBotFrameworkAuthenticationOptions = z.infer; +export interface ConfigurationBotFrameworkAuthenticationOptions extends ZodOptions { + // (undocumented) + [key: string]: string | boolean | undefined; +} // @public export class ConfigurationServiceClientCredentialFactory extends PasswordServiceClientCredentialFactory { @@ -391,7 +394,7 @@ export interface CoreAppCredentials { } // @public -export function createBotFrameworkAuthenticationFromConfiguration(configuration: Configuration, credentialsFactory?: ServiceClientCredentialsFactory, authConfiguration?: AuthenticationConfiguration, botFrameworkClientFetch?: (input: RequestInfo, init?: RequestInit) => Promise, connectorClientOptions?: ConnectorClientOptions): BotFrameworkAuthentication; +export function createBotFrameworkAuthenticationFromConfiguration(configuration: Configuration | null, credentialsFactory?: ServiceClientCredentialsFactory, authConfiguration?: AuthenticationConfiguration, botFrameworkClientFetch?: (input: RequestInfo, init?: RequestInit) => Promise, connectorClientOptions?: ConnectorClientOptions): BotFrameworkAuthentication; // @public export function createServiceClientCredentialFactoryFromConfiguration(configuration: Configuration): ConfigurationServiceClientCredentialFactory; diff --git a/libraries/botbuilder-core/package.json b/libraries/botbuilder-core/package.json index dc220e3534..f1356b146e 100644 --- a/libraries/botbuilder-core/package.json +++ b/libraries/botbuilder-core/package.json @@ -35,7 +35,7 @@ "zod": "^3.23.8" }, "devDependencies": { - "axios": "^1.7.7", + "axios": "^1.8.2", "mime-types": "^2.1.35", "unzipper": "^0.12.3" }, diff --git a/libraries/botbuilder-core/src/configurationBotFrameworkAuthentication.ts b/libraries/botbuilder-core/src/configurationBotFrameworkAuthentication.ts index f6053ff236..ad6b59ed87 100644 --- a/libraries/botbuilder-core/src/configurationBotFrameworkAuthentication.ts +++ b/libraries/botbuilder-core/src/configurationBotFrameworkAuthentication.ts @@ -112,10 +112,14 @@ const TypedOptions = z }) .partial(); +type ZodOptions = z.infer; + /** * Contains settings used to configure a [ConfigurationBotFrameworkAuthentication](xref:botbuilder-core.ConfigurationBotFrameworkAuthentication) instance. */ -export type ConfigurationBotFrameworkAuthenticationOptions = z.infer; +export interface ConfigurationBotFrameworkAuthenticationOptions extends ZodOptions { + [key: string]: string | boolean | undefined; +} /** * Creates a [BotFrameworkAuthentication](xref:botframework-connector.BotFrameworkAuthentication) instance from an object with the authentication values or a [Configuration](xref:botbuilder-dialogs-adaptive-runtime-core.Configuration) instance. @@ -268,7 +272,7 @@ export class ConfigurationBotFrameworkAuthentication extends BotFrameworkAuthent * @returns A [ConfigurationBotFrameworkAuthentication](xref:botbuilder-core.ConfigurationBotFrameworkAuthentication) instance. */ export function createBotFrameworkAuthenticationFromConfiguration( - configuration: Configuration, + configuration: Configuration | null, credentialsFactory?: ServiceClientCredentialsFactory, authConfiguration?: AuthenticationConfiguration, botFrameworkClientFetch?: (input: RequestInfo, init?: RequestInit) => Promise, diff --git a/libraries/botbuilder-core/src/storage.ts b/libraries/botbuilder-core/src/storage.ts index f799946b05..b2a6087305 100644 --- a/libraries/botbuilder-core/src/storage.ts +++ b/libraries/botbuilder-core/src/storage.ts @@ -133,6 +133,6 @@ export function calculateChangeHash(item: StoreItem): string { const result = stringify(rest); const hash = createHash('sha256', { encoding: 'utf-8' }); - const hashed = hash.update(result).digest('hex'); + const hashed = hash.update(result).digest('hex'); // CodeQL [SM01511] Hash is for change detection only (non-secret, non-auth use); not used for passwords or credentials. return hashed; } diff --git a/libraries/botbuilder-core/tests/chatdown.js b/libraries/botbuilder-core/tests/chatdown.js index 5987511054..3499b28bca 100644 --- a/libraries/botbuilder-core/tests/chatdown.js +++ b/libraries/botbuilder-core/tests/chatdown.js @@ -638,7 +638,7 @@ function* fileLineIterator(fileContents) { } function getHashCode(contents) { - return crypto.createHash('sha1').update(contents).digest('base64'); + return crypto.createHash('sha512').update(contents).digest('base64'); } class Activity { diff --git a/libraries/botbuilder-core/tests/transcriptUtilities.js b/libraries/botbuilder-core/tests/transcriptUtilities.js index 2ac8da67d4..b8b5caf114 100644 --- a/libraries/botbuilder-core/tests/transcriptUtilities.js +++ b/libraries/botbuilder-core/tests/transcriptUtilities.js @@ -172,9 +172,13 @@ const decompressZip = (inputPath, outputPath, callback) => { .pipe(unzip.Parse()) .on('entry', (entry) => { if (entry.type === 'File' && entry.path.includes(zipTranscriptsRelativePath)) { - const fileExtractPath = path.join(outputPath, entry.path); - ensureDirectoryExists(fileExtractPath); - entry.pipe(fs.createWriteStream(fileExtractPath)).on('error', console.log); + if (entry.path.indexOf('..') == -1) { + const fileExtractPath = path.join(outputPath, entry.path); + ensureDirectoryExists(fileExtractPath); + entry.pipe(fs.createWriteStream(fileExtractPath)).on('error', console.log); + } else { + console.warn(`Skipping file ${entry.path} as it contains '..' in its path.`); + } } else { entry.autodrain(); } diff --git a/libraries/botbuilder-dialogs-adaptive-runtime-core/package.json b/libraries/botbuilder-dialogs-adaptive-runtime-core/package.json index 12d35c465d..01fc0d9a21 100644 --- a/libraries/botbuilder-dialogs-adaptive-runtime-core/package.json +++ b/libraries/botbuilder-dialogs-adaptive-runtime-core/package.json @@ -40,8 +40,8 @@ "depcheck": "depcheck --config ../../.depcheckrc --ignores dependency-graph", "lint": "eslint . --config ../../eslint.config.cjs", "postbuild": "downlevel-dts lib _ts3.4/lib --checksum", - "test": "nyc mocha", - "test:min": "nyc --silent mocha --reporter dot" + "test": "nyc mocha --experimental-transform-types", + "test:min": "nyc --silent mocha --reporter dot --experimental-transform-types" }, "mocha": { "extension": ".test.ts", diff --git a/libraries/botbuilder-dialogs-adaptive-testing/tests/action.test.js b/libraries/botbuilder-dialogs-adaptive-testing/tests/action.test.js index 5fb1a49151..0e47894acf 100644 --- a/libraries/botbuilder-dialogs-adaptive-testing/tests/action.test.js +++ b/libraries/botbuilder-dialogs-adaptive-testing/tests/action.test.js @@ -36,7 +36,7 @@ class MockSkillConversationIdFactory extends SkillConversationIdFactoryBase { if (this.useCreateSkillConversationId) { return super.createSkillConversationIdWithOptions(); } - const key = createHash('md5') + const key = createHash('sha512') .update(opts.activity.conversation.id + opts.activity.serviceUrl) .digest('hex'); @@ -51,7 +51,7 @@ class MockSkillConversationIdFactory extends SkillConversationIdFactoryBase { } async createSkillConversationId(convRef) { - const key = createHash('md5') + const key = createHash('sha512') .update(convRef.conversation.id + convRef.serviceUrl) .digest('hex'); diff --git a/libraries/botbuilder-dialogs-adaptive/tests/beginSkill.test.js b/libraries/botbuilder-dialogs-adaptive/tests/beginSkill.test.js index f35b5e2605..6205b835cc 100644 --- a/libraries/botbuilder-dialogs-adaptive/tests/beginSkill.test.js +++ b/libraries/botbuilder-dialogs-adaptive/tests/beginSkill.test.js @@ -27,7 +27,7 @@ class SimpleConversationIdFactory extends SkillConversationIdFactoryBase { if (this.useCreateSkillConversationId) { return super.createSkillConversationIdWithOptions(); } - const key = createHash('md5') + const key = createHash('sha512') .update(opts.activity.conversation.id + opts.activity.serviceUrl) .digest('hex'); @@ -42,7 +42,7 @@ class SimpleConversationIdFactory extends SkillConversationIdFactoryBase { } async createSkillConversationId(convRef) { - const key = createHash('md5') + const key = createHash('sha512') .update(convRef.conversation.id + convRef.serviceUrl) .digest('hex'); diff --git a/libraries/botbuilder-dialogs-declarative/tests/jsonLoad.test.js b/libraries/botbuilder-dialogs-declarative/tests/jsonLoad.test.js index aa60255286..52ace9748d 100644 --- a/libraries/botbuilder-dialogs-declarative/tests/jsonLoad.test.js +++ b/libraries/botbuilder-dialogs-declarative/tests/jsonLoad.test.js @@ -474,7 +474,7 @@ describe('Json load tests', function () { .assertReply('Done! You have added a pet named "TestPetName" with id "12121"') .assertReply('Now try to specify the id of your pet, and I will help your find it out from the store.') .send('12121') - .assertReply('Great! I found your pet named "TestPetName"') + .assertReply('Great! I found your pet named "TestPetName"', null, 5000) .startTest(); }); diff --git a/libraries/botbuilder-dialogs/tests/skillDialog.test.js b/libraries/botbuilder-dialogs/tests/skillDialog.test.js index bf05b063a5..108b7d3b98 100644 --- a/libraries/botbuilder-dialogs/tests/skillDialog.test.js +++ b/libraries/botbuilder-dialogs/tests/skillDialog.test.js @@ -677,7 +677,7 @@ class SimpleConversationIdFactory extends SkillConversationIdFactoryBase { if (this.useCreateSkillConversationId) { return super.createSkillConversationIdWithOptions(); } - const key = createHash('md5') + const key = createHash('sha512') .update(options.activity.conversation.id + options.activity.serviceUrl) .digest('hex'); @@ -694,7 +694,7 @@ class SimpleConversationIdFactory extends SkillConversationIdFactoryBase { async createSkillConversationId(convRef) { this.createCount++; - const key = createHash('md5') + const key = createHash('sha512') .update(convRef.conversation.id + convRef.serviceUrl) .digest('hex'); diff --git a/libraries/botbuilder-lg/package.json b/libraries/botbuilder-lg/package.json index aebc699762..eeb8ac5545 100644 --- a/libraries/botbuilder-lg/package.json +++ b/libraries/botbuilder-lg/package.json @@ -26,7 +26,7 @@ }, "devDependencies": { "antlr4ts-cli": "0.5.0-alpha.4", - "typescript": "~4.7" + "typescript": "~4.8" }, "scripts": { "antlr-build": "antlr4ts src/LGFileLexer.g4 -o src/generated && antlr4ts src/LGFileParser.g4 -visitor -o src/generated && antlr4ts src/LGTemplateLexer.g4 -o src/generated && antlr4ts src/LGTemplateParser.g4 -visitor -o src/generated", diff --git a/libraries/botbuilder-repo-utils/package.json b/libraries/botbuilder-repo-utils/package.json index 64d37710f8..22eaaaf881 100644 --- a/libraries/botbuilder-repo-utils/package.json +++ b/libraries/botbuilder-repo-utils/package.json @@ -22,7 +22,7 @@ "@types/semver": "^7.5.8", "semver": "^7.5.3", "ts-node": "^10.9.2", - "typescript": "~4.7" + "typescript": "~4.8" }, "scripts": { "lint": "eslint . --config ../../eslint.config.cjs", diff --git a/libraries/botbuilder-repo-utils/src/workspace.ts b/libraries/botbuilder-repo-utils/src/workspace.ts index b2b43641a4..663df282e5 100644 --- a/libraries/botbuilder-repo-utils/src/workspace.ts +++ b/libraries/botbuilder-repo-utils/src/workspace.ts @@ -42,9 +42,7 @@ export async function collectWorkspacePackages( ): Promise> { // Note: posix is required, this emits absolute paths that are platform specific const paths = await glob( - workspaces.map((workspace) => - path.posix.join(repoRoot, workspace, '{package.json,package-with-tests.json}{,.js,.ts}'), - ), + workspaces.map((workspace) => path.posix.join(repoRoot, workspace, 'package.json{,.js,.ts}')), ); const maybeWorkspaces = await Promise.all( diff --git a/libraries/botbuilder-repo-utils/tests/updateVersions.test.ts b/libraries/botbuilder-repo-utils/tests/updateVersions.test.ts index 70c5927067..76a7f2b84f 100644 --- a/libraries/botbuilder-repo-utils/tests/updateVersions.test.ts +++ b/libraries/botbuilder-repo-utils/tests/updateVersions.test.ts @@ -190,8 +190,8 @@ describe('updateVersions', function () { return { ...workspace, relPath, - absPath: path.join(root, ...relPath, '{package.json,package-with-tests.json}{,.js,.ts}'), - posixPath: path.posix.join(root, ...relPath, '{package.json,package-with-tests.json}{,.js,.ts}'), + absPath: path.join(root, ...relPath, 'package.json{,.js,.ts}'), + posixPath: path.posix.join(root, ...relPath, 'package.json{,.js,.ts}'), }; }); diff --git a/libraries/botbuilder-stdlib/.gitignore b/libraries/botbuilder-stdlib/.gitignore index b9f7068056..0b20ca2ab0 100644 --- a/libraries/botbuilder-stdlib/.gitignore +++ b/libraries/botbuilder-stdlib/.gitignore @@ -2,3 +2,5 @@ _ts3.4 lib coverage .nyc_output +src/azureCoreHttpCompat/util.* +src/azureCoreHttpCompat/response.* \ No newline at end of file diff --git a/libraries/botbuilder-stdlib/package.json b/libraries/botbuilder-stdlib/package.json index 3ab4eff14b..d46c800834 100644 --- a/libraries/botbuilder-stdlib/package.json +++ b/libraries/botbuilder-stdlib/package.json @@ -9,6 +9,17 @@ "bugs": { "url": "https://github.com/Microsoft/botbuilder-js/issues" }, + "dependencies": { + "@azure/core-auth": "^1.9.0", + "@azure/core-http-compat": "^2.1.2", + "@azure/core-rest-pipeline": "^1.18.1", + "@azure/core-client": "^1.9.2", + "@azure/core-tracing": "^1.2.0", + "@azure/abort-controller": "^2.1.2" + }, + "devDependencies": { + "copyfiles": "^2.4.1" + }, "repository": { "type": "git", "url": "https://github.com/Microsoft/botbuilder-js.git" @@ -17,8 +28,9 @@ "build": "tsc -b", "clean": "rimraf _ts3.4 lib tsconfig.tsbuildinfo", "depcheck": "depcheck --config ../../.depcheckrc", - "lint": "eslint . --config ../../eslint.config.cjs", - "postbuild": "downlevel-dts lib _ts3.4/lib", + "lint": "eslint . --config ../../eslint.config.cjs --ignore-pattern src/azureCoreHttpCompat/{util,response}.{d.ts,js}", + "prebuild": "copyfiles -f node_modules/@azure/core-http-compat/dist/commonjs/{util,response}.{d.ts,js} src/azureCoreHttpCompat", + "postbuild": "copyfiles -f src/azureCoreHttpCompat/{util,response}.{d.ts,js} lib/azureCoreHttpCompat && downlevel-dts lib _ts3.4/lib", "test": "yarn build && nyc mocha --check-leaks tests" }, "main": "lib/index.js", diff --git a/libraries/botbuilder-stdlib/src/azureCoreHttpCompat.ts b/libraries/botbuilder-stdlib/src/azureCoreHttpCompat.ts new file mode 100644 index 0000000000..f0fe329486 --- /dev/null +++ b/libraries/botbuilder-stdlib/src/azureCoreHttpCompat.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export * from './azureCoreHttpCompat/compat'; +export * from './azureCoreHttpCompat/serviceClientContext'; diff --git a/libraries/botbuilder-stdlib/src/azureCoreHttpCompat/compat.ts b/libraries/botbuilder-stdlib/src/azureCoreHttpCompat/compat.ts new file mode 100644 index 0000000000..2b99cb1311 --- /dev/null +++ b/libraries/botbuilder-stdlib/src/azureCoreHttpCompat/compat.ts @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +export * from './interfaces'; + +// Re-export only ProxySettings as it is the same as the deprecated core-http library. +export { ProxySettings } from '@azure/core-rest-pipeline'; + +// Re-export only WebResourceLike, CompatResponse, RequestPolicy as they are the same as the deprecated core-http library. +export { + WebResourceLike, + CompatResponse as HttpOperationResponse, + RequestPolicy as HttpClient, +} from '@azure/core-http-compat'; + +// Re-export. Can't access the HttpHeaders directly from the @azure/core-http-compat package because it is not defined in the package.json 'exports' property. +export { HttpHeaders } from './util'; + +// Re-export only TokenCredential, isTokenCredential as they are the same as the deprecated core-http library. +export { TokenCredential, isTokenCredential } from '@azure/core-auth'; + +// Re-export these as they are the same as the deprecated core-http library. +export { + createSerializer, + OperationURLParameter, + OperationQueryParameter, + OperationSpec, + CompositeMapper, +} from '@azure/core-client'; + +import { WebResourceLike } from '@azure/core-http-compat'; +import { PipelineRequestOptions, createPipelineRequest } from '@azure/core-rest-pipeline'; +import { toWebResourceLike } from './util'; + +/** + * Creates a new WebResourceLike object from the provided resource. + * + * @param resource The resource to convert to a WebResourceLike object. + * @returns A new WebResourceLike object. + */ +export function createWebResource(resource?: PipelineRequestOptions): WebResourceLike { + return toWebResourceLike(createPipelineRequest(resource ?? { url: '' })); +} + +/** + * A set of constants used internally when processing requests. + */ +export const Constants = { + /** + * Defines constants for use with HTTP headers. + */ + HeaderConstants: { + /** + * The Authorization header. + */ + AUTHORIZATION: 'Authorization', + AUTHORIZATION_SCHEME: 'Bearer', + }, +}; diff --git a/libraries/botbuilder-stdlib/src/azureCoreHttpCompat/interfaces.ts b/libraries/botbuilder-stdlib/src/azureCoreHttpCompat/interfaces.ts new file mode 100644 index 0000000000..d76ba71c6e --- /dev/null +++ b/libraries/botbuilder-stdlib/src/azureCoreHttpCompat/interfaces.ts @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { TracingContext } from '@azure/core-tracing'; +import { AbortSignalLike } from '@azure/abort-controller'; +import { ProxySettings, TransferProgressEvent } from '@azure/core-rest-pipeline'; +import { DeserializationContentTypes } from '@azure/core-client'; +import { + RequestPolicyFactory, + HttpPipelineLogLevel, + RequestPolicy as HttpClient, + WebResourceLike, + CompatResponse as HttpOperationResponse, +} from '@azure/core-http-compat'; + +/** + * Represents an object or class with a `signRequest` method which will sign outgoing requests (for example, by setting the `Authorization` header). + */ +export interface ServiceClientCredentials { + /** + * Signs a request with the Authentication header. + * + * @param webResource - The WebResourceLike/request to be signed. + * @returns The signed request object; + */ + signRequest(webResource: WebResourceLike): Promise; +} + +/** + * The flattened response to a REST call. + * Contains the underlying {@link HttpOperationResponse} as well as + * the merged properties of the `parsedBody`, `parsedHeaders`, etc. + */ +export interface RestResponse { + /** + * The underlying HTTP response containing both raw and deserialized response data. + */ + _response: HttpOperationResponse; + /** + * The flattened properties described by the `OperationSpec`, deserialized from headers and the HTTP body. + */ + [key: string]: any; +} + +/** + * Options to govern behavior of xml parser and builder. + */ +interface SerializerOptions { + /** + * indicates the name of the root element in the resulting XML when building XML. + */ + rootName?: string; + /** + * indicates whether the root element is to be included or not in the output when parsing XML. + */ + includeRoot?: boolean; + /** + * key used to access the XML value content when parsing XML. + */ + xmlCharKey?: string; +} + +/** + * Describes the base structure of the options object that will be used in every operation. + */ +export interface RequestOptionsBase { + /** + * will be applied before the request is sent. + */ + customHeaders?: { + [key: string]: string; + }; + /** + * Signal of an abort controller. Can be used to abort both sending a network request and waiting for a response. + */ + abortSignal?: AbortSignalLike; + /** + * The number of milliseconds a request can take before automatically being terminated. + * If the request is terminated, an `AbortError` is thrown. + */ + timeout?: number; + /** + * Callback which fires upon upload progress. + */ + onUploadProgress?: (progress: TransferProgressEvent) => void; + /** + * Callback which fires upon download progress. + */ + onDownloadProgress?: (progress: TransferProgressEvent) => void; + /** + * Whether or not the HttpOperationResponse should be deserialized. If this is undefined, then the + * HttpOperationResponse should be deserialized. + */ + shouldDeserialize?: boolean | ((response: HttpOperationResponse) => boolean); + /** + * Tracing: Context used when creating spans. + */ + tracingContext?: TracingContext; + /** + * May contain other properties. + */ + [key: string]: any; + /** + * Options to override XML parsing/building behavior. + */ + serializerOptions?: SerializerOptions; +} + +export interface ServiceClientOptions { + /** + * (Optional) baseUri will be set automatically within BotFrameworkAdapter, + * but is required if using the ConnectorClient outside of the adapter. + */ + baseUri?: string; + /** + * An array of factories which get called to create the RequestPolicy pipeline used to send a HTTP + * request on the wire, or a function that takes in the defaultRequestPolicyFactories and returns + * the requestPolicyFactories that will be used. + */ + requestPolicyFactories?: + | RequestPolicyFactory[] + | ((defaultRequestPolicyFactories: RequestPolicyFactory[]) => void | RequestPolicyFactory[]); + /** + * The HttpClient that will be used to send HTTP requests. + */ + httpClient?: HttpClient; + /** + * The HttpPipelineLogger that can be used to debug RequestPolicies within the HTTP pipeline. + */ + httpPipelineLogger?: HttpPipelineLogger; + /** + * If set to true, turn off the default retry policy. + */ + noRetryPolicy?: boolean; + /** + * Gets or sets the retry timeout in seconds for AutomaticRPRegistration. Default value is 30. + */ + rpRegistrationRetryTimeout?: number; + /** + * Whether or not to generate a client request ID header for each HTTP request. + */ + generateClientRequestIdHeader?: boolean; + /** + * Whether to include credentials in CORS requests in the browser. + * See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials for more information. + */ + withCredentials?: boolean; + /** + * If specified, a GenerateRequestIdPolicy will be added to the HTTP pipeline that will add a + * header to all outgoing requests with this header name and a random UUID as the request ID. + */ + clientRequestIdHeaderName?: string; + /** + * The content-types that will be associated with JSON or XML serialization. + */ + deserializationContentTypes?: DeserializationContentTypes; + /** + * The header name to use for the telemetry header while sending the request. If this is not + * specified, then "User-Agent" will be used when running on Node.js and "x-ms-useragent" will + * be used when running in a browser. + */ + userAgentHeaderName?: string | ((defaultUserAgentHeaderName: string) => string); + /** + * The string to be set to the telemetry header while sending the request, or a function that + * takes in the default user-agent string and returns the user-agent string that will be used. + */ + userAgent?: string | ((defaultUserAgent: string) => string); + /** + * Proxy settings which will be used for every HTTP request (Node.js only). + */ + proxySettings?: ProxySettings; + /** + * If specified, will be used to build the BearerTokenAuthenticationPolicy. + */ + credentialScopes?: string | string[]; +} + +export interface ServiceCallback { + /** + * A method that will be invoked as a callback to a service function. + * + * @param err - The error occurred if any, while executing the request; otherwise null. + * @param result - The deserialized response body if an error did not occur. + * @param request - The raw/actual request sent to the server if an error did not occur. + * @param response - The raw/actual response from the server if an error did not occur. + */ + (err: Error | null, result?: TResult, request?: WebResourceLike, response?: HttpOperationResponse): void; +} + +/** + * A Logger that can be added to a HttpPipeline. This enables each RequestPolicy to log messages + * that can be used for debugging purposes. + */ +export interface HttpPipelineLogger { + /** + * The log level threshold for what logs will be logged. + */ + minimumLogLevel: HttpPipelineLogLevel; + + /** + * Log the provided message. + * + * @param logLevel - The HttpLogDetailLevel associated with this message. + * @param message - The message to log. + */ + log(logLevel: HttpPipelineLogLevel, message: string): void; +} + +/** + * A collection of properties that apply to a single invocation of an operation. + */ +export interface OperationArguments { + /** + * The parameters that were passed to the operation method. + */ + [parameterName: string]: any; + /** + * The optional arugments that are provided to an operation. + */ + options?: RequestOptionsBase; +} diff --git a/libraries/botbuilder-stdlib/src/azureCoreHttpCompat/serviceClientContext.ts b/libraries/botbuilder-stdlib/src/azureCoreHttpCompat/serviceClientContext.ts new file mode 100644 index 0000000000..e4b7d50e1f --- /dev/null +++ b/libraries/botbuilder-stdlib/src/azureCoreHttpCompat/serviceClientContext.ts @@ -0,0 +1,242 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + */ + +import { + ServiceClient, + OperationSpec, + OperationArguments as OperationArgumentsPipeline, + OperationRequestOptions, +} from '@azure/core-client'; +import { convertHttpClient, createRequestPolicyFactoryPolicy } from '@azure/core-http-compat'; +import { toCompatResponse } from './response'; +import { PipelineRequest, PipelinePolicy, createHttpHeaders } from '@azure/core-rest-pipeline'; +import { + ServiceCallback, + ServiceClientCredentials, + ServiceClientOptions, + OperationArguments, + HttpOperationResponse, + createWebResource, + RestResponse, +} from './compat'; + +/** + * Compat implementation between @azure/core-http and @azure/core-client. + */ +export class ServiceClientContext { + /** + * If specified, this is the base URI that requests will be made against for this ServiceClient. + * If it is not specified, then all OperationSpecs must contain a baseUrl property. + */ + protected baseUri?: string; + /** + * The default request content type for the service. + * Used if no requestContentType is present on an OperationSpec. + */ + protected requestContentType?: string; + + private options: ServiceClientOptions; + private client: ServiceClient; + private readonly _requestPolicyFactories: PipelinePolicy[] = []; + + credentials: ServiceClientCredentials; + + // Protects against JSON.stringify leaking secrets + protected toJSON(): unknown { + return { name: this.constructor.name }; + } + + /** + * Initializes a new instance of the ConnectorClientContext class. + * + * @param credentials Subscription credentials which uniquely identify client subscription. + * @param [options] The parameter options + */ + constructor(credentials: ServiceClientCredentials, options: ServiceClientOptions = {}) { + if (credentials === null || credentials === undefined) { + throw new Error("'credentials' cannot be null."); + } + + if (!options) { + options = {}; + } + + const requestContentType = + options.deserializationContentTypes?.json?.join(' ') || + options.deserializationContentTypes?.xml?.join(' ') || + 'application/json; charset=utf-8'; + + const userAgentPrefix = + (typeof options.userAgent === 'function' ? options.userAgent('') : options.userAgent) || ''; + + const { + baseUri: endpoint, + proxySettings: proxyOptions, + httpClient, + credentialScopes, + requestPolicyFactories, + } = options; + + // do something with noPolicy option. + this.client = new ServiceClient({ + endpoint, + requestContentType, + userAgentOptions: { userAgentPrefix }, + allowInsecureConnection: endpoint?.toLowerCase().startsWith('http:'), + proxyOptions, + httpClient: httpClient ? convertHttpClient(httpClient) : undefined, + credentialScopes, + }); + + this.baseUri = endpoint; + this.requestContentType = requestContentType; + this.credentials = credentials; + this.options = options; + this._requestPolicyFactories = this.addPolicies(this.client, requestPolicyFactories); + } + + /** + * Send the provided httpRequest. + * + * @param request The HTTP request to send. + * @returns The HTTP response. + */ + async sendRequest(request: PipelineRequest): Promise { + if (!request) { + throw new Error('request cannot be null'); + } + + const newRequest = await this.addRequestSettings(request); + const response = await this.client.sendRequest(newRequest); + return toCompatResponse(response); + } + + /** + * Send an HTTP request that is populated using the provided OperationSpec. + * + * @param operationArguments - The arguments that the HTTP request's templated values will be populated from. + * @param operationSpec - The OperationSpec to use to populate the httpRequest. + * @param callback - The callback to call when the response is received. + * @returns The response object. + */ + async sendOperationRequest( + operationArguments: OperationArguments, + operationSpec: OperationSpec, + callback?: ServiceCallback, + ): Promise { + if (!operationArguments) { + throw new Error('operationArguments cannot be null'); + } + + const { + customHeaders, + timeout, + onDownloadProgress, + onUploadProgress, + shouldDeserialize, + serializerOptions, + tracingContext, + ...restOptions + } = operationArguments.options || {}; + + let _response; + const requestOptions: OperationRequestOptions = {}; + const operationArgumentPipeline: OperationArgumentsPipeline = { + ...operationArguments, + options: { + ...restOptions, + requestOptions, + onResponse(rawResponse, flatResponse, error) { + _response = rawResponse; + const response = toCompatResponse(rawResponse); + callback?.(error as Error, flatResponse, response.request, response); + }, + }, + }; + + if (customHeaders) { + requestOptions.customHeaders = customHeaders; + } + + if (timeout) { + requestOptions.timeout = timeout; + } + + if (onDownloadProgress) { + requestOptions.onDownloadProgress = onDownloadProgress; + } + + if (onUploadProgress) { + requestOptions.onUploadProgress = onUploadProgress; + } + + if (shouldDeserialize) { + requestOptions.shouldDeserialize = (response) => { + if (typeof shouldDeserialize === 'function') { + return shouldDeserialize(toCompatResponse(response)); + } else if (typeof shouldDeserialize === 'boolean') { + return shouldDeserialize; + } + return true; + }; + } + + if (serializerOptions) { + operationArgumentPipeline.options!.serializerOptions = { + xml: serializerOptions, + }; + } + + if (tracingContext) { + operationArgumentPipeline.options!.tracingOptions = { + tracingContext, + }; + } + + const result = await this.client.sendOperationRequest(operationArgumentPipeline, operationSpec); + + Object.defineProperty(result, '_response', { + value: _response, + }); + + return result; + } + + private async addRequestSettings(request: PipelineRequest) { + const webResource = createWebResource(request); + await this.credentials.signRequest(webResource); + const headers = createHttpHeaders({ + ...request.headers.toJSON({ preserveCase: true }), + ...webResource.headers.toJson({ preserveCase: true }), + }); + request.withCredentials = this.options?.withCredentials === true; + request.headers = headers; + return request; + } + + private addPolicies( + client: ServiceClient, + policies: ServiceClientOptions['requestPolicyFactories'], + ): PipelinePolicy[] { + if (Array.isArray(policies)) { + const policy = createRequestPolicyFactoryPolicy(policies); + policy.name = 'ServiceClientContext_RequestPolicyFactories'; + client.pipeline.removePolicy(policy); + client.pipeline.addPolicy(policy); + } else if (typeof policies === 'function') { + this.addPolicies(client, policies([]) || []); + } + + this.client.pipeline.addPolicy({ + name: 'ServiceClientContext_Credentials_SignRequest', + sendRequest: async (request, next) => { + const newRequest = await this.addRequestSettings(request); + return next(newRequest); + }, + }); + + return client.pipeline.getOrderedPolicies(); + } +} diff --git a/libraries/botbuilder-stdlib/src/index.ts b/libraries/botbuilder-stdlib/src/index.ts index f31f5d62f7..4c7f34f21c 100644 --- a/libraries/botbuilder-stdlib/src/index.ts +++ b/libraries/botbuilder-stdlib/src/index.ts @@ -3,6 +3,7 @@ export * from './types'; export * as stringExt from './stringExt'; +export * as AzureCoreHttpCompat from './azureCoreHttpCompat'; export { delay } from './delay'; export { maybeCast } from './maybeCast'; diff --git a/libraries/botbuilder/etc/botbuilder.api.md b/libraries/botbuilder/etc/botbuilder.api.md index 9896b7fc8b..b7fb75915d 100644 --- a/libraries/botbuilder/etc/botbuilder.api.md +++ b/libraries/botbuilder/etc/botbuilder.api.md @@ -41,8 +41,8 @@ import { ExtendedUserTokenProvider } from 'botbuilder-core'; import { FileConsentCardResponse } from 'botbuilder-core'; import { GetPropertyPaneConfigurationResponse } from 'botbuilder-core'; import { HandleActionResponse } from 'botbuilder-core'; -import { HttpClient } from '@azure/core-http'; -import { HttpOperationResponse } from '@azure/core-http'; +import { HttpClient } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; +import { HttpOperationResponse } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; import { ICredentialProvider } from 'botframework-connector'; import { INodeBuffer } from 'botframework-streaming'; import { INodeDuplex } from 'botframework-streaming'; @@ -101,7 +101,7 @@ import { TranscriptInfo } from 'botbuilder-core'; import { TranscriptStore } from 'botbuilder-core'; import { TurnContext } from 'botbuilder-core'; import { UserState } from 'botbuilder-core'; -import { WebResource } from '@azure/core-http'; +import { WebResourceLike } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; // Warning: (ae-forgotten-export) The symbol "ConnectorClientBuilder" needs to be exported by the entry point index.d.ts // @@ -389,7 +389,7 @@ export class StatusCodeError extends Error { // @public export class StreamingHttpClient implements HttpClient { constructor(server: IStreamingTransportServer); - sendRequest(httpRequest: WebResource): Promise; + sendRequest(httpRequest: WebResourceLike): Promise; } // @public diff --git a/libraries/botbuilder/package.json b/libraries/botbuilder/package.json index 2e9165f64a..f2bb460aa3 100644 --- a/libraries/botbuilder/package.json +++ b/libraries/botbuilder/package.json @@ -27,9 +27,9 @@ } }, "dependencies": { - "@azure/core-http": "^3.0.4", + "@azure/core-rest-pipeline": "^1.18.1", "@azure/msal-node": "^2.13.1", - "axios": "^1.7.7", + "axios": "^1.8.2", "botbuilder-core": "4.1.6", "botbuilder-stdlib": "4.1.6", "botframework-connector": "4.1.6", diff --git a/libraries/botbuilder/src/botFrameworkAdapter.ts b/libraries/botbuilder/src/botFrameworkAdapter.ts index d45f309687..3d669daae5 100644 --- a/libraries/botbuilder/src/botFrameworkAdapter.ts +++ b/libraries/botbuilder/src/botFrameworkAdapter.ts @@ -9,7 +9,6 @@ import * as z from 'zod'; import { BotFrameworkHttpAdapter } from './botFrameworkHttpAdapter'; import { ConnectorClientBuilder, Request, Response, ResponseT, WebRequest, WebResponse } from './interfaces'; -import { HttpClient, RequestPolicyFactory, userAgentPolicy } from '@azure/core-http'; import { INodeBufferT, INodeSocketT, LogicT } from './zod'; import { arch, release, type } from 'os'; import { delay, retry } from 'botbuilder-stdlib'; @@ -1479,6 +1478,7 @@ export class BotFrameworkAdapter } private createConnectorClientInternal(serviceUrl: string, credentials: AppCredentials): ConnectorClient { + const options: ConnectorClientOptions = { ...this.settings.clientOptions }; if (BotFrameworkAdapter.isStreamingServiceUrl(serviceUrl)) { // Check if we have a streaming server. Otherwise, requesting a connector client // for a non-existent streaming connection results in an error @@ -1488,66 +1488,27 @@ export class BotFrameworkAdapter ); } - const clientOptions = this.getClientOptions(serviceUrl, new StreamingHttpClient(this.streamingServer)); - return new ConnectorClient(credentials, clientOptions); - } - - const clientOptions = this.getClientOptions(serviceUrl); - return new ConnectorClient(credentials, clientOptions); - } - - private getClientOptions(serviceUrl: string, httpClient?: HttpClient): ConnectorClientOptions { - const { requestPolicyFactories, ...clientOptions } = this.settings.clientOptions ?? {}; - - const options: ConnectorClientOptions = Object.assign({}, { baseUri: serviceUrl }, clientOptions); - - if (httpClient) { - options.httpClient = httpClient; + options.httpClient = new StreamingHttpClient(this.streamingServer); } + options.baseUri = serviceUrl; const userAgent = typeof options.userAgent === 'function' ? options.userAgent(USER_AGENT) : options.userAgent; - const setUserAgent = userAgentPolicy({ - value: `${USER_AGENT}${userAgent ?? ''}`, - }); - - const acceptHeader: RequestPolicyFactory = { - create: (nextPolicy) => ({ - sendRequest: (httpRequest) => { - if (!httpRequest.headers.contains('accept')) { - httpRequest.headers.set('accept', '*/*'); - } - return nextPolicy.sendRequest(httpRequest); - }, - }), - }; + options.userAgent = `${USER_AGENT} ${userAgent ?? ''}`; - // Resolve any user request policy factories, then include our user agent via a factory policy - options.requestPolicyFactories = (defaultRequestPolicyFactories) => { - let defaultFactories = []; - - if (requestPolicyFactories) { - if (typeof requestPolicyFactories === 'function') { - const newDefaultFactories = requestPolicyFactories(defaultRequestPolicyFactories); - if (newDefaultFactories) { - defaultFactories = newDefaultFactories; - } - } else if (requestPolicyFactories) { - defaultFactories = [...requestPolicyFactories]; - } - - // If the user has supplied custom factories, allow them to optionally set user agent - // before we do. - defaultFactories = [...defaultFactories, acceptHeader, setUserAgent]; - } else { - // In the case that there are no user supplied factories, inject our user agent as - // the first policy to ensure none of the default policies override it. - defaultFactories = [acceptHeader, setUserAgent, ...defaultRequestPolicyFactories]; - } - - return defaultFactories; - }; + options.requestPolicyFactories = [ + { + create: (nextPolicy) => ({ + sendRequest: (httpRequest) => { + if (!httpRequest.headers.contains('accept')) { + httpRequest.headers.set('accept', '*/*'); + } + return nextPolicy.sendRequest(httpRequest); + }, + }), + }, + ]; - return options; + return new ConnectorClient(credentials, options); } // Retrieves the ConnectorClient from the TurnContext or creates a new ConnectorClient with the provided serviceUrl and credentials. diff --git a/libraries/botbuilder/src/channelServiceHandler.ts b/libraries/botbuilder/src/channelServiceHandler.ts index d58d6bc9f4..5ff7c672b5 100644 --- a/libraries/botbuilder/src/channelServiceHandler.ts +++ b/libraries/botbuilder/src/channelServiceHandler.ts @@ -43,26 +43,27 @@ export class ChannelServiceHandler extends ChannelServiceHandlerBase { } protected async authenticate(authHeader: string): Promise { - if (!authHeader) { - const isAuthDisabled = await this.credentialProvider.isAuthenticationDisabled(); - if (!isAuthDisabled) { - throw new StatusCodeError(StatusCodes.UNAUTHORIZED); - } + const isAuthDisabled = await this.credentialProvider.isAuthenticationDisabled(); + if (isAuthDisabled) { // In the scenario where Auth is disabled, we still want to have the // IsAuthenticated flag set in the ClaimsIdentity. To do this requires // adding in an empty claim. // Since ChannelServiceHandler calls are always a skill callback call, we set the skill claim too. return SkillValidation.createAnonymousSkillClaim(); - } + } else { + if (!authHeader) { + throw new StatusCodeError(StatusCodes.UNAUTHORIZED); + } - return JwtTokenValidation.validateAuthHeader( - authHeader, - this.credentialProvider, - this.channelService, - 'unknown', - undefined, - this.authConfig, - ); + return JwtTokenValidation.validateAuthHeader( + authHeader, + this.credentialProvider, + this.channelService, + 'unknown', + undefined, + this.authConfig, + ); + } } } diff --git a/libraries/botbuilder/src/channelServiceRoutes.ts b/libraries/botbuilder/src/channelServiceRoutes.ts index 63793d1f49..4f10eaa5ac 100644 --- a/libraries/botbuilder/src/channelServiceRoutes.ts +++ b/libraries/botbuilder/src/channelServiceRoutes.ts @@ -436,7 +436,12 @@ export class ChannelServiceRoutes { */ private static handleError(err: any, res: WebResponse): void { res.status(typeof err?.statusCode === 'number' ? err.statusCode : 500); - res.send(err instanceof Error ? err.message : err); + if (err instanceof Error) { + res.send(err.message); + } else { + res.send('An error occurred while processing the request.'); + console.error(err); + } res.end(); } } diff --git a/libraries/botbuilder/src/cloudAdapter.ts b/libraries/botbuilder/src/cloudAdapter.ts index 7cbd4230bb..0a942ccbfc 100644 --- a/libraries/botbuilder/src/cloudAdapter.ts +++ b/libraries/botbuilder/src/cloudAdapter.ts @@ -5,7 +5,12 @@ import * as z from 'zod'; import type { BotFrameworkHttpAdapter } from './botFrameworkHttpAdapter'; import { Activity, CloudAdapterBase, InvokeResponse, StatusCodes, TurnContext } from 'botbuilder-core'; import { GET, POST, VERSION_PATH } from './streaming'; -import { HttpClient, HttpHeaders, HttpOperationResponse, WebResource } from '@azure/core-http'; +import { + HttpClient, + HttpHeaders, + HttpOperationResponse, + WebResourceLike as WebResource, +} from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; import { INodeBufferT, INodeSocketT, LogicT } from './zod'; import { Request, Response, ResponseT } from './interfaces'; import { USER_AGENT } from './botFrameworkAdapter'; diff --git a/libraries/botbuilder/src/streaming/streamingHttpClient.ts b/libraries/botbuilder/src/streaming/streamingHttpClient.ts index bfe8d35bf7..4ddc90409f 100644 --- a/libraries/botbuilder/src/streaming/streamingHttpClient.ts +++ b/libraries/botbuilder/src/streaming/streamingHttpClient.ts @@ -6,7 +6,11 @@ * Licensed under the MIT License. */ -import { WebResource, HttpOperationResponse, HttpClient } from '@azure/core-http'; +import { + WebResourceLike as WebResource, + HttpOperationResponse, + HttpClient, +} from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; import { IStreamingTransportServer, StreamingRequest } from 'botframework-streaming'; /** diff --git a/libraries/botbuilder/tests/botFrameworkAdapter.test.js b/libraries/botbuilder/tests/botFrameworkAdapter.test.js index 96f5ef0a0d..082db25c2a 100644 --- a/libraries/botbuilder/tests/botFrameworkAdapter.test.js +++ b/libraries/botbuilder/tests/botFrameworkAdapter.test.js @@ -6,7 +6,8 @@ const sinon = require('sinon'); const { BotFrameworkAdapter } = require('../'); const { Conversations } = require('botframework-connector/lib/connectorApi/operations'); const { UserToken, BotSignIn } = require('botframework-connector/lib/tokenApi/operations'); -const { userAgentPolicy, HttpHeaders } = require('@azure/core-http'); +const { HttpHeaders } = require('botbuilder-stdlib/lib/azureCoreHttpCompat'); +const { createPipelineRequest, createHttpHeaders } = require('@azure/core-rest-pipeline'); const { ActivityTypes, @@ -462,7 +463,7 @@ describe('BotFrameworkAdapter', function () { const userAgent = 'test user agent'; nock(reference.serviceUrl) - .matchHeader('user-agent', ([val]) => val.endsWith(userAgent)) + .matchHeader('user-agent', (val) => val.includes(userAgent)) .post('/v3/conversations/convo1/activities/1234') .reply(200, { id: 'abc123id' }); @@ -510,16 +511,22 @@ describe('BotFrameworkAdapter', function () { }); it('ConnectorClient should use requestPolicyFactories from clientOptions', async function () { - const setUserAgent = userAgentPolicy({ value: 'test' }); - const factories = [setUserAgent]; - - const adapter = new BotFrameworkAdapter({ clientOptions: { requestPolicyFactories: factories } }); + const policy = { + create() { + return { + sendRequest() {}, + }; + }, + }; + const adapter = new BotFrameworkAdapter({ clientOptions: { requestPolicyFactories: [policy] } }); await adapter.continueConversation(reference, async (turnContext) => { const connectorClient = turnContext.turnState.get(turnContext.adapter.ConnectorClientKey); assert( - connectorClient._requestPolicyFactories.find((policy) => policy === setUserAgent), + connectorClient._requestPolicyFactories.find( + ({ name }) => name === 'ServiceClientContext_RequestPolicyFactories', + ), 'requestPolicyFactories from clientOptions parameter is not used.', ); }); @@ -527,22 +534,16 @@ describe('BotFrameworkAdapter', function () { it('ConnectorClient should add requestPolicyFactory for accept header', async function () { let hasAcceptHeader = false; - const mockNextPolicy = { - create: () => ({}), - sendRequest: () => { - return {}; - }, - }; const client = new BotFrameworkAdapter().createConnectorClient('https://localhost'); const length = client._requestPolicyFactories.length; for (let i = 0; i < length; i++) { - const mockHttp = { - headers: new HttpHeaders(), - }; + const mockHttp = createPipelineRequest({ + headers: createHttpHeaders(), + }); - const result = client._requestPolicyFactories[i].create(mockNextPolicy); + const result = client._requestPolicyFactories[i]; - result.sendRequest(mockHttp); + await result.sendRequest(mockHttp, (request) => ({ request, headers: mockHttp.headers })); if (mockHttp.headers.get('accept') == '*/*') { hasAcceptHeader = true; break; @@ -1364,7 +1365,7 @@ describe('BotFrameworkAdapter', function () { it('should create a User-Agent header with the same info as the host machine.', async function () { nock(reference.serviceUrl) - .matchHeader('user-agent', ([val]) => val.endsWith(userAgent)) + .matchHeader('user-agent', (val) => val.includes(userAgent)) .post('/v3/conversations/convo1/activities/1234') .reply(200, { id: 'abc123id' }); @@ -1377,7 +1378,7 @@ describe('BotFrameworkAdapter', function () { it('should still add Botbuilder User-Agent header when custom requestPolicyFactories are provided.', async function () { nock(reference.serviceUrl) - .matchHeader('user-agent', ([val]) => val.endsWith(userAgent)) + .matchHeader('user-agent', (val) => val.includes(userAgent)) .post('/v3/conversations/convo1/activities/1234') .reply(200, { id: 'abc123id' }); diff --git a/libraries/botbuilder/tests/channelServiceHandler.test.js b/libraries/botbuilder/tests/channelServiceHandler.test.js index a6ae97d439..952152b6fe 100644 --- a/libraries/botbuilder/tests/channelServiceHandler.test.js +++ b/libraries/botbuilder/tests/channelServiceHandler.test.js @@ -14,7 +14,7 @@ const { const AUTH_HEADER = 'Bearer HelloWorld'; const AUTH_CONFIG = new AuthenticationConfiguration(); -const CREDENTIALS = new SimpleCredentialProvider('', ''); +const CREDENTIALS = new SimpleCredentialProvider('appId', 'appSecret'); const ACTIVITY = { id: 'testId', type: ActivityTypes.Message }; class NoAuthHandler extends ChannelServiceHandler { diff --git a/libraries/botbuilder/tests/cloudAdapter.test.js b/libraries/botbuilder/tests/cloudAdapter.test.js index 5e27b7958b..b90c366f1c 100644 --- a/libraries/botbuilder/tests/cloudAdapter.test.js +++ b/libraries/botbuilder/tests/cloudAdapter.test.js @@ -213,8 +213,8 @@ describe('CloudAdapter', function () { const claimsValidators = allowedCallersClaimsValidator(['*']); const authConfig = new AuthenticationConfiguration([], claimsValidators, validTokenIssuers); const credentialsFactory = new ConfigurationServiceClientCredentialFactory({ - MicrosoftAppId: '', - MicrosoftAppPassword: '', + MicrosoftAppId: 'app-id', + MicrosoftAppPassword: 'app-password', MicrosoftAppType: '', MicrosoftAppTenantId: '', }); diff --git a/libraries/botframework-connector/package.json b/libraries/botframework-connector/package.json index ba1490b55d..acd928ec41 100644 --- a/libraries/botframework-connector/package.json +++ b/libraries/botframework-connector/package.json @@ -27,11 +27,11 @@ } }, "dependencies": { - "@azure/core-http": "^3.0.4", + "@azure/core-rest-pipeline": "^1.18.1", "@azure/identity": "^4.4.1", "@azure/msal-node": "^2.13.1", "@types/jsonwebtoken": "9.0.6", - "axios": "^1.7.7", + "axios": "^1.8.2", "base64url": "^3.0.0", "botbuilder-stdlib": "4.1.6", "botframework-schema": "4.1.6", @@ -45,7 +45,7 @@ "zod": "^3.23.8" }, "devDependencies": { - "@types/node": "18.19.47", + "@types/node": "^18.19.123", "botbuilder-test-utils": "0.0.0", "dotenv": "^16.4.5", "nock": "^13.5.5", @@ -59,7 +59,7 @@ "build:browser:run": "tsup --config ../../tsup/browser.config.ts", "build:downlevel-dts": "downlevel-dts lib _ts3.4/lib --checksum", "clean": "rimraf _ts3.4 lib tsconfig.tsbuildinfo", - "depcheck": "depcheck --config ../../.depcheckrc --ignores azure,sinon,browserify-fs,buffer,crypto-browserify,https-browserify,stream-browserify,stream-http", + "depcheck": "depcheck --config ../../.depcheckrc --ignores azure,sinon,browserify-fs,buffer,https-browserify,stream-browserify,stream-http", "lint": "eslint .", "postbuild": "npm-run-all -p build:browser build:downlevel-dts", "test": "yarn build && yarn test:mocha", diff --git a/libraries/botframework-connector/src/auth/appCredentials.ts b/libraries/botframework-connector/src/auth/appCredentials.ts index 1d0e8cb4aa..9e9557672a 100644 --- a/libraries/botframework-connector/src/auth/appCredentials.ts +++ b/libraries/botframework-connector/src/auth/appCredentials.ts @@ -7,7 +7,7 @@ */ import { ConfidentialClientApplication } from '@azure/msal-node'; -import { ServiceClientCredentials, WebResource } from '@azure/core-http'; +import { ServiceClientCredentials, WebResourceLike as WebResource } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; import { TokenCredentials } from './tokenCredentials'; import { AuthenticationConstants } from './authenticationConstants'; import { AuthenticatorResult } from './authenticatorResult'; diff --git a/libraries/botframework-connector/src/auth/botFrameworkClientImpl.ts b/libraries/botframework-connector/src/auth/botFrameworkClientImpl.ts index 96ae30065c..9ec907300b 100644 --- a/libraries/botframework-connector/src/auth/botFrameworkClientImpl.ts +++ b/libraries/botframework-connector/src/auth/botFrameworkClientImpl.ts @@ -8,7 +8,8 @@ import type { ConnectorClientOptions } from '../connectorApi/models'; import { ConversationIdHttpHeaderName } from '../conversationConstants'; import { ServiceClientCredentialsFactory } from './serviceClientCredentialsFactory'; import { USER_AGENT } from './connectorFactoryImpl'; -import { WebResource } from '@azure/core-http'; +import { createWebResource } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; +import { createHttpHeaders } from '@azure/core-rest-pipeline'; import { ok } from 'assert'; import axios from 'axios'; @@ -140,11 +141,16 @@ export class BotFrameworkClientImpl implements BotFrameworkClient { } activity.recipient.role = RoleTypes.Skill; - const webRequest = new WebResource(toUrl, 'POST', JSON.stringify(activity), undefined, { - Accept: 'application/json', - [ConversationIdHttpHeaderName]: conversationId, - 'Content-Type': 'application/json', - 'User-Agent': USER_AGENT, + const webRequest = createWebResource({ + url: toUrl, + method: 'POST', + body: JSON.stringify(activity), + headers: createHttpHeaders({ + Accept: 'application/json', + [ConversationIdHttpHeaderName]: conversationId, + 'Content-Type': 'application/json', + 'User-Agent': USER_AGENT, + }), }); const request = await credentials.signRequest(webRequest); diff --git a/libraries/botframework-connector/src/auth/certificateServiceClientCredentialsFactory.ts b/libraries/botframework-connector/src/auth/certificateServiceClientCredentialsFactory.ts index 9a9acb5ae1..abef6679e7 100644 --- a/libraries/botframework-connector/src/auth/certificateServiceClientCredentialsFactory.ts +++ b/libraries/botframework-connector/src/auth/certificateServiceClientCredentialsFactory.ts @@ -6,7 +6,7 @@ * Licensed under the MIT License. */ -import type { ServiceClientCredentials } from '@azure/core-http'; +import type { ServiceClientCredentials } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; import { ServiceClientCredentialsFactory } from './serviceClientCredentialsFactory'; import { ok } from 'assert'; import { CertificateAppCredentials } from './certificateAppCredentials'; diff --git a/libraries/botframework-connector/src/auth/connectorFactoryImpl.ts b/libraries/botframework-connector/src/auth/connectorFactoryImpl.ts index 5703531a13..ca0c93fd17 100644 --- a/libraries/botframework-connector/src/auth/connectorFactoryImpl.ts +++ b/libraries/botframework-connector/src/auth/connectorFactoryImpl.ts @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { getDefaultUserAgentValue, RequestPolicyFactory, userAgentPolicy } from '@azure/core-http'; import { ConnectorClient } from '../connectorApi/connectorClient'; import { ConnectorClientOptions } from '../connectorApi/models'; import { ConnectorFactory } from './connectorFactory'; @@ -9,9 +8,7 @@ import type { ServiceClientCredentialsFactory } from './serviceClientCredentials // eslint-disable-next-line @typescript-eslint/no-require-imports const packageInfo: Record<'name' | 'version', string> = require('../../package.json'); -export const USER_AGENT = `Microsoft-BotFramework/3.1 ${packageInfo.name}/${ - packageInfo.version -} ${getDefaultUserAgentValue()} `; +export const USER_AGENT = `Microsoft-BotFramework/3.1 ${packageInfo.name}/${packageInfo.version} `; /** * @internal @@ -51,58 +48,29 @@ export class ConnectorFactoryImpl extends ConnectorFactory { this.validateAuthority, ); - // A new connector client for making calls against this serviceUrl using credentials derived from the current appId and the specified audience. - const options = this.getClientOptions(serviceUrl); - return new ConnectorClient(credentials, options); - } - - private getClientOptions(serviceUrl: string): ConnectorClientOptions { - const { requestPolicyFactories, ...clientOptions } = this.connectorClientOptions; - - const options: ConnectorClientOptions = Object.assign({}, { baseUri: serviceUrl }, clientOptions); - - const userAgent = typeof options.userAgent === 'function' ? options.userAgent(USER_AGENT) : options.userAgent; - const setUserAgent = userAgentPolicy({ - value: `${USER_AGENT}${userAgent ?? ''}`, - }); - - const acceptHeader: RequestPolicyFactory = { - create: (nextPolicy) => ({ - sendRequest: (httpRequest) => { - if (!httpRequest.headers.contains('accept')) { - httpRequest.headers.set('accept', '*/*'); - } - return nextPolicy.sendRequest(httpRequest); - }, - }), + const userAgent = + typeof this.connectorClientOptions?.userAgent === 'function' + ? this.connectorClientOptions?.userAgent(USER_AGENT) + : this.connectorClientOptions?.userAgent; + const options: ConnectorClientOptions = { + ...this.connectorClientOptions, + baseUri: serviceUrl, + userAgent: `${USER_AGENT} ${userAgent ?? ''}`, }; - // Resolve any user request policy factories, then include our user agent via a factory policy - options.requestPolicyFactories = (defaultRequestPolicyFactories) => { - let defaultFactories = []; + options.requestPolicyFactories = [ + { + create: (nextPolicy) => ({ + sendRequest: (httpRequest) => { + if (!httpRequest.headers.contains('accept')) { + httpRequest.headers.set('accept', '*/*'); + } + return nextPolicy.sendRequest(httpRequest); + }, + }), + }, + ]; - if (requestPolicyFactories) { - if (typeof requestPolicyFactories === 'function') { - const newDefaultFactories = requestPolicyFactories(defaultRequestPolicyFactories); - if (newDefaultFactories) { - defaultFactories = newDefaultFactories; - } - } else if (requestPolicyFactories) { - defaultFactories = [...requestPolicyFactories]; - } - - // If the user has supplied custom factories, allow them to optionally set user agent - // before we do. - defaultFactories = [...defaultFactories, setUserAgent, acceptHeader]; - } else { - // In the case that there are no user supplied factories, inject our user agent as - // the first policy to ensure none of the default policies override it. - defaultFactories = [acceptHeader, setUserAgent, ...defaultRequestPolicyFactories]; - } - - return defaultFactories; - }; - - return options; + return new ConnectorClient(credentials, options); } } diff --git a/libraries/botframework-connector/src/auth/federatedServiceClientCredentialsFactory.ts b/libraries/botframework-connector/src/auth/federatedServiceClientCredentialsFactory.ts index 0ae06f91a6..46a1a2ab9b 100644 --- a/libraries/botframework-connector/src/auth/federatedServiceClientCredentialsFactory.ts +++ b/libraries/botframework-connector/src/auth/federatedServiceClientCredentialsFactory.ts @@ -5,7 +5,7 @@ // Licensed under the MIT License. import { ok } from 'assert'; -import type { ServiceClientCredentials } from '@azure/core-http'; +import type { ServiceClientCredentials } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; import { ServiceClientCredentialsFactory } from './serviceClientCredentialsFactory'; import { FederatedAppCredentials } from './federatedAppCredentials'; diff --git a/libraries/botframework-connector/src/auth/jwtTokenExtractor.ts b/libraries/botframework-connector/src/auth/jwtTokenExtractor.ts index 110c77ed19..31e031839c 100644 --- a/libraries/botframework-connector/src/auth/jwtTokenExtractor.ts +++ b/libraries/botframework-connector/src/auth/jwtTokenExtractor.ts @@ -12,7 +12,7 @@ import { EndorsementsValidator } from './endorsementsValidator'; import { OpenIdMetadata } from './openIdMetadata'; import { AuthenticationError } from './authenticationError'; import { StatusCodes } from 'botframework-schema'; -import { ProxySettings } from '@azure/core-http'; +import { ProxySettings } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; /** * A JWT token processing class that gets identity information and performs security token validation. @@ -34,22 +34,32 @@ export class JwtTokenExtractor { * @param metadataUrl Metadata Url. * @param allowedSigningAlgorithms Allowed signing algorithms. * @param proxySettings The proxy settings for the request. + * @param tokenRefreshInterval The token refresh interval in hours. The default value is 24 hours. */ constructor( tokenValidationParameters: VerifyOptions, metadataUrl: string, allowedSigningAlgorithms: string[] | Algorithm[], proxySettings?: ProxySettings, + tokenRefreshInterval?: number, ) { this.tokenValidationParameters = { ...tokenValidationParameters }; this.tokenValidationParameters.algorithms = allowedSigningAlgorithms as Algorithm[]; - this.openIdMetadata = JwtTokenExtractor.getOrAddOpenIdMetadata(metadataUrl, proxySettings); + this.openIdMetadata = JwtTokenExtractor.getOrAddOpenIdMetadata( + metadataUrl, + proxySettings, + tokenRefreshInterval, + ); } - private static getOrAddOpenIdMetadata(metadataUrl: string, proxySettings?: ProxySettings): OpenIdMetadata { + private static getOrAddOpenIdMetadata( + metadataUrl: string, + proxySettings?: ProxySettings, + tokenRefreshInterval?: number, + ): OpenIdMetadata { let metadata = this.openIdMetadataCache.get(metadataUrl); if (!metadata) { - metadata = new OpenIdMetadata(metadataUrl, proxySettings); + metadata = new OpenIdMetadata(metadataUrl, proxySettings, tokenRefreshInterval); this.openIdMetadataCache.set(metadataUrl, metadata); } diff --git a/libraries/botframework-connector/src/auth/jwtTokenProviderFactory.ts b/libraries/botframework-connector/src/auth/jwtTokenProviderFactory.ts index a747dd1d34..f53531811b 100644 --- a/libraries/botframework-connector/src/auth/jwtTokenProviderFactory.ts +++ b/libraries/botframework-connector/src/auth/jwtTokenProviderFactory.ts @@ -31,6 +31,6 @@ export class JwtTokenProviderFactory implements IJwtTokenProviderFactory { createAzureServiceTokenProvider(appId: string): DefaultAzureCredential { ok(appId?.trim(), 'jwtTokenProviderFactory.createAzureServiceTokenProvider(): missing appId.'); - return new DefaultAzureCredential({ managedIdentityClientId: appId }); + return new DefaultAzureCredential({ managedIdentityClientId: appId }); // CodeQL [SM05138] Changing this would break retro-compatibility } } diff --git a/libraries/botframework-connector/src/auth/jwtTokenValidation.ts b/libraries/botframework-connector/src/auth/jwtTokenValidation.ts index 3b58821dc8..3d8d991cb0 100644 --- a/libraries/botframework-connector/src/auth/jwtTokenValidation.ts +++ b/libraries/botframework-connector/src/auth/jwtTokenValidation.ts @@ -47,16 +47,9 @@ export namespace JwtTokenValidation { authConfig = new AuthenticationConfiguration(); } - // eslint-disable-next-line prettier/prettier - if (!authHeader.trim()) { // CodeQL [SM01513] We manually validate incoming tokens. Checking for empty header as part of that. - const isAuthDisabled = await credentials.isAuthenticationDisabled(); - if (!isAuthDisabled) { - throw new AuthenticationError( - 'Unauthorized Access. Request is not authorized', - StatusCodes.UNAUTHORIZED, - ); - } + const isAuthDisabled = await credentials.isAuthenticationDisabled(); + if (isAuthDisabled) { // Check if the activity is for a skill call and is coming from the Emulator. if ( activity.channelId === Channels.Emulator && @@ -70,18 +63,25 @@ export namespace JwtTokenValidation { // IsAuthenticated flag set in the ClaimsIdentity. To do this requires // adding in an empty claim. return new ClaimsIdentity([], AuthenticationConstants.AnonymousAuthType); - } + } else { + if (!authHeader.trim()) { + throw new AuthenticationError( + 'Unauthorized Access. Request is not authorized', + StatusCodes.UNAUTHORIZED, + ); + } - const claimsIdentity: ClaimsIdentity = await validateAuthHeader( - authHeader, - credentials, - channelService, - activity.channelId, - activity.serviceUrl, - authConfig, - ); + const claimsIdentity: ClaimsIdentity = await validateAuthHeader( + authHeader, + credentials, + channelService, + activity.channelId, + activity.serviceUrl, + authConfig, + ); - return claimsIdentity; + return claimsIdentity; + } } /** @@ -153,8 +153,7 @@ export namespace JwtTokenValidation { } if (isPublicAzure(channelService)) { - // eslint-disable-next-line prettier/prettier - if (serviceUrl.trim()) { // CodeQL [SM01513] We manually validate incoming tokens. Checking for empty serviceUrl as part of that. + if (isValidServiceURL(serviceUrl)) { return await ChannelValidation.authenticateChannelTokenWithServiceUrl( authHeader, credentials, @@ -167,8 +166,7 @@ export namespace JwtTokenValidation { } if (isGovernment(channelService)) { - // eslint-disable-next-line prettier/prettier - if (serviceUrl.trim()) { // CodeQL [SM01513] We manually validate incoming tokens. Checking for empty serviceUrl as part of that. + if (isValidServiceURL(serviceUrl)) { return await GovernmentChannelValidation.authenticateChannelTokenWithServiceUrl( authHeader, credentials, @@ -181,8 +179,7 @@ export namespace JwtTokenValidation { } // Otherwise use Enterprise Channel Validation - // eslint-disable-next-line prettier/prettier - if (serviceUrl.trim()) { // CodeQL [SM01513] We manually validate incoming tokens. Checking for empty serviceUrl as part of that. + if (isValidServiceURL(serviceUrl)) { return await EnterpriseChannelValidation.authenticateChannelTokenWithServiceUrl( authHeader, credentials, @@ -270,6 +267,18 @@ export namespace JwtTokenValidation { return !channelService || channelService.length === 0; } + function isValidServiceURL(serviceUrl: string): boolean { + const trimmedUrl = serviceUrl.trim(); + const absoluteUrl = + trimmedUrl.startsWith('http') || trimmedUrl.startsWith('wss') ? trimmedUrl : `https://${trimmedUrl}`; + try { + const newUri = new URL(absoluteUrl); + return !!newUri; + } catch { + return false; + } + } + /** * Determine whether or not a channel service is government * diff --git a/libraries/botframework-connector/src/auth/managedIdentityServiceClientCredentialsFactory.ts b/libraries/botframework-connector/src/auth/managedIdentityServiceClientCredentialsFactory.ts index 73ad3a5589..fd7e66e688 100644 --- a/libraries/botframework-connector/src/auth/managedIdentityServiceClientCredentialsFactory.ts +++ b/libraries/botframework-connector/src/auth/managedIdentityServiceClientCredentialsFactory.ts @@ -7,7 +7,7 @@ */ import type { IJwtTokenProviderFactory } from './jwtTokenProviderFactory'; -import type { ServiceClientCredentials } from '@azure/core-http'; +import type { ServiceClientCredentials } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; import { ManagedIdentityAppCredentials } from './managedIdentityAppCredentials'; import { ServiceClientCredentialsFactory } from './serviceClientCredentialsFactory'; import { ok } from 'assert'; diff --git a/libraries/botframework-connector/src/auth/msalServiceClientCredentialsFactory.ts b/libraries/botframework-connector/src/auth/msalServiceClientCredentialsFactory.ts index f97522f278..f6fdb13a2f 100644 --- a/libraries/botframework-connector/src/auth/msalServiceClientCredentialsFactory.ts +++ b/libraries/botframework-connector/src/auth/msalServiceClientCredentialsFactory.ts @@ -6,7 +6,7 @@ import { ConfidentialClientApplication } from '@azure/msal-node'; import { MsalAppCredentials } from './msalAppCredentials'; -import { ServiceClientCredentials } from '@azure/core-http'; +import { ServiceClientCredentials } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; import { ServiceClientCredentialsFactory } from './serviceClientCredentialsFactory'; import { AuthenticationConstants } from './authenticationConstants'; import { GovernmentConstants } from './governmentConstants'; diff --git a/libraries/botframework-connector/src/auth/openIdMetadata.ts b/libraries/botframework-connector/src/auth/openIdMetadata.ts index 5abbe8ace3..7357979d8b 100644 --- a/libraries/botframework-connector/src/auth/openIdMetadata.ts +++ b/libraries/botframework-connector/src/auth/openIdMetadata.ts @@ -12,7 +12,7 @@ import fetch from 'node-fetch'; import { HttpsProxyAgent } from 'https-proxy-agent'; import { AuthenticationError } from './authenticationError'; import { StatusCodes } from 'botframework-schema'; -import { ProxySettings } from '@azure/core-http'; +import { ProxySettings } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; /** * Class in charge of manage OpenId metadata. @@ -26,10 +26,12 @@ export class OpenIdMetadata { * * @param url Metadata Url. * @param proxySettings The proxy settings for the request. + * @param tokenRefreshInterval The token refresh interval in hours. The default value is 24 hours. */ constructor( private url: string, private proxySettings?: ProxySettings, + private tokenRefreshInterval: number = 24, ) {} /** @@ -39,8 +41,8 @@ export class OpenIdMetadata { * @returns A `Promise` representation for either a [IOpenIdMetadataKey](botframework-connector:module.IOpenIdMetadataKey) or `null`. */ async getKey(keyId: string): Promise { - // If keys are more than 24 hours old, refresh them - if (this.lastUpdated < Date.now() - 1000 * 60 * 60 * 24) { + // If keys are older than the refresh interval (default 24 hours), refresh them + if (this.lastUpdated < Date.now() - this.tokenRefreshInterval * 1000 * 60 * 60) { await this.refreshCache(); // Search the cache even if we failed to refresh diff --git a/libraries/botframework-connector/src/auth/parameterizedBotFrameworkAuthentication.ts b/libraries/botframework-connector/src/auth/parameterizedBotFrameworkAuthentication.ts index 4b5ddb5288..817ccc3b4b 100644 --- a/libraries/botframework-connector/src/auth/parameterizedBotFrameworkAuthentication.ts +++ b/libraries/botframework-connector/src/auth/parameterizedBotFrameworkAuthentication.ts @@ -85,22 +85,17 @@ export class ParameterizedBotFrameworkAuthentication extends BotFrameworkAuthent * @returns The identity validation result. */ async authenticateChannelRequest(authHeader: string): Promise { - if (!authHeader.trim()) { - const isAuthDisabled = await this.credentialsFactory.isAuthenticationDisabled(); - if (!isAuthDisabled) { + if (await this.credentialsFactory.isAuthenticationDisabled()) { + return SkillValidation.createAnonymousSkillClaim(); + } else { + if (!authHeader.trim()) { throw new AuthenticationError( 'Unauthorized Access. Request is not authorized', StatusCodes.UNAUTHORIZED, ); } - - // In the scenario where auth is disabled, we still want to have the isAuthenticated flag set in the - // ClaimsIdentity. To do this requires adding in an empty claim. Since ChannelServiceHandler calls are - // always a skill callback call, we set the skill claim too. - return SkillValidation.createAnonymousSkillClaim(); + return this.JwtTokenValidation_validateAuthHeader(authHeader, 'unknown', null); } - - return this.JwtTokenValidation_validateAuthHeader(authHeader, 'unknown', null); } /** @@ -213,15 +208,7 @@ export class ParameterizedBotFrameworkAuthentication extends BotFrameworkAuthent activity: Partial, authHeader: string, ): Promise { - if (!authHeader.trim()) { - const isAuthDisabled = await this.credentialsFactory.isAuthenticationDisabled(); - if (!isAuthDisabled) { - throw new AuthenticationError( - 'Unauthorized Access. Request is not authorized', - StatusCodes.UNAUTHORIZED, - ); - } - + if (await this.credentialsFactory.isAuthenticationDisabled()) { // Check if the activity is for a skill call and is coming from the Emulator. if (activity.channelId === Channels.Emulator && activity.recipient?.role === RoleTypes.Skill) { return SkillValidation.createAnonymousSkillClaim(); @@ -231,15 +218,21 @@ export class ParameterizedBotFrameworkAuthentication extends BotFrameworkAuthent // IsAuthenticated flag set in the ClaimsIdentity. To do this requires // adding in an empty claim. return new ClaimsIdentity([], AuthenticationConstants.AnonymousAuthType); - } - - const claimsIdentity: ClaimsIdentity = await this.JwtTokenValidation_validateAuthHeader( - authHeader, - activity.channelId, - activity.serviceUrl, - ); + } else { + if (!authHeader.trim()) { + throw new AuthenticationError( + 'Unauthorized Access. Request is not authorized', + StatusCodes.UNAUTHORIZED, + ); + } + const claimsIdentity: ClaimsIdentity = await this.JwtTokenValidation_validateAuthHeader( + authHeader, + activity.channelId, + activity.serviceUrl, + ); - return claimsIdentity; + return claimsIdentity; + } } private async JwtTokenValidation_validateAuthHeader( @@ -306,6 +299,7 @@ export class ParameterizedBotFrameworkAuthentication extends BotFrameworkAuthent this.toBotFromEmulatorOpenIdMetadataUrl, AuthenticationConstants.AllowedSigningAlgorithms, this.connectorClientOptions?.proxySettings, + this.connectorClientOptions?.tokenRefreshInterval, ); const parts: string[] = authHeader.split(' '); @@ -393,6 +387,7 @@ export class ParameterizedBotFrameworkAuthentication extends BotFrameworkAuthent this.toBotFromEmulatorOpenIdMetadataUrl, AuthenticationConstants.AllowedSigningAlgorithms, this.connectorClientOptions?.proxySettings, + this.connectorClientOptions?.tokenRefreshInterval, ); const identity: ClaimsIdentity = await tokenExtractor.getIdentityFromAuthHeader( @@ -480,6 +475,7 @@ export class ParameterizedBotFrameworkAuthentication extends BotFrameworkAuthent this.toBotFromChannelOpenIdMetadataUrl, AuthenticationConstants.AllowedSigningAlgorithms, this.connectorClientOptions?.proxySettings, + this.connectorClientOptions?.tokenRefreshInterval, ); const identity: ClaimsIdentity = await tokenExtractor.getIdentityFromAuthHeader( diff --git a/libraries/botframework-connector/src/auth/passwordServiceClientCredentialFactory.ts b/libraries/botframework-connector/src/auth/passwordServiceClientCredentialFactory.ts index ce6659821a..d0a821be82 100644 --- a/libraries/botframework-connector/src/auth/passwordServiceClientCredentialFactory.ts +++ b/libraries/botframework-connector/src/auth/passwordServiceClientCredentialFactory.ts @@ -4,7 +4,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { ServiceClientCredentials } from '@azure/core-http'; +import type { ServiceClientCredentials } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; import { AuthenticationConstants } from './authenticationConstants'; import { GovernmentConstants } from './governmentConstants'; import { MicrosoftAppCredentials } from './microsoftAppCredentials'; diff --git a/libraries/botframework-connector/src/auth/serviceClientCredentialsFactory.ts b/libraries/botframework-connector/src/auth/serviceClientCredentialsFactory.ts index 647a1c3e14..a5beae8d1b 100644 --- a/libraries/botframework-connector/src/auth/serviceClientCredentialsFactory.ts +++ b/libraries/botframework-connector/src/auth/serviceClientCredentialsFactory.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceClientCredentials } from '@azure/core-http'; +import { ServiceClientCredentials } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; // Export underlying type for convenience export { ServiceClientCredentials }; diff --git a/libraries/botframework-connector/src/auth/tokenCredentials.ts b/libraries/botframework-connector/src/auth/tokenCredentials.ts index 9614344345..1ce35a7822 100644 --- a/libraries/botframework-connector/src/auth/tokenCredentials.ts +++ b/libraries/botframework-connector/src/auth/tokenCredentials.ts @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -import { HttpHeaders, Constants, WebResourceLike, ServiceClientCredentials } from '@azure/core-http'; - -const HeaderConstants = Constants.HeaderConstants; -const DEFAULT_AUTHORIZATION_SCHEME = 'Bearer'; +import { + HttpHeaders, + Constants, + WebResourceLike, + ServiceClientCredentials, +} from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; /** * A credentials object that uses a token string and a authorzation scheme to authenticate. */ export class TokenCredentials implements ServiceClientCredentials { token: string; - authorizationScheme: string = DEFAULT_AUTHORIZATION_SCHEME; + authorizationScheme: string = Constants.HeaderConstants.AUTHORIZATION_SCHEME; /** * Creates a new TokenCredentials object. @@ -20,7 +22,7 @@ export class TokenCredentials implements ServiceClientCredentials { * @param {string} token The token. * @param {string} [authorizationScheme] The authorization scheme. */ - constructor(token: string, authorizationScheme: string = DEFAULT_AUTHORIZATION_SCHEME) { + constructor(token: string, authorizationScheme: string = Constants.HeaderConstants.AUTHORIZATION_SCHEME) { if (!token) { throw new Error('token cannot be null or undefined.'); } @@ -34,9 +36,9 @@ export class TokenCredentials implements ServiceClientCredentials { * @param {WebResourceLike} webResource The WebResourceLike to be signed. * @returns {Promise} The signed request object. */ - signRequest(webResource: WebResourceLike) { + signRequest(webResource: WebResourceLike): Promise { if (!webResource.headers) webResource.headers = new HttpHeaders(); - webResource.headers.set(HeaderConstants.AUTHORIZATION, `${this.authorizationScheme} ${this.token}`); + webResource.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${this.authorizationScheme} ${this.token}`); return Promise.resolve(webResource); } } diff --git a/libraries/botframework-connector/src/auth/userTokenClientImpl.ts b/libraries/botframework-connector/src/auth/userTokenClientImpl.ts index 4cca62fd67..19014f3871 100644 --- a/libraries/botframework-connector/src/auth/userTokenClientImpl.ts +++ b/libraries/botframework-connector/src/auth/userTokenClientImpl.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import * as z from 'zod'; -import type { ServiceClientCredentials } from '@azure/core-http'; +import type { ServiceClientCredentials } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; import { Activity, SignInUrlResponse, TokenExchangeRequest, TokenResponse, TokenStatus } from 'botframework-schema'; import { ConnectorClientOptions } from '../connectorApi/models'; import { TokenApiClient } from '../tokenApi/tokenApiClient'; diff --git a/libraries/botframework-connector/src/connectorApi/connectorClient.ts b/libraries/botframework-connector/src/connectorApi/connectorClient.ts index f5f320d3f8..250f25e714 100644 --- a/libraries/botframework-connector/src/connectorApi/connectorClient.ts +++ b/libraries/botframework-connector/src/connectorApi/connectorClient.ts @@ -5,12 +5,11 @@ import * as Mappers from './models/mappers'; import * as Models from './models'; -import { ServiceClientCredentials } from '@azure/core-http'; +import { ServiceClientCredentials } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; import * as operations from './operations'; import { ConnectorClientContext } from './connectorClientContext'; class ConnectorClient extends ConnectorClientContext { - // Operation groups attachments: operations.Attachments; conversations: operations.Conversations; diff --git a/libraries/botframework-connector/src/connectorApi/connectorClientContext.ts b/libraries/botframework-connector/src/connectorApi/connectorClientContext.ts index 02b0abede9..e927f66ec5 100644 --- a/libraries/botframework-connector/src/connectorApi/connectorClientContext.ts +++ b/libraries/botframework-connector/src/connectorApi/connectorClientContext.ts @@ -2,39 +2,23 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ - -import { ServiceClient, ServiceClientCredentials, getDefaultUserAgentValue } from "@azure/core-http"; +import { ServiceClientContext, ServiceClientCredentials } from "botbuilder-stdlib/lib/azureCoreHttpCompat"; import * as Models from "./models"; -const packageName = "botframework-connector"; -const packageVersion = "4.0.0"; - -export class ConnectorClientContext extends ServiceClient { - credentials: ServiceClientCredentials; - - /** - * Initializes a new instance of the ConnectorClientContext class. - * @param credentials Subscription credentials which uniquely identify client subscription. - * @param [options] The parameter options - */ - constructor(credentials: ServiceClientCredentials, options?: Models.ConnectorClientOptions) { - if (credentials === null || credentials === undefined) { - throw new Error('\'credentials\' cannot be null.'); - } - - if (!options) { - // NOTE: autogen creates a {} which is invalid, it needs to be cast - options = {} as Models.ConnectorClientOptions; +const packageName = 'botframework-connector'; +const packageVersion = '4.0.0'; + +export class ConnectorClientContext extends ServiceClientContext { + /** + * Initializes a new instance of the ConnectorClientContext class. + * @param credentials Subscription credentials which uniquely identify client subscription. + * @param [options] The parameter options + */ + constructor(credentials: ServiceClientCredentials, options?: Models.ConnectorClientOptions) { + super(credentials, { + ...options, + baseUri: options?.baseUri || 'https://api.botframework.com', + userAgent: `${packageName}/${packageVersion} ${options?.userAgent || ''}`, + }); } - // TODO This is to workaround fact that AddUserAgent() was removed. - const defaultUserAgent = getDefaultUserAgentValue(); - options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent} ${options.userAgent || ''}`; - - super(credentials, options); - - this.baseUri = options.baseUri || this.baseUri || "https://api.botframework.com"; - this.requestContentType = "application/json; charset=utf-8"; - this.credentials = credentials; - - } } diff --git a/libraries/botframework-connector/src/connectorApi/models/index.ts b/libraries/botframework-connector/src/connectorApi/models/index.ts index cb441f1a8d..bf9fb6dd45 100644 --- a/libraries/botframework-connector/src/connectorApi/models/index.ts +++ b/libraries/botframework-connector/src/connectorApi/models/index.ts @@ -3,8 +3,7 @@ * Licensed under the MIT License. */ - -import { ServiceClientOptions, RequestOptionsBase, HttpResponse } from "@azure/core-http"; +import { ServiceClientOptions, RequestOptionsBase, HttpOperationResponse as HttpResponse } from "botbuilder-stdlib/lib/azureCoreHttpCompat"; import { AttachmentInfo, ChannelAccount, ConversationResourceResponse, ConversationsResult, PagedMembersResult, ResourceResponse } from "botframework-schema"; import type { Agent as HttpAgent } from "http"; import type { Agent as HttpsAgent } from "https"; @@ -15,15 +14,14 @@ export * from "botframework-schema"; */ export interface ConnectorClientOptions extends ServiceClientOptions { /** - * (Optional) baseUri will be set automatically within BotFrameworkAdapter, - * but is required if using the ConnectorClient outside of the adapter. + * HTTP and HTTPS agents which will be used for every HTTP request (Node.js only). */ - baseUri?: string; + agentSettings?: AgentSettings; /** - * HTTP and HTTPS agents which will be used for every HTTP request (Node.js only). + * Token refresh interval in hours used to determine when to refresh the token cache. The default value is 24 hours. */ - agentSettings?: AgentSettings; + tokenRefreshInterval?: number; } /** diff --git a/libraries/botframework-connector/src/connectorApi/models/mappers.ts b/libraries/botframework-connector/src/connectorApi/models/mappers.ts index b6b104410b..146eef1521 100644 --- a/libraries/botframework-connector/src/connectorApi/models/mappers.ts +++ b/libraries/botframework-connector/src/connectorApi/models/mappers.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. */ -import { CompositeMapper } from "@azure/core-http" +import { CompositeMapper } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; export const AttachmentView: CompositeMapper = { serializedName: "AttachmentView", diff --git a/libraries/botframework-connector/src/connectorApi/models/parameters.ts b/libraries/botframework-connector/src/connectorApi/models/parameters.ts index 6b0f81797c..da296daa70 100644 --- a/libraries/botframework-connector/src/connectorApi/models/parameters.ts +++ b/libraries/botframework-connector/src/connectorApi/models/parameters.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. */ -import { OperationURLParameter, OperationQueryParameter } from "@azure/core-http" +import { OperationURLParameter, OperationQueryParameter } from "botbuilder-stdlib/lib/azureCoreHttpCompat" export const activityId: OperationURLParameter = { parameterPath: "activityId", diff --git a/libraries/botframework-connector/src/connectorApi/operations/attachments.ts b/libraries/botframework-connector/src/connectorApi/operations/attachments.ts index c28e2f0b98..3841cd6511 100644 --- a/libraries/botframework-connector/src/connectorApi/operations/attachments.ts +++ b/libraries/botframework-connector/src/connectorApi/operations/attachments.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. */ -import { RequestOptionsBase, ServiceCallback, OperationSpec, Serializer } from "@azure/core-http"; +import { RequestOptionsBase, ServiceCallback, OperationSpec, createSerializer } from "botbuilder-stdlib/lib/azureCoreHttpCompat"; import { ConnectorClientContext } from "../connectorClientContext"; import * as Models from "../models"; import * as Mappers from "../models/attachmentsMappers"; @@ -85,7 +85,7 @@ export class Attachments { } // Operation Specifications -const serializer = new Serializer(Mappers); +const serializer = createSerializer(Mappers); const getAttachmentInfoOperationSpec: OperationSpec = { httpMethod: "GET", path: "v3/attachments/{attachmentId}", diff --git a/libraries/botframework-connector/src/connectorApi/operations/conversations.ts b/libraries/botframework-connector/src/connectorApi/operations/conversations.ts index c38c3c14e1..8ac49a589e 100644 --- a/libraries/botframework-connector/src/connectorApi/operations/conversations.ts +++ b/libraries/botframework-connector/src/connectorApi/operations/conversations.ts @@ -6,7 +6,7 @@ import * as Mappers from "../models/conversationsMappers"; import * as Models from "../models"; import * as Parameters from "../models/parameters"; -import { ServiceCallback, RequestOptionsBase, RestResponse, Serializer, OperationSpec } from "@azure/core-http" +import { ServiceCallback, RequestOptionsBase, RestResponse, createSerializer, OperationSpec } from "botbuilder-stdlib/lib/azureCoreHttpCompat" import { ConnectorClientContext } from "../connectorClientContext"; import { ConversationIdHttpHeaderName } from "../../conversationConstants"; @@ -519,7 +519,7 @@ export class Conversations { } // Operation Specifications -const serializer = new Serializer(Mappers); +const serializer = createSerializer(Mappers); const getConversationsOperationSpec: OperationSpec = { httpMethod: "GET", path: "v3/conversations", diff --git a/libraries/botframework-connector/src/teams/models/index.ts b/libraries/botframework-connector/src/teams/models/index.ts index d2feef3fe3..64ddfb912a 100644 --- a/libraries/botframework-connector/src/teams/models/index.ts +++ b/libraries/botframework-connector/src/teams/models/index.ts @@ -3,7 +3,11 @@ * Licensed under the MIT License. */ -import { HttpResponse, ServiceClientOptions, RequestOptionsBase } from '@azure/core-http'; +import { + HttpOperationResponse as HttpResponse, + ServiceClientOptions, + RequestOptionsBase, +} from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; import { ConversationList, TeamDetails, diff --git a/libraries/botframework-connector/src/teams/models/mappers.ts b/libraries/botframework-connector/src/teams/models/mappers.ts index 86124cf8f2..4d52de7bf4 100644 --- a/libraries/botframework-connector/src/teams/models/mappers.ts +++ b/libraries/botframework-connector/src/teams/models/mappers.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. */ -import { CompositeMapper } from '@azure/core-http'; +import { CompositeMapper } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; export const ChannelInfo: CompositeMapper = { serializedName: 'ChannelInfo', diff --git a/libraries/botframework-connector/src/teams/models/parameters.ts b/libraries/botframework-connector/src/teams/models/parameters.ts index 4f3e13d646..bc75068b94 100644 --- a/libraries/botframework-connector/src/teams/models/parameters.ts +++ b/libraries/botframework-connector/src/teams/models/parameters.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. */ -import { OperationURLParameter, OperationQueryParameter } from '@azure/core-http'; +import { OperationURLParameter, OperationQueryParameter } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; export const teamId: OperationURLParameter = { parameterPath: 'teamId', diff --git a/libraries/botframework-connector/src/teams/operations/teams.ts b/libraries/botframework-connector/src/teams/operations/teams.ts index b3942c889b..3a8c5ec1ae 100644 --- a/libraries/botframework-connector/src/teams/operations/teams.ts +++ b/libraries/botframework-connector/src/teams/operations/teams.ts @@ -4,7 +4,7 @@ * Licensed under the MIT License. */ -import { ServiceCallback, RequestOptionsBase, Serializer, OperationSpec } from '@azure/core-http' +import { ServiceCallback, RequestOptionsBase, createSerializer, OperationSpec } from 'botbuilder-stdlib/lib/azureCoreHttpCompat' import * as Models from '../models'; import * as Mappers from '../models/teamsMappers'; import * as Parameters from '../models/parameters'; @@ -507,7 +507,7 @@ export class Teams { } // Operation Specifications -const serializer = new Serializer(Mappers); +const serializer = createSerializer(Mappers); const fetchChannelListOperationSpec: OperationSpec = { httpMethod: 'GET', path: 'v3/teams/{teamId}/conversations', diff --git a/libraries/botframework-connector/src/teams/teamsConnectorClient.ts b/libraries/botframework-connector/src/teams/teamsConnectorClient.ts index fe943ce85d..17d77a8bd4 100644 --- a/libraries/botframework-connector/src/teams/teamsConnectorClient.ts +++ b/libraries/botframework-connector/src/teams/teamsConnectorClient.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. */ -import { ServiceClientCredentials } from '@azure/core-http'; +import { ServiceClientCredentials } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; import * as Models from './models'; import * as Mappers from './models/mappers'; import * as operations from './operations'; diff --git a/libraries/botframework-connector/src/teams/teamsConnectorClientContext.ts b/libraries/botframework-connector/src/teams/teamsConnectorClientContext.ts index d1ea5a6d3e..b2949bacea 100644 --- a/libraries/botframework-connector/src/teams/teamsConnectorClientContext.ts +++ b/libraries/botframework-connector/src/teams/teamsConnectorClientContext.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. */ -import { ServiceClientCredentials, ServiceClient } from '@azure/core-http'; +import { ServiceClientCredentials, ServiceClientContext } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; import { TeamsConnectorClientOptions } from './models'; /** @@ -12,9 +12,7 @@ import { TeamsConnectorClientOptions } from './models'; * configured in the [Bot Framework Developer Portal](https://dev.botframework.com). * The Connector service uses industry-standard REST and JSON over HTTPS. */ -export class TeamsConnectorClientContext extends ServiceClient { - credentials: ServiceClientCredentials; - +export class TeamsConnectorClientContext extends ServiceClientContext { /** * Initializes a new instance of the TeamsConnectorClientContext class. * @@ -22,14 +20,9 @@ export class TeamsConnectorClientContext extends ServiceClient { * @param [options] The parameter options */ constructor(credentials: ServiceClientCredentials, options?: TeamsConnectorClientOptions) { - if (!options) { - options = {}; - } - - super(credentials, options); - - this.baseUri = options.baseUri || this.baseUri || 'https://api.botframework.com'; - this.requestContentType = 'application/json; charset=utf-8'; - this.credentials = credentials; + super(credentials, { + ...options, + baseUri: options?.baseUri || 'https://api.botframework.com', + }); } } diff --git a/libraries/botframework-connector/src/tokenApi/models/index.ts b/libraries/botframework-connector/src/tokenApi/models/index.ts index 687310d099..5e7397fa90 100644 --- a/libraries/botframework-connector/src/tokenApi/models/index.ts +++ b/libraries/botframework-connector/src/tokenApi/models/index.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. */ -import { ServiceClientOptions, RequestOptionsBase, HttpResponse } from "@azure/core-http"; +import { ServiceClientOptions, RequestOptionsBase, HttpOperationResponse as HttpResponse } from "botbuilder-stdlib/lib/azureCoreHttpCompat"; import { SignInUrlResponse, TokenResponse, TokenStatus } from "botframework-schema"; /** diff --git a/libraries/botframework-connector/src/tokenApi/models/mappers.ts b/libraries/botframework-connector/src/tokenApi/models/mappers.ts index a92d719ecf..bd4f42cec2 100644 --- a/libraries/botframework-connector/src/tokenApi/models/mappers.ts +++ b/libraries/botframework-connector/src/tokenApi/models/mappers.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. */ -import { CompositeMapper } from "@azure/core-http"; +import { CompositeMapper } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; export const TokenExchangeResource: CompositeMapper = { serializedName: "TokenExchangeResource", diff --git a/libraries/botframework-connector/src/tokenApi/models/parameters.ts b/libraries/botframework-connector/src/tokenApi/models/parameters.ts index f6c3a94800..354bbbfe56 100644 --- a/libraries/botframework-connector/src/tokenApi/models/parameters.ts +++ b/libraries/botframework-connector/src/tokenApi/models/parameters.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. */ -import { OperationQueryParameter } from "@azure/core-http" +import { OperationQueryParameter } from "botbuilder-stdlib/lib/azureCoreHttpCompat" export const channelId0: OperationQueryParameter = { parameterPath: [ diff --git a/libraries/botframework-connector/src/tokenApi/operations/botSignIn.ts b/libraries/botframework-connector/src/tokenApi/operations/botSignIn.ts index f35b18984e..fb558a1321 100644 --- a/libraries/botframework-connector/src/tokenApi/operations/botSignIn.ts +++ b/libraries/botframework-connector/src/tokenApi/operations/botSignIn.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. */ -import { ServiceCallback, Serializer, OperationSpec } from "@azure/core-http"; +import { ServiceCallback, createSerializer, OperationSpec } from "botbuilder-stdlib/lib/azureCoreHttpCompat"; import * as Models from "../models"; import * as Mappers from "../models/botSignInMappers"; import * as Parameters from "../models/parameters"; @@ -78,7 +78,7 @@ export class BotSignIn { } // Operation Specifications -const serializer = new Serializer(Mappers); +const serializer = createSerializer(Mappers); const getSignInUrlOperationSpec: OperationSpec = { httpMethod: "GET", path: "api/botsignin/GetSignInUrl", diff --git a/libraries/botframework-connector/src/tokenApi/operations/userToken.ts b/libraries/botframework-connector/src/tokenApi/operations/userToken.ts index 4eba5a3b39..4196dbf9b1 100644 --- a/libraries/botframework-connector/src/tokenApi/operations/userToken.ts +++ b/libraries/botframework-connector/src/tokenApi/operations/userToken.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. */ -import { ServiceCallback, RequestOptionsBase, Serializer, OperationSpec } from '@azure/core-http'; +import { ServiceCallback, RequestOptionsBase, createSerializer, OperationSpec } from 'botbuilder-stdlib/lib/azureCoreHttpCompat'; import * as Models from '../models'; import * as Mappers from '../models/userTokenMappers'; import * as Parameters from '../models/parameters'; @@ -272,7 +272,7 @@ export class UserToken { } // Operation Specifications -const serializer = new Serializer(Mappers); +const serializer = createSerializer(Mappers); const getTokenOperationSpec: OperationSpec = { httpMethod: 'GET', path: 'api/usertoken/GetToken', diff --git a/libraries/botframework-connector/src/tokenApi/tokenApiClient.ts b/libraries/botframework-connector/src/tokenApi/tokenApiClient.ts index 4c432d20e4..8679c4a182 100644 --- a/libraries/botframework-connector/src/tokenApi/tokenApiClient.ts +++ b/libraries/botframework-connector/src/tokenApi/tokenApiClient.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. */ -import { ServiceClientCredentials } from "@azure/core-http"; +import { ServiceClientCredentials } from "botbuilder-stdlib/lib/azureCoreHttpCompat"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; diff --git a/libraries/botframework-connector/src/tokenApi/tokenApiClientContext.ts b/libraries/botframework-connector/src/tokenApi/tokenApiClientContext.ts index 664008e07f..755261a12e 100644 --- a/libraries/botframework-connector/src/tokenApi/tokenApiClientContext.ts +++ b/libraries/botframework-connector/src/tokenApi/tokenApiClientContext.ts @@ -3,41 +3,23 @@ * Licensed under the MIT License. */ -import { ServiceClient, ServiceClientCredentials, getDefaultUserAgentValue } from "@azure/core-http"; +import { ServiceClientContext, ServiceClientCredentials } from "botbuilder-stdlib/lib/azureCoreHttpCompat"; import * as Models from "./models"; -const packageName = "botframework-Token"; -const packageVersion = "4.0.0"; - -export class TokenApiClientContext extends ServiceClient { - credentials: ServiceClientCredentials; - - // Protects against JSON.stringify leaking secrets - private toJSON(): unknown { - return { name: this.constructor.name }; - } - - /** - * Initializes a new instance of the TokenApiClientContext class. - * @param credentials Subscription credentials which uniquely identify client subscription. - * @param [options] The parameter options - */ - constructor(credentials: ServiceClientCredentials, options?: Models.TokenApiClientOptions) { - if (credentials === null || credentials === undefined) { - throw new Error('\'credentials\' cannot be null.'); - } - - if (!options) { - options = {}; +const packageName = 'botframework-token'; +const packageVersion = '4.0.0'; + +export class TokenApiClientContext extends ServiceClientContext { + /** + * Initializes a new instance of the TokenApiClientContext class. + * @param credentials Subscription credentials which uniquely identify client subscription. + * @param [options] The parameter options + */ + constructor(credentials: ServiceClientCredentials, options?: Models.TokenApiClientOptions) { + super(credentials, { + ...options, + baseUri: options?.baseUri || 'https://token.botframework.com', + userAgent: `${packageName}/${packageVersion} ${options?.userAgent || ''}`, + }); } - const defaultUserAgent = getDefaultUserAgentValue(); - options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent} ${options.userAgent || ''}`; - - super(credentials, options); - - this.baseUri = options.baseUri || this.baseUri || "https://token.botframework.com"; - this.requestContentType = "application/json; charset=utf-8"; - this.credentials = credentials; - - } } diff --git a/libraries/botframework-connector/tests/appCredentials.test.js b/libraries/botframework-connector/tests/appCredentials.test.js index 9d10c0b3a6..46d2ccbec4 100644 --- a/libraries/botframework-connector/tests/appCredentials.test.js +++ b/libraries/botframework-connector/tests/appCredentials.test.js @@ -5,7 +5,7 @@ const { AuthenticationConstants, CertificateAppCredentials, MicrosoftAppCredentials } = require('../'); const { ok: assert, strictEqual } = require('assert'); -const { WebResource } = require('@azure/core-http'); +const { createWebResource } = require('botbuilder-stdlib/lib/azureCoreHttpCompat'); const APP_ID = '2cd87869-38a0-4182-9251-d056e8f0ac24'; const APP_PASSWORD = 'password'; @@ -43,13 +43,13 @@ describe('AppCredentials', function () { describe('signRequest', function () { it('should not sign request when appId is falsy', async function () { const creds = new MicrosoftAppCredentials(''); - const webRequest = await creds.signRequest(new WebResource()); + const webRequest = await creds.signRequest(createWebResource()); assert(!webRequest.headers.Authorization); }); it('should not sign request when appId is anonymous skill appId', async function () { const creds = new MicrosoftAppCredentials(AuthenticationConstants.AnonymousSkillAppId); - const webRequest = await creds.signRequest(new WebResource()); + const webRequest = await creds.signRequest(createWebResource()); assert(!webRequest.headers.Authorization); }); }); diff --git a/libraries/botframework-connector/tests/botFrameworkAuthenticationFactory.test.js b/libraries/botframework-connector/tests/botFrameworkAuthenticationFactory.test.js index 90aae41a99..573fc3b751 100644 --- a/libraries/botframework-connector/tests/botFrameworkAuthenticationFactory.test.js +++ b/libraries/botframework-connector/tests/botFrameworkAuthenticationFactory.test.js @@ -11,7 +11,7 @@ const { PasswordServiceClientCredentialFactory, SkillValidation, } = require('..'); -const { HttpHeaders } = require('@azure/core-http'); +const { createPipelineRequest, createHttpHeaders } = require('@azure/core-rest-pipeline'); describe('BotFrameworkAuthenticationFactory', function () { it('should create anonymous BotFrameworkAuthentication', function () { @@ -123,7 +123,7 @@ describe('BotFrameworkAuthenticationFactory', function () { assert.strictEqual(connectorFactory.credentialFactory, credsFactory); const connectorClient = await connectorFactory.create(HOST_SERVICE_URL, HOST_AUDIENCE); - assertHasAcceptHeader(connectorClient); + await assertHasAcceptHeader(connectorClient); assert.strictEqual(connectorClient.credentials.appId, APP_ID); assert.strictEqual(connectorClient.credentials.appPassword, APP_PASSWORD); assert.strictEqual(connectorClient.credentials.oAuthScope, HOST_AUDIENCE); @@ -135,24 +135,18 @@ describe('BotFrameworkAuthenticationFactory', function () { }); }); - function assertHasAcceptHeader(client) { + async function assertHasAcceptHeader(client) { let hasAcceptHeader = false; - const mockNextPolicy = { - create: (_) => ({}), - sendRequest: (_) => { - return {}; - }, - }; const length = client._requestPolicyFactories.length; for (let i = 0; i < length; i++) { - const mockHttp = { - headers: new HttpHeaders(), - }; + const mockHttp = createPipelineRequest({ + headers: createHttpHeaders(), + }); - const result = client._requestPolicyFactories[i].create(mockNextPolicy); + const result = client._requestPolicyFactories[i]; - result.sendRequest(mockHttp); + await result.sendRequest(mockHttp, (request) => ({ request, headers: mockHttp.headers })); if (mockHttp.headers.get('accept') == '*/*') { hasAcceptHeader = true; break; diff --git a/libraries/botframework-connector/tests/ms-rest-mappers-test.js b/libraries/botframework-connector/tests/ms-rest-mappers-test.js index 71393e56d8..997563069b 100644 --- a/libraries/botframework-connector/tests/ms-rest-mappers-test.js +++ b/libraries/botframework-connector/tests/ms-rest-mappers-test.js @@ -1,6 +1,6 @@ -const { Serializer } = require('@azure/core-http'); +const { createSerializer } = require('botbuilder-stdlib/lib/azureCoreHttpCompat'); const Mappers = require('../lib/connectorApi/models/mappers'); -const serializer = new Serializer({ Activity: Mappers.Activity, Entity: Mappers.Entity }); +const serializer = createSerializer({ Activity: Mappers.Activity, Entity: Mappers.Entity }); const assert = require('assert'); describe('serialize', function () { diff --git a/libraries/botframework-connector/tests/openIdMetadata.test.js b/libraries/botframework-connector/tests/openIdMetadata.test.js index de5e4b7b52..b87a283054 100644 --- a/libraries/botframework-connector/tests/openIdMetadata.test.js +++ b/libraries/botframework-connector/tests/openIdMetadata.test.js @@ -78,7 +78,7 @@ GOG4x32vEzakArLPxAKwGvkvu0jToAyvSQIDAQAB assert.equal(foundKey.key, publicKey); }); - it('calls refreshCache if lastUpdated < (1000 * 60 * 60 * 24)', async function () { + it('calls refreshCache if lastUpdated < refreshInterval (default 24)', async function () { let nockScope = setupNockCalls(); const openIdMetadata = new OpenIdMetadata(mockUrl + mockMetadataUrl); @@ -93,6 +93,41 @@ GOG4x32vEzakArLPxAKwGvkvu0jToAyvSQIDAQAB assert(nockScope.isDone(), 'nock calls not completed'); assert.equal(foundKey.key, publicKey); }); + + it('calls refreshCache if lastUpdated > refreshInterval', async function () { + let nockScope = setupNockCalls(); + + const tokenRefreshInterval = 3; // 3 hours + + const openIdMetadata = new OpenIdMetadata(mockUrl + mockMetadataUrl, null, tokenRefreshInterval); + let foundKey = await openIdMetadata.getKey(kid); + assert(nockScope.isDone(), 'nock calls not completed'); + + assert.equal(foundKey.key, publicKey); + openIdMetadata.lastUpdated = Date.now() - 1000 * 60 * 60 * 4; + + nockScope = setupNockCalls(); + foundKey = await openIdMetadata.getKey(kid); + assert(nockScope.isDone(), 'nock calls not completed'); + assert.equal(foundKey.key, publicKey); + }); + + it('retrieves cached key if lastUpdated < refreshInterval', async function () { + let nockScope = setupNockCalls(); + + const tokenRefreshInterval = 3; // 3 hours + + const openIdMetadata = new OpenIdMetadata(mockUrl + mockMetadataUrl, null, tokenRefreshInterval); + let foundKey = await openIdMetadata.getKey(kid); + assert(nockScope.isDone(), 'nock calls not completed'); + + assert.equal(foundKey.key, publicKey); + openIdMetadata.lastUpdated = Date.now() - 1000 * 60 * 60 * 2; + + nockScope = setupNockCalls(); + foundKey = await openIdMetadata.getKey(kid); + assert.equal(foundKey.key, publicKey); + }); }); function setupNockCalls() { diff --git a/libraries/botframework-schema/etc/botframework-schema.api.md b/libraries/botframework-schema/etc/botframework-schema.api.md index f4e015eee5..3be2e4f75e 100644 --- a/libraries/botframework-schema/etc/botframework-schema.api.md +++ b/libraries/botframework-schema/etc/botframework-schema.api.md @@ -711,7 +711,7 @@ export interface ConversationMembers { // @public export interface ConversationParameters { - activity: Activity; + activity?: Activity; bot: ChannelAccount; channelData: any; isGroup: boolean; @@ -3038,7 +3038,7 @@ export function SignInCardView(cardBar: CardBarComponent, header: CardTextCompon // @public export interface SignInCardViewParameters extends BaseCardViewParameters { body: [CardTextComponent] | undefined; - cardViewType: 'signIn'; + cardViewType: 'signIn' | 'signInSso'; footer?: [CardButtonComponent]; header: [CardTextComponent]; } diff --git a/libraries/botframework-schema/src/index.ts b/libraries/botframework-schema/src/index.ts index 6f330f47db..2655472f3d 100644 --- a/libraries/botframework-schema/src/index.ts +++ b/libraries/botframework-schema/src/index.ts @@ -873,7 +873,7 @@ export interface ConversationParameters { * (Optional) When creating a new conversation, use this activity as the initial message to the * conversation */ - activity: Activity; + activity?: Activity; /** * Channel specific payload for creating the conversation */ diff --git a/libraries/botframework-schema/src/sharepoint/cardView/cardViewParameters.ts b/libraries/botframework-schema/src/sharepoint/cardView/cardViewParameters.ts index 1e2cf25175..bc4561d08c 100644 --- a/libraries/botframework-schema/src/sharepoint/cardView/cardViewParameters.ts +++ b/libraries/botframework-schema/src/sharepoint/cardView/cardViewParameters.ts @@ -114,7 +114,7 @@ export interface SignInCardViewParameters extends BaseCardViewParameters { /** * Card View type */ - cardViewType: 'signIn'; + cardViewType: 'signIn' | 'signInSso'; /** * Header area components. */ diff --git a/libraries/botframework-streaming/etc/botframework-streaming.api.md b/libraries/botframework-streaming/etc/botframework-streaming.api.md index 83fac7132c..1e3f90be2a 100644 --- a/libraries/botframework-streaming/etc/botframework-streaming.api.md +++ b/libraries/botframework-streaming/etc/botframework-streaming.api.md @@ -91,8 +91,6 @@ export interface INodeBuffer extends Uint8Array { // (undocumented) readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; // (undocumented) - slice(start?: number, end?: number): this; - // (undocumented) swap16(): this; // (undocumented) swap32(): this; diff --git a/libraries/botframework-streaming/package.json b/libraries/botframework-streaming/package.json index 1206833bdd..fdf8a0b4d5 100644 --- a/libraries/botframework-streaming/package.json +++ b/libraries/botframework-streaming/package.json @@ -30,12 +30,12 @@ } }, "dependencies": { - "@types/node": "18.19.47", "@types/ws": "^6.0.3", "uuid": "^10.0.0", "ws": "^7.5.10" }, "devDependencies": { + "@types/node": "^18.19.123", "chai": "^5.1.2" }, "scripts": { diff --git a/libraries/botframework-streaming/src/interfaces/INodeBuffer.ts b/libraries/botframework-streaming/src/interfaces/INodeBuffer.ts index 5658ae88a7..b07ffe62f4 100644 --- a/libraries/botframework-streaming/src/interfaces/INodeBuffer.ts +++ b/libraries/botframework-streaming/src/interfaces/INodeBuffer.ts @@ -39,7 +39,6 @@ export interface INodeBuffer extends Uint8Array { sourceEnd?: number, ): number; copy(targetBuffer: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - slice(start?: number, end?: number): this; writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; diff --git a/package.json b/package.json index 8e1787e2cc..b0dd55394c 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "**/@types/selenium-webdriver", "adaptive-expressions/d3-format", "botbuilder/filenamify", + "botbuilder-stdlib/@azure/core-http-compat", "botbuilder-azure/p-map", "botbuilder-azure-blobs/p-map", "botbuilder/chai", @@ -26,6 +27,7 @@ "**/@types/selenium-webdriver": "This package is excluded from the root @types folder as it requires ES2015+, whereas some BotBuilder libraries support ES5+.", "adaptive-expressions/d3-format": "This package is excluded because it's compiled as CJS by tsup as it's ESM-only.", "botbuilder/filenamify": "This package is excluded because it's compiled as CJS by tsup as it's ESM-only.", + "botbuilder-stdlib/@azure/core-http-compat": "This package is excluded to access the utils functions from botbuilder-stdlib/node_modules folder.", "botbuilder-azure/p-map": "This package is excluded because it's compiled as CJS by tsup as it's ESM-only.", "botbuilder-azure-blobs/p-map": "This package is excluded because it's compiled as CJS by tsup as it's ESM-only.", "botbuilder/chai": "This package is excluded because it's compiled as CJS by tsup as it's ESM-only.", @@ -66,10 +68,18 @@ "resolutions": { "@microsoft/recognizers-text-number": "~1.3.1", "**/botbuilder-dialogs-adaptive-runtime-integration-restify/restify/send": "^0.19.0", - "**/restify/find-my-way": "^8.2.2" + "**/restify/find-my-way": "^8.2.2", + "@babel/runtime-corejs3": "^7.26.10", + "@babel/runtime": "^7.26.10", + "esbuild": "^0.25.0", + "serialize-javascript": "^6.0.2" }, "resolutionComments": { - "**/restify/find-my-way": "Remove the resolution when restify publishes a new version with the patch" + "**/restify/find-my-way": "Remove the resolution when restify publishes a new version with the patch", + "@babel/runtime-corejs3": "Remove the resolution when this package is updated on the dependencies that require it", + "@babel/runtime": "Remove the resolution when this package is updated on the dependencies that require it", + "esbuild": "Remove the resolution when tsup publishes a new version with the patch", + "serialize-javascript": "Remove the resolution when nightwatch publishes a new version with the patch" }, "devDependencies": { "@azure/logger": "^1.1.4", @@ -80,10 +90,9 @@ "@standardlabs/is-private": "^1.0.1", "@types/lodash": "^4.17.7", "@types/mocha": "^10.0.8", - "@types/node": "18.19.47", + "@types/node": "^18.19.123", "@types/sinon": "^17.0.3", "applicationinsights": "^2.9.6", - "crypto-browserify": "^3.12.0", "depcheck": "^1.4.7", "esbuild-plugin-polyfill-node": "^0.3.0", "https-browserify": "^1.0.0", @@ -111,9 +120,9 @@ "typedoc-plugin-external-module-name": "^4.0.6", "typedoc-plugin-markdown": "^4.2.7", "typedoc": "^0.26.7", - "typescript": "~4.7", + "typescript": "~4.8", "typescript-eslint": "^8.15.0", - "webpack-dev-server": "^5.1.0", + "webpack-dev-server": "^5.2.1", "wsrun": "^5.2.4" }, "nyc": { diff --git a/testing/browser-functional/browser-echo-bot/crypto-shim.js b/testing/browser-functional/browser-echo-bot/crypto-shim.js new file mode 100644 index 0000000000..f1cd25352a --- /dev/null +++ b/testing/browser-functional/browser-echo-bot/crypto-shim.js @@ -0,0 +1,58 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + */ + +/* eslint-disable no-undef */ + +/** + * Replacement for the getRandomValues function in the crypto module. + * + * @param {} array Array to fill with random values. + * @returns A reference to the array passed in as an argument, filled with random values. + */ +export function getRandomValues(array) { + return window.crypto.getRandomValues(array); +} + +/** + * Replacement for the createHash function in the crypto module. + * + * @param {*} algorithm The algorithm to use for hashing. + * @returns A hash that can be used to generate hash digests using the given algorithm + */ +export function createHash(algorithm) { + if (algorithm !== 'sha256') { + throw new Error(`Unsupported hash algorithm: ${algorithm}`); + } + + return { + _data: [], + update(data) { + if (typeof data === 'string') { + this._data.push(new TextEncoder().encode(data)); + } else if (data instanceof Uint8Array) { + this._data.push(data); + } else { + throw new Error('Unsupported data type for hashing'); + } + return this; + }, + async digest() { + const concatenated = new Uint8Array(this._data.reduce((acc, curr) => acc + curr.length, 0)); + let offset = 0; + for (const chunk of this._data) { + concatenated.set(chunk, offset); + offset += chunk.length; + } + const hashBuffer = await window.crypto.subtle.digest('SHA-256', concatenated); + return new Uint8Array(hashBuffer); + }, + }; +} + +export default { + ...window.crypto, + createHash, + getRandomValues, +}; diff --git a/testing/browser-functional/browser-echo-bot/package.json b/testing/browser-functional/browser-echo-bot/package.json index b39e56514e..2ece17a856 100644 --- a/testing/browser-functional/browser-echo-bot/package.json +++ b/testing/browser-functional/browser-echo-bot/package.json @@ -29,7 +29,6 @@ "babel-loader": "^9.2.1", "clean-webpack-plugin": "^4.0.0", "copy-webpack-plugin": "^12.0.2", - "crypto-browserify": "^3.12.0", "css-loader": "^7.1.2", "react": "~18.3.1", "react-dom": "~18.3.1", @@ -38,6 +37,6 @@ "style-loader": "^4.0.0", "webpack": "^5.95.0", "webpack-cli": "^5.1.4", - "webpack-dev-server": "^5.1.0" + "webpack-dev-server": "^5.2.1" } } diff --git a/testing/browser-functional/browser-echo-bot/webpack.config.js b/testing/browser-functional/browser-echo-bot/webpack.config.js index bcb52b73f7..85a0a47119 100644 --- a/testing/browser-functional/browser-echo-bot/webpack.config.js +++ b/testing/browser-functional/browser-echo-bot/webpack.config.js @@ -61,11 +61,14 @@ module.exports = { tls: false, vm: false, path: false, - crypto: require.resolve('crypto-browserify'), + crypto: false, stream: require.resolve('stream-browserify'), buffer: require.resolve('buffer'), 'process/browser': require.resolve('process/browser'), }, + alias: { + crypto: resolve(__dirname, 'crypto-shim.js'), + }, }, output: { filename: 'app.js', diff --git a/testing/browser-functional/package.json b/testing/browser-functional/package.json index 6ba9dcdc15..dce9931499 100644 --- a/testing/browser-functional/package.json +++ b/testing/browser-functional/package.json @@ -5,7 +5,7 @@ "description": "Test to check browser compatibility", "main": "", "devDependencies": { - "axios": "^1.7.7", + "axios": "^1.8.2", "dotenv": "^16.4.5", "nightwatch": "^3.9.0" }, diff --git a/testing/consumer-test/generateTests.ts b/testing/consumer-test/generateTests.ts index 5c6c4d51d4..4c323c6602 100644 --- a/testing/consumer-test/generateTests.ts +++ b/testing/consumer-test/generateTests.ts @@ -10,7 +10,7 @@ import fs from 'fs'; import path from 'path'; -const versions = ['4.7', '4.8', '4.9', '5.0', '5.1', '5.2', '5.3', '5.4', '5.5', '5.6']; +const versions = ['4.8', '4.9', '5.0', '5.1', '5.2', '5.3', '5.4', '5.5', '5.6', '5.7', '5.8', '5.9']; const targets = ['es6', 'esnext']; const testsDir = path.resolve(__dirname, 'tests/generated'); diff --git a/testing/functional/dialogToDialog/dialogRootBot/package.json b/testing/functional/dialogToDialog/dialogRootBot/package.json index eeeca59c58..51768a87b6 100644 --- a/testing/functional/dialogToDialog/dialogRootBot/package.json +++ b/testing/functional/dialogToDialog/dialogRootBot/package.json @@ -18,6 +18,6 @@ "restify": "^11.1.0" }, "devDependencies": { - "typescript": "~4.7" + "typescript": "~4.8" } } diff --git a/testing/functional/dialogToDialog/dialogSkillBot/package.json b/testing/functional/dialogToDialog/dialogSkillBot/package.json index cbf6e6fb03..3e97f09f95 100644 --- a/testing/functional/dialogToDialog/dialogSkillBot/package.json +++ b/testing/functional/dialogToDialog/dialogSkillBot/package.json @@ -18,6 +18,6 @@ "restify": "^11.1.0" }, "devDependencies": { - "typescript": "~4.7" + "typescript": "~4.8" } } diff --git a/tools/resourceManagement/lib/resource/operations/deploymentOperations.js b/tools/resourceManagement/lib/resource/operations/deploymentOperations.js index e4e6a0d86b..13b093fcf0 100644 --- a/tools/resourceManagement/lib/resource/operations/deploymentOperations.js +++ b/tools/resourceManagement/lib/resource/operations/deploymentOperations.js @@ -10,7 +10,8 @@ 'use strict'; -const { stripRequest, stripResponse, WebResource } = require("@azure/core-http"); +const { stripRequest, stripResponse } = require("../utils"); +const { createWebResource } = require("botbuilder-stdlib/lib/azureCoreHttpCompat"); const uuid = require('uuid'); /** @@ -111,7 +112,7 @@ function _get(resourceGroupName, deploymentName, operationId, options, callback) } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -290,7 +291,7 @@ function _list(resourceGroupName, deploymentName, options, callback) { } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -418,7 +419,7 @@ function _listNext(nextPageLink, options, callback) { requestUrl = requestUrl.replace('{nextLink}', nextPageLink); // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; diff --git a/tools/resourceManagement/lib/resource/operations/deployments.js b/tools/resourceManagement/lib/resource/operations/deployments.js index 01bb1ccdd9..77de815595 100644 --- a/tools/resourceManagement/lib/resource/operations/deployments.js +++ b/tools/resourceManagement/lib/resource/operations/deployments.js @@ -10,7 +10,8 @@ 'use strict'; -const { stripRequest, stripResponse, WebResource } = require("@azure/core-http"); +const { stripRequest, stripResponse } = require("../utils"); +const { createWebResource } = require("botbuilder-stdlib/lib/azureCoreHttpCompat"); const uuid = require('uuid'); /** @@ -178,7 +179,7 @@ function _checkExistence(resourceGroupName, deploymentName, options, callback) { } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'HEAD'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -471,7 +472,7 @@ function _get(resourceGroupName, deploymentName, options, callback) { } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -643,7 +644,7 @@ function _cancel(resourceGroupName, deploymentName, options, callback) { } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -857,7 +858,7 @@ function _validate(resourceGroupName, deploymentName, parameters, options, callb } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -1058,7 +1059,7 @@ function _exportTemplate(resourceGroupName, deploymentName, options, callback) { } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -1229,7 +1230,7 @@ function _listByResourceGroup(resourceGroupName, options, callback) { } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -1407,7 +1408,7 @@ function _beginDeleteMethod(resourceGroupName, deploymentName, options, callback } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -1623,7 +1624,7 @@ function _beginCreateOrUpdate(resourceGroupName, deploymentName, parameters, opt } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -1781,7 +1782,7 @@ function _listByResourceGroupNext(nextPageLink, options, callback) { requestUrl = requestUrl.replace('{nextLink}', nextPageLink); // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; diff --git a/tools/resourceManagement/lib/resource/operations/providers.js b/tools/resourceManagement/lib/resource/operations/providers.js index 0876c3944c..36d483039c 100644 --- a/tools/resourceManagement/lib/resource/operations/providers.js +++ b/tools/resourceManagement/lib/resource/operations/providers.js @@ -10,7 +10,8 @@ 'use strict'; -const { stripRequest, stripResponse, WebResource } = require("@azure/core-http"); +const { stripRequest, stripResponse } = require("../utils"); +const { createWebResource } = require("botbuilder-stdlib/lib/azureCoreHttpCompat"); const uuid = require('uuid'); /** @@ -77,7 +78,7 @@ function _unregister(resourceProviderNamespace, options, callback) { } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -217,7 +218,7 @@ function _register(resourceProviderNamespace, options, callback) { } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -372,7 +373,7 @@ function _list(options, callback) { } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -522,7 +523,7 @@ function _get(resourceProviderNamespace, options, callback) { } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -649,7 +650,7 @@ function _listNext(nextPageLink, options, callback) { requestUrl = requestUrl.replace('{nextLink}', nextPageLink); // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; diff --git a/tools/resourceManagement/lib/resource/operations/resourceGroups.js b/tools/resourceManagement/lib/resource/operations/resourceGroups.js index 49b6629c5b..c175b56a35 100644 --- a/tools/resourceManagement/lib/resource/operations/resourceGroups.js +++ b/tools/resourceManagement/lib/resource/operations/resourceGroups.js @@ -10,7 +10,8 @@ 'use strict'; -const { stripRequest, stripResponse, WebResource } = require("@azure/core-http"); +const { stripRequest, stripResponse } = require("../utils"); +const { createWebResource } = require("botbuilder-stdlib/lib/azureCoreHttpCompat"); const uuid = require('uuid'); /** @@ -87,7 +88,7 @@ function _checkExistence(resourceGroupName, options, callback) { } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'HEAD'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -241,7 +242,7 @@ function _createOrUpdate(resourceGroupName, parameters, options, callback) { } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -489,7 +490,7 @@ function _get(resourceGroupName, options, callback) { } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -658,7 +659,7 @@ function _update(resourceGroupName, parameters, options, callback) { } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'PATCH'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -837,7 +838,7 @@ function _exportTemplate(resourceGroupName, parameters, options, callback) { } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -1004,7 +1005,7 @@ function _list(options, callback) { } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -1158,7 +1159,7 @@ function _beginDeleteMethod(resourceGroupName, options, callback) { } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -1269,7 +1270,7 @@ function _listNext(nextPageLink, options, callback) { requestUrl = requestUrl.replace('{nextLink}', nextPageLink); // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; diff --git a/tools/resourceManagement/lib/resource/operations/resources.js b/tools/resourceManagement/lib/resource/operations/resources.js index 3efa42587d..29ab990751 100644 --- a/tools/resourceManagement/lib/resource/operations/resources.js +++ b/tools/resourceManagement/lib/resource/operations/resources.js @@ -11,7 +11,8 @@ 'use strict'; const uuid = require('uuid'); -const { stripRequest, stripResponse, WebResource } = require("@azure/core-http"); +const { stripRequest, stripResponse } = require("../utils"); +const { createWebResource } = require("botbuilder-stdlib/lib/azureCoreHttpCompat"); /** * Get all the resources for a resource group. @@ -116,7 +117,7 @@ function _listByResourceGroup(resourceGroupName, options, callback) { } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -428,7 +429,7 @@ function _list(options, callback) { } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -606,7 +607,7 @@ function _checkExistence(resourceGroupName, resourceProviderNamespace, parentRes } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'HEAD'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -971,7 +972,7 @@ function _get(resourceGroupName, resourceProviderNamespace, parentResourcePath, } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -1109,7 +1110,7 @@ function _checkExistenceById(resourceId, apiVersion, options, callback) { } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'HEAD'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -1419,7 +1420,7 @@ function _getById(resourceId, apiVersion, options, callback) { } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -1584,7 +1585,7 @@ function _beginMoveResources(sourceResourceGroupName, parameters, options, callb } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -1749,7 +1750,7 @@ function _beginValidateMoveResources(sourceResourceGroupName, parameters, option } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -1923,7 +1924,7 @@ function _beginDeleteMethod(resourceGroupName, resourceProviderNamespace, parent } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -2129,7 +2130,7 @@ function _beginCreateOrUpdate(resourceGroupName, resourceProviderNamespace, pare } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -2298,7 +2299,7 @@ function _beginDeleteById(resourceId, apiVersion, options, callback) { } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -2465,7 +2466,7 @@ function _beginCreateOrUpdateById(resourceId, apiVersion, parameters, options, c } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -2623,7 +2624,7 @@ function _listByResourceGroupNext(nextPageLink, options, callback) { requestUrl = requestUrl.replace('{nextLink}', nextPageLink); // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -2750,7 +2751,7 @@ function _listNext(nextPageLink, options, callback) { requestUrl = requestUrl.replace('{nextLink}', nextPageLink); // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; diff --git a/tools/resourceManagement/lib/resource/operations/tags.js b/tools/resourceManagement/lib/resource/operations/tags.js index bbd72bade2..36875e4260 100644 --- a/tools/resourceManagement/lib/resource/operations/tags.js +++ b/tools/resourceManagement/lib/resource/operations/tags.js @@ -10,7 +10,8 @@ 'use strict'; -const { stripRequest, stripResponse, WebResource } = require("@azure/core-http"); +const { stripRequest, stripResponse } = require("../utils"); +const { createWebResource } = require("botbuilder-stdlib/lib/azureCoreHttpCompat"); const uuid = require('uuid'); /** @@ -81,7 +82,7 @@ function _deleteValue(tagName, tagValue, options, callback) { } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -209,7 +210,7 @@ function _createOrUpdateValue(tagName, tagValue, options, callback) { } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -369,7 +370,7 @@ function _createOrUpdate(tagName, options, callback) { } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'PUT'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -526,7 +527,7 @@ function _deleteMethod(tagName, options, callback) { } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -643,7 +644,7 @@ function _list(options, callback) { } // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; @@ -771,7 +772,7 @@ function _listNext(nextPageLink, options, callback) { requestUrl = requestUrl.replace('{nextLink}', nextPageLink); // Create HTTP transport objects - let httpRequest = new WebResource(); + let httpRequest = createWebResource(); httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; diff --git a/tools/resourceManagement/lib/resource/resourceManagementClient.js b/tools/resourceManagement/lib/resource/resourceManagementClient.js index 187e4427ed..9b1ceb9e58 100644 --- a/tools/resourceManagement/lib/resource/resourceManagementClient.js +++ b/tools/resourceManagement/lib/resource/resourceManagementClient.js @@ -14,7 +14,7 @@ 'use strict'; -const { ServiceClient, Serializer } = require("@azure/core-http"); +const { ServiceClientContext, createSerializer } = require("botbuilder-stdlib/lib/azureCoreHttpCompat"); const fs = require('fs'); const path = require('path'); @@ -23,7 +23,7 @@ const operations = require('./operations'); /** Class representing a ResourceManagementClient. */ -class ResourceManagementClient extends ServiceClient { +class ResourceManagementClient extends ServiceClientContext { /** * Create a ResourceManagementClient. * @param {credentials} credentials - Credentials needed for the client to connect to Azure. @@ -87,7 +87,7 @@ class ResourceManagementClient extends ServiceClient { addSerializationMixin(destObject) { ['serialize', 'serializeObject', 'deserialize'].forEach((property) => { - destObject[property] = Serializer[property]; + destObject[property] = createSerializer()[property]; }); }; diff --git a/tools/resourceManagement/lib/resource/utils.js b/tools/resourceManagement/lib/resource/utils.js new file mode 100644 index 0000000000..975b969ee2 --- /dev/null +++ b/tools/resourceManagement/lib/resource/utils.js @@ -0,0 +1,31 @@ +/** + * Returns a stripped version of the Http Response which only contains body, + * headers and the status. + * + * @param response - The Http Response + * @returns The stripped version of Http Response. + */ +function stripResponse(response) { + const strippedResponse = {}; + strippedResponse.body = response.bodyAsText; + strippedResponse.headers = response.headers; + strippedResponse.status = response.status; + return strippedResponse; + } + + /** + * Returns a stripped version of the Http Request that does not contain the + * Authorization header. + * + * @param request - The Http Request object + * @returns The stripped version of Http Request. + */ + function stripRequest(request) { + const strippedRequest = request.clone(); + if (strippedRequest.headers) { + strippedRequest.headers.remove("authorization"); + } + return strippedRequest; + } + + module.exports = { stripResponse, stripRequest }; \ No newline at end of file diff --git a/tools/resourceManagement/package.json b/tools/resourceManagement/package.json index e7e3744279..aebdeebed9 100644 --- a/tools/resourceManagement/package.json +++ b/tools/resourceManagement/package.json @@ -29,5 +29,8 @@ }, "scripts": { "test": "npm -s run-script jshint" + }, + "dependencies": { + "botbuilder-stdlib": "4.1.6" } } diff --git a/tsup/browser.config.ts b/tsup/browser.config.ts index 92085c7f5a..82cef821da 100644 --- a/tsup/browser.config.ts +++ b/tsup/browser.config.ts @@ -40,7 +40,7 @@ export default defineConfig((options) => { global: 'globalThis', }; options.alias = { - crypto: 'crypto-browserify', + crypto: resolve(__dirname, 'crypto-shim.js'), http: 'stream-http', https: 'https-browserify', stream: 'stream-browserify', diff --git a/tsup/crypto-shim.js b/tsup/crypto-shim.js new file mode 100644 index 0000000000..d543e73dd6 --- /dev/null +++ b/tsup/crypto-shim.js @@ -0,0 +1 @@ +export default window.crypto; diff --git a/yarn.lock b/yarn.lock index e1229e098c..7a4532f9de 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17,7 +17,7 @@ dependencies: tslib "^1.9.3" -"@azure/abort-controller@^2.0.0": +"@azure/abort-controller@^2.0.0", "@azure/abort-controller@^2.1.2": version "2.1.2" resolved "https://registry.yarnpkg.com/@azure/abort-controller/-/abort-controller-2.1.2.tgz#42fe0ccab23841d9905812c58f1082d27784566d" integrity sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA== @@ -38,14 +38,6 @@ "@azure/core-util" "^1.1.0" tslib "^2.6.2" -"@azure/core-auth@^1.3.0": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@azure/core-auth/-/core-auth-1.3.2.tgz#6a2c248576c26df365f6c7881ca04b7f6d08e3d0" - integrity sha512-7CU6DmCHIZp5ZPiZ9r3J17lTKMmYsm/zGvNkjArQwPkrLlZ1TZ+EUYfGgh2X31OLMVAQCTJZW4cXHJi02EbJnA== - dependencies: - "@azure/abort-controller" "^1.0.0" - tslib "^2.2.0" - "@azure/core-auth@^1.4.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@azure/core-auth/-/core-auth-1.4.0.tgz#6fa9661c1705857820dbc216df5ba5665ac36a9e" @@ -54,6 +46,15 @@ "@azure/abort-controller" "^1.0.0" tslib "^2.2.0" +"@azure/core-auth@^1.8.0", "@azure/core-auth@^1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@azure/core-auth/-/core-auth-1.9.0.tgz#ac725b03fabe3c892371065ee9e2041bee0fd1ac" + integrity sha512-FPwHpZywuyasDSLMqJ6fhbOK3TqUdviZNF8OqRGA4W5Ewib2lEEZ+pBsYcBa88B2NGO/SEnYPGhyBqNlE8ilSw== + dependencies: + "@azure/abort-controller" "^2.0.0" + "@azure/core-util" "^1.11.0" + tslib "^2.6.2" + "@azure/core-client@^1.3.0", "@azure/core-client@^1.6.2", "@azure/core-client@^1.9.2": version "1.9.2" resolved "https://registry.yarnpkg.com/@azure/core-client/-/core-client-1.9.2.tgz#6fc69cee2816883ab6c5cdd653ee4f2ff9774f74" @@ -67,7 +68,7 @@ "@azure/logger" "^1.0.0" tslib "^2.6.2" -"@azure/core-http-compat@^2.0.0": +"@azure/core-http-compat@^2.0.0", "@azure/core-http-compat@^2.1.2": version "2.1.2" resolved "https://registry.yarnpkg.com/@azure/core-http-compat/-/core-http-compat-2.1.2.tgz#d1585ada24ba750dc161d816169b33b35f762f0d" integrity sha512-5MnV1yqzZwgNLLjlizsU3QqOeQChkIXw781Fwh1xdAqJR5AA32IUaq6xv1BICJvfbHoa+JYcaij2HFkhLbNTJQ== @@ -76,26 +77,6 @@ "@azure/core-client" "^1.3.0" "@azure/core-rest-pipeline" "^1.3.0" -"@azure/core-http@^3.0.4": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@azure/core-http/-/core-http-3.0.4.tgz#024b2909bbc0f2fce08c74f97a21312c4f42e922" - integrity sha512-Fok9VVhMdxAFOtqiiAtg74fL0UJkt0z3D+ouUUxcRLzZNBioPRAMJFVxiWoJljYpXsRi4GDQHzQHDc9AiYaIUQ== - dependencies: - "@azure/abort-controller" "^1.0.0" - "@azure/core-auth" "^1.3.0" - "@azure/core-tracing" "1.0.0-preview.13" - "@azure/core-util" "^1.1.1" - "@azure/logger" "^1.0.0" - "@types/node-fetch" "^2.5.0" - "@types/tunnel" "^0.0.3" - form-data "^4.0.0" - node-fetch "^2.6.7" - process "^0.11.10" - tslib "^2.2.0" - tunnel "^0.0.6" - uuid "^8.3.0" - xml2js "^0.5.0" - "@azure/core-lro@^2.2.0": version "2.5.4" resolved "https://registry.yarnpkg.com/@azure/core-lro/-/core-lro-2.5.4.tgz#b21e2bcb8bd9a8a652ff85b61adeea51a8055f90" @@ -127,13 +108,19 @@ https-proxy-agent "^7.0.0" tslib "^2.6.2" -"@azure/core-tracing@1.0.0-preview.13": - version "1.0.0-preview.13" - resolved "https://registry.yarnpkg.com/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz#55883d40ae2042f6f1e12b17dd0c0d34c536d644" - integrity sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ== +"@azure/core-rest-pipeline@^1.18.1": + version "1.18.1" + resolved "https://registry.yarnpkg.com/@azure/core-rest-pipeline/-/core-rest-pipeline-1.18.1.tgz#380e7d3f15be80de83ee414176adb32824402f38" + integrity sha512-/wS73UEDrxroUEVywEm7J0p2c+IIiVxyfigCGfsKvCxxCET4V/Hef2aURqltrXMRjNmdmt5IuOgIpl8f6xdO5A== dependencies: - "@opentelemetry/api" "^1.0.1" - tslib "^2.2.0" + "@azure/abort-controller" "^2.0.0" + "@azure/core-auth" "^1.8.0" + "@azure/core-tracing" "^1.0.1" + "@azure/core-util" "^1.11.0" + "@azure/logger" "^1.0.0" + http-proxy-agent "^7.0.0" + https-proxy-agent "^7.0.0" + tslib "^2.6.2" "@azure/core-tracing@^1.0.0", "@azure/core-tracing@^1.0.1", "@azure/core-tracing@^1.1.1", "@azure/core-tracing@^1.1.2": version "1.1.2" @@ -142,6 +129,13 @@ dependencies: tslib "^2.6.2" +"@azure/core-tracing@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@azure/core-tracing/-/core-tracing-1.2.0.tgz#7be5d53c3522d639cf19042cbcdb19f71bc35ab2" + integrity sha512-UKTiEJPkWcESPYJz3X5uKRYyOcJD+4nYph+KpfdPRnQJVrZfk0KJgdnaAWKfhsBBtAf/D58Az4AvCJEmWgIBAg== + dependencies: + tslib "^2.6.2" + "@azure/core-util@^1.1.0", "@azure/core-util@^1.3.0", "@azure/core-util@^1.6.1", "@azure/core-util@^1.8.1", "@azure/core-util@^1.9.0": version "1.9.2" resolved "https://registry.yarnpkg.com/@azure/core-util/-/core-util-1.9.2.tgz#1dc37dc5b0dae34c578be62cf98905ba7c0cafe7" @@ -150,7 +144,15 @@ "@azure/abort-controller" "^2.0.0" tslib "^2.6.2" -"@azure/core-util@^1.1.1", "@azure/core-util@^1.2.0": +"@azure/core-util@^1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@azure/core-util/-/core-util-1.11.0.tgz#f530fc67e738aea872fbdd1cc8416e70219fada7" + integrity sha512-DxOSLua+NdpWoSqULhjDyAZTXFdP/LKkqtYuxxz1SCN289zk3OG8UOpnCQAz/tygyACBtWp/BoO72ptK7msY8g== + dependencies: + "@azure/abort-controller" "^2.0.0" + tslib "^2.6.2" + +"@azure/core-util@^1.2.0": version "1.5.0" resolved "https://registry.yarnpkg.com/@azure/core-util/-/core-util-1.5.0.tgz#ffe49c3e867044da67daeb8122143fa065e1eb0e" integrity sha512-GZBpVFDtQ/15hW1OgBcRdT4Bl7AEpcEZqLfbAvOtm1CQUncKWiYapFHVD588hmlV27NbOOtSm3cnLF3lvoHi4g== @@ -356,6 +358,15 @@ "@babel/highlight" "^7.25.7" picocolors "^1.0.0" +"@babel/code-frame@^7.26.2": + version "7.26.2" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.26.2.tgz#4b5fab97d33338eff916235055f0ebc21e573a85" + integrity sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ== + dependencies: + "@babel/helper-validator-identifier" "^7.25.9" + js-tokens "^4.0.0" + picocolors "^1.0.0" + "@babel/compat-data@^7.22.6", "@babel/compat-data@^7.22.9": version "7.23.2" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.23.2.tgz#6a12ced93455827037bfb5ed8492820d60fc32cc" @@ -852,6 +863,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.25.7.tgz#d50e8d37b1176207b4fe9acedec386c565a44a54" integrity sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g== +"@babel/helper-string-parser@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz#1aabb72ee72ed35789b4bbcad3ca2862ce614e8c" + integrity sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA== + "@babel/helper-validator-identifier@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" @@ -877,6 +893,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz#77b7f60c40b15c97df735b38a66ba1d7c3e93da5" integrity sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg== +"@babel/helper-validator-identifier@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz#24b64e2c3ec7cd3b3c547729b8d16871f22cbdc7" + integrity sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ== + "@babel/helper-validator-option@^7.22.15": version "7.22.15" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz#694c30dfa1d09a6534cdfcafbe56789d36aba040" @@ -915,21 +936,13 @@ "@babel/traverse" "^7.25.7" "@babel/types" "^7.25.7" -"@babel/helpers@^7.25.0": - version "7.25.6" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.25.6.tgz#57ee60141829ba2e102f30711ffe3afab357cc60" - integrity sha512-Xg0tn4HcfTijTwfDwYlvVCl43V6h4KyVVX2aEm4qdO/PC6L2YvzLHFdmxhoeSA3eslcE6+ZVXHgWwopXYLNq4Q== - dependencies: - "@babel/template" "^7.25.0" - "@babel/types" "^7.25.6" - -"@babel/helpers@^7.25.7": - version "7.25.7" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.25.7.tgz#091b52cb697a171fe0136ab62e54e407211f09c2" - integrity sha512-Sv6pASx7Esm38KQpF/U/OXLwPPrdGHNKoeblRxgZRLXnAtnkEe4ptJPDtAZM7fBLadbc1Q07kQpSiGQ0Jg6tRA== +"@babel/helpers@^7.25.0", "@babel/helpers@^7.25.7": + version "7.26.10" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.26.10.tgz#6baea3cd62ec2d0c1068778d63cb1314f6637384" + integrity sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g== dependencies: - "@babel/template" "^7.25.7" - "@babel/types" "^7.25.7" + "@babel/template" "^7.26.9" + "@babel/types" "^7.26.10" "@babel/highlight@^7.14.5": version "7.14.5" @@ -1000,6 +1013,13 @@ dependencies: "@babel/types" "^7.25.7" +"@babel/parser@^7.26.9": + version "7.26.10" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.10.tgz#e9bdb82f14b97df6569b0b038edd436839c57749" + integrity sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA== + dependencies: + "@babel/types" "^7.26.10" + "@babel/plugin-bugfix-firefox-class-in-computed-class-key@^7.25.3": version "7.25.3" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.25.3.tgz#dca427b45a6c0f5c095a1c639dfe2476a3daba7f" @@ -2258,65 +2278,21 @@ resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310" integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== -"@babel/runtime-corejs3@7.20.13": - version "7.20.13" - resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.20.13.tgz#ad012857db412ab0b5ccf184b67be2cfcc2a1dcf" - integrity sha512-p39/6rmY9uvlzRiLZBIB3G9/EBr66LBMcYm7fIDeSBNdRjF2AGD3rFZucUyAgGHC2N+7DdLvVi33uTjSE44FIw== - dependencies: - core-js-pure "^3.25.1" - regenerator-runtime "^0.13.11" - -"@babel/runtime-corejs3@^7.14.0", "@babel/runtime-corejs3@^7.15.4", "@babel/runtime-corejs3@^7.17.2", "@babel/runtime-corejs3@^7.23.1", "@babel/runtime-corejs3@^7.24.1": - version "7.25.7" - resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.25.7.tgz#29ca319b1272e9d78faa3f7ee891d0af63c53aa2" - integrity sha512-gMmIEhg35sXk9Te5qbGp3W9YKrvLt3HV658/d3odWrHSqT0JeG5OzsJWFHRLiOohRyjRsJc/x03DhJm3i8VJxg== - dependencies: - core-js-pure "^3.30.2" - regenerator-runtime "^0.14.0" - -"@babel/runtime-corejs3@^7.20.7", "@babel/runtime-corejs3@^7.22.15": - version "7.23.8" - resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.23.8.tgz#b8aa3d47570bdd08fed77fdfd69542118af0df26" - integrity sha512-2ZzmcDugdm0/YQKFVYsXiwUN7USPX8PM7cytpb4PFl87fM+qYPSvTZX//8tyeJB1j0YDmafBJEbl5f8NfLyuKw== +"@babel/runtime-corejs3@7.20.13", "@babel/runtime-corejs3@^7.14.0", "@babel/runtime-corejs3@^7.15.4", "@babel/runtime-corejs3@^7.17.2", "@babel/runtime-corejs3@^7.20.7", "@babel/runtime-corejs3@^7.22.15", "@babel/runtime-corejs3@^7.23.1", "@babel/runtime-corejs3@^7.24.1", "@babel/runtime-corejs3@^7.26.10": + version "7.26.10" + resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.26.10.tgz#5a3185ca2813f8de8ae68622572086edf5cf51f2" + integrity sha512-uITFQYO68pMEYR46AHgQoyBg7KPPJDAbGn4jUTIRgCFJIp88MIBUianVOplhZDEec07bp9zIyr4Kp0FCyQzmWg== dependencies: core-js-pure "^3.30.2" regenerator-runtime "^0.14.0" -"@babel/runtime@7.14.8": - version "7.14.8" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.14.8.tgz#7119a56f421018852694290b9f9148097391b446" - integrity sha512-twj3L8Og5SaCRCErB4x4ajbvBIVV77CGeFglHpeg5WC5FF8TZzBWXtTJ4MqaD9QszLYTtr+IsaAL2rEUevb+eg== - dependencies: - regenerator-runtime "^0.13.4" - -"@babel/runtime@7.15.4": - version "7.15.4" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.15.4.tgz#fd17d16bfdf878e6dd02d19753a39fa8a8d9c84a" - integrity sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw== - dependencies: - regenerator-runtime "^0.13.4" - -"@babel/runtime@7.19.0": - version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.19.0.tgz#22b11c037b094d27a8a2504ea4dcff00f50e2259" - integrity sha512-eR8Lo9hnDS7tqkO7NsV+mKvCmv5boaXFSZ70DnfhcgiEne8hv9oCEd36Klw74EtizEqLsy4YnW8UWwpBVolHZA== - dependencies: - regenerator-runtime "^0.13.4" - -"@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.18.3", "@babel/runtime@^7.25.6", "@babel/runtime@^7.6.3", "@babel/runtime@^7.9.2": - version "7.25.7" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.7.tgz#7ffb53c37a8f247c8c4d335e89cdf16a2e0d0fb6" - integrity sha512-FjoyLe754PMiYsFaN5C94ttGiOmBNYTf6pLr4xXHAT5uctHb092PBszndLDR5XA/jghQvn4n7JMHl7dmTgbm9w== +"@babel/runtime@7.14.8", "@babel/runtime@7.15.4", "@babel/runtime@7.19.0", "@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.18.3", "@babel/runtime@^7.25.6", "@babel/runtime@^7.26.10", "@babel/runtime@^7.6.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": + version "7.26.10" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.26.10.tgz#a07b4d8fa27af131a633d7b3524db803eb4764c2" + integrity sha512-2WJMeRQPHKSPemqk/awGrAiuFfzBmOIPXKizAsVhWH9YJqLZ0H+HS4c8loHGgW6utJ3E/ejXQUsiGaQy2NZ9Fw== dependencies: regenerator-runtime "^0.14.0" -"@babel/runtime@^7.8.4": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.1.tgz#b4116a6b6711d010b2dad3b7b6e43bf1b9954740" - integrity sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA== - dependencies: - regenerator-runtime "^0.13.4" - "@babel/template@^7.22.15": version "7.22.15" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" @@ -2353,6 +2329,15 @@ "@babel/parser" "^7.25.7" "@babel/types" "^7.25.7" +"@babel/template@^7.26.9": + version "7.26.9" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.26.9.tgz#4577ad3ddf43d194528cff4e1fa6b232fa609bb2" + integrity sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA== + dependencies: + "@babel/code-frame" "^7.26.2" + "@babel/parser" "^7.26.9" + "@babel/types" "^7.26.9" + "@babel/traverse@^7.23.2", "@babel/traverse@^7.24.7", "@babel/traverse@^7.24.8", "@babel/traverse@^7.25.0", "@babel/traverse@^7.25.1", "@babel/traverse@^7.25.2", "@babel/traverse@^7.25.3", "@babel/traverse@^7.25.4": version "7.25.6" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.6.tgz#04fad980e444f182ecf1520504941940a90fea41" @@ -2433,6 +2418,14 @@ "@babel/helper-validator-identifier" "^7.25.7" to-fast-properties "^2.0.0" +"@babel/types@^7.26.10", "@babel/types@^7.26.9": + version "7.26.10" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.10.tgz#396382f6335bd4feb65741eacfc808218f859259" + integrity sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ== + dependencies: + "@babel/helper-string-parser" "^7.25.9" + "@babel/helper-validator-identifier" "^7.25.9" + "@babel/types@^7.4.4": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.1.tgz#e109d9ab99a8de735be287ee3d6a9947a190c4ae" @@ -2575,130 +2568,130 @@ esquery "^1.6.0" jsdoc-type-pratt-parser "~4.1.0" -"@esbuild/aix-ppc64@0.23.1": - version "0.23.1" - resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz#51299374de171dbd80bb7d838e1cfce9af36f353" - integrity sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ== - -"@esbuild/android-arm64@0.23.1": - version "0.23.1" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz#58565291a1fe548638adb9c584237449e5e14018" - integrity sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw== - -"@esbuild/android-arm@0.23.1": - version "0.23.1" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.23.1.tgz#5eb8c652d4c82a2421e3395b808e6d9c42c862ee" - integrity sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ== - -"@esbuild/android-x64@0.23.1": - version "0.23.1" - resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.23.1.tgz#ae19d665d2f06f0f48a6ac9a224b3f672e65d517" - integrity sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg== - -"@esbuild/darwin-arm64@0.23.1": - version "0.23.1" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz#05b17f91a87e557b468a9c75e9d85ab10c121b16" - integrity sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q== - -"@esbuild/darwin-x64@0.23.1": - version "0.23.1" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz#c58353b982f4e04f0d022284b8ba2733f5ff0931" - integrity sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw== - -"@esbuild/freebsd-arm64@0.23.1": - version "0.23.1" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz#f9220dc65f80f03635e1ef96cfad5da1f446f3bc" - integrity sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA== - -"@esbuild/freebsd-x64@0.23.1": - version "0.23.1" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz#69bd8511fa013b59f0226d1609ac43f7ce489730" - integrity sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g== - -"@esbuild/linux-arm64@0.23.1": - version "0.23.1" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz#8050af6d51ddb388c75653ef9871f5ccd8f12383" - integrity sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g== - -"@esbuild/linux-arm@0.23.1": - version "0.23.1" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz#ecaabd1c23b701070484990db9a82f382f99e771" - integrity sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ== - -"@esbuild/linux-ia32@0.23.1": - version "0.23.1" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz#3ed2273214178109741c09bd0687098a0243b333" - integrity sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ== - -"@esbuild/linux-loong64@0.14.54": - version "0.14.54" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.14.54.tgz#de2a4be678bd4d0d1ffbb86e6de779cde5999028" - integrity sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw== - -"@esbuild/linux-loong64@0.23.1": - version "0.23.1" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz#a0fdf440b5485c81b0fbb316b08933d217f5d3ac" - integrity sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw== - -"@esbuild/linux-mips64el@0.23.1": - version "0.23.1" - resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz#e11a2806346db8375b18f5e104c5a9d4e81807f6" - integrity sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q== - -"@esbuild/linux-ppc64@0.23.1": - version "0.23.1" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz#06a2744c5eaf562b1a90937855b4d6cf7c75ec96" - integrity sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw== - -"@esbuild/linux-riscv64@0.23.1": - version "0.23.1" - resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz#65b46a2892fc0d1af4ba342af3fe0fa4a8fe08e7" - integrity sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA== - -"@esbuild/linux-s390x@0.23.1": - version "0.23.1" - resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz#e71ea18c70c3f604e241d16e4e5ab193a9785d6f" - integrity sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw== - -"@esbuild/linux-x64@0.23.1": - version "0.23.1" - resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz#d47f97391e80690d4dfe811a2e7d6927ad9eed24" - integrity sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ== - -"@esbuild/netbsd-x64@0.23.1": - version "0.23.1" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz#44e743c9778d57a8ace4b72f3c6b839a3b74a653" - integrity sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA== - -"@esbuild/openbsd-arm64@0.23.1": - version "0.23.1" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz#05c5a1faf67b9881834758c69f3e51b7dee015d7" - integrity sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q== - -"@esbuild/openbsd-x64@0.23.1": - version "0.23.1" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz#2e58ae511bacf67d19f9f2dcd9e8c5a93f00c273" - integrity sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA== - -"@esbuild/sunos-x64@0.23.1": - version "0.23.1" - resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz#adb022b959d18d3389ac70769cef5a03d3abd403" - integrity sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA== - -"@esbuild/win32-arm64@0.23.1": - version "0.23.1" - resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz#84906f50c212b72ec360f48461d43202f4c8b9a2" - integrity sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A== - -"@esbuild/win32-ia32@0.23.1": - version "0.23.1" - resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz#5e3eacc515820ff729e90d0cb463183128e82fac" - integrity sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ== - -"@esbuild/win32-x64@0.23.1": - version "0.23.1" - resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz#81fd50d11e2c32b2d6241470e3185b70c7b30699" - integrity sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg== +"@esbuild/aix-ppc64@0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.25.0.tgz#499600c5e1757a524990d5d92601f0ac3ce87f64" + integrity sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ== + +"@esbuild/android-arm64@0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.25.0.tgz#b9b8231561a1dfb94eb31f4ee056b92a985c324f" + integrity sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g== + +"@esbuild/android-arm@0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.25.0.tgz#ca6e7888942505f13e88ac9f5f7d2a72f9facd2b" + integrity sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g== + +"@esbuild/android-x64@0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.25.0.tgz#e765ea753bac442dfc9cb53652ce8bd39d33e163" + integrity sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg== + +"@esbuild/darwin-arm64@0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.25.0.tgz#fa394164b0d89d4fdc3a8a21989af70ef579fa2c" + integrity sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw== + +"@esbuild/darwin-x64@0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.25.0.tgz#91979d98d30ba6e7d69b22c617cc82bdad60e47a" + integrity sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg== + +"@esbuild/freebsd-arm64@0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.0.tgz#b97e97073310736b430a07b099d837084b85e9ce" + integrity sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w== + +"@esbuild/freebsd-x64@0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.25.0.tgz#f3b694d0da61d9910ec7deff794d444cfbf3b6e7" + integrity sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A== + +"@esbuild/linux-arm64@0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.25.0.tgz#f921f699f162f332036d5657cad9036f7a993f73" + integrity sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg== + +"@esbuild/linux-arm@0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.25.0.tgz#cc49305b3c6da317c900688995a4050e6cc91ca3" + integrity sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg== + +"@esbuild/linux-ia32@0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.25.0.tgz#3e0736fcfab16cff042dec806247e2c76e109e19" + integrity sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg== + +"@esbuild/linux-loong64@0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.25.0.tgz#ea2bf730883cddb9dfb85124232b5a875b8020c7" + integrity sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw== + +"@esbuild/linux-mips64el@0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.25.0.tgz#4cababb14eede09248980a2d2d8b966464294ff1" + integrity sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ== + +"@esbuild/linux-ppc64@0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.25.0.tgz#8860a4609914c065373a77242e985179658e1951" + integrity sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw== + +"@esbuild/linux-riscv64@0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.25.0.tgz#baf26e20bb2d38cfb86ee282dff840c04f4ed987" + integrity sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA== + +"@esbuild/linux-s390x@0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.25.0.tgz#8323afc0d6cb1b6dc6e9fd21efd9e1542c3640a4" + integrity sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA== + +"@esbuild/linux-x64@0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.25.0.tgz#08fcf60cb400ed2382e9f8e0f5590bac8810469a" + integrity sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw== + +"@esbuild/netbsd-arm64@0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.0.tgz#935c6c74e20f7224918fbe2e6c6fe865b6c6ea5b" + integrity sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw== + +"@esbuild/netbsd-x64@0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.25.0.tgz#414677cef66d16c5a4d210751eb2881bb9c1b62b" + integrity sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA== + +"@esbuild/openbsd-arm64@0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.0.tgz#8fd55a4d08d25cdc572844f13c88d678c84d13f7" + integrity sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw== + +"@esbuild/openbsd-x64@0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.25.0.tgz#0c48ddb1494bbc2d6bcbaa1429a7f465fa1dedde" + integrity sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg== + +"@esbuild/sunos-x64@0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.25.0.tgz#86ff9075d77962b60dd26203d7352f92684c8c92" + integrity sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg== + +"@esbuild/win32-arm64@0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.25.0.tgz#849c62327c3229467f5b5cd681bf50588442e96c" + integrity sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw== + +"@esbuild/win32-ia32@0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.25.0.tgz#f62eb480cd7cca088cb65bb46a6db25b725dc079" + integrity sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA== + +"@esbuild/win32-x64@0.25.0": + version "0.25.0" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.25.0.tgz#c8e119a30a7c8d60b9d2e22d2073722dde3b710b" + integrity sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ== "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" @@ -3311,11 +3304,6 @@ resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.9.0.tgz#d03eba68273dc0f7509e2a3d5cba21eae10379fe" integrity sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg== -"@opentelemetry/api@^1.0.1": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.0.3.tgz#13a12ae9e05c2a782f7b5e84c3cbfda4225eaf80" - integrity sha512-puWxACExDe9nxbBB3lOymQFrLYml2dVOrd7USiVRnSbgXE+KwBu+HxFvxrzfqsiSda9IWsXJG1ef7C1O2/GmKQ== - "@opentelemetry/core@1.26.0", "@opentelemetry/core@^1.19.0", "@opentelemetry/core@^1.25.1": version "1.26.0" resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-1.26.0.tgz#7d84265aaa850ed0ca5813f97d831155be42b328" @@ -4137,6 +4125,16 @@ "@types/range-parser" "*" "@types/send" "*" +"@types/express-serve-static-core@^4.17.21": + version "4.19.6" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.19.6.tgz#e01324c2a024ff367d92c66f48553ced0ab50267" + integrity sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A== + dependencies: + "@types/node" "*" + "@types/qs" "*" + "@types/range-parser" "*" + "@types/send" "*" + "@types/express-serve-static-core@^4.17.33": version "4.19.5" resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.19.5.tgz#218064e321126fcf9048d1ca25dd2465da55d9c6" @@ -4310,14 +4308,6 @@ resolved "https://registry.yarnpkg.com/@types/nconf/-/nconf-0.10.7.tgz#921830f3180700bef1aed07c36d27efd451d5bc0" integrity sha512-ltJgbQX0XgjkeDrz0anTCXLBLatppWYFCxp88ILEwybfAuyNWr0Qb+ceFFqZ0VDR8fguEjr0hH37ZF+AF4gsxw== -"@types/node-fetch@^2.5.0": - version "2.5.7" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.7.tgz#20a2afffa882ab04d44ca786449a276f9f6bbf3c" - integrity sha512-o2WVNf5UhWRkxlf6eq+jMZDu7kjgpgJfl4xVNlvryc95O/6F2ld8ztKX+qu+Rjyet93WAWm5LjeX9H5FGkODvw== - dependencies: - "@types/node" "*" - form-data "^3.0.0" - "@types/node-fetch@^2.6.11": version "2.6.11" resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.11.tgz#9b39b78665dae0e82a08f02f4967d62c66f95d24" @@ -4338,18 +4328,18 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.6.tgz#146d3da57b3c636cc0d1769396ce1cfa8991147f" integrity sha512-6QlRuqsQ/Ox/aJEQWBEJG7A9+u7oSYl3mem/K8IzxXG/kAGbV1YPD9Bg9Zw3vyxC/YP+zONKwy8hGkSt1jxFMw== -"@types/node@18.19.47": - version "18.19.47" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.47.tgz#18076201ad7dd3445046df6ce9ead5fe5abd9387" - integrity sha512-1f7dB3BL/bpd9tnDJrrHb66Y+cVrhxSOTGorRNdHwYTUlTay3HuTDPKo9a/4vX9pMQkhYBcAbL4jQdNlhCFP9A== - dependencies: - undici-types "~5.26.4" - "@types/node@^10.17.27": version "10.17.44" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.44.tgz#3945e6b702cb6403f22b779c8ea9e5c3f44ead40" integrity sha512-vHPAyBX1ffLcy4fQHmDyIUMUb42gHZjPHU66nhvbMzAWJqHnySGZ6STwN3rwrnSd1FHB0DI/RWgGELgKSYRDmw== +"@types/node@^18.19.123": + version "18.19.123" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.123.tgz#08a3e4f5e0c73b8840c677b7635ce59d5dc1f76d" + integrity sha512-K7DIaHnh0mzVxreCR9qwgNxp3MH9dltPNIEddW9MYUlcKAzm+3grKNSTe2vCJHI1FaLpvpL5JGJrz1UZDKYvDg== + dependencies: + undici-types "~5.26.4" + "@types/normalize-package-data@^2.4.1": version "2.4.4" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz#56e2cc26c397c038fab0e3a917a12d5c5909e901" @@ -4498,13 +4488,6 @@ resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.0.tgz#fef1904e4668b6e5ecee60c52cc6a078ffa6697d" integrity sha512-I99sngh224D0M7XgW1s120zxCt3VYQ3IQsuw3P3jbq5GG4yc79+ZjyKznyOGIQrflfylLgcfekeZW/vk0yng6A== -"@types/tunnel@^0.0.3": - version "0.0.3" - resolved "https://registry.yarnpkg.com/@types/tunnel/-/tunnel-0.0.3.tgz#f109e730b072b3136347561fc558c9358bb8c6e9" - integrity sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA== - dependencies: - "@types/node" "*" - "@types/unist@*", "@types/unist@^3.0.0": version "3.0.3" resolved "https://registry.yarnpkg.com/@types/unist/-/unist-3.0.3.tgz#acaab0f919ce69cce629c2d4ed2eb4adc1b6c20c" @@ -5410,7 +5393,7 @@ asn1.js-rfc5280@^3.0.0: dependencies: asn1.js "^5.0.0" -asn1.js@^5.0.0, asn1.js@^5.2.0: +asn1.js@^5.0.0: version "5.4.1" resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz#11a980b84ebb91781ce35b0fdc2ee294e3783f07" integrity sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== @@ -5547,18 +5530,18 @@ axe-core@^4.9.1: integrity sha512-Mr2ZakwQ7XUAjp7pAwQWRhhK8mQQ6JAaNWSjmjxil0R8BPioMtQsTLOolGYkji1rcL++3dCqZA3zWqpT+9Ew6g== axios@^1.4.0: - version "1.7.5" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.5.tgz#21eed340eb5daf47d29b6e002424b3e88c8c54b1" - integrity sha512-fZu86yCo+svH3uqJ/yTdQ0QHpQu5oL+/QE+QPSv6BZSkDAoky9vytxp7u5qk83OJFS3kEBcesWni9WTZAv3tSw== + version "1.8.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.8.4.tgz#78990bb4bc63d2cae072952d374835950a82f447" + integrity sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw== dependencies: follow-redirects "^1.15.6" form-data "^4.0.0" proxy-from-env "^1.1.0" -axios@^1.7.7: - version "1.7.7" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.7.tgz#2f554296f9892a72ac8d8e4c5b79c14a91d0a47f" - integrity sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q== +axios@^1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.8.2.tgz#fabe06e241dfe83071d4edfbcaa7b1c3a40f7979" + integrity sha512-ls4GYBm5aig9vWx8AWDSGLpnpDQRtWAfrjU+EuytuODrFBkqesN2RkOQCBzrA1RQNHw1SmRMSDDDSwzNAYQ6Rg== dependencies: follow-redirects "^1.15.6" form-data "^4.0.0" @@ -5716,21 +5699,11 @@ bluebird@^3.5.1, bluebird@~3.7.2: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -bn.js@^4.0.0, bn.js@^4.1.0: +bn.js@^4.0.0: version "4.11.9" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== -bn.js@^4.11.9: - version "4.12.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" - integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== - -bn.js@^5.0.0, bn.js@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" - integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== - body-parser@1.20.3, body-parser@^1.20.3: version "1.20.3" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.3.tgz#1953431221c6fb5cd63c4b36d53fab0928e548c6" @@ -5928,78 +5901,11 @@ braces@^3.0.3, braces@~3.0.2: dependencies: fill-range "^7.1.1" -brorand@^1.0.1, brorand@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= - browser-stdout@1.3.1, browser-stdout@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== -browserify-aes@^1.0.0, browserify-aes@^1.0.4: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -browserify-cipher@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" - integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== - dependencies: - browserify-aes "^1.0.4" - browserify-des "^1.0.0" - evp_bytestokey "^1.0.0" - -browserify-des@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" - integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== - dependencies: - cipher-base "^1.0.1" - des.js "^1.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -browserify-rsa@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" - integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= - dependencies: - bn.js "^4.1.0" - randombytes "^2.0.1" - -browserify-rsa@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.1.0.tgz#b2fd06b5b75ae297f7ce2dc651f918f5be158c8d" - integrity sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog== - dependencies: - bn.js "^5.0.0" - randombytes "^2.0.1" - -browserify-sign@^4.0.0: - version "4.2.2" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.2.tgz#e78d4b69816d6e3dd1c747e64e9947f9ad79bc7e" - integrity sha512-1rudGyeYY42Dk6texmv7c4VcQ0EsvVbLwZkA+AQB7SxvXxmcD93jcHie8bzecJ+ChDlmAm2Qyu0+Ccg5uhZXCg== - dependencies: - bn.js "^5.2.1" - browserify-rsa "^4.1.0" - create-hash "^1.2.0" - create-hmac "^1.1.7" - elliptic "^6.5.4" - inherits "^2.0.4" - parse-asn1 "^5.1.6" - readable-stream "^3.6.2" - safe-buffer "^5.2.1" - browserslist@^4.21.10, browserslist@^4.22.2: version "4.23.1" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.1.tgz#ce4af0534b3d37db5c1a4ca98b9080f985041e96" @@ -6060,11 +5966,6 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= - buffer@6.0.3, buffer@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" @@ -6149,6 +6050,14 @@ caching-transform@^4.0.0: package-hash "^4.0.0" write-file-atomic "^3.0.0" +call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6" + integrity sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + call-bind@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" @@ -6343,14 +6252,6 @@ ci-info@3.3.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.0.tgz#b4ed1fb6818dea4803a55c623041f9165d2066b2" integrity sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw== -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - cjs-module-lexer@^1.2.2: version "1.4.1" resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz#707413784dbb3a72aa11c2f2b042a0bef4004170" @@ -6521,7 +6422,7 @@ colors@^1.4.0: resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== -combined-stream@^1.0.6, combined-stream@^1.0.8: +combined-stream@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -6702,6 +6603,19 @@ copy-webpack-plugin@^12.0.2: schema-utils "^4.2.0" serialize-javascript "^6.0.2" +copyfiles@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.4.1.tgz#d2dcff60aaad1015f09d0b66e7f0f1c5cd3c5da5" + integrity sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg== + dependencies: + glob "^7.0.5" + minimatch "^3.0.3" + mkdirp "^1.0.4" + noms "0.0.0" + through2 "^2.0.1" + untildify "^4.0.0" + yargs "^16.1.0" + core-js-compat@^3.37.1, core-js-compat@^3.38.0, core-js-compat@^3.38.1: version "3.38.1" resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.38.1.tgz#2bc7a298746ca5a7bcb9c164bcb120f2ebc09a09" @@ -6709,11 +6623,6 @@ core-js-compat@^3.37.1, core-js-compat@^3.38.0, core-js-compat@^3.38.1: dependencies: browserslist "^4.23.3" -core-js-pure@^3.25.1: - version "3.38.1" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.38.1.tgz#e8534062a54b7221344884ba9b52474be495ada3" - integrity sha512-BY8Etc1FZqdw1glX0XNOq2FDwfrg/VGqoZOZCdaL+UmdaqDwQwYXkMJT4t6In+zfEfOJDcM9T0KdbBeJg8KKCQ== - core-js-pure@^3.30.2: version "3.35.0" resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.35.0.tgz#4660033304a050215ae82e476bd2513a419fbb34" @@ -6773,37 +6682,6 @@ crc32-stream@^4.0.2: crc-32 "^1.2.0" readable-stream "^3.4.0" -create-ecdh@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" - integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== - dependencies: - bn.js "^4.1.0" - elliptic "^6.5.3" - -create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" - integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - md5.js "^1.3.4" - ripemd160 "^2.0.1" - sha.js "^2.4.0" - -create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" - integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - create-require@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" @@ -6848,23 +6726,6 @@ crypt@0.0.2: resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" integrity sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs= -crypto-browserify@^3.12.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" - integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== - dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - randomfill "^1.0.3" - css-loader@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-7.1.2.tgz#64671541c6efe06b0e22e750503106bdd86880f8" @@ -7237,14 +7098,6 @@ dequal@^2.0.0: resolved "https://registry.yarnpkg.com/dequal/-/dequal-2.0.3.tgz#2644214f1997d39ed0ee0ece72335490a7ac67be" integrity sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA== -des.js@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" - integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== - dependencies: - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - destroy@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" @@ -7314,15 +7167,6 @@ diff@^7.0.0: resolved "https://registry.yarnpkg.com/diff/-/diff-7.0.0.tgz#3fb34d387cd76d803f6eebea67b921dab0182a9a" integrity sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw== -diffie-hellman@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" - integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" - dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -7431,6 +7275,15 @@ dtrace-provider@~0.8: dependencies: nan "^2.14.0" +dunder-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a" + integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== + dependencies: + call-bind-apply-helpers "^1.0.1" + es-errors "^1.3.0" + gopd "^1.2.0" + duplexer2@~0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1" @@ -7506,19 +7359,6 @@ electron-to-chromium@^1.5.4: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.13.tgz#1abf0410c5344b2b829b7247e031f02810d442e6" integrity sha512-lbBcvtIJ4J6sS4tb5TLp1b4LyfCdMkwStzXPyAgVgTRAsep4bvrAGaBOP7ZJtQMNJpSQ9SqG4brWOroNaQtm7Q== -elliptic@^6.5.3, elliptic@^6.5.4: - version "6.6.0" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.6.0.tgz#5919ec723286c1edf28685aa89261d4761afa210" - integrity sha512-dpwoQcLc/2WLQvJvLRHKZ+f9FgOdjnq11rurqwekGQygGPsYSK29OMMD2WalatiqQ+XGFDglTNixpPfI+lpaAA== - dependencies: - bn.js "^4.11.9" - brorand "^1.1.0" - hash.js "^1.0.0" - hmac-drbg "^1.0.1" - inherits "^2.0.4" - minimalistic-assert "^1.0.1" - minimalistic-crypto-utils "^1.0.1" - emitter-listener@^1.0.1, emitter-listener@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/emitter-listener/-/emitter-listener-1.1.2.tgz#56b140e8f6992375b3d7cb2cab1cc7432d9632e8" @@ -7724,6 +7564,11 @@ es-define-property@^1.0.0: dependencies: get-intrinsic "^1.2.4" +es-define-property@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" + integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== + es-errors@^1.2.1, es-errors@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" @@ -7756,6 +7601,13 @@ es-object-atoms@^1.0.0: dependencies: es-errors "^1.3.0" +es-object-atoms@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1" + integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA== + dependencies: + es-errors "^1.3.0" + es-set-tostringtag@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz#8bb60f0a440c2e4281962428438d58545af39777" @@ -7765,6 +7617,16 @@ es-set-tostringtag@^2.0.3: has-tostringtag "^1.0.2" hasown "^2.0.1" +es-set-tostringtag@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz#f31dbbe0c183b00a6d26eb6325c810c0fd18bd4d" + integrity sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA== + dependencies: + es-errors "^1.3.0" + get-intrinsic "^1.2.6" + has-tostringtag "^1.0.2" + hasown "^2.0.2" + es-shim-unscopables@^1.0.0, es-shim-unscopables@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763" @@ -7786,86 +7648,6 @@ es6-error@^4.0.1: resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d" integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg== -esbuild-android-64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.14.54.tgz#505f41832884313bbaffb27704b8bcaa2d8616be" - integrity sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ== - -esbuild-android-arm64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.54.tgz#8ce69d7caba49646e009968fe5754a21a9871771" - integrity sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg== - -esbuild-darwin-64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.54.tgz#24ba67b9a8cb890a3c08d9018f887cc221cdda25" - integrity sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug== - -esbuild-darwin-arm64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.54.tgz#3f7cdb78888ee05e488d250a2bdaab1fa671bf73" - integrity sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw== - -esbuild-freebsd-64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.54.tgz#09250f997a56ed4650f3e1979c905ffc40bbe94d" - integrity sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg== - -esbuild-freebsd-arm64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.54.tgz#bafb46ed04fc5f97cbdb016d86947a79579f8e48" - integrity sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q== - -esbuild-linux-32@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.54.tgz#e2a8c4a8efdc355405325033fcebeb941f781fe5" - integrity sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw== - -esbuild-linux-64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.54.tgz#de5fdba1c95666cf72369f52b40b03be71226652" - integrity sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg== - -esbuild-linux-arm64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.54.tgz#dae4cd42ae9787468b6a5c158da4c84e83b0ce8b" - integrity sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig== - -esbuild-linux-arm@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.54.tgz#a2c1dff6d0f21dbe8fc6998a122675533ddfcd59" - integrity sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw== - -esbuild-linux-mips64le@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.54.tgz#d9918e9e4cb972f8d6dae8e8655bf9ee131eda34" - integrity sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw== - -esbuild-linux-ppc64le@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.54.tgz#3f9a0f6d41073fb1a640680845c7de52995f137e" - integrity sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ== - -esbuild-linux-riscv64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.54.tgz#618853c028178a61837bc799d2013d4695e451c8" - integrity sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg== - -esbuild-linux-s390x@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.54.tgz#d1885c4c5a76bbb5a0fe182e2c8c60eb9e29f2a6" - integrity sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA== - -esbuild-netbsd-64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.54.tgz#69ae917a2ff241b7df1dbf22baf04bd330349e81" - integrity sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w== - -esbuild-openbsd-64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.54.tgz#db4c8495287a350a6790de22edea247a57c5d47b" - integrity sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw== - esbuild-plugin-polyfill-node@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/esbuild-plugin-polyfill-node/-/esbuild-plugin-polyfill-node-0.3.0.tgz#e7e3804b8272df51ae4f8ebfb7445a03712504cb" @@ -7874,82 +7656,36 @@ esbuild-plugin-polyfill-node@^0.3.0: "@jspm/core" "^2.0.1" import-meta-resolve "^3.0.0" -esbuild-sunos-64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.54.tgz#54287ee3da73d3844b721c21bc80c1dc7e1bf7da" - integrity sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw== - -esbuild-windows-32@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.54.tgz#f8aaf9a5667630b40f0fb3aa37bf01bbd340ce31" - integrity sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w== - -esbuild-windows-64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.54.tgz#bf54b51bd3e9b0f1886ffdb224a4176031ea0af4" - integrity sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ== - -esbuild-windows-arm64@0.14.54: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.54.tgz#937d15675a15e4b0e4fafdbaa3a01a776a2be982" - integrity sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg== - -esbuild@^0.14.23: - version "0.14.54" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.54.tgz#8b44dcf2b0f1a66fc22459943dccf477535e9aa2" - integrity sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA== - optionalDependencies: - "@esbuild/linux-loong64" "0.14.54" - esbuild-android-64 "0.14.54" - esbuild-android-arm64 "0.14.54" - esbuild-darwin-64 "0.14.54" - esbuild-darwin-arm64 "0.14.54" - esbuild-freebsd-64 "0.14.54" - esbuild-freebsd-arm64 "0.14.54" - esbuild-linux-32 "0.14.54" - esbuild-linux-64 "0.14.54" - esbuild-linux-arm "0.14.54" - esbuild-linux-arm64 "0.14.54" - esbuild-linux-mips64le "0.14.54" - esbuild-linux-ppc64le "0.14.54" - esbuild-linux-riscv64 "0.14.54" - esbuild-linux-s390x "0.14.54" - esbuild-netbsd-64 "0.14.54" - esbuild-openbsd-64 "0.14.54" - esbuild-sunos-64 "0.14.54" - esbuild-windows-32 "0.14.54" - esbuild-windows-64 "0.14.54" - esbuild-windows-arm64 "0.14.54" - -esbuild@^0.23.0: - version "0.23.1" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.23.1.tgz#40fdc3f9265ec0beae6f59824ade1bd3d3d2dab8" - integrity sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg== +esbuild@^0.14.23, esbuild@^0.23.0, esbuild@^0.25.0: + version "0.25.0" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.25.0.tgz#0de1787a77206c5a79eeb634a623d39b5006ce92" + integrity sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw== optionalDependencies: - "@esbuild/aix-ppc64" "0.23.1" - "@esbuild/android-arm" "0.23.1" - "@esbuild/android-arm64" "0.23.1" - "@esbuild/android-x64" "0.23.1" - "@esbuild/darwin-arm64" "0.23.1" - "@esbuild/darwin-x64" "0.23.1" - "@esbuild/freebsd-arm64" "0.23.1" - "@esbuild/freebsd-x64" "0.23.1" - "@esbuild/linux-arm" "0.23.1" - "@esbuild/linux-arm64" "0.23.1" - "@esbuild/linux-ia32" "0.23.1" - "@esbuild/linux-loong64" "0.23.1" - "@esbuild/linux-mips64el" "0.23.1" - "@esbuild/linux-ppc64" "0.23.1" - "@esbuild/linux-riscv64" "0.23.1" - "@esbuild/linux-s390x" "0.23.1" - "@esbuild/linux-x64" "0.23.1" - "@esbuild/netbsd-x64" "0.23.1" - "@esbuild/openbsd-arm64" "0.23.1" - "@esbuild/openbsd-x64" "0.23.1" - "@esbuild/sunos-x64" "0.23.1" - "@esbuild/win32-arm64" "0.23.1" - "@esbuild/win32-ia32" "0.23.1" - "@esbuild/win32-x64" "0.23.1" + "@esbuild/aix-ppc64" "0.25.0" + "@esbuild/android-arm" "0.25.0" + "@esbuild/android-arm64" "0.25.0" + "@esbuild/android-x64" "0.25.0" + "@esbuild/darwin-arm64" "0.25.0" + "@esbuild/darwin-x64" "0.25.0" + "@esbuild/freebsd-arm64" "0.25.0" + "@esbuild/freebsd-x64" "0.25.0" + "@esbuild/linux-arm" "0.25.0" + "@esbuild/linux-arm64" "0.25.0" + "@esbuild/linux-ia32" "0.25.0" + "@esbuild/linux-loong64" "0.25.0" + "@esbuild/linux-mips64el" "0.25.0" + "@esbuild/linux-ppc64" "0.25.0" + "@esbuild/linux-riscv64" "0.25.0" + "@esbuild/linux-s390x" "0.25.0" + "@esbuild/linux-x64" "0.25.0" + "@esbuild/netbsd-arm64" "0.25.0" + "@esbuild/netbsd-x64" "0.25.0" + "@esbuild/openbsd-arm64" "0.25.0" + "@esbuild/openbsd-x64" "0.25.0" + "@esbuild/sunos-x64" "0.25.0" + "@esbuild/win32-arm64" "0.25.0" + "@esbuild/win32-ia32" "0.25.0" + "@esbuild/win32-x64" "0.25.0" escalade@^3.1.1: version "3.1.1" @@ -8250,14 +7986,6 @@ events@^3.2.0, events@^3.3.0: resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== -evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - ewma@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/ewma/-/ewma-2.0.1.tgz#9876c1c491ac5733c8666001a3961a04c97cf1e8" @@ -8310,7 +8038,7 @@ expand-tilde@^2.0.0, expand-tilde@^2.0.2: dependencies: homedir-polyfill "^1.0.1" -express@^4.19.2, express@^4.21.0: +express@^4.21.0, express@^4.21.2: version "4.21.2" resolved "https://registry.yarnpkg.com/express/-/express-4.21.2.tgz#cf250e48362174ead6cea4a566abef0162c1ec32" integrity sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA== @@ -8637,16 +8365,11 @@ flatted@^3.2.9: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== -follow-redirects@^1.0.0: +follow-redirects@^1.0.0, follow-redirects@^1.15.6: version "1.15.9" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.9.tgz#a604fa10e443bf98ca94228d9eebcc2e8a2c8ee1" integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ== -follow-redirects@^1.15.6: - version "1.15.6" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" - integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== - for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -8688,30 +8411,26 @@ foreground-child@^3.1.0, foreground-child@^3.3.0: signal-exit "^4.0.1" form-data@^2.5.0: - version "2.5.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" - integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -form-data@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.0.tgz#31b7e39c85f1355b7139ee0c647cf0de7f83c682" - integrity sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg== + version "2.5.5" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.5.tgz#a5f6364ad7e4e67e95b4a07e2d8c6f711c74f624" + integrity sha512-jqdObeR2rxZZbPSGL+3VckHMYtu+f9//KXBsVny6JSX/pa38Fy+bGjuG8eW/H6USNQWhLi8Num++cU2yOCNz4A== dependencies: asynckit "^0.4.0" combined-stream "^1.0.8" - mime-types "^2.1.12" + es-set-tostringtag "^2.1.0" + hasown "^2.0.2" + mime-types "^2.1.35" + safe-buffer "^5.2.1" form-data@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + version "4.0.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.4.tgz#784cdcce0669a9d68e94d11ac4eea98088edd2c4" + integrity sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow== dependencies: asynckit "^0.4.0" combined-stream "^1.0.8" + es-set-tostringtag "^2.1.0" + hasown "^2.0.2" mime-types "^2.1.12" formidable@^1.2.1: @@ -8876,11 +8595,35 @@ get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2, get-intrinsic@ has-symbols "^1.0.3" hasown "^2.0.0" +get-intrinsic@^1.2.6: + version "1.3.0" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz#743f0e3b6964a93a5491ed1bffaae054d7f98d01" + integrity sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ== + dependencies: + call-bind-apply-helpers "^1.0.2" + es-define-property "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.1.1" + function-bind "^1.1.2" + get-proto "^1.0.1" + gopd "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + math-intrinsics "^1.1.0" + get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== +get-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1" + integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g== + dependencies: + dunder-proto "^1.0.1" + es-object-atoms "^1.0.0" + get-stream@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" @@ -8955,7 +8698,7 @@ glob-watcher@^6.0.0: async-done "^2.0.0" chokidar "^3.5.3" -glob@7.2.3, glob@^7.2.0, glob@^7.2.3: +glob@7.2.3, glob@^7.0.5, glob@^7.2.0, glob@^7.2.3: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -9103,6 +8846,11 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" +gopd@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" + integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== + graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2: version "4.2.4" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" @@ -9213,6 +8961,11 @@ has-symbols@^1.0.2, has-symbols@^1.0.3: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== +has-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" + integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== + has-tostringtag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" @@ -9239,23 +8992,6 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" -hash-base@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" - integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== - dependencies: - inherits "^2.0.4" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - hasha@^5.0.0: version "5.2.2" resolved "https://registry.yarnpkg.com/hasha/-/hasha-5.2.2.tgz#a48477989b3b327aea3c04f53096d816d97522a1" @@ -9314,15 +9050,6 @@ heimdalljs@^0.2.3: dependencies: rsvp "~3.2.1" -hmac-drbg@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" @@ -9366,11 +9093,6 @@ html-encoding-sniffer@^4.0.0: dependencies: whatwg-encoding "^3.1.1" -html-entities@^2.4.0: - version "2.5.2" - resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.5.2.tgz#201a3cf95d3a15be7099521620d19dfb4f65359f" - integrity sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA== - html-escaper@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" @@ -9465,10 +9187,10 @@ http-proxy-agent@^7.0.0, http-proxy-agent@^7.0.2: agent-base "^7.1.0" debug "^4.3.4" -http-proxy-middleware@^2.0.3: - version "2.0.7" - resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-2.0.7.tgz#915f236d92ae98ef48278a95dedf17e991936ec6" - integrity sha512-fgVY8AV7qU7z/MmXJ/rxwbrtQH4jBQ9m7kp3llF0liB7glmFeVZFBepQb32T3y8n8k2+AEYuMPCpinYW+/CuRA== +http-proxy-middleware@^2.0.9: + version "2.0.9" + resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-2.0.9.tgz#e9e63d68afaa4eee3d147f39149ab84c0c2815ef" + integrity sha512-c1IyJYLYppU574+YI7R4QyX2ystMtVXZwIdzazUIPIJsHuWNd+mho2j+bKoHftndicGj9yh+xjd+l0yj7VeT1Q== dependencies: "@types/http-proxy" "^1.17.8" http-proxy "^1.18.1" @@ -10940,20 +10662,16 @@ markdown-it@^14.1.0: punycode.js "^2.3.1" uc.micro "^2.1.0" +math-intrinsics@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" + integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== + math-random@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/math-random/-/math-random-2.0.1.tgz#5604b16c6a9a4aee63aff13937fb909b27e46b3a" integrity sha512-oIEbWiVDxDpl5tIF4S6zYS9JExhh3bun3uLb3YAinHPTlRtW4g1S66LtJrJ4Npq8dgIa8CLK5iPVah5n4n0s2w== -md5.js@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" - integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - md5@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/md5/-/md5-2.3.0.tgz#c3da9a6aae3a30b46b7b0c349b87b110dc3bda4f" @@ -11291,14 +11009,6 @@ microsoft-cognitiveservices-speech-sdk@1.17.0: ws "^7.3.1" xmlhttprequest-ts "^1.0.1" -miller-rabin@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" - integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - mime-db@1.44.0: version "1.44.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" @@ -11369,17 +11079,12 @@ minim@~0.23.8: dependencies: lodash "^4.15.0" -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: +minimalistic-assert@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== -minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= - -minimatch@3.1.2, minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: +minimatch@3.1.2, minimatch@^3.0.3, minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -11875,6 +11580,14 @@ node-releases@^2.0.18: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.18.tgz#f010e8d35e2fe8d6b2944f03f70213ecedc4ca3f" integrity sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g== +noms@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/noms/-/noms-0.0.0.tgz#da8ebd9f3af9d6760919b27d9cdc8092a7332859" + integrity sha512-lNDU9VJaOPxUmXcLb+HQFeUgQQPtMI24Gt6hgfuMHRJgMRHMF/qZ4HJD3GDru4sSw9IQl2jPjAYnQrdIeLbwow== + dependencies: + inherits "^2.0.1" + readable-stream "~1.0.31" + nopt@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88" @@ -12359,17 +12072,6 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parse-asn1@^5.0.0, parse-asn1@^5.1.6: - version "5.1.6" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.6.tgz#385080a3ec13cb62a62d39409cb3e88844cdaed4" - integrity sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== - dependencies: - asn1.js "^5.2.0" - browserify-aes "^1.0.0" - evp_bytestokey "^1.0.0" - pbkdf2 "^3.0.3" - safe-buffer "^5.1.1" - parse-filepath@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.2.tgz#a632127f53aaf3d15876f5872f3ffac763d6c891" @@ -12524,17 +12226,6 @@ pathval@^2.0.0: resolved "https://registry.yarnpkg.com/pathval/-/pathval-2.0.0.tgz#7e2550b422601d4f6b8e26f1301bc8f15a741a25" integrity sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA== -pbkdf2@^3.0.3: - version "3.1.1" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.1.tgz#cb8724b0fada984596856d1a6ebafd3584654b94" - integrity sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg== - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - picocolors@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" @@ -12871,18 +12562,6 @@ psl@^1.1.33: resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== -public-encrypt@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" - integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== - dependencies: - bn.js "^4.1.0" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - parse-asn1 "^5.0.0" - randombytes "^2.0.1" - safe-buffer "^5.1.2" - pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" @@ -12948,21 +12627,13 @@ random-js@^2.1.0: resolved "https://registry.yarnpkg.com/random-js/-/random-js-2.1.0.tgz#0c03238b0a4f701f7a4c7303036ade3083d8ee14" integrity sha512-CRUyWmnzmZBA7RZSVGq0xMqmgCyPPxbiKNLFA5ud7KenojVX2s7Gv+V7eB52beKTPGxWRnVZ7D/tCIgYJJ8vNQ== -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: +randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== dependencies: safe-buffer "^5.1.0" -randomfill@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" - integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== - dependencies: - randombytes "^2.0.5" - safe-buffer "^5.1.0" - range-parser@^1.2.0, range-parser@^1.2.1, range-parser@~1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" @@ -13159,7 +12830,7 @@ readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@~2.3.6: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@^3.4.0, readable-stream@^3.6.2: +readable-stream@^3.4.0: version "3.6.2" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== @@ -13179,6 +12850,16 @@ readable-stream@^4.0.0: process "^0.11.10" string_decoder "^1.3.0" +readable-stream@~1.0.31: + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + integrity sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + readdir-glob@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/readdir-glob/-/readdir-glob-1.1.3.tgz#c3d831f51f5e7bfa62fa2ffbe4b508c640f09584" @@ -13255,16 +12936,6 @@ regenerate@^1.4.2: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== -regenerator-runtime@^0.13.11: - version "0.13.11" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" - integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== - -regenerator-runtime@^0.13.4: - version "0.13.7" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" - integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== - regenerator-runtime@^0.14.0: version "0.14.0" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45" @@ -13539,14 +13210,6 @@ rimraf@^5.0.10: dependencies: glob "^10.3.7" -ripemd160@^2.0.0, ripemd160@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" - integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - rollup@^4.19.0: version "4.22.4" resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.22.4.tgz#4135a6446671cd2a2453e1ad42a45d5973ec3a0f" @@ -13624,7 +13287,7 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: +safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -13679,11 +13342,6 @@ sanitize-html@2.13.0: parse-srcset "^1.0.2" postcss "^8.3.11" -sax@>=0.6.0: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" - integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== - saxes@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/saxes/-/saxes-6.0.0.tgz#fe5b4a4768df4f14a201b1ba6a65c1f3d9988cc5" @@ -13822,14 +13480,7 @@ send@^0.18.0, send@^0.19.0: range-parser "~1.2.1" statuses "2.0.1" -serialize-javascript@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" - integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== - dependencies: - randombytes "^2.1.0" - -serialize-javascript@^6.0.1, serialize-javascript@^6.0.2: +serialize-javascript@6.0.0, serialize-javascript@^6.0.1, serialize-javascript@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== @@ -13901,14 +13552,6 @@ setprototypeof@1.2.0: resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== -sha.js@^2.4.0, sha.js@^2.4.8: - version "2.4.11" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" - integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - shallow-clone@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" @@ -14400,16 +14043,7 @@ string-argv@~0.3.1: resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== -"string-width-cjs@npm:string-width@^4.2.0": - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.2.2, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.2.2, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -14524,14 +14158,7 @@ stringify-entities@^4.0.0: character-entities-html4 "^2.0.0" character-entities-legacy "^3.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-ansi@6.0.1, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@6.0.1, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -14710,9 +14337,9 @@ tapable@^2.1.1, tapable@^2.2.0: integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== tar-fs@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" - integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng== + version "2.1.3" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.3.tgz#fb3b8843a26b6f13a08e606f7922875eb1fbbf92" + integrity sha512-090nwYJDmlhwFwEW3QQl+vaNnxsO2yVsd45eTKRBzSzu+hlb1w2K9inVq5b0ngXuLVqQ4ApvsUHHnu/zQNkWAg== dependencies: chownr "^1.1.1" mkdirp-classic "^0.5.2" @@ -14832,6 +14459,14 @@ throat@^4.0.0, throat@^4.1.0: resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" integrity sha1-iQN8vJLFarGJJua6TLsgDhVnKmo= +through2@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== + dependencies: + readable-stream "~2.3.6" + xtend "~4.0.1" + through2@^3.0.1: version "3.0.2" resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.2.tgz#99f88931cfc761ec7678b41d5d7336b5b6a07bf4" @@ -14851,9 +14486,9 @@ thunky@^1.0.2: integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA== tmp@^0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.3.tgz#eb783cc22bc1e8bebd0671476d46ea4eb32a79ae" - integrity sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w== + version "0.2.4" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.4.tgz#c6db987a2ccc97f812f17137b36af2b6521b0d13" + integrity sha512-UdiSoX6ypifLmrfQ/XfiawN6hkjSBpCjhKxxZcWlUUmoXLaCKQU0bx4HF/tdDK2uzRuchf1txGvrWBzYREssoQ== to-fast-properties@^2.0.0: version "2.0.0" @@ -15043,11 +14678,6 @@ tunnel-agent@^0.6.0: dependencies: safe-buffer "^5.0.1" -tunnel@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c" - integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg== - tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" @@ -15218,10 +14848,10 @@ typescript@^4.1.0-dev.20201026: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.0-dev.20201102.tgz#e1978890ac063bb3f13d067067905b312c1e0897" integrity sha512-kyL2MUGRx69NgowtHpnabYzNA3N8CR+XW51kL9my6MfSXyrojytW5P4YmaayHGQhWLRmzzdDvHfkf2PQBHgbUw== -typescript@~4.7: - version "4.7.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" - integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== +typescript@~4.8: + version "4.8.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6" + integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ== uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" @@ -15378,7 +15008,7 @@ unraw@^3.0.0: resolved "https://registry.yarnpkg.com/unraw/-/unraw-3.0.0.tgz#73443ed70d2ab09ccbac2b00525602d5991fbbe3" integrity sha512-08/DA66UF65OlpUDIQtbJyrqTR0jTAlJ+jsnkQ4jxR7+K5g5YG1APZKQSMCE1vqqmD+2pv6+IdEjmopFatacvg== -untildify@4.0.0: +untildify@4.0.0, untildify@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== @@ -15747,14 +15377,15 @@ webpack-dev-middleware@^7.4.2: range-parser "^1.2.1" schema-utils "^4.0.0" -webpack-dev-server@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-5.1.0.tgz#8f44147402b4d8ab99bfeb9b6880daa1411064e5" - integrity sha512-aQpaN81X6tXie1FoOB7xlMfCsN19pSvRAeYUHOdFWOlhpQ/LlbfTqYwwmEDFV0h8GGuqmCmKmT+pxcUV/Nt2gQ== +webpack-dev-server@^5.2.1: + version "5.2.2" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-5.2.2.tgz#96a143d50c58fef0c79107e61df911728d7ceb39" + integrity sha512-QcQ72gh8a+7JO63TAx/6XZf/CWhgMzu5m0QirvPfGvptOusAxG12w2+aua1Jkjr7hzaWDnJ2n6JFeexMHI+Zjg== dependencies: "@types/bonjour" "^3.5.13" "@types/connect-history-api-fallback" "^1.5.4" "@types/express" "^4.17.21" + "@types/express-serve-static-core" "^4.17.21" "@types/serve-index" "^1.9.4" "@types/serve-static" "^1.15.5" "@types/sockjs" "^0.3.36" @@ -15765,10 +15396,9 @@ webpack-dev-server@^5.1.0: colorette "^2.0.10" compression "^1.7.4" connect-history-api-fallback "^2.0.0" - express "^4.19.2" + express "^4.21.2" graceful-fs "^4.2.6" - html-entities "^2.4.0" - http-proxy-middleware "^2.0.3" + http-proxy-middleware "^2.0.9" ipaddr.js "^2.1.0" launch-editor "^2.6.1" open "^10.0.3" @@ -15977,7 +15607,7 @@ workerpool@^6.5.1: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544" integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -16004,15 +15634,6 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" @@ -16067,14 +15688,6 @@ xml-name-validator@^5.0.0: resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-5.0.0.tgz#82be9b957f7afdacf961e5980f1bf227c0bf7673" integrity sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg== -xml2js@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.5.0.tgz#d9440631fbb2ed800203fad106f2724f62c493b7" - integrity sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA== - dependencies: - sax ">=0.6.0" - xmlbuilder "~11.0.0" - xml@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5" @@ -16085,11 +15698,6 @@ xmlbuilder@15.1.1: resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-15.1.1.tgz#9dcdce49eea66d8d10b42cae94a79c3c8d0c2ec5" integrity sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg== -xmlbuilder@~11.0.0: - version "11.0.1" - resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3" - integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA== - xmlchars@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" @@ -16107,7 +15715,7 @@ xpath@^0.0.34: resolved "https://registry.yarnpkg.com/xpath/-/xpath-0.0.34.tgz#a769255e8816e0938e1e0005f2baa7279be8be12" integrity sha512-FxF6+rkr1rNSQrhUNYrAFJpRXNzlDoMxeXN5qI84939ylEv3qqPFKa85Oxr6tDaJKqwW6KKyo2v26TSv3k6LeA== -xtend@^4.0.2: +xtend@^4.0.2, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== @@ -16188,7 +15796,7 @@ yargs-unparser@2.0.0, yargs-unparser@^2.0.0: flat "^5.0.2" is-plain-obj "^2.1.0" -yargs@16.2.0, yargs@^16.1.1, yargs@^16.2.0: +yargs@16.2.0, yargs@^16.1.0, yargs@^16.1.1, yargs@^16.2.0: version "16.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== From 5c8b7e8396a06e99df70c7b678df9eecb131954f Mon Sep 17 00:00:00 2001 From: tracyboehrer Date: Tue, 16 Sep 2025 09:01:37 -0500 Subject: [PATCH 02/10] Update Entity mapper to include additionalProperties (#4903) (#4905) Co-authored-by: Cecilia Avila <44245136+ceciliaavila@users.noreply.github.com> --- .../src/connectorApi/models/mappers.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libraries/botframework-connector/src/connectorApi/models/mappers.ts b/libraries/botframework-connector/src/connectorApi/models/mappers.ts index 146eef1521..738b41b20d 100644 --- a/libraries/botframework-connector/src/connectorApi/models/mappers.ts +++ b/libraries/botframework-connector/src/connectorApi/models/mappers.ts @@ -399,6 +399,11 @@ export const Entity: CompositeMapper = { className: "ChannelAccount" } } + }, + additionalProperties: { + type: { + name: "Object" + } } } }; @@ -711,12 +716,7 @@ export const Activity: CompositeMapper = { element: { type: { name: "Composite", - className: "Entity", - additionalProperties: { - type: { - name: "Object" - } - } + className: "Entity" } } } From 33069d332cb01b66e9aa8446ca2a7363dd094c3b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Nov 2025 11:04:50 -0600 Subject: [PATCH 03/10] bump: axios from 1.8.2 to 1.12.0 (#4904) * chore(deps): bump axios from 1.8.2 to 1.12.0 Bumps [axios](https://github.com/axios/axios) from 1.8.2 to 1.12.0. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v1.8.2...v1.12.0) --- updated-dependencies: - dependency-name: axios dependency-version: 1.12.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] * Update axios to 1.13.1 --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: CeciliaAvila --- libraries/botbuilder-core/package.json | 2 +- libraries/botbuilder/package.json | 2 +- libraries/botframework-connector/package.json | 2 +- testing/browser-functional/package.json | 2 +- yarn.lock | 362 +++++++++--------- 5 files changed, 184 insertions(+), 186 deletions(-) diff --git a/libraries/botbuilder-core/package.json b/libraries/botbuilder-core/package.json index f1356b146e..4ffcb01cab 100644 --- a/libraries/botbuilder-core/package.json +++ b/libraries/botbuilder-core/package.json @@ -35,7 +35,7 @@ "zod": "^3.23.8" }, "devDependencies": { - "axios": "^1.8.2", + "axios": "^1.13.1", "mime-types": "^2.1.35", "unzipper": "^0.12.3" }, diff --git a/libraries/botbuilder/package.json b/libraries/botbuilder/package.json index f2bb460aa3..795c652535 100644 --- a/libraries/botbuilder/package.json +++ b/libraries/botbuilder/package.json @@ -29,7 +29,7 @@ "dependencies": { "@azure/core-rest-pipeline": "^1.18.1", "@azure/msal-node": "^2.13.1", - "axios": "^1.8.2", + "axios": "^1.13.1", "botbuilder-core": "4.1.6", "botbuilder-stdlib": "4.1.6", "botframework-connector": "4.1.6", diff --git a/libraries/botframework-connector/package.json b/libraries/botframework-connector/package.json index acd928ec41..59c3a15fdd 100644 --- a/libraries/botframework-connector/package.json +++ b/libraries/botframework-connector/package.json @@ -31,7 +31,7 @@ "@azure/identity": "^4.4.1", "@azure/msal-node": "^2.13.1", "@types/jsonwebtoken": "9.0.6", - "axios": "^1.8.2", + "axios": "^1.13.1", "base64url": "^3.0.0", "botbuilder-stdlib": "4.1.6", "botframework-schema": "4.1.6", diff --git a/testing/browser-functional/package.json b/testing/browser-functional/package.json index dce9931499..5455375e7e 100644 --- a/testing/browser-functional/package.json +++ b/testing/browser-functional/package.json @@ -5,7 +5,7 @@ "description": "Test to check browser compatibility", "main": "", "devDependencies": { - "axios": "^1.8.2", + "axios": "^1.13.1", "dotenv": "^16.4.5", "nightwatch": "^3.9.0" }, diff --git a/yarn.lock b/yarn.lock index 7a4532f9de..46f61f12b8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2279,19 +2279,16 @@ integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== "@babel/runtime-corejs3@7.20.13", "@babel/runtime-corejs3@^7.14.0", "@babel/runtime-corejs3@^7.15.4", "@babel/runtime-corejs3@^7.17.2", "@babel/runtime-corejs3@^7.20.7", "@babel/runtime-corejs3@^7.22.15", "@babel/runtime-corejs3@^7.23.1", "@babel/runtime-corejs3@^7.24.1", "@babel/runtime-corejs3@^7.26.10": - version "7.26.10" - resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.26.10.tgz#5a3185ca2813f8de8ae68622572086edf5cf51f2" - integrity sha512-uITFQYO68pMEYR46AHgQoyBg7KPPJDAbGn4jUTIRgCFJIp88MIBUianVOplhZDEec07bp9zIyr4Kp0FCyQzmWg== + version "7.28.4" + resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.28.4.tgz#c25be39c7997ce2f130d70b9baecb8ed94df93fa" + integrity sha512-h7iEYiW4HebClDEhtvFObtPmIvrd1SSfpI9EhOeKk4CtIK/ngBWFpuhCzhdmRKtg71ylcue+9I6dv54XYO1epQ== dependencies: - core-js-pure "^3.30.2" - regenerator-runtime "^0.14.0" + core-js-pure "^3.43.0" "@babel/runtime@7.14.8", "@babel/runtime@7.15.4", "@babel/runtime@7.19.0", "@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.18.3", "@babel/runtime@^7.25.6", "@babel/runtime@^7.26.10", "@babel/runtime@^7.6.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": - version "7.26.10" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.26.10.tgz#a07b4d8fa27af131a633d7b3524db803eb4764c2" - integrity sha512-2WJMeRQPHKSPemqk/awGrAiuFfzBmOIPXKizAsVhWH9YJqLZ0H+HS4c8loHGgW6utJ3E/ejXQUsiGaQy2NZ9Fw== - dependencies: - regenerator-runtime "^0.14.0" + version "7.28.4" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.28.4.tgz#a70226016fabe25c5783b2f22d3e1c9bc5ca3326" + integrity sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ== "@babel/template@^7.22.15": version "7.22.15" @@ -2568,130 +2565,135 @@ esquery "^1.6.0" jsdoc-type-pratt-parser "~4.1.0" -"@esbuild/aix-ppc64@0.25.0": - version "0.25.0" - resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.25.0.tgz#499600c5e1757a524990d5d92601f0ac3ce87f64" - integrity sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ== - -"@esbuild/android-arm64@0.25.0": - version "0.25.0" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.25.0.tgz#b9b8231561a1dfb94eb31f4ee056b92a985c324f" - integrity sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g== - -"@esbuild/android-arm@0.25.0": - version "0.25.0" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.25.0.tgz#ca6e7888942505f13e88ac9f5f7d2a72f9facd2b" - integrity sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g== - -"@esbuild/android-x64@0.25.0": - version "0.25.0" - resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.25.0.tgz#e765ea753bac442dfc9cb53652ce8bd39d33e163" - integrity sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg== - -"@esbuild/darwin-arm64@0.25.0": - version "0.25.0" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.25.0.tgz#fa394164b0d89d4fdc3a8a21989af70ef579fa2c" - integrity sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw== - -"@esbuild/darwin-x64@0.25.0": - version "0.25.0" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.25.0.tgz#91979d98d30ba6e7d69b22c617cc82bdad60e47a" - integrity sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg== - -"@esbuild/freebsd-arm64@0.25.0": - version "0.25.0" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.0.tgz#b97e97073310736b430a07b099d837084b85e9ce" - integrity sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w== - -"@esbuild/freebsd-x64@0.25.0": - version "0.25.0" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.25.0.tgz#f3b694d0da61d9910ec7deff794d444cfbf3b6e7" - integrity sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A== - -"@esbuild/linux-arm64@0.25.0": - version "0.25.0" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.25.0.tgz#f921f699f162f332036d5657cad9036f7a993f73" - integrity sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg== - -"@esbuild/linux-arm@0.25.0": - version "0.25.0" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.25.0.tgz#cc49305b3c6da317c900688995a4050e6cc91ca3" - integrity sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg== - -"@esbuild/linux-ia32@0.25.0": - version "0.25.0" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.25.0.tgz#3e0736fcfab16cff042dec806247e2c76e109e19" - integrity sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg== - -"@esbuild/linux-loong64@0.25.0": - version "0.25.0" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.25.0.tgz#ea2bf730883cddb9dfb85124232b5a875b8020c7" - integrity sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw== - -"@esbuild/linux-mips64el@0.25.0": - version "0.25.0" - resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.25.0.tgz#4cababb14eede09248980a2d2d8b966464294ff1" - integrity sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ== - -"@esbuild/linux-ppc64@0.25.0": - version "0.25.0" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.25.0.tgz#8860a4609914c065373a77242e985179658e1951" - integrity sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw== - -"@esbuild/linux-riscv64@0.25.0": - version "0.25.0" - resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.25.0.tgz#baf26e20bb2d38cfb86ee282dff840c04f4ed987" - integrity sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA== - -"@esbuild/linux-s390x@0.25.0": - version "0.25.0" - resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.25.0.tgz#8323afc0d6cb1b6dc6e9fd21efd9e1542c3640a4" - integrity sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA== - -"@esbuild/linux-x64@0.25.0": - version "0.25.0" - resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.25.0.tgz#08fcf60cb400ed2382e9f8e0f5590bac8810469a" - integrity sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw== - -"@esbuild/netbsd-arm64@0.25.0": - version "0.25.0" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.0.tgz#935c6c74e20f7224918fbe2e6c6fe865b6c6ea5b" - integrity sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw== - -"@esbuild/netbsd-x64@0.25.0": - version "0.25.0" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.25.0.tgz#414677cef66d16c5a4d210751eb2881bb9c1b62b" - integrity sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA== - -"@esbuild/openbsd-arm64@0.25.0": - version "0.25.0" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.0.tgz#8fd55a4d08d25cdc572844f13c88d678c84d13f7" - integrity sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw== - -"@esbuild/openbsd-x64@0.25.0": - version "0.25.0" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.25.0.tgz#0c48ddb1494bbc2d6bcbaa1429a7f465fa1dedde" - integrity sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg== - -"@esbuild/sunos-x64@0.25.0": - version "0.25.0" - resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.25.0.tgz#86ff9075d77962b60dd26203d7352f92684c8c92" - integrity sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg== - -"@esbuild/win32-arm64@0.25.0": - version "0.25.0" - resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.25.0.tgz#849c62327c3229467f5b5cd681bf50588442e96c" - integrity sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw== - -"@esbuild/win32-ia32@0.25.0": - version "0.25.0" - resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.25.0.tgz#f62eb480cd7cca088cb65bb46a6db25b725dc079" - integrity sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA== - -"@esbuild/win32-x64@0.25.0": - version "0.25.0" - resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.25.0.tgz#c8e119a30a7c8d60b9d2e22d2073722dde3b710b" - integrity sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ== +"@esbuild/aix-ppc64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.25.9.tgz#bef96351f16520055c947aba28802eede3c9e9a9" + integrity sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA== + +"@esbuild/android-arm64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.25.9.tgz#d2e70be7d51a529425422091e0dcb90374c1546c" + integrity sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg== + +"@esbuild/android-arm@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.25.9.tgz#d2a753fe2a4c73b79437d0ba1480e2d760097419" + integrity sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ== + +"@esbuild/android-x64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.25.9.tgz#5278836e3c7ae75761626962f902a0d55352e683" + integrity sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw== + +"@esbuild/darwin-arm64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.25.9.tgz#f1513eaf9ec8fa15dcaf4c341b0f005d3e8b47ae" + integrity sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg== + +"@esbuild/darwin-x64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.25.9.tgz#e27dbc3b507b3a1cea3b9280a04b8b6b725f82be" + integrity sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ== + +"@esbuild/freebsd-arm64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.9.tgz#364e3e5b7a1fd45d92be08c6cc5d890ca75908ca" + integrity sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q== + +"@esbuild/freebsd-x64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.25.9.tgz#7c869b45faeb3df668e19ace07335a0711ec56ab" + integrity sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg== + +"@esbuild/linux-arm64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.25.9.tgz#48d42861758c940b61abea43ba9a29b186d6cb8b" + integrity sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw== + +"@esbuild/linux-arm@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.25.9.tgz#6ce4b9cabf148274101701d112b89dc67cc52f37" + integrity sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw== + +"@esbuild/linux-ia32@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.25.9.tgz#207e54899b79cac9c26c323fc1caa32e3143f1c4" + integrity sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A== + +"@esbuild/linux-loong64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.25.9.tgz#0ba48a127159a8f6abb5827f21198b999ffd1fc0" + integrity sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ== + +"@esbuild/linux-mips64el@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.25.9.tgz#a4d4cc693d185f66a6afde94f772b38ce5d64eb5" + integrity sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA== + +"@esbuild/linux-ppc64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.25.9.tgz#0f5805c1c6d6435a1dafdc043cb07a19050357db" + integrity sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w== + +"@esbuild/linux-riscv64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.25.9.tgz#6776edece0f8fca79f3386398b5183ff2a827547" + integrity sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg== + +"@esbuild/linux-s390x@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.25.9.tgz#3f6f29ef036938447c2218d309dc875225861830" + integrity sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA== + +"@esbuild/linux-x64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.25.9.tgz#831fe0b0e1a80a8b8391224ea2377d5520e1527f" + integrity sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg== + +"@esbuild/netbsd-arm64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.9.tgz#06f99d7eebe035fbbe43de01c9d7e98d2a0aa548" + integrity sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q== + +"@esbuild/netbsd-x64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.25.9.tgz#db99858e6bed6e73911f92a88e4edd3a8c429a52" + integrity sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g== + +"@esbuild/openbsd-arm64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.9.tgz#afb886c867e36f9d86bb21e878e1185f5d5a0935" + integrity sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ== + +"@esbuild/openbsd-x64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.25.9.tgz#30855c9f8381fac6a0ef5b5f31ac6e7108a66ecf" + integrity sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA== + +"@esbuild/openharmony-arm64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.9.tgz#2f2144af31e67adc2a8e3705c20c2bd97bd88314" + integrity sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg== + +"@esbuild/sunos-x64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.25.9.tgz#69b99a9b5bd226c9eb9c6a73f990fddd497d732e" + integrity sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw== + +"@esbuild/win32-arm64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.25.9.tgz#d789330a712af916c88325f4ffe465f885719c6b" + integrity sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ== + +"@esbuild/win32-ia32@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.25.9.tgz#52fc735406bd49688253e74e4e837ac2ba0789e3" + integrity sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww== + +"@esbuild/win32-x64@0.25.9": + version "0.25.9" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.25.9.tgz#585624dc829cfb6e7c0aa6c3ca7d7e6daa87e34f" + integrity sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ== "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" @@ -5529,22 +5531,22 @@ axe-core@^4.9.1: resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.10.0.tgz#d9e56ab0147278272739a000880196cdfe113b59" integrity sha512-Mr2ZakwQ7XUAjp7pAwQWRhhK8mQQ6JAaNWSjmjxil0R8BPioMtQsTLOolGYkji1rcL++3dCqZA3zWqpT+9Ew6g== -axios@^1.4.0: - version "1.8.4" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.8.4.tgz#78990bb4bc63d2cae072952d374835950a82f447" - integrity sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw== +axios@^1.13.1: + version "1.13.1" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.13.1.tgz#45b62dc8fe04e0e92274e08b98e910ba3d7963a7" + integrity sha512-hU4EGxxt+j7TQijx1oYdAjw4xuIp1wRQSsbMFwSthCWeBQur1eF+qJ5iQ5sN3Tw8YRzQNKb8jszgBdMDVqwJcw== dependencies: follow-redirects "^1.15.6" - form-data "^4.0.0" + form-data "^4.0.4" proxy-from-env "^1.1.0" -axios@^1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.8.2.tgz#fabe06e241dfe83071d4edfbcaa7b1c3a40f7979" - integrity sha512-ls4GYBm5aig9vWx8AWDSGLpnpDQRtWAfrjU+EuytuODrFBkqesN2RkOQCBzrA1RQNHw1SmRMSDDDSwzNAYQ6Rg== +axios@^1.4.0: + version "1.12.1" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.12.1.tgz#0747b39c5b615f81f93f2c138e6d82a71426937f" + integrity sha512-Kn4kbSXpkFHCGE6rBFNwIv0GQs4AvDT80jlveJDKFxjbTYMUeB4QtsdPCv6H8Cm19Je7IU6VFtRl2zWZI0rudQ== dependencies: follow-redirects "^1.15.6" - form-data "^4.0.0" + form-data "^4.0.4" proxy-from-env "^1.1.0" b4a@^1.6.4: @@ -6623,10 +6625,10 @@ core-js-compat@^3.37.1, core-js-compat@^3.38.0, core-js-compat@^3.38.1: dependencies: browserslist "^4.23.3" -core-js-pure@^3.30.2: - version "3.35.0" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.35.0.tgz#4660033304a050215ae82e476bd2513a419fbb34" - integrity sha512-f+eRYmkou59uh7BPcyJ8MC76DiGhspj1KMxVIcF24tzP8NA9HVa1uC7BTW2tgx7E1QVCzDzsgp7kArrzhlz8Ew== +core-js-pure@^3.43.0: + version "3.45.1" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.45.1.tgz#b129d86a5f7f8380378577c7eaee83608570a05a" + integrity sha512-OHnWFKgTUshEU8MK+lOs1H8kC8GkTi9Z1tvNkxrCcw9wl3MJIO7q2ld77wjWn4/xuGrVu2X+nME1iIIPBSdyEQ== core-js@3.15.2: version "3.15.2" @@ -7657,35 +7659,36 @@ esbuild-plugin-polyfill-node@^0.3.0: import-meta-resolve "^3.0.0" esbuild@^0.14.23, esbuild@^0.23.0, esbuild@^0.25.0: - version "0.25.0" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.25.0.tgz#0de1787a77206c5a79eeb634a623d39b5006ce92" - integrity sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw== + version "0.25.9" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.25.9.tgz#15ab8e39ae6cdc64c24ff8a2c0aef5b3fd9fa976" + integrity sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g== optionalDependencies: - "@esbuild/aix-ppc64" "0.25.0" - "@esbuild/android-arm" "0.25.0" - "@esbuild/android-arm64" "0.25.0" - "@esbuild/android-x64" "0.25.0" - "@esbuild/darwin-arm64" "0.25.0" - "@esbuild/darwin-x64" "0.25.0" - "@esbuild/freebsd-arm64" "0.25.0" - "@esbuild/freebsd-x64" "0.25.0" - "@esbuild/linux-arm" "0.25.0" - "@esbuild/linux-arm64" "0.25.0" - "@esbuild/linux-ia32" "0.25.0" - "@esbuild/linux-loong64" "0.25.0" - "@esbuild/linux-mips64el" "0.25.0" - "@esbuild/linux-ppc64" "0.25.0" - "@esbuild/linux-riscv64" "0.25.0" - "@esbuild/linux-s390x" "0.25.0" - "@esbuild/linux-x64" "0.25.0" - "@esbuild/netbsd-arm64" "0.25.0" - "@esbuild/netbsd-x64" "0.25.0" - "@esbuild/openbsd-arm64" "0.25.0" - "@esbuild/openbsd-x64" "0.25.0" - "@esbuild/sunos-x64" "0.25.0" - "@esbuild/win32-arm64" "0.25.0" - "@esbuild/win32-ia32" "0.25.0" - "@esbuild/win32-x64" "0.25.0" + "@esbuild/aix-ppc64" "0.25.9" + "@esbuild/android-arm" "0.25.9" + "@esbuild/android-arm64" "0.25.9" + "@esbuild/android-x64" "0.25.9" + "@esbuild/darwin-arm64" "0.25.9" + "@esbuild/darwin-x64" "0.25.9" + "@esbuild/freebsd-arm64" "0.25.9" + "@esbuild/freebsd-x64" "0.25.9" + "@esbuild/linux-arm" "0.25.9" + "@esbuild/linux-arm64" "0.25.9" + "@esbuild/linux-ia32" "0.25.9" + "@esbuild/linux-loong64" "0.25.9" + "@esbuild/linux-mips64el" "0.25.9" + "@esbuild/linux-ppc64" "0.25.9" + "@esbuild/linux-riscv64" "0.25.9" + "@esbuild/linux-s390x" "0.25.9" + "@esbuild/linux-x64" "0.25.9" + "@esbuild/netbsd-arm64" "0.25.9" + "@esbuild/netbsd-x64" "0.25.9" + "@esbuild/openbsd-arm64" "0.25.9" + "@esbuild/openbsd-x64" "0.25.9" + "@esbuild/openharmony-arm64" "0.25.9" + "@esbuild/sunos-x64" "0.25.9" + "@esbuild/win32-arm64" "0.25.9" + "@esbuild/win32-ia32" "0.25.9" + "@esbuild/win32-x64" "0.25.9" escalade@^3.1.1: version "3.1.1" @@ -8422,7 +8425,7 @@ form-data@^2.5.0: mime-types "^2.1.35" safe-buffer "^5.2.1" -form-data@^4.0.0: +form-data@^4.0.0, form-data@^4.0.4: version "4.0.4" resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.4.tgz#784cdcce0669a9d68e94d11ac4eea98088edd2c4" integrity sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow== @@ -12936,11 +12939,6 @@ regenerate@^1.4.2: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== -regenerator-runtime@^0.14.0: - version "0.14.0" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45" - integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA== - regenerator-runtime@^0.14.1: version "0.14.1" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" From b29237517d50302a7f0a54f3cf1e1269a9937926 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Nov 2025 09:33:18 -0300 Subject: [PATCH 04/10] chore(deps): bump tar-fs from 2.1.3 to 2.1.4 (#4906) Bumps [tar-fs](https://github.com/mafintosh/tar-fs) from 2.1.3 to 2.1.4. - [Commits](https://github.com/mafintosh/tar-fs/compare/v2.1.3...v2.1.4) --- updated-dependencies: - dependency-name: tar-fs dependency-version: 2.1.4 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: CeciliaAvila --- yarn.lock | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/yarn.lock b/yarn.lock index 46f61f12b8..405c4d6c64 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14041,7 +14041,16 @@ string-argv@~0.3.1: resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== -"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.2.2, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.2.2, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -14156,7 +14165,14 @@ stringify-entities@^4.0.0: character-entities-html4 "^2.0.0" character-entities-legacy "^3.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@6.0.1, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@6.0.1, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -14335,9 +14351,9 @@ tapable@^2.1.1, tapable@^2.2.0: integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== tar-fs@^2.0.0: - version "2.1.3" - resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.3.tgz#fb3b8843a26b6f13a08e606f7922875eb1fbbf92" - integrity sha512-090nwYJDmlhwFwEW3QQl+vaNnxsO2yVsd45eTKRBzSzu+hlb1w2K9inVq5b0ngXuLVqQ4ApvsUHHnu/zQNkWAg== + version "2.1.4" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.4.tgz#800824dbf4ef06ded9afea4acafe71c67c76b930" + integrity sha512-mDAjwmZdh7LTT6pNleZ05Yt65HC3E+NiQzl672vQG38jIrehtJk/J3mNwIg+vShQPcLF/LV7CMnDW6vjj6sfYQ== dependencies: chownr "^1.1.1" mkdirp-classic "^0.5.2" @@ -15605,7 +15621,7 @@ workerpool@^6.5.1: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544" integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -15632,6 +15648,15 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From d4755bbe2e62be1ee6a2def93bc00607f01267dd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Nov 2025 11:57:24 -0300 Subject: [PATCH 05/10] chore(deps): bump node-forge from 1.3.1 to 1.3.2 (#4912) Bumps [node-forge](https://github.com/digitalbazaar/forge) from 1.3.1 to 1.3.2. - [Changelog](https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md) - [Commits](https://github.com/digitalbazaar/forge/compare/v1.3.1...v1.3.2) --- updated-dependencies: - dependency-name: node-forge dependency-version: 1.3.2 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libraries/botbuilder/package.json | 2 +- testing/botbuilder-test-utils/package.json | 2 +- tools/package.json | 2 +- yarn.lock | 324 ++++++++++----------- 4 files changed, 165 insertions(+), 165 deletions(-) diff --git a/libraries/botbuilder/package.json b/libraries/botbuilder/package.json index 795c652535..ca5dd07341 100644 --- a/libraries/botbuilder/package.json +++ b/libraries/botbuilder/package.json @@ -47,7 +47,7 @@ "jsonwebtoken": "^9.0.2", "lodash": "^4.17.20", "nock": "^13.5.5", - "node-forge": "^1.3.1", + "node-forge": "^1.3.2", "node-mocks-http": "^1.16.0" }, "scripts": { diff --git a/testing/botbuilder-test-utils/package.json b/testing/botbuilder-test-utils/package.json index f4c0c5772d..a18743d26e 100644 --- a/testing/botbuilder-test-utils/package.json +++ b/testing/botbuilder-test-utils/package.json @@ -19,7 +19,7 @@ "@types/node-forge": "^1.3.11" }, "dependencies": { - "node-forge": "^1.3.1", + "node-forge": "^1.3.2", "zod": "^3.23.8" } } diff --git a/tools/package.json b/tools/package.json index fa29a87bfa..df843fcbf7 100644 --- a/tools/package.json +++ b/tools/package.json @@ -49,7 +49,7 @@ "minami": "github:devigned/minami#master", "mocha": "^10.7.3", "nock": "^13.5.5", - "node-forge": "1.3.1", + "node-forge": "1.3.2", "nyc": "^17.0.0", "promise": "^8.3.0", "random-js": "^2.1.0", diff --git a/yarn.lock b/yarn.lock index 405c4d6c64..2ad465e876 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2565,135 +2565,135 @@ esquery "^1.6.0" jsdoc-type-pratt-parser "~4.1.0" -"@esbuild/aix-ppc64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.25.9.tgz#bef96351f16520055c947aba28802eede3c9e9a9" - integrity sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA== - -"@esbuild/android-arm64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.25.9.tgz#d2e70be7d51a529425422091e0dcb90374c1546c" - integrity sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg== - -"@esbuild/android-arm@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.25.9.tgz#d2a753fe2a4c73b79437d0ba1480e2d760097419" - integrity sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ== - -"@esbuild/android-x64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.25.9.tgz#5278836e3c7ae75761626962f902a0d55352e683" - integrity sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw== - -"@esbuild/darwin-arm64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.25.9.tgz#f1513eaf9ec8fa15dcaf4c341b0f005d3e8b47ae" - integrity sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg== - -"@esbuild/darwin-x64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.25.9.tgz#e27dbc3b507b3a1cea3b9280a04b8b6b725f82be" - integrity sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ== - -"@esbuild/freebsd-arm64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.9.tgz#364e3e5b7a1fd45d92be08c6cc5d890ca75908ca" - integrity sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q== - -"@esbuild/freebsd-x64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.25.9.tgz#7c869b45faeb3df668e19ace07335a0711ec56ab" - integrity sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg== - -"@esbuild/linux-arm64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.25.9.tgz#48d42861758c940b61abea43ba9a29b186d6cb8b" - integrity sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw== - -"@esbuild/linux-arm@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.25.9.tgz#6ce4b9cabf148274101701d112b89dc67cc52f37" - integrity sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw== - -"@esbuild/linux-ia32@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.25.9.tgz#207e54899b79cac9c26c323fc1caa32e3143f1c4" - integrity sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A== - -"@esbuild/linux-loong64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.25.9.tgz#0ba48a127159a8f6abb5827f21198b999ffd1fc0" - integrity sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ== - -"@esbuild/linux-mips64el@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.25.9.tgz#a4d4cc693d185f66a6afde94f772b38ce5d64eb5" - integrity sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA== - -"@esbuild/linux-ppc64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.25.9.tgz#0f5805c1c6d6435a1dafdc043cb07a19050357db" - integrity sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w== - -"@esbuild/linux-riscv64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.25.9.tgz#6776edece0f8fca79f3386398b5183ff2a827547" - integrity sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg== - -"@esbuild/linux-s390x@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.25.9.tgz#3f6f29ef036938447c2218d309dc875225861830" - integrity sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA== - -"@esbuild/linux-x64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.25.9.tgz#831fe0b0e1a80a8b8391224ea2377d5520e1527f" - integrity sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg== - -"@esbuild/netbsd-arm64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.9.tgz#06f99d7eebe035fbbe43de01c9d7e98d2a0aa548" - integrity sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q== - -"@esbuild/netbsd-x64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.25.9.tgz#db99858e6bed6e73911f92a88e4edd3a8c429a52" - integrity sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g== - -"@esbuild/openbsd-arm64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.9.tgz#afb886c867e36f9d86bb21e878e1185f5d5a0935" - integrity sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ== - -"@esbuild/openbsd-x64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.25.9.tgz#30855c9f8381fac6a0ef5b5f31ac6e7108a66ecf" - integrity sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA== - -"@esbuild/openharmony-arm64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.9.tgz#2f2144af31e67adc2a8e3705c20c2bd97bd88314" - integrity sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg== - -"@esbuild/sunos-x64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.25.9.tgz#69b99a9b5bd226c9eb9c6a73f990fddd497d732e" - integrity sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw== - -"@esbuild/win32-arm64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.25.9.tgz#d789330a712af916c88325f4ffe465f885719c6b" - integrity sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ== - -"@esbuild/win32-ia32@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.25.9.tgz#52fc735406bd49688253e74e4e837ac2ba0789e3" - integrity sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww== - -"@esbuild/win32-x64@0.25.9": - version "0.25.9" - resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.25.9.tgz#585624dc829cfb6e7c0aa6c3ca7d7e6daa87e34f" - integrity sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ== +"@esbuild/aix-ppc64@0.25.12": + version "0.25.12" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz#80fcbe36130e58b7670511e888b8e88a259ed76c" + integrity sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA== + +"@esbuild/android-arm64@0.25.12": + version "0.25.12" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz#8aa4965f8d0a7982dc21734bf6601323a66da752" + integrity sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg== + +"@esbuild/android-arm@0.25.12": + version "0.25.12" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.25.12.tgz#300712101f7f50f1d2627a162e6e09b109b6767a" + integrity sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg== + +"@esbuild/android-x64@0.25.12": + version "0.25.12" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.25.12.tgz#87dfb27161202bdc958ef48bb61b09c758faee16" + integrity sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg== + +"@esbuild/darwin-arm64@0.25.12": + version "0.25.12" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz#79197898ec1ff745d21c071e1c7cc3c802f0c1fd" + integrity sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg== + +"@esbuild/darwin-x64@0.25.12": + version "0.25.12" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz#146400a8562133f45c4d2eadcf37ddd09718079e" + integrity sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA== + +"@esbuild/freebsd-arm64@0.25.12": + version "0.25.12" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz#1c5f9ba7206e158fd2b24c59fa2d2c8bb47ca0fe" + integrity sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg== + +"@esbuild/freebsd-x64@0.25.12": + version "0.25.12" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz#ea631f4a36beaac4b9279fa0fcc6ca29eaeeb2b3" + integrity sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ== + +"@esbuild/linux-arm64@0.25.12": + version "0.25.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz#e1066bce58394f1b1141deec8557a5f0a22f5977" + integrity sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ== + +"@esbuild/linux-arm@0.25.12": + version "0.25.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz#452cd66b20932d08bdc53a8b61c0e30baf4348b9" + integrity sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw== + +"@esbuild/linux-ia32@0.25.12": + version "0.25.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz#b24f8acc45bcf54192c7f2f3be1b53e6551eafe0" + integrity sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA== + +"@esbuild/linux-loong64@0.25.12": + version "0.25.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz#f9cfffa7fc8322571fbc4c8b3268caf15bd81ad0" + integrity sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng== + +"@esbuild/linux-mips64el@0.25.12": + version "0.25.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz#575a14bd74644ffab891adc7d7e60d275296f2cd" + integrity sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw== + +"@esbuild/linux-ppc64@0.25.12": + version "0.25.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz#75b99c70a95fbd5f7739d7692befe60601591869" + integrity sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA== + +"@esbuild/linux-riscv64@0.25.12": + version "0.25.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz#2e3259440321a44e79ddf7535c325057da875cd6" + integrity sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w== + +"@esbuild/linux-s390x@0.25.12": + version "0.25.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz#17676cabbfe5928da5b2a0d6df5d58cd08db2663" + integrity sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg== + +"@esbuild/linux-x64@0.25.12": + version "0.25.12" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz#0583775685ca82066d04c3507f09524d3cd7a306" + integrity sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw== + +"@esbuild/netbsd-arm64@0.25.12": + version "0.25.12" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz#f04c4049cb2e252fe96b16fed90f70746b13f4a4" + integrity sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg== + +"@esbuild/netbsd-x64@0.25.12": + version "0.25.12" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz#77da0d0a0d826d7c921eea3d40292548b258a076" + integrity sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ== + +"@esbuild/openbsd-arm64@0.25.12": + version "0.25.12" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz#6296f5867aedef28a81b22ab2009c786a952dccd" + integrity sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A== + +"@esbuild/openbsd-x64@0.25.12": + version "0.25.12" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz#f8d23303360e27b16cf065b23bbff43c14142679" + integrity sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw== + +"@esbuild/openharmony-arm64@0.25.12": + version "0.25.12" + resolved "https://registry.yarnpkg.com/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz#49e0b768744a3924be0d7fd97dd6ce9b2923d88d" + integrity sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg== + +"@esbuild/sunos-x64@0.25.12": + version "0.25.12" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz#a6ed7d6778d67e528c81fb165b23f4911b9b13d6" + integrity sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w== + +"@esbuild/win32-arm64@0.25.12": + version "0.25.12" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz#9ac14c378e1b653af17d08e7d3ce34caef587323" + integrity sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg== + +"@esbuild/win32-ia32@0.25.12": + version "0.25.12" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz#918942dcbbb35cc14fca39afb91b5e6a3d127267" + integrity sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ== + +"@esbuild/win32-x64@0.25.12": + version "0.25.12" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz#9bdad8176be7811ad148d1f8772359041f46c6c5" + integrity sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA== "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" @@ -7659,36 +7659,36 @@ esbuild-plugin-polyfill-node@^0.3.0: import-meta-resolve "^3.0.0" esbuild@^0.14.23, esbuild@^0.23.0, esbuild@^0.25.0: - version "0.25.9" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.25.9.tgz#15ab8e39ae6cdc64c24ff8a2c0aef5b3fd9fa976" - integrity sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g== + version "0.25.12" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.25.12.tgz#97a1d041f4ab00c2fce2f838d2b9969a2d2a97a5" + integrity sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg== optionalDependencies: - "@esbuild/aix-ppc64" "0.25.9" - "@esbuild/android-arm" "0.25.9" - "@esbuild/android-arm64" "0.25.9" - "@esbuild/android-x64" "0.25.9" - "@esbuild/darwin-arm64" "0.25.9" - "@esbuild/darwin-x64" "0.25.9" - "@esbuild/freebsd-arm64" "0.25.9" - "@esbuild/freebsd-x64" "0.25.9" - "@esbuild/linux-arm" "0.25.9" - "@esbuild/linux-arm64" "0.25.9" - "@esbuild/linux-ia32" "0.25.9" - "@esbuild/linux-loong64" "0.25.9" - "@esbuild/linux-mips64el" "0.25.9" - "@esbuild/linux-ppc64" "0.25.9" - "@esbuild/linux-riscv64" "0.25.9" - "@esbuild/linux-s390x" "0.25.9" - "@esbuild/linux-x64" "0.25.9" - "@esbuild/netbsd-arm64" "0.25.9" - "@esbuild/netbsd-x64" "0.25.9" - "@esbuild/openbsd-arm64" "0.25.9" - "@esbuild/openbsd-x64" "0.25.9" - "@esbuild/openharmony-arm64" "0.25.9" - "@esbuild/sunos-x64" "0.25.9" - "@esbuild/win32-arm64" "0.25.9" - "@esbuild/win32-ia32" "0.25.9" - "@esbuild/win32-x64" "0.25.9" + "@esbuild/aix-ppc64" "0.25.12" + "@esbuild/android-arm" "0.25.12" + "@esbuild/android-arm64" "0.25.12" + "@esbuild/android-x64" "0.25.12" + "@esbuild/darwin-arm64" "0.25.12" + "@esbuild/darwin-x64" "0.25.12" + "@esbuild/freebsd-arm64" "0.25.12" + "@esbuild/freebsd-x64" "0.25.12" + "@esbuild/linux-arm" "0.25.12" + "@esbuild/linux-arm64" "0.25.12" + "@esbuild/linux-ia32" "0.25.12" + "@esbuild/linux-loong64" "0.25.12" + "@esbuild/linux-mips64el" "0.25.12" + "@esbuild/linux-ppc64" "0.25.12" + "@esbuild/linux-riscv64" "0.25.12" + "@esbuild/linux-s390x" "0.25.12" + "@esbuild/linux-x64" "0.25.12" + "@esbuild/netbsd-arm64" "0.25.12" + "@esbuild/netbsd-x64" "0.25.12" + "@esbuild/openbsd-arm64" "0.25.12" + "@esbuild/openbsd-x64" "0.25.12" + "@esbuild/openharmony-arm64" "0.25.12" + "@esbuild/sunos-x64" "0.25.12" + "@esbuild/win32-arm64" "0.25.12" + "@esbuild/win32-ia32" "0.25.12" + "@esbuild/win32-x64" "0.25.12" escalade@^3.1.1: version "3.1.1" @@ -11517,10 +11517,10 @@ node-fetch@^2.6.12, node-fetch@^2.6.7, node-fetch@^2.7.0: dependencies: whatwg-url "^5.0.0" -node-forge@1.3.1, node-forge@^1, node-forge@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" - integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== +node-forge@1.3.2, node-forge@^1, node-forge@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.2.tgz#d0d2659a26eef778bf84d73e7f55c08144ee7750" + integrity sha512-6xKiQ+cph9KImrRh0VsjH2d8/GXA4FIMlgU4B757iI1ApvcyA9VlouP0yZJha01V+huImO+kKMU7ih+2+E14fw== node-gyp@8.4.1: version "8.4.1" From fbfa6976ea32bb2c2178637e4eaf6881ca4f2e8c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 14:01:29 -0300 Subject: [PATCH 06/10] chore(deps): bump mdast-util-to-hast from 13.2.0 to 13.2.1 (#4913) Bumps [mdast-util-to-hast](https://github.com/syntax-tree/mdast-util-to-hast) from 13.2.0 to 13.2.1. - [Release notes](https://github.com/syntax-tree/mdast-util-to-hast/releases) - [Commits](https://github.com/syntax-tree/mdast-util-to-hast/compare/13.2.0...13.2.1) --- updated-dependencies: - dependency-name: mdast-util-to-hast dependency-version: 13.2.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 2ad465e876..d689b31fb7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10703,9 +10703,9 @@ mdast-util-from-markdown@2.0.0: unist-util-stringify-position "^4.0.0" mdast-util-to-hast@^13.0.0: - version "13.2.0" - resolved "https://registry.yarnpkg.com/mdast-util-to-hast/-/mdast-util-to-hast-13.2.0.tgz#5ca58e5b921cc0a3ded1bc02eed79a4fe4fe41f4" - integrity sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA== + version "13.2.1" + resolved "https://registry.yarnpkg.com/mdast-util-to-hast/-/mdast-util-to-hast-13.2.1.tgz#d7ff84ca499a57e2c060ae67548ad950e689a053" + integrity sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA== dependencies: "@types/hast" "^3.0.0" "@types/mdast" "^4.0.0" From 55e861f0f0eafeeab6ae694272fe95383049c6cb Mon Sep 17 00:00:00 2001 From: Cecilia Avila <44245136+ceciliaavila@users.noreply.github.com> Date: Mon, 15 Dec 2025 14:06:36 -0300 Subject: [PATCH 07/10] Update glob and js-yaml to safe versions (#4911) --- yarn.lock | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/yarn.lock b/yarn.lock index d689b31fb7..6224630d87 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8725,9 +8725,9 @@ glob@8.1.0, glob@^8.1.0: once "^1.3.0" glob@^10.3.10, glob@^10.3.7: - version "10.4.5" - resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.5.tgz#f4d9f0b90ffdbab09c9d77f5f29b4262517b0956" - integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== + version "10.5.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.5.0.tgz#8ec0355919cd3338c28428a23d4f24ecc5fe738c" + integrity sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg== dependencies: foreground-child "^3.1.0" jackspeak "^3.1.2" @@ -9993,28 +9993,27 @@ joycon@^3.1.1: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@4.1.0, js-yaml@^4.1.0: +js-yaml@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: argparse "^2.0.1" -js-yaml@^3.13.1: - version "3.14.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" - integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== +js-yaml@^3.13.1, js-yaml@^3.14.1: + version "3.14.2" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.2.tgz#77485ce1dd7f33c061fd1b16ecea23b55fcb04b0" + integrity sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg== dependencies: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@^3.14.1: - version "3.14.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== +js-yaml@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.1.tgz#854c292467705b699476e1a2decc0c8a3458806b" + integrity sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA== dependencies: - argparse "^1.0.7" - esprima "^4.0.0" + argparse "^2.0.1" jsbi@^4.3.0: version "4.3.0" @@ -11421,9 +11420,9 @@ nightwatch-axe-verbose@^2.3.0: axe-core "^4.9.1" nightwatch@^3.9.0: - version "3.9.0" - resolved "https://registry.yarnpkg.com/nightwatch/-/nightwatch-3.9.0.tgz#31e71cf14ace22f05f962e9ea06487a65b76e3dc" - integrity sha512-SIkcvRXtGtPy33fodtZC4xDUXKY444dfYvyiODB2sP1M4Ewt7KqE+cxdPuGY0qr+Hsb982KhOnjDUjhSSaX+AA== + version "3.12.3" + resolved "https://registry.yarnpkg.com/nightwatch/-/nightwatch-3.12.3.tgz#fceee98c391cea32964a9efb6968b3cb7487f50f" + integrity sha512-9Y89AXgcD3TIeuNQ+rQaE91Ar5OyEUvzq6OssrzTnhdQxGbzTF7RZpa33Ik+lAMCrPW3A4Llm5yyIX4Svdsglw== dependencies: "@nightwatch/chai" "5.0.3" "@nightwatch/html-reporter-template" "^0.3.0" @@ -11453,7 +11452,7 @@ nightwatch@^3.9.0: open "8.4.2" ora "5.4.1" piscina "^4.3.1" - selenium-webdriver "4.26.0" + selenium-webdriver "4.27.0" semver "7.5.4" stacktrace-parser "0.1.10" strip-ansi "6.0.1" @@ -13383,10 +13382,10 @@ select-hose@^2.0.0: resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" integrity sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo= -selenium-webdriver@4.26.0: - version "4.26.0" - resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-4.26.0.tgz#23163cdad20388214a4ad17c1f38262a0857c902" - integrity sha512-nA7jMRIPV17mJmAiTDBWN96Sy0Uxrz5CCLb7bLVV6PpL417SyBMPc2Zo/uoREc2EOHlzHwHwAlFtgmSngSY4WQ== +selenium-webdriver@4.27.0: + version "4.27.0" + resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-4.27.0.tgz#f0f26ce453805e7dc77151040442c67e441dbe7a" + integrity sha512-LkTJrNz5socxpPnWPODQ2bQ65eYx9JK+DQMYNihpTjMCqHwgWGYQnQTCAAche2W3ZP87alA+1zYPvgS8tHNzMQ== dependencies: "@bazel/runfiles" "^6.3.1" jszip "^3.10.1" From 951abf556f5452af1b7824b9df16d5035a548d0f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 11:23:50 -0600 Subject: [PATCH 08/10] chore(deps): bump jws from 3.2.2 to 3.2.3 (#4914) Bumps [jws](https://github.com/brianloveswords/node-jws) from 3.2.2 to 3.2.3. - [Release notes](https://github.com/brianloveswords/node-jws/releases) - [Changelog](https://github.com/auth0/node-jws/blob/master/CHANGELOG.md) - [Commits](https://github.com/brianloveswords/node-jws/compare/v3.2.2...v3.2.3) --- updated-dependencies: - dependency-name: jws dependency-version: 3.2.3 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/yarn.lock b/yarn.lock index 6224630d87..62c9afe4a3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5958,10 +5958,10 @@ buffer-crc32@^0.2.1, buffer-crc32@^0.2.13: resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== -buffer-equal-constant-time@1.0.1: +buffer-equal-constant-time@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" - integrity sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk= + integrity sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA== buffer-from@^1.0.0: version "1.1.1" @@ -10209,38 +10209,38 @@ just-extend@^6.2.0: resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-6.2.0.tgz#b816abfb3d67ee860482e7401564672558163947" integrity sha512-cYofQu2Xpom82S6qD778jBDpwvvy39s1l/hrYij2u9AMdQcGRpaBu6kY4mVhuno5kJVi1DAz4aiphA2WI1/OAw== -jwa@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" - integrity sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA== +jwa@^1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.2.tgz#16011ac6db48de7b102777e57897901520eec7b9" + integrity sha512-eeH5JO+21J78qMvTIDdBXidBd6nG2kZjg5Ohz/1fpa28Z4CcsWUzJ1ZZyFq/3z3N17aZy+ZuBoHljASbL1WfOw== dependencies: - buffer-equal-constant-time "1.0.1" + buffer-equal-constant-time "^1.0.1" ecdsa-sig-formatter "1.0.11" safe-buffer "^5.0.1" -jwa@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/jwa/-/jwa-2.0.0.tgz#a7e9c3f29dae94027ebcaf49975c9345593410fc" - integrity sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA== +jwa@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/jwa/-/jwa-2.0.1.tgz#bf8176d1ad0cd72e0f3f58338595a13e110bc804" + integrity sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg== dependencies: - buffer-equal-constant-time "1.0.1" + buffer-equal-constant-time "^1.0.1" ecdsa-sig-formatter "1.0.11" safe-buffer "^5.0.1" jws@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" - integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== + version "3.2.3" + resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.3.tgz#5ac0690b460900a27265de24520526853c0b8ca1" + integrity sha512-byiJ0FLRdLdSVSReO/U4E7RoEyOCKnEnEPMjq3HxWtvzLsV08/i5RQKsFVNkCldrCaPr2vDNAOMsfs8T/Hze7g== dependencies: - jwa "^1.4.1" + jwa "^1.4.2" safe-buffer "^5.0.1" jws@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jws/-/jws-4.0.0.tgz#2d4e8cf6a318ffaa12615e9dec7e86e6c97310f4" - integrity sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg== + version "4.0.1" + resolved "https://registry.yarnpkg.com/jws/-/jws-4.0.1.tgz#07edc1be8fac20e677b283ece261498bd38f0690" + integrity sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA== dependencies: - jwa "^2.0.0" + jwa "^2.0.1" safe-buffer "^5.0.1" jwt-decode@3.1.2: From 9b66caff233764517eb9985188fad20e39029cdd Mon Sep 17 00:00:00 2001 From: tracyboehrer Date: Mon, 29 Dec 2025 10:58:09 -0600 Subject: [PATCH 09/10] README update (#4916) Co-authored-by: Tracy Boehrer --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index a5aed55dea..6179e79102 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,14 @@ # ![Bot Framework SDK v4 for JavaScript](./docs/media/BotFrameworkJavaScript_header.png) +# ARCHIVE NOTICE: + +> We are in the process of archiving the Bot Framework JS SDK repository on GitHub. This means that this project will no longer be updated or maintained. Customers using this tool will not be disrupted. However, the tool will no longer be supported through +> service tickets in the Azure portal and will not receive product updates. + +> To build agents with your choice of AI services, orchestration, and knowledge, consider using the [Microsoft 365 Agents SDK](https://github.com/microsoft/agents). The Agents SDK is GA and has support for C#, JavaScript or Python. You can learn more about the Agents SDK at aka.ms/agents. If you're looking for a SaaS-based agent platform, consider Microsoft Copilot Studio. If you have an existing bot built with the Bot Framework SDK, you can update your bot to the Agents SDK. You can review the core changes and updates at Bot Framework SDK to Agents SDK migration guidance [here](https://learn.microsoft.com/en-us/microsoft-365/agents-sdk/bf-migration-guidance). Support tickets for the Bot Framework SDK will no longer be serviced as of December 31, 2025. + +> We plan to archive this project no later than end of December of 2025. + This repository contains code for the JavaScript version of the [Microsoft Bot Framework SDK](https://github.com/Microsoft/botframework-sdk), which is part of the Microsoft Bot Framework - a comprehensive framework for building enterprise-grade conversational AI experiences. This SDK enables developers to model conversation and build sophisticated bot applications using JavaScript. SDKs for [.NET](https://github.com/Microsoft/botbuilder-dotnet), [Python](https://github.com/Microsoft/botbuilder-python) and [Java (preview)](https://github.com/Microsoft/botbuilder-java) are also available. From b95b73580f3a2b0a1250fcc2eac7067cbd7b254f Mon Sep 17 00:00:00 2001 From: CeciliaAvila Date: Mon, 5 Jan 2026 14:50:25 -0300 Subject: [PATCH 10/10] Fix schema tests --- libraries/tests.schema | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libraries/tests.schema b/libraries/tests.schema index 53c20ad7a0..0ffda961ed 100644 --- a/libraries/tests.schema +++ b/libraries/tests.schema @@ -10654,10 +10654,7 @@ "title": "ConversationAccount", "type": "object", "required": [ - "conversationType", - "id", - "isGroup", - "name" + "id" ], "properties": { "isGroup": {