@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,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.compilePageDesignRecipe = compilePageDesignRecipe;
|
|
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 emit_1 = require("../layout/emit");
|
|
11
|
+
const shared_1 = require("./shared");
|
|
12
|
+
/**
|
|
13
|
+
* Compile a `PageDesignRecipe` to an Operation IR.
|
|
14
|
+
*
|
|
15
|
+
* Emits up to three ops:
|
|
16
|
+
* 1. `CreateItem` for the page-design item (SXA Page Design template)
|
|
17
|
+
* 2. `SetField(PartialDesigns)` — pipe-separated GUID list of partials
|
|
18
|
+
* 3. `SetField(__Renderings)` — only when recipe.layout is non-empty
|
|
19
|
+
*
|
|
20
|
+
* The recipe's `appliesTo` contributions to the Page Designs root's
|
|
21
|
+
* `TemplatesMapping` field are NOT emitted here — that field is
|
|
22
|
+
* cross-recipe (every page design contributes a slice) and a per-recipe
|
|
23
|
+
* `kind: "string"` write would full-replace under the executor's write
|
|
24
|
+
* semantics, with each page design overwriting its siblings. Use
|
|
25
|
+
* `compileRecipeSet` (below) to compile a coherent set of recipes —
|
|
26
|
+
* it aggregates `appliesTo` contributions across every page-design
|
|
27
|
+
* recipe in the set into one combined IR.
|
|
28
|
+
*/
|
|
29
|
+
function compilePageDesignRecipe(input, context) {
|
|
30
|
+
const recipe = recipe_1.PageDesignRecipeSchema.parse(input);
|
|
31
|
+
if (!context.pageDesignsRoot) {
|
|
32
|
+
throw (0, errors_1.createCliError)(`compilePageDesignRecipe requires context.pageDesignsRoot; tenant-side path missing for recipe ${recipe.handle}`, "INPUT_INVALID");
|
|
33
|
+
}
|
|
34
|
+
const operations = [];
|
|
35
|
+
const policy = (0, policy_1.defaultPolicyForRecipe)(recipe.kind);
|
|
36
|
+
const site = (0, shared_1.siteOf)(context);
|
|
37
|
+
const itemRefKey = (0, guids_1.pageDesignId)(site, recipe.handle);
|
|
38
|
+
const itemPath = (0, shared_1.joinPath)(context.pageDesignsRoot, recipe.name);
|
|
39
|
+
operations.push({
|
|
40
|
+
op: "CreateItem",
|
|
41
|
+
policy,
|
|
42
|
+
label: `page-design:${recipe.handle}`,
|
|
43
|
+
id: itemRefKey,
|
|
44
|
+
path: itemPath,
|
|
45
|
+
parent: { kind: "ref-path", value: context.pageDesignsRoot },
|
|
46
|
+
templateOf: sitecore_templates_1.SITECORE_TEMPLATES.PAGE_DESIGN,
|
|
47
|
+
name: recipe.name,
|
|
48
|
+
fields: [
|
|
49
|
+
(0, shared_1.sharedField)(sitecore_templates_1.SYSTEM_FIELDS.ICON, { kind: "string", value: recipe.icon ?? sitecore_templates_1.DEFAULT_ICON }),
|
|
50
|
+
(0, shared_1.versionedField)(sitecore_templates_1.SYSTEM_FIELDS.DISPLAY_NAME, { kind: "string", value: recipe.displayName }),
|
|
51
|
+
],
|
|
52
|
+
});
|
|
53
|
+
if (recipe.partials.length > 0) {
|
|
54
|
+
operations.push({
|
|
55
|
+
op: "SetField",
|
|
56
|
+
policy,
|
|
57
|
+
label: `page-design-partials:${recipe.handle}`,
|
|
58
|
+
itemRefKey,
|
|
59
|
+
fieldId: sitecore_templates_1.COMPOSITION_FIELDS.PARTIAL_DESIGNS,
|
|
60
|
+
value: {
|
|
61
|
+
kind: "ref-recipe-list",
|
|
62
|
+
refKeys: recipe.partials.map((handle) => (0, guids_1.partialDesignId)(site, handle)),
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
if (recipe.layout && Object.keys(recipe.layout.placeholders).length > 0) {
|
|
67
|
+
const layoutXml = (0, emit_1.emitLayoutXml)(recipe.layout, {
|
|
68
|
+
parentItemId: itemRefKey,
|
|
69
|
+
deviceId: sitecore_templates_1.DEFAULT_DEVICE_ID,
|
|
70
|
+
renderingIdFor: (handle) => (0, guids_1.renderingId)(site, handle),
|
|
71
|
+
contentItemIdFor: (handle) => (0, guids_1.contentItemId)(site, handle),
|
|
72
|
+
allowScoped: false,
|
|
73
|
+
// Page Design preserves canonical input on read-back — keep emitting
|
|
74
|
+
// canonical so the layout XML round-trips byte-for-byte.
|
|
75
|
+
mode: "canonical",
|
|
76
|
+
});
|
|
77
|
+
if (layoutXml.length > 0) {
|
|
78
|
+
operations.push({
|
|
79
|
+
op: "SetField",
|
|
80
|
+
policy,
|
|
81
|
+
label: `page-design-layout:${recipe.handle}`,
|
|
82
|
+
itemRefKey,
|
|
83
|
+
fieldId: sitecore_templates_1.LAYOUT_FIELDS.RENDERINGS,
|
|
84
|
+
value: { kind: "string", value: layoutXml },
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return operations_1.OperationIrSchema.parse({
|
|
89
|
+
schemaVersion: "1",
|
|
90
|
+
recipeHandle: recipe.handle,
|
|
91
|
+
operations,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type OperationIr } from "../ir/operations";
|
|
2
|
+
import { type ParametersTemplateRecipe } from "../schema/recipe";
|
|
3
|
+
import { type CompileContext } from "./shared";
|
|
4
|
+
/**
|
|
5
|
+
* Compile a standalone `ParametersTemplateRecipe` to an Operation IR.
|
|
6
|
+
*
|
|
7
|
+
* Lands at
|
|
8
|
+
* `<componentsRoot>/<section>/Presentation Parameters/<name>` —
|
|
9
|
+
* mirrors the layout that the synthesised inline parameters template
|
|
10
|
+
* uses, so a standalone recipe and an inline-hoisted one occupy the
|
|
11
|
+
* same Sitecore path.
|
|
12
|
+
*/
|
|
13
|
+
export declare function compileParametersTemplateRecipe(input: ParametersTemplateRecipe, context: CompileContext, emittedFolders?: Set<string>): OperationIr;
|
|
14
|
+
//# sourceMappingURL=parameters-template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parameters-template.d.ts","sourceRoot":"","sources":["../../../src/recipe/compile/parameters-template.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,WAAW,EAGjB,MAAM,kBAAkB,CAAC;AAQ1B,OAAO,EAAE,KAAK,wBAAwB,EAAkC,MAAM,kBAAkB,CAAC;AACjG,OAAO,EAUL,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AAElB;;;;;;;;GAQG;AACH,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,wBAAwB,EAC/B,OAAO,EAAE,cAAc,EACvB,cAAc,GAAE,GAAG,CAAC,MAAM,CAAa,GACtC,WAAW,CAuFb"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.compileParametersTemplateRecipe = compileParametersTemplateRecipe;
|
|
4
|
+
const guids_1 = require("../guids");
|
|
5
|
+
const operations_1 = require("../ir/operations");
|
|
6
|
+
const policy_1 = require("../policy");
|
|
7
|
+
const sitecore_templates_1 = require("../ir/sitecore-templates");
|
|
8
|
+
const recipe_1 = require("../schema/recipe");
|
|
9
|
+
const shared_1 = require("./shared");
|
|
10
|
+
/**
|
|
11
|
+
* Compile a standalone `ParametersTemplateRecipe` to an Operation IR.
|
|
12
|
+
*
|
|
13
|
+
* Lands at
|
|
14
|
+
* `<componentsRoot>/<section>/Presentation Parameters/<name>` —
|
|
15
|
+
* mirrors the layout that the synthesised inline parameters template
|
|
16
|
+
* uses, so a standalone recipe and an inline-hoisted one occupy the
|
|
17
|
+
* same Sitecore path.
|
|
18
|
+
*/
|
|
19
|
+
function compileParametersTemplateRecipe(input, context, emittedFolders = new Set()) {
|
|
20
|
+
const recipe = recipe_1.ParametersTemplateRecipeSchema.parse(input);
|
|
21
|
+
const operations = [];
|
|
22
|
+
const policy = (0, policy_1.defaultPolicyForRecipe)(recipe.kind);
|
|
23
|
+
const icon = recipe.icon ?? sitecore_templates_1.DEFAULT_ICON;
|
|
24
|
+
const site = (0, shared_1.siteOf)(context);
|
|
25
|
+
(0, shared_1.ensureSectionFolder)(operations, context, recipe.section, emittedFolders);
|
|
26
|
+
const bucketRefKey = (0, shared_1.ensurePresentationParametersBucket)(operations, context, recipe.section, emittedFolders);
|
|
27
|
+
const parentPath = (0, shared_1.resolvePresentationParametersBucketPath)(context, recipe.section);
|
|
28
|
+
// The standalone parameters template lands at the same identity
|
|
29
|
+
// (paramsTemplateId) as inline-hoisted ones — keeps re-pushes
|
|
30
|
+
// idempotent if a recipe migrates from inline to standalone.
|
|
31
|
+
const tplRefKey = (0, guids_1.paramsTemplateId)(site, recipe.handle);
|
|
32
|
+
const tplPath = (0, shared_1.joinPath)(parentPath, recipe.name);
|
|
33
|
+
operations.push({
|
|
34
|
+
op: "CreateItem",
|
|
35
|
+
policy,
|
|
36
|
+
label: `parameters-template:${recipe.handle}`,
|
|
37
|
+
id: tplRefKey,
|
|
38
|
+
path: tplPath,
|
|
39
|
+
parent: { kind: "ref-recipe", refKey: bucketRefKey },
|
|
40
|
+
templateOf: sitecore_templates_1.SITECORE_TEMPLATES.TEMPLATE,
|
|
41
|
+
name: recipe.name,
|
|
42
|
+
fields: [
|
|
43
|
+
(0, shared_1.sharedField)(sitecore_templates_1.SYSTEM_FIELDS.ICON, { kind: "string", value: icon }),
|
|
44
|
+
(0, shared_1.versionedField)(sitecore_templates_1.SYSTEM_FIELDS.DISPLAY_NAME, { kind: "string", value: recipe.displayName }),
|
|
45
|
+
],
|
|
46
|
+
});
|
|
47
|
+
operations.push({
|
|
48
|
+
op: "SetBaseTemplates",
|
|
49
|
+
policy,
|
|
50
|
+
label: `parameters-base-templates:${recipe.handle}`,
|
|
51
|
+
itemRefKey: tplRefKey,
|
|
52
|
+
// The SXA Headless params bases (BaseRenderingParameters +
|
|
53
|
+
// _PerSiteStandardValues + the other SXA Headless marker) are what
|
|
54
|
+
// make the Pages editor recognise this as a parameters shape and
|
|
55
|
+
// surface its fields in the rendering parameters dialog. Vanilla
|
|
56
|
+
// Sitecore's "Standard Rendering Parameters" doesn't work here —
|
|
57
|
+
// verified empirically on tenant introspection.
|
|
58
|
+
baseTemplates: [...sitecore_templates_1.SXA_HEADLESS_PARAMS_BASE_TEMPLATES],
|
|
59
|
+
});
|
|
60
|
+
const secRefKey = (0, guids_1.paramsSectionId)(site, recipe.handle, shared_1.PARAMS_SECTION_NAME);
|
|
61
|
+
const secPath = (0, shared_1.joinPath)(tplPath, shared_1.PARAMS_SECTION_NAME);
|
|
62
|
+
operations.push({
|
|
63
|
+
op: "CreateItem",
|
|
64
|
+
policy,
|
|
65
|
+
label: `parameters-section:${recipe.handle}/${shared_1.PARAMS_SECTION_NAME}`,
|
|
66
|
+
id: secRefKey,
|
|
67
|
+
path: secPath,
|
|
68
|
+
parent: { kind: "ref-recipe", refKey: tplRefKey },
|
|
69
|
+
templateOf: sitecore_templates_1.SITECORE_TEMPLATES.TEMPLATE_SECTION,
|
|
70
|
+
name: shared_1.PARAMS_SECTION_NAME,
|
|
71
|
+
fields: [],
|
|
72
|
+
});
|
|
73
|
+
recipe.params.forEach((param, index) => {
|
|
74
|
+
operations.push(...(0, shared_1.buildFieldOp)({
|
|
75
|
+
recipeHandle: recipe.handle,
|
|
76
|
+
fieldRefKey: (0, guids_1.paramsFieldId)(site, recipe.handle, param.name),
|
|
77
|
+
fieldPath: (0, shared_1.joinPath)(secPath, param.name),
|
|
78
|
+
parentRefKey: secRefKey,
|
|
79
|
+
labelPrefix: `parameters-field:${recipe.handle}`,
|
|
80
|
+
field: param,
|
|
81
|
+
zeroBasedIndex: index,
|
|
82
|
+
policy,
|
|
83
|
+
site,
|
|
84
|
+
context,
|
|
85
|
+
}));
|
|
86
|
+
});
|
|
87
|
+
return operations_1.OperationIrSchema.parse({
|
|
88
|
+
schemaVersion: "1",
|
|
89
|
+
recipeHandle: recipe.handle,
|
|
90
|
+
operations,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type OperationIr } from "../ir/operations";
|
|
2
|
+
import { type PartialDesignRecipe } from "../schema/recipe";
|
|
3
|
+
import { type CompileContext } from "./shared";
|
|
4
|
+
/**
|
|
5
|
+
* Compile a `PartialDesignRecipe` to an Operation IR.
|
|
6
|
+
*
|
|
7
|
+
* Emits two ops:
|
|
8
|
+
* 1. `CreateItem` for the partial-design item (SXA Partial Design template)
|
|
9
|
+
* 2. `SetField` writing the layout XML to `__Renderings` (shared layout)
|
|
10
|
+
*
|
|
11
|
+
* The compiler resolves component / content-item handles in the layout
|
|
12
|
+
* to deterministic GUIDs at compile time — no executor-side handle
|
|
13
|
+
* resolution required for the layout body. (Page-template handles in
|
|
14
|
+
* `appliesTo` and partial handles in `partials[]` on `PageDesignRecipe`
|
|
15
|
+
* resolve the same way.)
|
|
16
|
+
*/
|
|
17
|
+
export declare function compilePartialDesignRecipe(input: PartialDesignRecipe, context: CompileContext): OperationIr;
|
|
18
|
+
//# sourceMappingURL=partial-design.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partial-design.d.ts","sourceRoot":"","sources":["../../../src/recipe/compile/partial-design.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,WAAW,EAGjB,MAAM,kBAAkB,CAAC;AAS1B,OAAO,EAAE,KAAK,mBAAmB,EAA6B,MAAM,kBAAkB,CAAC;AAEvF,OAAO,EAAiD,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAE9F;;;;;;;;;;;;GAYG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,mBAAmB,EAC1B,OAAO,EAAE,cAAc,GACtB,WAAW,CA2Db"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.compilePartialDesignRecipe = compilePartialDesignRecipe;
|
|
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 emit_1 = require("../layout/emit");
|
|
11
|
+
const shared_1 = require("./shared");
|
|
12
|
+
/**
|
|
13
|
+
* Compile a `PartialDesignRecipe` to an Operation IR.
|
|
14
|
+
*
|
|
15
|
+
* Emits two ops:
|
|
16
|
+
* 1. `CreateItem` for the partial-design item (SXA Partial Design template)
|
|
17
|
+
* 2. `SetField` writing the layout XML to `__Renderings` (shared layout)
|
|
18
|
+
*
|
|
19
|
+
* The compiler resolves component / content-item handles in the layout
|
|
20
|
+
* to deterministic GUIDs at compile time — no executor-side handle
|
|
21
|
+
* resolution required for the layout body. (Page-template handles in
|
|
22
|
+
* `appliesTo` and partial handles in `partials[]` on `PageDesignRecipe`
|
|
23
|
+
* resolve the same way.)
|
|
24
|
+
*/
|
|
25
|
+
function compilePartialDesignRecipe(input, context) {
|
|
26
|
+
const recipe = recipe_1.PartialDesignRecipeSchema.parse(input);
|
|
27
|
+
if (!context.partialDesignsRoot) {
|
|
28
|
+
throw (0, errors_1.createCliError)(`compilePartialDesignRecipe requires context.partialDesignsRoot; tenant-side path missing for recipe ${recipe.handle}`, "INPUT_INVALID");
|
|
29
|
+
}
|
|
30
|
+
const operations = [];
|
|
31
|
+
const policy = (0, policy_1.defaultPolicyForRecipe)(recipe.kind);
|
|
32
|
+
const site = (0, shared_1.siteOf)(context);
|
|
33
|
+
const itemRefKey = (0, guids_1.partialDesignId)(site, recipe.handle);
|
|
34
|
+
const itemPath = (0, shared_1.joinPath)(context.partialDesignsRoot, recipe.name);
|
|
35
|
+
operations.push({
|
|
36
|
+
op: "CreateItem",
|
|
37
|
+
policy,
|
|
38
|
+
label: `partial-design:${recipe.handle}`,
|
|
39
|
+
id: itemRefKey,
|
|
40
|
+
path: itemPath,
|
|
41
|
+
parent: { kind: "ref-path", value: context.partialDesignsRoot },
|
|
42
|
+
templateOf: sitecore_templates_1.SITECORE_TEMPLATES.PARTIAL_DESIGN,
|
|
43
|
+
name: recipe.name,
|
|
44
|
+
fields: [
|
|
45
|
+
(0, shared_1.sharedField)(sitecore_templates_1.SYSTEM_FIELDS.ICON, { kind: "string", value: recipe.icon ?? sitecore_templates_1.DEFAULT_ICON }),
|
|
46
|
+
(0, shared_1.versionedField)(sitecore_templates_1.SYSTEM_FIELDS.DISPLAY_NAME, { kind: "string", value: recipe.displayName }),
|
|
47
|
+
],
|
|
48
|
+
});
|
|
49
|
+
const layoutXml = (0, emit_1.emitLayoutXml)(recipe.layout, {
|
|
50
|
+
parentItemId: itemRefKey,
|
|
51
|
+
deviceId: sitecore_templates_1.DEFAULT_DEVICE_ID,
|
|
52
|
+
renderingIdFor: (handle) => (0, guids_1.renderingId)(site, handle),
|
|
53
|
+
contentItemIdFor: (handle) => (0, guids_1.contentItemId)(site, handle),
|
|
54
|
+
allowScoped: false,
|
|
55
|
+
// SXA Partial Design's Layout pipeline normalizes canonical input
|
|
56
|
+
// into delta form on first write — emit delta directly so first
|
|
57
|
+
// push converges in one cycle (commit 6404024 documented the
|
|
58
|
+
// two-cycle workaround; this is its Phase 5 follow-up).
|
|
59
|
+
mode: "delta",
|
|
60
|
+
});
|
|
61
|
+
if (layoutXml.length > 0) {
|
|
62
|
+
operations.push({
|
|
63
|
+
op: "SetField",
|
|
64
|
+
policy,
|
|
65
|
+
label: `partial-design-layout:${recipe.handle}`,
|
|
66
|
+
itemRefKey,
|
|
67
|
+
fieldId: sitecore_templates_1.LAYOUT_FIELDS.RENDERINGS,
|
|
68
|
+
value: { kind: "string", value: layoutXml },
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
return operations_1.OperationIrSchema.parse({
|
|
72
|
+
schemaVersion: "1",
|
|
73
|
+
recipeHandle: recipe.handle,
|
|
74
|
+
operations,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type OperationIr } from "../ir/operations";
|
|
2
|
+
import { type SectionDefinitionRecipe } from "../schema/recipe";
|
|
3
|
+
import { type CompileContext } from "./shared";
|
|
4
|
+
/**
|
|
5
|
+
* Compile a `SectionDefinitionRecipe` to an Operation IR.
|
|
6
|
+
*
|
|
7
|
+
* Section definitions are typically pre-existing tenant scaffolding —
|
|
8
|
+
* the compiler does NOT emit a CreateItem op for them. Instead, the
|
|
9
|
+
* recipe's `sitePath` is registered as a cross-recipe ref so the
|
|
10
|
+
* executor's `seedCrossRecipeRefs` can resolve the existing item's
|
|
11
|
+
* Sitecore itemId at apply time. For now this compiler returns an
|
|
12
|
+
* empty IR; downstream `compileRecipeSet` handles the cross-recipe
|
|
13
|
+
* ref pre-seeding via `extractCrossRecipeSeeds()` (separate plan).
|
|
14
|
+
*
|
|
15
|
+
* The recipe is still validated here so authors get schema feedback.
|
|
16
|
+
*/
|
|
17
|
+
export declare function compileSectionDefinitionRecipe(input: SectionDefinitionRecipe, _context: CompileContext): OperationIr;
|
|
18
|
+
//# sourceMappingURL=section-definition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section-definition.d.ts","sourceRoot":"","sources":["../../../src/recipe/compile/section-definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,KAAK,uBAAuB,EAAiC,MAAM,kBAAkB,CAAC;AAC/F,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C;;;;;;;;;;;;GAYG;AACH,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,uBAAuB,EAC9B,QAAQ,EAAE,cAAc,GACvB,WAAW,CAOb"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.compileSectionDefinitionRecipe = compileSectionDefinitionRecipe;
|
|
4
|
+
const operations_1 = require("../ir/operations");
|
|
5
|
+
const recipe_1 = require("../schema/recipe");
|
|
6
|
+
/**
|
|
7
|
+
* Compile a `SectionDefinitionRecipe` to an Operation IR.
|
|
8
|
+
*
|
|
9
|
+
* Section definitions are typically pre-existing tenant scaffolding —
|
|
10
|
+
* the compiler does NOT emit a CreateItem op for them. Instead, the
|
|
11
|
+
* recipe's `sitePath` is registered as a cross-recipe ref so the
|
|
12
|
+
* executor's `seedCrossRecipeRefs` can resolve the existing item's
|
|
13
|
+
* Sitecore itemId at apply time. For now this compiler returns an
|
|
14
|
+
* empty IR; downstream `compileRecipeSet` handles the cross-recipe
|
|
15
|
+
* ref pre-seeding via `extractCrossRecipeSeeds()` (separate plan).
|
|
16
|
+
*
|
|
17
|
+
* The recipe is still validated here so authors get schema feedback.
|
|
18
|
+
*/
|
|
19
|
+
function compileSectionDefinitionRecipe(input, _context) {
|
|
20
|
+
const recipe = recipe_1.SectionDefinitionRecipeSchema.parse(input);
|
|
21
|
+
return operations_1.OperationIrSchema.parse({
|
|
22
|
+
schemaVersion: "1",
|
|
23
|
+
recipeHandle: recipe.handle,
|
|
24
|
+
operations: [],
|
|
25
|
+
});
|
|
26
|
+
}
|