@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.
- package/AGENTS.md +67 -0
- package/LICENSE +21 -0
- package/README.md +357 -0
- package/bin/sitecoreai-cli +3 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +358 -0
- package/dist/commands/config.d.ts +3 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +27 -0
- package/dist/commands/deploy/deployments.d.ts +3 -0
- package/dist/commands/deploy/deployments.d.ts.map +1 -0
- package/dist/commands/deploy/deployments.js +58 -0
- package/dist/commands/deploy/editing-host.d.ts +3 -0
- package/dist/commands/deploy/editing-host.d.ts.map +1 -0
- package/dist/commands/deploy/editing-host.js +49 -0
- package/dist/commands/deploy/environments/deployments.d.ts +3 -0
- package/dist/commands/deploy/environments/deployments.d.ts.map +1 -0
- package/dist/commands/deploy/environments/deployments.js +28 -0
- package/dist/commands/deploy/environments/index.d.ts +3 -0
- package/dist/commands/deploy/environments/index.d.ts.map +1 -0
- package/dist/commands/deploy/environments/index.js +29 -0
- package/dist/commands/deploy/environments/mutations.d.ts +9 -0
- package/dist/commands/deploy/environments/mutations.d.ts.map +1 -0
- package/dist/commands/deploy/environments/mutations.js +103 -0
- package/dist/commands/deploy/environments/queries.d.ts +7 -0
- package/dist/commands/deploy/environments/queries.d.ts.map +1 -0
- package/dist/commands/deploy/environments/queries.js +56 -0
- package/dist/commands/deploy/environments/variables.d.ts +3 -0
- package/dist/commands/deploy/environments/variables.d.ts.map +1 -0
- package/dist/commands/deploy/environments/variables.js +40 -0
- package/dist/commands/deploy/environments.d.ts +2 -0
- package/dist/commands/deploy/environments.d.ts.map +1 -0
- package/dist/commands/deploy/environments.js +17 -0
- package/dist/commands/deploy/index.d.ts +3 -0
- package/dist/commands/deploy/index.d.ts.map +1 -0
- package/dist/commands/deploy/index.js +26 -0
- package/dist/commands/deploy/logs.d.ts +3 -0
- package/dist/commands/deploy/logs.d.ts.map +1 -0
- package/dist/commands/deploy/logs.js +39 -0
- package/dist/commands/deploy/organizations.d.ts +3 -0
- package/dist/commands/deploy/organizations.d.ts.map +1 -0
- package/dist/commands/deploy/organizations.js +29 -0
- package/dist/commands/deploy/projects.d.ts +3 -0
- package/dist/commands/deploy/projects.d.ts.map +1 -0
- package/dist/commands/deploy/projects.js +74 -0
- package/dist/commands/deploy/shared.d.ts +3 -0
- package/dist/commands/deploy/shared.d.ts.map +1 -0
- package/dist/commands/deploy/shared.js +12 -0
- package/dist/commands/deploy/site.d.ts +10 -0
- package/dist/commands/deploy/site.d.ts.map +1 -0
- package/dist/commands/deploy/site.js +36 -0
- package/dist/commands/deploy/source-control.d.ts +3 -0
- package/dist/commands/deploy/source-control.d.ts.map +1 -0
- package/dist/commands/deploy/source-control.js +89 -0
- package/dist/commands/deploy.d.ts +2 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/commands/deploy.js +5 -0
- package/dist/commands/history.d.ts +3 -0
- package/dist/commands/history.d.ts.map +1 -0
- package/dist/commands/history.js +88 -0
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +32 -0
- package/dist/commands/login.d.ts +3 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +21 -0
- package/dist/commands/logout.d.ts +3 -0
- package/dist/commands/logout.d.ts.map +1 -0
- package/dist/commands/logout.js +18 -0
- package/dist/commands/recipe/index.d.ts +3 -0
- package/dist/commands/recipe/index.d.ts.map +1 -0
- package/dist/commands/recipe/index.js +158 -0
- package/dist/commands/serialization/index.d.ts +3 -0
- package/dist/commands/serialization/index.d.ts.map +1 -0
- package/dist/commands/serialization/index.js +89 -0
- package/dist/commands/serialization/package.d.ts +3 -0
- package/dist/commands/serialization/package.d.ts.map +1 -0
- package/dist/commands/serialization/package.js +36 -0
- package/dist/commands/shared.d.ts +21 -0
- package/dist/commands/shared.d.ts.map +1 -0
- package/dist/commands/shared.js +82 -0
- package/dist/commands/shell.d.ts +10 -0
- package/dist/commands/shell.d.ts.map +1 -0
- package/dist/commands/shell.js +155 -0
- package/dist/commands/status.d.ts +3 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +15 -0
- package/dist/commands/telemetry.d.ts +3 -0
- package/dist/commands/telemetry.d.ts.map +1 -0
- package/dist/commands/telemetry.js +28 -0
- package/dist/config/env-overrides.d.ts +4 -0
- package/dist/config/env-overrides.d.ts.map +1 -0
- package/dist/config/env-overrides.js +199 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +13 -0
- package/dist/config/modules.d.ts +4 -0
- package/dist/config/modules.d.ts.map +1 -0
- package/dist/config/modules.js +152 -0
- package/dist/config/paths.d.ts +2 -0
- package/dist/config/paths.d.ts.map +1 -0
- package/dist/config/paths.js +39 -0
- package/dist/config/root-config.d.ts +10 -0
- package/dist/config/root-config.d.ts.map +1 -0
- package/dist/config/root-config.js +159 -0
- package/dist/config/schema.json +278 -0
- package/dist/config/serialization-module.schema.json +127 -0
- package/dist/config/telemetry.schema.json +21 -0
- package/dist/config/types.d.ts +245 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +19 -0
- package/dist/config/validation.d.ts +10 -0
- package/dist/config/validation.d.ts.map +1 -0
- package/dist/config/validation.js +43 -0
- package/dist/deploy/api/common/headers.d.ts +2 -0
- package/dist/deploy/api/common/headers.d.ts.map +1 -0
- package/dist/deploy/api/common/headers.js +10 -0
- package/dist/deploy/api/common/index.d.ts +4 -0
- package/dist/deploy/api/common/index.d.ts.map +1 -0
- package/dist/deploy/api/common/index.js +19 -0
- package/dist/deploy/api/common/request.d.ts +9 -0
- package/dist/deploy/api/common/request.d.ts.map +1 -0
- package/dist/deploy/api/common/request.js +253 -0
- package/dist/deploy/api/common/types.d.ts +44 -0
- package/dist/deploy/api/common/types.d.ts.map +1 -0
- package/dist/deploy/api/common/types.js +5 -0
- package/dist/deploy/api/common.d.ts +2 -0
- package/dist/deploy/api/common.d.ts.map +1 -0
- package/dist/deploy/api/common.js +17 -0
- package/dist/deploy/api/deployment-logs.d.ts +2 -0
- package/dist/deploy/api/deployment-logs.d.ts.map +1 -0
- package/dist/deploy/api/deployment-logs.js +23 -0
- package/dist/deploy/api/deployments.d.ts +9 -0
- package/dist/deploy/api/deployments.d.ts.map +1 -0
- package/dist/deploy/api/deployments.js +61 -0
- package/dist/deploy/api/environments.d.ts +21 -0
- package/dist/deploy/api/environments.d.ts.map +1 -0
- package/dist/deploy/api/environments.js +67 -0
- package/dist/deploy/api/index.d.ts +9 -0
- package/dist/deploy/api/index.d.ts.map +1 -0
- package/dist/deploy/api/index.js +24 -0
- package/dist/deploy/api/logs.d.ts +8 -0
- package/dist/deploy/api/logs.d.ts.map +1 -0
- package/dist/deploy/api/logs.js +29 -0
- package/dist/deploy/api/organizations.d.ts +6 -0
- package/dist/deploy/api/organizations.d.ts.map +1 -0
- package/dist/deploy/api/organizations.js +18 -0
- package/dist/deploy/api/projects.d.ts +13 -0
- package/dist/deploy/api/projects.d.ts.map +1 -0
- package/dist/deploy/api/projects.js +42 -0
- package/dist/deploy/api/source-control.d.ts +15 -0
- package/dist/deploy/api/source-control.d.ts.map +1 -0
- package/dist/deploy/api/source-control.js +71 -0
- package/dist/deploy/api.d.ts +2 -0
- package/dist/deploy/api.d.ts.map +1 -0
- package/dist/deploy/api.js +17 -0
- package/dist/deploy/tasks/deployment-result.d.ts +6 -0
- package/dist/deploy/tasks/deployment-result.d.ts.map +1 -0
- package/dist/deploy/tasks/deployment-result.js +36 -0
- package/dist/deploy/tasks/deployments.d.ts +10 -0
- package/dist/deploy/tasks/deployments.d.ts.map +1 -0
- package/dist/deploy/tasks/deployments.js +201 -0
- package/dist/deploy/tasks/editing-host.d.ts +28 -0
- package/dist/deploy/tasks/editing-host.d.ts.map +1 -0
- package/dist/deploy/tasks/editing-host.js +216 -0
- package/dist/deploy/tasks/environments.d.ts +20 -0
- package/dist/deploy/tasks/environments.d.ts.map +1 -0
- package/dist/deploy/tasks/environments.js +364 -0
- package/dist/deploy/tasks/index.d.ts +10 -0
- package/dist/deploy/tasks/index.d.ts.map +1 -0
- package/dist/deploy/tasks/index.js +25 -0
- package/dist/deploy/tasks/logs.d.ts +5 -0
- package/dist/deploy/tasks/logs.d.ts.map +1 -0
- package/dist/deploy/tasks/logs.js +56 -0
- package/dist/deploy/tasks/organizations.d.ts +6 -0
- package/dist/deploy/tasks/organizations.d.ts.map +1 -0
- package/dist/deploy/tasks/organizations.js +51 -0
- package/dist/deploy/tasks/projects.d.ts +11 -0
- package/dist/deploy/tasks/projects.d.ts.map +1 -0
- package/dist/deploy/tasks/projects.js +246 -0
- package/dist/deploy/tasks/shared.d.ts +63 -0
- package/dist/deploy/tasks/shared.d.ts.map +1 -0
- package/dist/deploy/tasks/shared.js +261 -0
- package/dist/deploy/tasks/site-bind.d.ts +21 -0
- package/dist/deploy/tasks/site-bind.d.ts.map +1 -0
- package/dist/deploy/tasks/site-bind.js +142 -0
- package/dist/deploy/tasks/site.d.ts +14 -0
- package/dist/deploy/tasks/site.d.ts.map +1 -0
- package/dist/deploy/tasks/site.js +29 -0
- package/dist/deploy/tasks/source-control.d.ts +14 -0
- package/dist/deploy/tasks/source-control.d.ts.map +1 -0
- package/dist/deploy/tasks/source-control.js +173 -0
- package/dist/deploy/tasks/types.d.ts +204 -0
- package/dist/deploy/tasks/types.d.ts.map +1 -0
- package/dist/deploy/tasks/types.js +7 -0
- package/dist/deploy/tasks.d.ts +3 -0
- package/dist/deploy/tasks.d.ts.map +1 -0
- package/dist/deploy/tasks.js +18 -0
- package/dist/recipe/api/auth.d.ts +9 -0
- package/dist/recipe/api/auth.d.ts.map +1 -0
- package/dist/recipe/api/auth.js +12 -0
- package/dist/recipe/api/authoring-client.d.ts +37 -0
- package/dist/recipe/api/authoring-client.d.ts.map +1 -0
- package/dist/recipe/api/authoring-client.js +495 -0
- package/dist/recipe/api/client.d.ts +99 -0
- package/dist/recipe/api/client.d.ts.map +1 -0
- package/dist/recipe/api/client.js +17 -0
- package/dist/recipe/api/graphql.d.ts +15 -0
- package/dist/recipe/api/graphql.d.ts.map +1 -0
- package/dist/recipe/api/graphql.js +38 -0
- package/dist/recipe/api/ref-encoding.d.ts +38 -0
- package/dist/recipe/api/ref-encoding.d.ts.map +1 -0
- package/dist/recipe/api/ref-encoding.js +160 -0
- package/dist/recipe/api/site-discovery.d.ts +49 -0
- package/dist/recipe/api/site-discovery.d.ts.map +1 -0
- package/dist/recipe/api/site-discovery.js +127 -0
- package/dist/recipe/api/sites-client.d.ts +48 -0
- package/dist/recipe/api/sites-client.d.ts.map +1 -0
- package/dist/recipe/api/sites-client.js +19 -0
- package/dist/recipe/cache.d.ts +36 -0
- package/dist/recipe/cache.d.ts.map +1 -0
- package/dist/recipe/cache.js +114 -0
- package/dist/recipe/compile/component-section.d.ts +46 -0
- package/dist/recipe/compile/component-section.d.ts.map +1 -0
- package/dist/recipe/compile/component-section.js +143 -0
- package/dist/recipe/compile/component-template.d.ts +34 -0
- package/dist/recipe/compile/component-template.d.ts.map +1 -0
- package/dist/recipe/compile/component-template.js +709 -0
- package/dist/recipe/compile/content-item.d.ts +31 -0
- package/dist/recipe/compile/content-item.d.ts.map +1 -0
- package/dist/recipe/compile/content-item.js +189 -0
- package/dist/recipe/compile/content-template.d.ts +18 -0
- package/dist/recipe/compile/content-template.d.ts.map +1 -0
- package/dist/recipe/compile/content-template.js +52 -0
- package/dist/recipe/compile/enumeration.d.ts +59 -0
- package/dist/recipe/compile/enumeration.d.ts.map +1 -0
- package/dist/recipe/compile/enumeration.js +236 -0
- package/dist/recipe/compile/page-design.d.ts +22 -0
- package/dist/recipe/compile/page-design.d.ts.map +1 -0
- package/dist/recipe/compile/page-design.js +93 -0
- package/dist/recipe/compile/parameters-template.d.ts +14 -0
- package/dist/recipe/compile/parameters-template.d.ts.map +1 -0
- package/dist/recipe/compile/parameters-template.js +92 -0
- package/dist/recipe/compile/partial-design.d.ts +18 -0
- package/dist/recipe/compile/partial-design.d.ts.map +1 -0
- package/dist/recipe/compile/partial-design.js +76 -0
- package/dist/recipe/compile/section-definition.d.ts +18 -0
- package/dist/recipe/compile/section-definition.d.ts.map +1 -0
- package/dist/recipe/compile/section-definition.js +26 -0
- package/dist/recipe/compile/shared.d.ts +442 -0
- package/dist/recipe/compile/shared.d.ts.map +1 -0
- package/dist/recipe/compile/shared.js +843 -0
- package/dist/recipe/compile/site-template.d.ts +52 -0
- package/dist/recipe/compile/site-template.d.ts.map +1 -0
- package/dist/recipe/compile/site-template.js +140 -0
- package/dist/recipe/compile/site.d.ts +44 -0
- package/dist/recipe/compile/site.d.ts.map +1 -0
- package/dist/recipe/compile/site.js +127 -0
- package/dist/recipe/compile.d.ts +93 -0
- package/dist/recipe/compile.d.ts.map +1 -0
- package/dist/recipe/compile.js +741 -0
- package/dist/recipe/execute.d.ts +119 -0
- package/dist/recipe/execute.d.ts.map +1 -0
- package/dist/recipe/execute.js +273 -0
- package/dist/recipe/guids.d.ts +400 -0
- package/dist/recipe/guids.d.ts.map +1 -0
- package/dist/recipe/guids.js +488 -0
- package/dist/recipe/index.d.ts +32 -0
- package/dist/recipe/index.d.ts.map +1 -0
- package/dist/recipe/index.js +156 -0
- package/dist/recipe/io.d.ts +21 -0
- package/dist/recipe/io.d.ts.map +1 -0
- package/dist/recipe/io.js +147 -0
- package/dist/recipe/ir/operations.d.ts +692 -0
- package/dist/recipe/ir/operations.d.ts.map +1 -0
- package/dist/recipe/ir/operations.js +347 -0
- package/dist/recipe/ir/sitecore-templates.d.ts +455 -0
- package/dist/recipe/ir/sitecore-templates.d.ts.map +1 -0
- package/dist/recipe/ir/sitecore-templates.js +465 -0
- package/dist/recipe/layout/emit.d.ts +101 -0
- package/dist/recipe/layout/emit.d.ts.map +1 -0
- package/dist/recipe/layout/emit.js +127 -0
- package/dist/recipe/layout/templates-mapping.d.ts +28 -0
- package/dist/recipe/layout/templates-mapping.d.ts.map +1 -0
- package/dist/recipe/layout/templates-mapping.js +29 -0
- package/dist/recipe/plan.d.ts +134 -0
- package/dist/recipe/plan.d.ts.map +1 -0
- package/dist/recipe/plan.js +565 -0
- package/dist/recipe/policy.d.ts +43 -0
- package/dist/recipe/policy.d.ts.map +1 -0
- package/dist/recipe/policy.js +75 -0
- package/dist/recipe/rollback.d.ts +72 -0
- package/dist/recipe/rollback.d.ts.map +1 -0
- package/dist/recipe/rollback.js +130 -0
- package/dist/recipe/schema/field-types.d.ts +72 -0
- package/dist/recipe/schema/field-types.d.ts.map +1 -0
- package/dist/recipe/schema/field-types.js +118 -0
- package/dist/recipe/schema/recipe.d.ts +1545 -0
- package/dist/recipe/schema/recipe.d.ts.map +1 -0
- package/dist/recipe/schema/recipe.js +1175 -0
- package/dist/recipe/schema/source-fields.d.ts +48 -0
- package/dist/recipe/schema/source-fields.d.ts.map +1 -0
- package/dist/recipe/schema/source-fields.js +79 -0
- package/dist/recipe/tasks/compile.d.ts +14 -0
- package/dist/recipe/tasks/compile.d.ts.map +1 -0
- package/dist/recipe/tasks/compile.js +89 -0
- package/dist/recipe/tasks/diff.d.ts +17 -0
- package/dist/recipe/tasks/diff.d.ts.map +1 -0
- package/dist/recipe/tasks/diff.js +6 -0
- package/dist/recipe/tasks/index.d.ts +9 -0
- package/dist/recipe/tasks/index.d.ts.map +1 -0
- package/dist/recipe/tasks/index.js +13 -0
- package/dist/recipe/tasks/placeholder-allow.d.ts +53 -0
- package/dist/recipe/tasks/placeholder-allow.d.ts.map +1 -0
- package/dist/recipe/tasks/placeholder-allow.js +218 -0
- package/dist/recipe/tasks/plan.d.ts +11 -0
- package/dist/recipe/tasks/plan.d.ts.map +1 -0
- package/dist/recipe/tasks/plan.js +72 -0
- package/dist/recipe/tasks/prune-defaults.d.ts +90 -0
- package/dist/recipe/tasks/prune-defaults.d.ts.map +1 -0
- package/dist/recipe/tasks/prune-defaults.js +184 -0
- package/dist/recipe/tasks/push.d.ts +18 -0
- package/dist/recipe/tasks/push.d.ts.map +1 -0
- package/dist/recipe/tasks/push.js +417 -0
- package/dist/recipe/tasks/shared.d.ts +152 -0
- package/dist/recipe/tasks/shared.d.ts.map +1 -0
- package/dist/recipe/tasks/shared.js +94 -0
- package/dist/recipe/validate.d.ts +103 -0
- package/dist/recipe/validate.d.ts.map +1 -0
- package/dist/recipe/validate.js +297 -0
- package/dist/serialization/commands.d.ts +48 -0
- package/dist/serialization/commands.d.ts.map +1 -0
- package/dist/serialization/commands.js +175 -0
- package/dist/serialization/compare.d.ts +29 -0
- package/dist/serialization/compare.d.ts.map +1 -0
- package/dist/serialization/compare.js +124 -0
- package/dist/serialization/field-filter.d.ts +7 -0
- package/dist/serialization/field-filter.d.ts.map +1 -0
- package/dist/serialization/field-filter.js +20 -0
- package/dist/serialization/filesystem-store/constants.d.ts +3 -0
- package/dist/serialization/filesystem-store/constants.d.ts.map +1 -0
- package/dist/serialization/filesystem-store/constants.js +5 -0
- package/dist/serialization/filesystem-store/index.d.ts +4 -0
- package/dist/serialization/filesystem-store/index.d.ts.map +1 -0
- package/dist/serialization/filesystem-store/index.js +15 -0
- package/dist/serialization/filesystem-store/items.d.ts +10 -0
- package/dist/serialization/filesystem-store/items.d.ts.map +1 -0
- package/dist/serialization/filesystem-store/items.js +64 -0
- package/dist/serialization/filesystem-store/roles.d.ts +6 -0
- package/dist/serialization/filesystem-store/roles.d.ts.map +1 -0
- package/dist/serialization/filesystem-store/roles.js +46 -0
- package/dist/serialization/filesystem-store/users.d.ts +6 -0
- package/dist/serialization/filesystem-store/users.d.ts.map +1 -0
- package/dist/serialization/filesystem-store/users.js +46 -0
- package/dist/serialization/filesystem-store/utils.d.ts +2 -0
- package/dist/serialization/filesystem-store/utils.d.ts.map +1 -0
- package/dist/serialization/filesystem-store/utils.js +17 -0
- package/dist/serialization/filesystem-store.d.ts +2 -0
- package/dist/serialization/filesystem-store.d.ts.map +1 -0
- package/dist/serialization/filesystem-store.js +17 -0
- package/dist/serialization/item-path.d.ts +32 -0
- package/dist/serialization/item-path.d.ts.map +1 -0
- package/dist/serialization/item-path.js +123 -0
- package/dist/serialization/path-provider.d.ts +12 -0
- package/dist/serialization/path-provider.d.ts.map +1 -0
- package/dist/serialization/path-provider.js +271 -0
- package/dist/serialization/signature.d.ts +4 -0
- package/dist/serialization/signature.d.ts.map +1 -0
- package/dist/serialization/signature.js +71 -0
- package/dist/serialization/sitecore-api/auth.d.ts +31 -0
- package/dist/serialization/sitecore-api/auth.d.ts.map +1 -0
- package/dist/serialization/sitecore-api/auth.js +319 -0
- package/dist/serialization/sitecore-api/graphql.d.ts +12 -0
- package/dist/serialization/sitecore-api/graphql.d.ts.map +1 -0
- package/dist/serialization/sitecore-api/graphql.js +20 -0
- package/dist/serialization/sitecore-api/history.d.ts +9 -0
- package/dist/serialization/sitecore-api/history.d.ts.map +1 -0
- package/dist/serialization/sitecore-api/history.js +36 -0
- package/dist/serialization/sitecore-api/index.d.ts +7 -0
- package/dist/serialization/sitecore-api/index.d.ts.map +1 -0
- package/dist/serialization/sitecore-api/index.js +22 -0
- package/dist/serialization/sitecore-api/items.d.ts +8 -0
- package/dist/serialization/sitecore-api/items.d.ts.map +1 -0
- package/dist/serialization/sitecore-api/items.js +132 -0
- package/dist/serialization/sitecore-api/publish.d.ts +14 -0
- package/dist/serialization/sitecore-api/publish.d.ts.map +1 -0
- package/dist/serialization/sitecore-api/publish.js +43 -0
- package/dist/serialization/sitecore-api/roles.d.ts +9 -0
- package/dist/serialization/sitecore-api/roles.d.ts.map +1 -0
- package/dist/serialization/sitecore-api/roles.js +42 -0
- package/dist/serialization/sitecore-api/users.d.ts +9 -0
- package/dist/serialization/sitecore-api/users.d.ts.map +1 -0
- package/dist/serialization/sitecore-api/users.js +62 -0
- package/dist/serialization/sitecore-api.d.ts +2 -0
- package/dist/serialization/sitecore-api.d.ts.map +1 -0
- package/dist/serialization/sitecore-api.js +17 -0
- package/dist/serialization/tasks/diff.d.ts +3 -0
- package/dist/serialization/tasks/diff.d.ts.map +1 -0
- package/dist/serialization/tasks/diff.js +109 -0
- package/dist/serialization/tasks/env/constants.d.ts +2 -0
- package/dist/serialization/tasks/env/constants.d.ts.map +1 -0
- package/dist/serialization/tasks/env/constants.js +4 -0
- package/dist/serialization/tasks/env/deploy-token.d.ts +3 -0
- package/dist/serialization/tasks/env/deploy-token.d.ts.map +1 -0
- package/dist/serialization/tasks/env/deploy-token.js +128 -0
- package/dist/serialization/tasks/env/index.d.ts +5 -0
- package/dist/serialization/tasks/env/index.d.ts.map +1 -0
- package/dist/serialization/tasks/env/index.js +11 -0
- package/dist/serialization/tasks/env/init/auth.d.ts +24 -0
- package/dist/serialization/tasks/env/init/auth.d.ts.map +1 -0
- package/dist/serialization/tasks/env/init/auth.js +122 -0
- package/dist/serialization/tasks/env/init/deploy-lookup.d.ts +22 -0
- package/dist/serialization/tasks/env/init/deploy-lookup.d.ts.map +1 -0
- package/dist/serialization/tasks/env/init/deploy-lookup.js +244 -0
- package/dist/serialization/tasks/env/init.d.ts +3 -0
- package/dist/serialization/tasks/env/init.d.ts.map +1 -0
- package/dist/serialization/tasks/env/init.js +253 -0
- package/dist/serialization/tasks/env/logout.d.ts +3 -0
- package/dist/serialization/tasks/env/logout.d.ts.map +1 -0
- package/dist/serialization/tasks/env/logout.js +61 -0
- package/dist/serialization/tasks/env/status.d.ts +3 -0
- package/dist/serialization/tasks/env/status.d.ts.map +1 -0
- package/dist/serialization/tasks/env/status.js +149 -0
- package/dist/serialization/tasks/env.d.ts +2 -0
- package/dist/serialization/tasks/env.d.ts.map +1 -0
- package/dist/serialization/tasks/env.js +17 -0
- package/dist/serialization/tasks/helpers/collect.d.ts +8 -0
- package/dist/serialization/tasks/helpers/collect.d.ts.map +1 -0
- package/dist/serialization/tasks/helpers/collect.js +29 -0
- package/dist/serialization/tasks/helpers/commands.d.ts +5 -0
- package/dist/serialization/tasks/helpers/commands.d.ts.map +1 -0
- package/dist/serialization/tasks/helpers/commands.js +14 -0
- package/dist/serialization/tasks/helpers/filesystem.d.ts +6 -0
- package/dist/serialization/tasks/helpers/filesystem.d.ts.map +1 -0
- package/dist/serialization/tasks/helpers/filesystem.js +27 -0
- package/dist/serialization/tasks/helpers/index.d.ts +6 -0
- package/dist/serialization/tasks/helpers/index.d.ts.map +1 -0
- package/dist/serialization/tasks/helpers/index.js +13 -0
- package/dist/serialization/tasks/helpers/items.d.ts +3 -0
- package/dist/serialization/tasks/helpers/items.d.ts.map +1 -0
- package/dist/serialization/tasks/helpers/items.js +5 -0
- package/dist/serialization/tasks/helpers/sitecore.d.ts +5 -0
- package/dist/serialization/tasks/helpers/sitecore.d.ts.map +1 -0
- package/dist/serialization/tasks/helpers/sitecore.js +109 -0
- package/dist/serialization/tasks/helpers.d.ts +2 -0
- package/dist/serialization/tasks/helpers.d.ts.map +1 -0
- package/dist/serialization/tasks/helpers.js +17 -0
- package/dist/serialization/tasks/index.d.ts +8 -0
- package/dist/serialization/tasks/index.d.ts.map +1 -0
- package/dist/serialization/tasks/index.js +19 -0
- package/dist/serialization/tasks/info.d.ts +4 -0
- package/dist/serialization/tasks/info.d.ts.map +1 -0
- package/dist/serialization/tasks/info.js +82 -0
- package/dist/serialization/tasks/package.d.ts +4 -0
- package/dist/serialization/tasks/package.d.ts.map +1 -0
- package/dist/serialization/tasks/package.js +171 -0
- package/dist/serialization/tasks/pull.d.ts +3 -0
- package/dist/serialization/tasks/pull.d.ts.map +1 -0
- package/dist/serialization/tasks/pull.js +82 -0
- package/dist/serialization/tasks/push.d.ts +3 -0
- package/dist/serialization/tasks/push.d.ts.map +1 -0
- package/dist/serialization/tasks/push.js +101 -0
- package/dist/serialization/tasks/roles.d.ts +6 -0
- package/dist/serialization/tasks/roles.d.ts.map +1 -0
- package/dist/serialization/tasks/roles.js +103 -0
- package/dist/serialization/tasks/shared.d.ts +19 -0
- package/dist/serialization/tasks/shared.d.ts.map +1 -0
- package/dist/serialization/tasks/shared.js +59 -0
- package/dist/serialization/tasks/types.d.ts +73 -0
- package/dist/serialization/tasks/types.d.ts.map +1 -0
- package/dist/serialization/tasks/types.js +8 -0
- package/dist/serialization/tasks/users.d.ts +5 -0
- package/dist/serialization/tasks/users.d.ts.map +1 -0
- package/dist/serialization/tasks/users.js +90 -0
- package/dist/serialization/tasks/validate.d.ts +5 -0
- package/dist/serialization/tasks/validate.d.ts.map +1 -0
- package/dist/serialization/tasks/validate.js +50 -0
- package/dist/serialization/tasks/watch.d.ts +3 -0
- package/dist/serialization/tasks/watch.d.ts.map +1 -0
- package/dist/serialization/tasks/watch.js +75 -0
- package/dist/serialization/tasks.d.ts +4 -0
- package/dist/serialization/tasks.d.ts.map +1 -0
- package/dist/serialization/tasks.js +19 -0
- package/dist/serialization/tree-spec.d.ts +51 -0
- package/dist/serialization/tree-spec.d.ts.map +1 -0
- package/dist/serialization/tree-spec.js +241 -0
- package/dist/serialization/types.d.ts +75 -0
- package/dist/serialization/types.d.ts.map +1 -0
- package/dist/serialization/types.js +2 -0
- package/dist/serialization/wildcard.d.ts +3 -0
- package/dist/serialization/wildcard.d.ts.map +1 -0
- package/dist/serialization/wildcard.js +24 -0
- package/dist/serialization/yaml.d.ts +9 -0
- package/dist/serialization/yaml.d.ts.map +1 -0
- package/dist/serialization/yaml.js +307 -0
- package/dist/shared/browser.d.ts +2 -0
- package/dist/shared/browser.d.ts.map +1 -0
- package/dist/shared/browser.js +36 -0
- package/dist/shared/cli-options.d.ts +17 -0
- package/dist/shared/cli-options.d.ts.map +1 -0
- package/dist/shared/cli-options.js +8 -0
- package/dist/shared/cli-tasks.d.ts +38 -0
- package/dist/shared/cli-tasks.d.ts.map +1 -0
- package/dist/shared/cli-tasks.js +108 -0
- package/dist/shared/config-template.d.ts +23 -0
- package/dist/shared/config-template.d.ts.map +1 -0
- package/dist/shared/config-template.js +38 -0
- package/dist/shared/env.d.ts +28 -0
- package/dist/shared/env.d.ts.map +1 -0
- package/dist/shared/env.js +38 -0
- package/dist/shared/errors.d.ts +21 -0
- package/dist/shared/errors.d.ts.map +1 -0
- package/dist/shared/errors.js +59 -0
- package/dist/shared/graphql.d.ts +76 -0
- package/dist/shared/graphql.d.ts.map +1 -0
- package/dist/shared/graphql.js +222 -0
- package/dist/shared/history.d.ts +12 -0
- package/dist/shared/history.d.ts.map +1 -0
- package/dist/shared/history.js +62 -0
- package/dist/shared/keychain.d.ts +15 -0
- package/dist/shared/keychain.d.ts.map +1 -0
- package/dist/shared/keychain.js +177 -0
- package/dist/shared/logger.d.ts +24 -0
- package/dist/shared/logger.d.ts.map +1 -0
- package/dist/shared/logger.js +157 -0
- package/dist/shared/output.d.ts +7 -0
- package/dist/shared/output.d.ts.map +1 -0
- package/dist/shared/output.js +21 -0
- package/dist/shared/prompt.d.ts +5 -0
- package/dist/shared/prompt.d.ts.map +1 -0
- package/dist/shared/prompt.js +87 -0
- package/dist/shared/redact.d.ts +3 -0
- package/dist/shared/redact.d.ts.map +1 -0
- package/dist/shared/redact.js +47 -0
- package/dist/shared/spinner.d.ts +5 -0
- package/dist/shared/spinner.d.ts.map +1 -0
- package/dist/shared/spinner.js +89 -0
- package/dist/shared/style.d.ts +2 -0
- package/dist/shared/style.d.ts.map +1 -0
- package/dist/shared/style.js +61 -0
- package/dist/shared/telemetry.d.ts +21 -0
- package/dist/shared/telemetry.d.ts.map +1 -0
- package/dist/shared/telemetry.js +226 -0
- package/dist/shared/validate.d.ts +3 -0
- package/dist/shared/validate.d.ts.map +1 -0
- package/dist/shared/validate.js +32 -0
- package/dist/sites/api/collections.d.ts +25 -0
- package/dist/sites/api/collections.d.ts.map +1 -0
- package/dist/sites/api/collections.js +21 -0
- package/dist/sites/api/index.d.ts +26 -0
- package/dist/sites/api/index.d.ts.map +1 -0
- package/dist/sites/api/index.js +55 -0
- package/dist/sites/api/jobs.d.ts +31 -0
- package/dist/sites/api/jobs.d.ts.map +1 -0
- package/dist/sites/api/jobs.js +10 -0
- package/dist/sites/api/languages.d.ts +22 -0
- package/dist/sites/api/languages.d.ts.map +1 -0
- package/dist/sites/api/languages.js +18 -0
- package/dist/sites/api/request.d.ts +24 -0
- package/dist/sites/api/request.d.ts.map +1 -0
- package/dist/sites/api/request.js +99 -0
- package/dist/sites/api/sites.d.ts +53 -0
- package/dist/sites/api/sites.d.ts.map +1 -0
- package/dist/sites/api/sites.js +41 -0
- package/dist/sites/api/types.d.ts +29 -0
- package/dist/sites/api/types.d.ts.map +1 -0
- package/dist/sites/api/types.js +4 -0
- package/package.json +109 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type OperationIr } from "../ir/operations";
|
|
2
|
+
import { type SiteTemplateRecipe } from "../schema/recipe";
|
|
3
|
+
import { type CompileContext } from "./shared";
|
|
4
|
+
/**
|
|
5
|
+
* Compile a `SiteTemplateRecipe` to an Operation IR.
|
|
6
|
+
*
|
|
7
|
+
* Phase 5 Milestone C-extra refinement — emits the SiteTemplate item
|
|
8
|
+
* (a `Solution template`-typed item under `siteTemplatesRoot`) with
|
|
9
|
+
* the fields SXA's createSite flow actually reads: Name, Description,
|
|
10
|
+
* Enabled, Built-in template marker, plus stub ICON / DISPLAY_NAME.
|
|
11
|
+
*
|
|
12
|
+
* **Design gap (acknowledged, not closed by this commit):** the
|
|
13
|
+
* `SiteTemplateRecipe` schema models brand shape as direct lists of
|
|
14
|
+
* page templates, page designs, an insert-options matrix, a
|
|
15
|
+
* templates-to-designs mapping, dictionary entries, and taxonomy
|
|
16
|
+
* roots. SXA's Solution template doesn't carry any of those directly
|
|
17
|
+
* — it carries a `Site Modules` + `Tenant Modules` list of MODULE
|
|
18
|
+
* item refs, and modules hold the brand structure. Mapping the
|
|
19
|
+
* recipe schema's high-level fields to SXA modules is open work
|
|
20
|
+
* (probably needs a `ModuleRecipe` kind, or a "modules" array on
|
|
21
|
+
* SiteTemplateRecipe that resolves to existing module item GUIDs).
|
|
22
|
+
*
|
|
23
|
+
* Sandbox introspection (2026-05-01) confirmed:
|
|
24
|
+
* - SXA "Site Template" = item conforming to `Solution template`
|
|
25
|
+
* (templateId 1b2dfd3b-f2f2-4f40-a75c-f6c2490919c4)
|
|
26
|
+
* - Built-in templates live at `/sitecore/system/Settings/Foundation/
|
|
27
|
+
* JSS Experience Accelerator/Scaffolding/Templates`
|
|
28
|
+
* - Field GUIDs captured in SITE_TEMPLATE_FIELDS (sitecore-templates.ts)
|
|
29
|
+
*
|
|
30
|
+
* What this commit emits:
|
|
31
|
+
* - CreateItem with the correct `templateOf` GUID
|
|
32
|
+
* - SetField for Name (Solution-template's `Name` field, not __Display Name)
|
|
33
|
+
* - SetField for Description (when recipe.description is set)
|
|
34
|
+
* - SetField for Enabled = "1"
|
|
35
|
+
* - SetField for Built-in template = "0" (recipe-authored, not SXA-shipped)
|
|
36
|
+
*
|
|
37
|
+
* Deferred to a follow-up plan revision (because the recipe-schema-to-
|
|
38
|
+
* SXA-modules mapping needs design):
|
|
39
|
+
* - Site Modules / Tenant Modules SetFields populated from the recipe's
|
|
40
|
+
* pageTemplates / pageDesigns / etc. (currently they need to map to
|
|
41
|
+
* existing module item GUIDs, which we don't yet)
|
|
42
|
+
* - Dictionary subitems (live under <site>/Dictionary, not under
|
|
43
|
+
* the site template; they're per-site, not per-template)
|
|
44
|
+
* - Taxonomy: no per-site Taxonomy folder found on the sandbox; the
|
|
45
|
+
* SXA convention may put taxonomy elsewhere or it may not be a
|
|
46
|
+
* site-template concern
|
|
47
|
+
*
|
|
48
|
+
* Identity: `templateId(handle)` derives the SiteTemplate item's
|
|
49
|
+
* deterministic refKey.
|
|
50
|
+
*/
|
|
51
|
+
export declare function compileSiteTemplateRecipe(input: SiteTemplateRecipe, context: CompileContext): OperationIr;
|
|
52
|
+
//# sourceMappingURL=site-template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"site-template.d.ts","sourceRoot":"","sources":["../../../src/recipe/compile/site-template.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,WAAW,EAGjB,MAAM,kBAAkB,CAAC;AAQ1B,OAAO,EAAE,KAAK,kBAAkB,EAA4B,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAiD,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAE9F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,kBAAkB,EACzB,OAAO,EAAE,cAAc,GACtB,WAAW,CA6Fb"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.compileSiteTemplateRecipe = compileSiteTemplateRecipe;
|
|
4
|
+
const errors_1 = require("../../shared/errors");
|
|
5
|
+
const guids_1 = require("../guids");
|
|
6
|
+
const operations_1 = require("../ir/operations");
|
|
7
|
+
const policy_1 = require("../policy");
|
|
8
|
+
const sitecore_templates_1 = require("../ir/sitecore-templates");
|
|
9
|
+
const recipe_1 = require("../schema/recipe");
|
|
10
|
+
const shared_1 = require("./shared");
|
|
11
|
+
/**
|
|
12
|
+
* Compile a `SiteTemplateRecipe` to an Operation IR.
|
|
13
|
+
*
|
|
14
|
+
* Phase 5 Milestone C-extra refinement — emits the SiteTemplate item
|
|
15
|
+
* (a `Solution template`-typed item under `siteTemplatesRoot`) with
|
|
16
|
+
* the fields SXA's createSite flow actually reads: Name, Description,
|
|
17
|
+
* Enabled, Built-in template marker, plus stub ICON / DISPLAY_NAME.
|
|
18
|
+
*
|
|
19
|
+
* **Design gap (acknowledged, not closed by this commit):** the
|
|
20
|
+
* `SiteTemplateRecipe` schema models brand shape as direct lists of
|
|
21
|
+
* page templates, page designs, an insert-options matrix, a
|
|
22
|
+
* templates-to-designs mapping, dictionary entries, and taxonomy
|
|
23
|
+
* roots. SXA's Solution template doesn't carry any of those directly
|
|
24
|
+
* — it carries a `Site Modules` + `Tenant Modules` list of MODULE
|
|
25
|
+
* item refs, and modules hold the brand structure. Mapping the
|
|
26
|
+
* recipe schema's high-level fields to SXA modules is open work
|
|
27
|
+
* (probably needs a `ModuleRecipe` kind, or a "modules" array on
|
|
28
|
+
* SiteTemplateRecipe that resolves to existing module item GUIDs).
|
|
29
|
+
*
|
|
30
|
+
* Sandbox introspection (2026-05-01) confirmed:
|
|
31
|
+
* - SXA "Site Template" = item conforming to `Solution template`
|
|
32
|
+
* (templateId 1b2dfd3b-f2f2-4f40-a75c-f6c2490919c4)
|
|
33
|
+
* - Built-in templates live at `/sitecore/system/Settings/Foundation/
|
|
34
|
+
* JSS Experience Accelerator/Scaffolding/Templates`
|
|
35
|
+
* - Field GUIDs captured in SITE_TEMPLATE_FIELDS (sitecore-templates.ts)
|
|
36
|
+
*
|
|
37
|
+
* What this commit emits:
|
|
38
|
+
* - CreateItem with the correct `templateOf` GUID
|
|
39
|
+
* - SetField for Name (Solution-template's `Name` field, not __Display Name)
|
|
40
|
+
* - SetField for Description (when recipe.description is set)
|
|
41
|
+
* - SetField for Enabled = "1"
|
|
42
|
+
* - SetField for Built-in template = "0" (recipe-authored, not SXA-shipped)
|
|
43
|
+
*
|
|
44
|
+
* Deferred to a follow-up plan revision (because the recipe-schema-to-
|
|
45
|
+
* SXA-modules mapping needs design):
|
|
46
|
+
* - Site Modules / Tenant Modules SetFields populated from the recipe's
|
|
47
|
+
* pageTemplates / pageDesigns / etc. (currently they need to map to
|
|
48
|
+
* existing module item GUIDs, which we don't yet)
|
|
49
|
+
* - Dictionary subitems (live under <site>/Dictionary, not under
|
|
50
|
+
* the site template; they're per-site, not per-template)
|
|
51
|
+
* - Taxonomy: no per-site Taxonomy folder found on the sandbox; the
|
|
52
|
+
* SXA convention may put taxonomy elsewhere or it may not be a
|
|
53
|
+
* site-template concern
|
|
54
|
+
*
|
|
55
|
+
* Identity: `templateId(handle)` derives the SiteTemplate item's
|
|
56
|
+
* deterministic refKey.
|
|
57
|
+
*/
|
|
58
|
+
function compileSiteTemplateRecipe(input, context) {
|
|
59
|
+
const recipe = recipe_1.SiteTemplateRecipeSchema.parse(input);
|
|
60
|
+
if (!context.siteTemplatesRoot) {
|
|
61
|
+
throw (0, errors_1.createCliError)(`compileSiteTemplateRecipe requires context.siteTemplatesRoot; tenant-side path missing for recipe ${recipe.handle}`, "INPUT_INVALID");
|
|
62
|
+
}
|
|
63
|
+
const operations = [];
|
|
64
|
+
const policy = (0, policy_1.defaultPolicyForRecipe)(recipe.kind);
|
|
65
|
+
const itemRefKey = (0, guids_1.templateId)((0, shared_1.siteOf)(context), recipe.handle);
|
|
66
|
+
const itemPath = (0, shared_1.joinPath)(context.siteTemplatesRoot, recipe.name);
|
|
67
|
+
operations.push({
|
|
68
|
+
op: "CreateItem",
|
|
69
|
+
policy,
|
|
70
|
+
label: `site-template:${recipe.handle}`,
|
|
71
|
+
id: itemRefKey,
|
|
72
|
+
path: itemPath,
|
|
73
|
+
parent: { kind: "ref-path", value: context.siteTemplatesRoot },
|
|
74
|
+
templateOf: sitecore_templates_1.SITECORE_TEMPLATES.SITE_TEMPLATE,
|
|
75
|
+
name: recipe.name,
|
|
76
|
+
fields: [
|
|
77
|
+
(0, shared_1.sharedField)(sitecore_templates_1.SYSTEM_FIELDS.ICON, { kind: "string", value: recipe.icon ?? sitecore_templates_1.DEFAULT_ICON }),
|
|
78
|
+
(0, shared_1.versionedField)(sitecore_templates_1.SYSTEM_FIELDS.DISPLAY_NAME, { kind: "string", value: recipe.displayName }),
|
|
79
|
+
],
|
|
80
|
+
});
|
|
81
|
+
// Solution template's own `Name` field — distinct from __Display Name.
|
|
82
|
+
// SXA's Sites UI reads this for the template chooser.
|
|
83
|
+
operations.push({
|
|
84
|
+
op: "SetField",
|
|
85
|
+
policy,
|
|
86
|
+
label: `site-template-name:${recipe.handle}`,
|
|
87
|
+
itemRefKey,
|
|
88
|
+
fieldId: sitecore_templates_1.SITE_TEMPLATE_FIELDS.NAME,
|
|
89
|
+
value: { kind: "string", value: recipe.displayName },
|
|
90
|
+
});
|
|
91
|
+
if (recipe.description) {
|
|
92
|
+
operations.push({
|
|
93
|
+
op: "SetField",
|
|
94
|
+
policy,
|
|
95
|
+
label: `site-template-description:${recipe.handle}`,
|
|
96
|
+
itemRefKey,
|
|
97
|
+
fieldId: sitecore_templates_1.SITE_TEMPLATE_FIELDS.DESCRIPTION,
|
|
98
|
+
value: { kind: "string", value: recipe.description },
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
// Available for site creation by default.
|
|
102
|
+
operations.push({
|
|
103
|
+
op: "SetField",
|
|
104
|
+
policy,
|
|
105
|
+
label: `site-template-enabled:${recipe.handle}`,
|
|
106
|
+
itemRefKey,
|
|
107
|
+
fieldId: sitecore_templates_1.SITE_TEMPLATE_FIELDS.ENABLED,
|
|
108
|
+
value: { kind: "string", value: "1" },
|
|
109
|
+
});
|
|
110
|
+
// "Built-in" is a marker for SXA-shipped templates — recipe-authored
|
|
111
|
+
// ones explicitly mark themselves as not built-in so the Sites UI can
|
|
112
|
+
// distinguish operator-authored brand templates from the canned ones.
|
|
113
|
+
operations.push({
|
|
114
|
+
op: "SetField",
|
|
115
|
+
policy,
|
|
116
|
+
label: `site-template-builtin:${recipe.handle}`,
|
|
117
|
+
itemRefKey,
|
|
118
|
+
fieldId: sitecore_templates_1.SITE_TEMPLATE_FIELDS.BUILT_IN_TEMPLATE,
|
|
119
|
+
value: { kind: "string", value: "0" },
|
|
120
|
+
});
|
|
121
|
+
// TODO (next plan revision — needs design):
|
|
122
|
+
// - Module resolution. SXA stores brand structure in MODULES, not
|
|
123
|
+
// directly on the Solution template. recipe.pageTemplates,
|
|
124
|
+
// recipe.pageDesigns, recipe.insertOptionsMatrix,
|
|
125
|
+
// recipe.templatesToDesigns map to module composition that this
|
|
126
|
+
// compiler doesn't yet model. Site Modules + Tenant Modules
|
|
127
|
+
// SetFields would carry pipe-separated module-item GUIDs once
|
|
128
|
+
// the schema gains a module-references field (or a separate
|
|
129
|
+
// ModuleRecipe kind that the compiler can resolve to GUIDs).
|
|
130
|
+
// - Dictionary entries. Per-site Dictionary lives under
|
|
131
|
+
// <site>/Dictionary, not under the site template. SiteRecipe
|
|
132
|
+
// compile (Milestone D) is the right place to set those.
|
|
133
|
+
// - Taxonomy. No per-site Taxonomy folder discovered on the
|
|
134
|
+
// sandbox; the SXA convention isn't clear yet. Defer.
|
|
135
|
+
return operations_1.OperationIrSchema.parse({
|
|
136
|
+
schemaVersion: "1",
|
|
137
|
+
recipeHandle: recipe.handle,
|
|
138
|
+
operations,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type OperationIr } from "../ir/operations";
|
|
2
|
+
import { type SiteRecipe } from "../schema/recipe";
|
|
3
|
+
import { type CompileContext } from "./shared";
|
|
4
|
+
/**
|
|
5
|
+
* Compile a `SiteRecipe` to an Operation IR.
|
|
6
|
+
*
|
|
7
|
+
* Phase 5 Milestone E — emits a single `CreateSiteFromTemplate` op
|
|
8
|
+
* that the executor dispatches through the Sites API. The
|
|
9
|
+
* `SiteTemplateRecipe` it references is identified via deterministic
|
|
10
|
+
* `templateId(siteTemplate)`; the executor resolves that refKey to
|
|
11
|
+
* the SiteTemplate's actual Sitecore itemId via cross-recipe ref
|
|
12
|
+
* pre-seeding (push.ts walks every recipe's `CreateItem` ops and
|
|
13
|
+
* seeds `crossRecipeRefs[refKey] = path`, then the executor's
|
|
14
|
+
* `seedCrossRecipeRefs` calls `getItem({path})` once per push to
|
|
15
|
+
* populate `capturedItemIds`).
|
|
16
|
+
*
|
|
17
|
+
* **Validates** (compile-time, not zod-level):
|
|
18
|
+
* - Exactly one of `collectionId` / `collectionName` is present.
|
|
19
|
+
*
|
|
20
|
+
* **Override emission (Milestone E v2):**
|
|
21
|
+
* - Dictionary overrides emit one `SetField` op per phrase, targeting
|
|
22
|
+
* `<collectionPath>/<siteName>/Dictionary/<phrase>`. Each op carries a
|
|
23
|
+
* `latePath` so the executor's pre-switch lookup seeds the captured
|
|
24
|
+
* itemId after `CreateSiteFromTemplate` materialises the site's
|
|
25
|
+
* content tree (SXA's Site Wizard creates the Dictionary folder +
|
|
26
|
+
* phrase items mid-push).
|
|
27
|
+
* - Path composition needs the collection's content-tree path. The
|
|
28
|
+
* compiler resolves it in this priority:
|
|
29
|
+
* 1. `recipe.collectionPath` (operator-supplied — explicit truth)
|
|
30
|
+
* 2. `/sitecore/content/<collectionName>` when only collectionName
|
|
31
|
+
* is set (SXA default; new collections land at this path)
|
|
32
|
+
* For `collectionId` callers without `collectionPath`, the compiler
|
|
33
|
+
* CAN'T derive the path (would need a Sites API lookup at compile
|
|
34
|
+
* time, which the compiler doesn't do). Override emission is
|
|
35
|
+
* skipped silently — the site still gets created; operators add
|
|
36
|
+
* `collectionPath` when they want overrides applied.
|
|
37
|
+
*
|
|
38
|
+
* **Still deferred (E v3+):**
|
|
39
|
+
* - Taxonomy overrides as a mix of SetField (existing tags) and
|
|
40
|
+
* CreateItem (new tags). The SXA taxonomy convention is still under
|
|
41
|
+
* sandbox investigation; defer until verified.
|
|
42
|
+
*/
|
|
43
|
+
export declare function compileSiteRecipe(input: SiteRecipe, context: CompileContext): OperationIr;
|
|
44
|
+
//# sourceMappingURL=site.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"site.d.ts","sourceRoot":"","sources":["../../../src/recipe/compile/site.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,WAAW,EAGjB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,KAAK,UAAU,EAAoB,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAU,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,GAAG,WAAW,CAgEzF"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.compileSiteRecipe = compileSiteRecipe;
|
|
4
|
+
const errors_1 = require("../../shared/errors");
|
|
5
|
+
const guids_1 = require("../guids");
|
|
6
|
+
const operations_1 = require("../ir/operations");
|
|
7
|
+
const policy_1 = require("../policy");
|
|
8
|
+
const sitecore_templates_1 = require("../ir/sitecore-templates");
|
|
9
|
+
const recipe_1 = require("../schema/recipe");
|
|
10
|
+
const shared_1 = require("./shared");
|
|
11
|
+
/**
|
|
12
|
+
* Compile a `SiteRecipe` to an Operation IR.
|
|
13
|
+
*
|
|
14
|
+
* Phase 5 Milestone E — emits a single `CreateSiteFromTemplate` op
|
|
15
|
+
* that the executor dispatches through the Sites API. The
|
|
16
|
+
* `SiteTemplateRecipe` it references is identified via deterministic
|
|
17
|
+
* `templateId(siteTemplate)`; the executor resolves that refKey to
|
|
18
|
+
* the SiteTemplate's actual Sitecore itemId via cross-recipe ref
|
|
19
|
+
* pre-seeding (push.ts walks every recipe's `CreateItem` ops and
|
|
20
|
+
* seeds `crossRecipeRefs[refKey] = path`, then the executor's
|
|
21
|
+
* `seedCrossRecipeRefs` calls `getItem({path})` once per push to
|
|
22
|
+
* populate `capturedItemIds`).
|
|
23
|
+
*
|
|
24
|
+
* **Validates** (compile-time, not zod-level):
|
|
25
|
+
* - Exactly one of `collectionId` / `collectionName` is present.
|
|
26
|
+
*
|
|
27
|
+
* **Override emission (Milestone E v2):**
|
|
28
|
+
* - Dictionary overrides emit one `SetField` op per phrase, targeting
|
|
29
|
+
* `<collectionPath>/<siteName>/Dictionary/<phrase>`. Each op carries a
|
|
30
|
+
* `latePath` so the executor's pre-switch lookup seeds the captured
|
|
31
|
+
* itemId after `CreateSiteFromTemplate` materialises the site's
|
|
32
|
+
* content tree (SXA's Site Wizard creates the Dictionary folder +
|
|
33
|
+
* phrase items mid-push).
|
|
34
|
+
* - Path composition needs the collection's content-tree path. The
|
|
35
|
+
* compiler resolves it in this priority:
|
|
36
|
+
* 1. `recipe.collectionPath` (operator-supplied — explicit truth)
|
|
37
|
+
* 2. `/sitecore/content/<collectionName>` when only collectionName
|
|
38
|
+
* is set (SXA default; new collections land at this path)
|
|
39
|
+
* For `collectionId` callers without `collectionPath`, the compiler
|
|
40
|
+
* CAN'T derive the path (would need a Sites API lookup at compile
|
|
41
|
+
* time, which the compiler doesn't do). Override emission is
|
|
42
|
+
* skipped silently — the site still gets created; operators add
|
|
43
|
+
* `collectionPath` when they want overrides applied.
|
|
44
|
+
*
|
|
45
|
+
* **Still deferred (E v3+):**
|
|
46
|
+
* - Taxonomy overrides as a mix of SetField (existing tags) and
|
|
47
|
+
* CreateItem (new tags). The SXA taxonomy convention is still under
|
|
48
|
+
* sandbox investigation; defer until verified.
|
|
49
|
+
*/
|
|
50
|
+
function compileSiteRecipe(input, context) {
|
|
51
|
+
const recipe = recipe_1.SiteRecipeSchema.parse(input);
|
|
52
|
+
const hasCollectionId = recipe.collectionId !== undefined;
|
|
53
|
+
const hasCollectionName = recipe.collectionName !== undefined;
|
|
54
|
+
if (hasCollectionId === hasCollectionName) {
|
|
55
|
+
throw (0, errors_1.createCliError)(`SiteRecipe '${recipe.handle}' must specify exactly one of collectionId / collectionName, not ${hasCollectionId ? "both" : "neither"}.`, "INPUT_INVALID");
|
|
56
|
+
}
|
|
57
|
+
const policy = (0, policy_1.defaultPolicyForRecipe)(recipe.kind);
|
|
58
|
+
const siteRefKey = (0, guids_1.siteId)(recipe.handle);
|
|
59
|
+
const templateRefKey = (0, guids_1.templateId)((0, shared_1.siteOf)(context), recipe.siteTemplate);
|
|
60
|
+
const operations = [
|
|
61
|
+
{
|
|
62
|
+
op: "CreateSiteFromTemplate",
|
|
63
|
+
policy,
|
|
64
|
+
label: `site:${recipe.handle}`,
|
|
65
|
+
siteRefKey,
|
|
66
|
+
siteName: recipe.name,
|
|
67
|
+
...(recipe.displayName !== undefined && { displayName: recipe.displayName }),
|
|
68
|
+
...(recipe.description !== undefined && { description: recipe.description }),
|
|
69
|
+
language: recipe.language,
|
|
70
|
+
...(recipe.languages !== undefined && { additionalLanguages: recipe.languages }),
|
|
71
|
+
...(recipe.siteGrouping?.hostName !== undefined && {
|
|
72
|
+
hostName: recipe.siteGrouping.hostName,
|
|
73
|
+
}),
|
|
74
|
+
templateRefKey,
|
|
75
|
+
...(recipe.collectionId !== undefined && { collectionId: recipe.collectionId }),
|
|
76
|
+
...(recipe.collectionName !== undefined && { collectionName: recipe.collectionName }),
|
|
77
|
+
...(recipe.collectionDisplayName !== undefined && {
|
|
78
|
+
collectionDisplayName: recipe.collectionDisplayName,
|
|
79
|
+
}),
|
|
80
|
+
...(recipe.collectionDescription !== undefined && {
|
|
81
|
+
collectionDescription: recipe.collectionDescription,
|
|
82
|
+
}),
|
|
83
|
+
},
|
|
84
|
+
];
|
|
85
|
+
// Resolve the site's content-tree path for late-path composition on
|
|
86
|
+
// dictionary override ops. See docstring for resolution priority.
|
|
87
|
+
const sitePath = resolveSiteContentTreePath(recipe);
|
|
88
|
+
if (sitePath && recipe.dictionaryOverrides) {
|
|
89
|
+
for (const [phrase, value] of Object.entries(recipe.dictionaryOverrides)) {
|
|
90
|
+
operations.push({
|
|
91
|
+
op: "SetField",
|
|
92
|
+
policy,
|
|
93
|
+
label: `dictionary-override:${recipe.handle}/${phrase}`,
|
|
94
|
+
itemRefKey: (0, guids_1.dictionaryPhraseId)(recipe.handle, phrase),
|
|
95
|
+
fieldId: sitecore_templates_1.DICTIONARY_ENTRY_FIELDS.PHRASE,
|
|
96
|
+
value: { kind: "string", value },
|
|
97
|
+
latePath: `${sitePath}/Dictionary/${phrase}`,
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return operations_1.OperationIrSchema.parse({
|
|
102
|
+
schemaVersion: "1",
|
|
103
|
+
recipeHandle: recipe.handle,
|
|
104
|
+
operations,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Resolve the Sitecore content-tree path of a SiteRecipe's site item.
|
|
109
|
+
* Returns `undefined` when no path can be derived — the caller should
|
|
110
|
+
* skip override emission rather than guess.
|
|
111
|
+
*
|
|
112
|
+
* 1. operator-supplied `recipe.collectionPath` (always wins)
|
|
113
|
+
* 2. `/sitecore/content/<collectionName>` when only collectionName is set
|
|
114
|
+
* 3. `undefined` for collectionId-only without collectionPath
|
|
115
|
+
*
|
|
116
|
+
* The trailing `/` is trimmed defensively from operator input.
|
|
117
|
+
*/
|
|
118
|
+
const resolveSiteContentTreePath = (recipe) => {
|
|
119
|
+
if (recipe.collectionPath) {
|
|
120
|
+
const trimmed = recipe.collectionPath.replace(/\/+$/, "");
|
|
121
|
+
return `${trimmed}/${recipe.name}`;
|
|
122
|
+
}
|
|
123
|
+
if (recipe.collectionName) {
|
|
124
|
+
return `/sitecore/content/${recipe.collectionName}/${recipe.name}`;
|
|
125
|
+
}
|
|
126
|
+
return undefined;
|
|
127
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { type OperationIr } from "./ir/operations";
|
|
2
|
+
import { type Recipe } from "./schema/recipe";
|
|
3
|
+
import { compileComponentSectionRecipe } from "./compile/component-section";
|
|
4
|
+
import { compileComponentTemplateRecipe } from "./compile/component-template";
|
|
5
|
+
import { compileContentTemplateRecipe } from "./compile/content-template";
|
|
6
|
+
import { compileParametersTemplateRecipe } from "./compile/parameters-template";
|
|
7
|
+
import { compileSectionDefinitionRecipe } from "./compile/section-definition";
|
|
8
|
+
import { compilePartialDesignRecipe } from "./compile/partial-design";
|
|
9
|
+
import { compilePageDesignRecipe } from "./compile/page-design";
|
|
10
|
+
import { compileContentItemRecipe } from "./compile/content-item";
|
|
11
|
+
import { compileSiteTemplateRecipe } from "./compile/site-template";
|
|
12
|
+
import { compileSiteRecipe } from "./compile/site";
|
|
13
|
+
import { compileEnumerationRecipe } from "./compile/enumeration";
|
|
14
|
+
import { type CompileContext } from "./compile/shared";
|
|
15
|
+
export { compileComponentSectionRecipe, compileComponentTemplateRecipe, compileContentTemplateRecipe, compileParametersTemplateRecipe, compileSectionDefinitionRecipe, compilePartialDesignRecipe, compilePageDesignRecipe, compileContentItemRecipe, compileSiteTemplateRecipe, compileSiteRecipe, compileEnumerationRecipe, };
|
|
16
|
+
export type { CompileContext } from "./compile/shared";
|
|
17
|
+
/**
|
|
18
|
+
* Stable handle for the synthetic IR `compileRecipeSet` emits to write
|
|
19
|
+
* the cross-recipe `TemplatesMapping` aggregate. Not a real recipe — the
|
|
20
|
+
* leading double-underscore signals "compiler-synthesized" and avoids
|
|
21
|
+
* collision with any author-defined handle (recipe handles match
|
|
22
|
+
* `[a-z][a-z0-9-]*@\d+`, so a leading underscore is unrepresentable).
|
|
23
|
+
*/
|
|
24
|
+
export declare const TEMPLATES_MAPPING_AGGREGATE_HANDLE = "__templates-mapping__";
|
|
25
|
+
/**
|
|
26
|
+
* Stable handle for the synthetic IR `compileRecipeSet` emits to
|
|
27
|
+
* materialise the per-section `Available Renderings` items. Same
|
|
28
|
+
* compiler-synthesized convention as `TEMPLATES_MAPPING_AGGREGATE_HANDLE`.
|
|
29
|
+
*/
|
|
30
|
+
export declare const AVAILABLE_RENDERINGS_AGGREGATE_HANDLE = "__available-renderings__";
|
|
31
|
+
/**
|
|
32
|
+
* Stable handle for the synthetic IR `compileRecipeSet` emits to
|
|
33
|
+
* materialise SHARED Data Folder templates — one per `(site, subfolder)`
|
|
34
|
+
* targeted by ≥2 component-template recipes in the set. Each shared
|
|
35
|
+
* template's `__Standard Values` Insert Options is the union of every
|
|
36
|
+
* contributing recipe's datasource template, so a CMS author
|
|
37
|
+
* right-clicking → Insert in (e.g.) `Site Shared UI/Badges` sees the
|
|
38
|
+
* full set of legitimately-allowed shapes (Badge + StatusPill + Tag).
|
|
39
|
+
*
|
|
40
|
+
* Same `__…__` compiler-synthesized convention as the other aggregate
|
|
41
|
+
* handles in this file.
|
|
42
|
+
*/
|
|
43
|
+
export declare const SHARED_DATA_FOLDERS_AGGREGATE_HANDLE = "__shared-data-folders__";
|
|
44
|
+
/**
|
|
45
|
+
* Stable handle for the synthetic IR `compileRecipeSet` emits to
|
|
46
|
+
* materialise the site Data folder ROOT's `__Standard Values` item +
|
|
47
|
+
* Insert Options aggregate. The SV restricts right-click → Insert at
|
|
48
|
+
* `<contentItemsRoot>` to: the generic Folder template, every
|
|
49
|
+
* per-recipe `<Component> Data Folder` template (singletons), and
|
|
50
|
+
* every shared `<subfolder> Data Folder` template (coalesced shared
|
|
51
|
+
* subfolders).
|
|
52
|
+
*
|
|
53
|
+
* Same `__…__` compiler-synthesized convention as the other aggregate
|
|
54
|
+
* handles in this file.
|
|
55
|
+
*/
|
|
56
|
+
export declare const SITE_DATA_ROOT_AGGREGATE_HANDLE = "__site-data-root__";
|
|
57
|
+
/**
|
|
58
|
+
* Stable handle for the synthetic IR `compileRecipeSet` emits to
|
|
59
|
+
* materialise the enumerations root's `__Standard Values` item +
|
|
60
|
+
* Insert Options aggregate. The SV restricts right-click → Insert at
|
|
61
|
+
* `<enumerationsRoot>` to: the generic Folder template, plus every
|
|
62
|
+
* per-recipe enumeration folder template (which is the per-site
|
|
63
|
+
* `Enumerations Folder` template — but the aggregate lists each
|
|
64
|
+
* `enumerationFolderId(site, handle)` so the shape mirrors the site
|
|
65
|
+
* data root aggregator and stays consistent if we ever introduce
|
|
66
|
+
* per-recipe enumeration folder templates).
|
|
67
|
+
*/
|
|
68
|
+
export declare const ENUMERATIONS_ROOT_AGGREGATE_HANDLE = "__enumerations-root__";
|
|
69
|
+
/**
|
|
70
|
+
* Compile a coherent set of recipes to a list of Operation IRs.
|
|
71
|
+
*
|
|
72
|
+
* Returns one IR per recipe (via `compileRecipe`), plus, when any
|
|
73
|
+
* `PageDesignRecipe` in the set declares `appliesTo`, a final synthetic
|
|
74
|
+
* IR whose only op is the combined `SetField(TemplatesMapping)` write
|
|
75
|
+
* on the Page Designs root.
|
|
76
|
+
*
|
|
77
|
+
* The TemplatesMapping field is cross-recipe by nature — every page
|
|
78
|
+
* design contributes one entry per applies-to template, and the field
|
|
79
|
+
* stores the union. Aggregating at compile time keeps the executor
|
|
80
|
+
* untouched (one full-replace write of the union) and gives reviewers
|
|
81
|
+
* a single combined op to inspect rather than N piecewise overwrites.
|
|
82
|
+
*
|
|
83
|
+
* Entries are sorted by `templateGuid` for deterministic output — the
|
|
84
|
+
* IR is the comparable artifact, so order must not depend on input
|
|
85
|
+
* recipe order. Within a single applies-to template, "last design
|
|
86
|
+
* wins" is enforced by sorting (later entries with the same key
|
|
87
|
+
* overwrite earlier ones), but that's a pathological config the
|
|
88
|
+
* cross-recipe validator should already flag.
|
|
89
|
+
*/
|
|
90
|
+
export declare function compileRecipeSet(recipes: readonly Recipe[], context: CompileContext): OperationIr[];
|
|
91
|
+
/** Front-door dispatcher — accepts any registered recipe kind. */
|
|
92
|
+
export declare function compileRecipe(input: Recipe, context: CompileContext): OperationIr;
|
|
93
|
+
//# sourceMappingURL=compile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../src/recipe/compile.ts"],"names":[],"mappings":"AAcA,OAAO,EAGL,KAAK,WAAW,EAKjB,MAAM,iBAAiB,CAAC;AAWzB,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,iBAAiB,CAAC;AAG5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,8BAA8B,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,EAAE,+BAA+B,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAE,8BAA8B,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAiC,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKtF,OAAO,EACL,6BAA6B,EAC7B,8BAA8B,EAC9B,4BAA4B,EAC5B,+BAA+B,EAC/B,8BAA8B,EAC9B,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,wBAAwB,GACzB,CAAC;AAIF,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;;;;;GAMG;AACH,eAAO,MAAM,kCAAkC,0BAA0B,CAAC;AAE1E;;;;GAIG;AACH,eAAO,MAAM,qCAAqC,6BAA6B,CAAC;AAEhF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oCAAoC,4BAA4B,CAAC;AAE9E;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,+BAA+B,uBAAuB,CAAC;AAEpE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kCAAkC,0BAA0B,CAAC;AAqgB1E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,OAAO,EAAE,cAAc,GACtB,WAAW,EAAE,CAwLf;AAED,kEAAkE;AAClE,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,WAAW,CA0BjF"}
|