@microsoft/teamsfx-core 3.1.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/aadAppClient.d.ts +0 -6
- package/build/client/aadAppClient.d.ts.map +1 -1
- package/build/client/aadAppClient.js +8 -6
- package/build/client/aadAppClient.js.map +1 -1
- package/build/client/graphClient.d.ts +4 -4
- package/build/client/graphClient.d.ts.map +1 -1
- package/build/client/graphClient.js +91 -23
- package/build/client/graphClient.js.map +1 -1
- package/build/client/teamsDevPortalClient.d.ts +2 -6
- package/build/client/teamsDevPortalClient.d.ts.map +1 -1
- package/build/client/teamsDevPortalClient.js +97 -120
- package/build/client/teamsDevPortalClient.js.map +1 -1
- package/build/client/teamsGraphClient.d.ts +20 -0
- package/build/client/teamsGraphClient.d.ts.map +1 -0
- package/build/client/teamsGraphClient.js +152 -0
- package/build/client/teamsGraphClient.js.map +1 -0
- package/build/common/accountUtils.d.ts +3 -2
- package/build/common/accountUtils.d.ts.map +1 -1
- package/build/common/accountUtils.js +7 -2
- package/build/common/accountUtils.js.map +1 -1
- package/build/common/constants.d.ts +5 -1
- package/build/common/constants.d.ts.map +1 -1
- package/build/common/constants.js +20 -5
- package/build/common/constants.js.map +1 -1
- package/build/common/daSpecParser.d.ts +2 -1
- package/build/common/daSpecParser.d.ts.map +1 -1
- package/build/common/daSpecParser.js +214 -21
- package/build/common/daSpecParser.js.map +1 -1
- package/build/common/featureFlags.d.ts +22 -5
- package/build/common/featureFlags.d.ts.map +1 -1
- package/build/common/featureFlags.js +40 -9
- package/build/common/featureFlags.js.map +1 -1
- package/build/common/fetchHelper.d.ts.map +1 -1
- package/build/common/fetchHelper.js +41 -3
- package/build/common/fetchHelper.js.map +1 -1
- package/build/common/globalVars.d.ts +1 -1
- package/build/common/globalVars.d.ts.map +1 -1
- package/build/common/globalVars.js.map +1 -1
- package/build/common/httpProxy.d.ts +21 -0
- package/build/common/httpProxy.d.ts.map +1 -0
- package/build/common/httpProxy.js +117 -0
- package/build/common/httpProxy.js.map +1 -0
- package/build/common/kiotaClient.d.ts +3 -3
- package/build/common/kiotaClient.d.ts.map +1 -1
- package/build/common/kiotaClient.js +10 -10
- package/build/common/kiotaClient.js.map +1 -1
- package/build/common/mcpToolFetcher.d.ts +90 -0
- package/build/common/mcpToolFetcher.d.ts.map +1 -0
- package/build/common/mcpToolFetcher.js +404 -0
- package/build/common/mcpToolFetcher.js.map +1 -0
- package/build/common/odrProvider.d.ts +43 -0
- package/build/common/odrProvider.d.ts.map +1 -0
- package/build/common/odrProvider.js +154 -0
- package/build/common/odrProvider.js.map +1 -0
- package/build/common/openApiParserOptions.d.ts +3 -0
- package/build/common/openApiParserOptions.d.ts.map +1 -0
- package/build/common/openApiParserOptions.js +61 -0
- package/build/common/openApiParserOptions.js.map +1 -0
- package/build/common/projectSettingsHelper.d.ts +0 -2
- package/build/common/projectSettingsHelper.d.ts.map +1 -1
- package/build/common/projectSettingsHelper.js +1 -59
- package/build/common/projectSettingsHelper.js.map +1 -1
- package/build/common/retryHandler.d.ts +5 -0
- package/build/common/retryHandler.d.ts.map +1 -0
- package/build/common/retryHandler.js +27 -0
- package/build/common/retryHandler.js.map +1 -0
- package/build/common/samples.d.ts +1 -1
- package/build/common/samples.js +1 -1
- package/build/common/secretmasker/dict.d.ts.map +1 -1
- package/build/common/secretmasker/dict.js +5 -2
- package/build/common/secretmasker/dict.js.map +1 -1
- package/build/common/secretmasker/feature.js.map +1 -1
- package/build/common/teamsGraphApiNames.d.ts +10 -0
- package/build/common/teamsGraphApiNames.d.ts.map +1 -0
- package/build/common/teamsGraphApiNames.js +16 -0
- package/build/common/teamsGraphApiNames.js.map +1 -0
- package/build/common/telemetry.d.ts +6 -15
- package/build/common/telemetry.d.ts.map +1 -1
- package/build/common/telemetry.js +9 -20
- package/build/common/telemetry.js.map +1 -1
- package/build/common/templates-config.json +10 -3
- package/build/common/tools.d.ts +1 -1
- package/build/common/tools.d.ts.map +1 -1
- package/build/common/tools.js +6 -6
- package/build/common/tools.js.map +1 -1
- package/build/common/wrappedAxiosClient.d.ts +11 -2
- package/build/common/wrappedAxiosClient.d.ts.map +1 -1
- package/build/common/wrappedAxiosClient.js +147 -59
- package/build/common/wrappedAxiosClient.js.map +1 -1
- package/build/component/configManager/actionInjector.d.ts +16 -1
- package/build/component/configManager/actionInjector.d.ts.map +1 -1
- package/build/component/configManager/actionInjector.js +106 -1
- package/build/component/configManager/actionInjector.js.map +1 -1
- package/build/component/configManager/lifecycle.d.ts.map +1 -1
- package/build/component/configManager/lifecycle.js +9 -0
- package/build/component/configManager/lifecycle.js.map +1 -1
- package/build/component/configManager/parser.js.map +1 -1
- package/build/component/configManager/validator.d.ts.map +1 -1
- package/build/component/configManager/validator.js +2 -0
- package/build/component/configManager/validator.js.map +1 -1
- package/build/component/coordinator/index.d.ts.map +1 -1
- package/build/component/coordinator/index.js +13 -11
- package/build/component/coordinator/index.js.map +1 -1
- package/build/component/deps-checker/internal/dotnetChecker.js.map +1 -1
- package/build/component/deps-checker/internal/funcToolChecker.js +6 -7
- package/build/component/deps-checker/internal/funcToolChecker.js.map +1 -1
- package/build/component/deps-checker/internal/nodeChecker.js +1 -1
- package/build/component/deps-checker/internal/nodeChecker.js.map +1 -1
- package/build/component/deps-checker/internal/testToolChecker.js +13 -13
- package/build/component/deps-checker/internal/testToolChecker.js.map +1 -1
- package/build/component/developerPortalScaffoldUtils.d.ts.map +1 -1
- package/build/component/developerPortalScaffoldUtils.js +5 -5
- package/build/component/developerPortalScaffoldUtils.js.map +1 -1
- package/build/component/driver/aad/utility/aadManifestHelper.d.ts +1 -1
- package/build/component/driver/aad/utility/aadManifestHelper.d.ts.map +1 -1
- package/build/component/driver/aad/utility/aadManifestHelper.js +7 -4
- package/build/component/driver/aad/utility/aadManifestHelper.js.map +1 -1
- package/build/component/driver/add/addWebPart.js +3 -3
- package/build/component/driver/add/addWebPart.js.map +1 -1
- package/build/component/driver/apiKey/create.d.ts.map +1 -1
- package/build/component/driver/apiKey/create.js +4 -4
- package/build/component/driver/apiKey/create.js.map +1 -1
- package/build/component/driver/apiKey/update.d.ts.map +1 -1
- package/build/component/driver/apiKey/update.js +4 -4
- package/build/component/driver/apiKey/update.js.map +1 -1
- package/build/component/driver/arm/util/handleError.js +5 -4
- package/build/component/driver/arm/util/handleError.js.map +1 -1
- package/build/component/driver/copilotAgent/interfaces/PublishArgs.d.ts +14 -0
- package/build/component/driver/copilotAgent/interfaces/PublishArgs.d.ts.map +1 -0
- package/build/component/driver/copilotAgent/interfaces/PublishArgs.js +5 -0
- package/build/component/driver/copilotAgent/interfaces/PublishArgs.js.map +1 -0
- package/build/component/driver/copilotAgent/publish.d.ts +16 -0
- package/build/component/driver/copilotAgent/publish.d.ts.map +1 -0
- package/build/component/driver/copilotAgent/publish.js +175 -0
- package/build/component/driver/copilotAgent/publish.js.map +1 -0
- package/build/component/driver/dcr/create.d.ts +10 -0
- package/build/component/driver/dcr/create.d.ts.map +1 -0
- package/build/component/driver/dcr/create.js +142 -0
- package/build/component/driver/dcr/create.js.map +1 -0
- package/build/component/driver/dcr/error/dcrNameTooLong.d.ts +5 -0
- package/build/component/driver/dcr/error/dcrNameTooLong.d.ts.map +1 -0
- package/build/component/driver/dcr/error/dcrNameTooLong.js +21 -0
- package/build/component/driver/dcr/error/dcrNameTooLong.js.map +1 -0
- package/build/component/driver/dcr/error/dcrWellKnownInvalid.d.ts +5 -0
- package/build/component/driver/dcr/error/dcrWellKnownInvalid.d.ts.map +1 -0
- package/build/component/driver/dcr/error/dcrWellKnownInvalid.js +21 -0
- package/build/component/driver/dcr/error/dcrWellKnownInvalid.js.map +1 -0
- package/build/component/driver/dcr/interface/createDcrArgs.d.ts +9 -0
- package/build/component/driver/dcr/interface/createDcrArgs.d.ts.map +1 -0
- package/build/component/driver/dcr/interface/createDcrArgs.js +5 -0
- package/build/component/driver/dcr/interface/createDcrArgs.js.map +1 -0
- package/build/component/driver/dcr/interface/createDcrOutputs.d.ts +7 -0
- package/build/component/driver/dcr/interface/createDcrOutputs.d.ts.map +1 -0
- package/build/component/driver/dcr/interface/createDcrOutputs.js +10 -0
- package/build/component/driver/dcr/interface/createDcrOutputs.js.map +1 -0
- package/build/component/driver/dcr/utility/constants.d.ts +7 -0
- package/build/component/driver/dcr/utility/constants.d.ts.map +1 -0
- package/build/component/driver/dcr/utility/constants.js +12 -0
- package/build/component/driver/dcr/utility/constants.js.map +1 -0
- package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.d.ts +3 -1
- package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.js +12 -9
- package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.d.ts +3 -0
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js +38 -3
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js.map +1 -1
- package/build/component/driver/devTool/httpClient.d.ts +4 -0
- package/build/component/driver/devTool/httpClient.d.ts.map +1 -1
- package/build/component/driver/devTool/httpClient.js +6 -3
- package/build/component/driver/devTool/httpClient.js.map +1 -1
- package/build/component/driver/index.d.ts +2 -0
- package/build/component/driver/index.d.ts.map +1 -1
- package/build/component/driver/index.js +2 -0
- package/build/component/driver/index.js.map +1 -1
- package/build/component/driver/m365/acquire.d.ts.map +1 -1
- package/build/component/driver/m365/acquire.js +4 -3
- package/build/component/driver/m365/acquire.js.map +1 -1
- package/build/component/driver/oauth/create.d.ts.map +1 -1
- package/build/component/driver/oauth/create.js +5 -4
- package/build/component/driver/oauth/create.js.map +1 -1
- package/build/component/driver/oauth/update.d.ts.map +1 -1
- package/build/component/driver/oauth/update.js +5 -5
- package/build/component/driver/oauth/update.js.map +1 -1
- package/build/component/driver/script/scriptDriver.d.ts.map +1 -1
- package/build/component/driver/script/scriptDriver.js +3 -2
- package/build/component/driver/script/scriptDriver.js.map +1 -1
- package/build/component/driver/share/utils.d.ts.map +1 -1
- package/build/component/driver/share/utils.js +9 -7
- package/build/component/driver/share/utils.js.map +1 -1
- package/build/component/driver/teamsApp/appStudio.d.ts.map +1 -1
- package/build/component/driver/teamsApp/appStudio.js +1 -1
- package/build/component/driver/teamsApp/appStudio.js.map +1 -1
- package/build/component/driver/teamsApp/configure.d.ts.map +1 -1
- package/build/component/driver/teamsApp/configure.js +7 -0
- package/build/component/driver/teamsApp/configure.js.map +1 -1
- package/build/component/driver/teamsApp/constants.d.ts +9 -3
- package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
- package/build/component/driver/teamsApp/constants.js +11 -4
- package/build/component/driver/teamsApp/constants.js.map +1 -1
- package/build/component/driver/teamsApp/create.d.ts.map +1 -1
- package/build/component/driver/teamsApp/create.js +19 -1
- package/build/component/driver/teamsApp/create.js.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.d.ts +3 -0
- package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.js +130 -11
- package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/interfaces/DcrRegistration.d.ts +10 -0
- package/build/component/driver/teamsApp/interfaces/DcrRegistration.d.ts.map +1 -0
- package/build/component/driver/teamsApp/interfaces/DcrRegistration.js +5 -0
- package/build/component/driver/teamsApp/interfaces/DcrRegistration.js.map +1 -0
- package/build/component/driver/teamsApp/interfaces/OauthRegistration.d.ts +4 -0
- package/build/component/driver/teamsApp/interfaces/OauthRegistration.d.ts.map +1 -1
- package/build/component/driver/teamsApp/interfaces/OauthRegistration.js.map +1 -1
- package/build/component/driver/teamsApp/interfaces/ValidationResult.d.ts +6 -0
- package/build/component/driver/teamsApp/interfaces/ValidationResult.d.ts.map +1 -1
- package/build/component/driver/teamsApp/publishAppPackage.d.ts +0 -2
- package/build/component/driver/teamsApp/publishAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/publishAppPackage.js +19 -60
- package/build/component/driver/teamsApp/publishAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/syncManifest.d.ts +3 -3
- package/build/component/driver/teamsApp/syncManifest.d.ts.map +1 -1
- package/build/component/driver/teamsApp/syncManifest.js +8 -8
- package/build/component/driver/teamsApp/syncManifest.js.map +1 -1
- package/build/component/driver/teamsApp/teamsappMgr.d.ts +4 -0
- package/build/component/driver/teamsApp/teamsappMgr.d.ts.map +1 -1
- package/build/component/driver/teamsApp/teamsappMgr.js +6 -3
- package/build/component/driver/teamsApp/teamsappMgr.js.map +1 -1
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.d.ts +2 -0
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.js +120 -5
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.js.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.js +10 -2
- package/build/component/driver/teamsApp/utils/ManifestUtils.js.map +1 -1
- package/build/component/driver/teamsApp/utils/McpCertVerification.d.ts +17 -0
- package/build/component/driver/teamsApp/utils/McpCertVerification.d.ts.map +1 -0
- package/build/component/driver/teamsApp/utils/McpCertVerification.js +72 -0
- package/build/component/driver/teamsApp/utils/McpCertVerification.js.map +1 -0
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.js +1 -1
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.js.map +1 -1
- package/build/component/driver/teamsApp/utils/telemetry.d.ts +1 -0
- package/build/component/driver/teamsApp/utils/telemetry.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/telemetry.js +1 -0
- package/build/component/driver/teamsApp/utils/telemetry.js.map +1 -1
- package/build/component/driver/teamsApp/utils/utils.d.ts +1 -4
- package/build/component/driver/teamsApp/utils/utils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/utils.js +3 -25
- package/build/component/driver/teamsApp/utils/utils.js.map +1 -1
- package/build/component/driver/teamsApp/validate.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validate.js +16 -5
- package/build/component/driver/teamsApp/validate.js.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.js +7 -0
- package/build/component/driver/teamsApp/validateAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/validateTestCases.d.ts.map +1 -1
- package/build/component/driver/typeSpec/compile.d.ts.map +1 -1
- package/build/component/driver/typeSpec/compile.js +23 -7
- package/build/component/driver/typeSpec/compile.js.map +1 -1
- package/build/component/driver/typeSpec/error/typeSpecCompileError.d.ts +5 -0
- package/build/component/driver/typeSpec/error/typeSpecCompileError.d.ts.map +1 -0
- package/build/component/driver/typeSpec/error/typeSpecCompileError.js +21 -0
- package/build/component/driver/typeSpec/error/typeSpecCompileError.js.map +1 -0
- package/build/component/generator/combinedProject/generator.d.ts.map +1 -1
- package/build/component/generator/combinedProject/generator.js +9 -1
- package/build/component/generator/combinedProject/generator.js.map +1 -1
- package/build/component/generator/declarativeAgent/generator.d.ts +7 -0
- package/build/component/generator/declarativeAgent/generator.d.ts.map +1 -1
- package/build/component/generator/declarativeAgent/generator.js +23 -15
- package/build/component/generator/declarativeAgent/generator.js.map +1 -1
- package/build/component/generator/declarativeAgent/helper.d.ts +52 -0
- package/build/component/generator/declarativeAgent/helper.d.ts.map +1 -1
- package/build/component/generator/declarativeAgent/helper.js +469 -63
- package/build/component/generator/declarativeAgent/helper.js.map +1 -1
- package/build/component/generator/defaultGenerator.d.ts.map +1 -1
- package/build/component/generator/defaultGenerator.js +17 -1
- package/build/component/generator/defaultGenerator.js.map +1 -1
- package/build/component/generator/error.d.ts +3 -0
- package/build/component/generator/error.d.ts.map +1 -1
- package/build/component/generator/error.js +7 -1
- package/build/component/generator/error.js.map +1 -1
- package/build/component/generator/generatorAction.d.ts +12 -1
- package/build/component/generator/generatorAction.d.ts.map +1 -1
- package/build/component/generator/generatorAction.js +16 -8
- package/build/component/generator/generatorAction.js.map +1 -1
- package/build/component/generator/officeAddin/generator.d.ts +13 -0
- package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
- package/build/component/generator/officeAddin/generator.js +159 -35
- package/build/component/generator/officeAddin/generator.js.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.d.ts +4 -0
- package/build/component/generator/officeAddin/helperMethods.d.ts.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.js +6 -3
- package/build/component/generator/officeAddin/helperMethods.js.map +1 -1
- package/build/component/generator/openApiSpec/customEngineAgentGenerator.d.ts +8 -0
- package/build/component/generator/openApiSpec/customEngineAgentGenerator.d.ts.map +1 -1
- package/build/component/generator/openApiSpec/customEngineAgentGenerator.js +9 -4
- package/build/component/generator/openApiSpec/customEngineAgentGenerator.js.map +1 -1
- package/build/component/generator/openApiSpec/helper.d.ts +2 -3
- package/build/component/generator/openApiSpec/helper.d.ts.map +1 -1
- package/build/component/generator/openApiSpec/helper.js +19 -57
- package/build/component/generator/openApiSpec/helper.js.map +1 -1
- package/build/component/generator/openPlugin/authorParser.d.ts +8 -0
- package/build/component/generator/openPlugin/authorParser.d.ts.map +1 -0
- package/build/component/generator/openPlugin/authorParser.js +49 -0
- package/build/component/generator/openPlugin/authorParser.js.map +1 -0
- package/build/component/generator/openPlugin/deterministicId.d.ts +6 -0
- package/build/component/generator/openPlugin/deterministicId.d.ts.map +1 -0
- package/build/component/generator/openPlugin/deterministicId.js +31 -0
- package/build/component/generator/openPlugin/deterministicId.js.map +1 -0
- package/build/component/generator/openPlugin/exporter.d.ts +18 -0
- package/build/component/generator/openPlugin/exporter.d.ts.map +1 -0
- package/build/component/generator/openPlugin/exporter.js +233 -0
- package/build/component/generator/openPlugin/exporter.js.map +1 -0
- package/build/component/generator/openPlugin/iconStrategy.d.ts +8 -0
- package/build/component/generator/openPlugin/iconStrategy.d.ts.map +1 -0
- package/build/component/generator/openPlugin/iconStrategy.js +62 -0
- package/build/component/generator/openPlugin/iconStrategy.js.map +1 -0
- package/build/component/generator/openPlugin/importer.d.ts +25 -0
- package/build/component/generator/openPlugin/importer.d.ts.map +1 -0
- package/build/component/generator/openPlugin/importer.js +140 -0
- package/build/component/generator/openPlugin/importer.js.map +1 -0
- package/build/component/generator/openPlugin/mapper.d.ts +6 -0
- package/build/component/generator/openPlugin/mapper.d.ts.map +1 -0
- package/build/component/generator/openPlugin/mapper.js +141 -0
- package/build/component/generator/openPlugin/mapper.js.map +1 -0
- package/build/component/generator/openPlugin/parser.d.ts +3 -0
- package/build/component/generator/openPlugin/parser.d.ts.map +1 -0
- package/build/component/generator/openPlugin/parser.js +153 -0
- package/build/component/generator/openPlugin/parser.js.map +1 -0
- package/build/component/generator/openPlugin/placeholderPng.d.ts +6 -0
- package/build/component/generator/openPlugin/placeholderPng.d.ts.map +1 -0
- package/build/component/generator/openPlugin/placeholderPng.js +71 -0
- package/build/component/generator/openPlugin/placeholderPng.js.map +1 -0
- package/build/component/generator/openPlugin/textUtils.d.ts +12 -0
- package/build/component/generator/openPlugin/textUtils.d.ts.map +1 -0
- package/build/component/generator/openPlugin/textUtils.js +43 -0
- package/build/component/generator/openPlugin/textUtils.js.map +1 -0
- package/build/component/generator/openPlugin/types.d.ts +128 -0
- package/build/component/generator/openPlugin/types.d.ts.map +1 -0
- package/build/component/generator/openPlugin/types.js.map +1 -0
- package/build/component/generator/other/tdpGenerator.d.ts +1 -0
- package/build/component/generator/other/tdpGenerator.d.ts.map +1 -1
- package/build/component/generator/other/tdpGenerator.js +24 -2
- package/build/component/generator/other/tdpGenerator.js.map +1 -1
- package/build/component/generator/spfx/utils/constants.d.ts +1 -1
- package/build/component/generator/spfx/utils/constants.js +1 -1
- package/build/component/generator/spfx/utils/utils.js +1 -1
- package/build/component/generator/spfx/utils/utils.js.map +1 -1
- package/build/component/generator/templateHelper.d.ts +17 -2
- package/build/component/generator/templateHelper.d.ts.map +1 -1
- package/build/component/generator/templateHelper.js +36 -3
- package/build/component/generator/templateHelper.js.map +1 -1
- package/build/component/generator/templates/metadata/index.d.ts +15 -0
- package/build/component/generator/templates/metadata/index.d.ts.map +1 -1
- package/build/component/generator/templates/metadata/index.js +51 -5
- package/build/component/generator/templates/metadata/index.js.map +1 -1
- package/build/component/generator/templates/templateNames.d.ts +6 -3
- package/build/component/generator/templates/templateNames.d.ts.map +1 -1
- package/build/component/generator/templates/templateNames.js +7 -2
- package/build/component/generator/templates/templateNames.js.map +1 -1
- package/build/component/generator/templates/templateReplaceMap.d.ts.map +1 -1
- package/build/component/generator/templates/templateReplaceMap.js +4 -1
- package/build/component/generator/templates/templateReplaceMap.js.map +1 -1
- package/build/component/generator/utils.d.ts.map +1 -1
- package/build/component/generator/utils.js +14 -8
- package/build/component/generator/utils.js.map +1 -1
- package/build/component/generator/v4MetadataSource.d.ts +16 -0
- package/build/component/generator/v4MetadataSource.d.ts.map +1 -0
- package/build/component/generator/v4MetadataSource.js +35 -0
- package/build/component/generator/v4MetadataSource.js.map +1 -0
- package/build/component/generator/v4TemplateBridge.d.ts +55 -0
- package/build/component/generator/v4TemplateBridge.d.ts.map +1 -0
- package/build/component/generator/v4TemplateBridge.js +224 -0
- package/build/component/generator/v4TemplateBridge.js.map +1 -0
- package/build/component/local/localCertificateManager.d.ts +16 -1
- package/build/component/local/localCertificateManager.d.ts.map +1 -1
- package/build/component/local/localCertificateManager.js +47 -31
- package/build/component/local/localCertificateManager.js.map +1 -1
- package/build/component/m365/constants.d.ts +2 -1
- package/build/component/m365/constants.d.ts.map +1 -1
- package/build/component/m365/constants.js +1 -0
- package/build/component/m365/constants.js.map +1 -1
- package/build/component/m365/launchHelper.d.ts.map +1 -1
- package/build/component/m365/launchHelper.js +7 -2
- package/build/component/m365/launchHelper.js.map +1 -1
- package/build/component/m365/packageService.d.ts +7 -0
- package/build/component/m365/packageService.d.ts.map +1 -1
- package/build/component/m365/packageService.js +79 -13
- package/build/component/m365/packageService.js.map +1 -1
- package/build/component/m365/serviceConstant.d.ts.map +1 -1
- package/build/component/m365/serviceConstant.js +24 -4
- package/build/component/m365/serviceConstant.js.map +1 -1
- package/build/component/middleware/envMW.d.ts.map +1 -1
- package/build/component/middleware/envMW.js +5 -0
- package/build/component/middleware/envMW.js.map +1 -1
- package/build/component/provisionUtils.d.ts.map +1 -1
- package/build/component/provisionUtils.js +5 -2
- package/build/component/provisionUtils.js.map +1 -1
- package/build/component/utils/ResourceGroupHelper.d.ts +4 -0
- package/build/component/utils/ResourceGroupHelper.d.ts.map +1 -1
- package/build/component/utils/ResourceGroupHelper.js +8 -4
- package/build/component/utils/ResourceGroupHelper.js.map +1 -1
- package/build/component/utils/charsetUtils.js +3 -3
- package/build/component/utils/charsetUtils.js.map +1 -1
- package/build/component/utils/envUtil.d.ts.map +1 -1
- package/build/component/utils/envUtil.js +2 -2
- package/build/component/utils/envUtil.js.map +1 -1
- package/build/component/utils/fileOperation.d.ts +9 -0
- package/build/component/utils/fileOperation.d.ts.map +1 -1
- package/build/component/utils/fileOperation.js +31 -17
- package/build/component/utils/fileOperation.js.map +1 -1
- package/build/component/utils/mcpAuthScaffolder.d.ts +137 -0
- package/build/component/utils/mcpAuthScaffolder.d.ts.map +1 -0
- package/build/component/utils/mcpAuthScaffolder.js +200 -0
- package/build/component/utils/mcpAuthScaffolder.js.map +1 -0
- package/build/component/utils/mcpToolFetcher.d.ts +2 -0
- package/build/component/utils/mcpToolFetcher.d.ts.map +1 -0
- package/build/component/utils/mcpToolFetcher.js +7 -0
- package/build/component/utils/mcpToolFetcher.js.map +1 -0
- package/build/component/utils/metadataGraphPermssion.d.ts +4 -0
- package/build/component/utils/metadataGraphPermssion.d.ts.map +1 -1
- package/build/component/utils/metadataGraphPermssion.js +7 -4
- package/build/component/utils/metadataGraphPermssion.js.map +1 -1
- package/build/component/utils/odrProvider.d.ts +1 -48
- package/build/component/utils/odrProvider.d.ts.map +1 -1
- package/build/component/utils/odrProvider.js +2 -94
- package/build/component/utils/odrProvider.js.map +1 -1
- package/build/core/FxCore.d.ts +45 -13
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.declarativeAgent.d.ts +45 -1
- package/build/core/FxCore.declarativeAgent.d.ts.map +1 -1
- package/build/core/FxCore.declarativeAgent.js +747 -56
- package/build/core/FxCore.declarativeAgent.js.map +1 -1
- package/build/core/FxCore.js +462 -305
- package/build/core/FxCore.js.map +1 -1
- package/build/core/FxCore.openPlugin.d.ts +23 -0
- package/build/core/FxCore.openPlugin.d.ts.map +1 -0
- package/build/core/FxCore.openPlugin.js +131 -0
- package/build/core/FxCore.openPlugin.js.map +1 -0
- package/build/core/collaborator.d.ts.map +1 -1
- package/build/core/createFrontDoorAdapters.d.ts +39 -0
- package/build/core/createFrontDoorAdapters.d.ts.map +1 -0
- package/build/core/createFrontDoorAdapters.js +210 -0
- package/build/core/createFrontDoorAdapters.js.map +1 -0
- package/build/core/createProjectFrontDoor.d.ts +49 -0
- package/build/core/createProjectFrontDoor.d.ts.map +1 -0
- package/build/core/createProjectFrontDoor.js +351 -0
- package/build/core/createProjectFrontDoor.js.map +1 -0
- package/build/core/middleware/concurrentLocker.d.ts.map +1 -1
- package/build/core/middleware/concurrentLocker.js +7 -10
- package/build/core/middleware/concurrentLocker.js.map +1 -1
- package/build/core/middleware/errorHandler.d.ts.map +1 -1
- package/build/core/middleware/errorHandler.js +9 -0
- package/build/core/middleware/errorHandler.js.map +1 -1
- package/build/core/middleware/fileLocker.js +6 -6
- package/build/core/middleware/fileLocker.js.map +1 -1
- package/build/core/middleware/utils/v3MigrationUtils.d.ts +1 -34
- package/build/core/middleware/utils/v3MigrationUtils.d.ts.map +1 -1
- package/build/core/middleware/utils/v3MigrationUtils.js +6 -245
- package/build/core/middleware/utils/v3MigrationUtils.js.map +1 -1
- package/build/core/modifyProjectFrontDoor.d.ts +27 -0
- package/build/core/modifyProjectFrontDoor.d.ts.map +1 -0
- package/build/core/modifyProjectFrontDoor.js +149 -0
- package/build/core/modifyProjectFrontDoor.js.map +1 -0
- package/build/core/v4ArtifactSnapshot.d.ts +5 -0
- package/build/core/v4ArtifactSnapshot.d.ts.map +1 -0
- package/build/core/v4ArtifactSnapshot.js +23 -0
- package/build/core/v4ArtifactSnapshot.js.map +1 -0
- package/build/error/common.d.ts.map +1 -1
- package/build/error/common.js +3 -0
- package/build/error/common.js.map +1 -1
- package/build/error/teamsApp.d.ts +3 -0
- package/build/error/teamsApp.d.ts.map +1 -1
- package/build/error/teamsApp.js +15 -1
- package/build/error/teamsApp.js.map +1 -1
- package/build/error/teamsGraph.d.ts +5 -0
- package/build/error/teamsGraph.d.ts.map +1 -0
- package/build/error/teamsGraph.js +24 -0
- package/build/error/teamsGraph.js.map +1 -0
- package/build/index.d.ts +5 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +15 -2
- package/build/index.js.map +1 -1
- package/build/question/constants.d.ts +1 -0
- package/build/question/constants.d.ts.map +1 -1
- package/build/question/constants.js +15 -8
- package/build/question/constants.js.map +1 -1
- package/build/question/create.d.ts +18 -0
- package/build/question/create.d.ts.map +1 -1
- package/build/question/create.js +121 -14
- package/build/question/create.js.map +1 -1
- package/build/question/index.d.ts +1 -1
- package/build/question/index.d.ts.map +1 -1
- package/build/question/index.js +4 -4
- package/build/question/index.js.map +1 -1
- package/build/question/inputs/AddKnowledgeInputs.d.ts.map +1 -1
- package/build/question/inputs/AddPluginInputs.d.ts +17 -5
- package/build/question/inputs/AddPluginInputs.d.ts.map +1 -1
- package/build/question/inputs/AddSkillInputs.d.ts +10 -0
- package/build/question/inputs/AddSkillInputs.d.ts.map +1 -0
- package/build/question/inputs/AddSkillInputs.js +5 -0
- package/build/question/inputs/AddSkillInputs.js.map +1 -0
- package/build/question/inputs/CreateProjectInputs.d.ts +19 -1
- package/build/question/inputs/CreateProjectInputs.d.ts.map +1 -1
- package/build/question/inputs/ExportOpenPluginInputs.d.ts +10 -0
- package/build/question/inputs/ExportOpenPluginInputs.d.ts.map +1 -0
- package/build/question/inputs/ExportOpenPluginInputs.js +5 -0
- package/build/question/inputs/ExportOpenPluginInputs.js.map +1 -0
- package/build/question/inputs/ImportOpenPluginInputs.d.ts +28 -0
- package/build/question/inputs/ImportOpenPluginInputs.d.ts.map +1 -0
- package/build/question/inputs/ImportOpenPluginInputs.js +5 -0
- package/build/question/inputs/ImportOpenPluginInputs.js.map +1 -0
- package/build/question/inputs/index.d.ts +4 -1
- package/build/question/inputs/index.d.ts.map +1 -1
- package/build/question/inputs/index.js +4 -1
- package/build/question/inputs/index.js.map +1 -1
- package/build/question/options/AddPluginOptions.d.ts.map +1 -1
- package/build/question/options/AddPluginOptions.js +38 -6
- package/build/question/options/AddPluginOptions.js.map +1 -1
- package/build/question/options/AddSkillOptions.d.ts +4 -0
- package/build/question/options/AddSkillOptions.d.ts.map +1 -0
- package/build/question/options/AddSkillOptions.js +47 -0
- package/build/question/options/AddSkillOptions.js.map +1 -0
- package/build/question/options/CreateProjectOptions.d.ts.map +1 -1
- package/build/question/options/CreateProjectOptions.js +53 -1
- package/build/question/options/CreateProjectOptions.js.map +1 -1
- package/build/question/options/ExportOpenPluginOptions.d.ts +4 -0
- package/build/question/options/ExportOpenPluginOptions.d.ts.map +1 -0
- package/build/question/options/ExportOpenPluginOptions.js +29 -0
- package/build/question/options/ExportOpenPluginOptions.js.map +1 -0
- package/build/question/options/ImportOpenPluginOptions.d.ts +4 -0
- package/build/question/options/ImportOpenPluginOptions.d.ts.map +1 -0
- package/build/question/options/ImportOpenPluginOptions.js +54 -0
- package/build/question/options/ImportOpenPluginOptions.js.map +1 -0
- package/build/question/options/index.d.ts +3 -0
- package/build/question/options/index.d.ts.map +1 -1
- package/build/question/options/index.js +3 -0
- package/build/question/options/index.js.map +1 -1
- package/build/question/other.d.ts +1 -1
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +195 -17
- package/build/question/other.js.map +1 -1
- package/build/question/questionNames.d.ts +14 -1
- package/build/question/questionNames.d.ts.map +1 -1
- package/build/question/questionNames.js +13 -0
- package/build/question/questionNames.js.map +1 -1
- package/build/question/scaffold/commonNodes.d.ts.map +1 -1
- package/build/question/scaffold/commonNodes.js +14 -2
- package/build/question/scaffold/commonNodes.js.map +1 -1
- package/build/question/scaffold/constructNode.d.ts +3 -1
- package/build/question/scaffold/constructNode.d.ts.map +1 -1
- package/build/question/scaffold/constructNode.js +55 -2
- package/build/question/scaffold/constructNode.js.map +1 -1
- package/build/question/scaffold/vsc/CapabilityOptions.d.ts +3 -5
- package/build/question/scaffold/vsc/CapabilityOptions.d.ts.map +1 -1
- package/build/question/scaffold/vsc/CapabilityOptions.js +46 -46
- package/build/question/scaffold/vsc/CapabilityOptions.js.map +1 -1
- package/build/question/scaffold/vsc/ProjectTypeOptions.d.ts +2 -0
- package/build/question/scaffold/vsc/ProjectTypeOptions.d.ts.map +1 -1
- package/build/question/scaffold/vsc/ProjectTypeOptions.js +9 -0
- package/build/question/scaffold/vsc/ProjectTypeOptions.js.map +1 -1
- package/build/question/scaffold/vsc/createRootNode.d.ts.map +1 -1
- package/build/question/scaffold/vsc/createRootNode.js +3 -0
- package/build/question/scaffold/vsc/createRootNode.js.map +1 -1
- package/build/question/scaffold/vsc/daProjectTypeNode.d.ts.map +1 -1
- package/build/question/scaffold/vsc/daProjectTypeNode.js +1 -6
- package/build/question/scaffold/vsc/daProjectTypeNode.js.map +1 -1
- package/build/question/scaffold/vsc/rootNode.d.ts.map +1 -1
- package/build/question/scaffold/vsc/rootNode.js +17 -4
- package/build/question/scaffold/vsc/rootNode.js.map +1 -1
- package/build/question/scaffold/vsc/teamsProjectTypeNode.d.ts +66 -0
- package/build/question/scaffold/vsc/teamsProjectTypeNode.d.ts.map +1 -1
- package/build/question/scaffold/vsc/teamsProjectTypeNode.js +408 -21
- package/build/question/scaffold/vsc/teamsProjectTypeNode.js.map +1 -1
- package/build/question/share.js +3 -2
- package/build/question/share.js.map +1 -1
- package/build/ui/visitor.d.ts.map +1 -1
- package/build/ui/visitor.js +10 -0
- package/build/ui/visitor.js.map +1 -1
- package/build/v4/buildTarget/parseSelector.d.ts +35 -0
- package/build/v4/buildTarget/parseSelector.d.ts.map +1 -0
- package/build/v4/buildTarget/parseSelector.js +226 -0
- package/build/v4/buildTarget/parseSelector.js.map +1 -0
- package/build/v4/buildTarget/resolveBuildTarget.d.ts +85 -0
- package/build/v4/buildTarget/resolveBuildTarget.d.ts.map +1 -0
- package/build/v4/buildTarget/resolveBuildTarget.js +260 -0
- package/build/v4/buildTarget/resolveBuildTarget.js.map +1 -0
- package/build/v4/collectInputs/collectInputs.d.ts +151 -0
- package/build/v4/collectInputs/collectInputs.d.ts.map +1 -0
- package/build/v4/collectInputs/collectInputs.js +533 -0
- package/build/v4/collectInputs/collectInputs.js.map +1 -0
- package/build/v4/distribution/bundledFloor.d.ts +11 -0
- package/build/v4/distribution/bundledFloor.d.ts.map +1 -0
- package/build/v4/distribution/bundledFloor.js +114 -0
- package/build/v4/distribution/bundledFloor.js.map +1 -0
- package/build/v4/distribution/createQuestions.d.ts +6 -0
- package/build/v4/distribution/createQuestions.d.ts.map +1 -0
- package/build/v4/distribution/createQuestions.js +61 -0
- package/build/v4/distribution/createQuestions.js.map +1 -0
- package/build/v4/distribution/createSelector.d.ts +15 -0
- package/build/v4/distribution/createSelector.d.ts.map +1 -0
- package/build/v4/distribution/createSelector.js +115 -0
- package/build/v4/distribution/createSelector.js.map +1 -0
- package/build/v4/distribution/declarativePackage.d.ts +14 -0
- package/build/v4/distribution/declarativePackage.d.ts.map +1 -0
- package/build/v4/distribution/declarativePackage.js +165 -0
- package/build/v4/distribution/declarativePackage.js.map +1 -0
- package/build/v4/distribution/packageDir.d.ts +15 -0
- package/build/v4/distribution/packageDir.d.ts.map +1 -0
- package/build/v4/distribution/packageDir.js +101 -0
- package/build/v4/distribution/packageDir.js.map +1 -0
- package/build/v4/distribution/questionFragments.d.ts +11 -0
- package/build/v4/distribution/questionFragments.d.ts.map +1 -0
- package/build/v4/distribution/questionFragments.js +130 -0
- package/build/v4/distribution/questionFragments.js.map +1 -0
- package/build/v4/distribution/templateArtifacts.d.ts +61 -0
- package/build/v4/distribution/templateArtifacts.d.ts.map +1 -0
- package/build/v4/distribution/templateArtifacts.js +459 -0
- package/build/v4/distribution/templateArtifacts.js.map +1 -0
- package/build/v4/distribution/templateConfig.d.ts +43 -0
- package/build/v4/distribution/templateConfig.d.ts.map +1 -0
- package/build/v4/distribution/templateConfig.js +70 -0
- package/build/v4/distribution/templateConfig.js.map +1 -0
- package/build/v4/distribution/templatePackage.d.ts +6 -0
- package/build/v4/distribution/templatePackage.d.ts.map +1 -0
- package/build/v4/distribution/templatePackage.js +63 -0
- package/build/v4/distribution/templatePackage.js.map +1 -0
- package/build/v4/distribution/templateSource.d.ts +66 -0
- package/build/v4/distribution/templateSource.d.ts.map +1 -0
- package/build/v4/distribution/templateSource.js +233 -0
- package/build/v4/distribution/templateSource.js.map +1 -0
- package/build/v4/distribution/templateSourcePort.d.ts +27 -0
- package/build/v4/distribution/templateSourcePort.d.ts.map +1 -0
- package/build/v4/distribution/templateSourcePort.js +175 -0
- package/build/v4/distribution/templateSourcePort.js.map +1 -0
- package/build/v4/engineVersion.d.ts +7 -0
- package/build/v4/engineVersion.d.ts.map +1 -0
- package/build/v4/engineVersion.js +12 -0
- package/build/v4/engineVersion.js.map +1 -0
- package/build/v4/expression/evaluateExpression.d.ts +55 -0
- package/build/v4/expression/evaluateExpression.d.ts.map +1 -0
- package/build/v4/expression/evaluateExpression.js +338 -0
- package/build/v4/expression/evaluateExpression.js.map +1 -0
- package/build/v4/index.d.ts +41 -0
- package/build/v4/index.d.ts.map +1 -0
- package/build/v4/index.js +46 -0
- package/build/v4/index.js.map +1 -0
- package/build/v4/inspection/scaffoldCatalog.d.ts +28 -0
- package/build/v4/inspection/scaffoldCatalog.d.ts.map +1 -0
- package/build/v4/inspection/scaffoldCatalog.js +66 -0
- package/build/v4/inspection/scaffoldCatalog.js.map +1 -0
- package/build/v4/inspection/scaffoldMetadataSource.d.ts +6 -0
- package/build/v4/inspection/scaffoldMetadataSource.d.ts.map +1 -0
- package/build/v4/inspection/scaffoldMetadataSource.js +78 -0
- package/build/v4/inspection/scaffoldMetadataSource.js.map +1 -0
- package/build/v4/mcp/mcpAuthAction.d.ts +36 -0
- package/build/v4/mcp/mcpAuthAction.d.ts.map +1 -0
- package/build/v4/mcp/mcpAuthAction.js +177 -0
- package/build/v4/mcp/mcpAuthAction.js.map +1 -0
- package/build/v4/mcp/mcpAuthScaffold.d.ts +37 -0
- package/build/v4/mcp/mcpAuthScaffold.d.ts.map +1 -0
- package/build/v4/mcp/mcpAuthScaffold.js +162 -0
- package/build/v4/mcp/mcpAuthScaffold.js.map +1 -0
- package/build/v4/mcp/mcpStaticTools.d.ts +17 -0
- package/build/v4/mcp/mcpStaticTools.d.ts.map +1 -0
- package/build/v4/mcp/mcpStaticTools.js +70 -0
- package/build/v4/mcp/mcpStaticTools.js.map +1 -0
- package/build/v4/model/dataModel.d.ts +27 -0
- package/build/v4/model/dataModel.d.ts.map +1 -0
- package/build/v4/model/dataModel.js +5 -0
- package/build/v4/model/dataModel.js.map +1 -0
- package/build/v4/pipeline/runScaffoldPipeline.d.ts +101 -0
- package/build/v4/pipeline/runScaffoldPipeline.d.ts.map +1 -0
- package/build/v4/pipeline/runScaffoldPipeline.js +212 -0
- package/build/v4/pipeline/runScaffoldPipeline.js.map +1 -0
- package/build/v4/providers/createOptionsProviders.d.ts +11 -0
- package/build/v4/providers/createOptionsProviders.d.ts.map +1 -0
- package/build/v4/providers/createOptionsProviders.js +268 -0
- package/build/v4/providers/createOptionsProviders.js.map +1 -0
- package/build/v4/renderContext/buildRenderContext.d.ts +24 -0
- package/build/v4/renderContext/buildRenderContext.d.ts.map +1 -0
- package/build/v4/renderContext/buildRenderContext.js +75 -0
- package/build/v4/renderContext/buildRenderContext.js.map +1 -0
- package/build/v4/runtime/generalSensitivityLabel.d.ts +5 -0
- package/build/v4/runtime/generalSensitivityLabel.d.ts.map +1 -0
- package/build/v4/runtime/generalSensitivityLabel.js +36 -0
- package/build/v4/runtime/generalSensitivityLabel.js.map +1 -0
- package/build/v4/runtime/inMemoryRuntime.d.ts +21 -0
- package/build/v4/runtime/inMemoryRuntime.d.ts.map +1 -0
- package/build/v4/runtime/inMemoryRuntime.js +43 -0
- package/build/v4/runtime/inMemoryRuntime.js.map +1 -0
- package/build/v4/runtime/packageParse.d.ts +13 -0
- package/build/v4/runtime/packageParse.d.ts.map +1 -0
- package/build/v4/runtime/packageParse.js +235 -0
- package/build/v4/runtime/packageParse.js.map +1 -0
- package/build/v4/runtime/realRuntime.d.ts +11 -0
- package/build/v4/runtime/realRuntime.d.ts.map +1 -0
- package/build/v4/runtime/realRuntime.js +64 -0
- package/build/v4/runtime/realRuntime.js.map +1 -0
- package/build/v4/runtime/renderMustache.d.ts +7 -0
- package/build/v4/runtime/renderMustache.d.ts.map +1 -0
- package/build/v4/runtime/renderMustache.js +54 -0
- package/build/v4/runtime/renderMustache.js.map +1 -0
- package/build/v4/runtime/runtimeRegistry.d.ts +28 -0
- package/build/v4/runtime/runtimeRegistry.d.ts.map +1 -0
- package/build/v4/runtime/runtimeRegistry.js +165 -0
- package/build/v4/runtime/runtimeRegistry.js.map +1 -0
- package/build/v4/runtime/scaffold.d.ts +31 -0
- package/build/v4/runtime/scaffold.d.ts.map +1 -0
- package/build/v4/runtime/scaffold.js +34 -0
- package/build/v4/runtime/scaffold.js.map +1 -0
- package/build/v4/runtime/scaffoldFromPackageDir.d.ts +7 -0
- package/build/v4/runtime/scaffoldFromPackageDir.d.ts.map +1 -0
- package/build/v4/runtime/scaffoldFromPackageDir.js +43 -0
- package/build/v4/runtime/scaffoldFromPackageDir.js.map +1 -0
- package/build/v4/runtime/selectLanguageContent.d.ts +7 -0
- package/build/v4/runtime/selectLanguageContent.d.ts.map +1 -0
- package/build/v4/runtime/selectLanguageContent.js +39 -0
- package/build/v4/runtime/selectLanguageContent.js.map +1 -0
- package/build/v4/runtime/steps/daAction.d.ts +6 -0
- package/build/v4/runtime/steps/daAction.d.ts.map +1 -0
- package/build/v4/runtime/steps/daAction.js +41 -0
- package/build/v4/runtime/steps/daAction.js.map +1 -0
- package/build/v4/runtime/steps/daSensitivity.d.ts +14 -0
- package/build/v4/runtime/steps/daSensitivity.d.ts.map +1 -0
- package/build/v4/runtime/steps/daSensitivity.js +50 -0
- package/build/v4/runtime/steps/daSensitivity.js.map +1 -0
- package/build/v4/runtime/steps/mcpAuth.d.ts +13 -0
- package/build/v4/runtime/steps/mcpAuth.d.ts.map +1 -0
- package/build/v4/runtime/steps/mcpAuth.js +90 -0
- package/build/v4/runtime/steps/mcpAuth.js.map +1 -0
- package/build/v4/runtime/steps/mcpLocal.d.ts +6 -0
- package/build/v4/runtime/steps/mcpLocal.d.ts.map +1 -0
- package/build/v4/runtime/steps/mcpLocal.js +93 -0
- package/build/v4/runtime/steps/mcpLocal.js.map +1 -0
- package/build/v4/runtime/steps/mcpStatic.d.ts +10 -0
- package/build/v4/runtime/steps/mcpStatic.d.ts.map +1 -0
- package/build/v4/runtime/steps/mcpStatic.js +182 -0
- package/build/v4/runtime/steps/mcpStatic.js.map +1 -0
- package/build/v4/runtime/steps/metaOs.d.ts +10 -0
- package/build/v4/runtime/steps/metaOs.d.ts.map +1 -0
- package/build/v4/runtime/steps/metaOs.js +422 -0
- package/build/v4/runtime/steps/metaOs.js.map +1 -0
- package/build/v4/runtime/steps/officeAddin.d.ts +4 -0
- package/build/v4/runtime/steps/officeAddin.d.ts.map +1 -0
- package/build/v4/runtime/steps/officeAddin.js +168 -0
- package/build/v4/runtime/steps/officeAddin.js.map +1 -0
- package/build/v4/runtime/steps/openApi.d.ts +6 -0
- package/build/v4/runtime/steps/openApi.d.ts.map +1 -0
- package/build/v4/runtime/steps/openApi.js +389 -0
- package/build/v4/runtime/steps/openApi.js.map +1 -0
- package/build/v4/runtime/steps/openApiCustomApi.d.ts +5 -0
- package/build/v4/runtime/steps/openApiCustomApi.d.ts.map +1 -0
- package/build/v4/runtime/steps/openApiCustomApi.js +385 -0
- package/build/v4/runtime/steps/openApiCustomApi.js.map +1 -0
- package/build/v4/runtime/whitelist.d.ts +41 -0
- package/build/v4/runtime/whitelist.d.ts.map +1 -0
- package/build/v4/runtime/whitelist.js +211 -0
- package/build/v4/runtime/whitelist.js.map +1 -0
- package/build/v4/runtime/withTempDirectory.d.ts +10 -0
- package/build/v4/runtime/withTempDirectory.d.ts.map +1 -0
- package/build/v4/runtime/withTempDirectory.js +41 -0
- package/build/v4/runtime/withTempDirectory.js.map +1 -0
- package/build/v4/surface/createFloorTail.d.ts +12 -0
- package/build/v4/surface/createFloorTail.d.ts.map +1 -0
- package/build/v4/surface/createFloorTail.js +138 -0
- package/build/v4/surface/createFloorTail.js.map +1 -0
- package/build/v4/surface/createInputs.d.ts +51 -0
- package/build/v4/surface/createInputs.d.ts.map +1 -0
- package/build/v4/surface/createInputs.js +153 -0
- package/build/v4/surface/createInputs.js.map +1 -0
- package/build/v4/surface/createSelectorWalk.d.ts +26 -0
- package/build/v4/surface/createSelectorWalk.d.ts.map +1 -0
- package/build/v4/surface/createSelectorWalk.js +143 -0
- package/build/v4/surface/createSelectorWalk.js.map +1 -0
- package/build/v4/surface/deriveCreateOptions.d.ts +5 -0
- package/build/v4/surface/deriveCreateOptions.d.ts.map +1 -0
- package/build/v4/surface/deriveCreateOptions.js +212 -0
- package/build/v4/surface/deriveCreateOptions.js.map +1 -0
- package/build/v4/surface/localizePrompt.d.ts +11 -0
- package/build/v4/surface/localizePrompt.d.ts.map +1 -0
- package/build/v4/surface/localizePrompt.js +32 -0
- package/build/v4/surface/localizePrompt.js.map +1 -0
- package/build/v4/surface/modifySelectorWalk.d.ts +12 -0
- package/build/v4/surface/modifySelectorWalk.d.ts.map +1 -0
- package/build/v4/surface/modifySelectorWalk.js +115 -0
- package/build/v4/surface/modifySelectorWalk.js.map +1 -0
- package/build/v4/surface/uiPromptUI.d.ts +5 -0
- package/build/v4/surface/uiPromptUI.d.ts.map +1 -0
- package/build/v4/surface/uiPromptUI.js +220 -0
- package/build/v4/surface/uiPromptUI.js.map +1 -0
- package/build/v4/validation/capabilityCatalog.d.ts +8 -0
- package/build/v4/validation/capabilityCatalog.d.ts.map +1 -0
- package/build/v4/validation/capabilityCatalog.js +62 -0
- package/build/v4/validation/capabilityCatalog.js.map +1 -0
- package/build/v4/validation/templateArchiveValidation.d.ts +15 -0
- package/build/v4/validation/templateArchiveValidation.d.ts.map +1 -0
- package/build/v4/validation/templateArchiveValidation.js +297 -0
- package/build/v4/validation/templateArchiveValidation.js.map +1 -0
- package/build/v4/validation/validateTemplatePackage.d.ts +83 -0
- package/build/v4/validation/validateTemplatePackage.d.ts.map +1 -0
- package/build/v4/validation/validateTemplatePackage.js +313 -0
- package/build/v4/validation/validateTemplatePackage.js.map +1 -0
- package/build/v4/validators/createInputValidators.d.ts +7 -0
- package/build/v4/validators/createInputValidators.d.ts.map +1 -0
- package/build/v4/validators/createInputValidators.js +77 -0
- package/build/v4/validators/createInputValidators.js.map +1 -0
- package/build/v4/validators/mcpCredentialValidators.d.ts +5 -0
- package/build/v4/validators/mcpCredentialValidators.d.ts.map +1 -0
- package/build/v4/validators/mcpCredentialValidators.js +13 -0
- package/build/v4/validators/mcpCredentialValidators.js.map +1 -0
- package/build/v4/validators/mcpServerUrlValidator.d.ts +9 -0
- package/build/v4/validators/mcpServerUrlValidator.d.ts.map +1 -0
- package/build/v4/validators/mcpServerUrlValidator.js +15 -0
- package/build/v4/validators/mcpServerUrlValidator.js.map +1 -0
- package/package.json +46 -97
- package/resource/package.nls.cs.json +1176 -1095
- package/resource/package.nls.de.json +1176 -1095
- package/resource/package.nls.es.json +1176 -1095
- package/resource/package.nls.fr.json +1176 -1095
- package/resource/package.nls.it.json +1176 -1095
- package/resource/package.nls.ja.json +1176 -1095
- package/resource/package.nls.json +116 -28
- package/resource/package.nls.ko.json +1176 -1095
- package/resource/package.nls.pl.json +1176 -1095
- package/resource/package.nls.pt-BR.json +1176 -1095
- package/resource/package.nls.ru.json +1176 -1095
- package/resource/package.nls.tr.json +1176 -1095
- package/resource/package.nls.zh-Hans.json +1176 -1095
- package/resource/package.nls.zh-Hant.json +1176 -1095
- package/resource/templates/package.nls.cs.json +39 -24
- package/resource/templates/package.nls.de.json +37 -22
- package/resource/templates/package.nls.es.json +35 -20
- package/resource/templates/package.nls.fr.json +45 -30
- package/resource/templates/package.nls.it.json +42 -27
- package/resource/templates/package.nls.ja.json +35 -20
- package/resource/templates/package.nls.json +27 -12
- package/resource/templates/package.nls.ko.json +33 -18
- package/resource/templates/package.nls.pl.json +38 -23
- package/resource/templates/package.nls.pt-BR.json +34 -19
- package/resource/templates/package.nls.ru.json +33 -18
- package/resource/templates/package.nls.tr.json +38 -23
- package/resource/templates/package.nls.zh-Hans.json +44 -29
- package/resource/templates/package.nls.zh-Hant.json +45 -30
- package/resource/templates/package.nls.zh-cn.json +7 -8
- package/resource/templates/package.nls.zh-tw.json +7 -8
- package/resource/yaml-schema/v1.11/yaml.schema.json +3 -0
- package/resource/yaml-schema/v1.12/yaml.schema.json +2132 -0
- package/resource/yaml-schema/v1.13/yaml.schema.json +2193 -0
- package/resource/yaml-schema/yaml.schema.json +127 -2
- package/templates/configs/playground/typescript/.vscode/tasks.json +1 -1
- package/templates/fallback/common.zip +0 -0
- package/templates/fallback/csharp.zip +0 -0
- package/templates/fallback/js.zip +0 -0
- package/templates/fallback/python.zip +0 -0
- package/templates/fallback/ts.zip +0 -0
- package/templates/metadata/allTemplates.json +32 -16
- package/templates/metadata/defaultGeneratorTemplates.json +8 -0
- package/templates/metadata.zip +0 -0
- package/templates/ui/ceaNode.json +30 -0
- package/templates/ui/tdpNode.json +13 -14
- package/templates/ui/teamsNode.json +124 -0
- package/templates/ui/wizardNode.json +56 -46
- package/templates/v4/create-selector.json +392 -0
- package/templates/v4/floor.json +3 -0
- package/templates/v4/modify-selector.json +78 -0
- package/templates/v4/templates-metadata.zip +0 -0
- package/templates/v4/templates.zip +0 -0
- package/build/core/middleware/projectMigratorV3.d.ts +0 -39
- package/build/core/middleware/projectMigratorV3.d.ts.map +0 -1
- package/build/core/middleware/projectMigratorV3.js +0 -694
- package/build/core/middleware/projectMigratorV3.js.map +0 -1
- package/build/core/middleware/projectVersionChecker.d.ts +0 -3
- package/build/core/middleware/projectVersionChecker.d.ts.map +0 -1
- package/build/core/middleware/projectVersionChecker.js +0 -60
- package/build/core/middleware/projectVersionChecker.js.map +0 -1
- package/build/core/middleware/types.d.ts +0 -9
- package/build/core/middleware/types.d.ts.map +0 -1
- package/build/core/middleware/types.js.map +0 -1
- package/build/core/middleware/utils/MigrationUtils.d.ts +0 -13
- package/build/core/middleware/utils/MigrationUtils.d.ts.map +0 -1
- package/build/core/middleware/utils/MigrationUtils.js +0 -212
- package/build/core/middleware/utils/MigrationUtils.js.map +0 -1
- package/build/core/middleware/utils/appYmlGenerator.d.ts +0 -34
- package/build/core/middleware/utils/appYmlGenerator.d.ts.map +0 -1
- package/build/core/middleware/utils/appYmlGenerator.js +0 -158
- package/build/core/middleware/utils/appYmlGenerator.js.map +0 -1
- package/build/core/middleware/utils/debug/appLocalYmlGenerator.d.ts +0 -65
- package/build/core/middleware/utils/debug/appLocalYmlGenerator.d.ts.map +0 -1
- package/build/core/middleware/utils/debug/appLocalYmlGenerator.js +0 -61
- package/build/core/middleware/utils/debug/appLocalYmlGenerator.js.map +0 -1
- package/build/core/middleware/utils/debug/constants.d.ts +0 -20
- package/build/core/middleware/utils/debug/constants.d.ts.map +0 -1
- package/build/core/middleware/utils/debug/constants.js +0 -28
- package/build/core/middleware/utils/debug/constants.js.map +0 -1
- package/build/core/middleware/utils/debug/debugMigrationContext.d.ts +0 -14
- package/build/core/middleware/utils/debug/debugMigrationContext.d.ts.map +0 -1
- package/build/core/middleware/utils/debug/debugMigrationContext.js +0 -23
- package/build/core/middleware/utils/debug/debugMigrationContext.js.map +0 -1
- package/build/core/middleware/utils/debug/debugV3MigrationUtils.d.ts +0 -37
- package/build/core/middleware/utils/debug/debugV3MigrationUtils.d.ts.map +0 -1
- package/build/core/middleware/utils/debug/debugV3MigrationUtils.js +0 -291
- package/build/core/middleware/utils/debug/debugV3MigrationUtils.js.map +0 -1
- package/build/core/middleware/utils/debug/taskMigrator.d.ts +0 -22
- package/build/core/middleware/utils/debug/taskMigrator.d.ts.map +0 -1
- package/build/core/middleware/utils/debug/taskMigrator.js +0 -935
- package/build/core/middleware/utils/debug/taskMigrator.js.map +0 -1
- package/build/core/middleware/utils/migrationContext.d.ts +0 -32
- package/build/core/middleware/utils/migrationContext.d.ts.map +0 -1
- package/build/core/middleware/utils/migrationContext.js +0 -104
- package/build/core/middleware/utils/migrationContext.js.map +0 -1
- package/templates/configs/local/typescript/.gitignore +0 -1
- package/templates/configs/playground/typescript/.gitignore +0 -4
- /package/build/{core/middleware → component/generator/openPlugin}/types.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whitelist.js","sourceRoot":"","sources":["../../../src/v4/runtime/whitelist.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAYlC,kDASC;AAsMD,oDAOC;;AA/ND,mDAA6B;AAC7B,4DAAmE;AAEnE,kFAAkF;AAElF,MAAM,kBAAkB,GAAG,WAAW,CAAC;AACvC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEhC,4DAA4D;AAC5D,SAAgB,mBAAmB,CAAC,GAAW;IAC7C,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,IAAI,CAAC;QACH,IAAI,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;IAC3B,CAAC;IAAC,MAAM,CAAC;QACP,IAAI,GAAG,EAAE,CAAC;I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,MAAM,SAAS,GAAG,IAAI,GAAG,CAAsB;IAC7C,CAAC,cAAc,EAAE,oBAAY,CAAC;IAC9B,CAAC,YAAY,EAAE,kBAAU,CAAC;IAC1B,CAAC,0BAA0B,EAAE,gCAAwB,CAAC;IACtD,CAAC,eAAe,EAAE,qBAAa,CAAC;IAChC,CAAC,UAAU,EAAE,gBAAQ,CAAC;IACtB,CAAC,0BAA0B,EAAE,gCAAwB,CAAC;IACtD,CAAC,2BAA2B,EAAE,iCAAyB,CAAC;IACxD,CAAC,iCAAiC,EAAE,uCAA+B,CAAC;IACpE,CAAC,4BAA4B,EAAE,kCAA0B,CAAC;IAC1D,CAAC,yBAAyB,EAAE,+BAAuB,CAAC;IACpD,CAAC,qBAAqB,EAAE,2BAAmB,CAAC;CAC7C,CAAC,CAAC;AAEH,kFAAkF;AAClF,SAAS,aAAa,CAAC,IAAY;IACjC,OAAO,IAAA,qCAAsB,EAAC,IAAI,CAAC,CAAC;AACtC,CAAC;AAED,mDAAmD;AACnD,SAAgB,oBAAoB,CAClC,aAAwC,aAAa;IAErD,OAAO;QACL,SAAS,EAAE,CAAC,IAAY,EAA2B,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC;QACzE,KAAK,EAAE,CAAC,IAAY,EAAW,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC;KACnD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FxError } from "@microsoft/teamsfx-api";
|
|
2
|
+
import { Result } from "neverthrow";
|
|
3
|
+
export type TempDirectoryPhase = "allocate" | "operate" | "cleanup";
|
|
4
|
+
export interface TempDirectoryPort {
|
|
5
|
+
create(prefix: string): Promise<string>;
|
|
6
|
+
remove(directory: string): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
/** Run one operation in a disposable directory without allowing filesystem failures to escape Result. */
|
|
9
|
+
export declare function withTempDirectory<T>(prefix: string, errorFactory: (phase: TempDirectoryPhase, error: unknown) => FxError, operation: (directory: string) => Promise<Result<T, FxError>>, port?: TempDirectoryPort): Promise<Result<T, FxError>>;
|
|
10
|
+
//# sourceMappingURL=withTempDirectory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withTempDirectory.d.ts","sourceRoot":"","sources":["../../../src/v4/runtime/withTempDirectory.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAIjD,OAAO,EAAE,MAAM,EAAO,MAAM,YAAY,CAAC;AAEzC,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;AAEpE,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACxC,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1C;AAOD,yGAAyG;AACzG,wBAAsB,iBAAiB,CAAC,CAAC,EACvC,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,CAAC,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,OAAO,KAAK,OAAO,EACpE,SAAS,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,EAC7D,IAAI,GAAE,iBAAyC,GAC9C,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAuB7B"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT license.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.withTempDirectory = withTempDirectory;
|
|
6
|
+
const tslib_1 = require("tslib");
|
|
7
|
+
const fs = tslib_1.__importStar(require("fs-extra"));
|
|
8
|
+
const os = tslib_1.__importStar(require("os"));
|
|
9
|
+
const path = tslib_1.__importStar(require("path"));
|
|
10
|
+
const neverthrow_1 = require("neverthrow");
|
|
11
|
+
const nodeTempDirectoryPort = {
|
|
12
|
+
create: (prefix) => fs.mkdtemp(path.join(os.tmpdir(), prefix)),
|
|
13
|
+
remove: (directory) => fs.remove(directory),
|
|
14
|
+
};
|
|
15
|
+
/** Run one operation in a disposable directory without allowing filesystem failures to escape Result. */
|
|
16
|
+
async function withTempDirectory(prefix, errorFactory, operation, port = nodeTempDirectoryPort) {
|
|
17
|
+
let directory;
|
|
18
|
+
try {
|
|
19
|
+
directory = await port.create(prefix);
|
|
20
|
+
}
|
|
21
|
+
catch (error) {
|
|
22
|
+
return (0, neverthrow_1.err)(errorFactory("allocate", error));
|
|
23
|
+
}
|
|
24
|
+
let outcome;
|
|
25
|
+
try {
|
|
26
|
+
outcome = await operation(directory);
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
outcome = (0, neverthrow_1.err)(errorFactory("operate", error));
|
|
30
|
+
}
|
|
31
|
+
try {
|
|
32
|
+
await port.remove(directory);
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
if (outcome.isOk()) {
|
|
36
|
+
return (0, neverthrow_1.err)(errorFactory("cleanup", error));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return outcome;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=withTempDirectory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withTempDirectory.js","sourceRoot":"","sources":["../../../src/v4/runtime/withTempDirectory.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAqBlC,8CA4BC;;AA9CD,qDAA+B;AAC/B,+CAAyB;AACzB,mDAA6B;AAC7B,2CAAyC;AASzC,MAAM,qBAAqB,GAAsB;IAC/C,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,MAAM,CAAC,CAAC;IAC9D,MAAM,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC;CAC5C,CAAC;AAEF,yGAAyG;AAClG,KAAK,UAAU,iBAAiB,CACrC,MAAc,EACd,YAAoE,EACpE,SAA6D,EAC7D,OAA0B,qBAAqB;IAE/C,IAAI,SAAiB,CAAC;IACtB,IAAI,CAAC;QACH,SAAS,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACxC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,IAAA,gBAAG,EAAC,YAAY,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC;IAC9C,CAAC;IAED,IAAI,OAA2B,CAAC;IAChC,IAAI,CAAC;QACH,OAAO,GAAG,MAAM,SAAS,CAAC,SAAS,CAAC,CAAC;IACvC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,GAAG,IAAA,gBAAG,EAAC,YAAY,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;IAChD,CAAC;IAED,IAAI,CAAC;QACH,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAC/B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;YACnB,OAAO,IAAA,gBAAG,EAAC,YAAY,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FxError, Inputs } from "@microsoft/teamsfx-api";
|
|
2
|
+
import { Result } from "neverthrow";
|
|
3
|
+
import { QuestionSpec, Validator } from "../collectInputs/collectInputs";
|
|
4
|
+
import { Answers } from "../model/dataModel";
|
|
5
|
+
export interface CreateFloorTail {
|
|
6
|
+
questions: QuestionSpec[];
|
|
7
|
+
answers: Answers;
|
|
8
|
+
validators: Record<string, Validator>;
|
|
9
|
+
}
|
|
10
|
+
export declare function createFloorTail(inputs: Inputs | undefined, languages: string[], showPythonPreview?: boolean): Promise<Result<CreateFloorTail, FxError>>;
|
|
11
|
+
export declare function validateCreateFloorAnswers(inputs: Inputs, answers: Answers): Promise<Result<undefined, FxError>>;
|
|
12
|
+
//# sourceMappingURL=createFloorTail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createFloorTail.d.ts","sourceRoot":"","sources":["../../../src/v4/surface/createFloorTail.ts"],"names":[],"mappings":"AAGA,OAAO,EAAkB,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,MAAM,EAAW,MAAM,YAAY,CAAC;AAI7C,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAqB7C,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACvC;AAwBD,wBAAsB,eAAe,CACnC,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,SAAS,EAAE,MAAM,EAAE,EACnB,iBAAiB,UAAQ,GACxB,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC,CAiF3C;AAED,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAmBrC"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT license.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.createFloorTail = createFloorTail;
|
|
6
|
+
exports.validateCreateFloorAnswers = validateCreateFloorAnswers;
|
|
7
|
+
const neverthrow_1 = require("neverthrow");
|
|
8
|
+
const localizeUtils_1 = require("../../common/localizeUtils");
|
|
9
|
+
const common_1 = require("../../error/common");
|
|
10
|
+
const question_1 = require("../../question");
|
|
11
|
+
const LANGUAGE_LABELS = {
|
|
12
|
+
javascript: "JavaScript",
|
|
13
|
+
typescript: "TypeScript",
|
|
14
|
+
csharp: "C#",
|
|
15
|
+
python: "Python",
|
|
16
|
+
};
|
|
17
|
+
const PYTHON_LANGUAGE = "python";
|
|
18
|
+
function languageOption(language, showPythonPreview) {
|
|
19
|
+
return {
|
|
20
|
+
id: language,
|
|
21
|
+
label: LANGUAGE_LABELS[language] ?? language,
|
|
22
|
+
description: showPythonPreview && language === PYTHON_LANGUAGE
|
|
23
|
+
? (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.option.description.preview")
|
|
24
|
+
: undefined,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function isFuncValidation(value) {
|
|
28
|
+
return (typeof value === "object" &&
|
|
29
|
+
value !== null &&
|
|
30
|
+
typeof Reflect.get(value, "validFunc") === "function");
|
|
31
|
+
}
|
|
32
|
+
function getStringValidationFunc(validation) {
|
|
33
|
+
return isFuncValidation(validation) ? validation.validFunc : undefined;
|
|
34
|
+
}
|
|
35
|
+
async function resolveStringValue(value, inputs) {
|
|
36
|
+
return typeof value === "function" ? await value(inputs) : value;
|
|
37
|
+
}
|
|
38
|
+
async function createFloorTail(inputs, languages, showPythonPreview = false) {
|
|
39
|
+
const questions = [];
|
|
40
|
+
const answers = {};
|
|
41
|
+
if (languages.length > 1) {
|
|
42
|
+
questions.push({
|
|
43
|
+
name: "language",
|
|
44
|
+
type: "singleSelect",
|
|
45
|
+
title: "Programming Language",
|
|
46
|
+
default: languages[0],
|
|
47
|
+
staticOptions: languages.map((language) => languageOption(language, showPythonPreview)),
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
else if (languages.length === 1 && languages[0] !== "common") {
|
|
51
|
+
answers.language = languages[0];
|
|
52
|
+
}
|
|
53
|
+
if (inputs === undefined) {
|
|
54
|
+
return (0, neverthrow_1.ok)({ questions, answers, validators: {} });
|
|
55
|
+
}
|
|
56
|
+
const folder = (0, question_1.folderQuestion)();
|
|
57
|
+
const appName = (0, question_1.appNameQuestion)();
|
|
58
|
+
const existingFolder = inputs[question_1.QuestionNames.Folder];
|
|
59
|
+
if (typeof existingFolder === "string") {
|
|
60
|
+
answers[question_1.QuestionNames.Folder] = existingFolder;
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
const defaultFolder = await resolveStringValue(folder.default, inputs);
|
|
64
|
+
if (inputs.nonInteractive) {
|
|
65
|
+
if (defaultFolder !== undefined) {
|
|
66
|
+
answers[question_1.QuestionNames.Folder] = defaultFolder;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
questions.push({
|
|
71
|
+
name: folder.name,
|
|
72
|
+
type: "folder",
|
|
73
|
+
title: (await resolveStringValue(folder.title, inputs)) ?? folder.name,
|
|
74
|
+
placeholder: await resolveStringValue(folder.placeholder, inputs),
|
|
75
|
+
prompt: await resolveStringValue(folder.prompt, inputs),
|
|
76
|
+
default: defaultFolder,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
const existingAppName = inputs[question_1.QuestionNames.AppName];
|
|
81
|
+
if (typeof existingAppName === "string") {
|
|
82
|
+
answers[question_1.QuestionNames.AppName] = existingAppName;
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
const defaultAppName = await resolveStringValue(appName.default, inputs);
|
|
86
|
+
if (inputs.nonInteractive) {
|
|
87
|
+
if (defaultAppName === undefined) {
|
|
88
|
+
return (0, neverthrow_1.err)(new common_1.MissingRequiredInputError(question_1.QuestionNames.AppName, "createFrontDoor"));
|
|
89
|
+
}
|
|
90
|
+
answers[question_1.QuestionNames.AppName] = defaultAppName;
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
questions.push({
|
|
94
|
+
name: appName.name,
|
|
95
|
+
type: "text",
|
|
96
|
+
title: (await resolveStringValue(appName.title, inputs)) ?? appName.name,
|
|
97
|
+
placeholder: await resolveStringValue(appName.placeholder, inputs),
|
|
98
|
+
prompt: await resolveStringValue(appName.prompt, inputs),
|
|
99
|
+
default: defaultAppName,
|
|
100
|
+
validation: "appName",
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
const validateAppName = getStringValidationFunc(appName.validation);
|
|
105
|
+
const floorValidators = {};
|
|
106
|
+
if (validateAppName !== undefined) {
|
|
107
|
+
floorValidators.appName = async (value, currentAnswers) => {
|
|
108
|
+
const validationInputs = { ...inputs };
|
|
109
|
+
const folderAnswer = currentAnswers[question_1.QuestionNames.Folder];
|
|
110
|
+
if (typeof folderAnswer === "string") {
|
|
111
|
+
validationInputs[question_1.QuestionNames.Folder] = folderAnswer;
|
|
112
|
+
}
|
|
113
|
+
return validateAppName(value, validationInputs);
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
return (0, neverthrow_1.ok)({ questions, answers, validators: floorValidators });
|
|
117
|
+
}
|
|
118
|
+
async function validateCreateFloorAnswers(inputs, answers) {
|
|
119
|
+
const appName = answers[question_1.QuestionNames.AppName];
|
|
120
|
+
if (typeof appName !== "string") {
|
|
121
|
+
return (0, neverthrow_1.err)(new common_1.MissingRequiredInputError(question_1.QuestionNames.AppName, "createFrontDoor"));
|
|
122
|
+
}
|
|
123
|
+
const validateAppName = getStringValidationFunc((0, question_1.appNameQuestion)().validation);
|
|
124
|
+
if (validateAppName === undefined) {
|
|
125
|
+
return (0, neverthrow_1.ok)(undefined);
|
|
126
|
+
}
|
|
127
|
+
const validationInputs = { ...inputs };
|
|
128
|
+
const folderAnswer = answers[question_1.QuestionNames.Folder];
|
|
129
|
+
if (typeof folderAnswer === "string") {
|
|
130
|
+
validationInputs[question_1.QuestionNames.Folder] = folderAnswer;
|
|
131
|
+
}
|
|
132
|
+
const message = await validateAppName(appName, validationInputs);
|
|
133
|
+
if (message !== undefined) {
|
|
134
|
+
return (0, neverthrow_1.err)(new common_1.InputValidationError(question_1.QuestionNames.AppName, message, "createFrontDoor"));
|
|
135
|
+
}
|
|
136
|
+
return (0, neverthrow_1.ok)(undefined);
|
|
137
|
+
}
|
|
138
|
+
//# sourceMappingURL=createFloorTail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createFloorTail.js","sourceRoot":"","sources":["../../../src/v4/surface/createFloorTail.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAyDlC,0CAqFC;AAED,gEAsBC;AAnKD,2CAA6C;AAC7C,8DAAgE;AAChE,+CAAqF;AACrF,6CAAgF;AAIhF,MAAM,eAAe,GAA2B;IAC9C,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE,YAAY;IACxB,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,QAAQ;CACjB,CAAC;AACF,MAAM,eAAe,GAAG,QAAQ,CAAC;AAEjC,SAAS,cAAc,CAAC,QAAgB,EAAE,iBAA0B;IAClE,OAAO;QACL,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,eAAe,CAAC,QAAQ,CAAC,IAAI,QAAQ;QAC5C,WAAW,EACT,iBAAiB,IAAI,QAAQ,KAAK,eAAe;YAC/C,CAAC,CAAC,IAAA,kCAAkB,EAAC,uDAAuD,CAAC;YAC7E,CAAC,CAAC,SAAS;KAChB,CAAC;AACJ,CAAC;AAQD,SAAS,gBAAgB,CAAC,KAAc;IACtC,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,OAAO,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,WAAW,CAAC,KAAK,UAAU,CAC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ction } from "@microsoft/teamsfx-api";
|
|
2
|
+
import { Result } from "neverthrow";
|
|
3
|
+
import { MCPFetchResult } from "../../common/mcpToolFetcher";
|
|
4
|
+
import { type ODRServer } from "../../common/odrProvider";
|
|
5
|
+
import { SearchOpenAPISpecResult } from "../../common/kiotaClient";
|
|
6
|
+
import { OptionsProvider } from "../collectInputs/collectInputs";
|
|
7
|
+
import { Answers, DeclarativeLocator } from "../model/dataModel";
|
|
8
|
+
/** Gate `csharp` by surface and the .NET flag; other languages pass through. */
|
|
9
|
+
export declare function gateLanguagesBySurface(languages: string[], surface: string, flagReader: (name: string) => boolean): string[];
|
|
10
|
+
/** Injected provider and feature-flag overrides. */
|
|
11
|
+
export interface CreateInputsDeps {
|
|
12
|
+
/** Override `optionsFrom` providers (e.g. a live `mcp.serverTypes`); merged over the defaults. */
|
|
13
|
+
optionsProvider?: Record<string, OptionsProvider>;
|
|
14
|
+
/** The feature-flag reader behind `featureFlag('…')` (default: env-backed). */
|
|
15
|
+
flagReader?: (name: string) => boolean;
|
|
16
|
+
/** The host surface (`vscode` / `cli` / `vs`) — gates the `csharp` language axis (default `vscode`). */
|
|
17
|
+
surface?: string;
|
|
18
|
+
/** Full create inputs when the create floor (`folder` / `app-name`) should be appended after Q2. */
|
|
19
|
+
inputs?: Inputs;
|
|
20
|
+
/** Fetch static MCP tools when CLI did not provide a tools file path. */
|
|
21
|
+
fetchMcpTools?: (serverUrl: string) => Promise<MCPFetchResult>;
|
|
22
|
+
/** List available local MCP servers for the dynamic MCP create flow. */
|
|
23
|
+
listLocalMcpServers?: () => Promise<ODRServer[]>;
|
|
24
|
+
/** Search public OpenAPI descriptions for the v3-compatible OpenAPI source picker. */
|
|
25
|
+
searchOpenAPISpec?: (query: string) => Promise<SearchOpenAPISpecResult[]>;
|
|
26
|
+
/** Continue Q1's step numbering (its `promptCount`) so Q2's first prompt shows a Back button. */
|
|
27
|
+
baseStep?: number;
|
|
28
|
+
/** When true, a back past Q2's first prompt returns `{ kind: "back" }` (the front door re-enters Q1). */
|
|
29
|
+
backable?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/** The create-input walk's outcome: completed answers, or a `back` for the front door's re-entry loop. */
|
|
32
|
+
export type CreateInputsOutcome = {
|
|
33
|
+
kind: "done";
|
|
34
|
+
answers: Answers;
|
|
35
|
+
} | {
|
|
36
|
+
kind: "back";
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Run one create template's Q2 + common floor over the host surface, returning a
|
|
40
|
+
* resumable outcome. `deps.baseStep` continues Q1's step numbering and
|
|
41
|
+
* `deps.backable` turns a back past the first prompt into a `{ kind: "back" }`
|
|
42
|
+
* outcome (the front door then re-enters Q1). See collect-create-inputs CCI-25/26.
|
|
43
|
+
*/
|
|
44
|
+
export declare function runCreateInputsWalk(floorBytes: Buffer, locator: DeclarativeLocator, entryParams: Answers, ui: UserInteraction, deps?: CreateInputsDeps): Promise<Result<CreateInputsOutcome, FxError>>;
|
|
45
|
+
/**
|
|
46
|
+
* Run one create template's Q2 over the host surface — the stable non-resumable
|
|
47
|
+
* entry over {@link runCreateInputsWalk} (`backable` off), so a back past the
|
|
48
|
+
* first prompt cancels and the result is the plain `Answers`.
|
|
49
|
+
*/
|
|
50
|
+
export declare function runCreateInputs(floorBytes: Buffer, locator: DeclarativeLocator, entryParams: Answers, ui: UserInteraction, deps?: CreateInputsDeps): Promise<Result<Answers, FxError>>;
|
|
51
|
+
//# sourceMappingURL=createInputs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createInputs.d.ts","sourceRoot":"","sources":["../../../src/v4/surface/createInputs.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAa,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACrF,OAAO,EAAE,MAAM,EAAW,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAiB,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAe,KAAK,SAAS,E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,CAAC;AAExF;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,kBAAkB,EAC3B,WAAW,EAAE,OAAO,EACpB,EAAE,EAAE,eAAe,EACnB,IAAI,GAAE,gBAAqB,GAC1B,OAAO,CAAC,MAAM,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC,CAyE/C;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,kBAAkB,EAC3B,WAAW,EAAE,OAAO,EACpB,EAAE,EAAE,eAAe,EACnB,IAAI,GAAE,gBAAqB,GAC1B,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAkBnC"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT license.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.gateLanguagesBySurface = gateLanguagesBySurface;
|
|
6
|
+
exports.runCreateInputsWalk = runCreateInputsWalk;
|
|
7
|
+
exports.runCreateInputs = runCreateInputs;
|
|
8
|
+
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
9
|
+
const neverthrow_1 = require("neverthrow");
|
|
10
|
+
const mcpToolFetcher_1 = require("../../common/mcpToolFetcher");
|
|
11
|
+
const odrProvider_1 = require("../../common/odrProvider");
|
|
12
|
+
const featureFlags_1 = require("../../common/featureFlags");
|
|
13
|
+
const kiotaClient_1 = require("../../common/kiotaClient");
|
|
14
|
+
const collectInputs_1 = require("../collectInputs/collectInputs");
|
|
15
|
+
const declarativePackage_1 = require("../distribution/declarativePackage");
|
|
16
|
+
const evaluateExpression_1 = require("../expression/evaluateExpression");
|
|
17
|
+
const createOptionsProviders_1 = require("../providers/createOptionsProviders");
|
|
18
|
+
const packageParse_1 = require("../runtime/packageParse");
|
|
19
|
+
const whitelist_1 = require("../runtime/whitelist");
|
|
20
|
+
const createInputValidators_1 = require("../validators/createInputValidators");
|
|
21
|
+
const createFloorTail_1 = require("./createFloorTail");
|
|
22
|
+
const uiPromptUI_1 = require("./uiPromptUI");
|
|
23
|
+
/** Live create-path surface wiring for `collect-inputs`. See collect-create-inputs spec. */
|
|
24
|
+
const TEAMS_AGENTS_AND_APPS_TEMPLATE_IDS = new Set([
|
|
25
|
+
"custom-copilot-basic",
|
|
26
|
+
"custom-copilot-rag-azure-ai-search",
|
|
27
|
+
"custom-copilot-rag-custom-api",
|
|
28
|
+
"custom-copilot-rag-customize",
|
|
29
|
+
"default-bot",
|
|
30
|
+
"default-message-extension",
|
|
31
|
+
"non-sso-tab",
|
|
32
|
+
"teams-collaborator-agent",
|
|
33
|
+
]);
|
|
34
|
+
function showsPythonPreview(templateId) {
|
|
35
|
+
return TEAMS_AGENTS_AND_APPS_TEMPLATE_IDS.has(templateId);
|
|
36
|
+
}
|
|
37
|
+
function isRecord(value) {
|
|
38
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
39
|
+
}
|
|
40
|
+
/** Descriptor language axis, falling back to `["common"]`. */
|
|
41
|
+
function descriptorLanguages(descriptor) {
|
|
42
|
+
if (isRecord(descriptor) && Array.isArray(descriptor.languages)) {
|
|
43
|
+
const languages = descriptor.languages.filter((language) => typeof language === "string");
|
|
44
|
+
if (languages.length > 0) {
|
|
45
|
+
return languages;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return ["common"];
|
|
49
|
+
}
|
|
50
|
+
/** v4-local copy of the CLI-only .NET feature flag name. */
|
|
51
|
+
const CLI_DOTNET_FLAG = "TEAMSFX_CLI_DOTNET";
|
|
52
|
+
/** The C# language id, surface-gated below. */
|
|
53
|
+
const CSHARP_LANGUAGE = "csharp";
|
|
54
|
+
/** The default env-backed feature-flag reader (a flag is on iff its env var is exactly `"true"`). */
|
|
55
|
+
function envFlagReader(name) {
|
|
56
|
+
return (0, featureFlags_1.readBooleanFeatureFlag)(name);
|
|
57
|
+
}
|
|
58
|
+
/** Gate `csharp` by surface and the .NET flag; other languages pass through. */
|
|
59
|
+
function gateLanguagesBySurface(languages, surface, flagReader) {
|
|
60
|
+
const allowCsharp = surface !== "vscode" && flagReader(CLI_DOTNET_FLAG);
|
|
61
|
+
return allowCsharp ? languages : languages.filter((language) => language !== CSHARP_LANGUAGE);
|
|
62
|
+
}
|
|
63
|
+
/** The Q2 options schema: the declared identifier domain (`optionsSchema.properties` ids). */
|
|
64
|
+
function declaredOptionsSchema(descriptor) {
|
|
65
|
+
const properties = {};
|
|
66
|
+
for (const key of (0, packageParse_1.parseDeclaredKeys)(descriptor)) {
|
|
67
|
+
properties[key] = {};
|
|
68
|
+
}
|
|
69
|
+
return { properties };
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Run one create template's Q2 + common floor over the host surface, returning a
|
|
73
|
+
* resumable outcome. `deps.baseStep` continues Q1's step numbering and
|
|
74
|
+
* `deps.backable` turns a back past the first prompt into a `{ kind: "back" }`
|
|
75
|
+
* outcome (the front door then re-enters Q1). See collect-create-inputs CCI-25/26.
|
|
76
|
+
*/
|
|
77
|
+
async function runCreateInputsWalk(floorBytes, locator, entryParams, ui, deps = {}) {
|
|
78
|
+
const opened = (0, declarativePackage_1.openDeclarativePackageMetadata)(floorBytes, locator);
|
|
79
|
+
if (opened.isErr()) {
|
|
80
|
+
return (0, neverthrow_1.err)(opened.error);
|
|
81
|
+
}
|
|
82
|
+
const descriptor = opened.value.descriptor;
|
|
83
|
+
const languages = gateLanguagesBySurface(descriptorLanguages(descriptor), deps.surface ?? "vscode", deps.flagReader ?? envFlagReader);
|
|
84
|
+
const providers = {
|
|
85
|
+
...(0, createOptionsProviders_1.createDefaultCreateOptionsProviders)(deps.fetchMcpTools ?? mcpToolFetcher_1.fetchMCPTools, deps.listLocalMcpServers ?? odrProvider_1.ODRProvider.listServers, deps.searchOpenAPISpec ?? kiotaClient_1.searchOpenAPISpec),
|
|
86
|
+
...(deps.optionsProvider ?? {}),
|
|
87
|
+
};
|
|
88
|
+
const expressionPort = (0, whitelist_1.createExpressionPort)(deps.flagReader);
|
|
89
|
+
const surface = deps.surface ?? "vscode";
|
|
90
|
+
const floorTail = await (0, createFloorTail_1.createFloorTail)(deps.inputs, languages, showsPythonPreview(locator.templateId));
|
|
91
|
+
if (floorTail.isErr()) {
|
|
92
|
+
return (0, neverthrow_1.err)(floorTail.error);
|
|
93
|
+
}
|
|
94
|
+
const validatorRegistry = {
|
|
95
|
+
...(0, createInputValidators_1.createDefaultCreateInputValidators)(),
|
|
96
|
+
...floorTail.value.validators,
|
|
97
|
+
};
|
|
98
|
+
const port = {
|
|
99
|
+
ui: (0, uiPromptUI_1.createUiPromptUI)(ui),
|
|
100
|
+
optionsProvider: (providerId) => providers[providerId],
|
|
101
|
+
validator: (name) => validatorRegistry[name],
|
|
102
|
+
evaluate: (node, scope) => (0, evaluateExpression_1.evaluateExpression)(node, scope, expressionPort),
|
|
103
|
+
};
|
|
104
|
+
const initialAnswers = {
|
|
105
|
+
...entryParams,
|
|
106
|
+
...floorTail.value.answers,
|
|
107
|
+
surface,
|
|
108
|
+
nonInteractive: deps.inputs?.nonInteractive === true ? "true" : "false",
|
|
109
|
+
};
|
|
110
|
+
const walked = await (0, collectInputs_1.walkInputs)([...opened.value.questions, ...floorTail.value.questions], declaredOptionsSchema(descriptor), initialAnswers, port, { baseStep: deps.baseStep, backable: deps.backable });
|
|
111
|
+
if (walked.isErr()) {
|
|
112
|
+
return (0, neverthrow_1.err)(walked.error);
|
|
113
|
+
}
|
|
114
|
+
if (walked.value.kind === "back") {
|
|
115
|
+
return (0, neverthrow_1.ok)({ kind: "back" });
|
|
116
|
+
}
|
|
117
|
+
const answers = walked.value.answers;
|
|
118
|
+
delete answers.nonInteractive;
|
|
119
|
+
const selectedOpenApiSpec = answers.selectOpenApiSpec;
|
|
120
|
+
if (answers.apiSpecLocation === undefined && typeof selectedOpenApiSpec === "string") {
|
|
121
|
+
answers.apiSpecLocation = selectedOpenApiSpec;
|
|
122
|
+
}
|
|
123
|
+
if (deps.inputs !== undefined) {
|
|
124
|
+
const validation = await (0, createFloorTail_1.validateCreateFloorAnswers)(deps.inputs, answers);
|
|
125
|
+
if (validation.isErr()) {
|
|
126
|
+
return (0, neverthrow_1.err)(validation.error);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return (0, neverthrow_1.ok)({ kind: "done", answers });
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Run one create template's Q2 over the host surface — the stable non-resumable
|
|
133
|
+
* entry over {@link runCreateInputsWalk} (`backable` off), so a back past the
|
|
134
|
+
* first prompt cancels and the result is the plain `Answers`.
|
|
135
|
+
*/
|
|
136
|
+
async function runCreateInputs(floorBytes, locator, entryParams, ui, deps = {}) {
|
|
137
|
+
const outcome = await runCreateInputsWalk(floorBytes, locator, entryParams, ui, {
|
|
138
|
+
...deps,
|
|
139
|
+
backable: false,
|
|
140
|
+
});
|
|
141
|
+
if (outcome.isErr()) {
|
|
142
|
+
return (0, neverthrow_1.err)(outcome.error);
|
|
143
|
+
}
|
|
144
|
+
// `backable` is forced off here, so the walk cancels rather than returning a top-level back.
|
|
145
|
+
return outcome.value.kind === "back"
|
|
146
|
+
? (0, neverthrow_1.err)(new teamsfx_api_1.UserError({
|
|
147
|
+
source: "Scaffold",
|
|
148
|
+
name: "InputWalkCancelled",
|
|
149
|
+
message: "the input walk was cancelled by going back from the first question",
|
|
150
|
+
}))
|
|
151
|
+
: (0, neverthrow_1.ok)(outcome.value.answers);
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=createInputs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createInputs.js","sourceRoot":"","sources":["../../../src/v4/surface/createInputs.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAsElC,wDAOC;AA0CD,kDA+EC;AAOD,0CAwBC;AAnOD,wDAA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E,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;AACvC,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,eAAe,CACnC,UAAkB,EAClB,OAA2B,EAC3B,WAAoB,EACpB,EAAmB,EACnB,OAAyB,EAAE;IAE3B,MAAM,OAAO,GAAG,MAAM,mBAAmB,CAAC,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE;QAC9E,GAAG,IAAI;QACP,QAAQ,EAAE,KAAK;KAChB,CAAC,CAAC;IACH,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;QACpB,OAAO,IAAA,gBAAG,EAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;IACD,6FAA6F;IAC7F,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM;QAClC,CAAC,CAAC,IAAA,gBAAG,EACD,IAAI,uBAAS,CAAC;YACZ,MAAM,EAAE,UAAU;YAClB,IAAI,EAAE,oBAAoB;YAC1B,OAAO,EAAE,oEAAoE;SAC9E,CAAC,CACH;QACH,CAAC,CAAC,IAAA,eAAE,EAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAChC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FxError, UserInteraction } from "@microsoft/teamsfx-api";
|
|
2
|
+
import { Result } from "neverthrow";
|
|
3
|
+
import { BuildTarget, SelectorWalkResult } from "../buildTarget/resolveBuildTarget";
|
|
4
|
+
import { WalkHistoryEntry } from "../collectInputs/collectInputs";
|
|
5
|
+
/** Create-selector options; all are defaulted. */
|
|
6
|
+
export interface CreateSelectorDeps {
|
|
7
|
+
/** The feature-flag reader (default: env-backed); v4 imports no `featureFlagManager`. */
|
|
8
|
+
flagReader?: (name: string) => boolean;
|
|
9
|
+
/** Selector bytes shape. Defaults to the full package zip for current callers. */
|
|
10
|
+
selectorBytesKind?: "zip" | "json";
|
|
11
|
+
/** Membership test supplied by a staged artifact snapshot or metadata index. */
|
|
12
|
+
v4Registry?: (templateId: string) => boolean;
|
|
13
|
+
/** Q1 answers known up front. */
|
|
14
|
+
prefilled?: Record<string, string>;
|
|
15
|
+
/** Whether unfilled required dimensions may be prompted. */
|
|
16
|
+
interactive?: boolean;
|
|
17
|
+
/** Resume a prior Q1 walk (cross-phase back): re-ask its last dimension with the retained history. */
|
|
18
|
+
resume?: {
|
|
19
|
+
history: WalkHistoryEntry[];
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/** Run create Q1 over `ui`, resolving the dispatched `BuildTarget`. */
|
|
23
|
+
export declare function runCreateSelector(floorBytes: Buffer, ui: UserInteraction, surface: string, deps?: CreateSelectorDeps): Promise<Result<SelectorWalkResult, FxError>>;
|
|
24
|
+
/** Resolve a pinned template id without re-walking Q1. */
|
|
25
|
+
export declare function resolveCreateTargetByTemplateId(floorBytes: Buffer, templateId: string): Result<BuildTarget, FxError>;
|
|
26
|
+
//# sourceMappingURL=createSelectorWalk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createSelectorWalk.d.ts","sourceRoot":"","sources":["../../../src/v4/surface/createSelectorWalk.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAA0B,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC1F,OAAO,EAAE,MAAM,EAAW,MAAM,YAAY,CAAC;AAM7C,OAAO,EAEL,WAAW,EAIX,kBAAkB,EAGnB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAoBlE,kDAAkD;AAClD,MAAM,WAAW,kBAAkB;IACjC,yFAAyF;IACzF,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IACvC,kFAAkF;IAClF,iBAAiB,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACnC,gFAAgF;IAChF,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC;IAC7C,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,4DAA4D;IAC5D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sGAAsG;IACtG,MAAM,CAAC,EAAE;QAAE,OAAO,EAAE,gBAAgB,EAAE,CAAA;KAAE,CAAC;CAC1C;AAiGD,uEAAuE;AACvE,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,MAAM,EAClB,EAAE,EAAE,eAAe,EACnB,OAAO,EAAE,MAAM,EACf,IAAI,GAAE,kBAAuB,GAC5B,OAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC,CAmC9C;AAED,0DAA0D;AAC1D,wBAAgB,+BAA+B,CAC7C,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GACjB,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAgB9B"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT license.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.runCreateSelector = runCreateSelector;
|
|
6
|
+
exports.resolveCreateTargetByTemplateId = resolveCreateTargetByTemplateId;
|
|
7
|
+
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
8
|
+
const neverthrow_1 = require("neverthrow");
|
|
9
|
+
const resolveBuildTarget_1 = require("../buildTarget/resolveBuildTarget");
|
|
10
|
+
const createSelector_1 = require("../distribution/createSelector");
|
|
11
|
+
const declarativePackage_1 = require("../distribution/declarativePackage");
|
|
12
|
+
const evaluateExpression_1 = require("../expression/evaluateExpression");
|
|
13
|
+
const featureFlags_1 = require("../../common/featureFlags");
|
|
14
|
+
const localizePrompt_1 = require("./localizePrompt");
|
|
15
|
+
/** Live Q1 create-selector prompt face. See walk-create-selector spec. */
|
|
16
|
+
const SOURCE = "Scaffold";
|
|
17
|
+
function labelWithIcon(label, iconPath) {
|
|
18
|
+
return iconPath === undefined ? label : `$(${iconPath}) ${label}`;
|
|
19
|
+
}
|
|
20
|
+
/** The default env-backed feature-flag reader (a flag is on iff its env var is exactly `"true"`). */
|
|
21
|
+
function envFlagReader(name) {
|
|
22
|
+
return (0, featureFlags_1.readBooleanFeatureFlag)(name);
|
|
23
|
+
}
|
|
24
|
+
/** Convert a thrown prompt failure back to an `FxError` for the `Result` boundary. */
|
|
25
|
+
function toFxError(e) {
|
|
26
|
+
if (e instanceof teamsfx_api_1.UserError || e instanceof teamsfx_api_1.SystemError) {
|
|
27
|
+
return e;
|
|
28
|
+
}
|
|
29
|
+
const message = e instanceof Error ? e.message : String(e);
|
|
30
|
+
return new teamsfx_api_1.SystemError({ source: SOURCE, name: "CreateSelectorWalkFailed", message });
|
|
31
|
+
}
|
|
32
|
+
/** Build the live interactive route resolver over the floor and host UI. */
|
|
33
|
+
function buildPort(floorBytes, presentation, ui, surface, flagReader, v4Registry) {
|
|
34
|
+
const exprPort = { functions: () => undefined, flags: flagReader };
|
|
35
|
+
const byName = new Map(presentation.questions.map((q) => [q.name, q]));
|
|
36
|
+
async function prompt(question, step) {
|
|
37
|
+
const pq = byName.get(question.name);
|
|
38
|
+
if (pq === undefined) {
|
|
39
|
+
throw new teamsfx_api_1.SystemError({
|
|
40
|
+
source: SOURCE,
|
|
41
|
+
name: "MissingSelectorPresentation",
|
|
42
|
+
message: `The selector has no presentation for question '${question.name}'.`,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
const scope = { surface };
|
|
46
|
+
const visible = [];
|
|
47
|
+
for (const option of pq.staticOptions) {
|
|
48
|
+
if (option.condition !== undefined) {
|
|
49
|
+
const gate = (0, evaluateExpression_1.evaluateExpression)(option.condition, scope, exprPort);
|
|
50
|
+
if (gate.isErr()) {
|
|
51
|
+
throw gate.error;
|
|
52
|
+
}
|
|
53
|
+
if (gate.value !== true) {
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
visible.push(option);
|
|
58
|
+
}
|
|
59
|
+
const selected = await ui.selectOption({
|
|
60
|
+
name: pq.name,
|
|
61
|
+
title: (0, localizePrompt_1.localizePrefixedText)(pq.keyPrefix, "title", pq.title) ?? pq.name,
|
|
62
|
+
placeholder: (0, localizePrompt_1.localizePrefixedText)(pq.keyPrefix, "placeholder", pq.placeholder),
|
|
63
|
+
step,
|
|
64
|
+
options: visible.map((option) => ({
|
|
65
|
+
id: option.id,
|
|
66
|
+
label: labelWithIcon((0, localizePrompt_1.localizePrefixedText)(option.keyPrefix, "label", option.label) ?? option.label, option.iconPath),
|
|
67
|
+
detail: (0, localizePrompt_1.localizePrefixedText)(option.keyPrefix, "detail", option.detail),
|
|
68
|
+
groupName: (0, localizePrompt_1.localizePrefixedText)(option.keyPrefix, "groupName", option.groupName),
|
|
69
|
+
})),
|
|
70
|
+
returnObject: false,
|
|
71
|
+
});
|
|
72
|
+
if (selected.isErr()) {
|
|
73
|
+
throw selected.error;
|
|
74
|
+
}
|
|
75
|
+
if (selected.value.type === "back") {
|
|
76
|
+
return { kind: "back" };
|
|
77
|
+
}
|
|
78
|
+
const result = selected.value.result;
|
|
79
|
+
if (typeof result === "string") {
|
|
80
|
+
return { kind: "value", value: result };
|
|
81
|
+
}
|
|
82
|
+
return { kind: "value", value: result === undefined ? "" : result.id };
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
prompt,
|
|
86
|
+
featureFlag: flagReader,
|
|
87
|
+
v4Registry(templateId) {
|
|
88
|
+
if (v4Registry !== undefined) {
|
|
89
|
+
return v4Registry(templateId);
|
|
90
|
+
}
|
|
91
|
+
return (0, declarativePackage_1.openDeclarativePackage)(floorBytes, { kind: "create", templateId }).isOk();
|
|
92
|
+
},
|
|
93
|
+
v3CoreMethodRegistry() {
|
|
94
|
+
return false;
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/** Run create Q1 over `ui`, resolving the dispatched `BuildTarget`. */
|
|
99
|
+
async function runCreateSelector(floorBytes, ui, surface, deps = {}) {
|
|
100
|
+
const flagReader = deps.flagReader ?? envFlagReader;
|
|
101
|
+
const selectorBytesKind = deps.selectorBytesKind ?? "zip";
|
|
102
|
+
const prefilled = deps.prefilled ?? {};
|
|
103
|
+
const interactive = deps.interactive ?? true;
|
|
104
|
+
const spec = selectorBytesKind === "json"
|
|
105
|
+
? (0, createSelector_1.openSelectorFromJsonBytes)(floorBytes, "create")
|
|
106
|
+
: (0, createSelector_1.openCreateSelector)(floorBytes);
|
|
107
|
+
if (spec.isErr()) {
|
|
108
|
+
return (0, neverthrow_1.err)(spec.error);
|
|
109
|
+
}
|
|
110
|
+
const presentation = selectorBytesKind === "json"
|
|
111
|
+
? (0, createSelector_1.openSelectorPresentationFromJsonBytes)(floorBytes, "create")
|
|
112
|
+
: (0, createSelector_1.openCreateSelectorPresentation)(floorBytes);
|
|
113
|
+
if (presentation.isErr()) {
|
|
114
|
+
return (0, neverthrow_1.err)(presentation.error);
|
|
115
|
+
}
|
|
116
|
+
const port = buildPort(floorBytes, presentation.value, ui, surface, flagReader, deps.v4Registry ??
|
|
117
|
+
(selectorBytesKind === "json" ? (0, resolveBuildTarget_1.v4RouteRegistryFromSelector)(spec.value) : undefined));
|
|
118
|
+
try {
|
|
119
|
+
return await (0, resolveBuildTarget_1.resolveBuildTarget)(spec.value, prefilled, interactive, port, {
|
|
120
|
+
resume: deps.resume,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
catch (e) {
|
|
124
|
+
return (0, neverthrow_1.err)(toFxError(e));
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/** Resolve a pinned template id without re-walking Q1. */
|
|
128
|
+
function resolveCreateTargetByTemplateId(floorBytes, templateId) {
|
|
129
|
+
const spec = (0, createSelector_1.openCreateSelector)(floorBytes);
|
|
130
|
+
if (spec.isErr()) {
|
|
131
|
+
return (0, neverthrow_1.err)(spec.error);
|
|
132
|
+
}
|
|
133
|
+
const route = spec.value.routes.find((r) => r.templateId === templateId);
|
|
134
|
+
if (route === undefined) {
|
|
135
|
+
return (0, neverthrow_1.err)(new teamsfx_api_1.UserError({
|
|
136
|
+
source: SOURCE,
|
|
137
|
+
name: resolveBuildTarget_1.BUILD_TARGET_UNKNOWN_TEMPLATE,
|
|
138
|
+
message: `Template '${templateId}' is not present in the create selector.`,
|
|
139
|
+
}));
|
|
140
|
+
}
|
|
141
|
+
return (0, neverthrow_1.ok)({ templateId, engine: route.engine, answers: {} });
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=createSelectorWalk.js.map
|