@microsoft/teamsfx-core 3.0.13 → 3.0.14-alpha.1ba1d62e58.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 +8 -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/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 +51 -6
- 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/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/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 +3 -62
- 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/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 +9 -1
- package/resource/package.nls.de.json +10 -2
- package/resource/package.nls.es.json +9 -1
- package/resource/package.nls.fr.json +9 -1
- package/resource/package.nls.it.json +10 -2
- package/resource/package.nls.ja.json +9 -1
- package/resource/package.nls.json +10 -13
- package/resource/package.nls.ko.json +9 -1
- package/resource/package.nls.pl.json +10 -2
- package/resource/package.nls.pt-BR.json +9 -1
- package/resource/package.nls.ru.json +10 -2
- package/resource/package.nls.tr.json +11 -3
- package/resource/package.nls.zh-Hans.json +9 -1
- package/resource/package.nls.zh-Hant.json +9 -1
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../src/component/generator/officeAddin/generator.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../src/component/generator/officeAddin/generator.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AA8IlC,0BAyBC;;AArKD;;GAEG;AAEH,wDAWgC;AAChC,gEAA2B;AAC3B,wDAAwB;AACxB,+DAAsD;AACtD,iEAAmE;AACnE,6DAAsD;AACtD,0CAA+C;AAC/C,2DAAiF;AAEjF,iDAA8C;AAC9C,0DAA+D;AAE/D,8DAA2D;AAC3D,mDAAgD;AAChD,iDAA8C;AAE9C;;;;GAIG;AACH,MAAa,oBAAoB;IACxB,MAAM,CAAC,KAAK,CAAC,aAAa,CAC/B,OAAgB,EAChB,MAAc,EACd,eAAuB;QAEvB,MAAM,SAAS,GAAG,eAAe,CAAC;QAClC,MAAM,UAAU,GAAG,MAAM,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,CAAC,yBAAa,CAAC,iBAAiB,CAAC,CAAC;QAC3D,IAAI,UAAU,EAAE,CAAC;YACf,sBAAsB;YACtB,MAAM,MAAM,GAAG,MAAM,iBAAO,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;YACtD,IAAI,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC;gBAClB,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC;gBAC1B,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;oBACvB,MAAM,iBAAO,CAAC,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC,CAAC;gBACnF,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO,IAAA,gBAAE,EAAC,EAAE,CAAC,CAAC;IAChB,CAAC;CACF;AAhGD,0DAgGC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ParsedAuthor } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Parse the Open Plugin `author` field. The spec allows either an object
|
|
4
|
+
* `{ name, email, url }` or a free-form string like `"Name <email> (url)"`.
|
|
5
|
+
* Returns whatever subset of fields could be extracted.
|
|
6
|
+
*/
|
|
7
|
+
export declare function parseAuthor(author: unknown): ParsedAuthor;
|
|
8
|
+
//# sourceMappingURL=authorParser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorParser.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/authorParser.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAKvC;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,OAAO,GAAG,YAAY,CAqCzD"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT license.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.parseAuthor = parseAuthor;
|
|
6
|
+
const URL_RE = /^(.+?)\s*\((https?:\/\/[^\s)]+)\)\s*$/;
|
|
7
|
+
const EMAIL_RE = /^(.+?)\s*<([^>]+)>\s*$/;
|
|
8
|
+
/**
|
|
9
|
+
* Parse the Open Plugin `author` field. The spec allows either an object
|
|
10
|
+
* `{ name, email, url }` or a free-form string like `"Name <email> (url)"`.
|
|
11
|
+
* Returns whatever subset of fields could be extracted.
|
|
12
|
+
*/
|
|
13
|
+
function parseAuthor(author) {
|
|
14
|
+
const result = {};
|
|
15
|
+
if (author === null || author === undefined) {
|
|
16
|
+
return result;
|
|
17
|
+
}
|
|
18
|
+
if (typeof author === "string") {
|
|
19
|
+
let trimmed = author.trim();
|
|
20
|
+
const urlMatch = URL_RE.exec(trimmed);
|
|
21
|
+
if (urlMatch) {
|
|
22
|
+
result.url = urlMatch[2];
|
|
23
|
+
trimmed = urlMatch[1].trim();
|
|
24
|
+
}
|
|
25
|
+
const emailMatch = EMAIL_RE.exec(trimmed);
|
|
26
|
+
if (emailMatch) {
|
|
27
|
+
result.email = emailMatch[2].trim();
|
|
28
|
+
trimmed = emailMatch[1].trim();
|
|
29
|
+
}
|
|
30
|
+
if (trimmed) {
|
|
31
|
+
result.name = trimmed;
|
|
32
|
+
}
|
|
33
|
+
return result;
|
|
34
|
+
}
|
|
35
|
+
if (typeof author === "object") {
|
|
36
|
+
const obj = author;
|
|
37
|
+
if (typeof obj.name === "string" && obj.name) {
|
|
38
|
+
result.name = obj.name;
|
|
39
|
+
}
|
|
40
|
+
if (typeof obj.email === "string" && obj.email) {
|
|
41
|
+
result.email = obj.email;
|
|
42
|
+
}
|
|
43
|
+
if (typeof obj.url === "string" && obj.url) {
|
|
44
|
+
result.url = obj.url;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return result;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=authorParser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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IAAI,KAAK,QAAQ,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;YAC7C,MAAM,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;QACzB,CAAC;QACD,IAAI,OAAO,GAAG,CAAC,KAAK,KAAK,QAAQ,IAAI,GAAG,CAAC,KAAK,EAAE,CAAC;YAC/C,MAAM,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;QAC3B,CAAC;QACD,IAAI,OAAO,GAAG,CAAC,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,GAAG,EAAE,CAAC;YAC3C,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC;QACvB,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deterministicId.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/deterministicId.ts"],"names":[],"mappings":"AAUA;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAevD"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT license.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.deterministicAppId = deterministicAppId;
|
|
6
|
+
const crypto_1 = require("crypto");
|
|
7
|
+
// RFC 4122 URL namespace UUID.
|
|
8
|
+
const URL_NAMESPACE_BYTES = Buffer.from([
|
|
9
|
+
0x6b, 0xa7, 0xb8, 0x11, 0x9d, 0xad, 0x11, 0xd1, 0x80, 0xb4, 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8,
|
|
10
|
+
]);
|
|
11
|
+
/**
|
|
12
|
+
* Compute a deterministic UUIDv5 (SHA-1 based) of `seed` under the URL
|
|
13
|
+
* namespace. The same `seed` always produces the same UUID.
|
|
14
|
+
*/
|
|
15
|
+
function deterministicAppId(seed) {
|
|
16
|
+
const nameBytes = Buffer.from(seed, "utf8");
|
|
17
|
+
const hash = (0, crypto_1.createHash)("sha1").update(URL_NAMESPACE_BYTES).update(nameBytes).digest();
|
|
18
|
+
const bytes = Buffer.from(hash.subarray(0, 16));
|
|
19
|
+
// version (5) and variant bits per RFC 4122
|
|
20
|
+
bytes[6] = (bytes[6] & 0x0f) | 0x50;
|
|
21
|
+
bytes[8] = (bytes[8] & 0x3f) | 0x80;
|
|
22
|
+
const hex = bytes.toString("hex");
|
|
23
|
+
return [
|
|
24
|
+
hex.substring(0, 8),
|
|
25
|
+
hex.substring(8, 12),
|
|
26
|
+
hex.substring(12, 16),
|
|
27
|
+
hex.substring(16, 20),
|
|
28
|
+
hex.substring(20),
|
|
29
|
+
].join("-");
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=deterministicId.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deterministicId.js","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/deterministicId.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAalC,gDAeC;AA1BD,mCAAoC;AAEpC,+BAA+B;AAC/B,MAAM,mBAAmB,GAAG,MAAM,CAAC,IAAI,CAAC;IACtC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;CAC/F,CAAC,CAAC;AAEH;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,IAAY;IAC7C,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC5C,MAAM,IAAI,GAAG,IAAA,mBAAU,EAAC,MAAM,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,CAAC;IACvF,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAChD,4CAA4C;IAC5C,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;IACpC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;IACpC,MAAM,GAAG,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClC,OAAO;QACL,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;QACnB,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC;QACpB,GAAG,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC;QACrB,GAAG,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC;QACrB,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;KAClB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FxError, Result } from "@microsoft/teamsfx-api";
|
|
2
|
+
import { ExportInputs } from "./types";
|
|
3
|
+
export declare const OPEN_PLUGIN_EXPORT_SOURCE = "OpenPluginExport";
|
|
4
|
+
export interface ExportResult {
|
|
5
|
+
/** Absolute path to the generated Open Plugin directory. */
|
|
6
|
+
outputPath: string;
|
|
7
|
+
warnings: string[];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Export an ATK project (folder containing appPackage/manifest.json plus the
|
|
11
|
+
* usual agentSkills/agentConnectors layout) into an Open Plugin Spec v1.0
|
|
12
|
+
* directory. The output is structured so that `atk import openplugin --path
|
|
13
|
+
* <output>` reconstructs an equivalent ATK project; fields with no native
|
|
14
|
+
* Open Plugin equivalent are preserved verbatim under the
|
|
15
|
+
* `x-microsoft-365-agents-toolkit` extension key in plugin.json.
|
|
16
|
+
*/
|
|
17
|
+
export declare function exportOpenPlugin(inputs: ExportInputs): Promise<Result<ExportResult, FxError>>;
|
|
18
|
+
//# sourceMappingURL=exporter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exporter.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/exporter.ts"],"names":[],"mappings":"AAGA,OAAO,EAAO,OAAO,EAAM,MAAM,EAA0B,MAAM,wBAAwB,CAAC;AAG1F,OAAO,EAA8D,YAAY,EAAE,MAAM,SAAS,CAAC;AAEnG,eAAO,MAAM,yBAAyB,qBAAqB,CAAC;AAE5D,MAAM,WAAW,YAAY;IAC3B,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAUD;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CA8ExC"}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT license.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.OPEN_PLUGIN_EXPORT_SOURCE = void 0;
|
|
6
|
+
exports.exportOpenPlugin = exportOpenPlugin;
|
|
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 path = tslib_1.__importStar(require("path"));
|
|
11
|
+
exports.OPEN_PLUGIN_EXPORT_SOURCE = "OpenPluginExport";
|
|
12
|
+
const ATK_EXTENSION_KEY = "x-microsoft-365-agents-toolkit";
|
|
13
|
+
const MANIFEST_LOCATIONS = {
|
|
14
|
+
"open-plugin": ".plugin/plugin.json",
|
|
15
|
+
"claude-plugin": ".claude-plugin/plugin.json",
|
|
16
|
+
"cursor-plugin": ".cursor-plugin/plugin.json",
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Export an ATK project (folder containing appPackage/manifest.json plus the
|
|
20
|
+
* usual agentSkills/agentConnectors layout) into an Open Plugin Spec v1.0
|
|
21
|
+
* directory. The output is structured so that `atk import openplugin --path
|
|
22
|
+
* <output>` reconstructs an equivalent ATK project; fields with no native
|
|
23
|
+
* Open Plugin equivalent are preserved verbatim under the
|
|
24
|
+
* `x-microsoft-365-agents-toolkit` extension key in plugin.json.
|
|
25
|
+
*/
|
|
26
|
+
async function exportOpenPlugin(inputs) {
|
|
27
|
+
try {
|
|
28
|
+
if (!inputs.path) {
|
|
29
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError(exports.OPEN_PLUGIN_EXPORT_SOURCE, "MissingProjectPath", "--path is required."));
|
|
30
|
+
}
|
|
31
|
+
const projectRoot = path.resolve(inputs.path);
|
|
32
|
+
const appPackageDir = path.join(projectRoot, "appPackage");
|
|
33
|
+
const manifestPath = path.join(appPackageDir, "manifest.json");
|
|
34
|
+
if (!(await fs_extra_1.default.pathExists(manifestPath))) {
|
|
35
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError(exports.OPEN_PLUGIN_EXPORT_SOURCE, "ManifestNotFound", `appPackage/manifest.json not found under ${projectRoot}.`));
|
|
36
|
+
}
|
|
37
|
+
const manifestRaw = await fs_extra_1.default.readJSON(manifestPath);
|
|
38
|
+
if (!manifestRaw || typeof manifestRaw !== "object" || Array.isArray(manifestRaw)) {
|
|
39
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError(exports.OPEN_PLUGIN_EXPORT_SOURCE, "InvalidManifest", `appPackage/manifest.json is not a JSON object: ${manifestPath}.`));
|
|
40
|
+
}
|
|
41
|
+
const manifest = manifestRaw;
|
|
42
|
+
const warnings = [];
|
|
43
|
+
const kind = inputs.manifestKind ?? "open-plugin";
|
|
44
|
+
const pluginName = derivePluginName(manifest);
|
|
45
|
+
const defaultOutput = path.join(process.cwd(), `${pluginName}-openplugin`);
|
|
46
|
+
const outputPath = path.resolve(inputs.output ?? defaultOutput);
|
|
47
|
+
if (await fs_extra_1.default.pathExists(outputPath)) {
|
|
48
|
+
const entries = await fs_extra_1.default.readdir(outputPath);
|
|
49
|
+
if (entries.length > 0) {
|
|
50
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError(exports.OPEN_PLUGIN_EXPORT_SOURCE, "OutputDirectoryNotEmpty", `Output directory is not empty: ${outputPath}. Choose a different --output path or empty the directory.`));
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
await fs_extra_1.default.ensureDir(outputPath);
|
|
54
|
+
const pluginJson = buildPluginJson(manifest, pluginName);
|
|
55
|
+
const manifestRel = MANIFEST_LOCATIONS[kind];
|
|
56
|
+
const manifestOut = path.join(outputPath, manifestRel);
|
|
57
|
+
await fs_extra_1.default.ensureDir(path.dirname(manifestOut));
|
|
58
|
+
await fs_extra_1.default.writeJSON(manifestOut, pluginJson, { spaces: 2 });
|
|
59
|
+
await writeMcpJson(outputPath, manifest, warnings);
|
|
60
|
+
await copySkills(outputPath, appPackageDir, manifest, warnings);
|
|
61
|
+
await copyCommands(outputPath, appPackageDir, warnings);
|
|
62
|
+
await copyIcons(outputPath, appPackageDir, warnings);
|
|
63
|
+
return (0, teamsfx_api_1.ok)({ outputPath, warnings });
|
|
64
|
+
}
|
|
65
|
+
catch (e) {
|
|
66
|
+
if (e instanceof teamsfx_api_1.UserError || e instanceof teamsfx_api_1.SystemError) {
|
|
67
|
+
return (0, teamsfx_api_1.err)(e);
|
|
68
|
+
}
|
|
69
|
+
const message = e instanceof Error ? e.message : String(e);
|
|
70
|
+
return (0, teamsfx_api_1.err)(new teamsfx_api_1.SystemError({
|
|
71
|
+
source: exports.OPEN_PLUGIN_EXPORT_SOURCE,
|
|
72
|
+
name: "ExportOpenPluginFailed",
|
|
73
|
+
message,
|
|
74
|
+
displayMessage: message,
|
|
75
|
+
}));
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function derivePluginName(manifest) {
|
|
79
|
+
const short = manifest.name?.short?.trim();
|
|
80
|
+
const full = manifest.name?.full?.trim();
|
|
81
|
+
const fromName = (short ?? full ?? "").toLowerCase();
|
|
82
|
+
const slug = fromName.replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
83
|
+
if (slug)
|
|
84
|
+
return slug;
|
|
85
|
+
if (manifest.packageName) {
|
|
86
|
+
const last = manifest.packageName.split(".").pop();
|
|
87
|
+
if (last)
|
|
88
|
+
return last;
|
|
89
|
+
}
|
|
90
|
+
return "exported-plugin";
|
|
91
|
+
}
|
|
92
|
+
function buildPluginJson(manifest, pluginName) {
|
|
93
|
+
const author = {};
|
|
94
|
+
if (manifest.developer?.name)
|
|
95
|
+
author.name = manifest.developer.name;
|
|
96
|
+
if (manifest.developer?.websiteUrl)
|
|
97
|
+
author.url = manifest.developer.websiteUrl;
|
|
98
|
+
const pluginJson = {
|
|
99
|
+
name: pluginName,
|
|
100
|
+
version: manifest.version ?? "1.0.0",
|
|
101
|
+
description: manifest.description?.full ?? manifest.description?.short ?? pluginName,
|
|
102
|
+
};
|
|
103
|
+
if (Object.keys(author).length > 0) {
|
|
104
|
+
pluginJson.author = author;
|
|
105
|
+
}
|
|
106
|
+
if (manifest.developer?.websiteUrl) {
|
|
107
|
+
pluginJson.homepage = manifest.developer.websiteUrl;
|
|
108
|
+
}
|
|
109
|
+
const extension = {};
|
|
110
|
+
if (manifest.manifestVersion)
|
|
111
|
+
extension.manifestVersion = manifest.manifestVersion;
|
|
112
|
+
if (manifest.id)
|
|
113
|
+
extension.id = manifest.id;
|
|
114
|
+
if (manifest.packageName)
|
|
115
|
+
extension.packageName = manifest.packageName;
|
|
116
|
+
if (manifest.accentColor)
|
|
117
|
+
extension.accentColor = manifest.accentColor;
|
|
118
|
+
if (manifest.developer) {
|
|
119
|
+
const dev = {};
|
|
120
|
+
if (manifest.developer.name)
|
|
121
|
+
dev.name = manifest.developer.name;
|
|
122
|
+
if (manifest.developer.websiteUrl)
|
|
123
|
+
dev.websiteUrl = manifest.developer.websiteUrl;
|
|
124
|
+
if (manifest.developer.privacyUrl)
|
|
125
|
+
dev.privacyUrl = manifest.developer.privacyUrl;
|
|
126
|
+
if (manifest.developer.termsOfUseUrl)
|
|
127
|
+
dev.termsOfUseUrl = manifest.developer.termsOfUseUrl;
|
|
128
|
+
if (Object.keys(dev).length > 0)
|
|
129
|
+
extension.developer = dev;
|
|
130
|
+
}
|
|
131
|
+
if (manifest.name?.short || manifest.name?.full) {
|
|
132
|
+
extension.name = {};
|
|
133
|
+
if (manifest.name.short)
|
|
134
|
+
extension.name.short = manifest.name.short;
|
|
135
|
+
if (manifest.name.full)
|
|
136
|
+
extension.name.full = manifest.name.full;
|
|
137
|
+
}
|
|
138
|
+
if (manifest.description?.short || manifest.description?.full) {
|
|
139
|
+
extension.description = {};
|
|
140
|
+
if (manifest.description.short)
|
|
141
|
+
extension.description.short = manifest.description.short;
|
|
142
|
+
if (manifest.description.full)
|
|
143
|
+
extension.description.full = manifest.description.full;
|
|
144
|
+
}
|
|
145
|
+
const connectorOverrides = {};
|
|
146
|
+
for (const connector of manifest.agentConnectors ?? []) {
|
|
147
|
+
if (!connector.id)
|
|
148
|
+
continue;
|
|
149
|
+
const override = {};
|
|
150
|
+
if (connector.displayName)
|
|
151
|
+
override.displayName = connector.displayName;
|
|
152
|
+
if (connector.description)
|
|
153
|
+
override.description = connector.description;
|
|
154
|
+
const auth = connector.toolSource?.remoteMcpServer?.authorization;
|
|
155
|
+
if (auth?.type && isAuthorizationType(auth.type)) {
|
|
156
|
+
override.authorization = { type: auth.type };
|
|
157
|
+
if (auth.referenceId)
|
|
158
|
+
override.authorization.referenceId = auth.referenceId;
|
|
159
|
+
}
|
|
160
|
+
if (Object.keys(override).length > 0) {
|
|
161
|
+
connectorOverrides[connector.id] = override;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
if (Object.keys(connectorOverrides).length > 0) {
|
|
165
|
+
extension.agentConnectors = connectorOverrides;
|
|
166
|
+
}
|
|
167
|
+
if (Object.keys(extension).length > 0) {
|
|
168
|
+
pluginJson[ATK_EXTENSION_KEY] = extension;
|
|
169
|
+
}
|
|
170
|
+
return pluginJson;
|
|
171
|
+
}
|
|
172
|
+
function isAuthorizationType(value) {
|
|
173
|
+
return value === "None" || value === "OAuthPluginVault" || value === "ApiKeyPluginVault";
|
|
174
|
+
}
|
|
175
|
+
async function writeMcpJson(outputPath, manifest, warnings) {
|
|
176
|
+
const servers = {};
|
|
177
|
+
for (const connector of manifest.agentConnectors ?? []) {
|
|
178
|
+
const remote = connector.toolSource?.remoteMcpServer;
|
|
179
|
+
const id = connector.id;
|
|
180
|
+
if (!id || !remote?.mcpServerUrl) {
|
|
181
|
+
warnings.push(`Skipping connector '${connector.id ?? "(unnamed)"}' during export: only remoteMcpServer connectors with a URL are supported.`);
|
|
182
|
+
continue;
|
|
183
|
+
}
|
|
184
|
+
servers[id] = { type: "http", url: remote.mcpServerUrl };
|
|
185
|
+
}
|
|
186
|
+
if (Object.keys(servers).length === 0) {
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
await fs_extra_1.default.writeJSON(path.join(outputPath, ".mcp.json"), { mcpServers: servers }, { spaces: 2 });
|
|
190
|
+
}
|
|
191
|
+
async function copySkills(outputPath, appPackageDir, manifest, warnings) {
|
|
192
|
+
const skillsRefs = manifest.agentSkills ?? [];
|
|
193
|
+
if (skillsRefs.length === 0) {
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
const destRoot = path.join(outputPath, "skills");
|
|
197
|
+
await fs_extra_1.default.ensureDir(destRoot);
|
|
198
|
+
for (const skill of skillsRefs) {
|
|
199
|
+
if (!skill.folder)
|
|
200
|
+
continue;
|
|
201
|
+
const rel = skill.folder.replace(/^\.\//, "");
|
|
202
|
+
const src = path.resolve(appPackageDir, rel);
|
|
203
|
+
const relativeToPackage = path.relative(appPackageDir, src);
|
|
204
|
+
if (relativeToPackage.startsWith("..") || path.isAbsolute(relativeToPackage)) {
|
|
205
|
+
warnings.push(`Skill folder '${skill.folder}' resolves outside appPackage; skipped.`);
|
|
206
|
+
continue;
|
|
207
|
+
}
|
|
208
|
+
if (!(await fs_extra_1.default.pathExists(src))) {
|
|
209
|
+
warnings.push(`Skill folder referenced by manifest not found on disk: ${skill.folder}`);
|
|
210
|
+
continue;
|
|
211
|
+
}
|
|
212
|
+
const name = path.basename(rel);
|
|
213
|
+
await fs_extra_1.default.copy(src, path.join(destRoot, name));
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
async function copyCommands(outputPath, appPackageDir, _warnings) {
|
|
217
|
+
const src = path.join(appPackageDir, "commands");
|
|
218
|
+
if (!(await fs_extra_1.default.pathExists(src)))
|
|
219
|
+
return;
|
|
220
|
+
await fs_extra_1.default.copy(src, path.join(outputPath, "commands"));
|
|
221
|
+
}
|
|
222
|
+
async function copyIcons(outputPath, appPackageDir, warnings) {
|
|
223
|
+
for (const icon of ["color.png", "outline.png"]) {
|
|
224
|
+
const src = path.join(appPackageDir, icon);
|
|
225
|
+
if (await fs_extra_1.default.pathExists(src)) {
|
|
226
|
+
await fs_extra_1.default.copy(src, path.join(outputPath, icon));
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
warnings.push(`Icon file not found in appPackage: ${icon}`);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
//# sourceMappingURL=exporter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exporter.js","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/exporter.ts"],"names":[],"mappings":";AAAA,uCAAuC;A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.png into the appPackage directory. Resolution
|
|
4
|
+
* order matches the conversion plan: user-supplied root PNG → Open Plugin
|
|
5
|
+
* `logo` (when it is a local .png) → generated placeholder.
|
|
6
|
+
*/
|
|
7
|
+
export declare function applyIcons(parsed: ParsedOpenPlugin, appPackageDir: string, warnings: string[]): Promise<void>;
|
|
8
|
+
//# sourceMappingURL=iconStrategy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iconStrategy.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/iconStrategy.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAK3C;;;;GAIG;AACH,wBAAsB,UAAU,CAC9B,MAAM,EAAE,gBAAgB,EACxB,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,EAAE,GACjB,OAAO,CAAC,IAAI,CAAC,CAoBf"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT license.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.applyIcons = applyIcons;
|
|
6
|
+
const tslib_1 = require("tslib");
|
|
7
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
8
|
+
const path = tslib_1.__importStar(require("path"));
|
|
9
|
+
const placeholderPng_1 = require("./placeholderPng");
|
|
10
|
+
const COLOR_FILL = [0x4a, 0x90, 0xd9];
|
|
11
|
+
const OUTLINE_FILL = [0xff, 0xff, 0xff];
|
|
12
|
+
/**
|
|
13
|
+
* Write color.png and outline.png into the appPackage directory. Resolution
|
|
14
|
+
* order matches the conversion plan: user-supplied root PNG → Open Plugin
|
|
15
|
+
* `logo` (when it is a local .png) → generated placeholder.
|
|
16
|
+
*/
|
|
17
|
+
async function applyIcons(parsed, appPackageDir, warnings) {
|
|
18
|
+
const colorDest = path.join(appPackageDir, "color.png");
|
|
19
|
+
const outlineDest = path.join(appPackageDir, "outline.png");
|
|
20
|
+
if (parsed.hasColorPng) {
|
|
21
|
+
await fs_extra_1.default.copy(path.join(parsed.pluginRoot, "color.png"), colorDest);
|
|
22
|
+
}
|
|
23
|
+
else if (typeof parsed.manifest.logo === "string" && parsed.manifest.logo) {
|
|
24
|
+
const applied = await tryApplyLogo(parsed, colorDest, warnings);
|
|
25
|
+
if (!applied) {
|
|
26
|
+
await fs_extra_1.default.writeFile(colorDest, (0, placeholderPng_1.generatePlaceholderPng)(192, ...COLOR_FILL));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
await fs_extra_1.default.writeFile(colorDest, (0, placeholderPng_1.generatePlaceholderPng)(192, ...COLOR_FILL));
|
|
31
|
+
}
|
|
32
|
+
if (parsed.hasOutlinePng) {
|
|
33
|
+
await fs_extra_1.default.copy(path.join(parsed.pluginRoot, "outline.png"), outlineDest);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
await fs_extra_1.default.writeFile(outlineDest, (0, placeholderPng_1.generatePlaceholderPng)(32, ...OUTLINE_FILL));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
async function tryApplyLogo(parsed, colorDest, warnings) {
|
|
40
|
+
const logo = parsed.manifest.logo;
|
|
41
|
+
if (/^https?:\/\//i.test(logo)) {
|
|
42
|
+
warnings.push(`'logo' field points to a remote URL (${logo}); using placeholder color.png. Download manually if you want to ship the original.`);
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
if (!/\.png$/i.test(logo)) {
|
|
46
|
+
warnings.push(`'logo' field '${logo}' is not a .png file; using placeholder color.png.`);
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
const logoAbs = path.resolve(parsed.pluginRoot, logo);
|
|
50
|
+
const relativeToRoot = path.relative(parsed.pluginRoot, logoAbs);
|
|
51
|
+
if (relativeToRoot.startsWith("..") || path.isAbsolute(relativeToRoot)) {
|
|
52
|
+
warnings.push(`'logo' field '${logo}' resolves outside the plugin root; using placeholder color.png.`);
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
if (!(await fs_extra_1.default.pathExists(logoAbs))) {
|
|
56
|
+
warnings.push(`'logo' field '${logo}' does not exist; using placeholder color.png.`);
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
await fs_extra_1.default.copy(logoAbs, colorDest);
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=iconStrategy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iconStrategy.js","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/iconStrategy.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAelC,gCAwBC;;AArCD,gEAA0B;AAC1B,mDAA6B;AAC7B,qDAA0D;AAG1D,MAAM,UAAU,GAA6B,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAChE,MAAM,YAAY,GAA6B,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAElE;;;;GAIG;AACI,KAAK,UAAU,UAAU,CAC9B,MAAwB,EACxB,aAAqB,EACrB,QAAkB;IAElB,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;IACxD,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;IAE5D,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;QACvB,MAAM,kBAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC,EAAE,SAAS,CAAC,CAAC;IACtE,CAAC;SAAM,IAAI,OAAO,MAAM,CAAC,QAAQ,CAAC,IAAI,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QAC5E,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IAAI,CAAC,CAAC;IACtD,MAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACjE,IAAI,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;QACvE,QAAQ,CAAC,IAAI,CACX,iBAAiB,IAAI,kEAAkE,CACxF,CAAC;QACF,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,CAAC,CAAC,MAAM,kBAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;QACpC,QAAQ,CAAC,IAAI,CAAC,iBAAiB,IAAI,gDAAgD,CAAC,CAAC;QACrF,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,kBAAE,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAClC,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FxError, Result } from "@microsoft/teamsfx-api";
|
|
2
|
+
import { ImportInputs } from "./types";
|
|
3
|
+
export declare const OPEN_PLUGIN_IMPORT_SOURCE = "OpenPluginImport";
|
|
4
|
+
export interface ImportResult {
|
|
5
|
+
projectPath: string;
|
|
6
|
+
warnings: string[];
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Import an Open Plugin / Claude Code plugin / Cursor plugin directory into
|
|
10
|
+
* a scaffolded Microsoft 365 Agents Toolkit project. The output is a usable
|
|
11
|
+
* ATK project; run `atk teamsapp package` from inside it to produce the
|
|
12
|
+
* upload zip.
|
|
13
|
+
*
|
|
14
|
+
* Static baseline files (m365agents.yml, README, .gitignore, .vscode, env)
|
|
15
|
+
* come from the `open-plugin-import` template, which ships in the standard
|
|
16
|
+
* template release pipeline and can be updated independently of fx-core.
|
|
17
|
+
* Variable-length outputs (manifest, skill folders, icons) are written as
|
|
18
|
+
* the post-scaffold step here.
|
|
19
|
+
*/
|
|
20
|
+
export declare function importOpenPlugin(inputs: ImportInputs): Promise<Result<ImportResult, FxError>>;
|
|
21
|
+
export declare function stripDisallowedFrontmatter(source: string): {
|
|
22
|
+
content: string;
|
|
23
|
+
removedKeys: string[];
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=importer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"importer.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/openPlugin/importer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAO,OAAO,EAAM,MAAM,EAA0B,MAAM,wBAAwB,CAAC;AAU1F,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,eAAO,MAAM,yBAAyB,qBAAqB,CAAC;AAE5D,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAuExC;AAqCD,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG;IAC1D,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAsBA"}
|