@sitecoreai-labs/sitecoreai-cli 0.0.4

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 (569) hide show
  1. package/AGENTS.md +67 -0
  2. package/LICENSE +21 -0
  3. package/README.md +357 -0
  4. package/bin/sitecoreai-cli +3 -0
  5. package/dist/cli.d.ts +3 -0
  6. package/dist/cli.d.ts.map +1 -0
  7. package/dist/cli.js +358 -0
  8. package/dist/commands/config.d.ts +3 -0
  9. package/dist/commands/config.d.ts.map +1 -0
  10. package/dist/commands/config.js +27 -0
  11. package/dist/commands/deploy/deployments.d.ts +3 -0
  12. package/dist/commands/deploy/deployments.d.ts.map +1 -0
  13. package/dist/commands/deploy/deployments.js +58 -0
  14. package/dist/commands/deploy/editing-host.d.ts +3 -0
  15. package/dist/commands/deploy/editing-host.d.ts.map +1 -0
  16. package/dist/commands/deploy/editing-host.js +49 -0
  17. package/dist/commands/deploy/environments/deployments.d.ts +3 -0
  18. package/dist/commands/deploy/environments/deployments.d.ts.map +1 -0
  19. package/dist/commands/deploy/environments/deployments.js +28 -0
  20. package/dist/commands/deploy/environments/index.d.ts +3 -0
  21. package/dist/commands/deploy/environments/index.d.ts.map +1 -0
  22. package/dist/commands/deploy/environments/index.js +29 -0
  23. package/dist/commands/deploy/environments/mutations.d.ts +9 -0
  24. package/dist/commands/deploy/environments/mutations.d.ts.map +1 -0
  25. package/dist/commands/deploy/environments/mutations.js +103 -0
  26. package/dist/commands/deploy/environments/queries.d.ts +7 -0
  27. package/dist/commands/deploy/environments/queries.d.ts.map +1 -0
  28. package/dist/commands/deploy/environments/queries.js +56 -0
  29. package/dist/commands/deploy/environments/variables.d.ts +3 -0
  30. package/dist/commands/deploy/environments/variables.d.ts.map +1 -0
  31. package/dist/commands/deploy/environments/variables.js +40 -0
  32. package/dist/commands/deploy/environments.d.ts +2 -0
  33. package/dist/commands/deploy/environments.d.ts.map +1 -0
  34. package/dist/commands/deploy/environments.js +17 -0
  35. package/dist/commands/deploy/index.d.ts +3 -0
  36. package/dist/commands/deploy/index.d.ts.map +1 -0
  37. package/dist/commands/deploy/index.js +26 -0
  38. package/dist/commands/deploy/logs.d.ts +3 -0
  39. package/dist/commands/deploy/logs.d.ts.map +1 -0
  40. package/dist/commands/deploy/logs.js +39 -0
  41. package/dist/commands/deploy/organizations.d.ts +3 -0
  42. package/dist/commands/deploy/organizations.d.ts.map +1 -0
  43. package/dist/commands/deploy/organizations.js +29 -0
  44. package/dist/commands/deploy/projects.d.ts +3 -0
  45. package/dist/commands/deploy/projects.d.ts.map +1 -0
  46. package/dist/commands/deploy/projects.js +74 -0
  47. package/dist/commands/deploy/shared.d.ts +3 -0
  48. package/dist/commands/deploy/shared.d.ts.map +1 -0
  49. package/dist/commands/deploy/shared.js +12 -0
  50. package/dist/commands/deploy/site.d.ts +10 -0
  51. package/dist/commands/deploy/site.d.ts.map +1 -0
  52. package/dist/commands/deploy/site.js +36 -0
  53. package/dist/commands/deploy/source-control.d.ts +3 -0
  54. package/dist/commands/deploy/source-control.d.ts.map +1 -0
  55. package/dist/commands/deploy/source-control.js +89 -0
  56. package/dist/commands/deploy.d.ts +2 -0
  57. package/dist/commands/deploy.d.ts.map +1 -0
  58. package/dist/commands/deploy.js +5 -0
  59. package/dist/commands/history.d.ts +3 -0
  60. package/dist/commands/history.d.ts.map +1 -0
  61. package/dist/commands/history.js +88 -0
  62. package/dist/commands/init.d.ts +3 -0
  63. package/dist/commands/init.d.ts.map +1 -0
  64. package/dist/commands/init.js +32 -0
  65. package/dist/commands/login.d.ts +3 -0
  66. package/dist/commands/login.d.ts.map +1 -0
  67. package/dist/commands/login.js +21 -0
  68. package/dist/commands/logout.d.ts +3 -0
  69. package/dist/commands/logout.d.ts.map +1 -0
  70. package/dist/commands/logout.js +18 -0
  71. package/dist/commands/recipe/index.d.ts +3 -0
  72. package/dist/commands/recipe/index.d.ts.map +1 -0
  73. package/dist/commands/recipe/index.js +158 -0
  74. package/dist/commands/serialization/index.d.ts +3 -0
  75. package/dist/commands/serialization/index.d.ts.map +1 -0
  76. package/dist/commands/serialization/index.js +89 -0
  77. package/dist/commands/serialization/package.d.ts +3 -0
  78. package/dist/commands/serialization/package.d.ts.map +1 -0
  79. package/dist/commands/serialization/package.js +36 -0
  80. package/dist/commands/shared.d.ts +21 -0
  81. package/dist/commands/shared.d.ts.map +1 -0
  82. package/dist/commands/shared.js +82 -0
  83. package/dist/commands/shell.d.ts +10 -0
  84. package/dist/commands/shell.d.ts.map +1 -0
  85. package/dist/commands/shell.js +155 -0
  86. package/dist/commands/status.d.ts +3 -0
  87. package/dist/commands/status.d.ts.map +1 -0
  88. package/dist/commands/status.js +15 -0
  89. package/dist/commands/telemetry.d.ts +3 -0
  90. package/dist/commands/telemetry.d.ts.map +1 -0
  91. package/dist/commands/telemetry.js +28 -0
  92. package/dist/config/env-overrides.d.ts +4 -0
  93. package/dist/config/env-overrides.d.ts.map +1 -0
  94. package/dist/config/env-overrides.js +199 -0
  95. package/dist/config/index.d.ts +5 -0
  96. package/dist/config/index.d.ts.map +1 -0
  97. package/dist/config/index.js +13 -0
  98. package/dist/config/modules.d.ts +4 -0
  99. package/dist/config/modules.d.ts.map +1 -0
  100. package/dist/config/modules.js +152 -0
  101. package/dist/config/paths.d.ts +2 -0
  102. package/dist/config/paths.d.ts.map +1 -0
  103. package/dist/config/paths.js +39 -0
  104. package/dist/config/root-config.d.ts +10 -0
  105. package/dist/config/root-config.d.ts.map +1 -0
  106. package/dist/config/root-config.js +159 -0
  107. package/dist/config/schema.json +278 -0
  108. package/dist/config/serialization-module.schema.json +127 -0
  109. package/dist/config/telemetry.schema.json +21 -0
  110. package/dist/config/types.d.ts +245 -0
  111. package/dist/config/types.d.ts.map +1 -0
  112. package/dist/config/types.js +19 -0
  113. package/dist/config/validation.d.ts +10 -0
  114. package/dist/config/validation.d.ts.map +1 -0
  115. package/dist/config/validation.js +43 -0
  116. package/dist/deploy/api/common/headers.d.ts +2 -0
  117. package/dist/deploy/api/common/headers.d.ts.map +1 -0
  118. package/dist/deploy/api/common/headers.js +10 -0
  119. package/dist/deploy/api/common/index.d.ts +4 -0
  120. package/dist/deploy/api/common/index.d.ts.map +1 -0
  121. package/dist/deploy/api/common/index.js +19 -0
  122. package/dist/deploy/api/common/request.d.ts +9 -0
  123. package/dist/deploy/api/common/request.d.ts.map +1 -0
  124. package/dist/deploy/api/common/request.js +253 -0
  125. package/dist/deploy/api/common/types.d.ts +44 -0
  126. package/dist/deploy/api/common/types.d.ts.map +1 -0
  127. package/dist/deploy/api/common/types.js +5 -0
  128. package/dist/deploy/api/common.d.ts +2 -0
  129. package/dist/deploy/api/common.d.ts.map +1 -0
  130. package/dist/deploy/api/common.js +17 -0
  131. package/dist/deploy/api/deployment-logs.d.ts +2 -0
  132. package/dist/deploy/api/deployment-logs.d.ts.map +1 -0
  133. package/dist/deploy/api/deployment-logs.js +23 -0
  134. package/dist/deploy/api/deployments.d.ts +9 -0
  135. package/dist/deploy/api/deployments.d.ts.map +1 -0
  136. package/dist/deploy/api/deployments.js +61 -0
  137. package/dist/deploy/api/environments.d.ts +21 -0
  138. package/dist/deploy/api/environments.d.ts.map +1 -0
  139. package/dist/deploy/api/environments.js +67 -0
  140. package/dist/deploy/api/index.d.ts +9 -0
  141. package/dist/deploy/api/index.d.ts.map +1 -0
  142. package/dist/deploy/api/index.js +24 -0
  143. package/dist/deploy/api/logs.d.ts +8 -0
  144. package/dist/deploy/api/logs.d.ts.map +1 -0
  145. package/dist/deploy/api/logs.js +29 -0
  146. package/dist/deploy/api/organizations.d.ts +6 -0
  147. package/dist/deploy/api/organizations.d.ts.map +1 -0
  148. package/dist/deploy/api/organizations.js +18 -0
  149. package/dist/deploy/api/projects.d.ts +13 -0
  150. package/dist/deploy/api/projects.d.ts.map +1 -0
  151. package/dist/deploy/api/projects.js +42 -0
  152. package/dist/deploy/api/source-control.d.ts +15 -0
  153. package/dist/deploy/api/source-control.d.ts.map +1 -0
  154. package/dist/deploy/api/source-control.js +71 -0
  155. package/dist/deploy/api.d.ts +2 -0
  156. package/dist/deploy/api.d.ts.map +1 -0
  157. package/dist/deploy/api.js +17 -0
  158. package/dist/deploy/tasks/deployment-result.d.ts +6 -0
  159. package/dist/deploy/tasks/deployment-result.d.ts.map +1 -0
  160. package/dist/deploy/tasks/deployment-result.js +36 -0
  161. package/dist/deploy/tasks/deployments.d.ts +10 -0
  162. package/dist/deploy/tasks/deployments.d.ts.map +1 -0
  163. package/dist/deploy/tasks/deployments.js +201 -0
  164. package/dist/deploy/tasks/editing-host.d.ts +28 -0
  165. package/dist/deploy/tasks/editing-host.d.ts.map +1 -0
  166. package/dist/deploy/tasks/editing-host.js +216 -0
  167. package/dist/deploy/tasks/environments.d.ts +20 -0
  168. package/dist/deploy/tasks/environments.d.ts.map +1 -0
  169. package/dist/deploy/tasks/environments.js +364 -0
  170. package/dist/deploy/tasks/index.d.ts +10 -0
  171. package/dist/deploy/tasks/index.d.ts.map +1 -0
  172. package/dist/deploy/tasks/index.js +25 -0
  173. package/dist/deploy/tasks/logs.d.ts +5 -0
  174. package/dist/deploy/tasks/logs.d.ts.map +1 -0
  175. package/dist/deploy/tasks/logs.js +56 -0
  176. package/dist/deploy/tasks/organizations.d.ts +6 -0
  177. package/dist/deploy/tasks/organizations.d.ts.map +1 -0
  178. package/dist/deploy/tasks/organizations.js +51 -0
  179. package/dist/deploy/tasks/projects.d.ts +11 -0
  180. package/dist/deploy/tasks/projects.d.ts.map +1 -0
  181. package/dist/deploy/tasks/projects.js +246 -0
  182. package/dist/deploy/tasks/shared.d.ts +63 -0
  183. package/dist/deploy/tasks/shared.d.ts.map +1 -0
  184. package/dist/deploy/tasks/shared.js +261 -0
  185. package/dist/deploy/tasks/site-bind.d.ts +21 -0
  186. package/dist/deploy/tasks/site-bind.d.ts.map +1 -0
  187. package/dist/deploy/tasks/site-bind.js +142 -0
  188. package/dist/deploy/tasks/site.d.ts +14 -0
  189. package/dist/deploy/tasks/site.d.ts.map +1 -0
  190. package/dist/deploy/tasks/site.js +29 -0
  191. package/dist/deploy/tasks/source-control.d.ts +14 -0
  192. package/dist/deploy/tasks/source-control.d.ts.map +1 -0
  193. package/dist/deploy/tasks/source-control.js +173 -0
  194. package/dist/deploy/tasks/types.d.ts +204 -0
  195. package/dist/deploy/tasks/types.d.ts.map +1 -0
  196. package/dist/deploy/tasks/types.js +7 -0
  197. package/dist/deploy/tasks.d.ts +3 -0
  198. package/dist/deploy/tasks.d.ts.map +1 -0
  199. package/dist/deploy/tasks.js +18 -0
  200. package/dist/recipe/api/auth.d.ts +9 -0
  201. package/dist/recipe/api/auth.d.ts.map +1 -0
  202. package/dist/recipe/api/auth.js +12 -0
  203. package/dist/recipe/api/authoring-client.d.ts +37 -0
  204. package/dist/recipe/api/authoring-client.d.ts.map +1 -0
  205. package/dist/recipe/api/authoring-client.js +495 -0
  206. package/dist/recipe/api/client.d.ts +99 -0
  207. package/dist/recipe/api/client.d.ts.map +1 -0
  208. package/dist/recipe/api/client.js +17 -0
  209. package/dist/recipe/api/graphql.d.ts +15 -0
  210. package/dist/recipe/api/graphql.d.ts.map +1 -0
  211. package/dist/recipe/api/graphql.js +38 -0
  212. package/dist/recipe/api/ref-encoding.d.ts +38 -0
  213. package/dist/recipe/api/ref-encoding.d.ts.map +1 -0
  214. package/dist/recipe/api/ref-encoding.js +160 -0
  215. package/dist/recipe/api/site-discovery.d.ts +49 -0
  216. package/dist/recipe/api/site-discovery.d.ts.map +1 -0
  217. package/dist/recipe/api/site-discovery.js +127 -0
  218. package/dist/recipe/api/sites-client.d.ts +48 -0
  219. package/dist/recipe/api/sites-client.d.ts.map +1 -0
  220. package/dist/recipe/api/sites-client.js +19 -0
  221. package/dist/recipe/cache.d.ts +36 -0
  222. package/dist/recipe/cache.d.ts.map +1 -0
  223. package/dist/recipe/cache.js +114 -0
  224. package/dist/recipe/compile/component-section.d.ts +46 -0
  225. package/dist/recipe/compile/component-section.d.ts.map +1 -0
  226. package/dist/recipe/compile/component-section.js +143 -0
  227. package/dist/recipe/compile/component-template.d.ts +34 -0
  228. package/dist/recipe/compile/component-template.d.ts.map +1 -0
  229. package/dist/recipe/compile/component-template.js +709 -0
  230. package/dist/recipe/compile/content-item.d.ts +31 -0
  231. package/dist/recipe/compile/content-item.d.ts.map +1 -0
  232. package/dist/recipe/compile/content-item.js +189 -0
  233. package/dist/recipe/compile/content-template.d.ts +18 -0
  234. package/dist/recipe/compile/content-template.d.ts.map +1 -0
  235. package/dist/recipe/compile/content-template.js +52 -0
  236. package/dist/recipe/compile/enumeration.d.ts +59 -0
  237. package/dist/recipe/compile/enumeration.d.ts.map +1 -0
  238. package/dist/recipe/compile/enumeration.js +236 -0
  239. package/dist/recipe/compile/page-design.d.ts +22 -0
  240. package/dist/recipe/compile/page-design.d.ts.map +1 -0
  241. package/dist/recipe/compile/page-design.js +93 -0
  242. package/dist/recipe/compile/parameters-template.d.ts +14 -0
  243. package/dist/recipe/compile/parameters-template.d.ts.map +1 -0
  244. package/dist/recipe/compile/parameters-template.js +92 -0
  245. package/dist/recipe/compile/partial-design.d.ts +18 -0
  246. package/dist/recipe/compile/partial-design.d.ts.map +1 -0
  247. package/dist/recipe/compile/partial-design.js +76 -0
  248. package/dist/recipe/compile/section-definition.d.ts +18 -0
  249. package/dist/recipe/compile/section-definition.d.ts.map +1 -0
  250. package/dist/recipe/compile/section-definition.js +26 -0
  251. package/dist/recipe/compile/shared.d.ts +442 -0
  252. package/dist/recipe/compile/shared.d.ts.map +1 -0
  253. package/dist/recipe/compile/shared.js +843 -0
  254. package/dist/recipe/compile/site-template.d.ts +52 -0
  255. package/dist/recipe/compile/site-template.d.ts.map +1 -0
  256. package/dist/recipe/compile/site-template.js +140 -0
  257. package/dist/recipe/compile/site.d.ts +44 -0
  258. package/dist/recipe/compile/site.d.ts.map +1 -0
  259. package/dist/recipe/compile/site.js +127 -0
  260. package/dist/recipe/compile.d.ts +93 -0
  261. package/dist/recipe/compile.d.ts.map +1 -0
  262. package/dist/recipe/compile.js +741 -0
  263. package/dist/recipe/execute.d.ts +119 -0
  264. package/dist/recipe/execute.d.ts.map +1 -0
  265. package/dist/recipe/execute.js +273 -0
  266. package/dist/recipe/guids.d.ts +400 -0
  267. package/dist/recipe/guids.d.ts.map +1 -0
  268. package/dist/recipe/guids.js +488 -0
  269. package/dist/recipe/index.d.ts +32 -0
  270. package/dist/recipe/index.d.ts.map +1 -0
  271. package/dist/recipe/index.js +156 -0
  272. package/dist/recipe/io.d.ts +21 -0
  273. package/dist/recipe/io.d.ts.map +1 -0
  274. package/dist/recipe/io.js +147 -0
  275. package/dist/recipe/ir/operations.d.ts +692 -0
  276. package/dist/recipe/ir/operations.d.ts.map +1 -0
  277. package/dist/recipe/ir/operations.js +347 -0
  278. package/dist/recipe/ir/sitecore-templates.d.ts +455 -0
  279. package/dist/recipe/ir/sitecore-templates.d.ts.map +1 -0
  280. package/dist/recipe/ir/sitecore-templates.js +465 -0
  281. package/dist/recipe/layout/emit.d.ts +101 -0
  282. package/dist/recipe/layout/emit.d.ts.map +1 -0
  283. package/dist/recipe/layout/emit.js +127 -0
  284. package/dist/recipe/layout/templates-mapping.d.ts +28 -0
  285. package/dist/recipe/layout/templates-mapping.d.ts.map +1 -0
  286. package/dist/recipe/layout/templates-mapping.js +29 -0
  287. package/dist/recipe/plan.d.ts +134 -0
  288. package/dist/recipe/plan.d.ts.map +1 -0
  289. package/dist/recipe/plan.js +565 -0
  290. package/dist/recipe/policy.d.ts +43 -0
  291. package/dist/recipe/policy.d.ts.map +1 -0
  292. package/dist/recipe/policy.js +75 -0
  293. package/dist/recipe/rollback.d.ts +72 -0
  294. package/dist/recipe/rollback.d.ts.map +1 -0
  295. package/dist/recipe/rollback.js +130 -0
  296. package/dist/recipe/schema/field-types.d.ts +72 -0
  297. package/dist/recipe/schema/field-types.d.ts.map +1 -0
  298. package/dist/recipe/schema/field-types.js +118 -0
  299. package/dist/recipe/schema/recipe.d.ts +1545 -0
  300. package/dist/recipe/schema/recipe.d.ts.map +1 -0
  301. package/dist/recipe/schema/recipe.js +1175 -0
  302. package/dist/recipe/schema/source-fields.d.ts +48 -0
  303. package/dist/recipe/schema/source-fields.d.ts.map +1 -0
  304. package/dist/recipe/schema/source-fields.js +79 -0
  305. package/dist/recipe/tasks/compile.d.ts +14 -0
  306. package/dist/recipe/tasks/compile.d.ts.map +1 -0
  307. package/dist/recipe/tasks/compile.js +89 -0
  308. package/dist/recipe/tasks/diff.d.ts +17 -0
  309. package/dist/recipe/tasks/diff.d.ts.map +1 -0
  310. package/dist/recipe/tasks/diff.js +6 -0
  311. package/dist/recipe/tasks/index.d.ts +9 -0
  312. package/dist/recipe/tasks/index.d.ts.map +1 -0
  313. package/dist/recipe/tasks/index.js +13 -0
  314. package/dist/recipe/tasks/placeholder-allow.d.ts +53 -0
  315. package/dist/recipe/tasks/placeholder-allow.d.ts.map +1 -0
  316. package/dist/recipe/tasks/placeholder-allow.js +218 -0
  317. package/dist/recipe/tasks/plan.d.ts +11 -0
  318. package/dist/recipe/tasks/plan.d.ts.map +1 -0
  319. package/dist/recipe/tasks/plan.js +72 -0
  320. package/dist/recipe/tasks/prune-defaults.d.ts +90 -0
  321. package/dist/recipe/tasks/prune-defaults.d.ts.map +1 -0
  322. package/dist/recipe/tasks/prune-defaults.js +184 -0
  323. package/dist/recipe/tasks/push.d.ts +18 -0
  324. package/dist/recipe/tasks/push.d.ts.map +1 -0
  325. package/dist/recipe/tasks/push.js +417 -0
  326. package/dist/recipe/tasks/shared.d.ts +152 -0
  327. package/dist/recipe/tasks/shared.d.ts.map +1 -0
  328. package/dist/recipe/tasks/shared.js +94 -0
  329. package/dist/recipe/validate.d.ts +103 -0
  330. package/dist/recipe/validate.d.ts.map +1 -0
  331. package/dist/recipe/validate.js +297 -0
  332. package/dist/serialization/commands.d.ts +48 -0
  333. package/dist/serialization/commands.d.ts.map +1 -0
  334. package/dist/serialization/commands.js +175 -0
  335. package/dist/serialization/compare.d.ts +29 -0
  336. package/dist/serialization/compare.d.ts.map +1 -0
  337. package/dist/serialization/compare.js +124 -0
  338. package/dist/serialization/field-filter.d.ts +7 -0
  339. package/dist/serialization/field-filter.d.ts.map +1 -0
  340. package/dist/serialization/field-filter.js +20 -0
  341. package/dist/serialization/filesystem-store/constants.d.ts +3 -0
  342. package/dist/serialization/filesystem-store/constants.d.ts.map +1 -0
  343. package/dist/serialization/filesystem-store/constants.js +5 -0
  344. package/dist/serialization/filesystem-store/index.d.ts +4 -0
  345. package/dist/serialization/filesystem-store/index.d.ts.map +1 -0
  346. package/dist/serialization/filesystem-store/index.js +15 -0
  347. package/dist/serialization/filesystem-store/items.d.ts +10 -0
  348. package/dist/serialization/filesystem-store/items.d.ts.map +1 -0
  349. package/dist/serialization/filesystem-store/items.js +64 -0
  350. package/dist/serialization/filesystem-store/roles.d.ts +6 -0
  351. package/dist/serialization/filesystem-store/roles.d.ts.map +1 -0
  352. package/dist/serialization/filesystem-store/roles.js +46 -0
  353. package/dist/serialization/filesystem-store/users.d.ts +6 -0
  354. package/dist/serialization/filesystem-store/users.d.ts.map +1 -0
  355. package/dist/serialization/filesystem-store/users.js +46 -0
  356. package/dist/serialization/filesystem-store/utils.d.ts +2 -0
  357. package/dist/serialization/filesystem-store/utils.d.ts.map +1 -0
  358. package/dist/serialization/filesystem-store/utils.js +17 -0
  359. package/dist/serialization/filesystem-store.d.ts +2 -0
  360. package/dist/serialization/filesystem-store.d.ts.map +1 -0
  361. package/dist/serialization/filesystem-store.js +17 -0
  362. package/dist/serialization/item-path.d.ts +32 -0
  363. package/dist/serialization/item-path.d.ts.map +1 -0
  364. package/dist/serialization/item-path.js +123 -0
  365. package/dist/serialization/path-provider.d.ts +12 -0
  366. package/dist/serialization/path-provider.d.ts.map +1 -0
  367. package/dist/serialization/path-provider.js +271 -0
  368. package/dist/serialization/signature.d.ts +4 -0
  369. package/dist/serialization/signature.d.ts.map +1 -0
  370. package/dist/serialization/signature.js +71 -0
  371. package/dist/serialization/sitecore-api/auth.d.ts +31 -0
  372. package/dist/serialization/sitecore-api/auth.d.ts.map +1 -0
  373. package/dist/serialization/sitecore-api/auth.js +319 -0
  374. package/dist/serialization/sitecore-api/graphql.d.ts +12 -0
  375. package/dist/serialization/sitecore-api/graphql.d.ts.map +1 -0
  376. package/dist/serialization/sitecore-api/graphql.js +20 -0
  377. package/dist/serialization/sitecore-api/history.d.ts +9 -0
  378. package/dist/serialization/sitecore-api/history.d.ts.map +1 -0
  379. package/dist/serialization/sitecore-api/history.js +36 -0
  380. package/dist/serialization/sitecore-api/index.d.ts +7 -0
  381. package/dist/serialization/sitecore-api/index.d.ts.map +1 -0
  382. package/dist/serialization/sitecore-api/index.js +22 -0
  383. package/dist/serialization/sitecore-api/items.d.ts +8 -0
  384. package/dist/serialization/sitecore-api/items.d.ts.map +1 -0
  385. package/dist/serialization/sitecore-api/items.js +132 -0
  386. package/dist/serialization/sitecore-api/publish.d.ts +14 -0
  387. package/dist/serialization/sitecore-api/publish.d.ts.map +1 -0
  388. package/dist/serialization/sitecore-api/publish.js +43 -0
  389. package/dist/serialization/sitecore-api/roles.d.ts +9 -0
  390. package/dist/serialization/sitecore-api/roles.d.ts.map +1 -0
  391. package/dist/serialization/sitecore-api/roles.js +42 -0
  392. package/dist/serialization/sitecore-api/users.d.ts +9 -0
  393. package/dist/serialization/sitecore-api/users.d.ts.map +1 -0
  394. package/dist/serialization/sitecore-api/users.js +62 -0
  395. package/dist/serialization/sitecore-api.d.ts +2 -0
  396. package/dist/serialization/sitecore-api.d.ts.map +1 -0
  397. package/dist/serialization/sitecore-api.js +17 -0
  398. package/dist/serialization/tasks/diff.d.ts +3 -0
  399. package/dist/serialization/tasks/diff.d.ts.map +1 -0
  400. package/dist/serialization/tasks/diff.js +109 -0
  401. package/dist/serialization/tasks/env/constants.d.ts +2 -0
  402. package/dist/serialization/tasks/env/constants.d.ts.map +1 -0
  403. package/dist/serialization/tasks/env/constants.js +4 -0
  404. package/dist/serialization/tasks/env/deploy-token.d.ts +3 -0
  405. package/dist/serialization/tasks/env/deploy-token.d.ts.map +1 -0
  406. package/dist/serialization/tasks/env/deploy-token.js +128 -0
  407. package/dist/serialization/tasks/env/index.d.ts +5 -0
  408. package/dist/serialization/tasks/env/index.d.ts.map +1 -0
  409. package/dist/serialization/tasks/env/index.js +11 -0
  410. package/dist/serialization/tasks/env/init/auth.d.ts +24 -0
  411. package/dist/serialization/tasks/env/init/auth.d.ts.map +1 -0
  412. package/dist/serialization/tasks/env/init/auth.js +122 -0
  413. package/dist/serialization/tasks/env/init/deploy-lookup.d.ts +22 -0
  414. package/dist/serialization/tasks/env/init/deploy-lookup.d.ts.map +1 -0
  415. package/dist/serialization/tasks/env/init/deploy-lookup.js +244 -0
  416. package/dist/serialization/tasks/env/init.d.ts +3 -0
  417. package/dist/serialization/tasks/env/init.d.ts.map +1 -0
  418. package/dist/serialization/tasks/env/init.js +253 -0
  419. package/dist/serialization/tasks/env/logout.d.ts +3 -0
  420. package/dist/serialization/tasks/env/logout.d.ts.map +1 -0
  421. package/dist/serialization/tasks/env/logout.js +61 -0
  422. package/dist/serialization/tasks/env/status.d.ts +3 -0
  423. package/dist/serialization/tasks/env/status.d.ts.map +1 -0
  424. package/dist/serialization/tasks/env/status.js +149 -0
  425. package/dist/serialization/tasks/env.d.ts +2 -0
  426. package/dist/serialization/tasks/env.d.ts.map +1 -0
  427. package/dist/serialization/tasks/env.js +17 -0
  428. package/dist/serialization/tasks/helpers/collect.d.ts +8 -0
  429. package/dist/serialization/tasks/helpers/collect.d.ts.map +1 -0
  430. package/dist/serialization/tasks/helpers/collect.js +29 -0
  431. package/dist/serialization/tasks/helpers/commands.d.ts +5 -0
  432. package/dist/serialization/tasks/helpers/commands.d.ts.map +1 -0
  433. package/dist/serialization/tasks/helpers/commands.js +14 -0
  434. package/dist/serialization/tasks/helpers/filesystem.d.ts +6 -0
  435. package/dist/serialization/tasks/helpers/filesystem.d.ts.map +1 -0
  436. package/dist/serialization/tasks/helpers/filesystem.js +27 -0
  437. package/dist/serialization/tasks/helpers/index.d.ts +6 -0
  438. package/dist/serialization/tasks/helpers/index.d.ts.map +1 -0
  439. package/dist/serialization/tasks/helpers/index.js +13 -0
  440. package/dist/serialization/tasks/helpers/items.d.ts +3 -0
  441. package/dist/serialization/tasks/helpers/items.d.ts.map +1 -0
  442. package/dist/serialization/tasks/helpers/items.js +5 -0
  443. package/dist/serialization/tasks/helpers/sitecore.d.ts +5 -0
  444. package/dist/serialization/tasks/helpers/sitecore.d.ts.map +1 -0
  445. package/dist/serialization/tasks/helpers/sitecore.js +109 -0
  446. package/dist/serialization/tasks/helpers.d.ts +2 -0
  447. package/dist/serialization/tasks/helpers.d.ts.map +1 -0
  448. package/dist/serialization/tasks/helpers.js +17 -0
  449. package/dist/serialization/tasks/index.d.ts +8 -0
  450. package/dist/serialization/tasks/index.d.ts.map +1 -0
  451. package/dist/serialization/tasks/index.js +19 -0
  452. package/dist/serialization/tasks/info.d.ts +4 -0
  453. package/dist/serialization/tasks/info.d.ts.map +1 -0
  454. package/dist/serialization/tasks/info.js +82 -0
  455. package/dist/serialization/tasks/package.d.ts +4 -0
  456. package/dist/serialization/tasks/package.d.ts.map +1 -0
  457. package/dist/serialization/tasks/package.js +171 -0
  458. package/dist/serialization/tasks/pull.d.ts +3 -0
  459. package/dist/serialization/tasks/pull.d.ts.map +1 -0
  460. package/dist/serialization/tasks/pull.js +82 -0
  461. package/dist/serialization/tasks/push.d.ts +3 -0
  462. package/dist/serialization/tasks/push.d.ts.map +1 -0
  463. package/dist/serialization/tasks/push.js +101 -0
  464. package/dist/serialization/tasks/roles.d.ts +6 -0
  465. package/dist/serialization/tasks/roles.d.ts.map +1 -0
  466. package/dist/serialization/tasks/roles.js +103 -0
  467. package/dist/serialization/tasks/shared.d.ts +19 -0
  468. package/dist/serialization/tasks/shared.d.ts.map +1 -0
  469. package/dist/serialization/tasks/shared.js +59 -0
  470. package/dist/serialization/tasks/types.d.ts +73 -0
  471. package/dist/serialization/tasks/types.d.ts.map +1 -0
  472. package/dist/serialization/tasks/types.js +8 -0
  473. package/dist/serialization/tasks/users.d.ts +5 -0
  474. package/dist/serialization/tasks/users.d.ts.map +1 -0
  475. package/dist/serialization/tasks/users.js +90 -0
  476. package/dist/serialization/tasks/validate.d.ts +5 -0
  477. package/dist/serialization/tasks/validate.d.ts.map +1 -0
  478. package/dist/serialization/tasks/validate.js +50 -0
  479. package/dist/serialization/tasks/watch.d.ts +3 -0
  480. package/dist/serialization/tasks/watch.d.ts.map +1 -0
  481. package/dist/serialization/tasks/watch.js +75 -0
  482. package/dist/serialization/tasks.d.ts +4 -0
  483. package/dist/serialization/tasks.d.ts.map +1 -0
  484. package/dist/serialization/tasks.js +19 -0
  485. package/dist/serialization/tree-spec.d.ts +51 -0
  486. package/dist/serialization/tree-spec.d.ts.map +1 -0
  487. package/dist/serialization/tree-spec.js +241 -0
  488. package/dist/serialization/types.d.ts +75 -0
  489. package/dist/serialization/types.d.ts.map +1 -0
  490. package/dist/serialization/types.js +2 -0
  491. package/dist/serialization/wildcard.d.ts +3 -0
  492. package/dist/serialization/wildcard.d.ts.map +1 -0
  493. package/dist/serialization/wildcard.js +24 -0
  494. package/dist/serialization/yaml.d.ts +9 -0
  495. package/dist/serialization/yaml.d.ts.map +1 -0
  496. package/dist/serialization/yaml.js +307 -0
  497. package/dist/shared/browser.d.ts +2 -0
  498. package/dist/shared/browser.d.ts.map +1 -0
  499. package/dist/shared/browser.js +36 -0
  500. package/dist/shared/cli-options.d.ts +17 -0
  501. package/dist/shared/cli-options.d.ts.map +1 -0
  502. package/dist/shared/cli-options.js +8 -0
  503. package/dist/shared/cli-tasks.d.ts +38 -0
  504. package/dist/shared/cli-tasks.d.ts.map +1 -0
  505. package/dist/shared/cli-tasks.js +108 -0
  506. package/dist/shared/config-template.d.ts +23 -0
  507. package/dist/shared/config-template.d.ts.map +1 -0
  508. package/dist/shared/config-template.js +38 -0
  509. package/dist/shared/env.d.ts +28 -0
  510. package/dist/shared/env.d.ts.map +1 -0
  511. package/dist/shared/env.js +38 -0
  512. package/dist/shared/errors.d.ts +21 -0
  513. package/dist/shared/errors.d.ts.map +1 -0
  514. package/dist/shared/errors.js +59 -0
  515. package/dist/shared/graphql.d.ts +76 -0
  516. package/dist/shared/graphql.d.ts.map +1 -0
  517. package/dist/shared/graphql.js +222 -0
  518. package/dist/shared/history.d.ts +12 -0
  519. package/dist/shared/history.d.ts.map +1 -0
  520. package/dist/shared/history.js +62 -0
  521. package/dist/shared/keychain.d.ts +15 -0
  522. package/dist/shared/keychain.d.ts.map +1 -0
  523. package/dist/shared/keychain.js +177 -0
  524. package/dist/shared/logger.d.ts +24 -0
  525. package/dist/shared/logger.d.ts.map +1 -0
  526. package/dist/shared/logger.js +157 -0
  527. package/dist/shared/output.d.ts +7 -0
  528. package/dist/shared/output.d.ts.map +1 -0
  529. package/dist/shared/output.js +21 -0
  530. package/dist/shared/prompt.d.ts +5 -0
  531. package/dist/shared/prompt.d.ts.map +1 -0
  532. package/dist/shared/prompt.js +87 -0
  533. package/dist/shared/redact.d.ts +3 -0
  534. package/dist/shared/redact.d.ts.map +1 -0
  535. package/dist/shared/redact.js +47 -0
  536. package/dist/shared/spinner.d.ts +5 -0
  537. package/dist/shared/spinner.d.ts.map +1 -0
  538. package/dist/shared/spinner.js +89 -0
  539. package/dist/shared/style.d.ts +2 -0
  540. package/dist/shared/style.d.ts.map +1 -0
  541. package/dist/shared/style.js +61 -0
  542. package/dist/shared/telemetry.d.ts +21 -0
  543. package/dist/shared/telemetry.d.ts.map +1 -0
  544. package/dist/shared/telemetry.js +226 -0
  545. package/dist/shared/validate.d.ts +3 -0
  546. package/dist/shared/validate.d.ts.map +1 -0
  547. package/dist/shared/validate.js +32 -0
  548. package/dist/sites/api/collections.d.ts +25 -0
  549. package/dist/sites/api/collections.d.ts.map +1 -0
  550. package/dist/sites/api/collections.js +21 -0
  551. package/dist/sites/api/index.d.ts +26 -0
  552. package/dist/sites/api/index.d.ts.map +1 -0
  553. package/dist/sites/api/index.js +55 -0
  554. package/dist/sites/api/jobs.d.ts +31 -0
  555. package/dist/sites/api/jobs.d.ts.map +1 -0
  556. package/dist/sites/api/jobs.js +10 -0
  557. package/dist/sites/api/languages.d.ts +22 -0
  558. package/dist/sites/api/languages.d.ts.map +1 -0
  559. package/dist/sites/api/languages.js +18 -0
  560. package/dist/sites/api/request.d.ts +24 -0
  561. package/dist/sites/api/request.d.ts.map +1 -0
  562. package/dist/sites/api/request.js +99 -0
  563. package/dist/sites/api/sites.d.ts +53 -0
  564. package/dist/sites/api/sites.d.ts.map +1 -0
  565. package/dist/sites/api/sites.js +41 -0
  566. package/dist/sites/api/types.d.ts +29 -0
  567. package/dist/sites/api/types.d.ts.map +1 -0
  568. package/dist/sites/api/types.js +4 -0
  569. package/package.json +109 -0
