@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.
Files changed (297) hide show
  1. package/build/client/teamsGraphClient.d.ts +3 -0
  2. package/build/client/teamsGraphClient.d.ts.map +1 -1
  3. package/build/client/teamsGraphClient.js +17 -0
  4. package/build/client/teamsGraphClient.js.map +1 -1
  5. package/build/common/featureFlags.d.ts +12 -2
  6. package/build/common/featureFlags.d.ts.map +1 -1
  7. package/build/common/featureFlags.js +15 -3
  8. package/build/common/featureFlags.js.map +1 -1
  9. package/build/common/projectSettingsHelper.d.ts +0 -2
  10. package/build/common/projectSettingsHelper.d.ts.map +1 -1
  11. package/build/common/projectSettingsHelper.js +1 -56
  12. package/build/common/projectSettingsHelper.js.map +1 -1
  13. package/build/common/telemetry.d.ts +4 -15
  14. package/build/common/telemetry.d.ts.map +1 -1
  15. package/build/common/telemetry.js +5 -18
  16. package/build/common/telemetry.js.map +1 -1
  17. package/build/common/templates-config.json +8 -2
  18. package/build/component/configManager/validator.d.ts.map +1 -1
  19. package/build/component/configManager/validator.js +2 -0
  20. package/build/component/configManager/validator.js.map +1 -1
  21. package/build/component/coordinator/index.d.ts.map +1 -1
  22. package/build/component/coordinator/index.js +5 -1
  23. package/build/component/coordinator/index.js.map +1 -1
  24. package/build/component/driver/copilotAgent/interfaces/PublishArgs.d.ts +14 -0
  25. package/build/component/driver/copilotAgent/interfaces/PublishArgs.d.ts.map +1 -0
  26. package/build/component/driver/copilotAgent/interfaces/PublishArgs.js +5 -0
  27. package/build/component/driver/copilotAgent/interfaces/PublishArgs.js.map +1 -0
  28. package/build/component/driver/copilotAgent/publish.d.ts +16 -0
  29. package/build/component/driver/copilotAgent/publish.d.ts.map +1 -0
  30. package/build/component/driver/copilotAgent/publish.js +175 -0
  31. package/build/component/driver/copilotAgent/publish.js.map +1 -0
  32. package/build/component/driver/dcr/create.d.ts +10 -0
  33. package/build/component/driver/dcr/create.d.ts.map +1 -0
  34. package/build/component/driver/dcr/create.js +142 -0
  35. package/build/component/driver/dcr/create.js.map +1 -0
  36. package/build/component/driver/dcr/error/dcrNameTooLong.d.ts +5 -0
  37. package/build/component/driver/dcr/error/dcrNameTooLong.d.ts.map +1 -0
  38. package/build/component/driver/dcr/error/dcrNameTooLong.js +21 -0
  39. package/build/component/driver/dcr/error/dcrNameTooLong.js.map +1 -0
  40. package/build/component/driver/dcr/error/dcrWellKnownInvalid.d.ts +5 -0
  41. package/build/component/driver/dcr/error/dcrWellKnownInvalid.d.ts.map +1 -0
  42. package/build/component/driver/dcr/error/dcrWellKnownInvalid.js +21 -0
  43. package/build/component/driver/dcr/error/dcrWellKnownInvalid.js.map +1 -0
  44. package/build/component/driver/dcr/interface/createDcrArgs.d.ts +9 -0
  45. package/build/component/driver/dcr/interface/createDcrArgs.d.ts.map +1 -0
  46. package/build/component/driver/dcr/interface/createDcrArgs.js +5 -0
  47. package/build/component/driver/dcr/interface/createDcrArgs.js.map +1 -0
  48. package/build/component/driver/dcr/interface/createDcrOutputs.d.ts +7 -0
  49. package/build/component/driver/dcr/interface/createDcrOutputs.d.ts.map +1 -0
  50. package/build/component/driver/dcr/interface/createDcrOutputs.js +10 -0
  51. package/build/component/driver/dcr/interface/createDcrOutputs.js.map +1 -0
  52. package/build/component/driver/dcr/utility/constants.d.ts +7 -0
  53. package/build/component/driver/dcr/utility/constants.d.ts.map +1 -0
  54. package/build/component/driver/dcr/utility/constants.js +12 -0
  55. package/build/component/driver/dcr/utility/constants.js.map +1 -0
  56. package/build/component/driver/index.d.ts +2 -0
  57. package/build/component/driver/index.d.ts.map +1 -1
  58. package/build/component/driver/index.js +2 -0
  59. package/build/component/driver/index.js.map +1 -1
  60. package/build/component/driver/teamsApp/constants.d.ts +1 -0
  61. package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
  62. package/build/component/driver/teamsApp/constants.js +1 -0
  63. package/build/component/driver/teamsApp/constants.js.map +1 -1
  64. package/build/component/driver/teamsApp/createAppPackage.d.ts +2 -0
  65. package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
  66. package/build/component/driver/teamsApp/createAppPackage.js +51 -6
  67. package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
  68. package/build/component/driver/teamsApp/interfaces/DcrRegistration.d.ts +10 -0
  69. package/build/component/driver/teamsApp/interfaces/DcrRegistration.d.ts.map +1 -0
  70. package/build/component/driver/teamsApp/interfaces/DcrRegistration.js +5 -0
  71. package/build/component/driver/teamsApp/interfaces/DcrRegistration.js.map +1 -0
  72. package/build/component/driver/teamsApp/publishAppPackage.d.ts +0 -2
  73. package/build/component/driver/teamsApp/publishAppPackage.d.ts.map +1 -1
  74. package/build/component/driver/teamsApp/publishAppPackage.js +2 -51
  75. package/build/component/driver/teamsApp/publishAppPackage.js.map +1 -1
  76. package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts +1 -1
  77. package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts.map +1 -1
  78. package/build/component/driver/teamsApp/utils/ManifestUtils.js +10 -2
  79. package/build/component/driver/teamsApp/utils/ManifestUtils.js.map +1 -1
  80. package/build/component/driver/teamsApp/utils/McpCertVerification.d.ts +13 -0
  81. package/build/component/driver/teamsApp/utils/McpCertVerification.d.ts.map +1 -0
  82. package/build/component/driver/teamsApp/utils/McpCertVerification.js +65 -0
  83. package/build/component/driver/teamsApp/utils/McpCertVerification.js.map +1 -0
  84. package/build/component/driver/teamsApp/validate.js +1 -1
  85. package/build/component/driver/teamsApp/validate.js.map +1 -1
  86. package/build/component/generator/declarativeAgent/generator.d.ts.map +1 -1
  87. package/build/component/generator/declarativeAgent/generator.js +1 -2
  88. package/build/component/generator/declarativeAgent/generator.js.map +1 -1
  89. package/build/component/generator/defaultGenerator.d.ts.map +1 -1
  90. package/build/component/generator/defaultGenerator.js +14 -1
  91. package/build/component/generator/defaultGenerator.js.map +1 -1
  92. package/build/component/generator/error.d.ts +3 -0
  93. package/build/component/generator/error.d.ts.map +1 -1
  94. package/build/component/generator/error.js +7 -1
  95. package/build/component/generator/error.js.map +1 -1
  96. package/build/component/generator/officeAddin/generator.d.ts +8 -0
  97. package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
  98. package/build/component/generator/officeAddin/generator.js +47 -0
  99. package/build/component/generator/officeAddin/generator.js.map +1 -1
  100. package/build/component/generator/openPlugin/authorParser.d.ts +8 -0
  101. package/build/component/generator/openPlugin/authorParser.d.ts.map +1 -0
  102. package/build/component/generator/openPlugin/authorParser.js +49 -0
  103. package/build/component/generator/openPlugin/authorParser.js.map +1 -0
  104. package/build/component/generator/openPlugin/deterministicId.d.ts +6 -0
  105. package/build/component/generator/openPlugin/deterministicId.d.ts.map +1 -0
  106. package/build/component/generator/openPlugin/deterministicId.js +31 -0
  107. package/build/component/generator/openPlugin/deterministicId.js.map +1 -0
  108. package/build/component/generator/openPlugin/exporter.d.ts +18 -0
  109. package/build/component/generator/openPlugin/exporter.d.ts.map +1 -0
  110. package/build/component/generator/openPlugin/exporter.js +233 -0
  111. package/build/component/generator/openPlugin/exporter.js.map +1 -0
  112. package/build/component/generator/openPlugin/iconStrategy.d.ts +8 -0
  113. package/build/component/generator/openPlugin/iconStrategy.d.ts.map +1 -0
  114. package/build/component/generator/openPlugin/iconStrategy.js +62 -0
  115. package/build/component/generator/openPlugin/iconStrategy.js.map +1 -0
  116. package/build/component/generator/openPlugin/importer.d.ts +25 -0
  117. package/build/component/generator/openPlugin/importer.d.ts.map +1 -0
  118. package/build/component/generator/openPlugin/importer.js +140 -0
  119. package/build/component/generator/openPlugin/importer.js.map +1 -0
  120. package/build/component/generator/openPlugin/mapper.d.ts +6 -0
  121. package/build/component/generator/openPlugin/mapper.d.ts.map +1 -0
  122. package/build/component/generator/openPlugin/mapper.js +141 -0
  123. package/build/component/generator/openPlugin/mapper.js.map +1 -0
  124. package/build/component/generator/openPlugin/parser.d.ts +3 -0
  125. package/build/component/generator/openPlugin/parser.d.ts.map +1 -0
  126. package/build/component/generator/openPlugin/parser.js +153 -0
  127. package/build/component/generator/openPlugin/parser.js.map +1 -0
  128. package/build/component/generator/openPlugin/placeholderPng.d.ts +6 -0
  129. package/build/component/generator/openPlugin/placeholderPng.d.ts.map +1 -0
  130. package/build/component/generator/openPlugin/placeholderPng.js +71 -0
  131. package/build/component/generator/openPlugin/placeholderPng.js.map +1 -0
  132. package/build/component/generator/openPlugin/textUtils.d.ts +12 -0
  133. package/build/component/generator/openPlugin/textUtils.d.ts.map +1 -0
  134. package/build/component/generator/openPlugin/textUtils.js +43 -0
  135. package/build/component/generator/openPlugin/textUtils.js.map +1 -0
  136. package/build/component/generator/openPlugin/types.d.ts +128 -0
  137. package/build/component/generator/openPlugin/types.d.ts.map +1 -0
  138. package/build/component/generator/openPlugin/types.js.map +1 -0
  139. package/build/component/generator/templates/templateNames.d.ts +2 -1
  140. package/build/component/generator/templates/templateNames.d.ts.map +1 -1
  141. package/build/component/generator/templates/templateNames.js +2 -0
  142. package/build/component/generator/templates/templateNames.js.map +1 -1
  143. package/build/component/generator/templates/templateReplaceMap.d.ts.map +1 -1
  144. package/build/component/generator/templates/templateReplaceMap.js +4 -1
  145. package/build/component/generator/templates/templateReplaceMap.js.map +1 -1
  146. package/build/component/generator/v4TemplateBridge.d.ts +29 -0
  147. package/build/component/generator/v4TemplateBridge.d.ts.map +1 -0
  148. package/build/component/generator/v4TemplateBridge.js +114 -0
  149. package/build/component/generator/v4TemplateBridge.js.map +1 -0
  150. package/build/component/m365/packageService.d.ts +5 -0
  151. package/build/component/m365/packageService.d.ts.map +1 -1
  152. package/build/component/m365/packageService.js +23 -1
  153. package/build/component/m365/packageService.js.map +1 -1
  154. package/build/core/FxCore.d.ts +2 -4
  155. package/build/core/FxCore.d.ts.map +1 -1
  156. package/build/core/FxCore.js +3 -62
  157. package/build/core/FxCore.js.map +1 -1
  158. package/build/core/FxCore.openPlugin.d.ts +23 -0
  159. package/build/core/FxCore.openPlugin.d.ts.map +1 -0
  160. package/build/core/FxCore.openPlugin.js +131 -0
  161. package/build/core/FxCore.openPlugin.js.map +1 -0
  162. package/build/core/middleware/concurrentLocker.d.ts.map +1 -1
  163. package/build/core/middleware/concurrentLocker.js +0 -3
  164. package/build/core/middleware/concurrentLocker.js.map +1 -1
  165. package/build/core/middleware/errorHandler.d.ts.map +1 -1
  166. package/build/core/middleware/errorHandler.js +9 -0
  167. package/build/core/middleware/errorHandler.js.map +1 -1
  168. package/build/core/middleware/utils/v3MigrationUtils.d.ts +1 -34
  169. package/build/core/middleware/utils/v3MigrationUtils.d.ts.map +1 -1
  170. package/build/core/middleware/utils/v3MigrationUtils.js +6 -245
  171. package/build/core/middleware/utils/v3MigrationUtils.js.map +1 -1
  172. package/build/question/constants.d.ts.map +1 -1
  173. package/build/question/constants.js +1 -6
  174. package/build/question/constants.js.map +1 -1
  175. package/build/question/inputs/ExportOpenPluginInputs.d.ts +10 -0
  176. package/build/question/inputs/ExportOpenPluginInputs.d.ts.map +1 -0
  177. package/build/question/inputs/ExportOpenPluginInputs.js +5 -0
  178. package/build/question/inputs/ExportOpenPluginInputs.js.map +1 -0
  179. package/build/question/inputs/ImportOpenPluginInputs.d.ts +28 -0
  180. package/build/question/inputs/ImportOpenPluginInputs.d.ts.map +1 -0
  181. package/build/question/inputs/ImportOpenPluginInputs.js +5 -0
  182. package/build/question/inputs/ImportOpenPluginInputs.js.map +1 -0
  183. package/build/question/inputs/index.d.ts +2 -0
  184. package/build/question/inputs/index.d.ts.map +1 -1
  185. package/build/question/inputs/index.js +2 -0
  186. package/build/question/inputs/index.js.map +1 -1
  187. package/build/question/options/ExportOpenPluginOptions.d.ts +4 -0
  188. package/build/question/options/ExportOpenPluginOptions.d.ts.map +1 -0
  189. package/build/question/options/ExportOpenPluginOptions.js +29 -0
  190. package/build/question/options/ExportOpenPluginOptions.js.map +1 -0
  191. package/build/question/options/ImportOpenPluginOptions.d.ts +4 -0
  192. package/build/question/options/ImportOpenPluginOptions.d.ts.map +1 -0
  193. package/build/question/options/ImportOpenPluginOptions.js +54 -0
  194. package/build/question/options/ImportOpenPluginOptions.js.map +1 -0
  195. package/build/question/options/index.d.ts +2 -0
  196. package/build/question/options/index.d.ts.map +1 -1
  197. package/build/question/options/index.js +2 -0
  198. package/build/question/options/index.js.map +1 -1
  199. package/build/question/scaffold/vsc/daProjectTypeNode.d.ts.map +1 -1
  200. package/build/question/scaffold/vsc/daProjectTypeNode.js +1 -3
  201. package/build/question/scaffold/vsc/daProjectTypeNode.js.map +1 -1
  202. package/build/v4/distribution/bundledFloor.d.ts +12 -0
  203. package/build/v4/distribution/bundledFloor.d.ts.map +1 -0
  204. package/build/v4/distribution/bundledFloor.js +80 -0
  205. package/build/v4/distribution/bundledFloor.js.map +1 -0
  206. package/build/v4/distribution/templateConfig.d.ts +53 -0
  207. package/build/v4/distribution/templateConfig.d.ts.map +1 -0
  208. package/build/v4/distribution/templateConfig.js +43 -0
  209. package/build/v4/distribution/templateConfig.js.map +1 -0
  210. package/build/v4/distribution/templatePackage.d.ts +29 -0
  211. package/build/v4/distribution/templatePackage.d.ts.map +1 -0
  212. package/build/v4/distribution/templatePackage.js +82 -0
  213. package/build/v4/distribution/templatePackage.js.map +1 -0
  214. package/build/v4/distribution/templateSource.d.ts +67 -0
  215. package/build/v4/distribution/templateSource.d.ts.map +1 -0
  216. package/build/v4/distribution/templateSource.js +220 -0
  217. package/build/v4/distribution/templateSource.js.map +1 -0
  218. package/build/v4/distribution/templateSourcePort.d.ts +50 -0
  219. package/build/v4/distribution/templateSourcePort.d.ts.map +1 -0
  220. package/build/v4/distribution/templateSourcePort.js +207 -0
  221. package/build/v4/distribution/templateSourcePort.js.map +1 -0
  222. package/build/v4/index.d.ts +13 -0
  223. package/build/v4/index.d.ts.map +1 -0
  224. package/build/v4/index.js +18 -0
  225. package/build/v4/index.js.map +1 -0
  226. package/package.json +4 -4
  227. package/resource/package.nls.cs.json +9 -1
  228. package/resource/package.nls.de.json +10 -2
  229. package/resource/package.nls.es.json +9 -1
  230. package/resource/package.nls.fr.json +9 -1
  231. package/resource/package.nls.it.json +10 -2
  232. package/resource/package.nls.ja.json +9 -1
  233. package/resource/package.nls.json +10 -13
  234. package/resource/package.nls.ko.json +9 -1
  235. package/resource/package.nls.pl.json +10 -2
  236. package/resource/package.nls.pt-BR.json +9 -1
  237. package/resource/package.nls.ru.json +10 -2
  238. package/resource/package.nls.tr.json +11 -3
  239. package/resource/package.nls.zh-Hans.json +9 -1
  240. package/resource/package.nls.zh-Hant.json +9 -1
  241. package/resource/yaml-schema/v1.12/yaml.schema.json +2132 -0
  242. package/resource/yaml-schema/v1.13/yaml.schema.json +2193 -0
  243. package/resource/yaml-schema/yaml.schema.json +124 -2
  244. package/templates/fallback/common.zip +0 -0
  245. package/templates/fallback/csharp.zip +0 -0
  246. package/templates/fallback/js.zip +0 -0
  247. package/templates/fallback/python.zip +0 -0
  248. package/templates/fallback/ts.zip +0 -0
  249. package/templates/metadata.zip +0 -0
  250. package/templates/ui/tdpNode.json +1 -2
  251. package/templates/ui/wizardNode.json +1 -2
  252. package/templates/v4/floor.json +3 -0
  253. package/templates/v4/templates.zip +0 -0
  254. package/build/core/middleware/projectMigratorV3.d.ts +0 -39
  255. package/build/core/middleware/projectMigratorV3.d.ts.map +0 -1
  256. package/build/core/middleware/projectMigratorV3.js +0 -694
  257. package/build/core/middleware/projectMigratorV3.js.map +0 -1
  258. package/build/core/middleware/projectVersionChecker.d.ts +0 -3
  259. package/build/core/middleware/projectVersionChecker.d.ts.map +0 -1
  260. package/build/core/middleware/projectVersionChecker.js +0 -60
  261. package/build/core/middleware/projectVersionChecker.js.map +0 -1
  262. package/build/core/middleware/types.d.ts +0 -9
  263. package/build/core/middleware/types.d.ts.map +0 -1
  264. package/build/core/middleware/types.js.map +0 -1
  265. package/build/core/middleware/utils/MigrationUtils.d.ts +0 -13
  266. package/build/core/middleware/utils/MigrationUtils.d.ts.map +0 -1
  267. package/build/core/middleware/utils/MigrationUtils.js +0 -212
  268. package/build/core/middleware/utils/MigrationUtils.js.map +0 -1
  269. package/build/core/middleware/utils/appYmlGenerator.d.ts +0 -34
  270. package/build/core/middleware/utils/appYmlGenerator.d.ts.map +0 -1
  271. package/build/core/middleware/utils/appYmlGenerator.js +0 -158
  272. package/build/core/middleware/utils/appYmlGenerator.js.map +0 -1
  273. package/build/core/middleware/utils/debug/appLocalYmlGenerator.d.ts +0 -65
  274. package/build/core/middleware/utils/debug/appLocalYmlGenerator.d.ts.map +0 -1
  275. package/build/core/middleware/utils/debug/appLocalYmlGenerator.js +0 -61
  276. package/build/core/middleware/utils/debug/appLocalYmlGenerator.js.map +0 -1
  277. package/build/core/middleware/utils/debug/constants.d.ts +0 -20
  278. package/build/core/middleware/utils/debug/constants.d.ts.map +0 -1
  279. package/build/core/middleware/utils/debug/constants.js +0 -28
  280. package/build/core/middleware/utils/debug/constants.js.map +0 -1
  281. package/build/core/middleware/utils/debug/debugMigrationContext.d.ts +0 -14
  282. package/build/core/middleware/utils/debug/debugMigrationContext.d.ts.map +0 -1
  283. package/build/core/middleware/utils/debug/debugMigrationContext.js +0 -23
  284. package/build/core/middleware/utils/debug/debugMigrationContext.js.map +0 -1
  285. package/build/core/middleware/utils/debug/debugV3MigrationUtils.d.ts +0 -37
  286. package/build/core/middleware/utils/debug/debugV3MigrationUtils.d.ts.map +0 -1
  287. package/build/core/middleware/utils/debug/debugV3MigrationUtils.js +0 -291
  288. package/build/core/middleware/utils/debug/debugV3MigrationUtils.js.map +0 -1
  289. package/build/core/middleware/utils/debug/taskMigrator.d.ts +0 -22
  290. package/build/core/middleware/utils/debug/taskMigrator.d.ts.map +0 -1
  291. package/build/core/middleware/utils/debug/taskMigrator.js +0 -935
  292. package/build/core/middleware/utils/debug/taskMigrator.js.map +0 -1
  293. package/build/core/middleware/utils/migrationContext.d.ts +0 -32
  294. package/build/core/middleware/utils/migrationContext.d.ts.map +0 -1
  295. package/build/core/middleware/utils/migrationContext.js +0 -104
  296. package/build/core/middleware/utils/migrationContext.js.map +0 -1
  297. /package/build/{core/middleware → component/generator/openPlugin}/types.js +0 -0
