@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,351 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT license.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.createProjectFrontDoor = createProjectFrontDoor;
|
|
6
|
+
const tslib_1 = require("tslib");
|
|
7
|
+
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
8
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
9
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
10
|
+
const neverthrow_1 = require("neverthrow");
|
|
11
|
+
const v4_1 = require("../v4");
|
|
12
|
+
const featureFlags_1 = require("../common/featureFlags");
|
|
13
|
+
const globalVars_1 = require("../common/globalVars");
|
|
14
|
+
const templateNames_1 = require("../component/generator/templates/templateNames");
|
|
15
|
+
const questionNames_1 = require("../question/questionNames");
|
|
16
|
+
/**
|
|
17
|
+
* Operation `dispatch-create-by-engine` — the create front door.
|
|
18
|
+
*
|
|
19
|
+
* Spec: docs/03-specs/operations/scaffolding/dispatch-create-by-engine.md
|
|
20
|
+
* Decision: docs/02-architecture/adr/ADR-0014-dispatcher-buildtarget-resolution.md
|
|
21
|
+
*
|
|
22
|
+
* The single entry the create surfaces call in place of `FxCore.createProject`.
|
|
23
|
+
* Behind `TEAMSFX_V4_ENABLED`, the v4 create selector is the live Q1 front door
|
|
24
|
+
* and the resolved `BuildTarget` is dispatched by its `engine` (INV-3):
|
|
25
|
+
* - `v4` → run the template's own Q2 (`runCreateInputs`) over the
|
|
26
|
+
* same floor, with the create floor appended to the same
|
|
27
|
+
* walk, then `scaffoldV4` the authored package;
|
|
28
|
+
* - `surface-action` → return the action's surface signal (no scaffold).
|
|
29
|
+
* - `v3` / `v3-core-method` → unsupported when the v4 front door is enabled.
|
|
30
|
+
* Flag off is a pure pass-through to the unmodified `createV3` (INV-1): the
|
|
31
|
+
* selector is never walked, so v3 behavior is byte-identical.
|
|
32
|
+
*
|
|
33
|
+
* This orchestrator is a seam outside the v4 world (INV-4): it touches the v3
|
|
34
|
+
* `Inputs` and calls `createV3`, which v4 may not. Every effectful step is an
|
|
35
|
+
* injected dependency, so the dispatch is verifiable without I/O; the floor read
|
|
36
|
+
* is injectable too (INV-6).
|
|
37
|
+
*/
|
|
38
|
+
const SOURCE = "Scaffold";
|
|
39
|
+
/** The only shipped create `surface-action`: open GitHub Copilot Chat (the v3 `startWithGithubCopilot` shape). */
|
|
40
|
+
const OPEN_GITHUB_COPILOT_CHAT = "open-github-copilot-chat";
|
|
41
|
+
const V4_TO_V3_TEMPLATE_ID = {
|
|
42
|
+
"basic-custom-engine-agent": templateNames_1.TemplateNames.BasicCustomEngineAgent,
|
|
43
|
+
"weather-agent": templateNames_1.TemplateNames.WeatherAgent,
|
|
44
|
+
"graph-connector": templateNames_1.TemplateNames.GraphConnector,
|
|
45
|
+
"custom-copilot-basic": templateNames_1.TemplateNames.CustomCopilotBasic,
|
|
46
|
+
"custom-copilot-rag-customize": templateNames_1.TemplateNames.CustomCopilotRagCustomize,
|
|
47
|
+
"custom-copilot-rag-azure-ai-search": templateNames_1.TemplateNames.CustomCopilotRagAzureAISearch,
|
|
48
|
+
"custom-copilot-rag-custom-api": templateNames_1.TemplateNames.CustomCopilotRagCustomApi,
|
|
49
|
+
"teams-collaborator-agent": templateNames_1.TemplateNames.TeamsCollaboratorAgent,
|
|
50
|
+
"non-sso-tab": templateNames_1.TemplateNames.Tab,
|
|
51
|
+
"default-message-extension": templateNames_1.TemplateNames.DefaultMessageExtension,
|
|
52
|
+
"default-bot": templateNames_1.TemplateNames.DefaultBot,
|
|
53
|
+
"office-addin-wxpo-taskpane": templateNames_1.TemplateNames.WXPTaskpane,
|
|
54
|
+
"office-addin-excel-cfshortcut": templateNames_1.TemplateNames.ExcelCFShortcut,
|
|
55
|
+
"office-addin-excel-customfunctions": templateNames_1.TemplateNames.ExcelCustomFunctions,
|
|
56
|
+
"office-addin-sso-naa": templateNames_1.TemplateNames.OfficeAddinSsoNaa,
|
|
57
|
+
"declarative-agent-meta-os-upgrade-project": "declarative-agent-meta-os-upgrade-project",
|
|
58
|
+
"office-addin-config": templateNames_1.TemplateNames.OfficeAddinCommon,
|
|
59
|
+
"da/no-action": templateNames_1.TemplateNames.DeclarativeAgentBasic,
|
|
60
|
+
"da/graph-connector": templateNames_1.TemplateNames.DeclarativeAgentWithGraphConnector,
|
|
61
|
+
"da/typespec": templateNames_1.TemplateNames.DeclarativeAgentWithTypeSpec,
|
|
62
|
+
"da/skill": templateNames_1.TemplateNames.DeclarativeAgentWithSkill,
|
|
63
|
+
"da/api-plugin-from-scratch": templateNames_1.TemplateNames.DeclarativeAgentWithActionFromScratch,
|
|
64
|
+
"da/api-plugin-from-scratch-bearer": templateNames_1.TemplateNames.DeclarativeAgentWithActionFromScratchBearer,
|
|
65
|
+
"da/api-plugin-from-scratch-oauth": templateNames_1.TemplateNames.DeclarativeAgentWithActionFromScratchOAuth,
|
|
66
|
+
"da/api-plugin-from-existing-api": templateNames_1.TemplateNames.DeclarativeAgentWithActionFromExistingApiSpec,
|
|
67
|
+
"da/mcp-server-static": templateNames_1.TemplateNames.DeclarativeAgentWithActionFromMCP,
|
|
68
|
+
"da/mcp-server": templateNames_1.TemplateNames.DeclarativeAgentWithActionFromMCP,
|
|
69
|
+
};
|
|
70
|
+
const NON_V4_INPUT_KEYS = new Set([
|
|
71
|
+
"capabilities",
|
|
72
|
+
"folder",
|
|
73
|
+
"isM365",
|
|
74
|
+
"nonInteractive",
|
|
75
|
+
"platform",
|
|
76
|
+
"projectId",
|
|
77
|
+
"runtime",
|
|
78
|
+
questionNames_1.QuestionNames.TemplateName,
|
|
79
|
+
]);
|
|
80
|
+
/** The default `featureFlagManager`-backed reader (a flag is on per its env var / VS Code setting). */
|
|
81
|
+
function defaultFlagReader(name) {
|
|
82
|
+
return (0, featureFlags_1.readBooleanFeatureFlag)(name);
|
|
83
|
+
}
|
|
84
|
+
/** Read the shipped bundled-floor channel zip (the default `readFloorBytes`). */
|
|
85
|
+
function readBundledFloorBytes() {
|
|
86
|
+
return fs_extra_1.default.readFileSync(path_1.default.join((0, v4_1.bundledFloorDir)(), "templates.zip"));
|
|
87
|
+
}
|
|
88
|
+
function readSnapshotBytes(snapshot, kind) {
|
|
89
|
+
return snapshot.bytes(kind);
|
|
90
|
+
}
|
|
91
|
+
function isV4NeutralInput(key, value) {
|
|
92
|
+
return (!NON_V4_INPUT_KEYS.has(key) &&
|
|
93
|
+
!key.includes("-") &&
|
|
94
|
+
(typeof value === "string" ||
|
|
95
|
+
(Array.isArray(value) && value.every((item) => typeof item === "string"))));
|
|
96
|
+
}
|
|
97
|
+
function neutralAnswersFromInputs(inputs) {
|
|
98
|
+
const answers = {};
|
|
99
|
+
for (const [key, value] of Object.entries(inputs)) {
|
|
100
|
+
if (isV4NeutralInput(key, value)) {
|
|
101
|
+
answers[key] = value;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
const officeAddinFolder = inputs[questionNames_1.QuestionNames.OfficeAddinFolder];
|
|
105
|
+
if (typeof officeAddinFolder === "string" && answers.officeAddinFolder === undefined) {
|
|
106
|
+
answers.officeAddinFolder = officeAddinFolder;
|
|
107
|
+
}
|
|
108
|
+
const officeAddinManifest = inputs[questionNames_1.QuestionNames.OfficeAddinManifest];
|
|
109
|
+
if (typeof officeAddinManifest === "string" && answers.officeAddinManifest === undefined) {
|
|
110
|
+
answers.officeAddinManifest = officeAddinManifest;
|
|
111
|
+
}
|
|
112
|
+
return answers;
|
|
113
|
+
}
|
|
114
|
+
function selectorPrefillFromInputs(inputs) {
|
|
115
|
+
const answers = {};
|
|
116
|
+
for (const [key, value] of Object.entries(neutralAnswersFromInputs(inputs))) {
|
|
117
|
+
if (typeof value === "string") {
|
|
118
|
+
answers[key] = value;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return answers;
|
|
122
|
+
}
|
|
123
|
+
function templateNameForV4(target) {
|
|
124
|
+
return V4_TO_V3_TEMPLATE_ID[target.templateId] ?? target.templateId;
|
|
125
|
+
}
|
|
126
|
+
function applyV4CreateFloorAnswers(inputs, answers) {
|
|
127
|
+
const folder = answers[questionNames_1.QuestionNames.Folder];
|
|
128
|
+
if (typeof folder === "string") {
|
|
129
|
+
inputs[questionNames_1.QuestionNames.Folder] = folder;
|
|
130
|
+
}
|
|
131
|
+
const appName = answers[questionNames_1.QuestionNames.AppName];
|
|
132
|
+
if (typeof appName === "string") {
|
|
133
|
+
inputs[questionNames_1.QuestionNames.AppName] = appName;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
/** Map the host `Platform` onto the selector's `surface` axis (drives option `condition`s). */
|
|
137
|
+
function surfaceOf(platform) {
|
|
138
|
+
switch (platform) {
|
|
139
|
+
case teamsfx_api_1.Platform.CLI:
|
|
140
|
+
case teamsfx_api_1.Platform.CLI_HELP:
|
|
141
|
+
return "cli";
|
|
142
|
+
case teamsfx_api_1.Platform.VS:
|
|
143
|
+
return "vs";
|
|
144
|
+
default:
|
|
145
|
+
return "vscode";
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
/** Dispatch a resolved `surface-action` target onto its surface signal (no scaffold). */
|
|
149
|
+
function dispatchSurfaceAction(target) {
|
|
150
|
+
if (target.templateId === OPEN_GITHUB_COPILOT_CHAT) {
|
|
151
|
+
return (0, neverthrow_1.ok)({ projectPath: "", shouldInvokeTeamsAgent: true });
|
|
152
|
+
}
|
|
153
|
+
return (0, neverthrow_1.err)(new teamsfx_api_1.SystemError({
|
|
154
|
+
source: SOURCE,
|
|
155
|
+
name: "UnsupportedCreateAction",
|
|
156
|
+
message: `The create front door does not handle the '${target.templateId}' surface action.`,
|
|
157
|
+
}));
|
|
158
|
+
}
|
|
159
|
+
function unsupportedCreateTarget(target) {
|
|
160
|
+
return new teamsfx_api_1.SystemError({
|
|
161
|
+
source: SOURCE,
|
|
162
|
+
name: "UnsupportedCreateEngine",
|
|
163
|
+
message: `The create front door does not dispatch the '${target.engine}' engine.`,
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Run the create front door for `inputs`, dispatching the resolved engine.
|
|
168
|
+
*
|
|
169
|
+
* @param inputs the create inputs (carries `platform`; mutated in place by the
|
|
170
|
+
* v4 floor collection before the hand-off to `scaffoldV4`)
|
|
171
|
+
* @param deps the injected seams (see `CreateFrontDoorDeps`)
|
|
172
|
+
* @returns the created project (drop-in for `FxCore.createProject`), or a
|
|
173
|
+
* `UserError` / `SystemError` (a surface cancellation or a route break)
|
|
174
|
+
*/
|
|
175
|
+
async function createProjectFrontDoor(inputs, deps) {
|
|
176
|
+
const flagReader = deps.flagReader ?? defaultFlagReader;
|
|
177
|
+
// INV-1: flag off ⇒ a pure pass-through to the unmodified v3 createProject.
|
|
178
|
+
if (!flagReader(featureFlags_1.FeatureFlags.V4Enabled.name)) {
|
|
179
|
+
return deps.createV3(inputs);
|
|
180
|
+
}
|
|
181
|
+
const ui = deps.ui ?? globalVars_1.TOOLS.ui;
|
|
182
|
+
const surface = surfaceOf(inputs.platform);
|
|
183
|
+
let snapshot = deps.artifactSnapshot;
|
|
184
|
+
let floorBytes;
|
|
185
|
+
const interactive = !inputs.nonInteractive;
|
|
186
|
+
// Dispatch one resolved BuildTarget by its engine (INV-3). Returns a scaffolded
|
|
187
|
+
// result, or `{ kind: "back" }` when a backable Q2 was exited at its first prompt
|
|
188
|
+
// (the caller re-enters Q1). `snapshot` / `floorBytes` are read lazily and shared.
|
|
189
|
+
async function dispatchByEngine(target, baseStep, backable) {
|
|
190
|
+
switch (target.engine) {
|
|
191
|
+
case "surface-action": {
|
|
192
|
+
const action = dispatchSurfaceAction(target);
|
|
193
|
+
return action.isErr() ? (0, neverthrow_1.err)(action.error) : (0, neverthrow_1.ok)({ kind: "result", result: action.value });
|
|
194
|
+
}
|
|
195
|
+
case "v3-core-method":
|
|
196
|
+
return (0, neverthrow_1.err)(unsupportedCreateTarget(target));
|
|
197
|
+
case "v4": {
|
|
198
|
+
inputs[questionNames_1.QuestionNames.TemplateName] = templateNameForV4(target);
|
|
199
|
+
const runInputs = deps.runInputs ?? v4_1.runCreateInputsWalk;
|
|
200
|
+
const locator = { kind: "create", templateId: target.templateId };
|
|
201
|
+
// Q2 + common floor, over the same floor, continuing Q1's step numbering.
|
|
202
|
+
const entryParams = {
|
|
203
|
+
...(target.answers ?? {}),
|
|
204
|
+
...neutralAnswersFromInputs(inputs),
|
|
205
|
+
};
|
|
206
|
+
let inputBytes;
|
|
207
|
+
if (snapshot === undefined) {
|
|
208
|
+
inputBytes = floorBytes ?? (deps.readFloorBytes ?? readBundledFloorBytes)();
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
const metadataBytes = await readSnapshotBytes(snapshot, "metadata");
|
|
212
|
+
if (metadataBytes.isErr()) {
|
|
213
|
+
return (0, neverthrow_1.err)(metadataBytes.error);
|
|
214
|
+
}
|
|
215
|
+
inputBytes = metadataBytes.value;
|
|
216
|
+
}
|
|
217
|
+
const outcome = await runInputs(inputBytes, locator, entryParams, ui, {
|
|
218
|
+
flagReader,
|
|
219
|
+
surface,
|
|
220
|
+
inputs,
|
|
221
|
+
baseStep,
|
|
222
|
+
backable,
|
|
223
|
+
});
|
|
224
|
+
if (outcome.isErr()) {
|
|
225
|
+
return (0, neverthrow_1.err)(outcome.error);
|
|
226
|
+
}
|
|
227
|
+
if (outcome.value.kind === "back") {
|
|
228
|
+
return (0, neverthrow_1.ok)({ kind: "back" });
|
|
229
|
+
}
|
|
230
|
+
const answers = outcome.value.answers;
|
|
231
|
+
applyV4CreateFloorAnswers(inputs, answers);
|
|
232
|
+
// The scaffold contract is a plain BuildTarget; do not leak Q1 walk metadata.
|
|
233
|
+
const scaffoldTarget = {
|
|
234
|
+
templateId: target.templateId,
|
|
235
|
+
engine: target.engine,
|
|
236
|
+
answers: target.answers,
|
|
237
|
+
};
|
|
238
|
+
if (snapshot !== undefined) {
|
|
239
|
+
const fullBytes = await readSnapshotBytes(snapshot, "templates");
|
|
240
|
+
if (fullBytes.isErr()) {
|
|
241
|
+
return (0, neverthrow_1.err)(fullBytes.error);
|
|
242
|
+
}
|
|
243
|
+
const scaffolded = await deps.scaffoldV4(inputs, scaffoldTarget, answers, flagReader, {
|
|
244
|
+
source: (0, v4_1.templateSourceFromArtifactSnapshot)(snapshot),
|
|
245
|
+
bytes: fullBytes.value,
|
|
246
|
+
});
|
|
247
|
+
return scaffolded.isErr()
|
|
248
|
+
? (0, neverthrow_1.err)(scaffolded.error)
|
|
249
|
+
: (0, neverthrow_1.ok)({ kind: "result", result: scaffolded.value });
|
|
250
|
+
}
|
|
251
|
+
const scaffolded = await deps.scaffoldV4(inputs, scaffoldTarget, answers, flagReader);
|
|
252
|
+
return scaffolded.isErr()
|
|
253
|
+
? (0, neverthrow_1.err)(scaffolded.error)
|
|
254
|
+
: (0, neverthrow_1.ok)({ kind: "result", result: scaffolded.value });
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
// A surface that already resolved the leaf template — the CLI in non-interactive
|
|
259
|
+
// mode presets `template-name` from its `-c` capability — pins the BuildTarget by
|
|
260
|
+
// id: the Q1 selector is a *router*, so re-walking it would re-prompt. Resolve the
|
|
261
|
+
// engine from the template's route and dispatch once (no cross-phase back; INV-8).
|
|
262
|
+
const presetTemplateId = inputs[questionNames_1.QuestionNames.TemplateName];
|
|
263
|
+
if (presetTemplateId) {
|
|
264
|
+
if (snapshot === undefined && deps.resolveArtifactSnapshot !== undefined) {
|
|
265
|
+
const resolved = await deps.resolveArtifactSnapshot("templates");
|
|
266
|
+
if (resolved.isErr()) {
|
|
267
|
+
return (0, neverthrow_1.err)(resolved.error);
|
|
268
|
+
}
|
|
269
|
+
snapshot = resolved.value;
|
|
270
|
+
}
|
|
271
|
+
if (snapshot === undefined) {
|
|
272
|
+
floorBytes = (deps.readFloorBytes ?? readBundledFloorBytes)();
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
const fullBytes = await readSnapshotBytes(snapshot, "templates");
|
|
276
|
+
if (fullBytes.isErr()) {
|
|
277
|
+
return (0, neverthrow_1.err)(fullBytes.error);
|
|
278
|
+
}
|
|
279
|
+
floorBytes = fullBytes.value;
|
|
280
|
+
}
|
|
281
|
+
const resolveByTemplateId = deps.resolveByTemplateId ?? v4_1.resolveCreateTargetByTemplateId;
|
|
282
|
+
const target = resolveByTemplateId(floorBytes, presetTemplateId);
|
|
283
|
+
if (target.isErr()) {
|
|
284
|
+
return (0, neverthrow_1.err)(target.error);
|
|
285
|
+
}
|
|
286
|
+
const dispatched = await dispatchByEngine(target.value, 0, false);
|
|
287
|
+
if (dispatched.isErr()) {
|
|
288
|
+
return (0, neverthrow_1.err)(dispatched.error);
|
|
289
|
+
}
|
|
290
|
+
// The preset path is not backable (baseStep 0, backable false), so `done` is the live branch.
|
|
291
|
+
return dispatched.value.kind === "back"
|
|
292
|
+
? (0, neverthrow_1.err)(unsupportedCreateTarget(target.value))
|
|
293
|
+
: (0, neverthrow_1.ok)(dispatched.value.result);
|
|
294
|
+
}
|
|
295
|
+
// Otherwise walk Q1 (INV-2). The selector bytes are stable across the cross-phase
|
|
296
|
+
// back re-entry loop, so resolve them once; each iteration re-walks Q1 (retaining
|
|
297
|
+
// its history for `resume`) and dispatches, re-entering Q1 on a Q2-first back so
|
|
298
|
+
// Q1 and Q2 form one continuous back-navigable wizard (INV-10). The loop is scoped
|
|
299
|
+
// below the preset check, so a prior iteration's `template-name` never short-circuits Q1.
|
|
300
|
+
if (snapshot === undefined && deps.resolveArtifactSnapshot !== undefined) {
|
|
301
|
+
const resolved = await deps.resolveArtifactSnapshot("create-selector");
|
|
302
|
+
if (resolved.isErr()) {
|
|
303
|
+
return (0, neverthrow_1.err)(resolved.error);
|
|
304
|
+
}
|
|
305
|
+
snapshot = resolved.value;
|
|
306
|
+
}
|
|
307
|
+
let selectorBytes;
|
|
308
|
+
if (snapshot === undefined) {
|
|
309
|
+
floorBytes = (deps.readFloorBytes ?? readBundledFloorBytes)();
|
|
310
|
+
selectorBytes = floorBytes;
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
const selector = await readSnapshotBytes(snapshot, "create-selector");
|
|
314
|
+
if (selector.isErr()) {
|
|
315
|
+
return (0, neverthrow_1.err)(selector.error);
|
|
316
|
+
}
|
|
317
|
+
selectorBytes = selector.value;
|
|
318
|
+
}
|
|
319
|
+
const runSelector = deps.runSelector ?? v4_1.runCreateSelector;
|
|
320
|
+
let resumeHistory = undefined;
|
|
321
|
+
for (;;) {
|
|
322
|
+
const selectorDeps = {
|
|
323
|
+
flagReader,
|
|
324
|
+
interactive,
|
|
325
|
+
prefilled: selectorPrefillFromInputs(inputs),
|
|
326
|
+
resume: resumeHistory === undefined ? undefined : { history: resumeHistory },
|
|
327
|
+
};
|
|
328
|
+
const target = snapshot === undefined
|
|
329
|
+
? await runSelector(selectorBytes, ui, surface, selectorDeps)
|
|
330
|
+
: await runSelector(selectorBytes, ui, surface, {
|
|
331
|
+
...selectorDeps,
|
|
332
|
+
selectorBytesKind: "json",
|
|
333
|
+
v4Registry: deps.v4Registry,
|
|
334
|
+
});
|
|
335
|
+
if (target.isErr()) {
|
|
336
|
+
return (0, neverthrow_1.err)(target.error);
|
|
337
|
+
}
|
|
338
|
+
// Q2 continues Q1's step numbering (baseStep = promptCount) and is backable: a
|
|
339
|
+
// back at its first prompt re-enters Q1 with the retained history (INV-10).
|
|
340
|
+
const dispatched = await dispatchByEngine(target.value, target.value.promptCount, true);
|
|
341
|
+
if (dispatched.isErr()) {
|
|
342
|
+
return (0, neverthrow_1.err)(dispatched.error);
|
|
343
|
+
}
|
|
344
|
+
if (dispatched.value.kind === "back") {
|
|
345
|
+
resumeHistory = target.value.history;
|
|
346
|
+
continue;
|
|
347
|
+
}
|
|
348
|
+
return (0, neverthrow_1.ok)(dispatched.value.result);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
//# sourceMappingURL=createProjectFrontDoor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createProjectFrontDoor.js","sourceRoot":"","sources":["../../src/core/createProjectFrontDoor.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAgQlC,wDAyLC;;AAvbD,wDAOgC;AAChC,gEAA0B;AAC1B,wDAAwB;AACxB,2CAA6C;AAC7C,8BAae;AACf,yDAA8E;AAC9E,qDAA6C;AAC7C,kFAA+E;AAE/E,6DAA0D;AAE1D;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,MAAM,GAAG,UAAU,CAAC;AAE1B,kHAAkH;AAClH,MAAM,wBAAwB,GAAG,0BAA0B,CAAC;AAC5D,MAAM,oBAAoB,GAAqC;IAC7D,2BAA2B,EAAE,6BAAa,CAAC,sBAAsB;IACjE,eAAe,EAAE,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
|
1
|
+
{"version":3,"file":"concurrentLocker.d.ts","sourceRoot":"","sources":["../../../src/core/middleware/concurrentLocker.ts"],"names":[],"mappings":"AAIA,OAAO,EAAe,UAAU,EAAgB,MAAM,mBAAmB,CAAC;AA6B1E,eAAO,MAAM,kBAAkB,EAAE,UAkFhC,CAAC;AAEF,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAKzD"}
|
|
@@ -10,11 +10,11 @@ const crypto_1 = tslib_1.__importDefault(require("crypto"));
|
|
|
10
10
|
const fs = tslib_1.__importStar(require("fs-extra"));
|
|
11
11
|
const os = tslib_1.__importStar(require("os"));
|
|
12
12
|
const path = tslib_1.__importStar(require("path"));
|
|
13
|
-
const
|
|
13
|
+
const properLock = tslib_1.__importStar(require("proper-lockfile"));
|
|
14
14
|
const globalVars_1 = require("../../common/globalVars");
|
|
15
|
-
const
|
|
15
|
+
const projectSettingsHelper = tslib_1.__importStar(require("../../common/projectSettingsHelper"));
|
|
16
16
|
const telemetry_1 = require("../../common/telemetry");
|
|
17
|
-
const
|
|
17
|
+
const commonUtils = tslib_1.__importStar(require("../../common/utils"));
|
|
18
18
|
const common_1 = require("../../error/common");
|
|
19
19
|
const callback_1 = require("../callback");
|
|
20
20
|
const projectSettingsLoader_1 = require("./projectSettingsLoader");
|
|
@@ -34,12 +34,9 @@ const ConcurrentLockerMW = async (ctx, next) => {
|
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
let configFolder = "";
|
|
37
|
-
if (
|
|
37
|
+
if (projectSettingsHelper.isValidProjectV3(inputs.projectPath)) {
|
|
38
38
|
configFolder = path.join(inputs.projectPath);
|
|
39
39
|
}
|
|
40
|
-
else if ((0, projectSettingsHelper_1.isValidProjectV2)(inputs.projectPath)) {
|
|
41
|
-
configFolder = path.join(inputs.projectPath, `.${teamsfx_api_1.ConfigFolderName}`);
|
|
42
|
-
}
|
|
43
40
|
else {
|
|
44
41
|
ctx.result = (0, teamsfx_api_1.err)(new common_1.InvalidProjectError(inputs.projectPath));
|
|
45
42
|
return;
|
|
@@ -54,7 +51,7 @@ const ConcurrentLockerMW = async (ctx, next) => {
|
|
|
54
51
|
let retryNum = 0;
|
|
55
52
|
for (let i = 0; i < 10; ++i) {
|
|
56
53
|
try {
|
|
57
|
-
await
|
|
54
|
+
await properLock.lock(configFolder, { lockfilePath: lockfilePath });
|
|
58
55
|
acquired = true;
|
|
59
56
|
for (const f of callback_1.CallbackRegistry.get(teamsfx_api_1.CoreCallbackEvent.lock)) {
|
|
60
57
|
await f(taskName);
|
|
@@ -68,7 +65,7 @@ const ConcurrentLockerMW = async (ctx, next) => {
|
|
|
68
65
|
await next();
|
|
69
66
|
}
|
|
70
67
|
finally {
|
|
71
|
-
await
|
|
68
|
+
await properLock.unlock(configFolder, { lockfilePath: lockfilePath });
|
|
72
69
|
for (const f of callback_1.CallbackRegistry.get(teamsfx_api_1.CoreCallbackEvent.unlock)) {
|
|
73
70
|
await f(taskName);
|
|
74
71
|
}
|
|
@@ -78,7 +75,7 @@ const ConcurrentLockerMW = async (ctx, next) => {
|
|
|
78
75
|
}
|
|
79
76
|
catch (e) {
|
|
80
77
|
if (e["code"] === "ELOCKED") {
|
|
81
|
-
await
|
|
78
|
+
await commonUtils.waitSeconds(1);
|
|
82
79
|
++retryNum;
|
|
83
80
|
continue;
|
|
84
81
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"concurrentLocker.js","sourceRoot":"","sources":["../../../src/core/middleware/concurrentLocker.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;
|
|
1
|
+
{"version":3,"file":"concurrentLocker.js","sourceRoot":"","sources":["../../../src/core/middleware/concurrentLocker.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;AAmHb,sCAKC;;AArHD,wDAOgC;AAChC,4DAA4B;AAC5B,qDAA+B;AAC/B,+CAAyB;AACzB,mD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EACX,GAAG,yBAAW,IAAI,gBAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAClF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorHandler.d.ts","sourceRoot":"","sources":["../../../src/core/middleware/errorHandler.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"errorHandler.d.ts","sourceRoot":"","sources":["../../../src/core/middleware/errorHandler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAe,UAAU,EAAgB,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAe,WAAW,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAK7E;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,UAqB5B,CAAC;AA0BF,wBAAgB,YAAY,CAAC,GAAG,EAAE,KAAK,GAAG,SAAS,GAAG,WAAW,GAAG,KAAK,CAoBxE"}
|
|
@@ -6,6 +6,7 @@ exports.ErrorHandlerMW = void 0;
|
|
|
6
6
|
exports.convertError = convertError;
|
|
7
7
|
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
8
8
|
const globalVars_1 = require("../../common/globalVars");
|
|
9
|
+
const settingsUtil_1 = require("../../component/utils/settingsUtil");
|
|
9
10
|
const common_1 = require("../../error/common");
|
|
10
11
|
/**
|
|
11
12
|
* in case there're some uncatched exceptions, this middleware will act as a guard
|
|
@@ -15,6 +16,14 @@ const ErrorHandlerMW = async (ctx, next) => {
|
|
|
15
16
|
const inputs = ctx.arguments[ctx.arguments.length - 1];
|
|
16
17
|
if (inputs?.locale)
|
|
17
18
|
(0, globalVars_1.setLocale)(inputs.locale);
|
|
19
|
+
if (inputs?.projectPath) {
|
|
20
|
+
try {
|
|
21
|
+
await settingsUtil_1.settingsUtil.readSettings(inputs.projectPath, false);
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
// Ignore trackingId preload failure and continue normal flow.
|
|
25
|
+
}
|
|
26
|
+
}
|
|
18
27
|
try {
|
|
19
28
|
await next();
|
|
20
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorHandler.js","sourceRoot":"","sources":["../../../src/core/middleware/errorHandler.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;
|
|
1
|
+
{"version":3,"file":"errorHandler.js","sourceRoot":"","sources":["../../../src/core/middleware/errorHandler.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;AA2Db,oCAoBC;AA5ED,wDAA6E;AAC7E,wDAAoD;AACpD,qEAAkE;AAClE,+CAAwE;AAExE;;;GAGG;AACI,MAAM,cAAc,GAAe,KAAK,EAAE,GAAgB,EAAE,IAAkB,EAAE,EAAE;IACvF,MAAM,MAAM,GAAG,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAW,CAAC;IACjE,IAAI,MAAM,EAAE,MAAM;QAAE,IAAA,sBAAS,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC7C,IAAI,MAAM,EAAE,WAAW,EAAE,CAAC;QACxB,IAAI,CAAC;YACH,MAAM,2BAAY,CAAC,YAAY,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QAC7D,CAAC;QAAC,MAAM,CAAC;YACP,8DAA8D;QAChE,CAAC;IACH,CAAC;IACD,IAAI,CAAC;QACH,MAAM,IAAI,EAAE,CAAC;IACf,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,OAAO,GAAG,IAAA,sBAAa,EAAC,CAAC,CAAC,CAAC;QACjC,GAAG,CAAC,MAAM,GAAG,IAAA,iBAAG,EAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;IACD,IAAI,GAAG,CAAC,MAAM,EAAE,KAAK,EAA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AAG,GAAW,CAAC,MAAM,CAAC,CAAC;QACpE,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC;YAC3B,MAAM,SAAS,GAAG,IAAI,uBAAS,CAC5B,GAAW,CAAC,MAAM,EACnB,GAAG,CAAC,IAAI,EACR,GAAG,CAAC,OAAO,EACV,GAAW,CAAC,cAAc,CAC5B,CAAC;YACF,SAAS,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;YAC5B,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.withFileLock = withFileLock;
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
|
+
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
7
8
|
const fs = tslib_1.__importStar(require("fs-extra"));
|
|
8
|
-
const proper_lockfile_1 = require("proper-lockfile");
|
|
9
|
-
const concurrentLocker_1 = require("./concurrentLocker");
|
|
10
9
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
11
|
-
const
|
|
12
|
-
const
|
|
10
|
+
const properLock = tslib_1.__importStar(require("proper-lockfile"));
|
|
11
|
+
const commonUtils = tslib_1.__importStar(require("../../common/utils"));
|
|
12
|
+
const concurrentLocker_1 = require("./concurrentLocker");
|
|
13
13
|
async function withFileLock(filePath, callback) {
|
|
14
14
|
if (!(await fs.pathExists(filePath))) {
|
|
15
15
|
throw new Error(`File not found: ${filePath}`);
|
|
@@ -20,12 +20,12 @@ async function withFileLock(filePath, callback) {
|
|
|
20
20
|
let release = null;
|
|
21
21
|
for (let i = 0; i < 10; i++) {
|
|
22
22
|
try {
|
|
23
|
-
release = await
|
|
23
|
+
release = await properLock.lock(filePath, { lockfilePath: lockfilePath });
|
|
24
24
|
break;
|
|
25
25
|
}
|
|
26
26
|
catch (e) {
|
|
27
27
|
if (e.code === "ELOCKED") {
|
|
28
|
-
await
|
|
28
|
+
await commonUtils.waitSeconds(1);
|
|
29
29
|
}
|
|
30
30
|
else {
|
|
31
31
|
throw e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileLocker.js","sourceRoot":"","sources":["../../../src/core/middleware/fileLocker.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;AAQb,oCAgCC;;AAvCD,qDAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"fileLocker.js","sourceRoot":"","sources":["../../../src/core/middleware/fileLocker.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;AAQb,oCAgCC;;AAvCD,wDAA0D;AAC1D,qDAA+B;AAC/B,wDAAwB;AACxB,oEAA8C;AAC9C,wEAAkD;AAClD,yDAAmD;AAE5C,KAAK,UAAU,YAAY,CAAI,QAAgB,EAAE,QAA0B;IAChF,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;QACrC,MAAM,IAAI,KAAK,CAAC,mBAAmB,QAAQ,EAAE,CAAC,CAAC;IACjD,CAAC;IAED,MAAM,WAAW,GAAG,IAAA,gCAAa,EAAC,QAAQ,CAAC,CAAC;IAC5C,MAAM,YAAY,GAAG,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,8BAAgB,OAAO,CAAC,CAAC;IACxE,MAAM,EAAE,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAEhC,IAAI,OAAO,GAAiC,IAAI,CAAC;IACjD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5B,IAAI,CAAC;YACH,OAAO,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC,CAAC;YAC1E,MAAM;QACR,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,CAAC,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;gBACzB,MAAM,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YACnC,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,CAAC;YACV,CAAC;QACH,CAAC;IACH,CAAC;IAED,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,6BAA6B,QAAQ,oBAAoB,CAAC,CAAC;IAC7E,CAAC;IAED,IAAI,CAAC;QACH,OAAO,MAAM,QAAQ,EAAE,CAAC;IAC1B,CAAC;YAAS,CAAC;QACT,MAAM,OAAO,EAAE,CAAC;IAClB,CAAC;AACH,CAAC"}
|
|
@@ -1,41 +1,8 @@
|
|
|
1
|
-
import { MigrationContext } from "./migrationContext";
|
|
2
|
-
import { FileType } from "./MigrationUtils";
|
|
3
|
-
import { Platform } from "@microsoft/teamsfx-api";
|
|
4
|
-
import { CoreHookContext } from "../../types";
|
|
5
1
|
import { VersionInfo, VersionState } from "../../../common/versionMetadata";
|
|
6
|
-
import {
|
|
7
|
-
export declare function readJsonFile(context: MigrationContext, filePath: string): Promise<any>;
|
|
8
|
-
export declare function readBicepContent(context: MigrationContext): Promise<any>;
|
|
9
|
-
export declare function getTemplateFolderPath(context: MigrationContext): string;
|
|
10
|
-
export declare function fsReadDirSync(context: MigrationContext, _path: string): string[];
|
|
11
|
-
export declare const validDomain: {
|
|
12
|
-
botWithValid: string;
|
|
13
|
-
tab: string;
|
|
14
|
-
bot: string;
|
|
15
|
-
};
|
|
16
|
-
export declare function jsonObjectNamesConvertV3(obj: any, prefix: string, parentKeyName: string, filetype: FileType, bicepContent: any): string;
|
|
2
|
+
import { CoreHookContext } from "../../types";
|
|
17
3
|
export declare function getProjectVersion(ctx: CoreHookContext): Promise<VersionInfo>;
|
|
18
|
-
export declare function migrationNotificationMessage(versionForMigration: VersionForMigration): string;
|
|
19
|
-
export declare function outputCancelMessage(version: string, platform: Platform): void;
|
|
20
4
|
export declare function getProjectVersionFromPath(projectPath: string): Promise<VersionInfo>;
|
|
21
5
|
export declare function getTrackingIdFromPath(projectPath: string): Promise<string>;
|
|
22
6
|
export declare function getVersionState(info: VersionInfo): VersionState;
|
|
23
7
|
export declare function getParameterFromCxt(ctx: CoreHookContext, key: string, defaultValue?: string): string;
|
|
24
|
-
export declare function getCapabilityStatus(projectSettings: any): {
|
|
25
|
-
TabSso: boolean;
|
|
26
|
-
BotSso: boolean;
|
|
27
|
-
Tab: boolean;
|
|
28
|
-
};
|
|
29
|
-
export declare function generateAppIdUri(capabilities: {
|
|
30
|
-
TabSso: boolean;
|
|
31
|
-
BotSso: boolean;
|
|
32
|
-
}): string;
|
|
33
|
-
export declare function replaceAppIdUri(manifest: string, appIdUri: string): string;
|
|
34
|
-
export declare function readAndConvertUserdata(context: MigrationContext, filePath: string, bicepContent: any): Promise<string>;
|
|
35
|
-
export declare function updateAndSaveManifestForSpfx(context: MigrationContext, manifest: string): Promise<void>;
|
|
36
|
-
export declare function isValidDomainForBotOutputKey(bicepContent: string): boolean;
|
|
37
|
-
export declare function addMissingValidDomainForManifest(manifestPath: string, tab: boolean, bot: boolean, isValidDomain: boolean): Promise<void>;
|
|
38
|
-
export declare function tryExtractEnvFromUserdata(filename: string): string;
|
|
39
|
-
export declare function buildEnvFileName(envName: string): string;
|
|
40
|
-
export declare function buildEnvUserFileName(envName: string): string;
|
|
41
8
|
//# sourceMappingURL=v3MigrationUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v3MigrationUtils.d.ts","sourceRoot":"","sources":["../../../../src/core/middleware/utils/v3MigrationUtils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"v3MigrationUtils.d.ts","sourceRoot":"","sources":["../../../../src/core/middleware/utils/v3MigrationUtils.ts"],"names":[],"mappings":"AAOA,OAAO,EAIL,WAAW,EAEX,YAAY,EACb,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG9C,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC,CAGlF;AAED,wBAAsB,yBAAyB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAsCzF;AAED,wBAAsB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAgBhF;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,GAAG,YAAY,CAmB/D;AAED,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,MAAM,EACX,YAAY,CAAC,EAAE,MAAM,GACpB,MAAM,CAIR"}
|