@@ -0,0 +1,442 @@
1
+ import { type FieldValue, type Operation, type PushPolicy } from "../ir/operations";
2
+ import { type FieldDefinition, type ParamDefinition } from "../schema/recipe";
3
+ /**
4
+ * Where a recipe's items land in the Sitecore content tree. Tenant-side
5
+ * config — recipes themselves are tenant-agnostic. The compiler emits
6
+ * deterministic Sitecore paths (`<templatesRoot>/<recipe.name>`, etc.)
7
+ * that the executor resolves to server-assigned itemIds at runtime.
8
+ */
9
+ export interface CompileContext {
10
+ /**
11
+ * Legacy flat templates root, e.g. `/sitecore/templates/Project/<site>`.
12
+ * The component template, parameters template, and (when present)
13
+ * Component Folder template land directly under this when `section`
14
+ * is omitted. When `section` is set on a `ComponentTemplateRecipe`,
15
+ * the compiler instead nests under the configured `componentsRoot`
16
+ * (preferred) or — fallback — under `templatesRoot/<section>`.
17
+ *
18
+ * Required for back-compat with callers that haven't migrated to the
19
+ * site-folder layout.
20
+ */
21
+ templatesRoot: string;
22
+ /**
23
+ * Renderings root. With `section`, the rendering lands at
24
+ * `<renderingsRoot>/<section>/<Component>`. Without section, falls
25
+ * back to the legacy flat `<renderingsRoot>/<Component>`.
26
+ */
27
+ renderingsRoot: string;
28
+ /**
29
+ * Per-site Components bucket — `/sitecore/templates/Project/<site>/Components`.
30
+ * When set AND a `ComponentTemplateRecipe` carries a `section`, the
31
+ * compiler emits at `<componentsRoot>/<section>/<Component>` and
32
+ * companion paths (Component Folders / Presentation Parameters)
33
+ * also nest under the section. When unset, the compiler falls back
34
+ * to `templatesRoot` for back-compat with the flat layout.
35
+ *
36
+ * Optional today; will become the canonical input once the
37
+ * orchestrator's `buildRecipeRoots()` returns the new bucket-roots
38
+ * shape (see `plans/recipe-site-folder-layout.md`).
39
+ */
40
+ componentsRoot?: string;
41
+ /**
42
+ * Per-site Content Models bucket —
43
+ * `/sitecore/templates/Project/<site>/Content Models`. When set AND a
44
+ * `ContentTemplateRecipe` is being compiled, the template lands at
45
+ * `<contentModelsRoot>/<group>/<name>` (when the recipe carries
46
+ * `meta.tax.group`) or flat at `<contentModelsRoot>/<name>` otherwise.
47
+ * When unset, the compiler falls back to `templatesRoot`.
48
+ */
49
+ contentModelsRoot?: string;
50
+ /**
51
+ * Phase 4: required for `PartialDesignRecipe` compilation. Where the
52
+ * partial-design items land — typically
53
+ * `/sitecore/content/<site>/Presentation/Partial Designs`.
54
+ * Optional in the type so Phase 1 callers don't have to set it; the
55
+ * partial-design compiler errors with a clear message if absent.
56
+ */
57
+ partialDesignsRoot?: string;
58
+ /**
59
+ * Phase 4: required for `PageDesignRecipe` compilation. Where the
60
+ * page-design items land — typically
61
+ * `/sitecore/content/<site>/Presentation/Page Designs`.
62
+ *
63
+ * The page-design compiler also emits a SetField op writing
64
+ * `TemplatesMapping` on this root item itself. The executor resolves
65
+ * the root item's GUID via a pre-seeded `crossRecipeRefs` entry the
66
+ * orchestrator pipeline-step provides at runtime.
67
+ */
68
+ pageDesignsRoot?: string;
69
+ /**
70
+ * Phase 4: required for `ContentItemRecipe` compilation. Where shared
71
+ * content items land — typically `/sitecore/content/<tenant>/<site>/Data`
72
+ * or a sub-bucket for SXA sites. ContentItemRecipes encode `kind: "shared"`
73
+ * datasource targets referenced from partial / page design layouts.
74
+ */
75
+ contentItemsRoot?: string;
76
+ /**
77
+ * Phase 5: required for `SiteTemplateRecipe` compilation. Where SXA
78
+ * Site Template items land — typically `/sitecore/templates/Project/<brand>`
79
+ * or a sub-folder for module groupings. Site templates are reusable
80
+ * brand-shape definitions; `SiteRecipe` instances reference one via
81
+ * `siteTemplate` and the Sites API instantiates it.
82
+ */
83
+ siteTemplatesRoot?: string;
84
+ /**
85
+ * Site name — e.g. `solterra`. Drives deterministic refKeys for
86
+ * site-scoped folders (section folders, Component Folders subfolders,
87
+ * Presentation Parameters subfolders, Content Models group folders).
88
+ * When unset, folder-creation ops fall back to a `default` site name
89
+ * to keep refKeys stable; production callers should always set this.
90
+ */
91
+ site?: string;
92
+ /**
93
+ * SXA Headless variants root, e.g.
94
+ * `/sitecore/content/<siteCollection>/<site>/Presentation/Headless Variants`.
95
+ * Each component-template recipe's variants land at
96
+ * `<headlessVariantsRoot>/<section>/<Component>/<Variant>` and conform
97
+ * to the SXA `Variant Definition` template. The two grouping levels
98
+ * (section + per-component) use `HeadlessVariantsGrouping` and
99
+ * `HeadlessVariants` respectively.
100
+ *
101
+ * Required for any recipe that declares `variants`. The compiler
102
+ * throws INPUT_INVALID before emitting variant ops if it's missing —
103
+ * the legacy "variants nested under the rendering item" location no
104
+ * longer matches SXA Headless and is no longer supported.
105
+ */
106
+ headlessVariantsRoot?: string;
107
+ /**
108
+ * Enumerations root, e.g.
109
+ * `/sitecore/content/<siteCollection>/<site>/Settings/Enumerations`.
110
+ * Each `EnumerationRecipe` lands at `<enumerationsRoot>/<EnumName>`
111
+ * with one child item per value. Required for `EnumerationRecipe`
112
+ * compilation; required for `ComponentTemplateRecipe`/
113
+ * `ParametersTemplateRecipe` compilation when any field carries
114
+ * `sitecore.enumHandle`. Compiler throws INPUT_INVALID with a clear
115
+ * message when needed but missing.
116
+ */
117
+ enumerationsRoot?: string;
118
+ /**
119
+ * Cross-recipe signal populated by `compileRecipeSet` when two or more
120
+ * `ComponentTemplateRecipe`s in the set declare site-scoped datasource
121
+ * locations against the same `subfolder`. Membership flips per-recipe
122
+ * Data Folder template emission OFF (the coalescer emits a SHARED
123
+ * template instead) and changes the folder ITEM's `templateOf` to point
124
+ * at `sharedDataFolderTemplateId(site, subfolder)`.
125
+ *
126
+ * Optional. Standalone callers of `compileComponentTemplateRecipe`
127
+ * leave this unset — every site-scoped subfolder is treated as a
128
+ * singleton (per-recipe template owns the folder), preserving the
129
+ * pre-coalescer behaviour.
130
+ */
131
+ sharedSubfolders?: ReadonlySet<string>;
132
+ /**
133
+ * Cross-recipe map of section handles → `ComponentSectionRecipe`,
134
+ * populated by `compileRecipeSet` from every `component-section`
135
+ * recipe in the input. `compileComponentTemplateRecipe` uses this to
136
+ * resolve `recipe.section.handle` → section name (for path
137
+ * computation) and to validate the reference exists (else
138
+ * INPUT_INVALID).
139
+ *
140
+ * Optional. Standalone callers of `compileComponentTemplateRecipe`
141
+ * leave this unset; the per-recipe compiler then errors on any
142
+ * `recipe.section` reference, since there's no way to resolve it.
143
+ */
144
+ sectionsByHandle?: ReadonlyMap<string, import("../schema/recipe").ComponentSectionRecipe>;
145
+ /**
146
+ * Cross-recipe map of enumeration handles → `EnumerationRecipe`,
147
+ * populated by `compileRecipeSet` from every `enumeration` recipe in
148
+ * the input. Field compilers (`buildFieldOp` → `resolveFieldSource`)
149
+ * use this to resolve `sitecore.enumHandle` → the enum folder's
150
+ * tenant path, so Droplink Source values are emitted as content paths
151
+ * (which SXA Headless's rendering parameter dialog enumerates) rather
152
+ * than `{GUID}` references (which it doesn't honour for Droplink
153
+ * Source).
154
+ *
155
+ * Optional. Standalone callers leave it unset; the field compiler
156
+ * then errors on any `sitecore.enumHandle` reference, since there's
157
+ * no way to resolve the folder path.
158
+ */
159
+ enumsByHandle?: ReadonlyMap<string, import("../schema/recipe").EnumerationRecipe>;
160
+ /**
161
+ * SXA Available Renderings root, e.g.
162
+ * `/sitecore/content/<siteCollection>/<site>/Presentation/Available Renderings`.
163
+ * `compileRecipeSet` aggregates every component-template recipe by
164
+ * `recipe.section`, emits one `Available Renderings` item per
165
+ * section, and writes the section's renderings (as Sitecore-formatted
166
+ * itemIds) into the `Renderings` multilist field. The SXA editor
167
+ * reads this list when the user composes a page — without it, the
168
+ * editor shows the global rendering list instead of a curated
169
+ * per-section subset.
170
+ *
171
+ * Optional. When unset, compileRecipeSet skips the aggregation
172
+ * entirely. Component-template recipes without `section` are also
173
+ * skipped — there's no section to bucket them under.
174
+ */
175
+ availableRenderingsRoot?: string;
176
+ }
177
+ export declare const PARAMS_SECTION_NAME = "Parameters";
178
+ export declare const DEFAULT_FIELDS_SECTION = "Content";
179
+ export declare const COMPONENT_FOLDERS_BUCKET = "Component Folders";
180
+ export declare const PRESENTATION_PARAMETERS_BUCKET = "Presentation Parameters";
181
+ export declare const joinPath: (parent: string, name: string) => string;
182
+ /** Site name for deterministic folder refKeys. */
183
+ export declare const siteOf: (context: CompileContext) => string;
184
+ /**
185
+ * Resolve a `sitecore.enumHandle` reference to the tenant content path
186
+ * the enumeration's folder lives at. Used by `resolveFieldSource` to
187
+ * emit Droplink Source values as content paths (the form SXA Headless's
188
+ * rendering parameter dialog accepts) rather than `{GUID}` references.
189
+ *
190
+ * Path shape:
191
+ * - With `location.folder` set →
192
+ * `<enumerationsRoot>/<folder>/<enum.name>`.
193
+ * - Without `location.folder` → `<enumerationsRoot>/<enum.name>` (flat).
194
+ *
195
+ * Throws INPUT_INVALID when the enum handle isn't in the recipe set
196
+ * (author error: `sitecore.enumHandle` references something that
197
+ * doesn't exist), or when `enumerationsRoot` is unset on the context.
198
+ */
199
+ export declare const resolveEnumFolderPath: (context: CompileContext, enumHandle: string, consumerHandle: string) => string;
200
+ export declare function sharedField(fieldGuid: string, value: FieldValue["value"]): FieldValue;
201
+ export declare function versionedField(fieldGuid: string, value: FieldValue["value"]): FieldValue;
202
+ /**
203
+ * Resolve the parent path under which a `ComponentTemplateRecipe`'s
204
+ * template item lands.
205
+ *
206
+ * - With section + componentsRoot → `<componentsRoot>/<section>` (new layout).
207
+ * - With section only → `<templatesRoot>/<section>` (mid-migration fallback).
208
+ * - Without section → `<templatesRoot>` (legacy flat layout).
209
+ */
210
+ export declare const resolveComponentTemplateParent: (context: CompileContext, section: string | undefined) => string;
211
+ /**
212
+ * Resolve the parent path for a Component Folder template — the
213
+ * `<Component> Folder` items emitted when a recipe declares
214
+ * `children:`. Always nested under
215
+ * `<sectionRoot>/Component Folders/`.
216
+ */
217
+ export declare const resolveComponentFoldersBucketPath: (context: CompileContext, section: string) => string;
218
+ /**
219
+ * Resolve the parent path for a Presentation Parameters template —
220
+ * `<sectionRoot>/Presentation Parameters/`. When the recipe lacks a
221
+ * section (legacy callers), parameters templates land directly under
222
+ * `templatesRoot` to match the old flat layout.
223
+ */
224
+ export declare const resolvePresentationParametersBucketPath: (context: CompileContext, section: string | undefined) => string;
225
+ /**
226
+ * Resolve the parent path for the rendering item.
227
+ *
228
+ * - With section → `<renderingsRoot>/<section>/<Component>`.
229
+ * - Without → legacy flat `<renderingsRoot>/<Component>`.
230
+ */
231
+ export declare const resolveRenderingParent: (context: CompileContext, section: string | undefined) => string;
232
+ /**
233
+ * Ensure a section folder (under `componentsRoot/<section>`) exists.
234
+ * Idempotent: emits a CreateOnly CreateItem op the first time a given
235
+ * (site, section) pair is seen and records the refKey in the
236
+ * `emittedFolders` set so subsequent calls are no-ops.
237
+ *
238
+ * Returns the section folder's refKey for downstream callers that want
239
+ * to nest items under it.
240
+ */
241
+ export declare const ensureSectionFolder: (operations: Operation[], context: CompileContext, section: string, emittedFolders: Set<string>) => string;
242
+ /**
243
+ * Ensure a "Component Folders" subfolder exists under the section
244
+ * folder. Idempotent.
245
+ */
246
+ export declare const ensureComponentFoldersBucket: (operations: Operation[], context: CompileContext, section: string, emittedFolders: Set<string>) => string;
247
+ /**
248
+ * Ensure a "Presentation Parameters" subfolder exists under the section
249
+ * folder. Idempotent.
250
+ */
251
+ export declare const ensurePresentationParametersBucket: (operations: Operation[], context: CompileContext, section: string, emittedFolders: Set<string>) => string;
252
+ /**
253
+ * Ensure a section subfolder under the renderings tree exists —
254
+ * `<renderingsRoot>/<section>/`. Mirrors the templates side; the
255
+ * rendering tree shape mirrors the template tree per the layout plan.
256
+ */
257
+ export declare const ensureRenderingsSectionFolder: (operations: Operation[], context: CompileContext, section: string, emittedFolders: Set<string>) => string;
258
+ /**
259
+ * Ensure a Content Models group folder exists. Returns the refKey for
260
+ * downstream `CreateItem.parent` references. Idempotent across
261
+ * repeated calls within one recipe-set compile.
262
+ */
263
+ export declare const ensureContentModelsGroupFolder: (operations: Operation[], context: CompileContext, group: string, emittedFolders: Set<string>) => string | undefined;
264
+ /**
265
+ * Per-site SXA-style enumeration template trio. Three templates with
266
+ * distinct roles — emitted as siblings under the site's
267
+ * `Presentation/` templates folder:
268
+ *
269
+ * Enumerations Folder → folder layers in the enum content tree
270
+ * (root, per-folder grouping items)
271
+ * └── __Standard Values Insert Options: Enumeration + Enumerations Folder
272
+ *
273
+ * Enumeration → per-enum container items
274
+ * (`Color Scheme`, `Heading Size`, etc.)
275
+ * └── __Standard Values Insert Options: Enumeration Value
276
+ *
277
+ * Enumeration Value → leaf value items
278
+ * (`primary`, `accent`, `lg`, `shooting-star`)
279
+ * └── Enumeration (section)
280
+ * └── Value (Single-Line Text, shared)
281
+ *
282
+ * All three inherit from Standard Template only and stamp the
283
+ * `keyboard_key_e.png` icon so the SXA editor recognises enum items
284
+ * as enumeration entries (not folders) without per-item icon overrides.
285
+ *
286
+ * The `Value` field on `Enumeration Value` carries each value item's
287
+ * actual enumeration string (`"primary"`, `"shooting-star"`, etc.) —
288
+ * the canonical SXA "picked item's Value field" payload that Droplink
289
+ * consumers (XM Cloud Pages, JSS variants, custom Edge resolvers) read.
290
+ *
291
+ * Insert Options are wired so authors can right-click without picking
292
+ * templates from a long list:
293
+ * - Inside an `Enumerations Folder` → Insert: `Enumeration` (typical)
294
+ * or `Enumerations Folder` (nesting, e.g. `Theme/Color`)
295
+ * - Inside an `Enumeration` → Insert: `Enumeration Value` only
296
+ * - Inside an `Enumeration Value` → no Insert Options (leaves)
297
+ *
298
+ * Idempotent across the recipe set — the templates are emitted on
299
+ * first call and re-uses are no-ops via the shared `emittedFolders`
300
+ * set. Returns the deterministic refKeys for all three templates +
301
+ * the `Value` field so callers can wire `templateOf` and `Value` field
302
+ * writes correctly.
303
+ */
304
+ export interface EnumerationTemplateRefs {
305
+ folderTemplateRefKey: string;
306
+ /** Per-enum container template (Color Scheme, Heading Size, …). */
307
+ enumerationTemplateRefKey: string;
308
+ /**
309
+ * RefKey of the `Value` Template Field under the *Enumeration*
310
+ * template's inner `Enumeration` section. Carries each per-enum
311
+ * container's canonical default (driven by `EnumerationRecipe.default`).
312
+ * Distinct from `valueFieldRefKey` (which is on the Enumeration Value
313
+ * template, for leaf items).
314
+ */
315
+ containerValueFieldRefKey: string;
316
+ /** Leaf value template (primary, accent, lg, …). Carries the `Value` field. */
317
+ valueTemplateRefKey: string;
318
+ /**
319
+ * RefKey of the `Value` Template Field under the Enumeration Value
320
+ * template. Callers writing the field on individual value items pair
321
+ * this with `fieldName: "Value"` so the executor's tenant-side
322
+ * resolver can locate the field by name (recipe-derived field GUIDs
323
+ * don't match the Sitecore-assigned ones).
324
+ */
325
+ valueFieldRefKey: string;
326
+ }
327
+ export declare const ensureEnumerationTemplates: (operations: Operation[], context: CompileContext, site: string, emittedFolders: Set<string>) => EnumerationTemplateRefs;
328
+ export interface DatasourceTemplateInput {
329
+ handle: string;
330
+ name: string;
331
+ displayName: string;
332
+ fields: FieldDefinition[];
333
+ insertOptions?: string[];
334
+ /**
335
+ * Optional override for the template's parent path. When set, the
336
+ * template lands at `<parentPath>/<name>` and `parent` resolves via
337
+ * `ref-path`. When omitted, falls back to `context.templatesRoot`
338
+ * for back-compat with the legacy flat layout.
339
+ */
340
+ parentPath?: string;
341
+ /**
342
+ * Optional override for the template's parent — when the parent has
343
+ * already been emitted as a CreateItem op in this set (e.g. a section
344
+ * folder), passing the refKey here lets the planner resolve via the
345
+ * captured-itemId map without needing a path-based lookup. Mutually
346
+ * exclusive with `parentPath`'s refKey-as-string semantics.
347
+ */
348
+ parentRefKey?: string;
349
+ /**
350
+ * Extra template GUIDs to append to the synthesised
351
+ * `SetBaseTemplates` op (in addition to the implicit Standard
352
+ * Template). Used by `compileComponentTemplateRecipe` to wire in the
353
+ * SXA Foundation bases (`SXA_COMPONENT_BASE_TEMPLATES`) so the
354
+ * resulting template is recognised as an SXA Headless component;
355
+ * datasource-only callers (`compileContentTemplateRecipe`) leave it
356
+ * unset so content templates stay shape-pure.
357
+ */
358
+ additionalBaseTemplates?: readonly string[];
359
+ }
360
+ export declare function emitDatasourceTemplate(operations: Operation[], recipe: DatasourceTemplateInput, context: CompileContext, icon: string, policy: PushPolicy): void;
361
+ export interface BuildFieldOpInput {
362
+ recipeHandle: string;
363
+ fieldRefKey: string;
364
+ fieldPath: string;
365
+ parentRefKey: string;
366
+ labelPrefix: string;
367
+ field: FieldDefinition | ParamDefinition;
368
+ zeroBasedIndex: number;
369
+ policy: PushPolicy;
370
+ /**
371
+ * Site name the recipe set is being compiled under. Threaded through to
372
+ * `resolveFieldSource` so the emitted `ref-source-fields` value carries
373
+ * the site — the executor's resolver needs it to derive `templateId(site,
374
+ * handle)` for handle references in `sourceTypes`.
375
+ */
376
+ site: string;
377
+ /**
378
+ * Compile context — used by `resolveFieldSource` to look up
379
+ * `sitecore.enumHandle` references against `enumsByHandle` and emit
380
+ * the enum's tenant content path as the Droplink Source value.
381
+ * Standalone callers can omit it, but any field with
382
+ * `sitecore.enumHandle` will then throw INPUT_INVALID since the path
383
+ * can't be resolved.
384
+ */
385
+ context?: CompileContext;
386
+ }
387
+ /**
388
+ * Build the CreateItem op for a single field definition.
389
+ *
390
+ * Always returns exactly one op — the field-definition item itself.
391
+ * Backing storage for enum-shaped fields is decided by the field's
392
+ * `sitecore.type` / `sitecore.enumHandle` and resolved into the
393
+ * `Source` field via `resolveFieldSource`:
394
+ * - `sitecore.type: "droplist"` + inline `values: [...]` → Source is
395
+ * a pipe-separated literal; Sitecore enumerates the string directly,
396
+ * no value items needed.
397
+ * - `sitecore.enumHandle: "<handle>"` (Droplink default) → Source is
398
+ * the EnumerationRecipe's folder path on the tenant; the picker
399
+ * enumerates that path's children at editor time. The values live
400
+ * under the `EnumerationRecipe`'s folder item, emitted by
401
+ * `compileEnumerationRecipe`.
402
+ *
403
+ * Inline Droplink (`shape: "enum"` + inline `values` + no `enumHandle`
404
+ * + no `sitecore.type` override) is rejected by `resolveFieldSource`
405
+ * with INPUT_INVALID — it never reliably worked in SXA Headless's
406
+ * rendering parameters dialog (the picker couldn't enumerate the
407
+ * per-field folder), so authors must commit to one of the two
408
+ * supported shapes.
409
+ */
410
+ export declare function buildFieldOp(input: BuildFieldOpInput): Operation[];
411
+ /**
412
+ * Build the field-default entries for a template's `__Standard Values`
413
+ * item. Each entry carries the field's recipe-derived `fieldId` AND
414
+ * `fieldName` — Sitecore resolves recipe-created field GUIDs by name
415
+ * against the SV item's template (the recipe-derived id won't match the
416
+ * tenant's server-assigned field-definition id; the name lookup is what
417
+ * actually writes the value).
418
+ *
419
+ * Reference-shape defaults (link / image / treelist, plus
420
+ * non-enum-backed droplink) are skipped silently — those need encoded
421
+ * GUIDs or structured payloads that the simple `default: "string"`
422
+ * recipe surface can't express. Authors who need defaults for those
423
+ * can layer them in via a `ContentItemRecipe` that targets the SV
424
+ * path explicitly.
425
+ *
426
+ * Enum-shaped fields branch on the resolved Type:
427
+ * - **Type=Droplist** (override): default is the raw string. Droplist
428
+ * reads its options from a pipe-separated Source; SV default is a
429
+ * name match against that list.
430
+ * - **Type=Droplink + `sitecore.enumHandle`** (the canonical shared
431
+ * enum shape): default is a `ref-recipe` GUID reference to the
432
+ * value item under `enumerationFolderId(site, enumHandle)`.
433
+ * - **Type=Droplink without `sitecore.enumHandle`** (inline Droplink):
434
+ * unsupported — `resolveFieldSource` rejects it upstream and this
435
+ * function throws defensively if it ever reaches here.
436
+ *
437
+ * If the declared default isn't actually one of the enum's values, the
438
+ * derived GUID won't exist on the tenant and the SV write fails at
439
+ * apply time — author error, not silently masked here.
440
+ */
441
+ export declare function buildStandardValuesFieldEntries(site: string, handle: string, fields: ReadonlyArray<FieldDefinition | ParamDefinition>, fieldIdResolver?: (site: string, handle: string, fieldName: string) => string): FieldValue[];
442
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/recipe/compile/shared.ts"],"names":[],"mappings":"AAsBA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,UAAU,EAKhB,MAAM,kBAAkB,CAAC;AAY1B,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAQ9E;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;;;;;;;OAUG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;;;;;;;;;OAWG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;;;;;OASG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;;;;;;;OAaG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;;;;;;;OASG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;;;;;;;OAYG;IACH,gBAAgB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACvC;;;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