@@ -1,6 +1,8 @@
1
1
  export * from "./AddAuthActionInputs";
2
2
  export * from "./AddKnowledgeInputs";
3
3
  export * from "./AddPluginInputs";
4
+ export * from "./ImportOpenPluginInputs";
5
+ export * from "./ExportOpenPluginInputs";
4
6
  export * from "./CreateEnvInputs";
5
7
  export * from "./CreateProjectInputs";
6
8
  export * from "./CreateSampleProjectInputs";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/question/inputs/index.ts"],"names":[],"mappings":"AAEA,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/question/inputs/index.ts"],"names":[],"mappings":"AAEA,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC"}
@@ -6,6 +6,8 @@ const tslib_1 = require("tslib");
6
6
  tslib_1.__exportStar(require("./AddAuthActionInputs"), exports);
7
7
  tslib_1.__exportStar(require("./AddKnowledgeInputs"), exports);
8
8
  tslib_1.__exportStar(require("./AddPluginInputs"), exports);
9
+ tslib_1.__exportStar(require("./ImportOpenPluginInputs"), exports);
10
+ tslib_1.__exportStar(require("./ExportOpenPluginInputs"), exports);
9
11
  tslib_1.__exportStar(require("./CreateEnvInputs"), exports);
10
12
  tslib_1.__exportStar(require("./CreateProjectInputs"), exports);
