@microsoft/teamsfx-core 3.1.0 → 3.1.2-alpha.31d08fb48a.0
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 +3 -7
- package/build/client/teamsDevPortalClient.d.ts.map +1 -1
- package/build/client/teamsDevPortalClient.js +101 -122
- 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/cancellation.d.ts +5 -0
- package/build/common/cancellation.d.ts.map +1 -0
- package/build/common/cancellation.js +17 -0
- package/build/common/cancellation.js.map +1 -0
- 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 +424 -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/permissionInterface.d.ts +12 -3
- package/build/common/permissionInterface.d.ts.map +1 -1
- package/build/common/permissionInterface.js +7 -1
- package/build/common/permissionInterface.js.map +1 -1
- 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/treatmentVariables.d.ts +5 -0
- package/build/common/treatmentVariables.d.ts.map +1 -0
- package/build/common/treatmentVariables.js +10 -0
- package/build/common/treatmentVariables.js.map +1 -0
- 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 +2 -2
- package/build/component/configManager/lifecycle.d.ts.map +1 -1
- package/build/component/configManager/lifecycle.js +38 -9
- 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/botAadApp/create.js +1 -1
- package/build/component/driver/botAadApp/create.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 +39 -4
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.js +2 -2
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.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/interface/buildAndDeployArgs.d.ts +1 -1
- package/build/component/driver/interface/buildAndDeployArgs.d.ts.map +1 -1
- package/build/component/driver/interface/commonArgs.d.ts +2 -1
- package/build/component/driver/interface/commonArgs.d.ts.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/baseBuildDriver.d.ts +1 -2
- package/build/component/driver/script/baseBuildDriver.d.ts.map +1 -1
- package/build/component/driver/script/baseBuildDriver.js +0 -2
- package/build/component/driver/script/baseBuildDriver.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 +10 -0
- package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.js +383 -70
- 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 +6 -0
- package/build/component/driver/teamsApp/teamsappMgr.d.ts.map +1 -1
- package/build/component/driver/teamsApp/teamsappMgr.js +38 -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 +13 -0
- package/build/component/driver/teamsApp/validateAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.js +58 -1
- 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/driver/util/utils.d.ts.map +1 -1
- package/build/component/driver/util/utils.js +1 -0
- package/build/component/driver/util/utils.js.map +1 -1
- package/build/component/feature/sso.js +2 -2
- package/build/component/feature/sso.js.map +1 -1
- 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/configFiles/configGenerator.js +1 -1
- package/build/component/generator/configFiles/configGenerator.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/common.js +1 -1
- package/build/component/generator/openApiSpec/common.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 +22 -60
- 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/spfxGenerator.js +5 -5
- package/build/component/generator/spfx/spfxGenerator.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/errors.d.ts +7 -0
- package/build/component/m365/errors.d.ts.map +1 -1
- package/build/component/m365/errors.js +16 -1
- package/build/component/m365/errors.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 +11 -5
- package/build/component/m365/packageService.d.ts.map +1 -1
- package/build/component/m365/packageService.js +132 -109
- 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 -14
- 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/middleware/questionMW.d.ts.map +1 -1
- package/build/component/middleware/questionMW.js +3 -0
- package/build/component/middleware/questionMW.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/envFunctionUtils.js +77 -22
- package/build/component/utils/envFunctionUtils.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 +49 -16
- 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 +754 -56
- package/build/core/FxCore.declarativeAgent.js.map +1 -1
- package/build/core/FxCore.js +515 -325
- 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/FxCoreClient.d.ts +96 -0
- package/build/core/FxCoreClient.d.ts.map +1 -0
- package/build/core/FxCoreClient.js +159 -0
- package/build/core/FxCoreClient.js.map +1 -0
- package/build/core/collaborator.d.ts +1 -0
- package/build/core/collaborator.d.ts.map +1 -1
- package/build/core/collaborator.js +37 -0
- package/build/core/collaborator.js.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 +244 -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 +316 -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 +148 -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 +7 -1
- package/build/error/teamsApp.d.ts.map +1 -1
- package/build/error/teamsApp.js +34 -4
- 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 +8 -4
- package/build/index.d.ts.map +1 -1
- package/build/index.js +21 -7
- 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 +198 -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 +222 -0
- package/build/v4/buildTarget/parseSelector.js.map +1 -0
- package/build/v4/buildTarget/resolveBuildTarget.d.ts +82 -0
- package/build/v4/buildTarget/resolveBuildTarget.d.ts.map +1 -0
- package/build/v4/buildTarget/resolveBuildTarget.js +243 -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 +140 -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 +112 -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 +49 -100
- package/resource/package.nls.cs.json +1181 -1095
- package/resource/package.nls.de.json +1181 -1095
- package/resource/package.nls.es.json +1181 -1095
- package/resource/package.nls.fr.json +1181 -1095
- package/resource/package.nls.it.json +1181 -1095
- package/resource/package.nls.ja.json +1181 -1095
- package/resource/package.nls.json +125 -29
- package/resource/package.nls.ko.json +1181 -1095
- package/resource/package.nls.pl.json +1181 -1095
- package/resource/package.nls.pt-BR.json +1181 -1095
- package/resource/package.nls.ru.json +1181 -1095
- package/resource/package.nls.tr.json +1181 -1095
- package/resource/package.nls.zh-Hans.json +1181 -1095
- package/resource/package.nls.zh-Hant.json +1181 -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 +128 -3
- package/templates/configs/playground/typescript/.vscode/tasks.json +1 -1
- package/templates/configs/remote/python/env/.env.dev +2 -1
- package/templates/configs/remote/python/m365agents.yml.tpl +1 -0
- package/templates/configs/remote/typescript/env/.env.dev +2 -1
- package/templates/configs/remote/typescript/m365agents.yml.tpl +1 -0
- 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"));
|
|
@@ -15,10 +16,13 @@ require("reflect-metadata");
|
|
|
15
16
|
const typedi_1 = require("typedi");
|
|
16
17
|
const url_1 = require("url");
|
|
17
18
|
const teamsDevPortalClient_1 = require("../client/teamsDevPortalClient");
|
|
19
|
+
const cancellation_1 = require("../common/cancellation");
|
|
18
20
|
const constants_1 = require("../common/constants");
|
|
19
21
|
const daSpecParser_1 = require("../common/daSpecParser");
|
|
22
|
+
const featureFlags_1 = require("../common/featureFlags");
|
|
20
23
|
const globalVars_1 = require("../common/globalVars");
|
|
21
24
|
const localizeUtils_1 = require("../common/localizeUtils");
|
|
25
|
+
const projectSettingsHelper = tslib_1.__importStar(require("../common/projectSettingsHelper"));
|
|
22
26
|
const projectSettingsHelper_1 = require("../common/projectSettingsHelper");
|
|
23
27
|
const projectTypeChecker_1 = require("../common/projectTypeChecker");
|
|
24
28
|
const telemetry_1 = require("../common/telemetry");
|
|
@@ -34,7 +38,7 @@ const aadManifestHelper_1 = require("../component/driver/aad/utility/aadManifest
|
|
|
34
38
|
const buildAadManifest_1 = require("../component/driver/aad/utility/buildAadManifest");
|
|
35
39
|
require("../component/driver/index");
|
|
36
40
|
require("../component/driver/script/scriptDriver");
|
|
37
|
-
const
|
|
41
|
+
const shareUtils = tslib_1.__importStar(require("../component/driver/share/utils"));
|
|
38
42
|
const appStudio_1 = require("../component/driver/teamsApp/appStudio");
|
|
39
43
|
const errors_1 = require("../component/driver/teamsApp/errors");
|
|
40
44
|
const results_1 = require("../component/driver/teamsApp/results");
|
|
@@ -42,14 +46,14 @@ const teamsappMgr_1 = require("../component/driver/teamsApp/teamsappMgr");
|
|
|
42
46
|
const CopilotGptManifestUtils_1 = require("../component/driver/teamsApp/utils/CopilotGptManifestUtils");
|
|
43
47
|
const ManifestUtils_1 = require("../component/driver/teamsApp/utils/ManifestUtils");
|
|
44
48
|
const PluginManifestUtils_1 = require("../component/driver/teamsApp/utils/PluginManifestUtils");
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const helper_1 = require("../component/generator/declarativeAgent/helper");
|
|
49
|
+
const utils_2 = require("../component/driver/teamsApp/utils/utils");
|
|
50
|
+
const utils_3 = require("../component/driver/util/utils");
|
|
48
51
|
const oneDriveSharePointHandler_1 = require("../component/generator/declarativeAgent/oneDriveSharePointHandler");
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
const
|
|
52
|
+
const openApiSpecHelper = tslib_1.__importStar(require("../component/generator/openApiSpec/helper"));
|
|
53
|
+
const helper_1 = require("../component/generator/openApiSpec/helper");
|
|
54
|
+
const templateHelper = tslib_1.__importStar(require("../component/generator/templateHelper"));
|
|
55
|
+
const generatorUtils = tslib_1.__importStar(require("../component/generator/utils"));
|
|
56
|
+
const v4MetadataSource_1 = require("../component/generator/v4MetadataSource");
|
|
53
57
|
const launchHelper_1 = require("../component/m365/launchHelper");
|
|
54
58
|
const packageService_1 = require("../component/m365/packageService");
|
|
55
59
|
const envMW_1 = require("../component/middleware/envMW");
|
|
@@ -60,32 +64,51 @@ const metadataUtil_1 = require("../component/utils/metadataUtil");
|
|
|
60
64
|
const pathUtils_1 = require("../component/utils/pathUtils");
|
|
61
65
|
const settingsUtil_1 = require("../component/utils/settingsUtil");
|
|
62
66
|
const common_2 = require("../error/common");
|
|
63
|
-
const upgrade_1 = require("../error/upgrade");
|
|
64
67
|
const yml_1 = require("../error/yml");
|
|
65
68
|
const constants_3 = require("../question/constants");
|
|
66
69
|
const other_1 = require("../question/other");
|
|
67
70
|
const ProjectTypeOptions_1 = require("../question/scaffold/vsc/ProjectTypeOptions");
|
|
68
71
|
const share_1 = require("../question/share");
|
|
69
72
|
const callback_1 = require("./callback");
|
|
73
|
+
const collaboratorCore = tslib_1.__importStar(require("./collaborator"));
|
|
70
74
|
const collaborator_1 = require("./collaborator");
|
|
75
|
+
const createFrontDoorAdapters_1 = require("./createFrontDoorAdapters");
|
|
76
|
+
const createProjectFrontDoor_1 = require("./createProjectFrontDoor");
|
|
71
77
|
const crypto_1 = require("./crypto");
|
|
72
78
|
const environmentName_1 = require("./environmentName");
|
|
73
|
-
const
|
|
79
|
+
const FxCore_openPlugin_1 = require("./FxCore.openPlugin");
|
|
74
80
|
const generateConfigFiles_1 = require("./generateConfigFiles");
|
|
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
|
|
85
|
+
const v4ArtifactSnapshot_1 = require("./v4ArtifactSnapshot");
|
|
80
86
|
const retry_1 = require("./middleware/retry");
|
|
81
|
-
const
|
|
87
|
+
const v3MigrationUtils = tslib_1.__importStar(require("./middleware/utils/v3MigrationUtils"));
|
|
88
|
+
const shareCore = tslib_1.__importStar(require("./share"));
|
|
82
89
|
const share_2 = require("./share");
|
|
83
90
|
const telemetry_2 = require("./telemetry");
|
|
84
|
-
|
|
91
|
+
exports.fxCoreDeps = {
|
|
92
|
+
getCoreVersion: () => require("../../package.json").version,
|
|
93
|
+
};
|
|
94
|
+
const getCoreVersion = () => exports.fxCoreDeps.getCoreVersion();
|
|
95
|
+
exports.getCoreVersion = getCoreVersion;
|
|
96
|
+
// Compatibility exports for tests that stub module-level helpers.
|
|
97
|
+
exports.isValidProjectV3 = projectSettingsHelper_1.isValidProjectV3;
|
|
98
|
+
exports.buildAadManifest = buildAadManifest_1.buildAadManifest;
|
|
99
|
+
exports.shareWithTenant = share_2.shareWithTenant;
|
|
100
|
+
exports.addSharedUsers = share_2.addSharedUsers;
|
|
101
|
+
exports.parseShareAppActionYamlConfig = shareUtils.parseShareAppActionYamlConfig;
|
|
102
|
+
exports.getManifestPath = CopilotGptManifestUtils_1.copilotGptManifestUtils.getManifestPath;
|
|
103
|
+
exports.readCopilotGptManifestFile = CopilotGptManifestUtils_1.copilotGptManifestUtils.readCopilotGptManifestFile;
|
|
104
|
+
class FxCore extends FxCore_openPlugin_1.FxCoreOpenPluginPart {
|
|
85
105
|
constructor(tools) {
|
|
86
106
|
super();
|
|
87
107
|
(0, globalVars_1.setTools)(tools);
|
|
88
108
|
}
|
|
109
|
+
getAbortSignal(inputs) {
|
|
110
|
+
return inputs.abortSignal;
|
|
111
|
+
}
|
|
89
112
|
/**
|
|
90
113
|
* @todo this's a really primitive implement. Maybe could use Subscription Model to
|
|
91
114
|
* refactor later.
|
|
@@ -105,17 +128,37 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
105
128
|
}
|
|
106
129
|
return res;
|
|
107
130
|
}
|
|
131
|
+
/**
|
|
132
|
+
* The create front door (operation `dispatch-create-by-engine`): the single
|
|
133
|
+
* entry the create surfaces call in place of `createProject`. Behind
|
|
134
|
+
* `TEAMSFX_V4_ENABLED` it runs the v4 create selector (Q1) and dispatches the
|
|
135
|
+
* resolved `BuildTarget` by engine; flag off it is a pure pass-through to the
|
|
136
|
+
* unmodified `createProject`, so v3 behavior is byte-identical.
|
|
137
|
+
*
|
|
138
|
+
* It drives its own questions (the v4 selector + the template's Q2 + the v4
|
|
139
|
+
* create floor, or the v3 `QuestionMW` reached through `createProject`), so it
|
|
140
|
+
* carries no `QuestionMW`. `FxCore` is the composition root that supplies the
|
|
141
|
+
* four real seams; the orchestrator stays pure and injectable.
|
|
142
|
+
*/
|
|
143
|
+
async createProjectFrontDoor(inputs) {
|
|
144
|
+
return (0, createProjectFrontDoor_1.createProjectFrontDoor)(inputs, {
|
|
145
|
+
createV3: (i) => this.createProject(i),
|
|
146
|
+
scaffoldV4: createFrontDoorAdapters_1.scaffoldV4,
|
|
147
|
+
collectCreateFloor: createFrontDoorAdapters_1.collectCreateFloor,
|
|
148
|
+
resolveArtifactSnapshot: v4ArtifactSnapshot_1.resolveV4TemplateArtifactSnapshot,
|
|
149
|
+
});
|
|
150
|
+
}
|
|
108
151
|
async createProjectFromTdp(inputs) {
|
|
109
152
|
const context = (0, globalVars_1.createContext)();
|
|
110
153
|
inputs[constants_3.QuestionNames.Scratch] = constants_3.ScratchOptions.yes().id;
|
|
111
154
|
// should never happen as we do same check on Developer Portal.
|
|
112
155
|
if (inputs.teamsAppFromTdp) {
|
|
113
|
-
if ((0,
|
|
156
|
+
if ((0, utils_2.containsUnsupportedFeature)(inputs.teamsAppFromTdp)) {
|
|
114
157
|
return (0, teamsfx_api_1.err)(new common_2.InputValidationError("manifest.json", "App contains unsupported features"));
|
|
115
158
|
}
|
|
116
159
|
else {
|
|
117
|
-
context.telemetryReporter
|
|
118
|
-
[telemetry_2.CoreTelemetryProperty.TdpTeamsAppFeatures]: (0,
|
|
160
|
+
context.telemetryReporter?.sendTelemetryEvent(telemetry_2.CoreTelemetryEvent.CreateFromTdpStart, {
|
|
161
|
+
[telemetry_2.CoreTelemetryProperty.TdpTeamsAppFeatures]: (0, utils_2.getFeaturesFromAppDefinition)(inputs.teamsAppFromTdp).join(","),
|
|
119
162
|
[telemetry_2.CoreTelemetryProperty.TdpTeamsAppId]: inputs.teamsAppFromTdp.teamsAppId,
|
|
120
163
|
});
|
|
121
164
|
}
|
|
@@ -181,7 +224,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
181
224
|
*/
|
|
182
225
|
async provisionResourcesOnce(inputs, ctx) {
|
|
183
226
|
inputs.stage = teamsfx_api_1.Stage.provision;
|
|
184
|
-
const context = (0,
|
|
227
|
+
const context = (0, utils_3.createDriverContext)(inputs);
|
|
185
228
|
try {
|
|
186
229
|
const res = await coordinator_1.coordinator.provision(context, inputs);
|
|
187
230
|
if (res.isOk()) {
|
|
@@ -206,6 +249,9 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
206
249
|
* none lifecycle command, uninstall provisioned resources
|
|
207
250
|
*/
|
|
208
251
|
async uninstall(inputs) {
|
|
252
|
+
if (this.getAbortSignal(inputs)?.aborted) {
|
|
253
|
+
return (0, teamsfx_api_1.err)(new common_2.UserCancelError("FxCore"));
|
|
254
|
+
}
|
|
209
255
|
switch (inputs[constants_3.QuestionNames.UninstallMode]) {
|
|
210
256
|
case constants_3.QuestionNames.UninstallModeManifestId:
|
|
211
257
|
return await this.uninstallByManifestId(inputs);
|
|
@@ -230,20 +276,20 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
230
276
|
const tdpOption = uninstallOptions?.includes(constants_3.QuestionNames.UninstallOptionTDP);
|
|
231
277
|
const botOption = uninstallOptions?.includes(constants_3.QuestionNames.UninstallOptionBot);
|
|
232
278
|
if (m356AppOption) {
|
|
233
|
-
const res = await this.uninstallM365App(undefined, manifestId);
|
|
279
|
+
const res = await this.uninstallM365App(undefined, manifestId, this.getAbortSignal(inputs));
|
|
234
280
|
if (res.isErr()) {
|
|
235
281
|
return (0, teamsfx_api_1.err)(res.error);
|
|
236
282
|
}
|
|
237
283
|
}
|
|
238
284
|
if (botOption) {
|
|
239
|
-
const res = await this.uninstallBotFrameworRegistration(undefined, manifestId);
|
|
285
|
+
const res = await this.uninstallBotFrameworRegistration(undefined, manifestId, this.getAbortSignal(inputs));
|
|
240
286
|
if (res.isErr()) {
|
|
241
287
|
return (0, teamsfx_api_1.err)(res.error);
|
|
242
288
|
}
|
|
243
289
|
}
|
|
244
290
|
// App registraion should be the last to remove, because we might need to query some metadata from TDP.
|
|
245
291
|
if (tdpOption) {
|
|
246
|
-
const res = await this.uninstallAppRegistration(manifestId);
|
|
292
|
+
const res = await this.uninstallAppRegistration(manifestId, this.getAbortSignal(inputs));
|
|
247
293
|
if (res.isErr()) {
|
|
248
294
|
return (0, teamsfx_api_1.err)(res.error);
|
|
249
295
|
}
|
|
@@ -288,7 +334,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
288
334
|
const tdpOption = uninstallOptions?.includes(constants_3.QuestionNames.UninstallOptionTDP);
|
|
289
335
|
const botOption = uninstallOptions?.includes(constants_3.QuestionNames.UninstallOptionBot);
|
|
290
336
|
if ((teamsAppId || m365TitleId) && m356AppOption) {
|
|
291
|
-
const res = await this.uninstallM365App(m365TitleId, teamsAppId);
|
|
337
|
+
const res = await this.uninstallM365App(m365TitleId, teamsAppId, this.getAbortSignal(inputs));
|
|
292
338
|
if (res.isErr()) {
|
|
293
339
|
return (0, teamsfx_api_1.err)(res.error);
|
|
294
340
|
}
|
|
@@ -296,7 +342,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
296
342
|
this.resetEnvVar(m365TitleIdKeyName, ctx);
|
|
297
343
|
}
|
|
298
344
|
if (botId && botOption) {
|
|
299
|
-
const res = await this.uninstallBotFrameworRegistration(botId);
|
|
345
|
+
const res = await this.uninstallBotFrameworRegistration(botId, undefined, this.getAbortSignal(inputs));
|
|
300
346
|
if (res.isErr()) {
|
|
301
347
|
return (0, teamsfx_api_1.err)(res.error);
|
|
302
348
|
}
|
|
@@ -304,7 +350,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
304
350
|
}
|
|
305
351
|
// App registraion should be the last to remove, because we might need to query some metadata from TDP.
|
|
306
352
|
if (teamsAppId && tdpOption) {
|
|
307
|
-
const res = await this.uninstallAppRegistration(teamsAppId);
|
|
353
|
+
const res = await this.uninstallAppRegistration(teamsAppId, this.getAbortSignal(inputs));
|
|
308
354
|
if (res.isErr()) {
|
|
309
355
|
return (0, teamsfx_api_1.err)(res.error);
|
|
310
356
|
}
|
|
@@ -333,7 +379,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
333
379
|
if (!titleId) {
|
|
334
380
|
return (0, teamsfx_api_1.err)(new common_2.MissingRequiredInputError("title-id", "FxCore"));
|
|
335
381
|
}
|
|
336
|
-
const res = await this.uninstallM365App(titleId);
|
|
382
|
+
const res = await this.uninstallM365App(titleId, undefined, this.getAbortSignal(inputs));
|
|
337
383
|
if (res.isErr()) {
|
|
338
384
|
return (0, teamsfx_api_1.err)(res.error);
|
|
339
385
|
}
|
|
@@ -342,7 +388,10 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
342
388
|
/**
|
|
343
389
|
* uninstall sideloaded appps in M365
|
|
344
390
|
*/
|
|
345
|
-
async uninstallM365App(titleId, manifestId) {
|
|
391
|
+
async uninstallM365App(titleId, manifestId, signal) {
|
|
392
|
+
if (signal?.aborted) {
|
|
393
|
+
return (0, teamsfx_api_1.err)(new common_2.UserCancelError("Uninstall M365 App"));
|
|
394
|
+
}
|
|
346
395
|
if (titleId === undefined && manifestId === undefined) {
|
|
347
396
|
return (0, teamsfx_api_1.err)(new common_2.MissingRequiredInputError("title id or manifest id", "FxCore"));
|
|
348
397
|
}
|
|
@@ -356,7 +405,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
356
405
|
const packageService = new packageService_1.PackageService(sideloadingServiceEndpoint, globalVars_1.TOOLS.logProvider);
|
|
357
406
|
if (titleId === undefined) {
|
|
358
407
|
try {
|
|
359
|
-
titleId = await packageService.retrieveTitleId(sideloadingTokenRes.value, manifestId ?? "");
|
|
408
|
+
titleId = await packageService.retrieveTitleId(sideloadingTokenRes.value, manifestId ?? "", signal);
|
|
360
409
|
}
|
|
361
410
|
catch (err) {
|
|
362
411
|
await globalVars_1.TOOLS.ui.showMessage("info", (0, localizeUtils_1.getLocalizedString)("core.uninstall.failed.titleId"), false);
|
|
@@ -369,7 +418,10 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
369
418
|
default: true,
|
|
370
419
|
});
|
|
371
420
|
if (confirmRes?.isOk() && confirmRes.value.result === true) {
|
|
372
|
-
|
|
421
|
+
if (signal?.aborted) {
|
|
422
|
+
return (0, teamsfx_api_1.err)(new common_2.UserCancelError("Uninstall M365 App"));
|
|
423
|
+
}
|
|
424
|
+
await packageService.unacquire(sideloadingTokenRes.value, titleId, signal);
|
|
373
425
|
await globalVars_1.TOOLS.ui.showMessage("info", (0, localizeUtils_1.getLocalizedString)("core.uninstall.success.m365App", titleId), false);
|
|
374
426
|
await globalVars_1.TOOLS.ui.showMessage("info", (0, localizeUtils_1.getLocalizedString)("core.uninstall.success.delayWarning"), false);
|
|
375
427
|
}
|
|
@@ -382,7 +434,10 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
382
434
|
/**
|
|
383
435
|
* uninstall sideloaded apps in Teams Developer Portal
|
|
384
436
|
*/
|
|
385
|
-
async uninstallAppRegistration(manifestId) {
|
|
437
|
+
async uninstallAppRegistration(manifestId, signal) {
|
|
438
|
+
if (signal?.aborted) {
|
|
439
|
+
return (0, teamsfx_api_1.err)(new common_2.UserCancelError("Uninstall App Registration"));
|
|
440
|
+
}
|
|
386
441
|
const appStudioTokenRes = await globalVars_1.TOOLS.tokenProvider.m365TokenProvider.getAccessToken({
|
|
387
442
|
scopes: (0, constants_1.AppStudioScopes)(),
|
|
388
443
|
});
|
|
@@ -395,8 +450,14 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
395
450
|
default: true,
|
|
396
451
|
});
|
|
397
452
|
if (confirmRes?.isOk() && confirmRes.value.result === true) {
|
|
453
|
+
if (signal?.aborted) {
|
|
454
|
+
return (0, teamsfx_api_1.err)(new common_2.UserCancelError("Uninstall App Registration"));
|
|
455
|
+
}
|
|
398
456
|
const token = appStudioTokenRes.value;
|
|
399
457
|
await teamsDevPortalClient_1.teamsDevPortalClient.deleteApp(token, manifestId);
|
|
458
|
+
if (signal?.aborted) {
|
|
459
|
+
return (0, teamsfx_api_1.err)(new common_2.UserCancelError("Uninstall App Registration"));
|
|
460
|
+
}
|
|
400
461
|
await globalVars_1.TOOLS.ui.showMessage("info", (0, localizeUtils_1.getLocalizedString)("core.uninstall.success.tdp", manifestId), false);
|
|
401
462
|
return (0, teamsfx_api_1.ok)(undefined);
|
|
402
463
|
}
|
|
@@ -408,7 +469,10 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
408
469
|
/**
|
|
409
470
|
* uninstall bots created in dev.botframework.com
|
|
410
471
|
*/
|
|
411
|
-
async uninstallBotFrameworRegistration(botId, manifestId) {
|
|
472
|
+
async uninstallBotFrameworRegistration(botId, manifestId, signal) {
|
|
473
|
+
if (signal?.aborted) {
|
|
474
|
+
return (0, teamsfx_api_1.err)(new common_2.UserCancelError("Uninstall Bot Framework Registration"));
|
|
475
|
+
}
|
|
412
476
|
if (!botId && !manifestId) {
|
|
413
477
|
return (0, teamsfx_api_1.err)(new common_2.MissingRequiredInputError("bot id or manifest id", "FxCore"));
|
|
414
478
|
}
|
|
@@ -433,7 +497,13 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
433
497
|
default: true,
|
|
434
498
|
});
|
|
435
499
|
if (confirmRes?.isOk() && confirmRes.value.result === true) {
|
|
500
|
+
if (signal?.aborted) {
|
|
501
|
+
return (0, teamsfx_api_1.err)(new common_2.UserCancelError("Uninstall Bot Framework Registration"));
|
|
502
|
+
}
|
|
436
503
|
await teamsDevPortalClient_1.teamsDevPortalClient.deleteBot(token, botId);
|
|
504
|
+
if (signal?.aborted) {
|
|
505
|
+
return (0, teamsfx_api_1.err)(new common_2.UserCancelError("Uninstall Bot Framework Registration"));
|
|
506
|
+
}
|
|
437
507
|
await globalVars_1.TOOLS.ui.showMessage("info", (0, localizeUtils_1.getLocalizedString)("core.uninstall.success.bot", botId), false);
|
|
438
508
|
}
|
|
439
509
|
else {
|
|
@@ -447,7 +517,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
447
517
|
*/
|
|
448
518
|
async deployArtifacts(inputs, ctx) {
|
|
449
519
|
inputs.stage = teamsfx_api_1.Stage.deploy;
|
|
450
|
-
const context = (0,
|
|
520
|
+
const context = (0, utils_3.createDriverContext)(inputs);
|
|
451
521
|
const res = await coordinator_1.coordinator.deploy(context, inputs);
|
|
452
522
|
if (res.isOk()) {
|
|
453
523
|
ctx.envVars = res.value;
|
|
@@ -483,7 +553,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
483
553
|
manifestPath: manifestTemplatePath,
|
|
484
554
|
outputFilePath: manifestOutputPath,
|
|
485
555
|
};
|
|
486
|
-
const Context = (0,
|
|
556
|
+
const Context = (0, utils_3.createDriverContext)(inputs);
|
|
487
557
|
(0, globalVars_1.setErrorContext)({ component: "aadAppUpdate" });
|
|
488
558
|
const res = await updateAadClient.execute(inputArgs, Context);
|
|
489
559
|
if (res.result.isErr()) {
|
|
@@ -518,7 +588,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
518
588
|
framework: inputs[constants_3.QuestionNames.SPFxFramework],
|
|
519
589
|
spfxPackage: constants_3.SPFxVersionOptionIds.installLocally,
|
|
520
590
|
};
|
|
521
|
-
const Context = (0,
|
|
591
|
+
const Context = (0, utils_3.createDriverContext)(inputs);
|
|
522
592
|
const res = await driver.run(args, Context);
|
|
523
593
|
if (res.isErr()) {
|
|
524
594
|
return (0, teamsfx_api_1.err)(res.error);
|
|
@@ -530,7 +600,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
530
600
|
*/
|
|
531
601
|
async publishApplication(inputs, ctx) {
|
|
532
602
|
inputs.stage = teamsfx_api_1.Stage.publish;
|
|
533
|
-
const context = (0,
|
|
603
|
+
const context = (0, utils_3.createDriverContext)(inputs);
|
|
534
604
|
const res = await coordinator_1.coordinator.publish(context, inputs);
|
|
535
605
|
if (res.isOk()) {
|
|
536
606
|
ctx.envVars = res.value;
|
|
@@ -543,11 +613,17 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
543
613
|
}
|
|
544
614
|
}
|
|
545
615
|
async removeSharedAccess(inputs, ctx) {
|
|
546
|
-
const
|
|
616
|
+
const removeUsersInput = inputs[constants_3.QuestionNames.RemoveUsers];
|
|
617
|
+
const emails = Array.isArray(removeUsersInput)
|
|
618
|
+
? removeUsersInput
|
|
619
|
+
: (removeUsersInput
|
|
620
|
+
?.split(",")
|
|
621
|
+
.map((email) => email.trim())
|
|
622
|
+
.filter((email) => !!email) ?? []);
|
|
547
623
|
if (!emails || emails.length === 0) {
|
|
548
624
|
return (0, teamsfx_api_1.err)(new common_2.MissingRequiredInputError("emails", "FxCore"));
|
|
549
625
|
}
|
|
550
|
-
const parseRes = await
|
|
626
|
+
const parseRes = await shareUtils.parseShareAppActionYamlConfig(inputs.projectPath);
|
|
551
627
|
if (parseRes.isErr()) {
|
|
552
628
|
return (0, teamsfx_api_1.err)(parseRes.error);
|
|
553
629
|
}
|
|
@@ -603,12 +679,19 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
603
679
|
let emails = [];
|
|
604
680
|
if (scope === share_1.ShareScopeOption.ShareAppWithSpecificUsers ||
|
|
605
681
|
operation === share_1.ShareOperationOption.RemoveShareAccessFromUsers) {
|
|
606
|
-
emails =
|
|
682
|
+
emails =
|
|
683
|
+
inputs[constants_3.QuestionNames.UserEmail]
|
|
684
|
+
?.split(",")
|
|
685
|
+
.map((e) => e.trim())
|
|
686
|
+
.filter((e) => !!e) ?? [];
|
|
687
|
+
if (emails.length === 0) {
|
|
688
|
+
return (0, teamsfx_api_1.err)(new common_2.InputValidationError("emails", "No emails"));
|
|
689
|
+
}
|
|
607
690
|
if (emails.length > constants_3.MAX_EMAIL_NUMBER) {
|
|
608
691
|
return (0, teamsfx_api_1.err)(new common_2.InputValidationError("emails", "Too many emails"));
|
|
609
692
|
}
|
|
610
693
|
}
|
|
611
|
-
const parseRes = await
|
|
694
|
+
const parseRes = await shareUtils.parseShareAppActionYamlConfig(inputs.projectPath);
|
|
612
695
|
if (parseRes.isErr()) {
|
|
613
696
|
return (0, teamsfx_api_1.err)(parseRes.error);
|
|
614
697
|
}
|
|
@@ -622,13 +705,13 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
622
705
|
}
|
|
623
706
|
const mosToken = mosTokenRes.value;
|
|
624
707
|
if (operation === share_1.ShareOperationOption.RemoveShareAccessFromUsers) {
|
|
625
|
-
return
|
|
708
|
+
return shareCore.removeShareAccess(mosToken, sharedTitleId, emails);
|
|
626
709
|
}
|
|
627
710
|
else if (scope === share_1.ShareScopeOption.ShareAppWithTenantUsers) {
|
|
628
|
-
return
|
|
711
|
+
return shareCore.shareWithTenant(mosToken, sharedTitleId);
|
|
629
712
|
}
|
|
630
713
|
else if (scope === share_1.ShareScopeOption.ShareAppWithSpecificUsers) {
|
|
631
|
-
return
|
|
714
|
+
return shareCore.addSharedUsers(mosToken, sharedTitleId, emails);
|
|
632
715
|
}
|
|
633
716
|
else {
|
|
634
717
|
return (0, teamsfx_api_1.err)(new common_2.InputValidationError("shareOption", "Invalid share option"));
|
|
@@ -639,7 +722,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
639
722
|
*/
|
|
640
723
|
async executeUserTask(func, inputs) {
|
|
641
724
|
let res = (0, teamsfx_api_1.ok)(undefined);
|
|
642
|
-
const context = (0,
|
|
725
|
+
const context = (0, utils_3.createDriverContext)(inputs);
|
|
643
726
|
if (func.method === "addSso") {
|
|
644
727
|
// used in v3 only in VS
|
|
645
728
|
inputs.stage = teamsfx_api_1.Stage.addFeature;
|
|
@@ -662,8 +745,8 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
662
745
|
}
|
|
663
746
|
await fs_extra_1.default.ensureDir(path.join(inputs.projectPath, "build"));
|
|
664
747
|
const manifestOutputPath = path.join(inputs.projectPath, "build", `aad.${inputs.env}.json`);
|
|
665
|
-
const Context = (0,
|
|
666
|
-
await (0,
|
|
748
|
+
const Context = (0, utils_3.createDriverContext)(inputs);
|
|
749
|
+
await (0, exports.buildAadManifest)(Context, manifestTemplatePath, manifestOutputPath);
|
|
667
750
|
return (0, teamsfx_api_1.ok)(undefined);
|
|
668
751
|
}
|
|
669
752
|
async convertAadToNewSchema(inputs) {
|
|
@@ -734,7 +817,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
734
817
|
*/
|
|
735
818
|
async validateManifest(inputs) {
|
|
736
819
|
inputs.stage = teamsfx_api_1.Stage.validateApplication;
|
|
737
|
-
const context = (0,
|
|
820
|
+
const context = (0, utils_3.createDriverContext)(inputs);
|
|
738
821
|
const teamsAppManifestFilePath = inputs["manifest-path"];
|
|
739
822
|
const args = {
|
|
740
823
|
manifestPath: teamsAppManifestFilePath,
|
|
@@ -749,7 +832,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
749
832
|
*/
|
|
750
833
|
async validateAppPackage(inputs) {
|
|
751
834
|
inputs.stage = teamsfx_api_1.Stage.validateApplication;
|
|
752
|
-
const context = (0,
|
|
835
|
+
const context = (0, utils_3.createDriverContext)(inputs);
|
|
753
836
|
const teamsAppPackageFilePath = inputs["app-package-file-path"];
|
|
754
837
|
const args = {
|
|
755
838
|
appPackagePath: teamsAppPackageFilePath,
|
|
@@ -759,7 +842,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
759
842
|
return (await driver.execute(args, context)).result;
|
|
760
843
|
}
|
|
761
844
|
async validateWithTestCases(inputs) {
|
|
762
|
-
const context = (0,
|
|
845
|
+
const context = (0, utils_3.createDriverContext)(inputs);
|
|
763
846
|
const args = {
|
|
764
847
|
appPackagePath: inputs["app-package-file-path"],
|
|
765
848
|
showMessage: true,
|
|
@@ -772,7 +855,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
772
855
|
* v3 only none lifecycle command
|
|
773
856
|
*/
|
|
774
857
|
async syncManifest(inputs) {
|
|
775
|
-
const context = (0,
|
|
858
|
+
const context = (0, utils_3.createDriverContext)(inputs);
|
|
776
859
|
const projectPath = inputs[constants_3.QuestionNames.ProjectPath];
|
|
777
860
|
const env = inputs[constants_3.QuestionNames.Env];
|
|
778
861
|
const teamsAppId = inputs[constants_3.QuestionNames.TeamsAppId];
|
|
@@ -789,7 +872,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
789
872
|
*/
|
|
790
873
|
async createAppPackage(inputs) {
|
|
791
874
|
inputs.stage = teamsfx_api_1.Stage.createAppPackage;
|
|
792
|
-
const context = (0,
|
|
875
|
+
const context = (0, utils_3.createDriverContext)(inputs);
|
|
793
876
|
// For TSP projects
|
|
794
877
|
await (0, tools_1.runForTypeSpecProject)(inputs.projectPath, context);
|
|
795
878
|
const teamsAppManifestFilePath = inputs?.[constants_3.QuestionNames.TeamsAppManifestFilePath];
|
|
@@ -797,8 +880,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
797
880
|
const args = {
|
|
798
881
|
manifestPath: teamsAppManifestFilePath,
|
|
799
882
|
outputZipPath: inputs[constants_3.QuestionNames.OutputZipPathParamName] ??
|
|
800
|
-
`${inputs.projectPath}/${teamsfx_api_1.AppPackageFolderName}/${teamsfx_api_1.BuildFolderName}/appPackage.${process.env
|
|
801
|
-
.TEAMSFX_ENV}.zip`,
|
|
883
|
+
`${inputs.projectPath}/${teamsfx_api_1.AppPackageFolderName}/${teamsfx_api_1.BuildFolderName}/appPackage.${process.env.TEAMSFX_ENV}.zip`,
|
|
802
884
|
outputFolder: inputs[constants_3.QuestionNames.OutputManifestParamName] ??
|
|
803
885
|
`${inputs.projectPath}/${teamsfx_api_1.AppPackageFolderName}/${teamsfx_api_1.BuildFolderName}`,
|
|
804
886
|
};
|
|
@@ -967,7 +1049,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
967
1049
|
inputs.stage = teamsfx_api_1.Stage.grantPermission;
|
|
968
1050
|
const context = (0, globalVars_1.createContext)();
|
|
969
1051
|
(0, globalVars_1.setErrorContext)({ component: "collaborator" });
|
|
970
|
-
const res = await
|
|
1052
|
+
const res = await collaboratorCore.grantPermission(context, inputs, globalVars_1.TOOLS.tokenProvider);
|
|
971
1053
|
return res;
|
|
972
1054
|
}
|
|
973
1055
|
/**
|
|
@@ -976,7 +1058,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
976
1058
|
async checkPermission(inputs) {
|
|
977
1059
|
inputs.stage = teamsfx_api_1.Stage.checkPermission;
|
|
978
1060
|
const context = (0, globalVars_1.createContext)();
|
|
979
|
-
const res = await
|
|
1061
|
+
const res = await collaboratorCore.checkPermission(context, inputs, globalVars_1.TOOLS.tokenProvider);
|
|
980
1062
|
return res;
|
|
981
1063
|
}
|
|
982
1064
|
/**
|
|
@@ -985,7 +1067,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
985
1067
|
async listCollaborator(inputs) {
|
|
986
1068
|
inputs.stage = teamsfx_api_1.Stage.listCollaborator;
|
|
987
1069
|
const context = (0, globalVars_1.createContext)();
|
|
988
|
-
const res = await
|
|
1070
|
+
const res = await collaboratorCore.listCollaborator(context, inputs, globalVars_1.TOOLS.tokenProvider);
|
|
989
1071
|
return res;
|
|
990
1072
|
}
|
|
991
1073
|
getSelectedEnv(inputs) {
|
|
@@ -1066,45 +1148,16 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1066
1148
|
globalVars_1.TOOLS.logProvider.info(`env file created: ${targetDotEnvFile}`);
|
|
1067
1149
|
return (0, teamsfx_api_1.ok)(undefined);
|
|
1068
1150
|
}
|
|
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
1151
|
// a project version check
|
|
1093
1152
|
async projectVersionCheck(inputs) {
|
|
1094
1153
|
const projectPath = inputs.projectPath || "";
|
|
1095
|
-
if (
|
|
1096
|
-
const versionInfo = await
|
|
1154
|
+
if (projectSettingsHelper.isValidProjectV3(projectPath)) {
|
|
1155
|
+
const versionInfo = await v3MigrationUtils.getProjectVersionFromPath(projectPath);
|
|
1097
1156
|
if (!versionInfo.version) {
|
|
1098
1157
|
return (0, teamsfx_api_1.err)(new common_2.InvalidProjectError(projectPath));
|
|
1099
1158
|
}
|
|
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
|
-
}
|
|
1159
|
+
const trackingId = await v3MigrationUtils.getTrackingIdFromPath(projectPath);
|
|
1160
|
+
const isSupport = v3MigrationUtils.getVersionState(versionInfo);
|
|
1108
1161
|
return (0, teamsfx_api_1.ok)({
|
|
1109
1162
|
currentVersion: versionInfo.version,
|
|
1110
1163
|
trackingId,
|
|
@@ -1190,11 +1243,11 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1190
1243
|
}
|
|
1191
1244
|
}
|
|
1192
1245
|
async preProvisionForVS(inputs) {
|
|
1193
|
-
const context = (0,
|
|
1246
|
+
const context = (0, utils_3.createDriverContext)(inputs);
|
|
1194
1247
|
return coordinator_1.coordinator.preProvisionForVS(context, inputs);
|
|
1195
1248
|
}
|
|
1196
1249
|
async preCheckYmlAndEnvForVS(inputs) {
|
|
1197
|
-
const context = (0,
|
|
1250
|
+
const context = (0, utils_3.createDriverContext)(inputs);
|
|
1198
1251
|
const result = await coordinator_1.coordinator.preCheckYmlAndEnvForVS(context, inputs);
|
|
1199
1252
|
return result;
|
|
1200
1253
|
}
|
|
@@ -1222,7 +1275,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1222
1275
|
}
|
|
1223
1276
|
try {
|
|
1224
1277
|
// Merge existing operations in manifest.json
|
|
1225
|
-
const specParser = new m365_spec_parser_1.SpecParser(url, (0,
|
|
1278
|
+
const specParser = new m365_spec_parser_1.SpecParser(url, (0, helper_1.getParserOptions)(m365_spec_parser_1.ProjectType.SME));
|
|
1226
1279
|
const listResult = await specParser.list();
|
|
1227
1280
|
const apiResultList = listResult.APIs.filter((value) => value.isValid);
|
|
1228
1281
|
const existingOperationIds = ManifestUtils_1.manifestUtils.getOperationIds(manifestRes.value);
|
|
@@ -1252,11 +1305,11 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1252
1305
|
}
|
|
1253
1306
|
if (authNames.size >= 1) {
|
|
1254
1307
|
for (const authName of authNames) {
|
|
1255
|
-
await
|
|
1308
|
+
await openApiSpecHelper.injectAuthAction(inputs.projectPath, [...authNames][0], authNamesDict[authName], outputApiSpecPath, false);
|
|
1256
1309
|
}
|
|
1257
1310
|
}
|
|
1258
1311
|
let pluginPath;
|
|
1259
|
-
const generateResult = await
|
|
1312
|
+
const generateResult = await openApiSpecHelper.generateFromApiSpec(specParser, manifestPath, inputs, context, "copilotPluginAddAPI", m365_spec_parser_1.ProjectType.SME, {
|
|
1260
1313
|
destinationApiSpecFilePath: outputApiSpecPath,
|
|
1261
1314
|
responseTemplateFolder: adaptiveCardFolder,
|
|
1262
1315
|
pluginManifestFilePath: pluginPath,
|
|
@@ -1265,7 +1318,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1265
1318
|
return (0, teamsfx_api_1.err)(generateResult.error);
|
|
1266
1319
|
}
|
|
1267
1320
|
if (generateResult.value.warnings && generateResult.value.warnings.length > 0) {
|
|
1268
|
-
const warnSummary = await
|
|
1321
|
+
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
1322
|
if (warnSummary) {
|
|
1270
1323
|
context.logProvider.info(warnSummary);
|
|
1271
1324
|
}
|
|
@@ -1274,7 +1327,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1274
1327
|
catch (e) {
|
|
1275
1328
|
let error;
|
|
1276
1329
|
if (e instanceof m365_spec_parser_1.SpecParserError) {
|
|
1277
|
-
error = (0,
|
|
1330
|
+
error = (0, helper_1.convertSpecParserErrorToFxError)(e);
|
|
1278
1331
|
}
|
|
1279
1332
|
else {
|
|
1280
1333
|
error = (0, common_2.assembleError)(e);
|
|
@@ -1307,7 +1360,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1307
1360
|
}
|
|
1308
1361
|
}
|
|
1309
1362
|
async copilotPluginListOperations(inputs) {
|
|
1310
|
-
const res = await
|
|
1363
|
+
const res = await openApiSpecHelper.listOperations((0, globalVars_1.createContext)(), inputs.apiSpecUrl, inputs, inputs.includeExistingAPIs, inputs.shouldLogWarning);
|
|
1311
1364
|
if (res.isErr()) {
|
|
1312
1365
|
const msg = res.error.map((e) => e.content).join("\n");
|
|
1313
1366
|
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "ListOpenAPISpecOperationsError", msg, msg));
|
|
@@ -1326,134 +1379,17 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1326
1379
|
globalVars_1.TOOLS.telemetryReporter?.sendTelemetryEvent(telemetry_1.TelemetryEvent.ProjectType, props);
|
|
1327
1380
|
return (0, teamsfx_api_1.ok)(projectTypeRes);
|
|
1328
1381
|
}
|
|
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
1382
|
async regeneratePlugin(inputs) {
|
|
1448
1383
|
const projectPath = inputs.projectPath;
|
|
1449
1384
|
const context = (0, globalVars_1.createContext)();
|
|
1450
|
-
const teamsManifestPath = inputs[constants_3.QuestionNames.ManifestPath]
|
|
1385
|
+
const teamsManifestPath = (inputs[constants_3.QuestionNames.ManifestPath] ??
|
|
1386
|
+
inputs[constants_3.QuestionNames.TeamsAppManifestFilePath]);
|
|
1451
1387
|
const appPackageFolder = path.dirname(teamsManifestPath);
|
|
1452
1388
|
const manifestRes = await ManifestUtils_1.manifestUtils._readAppManifest(teamsManifestPath);
|
|
1453
1389
|
if (manifestRes.isErr()) {
|
|
1454
1390
|
return (0, teamsfx_api_1.err)(manifestRes.error);
|
|
1455
1391
|
}
|
|
1456
|
-
const gptManifestFilePathRes = await
|
|
1392
|
+
const gptManifestFilePathRes = await (0, exports.getManifestPath)(teamsManifestPath);
|
|
1457
1393
|
if (gptManifestFilePathRes.isErr()) {
|
|
1458
1394
|
return (0, teamsfx_api_1.err)(gptManifestFilePathRes.error);
|
|
1459
1395
|
}
|
|
@@ -1478,7 +1414,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1478
1414
|
}
|
|
1479
1415
|
const destinationPluginManifestPath = inputs[constants_3.QuestionNames.SelectPluginManifest];
|
|
1480
1416
|
const destinationApiSpecPath = inputs[constants_3.QuestionNames.SelectOpenAPISpecFromPlugin];
|
|
1481
|
-
const generateRes = await
|
|
1417
|
+
const generateRes = await openApiSpecHelper.generateFromApiSpec(undefined, teamsManifestPath, inputs, context, teamsfx_api_1.Stage.RegeneratePlugin, m365_spec_parser_1.ProjectType.Copilot, {
|
|
1482
1418
|
destinationApiSpecFilePath: destinationApiSpecPath,
|
|
1483
1419
|
pluginManifestFilePath: destinationPluginManifestPath,
|
|
1484
1420
|
}, inputs[constants_3.QuestionNames.ApiSpecLocation].trim(), true);
|
|
@@ -1487,14 +1423,14 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1487
1423
|
}
|
|
1488
1424
|
const warnings = generateRes.value.warnings;
|
|
1489
1425
|
if (warnings && warnings.length > 0) {
|
|
1490
|
-
const warnSummary = await
|
|
1426
|
+
const warnSummary = await openApiSpecHelper.generateScaffoldingSummary(warnings, manifestRes.value, path.relative(projectPath, destinationApiSpecPath), path.relative(projectPath, destinationPluginManifestPath), projectPath);
|
|
1491
1427
|
context.logProvider.info(warnSummary + "\n");
|
|
1492
1428
|
}
|
|
1493
1429
|
for (const authNameAndScheme of authNameAndSchemes) {
|
|
1494
1430
|
await this.updateAuthActionInYaml(authNameAndScheme.authName, authNameAndScheme.authScheme, projectPath, destinationApiSpecPath, destinationPluginManifestPath, false);
|
|
1495
1431
|
}
|
|
1496
1432
|
const declarativeAgentManifestPath = gptManifestFilePathRes.value;
|
|
1497
|
-
const declarativeAgentManifesRes = await
|
|
1433
|
+
const declarativeAgentManifesRes = await (0, exports.readCopilotGptManifestFile)(declarativeAgentManifestPath);
|
|
1498
1434
|
if (declarativeAgentManifesRes.isErr()) {
|
|
1499
1435
|
return (0, teamsfx_api_1.err)(declarativeAgentManifesRes.error);
|
|
1500
1436
|
}
|
|
@@ -1511,7 +1447,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1511
1447
|
.showMessage("info", successMessage, false, viewPluginManifest)
|
|
1512
1448
|
.then((userRes) => {
|
|
1513
1449
|
if (userRes.isOk() && userRes.value === viewPluginManifest) {
|
|
1514
|
-
context.telemetryReporter
|
|
1450
|
+
context.telemetryReporter?.sendTelemetryEvent(telemetry_1.TelemetryEvent.ViewPluginManifestAfterAdded);
|
|
1515
1451
|
void globalVars_1.TOOLS?.ui?.openFile?.(destinationPluginManifestPath);
|
|
1516
1452
|
}
|
|
1517
1453
|
});
|
|
@@ -1522,20 +1458,6 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1522
1458
|
}
|
|
1523
1459
|
return (0, teamsfx_api_1.ok)(undefined);
|
|
1524
1460
|
}
|
|
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
1461
|
/**
|
|
1540
1462
|
* Add Knowledge
|
|
1541
1463
|
*/
|
|
@@ -1558,7 +1480,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1558
1480
|
if (!agent?.file) {
|
|
1559
1481
|
return (0, teamsfx_api_1.err)(results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.TeamsAppRequiredPropertyMissingError.name, errors_1.AppStudioError.TeamsAppRequiredPropertyMissingError.message("declarativeAgents", teamsManifestPath)));
|
|
1560
1482
|
}
|
|
1561
|
-
const agentFilePathRes = await
|
|
1483
|
+
const agentFilePathRes = await (0, exports.getManifestPath)(teamsManifestPath);
|
|
1562
1484
|
if (agentFilePathRes.isErr()) {
|
|
1563
1485
|
return (0, teamsfx_api_1.err)(agentFilePathRes.error);
|
|
1564
1486
|
}
|
|
@@ -1600,6 +1522,282 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1600
1522
|
this.showAddKnowledgeSuccessMessage(context, inputs, agentManifestPath, knowledgeSource);
|
|
1601
1523
|
return (0, teamsfx_api_1.ok)(result);
|
|
1602
1524
|
}
|
|
1525
|
+
/**
|
|
1526
|
+
* Add Skill
|
|
1527
|
+
*/
|
|
1528
|
+
async addSkill(inputs) {
|
|
1529
|
+
if (!featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.AgentSkillsManifest)) {
|
|
1530
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "AgentSkillsDisabled", (0, localizeUtils_1.getLocalizedString)("core.addSkill.featureFlagDisabled")));
|
|
1531
|
+
}
|
|
1532
|
+
if (!inputs.projectPath) {
|
|
1533
|
+
throw new Error("projectPath is undefined"); // should never happen
|
|
1534
|
+
}
|
|
1535
|
+
const context = (0, globalVars_1.createContext)();
|
|
1536
|
+
const projectPath = inputs.projectPath;
|
|
1537
|
+
const teamsManifestPath = path.resolve(projectPath, inputs[constants_3.QuestionNames.ManifestPath]);
|
|
1538
|
+
const appPackageFolder = path.dirname(teamsManifestPath);
|
|
1539
|
+
// Validate the project is valid for adding a skill
|
|
1540
|
+
const manifestRes = await ManifestUtils_1.manifestUtils._readAppManifest(teamsManifestPath);
|
|
1541
|
+
if (manifestRes.isErr()) {
|
|
1542
|
+
return (0, teamsfx_api_1.err)(manifestRes.error);
|
|
1543
|
+
}
|
|
1544
|
+
const teamsManifest = manifestRes.value;
|
|
1545
|
+
const agent = teamsManifest.copilotExtensions
|
|
1546
|
+
? teamsManifest.copilotExtensions.declarativeCopilots?.[0]
|
|
1547
|
+
: teamsManifest.copilotAgents?.declarativeAgents?.[0];
|
|
1548
|
+
if (!agent?.file) {
|
|
1549
|
+
return (0, teamsfx_api_1.err)(results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.TeamsAppRequiredPropertyMissingError.name, errors_1.AppStudioError.TeamsAppRequiredPropertyMissingError.message("declarativeAgents", teamsManifestPath)));
|
|
1550
|
+
}
|
|
1551
|
+
const agentFilePathRes = await (0, exports.getManifestPath)(teamsManifestPath);
|
|
1552
|
+
if (agentFilePathRes.isErr()) {
|
|
1553
|
+
return (0, teamsfx_api_1.err)(agentFilePathRes.error);
|
|
1554
|
+
}
|
|
1555
|
+
const agentManifestPath = agentFilePathRes.value;
|
|
1556
|
+
// Confirm before modifying files (matches addPlugin pattern)
|
|
1557
|
+
const confirmMessage = (0, localizeUtils_1.getLocalizedString)("core.addSkill.confirm", path.relative(inputs.projectPath, appPackageFolder));
|
|
1558
|
+
const confirmRes = await context.userInteraction.showMessage("warn", confirmMessage, true, (0, localizeUtils_1.getLocalizedString)("core.addSkill.continue"));
|
|
1559
|
+
(0, cancellation_1.throwIfAborted)(inputs);
|
|
1560
|
+
if (confirmRes.isErr()) {
|
|
1561
|
+
return (0, teamsfx_api_1.err)(confirmRes.error);
|
|
1562
|
+
}
|
|
1563
|
+
else if (confirmRes.value !== (0, localizeUtils_1.getLocalizedString)("core.addSkill.continue")) {
|
|
1564
|
+
return (0, teamsfx_api_1.err)(new common_2.UserCancelError());
|
|
1565
|
+
}
|
|
1566
|
+
const skillName = inputs[constants_3.QuestionNames.SkillName];
|
|
1567
|
+
const skillDescription = inputs[constants_3.QuestionNames.SkillDescription];
|
|
1568
|
+
const skillFrom = inputs[constants_3.QuestionNames.SkillFrom];
|
|
1569
|
+
const skillFromZipFile = inputs[constants_3.QuestionNames.SkillFromZipFile];
|
|
1570
|
+
let skillFolder;
|
|
1571
|
+
if (skillFrom || skillFromZipFile) {
|
|
1572
|
+
const isZipImport = skillFromZipFile || (skillFrom && skillFrom.toLowerCase().endsWith(".zip"));
|
|
1573
|
+
const sourcePath = (skillFromZipFile || skillFrom);
|
|
1574
|
+
if (isZipImport) {
|
|
1575
|
+
// Zip import mode
|
|
1576
|
+
const importRes = await this.importSkillFromZip(sourcePath, appPackageFolder, agentManifestPath);
|
|
1577
|
+
if (importRes.isErr()) {
|
|
1578
|
+
return (0, teamsfx_api_1.err)(importRes.error);
|
|
1579
|
+
}
|
|
1580
|
+
skillFolder = importRes.value;
|
|
1581
|
+
}
|
|
1582
|
+
else {
|
|
1583
|
+
// Existing skill folder mode: validate it's within appPackage
|
|
1584
|
+
const skillAbsPath = path.resolve(appPackageFolder, sourcePath);
|
|
1585
|
+
const relativePath = path.relative(appPackageFolder, skillAbsPath);
|
|
1586
|
+
if (relativePath.startsWith("..")) {
|
|
1587
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "SkillOutsideAppPackage", "The skill directory must be within the app package folder."));
|
|
1588
|
+
}
|
|
1589
|
+
// Validate folder name format
|
|
1590
|
+
const folderName = path.basename(skillAbsPath);
|
|
1591
|
+
const namePattern = /^[a-zA-Z][a-zA-Z0-9-]*$/;
|
|
1592
|
+
if (!namePattern.test(folderName)) {
|
|
1593
|
+
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.`));
|
|
1594
|
+
}
|
|
1595
|
+
// Validate SKILL.md exists
|
|
1596
|
+
const skillMdPath = path.join(skillAbsPath, "SKILL.md");
|
|
1597
|
+
if (!(await fs_extra_1.default.pathExists(skillMdPath))) {
|
|
1598
|
+
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.`));
|
|
1599
|
+
}
|
|
1600
|
+
// Validate skill name in SKILL.md matches folder name
|
|
1601
|
+
const skillMdContent = await fs_extra_1.default.readFile(skillMdPath, "utf-8");
|
|
1602
|
+
const nameMatch = skillMdContent.match(/^---[\s\S]*?^name:\s*(.+)$/m);
|
|
1603
|
+
if (nameMatch) {
|
|
1604
|
+
const skillMdName = nameMatch[1].trim();
|
|
1605
|
+
if (skillMdName !== folderName) {
|
|
1606
|
+
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.`));
|
|
1607
|
+
}
|
|
1608
|
+
}
|
|
1609
|
+
skillFolder = (0, utils_2.normalizePath)(path.relative(path.dirname(agentManifestPath), skillAbsPath), true);
|
|
1610
|
+
}
|
|
1611
|
+
}
|
|
1612
|
+
else {
|
|
1613
|
+
// New skill mode: create the directory and SKILL.md
|
|
1614
|
+
const skillDir = path.join(appPackageFolder, "skills", skillName);
|
|
1615
|
+
await fs_extra_1.default.ensureDir(skillDir);
|
|
1616
|
+
const skillMdContent = [
|
|
1617
|
+
"---",
|
|
1618
|
+
`name: ${skillName}`,
|
|
1619
|
+
`description: ${skillDescription}`,
|
|
1620
|
+
"---",
|
|
1621
|
+
`# ${skillName}`,
|
|
1622
|
+
"",
|
|
1623
|
+
"<!-- Add your skill instructions here -->",
|
|
1624
|
+
"<!-- The agent will follow these instructions when this skill is activated -->",
|
|
1625
|
+
"",
|
|
1626
|
+
].join("\n");
|
|
1627
|
+
await fs_extra_1.default.writeFile(path.join(skillDir, "SKILL.md"), skillMdContent);
|
|
1628
|
+
skillFolder = (0, utils_2.normalizePath)(path.relative(path.dirname(agentManifestPath), skillDir), true);
|
|
1629
|
+
}
|
|
1630
|
+
// Add skill entry to DA manifest
|
|
1631
|
+
const addSkillRes = await CopilotGptManifestUtils_1.copilotGptManifestUtils.addSkill(agentManifestPath, skillFolder);
|
|
1632
|
+
if (addSkillRes.isErr()) {
|
|
1633
|
+
return (0, teamsfx_api_1.err)(addSkillRes.error);
|
|
1634
|
+
}
|
|
1635
|
+
// Optionally expose skill to Copilot via top-level Teams manifest agentSkills
|
|
1636
|
+
const exposeToCopilot = inputs[constants_3.QuestionNames.ExposeToCopilot];
|
|
1637
|
+
if (exposeToCopilot === true || exposeToCopilot === "yes") {
|
|
1638
|
+
// Compute folder path relative to app package folder (Teams manifest dir)
|
|
1639
|
+
const skillAbsPath = path.resolve(path.dirname(agentManifestPath), skillFolder);
|
|
1640
|
+
const teamsManifestSkillFolder = (0, utils_2.normalizePath)(path.relative(appPackageFolder, skillAbsPath), true);
|
|
1641
|
+
// Read, update, and write the Teams manifest
|
|
1642
|
+
const teamsManifestForSkill = manifestRes.value;
|
|
1643
|
+
if (!teamsManifestForSkill.agentSkills) {
|
|
1644
|
+
teamsManifestForSkill.agentSkills = [];
|
|
1645
|
+
}
|
|
1646
|
+
if (!teamsManifestForSkill.agentSkills.some((s) => s.folder === teamsManifestSkillFolder)) {
|
|
1647
|
+
teamsManifestForSkill.agentSkills.push({ folder: teamsManifestSkillFolder });
|
|
1648
|
+
}
|
|
1649
|
+
await fs_extra_1.default.writeFile(teamsManifestPath, JSON.stringify(teamsManifestForSkill, null, 4));
|
|
1650
|
+
}
|
|
1651
|
+
// Show success message
|
|
1652
|
+
if (inputs.platform === teamsfx_api_1.Platform.VSCode) {
|
|
1653
|
+
const successMessage = (0, localizeUtils_1.getLocalizedString)("core.addSkill.success.vsc");
|
|
1654
|
+
const viewAgentManifest = (0, localizeUtils_1.getLocalizedString)("core.addSkill.success.viewAgentManifest");
|
|
1655
|
+
void context.userInteraction
|
|
1656
|
+
.showMessage("info", successMessage, false, viewAgentManifest)
|
|
1657
|
+
.then((userRes) => {
|
|
1658
|
+
if (userRes.isOk() && userRes.value === viewAgentManifest) {
|
|
1659
|
+
void globalVars_1.TOOLS?.ui?.openFile?.(agentManifestPath);
|
|
1660
|
+
}
|
|
1661
|
+
});
|
|
1662
|
+
}
|
|
1663
|
+
else {
|
|
1664
|
+
const successMessage = (0, localizeUtils_1.getLocalizedString)("core.addSkill.success", agentManifestPath);
|
|
1665
|
+
void context.userInteraction.showMessage("info", successMessage, false);
|
|
1666
|
+
}
|
|
1667
|
+
return (0, teamsfx_api_1.ok)(undefined);
|
|
1668
|
+
}
|
|
1669
|
+
/**
|
|
1670
|
+
* Import a skill from a .zip file into the appPackage/skills folder.
|
|
1671
|
+
* Validates zip entries for security, extracts to a temp directory, then moves atomically.
|
|
1672
|
+
*/
|
|
1673
|
+
async importSkillFromZip(zipPath, appPackageFolder, agentManifestPath) {
|
|
1674
|
+
// Resolve zip path relative to CWD (not appPackage)
|
|
1675
|
+
const resolvedZipPath = path.resolve(zipPath);
|
|
1676
|
+
if (!(await fs_extra_1.default.pathExists(resolvedZipPath))) {
|
|
1677
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "ZipFileNotFound", `Zip file not found: ${resolvedZipPath}`));
|
|
1678
|
+
}
|
|
1679
|
+
let zip;
|
|
1680
|
+
try {
|
|
1681
|
+
zip = new adm_zip_1.default(resolvedZipPath);
|
|
1682
|
+
}
|
|
1683
|
+
catch {
|
|
1684
|
+
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.`));
|
|
1685
|
+
}
|
|
1686
|
+
const entries = zip.getEntries();
|
|
1687
|
+
// Metadata directories to ignore
|
|
1688
|
+
const ignoredPrefixes = ["__MACOSX/", ".DS_Store"];
|
|
1689
|
+
// Security: validate all entries before extraction
|
|
1690
|
+
for (const entry of entries) {
|
|
1691
|
+
const entryName = entry.entryName.replace(/\\/g, "/");
|
|
1692
|
+
if (entryName.includes("..") || path.isAbsolute(entryName) || entryName.startsWith("/")) {
|
|
1693
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "ZipInvalidEntries", (0, localizeUtils_1.getLocalizedString)("core.addSkill.zipInvalidEntries")));
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
// Filter out metadata entries
|
|
1697
|
+
const validEntries = entries.filter((entry) => {
|
|
1698
|
+
const entryName = entry.entryName.replace(/\\/g, "/");
|
|
1699
|
+
return !ignoredPrefixes.some((prefix) => entryName.startsWith(prefix) || entryName === prefix.replace("/", ""));
|
|
1700
|
+
});
|
|
1701
|
+
// Determine zip layout: single top-level directory or root-level files
|
|
1702
|
+
const topLevelDirs = new Set();
|
|
1703
|
+
let hasRootFiles = false;
|
|
1704
|
+
for (const entry of validEntries) {
|
|
1705
|
+
const entryName = entry.entryName.replace(/\\/g, "/");
|
|
1706
|
+
const parts = entryName.split("/").filter((p) => p.length > 0);
|
|
1707
|
+
if (parts.length === 1 && !entry.isDirectory) {
|
|
1708
|
+
hasRootFiles = true;
|
|
1709
|
+
}
|
|
1710
|
+
else if (parts.length >= 1) {
|
|
1711
|
+
topLevelDirs.add(parts[0]);
|
|
1712
|
+
}
|
|
1713
|
+
}
|
|
1714
|
+
let skillContentPrefix = "";
|
|
1715
|
+
let derivedSkillName;
|
|
1716
|
+
if (!hasRootFiles && topLevelDirs.size === 1) {
|
|
1717
|
+
// Single top-level directory layout
|
|
1718
|
+
skillContentPrefix = [...topLevelDirs][0] + "/";
|
|
1719
|
+
derivedSkillName = [...topLevelDirs][0];
|
|
1720
|
+
}
|
|
1721
|
+
else if (hasRootFiles) {
|
|
1722
|
+
// Root-level files layout: derive name from SKILL.md frontmatter
|
|
1723
|
+
const skillMdEntry = validEntries.find((e) => {
|
|
1724
|
+
const name = e.entryName.replace(/\\/g, "/");
|
|
1725
|
+
return name === "SKILL.md" || name === "./SKILL.md";
|
|
1726
|
+
});
|
|
1727
|
+
if (!skillMdEntry) {
|
|
1728
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "ZipNoSkillMd", (0, localizeUtils_1.getLocalizedString)("core.addSkill.zipNoSkillMd")));
|
|
1729
|
+
}
|
|
1730
|
+
const skillMdContent = skillMdEntry.getData().toString("utf-8");
|
|
1731
|
+
const nameMatch = skillMdContent.match(/^---[\s\S]*?^name:\s*(.+)$/m);
|
|
1732
|
+
if (!nameMatch) {
|
|
1733
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "ZipNoSkillMd", (0, localizeUtils_1.getLocalizedString)("core.addSkill.zipNoSkillMd") +
|
|
1734
|
+
" The SKILL.md file must include a 'name' field in its frontmatter."));
|
|
1735
|
+
}
|
|
1736
|
+
derivedSkillName = nameMatch[1].trim();
|
|
1737
|
+
}
|
|
1738
|
+
else {
|
|
1739
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "ZipInvalidLayout", (0, localizeUtils_1.getLocalizedString)("core.addSkill.zipInvalidLayout")));
|
|
1740
|
+
}
|
|
1741
|
+
// Validate skill name format
|
|
1742
|
+
const namePattern = /^[a-zA-Z][a-zA-Z0-9-]*$/;
|
|
1743
|
+
if (!namePattern.test(derivedSkillName)) {
|
|
1744
|
+
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.`));
|
|
1745
|
+
}
|
|
1746
|
+
// Check target folder doesn't already exist
|
|
1747
|
+
const targetSkillDir = path.join(appPackageFolder, "skills", derivedSkillName);
|
|
1748
|
+
if (await fs_extra_1.default.pathExists(targetSkillDir)) {
|
|
1749
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "SkillFolderAlreadyExists", (0, localizeUtils_1.getLocalizedString)("core.addSkill.zipSkillFolderExists", derivedSkillName)));
|
|
1750
|
+
}
|
|
1751
|
+
// Extract to temp directory first, then move atomically
|
|
1752
|
+
const tempDir = await fs_extra_1.default.mkdtemp(path.join(os.tmpdir(), "atk-skill-import-"));
|
|
1753
|
+
const tempSkillDir = path.join(tempDir, derivedSkillName);
|
|
1754
|
+
try {
|
|
1755
|
+
await fs_extra_1.default.ensureDir(tempSkillDir);
|
|
1756
|
+
// Extract relevant entries
|
|
1757
|
+
for (const entry of validEntries) {
|
|
1758
|
+
if (entry.isDirectory)
|
|
1759
|
+
continue;
|
|
1760
|
+
const entryName = entry.entryName.replace(/\\/g, "/");
|
|
1761
|
+
let relativeName = entryName;
|
|
1762
|
+
if (skillContentPrefix && entryName.startsWith(skillContentPrefix)) {
|
|
1763
|
+
relativeName = entryName.slice(skillContentPrefix.length);
|
|
1764
|
+
}
|
|
1765
|
+
if (!relativeName)
|
|
1766
|
+
continue;
|
|
1767
|
+
const targetPath = path.join(tempSkillDir, relativeName);
|
|
1768
|
+
// Re-validate no path traversal after joining
|
|
1769
|
+
const normalizedTarget = path.resolve(targetPath);
|
|
1770
|
+
if (!normalizedTarget.startsWith(path.resolve(tempSkillDir))) {
|
|
1771
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "ZipInvalidEntries", (0, localizeUtils_1.getLocalizedString)("core.addSkill.zipInvalidEntries")));
|
|
1772
|
+
}
|
|
1773
|
+
await fs_extra_1.default.ensureDir(path.dirname(targetPath));
|
|
1774
|
+
await fs_extra_1.default.writeFile(targetPath, entry.getData());
|
|
1775
|
+
}
|
|
1776
|
+
// Validate SKILL.md exists in extracted content
|
|
1777
|
+
const extractedSkillMdPath = path.join(tempSkillDir, "SKILL.md");
|
|
1778
|
+
if (!(await fs_extra_1.default.pathExists(extractedSkillMdPath))) {
|
|
1779
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "ZipNoSkillMd", (0, localizeUtils_1.getLocalizedString)("core.addSkill.zipNoSkillMd")));
|
|
1780
|
+
}
|
|
1781
|
+
// Validate name in SKILL.md matches derived folder name
|
|
1782
|
+
const extractedSkillMd = await fs_extra_1.default.readFile(extractedSkillMdPath, "utf-8");
|
|
1783
|
+
const extractedNameMatch = extractedSkillMd.match(/^---[\s\S]*?^name:\s*(.+)$/m);
|
|
1784
|
+
if (extractedNameMatch) {
|
|
1785
|
+
const extractedName = extractedNameMatch[1].trim();
|
|
1786
|
+
if (extractedName !== derivedSkillName) {
|
|
1787
|
+
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.`));
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1790
|
+
// Move to final location
|
|
1791
|
+
await fs_extra_1.default.ensureDir(path.dirname(targetSkillDir));
|
|
1792
|
+
await fs_extra_1.default.move(tempSkillDir, targetSkillDir);
|
|
1793
|
+
}
|
|
1794
|
+
finally {
|
|
1795
|
+
// Clean up temp directory
|
|
1796
|
+
await fs_extra_1.default.remove(tempDir).catch(() => { });
|
|
1797
|
+
}
|
|
1798
|
+
const skillFolder = (0, utils_2.normalizePath)(path.relative(path.dirname(agentManifestPath), targetSkillDir), true);
|
|
1799
|
+
return (0, teamsfx_api_1.ok)(skillFolder);
|
|
1800
|
+
}
|
|
1603
1801
|
/**
|
|
1604
1802
|
* only for vs code extension
|
|
1605
1803
|
*/
|
|
@@ -1634,12 +1832,12 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1634
1832
|
if (!declarativeGpt?.file) {
|
|
1635
1833
|
return (0, teamsfx_api_1.err)(results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.TeamsAppRequiredPropertyMissingError.name, errors_1.AppStudioError.TeamsAppRequiredPropertyMissingError.message("declarativeCopilots", teamsManifestPath)));
|
|
1636
1834
|
}
|
|
1637
|
-
const gptManifestFilePathRes = await
|
|
1835
|
+
const gptManifestFilePathRes = await (0, exports.getManifestPath)(teamsManifestPath);
|
|
1638
1836
|
if (gptManifestFilePathRes.isErr()) {
|
|
1639
1837
|
return (0, teamsfx_api_1.err)(gptManifestFilePathRes.error);
|
|
1640
1838
|
}
|
|
1641
1839
|
const declarativeCopilotManifestPath = gptManifestFilePathRes.value;
|
|
1642
|
-
const declarativeCopilotManifesRes = await
|
|
1840
|
+
const declarativeCopilotManifesRes = await (0, exports.readCopilotGptManifestFile)(declarativeCopilotManifestPath);
|
|
1643
1841
|
if (declarativeCopilotManifesRes.isErr()) {
|
|
1644
1842
|
return (0, teamsfx_api_1.err)(declarativeCopilotManifesRes.error);
|
|
1645
1843
|
}
|
|
@@ -1662,7 +1860,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1662
1860
|
suffix += 1;
|
|
1663
1861
|
actionId = `action_${suffix}`;
|
|
1664
1862
|
}
|
|
1665
|
-
const addActionRes = await CopilotGptManifestUtils_1.copilotGptManifestUtils.addAction(declarativeCopilotManifestPath, actionId, (0,
|
|
1863
|
+
const addActionRes = await CopilotGptManifestUtils_1.copilotGptManifestUtils.addAction(declarativeCopilotManifestPath, actionId, (0, utils_2.normalizePath)(path.relative(appPackageFolder, pluginManifestFilePath), true));
|
|
1666
1864
|
if (addActionRes.isErr()) {
|
|
1667
1865
|
return (0, teamsfx_api_1.err)(addActionRes.error);
|
|
1668
1866
|
}
|
|
@@ -1673,10 +1871,10 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1673
1871
|
// 2. Update teamsapp.local.yaml and teamsapp.yaml if need to add auth action
|
|
1674
1872
|
const specPath = inputs[constants_3.QuestionNames.ApiSpecLocation].trim();
|
|
1675
1873
|
for (const authInfo of authData) {
|
|
1676
|
-
await
|
|
1874
|
+
await openApiSpecHelper.injectAuthAction(inputs.projectPath, authInfo.authName, undefined, specPath, false, authInfo.authType === "apiKey" ? "ApiKeyPluginVault" : "OAuthPluginVault", false, authInfo.registrationId);
|
|
1677
1875
|
}
|
|
1678
1876
|
// 3. Update plugin manifest to add ac info (optional)
|
|
1679
|
-
await (0,
|
|
1877
|
+
await (0, helper_1.generateAdaptiveCardInPluginManifestForKiota)(pluginManifestFilePath, specPath, context);
|
|
1680
1878
|
for (const action of declarativeCopilotManifest.actions) {
|
|
1681
1879
|
const actionPath = path.normalize(path.join(appPackageFolder, action.file));
|
|
1682
1880
|
await CopilotGptManifestUtils_1.copilotGptManifestUtils.updateConversationStarters(actionPath, declarativeCopilotManifest);
|
|
@@ -1736,7 +1934,8 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1736
1934
|
};
|
|
1737
1935
|
}
|
|
1738
1936
|
// Update openapi spec
|
|
1739
|
-
const specParser = new m365_spec_parser_1.SpecParser(apiSpecPath, (0,
|
|
1937
|
+
const specParser = new m365_spec_parser_1.SpecParser(apiSpecPath, (0, helper_1.getParserOptions)(m365_spec_parser_1.ProjectType.Copilot, true));
|
|
1938
|
+
(0, cancellation_1.throwIfAborted)(inputs);
|
|
1740
1939
|
await specParser.addAuthScheme(authName, authType, authParameters);
|
|
1741
1940
|
let authTypeScheme;
|
|
1742
1941
|
switch (authType) {
|
|
@@ -1752,7 +1951,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1752
1951
|
authTypeScheme = constant_1.MicrosoftEntraAuthType;
|
|
1753
1952
|
break;
|
|
1754
1953
|
}
|
|
1755
|
-
const addAuthActionRes = await
|
|
1954
|
+
const addAuthActionRes = await openApiSpecHelper.injectAuthAction(inputs.projectPath, authName, undefined, apiSpecPath, true, authTypeScheme, "enablePKCE" in authParameters ? authParameters.enablePKCE : undefined);
|
|
1756
1955
|
if (addAuthActionRes?.registrationIdEnvName) {
|
|
1757
1956
|
const pluginManifest = (await fs_extra_1.default.readJson(pluginManifestPath));
|
|
1758
1957
|
pluginManifest.runtimes?.forEach((runtime) => {
|
|
@@ -1785,17 +1984,17 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1785
1984
|
const appIdUriPlaceholder = m365_spec_parser_1.Utils.getSafeRegistrationIdEnvName(`${authName}_APPLICATION_ID_URI`);
|
|
1786
1985
|
void context.userInteraction.showMessage("warn", (0, localizeUtils_1.getLocalizedString)("core.addAuthAction.microsoftEntra.message", appIdUriPlaceholder), false);
|
|
1787
1986
|
}
|
|
1788
|
-
context.telemetryReporter
|
|
1987
|
+
context.telemetryReporter?.sendTelemetryEvent(telemetry_1.TelemetryEvent.AddAuthAction, {
|
|
1789
1988
|
[telemetry_1.TelemetryProperty.AddAuthType]: authType,
|
|
1790
1989
|
});
|
|
1791
1990
|
}
|
|
1792
|
-
catch (
|
|
1793
|
-
const error = (0, common_2.assembleError)(
|
|
1794
|
-
context.telemetryReporter
|
|
1991
|
+
catch (e) {
|
|
1992
|
+
const error = (0, common_2.assembleError)(e);
|
|
1993
|
+
context.telemetryReporter?.sendTelemetryErrorEvent(telemetry_1.TelemetryEvent.AddAuthAction, {
|
|
1795
1994
|
[telemetry_1.TelemetryProperty.ErrorCode]: error.name,
|
|
1796
1995
|
[telemetry_1.TelemetryProperty.ErrorMessage]: error.message,
|
|
1797
1996
|
});
|
|
1798
|
-
return err(error);
|
|
1997
|
+
return (0, teamsfx_api_1.err)(error);
|
|
1799
1998
|
}
|
|
1800
1999
|
return (0, teamsfx_api_1.ok)(undefined);
|
|
1801
2000
|
}
|
|
@@ -1832,7 +2031,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1832
2031
|
}
|
|
1833
2032
|
async installAppToChannel(inputs) {
|
|
1834
2033
|
const installAppDriver = typedi_1.Container.get("devChannel/installApp");
|
|
1835
|
-
const context = (0,
|
|
2034
|
+
const context = (0, utils_3.createDriverContext)(inputs);
|
|
1836
2035
|
(0, globalVars_1.setErrorContext)({ component: "devChannelInstallApp" });
|
|
1837
2036
|
const env = inputs.env;
|
|
1838
2037
|
const readEnvRes = await envUtil_1.envUtil.readEnv(context.projectPath, env, false, false);
|
|
@@ -1855,29 +2054,48 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1855
2054
|
* dynamic template metadata download
|
|
1856
2055
|
*/
|
|
1857
2056
|
async fetchOnlineTemplateMetadata() {
|
|
1858
|
-
if (
|
|
2057
|
+
if (templateHelper.useLocalTemplate()) {
|
|
1859
2058
|
return (0, teamsfx_api_1.ok)(undefined); // Skip if using local templates
|
|
1860
2059
|
}
|
|
1861
2060
|
// Downloads the latest online template metadata (metadata.zip) into user's home .fx folder.
|
|
1862
2061
|
// Caches the template version so subsequent calls avoid redundant downloads if unchanged.
|
|
1863
2062
|
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
|
-
}
|
|
2063
|
+
const useV4Channel = featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.V4Enabled);
|
|
1877
2064
|
const homedir = os.homedir();
|
|
1878
2065
|
const metadataDir = path.join(homedir, `.${String(teamsfx_api_1.ConfigFolderName)}`);
|
|
1879
2066
|
await fs_extra_1.default.ensureDir(metadataDir);
|
|
1880
|
-
|
|
2067
|
+
let latestVersion;
|
|
2068
|
+
if (useV4Channel) {
|
|
2069
|
+
// V4 publishes templates-metadata.zip as a staged artifact. Resolve it
|
|
2070
|
+
// through the shared artifact cache and leave the legacy ~/.fx metadata
|
|
2071
|
+
// directory untouched so old metadata readers keep using bundled v4 data.
|
|
2072
|
+
const resolved = await (0, v4MetadataSource_1.resolveV4MetadataSource)();
|
|
2073
|
+
if (resolved.isErr()) {
|
|
2074
|
+
// Malformed tag list / digest mismatch are hard errors (no silent
|
|
2075
|
+
// fallback). An unreachable channel does not reach here — it already
|
|
2076
|
+
// resolved to a bundled-fallback origin handled below.
|
|
2077
|
+
return (0, teamsfx_api_1.err)(resolved.error);
|
|
2078
|
+
}
|
|
2079
|
+
return (0, teamsfx_api_1.ok)(undefined);
|
|
2080
|
+
}
|
|
2081
|
+
else {
|
|
2082
|
+
// v3: prerelease builds use the mutable rolling `0.0.0-rc` tag; stable
|
|
2083
|
+
// builds resolve the latest published templates version.
|
|
2084
|
+
const coreVersion = getCoreVersion();
|
|
2085
|
+
if (coreVersion.includes("alpha") ||
|
|
2086
|
+
coreVersion.includes("beta") ||
|
|
2087
|
+
coreVersion.includes("rc")) {
|
|
2088
|
+
latestVersion = "0.0.0-rc";
|
|
2089
|
+
}
|
|
2090
|
+
else {
|
|
2091
|
+
latestVersion = await generatorUtils.getTemplateLatestVersion();
|
|
2092
|
+
}
|
|
2093
|
+
}
|
|
2094
|
+
// Use a channel-specific cache file so flipping the flag triggers a fresh
|
|
2095
|
+
// download instead of a stale v3 cache hit; the v4 file's presence is also
|
|
2096
|
+
// the readers' signal (`useBundledMetadataForV4`) that downloaded v4
|
|
2097
|
+
// metadata is available.
|
|
2098
|
+
const versionFile = path.join(metadataDir, useV4Channel ? "template-version-v4.txt" : "template-version.txt");
|
|
1881
2099
|
const needDownload = async () => {
|
|
1882
2100
|
// Always re-download for mutable pre-release tags (content changes but tag stays the same)
|
|
1883
2101
|
if (latestVersion === "0.0.0-rc")
|
|
@@ -1895,11 +2113,12 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1895
2113
|
if (!(await needDownload())) {
|
|
1896
2114
|
return (0, teamsfx_api_1.ok)(undefined); // Already up-to-date
|
|
1897
2115
|
}
|
|
1898
|
-
// Construct metadata.zip download URL based on tag prefix and version
|
|
1899
|
-
const
|
|
2116
|
+
// Construct metadata.zip download URL based on tag prefix and version.
|
|
2117
|
+
const tagPrefix = useV4Channel ? templates_config_json_1.default.v4tagPrefix : templates_config_json_1.default.tagPrefix;
|
|
2118
|
+
const tag = `${tagPrefix}${latestVersion}`;
|
|
1900
2119
|
const metadataZipUrl = `${templates_config_json_1.default.templateDownloadBaseURL}/${tag}/metadata.zip`;
|
|
1901
|
-
const zip = await
|
|
1902
|
-
await
|
|
2120
|
+
const zip = await generatorUtils.fetchZipFromUrl(metadataZipUrl);
|
|
2121
|
+
await generatorUtils.unzip(zip, metadataDir);
|
|
1903
2122
|
await fs_extra_1.default.writeFile(versionFile, latestVersion, { encoding: "utf-8" });
|
|
1904
2123
|
// Clear locale cache so freshly downloaded NLS files are picked up
|
|
1905
2124
|
(0, localizeUtils_1.clearLocaleCache)();
|
|
@@ -1915,16 +2134,16 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1915
2134
|
* dynamic VS template metadata download
|
|
1916
2135
|
*/
|
|
1917
2136
|
async fetchOnlineTemplateMetadataForVS() {
|
|
1918
|
-
if (
|
|
2137
|
+
if (templateHelper.useLocalTemplate()) {
|
|
1919
2138
|
return (0, teamsfx_api_1.ok)(undefined); // Skip if using local templates
|
|
1920
2139
|
}
|
|
1921
2140
|
try {
|
|
1922
2141
|
// VS ships stable templates with a stable fx-core and test/pre-release
|
|
1923
2142
|
// templates with a beta fx-core. So beta = pre-stable test build → RC.
|
|
1924
|
-
const coreVersion =
|
|
2143
|
+
const coreVersion = getCoreVersion();
|
|
1925
2144
|
const latestVersion = coreVersion.includes("beta")
|
|
1926
2145
|
? "0.0.0-rc"
|
|
1927
|
-
: await
|
|
2146
|
+
: await generatorUtils.getTemplateVSLatestVersion();
|
|
1928
2147
|
const homedir = os.homedir();
|
|
1929
2148
|
const metadataDir = path.join(homedir, `.${String(teamsfx_api_1.ConfigFolderName)}`, "vs-metadata");
|
|
1930
2149
|
await fs_extra_1.default.ensureDir(metadataDir);
|
|
@@ -1945,8 +2164,8 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1945
2164
|
}
|
|
1946
2165
|
const tag = `${templates_config_json_1.default.vstagPrefix}${latestVersion}`;
|
|
1947
2166
|
const metadataZipUrl = `${templates_config_json_1.default.templateDownloadBaseURL}/${tag}/metadata.zip`;
|
|
1948
|
-
const zip = await
|
|
1949
|
-
await
|
|
2167
|
+
const zip = await generatorUtils.fetchZipFromUrl(metadataZipUrl);
|
|
2168
|
+
await generatorUtils.unzip(zip, metadataDir);
|
|
1950
2169
|
await fs_extra_1.default.writeFile(versionFile, latestVersion, { encoding: "utf-8" });
|
|
1951
2170
|
return (0, teamsfx_api_1.ok)(undefined);
|
|
1952
2171
|
}
|
|
@@ -1964,7 +2183,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
1964
2183
|
}
|
|
1965
2184
|
async updateAuthActionInYaml(authName, authScheme, projectPath, apSpecPath, pluginManifestPath, forceToAddNew = true) {
|
|
1966
2185
|
if (authName && authScheme) {
|
|
1967
|
-
const authInjectRes = await
|
|
2186
|
+
const authInjectRes = await openApiSpecHelper.injectAuthAction(projectPath, authName, authScheme, apSpecPath, forceToAddNew);
|
|
1968
2187
|
if (authInjectRes?.defaultRegistrationIdEnvName &&
|
|
1969
2188
|
authInjectRes?.registrationIdEnvName &&
|
|
1970
2189
|
authInjectRes.defaultRegistrationIdEnvName !== authInjectRes.registrationIdEnvName) {
|
|
@@ -2013,7 +2232,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
2013
2232
|
return (0, teamsfx_api_1.ok)((0, projectTypeChecker_1.IsDeclarativeAgentManifest)(manifestRes.value));
|
|
2014
2233
|
}
|
|
2015
2234
|
async addOneDriveSharePointKnowledge(inputs, agentManifestPath) {
|
|
2016
|
-
const manifestRes = await
|
|
2235
|
+
const manifestRes = await (0, exports.readCopilotGptManifestFile)(agentManifestPath);
|
|
2017
2236
|
if (manifestRes.isErr()) {
|
|
2018
2237
|
return (0, teamsfx_api_1.err)(manifestRes.error);
|
|
2019
2238
|
}
|
|
@@ -2041,7 +2260,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
2041
2260
|
return (0, teamsfx_api_1.ok)(undefined);
|
|
2042
2261
|
}
|
|
2043
2262
|
async addWebSearchKnowledge(context, inputs, agentManifestPath) {
|
|
2044
|
-
const manifestRes = await
|
|
2263
|
+
const manifestRes = await (0, exports.readCopilotGptManifestFile)(agentManifestPath);
|
|
2045
2264
|
if (manifestRes.isErr()) {
|
|
2046
2265
|
return (0, teamsfx_api_1.err)(manifestRes.error);
|
|
2047
2266
|
}
|
|
@@ -2058,7 +2277,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
2058
2277
|
return (0, teamsfx_api_1.ok)(undefined);
|
|
2059
2278
|
}
|
|
2060
2279
|
async addGCKnowledge(inputs, agentManifestPath) {
|
|
2061
|
-
const manifestRes = await
|
|
2280
|
+
const manifestRes = await (0, exports.readCopilotGptManifestFile)(agentManifestPath);
|
|
2062
2281
|
if (manifestRes.isErr()) {
|
|
2063
2282
|
return (0, teamsfx_api_1.err)(manifestRes.error);
|
|
2064
2283
|
}
|
|
@@ -2093,7 +2312,7 @@ class FxCore extends FxCore_declarativeAgent_1.FxCoreDeclarativeAgentPart {
|
|
|
2093
2312
|
.showMessage("info", successMessage, false, viewAgentManifest)
|
|
2094
2313
|
.then((userRes) => {
|
|
2095
2314
|
if (userRes.isOk() && userRes.value === viewAgentManifest) {
|
|
2096
|
-
context.telemetryReporter
|
|
2315
|
+
context.telemetryReporter?.sendTelemetryEvent(telemetry_1.TelemetryEvent.ViewAgentManifestAfterAdded);
|
|
2097
2316
|
void globalVars_1.TOOLS?.ui?.openFile?.(agentManifestPath);
|
|
2098
2317
|
}
|
|
2099
2318
|
});
|
|
@@ -2115,6 +2334,15 @@ tslib_1.__decorate([
|
|
|
2115
2334
|
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
2116
2335
|
tslib_1.__metadata("design:returntype", Promise)
|
|
2117
2336
|
], FxCore.prototype, "createProject", null);
|
|
2337
|
+
tslib_1.__decorate([
|
|
2338
|
+
(0, hooks_1.hooks)([
|
|
2339
|
+
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "createProjectFrontDoor", reset: true }),
|
|
2340
|
+
errorHandler_1.ErrorHandlerMW,
|
|
2341
|
+
]),
|
|
2342
|
+
tslib_1.__metadata("design:type", Function),
|
|
2343
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
2344
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
2345
|
+
], FxCore.prototype, "createProjectFrontDoor", null);
|
|
2118
2346
|
tslib_1.__decorate([
|
|
2119
2347
|
(0, hooks_1.hooks)([
|
|
2120
2348
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "createProjectFromTdp", reset: true }),
|
|
@@ -2152,7 +2380,6 @@ tslib_1.__decorate([
|
|
|
2152
2380
|
(0, hooks_1.hooks)([
|
|
2153
2381
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "provision", reset: true }),
|
|
2154
2382
|
errorHandler_1.ErrorHandlerMW,
|
|
2155
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2156
2383
|
(0, envMW_1.EnvLoaderMW)(false),
|
|
2157
2384
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
2158
2385
|
contextInjector_1.ContextInjectorMW,
|
|
@@ -2166,7 +2393,6 @@ tslib_1.__decorate([
|
|
|
2166
2393
|
(0, hooks_1.hooks)([
|
|
2167
2394
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "uninstall", reset: true }),
|
|
2168
2395
|
errorHandler_1.ErrorHandlerMW,
|
|
2169
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2170
2396
|
(0, questionMW_1.QuestionMW)("uninstall"),
|
|
2171
2397
|
]),
|
|
2172
2398
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -2210,7 +2436,7 @@ tslib_1.__decorate([
|
|
|
2210
2436
|
errorHandler_1.ErrorHandlerMW,
|
|
2211
2437
|
]),
|
|
2212
2438
|
tslib_1.__metadata("design:type", Function),
|
|
2213
|
-
tslib_1.__metadata("design:paramtypes", [String, String]),
|
|
2439
|
+
tslib_1.__metadata("design:paramtypes", [String, String, AbortSignal]),
|
|
2214
2440
|
tslib_1.__metadata("design:returntype", Promise)
|
|
2215
2441
|
], FxCore.prototype, "uninstallM365App", null);
|
|
2216
2442
|
tslib_1.__decorate([
|
|
@@ -2219,7 +2445,7 @@ tslib_1.__decorate([
|
|
|
2219
2445
|
errorHandler_1.ErrorHandlerMW,
|
|
2220
2446
|
]),
|
|
2221
2447
|
tslib_1.__metadata("design:type", Function),
|
|
2222
|
-
tslib_1.__metadata("design:paramtypes", [String]),
|
|
2448
|
+
tslib_1.__metadata("design:paramtypes", [String, AbortSignal]),
|
|
2223
2449
|
tslib_1.__metadata("design:returntype", Promise)
|
|
2224
2450
|
], FxCore.prototype, "uninstallAppRegistration", null);
|
|
2225
2451
|
tslib_1.__decorate([
|
|
@@ -2228,14 +2454,13 @@ tslib_1.__decorate([
|
|
|
2228
2454
|
errorHandler_1.ErrorHandlerMW,
|
|
2229
2455
|
]),
|
|
2230
2456
|
tslib_1.__metadata("design:type", Function),
|
|
2231
|
-
tslib_1.__metadata("design:paramtypes", [String, String]),
|
|
2457
|
+
tslib_1.__metadata("design:paramtypes", [String, String, AbortSignal]),
|
|
2232
2458
|
tslib_1.__metadata("design:returntype", Promise)
|
|
2233
2459
|
], FxCore.prototype, "uninstallBotFrameworRegistration", null);
|
|
2234
2460
|
tslib_1.__decorate([
|
|
2235
2461
|
(0, hooks_1.hooks)([
|
|
2236
2462
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "deploy", reset: true }),
|
|
2237
2463
|
errorHandler_1.ErrorHandlerMW,
|
|
2238
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2239
2464
|
(0, envMW_1.EnvLoaderMW)(false),
|
|
2240
2465
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
2241
2466
|
contextInjector_1.ContextInjectorMW,
|
|
@@ -2255,7 +2480,6 @@ tslib_1.__decorate([
|
|
|
2255
2480
|
(0, hooks_1.hooks)([
|
|
2256
2481
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "deployAadManifest", reset: true }),
|
|
2257
2482
|
errorHandler_1.ErrorHandlerMW,
|
|
2258
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2259
2483
|
(0, questionMW_1.QuestionMW)("deployAadManifest"),
|
|
2260
2484
|
(0, envMW_1.EnvLoaderMW)(true, true),
|
|
2261
2485
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
@@ -2270,7 +2494,6 @@ tslib_1.__decorate([
|
|
|
2270
2494
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "addWebpart", reset: true }),
|
|
2271
2495
|
errorHandler_1.ErrorHandlerMW,
|
|
2272
2496
|
(0, questionMW_1.QuestionMW)("addWebpart"),
|
|
2273
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2274
2497
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
2275
2498
|
]),
|
|
2276
2499
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -2281,7 +2504,6 @@ tslib_1.__decorate([
|
|
|
2281
2504
|
(0, hooks_1.hooks)([
|
|
2282
2505
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "publish", reset: true }),
|
|
2283
2506
|
errorHandler_1.ErrorHandlerMW,
|
|
2284
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2285
2507
|
(0, envMW_1.EnvLoaderMW)(false),
|
|
2286
2508
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
2287
2509
|
contextInjector_1.ContextInjectorMW,
|
|
@@ -2296,7 +2518,6 @@ tslib_1.__decorate([
|
|
|
2296
2518
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "share", reset: true }),
|
|
2297
2519
|
errorHandler_1.ErrorHandlerMW,
|
|
2298
2520
|
(0, questionMW_1.QuestionMW)("removeSharedAccess"),
|
|
2299
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2300
2521
|
(0, envMW_1.EnvLoaderMW)(false),
|
|
2301
2522
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
2302
2523
|
contextInjector_1.ContextInjectorMW,
|
|
@@ -2310,7 +2531,6 @@ tslib_1.__decorate([
|
|
|
2310
2531
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "share", reset: true }),
|
|
2311
2532
|
errorHandler_1.ErrorHandlerMW,
|
|
2312
2533
|
(0, questionMW_1.QuestionMW)("share"),
|
|
2313
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2314
2534
|
(0, envMW_1.EnvLoaderMW)(false),
|
|
2315
2535
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
2316
2536
|
contextInjector_1.ContextInjectorMW,
|
|
@@ -2324,7 +2544,6 @@ tslib_1.__decorate([
|
|
|
2324
2544
|
(0, hooks_1.hooks)([
|
|
2325
2545
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "executeUserTask", reset: true }),
|
|
2326
2546
|
errorHandler_1.ErrorHandlerMW,
|
|
2327
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2328
2547
|
(0, envMW_1.EnvLoaderMW)(false),
|
|
2329
2548
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
2330
2549
|
]),
|
|
@@ -2336,7 +2555,6 @@ tslib_1.__decorate([
|
|
|
2336
2555
|
(0, hooks_1.hooks)([
|
|
2337
2556
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "buildAadManifest", reset: true }),
|
|
2338
2557
|
errorHandler_1.ErrorHandlerMW,
|
|
2339
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2340
2558
|
(0, envMW_1.EnvLoaderMW)(false),
|
|
2341
2559
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
2342
2560
|
]),
|
|
@@ -2358,7 +2576,6 @@ tslib_1.__decorate([
|
|
|
2358
2576
|
(0, hooks_1.hooks)([
|
|
2359
2577
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "deployTeamsManifest", reset: true }),
|
|
2360
2578
|
errorHandler_1.ErrorHandlerMW,
|
|
2361
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2362
2579
|
(0, questionMW_1.QuestionMW)("selectTeamsAppManifest"),
|
|
2363
2580
|
(0, envMW_1.EnvLoaderMW)(true),
|
|
2364
2581
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
@@ -2523,7 +2740,6 @@ tslib_1.__decorate([
|
|
|
2523
2740
|
(0, hooks_1.hooks)([
|
|
2524
2741
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "grantPermission", reset: true }),
|
|
2525
2742
|
errorHandler_1.ErrorHandlerMW,
|
|
2526
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2527
2743
|
(0, questionMW_1.QuestionMW)("grantPermission"),
|
|
2528
2744
|
(0, envMW_1.EnvLoaderMW)(false, true),
|
|
2529
2745
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
@@ -2537,7 +2753,6 @@ tslib_1.__decorate([
|
|
|
2537
2753
|
(0, hooks_1.hooks)([
|
|
2538
2754
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "checkPermission", reset: true }),
|
|
2539
2755
|
errorHandler_1.ErrorHandlerMW,
|
|
2540
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2541
2756
|
(0, questionMW_1.QuestionMW)("listCollaborator"),
|
|
2542
2757
|
(0, envMW_1.EnvLoaderMW)(false, true),
|
|
2543
2758
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
@@ -2551,7 +2766,6 @@ tslib_1.__decorate([
|
|
|
2551
2766
|
(0, hooks_1.hooks)([
|
|
2552
2767
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "listCollaborator", reset: true }),
|
|
2553
2768
|
errorHandler_1.ErrorHandlerMW,
|
|
2554
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2555
2769
|
(0, questionMW_1.QuestionMW)("listCollaborator"),
|
|
2556
2770
|
(0, envMW_1.EnvLoaderMW)(false, true),
|
|
2557
2771
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
@@ -2600,18 +2814,6 @@ tslib_1.__decorate([
|
|
|
2600
2814
|
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
2601
2815
|
tslib_1.__metadata("design:returntype", Promise)
|
|
2602
2816
|
], 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
2817
|
tslib_1.__decorate([
|
|
2616
2818
|
(0, hooks_1.hooks)([
|
|
2617
2819
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "projectVersionCheck", reset: true }),
|
|
@@ -2625,7 +2827,6 @@ tslib_1.__decorate([
|
|
|
2625
2827
|
(0, hooks_1.hooks)([
|
|
2626
2828
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "preProvisionForVS" }),
|
|
2627
2829
|
errorHandler_1.ErrorHandlerMW,
|
|
2628
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2629
2830
|
(0, envMW_1.EnvLoaderMW)(false),
|
|
2630
2831
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
2631
2832
|
contextInjector_1.ContextInjectorMW,
|
|
@@ -2638,7 +2839,6 @@ tslib_1.__decorate([
|
|
|
2638
2839
|
(0, hooks_1.hooks)([
|
|
2639
2840
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "preCheckYmlAndEnvForVS" }),
|
|
2640
2841
|
errorHandler_1.ErrorHandlerMW,
|
|
2641
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
2642
2842
|
(0, envMW_1.EnvLoaderMW)(false),
|
|
2643
2843
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
2644
2844
|
contextInjector_1.ContextInjectorMW,
|
|
@@ -2693,17 +2893,6 @@ tslib_1.__decorate([
|
|
|
2693
2893
|
tslib_1.__metadata("design:paramtypes", [String]),
|
|
2694
2894
|
tslib_1.__metadata("design:returntype", Promise)
|
|
2695
2895
|
], 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
2896
|
tslib_1.__decorate([
|
|
2708
2897
|
(0, hooks_1.hooks)([
|
|
2709
2898
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: teamsfx_api_1.Stage.RegeneratePlugin }),
|
|
@@ -2717,25 +2906,26 @@ tslib_1.__decorate([
|
|
|
2717
2906
|
], FxCore.prototype, "regeneratePlugin", null);
|
|
2718
2907
|
tslib_1.__decorate([
|
|
2719
2908
|
(0, hooks_1.hooks)([
|
|
2720
|
-
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: teamsfx_api_1.Stage.
|
|
2909
|
+
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: teamsfx_api_1.Stage.addKnowledge }),
|
|
2721
2910
|
errorHandler_1.ErrorHandlerMW,
|
|
2722
|
-
(0, questionMW_1.QuestionMW)("
|
|
2911
|
+
(0, questionMW_1.QuestionMW)("addKnowledge"),
|
|
2912
|
+
concurrentLocker_1.ConcurrentLockerMW,
|
|
2723
2913
|
]),
|
|
2724
2914
|
tslib_1.__metadata("design:type", Function),
|
|
2725
|
-
tslib_1.__metadata("design:paramtypes", [Object
|
|
2915
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
2726
2916
|
tslib_1.__metadata("design:returntype", Promise)
|
|
2727
|
-
], FxCore.prototype, "
|
|
2917
|
+
], FxCore.prototype, "addKnowledge", null);
|
|
2728
2918
|
tslib_1.__decorate([
|
|
2729
2919
|
(0, hooks_1.hooks)([
|
|
2730
|
-
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: teamsfx_api_1.Stage.
|
|
2920
|
+
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: teamsfx_api_1.Stage.addSkill }),
|
|
2731
2921
|
errorHandler_1.ErrorHandlerMW,
|
|
2732
|
-
(0, questionMW_1.QuestionMW)("
|
|
2922
|
+
(0, questionMW_1.QuestionMW)("addSkill"),
|
|
2733
2923
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
2734
2924
|
]),
|
|
2735
2925
|
tslib_1.__metadata("design:type", Function),
|
|
2736
2926
|
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
2737
2927
|
tslib_1.__metadata("design:returntype", Promise)
|
|
2738
|
-
], FxCore.prototype, "
|
|
2928
|
+
], FxCore.prototype, "addSkill", null);
|
|
2739
2929
|
tslib_1.__decorate([
|
|
2740
2930
|
(0, hooks_1.hooks)([
|
|
2741
2931
|
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "getODSPItemDetails", reset: true }),
|