@microsoft/teamsfx-core 3.1.3 → 3.1.4-alpha.17203f2e50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/devPortalClient.d.ts +43 -0
- package/build/client/devPortalClient.d.ts.map +1 -0
- package/build/client/devPortalClient.js +626 -0
- package/build/client/devPortalClient.js.map +1 -0
- package/build/client/graphClient.d.ts +1 -0
- package/build/client/graphClient.d.ts.map +1 -1
- package/build/client/graphClient.js +17 -2
- package/build/client/graphClient.js.map +1 -1
- package/build/client/teamsDevPortalClient.d.ts +14 -21
- package/build/client/teamsDevPortalClient.d.ts.map +1 -1
- package/build/client/teamsDevPortalClient.js +65 -112
- package/build/client/teamsDevPortalClient.js.map +1 -1
- package/build/client/teamsDevPortalClientProvider.d.ts +6 -0
- package/build/client/teamsDevPortalClientProvider.d.ts.map +1 -0
- package/build/client/teamsDevPortalClientProvider.js +76 -0
- package/build/client/teamsDevPortalClientProvider.js.map +1 -0
- package/build/common/featureFlags.d.ts +7 -2
- package/build/common/featureFlags.d.ts.map +1 -1
- package/build/common/featureFlags.js +8 -3
- package/build/common/featureFlags.js.map +1 -1
- package/build/common/localizeUtils.d.ts +1 -0
- package/build/common/localizeUtils.d.ts.map +1 -1
- package/build/common/localizeUtils.js +10 -0
- package/build/common/localizeUtils.js.map +1 -1
- package/build/common/templates-config.json +4 -4
- package/build/common/tools.js +2 -2
- package/build/common/tools.js.map +1 -1
- package/build/common/utils.d.ts.map +1 -1
- package/build/common/utils.js +1 -0
- package/build/common/utils.js.map +1 -1
- package/build/common/wrappedAxiosClient.d.ts.map +1 -1
- package/build/common/wrappedAxiosClient.js +87 -27
- package/build/common/wrappedAxiosClient.js.map +1 -1
- package/build/component/configManager/actionInjector.d.ts +13 -3
- package/build/component/configManager/actionInjector.d.ts.map +1 -1
- package/build/component/configManager/actionInjector.js +88 -5
- package/build/component/configManager/actionInjector.js.map +1 -1
- package/build/component/driver/interface/commonArgs.d.ts +1 -0
- package/build/component/driver/interface/commonArgs.d.ts.map +1 -1
- package/build/component/driver/teamsApp/appStudio.d.ts.map +1 -1
- package/build/component/driver/teamsApp/appStudio.js +10 -6
- 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 +12 -8
- package/build/component/driver/teamsApp/configure.js.map +1 -1
- package/build/component/driver/teamsApp/constants.d.ts +1 -0
- package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
- package/build/component/driver/teamsApp/constants.js +1 -0
- 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 +28 -26
- package/build/component/driver/teamsApp/create.js.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.js +1 -1
- package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/interfaces/appdefinitions/appUser.d.ts +1 -0
- package/build/component/driver/teamsApp/interfaces/appdefinitions/appUser.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/telemetry.d.ts +0 -1
- package/build/component/driver/teamsApp/utils/telemetry.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/telemetry.js +0 -1
- package/build/component/driver/teamsApp/utils/telemetry.js.map +1 -1
- package/build/component/driver/teamsApp/utils/utils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/utils.js +1 -18
- package/build/component/driver/teamsApp/utils/utils.js.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.js +3 -3
- package/build/component/driver/teamsApp/validateAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/validateTestCases.js +4 -4
- package/build/component/driver/teamsApp/validateTestCases.js.map +1 -1
- package/build/component/driver/util/utils.d.ts.map +1 -1
- package/build/component/driver/util/utils.js +1 -0
- package/build/component/driver/util/utils.js.map +1 -1
- package/build/component/feature/collaboration.js +4 -4
- package/build/component/feature/collaboration.js.map +1 -1
- package/build/component/generator/openApiSpec/helper.d.ts +2 -2
- package/build/component/generator/openApiSpec/helper.d.ts.map +1 -1
- package/build/component/generator/openApiSpec/helper.js +65 -5
- package/build/component/generator/openApiSpec/helper.js.map +1 -1
- package/build/component/generator/openPlugin/authResolver.d.ts +2 -2
- package/build/component/generator/openPlugin/authResolver.d.ts.map +1 -1
- package/build/component/generator/openPlugin/authResolver.js +17 -7
- package/build/component/generator/openPlugin/authResolver.js.map +1 -1
- package/build/component/generator/openPlugin/errors.d.ts +4 -0
- package/build/component/generator/openPlugin/errors.d.ts.map +1 -0
- package/build/component/generator/openPlugin/errors.js +13 -0
- package/build/component/generator/openPlugin/errors.js.map +1 -0
- package/build/component/generator/openPlugin/exporter.d.ts +9 -6
- package/build/component/generator/openPlugin/exporter.d.ts.map +1 -1
- package/build/component/generator/openPlugin/exporter.js +502 -53
- package/build/component/generator/openPlugin/exporter.js.map +1 -1
- package/build/component/generator/openPlugin/fileSystem.d.ts +28 -0
- package/build/component/generator/openPlugin/fileSystem.d.ts.map +1 -0
- package/build/component/generator/openPlugin/fileSystem.js +181 -0
- package/build/component/generator/openPlugin/fileSystem.js.map +1 -0
- package/build/component/generator/openPlugin/iconStrategy.d.ts.map +1 -1
- package/build/component/generator/openPlugin/iconStrategy.js +30 -14
- package/build/component/generator/openPlugin/iconStrategy.js.map +1 -1
- package/build/component/generator/openPlugin/importer.d.ts.map +1 -1
- package/build/component/generator/openPlugin/importer.js +75 -12
- package/build/component/generator/openPlugin/importer.js.map +1 -1
- package/build/component/generator/openPlugin/mapper.d.ts +3 -2
- package/build/component/generator/openPlugin/mapper.d.ts.map +1 -1
- package/build/component/generator/openPlugin/mapper.js +188 -29
- package/build/component/generator/openPlugin/mapper.js.map +1 -1
- package/build/component/generator/openPlugin/parser.d.ts.map +1 -1
- package/build/component/generator/openPlugin/parser.js +264 -70
- package/build/component/generator/openPlugin/parser.js.map +1 -1
- package/build/component/generator/openPlugin/skillValidation.d.ts +2 -0
- package/build/component/generator/openPlugin/skillValidation.d.ts.map +1 -0
- package/build/component/generator/openPlugin/skillValidation.js +63 -0
- package/build/component/generator/openPlugin/skillValidation.js.map +1 -0
- package/build/component/generator/openPlugin/spec.d.ts +67 -0
- package/build/component/generator/openPlugin/spec.d.ts.map +1 -0
- package/build/component/generator/openPlugin/spec.js +157 -0
- package/build/component/generator/openPlugin/spec.js.map +1 -0
- package/build/component/generator/openPlugin/textUtils.d.ts +1 -1
- package/build/component/generator/openPlugin/textUtils.d.ts.map +1 -1
- package/build/component/generator/openPlugin/textUtils.js +8 -7
- package/build/component/generator/openPlugin/textUtils.js.map +1 -1
- package/build/component/generator/openPlugin/types.d.ts +76 -14
- package/build/component/generator/openPlugin/types.d.ts.map +1 -1
- package/build/component/generator/openPlugin/validation.d.ts +17 -0
- package/build/component/generator/openPlugin/validation.d.ts.map +1 -0
- package/build/component/generator/openPlugin/validation.js +563 -0
- package/build/component/generator/openPlugin/validation.js.map +1 -0
- package/build/component/generator/v4TemplateBridge.d.ts +1 -1
- package/build/component/generator/v4TemplateBridge.d.ts.map +1 -1
- package/build/component/generator/v4TemplateBridge.js +11 -6
- package/build/component/generator/v4TemplateBridge.js.map +1 -1
- package/build/component/middleware/questionMW.d.ts.map +1 -1
- package/build/component/middleware/questionMW.js +2 -0
- package/build/component/middleware/questionMW.js.map +1 -1
- package/build/component/resource/botService/botRegistration/botFrameworkRegistration.js +4 -4
- package/build/component/resource/botService/botRegistration/botFrameworkRegistration.js.map +1 -1
- package/build/component/utils/common.d.ts +1 -9
- package/build/component/utils/common.d.ts.map +1 -1
- package/build/component/utils/common.js +7 -37
- package/build/component/utils/common.js.map +1 -1
- package/build/component/utils/envFunctionUtils.d.ts +3 -8
- package/build/component/utils/envFunctionUtils.d.ts.map +1 -1
- package/build/component/utils/envFunctionUtils.js +46 -131
- package/build/component/utils/envFunctionUtils.js.map +1 -1
- package/build/component/utils/envUtil.d.ts +1 -1
- package/build/component/utils/envUtil.d.ts.map +1 -1
- package/build/component/utils/envUtil.js +17 -8
- package/build/component/utils/envUtil.js.map +1 -1
- package/build/component/utils/mcpAuthScaffolder.d.ts +6 -0
- package/build/component/utils/mcpAuthScaffolder.d.ts.map +1 -1
- package/build/component/utils/mcpAuthScaffolder.js +17 -7
- package/build/component/utils/mcpAuthScaffolder.js.map +1 -1
- package/build/component/utils/pathUtils.d.ts +4 -4
- package/build/component/utils/pathUtils.d.ts.map +1 -1
- package/build/component/utils/pathUtils.js +17 -8
- package/build/component/utils/pathUtils.js.map +1 -1
- package/build/component/utils/settingsUtil.d.ts +1 -1
- package/build/component/utils/settingsUtil.d.ts.map +1 -1
- package/build/component/utils/settingsUtil.js +3 -3
- package/build/component/utils/settingsUtil.js.map +1 -1
- package/build/core/FxCore.d.ts +3 -2
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.declarativeAgent.d.ts +8 -2
- package/build/core/FxCore.declarativeAgent.d.ts.map +1 -1
- package/build/core/FxCore.declarativeAgent.js +109 -6
- package/build/core/FxCore.declarativeAgent.js.map +1 -1
- package/build/core/FxCore.js +49 -9
- package/build/core/FxCore.js.map +1 -1
- package/build/core/FxCore.openPlugin.d.ts +7 -6
- package/build/core/FxCore.openPlugin.d.ts.map +1 -1
- package/build/core/FxCore.openPlugin.js +7 -6
- package/build/core/FxCore.openPlugin.js.map +1 -1
- package/build/error/common.d.ts +9 -0
- package/build/error/common.d.ts.map +1 -1
- package/build/error/common.js +40 -1
- package/build/error/common.js.map +1 -1
- package/build/index.d.ts +2 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +6 -5
- package/build/index.js.map +1 -1
- package/build/question/generator.d.ts.map +1 -1
- package/build/question/generator.js +9 -9
- package/build/question/generator.js.map +1 -1
- package/build/question/inputs/AddAuthActionInputs.d.ts +6 -0
- package/build/question/inputs/AddAuthActionInputs.d.ts.map +1 -1
- package/build/question/inputs/AddPluginInputs.d.ts +15 -1
- package/build/question/inputs/AddPluginInputs.d.ts.map +1 -1
- package/build/question/options/AddAuthActionOptions.d.ts.map +1 -1
- package/build/question/options/AddAuthActionOptions.js +19 -0
- package/build/question/options/AddAuthActionOptions.js.map +1 -1
- package/build/question/options/AddPluginOptions.d.ts.map +1 -1
- package/build/question/options/AddPluginOptions.js +45 -1
- package/build/question/options/AddPluginOptions.js.map +1 -1
- package/build/question/options/ExportOpenPluginOptions.js +2 -2
- package/build/question/options/ExportOpenPluginOptions.js.map +1 -1
- package/build/question/options/ImportOpenPluginOptions.js +4 -4
- package/build/question/options/ImportOpenPluginOptions.js.map +1 -1
- package/build/question/other.d.ts +2 -0
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +174 -8
- package/build/question/other.js.map +1 -1
- package/build/question/questionNames.d.ts +6 -0
- package/build/question/questionNames.d.ts.map +1 -1
- package/build/question/questionNames.js +6 -0
- package/build/question/questionNames.js.map +1 -1
- package/build/question/scaffold/vsc/CapabilityOptions.d.ts.map +1 -1
- package/build/question/scaffold/vsc/CapabilityOptions.js +5 -2
- package/build/question/scaffold/vsc/CapabilityOptions.js.map +1 -1
- package/build/question/scaffold/vsc/rootNode.js +1 -1
- package/build/question/scaffold/vsc/rootNode.js.map +1 -1
- package/build/question/scaffold/vsc/teamsProjectTypeNode.d.ts +2 -0
- package/build/question/scaffold/vsc/teamsProjectTypeNode.d.ts.map +1 -1
- package/build/question/scaffold/vsc/teamsProjectTypeNode.js +31 -1
- package/build/question/scaffold/vsc/teamsProjectTypeNode.js.map +1 -1
- package/build/question/share.js +2 -2
- package/build/question/share.js.map +1 -1
- package/build/ui/visitor.d.ts.map +1 -1
- package/build/ui/visitor.js +1 -0
- package/build/ui/visitor.js.map +1 -1
- package/build/v4/capabilities/declarations.d.ts +140 -0
- package/build/v4/capabilities/declarations.d.ts.map +1 -0
- package/build/v4/capabilities/declarations.js +59 -0
- package/build/v4/capabilities/declarations.js.map +1 -0
- package/build/v4/collectInputs/collectInputs.d.ts +1 -0
- package/build/v4/collectInputs/collectInputs.d.ts.map +1 -1
- package/build/v4/collectInputs/collectInputs.js +113 -222
- package/build/v4/collectInputs/collectInputs.js.map +1 -1
- package/build/v4/distribution/declarativePackage.d.ts +2 -2
- package/build/v4/distribution/declarativePackage.d.ts.map +1 -1
- package/build/v4/distribution/declarativePackage.js +2 -1
- package/build/v4/distribution/declarativePackage.js.map +1 -1
- package/build/v4/distribution/descriptorLanguages.d.ts +9 -0
- package/build/v4/distribution/descriptorLanguages.d.ts.map +1 -0
- package/build/v4/distribution/descriptorLanguages.js +44 -0
- package/build/v4/distribution/descriptorLanguages.js.map +1 -0
- package/build/v4/distribution/packageDir.d.ts +6 -1
- package/build/v4/distribution/packageDir.d.ts.map +1 -1
- package/build/v4/distribution/packageDir.js +6 -1
- package/build/v4/distribution/packageDir.js.map +1 -1
- package/build/v4/engineVersion.d.ts +1 -1
- package/build/v4/engineVersion.js +1 -1
- package/build/v4/expression/evaluateExpression.d.ts.map +1 -1
- package/build/v4/expression/evaluateExpression.js +15 -13
- package/build/v4/expression/evaluateExpression.js.map +1 -1
- package/build/v4/mcp/mcpAuthAction.d.ts +2 -1
- package/build/v4/mcp/mcpAuthAction.d.ts.map +1 -1
- package/build/v4/mcp/mcpAuthAction.js +32 -5
- package/build/v4/mcp/mcpAuthAction.js.map +1 -1
- package/build/v4/mcp/mcpAuthScaffold.d.ts +3 -0
- package/build/v4/mcp/mcpAuthScaffold.d.ts.map +1 -1
- package/build/v4/mcp/mcpAuthScaffold.js +63 -40
- package/build/v4/mcp/mcpAuthScaffold.js.map +1 -1
- package/build/v4/pipeline/defineStep.d.ts +10 -0
- package/build/v4/pipeline/defineStep.d.ts.map +1 -0
- package/build/v4/pipeline/defineStep.js +28 -0
- package/build/v4/pipeline/defineStep.js.map +1 -0
- package/build/v4/pipeline/runScaffoldPipeline.d.ts +3 -7
- package/build/v4/pipeline/runScaffoldPipeline.d.ts.map +1 -1
- package/build/v4/pipeline/runScaffoldPipeline.js +26 -16
- package/build/v4/pipeline/runScaffoldPipeline.js.map +1 -1
- package/build/v4/pipeline/stepParams.d.ts +4 -0
- package/build/v4/pipeline/stepParams.d.ts.map +1 -0
- package/build/v4/pipeline/stepParams.js +17 -0
- package/build/v4/pipeline/stepParams.js.map +1 -0
- package/build/v4/providers/createLanguageOptionsProvider.d.ts +13 -0
- package/build/v4/providers/createLanguageOptionsProvider.d.ts.map +1 -0
- package/build/v4/providers/createLanguageOptionsProvider.js +61 -0
- package/build/v4/providers/createLanguageOptionsProvider.js.map +1 -0
- package/build/v4/providers/createOptionsProviders.d.ts +3 -1
- package/build/v4/providers/createOptionsProviders.d.ts.map +1 -1
- package/build/v4/providers/createOptionsProviders.js +67 -61
- package/build/v4/providers/createOptionsProviders.js.map +1 -1
- package/build/v4/runtime/compatibility/index.d.ts +4 -0
- package/build/v4/runtime/compatibility/index.d.ts.map +1 -0
- package/build/v4/runtime/compatibility/index.js +11 -0
- package/build/v4/runtime/compatibility/index.js.map +1 -0
- package/build/v4/runtime/compatibility/legacyOpenApiSearch.d.ts +4 -0
- package/build/v4/runtime/compatibility/legacyOpenApiSearch.d.ts.map +1 -0
- package/build/v4/runtime/compatibility/legacyOpenApiSearch.js +26 -0
- package/build/v4/runtime/compatibility/legacyOpenApiSearch.js.map +1 -0
- package/build/v4/runtime/functions/assets/officeAddin.json +48 -0
- package/build/v4/runtime/functions/generic.d.ts +10 -0
- package/build/v4/runtime/functions/generic.d.ts.map +1 -0
- package/build/v4/runtime/functions/generic.js +25 -0
- package/build/v4/runtime/functions/generic.js.map +1 -0
- package/build/v4/runtime/functions/mcp.d.ts +8 -0
- package/build/v4/runtime/functions/mcp.d.ts.map +1 -0
- package/build/v4/runtime/functions/mcp.js +28 -0
- package/build/v4/runtime/functions/mcp.js.map +1 -0
- package/build/v4/runtime/functions/officeAddin.d.ts +27 -0
- package/build/v4/runtime/functions/officeAddin.d.ts.map +1 -0
- package/build/v4/runtime/functions/officeAddin.js +120 -0
- package/build/v4/runtime/functions/officeAddin.js.map +1 -0
- package/build/v4/runtime/inMemoryRuntime.d.ts.map +1 -1
- package/build/v4/runtime/inMemoryRuntime.js +7 -0
- package/build/v4/runtime/inMemoryRuntime.js.map +1 -1
- package/build/v4/runtime/packageParse.d.ts +13 -8
- package/build/v4/runtime/packageParse.d.ts.map +1 -1
- package/build/v4/runtime/packageParse.js +13 -219
- package/build/v4/runtime/packageParse.js.map +1 -1
- package/build/v4/runtime/realRuntime.d.ts.map +1 -1
- package/build/v4/runtime/realRuntime.js +44 -5
- package/build/v4/runtime/realRuntime.js.map +1 -1
- package/build/v4/runtime/renderFragment.d.ts +2 -0
- package/build/v4/runtime/renderFragment.d.ts.map +1 -0
- package/build/v4/runtime/renderFragment.js +11 -0
- package/build/v4/runtime/renderFragment.js.map +1 -0
- package/build/v4/runtime/runtimeRegistry.d.ts +4 -4
- package/build/v4/runtime/runtimeRegistry.d.ts.map +1 -1
- package/build/v4/runtime/runtimeRegistry.js +9 -106
- package/build/v4/runtime/runtimeRegistry.js.map +1 -1
- package/build/v4/runtime/scaffold.d.ts +2 -0
- package/build/v4/runtime/scaffold.d.ts.map +1 -1
- package/build/v4/runtime/scaffold.js +15 -12
- package/build/v4/runtime/scaffold.js.map +1 -1
- package/build/v4/runtime/scaffoldFromPackageDir.d.ts.map +1 -1
- package/build/v4/runtime/scaffoldFromPackageDir.js +1 -4
- package/build/v4/runtime/scaffoldFromPackageDir.js.map +1 -1
- package/build/v4/runtime/selectLanguageContent.d.ts +1 -0
- package/build/v4/runtime/selectLanguageContent.d.ts.map +1 -1
- package/build/v4/runtime/selectLanguageContent.js +5 -1
- package/build/v4/runtime/selectLanguageContent.js.map +1 -1
- package/build/v4/runtime/services/daManifestService.d.ts +9 -0
- package/build/v4/runtime/services/daManifestService.d.ts.map +1 -0
- package/build/v4/runtime/services/daManifestService.js +102 -0
- package/build/v4/runtime/services/daManifestService.js.map +1 -0
- package/build/v4/runtime/steps/assets/metaOs.json +197 -0
- package/build/v4/runtime/steps/assets/openApiAuth.json +33 -0
- package/build/v4/runtime/steps/assets/openApiCustomApi.json +141 -0
- package/build/v4/runtime/steps/daAction.d.ts +3 -1
- package/build/v4/runtime/steps/daAction.d.ts.map +1 -1
- package/build/v4/runtime/steps/daAction.js +25 -25
- package/build/v4/runtime/steps/daAction.js.map +1 -1
- package/build/v4/runtime/steps/daSensitivity.d.ts +3 -2
- package/build/v4/runtime/steps/daSensitivity.d.ts.map +1 -1
- package/build/v4/runtime/steps/daSensitivity.js +16 -16
- package/build/v4/runtime/steps/daSensitivity.js.map +1 -1
- package/build/v4/runtime/steps/mcpAuth.d.ts +2 -2
- package/build/v4/runtime/steps/mcpAuth.d.ts.map +1 -1
- package/build/v4/runtime/steps/mcpAuth.js +43 -50
- package/build/v4/runtime/steps/mcpAuth.js.map +1 -1
- package/build/v4/runtime/steps/mcpLocal.d.ts +1 -1
- package/build/v4/runtime/steps/mcpLocal.d.ts.map +1 -1
- package/build/v4/runtime/steps/mcpLocal.js +19 -31
- package/build/v4/runtime/steps/mcpLocal.js.map +1 -1
- package/build/v4/runtime/steps/mcpStatic.d.ts +1 -1
- package/build/v4/runtime/steps/mcpStatic.d.ts.map +1 -1
- package/build/v4/runtime/steps/mcpStatic.js +33 -39
- package/build/v4/runtime/steps/mcpStatic.js.map +1 -1
- package/build/v4/runtime/steps/metaOs.d.ts +2 -2
- package/build/v4/runtime/steps/metaOs.d.ts.map +1 -1
- package/build/v4/runtime/steps/metaOs.js +46 -169
- package/build/v4/runtime/steps/metaOs.js.map +1 -1
- package/build/v4/runtime/steps/officeAddin.d.ts +1 -1
- package/build/v4/runtime/steps/officeAddin.d.ts.map +1 -1
- package/build/v4/runtime/steps/officeAddin.js +16 -20
- package/build/v4/runtime/steps/officeAddin.js.map +1 -1
- package/build/v4/runtime/steps/openApi.d.ts +2 -2
- package/build/v4/runtime/steps/openApi.d.ts.map +1 -1
- package/build/v4/runtime/steps/openApi.js +46 -112
- package/build/v4/runtime/steps/openApi.js.map +1 -1
- package/build/v4/runtime/steps/openApiAuth.d.ts +9 -0
- package/build/v4/runtime/steps/openApiAuth.d.ts.map +1 -0
- package/build/v4/runtime/steps/openApiAuth.js +51 -0
- package/build/v4/runtime/steps/openApiAuth.js.map +1 -0
- package/build/v4/runtime/steps/openApiCustomApi.d.ts.map +1 -1
- package/build/v4/runtime/steps/openApiCustomApi.js +9 -119
- package/build/v4/runtime/steps/openApiCustomApi.js.map +1 -1
- package/build/v4/runtime/whitelist.d.ts +4 -38
- package/build/v4/runtime/whitelist.d.ts.map +1 -1
- package/build/v4/runtime/whitelist.js +30 -190
- package/build/v4/runtime/whitelist.js.map +1 -1
- package/build/v4/surface/createFloorTail.d.ts +2 -2
- package/build/v4/surface/createFloorTail.d.ts.map +1 -1
- package/build/v4/surface/createFloorTail.js +5 -22
- package/build/v4/surface/createFloorTail.js.map +1 -1
- package/build/v4/surface/createInputs.d.ts +2 -2
- package/build/v4/surface/createInputs.d.ts.map +1 -1
- package/build/v4/surface/createInputs.js +17 -44
- package/build/v4/surface/createInputs.js.map +1 -1
- package/build/v4/surface/createSelectorWalk.d.ts.map +1 -1
- package/build/v4/surface/createSelectorWalk.js +2 -56
- package/build/v4/surface/createSelectorWalk.js.map +1 -1
- package/build/v4/surface/localizePrompt.d.ts +2 -0
- package/build/v4/surface/localizePrompt.d.ts.map +1 -1
- package/build/v4/surface/localizePrompt.js +0 -1
- package/build/v4/surface/localizePrompt.js.map +1 -1
- package/build/v4/surface/modifySelectorWalk.d.ts.map +1 -1
- package/build/v4/surface/modifySelectorWalk.js +2 -52
- package/build/v4/surface/modifySelectorWalk.js.map +1 -1
- package/build/v4/surface/selectorPresentation.d.ts +5 -0
- package/build/v4/surface/selectorPresentation.d.ts.map +1 -0
- package/build/v4/surface/selectorPresentation.js +78 -0
- package/build/v4/surface/selectorPresentation.js.map +1 -0
- package/build/v4/validation/capabilityCatalog.d.ts +2 -2
- package/build/v4/validation/capabilityCatalog.d.ts.map +1 -1
- package/build/v4/validation/capabilityCatalog.js +9 -46
- package/build/v4/validation/capabilityCatalog.js.map +1 -1
- package/build/v4/validation/packageParse.d.ts +27 -0
- package/build/v4/validation/packageParse.d.ts.map +1 -0
- package/build/v4/validation/packageParse.js +247 -0
- package/build/v4/validation/packageParse.js.map +1 -0
- package/build/v4/validation/templateArchiveValidation.d.ts +2 -2
- package/build/v4/validation/templateArchiveValidation.d.ts.map +1 -1
- package/build/v4/validation/templateArchiveValidation.js +7 -2
- package/build/v4/validation/templateArchiveValidation.js.map +1 -1
- package/build/v4/validation/validateTemplatePackage.d.ts +3 -2
- package/build/v4/validation/validateTemplatePackage.d.ts.map +1 -1
- package/build/v4/validation/validateTemplatePackage.js +23 -3
- package/build/v4/validation/validateTemplatePackage.js.map +1 -1
- package/build/v4/validators/createInputValidators.d.ts.map +1 -1
- package/build/v4/validators/createInputValidators.js +9 -8
- package/build/v4/validators/createInputValidators.js.map +1 -1
- package/package.json +37 -37
- package/resource/package.nls.json +35 -1
- package/templates/configs/local/typescript/.gitignore +1 -0
- package/templates/configs/playground/typescript/.gitignore +4 -0
- package/templates/fallback/common.zip +0 -0
- package/templates/fallback/csharp.zip +0 -0
- package/templates/fallback/js.zip +0 -0
- package/templates/fallback/python.zip +0 -0
- package/templates/fallback/ts.zip +0 -0
- package/templates/metadata.zip +0 -0
- package/templates/ui/tdpNode.json +1 -1
- package/templates/ui/wizardNode.json +1 -1
- package/templates/v4/create-selector.json +2 -2
- package/templates/v4/floor.json +1 -1
- package/templates/v4/templates-metadata.zip +0 -0
- package/templates/v4/templates.zip +0 -0
|
@@ -2,234 +2,28 @@
|
|
|
2
2
|
// Copyright (c) Microsoft Corporation.
|
|
3
3
|
// Licensed under the MIT license.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.PACKAGE_PARSE_ERROR = void 0;
|
|
5
|
+
exports.parseDeclaredKeys = exports.PACKAGE_PARSE_ERROR = void 0;
|
|
6
|
+
exports.prepareTemplate = prepareTemplate;
|
|
6
7
|
exports.parseReplaceMap = parseReplaceMap;
|
|
7
|
-
exports.parseDeclaredKeys = parseDeclaredKeys;
|
|
8
8
|
exports.parsePipeline = parsePipeline;
|
|
9
|
+
const tslib_1 = require("tslib");
|
|
9
10
|
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return new teamsfx_api_1.SystemError({ source: SOURCE, name: exports.PACKAGE_PARSE_ERROR, message });
|
|
11
|
+
const parser = tslib_1.__importStar(require("../validation/packageParse"));
|
|
12
|
+
var packageParse_1 = require("../validation/packageParse");
|
|
13
|
+
Object.defineProperty(exports, "PACKAGE_PARSE_ERROR", { enumerable: true, get: function () { return packageParse_1.PACKAGE_PARSE_ERROR; } });
|
|
14
|
+
Object.defineProperty(exports, "parseDeclaredKeys", { enumerable: true, get: function () { return packageParse_1.parseDeclaredKeys; } });
|
|
15
|
+
function systemError(name, message) {
|
|
16
|
+
return new teamsfx_api_1.SystemError({ source: "Scaffold", name, message });
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
return
|
|
20
|
-
}
|
|
21
|
-
/** Read a record field as a string, or `undefined` when absent / non-string. */
|
|
22
|
-
function stringField(record, key) {
|
|
23
|
-
const value = record[key];
|
|
24
|
-
return typeof value === "string" ? value : undefined;
|
|
25
|
-
}
|
|
26
|
-
/** Discriminate one `replaceMap` entry by its present producer key (`const`/`from`/`expr`/`when`). */
|
|
27
|
-
function toReplaceMapEntry(item) {
|
|
28
|
-
if (!isRecord(item)) {
|
|
29
|
-
return undefined;
|
|
30
|
-
}
|
|
31
|
-
const varName = stringField(item, "var");
|
|
32
|
-
if (varName === undefined) {
|
|
33
|
-
return undefined;
|
|
34
|
-
}
|
|
35
|
-
const constVal = stringField(item, "const");
|
|
36
|
-
if (constVal !== undefined) {
|
|
37
|
-
return { var: varName, const: constVal };
|
|
38
|
-
}
|
|
39
|
-
const fromVal = stringField(item, "from");
|
|
40
|
-
if (fromVal !== undefined) {
|
|
41
|
-
return { var: varName, from: fromVal };
|
|
42
|
-
}
|
|
43
|
-
const exprVal = stringField(item, "expr");
|
|
44
|
-
if (exprVal !== undefined) {
|
|
45
|
-
return { var: varName, expr: exprVal };
|
|
46
|
-
}
|
|
47
|
-
const whenVal = stringField(item, "when");
|
|
48
|
-
const valueVal = stringField(item, "value");
|
|
49
|
-
if (whenVal !== undefined && valueVal !== undefined) {
|
|
50
|
-
return { var: varName, when: whenVal, value: valueVal };
|
|
51
|
-
}
|
|
52
|
-
return undefined;
|
|
18
|
+
function prepareTemplate(raw) {
|
|
19
|
+
return parser.prepareTemplate(raw, systemError);
|
|
53
20
|
}
|
|
54
21
|
/** Extract `descriptor.replaceMap` as a typed entry list (absent ⇒ empty). */
|
|
55
22
|
function parseReplaceMap(descriptor) {
|
|
56
|
-
|
|
57
|
-
return (0, neverthrow_1.err)(systemError("descriptor.json must be a JSON object"));
|
|
58
|
-
}
|
|
59
|
-
const raw = descriptor.replaceMap;
|
|
60
|
-
if (raw === undefined) {
|
|
61
|
-
return (0, neverthrow_1.ok)([]);
|
|
62
|
-
}
|
|
63
|
-
if (!Array.isArray(raw)) {
|
|
64
|
-
return (0, neverthrow_1.err)(systemError("descriptor.replaceMap must be an array"));
|
|
65
|
-
}
|
|
66
|
-
const entries = [];
|
|
67
|
-
for (const item of raw) {
|
|
68
|
-
const entry = toReplaceMapEntry(item);
|
|
69
|
-
if (entry === undefined) {
|
|
70
|
-
return (0, neverthrow_1.err)(systemError(`invalid replaceMap entry: ${JSON.stringify(item)}`));
|
|
71
|
-
}
|
|
72
|
-
entries.push(entry);
|
|
73
|
-
}
|
|
74
|
-
return (0, neverthrow_1.ok)(entries);
|
|
75
|
-
}
|
|
76
|
-
/** Extract declared option ids used to seed the render-context identifier domain. */
|
|
77
|
-
function parseDeclaredKeys(descriptor) {
|
|
78
|
-
if (!isRecord(descriptor)) {
|
|
79
|
-
return [];
|
|
80
|
-
}
|
|
81
|
-
const optionsSchema = descriptor.optionsSchema;
|
|
82
|
-
if (!isRecord(optionsSchema)) {
|
|
83
|
-
return [];
|
|
84
|
-
}
|
|
85
|
-
const properties = optionsSchema.properties;
|
|
86
|
-
if (!isRecord(properties)) {
|
|
87
|
-
return [];
|
|
88
|
-
}
|
|
89
|
-
return Object.keys(properties);
|
|
90
|
-
}
|
|
91
|
-
function toStringArray(raw) {
|
|
92
|
-
if (!Array.isArray(raw)) {
|
|
93
|
-
return undefined;
|
|
94
|
-
}
|
|
95
|
-
const out = [];
|
|
96
|
-
for (const value of raw) {
|
|
97
|
-
if (typeof value !== "string") {
|
|
98
|
-
return undefined;
|
|
99
|
-
}
|
|
100
|
-
out.push(value);
|
|
101
|
-
}
|
|
102
|
-
return out;
|
|
103
|
-
}
|
|
104
|
-
/** Coerce a `with` block to `StepParams` (string | boolean | string[] values only). */
|
|
105
|
-
function toStepParams(raw) {
|
|
106
|
-
if (!isRecord(raw)) {
|
|
107
|
-
return undefined;
|
|
108
|
-
}
|
|
109
|
-
const params = {};
|
|
110
|
-
for (const [key, value] of Object.entries(raw)) {
|
|
111
|
-
if (typeof value === "string" || typeof value === "boolean") {
|
|
112
|
-
params[key] = value;
|
|
113
|
-
continue;
|
|
114
|
-
}
|
|
115
|
-
const stringArray = toStringArray(value);
|
|
116
|
-
if (stringArray === undefined) {
|
|
117
|
-
return undefined;
|
|
118
|
-
}
|
|
119
|
-
params[key] = stringArray;
|
|
120
|
-
}
|
|
121
|
-
return params;
|
|
122
|
-
}
|
|
123
|
-
function applyConditionalMetadata(item, target, rejectMalformedWhen) {
|
|
124
|
-
const comment = stringField(item, "comment");
|
|
125
|
-
if (comment !== undefined) {
|
|
126
|
-
target.comment = comment;
|
|
127
|
-
}
|
|
128
|
-
const when = stringField(item, "when");
|
|
129
|
-
if (when !== undefined) {
|
|
130
|
-
target.when = when;
|
|
131
|
-
}
|
|
132
|
-
else if (rejectMalformedWhen && item.when !== undefined) {
|
|
133
|
-
return false;
|
|
134
|
-
}
|
|
135
|
-
return true;
|
|
136
|
-
}
|
|
137
|
-
function toPipelineStep(item) {
|
|
138
|
-
if (!isRecord(item)) {
|
|
139
|
-
return undefined;
|
|
140
|
-
}
|
|
141
|
-
const stepName = stringField(item, "step");
|
|
142
|
-
if (stepName === undefined) {
|
|
143
|
-
return undefined;
|
|
144
|
-
}
|
|
145
|
-
const result = { step: stepName };
|
|
146
|
-
if (!applyConditionalMetadata(item, result, false)) {
|
|
147
|
-
return undefined;
|
|
148
|
-
}
|
|
149
|
-
if (item.with !== undefined) {
|
|
150
|
-
const params = toStepParams(item.with);
|
|
151
|
-
if (params === undefined) {
|
|
152
|
-
return undefined;
|
|
153
|
-
}
|
|
154
|
-
result.with = params;
|
|
155
|
-
}
|
|
156
|
-
if (item.produces !== undefined) {
|
|
157
|
-
const produces = toStringArray(item.produces);
|
|
158
|
-
if (produces === undefined) {
|
|
159
|
-
return undefined;
|
|
160
|
-
}
|
|
161
|
-
result.produces = produces;
|
|
162
|
-
}
|
|
163
|
-
return result;
|
|
164
|
-
}
|
|
165
|
-
function toRenderFilter(item) {
|
|
166
|
-
if (!isRecord(item)) {
|
|
167
|
-
return undefined;
|
|
168
|
-
}
|
|
169
|
-
const exclude = toStringArray(item.exclude);
|
|
170
|
-
if (exclude === undefined) {
|
|
171
|
-
return undefined;
|
|
172
|
-
}
|
|
173
|
-
const result = { exclude };
|
|
174
|
-
if (!applyConditionalMetadata(item, result, true)) {
|
|
175
|
-
return undefined;
|
|
176
|
-
}
|
|
177
|
-
return result;
|
|
178
|
-
}
|
|
179
|
-
function toPipelineRender(raw) {
|
|
180
|
-
if (!isRecord(raw)) {
|
|
181
|
-
return undefined;
|
|
182
|
-
}
|
|
183
|
-
const result = {};
|
|
184
|
-
if (raw.filters !== undefined) {
|
|
185
|
-
if (!Array.isArray(raw.filters)) {
|
|
186
|
-
return undefined;
|
|
187
|
-
}
|
|
188
|
-
const filters = [];
|
|
189
|
-
for (const item of raw.filters) {
|
|
190
|
-
const filter = toRenderFilter(item);
|
|
191
|
-
if (filter === undefined) {
|
|
192
|
-
return undefined;
|
|
193
|
-
}
|
|
194
|
-
filters.push(filter);
|
|
195
|
-
}
|
|
196
|
-
result.filters = filters;
|
|
197
|
-
}
|
|
198
|
-
return result;
|
|
23
|
+
return parser.parseReplaceMap(descriptor, systemError);
|
|
199
24
|
}
|
|
200
25
|
/** Extract a parsed `pipeline.json` as a typed `Pipeline`. */
|
|
201
26
|
function parsePipeline(raw) {
|
|
202
|
-
|
|
203
|
-
return (0, neverthrow_1.err)(systemError("pipeline.json must be a JSON object"));
|
|
204
|
-
}
|
|
205
|
-
const name = stringField(raw, "pipeline");
|
|
206
|
-
if (name === undefined) {
|
|
207
|
-
return (0, neverthrow_1.err)(systemError("pipeline.pipeline (the orchestration name) is required"));
|
|
208
|
-
}
|
|
209
|
-
if (!Array.isArray(raw.steps)) {
|
|
210
|
-
return (0, neverthrow_1.err)(systemError("pipeline.steps must be an array"));
|
|
211
|
-
}
|
|
212
|
-
const steps = [];
|
|
213
|
-
for (const item of raw.steps) {
|
|
214
|
-
const step = toPipelineStep(item);
|
|
215
|
-
if (step === undefined) {
|
|
216
|
-
return (0, neverthrow_1.err)(systemError(`invalid pipeline step: ${JSON.stringify(item)}`));
|
|
217
|
-
}
|
|
218
|
-
steps.push(step);
|
|
219
|
-
}
|
|
220
|
-
const comment = stringField(raw, "comment");
|
|
221
|
-
let render;
|
|
222
|
-
if (raw.render !== undefined) {
|
|
223
|
-
render = toPipelineRender(raw.render);
|
|
224
|
-
if (render === undefined) {
|
|
225
|
-
return (0, neverthrow_1.err)(systemError(`invalid pipeline render: ${JSON.stringify(raw.render)}`));
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
return (0, neverthrow_1.ok)({
|
|
229
|
-
pipeline: name,
|
|
230
|
-
...(comment !== undefined ? { comment } : {}),
|
|
231
|
-
...(render !== undefined ? { render } : {}),
|
|
232
|
-
steps,
|
|
233
|
-
});
|
|
27
|
+
return parser.parsePipeline(raw, systemError);
|
|
234
28
|
}
|
|
235
29
|
//# sourceMappingURL=packageParse.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageParse.js","sourceRoot":"","sources":["../../../src/v4/runtime/packageParse.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;
|
|
1
|
+
{"version":3,"file":"packageParse.js","sourceRoot":"","sources":["../../../src/v4/runtime/packageParse.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAkBlC,0CAMC;AAGD,0CAEC;AAGD,sCAEC;;AAhCD,wDAAqD;AAMrD,2EAAqD;AAGrD,2DAAoF;AAA3E,mHAAA,mBAAmB,OAAA;AAAE,iHAAA,iBAAiB,OAAA;AAG/C,SAAS,WAAW,CAAC,IAAY,EAAE,OAAe;IAChD,OAAO,IAAI,yBAAW,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;AAChE,CAAC;AAED,SAAgB,eAAe,CAAC,GAI/B;IACC,OAAO,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;AAClD,CAAC;AAED,8EAA8E;AAC9E,SAAgB,eAAe,CAAC,UAAmB;IACjD,OAAO,MAAM,CAAC,eAAe,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;AACzD,CAAC;AAED,8DAA8D;AAC9D,SAAgB,aAAa,CAAC,GAAY;IACxC,OAAO,MAAM,CAAC,aAAa,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"realRuntime.d.ts","sourceRoot":"","sources":["../../../src/v4/runtime/realRuntime.ts"],"names":[],"mappings":"AAGA,OAAO,EAAe,OAAO,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"realRuntime.d.ts","sourceRoot":"","sources":["../../../src/v4/runtime/realRuntime.ts"],"names":[],"mappings":"AAGA,OAAO,EAAe,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAO9D,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAY,YAAY,EAAqB,MAAM,mBAAmB,CAAC;AAoD9E,wFAAwF;AACxF,MAAM,WAAW,WAAY,SAAQ,eAAe;IAClD,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,oDAAoD;AACpD,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,EACtC,YAAY,CAAC,EAAE,YAAY,EAC3B,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,GACvC,WAAW,CA+Cb"}
|
|
@@ -5,8 +5,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.createRealRuntime = createRealRuntime;
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
7
|
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
8
|
-
const
|
|
8
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
9
9
|
const path = tslib_1.__importStar(require("path"));
|
|
10
|
+
const localizeUtils_1 = require("../../common/localizeUtils");
|
|
10
11
|
const envUtil_1 = require("../../component/utils/envUtil");
|
|
11
12
|
const whitelist_1 = require("./whitelist");
|
|
12
13
|
const runtimeRegistry_1 = require("./runtimeRegistry");
|
|
@@ -26,6 +27,25 @@ function containedPath(rootDir, entryPath) {
|
|
|
26
27
|
message: `The scaffold tried to write outside the output directory: "${entryPath}".`,
|
|
27
28
|
});
|
|
28
29
|
}
|
|
30
|
+
let componentPath = base;
|
|
31
|
+
for (const component of rel.split(path.sep)) {
|
|
32
|
+
componentPath = path.join(componentPath, component);
|
|
33
|
+
try {
|
|
34
|
+
if (fs_extra_1.default.lstatSync(componentPath).isSymbolicLink()) {
|
|
35
|
+
throw new teamsfx_api_1.SystemError({
|
|
36
|
+
source: SOURCE,
|
|
37
|
+
name: SCAFFOLD_PATH_ESCAPE,
|
|
38
|
+
message: (0, localizeUtils_1.getLocalizedString)("core.openPluginExport.invalidOutputPath"),
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
if (isFileNotFound(error)) {
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
throw error;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
29
49
|
return out;
|
|
30
50
|
}
|
|
31
51
|
/** Narrow an unknown thrown value to one carrying a string-ish `code` field. */
|
|
@@ -40,15 +60,29 @@ function isFileNotFound(error) {
|
|
|
40
60
|
function createRealRuntime(rootDir, flagReader, stepRegistry, warningSink) {
|
|
41
61
|
const exprPort = (0, whitelist_1.createExpressionPort)(flagReader);
|
|
42
62
|
const sink = {
|
|
63
|
+
writeNew: (entryPath, data) => {
|
|
64
|
+
const target = containedPath(rootDir, entryPath);
|
|
65
|
+
fs_extra_1.default.ensureDirSync(path.dirname(target));
|
|
66
|
+
try {
|
|
67
|
+
fs_extra_1.default.writeFileSync(target, data, { flag: "wx" });
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
if (hasCode(error) && error.code === "EEXIST") {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
throw error;
|
|
75
|
+
}
|
|
76
|
+
},
|
|
43
77
|
write: (entryPath, data) => {
|
|
44
78
|
const target = containedPath(rootDir, entryPath);
|
|
45
|
-
|
|
46
|
-
|
|
79
|
+
fs_extra_1.default.ensureDirSync(path.dirname(target));
|
|
80
|
+
fs_extra_1.default.writeFileSync(target, data);
|
|
47
81
|
},
|
|
48
82
|
read: (entryPath) => {
|
|
49
83
|
const target = containedPath(rootDir, entryPath);
|
|
50
84
|
try {
|
|
51
|
-
return
|
|
85
|
+
return fs_extra_1.default.readFileSync(target);
|
|
52
86
|
}
|
|
53
87
|
catch (error) {
|
|
54
88
|
if (isFileNotFound(error)) {
|
|
@@ -58,7 +92,12 @@ function createRealRuntime(rootDir, flagReader, stepRegistry, warningSink) {
|
|
|
58
92
|
}
|
|
59
93
|
},
|
|
60
94
|
};
|
|
61
|
-
const port = (0, runtimeRegistry_1.buildPipelinePort)(exprPort, sink, (environment, values) => envUtil_1.envUtil.writeEnv(rootDir, environment, { ...values }
|
|
95
|
+
const port = (0, runtimeRegistry_1.buildPipelinePort)(exprPort, sink, (environment, values) => envUtil_1.envUtil.writeEnv(rootDir, environment, { ...values }, (filePath) => {
|
|
96
|
+
const absolutePath = path.resolve(filePath);
|
|
97
|
+
if (absolutePath !== path.resolve(rootDir)) {
|
|
98
|
+
containedPath(rootDir, absolutePath);
|
|
99
|
+
}
|
|
100
|
+
}), stepRegistry, warningSink);
|
|
62
101
|
return { rootDir, exprPort, port };
|
|
63
102
|
}
|
|
64
103
|
//# sourceMappingURL=realRuntime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"realRuntime.js","sourceRoot":"","sources":["../../../src/v4/runtime/realRuntime.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;
|
|
1
|
+
{"version":3,"file":"realRuntime.js","sourceRoot":"","sources":["../../../src/v4/runtime/realRuntime.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAqElC,8CAoDC;;AAvHD,wDAA8D;AAC9D,gEAA0B;AAC1B,mDAA6B;AAC7B,8DAAgE;AAChE,2DAAwD;AAExD,2CAAmD;AAEnD,uDAA8E;AAE9E,4EAA4E;AAE5E,MAAM,MAAM,GAAG,UAAU,CAAC;AAE1B,gFAAgF;AAChF,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;AAElD,yFAAyF;AACzF,SAAS,aAAa,CAAC,OAAe,EAAE,SAAiB;IACvD,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACnC,MAAM,GAAG,GAA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,MAAM,GAAG,aAAa,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;YACjD,IAAI,CAAC;gBACH,OAAO,kBAAE,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;YACjC,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;oBAC1B,OAAO,SAAS,CAAC;gBACnB,CAAC;gBACD,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;KACF,CAAC;IACF,MAAM,IAAI,GAAG,IAAA,mCAAiB,EAC5B,QAAQ,EACR,IAAI,EACJ,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,CACtB,iBAAO,CAAC,QAAQ,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE,CAAC,QAAQ,EAAE,EAAE;QACjE,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC5C,IAAI,YAAY,KAAK,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;YAC3C,aAAa,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QACvC,CAAC;IACH,CAAC,CAAC,EACJ,YAAY,EACZ,WAAW,CACZ,CAAC;IACF,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderFragment.d.ts","sourceRoot":"","sources":["../../../src/v4/runtime/renderFragment.ts"],"names":[],"mappings":"AAKA,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAE/E"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT license.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.renderFragment = renderFragment;
|
|
6
|
+
const tslib_1 = require("tslib");
|
|
7
|
+
const mustache_1 = tslib_1.__importDefault(require("mustache"));
|
|
8
|
+
function renderFragment(lines, values) {
|
|
9
|
+
return mustache_1.default.render(lines.join("\n"), values, undefined, { escape: (value) => value });
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=renderFragment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderFragment.js","sourceRoot":"","sources":["../../../src/v4/runtime/renderFragment.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAIlC,wCAEC;;AAJD,gEAAgC;AAEhC,SAAgB,cAAc,CAAC,KAAwB,EAAE,MAAc;IACrE,OAAO,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;AAC5F,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { FxError, Warning } from "@microsoft/teamsfx-api";
|
|
2
2
|
import { Result } from "neverthrow";
|
|
3
3
|
import { ExpressionRuntimePort } from "../expression/evaluateExpression";
|
|
4
|
-
import {
|
|
4
|
+
import { PipelineRuntimePort, RegisteredStep } from "../pipeline/runScaffoldPipeline";
|
|
5
|
+
import { DaManifestService } from "./services/daManifestService";
|
|
5
6
|
import { GeneralSensitivityLabelService } from "./steps/daSensitivity";
|
|
6
7
|
/** Shared v4 pipeline registry and port factory. See ADR-0017 for whitelist rules. */
|
|
7
8
|
/** The orchestration names the engine knows (ADR-0017 closed whitelist). */
|
|
@@ -9,13 +10,12 @@ export declare const KNOWN_PIPELINES: Set<string>;
|
|
|
9
10
|
/** Generic named-step lookup assembled at a runtime composition boundary. */
|
|
10
11
|
export type StepRegistry = ReadonlyMap<string, RegisteredStep>;
|
|
11
12
|
/** Bind runtime-owned business adapters into the closed post-render step whitelist. */
|
|
12
|
-
export declare function createStepRegistry(generalSensitivityLabel?: GeneralSensitivityLabelService): StepRegistry;
|
|
13
|
+
export declare function createStepRegistry(generalSensitivityLabel?: GeneralSensitivityLabelService, manifests?: DaManifestService): StepRegistry;
|
|
13
14
|
/** Default post-render step whitelist for offline runtimes and compatibility tests. */
|
|
14
15
|
export declare const STEP_REGISTRY: StepRegistry;
|
|
15
|
-
/** No-op wrapper for create flows that do not mutate a manifest. */
|
|
16
|
-
export declare const NOOP_MANIFEST_WRAPPER: ManifestWrapper;
|
|
17
16
|
/** Runtime-specific file sink injected behind the shared pipeline port. */
|
|
18
17
|
export interface FileSink {
|
|
18
|
+
writeNew(path: string, data: Buffer): boolean;
|
|
19
19
|
/** Persist `data` at `path` (a target-relative, forward-slash path). */
|
|
20
20
|
write(path: string, data: Buffer): void;
|
|
21
21
|
/** Read back a previously written file, or `undefined` when absent (EAFP). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtimeRegistry.d.ts","sourceRoot":"","sources":["../../../src/v4/runtime/runtimeRegistry.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"runtimeRegistry.d.ts","sourceRoot":"","sources":["../../../src/v4/runtime/runtimeRegistry.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,qBAAqB,EAA6B,MAAM,kCAAkC,CAAC;AACpG,OAAO,EAEL,mBAAmB,EACnB,cAAc,EACf,MAAM,iCAAiC,CAAC;AAMzC,OAAO,EAAE,iBAAiB,EAAqB,MAAM,8BAA8B,CAAC;AACpF,OAAO,EACL,8BAA8B,EAI/B,MAAM,uBAAuB,CAAC;AAyB/B,sFAAsF;AAEtF,4EAA4E;AAC5E,eAAO,MAAM,eAAe,aAAqE,CAAC;AAElG,6EAA6E;AAC7E,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;AAE/D,uFAAuF;AACvF,wBAAgB,kBAAkB,CAChC,uBAAuB,GAAE,8BAAuE,EAChG,SAAS,GAAE,iBAAqC,GAC/C,YAAY,CAiBd;AAED,uFAAuF;AACvF,eAAO,MAAM,aAAa,cAAuB,CAAC;AAElD,2EAA2E;AAC3E,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9C,wEAAwE;IACxE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,8EAA8E;IAC9E,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACxC;AAED,oFAAoF;AACpF,MAAM,MAAM,iBAAiB,GAAG,CAC9B,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAC3B,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;AAcpC,iEAAiE;AACjE,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,qBAAqB,EAC/B,IAAI,EAAE,QAAQ,EACd,iBAAiB,EAAE,iBAAiB,EACpC,YAAY,GAAE,YAA4B,EAC1C,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,GACvC,mBAAmB,CAiBrB"}
|
|
@@ -2,16 +2,13 @@
|
|
|
2
2
|
// Copyright (c) Microsoft Corporation.
|
|
3
3
|
// Licensed under the MIT license.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.
|
|
5
|
+
exports.STEP_REGISTRY = exports.KNOWN_PIPELINES = void 0;
|
|
6
6
|
exports.createStepRegistry = createStepRegistry;
|
|
7
7
|
exports.buildPipelinePort = buildPipelinePort;
|
|
8
|
-
const tslib_1 = require("tslib");
|
|
9
|
-
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
10
|
-
const neverthrow_1 = require("neverthrow");
|
|
11
|
-
const path_1 = tslib_1.__importDefault(require("path"));
|
|
12
8
|
const evaluateExpression_1 = require("../expression/evaluateExpression");
|
|
13
9
|
const renderMustache_1 = require("./renderMustache");
|
|
14
10
|
const daAction_1 = require("./steps/daAction");
|
|
11
|
+
const daManifestService_1 = require("./services/daManifestService");
|
|
15
12
|
const daSensitivity_1 = require("./steps/daSensitivity");
|
|
16
13
|
const mcpAuth_1 = require("./steps/mcpAuth");
|
|
17
14
|
const mcpLocal_1 = require("./steps/mcpLocal");
|
|
@@ -23,10 +20,13 @@ const metaOs_1 = require("./steps/metaOs");
|
|
|
23
20
|
/** The orchestration names the engine knows (ADR-0017 closed whitelist). */
|
|
24
21
|
exports.KNOWN_PIPELINES = new Set(["default", "openapi", "typespec", "officeAddin", "spfx"]);
|
|
25
22
|
/** Bind runtime-owned business adapters into the closed post-render step whitelist. */
|
|
26
|
-
function createStepRegistry(generalSensitivityLabel = daSensitivity_1.NOOP_GENERAL_SENSITIVITY_LABEL_SERVICE) {
|
|
23
|
+
function createStepRegistry(generalSensitivityLabel = daSensitivity_1.NOOP_GENERAL_SENSITIVITY_LABEL_SERVICE, manifests = daManifestService_1.daManifestService) {
|
|
27
24
|
return new Map([
|
|
28
|
-
[daAction_1.STEP_REGISTER_PLUGIN_MANIFEST, daAction_1.
|
|
29
|
-
[
|
|
25
|
+
[daAction_1.STEP_REGISTER_PLUGIN_MANIFEST, (0, daAction_1.createDaActionRegisterPluginManifestStep)(manifests)],
|
|
26
|
+
[
|
|
27
|
+
daSensitivity_1.STEP_SET_SENSITIVITY_LABEL,
|
|
28
|
+
(0, daSensitivity_1.createDaSetSensitivityLabelStep)(generalSensitivityLabel, manifests),
|
|
29
|
+
],
|
|
30
30
|
[mcpAuth_1.STEP_INJECT_YML_ACTION, mcpAuth_1.mcpAuthInjectYmlAction],
|
|
31
31
|
[mcpAuth_1.STEP_PERSIST_CREDENTIAL_ENV, mcpAuth_1.mcpAuthPersistCredentialEnv],
|
|
32
32
|
[mcpLocal_1.STEP_MATERIALIZE_LOCAL_SERVERS, mcpLocal_1.mcpLocalMaterializeServers],
|
|
@@ -40,103 +40,6 @@ function createStepRegistry(generalSensitivityLabel = daSensitivity_1.NOOP_GENER
|
|
|
40
40
|
}
|
|
41
41
|
/** Default post-render step whitelist for offline runtimes and compatibility tests. */
|
|
42
42
|
exports.STEP_REGISTRY = createStepRegistry();
|
|
43
|
-
/** No-op wrapper for create flows that do not mutate a manifest. */
|
|
44
|
-
exports.NOOP_MANIFEST_WRAPPER = {
|
|
45
|
-
registerDeclarativeAgentAction: () => (0, neverthrow_1.err)(manifestError("ManifestMutationUnavailable", "the current runtime does not provide manifest mutation")),
|
|
46
|
-
};
|
|
47
|
-
function manifestError(name, message, cause) {
|
|
48
|
-
return cause instanceof Error
|
|
49
|
-
? new teamsfx_api_1.SystemError({ source: "Scaffold", name, message, error: cause })
|
|
50
|
-
: new teamsfx_api_1.SystemError({ source: "Scaffold", name, message });
|
|
51
|
-
}
|
|
52
|
-
function normalizeTargetPath(entryPath) {
|
|
53
|
-
return entryPath.replace(/\\/g, "/");
|
|
54
|
-
}
|
|
55
|
-
function resolveSiblingPath(baseFile, relativeFile) {
|
|
56
|
-
return normalizeTargetPath(path_1.default.posix.normalize(path_1.default.posix.join(path_1.default.posix.dirname(baseFile), relativeFile)));
|
|
57
|
-
}
|
|
58
|
-
function pluginFileRelativeToAgent(agentManifestPath, pluginManifestPath) {
|
|
59
|
-
return normalizeTargetPath(path_1.default.posix.relative(path_1.default.posix.dirname(agentManifestPath), pluginManifestPath));
|
|
60
|
-
}
|
|
61
|
-
function actionId(pluginManifestPath) {
|
|
62
|
-
const basename = path_1.default.posix.basename(pluginManifestPath, path_1.default.posix.extname(pluginManifestPath));
|
|
63
|
-
return basename.startsWith("ai-plugin-") ? basename.substring("ai-plugin-".length) : basename;
|
|
64
|
-
}
|
|
65
|
-
function readManifest(sink, filePath, missingErrorName, readErrorName) {
|
|
66
|
-
try {
|
|
67
|
-
const contents = sink.read(filePath);
|
|
68
|
-
return contents === undefined
|
|
69
|
-
? (0, neverthrow_1.err)(manifestError(missingErrorName, `Cannot read '${filePath}'.`))
|
|
70
|
-
: (0, neverthrow_1.ok)(contents);
|
|
71
|
-
}
|
|
72
|
-
catch (error) {
|
|
73
|
-
return (0, neverthrow_1.err)(manifestError(readErrorName, `Cannot read '${filePath}'.`, error));
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
function registerDeclarativeAgentAction(sink, teamsManifestPath, pluginManifestPath) {
|
|
77
|
-
const teamsManifestContents = readManifest(sink, teamsManifestPath, "DaActionTeamsManifestMissing", "DaActionTeamsManifestReadFailed");
|
|
78
|
-
if (teamsManifestContents.isErr()) {
|
|
79
|
-
return (0, neverthrow_1.err)(teamsManifestContents.error);
|
|
80
|
-
}
|
|
81
|
-
let teamsManifest;
|
|
82
|
-
try {
|
|
83
|
-
teamsManifest = teamsfx_api_1.TeamsManifestWrapper.fromJSON(teamsManifestContents.value.toString("utf8"));
|
|
84
|
-
}
|
|
85
|
-
catch {
|
|
86
|
-
return (0, neverthrow_1.err)(manifestError("DaActionTeamsManifestInvalid", `'${teamsManifestPath}' is not valid JSON.`));
|
|
87
|
-
}
|
|
88
|
-
const agentFile = teamsManifest.getDeclarativeAgentPaths()[0];
|
|
89
|
-
if (agentFile === undefined) {
|
|
90
|
-
return (0, neverthrow_1.err)(manifestError("DaActionManifestFileMissing", `The Teams manifest '${teamsManifestPath}' does not reference a declarative agent manifest.`));
|
|
91
|
-
}
|
|
92
|
-
const agentManifestPath = resolveSiblingPath(teamsManifestPath, agentFile);
|
|
93
|
-
const agentManifestContents = readManifest(sink, agentManifestPath, "DaActionManifestMissing", "DaActionManifestReadFailed");
|
|
94
|
-
if (agentManifestContents.isErr()) {
|
|
95
|
-
return (0, neverthrow_1.err)(agentManifestContents.error);
|
|
96
|
-
}
|
|
97
|
-
let agentManifest;
|
|
98
|
-
try {
|
|
99
|
-
agentManifest = teamsfx_api_1.DeclarativeAgentManifestWrapper.fromJSON(agentManifestContents.value.toString("utf8"));
|
|
100
|
-
}
|
|
101
|
-
catch {
|
|
102
|
-
return (0, neverthrow_1.err)(manifestError("DaActionManifestInvalid", `'${agentManifestPath}' is not valid JSON.`));
|
|
103
|
-
}
|
|
104
|
-
agentManifest.upsertAction(actionId(pluginManifestPath), pluginFileRelativeToAgent(agentManifestPath, pluginManifestPath));
|
|
105
|
-
try {
|
|
106
|
-
sink.write(agentManifestPath, Buffer.from(agentManifest.toJSON(), "utf8"));
|
|
107
|
-
}
|
|
108
|
-
catch (error) {
|
|
109
|
-
return (0, neverthrow_1.err)(manifestError("DaActionManifestWriteFailed", `Cannot write '${agentManifestPath}'.`, error));
|
|
110
|
-
}
|
|
111
|
-
return (0, neverthrow_1.ok)(undefined);
|
|
112
|
-
}
|
|
113
|
-
function buildManifestWrapper(sink) {
|
|
114
|
-
return {
|
|
115
|
-
registerDeclarativeAgentAction: (teamsManifestPath, pluginManifestPath) => registerDeclarativeAgentAction(sink, teamsManifestPath, pluginManifestPath),
|
|
116
|
-
setSensitivityLabel: (manifestPath, id) => {
|
|
117
|
-
const contents = readManifest(sink, manifestPath, "DaSensitivityLabelManifestMissing", "DaSensitivityLabelManifestReadFailed");
|
|
118
|
-
if (contents.isErr()) {
|
|
119
|
-
return (0, neverthrow_1.err)(contents.error);
|
|
120
|
-
}
|
|
121
|
-
let serialized;
|
|
122
|
-
try {
|
|
123
|
-
const wrapper = teamsfx_api_1.DeclarativeAgentManifestWrapper.fromJSON(contents.value.toString("utf8"));
|
|
124
|
-
wrapper.setSensitivityLabel(id);
|
|
125
|
-
serialized = Buffer.from(wrapper.toJSON(), "utf8");
|
|
126
|
-
}
|
|
127
|
-
catch (error) {
|
|
128
|
-
return (0, neverthrow_1.err)(manifestError("DaSensitivityLabelManifestInvalid", "the Declarative Agent manifest to label is invalid", error));
|
|
129
|
-
}
|
|
130
|
-
try {
|
|
131
|
-
sink.write(manifestPath, serialized);
|
|
132
|
-
return (0, neverthrow_1.ok)(undefined);
|
|
133
|
-
}
|
|
134
|
-
catch (error) {
|
|
135
|
-
return (0, neverthrow_1.err)(manifestError("DaSensitivityLabelManifestWriteFailed", `Cannot write '${manifestPath}'.`, error));
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
43
|
/** Drop list-valued render vars before calling the scalar expression evaluator. */
|
|
141
44
|
function scalarScope(renderVars) {
|
|
142
45
|
const scope = {};
|
|
@@ -155,8 +58,8 @@ function buildPipelinePort(exprPort, sink, environmentWriter, stepRegistry = exp
|
|
|
155
58
|
stepRegistry: (name) => stepRegistry.get(name),
|
|
156
59
|
evalWhen: (expr, renderVars) => (0, evaluateExpression_1.evaluateExpression)({ expr }, scalarScope(renderVars), exprPort).map((value) => value === true),
|
|
157
60
|
render: (mustache, renderVars) => (0, renderMustache_1.renderMustache)(mustache, renderVars),
|
|
158
|
-
manifestWrapper: () => buildManifestWrapper(sink),
|
|
159
61
|
warn: warningSink,
|
|
62
|
+
writeNew: (path, data) => sink.writeNew(path, data),
|
|
160
63
|
write: (path, data) => sink.write(path, data),
|
|
161
64
|
writeEnvironment: environmentWriter,
|
|
162
65
|
read: (path) => sink.read(path),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtimeRegistry.js","sourceRoot":"","sources":["../../../src/v4/runtime/runtimeRegistry.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;
|
|
1
|
+
{"version":3,"file":"runtimeRegistry.js","sourceRoot":"","sources":["../../../src/v4/runtime/runtimeRegistry.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAwDlC,gDAoBC;AAiCD,8CAuBC;AA/HD,yEAAoG;AAMpG,qDAAkD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 +3,7 @@ import { Result } from "neverthrow";
|
|
|
3
3
|
import { Answers, CallerFloor, TemplateFileEntry } from "../model/dataModel";
|
|
4
4
|
import { ExpressionRuntimePort } from "../expression/evaluateExpression";
|
|
5
5
|
import { PipelineRuntimePort, ScaffoldOutcome, TargetDir } from "../pipeline/runScaffoldPipeline";
|
|
6
|
+
import { PreparedTemplate } from "./packageParse";
|
|
6
7
|
/** v4 scaffold composition over an injected runtime. See create-mcp-server spec. */
|
|
7
8
|
/** The two ports `scaffold` composes. */
|
|
8
9
|
export interface ScaffoldRuntime {
|
|
@@ -28,4 +29,5 @@ export interface ScaffoldRequest {
|
|
|
28
29
|
}
|
|
29
30
|
/** Scaffold one template package against an injected runtime. */
|
|
30
31
|
export declare function scaffold(request: ScaffoldRequest, runtime: ScaffoldRuntime): Promise<Result<ScaffoldOutcome, FxError>>;
|
|
32
|
+
export declare function scaffoldPrepared(template: PreparedTemplate, request: Pick<ScaffoldRequest, "answers" | "callerFloor" | "targetDir">, runtime: ScaffoldRuntime): Promise<Result<ScaffoldOutcome, FxError>>;
|
|
31
33
|
//# sourceMappingURL=scaffold.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../../src/v4/runtime/scaffold.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAO,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAEzE,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,SAAS,EAEV,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../../src/v4/runtime/scaffold.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,O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