@microsoft/teamsfx-core 3.1.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/aadAppClient.d.ts +0 -6
- package/build/client/aadAppClient.d.ts.map +1 -1
- package/build/client/aadAppClient.js +8 -6
- package/build/client/aadAppClient.js.map +1 -1
- package/build/client/graphClient.d.ts +4 -4
- package/build/client/graphClient.d.ts.map +1 -1
- package/build/client/graphClient.js +91 -23
- package/build/client/graphClient.js.map +1 -1
- package/build/client/teamsDevPortalClient.d.ts +2 -6
- package/build/client/teamsDevPortalClient.d.ts.map +1 -1
- package/build/client/teamsDevPortalClient.js +97 -120
- package/build/client/teamsDevPortalClient.js.map +1 -1
- package/build/client/teamsGraphClient.d.ts +20 -0
- package/build/client/teamsGraphClient.d.ts.map +1 -0
- package/build/client/teamsGraphClient.js +152 -0
- package/build/client/teamsGraphClient.js.map +1 -0
- package/build/common/accountUtils.d.ts +3 -2
- package/build/common/accountUtils.d.ts.map +1 -1
- package/build/common/accountUtils.js +7 -2
- package/build/common/accountUtils.js.map +1 -1
- package/build/common/constants.d.ts +5 -1
- package/build/common/constants.d.ts.map +1 -1
- package/build/common/constants.js +20 -5
- package/build/common/constants.js.map +1 -1
- package/build/common/daSpecParser.d.ts +2 -1
- package/build/common/daSpecParser.d.ts.map +1 -1
- package/build/common/daSpecParser.js +214 -21
- package/build/common/daSpecParser.js.map +1 -1
- package/build/common/featureFlags.d.ts +22 -5
- package/build/common/featureFlags.d.ts.map +1 -1
- package/build/common/featureFlags.js +40 -9
- package/build/common/featureFlags.js.map +1 -1
- package/build/common/fetchHelper.d.ts.map +1 -1
- package/build/common/fetchHelper.js +41 -3
- package/build/common/fetchHelper.js.map +1 -1
- package/build/common/globalVars.d.ts +1 -1
- package/build/common/globalVars.d.ts.map +1 -1
- package/build/common/globalVars.js.map +1 -1
- package/build/common/httpProxy.d.ts +21 -0
- package/build/common/httpProxy.d.ts.map +1 -0
- package/build/common/httpProxy.js +117 -0
- package/build/common/httpProxy.js.map +1 -0
- package/build/common/kiotaClient.d.ts +3 -3
- package/build/common/kiotaClient.d.ts.map +1 -1
- package/build/common/kiotaClient.js +10 -10
- package/build/common/kiotaClient.js.map +1 -1
- package/build/common/mcpToolFetcher.d.ts +90 -0
- package/build/common/mcpToolFetcher.d.ts.map +1 -0
- package/build/common/mcpToolFetcher.js +404 -0
- package/build/common/mcpToolFetcher.js.map +1 -0
- package/build/common/odrProvider.d.ts +43 -0
- package/build/common/odrProvider.d.ts.map +1 -0
- package/build/common/odrProvider.js +154 -0
- package/build/common/odrProvider.js.map +1 -0
- package/build/common/openApiParserOptions.d.ts +3 -0
- package/build/common/openApiParserOptions.d.ts.map +1 -0
- package/build/common/openApiParserOptions.js +61 -0
- package/build/common/openApiParserOptions.js.map +1 -0
- package/build/common/projectSettingsHelper.d.ts +0 -2
- package/build/common/projectSettingsHelper.d.ts.map +1 -1
- package/build/common/projectSettingsHelper.js +1 -59
- package/build/common/projectSettingsHelper.js.map +1 -1
- package/build/common/retryHandler.d.ts +5 -0
- package/build/common/retryHandler.d.ts.map +1 -0
- package/build/common/retryHandler.js +27 -0
- package/build/common/retryHandler.js.map +1 -0
- package/build/common/samples.d.ts +1 -1
- package/build/common/samples.js +1 -1
- package/build/common/secretmasker/dict.d.ts.map +1 -1
- package/build/common/secretmasker/dict.js +5 -2
- package/build/common/secretmasker/dict.js.map +1 -1
- package/build/common/secretmasker/feature.js.map +1 -1
- package/build/common/teamsGraphApiNames.d.ts +10 -0
- package/build/common/teamsGraphApiNames.d.ts.map +1 -0
- package/build/common/teamsGraphApiNames.js +16 -0
- package/build/common/teamsGraphApiNames.js.map +1 -0
- package/build/common/telemetry.d.ts +6 -15
- package/build/common/telemetry.d.ts.map +1 -1
- package/build/common/telemetry.js +9 -20
- package/build/common/telemetry.js.map +1 -1
- package/build/common/templates-config.json +10 -3
- package/build/common/tools.d.ts +1 -1
- package/build/common/tools.d.ts.map +1 -1
- package/build/common/tools.js +6 -6
- package/build/common/tools.js.map +1 -1
- package/build/common/wrappedAxiosClient.d.ts +11 -2
- package/build/common/wrappedAxiosClient.d.ts.map +1 -1
- package/build/common/wrappedAxiosClient.js +147 -59
- package/build/common/wrappedAxiosClient.js.map +1 -1
- package/build/component/configManager/actionInjector.d.ts +16 -1
- package/build/component/configManager/actionInjector.d.ts.map +1 -1
- package/build/component/configManager/actionInjector.js +106 -1
- package/build/component/configManager/actionInjector.js.map +1 -1
- package/build/component/configManager/lifecycle.d.ts.map +1 -1
- package/build/component/configManager/lifecycle.js +9 -0
- package/build/component/configManager/lifecycle.js.map +1 -1
- package/build/component/configManager/parser.js.map +1 -1
- package/build/component/configManager/validator.d.ts.map +1 -1
- package/build/component/configManager/validator.js +2 -0
- package/build/component/configManager/validator.js.map +1 -1
- package/build/component/coordinator/index.d.ts.map +1 -1
- package/build/component/coordinator/index.js +13 -11
- package/build/component/coordinator/index.js.map +1 -1
- package/build/component/deps-checker/internal/dotnetChecker.js.map +1 -1
- package/build/component/deps-checker/internal/funcToolChecker.js +6 -7
- package/build/component/deps-checker/internal/funcToolChecker.js.map +1 -1
- package/build/component/deps-checker/internal/nodeChecker.js +1 -1
- package/build/component/deps-checker/internal/nodeChecker.js.map +1 -1
- package/build/component/deps-checker/internal/testToolChecker.js +13 -13
- package/build/component/deps-checker/internal/testToolChecker.js.map +1 -1
- package/build/component/developerPortalScaffoldUtils.d.ts.map +1 -1
- package/build/component/developerPortalScaffoldUtils.js +5 -5
- package/build/component/developerPortalScaffoldUtils.js.map +1 -1
- package/build/component/driver/aad/utility/aadManifestHelper.d.ts +1 -1
- package/build/component/driver/aad/utility/aadManifestHelper.d.ts.map +1 -1
- package/build/component/driver/aad/utility/aadManifestHelper.js +7 -4
- package/build/component/driver/aad/utility/aadManifestHelper.js.map +1 -1
- package/build/component/driver/add/addWebPart.js +3 -3
- package/build/component/driver/add/addWebPart.js.map +1 -1
- package/build/component/driver/apiKey/create.d.ts.map +1 -1
- package/build/component/driver/apiKey/create.js +4 -4
- package/build/component/driver/apiKey/create.js.map +1 -1
- package/build/component/driver/apiKey/update.d.ts.map +1 -1
- package/build/component/driver/apiKey/update.js +4 -4
- package/build/component/driver/apiKey/update.js.map +1 -1
- package/build/component/driver/arm/util/handleError.js +5 -4
- package/build/component/driver/arm/util/handleError.js.map +1 -1
- package/build/component/driver/copilotAgent/interfaces/PublishArgs.d.ts +14 -0
- package/build/component/driver/copilotAgent/interfaces/PublishArgs.d.ts.map +1 -0
- package/build/component/driver/copilotAgent/interfaces/PublishArgs.js +5 -0
- package/build/component/driver/copilotAgent/interfaces/PublishArgs.js.map +1 -0
- package/build/component/driver/copilotAgent/publish.d.ts +16 -0
- package/build/component/driver/copilotAgent/publish.d.ts.map +1 -0
- package/build/component/driver/copilotAgent/publish.js +175 -0
- package/build/component/driver/copilotAgent/publish.js.map +1 -0
- package/build/component/driver/dcr/create.d.ts +10 -0
- package/build/component/driver/dcr/create.d.ts.map +1 -0
- package/build/component/driver/dcr/create.js +142 -0
- package/build/component/driver/dcr/create.js.map +1 -0
- package/build/component/driver/dcr/error/dcrNameTooLong.d.ts +5 -0
- package/build/component/driver/dcr/error/dcrNameTooLong.d.ts.map +1 -0
- package/build/component/driver/dcr/error/dcrNameTooLong.js +21 -0
- package/build/component/driver/dcr/error/dcrNameTooLong.js.map +1 -0
- package/build/component/driver/dcr/error/dcrWellKnownInvalid.d.ts +5 -0
- package/build/component/driver/dcr/error/dcrWellKnownInvalid.d.ts.map +1 -0
- package/build/component/driver/dcr/error/dcrWellKnownInvalid.js +21 -0
- package/build/component/driver/dcr/error/dcrWellKnownInvalid.js.map +1 -0
- package/build/component/driver/dcr/interface/createDcrArgs.d.ts +9 -0
- package/build/component/driver/dcr/interface/createDcrArgs.d.ts.map +1 -0
- package/build/component/driver/dcr/interface/createDcrArgs.js +5 -0
- package/build/component/driver/dcr/interface/createDcrArgs.js.map +1 -0
- package/build/component/driver/dcr/interface/createDcrOutputs.d.ts +7 -0
- package/build/component/driver/dcr/interface/createDcrOutputs.d.ts.map +1 -0
- package/build/component/driver/dcr/interface/createDcrOutputs.js +10 -0
- package/build/component/driver/dcr/interface/createDcrOutputs.js.map +1 -0
- package/build/component/driver/dcr/utility/constants.d.ts +7 -0
- package/build/component/driver/dcr/utility/constants.d.ts.map +1 -0
- package/build/component/driver/dcr/utility/constants.js +12 -0
- package/build/component/driver/dcr/utility/constants.js.map +1 -0
- package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.d.ts +3 -1
- package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.js +12 -9
- package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.d.ts +3 -0
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js +38 -3
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js.map +1 -1
- package/build/component/driver/devTool/httpClient.d.ts +4 -0
- package/build/component/driver/devTool/httpClient.d.ts.map +1 -1
- package/build/component/driver/devTool/httpClient.js +6 -3
- package/build/component/driver/devTool/httpClient.js.map +1 -1
- package/build/component/driver/index.d.ts +2 -0
- package/build/component/driver/index.d.ts.map +1 -1
- package/build/component/driver/index.js +2 -0
- package/build/component/driver/index.js.map +1 -1
- package/build/component/driver/m365/acquire.d.ts.map +1 -1
- package/build/component/driver/m365/acquire.js +4 -3
- package/build/component/driver/m365/acquire.js.map +1 -1
- package/build/component/driver/oauth/create.d.ts.map +1 -1
- package/build/component/driver/oauth/create.js +5 -4
- package/build/component/driver/oauth/create.js.map +1 -1
- package/build/component/driver/oauth/update.d.ts.map +1 -1
- package/build/component/driver/oauth/update.js +5 -5
- package/build/component/driver/oauth/update.js.map +1 -1
- package/build/component/driver/script/scriptDriver.d.ts.map +1 -1
- package/build/component/driver/script/scriptDriver.js +3 -2
- package/build/component/driver/script/scriptDriver.js.map +1 -1
- package/build/component/driver/share/utils.d.ts.map +1 -1
- package/build/component/driver/share/utils.js +9 -7
- package/build/component/driver/share/utils.js.map +1 -1
- package/build/component/driver/teamsApp/appStudio.d.ts.map +1 -1
- package/build/component/driver/teamsApp/appStudio.js +1 -1
- package/build/component/driver/teamsApp/appStudio.js.map +1 -1
- package/build/component/driver/teamsApp/configure.d.ts.map +1 -1
- package/build/component/driver/teamsApp/configure.js +7 -0
- package/build/component/driver/teamsApp/configure.js.map +1 -1
- package/build/component/driver/teamsApp/constants.d.ts +9 -3
- package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
- package/build/component/driver/teamsApp/constants.js +11 -4
- package/build/component/driver/teamsApp/constants.js.map +1 -1
- package/build/component/driver/teamsApp/create.d.ts.map +1 -1
- package/build/component/driver/teamsApp/create.js +19 -1
- package/build/component/driver/teamsApp/create.js.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.d.ts +3 -0
- package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.js +130 -11
- package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/interfaces/DcrRegistration.d.ts +10 -0
- package/build/component/driver/teamsApp/interfaces/DcrRegistration.d.ts.map +1 -0
- package/build/component/driver/teamsApp/interfaces/DcrRegistration.js +5 -0
- package/build/component/driver/teamsApp/interfaces/DcrRegistration.js.map +1 -0
- package/build/component/driver/teamsApp/interfaces/OauthRegistration.d.ts +4 -0
- package/build/component/driver/teamsApp/interfaces/OauthRegistration.d.ts.map +1 -1
- package/build/component/driver/teamsApp/interfaces/OauthRegistration.js.map +1 -1
- package/build/component/driver/teamsApp/interfaces/ValidationResult.d.ts +6 -0
- package/build/component/driver/teamsApp/interfaces/ValidationResult.d.ts.map +1 -1
- package/build/component/driver/teamsApp/publishAppPackage.d.ts +0 -2
- package/build/component/driver/teamsApp/publishAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/publishAppPackage.js +19 -60
- package/build/component/driver/teamsApp/publishAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/syncManifest.d.ts +3 -3
- package/build/component/driver/teamsApp/syncManifest.d.ts.map +1 -1
- package/build/component/driver/teamsApp/syncManifest.js +8 -8
- package/build/component/driver/teamsApp/syncManifest.js.map +1 -1
- package/build/component/driver/teamsApp/teamsappMgr.d.ts +4 -0
- package/build/component/driver/teamsApp/teamsappMgr.d.ts.map +1 -1
- package/build/component/driver/teamsApp/teamsappMgr.js +6 -3
- package/build/component/driver/teamsApp/teamsappMgr.js.map +1 -1
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.d.ts +2 -0
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.js +120 -5
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.js.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.js +10 -2
- package/build/component/driver/teamsApp/utils/ManifestUtils.js.map +1 -1
- package/build/component/driver/teamsApp/utils/McpCertVerification.d.ts +17 -0
- package/build/component/driver/teamsApp/utils/McpCertVerification.d.ts.map +1 -0
- package/build/component/driver/teamsApp/utils/McpCertVerification.js +72 -0
- package/build/component/driver/teamsApp/utils/McpCertVerification.js.map +1 -0
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.js +1 -1
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.js.map +1 -1
- package/build/component/driver/teamsApp/utils/telemetry.d.ts +1 -0
- package/build/component/driver/teamsApp/utils/telemetry.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/telemetry.js +1 -0
- package/build/component/driver/teamsApp/utils/telemetry.js.map +1 -1
- package/build/component/driver/teamsApp/utils/utils.d.ts +1 -4
- package/build/component/driver/teamsApp/utils/utils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/utils.js +3 -25
- package/build/component/driver/teamsApp/utils/utils.js.map +1 -1
- package/build/component/driver/teamsApp/validate.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validate.js +16 -5
- package/build/component/driver/teamsApp/validate.js.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.js +7 -0
- package/build/component/driver/teamsApp/validateAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/validateTestCases.d.ts.map +1 -1
- package/build/component/driver/typeSpec/compile.d.ts.map +1 -1
- package/build/component/driver/typeSpec/compile.js +23 -7
- package/build/component/driver/typeSpec/compile.js.map +1 -1
- package/build/component/driver/typeSpec/error/typeSpecCompileError.d.ts +5 -0
- package/build/component/driver/typeSpec/error/typeSpecCompileError.d.ts.map +1 -0
- package/build/component/driver/typeSpec/error/typeSpecCompileError.js +21 -0
- package/build/component/driver/typeSpec/error/typeSpecCompileError.js.map +1 -0
- package/build/component/generator/combinedProject/generator.d.ts.map +1 -1
- package/build/component/generator/combinedProject/generator.js +9 -1
- package/build/component/generator/combinedProject/generator.js.map +1 -1
- package/build/component/generator/declarativeAgent/generator.d.ts +7 -0
- package/build/component/generator/declarativeAgent/generator.d.ts.map +1 -1
- package/build/component/generator/declarativeAgent/generator.js +23 -15
- package/build/component/generator/declarativeAgent/generator.js.map +1 -1
- package/build/component/generator/declarativeAgent/helper.d.ts +52 -0
- package/build/component/generator/declarativeAgent/helper.d.ts.map +1 -1
- package/build/component/generator/declarativeAgent/helper.js +469 -63
- package/build/component/generator/declarativeAgent/helper.js.map +1 -1
- package/build/component/generator/defaultGenerator.d.ts.map +1 -1
- package/build/component/generator/defaultGenerator.js +17 -1
- package/build/component/generator/defaultGenerator.js.map +1 -1
- package/build/component/generator/error.d.ts +3 -0
- package/build/component/generator/error.d.ts.map +1 -1
- package/build/component/generator/error.js +7 -1
- package/build/component/generator/error.js.map +1 -1
- package/build/component/generator/generatorAction.d.ts +12 -1
- package/build/component/generator/generatorAction.d.ts.map +1 -1
- package/build/component/generator/generatorAction.js +16 -8
- package/build/component/generator/generatorAction.js.map +1 -1
- package/build/component/generator/officeAddin/generator.d.ts +13 -0
- package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
- package/build/component/generator/officeAddin/generator.js +159 -35
- package/build/component/generator/officeAddin/generator.js.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.d.ts +4 -0
- package/build/component/generator/officeAddin/helperMethods.d.ts.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.js +6 -3
- package/build/component/generator/officeAddin/helperMethods.js.map +1 -1
- package/build/component/generator/openApiSpec/customEngineAgentGenerator.d.ts +8 -0
- package/build/component/generator/openApiSpec/customEngineAgentGenerator.d.ts.map +1 -1
- package/build/component/generator/openApiSpec/customEngineAgentGenerator.js +9 -4
- package/build/component/generator/openApiSpec/customEngineAgentGenerator.js.map +1 -1
- package/build/component/generator/openApiSpec/helper.d.ts +2 -3
- package/build/component/generator/openApiSpec/helper.d.ts.map +1 -1
- package/build/component/generator/openApiSpec/helper.js +19 -57
- package/build/component/generator/openApiSpec/helper.js.map +1 -1
- package/build/component/generator/openPlugin/authorParser.d.ts +8 -0
- package/build/component/generator/openPlugin/authorParser.d.ts.map +1 -0
- package/build/component/generator/openPlugin/authorParser.js +49 -0
- package/build/component/generator/openPlugin/authorParser.js.map +1 -0
- package/build/component/generator/openPlugin/deterministicId.d.ts +6 -0
- package/build/component/generator/openPlugin/deterministicId.d.ts.map +1 -0
- package/build/component/generator/openPlugin/deterministicId.js +31 -0
- package/build/component/generator/openPlugin/deterministicId.js.map +1 -0
- package/build/component/generator/openPlugin/exporter.d.ts +18 -0
- package/build/component/generator/openPlugin/exporter.d.ts.map +1 -0
- package/build/component/generator/openPlugin/exporter.js +233 -0
- package/build/component/generator/openPlugin/exporter.js.map +1 -0
- package/build/component/generator/openPlugin/iconStrategy.d.ts +8 -0
- package/build/component/generator/openPlugin/iconStrategy.d.ts.map +1 -0
- package/build/component/generator/openPlugin/iconStrategy.js +62 -0
- package/build/component/generator/openPlugin/iconStrategy.js.map +1 -0
- package/build/component/generator/openPlugin/importer.d.ts +25 -0
- package/build/component/generator/openPlugin/importer.d.ts.map +1 -0
- package/build/component/generator/openPlugin/importer.js +140 -0
- package/build/component/generator/openPlugin/importer.js.map +1 -0
- package/build/component/generator/openPlugin/mapper.d.ts +6 -0
- package/build/component/generator/openPlugin/mapper.d.ts.map +1 -0
- package/build/component/generator/openPlugin/mapper.js +141 -0
- package/build/component/generator/openPlugin/mapper.js.map +1 -0
- package/build/component/generator/openPlugin/parser.d.ts +3 -0
- package/build/component/generator/openPlugin/parser.d.ts.map +1 -0
- package/build/component/generator/openPlugin/parser.js +153 -0
- package/build/component/generator/openPlugin/parser.js.map +1 -0
- package/build/component/generator/openPlugin/placeholderPng.d.ts +6 -0
- package/build/component/generator/openPlugin/placeholderPng.d.ts.map +1 -0
- package/build/component/generator/openPlugin/placeholderPng.js +71 -0
- package/build/component/generator/openPlugin/placeholderPng.js.map +1 -0
- package/build/component/generator/openPlugin/textUtils.d.ts +12 -0
- package/build/component/generator/openPlugin/textUtils.d.ts.map +1 -0
- package/build/component/generator/openPlugin/textUtils.js +43 -0
- package/build/component/generator/openPlugin/textUtils.js.map +1 -0
- package/build/component/generator/openPlugin/types.d.ts +128 -0
- package/build/component/generator/openPlugin/types.d.ts.map +1 -0
- package/build/component/generator/openPlugin/types.js.map +1 -0
- package/build/component/generator/other/tdpGenerator.d.ts +1 -0
- package/build/component/generator/other/tdpGenerator.d.ts.map +1 -1
- package/build/component/generator/other/tdpGenerator.js +24 -2
- package/build/component/generator/other/tdpGenerator.js.map +1 -1
- package/build/component/generator/spfx/utils/constants.d.ts +1 -1
- package/build/component/generator/spfx/utils/constants.js +1 -1
- package/build/component/generator/spfx/utils/utils.js +1 -1
- package/build/component/generator/spfx/utils/utils.js.map +1 -1
- package/build/component/generator/templateHelper.d.ts +17 -2
- package/build/component/generator/templateHelper.d.ts.map +1 -1
- package/build/component/generator/templateHelper.js +36 -3
- package/build/component/generator/templateHelper.js.map +1 -1
- package/build/component/generator/templates/metadata/index.d.ts +15 -0
- package/build/component/generator/templates/metadata/index.d.ts.map +1 -1
- package/build/component/generator/templates/metadata/index.js +51 -5
- package/build/component/generator/templates/metadata/index.js.map +1 -1
- package/build/component/generator/templates/templateNames.d.ts +6 -3
- package/build/component/generator/templates/templateNames.d.ts.map +1 -1
- package/build/component/generator/templates/templateNames.js +7 -2
- package/build/component/generator/templates/templateNames.js.map +1 -1
- package/build/component/generator/templates/templateReplaceMap.d.ts.map +1 -1
- package/build/component/generator/templates/templateReplaceMap.js +4 -1
- package/build/component/generator/templates/templateReplaceMap.js.map +1 -1
- package/build/component/generator/utils.d.ts.map +1 -1
- package/build/component/generator/utils.js +14 -8
- package/build/component/generator/utils.js.map +1 -1
- package/build/component/generator/v4MetadataSource.d.ts +16 -0
- package/build/component/generator/v4MetadataSource.d.ts.map +1 -0
- package/build/component/generator/v4MetadataSource.js +35 -0
- package/build/component/generator/v4MetadataSource.js.map +1 -0
- package/build/component/generator/v4TemplateBridge.d.ts +55 -0
- package/build/component/generator/v4TemplateBridge.d.ts.map +1 -0
- package/build/component/generator/v4TemplateBridge.js +224 -0
- package/build/component/generator/v4TemplateBridge.js.map +1 -0
- package/build/component/local/localCertificateManager.d.ts +16 -1
- package/build/component/local/localCertificateManager.d.ts.map +1 -1
- package/build/component/local/localCertificateManager.js +47 -31
- package/build/component/local/localCertificateManager.js.map +1 -1
- package/build/component/m365/constants.d.ts +2 -1
- package/build/component/m365/constants.d.ts.map +1 -1
- package/build/component/m365/constants.js +1 -0
- package/build/component/m365/constants.js.map +1 -1
- package/build/component/m365/launchHelper.d.ts.map +1 -1
- package/build/component/m365/launchHelper.js +7 -2
- package/build/component/m365/launchHelper.js.map +1 -1
- package/build/component/m365/packageService.d.ts +7 -0
- package/build/component/m365/packageService.d.ts.map +1 -1
- package/build/component/m365/packageService.js +79 -13
- package/build/component/m365/packageService.js.map +1 -1
- package/build/component/m365/serviceConstant.d.ts.map +1 -1
- package/build/component/m365/serviceConstant.js +24 -4
- package/build/component/m365/serviceConstant.js.map +1 -1
- package/build/component/middleware/envMW.d.ts.map +1 -1
- package/build/component/middleware/envMW.js +5 -0
- package/build/component/middleware/envMW.js.map +1 -1
- package/build/component/provisionUtils.d.ts.map +1 -1
- package/build/component/provisionUtils.js +5 -2
- package/build/component/provisionUtils.js.map +1 -1
- package/build/component/utils/ResourceGroupHelper.d.ts +4 -0
- package/build/component/utils/ResourceGroupHelper.d.ts.map +1 -1
- package/build/component/utils/ResourceGroupHelper.js +8 -4
- package/build/component/utils/ResourceGroupHelper.js.map +1 -1
- package/build/component/utils/charsetUtils.js +3 -3
- package/build/component/utils/charsetUtils.js.map +1 -1
- package/build/component/utils/envUtil.d.ts.map +1 -1
- package/build/component/utils/envUtil.js +2 -2
- package/build/component/utils/envUtil.js.map +1 -1
- package/build/component/utils/fileOperation.d.ts +9 -0
- package/build/component/utils/fileOperation.d.ts.map +1 -1
- package/build/component/utils/fileOperation.js +31 -17
- package/build/component/utils/fileOperation.js.map +1 -1
- package/build/component/utils/mcpAuthScaffolder.d.ts +137 -0
- package/build/component/utils/mcpAuthScaffolder.d.ts.map +1 -0
- package/build/component/utils/mcpAuthScaffolder.js +200 -0
- package/build/component/utils/mcpAuthScaffolder.js.map +1 -0
- package/build/component/utils/mcpToolFetcher.d.ts +2 -0
- package/build/component/utils/mcpToolFetcher.d.ts.map +1 -0
- package/build/component/utils/mcpToolFetcher.js +7 -0
- package/build/component/utils/mcpToolFetcher.js.map +1 -0
- package/build/component/utils/metadataGraphPermssion.d.ts +4 -0
- package/build/component/utils/metadataGraphPermssion.d.ts.map +1 -1
- package/build/component/utils/metadataGraphPermssion.js +7 -4
- package/build/component/utils/metadataGraphPermssion.js.map +1 -1
- package/build/component/utils/odrProvider.d.ts +1 -48
- package/build/component/utils/odrProvider.d.ts.map +1 -1
- package/build/component/utils/odrProvider.js +2 -94
- package/build/component/utils/odrProvider.js.map +1 -1
- package/build/core/FxCore.d.ts +45 -13
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.declarativeAgent.d.ts +45 -1
- package/build/core/FxCore.declarativeAgent.d.ts.map +1 -1
- package/build/core/FxCore.declarativeAgent.js +747 -56
- package/build/core/FxCore.declarativeAgent.js.map +1 -1
- package/build/core/FxCore.js +462 -305
- package/build/core/FxCore.js.map +1 -1
- package/build/core/FxCore.openPlugin.d.ts +23 -0
- package/build/core/FxCore.openPlugin.d.ts.map +1 -0
- package/build/core/FxCore.openPlugin.js +131 -0
- package/build/core/FxCore.openPlugin.js.map +1 -0
- package/build/core/collaborator.d.ts.map +1 -1
- package/build/core/createFrontDoorAdapters.d.ts +39 -0
- package/build/core/createFrontDoorAdapters.d.ts.map +1 -0
- package/build/core/createFrontDoorAdapters.js +210 -0
- package/build/core/createFrontDoorAdapters.js.map +1 -0
- package/build/core/createProjectFrontDoor.d.ts +49 -0
- package/build/core/createProjectFrontDoor.d.ts.map +1 -0
- package/build/core/createProjectFrontDoor.js +351 -0
- package/build/core/createProjectFrontDoor.js.map +1 -0
- package/build/core/middleware/concurrentLocker.d.ts.map +1 -1
- package/build/core/middleware/concurrentLocker.js +7 -10
- package/build/core/middleware/concurrentLocker.js.map +1 -1
- package/build/core/middleware/errorHandler.d.ts.map +1 -1
- package/build/core/middleware/errorHandler.js +9 -0
- package/build/core/middleware/errorHandler.js.map +1 -1
- package/build/core/middleware/fileLocker.js +6 -6
- package/build/core/middleware/fileLocker.js.map +1 -1
- package/build/core/middleware/utils/v3MigrationUtils.d.ts +1 -34
- package/build/core/middleware/utils/v3MigrationUtils.d.ts.map +1 -1
- package/build/core/middleware/utils/v3MigrationUtils.js +6 -245
- package/build/core/middleware/utils/v3MigrationUtils.js.map +1 -1
- package/build/core/modifyProjectFrontDoor.d.ts +27 -0
- package/build/core/modifyProjectFrontDoor.d.ts.map +1 -0
- package/build/core/modifyProjectFrontDoor.js +149 -0
- package/build/core/modifyProjectFrontDoor.js.map +1 -0
- package/build/core/v4ArtifactSnapshot.d.ts +5 -0
- package/build/core/v4ArtifactSnapshot.d.ts.map +1 -0
- package/build/core/v4ArtifactSnapshot.js +23 -0
- package/build/core/v4ArtifactSnapshot.js.map +1 -0
- package/build/error/common.d.ts.map +1 -1
- package/build/error/common.js +3 -0
- package/build/error/common.js.map +1 -1
- package/build/error/teamsApp.d.ts +3 -0
- package/build/error/teamsApp.d.ts.map +1 -1
- package/build/error/teamsApp.js +15 -1
- package/build/error/teamsApp.js.map +1 -1
- package/build/error/teamsGraph.d.ts +5 -0
- package/build/error/teamsGraph.d.ts.map +1 -0
- package/build/error/teamsGraph.js +24 -0
- package/build/error/teamsGraph.js.map +1 -0
- package/build/index.d.ts +5 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +15 -2
- package/build/index.js.map +1 -1
- package/build/question/constants.d.ts +1 -0
- package/build/question/constants.d.ts.map +1 -1
- package/build/question/constants.js +15 -8
- package/build/question/constants.js.map +1 -1
- package/build/question/create.d.ts +18 -0
- package/build/question/create.d.ts.map +1 -1
- package/build/question/create.js +121 -14
- package/build/question/create.js.map +1 -1
- package/build/question/index.d.ts +1 -1
- package/build/question/index.d.ts.map +1 -1
- package/build/question/index.js +4 -4
- package/build/question/index.js.map +1 -1
- package/build/question/inputs/AddKnowledgeInputs.d.ts.map +1 -1
- package/build/question/inputs/AddPluginInputs.d.ts +17 -5
- package/build/question/inputs/AddPluginInputs.d.ts.map +1 -1
- package/build/question/inputs/AddSkillInputs.d.ts +10 -0
- package/build/question/inputs/AddSkillInputs.d.ts.map +1 -0
- package/build/question/inputs/AddSkillInputs.js +5 -0
- package/build/question/inputs/AddSkillInputs.js.map +1 -0
- package/build/question/inputs/CreateProjectInputs.d.ts +19 -1
- package/build/question/inputs/CreateProjectInputs.d.ts.map +1 -1
- package/build/question/inputs/ExportOpenPluginInputs.d.ts +10 -0
- package/build/question/inputs/ExportOpenPluginInputs.d.ts.map +1 -0
- package/build/question/inputs/ExportOpenPluginInputs.js +5 -0
- package/build/question/inputs/ExportOpenPluginInputs.js.map +1 -0
- package/build/question/inputs/ImportOpenPluginInputs.d.ts +28 -0
- package/build/question/inputs/ImportOpenPluginInputs.d.ts.map +1 -0
- package/build/question/inputs/ImportOpenPluginInputs.js +5 -0
- package/build/question/inputs/ImportOpenPluginInputs.js.map +1 -0
- package/build/question/inputs/index.d.ts +4 -1
- package/build/question/inputs/index.d.ts.map +1 -1
- package/build/question/inputs/index.js +4 -1
- package/build/question/inputs/index.js.map +1 -1
- package/build/question/options/AddPluginOptions.d.ts.map +1 -1
- package/build/question/options/AddPluginOptions.js +38 -6
- package/build/question/options/AddPluginOptions.js.map +1 -1
- package/build/question/options/AddSkillOptions.d.ts +4 -0
- package/build/question/options/AddSkillOptions.d.ts.map +1 -0
- package/build/question/options/AddSkillOptions.js +47 -0
- package/build/question/options/AddSkillOptions.js.map +1 -0
- package/build/question/options/CreateProjectOptions.d.ts.map +1 -1
- package/build/question/options/CreateProjectOptions.js +53 -1
- package/build/question/options/CreateProjectOptions.js.map +1 -1
- package/build/question/options/ExportOpenPluginOptions.d.ts +4 -0
- package/build/question/options/ExportOpenPluginOptions.d.ts.map +1 -0
- package/build/question/options/ExportOpenPluginOptions.js +29 -0
- package/build/question/options/ExportOpenPluginOptions.js.map +1 -0
- package/build/question/options/ImportOpenPluginOptions.d.ts +4 -0
- package/build/question/options/ImportOpenPluginOptions.d.ts.map +1 -0
- package/build/question/options/ImportOpenPluginOptions.js +54 -0
- package/build/question/options/ImportOpenPluginOptions.js.map +1 -0
- package/build/question/options/index.d.ts +3 -0
- package/build/question/options/index.d.ts.map +1 -1
- package/build/question/options/index.js +3 -0
- package/build/question/options/index.js.map +1 -1
- package/build/question/other.d.ts +1 -1
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +195 -17
- package/build/question/other.js.map +1 -1
- package/build/question/questionNames.d.ts +14 -1
- package/build/question/questionNames.d.ts.map +1 -1
- package/build/question/questionNames.js +13 -0
- package/build/question/questionNames.js.map +1 -1
- package/build/question/scaffold/commonNodes.d.ts.map +1 -1
- package/build/question/scaffold/commonNodes.js +14 -2
- package/build/question/scaffold/commonNodes.js.map +1 -1
- package/build/question/scaffold/constructNode.d.ts +3 -1
- package/build/question/scaffold/constructNode.d.ts.map +1 -1
- package/build/question/scaffold/constructNode.js +55 -2
- package/build/question/scaffold/constructNode.js.map +1 -1
- package/build/question/scaffold/vsc/CapabilityOptions.d.ts +3 -5
- package/build/question/scaffold/vsc/CapabilityOptions.d.ts.map +1 -1
- package/build/question/scaffold/vsc/CapabilityOptions.js +46 -46
- package/build/question/scaffold/vsc/CapabilityOptions.js.map +1 -1
- package/build/question/scaffold/vsc/ProjectTypeOptions.d.ts +2 -0
- package/build/question/scaffold/vsc/ProjectTypeOptions.d.ts.map +1 -1
- package/build/question/scaffold/vsc/ProjectTypeOptions.js +9 -0
- package/build/question/scaffold/vsc/ProjectTypeOptions.js.map +1 -1
- package/build/question/scaffold/vsc/createRootNode.d.ts.map +1 -1
- package/build/question/scaffold/vsc/createRootNode.js +3 -0
- package/build/question/scaffold/vsc/createRootNode.js.map +1 -1
- package/build/question/scaffold/vsc/daProjectTypeNode.d.ts.map +1 -1
- package/build/question/scaffold/vsc/daProjectTypeNode.js +1 -6
- package/build/question/scaffold/vsc/daProjectTypeNode.js.map +1 -1
- package/build/question/scaffold/vsc/rootNode.d.ts.map +1 -1
- package/build/question/scaffold/vsc/rootNode.js +17 -4
- package/build/question/scaffold/vsc/rootNode.js.map +1 -1
- package/build/question/scaffold/vsc/teamsProjectTypeNode.d.ts +66 -0
- package/build/question/scaffold/vsc/teamsProjectTypeNode.d.ts.map +1 -1
- package/build/question/scaffold/vsc/teamsProjectTypeNode.js +408 -21
- package/build/question/scaffold/vsc/teamsProjectTypeNode.js.map +1 -1
- package/build/question/share.js +3 -2
- package/build/question/share.js.map +1 -1
- package/build/ui/visitor.d.ts.map +1 -1
- package/build/ui/visitor.js +10 -0
- package/build/ui/visitor.js.map +1 -1
- package/build/v4/buildTarget/parseSelector.d.ts +35 -0
- package/build/v4/buildTarget/parseSelector.d.ts.map +1 -0
- package/build/v4/buildTarget/parseSelector.js +226 -0
- package/build/v4/buildTarget/parseSelector.js.map +1 -0
- package/build/v4/buildTarget/resolveBuildTarget.d.ts +85 -0
- package/build/v4/buildTarget/resolveBuildTarget.d.ts.map +1 -0
- package/build/v4/buildTarget/resolveBuildTarget.js +260 -0
- package/build/v4/buildTarget/resolveBuildTarget.js.map +1 -0
- package/build/v4/collectInputs/collectInputs.d.ts +151 -0
- package/build/v4/collectInputs/collectInputs.d.ts.map +1 -0
- package/build/v4/collectInputs/collectInputs.js +533 -0
- package/build/v4/collectInputs/collectInputs.js.map +1 -0
- package/build/v4/distribution/bundledFloor.d.ts +11 -0
- package/build/v4/distribution/bundledFloor.d.ts.map +1 -0
- package/build/v4/distribution/bundledFloor.js +114 -0
- package/build/v4/distribution/bundledFloor.js.map +1 -0
- package/build/v4/distribution/createQuestions.d.ts +6 -0
- package/build/v4/distribution/createQuestions.d.ts.map +1 -0
- package/build/v4/distribution/createQuestions.js +61 -0
- package/build/v4/distribution/createQuestions.js.map +1 -0
- package/build/v4/distribution/createSelector.d.ts +15 -0
- package/build/v4/distribution/createSelector.d.ts.map +1 -0
- package/build/v4/distribution/createSelector.js +115 -0
- package/build/v4/distribution/createSelector.js.map +1 -0
- package/build/v4/distribution/declarativePackage.d.ts +14 -0
- package/build/v4/distribution/declarativePackage.d.ts.map +1 -0
- package/build/v4/distribution/declarativePackage.js +165 -0
- package/build/v4/distribution/declarativePackage.js.map +1 -0
- package/build/v4/distribution/packageDir.d.ts +15 -0
- package/build/v4/distribution/packageDir.d.ts.map +1 -0
- package/build/v4/distribution/packageDir.js +101 -0
- package/build/v4/distribution/packageDir.js.map +1 -0
- package/build/v4/distribution/questionFragments.d.ts +11 -0
- package/build/v4/distribution/questionFragments.d.ts.map +1 -0
- package/build/v4/distribution/questionFragments.js +130 -0
- package/build/v4/distribution/questionFragments.js.map +1 -0
- package/build/v4/distribution/templateArtifacts.d.ts +61 -0
- package/build/v4/distribution/templateArtifacts.d.ts.map +1 -0
- package/build/v4/distribution/templateArtifacts.js +459 -0
- package/build/v4/distribution/templateArtifacts.js.map +1 -0
- package/build/v4/distribution/templateConfig.d.ts +43 -0
- package/build/v4/distribution/templateConfig.d.ts.map +1 -0
- package/build/v4/distribution/templateConfig.js +70 -0
- package/build/v4/distribution/templateConfig.js.map +1 -0
- package/build/v4/distribution/templatePackage.d.ts +6 -0
- package/build/v4/distribution/templatePackage.d.ts.map +1 -0
- package/build/v4/distribution/templatePackage.js +63 -0
- package/build/v4/distribution/templatePackage.js.map +1 -0
- package/build/v4/distribution/templateSource.d.ts +66 -0
- package/build/v4/distribution/templateSource.d.ts.map +1 -0
- package/build/v4/distribution/templateSource.js +233 -0
- package/build/v4/distribution/templateSource.js.map +1 -0
- package/build/v4/distribution/templateSourcePort.d.ts +27 -0
- package/build/v4/distribution/templateSourcePort.d.ts.map +1 -0
- package/build/v4/distribution/templateSourcePort.js +175 -0
- package/build/v4/distribution/templateSourcePort.js.map +1 -0
- package/build/v4/engineVersion.d.ts +7 -0
- package/build/v4/engineVersion.d.ts.map +1 -0
- package/build/v4/engineVersion.js +12 -0
- package/build/v4/engineVersion.js.map +1 -0
- package/build/v4/expression/evaluateExpression.d.ts +55 -0
- package/build/v4/expression/evaluateExpression.d.ts.map +1 -0
- package/build/v4/expression/evaluateExpression.js +338 -0
- package/build/v4/expression/evaluateExpression.js.map +1 -0
- package/build/v4/index.d.ts +41 -0
- package/build/v4/index.d.ts.map +1 -0
- package/build/v4/index.js +46 -0
- package/build/v4/index.js.map +1 -0
- package/build/v4/inspection/scaffoldCatalog.d.ts +28 -0
- package/build/v4/inspection/scaffoldCatalog.d.ts.map +1 -0
- package/build/v4/inspection/scaffoldCatalog.js +66 -0
- package/build/v4/inspection/scaffoldCatalog.js.map +1 -0
- package/build/v4/inspection/scaffoldMetadataSource.d.ts +6 -0
- package/build/v4/inspection/scaffoldMetadataSource.d.ts.map +1 -0
- package/build/v4/inspection/scaffoldMetadataSource.js +78 -0
- package/build/v4/inspection/scaffoldMetadataSource.js.map +1 -0
- package/build/v4/mcp/mcpAuthAction.d.ts +36 -0
- package/build/v4/mcp/mcpAuthAction.d.ts.map +1 -0
- package/build/v4/mcp/mcpAuthAction.js +177 -0
- package/build/v4/mcp/mcpAuthAction.js.map +1 -0
- package/build/v4/mcp/mcpAuthScaffold.d.ts +37 -0
- package/build/v4/mcp/mcpAuthScaffold.d.ts.map +1 -0
- package/build/v4/mcp/mcpAuthScaffold.js +162 -0
- package/build/v4/mcp/mcpAuthScaffold.js.map +1 -0
- package/build/v4/mcp/mcpStaticTools.d.ts +17 -0
- package/build/v4/mcp/mcpStaticTools.d.ts.map +1 -0
- package/build/v4/mcp/mcpStaticTools.js +70 -0
- package/build/v4/mcp/mcpStaticTools.js.map +1 -0
- package/build/v4/model/dataModel.d.ts +27 -0
- package/build/v4/model/dataModel.d.ts.map +1 -0
- package/build/v4/model/dataModel.js +5 -0
- package/build/v4/model/dataModel.js.map +1 -0
- package/build/v4/pipeline/runScaffoldPipeline.d.ts +101 -0
- package/build/v4/pipeline/runScaffoldPipeline.d.ts.map +1 -0
- package/build/v4/pipeline/runScaffoldPipeline.js +212 -0
- package/build/v4/pipeline/runScaffoldPipeline.js.map +1 -0
- package/build/v4/providers/createOptionsProviders.d.ts +11 -0
- package/build/v4/providers/createOptionsProviders.d.ts.map +1 -0
- package/build/v4/providers/createOptionsProviders.js +268 -0
- package/build/v4/providers/createOptionsProviders.js.map +1 -0
- package/build/v4/renderContext/buildRenderContext.d.ts +24 -0
- package/build/v4/renderContext/buildRenderContext.d.ts.map +1 -0
- package/build/v4/renderContext/buildRenderContext.js +75 -0
- package/build/v4/renderContext/buildRenderContext.js.map +1 -0
- package/build/v4/runtime/generalSensitivityLabel.d.ts +5 -0
- package/build/v4/runtime/generalSensitivityLabel.d.ts.map +1 -0
- package/build/v4/runtime/generalSensitivityLabel.js +36 -0
- package/build/v4/runtime/generalSensitivityLabel.js.map +1 -0
- package/build/v4/runtime/inMemoryRuntime.d.ts +21 -0
- package/build/v4/runtime/inMemoryRuntime.d.ts.map +1 -0
- package/build/v4/runtime/inMemoryRuntime.js +43 -0
- package/build/v4/runtime/inMemoryRuntime.js.map +1 -0
- package/build/v4/runtime/packageParse.d.ts +13 -0
- package/build/v4/runtime/packageParse.d.ts.map +1 -0
- package/build/v4/runtime/packageParse.js +235 -0
- package/build/v4/runtime/packageParse.js.map +1 -0
- package/build/v4/runtime/realRuntime.d.ts +11 -0
- package/build/v4/runtime/realRuntime.d.ts.map +1 -0
- package/build/v4/runtime/realRuntime.js +64 -0
- package/build/v4/runtime/realRuntime.js.map +1 -0
- package/build/v4/runtime/renderMustache.d.ts +7 -0
- package/build/v4/runtime/renderMustache.d.ts.map +1 -0
- package/build/v4/runtime/renderMustache.js +54 -0
- package/build/v4/runtime/renderMustache.js.map +1 -0
- package/build/v4/runtime/runtimeRegistry.d.ts +28 -0
- package/build/v4/runtime/runtimeRegistry.d.ts.map +1 -0
- package/build/v4/runtime/runtimeRegistry.js +165 -0
- package/build/v4/runtime/runtimeRegistry.js.map +1 -0
- package/build/v4/runtime/scaffold.d.ts +31 -0
- package/build/v4/runtime/scaffold.d.ts.map +1 -0
- package/build/v4/runtime/scaffold.js +34 -0
- package/build/v4/runtime/scaffold.js.map +1 -0
- package/build/v4/runtime/scaffoldFromPackageDir.d.ts +7 -0
- package/build/v4/runtime/scaffoldFromPackageDir.d.ts.map +1 -0
- package/build/v4/runtime/scaffoldFromPackageDir.js +43 -0
- package/build/v4/runtime/scaffoldFromPackageDir.js.map +1 -0
- package/build/v4/runtime/selectLanguageContent.d.ts +7 -0
- package/build/v4/runtime/selectLanguageContent.d.ts.map +1 -0
- package/build/v4/runtime/selectLanguageContent.js +39 -0
- package/build/v4/runtime/selectLanguageContent.js.map +1 -0
- package/build/v4/runtime/steps/daAction.d.ts +6 -0
- package/build/v4/runtime/steps/daAction.d.ts.map +1 -0
- package/build/v4/runtime/steps/daAction.js +41 -0
- package/build/v4/runtime/steps/daAction.js.map +1 -0
- package/build/v4/runtime/steps/daSensitivity.d.ts +14 -0
- package/build/v4/runtime/steps/daSensitivity.d.ts.map +1 -0
- package/build/v4/runtime/steps/daSensitivity.js +50 -0
- package/build/v4/runtime/steps/daSensitivity.js.map +1 -0
- package/build/v4/runtime/steps/mcpAuth.d.ts +13 -0
- package/build/v4/runtime/steps/mcpAuth.d.ts.map +1 -0
- package/build/v4/runtime/steps/mcpAuth.js +90 -0
- package/build/v4/runtime/steps/mcpAuth.js.map +1 -0
- package/build/v4/runtime/steps/mcpLocal.d.ts +6 -0
- package/build/v4/runtime/steps/mcpLocal.d.ts.map +1 -0
- package/build/v4/runtime/steps/mcpLocal.js +93 -0
- package/build/v4/runtime/steps/mcpLocal.js.map +1 -0
- package/build/v4/runtime/steps/mcpStatic.d.ts +10 -0
- package/build/v4/runtime/steps/mcpStatic.d.ts.map +1 -0
- package/build/v4/runtime/steps/mcpStatic.js +182 -0
- package/build/v4/runtime/steps/mcpStatic.js.map +1 -0
- package/build/v4/runtime/steps/metaOs.d.ts +10 -0
- package/build/v4/runtime/steps/metaOs.d.ts.map +1 -0
- package/build/v4/runtime/steps/metaOs.js +422 -0
- package/build/v4/runtime/steps/metaOs.js.map +1 -0
- package/build/v4/runtime/steps/officeAddin.d.ts +4 -0
- package/build/v4/runtime/steps/officeAddin.d.ts.map +1 -0
- package/build/v4/runtime/steps/officeAddin.js +168 -0
- package/build/v4/runtime/steps/officeAddin.js.map +1 -0
- package/build/v4/runtime/steps/openApi.d.ts +6 -0
- package/build/v4/runtime/steps/openApi.d.ts.map +1 -0
- package/build/v4/runtime/steps/openApi.js +389 -0
- package/build/v4/runtime/steps/openApi.js.map +1 -0
- package/build/v4/runtime/steps/openApiCustomApi.d.ts +5 -0
- package/build/v4/runtime/steps/openApiCustomApi.d.ts.map +1 -0
- package/build/v4/runtime/steps/openApiCustomApi.js +385 -0
- package/build/v4/runtime/steps/openApiCustomApi.js.map +1 -0
- package/build/v4/runtime/whitelist.d.ts +41 -0
- package/build/v4/runtime/whitelist.d.ts.map +1 -0
- package/build/v4/runtime/whitelist.js +211 -0
- package/build/v4/runtime/whitelist.js.map +1 -0
- package/build/v4/runtime/withTempDirectory.d.ts +10 -0
- package/build/v4/runtime/withTempDirectory.d.ts.map +1 -0
- package/build/v4/runtime/withTempDirectory.js +41 -0
- package/build/v4/runtime/withTempDirectory.js.map +1 -0
- package/build/v4/surface/createFloorTail.d.ts +12 -0
- package/build/v4/surface/createFloorTail.d.ts.map +1 -0
- package/build/v4/surface/createFloorTail.js +138 -0
- package/build/v4/surface/createFloorTail.js.map +1 -0
- package/build/v4/surface/createInputs.d.ts +51 -0
- package/build/v4/surface/createInputs.d.ts.map +1 -0
- package/build/v4/surface/createInputs.js +153 -0
- package/build/v4/surface/createInputs.js.map +1 -0
- package/build/v4/surface/createSelectorWalk.d.ts +26 -0
- package/build/v4/surface/createSelectorWalk.d.ts.map +1 -0
- package/build/v4/surface/createSelectorWalk.js +143 -0
- package/build/v4/surface/createSelectorWalk.js.map +1 -0
- package/build/v4/surface/deriveCreateOptions.d.ts +5 -0
- package/build/v4/surface/deriveCreateOptions.d.ts.map +1 -0
- package/build/v4/surface/deriveCreateOptions.js +212 -0
- package/build/v4/surface/deriveCreateOptions.js.map +1 -0
- package/build/v4/surface/localizePrompt.d.ts +11 -0
- package/build/v4/surface/localizePrompt.d.ts.map +1 -0
- package/build/v4/surface/localizePrompt.js +32 -0
- package/build/v4/surface/localizePrompt.js.map +1 -0
- package/build/v4/surface/modifySelectorWalk.d.ts +12 -0
- package/build/v4/surface/modifySelectorWalk.d.ts.map +1 -0
- package/build/v4/surface/modifySelectorWalk.js +115 -0
- package/build/v4/surface/modifySelectorWalk.js.map +1 -0
- package/build/v4/surface/uiPromptUI.d.ts +5 -0
- package/build/v4/surface/uiPromptUI.d.ts.map +1 -0
- package/build/v4/surface/uiPromptUI.js +220 -0
- package/build/v4/surface/uiPromptUI.js.map +1 -0
- package/build/v4/validation/capabilityCatalog.d.ts +8 -0
- package/build/v4/validation/capabilityCatalog.d.ts.map +1 -0
- package/build/v4/validation/capabilityCatalog.js +62 -0
- package/build/v4/validation/capabilityCatalog.js.map +1 -0
- package/build/v4/validation/templateArchiveValidation.d.ts +15 -0
- package/build/v4/validation/templateArchiveValidation.d.ts.map +1 -0
- package/build/v4/validation/templateArchiveValidation.js +297 -0
- package/build/v4/validation/templateArchiveValidation.js.map +1 -0
- package/build/v4/validation/validateTemplatePackage.d.ts +83 -0
- package/build/v4/validation/validateTemplatePackage.d.ts.map +1 -0
- package/build/v4/validation/validateTemplatePackage.js +313 -0
- package/build/v4/validation/validateTemplatePackage.js.map +1 -0
- package/build/v4/validators/createInputValidators.d.ts +7 -0
- package/build/v4/validators/createInputValidators.d.ts.map +1 -0
- package/build/v4/validators/createInputValidators.js +77 -0
- package/build/v4/validators/createInputValidators.js.map +1 -0
- package/build/v4/validators/mcpCredentialValidators.d.ts +5 -0
- package/build/v4/validators/mcpCredentialValidators.d.ts.map +1 -0
- package/build/v4/validators/mcpCredentialValidators.js +13 -0
- package/build/v4/validators/mcpCredentialValidators.js.map +1 -0
- package/build/v4/validators/mcpServerUrlValidator.d.ts +9 -0
- package/build/v4/validators/mcpServerUrlValidator.d.ts.map +1 -0
- package/build/v4/validators/mcpServerUrlValidator.js +15 -0
- package/build/v4/validators/mcpServerUrlValidator.js.map +1 -0
- package/package.json +46 -97
- package/resource/package.nls.cs.json +1176 -1095
- package/resource/package.nls.de.json +1176 -1095
- package/resource/package.nls.es.json +1176 -1095
- package/resource/package.nls.fr.json +1176 -1095
- package/resource/package.nls.it.json +1176 -1095
- package/resource/package.nls.ja.json +1176 -1095
- package/resource/package.nls.json +116 -28
- package/resource/package.nls.ko.json +1176 -1095
- package/resource/package.nls.pl.json +1176 -1095
- package/resource/package.nls.pt-BR.json +1176 -1095
- package/resource/package.nls.ru.json +1176 -1095
- package/resource/package.nls.tr.json +1176 -1095
- package/resource/package.nls.zh-Hans.json +1176 -1095
- package/resource/package.nls.zh-Hant.json +1176 -1095
- package/resource/templates/package.nls.cs.json +39 -24
- package/resource/templates/package.nls.de.json +37 -22
- package/resource/templates/package.nls.es.json +35 -20
- package/resource/templates/package.nls.fr.json +45 -30
- package/resource/templates/package.nls.it.json +42 -27
- package/resource/templates/package.nls.ja.json +35 -20
- package/resource/templates/package.nls.json +27 -12
- package/resource/templates/package.nls.ko.json +33 -18
- package/resource/templates/package.nls.pl.json +38 -23
- package/resource/templates/package.nls.pt-BR.json +34 -19
- package/resource/templates/package.nls.ru.json +33 -18
- package/resource/templates/package.nls.tr.json +38 -23
- package/resource/templates/package.nls.zh-Hans.json +44 -29
- package/resource/templates/package.nls.zh-Hant.json +45 -30
- package/resource/templates/package.nls.zh-cn.json +7 -8
- package/resource/templates/package.nls.zh-tw.json +7 -8
- package/resource/yaml-schema/v1.11/yaml.schema.json +3 -0
- package/resource/yaml-schema/v1.12/yaml.schema.json +2132 -0
- package/resource/yaml-schema/v1.13/yaml.schema.json +2193 -0
- package/resource/yaml-schema/yaml.schema.json +127 -2
- package/templates/configs/playground/typescript/.vscode/tasks.json +1 -1
- package/templates/fallback/common.zip +0 -0
- package/templates/fallback/csharp.zip +0 -0
- package/templates/fallback/js.zip +0 -0
- package/templates/fallback/python.zip +0 -0
- package/templates/fallback/ts.zip +0 -0
- package/templates/metadata/allTemplates.json +32 -16
- package/templates/metadata/defaultGeneratorTemplates.json +8 -0
- package/templates/metadata.zip +0 -0
- package/templates/ui/ceaNode.json +30 -0
- package/templates/ui/tdpNode.json +13 -14
- package/templates/ui/teamsNode.json +124 -0
- package/templates/ui/wizardNode.json +56 -46
- package/templates/v4/create-selector.json +392 -0
- package/templates/v4/floor.json +3 -0
- package/templates/v4/modify-selector.json +78 -0
- package/templates/v4/templates-metadata.zip +0 -0
- package/templates/v4/templates.zip +0 -0
- package/build/core/middleware/projectMigratorV3.d.ts +0 -39
- package/build/core/middleware/projectMigratorV3.d.ts.map +0 -1
- package/build/core/middleware/projectMigratorV3.js +0 -694
- package/build/core/middleware/projectMigratorV3.js.map +0 -1
- package/build/core/middleware/projectVersionChecker.d.ts +0 -3
- package/build/core/middleware/projectVersionChecker.d.ts.map +0 -1
- package/build/core/middleware/projectVersionChecker.js +0 -60
- package/build/core/middleware/projectVersionChecker.js.map +0 -1
- package/build/core/middleware/types.d.ts +0 -9
- package/build/core/middleware/types.d.ts.map +0 -1
- package/build/core/middleware/types.js.map +0 -1
- package/build/core/middleware/utils/MigrationUtils.d.ts +0 -13
- package/build/core/middleware/utils/MigrationUtils.d.ts.map +0 -1
- package/build/core/middleware/utils/MigrationUtils.js +0 -212
- package/build/core/middleware/utils/MigrationUtils.js.map +0 -1
- package/build/core/middleware/utils/appYmlGenerator.d.ts +0 -34
- package/build/core/middleware/utils/appYmlGenerator.d.ts.map +0 -1
- package/build/core/middleware/utils/appYmlGenerator.js +0 -158
- package/build/core/middleware/utils/appYmlGenerator.js.map +0 -1
- package/build/core/middleware/utils/debug/appLocalYmlGenerator.d.ts +0 -65
- package/build/core/middleware/utils/debug/appLocalYmlGenerator.d.ts.map +0 -1
- package/build/core/middleware/utils/debug/appLocalYmlGenerator.js +0 -61
- package/build/core/middleware/utils/debug/appLocalYmlGenerator.js.map +0 -1
- package/build/core/middleware/utils/debug/constants.d.ts +0 -20
- package/build/core/middleware/utils/debug/constants.d.ts.map +0 -1
- package/build/core/middleware/utils/debug/constants.js +0 -28
- package/build/core/middleware/utils/debug/constants.js.map +0 -1
- package/build/core/middleware/utils/debug/debugMigrationContext.d.ts +0 -14
- package/build/core/middleware/utils/debug/debugMigrationContext.d.ts.map +0 -1
- package/build/core/middleware/utils/debug/debugMigrationContext.js +0 -23
- package/build/core/middleware/utils/debug/debugMigrationContext.js.map +0 -1
- package/build/core/middleware/utils/debug/debugV3MigrationUtils.d.ts +0 -37
- package/build/core/middleware/utils/debug/debugV3MigrationUtils.d.ts.map +0 -1
- package/build/core/middleware/utils/debug/debugV3MigrationUtils.js +0 -291
- package/build/core/middleware/utils/debug/debugV3MigrationUtils.js.map +0 -1
- package/build/core/middleware/utils/debug/taskMigrator.d.ts +0 -22
- package/build/core/middleware/utils/debug/taskMigrator.d.ts.map +0 -1
- package/build/core/middleware/utils/debug/taskMigrator.js +0 -935
- package/build/core/middleware/utils/debug/taskMigrator.js.map +0 -1
- package/build/core/middleware/utils/migrationContext.d.ts +0 -32
- package/build/core/middleware/utils/migrationContext.d.ts.map +0 -1
- package/build/core/middleware/utils/migrationContext.js +0 -104
- package/build/core/middleware/utils/migrationContext.js.map +0 -1
- package/templates/configs/local/typescript/.gitignore +0 -1
- package/templates/configs/playground/typescript/.gitignore +0 -4
- /package/build/{core/middleware → component/generator/openPlugin}/types.js +0 -0
package/build/core/FxCore.js
CHANGED
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
// Copyright (c) Microsoft Corporation.
|
|
3
3
|
// Licensed under the MIT license.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.FxCore = void 0;
|
|
5
|
+
exports.FxCore = exports.readCopilotGptManifestFile = exports.getManifestPath = exports.parseShareAppActionYamlConfig = exports.getCoreVersion = exports.addSharedUsers = exports.shareWithTenant = exports.buildAadManifest = exports.isValidProjectV3 = exports.fxCoreDeps = void 0;
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
7
|
const hooks_1 = require("@feathersjs/hooks");
|
|
8
8
|
const m365_spec_parser_1 = require("@microsoft/m365-spec-parser");
|
|
9
9
|
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
10
|
+
const adm_zip_1 = tslib_1.__importDefault(require("adm-zip"));
|
|
10
11
|
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
11
12
|
const jsonschema = tslib_1.__importStar(require("jsonschema"));
|
|
12
13
|
const os = tslib_1.__importStar(require("os"));
|
|
@@ -17,8 +18,10 @@ const url_1 = require("url");
|
|
|
17
18
|
const teamsDevPortalClient_1 = require("../client/teamsDevPortalClient");
|
|
18
19
|
const constants_1 = require("../common/constants");
|
|
19
20
|
const daSpecParser_1 = require("../common/daSpecParser");
|
|
21
|
+
const featureFlags_1 = require("../common/featureFlags");
|
|
20
22
|
const globalVars_1 = require("../common/globalVars");
|
|
21
23
|
const localizeUtils_1 = require("../common/localizeUtils");
|
|
24
|
+
const projectSettingsHelper = tslib_1.__importStar(require("../common/projectSettingsHelper"));
|
|
22
25
|
const projectSettingsHelper_1 = require("../common/projectSettingsHelper");
|
|
23
26
|
const projectTypeChecker_1 = require("../common/projectTypeChecker");
|
|
24
27
|
const telemetry_1 = require("../common/telemetry");
|
|
@@ -34,7 +37,7 @@ const aadManifestHelper_1 = require("../component/driver/aad/utility/aadManifest
|
|
|
34
37
|
const buildAadManifest_1 = require("../component/driver/aad/utility/buildAadManifest");
|
|
35
38
|
require("../component/driver/index");
|
|
36
39
|
require("../component/driver/script/scriptDriver");
|
|
37
|
-
const
|
|
40
|
+
const shareUtils = tslib_1.__importStar(require("../component/driver/share/utils"));
|
|
38
41
|
const appStudio_1 = require("../component/driver/teamsApp/appStudio");
|
|
39
42
|
const errors_1 = require("../component/driver/teamsApp/errors");
|
|
40
43
|
const results_1 = require("../component/driver/teamsApp/results");
|
|
@@ -42,14 +45,14 @@ const teamsappMgr_1 = require("../component/driver/teamsApp/teamsappMgr");
|
|
|
42
45
|
const CopilotGptManifestUtils_1 = require("../component/driver/teamsApp/utils/CopilotGptManifestUtils");
|
|
43
46
|
const ManifestUtils_1 = require("../component/driver/teamsApp/utils/ManifestUtils");
|
|
44
47
|
const PluginManifestUtils_1 = require("../component/driver/teamsApp/utils/PluginManifestUtils");
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const helper_1 = require("../component/generator/declarativeAgent/helper");
|
|
48
|
+
const utils_2 = require("../component/driver/teamsApp/utils/utils");
|
|
49
|
+
const utils_3 = require("../component/driver/util/utils");
|
|
48
50
|
const oneDriveSharePointHandler_1 = require("../component/generator/declarativeAgent/oneDriveSharePointHandler");
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
const
|
|
51
|
+
const openApiSpecHelper = tslib_1.__importStar(require("../component/generator/openApiSpec/helper"));
|
|
52
|
+
const helper_1 = require("../component/generator/openApiSpec/helper");
|
|
53
|
+
const templateHelper = tslib_1.__importStar(require("../component/generator/templateHelper"));
|
|
54
|
+
const generatorUtils = tslib_1.__importStar(require("../component/generator/utils"));
|
|
55
|
+
const v4MetadataSource_1 = require("../component/generator/v4MetadataSource");
|
|
53
56
|
const launchHelper_1 = require("../component/m365/launchHelper");
|
|
54
57
|
const packageService_1 = require("../component/m365/packageService");
|
|
55
58
|
const envMW_1 = require("../component/middleware/envMW");
|
|
@@ -60,28 +63,44 @@ const metadataUtil_1 = require("../component/utils/metadataUtil");
|
|
|
60
63
|
const pathUtils_1 = require("../component/utils/pathUtils");
|
|
61
64
|
const settingsUtil_1 = require("../component/utils/settingsUtil");
|
|
62
65
|
const common_2 = require("../error/common");
|
|
63
|
-
const upgrade_1 = require("../error/upgrade");
|
|
64
66
|
const yml_1 = require("../error/yml");
|
|
65
67
|
const constants_3 = require("../question/constants");
|
|
66
68
|
const other_1 = require("../question/other");
|
|
67
69
|
const ProjectTypeOptions_1 = require("../question/scaffold/vsc/ProjectTypeOptions");
|
|
68
70
|
const share_1 = require("../question/share");
|
|
69
71
|
const callback_1 = require("./callback");
|
|
72
|
+
const collaboratorCore = tslib_1.__importStar(require("./collaborator"));
|
|
70
73
|
const collaborator_1 = require("./collaborator");
|
|
74
|
+
const createFrontDoorAdapters_1 = require("./createFrontDoorAdapters");
|
|
75
|
+
const createProjectFrontDoor_1 = require("./createProjectFrontDoor");
|
|
71
76
|
const crypto_1 = require("./crypto");
|
|
72
77
|
const environmentName_1 = require("./environmentName");
|
|
73
|
-
const
|
|
78
|
+
const FxCore_openPlugin_1 = require("./FxCore.openPlugin");
|
|
74
79
|
const generateConfigFiles_1 = require("./generateConfigFiles");
|
|
80
|
+
const v4ArtifactSnapshot_1 = require("./v4ArtifactSnapshot");
|
|
75
81
|
const concurrentLocker_1 = require("./middleware/concurrentLocker");
|
|
76
82
|
const contextInjector_1 = require("./middleware/contextInjector");
|
|
77
83
|
const errorHandler_1 = require("./middleware/errorHandler");
|
|
78
84
|
const fileLocker_1 = require("./middleware/fileLocker");
|
|
79
|
-
const projectMigratorV3_1 = require("./middleware/projectMigratorV3");
|
|
80
85
|
const retry_1 = require("./middleware/retry");
|
|
81
|
-
const
|
|
86
|
+
const v3MigrationUtils = tslib_1.__importStar(require("./middleware/utils/v3MigrationUtils"));
|
|
87
|
+
const shareCore = tslib_1.__importStar(require("./share"));
|
|
82
88
|
const share_2 = require("./share");
|
|
83
89
|
const telemetry_2 = require("./telemetry");
|
|
84
|
-
|
|
90
|
+
exports.fxCoreDeps = {
|
|
91
|
+
getCoreVersion: () => require("../../package.json").version,
|
|
92
|
+
};
|
|
93
|
+
const getCoreVersion = () => exports.fxCoreDeps.getCoreVersion();
|
|
94
|
+
exports.getCoreVersion = getCoreVersion;
|
|
95
|
+
// Compatibility exports for tests that stub module-level helpers.
|
|
96
|
+
exports.isValidProjectV3 = projectSettingsHelper_1.isValidProjectV3;
|
|
97
|
+
exports.buildAadManifest = buildAadManifest_1.buildAadManifest;
|
|
98
|
+
exports.shareWithTenant = share_2.shareWithTenant;
|
|
99
|
+
exports.addSharedUsers = share_2.addSharedUsers;
|
|
100
|
+
exports.parseShareAppActionYamlConfig = shareUtils.parseShareAppActionYamlConfig;
|
|
101
|
+
exports.getManifestPath = CopilotGptManifestUtils_1.copilotGptManifestUtils.getManifestPath;
|
|
102
|
+
exports.readCopilotGptManifestFile = CopilotGptManifestUtils_1.copilotGptManifestUtils.readCopilotGptManifestFile;
|
|
103
|
+
class FxCore extends FxCore_openPlugin_1.FxCoreOpenPluginPart {
|
|
85
104
|
constructor(tools) {
|
|
86
105
|
super();
|
|
87
106
|
(0, globalVars_1.setTools)(tools);
|
|
@@ -105,17 +124,37 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
105
124
|
}
|
|
106
125
|
return res;
|
|
107
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* The create front door (operation `dispatch-create-by-engine`): the single
|
|
129
|
+
* entry the create surfaces call in place of `createProject`. Behind
|
|
130
|
+
* `TEAMSFX_V4_ENABLED` it runs the v4 create selector (Q1) and dispatches the
|
|
131
|
+
* resolved `BuildTarget` by engine; flag off it is a pure pass-through to the
|
|
132
|
+
* unmodified `createProject`, so v3 behavior is byte-identical.
|
|
133
|
+
*
|
|
134
|
+
* It drives its own questions (the v4 selector + the template's Q2 + the v4
|
|
135
|
+
* create floor, or the v3 `QuestionMW` reached through `createProject`), so it
|
|
136
|
+
* carries no `QuestionMW`. `FxCore` is the composition root that supplies the
|
|
137
|
+
* four real seams; the orchestrator stays pure and injectable.
|
|
138
|
+
*/
|
|
139
|
+
async createProjectFrontDoor(inputs) {
|
|
140
|
+
return (0, createProjectFrontDoor_1.createProjectFrontDoor)(inputs, {
|
|
141
|
+
createV3: (i) => this.createProject(i),
|
|
142
|
+
scaffoldV4: createFrontDoorAdapters_1.scaffoldV4,
|
|
143
|
+
collectCreateFloor: createFrontDoorAdapters_1.collectCreateFloor,
|
|
144
|
+
resolveArtifactSnapshot: v4ArtifactSnapshot_1.resolveV4TemplateArtifactSnapshot,
|
|
145
|
+
});
|
|
146
|
+
}
|
|
108
147
|
async createProjectFromTdp(inputs) {
|
|
109
148
|
const context = (0, globalVars_1.createContext)();
|
|
110
149
|
inputs[constants_3.QuestionNames.Scratch] = constants_3.ScratchOptions.yes().id;
|
|
111
150
|
// should never happen as we do same check on Developer Portal.
|
|
112
151
|
if (inputs.teamsAppFromTdp) {
|
|
113
|
-
if ((0,
|
|
152
|
+
if ((0, utils_2.containsUnsupportedFeature)(inputs.teamsAppFromTdp)) {
|
|
114
153
|
return (0, teamsfx_api_1.err)(new common_2.InputValidationError("manifest.json", "App contains unsupported features"));
|
|
115
154
|
}
|
|
116
155
|
else {
|
|
117
156
|
context.telemetryReporter.sendTelemetryEvent(telemetry_2.CoreTelemetryEvent.CreateFromTdpStart, {
|
|
118
|
-
[telemetry_2.CoreTelemetryProperty.TdpTeamsAppFeatures]: (0,
|
|
157
|
+
[telemetry_2.CoreTelemetryProperty.TdpTeamsAppFeatures]: (0, utils_2.getFeaturesFromAppDefinition)(inputs.teamsAppFromTdp).join(","),
|
|
119
158
|
[telemetry_2.CoreTelemetryProperty.TdpTeamsAppId]: inputs.teamsAppFromTdp.teamsAppId,
|
|
120
159
|
});
|
|
121
160
|
}
|
|
@@ -181,7 +220,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
181
220
|
*/
|
|
182
221
|
async provisionResourcesOnce(inputs, ctx) {
|
|
183
222
|
inputs.stage = teamsfx_api_1.Stage.provision;
|
|
184
|
-
const context = (0,
|
|
223
|
+
const context = (0, utils_3.createDriverContext)(inputs);
|
|
185
224
|
try {
|
|
186
225
|
const res = await coordinator_1.coordinator.provision(context, inputs);
|
|
187
226
|
if (res.isOk()) {
|
|
@@ -447,7 +486,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
447
486
|
*/
|
|
448
487
|
async deployArtifacts(inputs, ctx) {
|
|
449
488
|
inputs.stage = teamsfx_api_1.Stage.deploy;
|
|
450
|
-
const context = (0,
|
|
489
|
+
const context = (0, utils_3.createDriverContext)(inputs);
|
|
451
490
|
const res = await coordinator_1.coordinator.deploy(context, inputs);
|
|
452
491
|
if (res.isOk()) {
|
|
453
492
|
ctx.envVars = res.value;
|
|
@@ -483,7 +522,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
483
522
|
manifestPath: manifestTemplatePath,
|
|
484
523
|
outputFilePath: manifestOutputPath,
|
|
485
524
|
};
|
|
486
|
-
const Context = (0,
|
|
525
|
+
const Context = (0, utils_3.createDriverContext)(inputs);
|
|
487
526
|
(0, globalVars_1.setErrorContext)({ component: "aadAppUpdate" });
|
|
488
527
|
const res = await updateAadClient.execute(inputArgs, Context);
|
|
489
528
|
if (res.result.isErr()) {
|
|
@@ -518,7 +557,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
518
557
|
framework: inputs[constants_3.QuestionNames.SPFxFramework],
|
|
519
558
|
spfxPackage: constants_3.SPFxVersionOptionIds.installLocally,
|
|
520
559
|
};
|
|
521
|
-
const Context = (0,
|
|
560
|
+
const Context = (0, utils_3.createDriverContext)(inputs);
|
|
522
561
|
const res = await driver.run(args, Context);
|
|
523
562
|
if (res.isErr()) {
|
|
524
563
|
return (0, teamsfx_api_1.err)(res.error);
|
|
@@ -530,7 +569,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
530
569
|
*/
|
|
531
570
|
async publishApplication(inputs, ctx) {
|
|
532
571
|
inputs.stage = teamsfx_api_1.Stage.publish;
|
|
533
|
-
const context = (0,
|
|
572
|
+
const context = (0, utils_3.createDriverContext)(inputs);
|
|
534
573
|
const res = await coordinator_1.coordinator.publish(context, inputs);
|
|
535
574
|
if (res.isOk()) {
|
|
536
575
|
ctx.envVars = res.value;
|
|
@@ -543,11 +582,17 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
543
582
|
}
|
|
544
583
|
}
|
|
545
584
|
async removeSharedAccess(inputs, ctx) {
|
|
546
|
-
const
|
|
585
|
+
const removeUsersInput = inputs[constants_3.QuestionNames.RemoveUsers];
|
|
586
|
+
const emails = Array.isArray(removeUsersInput)
|
|
587
|
+
? removeUsersInput
|
|
588
|
+
: (removeUsersInput
|
|
589
|
+
?.split(",")
|
|
590
|
+
.map((email) => email.trim())
|
|
591
|
+
.filter((email) => !!email) ?? []);
|
|
547
592
|
if (!emails || emails.length === 0) {
|
|
548
593
|
return (0, teamsfx_api_1.err)(new common_2.MissingRequiredInputError("emails", "FxCore"));
|
|
549
594
|
}
|
|
550
|
-
const parseRes = await
|
|
595
|
+
const parseRes = await shareUtils.parseShareAppActionYamlConfig(inputs.projectPath);
|
|
551
596
|
if (parseRes.isErr()) {
|
|
552
597
|
return (0, teamsfx_api_1.err)(parseRes.error);
|
|
553
598
|
}
|
|
@@ -603,12 +648,19 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
603
648
|
let emails = [];
|
|
604
649
|
if (scope === share_1.ShareScopeOption.ShareAppWithSpecificUsers ||
|
|
605
650
|
operation === share_1.ShareOperationOption.RemoveShareAccessFromUsers) {
|
|
606
|
-
emails =
|
|
651
|
+
emails =
|
|
652
|
+
inputs[constants_3.QuestionNames.UserEmail]
|
|
653
|
+
?.split(",")
|
|
654
|
+
.map((e) => e.trim())
|
|
655
|
+
.filter((e) => !!e) ?? [];
|
|
656
|
+
if (emails.length === 0) {
|
|
657
|
+
return (0, teamsfx_api_1.err)(new common_2.InputValidationError("emails", "No emails"));
|
|
658
|
+
}
|
|
607
659
|
if (emails.length > constants_3.MAX_EMAIL_NUMBER) {
|
|
608
660
|
return (0, teamsfx_api_1.err)(new common_2.InputValidationError("emails", "Too many emails"));
|
|
609
661
|
}
|
|
610
662
|
}
|
|
611
|
-
const parseRes = await
|
|
663
|
+
const parseRes = await shareUtils.parseShareAppActionYamlConfig(inputs.projectPath);
|
|
612
664
|
if (parseRes.isErr()) {
|
|
613
665
|
return (0, teamsfx_api_1.err)(parseRes.error);
|
|
614
666
|
}
|
|
@@ -622,13 +674,13 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
622
674
|
}
|
|
623
675
|
const mosToken = mosTokenRes.value;
|
|
624
676
|
if (operation === share_1.ShareOperationOption.RemoveShareAccessFromUsers) {
|
|
625
|
-
return
|
|
677
|
+
return shareCore.removeShareAccess(mosToken, sharedTitleId, emails);
|
|
626
678
|
}
|
|
627
679
|
else if (scope === share_1.ShareScopeOption.ShareAppWithTenantUsers) {
|
|
628
|
-
return
|
|
680
|
+
return shareCore.shareWithTenant(mosToken, sharedTitleId);
|
|
629
681
|
}
|
|
630
682
|
else if (scope === share_1.ShareScopeOption.ShareAppWithSpecificUsers) {
|
|
631
|
-
return
|
|
683
|
+
return shareCore.addSharedUsers(mosToken, sharedTitleId, emails);
|
|
632
684
|
}
|
|
633
685
|
else {
|
|
634
686
|
return (0, teamsfx_api_1.err)(new common_2.InputValidationError("shareOption", "Invalid share option"));
|
|
@@ -639,7 +691,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
639
691
|
*/
|
|
640
692
|
async executeUserTask(func, inputs) {
|
|
641
693
|
let res = (0, teamsfx_api_1.ok)(undefined);
|
|
642
|
-
const context = (0,
|
|
694
|
+
const context = (0, utils_3.createDriverContext)(inputs);
|
|
643
695
|
if (func.method === "addSso") {
|
|
644
696
|
// used in v3 only in VS
|
|
645
697
|
inputs.stage = teamsfx_api_1.Stage.addFeature;
|
|
@@ -662,8 +714,8 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
662
714
|
}
|
|
663
715
|
await fs_extra_1.default.ensureDir(path.join(inputs.projectPath, "build"));
|
|
664
716
|
const manifestOutputPath = path.join(inputs.projectPath, "build", `aad.${inputs.env}.json`);
|
|
665
|
-
const Context = (0,
|
|
666
|
-
await (0,
|
|
717
|
+
const Context = (0, utils_3.createDriverContext)(inputs);
|
|
718
|
+
await (0, exports.buildAadManifest)(Context, manifestTemplatePath, manifestOutputPath);
|
|
667
719
|
return (0, teamsfx_api_1.ok)(undefined);
|
|
668
720
|
}
|
|
669
721
|
async convertAadToNewSchema(inputs) {
|
|
@@ -734,7 +786,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
734
786
|
*/
|
|
735
787
|
async validateManifest(inputs) {
|
|
736
788
|
inputs.stage = teamsfx_api_1.Stage.validateApplication;
|
|
737
|
-
const context = (0,
|
|
789
|
+
const context = (0, utils_3.createDriverContext)(inputs);
|
|
738
790
|
const teamsAppManifestFilePath = inputs["manifest-path"];
|
|
739
791
|
const args = {
|
|
740
792
|
manifestPath: teamsAppManifestFilePath,
|
|
@@ -749,7 +801,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
749
801
|
*/
|
|
750
802
|
async validateAppPackage(inputs) {
|
|
751
803
|
inputs.stage = teamsfx_api_1.Stage.validateApplication;
|
|
752
|
-
const context = (0,
|
|
804
|
+
const context = (0, utils_3.createDriverContext)(inputs);
|
|
753
805
|
const teamsAppPackageFilePath = inputs["app-package-file-path"];
|
|
754
806
|
const args = {
|
|
755
807
|
appPackagePath: teamsAppPackageFilePath,
|
|
@@ -759,7 +811,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
759
811
|
return (await driver.execute(args, context)).result;
|
|
760
812
|
}
|
|
761
813
|
async validateWithTestCases(inputs) {
|
|
762
|
-
const context = (0,
|
|
814
|
+
const context = (0, utils_3.createDriverContext)(inputs);
|
|
763
815
|
const args = {
|
|
764
816
|
appPackagePath: inputs["app-package-file-path"],
|
|
765
817
|
showMessage: true,
|
|
@@ -772,7 +824,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
772
824
|
* v3 only none lifecycle command
|
|
773
825
|
*/
|
|
774
826
|
async syncManifest(inputs) {
|
|
775
|
-
const context = (0,
|
|
827
|
+
const context = (0, utils_3.createDriverContext)(inputs);
|
|
776
828
|
const projectPath = inputs[constants_3.QuestionNames.ProjectPath];
|
|
777
829
|
const env = inputs[constants_3.QuestionNames.Env];
|
|
778
830
|
const teamsAppId = inputs[constants_3.QuestionNames.TeamsAppId];
|
|
@@ -789,7 +841,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
789
841
|
*/
|
|
790
842
|
async createAppPackage(inputs) {
|
|
791
843
|
inputs.stage = teamsfx_api_1.Stage.createAppPackage;
|
|
792
|
-
const context = (0,
|
|
844
|
+
const context = (0, utils_3.createDriverContext)(inputs);
|
|
793
845
|
// For TSP projects
|
|
794
846
|
await (0, tools_1.runForTypeSpecProject)(inputs.projectPath, context);
|
|
795
847
|
const teamsAppManifestFilePath = inputs?.[constants_3.QuestionNames.TeamsAppManifestFilePath];
|
|
@@ -797,8 +849,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
797
849
|
const args = {
|
|
798
850
|
manifestPath: teamsAppManifestFilePath,
|
|
799
851
|
outputZipPath: inputs[constants_3.QuestionNames.OutputZipPathParamName] ??
|
|
800
|
-
`${inputs.projectPath}/${teamsfx_api_1.AppPackageFolderName}/${teamsfx_api_1.BuildFolderName}/appPackage.${process.env
|
|
801
|
-
.TEAMSFX_ENV}.zip`,
|
|
852
|
+
`${inputs.projectPath}/${teamsfx_api_1.AppPackageFolderName}/${teamsfx_api_1.BuildFolderName}/appPackage.${process.env.TEAMSFX_ENV}.zip`,
|
|
802
853
|
outputFolder: inputs[constants_3.QuestionNames.OutputManifestParamName] ??
|
|
803
854
|
`${inputs.projectPath}/${teamsfx_api_1.AppPackageFolderName}/${teamsfx_api_1.BuildFolderName}`,
|
|
804
855
|
};
|
|
@@ -967,7 +1018,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
967
1018
|
inputs.stage = teamsfx_api_1.Stage.grantPermission;
|
|
968
1019
|
const context = (0, globalVars_1.createContext)();
|
|
969
1020
|
(0, globalVars_1.setErrorContext)({ component: "collaborator" });
|
|
970
|
-
const res = await
|
|
1021
|
+
const res = await collaboratorCore.grantPermission(context, inputs, globalVars_1.TOOLS.tokenProvider);
|
|
971
1022
|
return res;
|
|
972
1023
|
}
|
|
973
1024
|
/**
|
|
@@ -976,7 +1027,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
976
1027
|
async checkPermission(inputs) {
|
|
977
1028
|
inputs.stage = teamsfx_api_1.Stage.checkPermission;
|
|
978
1029
|
const context = (0, globalVars_1.createContext)();
|
|
979
|
-
const res = await
|
|
1030
|
+
const res = await collaboratorCore.checkPermission(context, inputs, globalVars_1.TOOLS.tokenProvider);
|
|
980
1031
|
return res;
|
|
981
1032
|
}
|
|
982
1033
|
/**
|
|
@@ -985,7 +1036,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
985
1036
|
async listCollaborator(inputs) {
|
|
986
1037
|
inputs.stage = teamsfx_api_1.Stage.listCollaborator;
|
|
987
1038
|
const context = (0, globalVars_1.createContext)();
|
|
988
|
-
const res = await
|
|
1039
|
+
const res = await collaboratorCore.listCollaborator(context, inputs, globalVars_1.TOOLS.tokenProvider);
|
|
989
1040
|
return res;
|
|
990
1041
|
}
|
|
991
1042
|
getSelectedEnv(inputs) {
|
|
@@ -1066,45 +1117,16 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1066
1117
|
globalVars_1.TOOLS.logProvider.info(`env file created: ${targetDotEnvFile}`);
|
|
1067
1118
|
return (0, teamsfx_api_1.ok)(undefined);
|
|
1068
1119
|
}
|
|
1069
|
-
// a phantom migration method for V3
|
|
1070
|
-
async phantomMigrationV3(inputs) {
|
|
1071
|
-
// If the project is invalid or upgraded, the ProjectMigratorMWV3 will not take action.
|
|
1072
|
-
// Check invaliad/upgraded project here before call ProjectMigratorMWV3
|
|
1073
|
-
const projectPath = inputs.projectPath || "";
|
|
1074
|
-
const version = await (0, v3MigrationUtils_1.getProjectVersionFromPath)(projectPath);
|
|
1075
|
-
if (version.source === versionMetadata_1.VersionSource.teamsapp) {
|
|
1076
|
-
return (0, teamsfx_api_1.err)(new upgrade_1.NoNeedUpgradeError());
|
|
1077
|
-
}
|
|
1078
|
-
else if (version.source === versionMetadata_1.VersionSource.projectSettings) {
|
|
1079
|
-
const isValid = await (0, projectMigratorV3_1.checkActiveResourcePlugins)(projectPath);
|
|
1080
|
-
if (!isValid) {
|
|
1081
|
-
return (0, teamsfx_api_1.err)(new common_2.InvalidProjectError(projectPath));
|
|
1082
|
-
}
|
|
1083
|
-
}
|
|
1084
|
-
if (version.source === versionMetadata_1.VersionSource.unknown) {
|
|
1085
|
-
return (0, teamsfx_api_1.err)(new common_2.InvalidProjectError(projectPath));
|
|
1086
|
-
}
|
|
1087
|
-
return this.innerMigrationV3(inputs);
|
|
1088
|
-
}
|
|
1089
|
-
innerMigrationV3(inputs) {
|
|
1090
|
-
return (0, teamsfx_api_1.ok)(undefined);
|
|
1091
|
-
}
|
|
1092
1120
|
// a project version check
|
|
1093
1121
|
async projectVersionCheck(inputs) {
|
|
1094
1122
|
const projectPath = inputs.projectPath || "";
|
|
1095
|
-
if (
|
|
1096
|
-
const versionInfo = await
|
|
1123
|
+
if (projectSettingsHelper.isValidProjectV3(projectPath)) {
|
|
1124
|
+
const versionInfo = await v3MigrationUtils.getProjectVersionFromPath(projectPath);
|
|
1097
1125
|
if (!versionInfo.version) {
|
|
1098
1126
|
return (0, teamsfx_api_1.err)(new common_2.InvalidProjectError(projectPath));
|
|
1099
1127
|
}
|
|
1100
|
-
const trackingId = await
|
|
1101
|
-
const isSupport =
|
|
1102
|
-
// if the project is upgradeable, check whether the project is valid and invalid project should not show upgrade option.
|
|
1103
|
-
if (isSupport === versionMetadata_1.VersionState.upgradeable) {
|
|
1104
|
-
if (!(await (0, projectMigratorV3_1.checkActiveResourcePlugins)(projectPath))) {
|
|
1105
|
-
return (0, teamsfx_api_1.err)(new common_2.InvalidProjectError(projectPath));
|
|
1106
|
-
}
|
|
1107
|
-
}
|
|
1128
|
+
const trackingId = await v3MigrationUtils.getTrackingIdFromPath(projectPath);
|
|
1129
|
+
const isSupport = v3MigrationUtils.getVersionState(versionInfo);
|
|
1108
1130
|
return (0, teamsfx_api_1.ok)({
|
|
1109
1131
|
currentVersion: versionInfo.version,
|
|
1110
1132
|
trackingId,
|
|
@@ -1190,11 +1212,11 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1190
1212
|
}
|
|
1191
1213
|
}
|
|
1192
1214
|
async preProvisionForVS(inputs) {
|
|
1193
|
-
const context = (0,
|
|
1215
|
+
const context = (0, utils_3.createDriverContext)(inputs);
|
|
1194
1216
|
return coordinator_1.coordinator.preProvisionForVS(context, inputs);
|
|
1195
1217
|
}
|
|
1196
1218
|
async preCheckYmlAndEnvForVS(inputs) {
|
|
1197
|
-
const context = (0,
|
|
1219
|
+
const context = (0, utils_3.createDriverContext)(inputs);
|
|
1198
1220
|
const result = await coordinator_1.coordinator.preCheckYmlAndEnvForVS(context, inputs);
|
|
1199
1221
|
return result;
|
|
1200
1222
|
}
|
|
@@ -1222,7 +1244,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1222
1244
|
}
|
|
1223
1245
|
try {
|
|
1224
1246
|
// Merge existing operations in manifest.json
|
|
1225
|
-
const specParser = new m365_spec_parser_1.SpecParser(url, (0,
|
|
1247
|
+
const specParser = new m365_spec_parser_1.SpecParser(url, (0, helper_1.getParserOptions)(m365_spec_parser_1.ProjectType.SME));
|
|
1226
1248
|
const listResult = await specParser.list();
|
|
1227
1249
|
const apiResultList = listResult.APIs.filter((value) => value.isValid);
|
|
1228
1250
|
const existingOperationIds = ManifestUtils_1.manifestUtils.getOperationIds(manifestRes.value);
|
|
@@ -1252,11 +1274,11 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1252
1274
|
}
|
|
1253
1275
|
if (authNames.size >= 1) {
|
|
1254
1276
|
for (const authName of authNames) {
|
|
1255
|
-
await
|
|
1277
|
+
await openApiSpecHelper.injectAuthAction(inputs.projectPath, [...authNames][0], authNamesDict[authName], outputApiSpecPath, false);
|
|
1256
1278
|
}
|
|
1257
1279
|
}
|
|
1258
1280
|
let pluginPath;
|
|
1259
|
-
const generateResult = await
|
|
1281
|
+
const generateResult = await openApiSpecHelper.generateFromApiSpec(specParser, manifestPath, inputs, context, "copilotPluginAddAPI", m365_spec_parser_1.ProjectType.SME, {
|
|
1260
1282
|
destinationApiSpecFilePath: outputApiSpecPath,
|
|
1261
1283
|
responseTemplateFolder: adaptiveCardFolder,
|
|
1262
1284
|
pluginManifestFilePath: pluginPath,
|
|
@@ -1265,7 +1287,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1265
1287
|
return (0, teamsfx_api_1.err)(generateResult.error);
|
|
1266
1288
|
}
|
|
1267
1289
|
if (generateResult.value.warnings && generateResult.value.warnings.length > 0) {
|
|
1268
|
-
const warnSummary = await
|
|
1290
|
+
const warnSummary = await openApiSpecHelper.generateScaffoldingSummary(generateResult.value.warnings, manifestRes.value, path.relative(inputs.projectPath, outputApiSpecPath), pluginPath === undefined ? undefined : path.relative(inputs.projectPath, pluginPath), inputs.projectPath);
|
|
1269
1291
|
if (warnSummary) {
|
|
1270
1292
|
context.logProvider.info(warnSummary);
|
|
1271
1293
|
}
|
|
@@ -1274,7 +1296,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1274
1296
|
catch (e) {
|
|
1275
1297
|
let error;
|
|
1276
1298
|
if (e instanceof m365_spec_parser_1.SpecParserError) {
|
|
1277
|
-
error = (0,
|
|
1299
|
+
error = (0, helper_1.convertSpecParserErrorToFxError)(e);
|
|
1278
1300
|
}
|
|
1279
1301
|
else {
|
|
1280
1302
|
error = (0, common_2.assembleError)(e);
|
|
@@ -1307,7 +1329,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1307
1329
|
}
|
|
1308
1330
|
}
|
|
1309
1331
|
async copilotPluginListOperations(inputs) {
|
|
1310
|
-
const res = await
|
|
1332
|
+
const res = await openApiSpecHelper.listOperations((0, globalVars_1.createContext)(), inputs.apiSpecUrl, inputs, inputs.includeExistingAPIs, inputs.shouldLogWarning);
|
|
1311
1333
|
if (res.isErr()) {
|
|
1312
1334
|
const msg = res.error.map((e) => e.content).join("\n");
|
|
1313
1335
|
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "ListOpenAPISpecOperationsError", msg, msg));
|
|
@@ -1326,134 +1348,17 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1326
1348
|
globalVars_1.TOOLS.telemetryReporter?.sendTelemetryEvent(telemetry_1.TelemetryEvent.ProjectType, props);
|
|
1327
1349
|
return (0, teamsfx_api_1.ok)(projectTypeRes);
|
|
1328
1350
|
}
|
|
1329
|
-
/**
|
|
1330
|
-
* Add plugin
|
|
1331
|
-
*/
|
|
1332
|
-
async addPlugin(inputs) {
|
|
1333
|
-
if (!inputs.projectPath) {
|
|
1334
|
-
throw new Error("projectPath is undefined"); // should never happen
|
|
1335
|
-
}
|
|
1336
|
-
const context = (0, globalVars_1.createContext)();
|
|
1337
|
-
const teamsManifestPath = inputs[constants_3.QuestionNames.ManifestPath];
|
|
1338
|
-
const appPackageFolder = path.dirname(teamsManifestPath);
|
|
1339
|
-
const isGenerateFromApiSpec = inputs[constants_3.QuestionNames.ActionType] === constants_3.ActionStartOptions.apiSpec().id;
|
|
1340
|
-
// validate the project is valid for adding plugin
|
|
1341
|
-
const manifestRes = await ManifestUtils_1.manifestUtils._readAppManifest(teamsManifestPath);
|
|
1342
|
-
if (manifestRes.isErr()) {
|
|
1343
|
-
return (0, teamsfx_api_1.err)(manifestRes.error);
|
|
1344
|
-
}
|
|
1345
|
-
const teamsManifest = manifestRes.value;
|
|
1346
|
-
const declarativeGpt = teamsManifest.copilotExtensions
|
|
1347
|
-
? teamsManifest.copilotExtensions.declarativeCopilots?.[0]
|
|
1348
|
-
: teamsManifest.copilotAgents?.declarativeAgents?.[0];
|
|
1349
|
-
if (!declarativeGpt?.file) {
|
|
1350
|
-
return (0, teamsfx_api_1.err)(results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.TeamsAppRequiredPropertyMissingError.name, errors_1.AppStudioError.TeamsAppRequiredPropertyMissingError.message("declarativeAgents", teamsManifestPath)));
|
|
1351
|
-
}
|
|
1352
|
-
const gptManifestFilePathRes = await CopilotGptManifestUtils_1.copilotGptManifestUtils.getManifestPath(teamsManifestPath);
|
|
1353
|
-
if (gptManifestFilePathRes.isErr()) {
|
|
1354
|
-
return (0, teamsfx_api_1.err)(gptManifestFilePathRes.error);
|
|
1355
|
-
}
|
|
1356
|
-
const declarativeCopilotManifestPath = gptManifestFilePathRes.value;
|
|
1357
|
-
const declarativeCopilotManifesRes = await CopilotGptManifestUtils_1.copilotGptManifestUtils.readCopilotGptManifestFile(declarativeCopilotManifestPath);
|
|
1358
|
-
if (declarativeCopilotManifesRes.isErr()) {
|
|
1359
|
-
return (0, teamsfx_api_1.err)(declarativeCopilotManifesRes.error);
|
|
1360
|
-
}
|
|
1361
|
-
const declarativeCopilotManifest = declarativeCopilotManifesRes.value;
|
|
1362
|
-
let confirmMessage = (0, localizeUtils_1.getLocalizedString)("core.addApi.confirm", path.relative(inputs.projectPath, appPackageFolder));
|
|
1363
|
-
// Will be used if generating from API spec
|
|
1364
|
-
let specParser = undefined;
|
|
1365
|
-
let authNameAndSchemes = [];
|
|
1366
|
-
if (isGenerateFromApiSpec) {
|
|
1367
|
-
specParser = new m365_spec_parser_1.SpecParser(inputs[constants_3.QuestionNames.ApiSpecLocation].trim(), (0, helper_2.getParserOptions)(m365_spec_parser_1.ProjectType.Copilot, true));
|
|
1368
|
-
const listResult = await (0, daSpecParser_1.listAPIInfo)(inputs[constants_3.QuestionNames.ApiSpecLocation].trim());
|
|
1369
|
-
authNameAndSchemes = this.parseAuthNameAndScheme(listResult, inputs);
|
|
1370
|
-
if (authNameAndSchemes.length > 0) {
|
|
1371
|
-
const doesLocalYamlPathExists = await fs_extra_1.default.pathExists(path.join(inputs.projectPath, versionMetadata_1.MetadataV3.localConfigFile));
|
|
1372
|
-
confirmMessage = doesLocalYamlPathExists
|
|
1373
|
-
? (0, localizeUtils_1.getLocalizedString)("core.addApi.confirm.localTeamsYaml", path.relative(inputs.projectPath, appPackageFolder), versionMetadata_1.MetadataV4.localConfigFile, versionMetadata_1.MetadataV4.configFile)
|
|
1374
|
-
: (0, localizeUtils_1.getLocalizedString)("core.addApi.confirm.teamsYaml", path.relative(inputs.projectPath, appPackageFolder), versionMetadata_1.MetadataV4.configFile);
|
|
1375
|
-
}
|
|
1376
|
-
}
|
|
1377
|
-
// confirm
|
|
1378
|
-
const confirmRes = await context.userInteraction.showMessage("warn", confirmMessage, true, (0, localizeUtils_1.getLocalizedString)("core.addApi.continue"));
|
|
1379
|
-
if (confirmRes.isErr()) {
|
|
1380
|
-
return (0, teamsfx_api_1.err)(confirmRes.error);
|
|
1381
|
-
}
|
|
1382
|
-
else if (confirmRes.value !== (0, localizeUtils_1.getLocalizedString)("core.addApi.continue")) {
|
|
1383
|
-
return (0, teamsfx_api_1.err)(new common_2.UserCancelError());
|
|
1384
|
-
}
|
|
1385
|
-
// find the next available action id
|
|
1386
|
-
let actionId = "";
|
|
1387
|
-
let suffix = 1;
|
|
1388
|
-
actionId = `action_${suffix}`;
|
|
1389
|
-
const existingActionIds = declarativeCopilotManifest.actions?.map((action) => action.id);
|
|
1390
|
-
while (existingActionIds?.includes(actionId)) {
|
|
1391
|
-
suffix += 1;
|
|
1392
|
-
actionId = `action_${suffix}`;
|
|
1393
|
-
}
|
|
1394
|
-
let destinationPluginManifestPath;
|
|
1395
|
-
// generate files
|
|
1396
|
-
if (isGenerateFromApiSpec && specParser) {
|
|
1397
|
-
destinationPluginManifestPath =
|
|
1398
|
-
await CopilotGptManifestUtils_1.copilotGptManifestUtils.getDefaultNextAvailablePluginManifestPath(appPackageFolder, undefined);
|
|
1399
|
-
const destinationApiSpecPath = await PluginManifestUtils_1.pluginManifestUtils.getDefaultNextAvailableApiSpecPath(inputs[constants_3.QuestionNames.ApiSpecLocation].trim(), path.join(appPackageFolder, teamsfx_api_1.DefaultApiSpecFolderName));
|
|
1400
|
-
const generateRes = await (0, helper_2.generateFromApiSpec)(specParser, teamsManifestPath, inputs, context, teamsfx_api_1.Stage.addPlugin, m365_spec_parser_1.ProjectType.Copilot, {
|
|
1401
|
-
destinationApiSpecFilePath: destinationApiSpecPath,
|
|
1402
|
-
pluginManifestFilePath: destinationPluginManifestPath,
|
|
1403
|
-
}, inputs[constants_3.QuestionNames.ApiSpecLocation].trim());
|
|
1404
|
-
if (generateRes.isErr()) {
|
|
1405
|
-
return (0, teamsfx_api_1.err)(generateRes.error);
|
|
1406
|
-
}
|
|
1407
|
-
const warnings = generateRes.value.warnings;
|
|
1408
|
-
if (warnings && warnings.length > 0) {
|
|
1409
|
-
const warnSummary = await (0, helper_2.generateScaffoldingSummary)(warnings, manifestRes.value, path.relative(inputs.projectPath, destinationApiSpecPath), path.relative(inputs.projectPath, destinationPluginManifestPath), inputs.projectPath);
|
|
1410
|
-
context.logProvider.info(warnSummary + "\n");
|
|
1411
|
-
}
|
|
1412
|
-
const addActionRes = await CopilotGptManifestUtils_1.copilotGptManifestUtils.addAction(declarativeCopilotManifestPath, actionId, (0, utils_3.normalizePath)(path.relative(appPackageFolder, destinationPluginManifestPath), true));
|
|
1413
|
-
if (addActionRes.isErr()) {
|
|
1414
|
-
return (0, teamsfx_api_1.err)(addActionRes.error);
|
|
1415
|
-
}
|
|
1416
|
-
for (const authNameAndScheme of authNameAndSchemes) {
|
|
1417
|
-
await this.updateAuthActionInYaml(authNameAndScheme.authName, authNameAndScheme.authScheme, inputs.projectPath, destinationApiSpecPath, destinationPluginManifestPath);
|
|
1418
|
-
}
|
|
1419
|
-
}
|
|
1420
|
-
else {
|
|
1421
|
-
const addPluginRes = await (0, helper_1.addExistingPlugin)(declarativeCopilotManifestPath, inputs[constants_3.QuestionNames.PluginManifestFilePath].trim(), inputs[constants_3.QuestionNames.PluginOpenApiSpecFilePath].trim(), actionId, context, teamsfx_api_1.Stage.addPlugin);
|
|
1422
|
-
if (addPluginRes.isErr()) {
|
|
1423
|
-
return (0, teamsfx_api_1.err)(addPluginRes.error);
|
|
1424
|
-
}
|
|
1425
|
-
destinationPluginManifestPath = addPluginRes.value.destinationPluginManifestPath;
|
|
1426
|
-
const warningMessage = (0, common_1.outputScaffoldingWarningMessage)(addPluginRes.value.warnings);
|
|
1427
|
-
context.logProvider.info(warningMessage);
|
|
1428
|
-
}
|
|
1429
|
-
if (inputs.platform === teamsfx_api_1.Platform.VSCode) {
|
|
1430
|
-
const successMessage = (0, localizeUtils_1.getLocalizedString)("core.addPlugin.success.vsc", actionId);
|
|
1431
|
-
const viewPluginManifest = (0, localizeUtils_1.getLocalizedString)("core.addPlugin.success.viewPluginManifest");
|
|
1432
|
-
void context.userInteraction
|
|
1433
|
-
.showMessage("info", successMessage, false, viewPluginManifest)
|
|
1434
|
-
.then((userRes) => {
|
|
1435
|
-
if (userRes.isOk() && userRes.value === viewPluginManifest) {
|
|
1436
|
-
context.telemetryReporter.sendTelemetryEvent(telemetry_1.TelemetryEvent.ViewPluginManifestAfterAdded);
|
|
1437
|
-
void globalVars_1.TOOLS?.ui?.openFile?.(destinationPluginManifestPath);
|
|
1438
|
-
}
|
|
1439
|
-
});
|
|
1440
|
-
}
|
|
1441
|
-
else {
|
|
1442
|
-
const successMessage = (0, localizeUtils_1.getLocalizedString)("core.addPlugin.success", actionId, destinationPluginManifestPath);
|
|
1443
|
-
void context.userInteraction.showMessage("info", successMessage, false);
|
|
1444
|
-
}
|
|
1445
|
-
return (0, teamsfx_api_1.ok)(undefined);
|
|
1446
|
-
}
|
|
1447
1351
|
async regeneratePlugin(inputs) {
|
|
1448
1352
|
const projectPath = inputs.projectPath;
|
|
1449
1353
|
const context = (0, globalVars_1.createContext)();
|
|
1450
|
-
const teamsManifestPath = inputs[constants_3.QuestionNames.ManifestPath]
|
|
1354
|
+
const teamsManifestPath = (inputs[constants_3.QuestionNames.ManifestPath] ??
|
|
1355
|
+
inputs[constants_3.QuestionNames.TeamsAppManifestFilePath]);
|
|
1451
1356
|
const appPackageFolder = path.dirname(teamsManifestPath);
|
|
1452
1357
|
const manifestRes = await ManifestUtils_1.manifestUtils._readAppManifest(teamsManifestPath);
|
|
1453
1358
|
if (manifestRes.isErr()) {
|
|
1454
1359
|
return (0, teamsfx_api_1.err)(manifestRes.error);
|
|
1455
1360
|
}
|
|
1456
|
-
const gptManifestFilePathRes = await
|
|
1361
|
+
const gptManifestFilePathRes = await (0, exports.getManifestPath)(teamsManifestPath);
|
|
1457
1362
|
if (gptManifestFilePathRes.isErr()) {
|
|
1458
1363
|
return (0, teamsfx_api_1.err)(gptManifestFilePathRes.error);
|
|
1459
1364
|
}
|
|
@@ -1478,7 +1383,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1478
1383
|
}
|
|
1479
1384
|
const destinationPluginManifestPath = inputs[constants_3.QuestionNames.SelectPluginManifest];
|
|
1480
1385
|
const destinationApiSpecPath = inputs[constants_3.QuestionNames.SelectOpenAPISpecFromPlugin];
|
|
1481
|
-
const generateRes = await
|
|
1386
|
+
const generateRes = await openApiSpecHelper.generateFromApiSpec(undefined, teamsManifestPath, inputs, context, teamsfx_api_1.Stage.RegeneratePlugin, m365_spec_parser_1.ProjectType.Copilot, {
|
|
1482
1387
|
destinationApiSpecFilePath: destinationApiSpecPath,
|
|
1483
1388
|
pluginManifestFilePath: destinationPluginManifestPath,
|
|
1484
1389
|
}, inputs[constants_3.QuestionNames.ApiSpecLocation].trim(), true);
|
|
@@ -1487,14 +1392,14 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1487
1392
|
}
|
|
1488
1393
|
const warnings = generateRes.value.warnings;
|
|
1489
1394
|
if (warnings && warnings.length > 0) {
|
|
1490
|
-
const warnSummary = await
|
|
1395
|
+
const warnSummary = await openApiSpecHelper.generateScaffoldingSummary(warnings, manifestRes.value, path.relative(projectPath, destinationApiSpecPath), path.relative(projectPath, destinationPluginManifestPath), projectPath);
|
|
1491
1396
|
context.logProvider.info(warnSummary + "\n");
|
|
1492
1397
|
}
|
|
1493
1398
|
for (const authNameAndScheme of authNameAndSchemes) {
|
|
1494
1399
|
await this.updateAuthActionInYaml(authNameAndScheme.authName, authNameAndScheme.authScheme, projectPath, destinationApiSpecPath, destinationPluginManifestPath, false);
|
|
1495
1400
|
}
|
|
1496
1401
|
const declarativeAgentManifestPath = gptManifestFilePathRes.value;
|
|
1497
|
-
const declarativeAgentManifesRes = await
|
|
1402
|
+
const declarativeAgentManifesRes = await (0, exports.readCopilotGptManifestFile)(declarativeAgentManifestPath);
|
|
1498
1403
|
if (declarativeAgentManifesRes.isErr()) {
|
|
1499
1404
|
return (0, teamsfx_api_1.err)(declarativeAgentManifesRes.error);
|
|
1500
1405
|
}
|
|
@@ -1522,20 +1427,6 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1522
1427
|
}
|
|
1523
1428
|
return (0, teamsfx_api_1.ok)(undefined);
|
|
1524
1429
|
}
|
|
1525
|
-
/**
|
|
1526
|
-
* MetaOS Extend To DA
|
|
1527
|
-
*/
|
|
1528
|
-
async metaOSExtendToDA(inputs, workDir) {
|
|
1529
|
-
const context = (0, globalVars_1.createContext)();
|
|
1530
|
-
inputs[constants_3.QuestionNames.Scratch] = constants_3.ScratchOptions.yes().id;
|
|
1531
|
-
inputs[constants_3.QuestionNames.TemplateName] = templateNames_1.TemplateNames.DeclarativeAgentMetaOSUpgradeProject;
|
|
1532
|
-
inputs[constants_3.QuestionNames.OfficeAddinFolder] = workDir;
|
|
1533
|
-
const res = await coordinator_1.coordinator.create(context, inputs);
|
|
1534
|
-
if (res.isOk()) {
|
|
1535
|
-
inputs.projectPath = res.value.projectPath;
|
|
1536
|
-
}
|
|
1537
|
-
return res;
|
|
1538
|
-
}
|
|
1539
1430
|
/**
|
|
1540
1431
|
* Add Knowledge
|
|
1541
1432
|
*/
|
|
@@ -1558,7 +1449,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1558
1449
|
if (!agent?.file) {
|
|
1559
1450
|
return (0, teamsfx_api_1.err)(results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.TeamsAppRequiredPropertyMissingError.name, errors_1.AppStudioError.TeamsAppRequiredPropertyMissingError.message("declarativeAgents", teamsManifestPath)));
|
|
1560
1451
|
}
|
|
1561
|
-
const agentFilePathRes = await
|
|
1452
|
+
const agentFilePathRes = await (0, exports.getManifestPath)(teamsManifestPath);
|
|
1562
1453
|
if (agentFilePathRes.isErr()) {
|
|
1563
1454
|
return (0, teamsfx_api_1.err)(agentFilePathRes.error);
|
|
1564
1455
|
}
|
|
@@ -1600,6 +1491,281 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1600
1491
|
this.showAddKnowledgeSuccessMessage(context, inputs, agentManifestPath, knowledgeSource);
|
|
1601
1492
|
return (0, teamsfx_api_1.ok)(result);
|
|
1602
1493
|
}
|
|
1494
|
+
/**
|
|
1495
|
+
* Add Skill
|
|
1496
|
+
*/
|
|
1497
|
+
async addSkill(inputs) {
|
|
1498
|
+
if (!featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.AgentSkillsManifest)) {
|
|
1499
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "AgentSkillsDisabled", (0, localizeUtils_1.getLocalizedString)("core.addSkill.featureFlagDisabled")));
|
|
1500
|
+
}
|
|
1501
|
+
if (!inputs.projectPath) {
|
|
1502
|
+
throw new Error("projectPath is undefined"); // should never happen
|
|
1503
|
+
}
|
|
1504
|
+
const context = (0, globalVars_1.createContext)();
|
|
1505
|
+
const projectPath = inputs.projectPath;
|
|
1506
|
+
const teamsManifestPath = path.resolve(projectPath, inputs[constants_3.QuestionNames.ManifestPath]);
|
|
1507
|
+
const appPackageFolder = path.dirname(teamsManifestPath);
|
|
1508
|
+
// Validate the project is valid for adding a skill
|
|
1509
|
+
const manifestRes = await ManifestUtils_1.manifestUtils._readAppManifest(teamsManifestPath);
|
|
1510
|
+
if (manifestRes.isErr()) {
|
|
1511
|
+
return (0, teamsfx_api_1.err)(manifestRes.error);
|
|
1512
|
+
}
|
|
1513
|
+
const teamsManifest = manifestRes.value;
|
|
1514
|
+
const agent = teamsManifest.copilotExtensions
|
|
1515
|
+
? teamsManifest.copilotExtensions.declarativeCopilots?.[0]
|
|
1516
|
+
: teamsManifest.copilotAgents?.declarativeAgents?.[0];
|
|
1517
|
+
if (!agent?.file) {
|
|
1518
|
+
return (0, teamsfx_api_1.err)(results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.TeamsAppRequiredPropertyMissingError.name, errors_1.AppStudioError.TeamsAppRequiredPropertyMissingError.message("declarativeAgents", teamsManifestPath)));
|
|
1519
|
+
}
|
|
1520
|
+
const agentFilePathRes = await (0, exports.getManifestPath)(teamsManifestPath);
|
|
1521
|
+
if (agentFilePathRes.isErr()) {
|
|
1522
|
+
return (0, teamsfx_api_1.err)(agentFilePathRes.error);
|
|
1523
|
+
}
|
|
1524
|
+
const agentManifestPath = agentFilePathRes.value;
|
|
1525
|
+
// Confirm before modifying files (matches addPlugin pattern)
|
|
1526
|
+
const confirmMessage = (0, localizeUtils_1.getLocalizedString)("core.addSkill.confirm", path.relative(inputs.projectPath, appPackageFolder));
|
|
1527
|
+
const confirmRes = await context.userInteraction.showMessage("warn", confirmMessage, true, (0, localizeUtils_1.getLocalizedString)("core.addSkill.continue"));
|
|
1528
|
+
if (confirmRes.isErr()) {
|
|
1529
|
+
return (0, teamsfx_api_1.err)(confirmRes.error);
|
|
1530
|
+
}
|
|
1531
|
+
else if (confirmRes.value !== (0, localizeUtils_1.getLocalizedString)("core.addSkill.continue")) {
|
|
1532
|
+
return (0, teamsfx_api_1.err)(new common_2.UserCancelError());
|
|
1533
|
+
}
|
|
1534
|
+
const skillName = inputs[constants_3.QuestionNames.SkillName];
|
|
1535
|
+
const skillDescription = inputs[constants_3.QuestionNames.SkillDescription];
|
|
1536
|
+
const skillFrom = inputs[constants_3.QuestionNames.SkillFrom];
|
|
1537
|
+
const skillFromZipFile = inputs[constants_3.QuestionNames.SkillFromZipFile];
|
|
1538
|
+
let skillFolder;
|
|
1539
|
+
if (skillFrom || skillFromZipFile) {
|
|
1540
|
+
const isZipImport = skillFromZipFile || (skillFrom && skillFrom.toLowerCase().endsWith(".zip"));
|
|
1541
|
+
const sourcePath = (skillFromZipFile || skillFrom);
|
|
1542
|
+
if (isZipImport) {
|
|
1543
|
+
// Zip import mode
|
|
1544
|
+
const importRes = await this.importSkillFromZip(sourcePath, appPackageFolder, agentManifestPath);
|
|
1545
|
+
if (importRes.isErr()) {
|
|
1546
|
+
return (0, teamsfx_api_1.err)(importRes.error);
|
|
1547
|
+
}
|
|
1548
|
+
skillFolder = importRes.value;
|
|
1549
|
+
}
|
|
1550
|
+
else {
|
|
1551
|
+
// Existing skill folder mode: validate it's within appPackage
|
|
1552
|
+
const skillAbsPath = path.resolve(appPackageFolder, sourcePath);
|
|
1553
|
+
const relativePath = path.relative(appPackageFolder, skillAbsPath);
|
|
1554
|
+
if (relativePath.startsWith("..")) {
|
|
1555
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "SkillOutsideAppPackage", "The skill directory must be within the app package folder."));
|
|
1556
|
+
}
|
|
1557
|
+
// Validate folder name format
|
|
1558
|
+
const folderName = path.basename(skillAbsPath);
|
|
1559
|
+
const namePattern = /^[a-zA-Z][a-zA-Z0-9-]*$/;
|
|
1560
|
+
if (!namePattern.test(folderName)) {
|
|
1561
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "InvalidSkillFolderName", `Skill folder name "${folderName}" is invalid. It must start with a letter and contain only letters, numbers, and hyphens.`));
|
|
1562
|
+
}
|
|
1563
|
+
// Validate SKILL.md exists
|
|
1564
|
+
const skillMdPath = path.join(skillAbsPath, "SKILL.md");
|
|
1565
|
+
if (!(await fs_extra_1.default.pathExists(skillMdPath))) {
|
|
1566
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "SkillMdNotFound", `SKILL.md not found in ${skillAbsPath}. Each skill directory must contain a SKILL.md file.`));
|
|
1567
|
+
}
|
|
1568
|
+
// Validate skill name in SKILL.md matches folder name
|
|
1569
|
+
const skillMdContent = await fs_extra_1.default.readFile(skillMdPath, "utf-8");
|
|
1570
|
+
const nameMatch = skillMdContent.match(/^---[\s\S]*?^name:\s*(.+)$/m);
|
|
1571
|
+
if (nameMatch) {
|
|
1572
|
+
const skillMdName = nameMatch[1].trim();
|
|
1573
|
+
if (skillMdName !== folderName) {
|
|
1574
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "SkillNameMismatch", `Skill name "${skillMdName}" in SKILL.md does not match folder name "${folderName}". They must be the same.`));
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
skillFolder = (0, utils_2.normalizePath)(path.relative(path.dirname(agentManifestPath), skillAbsPath), true);
|
|
1578
|
+
}
|
|
1579
|
+
}
|
|
1580
|
+
else {
|
|
1581
|
+
// New skill mode: create the directory and SKILL.md
|
|
1582
|
+
const skillDir = path.join(appPackageFolder, "skills", skillName);
|
|
1583
|
+
await fs_extra_1.default.ensureDir(skillDir);
|
|
1584
|
+
const skillMdContent = [
|
|
1585
|
+
"---",
|
|
1586
|
+
`name: ${skillName}`,
|
|
1587
|
+
`description: ${skillDescription}`,
|
|
1588
|
+
"---",
|
|
1589
|
+
`# ${skillName}`,
|
|
1590
|
+
"",
|
|
1591
|
+
"<!-- Add your skill instructions here -->",
|
|
1592
|
+
"<!-- The agent will follow these instructions when this skill is activated -->",
|
|
1593
|
+
"",
|
|
1594
|
+
].join("\n");
|
|
1595
|
+
await fs_extra_1.default.writeFile(path.join(skillDir, "SKILL.md"), skillMdContent);
|
|
1596
|
+
skillFolder = (0, utils_2.normalizePath)(path.relative(path.dirname(agentManifestPath), skillDir), true);
|
|
1597
|
+
}
|
|
1598
|
+
// Add skill entry to DA manifest
|
|
1599
|
+
const addSkillRes = await CopilotGptManifestUtils_1.copilotGptManifestUtils.addSkill(agentManifestPath, skillFolder);
|
|
1600
|
+
if (addSkillRes.isErr()) {
|
|
1601
|
+
return (0, teamsfx_api_1.err)(addSkillRes.error);
|
|
1602
|
+
}
|
|
1603
|
+
// Optionally expose skill to Copilot via top-level Teams manifest agentSkills
|
|
1604
|
+
const exposeToCopilot = inputs[constants_3.QuestionNames.ExposeToCopilot];
|
|
1605
|
+
if (exposeToCopilot === true || exposeToCopilot === "yes") {
|
|
1606
|
+
// Compute folder path relative to app package folder (Teams manifest dir)
|
|
1607
|
+
const skillAbsPath = path.resolve(path.dirname(agentManifestPath), skillFolder);
|
|
1608
|
+
const teamsManifestSkillFolder = (0, utils_2.normalizePath)(path.relative(appPackageFolder, skillAbsPath), true);
|
|
1609
|
+
// Read, update, and write the Teams manifest
|
|
1610
|
+
const teamsManifestForSkill = manifestRes.value;
|
|
1611
|
+
if (!teamsManifestForSkill.agentSkills) {
|
|
1612
|
+
teamsManifestForSkill.agentSkills = [];
|
|
1613
|
+
}
|
|
1614
|
+
if (!teamsManifestForSkill.agentSkills.some((s) => s.folder === teamsManifestSkillFolder)) {
|
|
1615
|
+
teamsManifestForSkill.agentSkills.push({ folder: teamsManifestSkillFolder });
|
|
1616
|
+
}
|
|
1617
|
+
await fs_extra_1.default.writeFile(teamsManifestPath, JSON.stringify(teamsManifestForSkill, null, 4));
|
|
1618
|
+
}
|
|
1619
|
+
// Show success message
|
|
1620
|
+
if (inputs.platform === teamsfx_api_1.Platform.VSCode) {
|
|
1621
|
+
const successMessage = (0, localizeUtils_1.getLocalizedString)("core.addSkill.success.vsc");
|
|
1622
|
+
const viewAgentManifest = (0, localizeUtils_1.getLocalizedString)("core.addSkill.success.viewAgentManifest");
|
|
1623
|
+
void context.userInteraction
|
|
1624
|
+
.showMessage("info", successMessage, false, viewAgentManifest)
|
|
1625
|
+
.then((userRes) => {
|
|
1626
|
+
if (userRes.isOk() && userRes.value === viewAgentManifest) {
|
|
1627
|
+
void globalVars_1.TOOLS?.ui?.openFile?.(agentManifestPath);
|
|
1628
|
+
}
|
|
1629
|
+
});
|
|
1630
|
+
}
|
|
1631
|
+
else {
|
|
1632
|
+
const successMessage = (0, localizeUtils_1.getLocalizedString)("core.addSkill.success", agentManifestPath);
|
|
1633
|
+
void context.userInteraction.showMessage("info", successMessage, false);
|
|
1634
|
+
}
|
|
1635
|
+
return (0, teamsfx_api_1.ok)(undefined);
|
|
1636
|
+
}
|
|
1637
|
+
/**
|
|
1638
|
+
* Import a skill from a .zip file into the appPackage/skills folder.
|
|
1639
|
+
* Validates zip entries for security, extracts to a temp directory, then moves atomically.
|
|
1640
|
+
*/
|
|
1641
|
+
async importSkillFromZip(zipPath, appPackageFolder, agentManifestPath) {
|
|
1642
|
+
// Resolve zip path relative to CWD (not appPackage)
|
|
1643
|
+
const resolvedZipPath = path.resolve(zipPath);
|
|
1644
|
+
if (!(await fs_extra_1.default.pathExists(resolvedZipPath))) {
|
|
1645
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "ZipFileNotFound", `Zip file not found: ${resolvedZipPath}`));
|
|
1646
|
+
}
|
|
1647
|
+
let zip;
|
|
1648
|
+
try {
|
|
1649
|
+
zip = new adm_zip_1.default(resolvedZipPath);
|
|
1650
|
+
}
|
|
1651
|
+
catch {
|
|
1652
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "InvalidZipFile", `Failed to read zip file: ${resolvedZipPath}. Please provide a valid .zip file.`));
|
|
1653
|
+
}
|
|
1654
|
+
const entries = zip.getEntries();
|
|
1655
|
+
// Metadata directories to ignore
|
|
1656
|
+
const ignoredPrefixes = ["__MACOSX/", ".DS_Store"];
|
|
1657
|
+
// Security: validate all entries before extraction
|
|
1658
|
+
for (const entry of entries) {
|
|
1659
|
+
const entryName = entry.entryName.replace(/\\/g, "/");
|
|
1660
|
+
if (entryName.includes("..") || path.isAbsolute(entryName) || entryName.startsWith("/")) {
|
|
1661
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "ZipInvalidEntries", (0, localizeUtils_1.getLocalizedString)("core.addSkill.zipInvalidEntries")));
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
// Filter out metadata entries
|
|
1665
|
+
const validEntries = entries.filter((entry) => {
|
|
1666
|
+
const entryName = entry.entryName.replace(/\\/g, "/");
|
|
1667
|
+
return !ignoredPrefixes.some((prefix) => entryName.startsWith(prefix) || entryName === prefix.replace("/", ""));
|
|
1668
|
+
});
|
|
1669
|
+
// Determine zip layout: single top-level directory or root-level files
|
|
1670
|
+
const topLevelDirs = new Set();
|
|
1671
|
+
let hasRootFiles = false;
|
|
1672
|
+
for (const entry of validEntries) {
|
|
1673
|
+
const entryName = entry.entryName.replace(/\\/g, "/");
|
|
1674
|
+
const parts = entryName.split("/").filter((p) => p.length > 0);
|
|
1675
|
+
if (parts.length === 1 && !entry.isDirectory) {
|
|
1676
|
+
hasRootFiles = true;
|
|
1677
|
+
}
|
|
1678
|
+
else if (parts.length >= 1) {
|
|
1679
|
+
topLevelDirs.add(parts[0]);
|
|
1680
|
+
}
|
|
1681
|
+
}
|
|
1682
|
+
let skillContentPrefix = "";
|
|
1683
|
+
let derivedSkillName;
|
|
1684
|
+
if (!hasRootFiles && topLevelDirs.size === 1) {
|
|
1685
|
+
// Single top-level directory layout
|
|
1686
|
+
skillContentPrefix = [...topLevelDirs][0] + "/";
|
|
1687
|
+
derivedSkillName = [...topLevelDirs][0];
|
|
1688
|
+
}
|
|
1689
|
+
else if (hasRootFiles) {
|
|
1690
|
+
// Root-level files layout: derive name from SKILL.md frontmatter
|
|
1691
|
+
const skillMdEntry = validEntries.find((e) => {
|
|
1692
|
+
const name = e.entryName.replace(/\\/g, "/");
|
|
1693
|
+
return name === "SKILL.md" || name === "./SKILL.md";
|
|
1694
|
+
});
|
|
1695
|
+
if (!skillMdEntry) {
|
|
1696
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "ZipNoSkillMd", (0, localizeUtils_1.getLocalizedString)("core.addSkill.zipNoSkillMd")));
|
|
1697
|
+
}
|
|
1698
|
+
const skillMdContent = skillMdEntry.getData().toString("utf-8");
|
|
1699
|
+
const nameMatch = skillMdContent.match(/^---[\s\S]*?^name:\s*(.+)$/m);
|
|
1700
|
+
if (!nameMatch) {
|
|
1701
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "ZipNoSkillMd", (0, localizeUtils_1.getLocalizedString)("core.addSkill.zipNoSkillMd") +
|
|
1702
|
+
" The SKILL.md file must include a 'name' field in its frontmatter."));
|
|
1703
|
+
}
|
|
1704
|
+
derivedSkillName = nameMatch[1].trim();
|
|
1705
|
+
}
|
|
1706
|
+
else {
|
|
1707
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "ZipInvalidLayout", (0, localizeUtils_1.getLocalizedString)("core.addSkill.zipInvalidLayout")));
|
|
1708
|
+
}
|
|
1709
|
+
// Validate skill name format
|
|
1710
|
+
const namePattern = /^[a-zA-Z][a-zA-Z0-9-]*$/;
|
|
1711
|
+
if (!namePattern.test(derivedSkillName)) {
|
|
1712
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "InvalidSkillFolderName", `Skill name "${derivedSkillName}" is invalid. It must start with a letter and contain only letters, numbers, and hyphens.`));
|
|
1713
|
+
}
|
|
1714
|
+
// Check target folder doesn't already exist
|
|
1715
|
+
const targetSkillDir = path.join(appPackageFolder, "skills", derivedSkillName);
|
|
1716
|
+
if (await fs_extra_1.default.pathExists(targetSkillDir)) {
|
|
1717
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "SkillFolderAlreadyExists", (0, localizeUtils_1.getLocalizedString)("core.addSkill.zipSkillFolderExists", derivedSkillName)));
|
|
1718
|
+
}
|
|
1719
|
+
// Extract to temp directory first, then move atomically
|
|
1720
|
+
const tempDir = await fs_extra_1.default.mkdtemp(path.join(os.tmpdir(), "atk-skill-import-"));
|
|
1721
|
+
const tempSkillDir = path.join(tempDir, derivedSkillName);
|
|
1722
|
+
try {
|
|
1723
|
+
await fs_extra_1.default.ensureDir(tempSkillDir);
|
|
1724
|
+
// Extract relevant entries
|
|
1725
|
+
for (const entry of validEntries) {
|
|
1726
|
+
if (entry.isDirectory)
|
|
1727
|
+
continue;
|
|
1728
|
+
const entryName = entry.entryName.replace(/\\/g, "/");
|
|
1729
|
+
let relativeName = entryName;
|
|
1730
|
+
if (skillContentPrefix && entryName.startsWith(skillContentPrefix)) {
|
|
1731
|
+
relativeName = entryName.slice(skillContentPrefix.length);
|
|
1732
|
+
}
|
|
1733
|
+
if (!relativeName)
|
|
1734
|
+
continue;
|
|
1735
|
+
const targetPath = path.join(tempSkillDir, relativeName);
|
|
1736
|
+
// Re-validate no path traversal after joining
|
|
1737
|
+
const normalizedTarget = path.resolve(targetPath);
|
|
1738
|
+
if (!normalizedTarget.startsWith(path.resolve(tempSkillDir))) {
|
|
1739
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "ZipInvalidEntries", (0, localizeUtils_1.getLocalizedString)("core.addSkill.zipInvalidEntries")));
|
|
1740
|
+
}
|
|
1741
|
+
await fs_extra_1.default.ensureDir(path.dirname(targetPath));
|
|
1742
|
+
await fs_extra_1.default.writeFile(targetPath, entry.getData());
|
|
1743
|
+
}
|
|
1744
|
+
// Validate SKILL.md exists in extracted content
|
|
1745
|
+
const extractedSkillMdPath = path.join(tempSkillDir, "SKILL.md");
|
|
1746
|
+
if (!(await fs_extra_1.default.pathExists(extractedSkillMdPath))) {
|
|
1747
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "ZipNoSkillMd", (0, localizeUtils_1.getLocalizedString)("core.addSkill.zipNoSkillMd")));
|
|
1748
|
+
}
|
|
1749
|
+
// Validate name in SKILL.md matches derived folder name
|
|
1750
|
+
const extractedSkillMd = await fs_extra_1.default.readFile(extractedSkillMdPath, "utf-8");
|
|
1751
|
+
const extractedNameMatch = extractedSkillMd.match(/^---[\s\S]*?^name:\s*(.+)$/m);
|
|
1752
|
+
if (extractedNameMatch) {
|
|
1753
|
+
const extractedName = extractedNameMatch[1].trim();
|
|
1754
|
+
if (extractedName !== derivedSkillName) {
|
|
1755
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "SkillNameMismatch", `Skill name "${extractedName}" in SKILL.md does not match folder name "${derivedSkillName}". They must be the same.`));
|
|
1756
|
+
}
|
|
1757
|
+
}
|
|
1758
|
+
// Move to final location
|
|
1759
|
+
await fs_extra_1.default.ensureDir(path.dirname(targetSkillDir));
|
|
1760
|
+
await fs_extra_1.default.move(tempSkillDir, targetSkillDir);
|
|
1761
|
+
}
|
|
1762
|
+
finally {
|
|
1763
|
+
// Clean up temp directory
|
|
1764
|
+
await fs_extra_1.default.remove(tempDir).catch(() => { });
|
|
1765
|
+
}
|
|
1766
|
+
const skillFolder = (0, utils_2.normalizePath)(path.relative(path.dirname(agentManifestPath), targetSkillDir), true);
|
|
1767
|
+
return (0, teamsfx_api_1.ok)(skillFolder);
|
|
1768
|
+
}
|
|
1603
1769
|
/**
|
|
1604
1770
|
* only for vs code extension
|
|
1605
1771
|
*/
|
|
@@ -1634,12 +1800,12 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1634
1800
|
if (!declarativeGpt?.file) {
|
|
1635
1801
|
return (0, teamsfx_api_1.err)(results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.TeamsAppRequiredPropertyMissingError.name, errors_1.AppStudioError.TeamsAppRequiredPropertyMissingError.message("declarativeCopilots", teamsManifestPath)));
|
|
1636
1802
|
}
|
|
1637
|
-
const gptManifestFilePathRes = await
|
|
1803
|
+
const gptManifestFilePathRes = await (0, exports.getManifestPath)(teamsManifestPath);
|
|
1638
1804
|
if (gptManifestFilePathRes.isErr()) {
|
|
1639
1805
|
return (0, teamsfx_api_1.err)(gptManifestFilePathRes.error);
|
|
1640
1806
|
}
|
|
1641
1807
|
const declarativeCopilotManifestPath = gptManifestFilePathRes.value;
|
|
1642
|
-
const declarativeCopilotManifesRes = await
|
|
1808
|
+
const declarativeCopilotManifesRes = await (0, exports.readCopilotGptManifestFile)(declarativeCopilotManifestPath);
|
|
1643
1809
|
if (declarativeCopilotManifesRes.isErr()) {
|
|
1644
1810
|
return (0, teamsfx_api_1.err)(declarativeCopilotManifesRes.error);
|
|
1645
1811
|
}
|
|
@@ -1662,7 +1828,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1662
1828
|
suffix += 1;
|
|
1663
1829
|
actionId = `action_${suffix}`;
|
|
1664
1830
|
}
|
|
1665
|
-
const addActionRes = await CopilotGptManifestUtils_1.copilotGptManifestUtils.addAction(declarativeCopilotManifestPath, actionId, (0,
|
|
1831
|
+
const addActionRes = await CopilotGptManifestUtils_1.copilotGptManifestUtils.addAction(declarativeCopilotManifestPath, actionId, (0, utils_2.normalizePath)(path.relative(appPackageFolder, pluginManifestFilePath), true));
|
|
1666
1832
|
if (addActionRes.isErr()) {
|
|
1667
1833
|
return (0, teamsfx_api_1.err)(addActionRes.error);
|
|
1668
1834
|
}
|
|
@@ -1673,10 +1839,10 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1673
1839
|
// 2. Update teamsapp.local.yaml and teamsapp.yaml if need to add auth action
|
|
1674
1840
|
const specPath = inputs[constants_3.QuestionNames.ApiSpecLocation].trim();
|
|
1675
1841
|
for (const authInfo of authData) {
|
|
1676
|
-
await
|
|
1842
|
+
await openApiSpecHelper.injectAuthAction(inputs.projectPath, authInfo.authName, undefined, specPath, false, authInfo.authType === "apiKey" ? "ApiKeyPluginVault" : "OAuthPluginVault", false, authInfo.registrationId);
|
|
1677
1843
|
}
|
|
1678
1844
|
// 3. Update plugin manifest to add ac info (optional)
|
|
1679
|
-
await (0,
|
|
1845
|
+
await (0, helper_1.generateAdaptiveCardInPluginManifestForKiota)(pluginManifestFilePath, specPath, context);
|
|
1680
1846
|
for (const action of declarativeCopilotManifest.actions) {
|
|
1681
1847
|
const actionPath = path.normalize(path.join(appPackageFolder, action.file));
|
|
1682
1848
|
await CopilotGptManifestUtils_1.copilotGptManifestUtils.updateConversationStarters(actionPath, declarativeCopilotManifest);
|
|
@@ -1736,7 +1902,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1736
1902
|
};
|
|
1737
1903
|
}
|
|
1738
1904
|
// Update openapi spec
|
|
1739
|
-
const specParser = new m365_spec_parser_1.SpecParser(apiSpecPath, (0,
|
|
1905
|
+
const specParser = new m365_spec_parser_1.SpecParser(apiSpecPath, (0, helper_1.getParserOptions)(m365_spec_parser_1.ProjectType.Copilot, true));
|
|
1740
1906
|
await specParser.addAuthScheme(authName, authType, authParameters);
|
|
1741
1907
|
let authTypeScheme;
|
|
1742
1908
|
switch (authType) {
|
|
@@ -1752,7 +1918,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1752
1918
|
authTypeScheme = constant_1.MicrosoftEntraAuthType;
|
|
1753
1919
|
break;
|
|
1754
1920
|
}
|
|
1755
|
-
const addAuthActionRes = await
|
|
1921
|
+
const addAuthActionRes = await openApiSpecHelper.injectAuthAction(inputs.projectPath, authName, undefined, apiSpecPath, true, authTypeScheme, "enablePKCE" in authParameters ? authParameters.enablePKCE : undefined);
|
|
1756
1922
|
if (addAuthActionRes?.registrationIdEnvName) {
|
|
1757
1923
|
const pluginManifest = (await fs_extra_1.default.readJson(pluginManifestPath));
|
|
1758
1924
|
pluginManifest.runtimes?.forEach((runtime) => {
|
|
@@ -1789,13 +1955,13 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1789
1955
|
[telemetry_1.TelemetryProperty.AddAuthType]: authType,
|
|
1790
1956
|
});
|
|
1791
1957
|
}
|
|
1792
|
-
catch (
|
|
1793
|
-
const error = (0, common_2.assembleError)(
|
|
1958
|
+
catch (e) {
|
|
1959
|
+
const error = (0, common_2.assembleError)(e);
|
|
1794
1960
|
context.telemetryReporter.sendTelemetryErrorEvent(telemetry_1.TelemetryEvent.AddAuthAction, {
|
|
1795
1961
|
[telemetry_1.TelemetryProperty.ErrorCode]: error.name,
|
|
1796
1962
|
[telemetry_1.TelemetryProperty.ErrorMessage]: error.message,
|
|
1797
1963
|
});
|
|
1798
|
-
return err(error);
|
|
1964
|
+
return (0, teamsfx_api_1.err)(error);
|
|
1799
1965
|
}
|
|
1800
1966
|
return (0, teamsfx_api_1.ok)(undefined);
|
|
1801
1967
|
}
|
|
@@ -1832,7 +1998,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1832
1998
|
}
|
|
1833
1999
|
async installAppToChannel(inputs) {
|
|
1834
2000
|
const installAppDriver = typedi_1.Container.get("devChannel/installApp");
|
|
1835
|
-
const context = (0,
|
|
2001
|
+
const context = (0, utils_3.createDriverContext)(inputs);
|
|
1836
2002
|
(0, globalVars_1.setErrorContext)({ component: "devChannelInstallApp" });
|
|
1837
2003
|
const env = inputs.env;
|
|
1838
2004
|
const readEnvRes = await envUtil_1.envUtil.readEnv(context.projectPath, env, false, false);
|
|
@@ -1855,29 +2021,48 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1855
2021
|
* dynamic template metadata download
|
|
1856
2022
|
*/
|
|
1857
2023
|
async fetchOnlineTemplateMetadata() {
|
|
1858
|
-
if (
|
|
2024
|
+
if (templateHelper.useLocalTemplate()) {
|
|
1859
2025
|
return (0, teamsfx_api_1.ok)(undefined); // Skip if using local templates
|
|
1860
2026
|
}
|
|
1861
2027
|
// Downloads the latest online template metadata (metadata.zip) into user's home .fx folder.
|
|
1862
2028
|
// Caches the template version so subsequent calls avoid redundant downloads if unchanged.
|
|
1863
2029
|
try {
|
|
1864
|
-
|
|
1865
|
-
const coreVersion = require("../../package.json").version;
|
|
1866
|
-
let latestVersion = "0.0.0-rc";
|
|
1867
|
-
if (coreVersion.includes("alpha") ||
|
|
1868
|
-
coreVersion.includes("beta") ||
|
|
1869
|
-
coreVersion.includes("rc")) {
|
|
1870
|
-
// daily build, prerelease or rc
|
|
1871
|
-
latestVersion = "0.0.0-rc";
|
|
1872
|
-
}
|
|
1873
|
-
else {
|
|
1874
|
-
// stable version
|
|
1875
|
-
latestVersion = await (0, utils_5.getTemplateLatestVersion)();
|
|
1876
|
-
}
|
|
2030
|
+
const useV4Channel = featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.V4Enabled);
|
|
1877
2031
|
const homedir = os.homedir();
|
|
1878
2032
|
const metadataDir = path.join(homedir, `.${String(teamsfx_api_1.ConfigFolderName)}`);
|
|
1879
2033
|
await fs_extra_1.default.ensureDir(metadataDir);
|
|
1880
|
-
|
|
2034
|
+
let latestVersion;
|
|
2035
|
+
if (useV4Channel) {
|
|
2036
|
+
// V4 publishes templates-metadata.zip as a staged artifact. Resolve it
|
|
2037
|
+
// through the shared artifact cache and leave the legacy ~/.fx metadata
|
|
2038
|
+
// directory untouched so old metadata readers keep using bundled v4 data.
|
|
2039
|
+
const resolved = await (0, v4MetadataSource_1.resolveV4MetadataSource)();
|
|
2040
|
+
if (resolved.isErr()) {
|
|
2041
|
+
// Malformed tag list / digest mismatch are hard errors (no silent
|
|
2042
|
+
// fallback). An unreachable channel does not reach here — it already
|
|
2043
|
+
// resolved to a bundled-fallback origin handled below.
|
|
2044
|
+
return (0, teamsfx_api_1.err)(resolved.error);
|
|
2045
|
+
}
|
|
2046
|
+
return (0, teamsfx_api_1.ok)(undefined);
|
|
2047
|
+
}
|
|
2048
|
+
else {
|
|
2049
|
+
// v3: prerelease builds use the mutable rolling `0.0.0-rc` tag; stable
|
|
2050
|
+
// builds resolve the latest published templates version.
|
|
2051
|
+
const coreVersion = getCoreVersion();
|
|
2052
|
+
if (coreVersion.includes("alpha") ||
|
|
2053
|
+
coreVersion.includes("beta") ||
|
|
2054
|
+
coreVersion.includes("rc")) {
|
|
2055
|
+
latestVersion = "0.0.0-rc";
|
|
2056
|
+
}
|
|
2057
|
+
else {
|
|
2058
|
+
latestVersion = await generatorUtils.getTemplateLatestVersion();
|
|
2059
|
+
}
|
|
2060
|
+
}
|
|
2061
|
+
// Use a channel-specific cache file so flipping the flag triggers a fresh
|
|
2062
|
+
// download instead of a stale v3 cache hit; the v4 file's presence is also
|
|
2063
|
+
// the readers' signal (`useBundledMetadataForV4`) that downloaded v4
|
|
2064
|
+
// metadata is available.
|
|
2065
|
+
const versionFile = path.join(metadataDir, useV4Channel ? "template-version-v4.txt" : "template-version.txt");
|
|
1881
2066
|
const needDownload = async () => {
|
|
1882
2067
|
// Always re-download for mutable pre-release tags (content changes but tag stays the same)
|
|
1883
2068
|
if (latestVersion === "0.0.0-rc")
|
|
@@ -1895,11 +2080,12 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1895
2080
|
if (!(await needDownload())) {
|
|
1896
2081
|
return (0, teamsfx_api_1.ok)(undefined); // Already up-to-date
|
|
1897
2082
|
}
|
|
1898
|
-
// Construct metadata.zip download URL based on tag prefix and version
|
|
1899
|
-
const
|
|
2083
|
+
// Construct metadata.zip download URL based on tag prefix and version.
|
|
2084
|
+
const tagPrefix = useV4Channel ? templates_config_json_1.default.v4tagPrefix : templates_config_json_1.default.tagPrefix;
|
|
2085
|
+
const tag = `${tagPrefix}${latestVersion}`;
|
|
1900
2086
|
const metadataZipUrl = `${templates_config_json_1.default.templateDownloadBaseURL}/${tag}/metadata.zip`;
|
|
1901
|
-
const zip = await
|
|
1902
|
-
await
|
|
2087
|
+
const zip = await generatorUtils.fetchZipFromUrl(metadataZipUrl);
|
|
2088
|
+
await generatorUtils.unzip(zip, metadataDir);
|
|
1903
2089
|
await fs_extra_1.default.writeFile(versionFile, latestVersion, { encoding: "utf-8" });
|
|
1904
2090
|
// Clear locale cache so freshly downloaded NLS files are picked up
|
|
1905
2091
|
(0, localizeUtils_1.clearLocaleCache)();
|
|
@@ -1915,16 +2101,16 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1915
2101
|
* dynamic VS template metadata download
|
|
1916
2102
|
*/
|
|
1917
2103
|
async fetchOnlineTemplateMetadataForVS() {
|
|
1918
|
-
if (
|
|
2104
|
+
if (templateHelper.useLocalTemplate()) {
|
|
1919
2105
|
return (0, teamsfx_api_1.ok)(undefined); // Skip if using local templates
|
|
1920
2106
|
}
|
|
1921
2107
|
try {
|
|
1922
2108
|
// VS ships stable templates with a stable fx-core and test/pre-release
|
|
1923
2109
|
// templates with a beta fx-core. So beta = pre-stable test build → RC.
|
|
1924
|
-
const coreVersion =
|
|
2110
|
+
const coreVersion = getCoreVersion();
|
|
1925
2111
|
const latestVersion = coreVersion.includes("beta")
|
|
1926
2112
|
? "0.0.0-rc"
|
|
1927
|
-
: await
|
|
2113
|
+
: await generatorUtils.getTemplateVSLatestVersion();
|
|
1928
2114
|
const homedir = os.homedir();
|
|
1929
2115
|
const metadataDir = path.join(homedir, `.${String(teamsfx_api_1.ConfigFolderName)}`, "vs-metadata");
|
|
1930
2116
|
await fs_extra_1.default.ensureDir(metadataDir);
|
|
@@ -1945,8 +2131,8 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1945
2131
|
}
|
|
1946
2132
|
const tag = `${templates_config_json_1.default.vstagPrefix}${latestVersion}`;
|
|
1947
2133
|
const metadataZipUrl = `${templates_config_json_1.default.templateDownloadBaseURL}/${tag}/metadata.zip`;
|
|
1948
|
-
const zip = await
|
|
1949
|
-
await
|
|
2134
|
+
const zip = await generatorUtils.fetchZipFromUrl(metadataZipUrl);
|
|
2135
|
+
await generatorUtils.unzip(zip, metadataDir);
|
|
1950
2136
|
await fs_extra_1.default.writeFile(versionFile, latestVersion, { encoding: "utf-8" });
|
|
1951
2137
|
return (0, teamsfx_api_1.ok)(undefined);
|
|
1952
2138
|
}
|
|
@@ -1964,7 +2150,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1964
2150
|
}
|
|
1965
2151
|
async updateAuthActionInYaml(authName, authScheme, projectPath, apSpecPath, pluginManifestPath, forceToAddNew = true) {
|
|
1966
2152
|
if (authName && authScheme) {
|
|
1967
|
-
const authInjectRes = await
|
|
2153
|
+
const authInjectRes = await openApiSpecHelper.injectAuthAction(projectPath, authName, authScheme, apSpecPath, forceToAddNew);
|
|
1968
2154
|
if (authInjectRes?.defaultRegistrationIdEnvName &&
|
|
1969
2155
|
authInjectRes?.registrationIdEnvName &&
|
|
1970
2156
|
authInjectRes.defaultRegistrationIdEnvName !== authInjectRes.registrationIdEnvName) {
|
|
@@ -2013,7 +2199,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
2013
2199
|
return (0, teamsfx_api_1.ok)((0, projectTypeChecker_1.IsDeclarativeAgentManifest)(manifestRes.value));
|
|
2014
2200
|
}
|
|
2015
2201
|
async addOneDriveSharePointKnowledge(inputs, agentManifestPath) {
|
|
2016
|
-
const manifestRes = await
|
|
2202
|
+
const manifestRes = await (0, exports.readCopilotGptManifestFile)(agentManifestPath);
|
|
2017
2203
|
if (manifestRes.isErr()) {
|
|
2018
2204
|
return (0, teamsfx_api_1.err)(manifestRes.error);
|
|
2019
2205
|
}
|
|
@@ -2041,7 +2227,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
2041
2227
|
return (0, teamsfx_api_1.ok)(undefined);
|
|
2042
2228
|
}
|
|
2043
2229
|
async addWebSearchKnowledge(context, inputs, agentManifestPath) {
|
|
2044
|
-
const manifestRes = await
|
|
2230
|
+
const manifestRes = await (0, exports.readCopilotGptManifestFile)(agentManifestPath);
|
|
2045
2231
|
if (manifestRes.isErr()) {
|
|
2046
2232
|
return (0, teamsfx_api_1.err)(manifestRes.error);
|
|
2047
2233
|
}
|
|
@@ -2058,7 +2244,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
2058
2244
|
return (0, teamsfx_api_1.ok)(undefined);
|
|
2059
2245
|
}
|
|
2060
2246
|
async addGCKnowledge(inputs, agentManifestPath) {
|
|
2061
|
-
const manifestRes = await
|
|
2247
|
+
const manifestRes = await (0, exports.readCopilotGptManifestFile)(agentManifestPath);
|
|
2062
2248
|
if (manifestRes.isErr()) {
|
|
2063
2249
|
return (0, teamsfx_api_1.err)(manifestRes.error);
|
|
2064
2250
|
}
|
|
@@ -2115,6 +2301,15 @@ tslib_1.__decorate([
|
|
|
2115
2301
|
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
2116
2302
|
tslib_1.__metadata("design:returntype", Promise)
|
|
2117
2303
|
], FxCore.prototype, "createProject", null);
|
|
2304
|
+
tslib_1.__decorate([
|
|
2305
|
+
(0, hooks_1.hooks)([
|
|
2306
|
+
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "createProjectFrontDoor", reset: true }),
|
|
2307
|
+
errorHandler_1.ErrorHandlerMW,
|
|
2308
|
+
]),
|
|
2309
|
+
tslib_1.__metadata("design:type", Function),
|
|
2310
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
2311
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
2312
|
+
], FxCore.prototype, "createProjectFrontDoor", null);
|
|
2118
2313
|
tslib_1.__decorate([
|
|
2119
2314
|
(0, hooks_1.hooks)([
|
|
2120
2315
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "createProjectFromTdp", reset: true }),
|
|
@@ -2152,7 +2347,6 @@ tslib_1.__decorate([
|
|
|
2152
2347
|
(0, hooks_1.hooks)([
|
|
2153
2348
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "provision", reset: true }),
|
|
2154
2349
|
errorHandler_1.ErrorHandlerMW,
|
|
2155
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2156
2350
|
(0, envMW_1.EnvLoaderMW)(false),
|
|
2157
2351
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
2158
2352
|
contextInjector_1.ContextInjectorMW,
|
|
@@ -2166,7 +2360,6 @@ tslib_1.__decorate([
|
|
|
2166
2360
|
(0, hooks_1.hooks)([
|
|
2167
2361
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "uninstall", reset: true }),
|
|
2168
2362
|
errorHandler_1.ErrorHandlerMW,
|
|
2169
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2170
2363
|
(0, questionMW_1.QuestionMW)("uninstall"),
|
|
2171
2364
|
]),
|
|
2172
2365
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -2235,7 +2428,6 @@ tslib_1.__decorate([
|
|
|
2235
2428
|
(0, hooks_1.hooks)([
|
|
2236
2429
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "deploy", reset: true }),
|
|
2237
2430
|
errorHandler_1.ErrorHandlerMW,
|
|
2238
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2239
2431
|
(0, envMW_1.EnvLoaderMW)(false),
|
|
2240
2432
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
2241
2433
|
contextInjector_1.ContextInjectorMW,
|
|
@@ -2255,7 +2447,6 @@ tslib_1.__decorate([
|
|
|
2255
2447
|
(0, hooks_1.hooks)([
|
|
2256
2448
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "deployAadManifest", reset: true }),
|
|
2257
2449
|
errorHandler_1.ErrorHandlerMW,
|
|
2258
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2259
2450
|
(0, questionMW_1.QuestionMW)("deployAadManifest"),
|
|
2260
2451
|
(0, envMW_1.EnvLoaderMW)(true, true),
|
|
2261
2452
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
@@ -2270,7 +2461,6 @@ tslib_1.__decorate([
|
|
|
2270
2461
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "addWebpart", reset: true }),
|
|
2271
2462
|
errorHandler_1.ErrorHandlerMW,
|
|
2272
2463
|
(0, questionMW_1.QuestionMW)("addWebpart"),
|
|
2273
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2274
2464
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
2275
2465
|
]),
|
|
2276
2466
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -2281,7 +2471,6 @@ tslib_1.__decorate([
|
|
|
2281
2471
|
(0, hooks_1.hooks)([
|
|
2282
2472
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "publish", reset: true }),
|
|
2283
2473
|
errorHandler_1.ErrorHandlerMW,
|
|
2284
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2285
2474
|
(0, envMW_1.EnvLoaderMW)(false),
|
|
2286
2475
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
2287
2476
|
contextInjector_1.ContextInjectorMW,
|
|
@@ -2296,7 +2485,6 @@ tslib_1.__decorate([
|
|
|
2296
2485
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "share", reset: true }),
|
|
2297
2486
|
errorHandler_1.ErrorHandlerMW,
|
|
2298
2487
|
(0, questionMW_1.QuestionMW)("removeSharedAccess"),
|
|
2299
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2300
2488
|
(0, envMW_1.EnvLoaderMW)(false),
|
|
2301
2489
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
2302
2490
|
contextInjector_1.ContextInjectorMW,
|
|
@@ -2310,7 +2498,6 @@ tslib_1.__decorate([
|
|
|
2310
2498
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "share", reset: true }),
|
|
2311
2499
|
errorHandler_1.ErrorHandlerMW,
|
|
2312
2500
|
(0, questionMW_1.QuestionMW)("share"),
|
|
2313
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2314
2501
|
(0, envMW_1.EnvLoaderMW)(false),
|
|
2315
2502
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
2316
2503
|
contextInjector_1.ContextInjectorMW,
|
|
@@ -2324,7 +2511,6 @@ tslib_1.__decorate([
|
|
|
2324
2511
|
(0, hooks_1.hooks)([
|
|
2325
2512
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "executeUserTask", reset: true }),
|
|
2326
2513
|
errorHandler_1.ErrorHandlerMW,
|
|
2327
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2328
2514
|
(0, envMW_1.EnvLoaderMW)(false),
|
|
2329
2515
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
2330
2516
|
]),
|
|
@@ -2336,7 +2522,6 @@ tslib_1.__decorate([
|
|
|
2336
2522
|
(0, hooks_1.hooks)([
|
|
2337
2523
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "buildAadManifest", reset: true }),
|
|
2338
2524
|
errorHandler_1.ErrorHandlerMW,
|
|
2339
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2340
2525
|
(0, envMW_1.EnvLoaderMW)(false),
|
|
2341
2526
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
2342
2527
|
]),
|
|
@@ -2358,7 +2543,6 @@ tslib_1.__decorate([
|
|
|
2358
2543
|
(0, hooks_1.hooks)([
|
|
2359
2544
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "deployTeamsManifest", reset: true }),
|
|
2360
2545
|
errorHandler_1.ErrorHandlerMW,
|
|
2361
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2362
2546
|
(0, questionMW_1.QuestionMW)("selectTeamsAppManifest"),
|
|
2363
2547
|
(0, envMW_1.EnvLoaderMW)(true),
|
|
2364
2548
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
@@ -2523,7 +2707,6 @@ tslib_1.__decorate([
|
|
|
2523
2707
|
(0, hooks_1.hooks)([
|
|
2524
2708
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "grantPermission", reset: true }),
|
|
2525
2709
|
errorHandler_1.ErrorHandlerMW,
|
|
2526
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2527
2710
|
(0, questionMW_1.QuestionMW)("grantPermission"),
|
|
2528
2711
|
(0, envMW_1.EnvLoaderMW)(false, true),
|
|
2529
2712
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
@@ -2537,7 +2720,6 @@ tslib_1.__decorate([
|
|
|
2537
2720
|
(0, hooks_1.hooks)([
|
|
2538
2721
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "checkPermission", reset: true }),
|
|
2539
2722
|
errorHandler_1.ErrorHandlerMW,
|
|
2540
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2541
2723
|
(0, questionMW_1.QuestionMW)("listCollaborator"),
|
|
2542
2724
|
(0, envMW_1.EnvLoaderMW)(false, true),
|
|
2543
2725
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
@@ -2551,7 +2733,6 @@ tslib_1.__decorate([
|
|
|
2551
2733
|
(0, hooks_1.hooks)([
|
|
2552
2734
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "listCollaborator", reset: true }),
|
|
2553
2735
|
errorHandler_1.ErrorHandlerMW,
|
|
2554
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2555
2736
|
(0, questionMW_1.QuestionMW)("listCollaborator"),
|
|
2556
2737
|
(0, envMW_1.EnvLoaderMW)(false, true),
|
|
2557
2738
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
@@ -2600,18 +2781,6 @@ tslib_1.__decorate([
|
|
|
2600
2781
|
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
2601
2782
|
tslib_1.__metadata("design:returntype", Promise)
|
|
2602
2783
|
], FxCore.prototype, "createEnv", null);
|
|
2603
|
-
tslib_1.__decorate([
|
|
2604
|
-
(0, hooks_1.hooks)([(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "phantomMigrationV3", reset: true })]),
|
|
2605
|
-
tslib_1.__metadata("design:type", Function),
|
|
2606
|
-
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
2607
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
2608
|
-
], FxCore.prototype, "phantomMigrationV3", null);
|
|
2609
|
-
tslib_1.__decorate([
|
|
2610
|
-
(0, hooks_1.hooks)([errorHandler_1.ErrorHandlerMW, projectMigratorV3_1.ProjectMigratorMWV3]),
|
|
2611
|
-
tslib_1.__metadata("design:type", Function),
|
|
2612
|
-
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
2613
|
-
tslib_1.__metadata("design:returntype", Object)
|
|
2614
|
-
], FxCore.prototype, "innerMigrationV3", null);
|
|
2615
2784
|
tslib_1.__decorate([
|
|
2616
2785
|
(0, hooks_1.hooks)([
|
|
2617
2786
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "projectVersionCheck", reset: true }),
|
|
@@ -2625,7 +2794,6 @@ tslib_1.__decorate([
|
|
|
2625
2794
|
(0, hooks_1.hooks)([
|
|
2626
2795
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "preProvisionForVS" }),
|
|
2627
2796
|
errorHandler_1.ErrorHandlerMW,
|
|
2628
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2629
2797
|
(0, envMW_1.EnvLoaderMW)(false),
|
|
2630
2798
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
2631
2799
|
contextInjector_1.ContextInjectorMW,
|
|
@@ -2638,7 +2806,6 @@ tslib_1.__decorate([
|
|
|
2638
2806
|
(0, hooks_1.hooks)([
|
|
2639
2807
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "preCheckYmlAndEnvForVS" }),
|
|
2640
2808
|
errorHandler_1.ErrorHandlerMW,
|
|
2641
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2642
2809
|
(0, envMW_1.EnvLoaderMW)(false),
|
|
2643
2810
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
2644
2811
|
contextInjector_1.ContextInjectorMW,
|
|
@@ -2693,17 +2860,6 @@ tslib_1.__decorate([
|
|
|
2693
2860
|
tslib_1.__metadata("design:paramtypes", [String]),
|
|
2694
2861
|
tslib_1.__metadata("design:returntype", Promise)
|
|
2695
2862
|
], FxCore.prototype, "checkProjectType", null);
|
|
2696
|
-
tslib_1.__decorate([
|
|
2697
|
-
(0, hooks_1.hooks)([
|
|
2698
|
-
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: teamsfx_api_1.Stage.addPlugin }),
|
|
2699
|
-
errorHandler_1.ErrorHandlerMW,
|
|
2700
|
-
(0, questionMW_1.QuestionMW)("addPlugin"),
|
|
2701
|
-
concurrentLocker_1.ConcurrentLockerMW,
|
|
2702
|
-
]),
|
|
2703
|
-
tslib_1.__metadata("design:type", Function),
|
|
2704
|
-
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
2705
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
2706
|
-
], FxCore.prototype, "addPlugin", null);
|
|
2707
2863
|
tslib_1.__decorate([
|
|
2708
2864
|
(0, hooks_1.hooks)([
|
|
2709
2865
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: teamsfx_api_1.Stage.RegeneratePlugin }),
|
|
@@ -2717,25 +2873,26 @@ tslib_1.__decorate([
|
|
|
2717
2873
|
], FxCore.prototype, "regeneratePlugin", null);
|
|
2718
2874
|
tslib_1.__decorate([
|
|
2719
2875
|
(0, hooks_1.hooks)([
|
|
2720
|
-
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: teamsfx_api_1.Stage.
|
|
2876
|
+
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: teamsfx_api_1.Stage.addKnowledge }),
|
|
2721
2877
|
errorHandler_1.ErrorHandlerMW,
|
|
2722
|
-
(0, questionMW_1.QuestionMW)("
|
|
2878
|
+
(0, questionMW_1.QuestionMW)("addKnowledge"),
|
|
2879
|
+
concurrentLocker_1.ConcurrentLockerMW,
|
|
2723
2880
|
]),
|
|
2724
2881
|
tslib_1.__metadata("design:type", Function),
|
|
2725
|
-
tslib_1.__metadata("design:paramtypes", [Object
|
|
2882
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
2726
2883
|
tslib_1.__metadata("design:returntype", Promise)
|
|
2727
|
-
], FxCore.prototype, "
|
|
2884
|
+
], FxCore.prototype, "addKnowledge", null);
|
|
2728
2885
|
tslib_1.__decorate([
|
|
2729
2886
|
(0, hooks_1.hooks)([
|
|
2730
|
-
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: teamsfx_api_1.Stage.
|
|
2887
|
+
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: teamsfx_api_1.Stage.addSkill }),
|
|
2731
2888
|
errorHandler_1.ErrorHandlerMW,
|
|
2732
|
-
(0, questionMW_1.QuestionMW)("
|
|
2889
|
+
(0, questionMW_1.QuestionMW)("addSkill"),
|
|
2733
2890
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
2734
2891
|
]),
|
|
2735
2892
|
tslib_1.__metadata("design:type", Function),
|
|
2736
2893
|
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
2737
2894
|
tslib_1.__metadata("design:returntype", Promise)
|
|
2738
|
-
], FxCore.prototype, "
|
|
2895
|
+
], FxCore.prototype, "addSkill", null);
|
|
2739
2896
|
tslib_1.__decorate([
|
|
2740
2897
|
(0, hooks_1.hooks)([
|
|
2741
2898
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "getODSPItemDetails", reset: true }),
|