11
13
  tslib_1.__exportStar(require("./CreateSampleProjectInputs"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/question/inputs/index.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,gEAAsC;AACtC,+DAAqC;AACrC,4DAAkC;AAClC,4DAAkC;AAClC,gEAAsC;AACtC,sEAA4C;AAC5C,oEAA0C;AAC1C,kEAAwC;AACxC,iEAAuC;AACvC,kEAAwC;AACxC,mEAAyC;AACzC,sEAA4C;AAC5C,sEAA4C;AAC5C,wDAA8B;AAC9B,iEAAuC;AACvC,+DAAqC;AACrC,4DAAkC;AAClC,mEAAyC;AACzC,qEAA2C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/question/inputs/index.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,gEAAsC;AACtC,+DAAqC;AACrC,4DAAkC;AAClC,mEAAyC;AACzC,mEAAyC;AACzC,4DAAkC;AAClC,gEAAsC;AACtC,sEAA4C;AAC5C,oEAA0C;AAC1C,kEAAwC;AACxC,iEAAuC;AACvC,kEAAwC;AACxC,mEAAyC;AACzC,sEAA4C;AAC5C,sEAA4C;AAC5C,wDAA8B;AAC9B,iEAAuC;AACvC,+DAAqC;AACrC,4DAAkC;AAClC,mEAAyC;AACzC,qEAA2C"}
@@ -0,0 +1,4 @@
1
+ import { CLICommandArgument, CLICommandOption } from "@microsoft/teamsfx-api";
2
+ export declare const ExportOpenPluginOptions: CLICommandOption[];
3
+ export declare const ExportOpenPluginArguments: CLICommandArgument[];
4
+ //# sourceMappingURL=ExportOpenPluginOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExportOpenPluginOptions.d.ts","sourceRoot":"","sources":["../../../src/question/options/ExportOpenPluginOptions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE9E,eAAO,MAAM,uBAAuB,EAAE,gBAAgB,EAuBrD,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,kBAAkB,EAAO,CAAC"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT license.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.ExportOpenPluginArguments = exports.ExportOpenPluginOptions = void 0;
6
+ exports.ExportOpenPluginOptions = [
7
+ {
8
+ name: "path",
9
+ type: "string",
10
+ shortName: "p",
11
+ description: "Path to the ATK project folder (containing appPackage/manifest.json) to export.",
12
+ required: true,
13
+ },
14
+ {
15
+ name: "output",
16
+ type: "string",
17
+ shortName: "o",
18
+ description: "Destination Open Plugin directory. Defaults to ./<plugin-name>-openplugin in the current working directory.",
19
+ },
20
+ {
21
+ name: "manifest-kind",
22
+ type: "string",
23
+ description: "Where to write plugin.json: 'open-plugin' (.plugin/plugin.json, default), 'claude-plugin' (.claude-plugin/plugin.json), or 'cursor-plugin' (.cursor-plugin/plugin.json).",
24
+ default: "open-plugin",
25
+ choices: ["open-plugin", "claude-plugin", "cursor-plugin"],
26
+ },
27
+ ];
28
+ exports.ExportOpenPluginArguments = [];
29
+ //# sourceMappingURL=ExportOpenPluginOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExportOpenPluginOptions.js","sourceRoot":"","sources":["../../../src/question/options/ExportOpenPluginOptions.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAIrB,QAAA,uBAAuB,GAAuB;IACzD;QACE,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,GAAG;QACd,WAAW,EAAE,iFAAiF;QAC9F,QAAQ,EAAE,IAAI;KACf;IACD;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,GAAG;QACd,WAAW,EACT,6GAA6G;KAChH;IACD;QACE,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,QAAQ;QACd,WAAW,EACT,0KAA0K;QAC5K,OAAO,EAAE,aAAa;QACtB,OAAO,EAAE,CAAC,aAAa,EAAE,eAAe,EAAE,eAAe,CAAC;KAC3D;CACF,CAAC;AAEW,QAAA,yBAAyB,GAAyB,EAAE,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { CLICommandArgument, CLICommandOption } from "@microsoft/teamsfx-api";
2
+ export declare const ImportOpenPluginOptions: CLICommandOption[];
3
+ export declare const ImportOpenPluginArguments: CLICommandArgument[];
4
+ //# sourceMappingURL=ImportOpenPluginOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImportOpenPluginOptions.d.ts","sourceRoot":"","sources":["../../../src/question/options/ImportOpenPluginOptions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE9E,eAAO,MAAM,uBAAuB,EAAE,gBAAgB,EAoDrD,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,kBAAkB,EAAO,CAAC"}
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT license.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.ImportOpenPluginArguments = exports.ImportOpenPluginOptions = void 0;
6
+ exports.ImportOpenPluginOptions = [
7
+ {
8
+ name: "path",
9
+ type: "string",
10
+ shortName: "p",
11
+ description: "Open Plugin directory containing .plugin/plugin.json, .claude-plugin/plugin.json, or .cursor-plugin/plugin.json.",
12
+ required: true,
13
+ },
14
+ {
15
+ name: "output",
16
+ type: "string",
17
+ shortName: "o",
18
+ description: "Destination project folder. Defaults to ./<plugin-name>.",
19
+ },
20
+ {
21
+ name: "privacy-url",
22
+ type: "string",
23
+ description: "developer.privacyUrl for the generated manifest. Required unless the source plugin.json carries an x-microsoft-365-agents-toolkit extension block from a previous 'atk export openplugin'.",
24
+ },
25
+ {
26
+ name: "terms-url",
27
+ type: "string",
28
+ description: "developer.termsOfUseUrl for the generated manifest. Required unless the source plugin.json carries an x-microsoft-365-agents-toolkit extension block from a previous 'atk export openplugin'.",
29
+ },
30
+ {
31
+ name: "website-url",
32
+ type: "string",
33
+ description: "developer.websiteUrl. Falls back to plugin.json 'homepage' then 'author.url' when omitted.",
34
+ },
35
+ {
36
+ name: "app-id",
37
+ type: "string",
38
+ description: "Override the deterministic UUIDv5 generated for the manifest 'id' field.",
39
+ },
40
+ {
41
+ name: "default-auth-type",
42
+ type: "string",
43
+ description: "Default auth type for MCP connectors discovered in .mcp.json. 'Auto' picks OAuthPluginVault for non-localhost HTTPS, None otherwise.",
44
+ default: "Auto",
45
+ choices: ["Auto", "None", "OAuthPluginVault", "ApiKeyPluginVault"],
46
+ },
47
+ {
48
+ name: "package-name",
49
+ type: "string",
50
+ description: "Full reverse-DNS packageName (e.g. com.example.my-plugin). Omitted from the manifest when not provided.",
51
+ },
52
+ ];
53
+ exports.ImportOpenPluginArguments = [];
54
+ //# sourceMappingURL=ImportOpenPluginOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImportOpenPluginOptions.js","sourceRoot":"","sources":["../../../src/question/options/ImportOpenPluginOptions.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAIrB,QAAA,uBAAuB,GAAuB;IACzD;QACE,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,GAAG;QACd,WAAW,EACT,kHAAkH;QACpH,QAAQ,EAAE,IAAI;KACf;IACD;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,GAAG;QACd,WAAW,EAAE,0DAA0D;KACxE;IACD;QACE,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,QAAQ;QACd,WAAW,EACT,4LAA4L;KAC/L;IACD;QACE,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,WAAW,EACT,+LAA+L;KAClM;IACD;QACE,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,QAAQ;QACd,WAAW,EACT,4FAA4F;KAC/F;IACD;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,0EAA0E;KACxF;IACD;QACE,IAAI,EAAE,mBAAmB;QACzB,IAAI,EAAE,QAAQ;QACd,WAAW,EACT,sIAAsI;QACxI,OAAO,EAAE,MAAM;QACf,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,kBAAkB,EAAE,mBAAmB,CAAC;KACnE;IACD;QACE,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,QAAQ;QACd,WAAW,EACT,yGAAyG;KAC5G;CACF,CAAC;AAEW,QAAA,yBAAyB,GAAyB,EAAE,CAAC"}
@@ -9,6 +9,8 @@ export * from "./PermissionGrantOptions";
9
9
  export * from "./PermissionListOptions";
10
10
  export * from "./DeployAadManifestOptions";
11
11
  export * from "./AddPluginOptions";
12
+ export * from "./ImportOpenPluginOptions";
13
+ export * from "./ExportOpenPluginOptions";
12
14
  export * from "./UninstallOptions";
13
15
  export * from "./SyncManifestOptions";
14
16
  export * from "./AddAuthActionOptions";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/question/options/index.ts"],"names":[],"mappings":"AAEA,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/question/options/index.ts"],"names":[],"mappings":"AAEA,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC"}
@@ -14,6 +14,8 @@ tslib_1.__exportStar(require("./PermissionGrantOptions"), exports);
14
14
  tslib_1.__exportStar(require("./PermissionListOptions"), exports);
15
15
  tslib_1.__exportStar(require("./DeployAadManifestOptions"), exports);
16
16
  tslib_1.__exportStar(require("./AddPluginOptions"), exports);
17
+ tslib_1.__exportStar(require("./ImportOpenPluginOptions"), exports);
18
+ tslib_1.__exportStar(require("./ExportOpenPluginOptions"), exports);
17
19
  tslib_1.__exportStar(require("./UninstallOptions"), exports);
18
20
  tslib_1.__exportStar(require("./SyncManifestOptions"), exports);
19
21
  tslib_1.__exportStar(require("./AddAuthActionOptions"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/question/options/index.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,iEAAuC;AACvC,uEAA6C;AAC7C,kEAAwC;AACxC,6DAAmC;AACnC,uEAA6C;AAC7C,oEAA0C;AAC1C,mEAAyC;AACzC,mEAAyC;AACzC,kEAAwC;AACxC,qEAA2C;AAC3C,6DAAmC;AACnC,6DAAmC;AACnC,gEAAsC;AACtC,iEAAuC;AACvC,gEAAsC;AACtC,uEAA6C;AAC7C,yDAA+B;AAC/B,sEAA4C;AAC5C,oEAA0C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/question/options/index.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,iEAAuC;AACvC,uEAA6C;AAC7C,kEAAwC;AACxC,6DAAmC;AACnC,uEAA6C;AAC7C,oEAA0C;AAC1C,mEAAyC;AACzC,mEAAyC;AACzC,kEAAwC;AACxC,qEAA2C;AAC3C,6DAAmC;AACnC,oEAA0C;AAC1C,oEAA0C;AAC1C,6DAAmC;AACnC,gEAAsC;AACtC,iEAAuC;AACvC,gEAAsC;AACtC,uEAA6C;AAC7C,yDAA+B;AAC/B,sEAA4C;AAC5C,oEAA0C"}
@@ -1 +1 @@
1
- {"version":3,"file":"daProjectTypeNode.d.ts","sourceRoot":"","sources":["../../../../src/question/scaffold/vsc/daProjectTypeNode.ts"],"names":[],"mappings":"AAGA,OAAO,EAAU,UAAU,EAAc,MAAM,wBAAwB,CAAC;AAgBxE,wBAAgB,iBAAiB,CAC/B,WAAW,SAA0C,GACpD,UAAU,CA4FZ"}
1
+ {"version":3,"file":"daProjectTypeNode.d.ts","sourceRoot":"","sources":["../../../../src/question/scaffold/vsc/daProjectTypeNode.ts"],"names":[],"mappings":"AAGA,OAAO,EAAU,UAAU,EAAc,MAAM,wBAAwB,CAAC;AAgBxE,wBAAgB,iBAAiB,CAC/B,WAAW,SAA0C,GACpD,UAAU,CA0FZ"}
@@ -51,9 +51,7 @@ function daProjectTypeNode(parentValue = ProjectTypeOptions_1.ProjectTypeOptions
51
51
  ...(featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.DAMetaOS)
52
52
  ? [CapabilityOptions_1.ActionStartOptions.DAMetaOS()]
53
53
  : []),
54
- ...(featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.MCPForDA)
55
- ? [CapabilityOptions_1.ActionStartOptions.mcp()]
56
- : []),
54
+ CapabilityOptions_1.ActionStartOptions.mcp(),
57
55
  ],
58
56
  default: CapabilityOptions_1.ActionStartOptions.newApi().id,
59
57
  onDidSelection: CapabilityOptions_1.setTemplateName,
@@ -1 +1 @@
1
- {"version":3,"file":"daProjectTypeNode.js","sourceRoot":"","sources":["../../../../src/question/scaffold/vsc/daProjectTypeNode.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAkBlC,8CA8FC;AA7GD,+DAAgF;AAChF,iEAAmE;AAEnE,u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,CAAC,2BAAY,CAAC,mBAAmB,CAAC;gCAClE,CAAC,CAAC,IAAA,mCAAqB,GAAE;gCACzB,CAAC,CAAC,IAAA,yBAAW,EACT,CAAC,MAAc,EAAE,EAAE,CACjB,MAAM,CAAC,6BAAa,CAAC,UAAU,CAAC,KAAK,sCAAkB,CAAC,OAAO,EAAE,CAAC,EAAE,CACvE;4BACL,IAAA,wCAAiB,GAAE;yBACpB;qBACF;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"daProjectTypeNode.js","sourceRoot":"","sources":["../../../../src/question/scaffold/vsc/daProjectTypeNode.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAkBlC,8CA4FC;AA3GD,+DAAgF;AAChF,iEAAmE;AAEnE,uDAAoD;AACpD,gDAAoE;AACpE,2DAM6B;AAC7B,6DAA0D;AAC1D,iEAA2D;AAE3D,SAAgB,iBAAiB,CAC/B,WAAW,GAAG,uCAAkB,CAAC,oBAAoB;IAErD,OAAO;QACL,mCAAmC;QACnC,SAAS,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE;QAClC,IAAI,EAAE;YACJ,IAAI,EAAE,6BAAa,CAAC,YAAY;YAChC,KAAK,EAAE,IAAA,kCAAkB,EACvB,mEAAmE,CACpE;YACD,WAAW,EAAE,IAAA,kCAAkB,EAC7B,yEAAyE,CAC1E;YACD,IAAI,EAAE,cAAc;YACpB,aAAa,EAAE,CAAC,uCAAmB,CAAC,gBAAgB,EAAE,CAAC;YACvD,gBAAgB,EAAE,IAAI;SACvB;QACD,QAAQ,EAAE;YACR;gBACE,SAAS,EAAE,EAAE,MAAM,EAAE,uCAAmB,CAAC,gBAAgB,EAAE,CAAC,EAAE,EAAE;gBAChE,IAAI,EAAE;oBACJ,IAAI,EAAE,6BAAa,CAAC,UAAU;oBAC9B,KAAK,EAAE,IAAA,kCAAkB,EAAC,yDAAyD,CAAC;oBACpF,cAAc,EAAE,yDAAyD;oBACzE,IA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cAAc,EAAE,sCAAsC;oCACtD,WAAW,EAAE,IAAA,kCAAkB,EAC7B,oEAAoE,CACrE;oCACD,aAAa,EAAE;wCACb,kCAAc,CAAC,IAAI,CAAC,KAAK,CAAC;wCAC1B,kCAAc,CAAC,MAAM,EAAE;wCACvB,kCAAc,CAAC,cAAc,EAAE;wCAC/B,kCAAc,CAAC,KAAK,EAAE;qCACvB;oCACD,OAAO,EAAE,kCAAc,CAAC,IAAI,EAAE,CAAC,EAAE;oCACjC,cAAc,EAAE,mCAAe;iCAChC;6BACF;4BACD,iCAAkB,CAAC,eAAe,CAAC,2BAAY,CAAC,mBAAmB,CAAC;gCAClE,CAAC,CAAC,IAAA,mCAAqB,GAAE;gCACzB,CAAC,CAAC,IAAA,yBAAW,EACT,CAAC,MAAc,EAAE,EAAE,CACjB,MAAM,CAAC,6BAAa,CAAC,UAAU,CAAC,KAAK,sCAAkB,CAAC,OAAO,EAAE,CAAC,EAAE,CACvE;4BACL,IAAA,wCAAiB,GAAE;yBACpB;qBACF;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { BundledFloor } from "./templateSource";
2
+ /** The directory the build bakes the floor into. */
3
+ export declare function bundledFloorDir(): string;
4
+ /** Build a {@link BundledFloor} from raw bytes — digest computed, never baked. */
5
+ export declare function bundledFloorFrom(version: string, bytes: Buffer, location: string): BundledFloor;
6
+ /**
7
+ * Load the floor baked under `floorDir` (defaults to {@link bundledFloorDir}).
8
+ * Missing/malformed bake artifacts are a hard error — a build without a floor
9
+ * cannot scaffold offline, so we refuse rather than silently degrade.
10
+ */
11
+ export declare function loadBundledFloor(floorDir?: string): BundledFloor;
12
+ //# sourceMappingURL=bundledFloor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundledFloor.d.ts","sourceRoot":"","sources":["../../../src/v4/distribution/bundledFloor.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAiB,MAAM,kBAAkB,CAAC;AAkB/D,oDAAoD;AACpD,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAED,kFAAkF;AAClF,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,YAAY,CAE/F;AAcD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,GAAE,MAA0B,GAAG,YAAY,CAkCnF"}
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT license.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.bundledFloorDir = bundledFloorDir;
6
+ exports.bundledFloorFrom = bundledFloorFrom;
7
+ exports.loadBundledFloor = loadBundledFloor;
8
+ const tslib_1 = require("tslib");
9
+ const teamsfx_api_1 = require("@microsoft/teamsfx-api");
10
+ const fs = tslib_1.__importStar(require("fs-extra"));
11
+ const path = tslib_1.__importStar(require("path"));
12
+ const folder_1 = require("../../folder");
13
+ const templateSource_1 = require("./templateSource");
14
+ /**
15
+ * The bundled floor: the v4 template package baked into the engine so the
16
+ * scaffold never depends on the network being reachable (offline-by-default).
17
+ *
18
+ * The build step drops two files under `<floor dir>`:
19
+ * - `floor.json` → `{ "version": "<semver>" }` (the baked version)
20
+ * - `templates.zip` → the package bytes
21
+ *
22
+ * The digest is NOT baked: it is computed from the bytes at load time so
23
+ * `computeDigest` stays the single authority (spec decision #6 / INV-3).
24
+ *
25
+ * Spec: docs/03-specs/operations/scaffolding/resolve-template-source.md
26
+ */
27
+ const SOURCE = "Scaffold";
28
+ /** The directory the build bakes the floor into. */
29
+ function bundledFloorDir() {
30
+ return path.join((0, folder_1.getTemplatesFolder)(), "v4");
31
+ }
32
+ /** Build a {@link BundledFloor} from raw bytes — digest computed, never baked. */
33
+ function bundledFloorFrom(version, bytes, location) {
34
+ return { version, digest: (0, templateSource_1.computeDigest)(bytes), location };
35
+ }
36
+ function isFloorManifest(value) {
37
+ return (typeof value === "object" &&
38
+ value !== null &&
39
+ typeof value.version === "string");
40
+ }
41
+ /**
42
+ * Load the floor baked under `floorDir` (defaults to {@link bundledFloorDir}).
43
+ * Missing/malformed bake artifacts are a hard error — a build without a floor
44
+ * cannot scaffold offline, so we refuse rather than silently degrade.
45
+ */
46
+ function loadBundledFloor(floorDir = bundledFloorDir()) {
47
+ const manifestPath = path.join(floorDir, "floor.json");
48
+ const zipPath = path.join(floorDir, "templates.zip");
49
+ let manifest;
50
+ try {
51
+ manifest = fs.readJsonSync(manifestPath);
52
+ }
53
+ catch {
54
+ throw new teamsfx_api_1.SystemError({
55
+ source: SOURCE,
56
+ name: "BundledFloorMissing",
57
+ message: `The bundled floor manifest is missing or unreadable at "${manifestPath}".`,
58
+ });
59
+ }
60
+ if (!isFloorManifest(manifest)) {
61
+ throw new teamsfx_api_1.SystemError({
62
+ source: SOURCE,
63
+ name: "BundledFloorMalformed",
64
+ message: `The bundled floor manifest at "${manifestPath}" has no string "version".`,
65
+ });
66
+ }
67
+ let bytes;
68
+ try {
69
+ bytes = fs.readFileSync(zipPath);
70
+ }
71
+ catch {
72
+ throw new teamsfx_api_1.SystemError({
73
+ source: SOURCE,
74
+ name: "BundledFloorMissing",
75
+ message: `The bundled floor package is missing or unreadable at "${zipPath}".`,
76
+ });
77
+ }
78
+ return bundledFloorFrom(manifest.version, bytes, zipPath);
79
+ }
80
+ //# sourceMappingURL=bundledFloor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundledFloor.js","sourceRoot":"","sources":["../../../src/v4/distribution/bundledFloor.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAyBlC,0CAEC;AAGD,4CAEC;AAmBD,4CAkCC;;AAnFD,wDAAqD;AACrD,qDAA+B;AAC/B,mDAA6B;AAC7B,yCAAkD;AAClD,qDAA+D;AAE/D;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,GAAG,UAAU,CAAC;AAE1B,oDAAoD;AACpD,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CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,yBAAW,CAAC;YACpB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,qBAAqB;YAC3B,OAAO,EAAE,0DAA0D,OAAO,IAAI;SAC/E,CAAC,CAAC;IACL,CAAC;IAED,OAAO,gBAAgB,CAAC,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AAC5D,CAAC"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Build-time computation of the v4 template distribution config from the freshly
3
+ * minted templates version and the CD `goproduct` flag.
4
+ *
5
+ * This is the v4-isolated counterpart of the v3 `fxcore-sync-up-version.js`
6
+ * (`syncTemplateVersion` + `updateUseLocalFlag`). It is a pure function so it
7
+ * can be unit-tested 1:1; the CD step is a thin node wrapper that reads the
8
+ * version + flag, calls this, and writes the result into `templates-config.json`.
9
+ *
10
+ * Outputs the two build-time concepts `resolveTemplateSource` consumes:
11
+ * - `range` — the SemVer range the build may resolve within (`~major.minor`)
12
+ * - `bundled` — `true` for test/offline builds (bundled floor), `false` for
13
+ * shipped builds (release channel)
14
+ * plus `localVersion` (the exact minted version, recorded for observability).
15
+ *
16
+ * Spec: docs/03-specs/operations/scaffolding/resolve-template-source.md
17
+ */
18
+ export interface V4TemplateConfigInput {
19
+ /** The freshly minted templates version (e.g. `6.11.0` or `6.11.0-rc.0`). */
20
+ version: string;
21
+ /**
22
+ * The CD `goproduct` flag (env `PRODUCTION`): `true` when this build ships to
23
+ * users (marketplace / stable), `false` for any internal test build.
24
+ */
25
+ goproduct: boolean;
26
+ /** The current `range` in `templates-config.json`, kept when still satisfied. */
27
+ previousRange: string;
28
+ }
29
+ export interface V4TemplateConfig {
30
+ /** `~major.minor` SemVer range the build may resolve within. */
31
+ range: string;
32
+ /** `true` for test/offline builds (bundled floor); `false` for shipped builds. */
33
+ bundled: boolean;
34
+ /** The exact minted version (observability / floor pin). */
35
+ localVersion: string;
36
+ }
37
+ /**
38
+ * `bundled` is the negation of `goproduct`: a build that is NOT shipping to
39
+ * users resolves from the bundled floor (offline-by-default); a shipping build
40
+ * resolves from the online release channel. Independent of `preid` / lane.
41
+ */
42
+ export declare function computeBundled(goproduct: boolean): boolean;
43
+ /**
44
+ * The range a build may resolve within. templates carries no odd/even-minor
45
+ * split (unlike the VS Code extension), so a prerelease and the stable it
46
+ * graduates into share one `~major.minor`. The range is only widened when the
47
+ * minted version no longer intersects the previous range; otherwise it is kept
48
+ * stable for reproducibility.
49
+ */
50
+ export declare function computeRange(version: string, previousRange: string): string;
51
+ /** Compute the full v4 distribution config block for `templates-config.json`. */
52
+ export declare function computeV4TemplateConfig(input: V4TemplateConfigInput): V4TemplateConfig;
53
+ //# sourceMappingURL=templateConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templateConfig.d.ts","sourceRoot":"","sources":["../../../src/v4/distribution/templateConfig.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,WAAW,qBAAqB;IACpC,6EAA6E;IAC7E,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB,iFAAiF;IACjF,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,kFAAkF;IAClF,OAAO,EAAE,OAAO,CAAC;IACjB,4DAA4D;IAC5D,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,OAAO,GAAG,OAAO,CAE1D;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAS3E;AAED,iFAAiF;AACjF,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,qBAAqB,GAAG,gBAAgB,CAMtF"}
@@ -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.computeBundled = computeBundled;
6
+ exports.computeRange = computeRange;
7
+ exports.computeV4TemplateConfig = computeV4TemplateConfig;
8
+ const tslib_1 = require("tslib");
9
+ const semver = tslib_1.__importStar(require("semver"));
10
+ /**
11
+ * `bundled` is the negation of `goproduct`: a build that is NOT shipping to
12
+ * users resolves from the bundled floor (offline-by-default); a shipping build
13
+ * resolves from the online release channel. Independent of `preid` / lane.
14
+ */
15
+ function computeBundled(goproduct) {
16
+ return !goproduct;
17
+ }
18
+ /**
19
+ * The range a build may resolve within. templates carries no odd/even-minor
20
+ * split (unlike the VS Code extension), so a prerelease and the stable it
21
+ * graduates into share one `~major.minor`. The range is only widened when the
22
+ * minted version no longer intersects the previous range; otherwise it is kept
23
+ * stable for reproducibility.
24
+ */
25
+ function computeRange(version, previousRange) {
26
+ const parsed = semver.parse(version);
27
+ if (parsed === null) {
28
+ throw new Error(`Cannot compute v4 template range: "${version}" is not valid SemVer.`);
29
+ }
30
+ if (semver.intersects(previousRange, `${parsed.major}.${parsed.minor}.0`)) {
31
+ return previousRange;
32
+ }
33
+ return `~${parsed.major}.${parsed.minor}`;
34
+ }
35
+ /** Compute the full v4 distribution config block for `templates-config.json`. */
36
+ function computeV4TemplateConfig(input) {
37
+ return {
38
+ range: computeRange(input.version, input.previousRange),
39
+ bundled: computeBundled(input.goproduct),
40
+ localVersion: input.version,
41
+ };
42
+ }
43
+ //# sourceMappingURL=templateConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templateConfig.js","sourceRoot":"","sources":["../../../src/v4/distribution/templateConfig.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAgDlC,wCAEC;AASD,oCASC;AAGD,0DAMC;;AA3ED,uDAAiC;AAyCjC;;;;GAIG;AACH,SAAgB,cAAc,CAAC,SAAkB;IAC/C,OAAO,CAAC,SAAS,CAAC;AACpB,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,YAAY,CAAC,OAAe,EAAE,aAAqB;IACjE,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACrC,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,sCAAsC,OAAO,wBAAwB,CAAC,CAAC;IACzF,CAAC;IACD,IAAI,MAAM,CAAC,UAAU,CAAC,aAAa,EAAE,GAAG,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,IAAI,CAAC,EAAE,CAAC;QAC1E,OAAO,aAAa,CAAC;IACvB,CAAC;IACD,OAAO,IAAI,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;AAC5C,CAAC;AAED,iFAAiF;AACjF,SAAgB,uBAAuB,CAAC,KAA4B;IAClE,OAAO;QACL,KAAK,EAAE,YAAY,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,aAAa,CAAC;QACvD,OAAO,EAAE,cAAc,CAAC,KAAK,CAAC,SAAS,CAAC;QACxC,YAAY,EAAE,KAAK,CAAC,OAAO;KAC5B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { FxError } from "@microsoft/teamsfx-api";
2
+ import { Result } from "neverthrow";
3
+ /**
4
+ * Names which template inside the package to open. The boundary
5
+ * (open → locate → hand back entries) is permanent; this locator shape is
6
+ * transitional — `{ language, scenario }` matches the package's current
7
+ * `<language>/<scenario>/` layout and becomes `{ templateId }` when the
8
+ * proposal §3 authoring layout ships. Only the resolved prefix changes; the
9
+ * open/entry contract and every AC hold (INV-1).
10
+ */
11
+ export interface TemplateLocator {
12
+ language: string;
13
+ scenario: string;
14
+ }
15
+ /** One file from the located template, rooted at the template's content. */
16
+ export interface TemplateFileEntry {
17
+ /** Path relative to the located template's content root, forward-slash normalized. */
18
+ path: string;
19
+ /** The file's raw bytes, verbatim — unrendered, `.tpl` suffix intact. */
20
+ data: Buffer;
21
+ }
22
+ /**
23
+ * Open the resolved template package and return the located template's file
24
+ * entries, the locator prefix stripped. Pure function of `(bytes, locator)`:
25
+ * no fs, no network, no render. Returns `Result` per the toolkit-wide
26
+ * neverthrow rule rather than throwing.
27
+ */
28
+ export declare function openTemplatePackage(bytes: Buffer, locator: TemplateLocator): Result<TemplateFileEntry[], FxError>;
29
+ //# sourceMappingURL=templatePackage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templatePackage.d.ts","sourceRoot":"","sources":["../../../src/v4/distribution/templatePackage.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAe,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,MAAM,EAAW,MAAM,YAAY,CAAC;AAe7C;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,4EAA4E;AAC5E,MAAM,WAAW,iBAAiB;IAChC,sFAAsF;IACtF,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAC;CACd;AAiBD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,eAAe,GACvB,MAAM,CAAC,iBAAiB,EAAE,EAAE,OAAO,CAAC,CAiDtC"}
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT license.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.openTemplatePackage = openTemplatePackage;
6
+ const tslib_1 = require("tslib");
7
+ const teamsfx_api_1 = require("@microsoft/teamsfx-api");
8
+ const adm_zip_1 = tslib_1.__importDefault(require("adm-zip"));
9
+ const neverthrow_1 = require("neverthrow");
10
+ /**
11
+ * The v4 template-package consume operation: open resolved package bytes and
12
+ * return one template's file entries, the locator prefix stripped, unrendered.
13
+ *
14
+ * Spec: docs/03-specs/operations/scaffolding/open-template-package.md
15
+ * Upstream: docs/03-specs/operations/scaffolding/resolve-template-source.md
16
+ *
17
+ * This module is part of the v4 world. It imports no v3 symbol; v3 code may
18
+ * call `openTemplatePackage`, but nothing here is tailored for v3.
19
+ */
20
+ const SOURCE = "Scaffold";
21
+ /** The `<language>/<scenario>/` prefix this locator resolves to (trailing slash = boundary). */
22
+ function locatorPrefix(locator) {
23
+ return `${locator.language}/${locator.scenario}/`;
24
+ }
25
+ /**
26
+ * Reject a stripped entry path whose segments are empty / `.` / `..` (Zip-Slip
27
+ * guard, INV-8). A digest check proves the bytes equal what was published, not
28
+ * that the published archive is free of traversal entries; the renderer writes
29
+ * these paths to disk, so containment is enforced here.
30
+ */
31
+ function isSafeRelativePath(rel) {
32
+ return rel.split("/").every((seg) => seg.length > 0 && seg !== "." && seg !== "..");
33
+ }
34
+ /**
35
+ * Open the resolved template package and return the located template's file
36
+ * entries, the locator prefix stripped. Pure function of `(bytes, locator)`:
37
+ * no fs, no network, no render. Returns `Result` per the toolkit-wide
38
+ * neverthrow rule rather than throwing.
39
+ */
40
+ function openTemplatePackage(bytes, locator) {
41
+ let zip;
42
+ try {
43
+ zip = new adm_zip_1.default(bytes);
44
+ }
45
+ catch {
46
+ return (0, neverthrow_1.err)(new teamsfx_api_1.SystemError({
47
+ source: SOURCE,
48
+ name: "TemplatePackageCorrupt",
49
+ message: "The resolved template package is not a valid archive.",
50
+ }));
51
+ }
52
+ const prefix = locatorPrefix(locator);
53
+ const entries = [];
54
+ for (const entry of zip.getEntries()) {
55
+ if (entry.isDirectory) {
56
+ continue; // INV-6 — directory entries excluded
57
+ }
58
+ const name = entry.entryName.replace(/\\/g, "/");
59
+ if (!name.startsWith(prefix)) {
60
+ continue; // INV-1 — trailing-slash prefix boundary; "da/" never matches "da-basic/"
61
+ }
62
+ const rel = name.slice(prefix.length);
63
+ if (!isSafeRelativePath(rel)) {
64
+ return (0, neverthrow_1.err)(new teamsfx_api_1.SystemError({
65
+ source: SOURCE,
66
+ name: "TemplatePackageUnsafePath",
67
+ message: `The resolved template package contains an unsafe entry path: "${entry.entryName}".`,
68
+ })); // INV-8 — Zip-Slip guard: reject empty / "." / ".." path segments
69
+ }
70
+ entries.push({ path: rel, data: entry.getData() });
71
+ }
72
+ if (entries.length === 0) {
73
+ return (0, neverthrow_1.err)(new teamsfx_api_1.SystemError({
74
+ source: SOURCE,
75
+ name: "TemplateNotFoundInPackage",
76
+ message: `Template "${prefix}" was not found in the resolved package.`,
77
+ }));
78
+ }
79
+ entries.sort((a, b) => (a.path < b.path ? -1 : a.path > b.path ? 1 : 0)); // INV-5 — deterministic order
80
+ return (0, neverthrow_1.ok)(entries);
81
+ }
82
+ //# sourceMappingURL=templatePackage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templatePackage.js","sourceRoot":"","sources":["../../../src/v4/distribution/templatePackage.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA6DlC,kDAoDC;;AA/GD,wDAA8D;AAC9D,8DAA6B;AAC7B,2CAA6C;AAE7C;;;;;;;;;GASG;AAEH,MAAM,MAAM,GAAG,UAAU,CAAC;AAuB1B,gGAAgG;AAChG,SAAS,aAAa,CAAC,OAAwB;IAC7C,OAAO,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,GAAG,CAAC;AACpD,CAAC;AAED;;;;;GAKG;AACH,SAAS,kBAAkB,CAAC,GAAW;IACrC,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,IAAI,CAAC,CAAC;AACtF,CAAC;AAED;;;;;GAKG;AACH,SAAgB,mBAAmB,CACjC,KAAa,EACb,OAAwB;IAExB,IAAI,GA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AAA,gBAAG,EACR,IAAI,yBAAW,CAAC;YACd,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,2BAA2B;YACjC,OAAO,EAAE,aAAa,MAAM,0CAA0C;SACvE,CAAC,CACH,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,8BAA8B;IACxG,OAAO,IAAA,eAAE,EAAC,OAAO,CAAC,CAAC;AACrB,CAAC"}
@@ -0,0 +1,67 @@
1
+ import { FxError } from "@microsoft/teamsfx-api";
2
+ import { Result } from "neverthrow";
3
+ /** Where the resolved template-package bytes come from. */
4
+ export type TemplateOrigin = "bundled" | "online" | "cache" | "bundled-fallback";
5
+ /** A single channel-published version paired with its expected content digest (model A). */
6
+ export interface TagEntry {
7
+ version: string;
8
+ digest: string;
9
+ }
10
+ /** A cached template package: its content digest and the bytes themselves. */
11
+ export interface CachedPackage {
12
+ digest: string;
13
+ bytes: Buffer;
14
+ }
15
+ /** The bundled floor baked into the engine binary. */
16
+ export interface BundledFloor {
17
+ version: string;
18
+ digest: string;
19
+ location: string;
20
+ }
21
+ /**
22
+ * The narrow port `resolveTemplateSource` depends on (interface-segregation).
23
+ * The full `ScaffoldRuntime` composes this later; this operation never reaches
24
+ * for faces it does not use.
25
+ */
26
+ export interface TemplateSourcePort {
27
+ /** Read an environment variable (e.g. `TEMPLATE_VERSION`). */
28
+ env(name: string): string | undefined;
29
+ /** The channel's published `{ version, digest }` entries. */
30
+ tagList(): Promise<TagEntry[]>;
31
+ /** Download a package's bytes for a version (verified against `expectedDigest` by the caller). */
32
+ packages(version: string, expectedDigest: string): Promise<Buffer>;
33
+ /** The local digest-keyed package cache. */
34
+ cache: {
35
+ get(version: string): CachedPackage | undefined;
36
+ put(version: string, digest: string, bytes: Buffer): void;
37
+ keys(): string[];
38
+ };
39
+ /** The bundled floor baked into the engine. */
40
+ floor: BundledFloor;
41
+ }
42
+ /** The single resolved source a scaffold run will use. */
43
+ export interface TemplateSource {
44
+ origin: TemplateOrigin;
45
+ version: string;
46
+ digest: string;
47
+ location: string;
48
+ /** Set when the resolved source diverged from the intended online source (observable, never silent). */
49
+ warning?: string;
50
+ }
51
+ export interface ResolveTemplateSourceInput {
52
+ /** SemVer range the build is permitted to resolve within. */
53
+ range: string;
54
+ /** `true` for test/offline/daily builds (bundled floor); `false` for shipped builds (release channel). */
55
+ bundled: boolean;
56
+ port: TemplateSourcePort;
57
+ }
58
+ /** sha256 content hash of a package's bytes, prefixed `sha256:`. */
59
+ export declare function computeDigest(bytes: Buffer): string;
60
+ /**
61
+ * Resolve `(range, bundled, port)` to exactly one `TemplateSource` before any
62
+ * template is read or rendered. Pure with respect to its inputs and the
63
+ * current tag-list state (INV-6). Returns `Result` rather than throwing,
64
+ * consistent with the toolkit-wide neverthrow rule.
65
+ */
66
+ export declare function resolveTemplateSource(input: ResolveTemplateSourceInput): Promise<Result<TemplateSource, FxError>>;
67
+ //# sourceMappingURL=templateSource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templateSource.d.ts","sourceRoot":"","sources":["../../../src/v4/distribution/templateSource.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAA0B,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,MAAM,EAAW,MAAM,YAAY,CAAC;AAgB7C,2DAA2D;AAC3D,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,kBAAkB,CAAC;AAEjF,4FAA4F;AAC5F,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CA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