@microsoft/teamsfx-core 3.0.13 → 3.0.14-alpha.1673f8d0ac.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/teamsGraphClient.d.ts +3 -0
- package/build/client/teamsGraphClient.d.ts.map +1 -1
- package/build/client/teamsGraphClient.js +17 -0
- package/build/client/teamsGraphClient.js.map +1 -1
- package/build/common/featureFlags.d.ts +12 -2
- package/build/common/featureFlags.d.ts.map +1 -1
- package/build/common/featureFlags.js +15 -3
- package/build/common/featureFlags.js.map +1 -1
- package/build/common/projectSettingsHelper.d.ts +0 -2
- package/build/common/projectSettingsHelper.d.ts.map +1 -1
- package/build/common/projectSettingsHelper.js +1 -56
- package/build/common/projectSettingsHelper.js.map +1 -1
- package/build/common/telemetry.d.ts +4 -15
- package/build/common/telemetry.d.ts.map +1 -1
- package/build/common/telemetry.js +5 -18
- package/build/common/telemetry.js.map +1 -1
- package/build/common/templates-config.json +9 -2
- 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 +5 -1
- package/build/component/coordinator/index.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/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/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/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/createAppPackage.d.ts +2 -0
- package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.js +74 -10
- 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/publishAppPackage.d.ts +0 -2
- package/build/component/driver/teamsApp/publishAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/publishAppPackage.js +2 -51
- package/build/component/driver/teamsApp/publishAppPackage.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 +13 -0
- package/build/component/driver/teamsApp/utils/McpCertVerification.d.ts.map +1 -0
- package/build/component/driver/teamsApp/utils/McpCertVerification.js +65 -0
- package/build/component/driver/teamsApp/utils/McpCertVerification.js.map +1 -0
- package/build/component/driver/teamsApp/validate.js +1 -1
- package/build/component/driver/teamsApp/validate.js.map +1 -1
- package/build/component/generator/declarativeAgent/generator.d.ts.map +1 -1
- package/build/component/generator/declarativeAgent/generator.js +1 -2
- package/build/component/generator/declarativeAgent/generator.js.map +1 -1
- package/build/component/generator/defaultGenerator.d.ts.map +1 -1
- package/build/component/generator/defaultGenerator.js +14 -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/officeAddin/generator.d.ts +8 -0
- package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
- package/build/component/generator/officeAddin/generator.js +47 -0
- package/build/component/generator/officeAddin/generator.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/templateHelper.d.ts +15 -0
- package/build/component/generator/templateHelper.d.ts.map +1 -1
- package/build/component/generator/templateHelper.js +28 -0
- package/build/component/generator/templateHelper.js.map +1 -1
- package/build/component/generator/templates/metadata/index.d.ts.map +1 -1
- package/build/component/generator/templates/metadata/index.js +9 -2
- package/build/component/generator/templates/metadata/index.js.map +1 -1
- package/build/component/generator/templates/templateNames.d.ts +2 -1
- package/build/component/generator/templates/templateNames.d.ts.map +1 -1
- package/build/component/generator/templates/templateNames.js +2 -0
- 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/v4MetadataSource.d.ts +23 -0
- package/build/component/generator/v4MetadataSource.d.ts.map +1 -0
- package/build/component/generator/v4MetadataSource.js +42 -0
- package/build/component/generator/v4MetadataSource.js.map +1 -0
- package/build/component/generator/v4TemplateBridge.d.ts +29 -0
- package/build/component/generator/v4TemplateBridge.d.ts.map +1 -0
- package/build/component/generator/v4TemplateBridge.js +114 -0
- package/build/component/generator/v4TemplateBridge.js.map +1 -0
- package/build/component/m365/packageService.d.ts +5 -0
- package/build/component/m365/packageService.d.ts.map +1 -1
- package/build/component/m365/packageService.js +23 -1
- package/build/component/m365/packageService.js.map +1 -1
- package/build/core/FxCore.d.ts +2 -4
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.js +53 -78
- 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/middleware/concurrentLocker.d.ts.map +1 -1
- package/build/core/middleware/concurrentLocker.js +0 -3
- 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/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/question/constants.d.ts.map +1 -1
- package/build/question/constants.js +1 -6
- package/build/question/constants.js.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 +2 -0
- package/build/question/inputs/index.d.ts.map +1 -1
- package/build/question/inputs/index.js +2 -0
- package/build/question/inputs/index.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 +2 -0
- package/build/question/options/index.d.ts.map +1 -1
- package/build/question/options/index.js +2 -0
- package/build/question/options/index.js.map +1 -1
- package/build/question/scaffold/vsc/daProjectTypeNode.d.ts.map +1 -1
- package/build/question/scaffold/vsc/daProjectTypeNode.js +1 -3
- 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 +1 -1
- package/build/question/scaffold/vsc/rootNode.js.map +1 -1
- package/build/v4/distribution/bundledFloor.d.ts +12 -0
- package/build/v4/distribution/bundledFloor.d.ts.map +1 -0
- package/build/v4/distribution/bundledFloor.js +80 -0
- package/build/v4/distribution/bundledFloor.js.map +1 -0
- package/build/v4/distribution/templateConfig.d.ts +53 -0
- package/build/v4/distribution/templateConfig.d.ts.map +1 -0
- package/build/v4/distribution/templateConfig.js +43 -0
- package/build/v4/distribution/templateConfig.js.map +1 -0
- package/build/v4/distribution/templatePackage.d.ts +29 -0
- package/build/v4/distribution/templatePackage.d.ts.map +1 -0
- package/build/v4/distribution/templatePackage.js +82 -0
- package/build/v4/distribution/templatePackage.js.map +1 -0
- package/build/v4/distribution/templateSource.d.ts +67 -0
- package/build/v4/distribution/templateSource.d.ts.map +1 -0
- package/build/v4/distribution/templateSource.js +220 -0
- package/build/v4/distribution/templateSource.js.map +1 -0
- package/build/v4/distribution/templateSourcePort.d.ts +50 -0
- package/build/v4/distribution/templateSourcePort.d.ts.map +1 -0
- package/build/v4/distribution/templateSourcePort.js +207 -0
- package/build/v4/distribution/templateSourcePort.js.map +1 -0
- package/build/v4/index.d.ts +13 -0
- package/build/v4/index.d.ts.map +1 -0
- package/build/v4/index.js +18 -0
- package/build/v4/index.js.map +1 -0
- package/package.json +4 -4
- package/resource/package.nls.cs.json +12 -14
- package/resource/package.nls.de.json +13 -15
- package/resource/package.nls.es.json +12 -14
- package/resource/package.nls.fr.json +12 -14
- package/resource/package.nls.it.json +13 -15
- package/resource/package.nls.ja.json +12 -14
- package/resource/package.nls.json +10 -13
- package/resource/package.nls.ko.json +12 -14
- package/resource/package.nls.pl.json +13 -15
- package/resource/package.nls.pt-BR.json +12 -14
- package/resource/package.nls.ru.json +13 -15
- package/resource/package.nls.tr.json +14 -16
- package/resource/package.nls.zh-Hans.json +12 -14
- package/resource/package.nls.zh-Hant.json +24 -26
- 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 +124 -2
- 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 -2
- package/templates/ui/wizardNode.json +1 -2
- package/templates/v4/floor.json +3 -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/build/{core/middleware → component/generator/openPlugin}/types.js +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT license.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.truncateAtWordBoundary = truncateAtWordBoundary;
|
|
6
|
+
exports.toTitleCaseFromKebab = toTitleCaseFromKebab;
|
|
7
|
+
/**
|
|
8
|
+
* Truncate `text` to at most `maxLength` characters, preferring a word
|
|
9
|
+
* boundary when the cut would land mid-word. If no usable boundary exists
|
|
10
|
+
* within the first 50% of the limit, falls back to a hard cut.
|
|
11
|
+
*/
|
|
12
|
+
function truncateAtWordBoundary(text, maxLength) {
|
|
13
|
+
if (!text) {
|
|
14
|
+
return "";
|
|
15
|
+
}
|
|
16
|
+
if (text.length <= maxLength) {
|
|
17
|
+
return text;
|
|
18
|
+
}
|
|
19
|
+
const truncated = text.substring(0, maxLength);
|
|
20
|
+
if (/\s/.test(text.charAt(maxLength))) {
|
|
21
|
+
return truncated.trimEnd();
|
|
22
|
+
}
|
|
23
|
+
const lastSpace = truncated.lastIndexOf(" ");
|
|
24
|
+
if (lastSpace > Math.floor(maxLength * 0.5)) {
|
|
25
|
+
return truncated.substring(0, lastSpace).trimEnd();
|
|
26
|
+
}
|
|
27
|
+
return truncated.trimEnd();
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Convert a kebab-case identifier to a Title Case display name.
|
|
31
|
+
* Empty segments and stray dashes are ignored.
|
|
32
|
+
*/
|
|
33
|
+
function toTitleCaseFromKebab(name) {
|
|
34
|
+
if (!name) {
|
|
35
|
+
return "";
|
|
36
|
+
}
|
|
37
|
+
return name
|
|
38
|
+
.split("-")
|
|
39
|
+
.filter((part) => part.length > 0)
|
|
40
|
+
.map((part) => part.charAt(0).toUpperCase() + part.substring(1).toLowerCase())
|
|
41
|
+
.join(" ");
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=textUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textUtils.js","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/textUtils.ts"],"names":[],"m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E,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
export interface OpenPluginAuthorObject {
|
|
2
|
+
name?: string;
|
|
3
|
+
email?: string;
|
|
4
|
+
url?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface OpenPluginManifest {
|
|
7
|
+
name: string;
|
|
8
|
+
version?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
author?: string | OpenPluginAuthorObject;
|
|
11
|
+
homepage?: string;
|
|
12
|
+
repository?: string;
|
|
13
|
+
license?: string;
|
|
14
|
+
logo?: string;
|
|
15
|
+
keywords?: string[];
|
|
16
|
+
skills?: string | string[] | Record<string, unknown>;
|
|
17
|
+
commands?: string | string[] | Record<string, unknown>;
|
|
18
|
+
agents?: string | string[] | Record<string, unknown>;
|
|
19
|
+
hooks?: string | string[] | Record<string, unknown>;
|
|
20
|
+
mcpServers?: string | string[] | Record<string, unknown>;
|
|
21
|
+
lspServers?: string | string[] | Record<string, unknown>;
|
|
22
|
+
rules?: string | string[] | Record<string, unknown>;
|
|
23
|
+
outputStyles?: string | string[];
|
|
24
|
+
}
|
|
25
|
+
export interface ParsedAuthor {
|
|
26
|
+
name?: string;
|
|
27
|
+
email?: string;
|
|
28
|
+
url?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface OpenPluginMcpServerEntry {
|
|
31
|
+
url?: string;
|
|
32
|
+
type?: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
[key: string]: unknown;
|
|
35
|
+
}
|
|
36
|
+
export interface OpenPluginMcpJson {
|
|
37
|
+
mcpServers?: Record<string, OpenPluginMcpServerEntry>;
|
|
38
|
+
[key: string]: unknown;
|
|
39
|
+
}
|
|
40
|
+
export interface ParsedOpenPlugin {
|
|
41
|
+
pluginRoot: string;
|
|
42
|
+
manifest: OpenPluginManifest;
|
|
43
|
+
manifestPath: string;
|
|
44
|
+
manifestKind: "open-plugin" | "claude-plugin" | "cursor-plugin";
|
|
45
|
+
mcpServers: Record<string, OpenPluginMcpServerEntry>;
|
|
46
|
+
skills: string[];
|
|
47
|
+
skillsRoot?: string;
|
|
48
|
+
commands: string[];
|
|
49
|
+
commandsRoot?: string;
|
|
50
|
+
hasColorPng: boolean;
|
|
51
|
+
hasOutlinePng: boolean;
|
|
52
|
+
warnings: string[];
|
|
53
|
+
/** Round-trip metadata produced by `atk export openplugin`, when present. */
|
|
54
|
+
atkExtension?: AtkExtensionBlock;
|
|
55
|
+
}
|
|
56
|
+
export type AuthorizationType = "None" | "OAuthPluginVault" | "ApiKeyPluginVault";
|
|
57
|
+
export type DefaultAuthOption = "Auto" | AuthorizationType;
|
|
58
|
+
/**
|
|
59
|
+
* Extension block embedded under `x-microsoft-365-agents-toolkit` in plugin.json
|
|
60
|
+
* by `atk export openplugin`. Carries every field that the Open Plugin Spec
|
|
61
|
+
* cannot natively represent so that re-importing reconstructs the original
|
|
62
|
+
* project losslessly. All fields are optional — the importer treats missing
|
|
63
|
+
* keys the same way it treats a plugin.json without this extension at all.
|
|
64
|
+
*/
|
|
65
|
+
export interface AtkExtensionBlock {
|
|
66
|
+
manifestVersion?: string;
|
|
67
|
+
id?: string;
|
|
68
|
+
packageName?: string;
|
|
69
|
+
accentColor?: string;
|
|
70
|
+
developer?: {
|
|
71
|
+
name?: string;
|
|
72
|
+
websiteUrl?: string;
|
|
73
|
+
privacyUrl?: string;
|
|
74
|
+
termsOfUseUrl?: string;
|
|
75
|
+
};
|
|
76
|
+
name?: {
|
|
77
|
+
short?: string;
|
|
78
|
+
full?: string;
|
|
79
|
+
};
|
|
80
|
+
description?: {
|
|
81
|
+
short?: string;
|
|
82
|
+
full?: string;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Per-agentConnector overrides preserved verbatim: the keys are the
|
|
86
|
+
* connector ids (matching the .mcp.json server name). Values store the
|
|
87
|
+
* fields .mcp.json cannot carry: displayName, description, authorization.
|
|
88
|
+
*/
|
|
89
|
+
agentConnectors?: Record<string, AtkAgentConnectorExt>;
|
|
90
|
+
}
|
|
91
|
+
export interface AtkAgentConnectorExt {
|
|
92
|
+
displayName?: string;
|
|
93
|
+
description?: string;
|
|
94
|
+
authorization?: {
|
|
95
|
+
type: AuthorizationType;
|
|
96
|
+
referenceId?: string;
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
export interface ImportInputs {
|
|
100
|
+
path: string;
|
|
101
|
+
output?: string;
|
|
102
|
+
/** Optional when plugin.json carries an x-microsoft-365-agents-toolkit block. */
|
|
103
|
+
privacyUrl?: string;
|
|
104
|
+
/** Optional when plugin.json carries an x-microsoft-365-agents-toolkit block. */
|
|
105
|
+
termsUrl?: string;
|
|
106
|
+
websiteUrl?: string;
|
|
107
|
+
appId?: string;
|
|
108
|
+
defaultAuthType?: DefaultAuthOption;
|
|
109
|
+
packageName?: string;
|
|
110
|
+
}
|
|
111
|
+
export interface ExportInputs {
|
|
112
|
+
/** Path to the existing ATK project (folder that contains appPackage/manifest.json). */
|
|
113
|
+
path: string;
|
|
114
|
+
/** Destination open-plugin directory. Defaults to ./<plugin-name>-openplugin. */
|
|
115
|
+
output?: string;
|
|
116
|
+
/** Manifest kind to emit. Defaults to 'open-plugin' (.plugin/plugin.json). */
|
|
117
|
+
manifestKind?: "open-plugin" | "claude-plugin" | "cursor-plugin";
|
|
118
|
+
}
|
|
119
|
+
export interface CopyOp {
|
|
120
|
+
src: string;
|
|
121
|
+
destRelative: string;
|
|
122
|
+
}
|
|
123
|
+
export interface MappedManifest {
|
|
124
|
+
manifest: Record<string, unknown>;
|
|
125
|
+
copyOps: CopyOp[];
|
|
126
|
+
warnings: string[];
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/types.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM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EAAE,aAAa,GAAG,eAAe,GAAG,eAAe,CAAC;CAClE;AAED,MAAM,WAAW,MAAM;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/types.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC"}
|
|
@@ -5,4 +5,19 @@
|
|
|
5
5
|
* - Package version contains "alpha" (daily build version)
|
|
6
6
|
*/
|
|
7
7
|
export declare function useLocalTemplate(): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Transitional: in the v4 channel the metadata/UI readers must read the bundled
|
|
10
|
+
* copy and ignore any (possibly stale v3) `~/.fx` cache UNLESS the v4 online
|
|
11
|
+
* fetch populated its cache. `fetchOnlineTemplateMetadata` writes
|
|
12
|
+
* `~/.fx/template-version-v4.txt` only after a successful v4 download, so its
|
|
13
|
+
* presence is the single signal that downloaded v4 metadata is available:
|
|
14
|
+
* - present → read the downloaded v4 cache;
|
|
15
|
+
* - absent → bundled build / channel unreachable / not yet published, so
|
|
16
|
+
* read the bundled copy (never a stale v3 cache).
|
|
17
|
+
* This mirrors the `resolveTemplateSource` decision in
|
|
18
|
+
* `fetchOnlineTemplateMetadata`.
|
|
19
|
+
*
|
|
20
|
+
* Remove once selector.json drives metadata distribution.
|
|
21
|
+
*/
|
|
22
|
+
export declare function useBundledMetadataForV4(): boolean;
|
|
8
23
|
//# sourceMappingURL=templateHelper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templateHelper.d.ts","sourceRoot":"","sources":["../../../src/component/generator/templateHelper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"templateHelper.d.ts","sourceRoot":"","sources":["../../../src/component/generator/templateHelper.ts"],"names":[],"mappings":"AAWA;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAY1C;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,IAAI,OAAO,CAUjD"}
|
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
// Licensed under the MIT license.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.useLocalTemplate = useLocalTemplate;
|
|
6
|
+
exports.useBundledMetadataForV4 = useBundledMetadataForV4;
|
|
7
|
+
const tslib_1 = require("tslib");
|
|
8
|
+
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
9
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
10
|
+
const os_1 = tslib_1.__importDefault(require("os"));
|
|
11
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
12
|
+
const featureFlags_1 = require("../../common/featureFlags");
|
|
6
13
|
const packageJson = require("../../../package.json");
|
|
7
14
|
/**
|
|
8
15
|
* Determines whether to use local templates based on environment variables and package version.
|
|
@@ -22,4 +29,25 @@ function useLocalTemplate() {
|
|
|
22
29
|
}
|
|
23
30
|
return false;
|
|
24
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Transitional: in the v4 channel the metadata/UI readers must read the bundled
|
|
34
|
+
* copy and ignore any (possibly stale v3) `~/.fx` cache UNLESS the v4 online
|
|
35
|
+
* fetch populated its cache. `fetchOnlineTemplateMetadata` writes
|
|
36
|
+
* `~/.fx/template-version-v4.txt` only after a successful v4 download, so its
|
|
37
|
+
* presence is the single signal that downloaded v4 metadata is available:
|
|
38
|
+
* - present → read the downloaded v4 cache;
|
|
39
|
+
* - absent → bundled build / channel unreachable / not yet published, so
|
|
40
|
+
* read the bundled copy (never a stale v3 cache).
|
|
41
|
+
* This mirrors the `resolveTemplateSource` decision in
|
|
42
|
+
* `fetchOnlineTemplateMetadata`.
|
|
43
|
+
*
|
|
44
|
+
* Remove once selector.json drives metadata distribution.
|
|
45
|
+
*/
|
|
46
|
+
function useBundledMetadataForV4() {
|
|
47
|
+
if (!featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.V4Enabled)) {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
const v4VersionFile = path_1.default.join(os_1.default.homedir(), `.${String(teamsfx_api_1.ConfigFolderName)}`, "template-version-v4.txt");
|
|
51
|
+
return !fs_extra_1.default.pathExistsSync(v4VersionFile);
|
|
52
|
+
}
|
|
25
53
|
//# sourceMappingURL=templateHelper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templateHelper.js","sourceRoot":"","sources":["../../../src/component/generator/templateHelper.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;
|
|
1
|
+
{"version":3,"file":"templateHelper.js","sourceRoot":"","sources":["../../../src/component/generator/templateHelper.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAgBlC,4CAYC;AAgBD,0DAUC;;AApDD,wDAA0D;AAC1D,gEAA0B;AAC1B,oDAAoB;AACpB,wDAAwB;AACxB,4DAA6E;AAE7E,MAAM,WAAW,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;AAErD;;;;;GAKG;AACH,SAAgB,gBAAgB;IAC9B,MAAM,kBAAkB,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;IAC3D,IAAI,kBAAkB,KAAK,OAAO,EAAE,CAAC;QACnC,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,OAAO,GAAW,WAAW,CAAC,OAAO,CAAC;IAC5C,IAAI,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QAC9B,sBAAsB;QACtB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,SAAgB,uBAAuB;IACrC,IAAI,CAAC,iCAAkB,CAAC,eAAe,CAAC,2BAAY,CAAC,SAAS,CAAC,EAAE,CAAC;QAChE,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,aAAa,GAAG,cAAI,CAAC,IAAI,CAC7B,YAAE,CAAC,OAAO,EAAE,EACZ,IAAI,MAAM,CAAC,8BAAgB,CAAC,EAAE,EAC9B,yBAAyB,CAC1B,CAAC;IACF,OAAO,CAAC,kBAAE,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/component/generator/templates/metadata/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoB,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAMpE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/component/generator/templates/metadata/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoB,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAMpE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAkCvC,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ,EAAE,CAYxE;AAGD,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ,EAAE,CAe5E"}
|
|
@@ -15,8 +15,15 @@ function getTemplateMetadataConfig(configName, platform) {
|
|
|
15
15
|
let jsonPath;
|
|
16
16
|
const cacheSubDir = platform === teamsfx_api_1.Platform.VS ? "vs-metadata" : "metadata";
|
|
17
17
|
const cachedJsonPath = path_1.default.join(os_1.default.homedir(), `.${String(teamsfx_api_1.ConfigFolderName)}`, cacheSubDir, configName);
|
|
18
|
-
// Check if cached JSON exists, otherwise fallback to bundled templates folder
|
|
19
|
-
|
|
18
|
+
// Check if cached JSON exists, otherwise fallback to bundled templates folder.
|
|
19
|
+
// The v4 channel migration covers only the VSC/CLI metadata (`templates-v4@`);
|
|
20
|
+
// VS keeps its v3 `templates-vs@` cache untouched, so the v4 bundled decision
|
|
21
|
+
// is not applied for Platform.VS.
|
|
22
|
+
const forceBundledForV4 = platform !== teamsfx_api_1.Platform.VS && (0, templateHelper_1.useBundledMetadataForV4)();
|
|
23
|
+
if (!(0, templateHelper_1.useLocalTemplate)() &&
|
|
24
|
+
!forceBundledForV4 &&
|
|
25
|
+
cachedJsonPath &&
|
|
26
|
+
fs_extra_1.default.pathExistsSync(cachedJsonPath)) {
|
|
20
27
|
jsonPath = cachedJsonPath;
|
|
21
28
|
}
|
|
22
29
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/component/generator/templates/metadata/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/component/generator/templates/metadata/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA0ClC,8DAYC;AAGD,sEAeC;;AAtED,wDAAoE;AACpE,gEAA0B;AAC1B,oDAAoB;AACpB,wDAAwB;AACxB,+CAAwD;AACxD,yDAAiF;AAGjF,SAAS,yBAAyB,CAAC,UAAkB,EAAE,QAAmB;IACxE,IAAI,QAAgB,CAAC;IAErB,MAAM,WAAW,GAAG,QAAQ,KAAK,sBAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,UAAU,CAAC;IAC1E,MAAM,cAAc,GAAG,cAAI,CAAC,IAAI,CAC9B,YAAE,CAAC,OAAO,EAAE,EACZ,IAAI,MAAM,CAAC,8BAAgB,CAAC,EAAE,EAC9B,WAAW,EACX,UAAU,CACX,CAAC;IAEF,+EAA+E;IAC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,CACT,CAAC;IACF,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,sBAAQ,CAAC,MAAM;YAClB,OAAO,yBAAyB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC;QAC1E,KAAK,sBAAQ,CAAC,EAAE;YACd,OAAO,yBAAyB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC;QAC1E,KAAK,sBAAQ,CAAC,GAAG;YACf,OAAO,yBAAyB,CAAC;QACnC;YACE,OAAO,EAAE,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -50,6 +50,7 @@ export declare enum TemplateNames {
|
|
|
50
50
|
ExcelCFShortcut = "office-addin-excel-cfshortcut",// handled by OfficeAddinGeneratorNew
|
|
51
51
|
OfficeAddinCommon = "office-addin-config",// handled by OfficeAddinGeneratorNew
|
|
52
52
|
Empty = "empty",
|
|
53
|
-
MessageExtensionSearch = "message-extension-search"
|
|
53
|
+
MessageExtensionSearch = "message-extension-search",
|
|
54
|
+
OpenPluginImport = "open-plugin-import"
|
|
54
55
|
}
|
|
55
56
|
//# sourceMappingURL=templateNames.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templateNames.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/templates/templateNames.ts"],"names":[],"mappings":"AAKA,oBAAY,aAAa;IAEvB,qBAAqB,sBAAsB,CAAE,uCAAuC;IACpF,qCAAqC,4BAA4B,CAAE,uCAAuC;IAC1G,2CAA2C,mCAAmC,CAAE,mJAAmJ;IACnO,0CAA0C,kCAAkC,CAAE,uCAAuC;IACrH,6CAA6C,iCAAiC,CAAE,0DAA0D;IAC1I,kCAAkC,4BAA4B,CAAE,uCAAuC;IACvG,4BAA4B,+BAA+B,CAAE,uCAAuC;IACpG,kCAAkC,2CAA2C,CAAE,uCAA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AAwC;IACxF,+CAA+C,8BAA8B;IAC7E,mCAAmC,gCAAgC,CAAE,0DAA0D;IAC/H,oBAAoB,2BAA2B;IAC/C,sBAAsB,6BAA6B;IACnD,aAAa,mBAAmB;IAChC,uBAAuB,8BAA8B;IAGrD,eAAe,kCAAkC,CAAE,qCAAqC;IACxF,WAAW,+BAA+B,CAAE,qCAAqC;IACjF,eAAe,kCAAkC,CAAE,qCAAqC;IACxF,iBAAiB,wBAAwB,CAAE,qCAAqC;IAGhF,KAAK,UAAU;IACf,sBAAsB,6BAA6B;IAGnD,gBAAgB,uBAAuB;CACxC"}
|
|
@@ -68,5 +68,7 @@ var TemplateNames;
|
|
|
68
68
|
// VS only
|
|
69
69
|
TemplateNames["Empty"] = "empty";
|
|
70
70
|
TemplateNames["MessageExtensionSearch"] = "message-extension-search";
|
|
71
|
+
// openplugin import — baseline files scaffolded by 'atk import openplugin'
|
|
72
|
+
TemplateNames["OpenPluginImport"] = "open-plugin-import";
|
|
71
73
|
})(TemplateNames || (exports.TemplateNames = TemplateNames = {}));
|
|
72
74
|
//# sourceMappingURL=templateNames.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templateNames.js","sourceRoot":"","sources":["../../../../src/component/generator/templates/templateNames.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,8CAA8C;AAC9C,oBAAoB;AACpB,IAAY,
|
|
1
|
+
{"version":3,"file":"templateNames.js","sourceRoot":"","sources":["../../../../src/component/generator/templates/templateNames.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,8CAA8C;AAC9C,oBAAoB;AACpB,IAAY,aA0EX;AA1ED,WAAY,aAAa;IACvB,oBAAoB;IACpB,4DAA2C,CAAA;IAC3C,kFAAiE,CAAA;IACjE,+FAA8E,CAAA;IAC9E,6FAA4E,CAAA;IAC5E,+FAA8E,CAAA;IAC9E,+EAA8D,CAAA;IAC9D,4EAA2D,CAAA;IAC3D,8FAA6E,CAAA;IAC7E,6FAA4E,CAAA;IAE5E,2FAA0E,CAAA;IAC1E,mGAAkF,CAAA;IAElF,sBAAsB;IACtB,qEAAoD,CAAA;IACpD,+CAA8B,CAAA;IAC9B,6CAA4B,CAAA;IAC5B,0DAAyC,CAAA;IAEzC,kBAAkB;IAClB,4DAA2C,CAAA;IAC3C,2EAA0D,CAAA;IAC1D,qFAAoE,CAAA;IACpE,4EAA2D,CAAA;IAC3D,iFAAgE,CAAA;IAChE,2EAA0D,CAAA;IAC1D,gGAA+E,CAAA;IAC/E,oEAAmD,CAAA;IAEnD,oBAAoB;IACpB,mDAAkC,CAAA;IAElC,MAAM;IACN,oCAAmB,CAAA;IACnB,0CAAyB,CAAA;IACzB,+CAA8B,CAAA;IAC9B,2CAA0B,CAAA;IAC1B,0CAAyB,CAAA;IACzB,qCAAoB,CAAA;IAEpB,MAAM;IACN,2CAA0B,CAAA;IAC1B,6DAA4C,CAAA;IAC5C,2DAA0C,CAAA;IAC1C,sEAAqD,CAAA;IACrD,wEAAuD,CAAA;IACvD,iFAAgE,CAAA;IAChE,4DAA2C,CAAA;IAC3C,sCAAqB,CAAA;IAErB,sBAAsB;IACtB,sFAAqE,CAAA;IACrE,yGAAwF,CAAA;IACxF,8FAA6E,CAAA;IAC7E,oFAAmE,CAAA;IACnE,gEAA+C,CAAA;IAC/C,oEAAmD,CAAA;IACnD,iDAAgC,CAAA;IAChC,sEAAqD,CAAA;IAErD,MAAM;IACN,kEAAiD,CAAA;IACjD,2DAA0C,CAAA;IAC1C,kEAAiD,CAAA;IACjD,0DAAyC,CAAA;IAEzC,UAAU;IACV,gCAAe,CAAA;IACf,oEAAmD,CAAA;IAEnD,2EAA2E;IAC3E,wDAAuC,CAAA;AACzC,CAAC,EA1EW,aAAa,6BAAb,aAAa,QA0ExB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templateReplaceMap.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/templates/templateReplaceMap.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAOhD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"templateReplaceMap.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/templates/templateReplaceMap.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAOhD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CA8E/E"}
|
|
@@ -13,7 +13,10 @@ function getTemplateReplaceMap(inputs) {
|
|
|
13
13
|
const solutionName = inputs[constants_1.QuestionNames.SolutionName] ?? appName;
|
|
14
14
|
const targetFramework = inputs.targetFramework;
|
|
15
15
|
const placeProjectFileInSolutionDir = inputs.placeProjectFileInSolutionDir === "true";
|
|
16
|
-
|
|
16
|
+
// Fall back to the CLI/UX default when the LLM service question was not asked
|
|
17
|
+
// or omitted in non-interactive mode, so templates that depend on
|
|
18
|
+
// {{#useAzureOpenAI}} blocks still emit a valid agent model.
|
|
19
|
+
const llmService = inputs[constants_1.QuestionNames.LLMService] ?? "llm-service-azure-openai";
|
|
17
20
|
let openAIKey = inputs[constants_1.QuestionNames.OpenAIKey];
|
|
18
21
|
let azureOpenAIKey = inputs[constants_1.QuestionNames.AzureOpenAIKey];
|
|
19
22
|
let azureAISearchApiKey = inputs[constants_1.QuestionNames.AzureAISearchApiKey];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templateReplaceMap.js","sourceRoot":"","sources":["../../../../src/component/generator/templates/templateReplaceMap.ts"],"names":[],"mappings":";;AASA,
|
|
1
|
+
{"version":3,"file":"templateReplaceMap.js","sourceRoot":"","sources":["../../../../src/component/generator/templates/templateReplaceMap.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C,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;QAC3F,aAAa,EAAE,YAAE,CAAC,QAAQ,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG;KACrD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { FxError } from "@microsoft/teamsfx-api";
|
|
2
|
+
import { Result } from "neverthrow";
|
|
3
|
+
import { TemplateSource } from "../../v4/distribution/templateSource";
|
|
4
|
+
/**
|
|
5
|
+
* Resolve which v4 template release the metadata should come from, using the
|
|
6
|
+
* SAME single decision point as the template package:
|
|
7
|
+
* `resolveTemplateSource((v4.range, v4.bundled, port))`.
|
|
8
|
+
*
|
|
9
|
+
* `bundled` is CD-baked (= !goproduct), so goproduct builds (stable AND
|
|
10
|
+
* prerelease) resolve to an `online`/`cache` source while non-goproduct/daily
|
|
11
|
+
* builds resolve to the bundled floor. The metadata.zip asset lives in the same
|
|
12
|
+
* `templates-v4@<version>` release as the resolved package, so the resolved
|
|
13
|
+
* version names the release that `fetchOnlineTemplateMetadata` pulls metadata
|
|
14
|
+
* from. Resolving here also downloads, verifies, and caches the template
|
|
15
|
+
* package, so a later content scaffold reuses it with no re-download.
|
|
16
|
+
*
|
|
17
|
+
* An unreachable channel resolves to a bundled-fallback origin (not an error);
|
|
18
|
+
* only a malformed tag list or a digest mismatch surfaces as `Result.err`.
|
|
19
|
+
*
|
|
20
|
+
* Transitional: remove once selector.json drives metadata distribution.
|
|
21
|
+
*/
|
|
22
|
+
export declare function resolveV4MetadataSource(): Promise<Result<TemplateSource, FxError>>;
|
|
23
|
+
//# sourceMappingURL=v4MetadataSource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v4MetadataSource.d.ts","sourceRoot":"","sources":["../../../src/component/generator/v4MetadataSource.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAGpC,OAAO,EAAE,cAAc,EAAyB,MAAM,sCAAsC,CAAC;AAI7F;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,uBAAuB,IAAI,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC,CAclF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT license.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.resolveV4MetadataSource = resolveV4MetadataSource;
|
|
6
|
+
const tslib_1 = require("tslib");
|
|
7
|
+
const templates_config_json_1 = tslib_1.__importDefault(require("../../common/templates-config.json"));
|
|
8
|
+
const bundledFloor_1 = require("../../v4/distribution/bundledFloor");
|
|
9
|
+
const templateSource_1 = require("../../v4/distribution/templateSource");
|
|
10
|
+
const templateSourcePort_1 = require("../../v4/distribution/templateSourcePort");
|
|
11
|
+
const constant_1 = require("./constant");
|
|
12
|
+
/**
|
|
13
|
+
* Resolve which v4 template release the metadata should come from, using the
|
|
14
|
+
* SAME single decision point as the template package:
|
|
15
|
+
* `resolveTemplateSource((v4.range, v4.bundled, port))`.
|
|
16
|
+
*
|
|
17
|
+
* `bundled` is CD-baked (= !goproduct), so goproduct builds (stable AND
|
|
18
|
+
* prerelease) resolve to an `online`/`cache` source while non-goproduct/daily
|
|
19
|
+
* builds resolve to the bundled floor. The metadata.zip asset lives in the same
|
|
20
|
+
* `templates-v4@<version>` release as the resolved package, so the resolved
|
|
21
|
+
* version names the release that `fetchOnlineTemplateMetadata` pulls metadata
|
|
22
|
+
* from. Resolving here also downloads, verifies, and caches the template
|
|
23
|
+
* package, so a later content scaffold reuses it with no re-download.
|
|
24
|
+
*
|
|
25
|
+
* An unreachable channel resolves to a bundled-fallback origin (not an error);
|
|
26
|
+
* only a malformed tag list or a digest mismatch surfaces as `Result.err`.
|
|
27
|
+
*
|
|
28
|
+
* Transitional: remove once selector.json drives metadata distribution.
|
|
29
|
+
*/
|
|
30
|
+
function resolveV4MetadataSource() {
|
|
31
|
+
const port = (0, templateSourcePort_1.createTemplateSourcePort)({
|
|
32
|
+
templatesV4TagListURL: templates_config_json_1.default.templatesV4TagListURL,
|
|
33
|
+
templateDownloadBaseURL: templates_config_json_1.default.templateDownloadBaseURL,
|
|
34
|
+
tryLimits: constant_1.defaultTryLimits,
|
|
35
|
+
}, (0, bundledFloor_1.loadBundledFloor)());
|
|
36
|
+
return (0, templateSource_1.resolveTemplateSource)({
|
|
37
|
+
range: templates_config_json_1.default.v4.range,
|
|
38
|
+
bundled: templates_config_json_1.default.v4.bundled,
|
|
39
|
+
port,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=v4MetadataSource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v4MetadataSource.js","sourceRoot":"","sources":["../../../src/component/generator/v4MetadataSource.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA4BlC,0DAcC;;AAtCD,uGAAgE;AAChE,qEAAsE;AACtE,yEAA6F;AAC7F,iFAAoF;AACpF,yCAA8C;AAE9C;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAgB,uBAAuB;IACrC,MAAM,IAAI,GAAG,IAAA,6CAAwB,EACnC;QACE,qBAAqB,EAAE,+BAAc,CAAC,qBAAqB;QAC3D,uBAAuB,EAAE,+BAAc,CAAC,uBAAuB;QAC/D,SAAS,EAAE,2BAAgB;KAC5B,EACD,IAAA,+BAAgB,GAAE,CACnB,CAAC;IACF,OAAO,IAAA,sCAAqB,EAAC;QAC3B,KAAK,EAAE,+BAAc,CAAC,EAAE,CAAC,KAAK;QAC9B,OAAO,EAAE,+BAAc,CAAC,EAAE,CAAC,OAAO;QAClC,IAAI;KACL,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { TemplateFileEntry, TemplateLocator, TemplateSource } from "../../v4";
|
|
2
|
+
import { GeneratorContext } from "./generatorAction";
|
|
3
|
+
/**
|
|
4
|
+
* Render the located template's entries onto disk using the v3
|
|
5
|
+
* `GeneratorContext` rename/data/filter functions verbatim, so the output is
|
|
6
|
+
* byte-identical to the legacy `unzip` path.
|
|
7
|
+
*
|
|
8
|
+
* `openTemplatePackage` strips the `<language>/<scenario>/` prefix, but the v3
|
|
9
|
+
* `filterFn`/`fileNameReplaceFn` expect entry paths still rooted at
|
|
10
|
+
* `${context.name}/`; the prefix is re-added here before applying them. The
|
|
11
|
+
* data-replace function receives the basename, matching `unzip`'s
|
|
12
|
+
* `dataReplaceFn(entry.name, ...)` call.
|
|
13
|
+
*/
|
|
14
|
+
export declare function renderTemplateEntries(context: GeneratorContext, entries: TemplateFileEntry[]): Promise<string[]>;
|
|
15
|
+
/**
|
|
16
|
+
* v3 → v4 wiring (one-way; v3 may call into the v4 barrel, v4 knows nothing of
|
|
17
|
+
* v3). Resolves the scaffold template through the v4 distribution channel, then
|
|
18
|
+
* renders the located template's entries onto disk.
|
|
19
|
+
*
|
|
20
|
+
* Expected failures from the v4 operations surface as thrown `FxError`s,
|
|
21
|
+
* matching how the legacy local-template action rejects.
|
|
22
|
+
*
|
|
23
|
+
* `telemetryProps` (the `GenerateTemplate` event's props) is populated with the
|
|
24
|
+
* resolved `source` as soon as resolution succeeds — before the package is read
|
|
25
|
+
* or rendered — so a later digest/render failure still carries the origin and
|
|
26
|
+
* version, making v4 errors attributable in telemetry.
|
|
27
|
+
*/
|
|
28
|
+
export declare function scaffoldFromV4Channel(context: GeneratorContext, locator: TemplateLocator, telemetryProps?: Record<string, string>): Promise<TemplateSource>;
|
|
29
|
+
//# sourceMappingURL=v4TemplateBridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v4TemplateBridge.d.ts","sourceRoot":"","sources":["../../../src/component/generator/v4TemplateBridge.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,cAAc,EAMf,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AA2BrD;;;;;;;;;;GAUG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,iBAAiB,EAAE,GAC3B,OAAO,CAAC,MAAM,EAAE,CAAC,CAmBnB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,eAAe,EACxB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACtC,OAAO,CAAC,cAAc,CAAC,CAmCzB"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT license.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.renderTemplateEntries = renderTemplateEntries;
|
|
6
|
+
exports.scaffoldFromV4Channel = scaffoldFromV4Channel;
|
|
7
|
+
const tslib_1 = require("tslib");
|
|
8
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
9
|
+
const lodash_1 = require("lodash");
|
|
10
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
11
|
+
const templates_config_json_1 = tslib_1.__importDefault(require("../../common/templates-config.json"));
|
|
12
|
+
const telemetry_1 = require("../../common/telemetry");
|
|
13
|
+
const v4_1 = require("../../v4");
|
|
14
|
+
const constant_1 = require("./constant");
|
|
15
|
+
const error_1 = require("./error");
|
|
16
|
+
/**
|
|
17
|
+
* Resolve a template entry's relative name to an absolute path and verify it
|
|
18
|
+
* stays within `destination`. The entry name originates from the (untrusted)
|
|
19
|
+
* template archive, so a `../` segment could otherwise escape the project
|
|
20
|
+
* directory (zip-slip). Throws `TemplateOutputPathError` on escape.
|
|
21
|
+
*/
|
|
22
|
+
function resolveTemplateOutputPath(destination, entryName) {
|
|
23
|
+
const base = path_1.default.resolve(destination);
|
|
24
|
+
const outputPath = path_1.default.resolve(base, entryName);
|
|
25
|
+
const relative = path_1.default.relative(base, outputPath);
|
|
26
|
+
// Reject only an actual parent-directory escape: a relative path that is the
|
|
27
|
+
// `..` segment itself or starts with `..<sep>`, or an absolute path. A leading
|
|
28
|
+
// `""` means the entry resolves to `base` itself (no filename). A filename
|
|
29
|
+
// that merely starts with ".." (e.g. "..foo") stays in-root and is allowed.
|
|
30
|
+
if (relative === "" ||
|
|
31
|
+
relative === ".." ||
|
|
32
|
+
relative.startsWith(".." + path_1.default.sep) ||
|
|
33
|
+
path_1.default.isAbsolute(relative)) {
|
|
34
|
+
throw new error_1.TemplateOutputPathError(entryName);
|
|
35
|
+
}
|
|
36
|
+
return outputPath;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Render the located template's entries onto disk using the v3
|
|
40
|
+
* `GeneratorContext` rename/data/filter functions verbatim, so the output is
|
|
41
|
+
* byte-identical to the legacy `unzip` path.
|
|
42
|
+
*
|
|
43
|
+
* `openTemplatePackage` strips the `<language>/<scenario>/` prefix, but the v3
|
|
44
|
+
* `filterFn`/`fileNameReplaceFn` expect entry paths still rooted at
|
|
45
|
+
* `${context.name}/`; the prefix is re-added here before applying them. The
|
|
46
|
+
* data-replace function receives the basename, matching `unzip`'s
|
|
47
|
+
* `dataReplaceFn(entry.name, ...)` call.
|
|
48
|
+
*/
|
|
49
|
+
async function renderTemplateEntries(context, entries) {
|
|
50
|
+
const output = [];
|
|
51
|
+
for (const entry of entries) {
|
|
52
|
+
const entryName = `${context.name}/${entry.path}`;
|
|
53
|
+
if (context.filterFn && !context.filterFn(entryName)) {
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
const finalName = context.fileNameReplaceFn
|
|
57
|
+
? context.fileNameReplaceFn(entryName, entry.data)
|
|
58
|
+
: entryName;
|
|
59
|
+
const finalData = context.fileDataReplaceFn
|
|
60
|
+
? context.fileDataReplaceFn(path_1.default.basename(entry.path), entry.data)
|
|
61
|
+
: entry.data;
|
|
62
|
+
const filePath = resolveTemplateOutputPath(context.destination, finalName);
|
|
63
|
+
await fs_extra_1.default.ensureDir(path_1.default.dirname(filePath));
|
|
64
|
+
await fs_extra_1.default.writeFile(filePath, finalData);
|
|
65
|
+
output.push(finalName);
|
|
66
|
+
}
|
|
67
|
+
return output;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* v3 → v4 wiring (one-way; v3 may call into the v4 barrel, v4 knows nothing of
|
|
71
|
+
* v3). Resolves the scaffold template through the v4 distribution channel, then
|
|
72
|
+
* renders the located template's entries onto disk.
|
|
73
|
+
*
|
|
74
|
+
* Expected failures from the v4 operations surface as thrown `FxError`s,
|
|
75
|
+
* matching how the legacy local-template action rejects.
|
|
76
|
+
*
|
|
77
|
+
* `telemetryProps` (the `GenerateTemplate` event's props) is populated with the
|
|
78
|
+
* resolved `source` as soon as resolution succeeds — before the package is read
|
|
79
|
+
* or rendered — so a later digest/render failure still carries the origin and
|
|
80
|
+
* version, making v4 errors attributable in telemetry.
|
|
81
|
+
*/
|
|
82
|
+
async function scaffoldFromV4Channel(context, locator, telemetryProps) {
|
|
83
|
+
const channelConfig = {
|
|
84
|
+
templatesV4TagListURL: templates_config_json_1.default.templatesV4TagListURL,
|
|
85
|
+
templateDownloadBaseURL: templates_config_json_1.default.templateDownloadBaseURL,
|
|
86
|
+
tryLimits: context.tryLimits ?? constant_1.defaultTryLimits,
|
|
87
|
+
};
|
|
88
|
+
const port = (0, v4_1.createTemplateSourcePort)(channelConfig, (0, v4_1.loadBundledFloor)());
|
|
89
|
+
const sourceResult = await (0, v4_1.resolveTemplateSource)({
|
|
90
|
+
range: templates_config_json_1.default.v4.range,
|
|
91
|
+
bundled: templates_config_json_1.default.v4.bundled,
|
|
92
|
+
port,
|
|
93
|
+
});
|
|
94
|
+
if (sourceResult.isErr()) {
|
|
95
|
+
throw sourceResult.error;
|
|
96
|
+
}
|
|
97
|
+
const source = sourceResult.value;
|
|
98
|
+
(0, lodash_1.merge)(telemetryProps, {
|
|
99
|
+
[telemetry_1.TelemetryProperty.TemplatePackageSource]: source.origin,
|
|
100
|
+
[telemetry_1.TelemetryProperty.TemplatePackageVersion]: source.version,
|
|
101
|
+
[telemetry_1.TelemetryProperty.TemplatePackageDigest]: source.digest,
|
|
102
|
+
});
|
|
103
|
+
const bytesResult = (0, v4_1.loadResolvedPackage)(source, port);
|
|
104
|
+
if (bytesResult.isErr()) {
|
|
105
|
+
throw bytesResult.error;
|
|
106
|
+
}
|
|
107
|
+
const entriesResult = (0, v4_1.openTemplatePackage)(bytesResult.value, locator);
|
|
108
|
+
if (entriesResult.isErr()) {
|
|
109
|
+
throw entriesResult.error;
|
|
110
|
+
}
|
|
111
|
+
context.outputs = await renderTemplateEntries(context, entriesResult.value);
|
|
112
|
+
return source;
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=v4TemplateBridge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v4TemplateBridge.js","sourceRoot":"","sources":["../../../src/component/generator/v4TemplateBridge.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAyDlC,sDAsBC;AAeD,sDAuCC;;AAnID,gEAA0B;AAC1B,mCAA+B;AAC/B,wDAAwB;AACxB,uGAAgE;AAChE,sDAA2D;AAC3D,iCASkB;AAClB,yCAA8C;AAC9C,mCAAkD;AAGlD;;;;;GAKG;AACH,SAAS,yBAAyB,CAAC,WAAmB,EAAE,SAAiB;IACvE,MAAM,IAAI,GAAG,cAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACvC,MAAM,UAAU,GAAG,cAAI,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACjD,MAAM,QAAQ,GAAG,cAAI,CAAC,QAAQ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AAE,EAAE,CAAC;QACxB,MAAM,WAAW,CAAC,KAAK,CAAC;IAC1B,CAAC;IAED,MAAM,aAAa,GAAG,IAAA,wBAAmB,EAAC,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACtE,IAAI,aAAa,CAAC,KAAK,EAAE,EAAE,CAAC;QAC1B,MAAM,aAAa,CAAC,KAAK,CAAC;IAC5B,CAAC;IAED,OAAO,CAAC,OAAO,GAAG,MAAM,qBAAqB,CAAC,OAAO,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;IAC5E,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -23,6 +23,11 @@ export declare class PackageService {
|
|
|
23
23
|
sideLoadXmlManifest(token: string, manifestPath: string): Promise<[string, string]>;
|
|
24
24
|
sideLoading(token: string, packagePath: string, appScope?: AppScope): Promise<[string, string, string]>;
|
|
25
25
|
sideLoadingV2(token: string, manifestPath: string, appScope: AppScope): Promise<[string, string]>;
|
|
26
|
+
/**
|
|
27
|
+
* Publish agent using Builder API (sideLoadingV2) and get share link for shared scope.
|
|
28
|
+
* Returns [titleId, appId, shareLink]
|
|
29
|
+
*/
|
|
30
|
+
publishAgent(token: string, packagePath: string, appScope?: AppScope): Promise<[string, string, string]>;
|
|
26
31
|
sideLoadingV1(token: string, manifestPath: string): Promise<[string, string]>;
|
|
27
32
|
getShareLink(token: string, titleId: string): Promise<string>;
|
|
28
33
|
getLaunchInfoByManifestId(token: string, manifestId: string): Promise<any>;
|