@sitecoreai-labs/sitecoreai-cli 0.0.4 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +146 -55
- package/README.md +372 -325
- package/dist/agents/api/agents.d.ts +27 -0
- package/dist/agents/api/agents.js +70 -0
- package/dist/agents/api/catalog.d.ts +8 -0
- package/dist/agents/api/catalog.js +33 -0
- package/dist/agents/api/custom-mcps.d.ts +26 -0
- package/dist/agents/api/custom-mcps.js +53 -0
- package/dist/agents/api/html-templates.d.ts +35 -0
- package/dist/agents/api/html-templates.js +116 -0
- package/dist/agents/api/request.d.ts +28 -0
- package/dist/agents/api/request.js +207 -0
- package/dist/agents/api/runs.d.ts +31 -0
- package/dist/agents/api/runs.js +82 -0
- package/dist/agents/api/schema.d.ts +182 -0
- package/dist/agents/api/schema.js +10 -0
- package/dist/agents/api/schemas.d.ts +37 -0
- package/dist/agents/api/schemas.js +95 -0
- package/dist/agents/api/skills.d.ts +25 -0
- package/dist/agents/api/skills.js +55 -0
- package/dist/agents/api/spaces.d.ts +34 -0
- package/dist/agents/api/spaces.js +72 -0
- package/dist/agents/api/tools.d.ts +4 -0
- package/dist/agents/api/tools.js +18 -0
- package/dist/agents/api/widgets.d.ts +32 -0
- package/dist/agents/api/widgets.js +89 -0
- package/dist/agents/client.d.ts +18 -0
- package/dist/agents/client.js +28 -0
- package/dist/agents/index.d.ts +31 -0
- package/dist/agents/index.js +51 -0
- package/dist/agents/recipe/agent.diff.d.ts +4 -0
- package/dist/agents/recipe/agent.diff.js +55 -0
- package/dist/agents/recipe/agent.kind.d.ts +12 -0
- package/dist/agents/recipe/agent.kind.js +107 -0
- package/dist/agents/recipe/agent.schema.d.ts +26 -0
- package/dist/agents/recipe/agent.schema.js +42 -0
- package/dist/agents/recipe/client.d.ts +4 -0
- package/dist/agents/recipe/client.js +15 -0
- package/dist/agents/recipe/converge.d.ts +11 -0
- package/dist/agents/recipe/converge.js +32 -0
- package/dist/agents/recipe/custom-mcp.kind.d.ts +4 -0
- package/dist/agents/recipe/custom-mcp.kind.js +42 -0
- package/dist/agents/recipe/custom-mcp.schema.d.ts +11 -0
- package/dist/agents/recipe/custom-mcp.schema.js +15 -0
- package/dist/agents/recipe/html-template.kind.d.ts +4 -0
- package/dist/agents/recipe/html-template.kind.js +50 -0
- package/dist/agents/recipe/html-template.schema.d.ts +13 -0
- package/dist/agents/recipe/html-template.schema.js +17 -0
- package/dist/agents/recipe/index.d.ts +43 -0
- package/dist/agents/recipe/index.js +81 -0
- package/dist/agents/recipe/schema.kind.d.ts +4 -0
- package/dist/agents/recipe/schema.kind.js +50 -0
- package/dist/agents/recipe/schema.schema.d.ts +15 -0
- package/dist/agents/recipe/schema.schema.js +21 -0
- package/dist/agents/recipe/skill.kind.d.ts +4 -0
- package/dist/agents/recipe/skill.kind.js +48 -0
- package/dist/agents/recipe/skill.schema.d.ts +14 -0
- package/dist/agents/recipe/skill.schema.js +18 -0
- package/dist/agents/recipe/widget.kind.d.ts +4 -0
- package/dist/agents/recipe/widget.kind.js +49 -0
- package/dist/agents/recipe/widget.schema.d.ts +20 -0
- package/dist/agents/recipe/widget.schema.js +23 -0
- package/dist/agents/session/index.d.ts +50 -0
- package/dist/agents/session/index.js +127 -0
- package/dist/agents/session/playwright-login.d.ts +11 -0
- package/dist/agents/session/playwright-login.js +169 -0
- package/dist/agents/session/types.d.ts +72 -0
- package/dist/agents/session/types.js +26 -0
- package/dist/agents/tasks/agent.d.ts +27 -0
- package/dist/agents/tasks/agent.js +183 -0
- package/dist/agents/tasks/index.d.ts +14 -0
- package/dist/agents/tasks/index.js +30 -0
- package/dist/agents/tasks/resources.d.ts +39 -0
- package/dist/agents/tasks/resources.js +219 -0
- package/dist/agents/tasks/session.d.ts +6 -0
- package/dist/agents/tasks/session.js +63 -0
- package/dist/agents/tasks/shared.d.ts +38 -0
- package/dist/agents/tasks/shared.js +72 -0
- package/dist/agents/tasks/space.d.ts +12 -0
- package/dist/agents/tasks/space.js +55 -0
- package/dist/brand/api/auth.d.ts +58 -0
- package/dist/brand/api/auth.js +141 -0
- package/dist/brand/api/client.d.ts +40 -0
- package/dist/brand/api/client.js +83 -0
- package/dist/brand/api/types.d.ts +119 -0
- package/dist/brand/api/types.js +9 -0
- package/dist/brand/credential.d.ts +55 -0
- package/dist/brand/credential.js +87 -0
- package/dist/brand/documents/list.d.ts +85 -0
- package/dist/brand/documents/list.js +53 -0
- package/dist/brand/documents/upload.d.ts +113 -0
- package/dist/brand/documents/upload.js +106 -0
- package/dist/brand/index.d.ts +33 -0
- package/dist/brand/index.js +76 -0
- package/dist/brand/kits/create.d.ts +58 -0
- package/dist/brand/kits/create.js +68 -0
- package/dist/brand/kits/list.d.ts +53 -0
- package/dist/brand/kits/list.js +36 -0
- package/dist/brand/kits/sections.d.ts +156 -0
- package/dist/brand/kits/sections.js +80 -0
- package/dist/brand/pipeline/run.d.ts +58 -0
- package/dist/brand/pipeline/run.js +63 -0
- package/dist/brand/recipe/client.d.ts +4 -0
- package/dist/brand/recipe/client.js +24 -0
- package/dist/brand/recipe/diff.d.ts +4 -0
- package/dist/brand/recipe/diff.js +74 -0
- package/dist/brand/recipe/index.d.ts +10 -0
- package/dist/brand/recipe/index.js +20 -0
- package/dist/brand/recipe/kind.d.ts +4 -0
- package/dist/brand/recipe/kind.js +0 -0
- package/dist/brand/recipe/schema.d.ts +54 -0
- package/dist/brand/recipe/schema.js +59 -0
- package/dist/brand/review/format-json.d.ts +33 -0
- package/dist/brand/review/format-json.js +36 -0
- package/dist/brand/review/format-sarif.d.ts +64 -0
- package/dist/brand/review/format-sarif.js +77 -0
- package/dist/brand/review/format-text.d.ts +24 -0
- package/dist/brand/review/format-text.js +60 -0
- package/dist/brand/review/generate.d.ts +37 -0
- package/dist/brand/review/generate.js +146 -0
- package/dist/brand/review/outcomes.d.ts +43 -0
- package/dist/brand/review/outcomes.js +58 -0
- package/dist/brand/seed.d.ts +81 -0
- package/dist/brand/seed.js +151 -0
- package/dist/brand/tasks/login.d.ts +37 -0
- package/dist/brand/tasks/login.js +192 -0
- package/dist/brand/tasks/review.d.ts +111 -0
- package/dist/brand/tasks/review.js +310 -0
- package/dist/brief/api/brief-types.d.ts +64 -0
- package/dist/brief/api/brief-types.js +103 -0
- package/dist/brief/api/briefs.d.ts +66 -0
- package/dist/brief/api/briefs.js +58 -0
- package/dist/brief/api/comments.d.ts +43 -0
- package/dist/brief/api/comments.js +29 -0
- package/dist/brief/api/request.d.ts +5 -0
- package/dist/brief/api/request.js +83 -0
- package/dist/brief/api/schema.d.ts +158 -0
- package/dist/brief/api/schema.js +18 -0
- package/dist/brief/api/tasks.d.ts +41 -0
- package/dist/brief/api/tasks.js +24 -0
- package/dist/brief/api/types.d.ts +17 -0
- package/dist/brief/api/types.js +21 -0
- package/dist/brief/auth.d.ts +44 -0
- package/dist/brief/auth.js +101 -0
- package/dist/brief/client.d.ts +25 -0
- package/dist/brief/client.js +56 -0
- package/dist/brief/index.d.ts +31 -0
- package/dist/brief/index.js +53 -0
- package/dist/brief/recipe/client.d.ts +4 -0
- package/dist/brief/recipe/client.js +52 -0
- package/dist/brief/recipe/diff.d.ts +4 -0
- package/dist/brief/recipe/diff.js +74 -0
- package/dist/brief/recipe/index.d.ts +10 -0
- package/dist/brief/recipe/index.js +23 -0
- package/dist/brief/recipe/kind.d.ts +4 -0
- package/dist/brief/recipe/kind.js +114 -0
- package/dist/brief/recipe/schema.d.ts +152 -0
- package/dist/brief/recipe/schema.js +99 -0
- package/dist/brief/tasks/index.d.ts +128 -0
- package/dist/brief/tasks/index.js +286 -0
- package/dist/campaigns/api/deliverables.d.ts +37 -0
- package/dist/campaigns/api/deliverables.js +30 -0
- package/dist/campaigns/api/projects.d.ts +49 -0
- package/dist/campaigns/api/projects.js +45 -0
- package/dist/campaigns/api/request.d.ts +5 -0
- package/dist/campaigns/api/request.js +119 -0
- package/dist/campaigns/api/schema.d.ts +144 -0
- package/dist/campaigns/api/schema.js +22 -0
- package/dist/campaigns/api/tasks.d.ts +42 -0
- package/dist/campaigns/api/tasks.js +68 -0
- package/dist/campaigns/api/types.d.ts +17 -0
- package/dist/campaigns/api/types.js +27 -0
- package/dist/campaigns/api/users.d.ts +13 -0
- package/dist/campaigns/api/users.js +16 -0
- package/dist/campaigns/auth.d.ts +19 -0
- package/dist/campaigns/auth.js +86 -0
- package/dist/campaigns/client.d.ts +25 -0
- package/dist/campaigns/client.js +48 -0
- package/dist/campaigns/index.d.ts +29 -0
- package/dist/campaigns/index.js +47 -0
- package/dist/campaigns/recipe/client.d.ts +4 -0
- package/dist/campaigns/recipe/client.js +41 -0
- package/dist/campaigns/recipe/diff.d.ts +4 -0
- package/dist/campaigns/recipe/diff.js +119 -0
- package/dist/campaigns/recipe/index.d.ts +10 -0
- package/dist/campaigns/recipe/index.js +19 -0
- package/dist/campaigns/recipe/kind.d.ts +4 -0
- package/dist/campaigns/recipe/kind.js +217 -0
- package/dist/campaigns/recipe/schema.d.ts +79 -0
- package/dist/campaigns/recipe/schema.js +67 -0
- package/dist/campaigns/tasks/index.d.ts +124 -0
- package/dist/campaigns/tasks/index.js +271 -0
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +84 -63
- package/dist/commands/agents/index.d.ts +28 -0
- package/dist/commands/agents/index.js +289 -0
- package/dist/commands/agents/sync.d.ts +13 -0
- package/dist/commands/agents/sync.js +139 -0
- package/dist/commands/audit/all.d.ts +2 -0
- package/dist/commands/audit/all.js +26 -0
- package/dist/commands/audit/alt-text-missing.d.ts +2 -0
- package/dist/commands/audit/alt-text-missing.js +19 -0
- package/dist/commands/audit/baseline.d.ts +2 -0
- package/dist/commands/audit/baseline.js +75 -0
- package/dist/commands/audit/broken-images.d.ts +2 -0
- package/dist/commands/audit/broken-images.js +25 -0
- package/dist/commands/audit/broken-links.d.ts +2 -0
- package/dist/commands/audit/broken-links.js +18 -0
- package/dist/commands/audit/datasource-missing.d.ts +2 -0
- package/dist/commands/audit/datasource-missing.js +19 -0
- package/dist/commands/audit/dead-templates.d.ts +2 -0
- package/dist/commands/audit/dead-templates.js +18 -0
- package/dist/commands/audit/duplicates.d.ts +2 -0
- package/dist/commands/audit/duplicates.js +21 -0
- package/dist/commands/audit/empty-items.d.ts +2 -0
- package/dist/commands/audit/empty-items.js +19 -0
- package/dist/commands/audit/empty-links.d.ts +2 -0
- package/dist/commands/audit/empty-links.js +25 -0
- package/dist/commands/audit/empty-roles.d.ts +2 -0
- package/dist/commands/audit/empty-roles.js +18 -0
- package/dist/commands/audit/fallback-drift.d.ts +2 -0
- package/dist/commands/audit/fallback-drift.js +22 -0
- package/dist/commands/audit/find-replace.d.ts +2 -0
- package/dist/commands/audit/find-replace.js +27 -0
- package/dist/commands/audit/heavy-templates.d.ts +2 -0
- package/dist/commands/audit/heavy-templates.js +19 -0
- package/dist/commands/audit/history.d.ts +2 -0
- package/dist/commands/audit/history.js +44 -0
- package/dist/commands/audit/index.d.ts +2 -0
- package/dist/commands/audit/index.js +100 -0
- package/dist/commands/audit/language-data.d.ts +2 -0
- package/dist/commands/audit/language-data.js +24 -0
- package/dist/commands/audit/large-fields.d.ts +2 -0
- package/dist/commands/audit/large-fields.js +21 -0
- package/dist/commands/audit/missing-meta.d.ts +2 -0
- package/dist/commands/audit/missing-meta.js +22 -0
- package/dist/commands/audit/orphans.d.ts +2 -0
- package/dist/commands/audit/orphans.js +22 -0
- package/dist/commands/audit/page-design-orphans.d.ts +2 -0
- package/dist/commands/audit/page-design-orphans.js +18 -0
- package/dist/commands/audit/personalization-broken.d.ts +2 -0
- package/dist/commands/audit/personalization-broken.js +18 -0
- package/dist/commands/audit/references.d.ts +2 -0
- package/dist/commands/audit/references.js +27 -0
- package/dist/commands/audit/role-bloat.d.ts +2 -0
- package/dist/commands/audit/role-bloat.js +19 -0
- package/dist/commands/audit/shared.d.ts +7 -0
- package/dist/commands/audit/shared.js +32 -0
- package/dist/commands/audit/site-residue.d.ts +2 -0
- package/dist/commands/audit/site-residue.js +22 -0
- package/dist/commands/audit/slug-conflicts.d.ts +2 -0
- package/dist/commands/audit/slug-conflicts.js +20 -0
- package/dist/commands/audit/stale-content.d.ts +2 -0
- package/dist/commands/audit/stale-content.js +21 -0
- package/dist/commands/audit/stale-users.d.ts +2 -0
- package/dist/commands/audit/stale-users.js +21 -0
- package/dist/commands/audit/stale-workflow.d.ts +2 -0
- package/dist/commands/audit/stale-workflow.js +19 -0
- package/dist/commands/audit/suite.d.ts +2 -0
- package/dist/commands/audit/suite.js +31 -0
- package/dist/commands/audit/template-dependencies.d.ts +2 -0
- package/dist/commands/audit/template-dependencies.js +22 -0
- package/dist/commands/audit/translation-coverage.d.ts +2 -0
- package/dist/commands/audit/translation-coverage.js +22 -0
- package/dist/commands/audit/unused-media.d.ts +2 -0
- package/dist/commands/audit/unused-media.js +21 -0
- package/dist/commands/brand/docs.d.ts +9 -0
- package/dist/commands/brand/docs.js +168 -0
- package/dist/commands/brand/index.d.ts +13 -0
- package/dist/commands/brand/index.js +37 -0
- package/dist/commands/brand/ingest-enrich.d.ts +3 -0
- package/dist/commands/brand/ingest-enrich.js +71 -0
- package/dist/commands/brand/kits.d.ts +18 -0
- package/dist/commands/brand/kits.js +361 -0
- package/dist/commands/brand/review.d.ts +13 -0
- package/dist/commands/brand/review.js +65 -0
- package/dist/commands/brand/seed.d.ts +9 -0
- package/dist/commands/brand/seed.js +136 -0
- package/dist/commands/brand/sync.d.ts +11 -0
- package/dist/commands/brand/sync.js +128 -0
- package/dist/commands/brief/comments.d.ts +11 -0
- package/dist/commands/brief/comments.js +55 -0
- package/dist/commands/brief/delete.d.ts +10 -0
- package/dist/commands/brief/delete.js +40 -0
- package/dist/commands/brief/index.d.ts +19 -0
- package/dist/commands/brief/index.js +53 -0
- package/dist/commands/brief/list.d.ts +2 -0
- package/dist/commands/brief/list.js +19 -0
- package/dist/commands/brief/set-status.d.ts +10 -0
- package/dist/commands/brief/set-status.js +33 -0
- package/dist/commands/brief/show.d.ts +2 -0
- package/dist/commands/brief/show.js +19 -0
- package/dist/commands/brief/sync.d.ts +12 -0
- package/dist/commands/brief/sync.js +121 -0
- package/dist/commands/brief/todos.d.ts +9 -0
- package/dist/commands/brief/todos.js +28 -0
- package/dist/commands/brief/types.d.ts +16 -0
- package/dist/commands/brief/types.js +129 -0
- package/dist/commands/campaign/index.d.ts +2 -0
- package/dist/commands/campaign/index.js +309 -0
- package/dist/commands/campaign/sync.d.ts +12 -0
- package/dist/commands/campaign/sync.js +121 -0
- package/dist/commands/cleanup/archive.d.ts +2 -0
- package/dist/commands/cleanup/archive.js +21 -0
- package/dist/commands/cleanup/dead-templates.d.ts +2 -0
- package/dist/commands/cleanup/dead-templates.js +21 -0
- package/dist/commands/cleanup/duplicates.d.ts +2 -0
- package/dist/commands/cleanup/duplicates.js +49 -0
- package/dist/commands/cleanup/empty-folders.d.ts +2 -0
- package/dist/commands/cleanup/empty-folders.js +18 -0
- package/dist/commands/cleanup/field-set.d.ts +2 -0
- package/dist/commands/cleanup/field-set.js +44 -0
- package/dist/commands/cleanup/find-replace.d.ts +2 -0
- package/dist/commands/cleanup/find-replace.js +35 -0
- package/dist/commands/cleanup/index.d.ts +2 -0
- package/dist/commands/cleanup/index.js +48 -0
- package/dist/commands/cleanup/language-versions.d.ts +2 -0
- package/dist/commands/cleanup/language-versions.js +25 -0
- package/dist/commands/cleanup/rename.d.ts +2 -0
- package/dist/commands/cleanup/rename.js +32 -0
- package/dist/commands/cleanup/roles.d.ts +2 -0
- package/dist/commands/cleanup/roles.js +20 -0
- package/dist/commands/cleanup/shared.d.ts +2 -0
- package/dist/commands/cleanup/shared.js +15 -0
- package/dist/commands/cleanup/site-residue.d.ts +2 -0
- package/dist/commands/cleanup/site-residue.js +32 -0
- package/dist/commands/cleanup/slug-conflicts.d.ts +2 -0
- package/dist/commands/cleanup/slug-conflicts.js +54 -0
- package/dist/commands/cleanup/subtree.d.ts +2 -0
- package/dist/commands/cleanup/subtree.js +25 -0
- package/dist/commands/cleanup/users.d.ts +2 -0
- package/dist/commands/cleanup/users.js +23 -0
- package/dist/commands/cleanup/versions.d.ts +2 -0
- package/dist/commands/cleanup/versions.js +42 -0
- package/dist/commands/cleanup/workflow.d.ts +2 -0
- package/dist/commands/cleanup/workflow.js +40 -0
- package/dist/commands/config.d.ts +0 -1
- package/dist/commands/config.js +3 -3
- package/dist/commands/content/index.d.ts +2 -0
- package/dist/commands/content/index.js +11 -0
- package/dist/commands/content/version/index.d.ts +2 -0
- package/dist/commands/content/version/index.js +19 -0
- package/dist/commands/content/version/inspect.d.ts +2 -0
- package/dist/commands/content/version/inspect.js +22 -0
- package/dist/commands/content/version/set-never-publish.d.ts +2 -0
- package/dist/commands/content/version/set-never-publish.js +40 -0
- package/dist/commands/content/version/set-validity.d.ts +2 -0
- package/dist/commands/content/version/set-validity.js +30 -0
- package/dist/commands/deploy/deployments.d.ts +0 -1
- package/dist/commands/deploy/deployments.js +9 -9
- package/dist/commands/deploy/editing-host.d.ts +0 -1
- package/dist/commands/deploy/editing-host.js +25 -13
- package/dist/commands/deploy/environments/deployments.d.ts +0 -1
- package/dist/commands/deploy/environments/deployments.js +3 -3
- package/dist/commands/deploy/environments/index.d.ts +0 -1
- package/dist/commands/deploy/environments/index.js +1 -0
- package/dist/commands/deploy/environments/mutations.d.ts +0 -1
- package/dist/commands/deploy/environments/mutations.js +18 -17
- package/dist/commands/deploy/environments/queries.d.ts +1 -1
- package/dist/commands/deploy/environments/queries.js +29 -8
- package/dist/commands/deploy/environments/variables.d.ts +0 -1
- package/dist/commands/deploy/environments/variables.js +9 -8
- package/dist/commands/deploy/environments.d.ts +0 -1
- package/dist/commands/deploy/index.d.ts +0 -1
- package/dist/commands/deploy/index.js +1 -1
- package/dist/commands/deploy/logs.d.ts +0 -1
- package/dist/commands/deploy/logs.js +4 -4
- package/dist/commands/deploy/organizations.d.ts +0 -1
- package/dist/commands/deploy/organizations.js +5 -5
- package/dist/commands/deploy/projects.d.ts +0 -1
- package/dist/commands/deploy/projects.js +32 -20
- package/dist/commands/deploy/shared.d.ts +0 -1
- package/dist/commands/deploy/shared.js +1 -0
- package/dist/commands/deploy/site.d.ts +2 -3
- package/dist/commands/deploy/site.js +6 -5
- package/dist/commands/deploy/source-control.d.ts +0 -1
- package/dist/commands/deploy/source-control.js +13 -13
- package/dist/commands/deploy.d.ts +0 -1
- package/dist/commands/explain/index.d.ts +14 -0
- package/dist/commands/explain/index.js +25 -0
- package/dist/commands/explain/orphan-site.d.ts +11 -0
- package/dist/commands/explain/orphan-site.js +36 -0
- package/dist/commands/explain/why-blocked.d.ts +13 -0
- package/dist/commands/explain/why-blocked.js +42 -0
- package/dist/commands/health.d.ts +2 -0
- package/dist/commands/health.js +28 -0
- package/dist/commands/history.d.ts +0 -1
- package/dist/commands/history.js +11 -42
- package/dist/commands/init.d.ts +0 -1
- package/dist/commands/init.js +42 -8
- package/dist/commands/login.d.ts +11 -1
- package/dist/commands/login.js +35 -4
- package/dist/commands/logout.d.ts +0 -1
- package/dist/commands/logout.js +3 -3
- package/dist/commands/mcp/serve.d.ts +27 -0
- package/dist/commands/mcp/serve.js +120 -0
- package/dist/commands/mcp/tools.d.ts +8 -0
- package/dist/commands/mcp/tools.js +75 -0
- package/dist/commands/mcp.d.ts +2 -0
- package/dist/commands/mcp.js +23 -0
- package/dist/commands/policy.d.ts +16 -0
- package/dist/commands/policy.js +296 -0
- package/dist/commands/publish/all.d.ts +2 -0
- package/dist/commands/publish/all.js +41 -0
- package/dist/commands/publish/cancel.d.ts +2 -0
- package/dist/commands/publish/cancel.js +25 -0
- package/dist/commands/publish/history.d.ts +2 -0
- package/dist/commands/publish/history.js +34 -0
- package/dist/commands/publish/index.d.ts +2 -0
- package/dist/commands/publish/index.js +30 -0
- package/dist/commands/publish/item.d.ts +2 -0
- package/dist/commands/publish/item.js +55 -0
- package/dist/commands/publish/status.d.ts +2 -0
- package/dist/commands/publish/status.js +34 -0
- package/dist/commands/publish/unpublish.d.ts +2 -0
- package/dist/commands/publish/unpublish.js +52 -0
- package/dist/commands/recipe/index.d.ts +0 -1
- package/dist/commands/recipe/index.js +19 -15
- package/dist/commands/serialization/index.d.ts +0 -1
- package/dist/commands/serialization/index.js +14 -9
- package/dist/commands/serialization/package.d.ts +0 -1
- package/dist/commands/serialization/package.js +3 -3
- package/dist/commands/setup-client.d.ts +17 -0
- package/dist/commands/setup-client.js +148 -0
- package/dist/commands/shared.d.ts +72 -2
- package/dist/commands/shared.js +151 -24
- package/dist/commands/shell.d.ts +0 -1
- package/dist/commands/shell.js +1 -1
- package/dist/commands/status.d.ts +0 -1
- package/dist/commands/status.js +3 -3
- package/dist/commands/sync.d.ts +23 -0
- package/dist/commands/sync.js +154 -0
- package/dist/commands/telemetry.d.ts +0 -1
- package/dist/commands/telemetry.js +40 -2
- package/dist/commands/topics/index.d.ts +5 -0
- package/dist/commands/topics/index.js +102 -0
- package/dist/commands/webhook/create.d.ts +2 -0
- package/dist/commands/webhook/create.js +52 -0
- package/dist/commands/webhook/delete.d.ts +2 -0
- package/dist/commands/webhook/delete.js +20 -0
- package/dist/commands/webhook/event-types.d.ts +2 -0
- package/dist/commands/webhook/event-types.js +22 -0
- package/dist/commands/webhook/index.d.ts +2 -0
- package/dist/commands/webhook/index.js +33 -0
- package/dist/commands/webhook/inspect.d.ts +2 -0
- package/dist/commands/webhook/inspect.js +17 -0
- package/dist/commands/webhook/list.d.ts +2 -0
- package/dist/commands/webhook/list.js +24 -0
- package/dist/commands/webhook/shared.d.ts +2 -0
- package/dist/commands/webhook/shared.js +11 -0
- package/dist/commands/workflow/advance.d.ts +2 -0
- package/dist/commands/workflow/advance.js +22 -0
- package/dist/commands/workflow/apply.d.ts +2 -0
- package/dist/commands/workflow/apply.js +22 -0
- package/dist/commands/workflow/assigned.d.ts +2 -0
- package/dist/commands/workflow/assigned.js +21 -0
- package/dist/commands/workflow/index.d.ts +2 -0
- package/dist/commands/workflow/index.js +35 -0
- package/dist/commands/workflow/inspect.d.ts +2 -0
- package/dist/commands/workflow/inspect.js +17 -0
- package/dist/commands/workflow/list-commands.d.ts +2 -0
- package/dist/commands/workflow/list-commands.js +17 -0
- package/dist/commands/workflow/list-defs.d.ts +2 -0
- package/dist/commands/workflow/list-defs.js +17 -0
- package/dist/commands/workflow/reset.d.ts +2 -0
- package/dist/commands/workflow/reset.js +20 -0
- package/dist/commands/workflow/shared.d.ts +3 -0
- package/dist/commands/workflow/shared.js +12 -0
- package/dist/commands/workflow/status.d.ts +2 -0
- package/dist/commands/workflow/status.js +18 -0
- package/dist/config/env-overrides.d.ts +0 -1
- package/dist/config/env-overrides.js +41 -5
- package/dist/config/index.d.ts +15 -3
- package/dist/config/index.js +43 -3
- package/dist/config/modules.d.ts +0 -1
- package/dist/config/modules.js +2 -2
- package/dist/config/paths.d.ts +0 -1
- package/dist/config/paths.js +11 -2
- package/dist/config/root-config.d.ts +24 -1
- package/dist/config/root-config.js +84 -7
- package/dist/config/schema.json +113 -25
- package/dist/config/types.d.ts +228 -13
- package/dist/config/types.js +1 -1
- package/dist/config/validation.d.ts +1 -4
- package/dist/content/api/version-fields.d.ts +129 -0
- package/dist/content/api/version-fields.js +193 -0
- package/dist/content/index.d.ts +15 -0
- package/dist/content/index.js +40 -0
- package/dist/content/tasks/shared.d.ts +86 -0
- package/dist/content/tasks/shared.js +130 -0
- package/dist/content/tasks/version-inspect.d.ts +13 -0
- package/dist/content/tasks/version-inspect.js +56 -0
- package/dist/content/tasks/version-never-publish.d.ts +16 -0
- package/dist/content/tasks/version-never-publish.js +115 -0
- package/dist/content/tasks/version-validity.d.ts +24 -0
- package/dist/content/tasks/version-validity.js +159 -0
- package/dist/deploy/api/client-naming.d.ts +80 -0
- package/dist/deploy/api/client-naming.js +124 -0
- package/dist/deploy/api/client.d.ts +72 -0
- package/dist/deploy/api/client.js +72 -0
- package/dist/deploy/api/clients.d.ts +126 -0
- package/dist/deploy/api/clients.js +89 -0
- package/dist/deploy/api/common/headers.d.ts +0 -1
- package/dist/deploy/api/common/request.d.ts +0 -5
- package/dist/deploy/api/common/request.js +93 -120
- package/dist/deploy/api/common/transport-events.d.ts +31 -0
- package/dist/deploy/api/common/transport-events.js +24 -0
- package/dist/deploy/api/common/types.d.ts +60 -1
- package/dist/deploy/api/deployment-logs.d.ts +0 -1
- package/dist/deploy/api/deployment-logs.js +5 -5
- package/dist/deploy/api/deployments.d.ts +1 -2
- package/dist/deploy/api/deployments.js +22 -20
- package/dist/deploy/api/environments.d.ts +28 -2
- package/dist/deploy/api/environments.js +103 -20
- package/dist/deploy/api/index.d.ts +31 -9
- package/dist/deploy/api/index.js +129 -22
- package/dist/deploy/api/logs.d.ts +1 -2
- package/dist/deploy/api/logs.js +9 -7
- package/dist/deploy/api/organizations.d.ts +1 -2
- package/dist/deploy/api/organizations.js +8 -7
- package/dist/deploy/api/projects.d.ts +19 -4
- package/dist/deploy/api/projects.js +75 -13
- package/dist/deploy/api/source-control.d.ts +1 -2
- package/dist/deploy/api/source-control.js +25 -24
- package/dist/deploy/api.d.ts +0 -1
- package/dist/deploy/context.d.ts +52 -0
- package/dist/deploy/context.js +234 -0
- package/dist/deploy/index.d.ts +11 -0
- package/dist/deploy/index.js +38 -0
- package/dist/deploy/tasks/deployment-result.d.ts +0 -1
- package/dist/deploy/tasks/deployments.d.ts +0 -1
- package/dist/deploy/tasks/deployments.js +12 -11
- package/dist/deploy/tasks/editing-host.d.ts +0 -1
- package/dist/deploy/tasks/editing-host.js +48 -18
- package/dist/deploy/tasks/environments.d.ts +3 -3
- package/dist/deploy/tasks/environments.js +108 -24
- package/dist/deploy/tasks/health.d.ts +23 -0
- package/dist/deploy/tasks/health.js +181 -0
- package/dist/deploy/tasks/logs.d.ts +0 -1
- package/dist/deploy/tasks/logs.js +4 -4
- package/dist/deploy/tasks/organizations.d.ts +0 -1
- package/dist/deploy/tasks/organizations.js +5 -5
- package/dist/deploy/tasks/projects.d.ts +6 -2
- package/dist/deploy/tasks/projects.js +61 -42
- package/dist/deploy/tasks/shared.d.ts +9 -52
- package/dist/deploy/tasks/shared.js +46 -222
- package/dist/deploy/tasks/site-bind.d.ts +1 -2
- package/dist/deploy/tasks/site-bind.js +7 -7
- package/dist/deploy/tasks/site.d.ts +2 -3
- package/dist/deploy/tasks/site.js +4 -4
- package/dist/deploy/tasks/source-control.d.ts +0 -1
- package/dist/deploy/tasks/source-control.js +14 -14
- package/dist/deploy/tasks/transport-spinner.d.ts +5 -0
- package/dist/deploy/tasks/transport-spinner.js +118 -0
- package/dist/deploy/tasks/types.d.ts +16 -3
- package/dist/deploy/tasks/types.js +1 -1
- package/dist/hygiene/api/client.d.ts +294 -0
- package/dist/hygiene/api/client.js +827 -0
- package/dist/hygiene/api/graphql.d.ts +4 -0
- package/dist/hygiene/api/graphql.js +18 -0
- package/dist/hygiene/audit-suite.d.ts +84 -0
- package/dist/hygiene/audit-suite.js +95 -0
- package/dist/hygiene/baseline.d.ts +56 -0
- package/dist/hygiene/baseline.js +248 -0
- package/dist/hygiene/cache.d.ts +35 -0
- package/dist/hygiene/cache.js +179 -0
- package/dist/hygiene/history.d.ts +70 -0
- package/dist/hygiene/history.js +148 -0
- package/dist/hygiene/index.d.ts +128 -0
- package/dist/hygiene/index.js +168 -0
- package/dist/hygiene/output-adapters.d.ts +49 -0
- package/dist/hygiene/output-adapters.js +270 -0
- package/dist/hygiene/tasks/audit/all.d.ts +58 -0
- package/dist/hygiene/tasks/audit/all.js +274 -0
- package/dist/hygiene/tasks/audit/alt-text-missing.d.ts +27 -0
- package/dist/hygiene/tasks/audit/alt-text-missing.js +87 -0
- package/dist/hygiene/tasks/audit/baseline.d.ts +66 -0
- package/dist/hygiene/tasks/audit/baseline.js +185 -0
- package/dist/hygiene/tasks/audit/broken-images.d.ts +41 -0
- package/dist/hygiene/tasks/audit/broken-images.js +183 -0
- package/dist/hygiene/tasks/audit/broken-links.d.ts +53 -0
- package/dist/hygiene/tasks/audit/broken-links.js +121 -0
- package/dist/hygiene/tasks/audit/datasource-missing.d.ts +44 -0
- package/dist/hygiene/tasks/audit/datasource-missing.js +146 -0
- package/dist/hygiene/tasks/audit/dead-templates.d.ts +46 -0
- package/dist/hygiene/tasks/audit/dead-templates.js +216 -0
- package/dist/hygiene/tasks/audit/duplicates.d.ts +48 -0
- package/dist/hygiene/tasks/audit/duplicates.js +94 -0
- package/dist/hygiene/tasks/audit/empty-items.d.ts +24 -0
- package/dist/hygiene/tasks/audit/empty-items.js +53 -0
- package/dist/hygiene/tasks/audit/empty-links.d.ts +37 -0
- package/dist/hygiene/tasks/audit/empty-links.js +145 -0
- package/dist/hygiene/tasks/audit/empty-roles.d.ts +41 -0
- package/dist/hygiene/tasks/audit/empty-roles.js +51 -0
- package/dist/hygiene/tasks/audit/fallback-drift.d.ts +53 -0
- package/dist/hygiene/tasks/audit/fallback-drift.js +115 -0
- package/dist/hygiene/tasks/audit/find-replace.d.ts +75 -0
- package/dist/hygiene/tasks/audit/find-replace.js +142 -0
- package/dist/hygiene/tasks/audit/heavy-templates.d.ts +46 -0
- package/dist/hygiene/tasks/audit/heavy-templates.js +73 -0
- package/dist/hygiene/tasks/audit/history.d.ts +30 -0
- package/dist/hygiene/tasks/audit/history.js +161 -0
- package/dist/hygiene/tasks/audit/language-data.d.ts +55 -0
- package/dist/hygiene/tasks/audit/language-data.js +126 -0
- package/dist/hygiene/tasks/audit/large-fields.d.ts +48 -0
- package/dist/hygiene/tasks/audit/large-fields.js +84 -0
- package/dist/hygiene/tasks/audit/missing-meta.d.ts +57 -0
- package/dist/hygiene/tasks/audit/missing-meta.js +97 -0
- package/dist/hygiene/tasks/audit/orphans.d.ts +47 -0
- package/dist/hygiene/tasks/audit/orphans.js +78 -0
- package/dist/hygiene/tasks/audit/page-design-orphans.d.ts +24 -0
- package/dist/hygiene/tasks/audit/page-design-orphans.js +80 -0
- package/dist/hygiene/tasks/audit/personalization-broken.d.ts +25 -0
- package/dist/hygiene/tasks/audit/personalization-broken.js +96 -0
- package/dist/hygiene/tasks/audit/references.d.ts +70 -0
- package/dist/hygiene/tasks/audit/references.js +142 -0
- package/dist/hygiene/tasks/audit/role-bloat.d.ts +42 -0
- package/dist/hygiene/tasks/audit/role-bloat.js +64 -0
- package/dist/hygiene/tasks/audit/site-residue.d.ts +39 -0
- package/dist/hygiene/tasks/audit/site-residue.js +164 -0
- package/dist/hygiene/tasks/audit/slug-conflicts.d.ts +58 -0
- package/dist/hygiene/tasks/audit/slug-conflicts.js +87 -0
- package/dist/hygiene/tasks/audit/stale-content.d.ts +68 -0
- package/dist/hygiene/tasks/audit/stale-content.js +133 -0
- package/dist/hygiene/tasks/audit/stale-users.d.ts +54 -0
- package/dist/hygiene/tasks/audit/stale-users.js +83 -0
- package/dist/hygiene/tasks/audit/stale-workflow.d.ts +50 -0
- package/dist/hygiene/tasks/audit/stale-workflow.js +109 -0
- package/dist/hygiene/tasks/audit/suite-run.d.ts +28 -0
- package/dist/hygiene/tasks/audit/suite-run.js +46 -0
- package/dist/hygiene/tasks/audit/template-dependencies.d.ts +72 -0
- package/dist/hygiene/tasks/audit/template-dependencies.js +97 -0
- package/dist/hygiene/tasks/audit/translation-coverage.d.ts +64 -0
- package/dist/hygiene/tasks/audit/translation-coverage.js +123 -0
- package/dist/hygiene/tasks/audit/unused-media.d.ts +58 -0
- package/dist/hygiene/tasks/audit/unused-media.js +144 -0
- package/dist/hygiene/tasks/browse.d.ts +49 -0
- package/dist/hygiene/tasks/browse.js +50 -0
- package/dist/hygiene/tasks/cleanup/archive-purge.d.ts +50 -0
- package/dist/hygiene/tasks/cleanup/archive-purge.js +129 -0
- package/dist/hygiene/tasks/cleanup/dead-templates.d.ts +74 -0
- package/dist/hygiene/tasks/cleanup/dead-templates.js +247 -0
- package/dist/hygiene/tasks/cleanup/duplicates.d.ts +86 -0
- package/dist/hygiene/tasks/cleanup/duplicates.js +189 -0
- package/dist/hygiene/tasks/cleanup/empty-folders.d.ts +75 -0
- package/dist/hygiene/tasks/cleanup/empty-folders.js +165 -0
- package/dist/hygiene/tasks/cleanup/field-set.d.ts +108 -0
- package/dist/hygiene/tasks/cleanup/field-set.js +230 -0
- package/dist/hygiene/tasks/cleanup/find-replace.d.ts +77 -0
- package/dist/hygiene/tasks/cleanup/find-replace.js +180 -0
- package/dist/hygiene/tasks/cleanup/language-version-add.d.ts +74 -0
- package/dist/hygiene/tasks/cleanup/language-version-add.js +136 -0
- package/dist/hygiene/tasks/cleanup/rename.d.ts +78 -0
- package/dist/hygiene/tasks/cleanup/rename.js +152 -0
- package/dist/hygiene/tasks/cleanup/roles.d.ts +58 -0
- package/dist/hygiene/tasks/cleanup/roles.js +177 -0
- package/dist/hygiene/tasks/cleanup/site-residue.d.ts +55 -0
- package/dist/hygiene/tasks/cleanup/site-residue.js +247 -0
- package/dist/hygiene/tasks/cleanup/slug-conflicts.d.ts +126 -0
- package/dist/hygiene/tasks/cleanup/slug-conflicts.js +296 -0
- package/dist/hygiene/tasks/cleanup/subtree-prune.d.ts +40 -0
- package/dist/hygiene/tasks/cleanup/subtree-prune.js +113 -0
- package/dist/hygiene/tasks/cleanup/subtree.d.ts +123 -0
- package/dist/hygiene/tasks/cleanup/subtree.js +312 -0
- package/dist/hygiene/tasks/cleanup/users.d.ts +48 -0
- package/dist/hygiene/tasks/cleanup/users.js +92 -0
- package/dist/hygiene/tasks/cleanup/versions-archive.d.ts +57 -0
- package/dist/hygiene/tasks/cleanup/versions-archive.js +162 -0
- package/dist/hygiene/tasks/cleanup/versions-prune.d.ts +76 -0
- package/dist/hygiene/tasks/cleanup/versions-prune.js +194 -0
- package/dist/hygiene/tasks/cleanup/workflow-advance.d.ts +76 -0
- package/dist/hygiene/tasks/cleanup/workflow-advance.js +185 -0
- package/dist/hygiene/tasks/cleanup/workflow-apply.d.ts +97 -0
- package/dist/hygiene/tasks/cleanup/workflow-apply.js +310 -0
- package/dist/hygiene/tasks/explain/orphan-site.d.ts +53 -0
- package/dist/hygiene/tasks/explain/orphan-site.js +83 -0
- package/dist/hygiene/tasks/explain/why-blocked.d.ts +81 -0
- package/dist/hygiene/tasks/explain/why-blocked.js +149 -0
- package/dist/hygiene/tasks/reference-kind.d.ts +47 -0
- package/dist/hygiene/tasks/reference-kind.js +73 -0
- package/dist/hygiene/tasks/shared.d.ts +350 -0
- package/dist/hygiene/tasks/shared.js +532 -0
- package/dist/mcp/auth.d.ts +80 -0
- package/dist/mcp/auth.js +165 -0
- package/dist/mcp/build-registry.d.ts +12 -0
- package/dist/mcp/build-registry.js +75 -0
- package/dist/mcp/descriptions.d.ts +22 -0
- package/dist/mcp/descriptions.js +113 -0
- package/dist/mcp/dispatch.d.ts +44 -0
- package/dist/mcp/dispatch.js +110 -0
- package/dist/mcp/errors.d.ts +31 -0
- package/dist/mcp/errors.js +117 -0
- package/dist/mcp/http.d.ts +42 -0
- package/dist/mcp/http.js +128 -0
- package/dist/mcp/logging.d.ts +28 -0
- package/dist/mcp/logging.js +78 -0
- package/dist/mcp/prompts/workflows.d.ts +13 -0
- package/dist/mcp/prompts/workflows.js +171 -0
- package/dist/mcp/redact.d.ts +11 -0
- package/dist/mcp/redact.js +35 -0
- package/dist/mcp/registry.d.ts +84 -0
- package/dist/mcp/registry.js +62 -0
- package/dist/mcp/resources/brand.d.ts +20 -0
- package/dist/mcp/resources/brand.js +514 -0
- package/dist/mcp/resources/env.d.ts +10 -0
- package/dist/mcp/resources/env.js +120 -0
- package/dist/mcp/resources/help.d.ts +10 -0
- package/dist/mcp/resources/help.js +475 -0
- package/dist/mcp/resources/recipes.d.ts +13 -0
- package/dist/mcp/resources/recipes.js +270 -0
- package/dist/mcp/schemas/common.d.ts +22 -0
- package/dist/mcp/schemas/common.js +43 -0
- package/dist/mcp/server.d.ts +26 -0
- package/dist/mcp/server.js +88 -0
- package/dist/mcp/tools/access-check.d.ts +11 -0
- package/dist/mcp/tools/access-check.js +47 -0
- package/dist/mcp/tools/agents-recipe.d.ts +2 -0
- package/dist/mcp/tools/agents-recipe.js +139 -0
- package/dist/mcp/tools/agents.d.ts +2 -0
- package/dist/mcp/tools/agents.js +148 -0
- package/dist/mcp/tools/audit.d.ts +41 -0
- package/dist/mcp/tools/audit.js +584 -0
- package/dist/mcp/tools/bootstrap.d.ts +8 -0
- package/dist/mcp/tools/bootstrap.js +200 -0
- package/dist/mcp/tools/brand-recipe.d.ts +2 -0
- package/dist/mcp/tools/brand-recipe.js +123 -0
- package/dist/mcp/tools/brand.d.ts +28 -0
- package/dist/mcp/tools/brand.js +549 -0
- package/dist/mcp/tools/brief-recipe.d.ts +2 -0
- package/dist/mcp/tools/brief-recipe.js +123 -0
- package/dist/mcp/tools/brief.d.ts +16 -0
- package/dist/mcp/tools/brief.js +388 -0
- package/dist/mcp/tools/browse.d.ts +9 -0
- package/dist/mcp/tools/browse.js +57 -0
- package/dist/mcp/tools/campaign-recipe.d.ts +2 -0
- package/dist/mcp/tools/campaign-recipe.js +125 -0
- package/dist/mcp/tools/campaign.d.ts +20 -0
- package/dist/mcp/tools/campaign.js +342 -0
- package/dist/mcp/tools/cleanup.d.ts +22 -0
- package/dist/mcp/tools/cleanup.js +608 -0
- package/dist/mcp/tools/deploy.d.ts +19 -0
- package/dist/mcp/tools/deploy.js +797 -0
- package/dist/mcp/tools/explain.d.ts +2 -0
- package/dist/mcp/tools/explain.js +132 -0
- package/dist/mcp/tools/inspector.d.ts +12 -0
- package/dist/mcp/tools/inspector.js +101 -0
- package/dist/mcp/tools/onboard.d.ts +11 -0
- package/dist/mcp/tools/onboard.js +65 -0
- package/dist/mcp/tools/publish.d.ts +30 -0
- package/dist/mcp/tools/publish.js +173 -0
- package/dist/mcp/tools/recipe-sync.d.ts +2 -0
- package/dist/mcp/tools/recipe-sync.js +117 -0
- package/dist/mcp/tools/recipe.d.ts +18 -0
- package/dist/mcp/tools/recipe.js +250 -0
- package/dist/mcp/tools/serialization.d.ts +17 -0
- package/dist/mcp/tools/serialization.js +282 -0
- package/dist/mcp/tools/webhook.d.ts +12 -0
- package/dist/mcp/tools/webhook.js +246 -0
- package/dist/mcp/tools/workflow.d.ts +21 -0
- package/dist/mcp/tools/workflow.js +436 -0
- package/dist/policy/access-check.d.ts +56 -0
- package/dist/policy/access-check.js +160 -0
- package/dist/policy/allow-write.d.ts +37 -0
- package/dist/policy/allow-write.js +78 -0
- package/dist/policy/authorize.d.ts +36 -0
- package/dist/policy/authorize.js +102 -0
- package/dist/policy/caller.d.ts +23 -0
- package/dist/policy/caller.js +66 -0
- package/dist/policy/enforce.d.ts +25 -0
- package/dist/policy/enforce.js +57 -0
- package/dist/policy/enroll.d.ts +57 -0
- package/dist/policy/enroll.js +101 -0
- package/dist/policy/environment.d.ts +35 -0
- package/dist/policy/environment.js +44 -0
- package/dist/policy/identity.d.ts +24 -0
- package/dist/policy/identity.js +58 -0
- package/dist/policy/index.d.ts +22 -0
- package/dist/policy/index.js +42 -0
- package/dist/policy/operations.d.ts +24 -0
- package/dist/policy/operations.js +37 -0
- package/dist/policy/organization.d.ts +62 -0
- package/dist/policy/organization.js +97 -0
- package/dist/policy/paths.d.ts +21 -0
- package/dist/policy/paths.js +46 -0
- package/dist/policy/resolve.d.ts +15 -0
- package/dist/policy/resolve.js +67 -0
- package/dist/policy/schema.d.ts +137 -0
- package/dist/policy/schema.js +92 -0
- package/dist/policy/store.d.ts +25 -0
- package/dist/policy/store.js +85 -0
- package/dist/policy/types.d.ts +52 -0
- package/dist/policy/types.js +22 -0
- package/dist/program.d.ts +35 -0
- package/dist/program.js +131 -0
- package/dist/publishing/api/auth.d.ts +49 -0
- package/dist/publishing/api/auth.js +173 -0
- package/dist/publishing/api/client.d.ts +5 -0
- package/dist/publishing/api/client.js +153 -0
- package/dist/publishing/api/languages.d.ts +61 -0
- package/dist/publishing/api/languages.js +116 -0
- package/dist/publishing/api/path-resolver.d.ts +10 -0
- package/dist/publishing/api/path-resolver.js +76 -0
- package/dist/publishing/api/sites.d.ts +23 -0
- package/dist/publishing/api/sites.js +27 -0
- package/dist/publishing/api/types.d.ts +166 -0
- package/dist/publishing/api/types.js +17 -0
- package/dist/publishing/index.d.ts +25 -0
- package/dist/publishing/index.js +51 -0
- package/dist/publishing/job-diagnostics.d.ts +44 -0
- package/dist/publishing/job-diagnostics.js +87 -0
- package/dist/publishing/job-watcher.d.ts +33 -0
- package/dist/publishing/job-watcher.js +118 -0
- package/dist/publishing/tasks/all.d.ts +41 -0
- package/dist/publishing/tasks/all.js +234 -0
- package/dist/publishing/tasks/cancel.d.ts +18 -0
- package/dist/publishing/tasks/cancel.js +147 -0
- package/dist/publishing/tasks/history.d.ts +22 -0
- package/dist/publishing/tasks/history.js +85 -0
- package/dist/publishing/tasks/item.d.ts +69 -0
- package/dist/publishing/tasks/item.js +194 -0
- package/dist/publishing/tasks/status.d.ts +17 -0
- package/dist/publishing/tasks/status.js +74 -0
- package/dist/publishing/tasks/unpublish.d.ts +69 -0
- package/dist/publishing/tasks/unpublish.js +546 -0
- package/dist/recipe/api/auth.d.ts +1 -2
- package/dist/recipe/api/auth.js +1 -1
- package/dist/recipe/api/authoring-client.d.ts +9 -3
- package/dist/recipe/api/authoring-client.js +101 -17
- package/dist/recipe/api/client.d.ts +50 -1
- package/dist/recipe/api/graphql.d.ts +2 -3
- package/dist/recipe/api/graphql.js +1 -1
- package/dist/recipe/api/ref-encoding.d.ts +0 -1
- package/dist/recipe/api/ref-encoding.js +5 -5
- package/dist/recipe/api/site-discovery.d.ts +1 -2
- package/dist/recipe/api/sites-client.d.ts +6 -3
- package/dist/recipe/api/sites-client.js +11 -8
- package/dist/recipe/cache.d.ts +0 -1
- package/dist/recipe/compile/component-section.d.ts +1 -2
- package/dist/recipe/compile/component-section.js +2 -2
- package/dist/recipe/compile/component-template.d.ts +0 -1
- package/dist/recipe/compile/component-template.js +15 -19
- package/dist/recipe/compile/content-item.d.ts +42 -22
- package/dist/recipe/compile/content-item.js +198 -46
- package/dist/recipe/compile/content-template.d.ts +0 -1
- package/dist/recipe/compile/content-template.js +25 -1
- package/dist/recipe/compile/design-parameters-template.d.ts +13 -0
- package/dist/recipe/compile/design-parameters-template.js +92 -0
- package/dist/recipe/compile/enumeration.d.ts +0 -1
- package/dist/recipe/compile/enumeration.js +4 -4
- package/dist/recipe/compile/page-design.d.ts +0 -1
- package/dist/recipe/compile/page-design.js +1 -1
- package/dist/recipe/compile/page-template.d.ts +30 -0
- package/dist/recipe/compile/page-template.js +121 -0
- package/dist/recipe/compile/page.d.ts +26 -0
- package/dist/recipe/compile/page.js +184 -0
- package/dist/recipe/compile/partial-design.d.ts +0 -1
- package/dist/recipe/compile/partial-design.js +1 -1
- package/dist/recipe/compile/placeholder.d.ts +23 -0
- package/dist/recipe/compile/placeholder.js +32 -0
- package/dist/recipe/compile/section-definition.d.ts +0 -1
- package/dist/recipe/compile/shared.d.ts +52 -7
- package/dist/recipe/compile/shared.js +55 -15
- package/dist/recipe/compile/site-template.d.ts +0 -1
- package/dist/recipe/compile/site-template.js +1 -1
- package/dist/recipe/compile/site.d.ts +0 -1
- package/dist/recipe/compile/site.js +1 -1
- package/dist/recipe/compile/webhook-authorization.d.ts +23 -0
- package/dist/recipe/compile/webhook-authorization.js +116 -0
- package/dist/recipe/compile/workflow.d.ts +46 -0
- package/dist/recipe/compile/workflow.js +368 -0
- package/dist/recipe/compile.d.ts +19 -3
- package/dist/recipe/compile.js +297 -11
- package/dist/recipe/ensure-marker-field.d.ts +25 -0
- package/dist/recipe/ensure-marker-field.js +140 -0
- package/dist/recipe/execute.d.ts +19 -2
- package/dist/recipe/execute.js +39 -8
- package/dist/recipe/guids.d.ts +106 -9
- package/dist/recipe/guids.js +126 -15
- package/dist/recipe/index.d.ts +11 -5
- package/dist/recipe/index.js +46 -23
- package/dist/recipe/io.d.ts +0 -1
- package/dist/recipe/io.js +33 -10
- package/dist/recipe/ir/operations.d.ts +66 -4
- package/dist/recipe/ir/operations.js +55 -2
- package/dist/recipe/ir/sitecore-templates.d.ts +87 -1
- package/dist/recipe/ir/sitecore-templates.js +94 -1
- package/dist/recipe/layout/emit.d.ts +22 -3
- package/dist/recipe/layout/emit.js +18 -7
- package/dist/recipe/layout/parse.d.ts +164 -0
- package/dist/recipe/layout/parse.js +295 -0
- package/dist/recipe/layout/templates-mapping.d.ts +0 -1
- package/dist/recipe/marker.d.ts +28 -0
- package/dist/recipe/marker.js +37 -0
- package/dist/recipe/plan.d.ts +9 -2
- package/dist/recipe/plan.js +195 -19
- package/dist/recipe/policy.d.ts +0 -1
- package/dist/recipe/policy.js +19 -1
- package/dist/recipe/read-current.d.ts +109 -0
- package/dist/recipe/read-current.js +1285 -0
- package/dist/recipe/recipe-kind.d.ts +4 -0
- package/dist/recipe/recipe-kind.js +217 -0
- package/dist/recipe/rollback-log.d.ts +52 -0
- package/dist/recipe/rollback-log.js +90 -0
- package/dist/recipe/rollback.d.ts +12 -1
- package/dist/recipe/rollback.js +32 -7
- package/dist/recipe/sandbox/load.d.ts +17 -0
- package/dist/recipe/sandbox/load.js +145 -0
- package/dist/recipe/sandbox/recipe-runner.cjs +49 -0
- package/dist/recipe/sandbox/transpile.d.ts +17 -0
- package/dist/recipe/sandbox/transpile.js +46 -0
- package/dist/recipe/schema/field-types.d.ts +3 -4
- package/dist/recipe/schema/recipe.d.ts +1631 -213
- package/dist/recipe/schema/recipe.js +576 -37
- package/dist/recipe/schema/source-fields.d.ts +0 -1
- package/dist/recipe/tasks/compile.d.ts +1 -2
- package/dist/recipe/tasks/compile.js +14 -4
- package/dist/recipe/tasks/diff.d.ts +1 -2
- package/dist/recipe/tasks/placeholder-allow.d.ts +0 -1
- package/dist/recipe/tasks/placeholder-allow.js +3 -7
- package/dist/recipe/tasks/plan.d.ts +3 -4
- package/dist/recipe/tasks/plan.js +5 -5
- package/dist/recipe/tasks/prune-defaults.d.ts +1 -2
- package/dist/recipe/tasks/prune-defaults.js +6 -7
- package/dist/recipe/tasks/push.d.ts +1 -2
- package/dist/recipe/tasks/push.js +46 -6
- package/dist/recipe/tasks/shared.d.ts +21 -4
- package/dist/recipe/tasks/shared.js +34 -21
- package/dist/recipe/unstable.d.ts +18 -0
- package/dist/recipe/unstable.js +36 -0
- package/dist/recipe/validate.d.ts +51 -2
- package/dist/recipe/validate.js +162 -15
- package/dist/scripting/connect.d.ts +24 -0
- package/dist/scripting/connect.js +17 -0
- package/dist/scripting/helpers/multilist.d.ts +26 -0
- package/dist/scripting/helpers/multilist.js +75 -0
- package/dist/scripting/index.d.ts +20 -0
- package/dist/scripting/index.js +57 -0
- package/dist/serialization/api/auth.d.ts +57 -0
- package/dist/serialization/api/auth.js +433 -0
- package/dist/serialization/api/client.d.ts +41 -0
- package/dist/serialization/api/client.js +41 -0
- package/dist/serialization/api/graphql.d.ts +11 -0
- package/dist/serialization/api/history.d.ts +8 -0
- package/dist/serialization/api/index.d.ts +23 -0
- package/dist/serialization/api/index.js +64 -0
- package/dist/serialization/api/items.d.ts +7 -0
- package/dist/serialization/api/items.js +132 -0
- package/dist/serialization/api/publish.d.ts +43 -0
- package/dist/serialization/api/publish.js +67 -0
- package/dist/serialization/api/roles.d.ts +8 -0
- package/dist/serialization/api/types.d.ts +65 -0
- package/dist/serialization/api/types.js +2 -0
- package/dist/serialization/api/users.d.ts +8 -0
- package/dist/serialization/commands.d.ts +0 -1
- package/dist/serialization/compare.d.ts +0 -1
- package/dist/serialization/context.d.ts +25 -0
- package/dist/serialization/context.js +58 -0
- package/dist/serialization/field-filter.d.ts +0 -1
- package/dist/serialization/filesystem-store/constants.d.ts +0 -1
- package/dist/serialization/filesystem-store/items.d.ts +0 -1
- package/dist/serialization/filesystem-store/items.js +1 -1
- package/dist/serialization/filesystem-store/roles.d.ts +1 -2
- package/dist/serialization/filesystem-store/users.d.ts +1 -2
- package/dist/serialization/filesystem-store/utils.d.ts +0 -1
- package/dist/serialization/index.d.ts +12 -0
- package/dist/serialization/index.js +32 -0
- package/dist/serialization/item-path.d.ts +0 -1
- package/dist/serialization/item-path.js +3 -3
- package/dist/serialization/path-provider.d.ts +0 -1
- package/dist/serialization/path-provider.js +4 -4
- package/dist/serialization/signature.d.ts +0 -1
- package/dist/serialization/tasks/diff.d.ts +0 -1
- package/dist/serialization/tasks/diff.js +176 -48
- package/dist/serialization/tasks/env/constants.d.ts +13 -1
- package/dist/serialization/tasks/env/constants.js +64 -1
- package/dist/serialization/tasks/env/deploy-token.d.ts +0 -1
- package/dist/serialization/tasks/env/deploy-token.js +69 -17
- package/dist/serialization/tasks/env/init/auth.d.ts +11 -3
- package/dist/serialization/tasks/env/init/auth.js +19 -17
- package/dist/serialization/tasks/env/init/deploy-lookup.d.ts +1 -2
- package/dist/serialization/tasks/env/init/deploy-lookup.js +18 -5
- package/dist/serialization/tasks/env/init.d.ts +0 -1
- package/dist/serialization/tasks/env/init.js +18 -12
- package/dist/serialization/tasks/env/logout.d.ts +0 -1
- package/dist/serialization/tasks/env/logout.js +13 -6
- package/dist/serialization/tasks/env/onboard.d.ts +40 -0
- package/dist/serialization/tasks/env/onboard.js +53 -0
- package/dist/serialization/tasks/env/setup-clients.d.ts +24 -0
- package/dist/serialization/tasks/env/setup-clients.js +119 -0
- package/dist/serialization/tasks/env/setup-env.d.ts +54 -0
- package/dist/serialization/tasks/env/setup-env.js +216 -0
- package/dist/serialization/tasks/env/setup-org-client.d.ts +21 -0
- package/dist/serialization/tasks/env/setup-org-client.js +146 -0
- package/dist/serialization/tasks/env/status.d.ts +0 -1
- package/dist/serialization/tasks/env/status.js +36 -11
- package/dist/serialization/tasks/helpers/collect.d.ts +1 -2
- package/dist/serialization/tasks/helpers/collect.js +22 -15
- package/dist/serialization/tasks/helpers/commands.d.ts +0 -1
- package/dist/serialization/tasks/helpers/filesystem.d.ts +0 -1
- package/dist/serialization/tasks/helpers/filesystem.js +4 -4
- package/dist/serialization/tasks/helpers/items.d.ts +0 -1
- package/dist/serialization/tasks/helpers/sitecore.d.ts +1 -2
- package/dist/serialization/tasks/helpers/sitecore.js +2 -2
- package/dist/serialization/tasks/info.d.ts +0 -1
- package/dist/serialization/tasks/package.d.ts +0 -1
- package/dist/serialization/tasks/package.js +21 -16
- package/dist/serialization/tasks/pull.d.ts +0 -1
- package/dist/serialization/tasks/pull.js +24 -9
- package/dist/serialization/tasks/push.d.ts +0 -1
- package/dist/serialization/tasks/push.js +27 -11
- package/dist/serialization/tasks/roles.d.ts +2 -2
- package/dist/serialization/tasks/roles.js +9 -9
- package/dist/serialization/tasks/shared.d.ts +9 -16
- package/dist/serialization/tasks/shared.js +14 -44
- package/dist/serialization/tasks/types.d.ts +44 -4
- package/dist/serialization/tasks/types.js +1 -1
- package/dist/serialization/tasks/users.d.ts +2 -2
- package/dist/serialization/tasks/users.js +9 -9
- package/dist/serialization/tasks/validate.d.ts +0 -1
- package/dist/serialization/tasks/validate.js +2 -2
- package/dist/serialization/tasks/watch.d.ts +0 -1
- package/dist/serialization/tasks/watch.js +9 -8
- package/dist/serialization/tree-spec.d.ts +0 -1
- package/dist/serialization/tree-spec.js +21 -21
- package/dist/serialization/types.d.ts +0 -1
- package/dist/serialization/wildcard.d.ts +0 -1
- package/dist/serialization/wildcard.js +2 -2
- package/dist/serialization/yaml.d.ts +0 -1
- package/dist/serialization/yaml.js +1 -1
- package/dist/shared/browser.d.ts +0 -1
- package/dist/shared/cli-options.d.ts +0 -1
- package/dist/shared/cli-tasks.d.ts +1 -2
- package/dist/shared/cli-tasks.js +2 -2
- package/dist/shared/client-credential.d.ts +82 -0
- package/dist/shared/client-credential.js +117 -0
- package/dist/shared/concurrency.d.ts +20 -0
- package/dist/shared/concurrency.js +67 -0
- package/dist/shared/config-template.d.ts +0 -1
- package/dist/shared/credential-matrix.d.ts +83 -0
- package/dist/shared/credential-matrix.js +65 -0
- package/dist/shared/env-tier.d.ts +2 -0
- package/dist/shared/env-tier.js +31 -0
- package/dist/shared/envelope.d.ts +69 -0
- package/dist/shared/envelope.js +84 -0
- package/dist/shared/errors.d.ts +79 -9
- package/dist/shared/errors.js +49 -11
- package/dist/shared/graphql.d.ts +2 -3
- package/dist/shared/graphql.js +31 -15
- package/dist/shared/history.d.ts +25 -1
- package/dist/shared/history.js +35 -1
- package/dist/shared/human-only-operations.d.ts +28 -0
- package/dist/shared/human-only-operations.js +33 -0
- package/dist/shared/keychain.d.ts +68 -1
- package/dist/shared/keychain.js +416 -46
- package/dist/shared/logger.d.ts +2 -1
- package/dist/shared/logger.js +12 -1
- package/dist/shared/output.d.ts +0 -1
- package/dist/shared/prompt.d.ts +0 -1
- package/dist/shared/prompt.js +2 -2
- package/dist/shared/publish-audit.d.ts +154 -0
- package/dist/shared/publish-audit.js +52 -0
- package/dist/shared/publish-consent.d.ts +104 -0
- package/dist/shared/publish-consent.js +148 -0
- package/dist/shared/redact.d.ts +0 -1
- package/dist/shared/redact.js +4 -2
- package/dist/shared/region.d.ts +96 -0
- package/dist/shared/region.js +129 -0
- package/dist/shared/rwlock.d.ts +43 -0
- package/dist/shared/rwlock.js +110 -0
- package/dist/shared/spinner.d.ts +0 -1
- package/dist/shared/style.d.ts +0 -1
- package/dist/shared/telemetry.d.ts +15 -2
- package/dist/shared/telemetry.js +59 -34
- package/dist/shared/topics.d.ts +33 -0
- package/dist/shared/topics.js +151 -0
- package/dist/shared/validate.d.ts +0 -1
- package/dist/shared/validate.js +18 -3
- package/dist/sites/api/collections.d.ts +0 -1
- package/dist/sites/api/jobs.d.ts +0 -1
- package/dist/sites/api/languages.d.ts +0 -1
- package/dist/sites/api/request.d.ts +0 -1
- package/dist/sites/api/request.js +13 -4
- package/dist/sites/api/sites.d.ts +44 -1
- package/dist/sites/api/sites.js +42 -1
- package/dist/sites/api/types.d.ts +0 -1
- package/dist/sites/index.d.ts +25 -0
- package/dist/sites/index.js +44 -0
- package/dist/sync/aggregate-kinds.d.ts +7 -0
- package/dist/sync/aggregate-kinds.js +32 -0
- package/dist/sync/aggregate.d.ts +100 -0
- package/dist/sync/aggregate.js +173 -0
- package/dist/sync/engine.d.ts +28 -0
- package/dist/sync/engine.js +38 -0
- package/dist/sync/index.d.ts +18 -0
- package/dist/sync/index.js +25 -0
- package/dist/sync/io.d.ts +8 -0
- package/dist/sync/io.js +52 -0
- package/dist/sync/kind.d.ts +80 -0
- package/dist/sync/kind.js +2 -0
- package/dist/sync/plan.d.ts +55 -0
- package/dist/sync/plan.js +27 -0
- package/dist/sync/registry.d.ts +7 -0
- package/dist/sync/registry.js +36 -0
- package/dist/webhooks/api/client.d.ts +134 -0
- package/dist/webhooks/api/client.js +326 -0
- package/dist/webhooks/api/graphql.d.ts +4 -0
- package/dist/webhooks/api/graphql.js +18 -0
- package/dist/webhooks/api/templates.d.ts +41 -0
- package/dist/webhooks/api/templates.js +78 -0
- package/dist/webhooks/index.d.ts +16 -0
- package/dist/webhooks/index.js +43 -0
- package/dist/webhooks/tasks/create.d.ts +58 -0
- package/dist/webhooks/tasks/create.js +127 -0
- package/dist/webhooks/tasks/delete.d.ts +14 -0
- package/dist/webhooks/tasks/delete.js +57 -0
- package/dist/webhooks/tasks/event-types.d.ts +21 -0
- package/dist/webhooks/tasks/event-types.js +32 -0
- package/dist/webhooks/tasks/inspect.d.ts +12 -0
- package/dist/webhooks/tasks/inspect.js +65 -0
- package/dist/webhooks/tasks/list.d.ts +29 -0
- package/dist/webhooks/tasks/list.js +41 -0
- package/dist/webhooks/tasks/shared.d.ts +35 -0
- package/dist/webhooks/tasks/shared.js +38 -0
- package/dist/workflow/api/client.d.ts +208 -0
- package/dist/workflow/api/client.js +421 -0
- package/dist/workflow/api/graphql.d.ts +4 -0
- package/dist/workflow/api/graphql.js +18 -0
- package/dist/workflow/api/resolve-command.d.ts +27 -0
- package/dist/workflow/api/resolve-command.js +26 -0
- package/dist/workflow/index.d.ts +18 -0
- package/dist/workflow/index.js +37 -0
- package/dist/workflow/tasks/advance.d.ts +39 -0
- package/dist/workflow/tasks/advance.js +182 -0
- package/dist/workflow/tasks/apply.d.ts +47 -0
- package/dist/workflow/tasks/apply.js +193 -0
- package/dist/workflow/tasks/assigned.d.ts +33 -0
- package/dist/workflow/tasks/assigned.js +41 -0
- package/dist/workflow/tasks/inspect.d.ts +60 -0
- package/dist/workflow/tasks/inspect.js +171 -0
- package/dist/workflow/tasks/list-commands.d.ts +21 -0
- package/dist/workflow/tasks/list-commands.js +54 -0
- package/dist/workflow/tasks/list-defs.d.ts +21 -0
- package/dist/workflow/tasks/list-defs.js +28 -0
- package/dist/workflow/tasks/reset.d.ts +33 -0
- package/dist/workflow/tasks/reset.js +137 -0
- package/dist/workflow/tasks/shared.d.ts +75 -0
- package/dist/workflow/tasks/shared.js +124 -0
- package/dist/workflow/tasks/status.d.ts +21 -0
- package/dist/workflow/tasks/status.js +41 -0
- package/package.json +102 -8
- package/dist/cli.d.ts.map +0 -1
- package/dist/commands/config.d.ts.map +0 -1
- package/dist/commands/deploy/deployments.d.ts.map +0 -1
- package/dist/commands/deploy/editing-host.d.ts.map +0 -1
- package/dist/commands/deploy/environments/deployments.d.ts.map +0 -1
- package/dist/commands/deploy/environments/index.d.ts.map +0 -1
- package/dist/commands/deploy/environments/mutations.d.ts.map +0 -1
- package/dist/commands/deploy/environments/queries.d.ts.map +0 -1
- package/dist/commands/deploy/environments/variables.d.ts.map +0 -1
- package/dist/commands/deploy/environments.d.ts.map +0 -1
- package/dist/commands/deploy/index.d.ts.map +0 -1
- package/dist/commands/deploy/logs.d.ts.map +0 -1
- package/dist/commands/deploy/organizations.d.ts.map +0 -1
- package/dist/commands/deploy/projects.d.ts.map +0 -1
- package/dist/commands/deploy/shared.d.ts.map +0 -1
- package/dist/commands/deploy/site.d.ts.map +0 -1
- package/dist/commands/deploy/source-control.d.ts.map +0 -1
- package/dist/commands/deploy.d.ts.map +0 -1
- package/dist/commands/history.d.ts.map +0 -1
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/login.d.ts.map +0 -1
- package/dist/commands/logout.d.ts.map +0 -1
- package/dist/commands/recipe/index.d.ts.map +0 -1
- package/dist/commands/serialization/index.d.ts.map +0 -1
- package/dist/commands/serialization/package.d.ts.map +0 -1
- package/dist/commands/shared.d.ts.map +0 -1
- package/dist/commands/shell.d.ts.map +0 -1
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/telemetry.d.ts.map +0 -1
- package/dist/config/env-overrides.d.ts.map +0 -1
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/modules.d.ts.map +0 -1
- package/dist/config/paths.d.ts.map +0 -1
- package/dist/config/root-config.d.ts.map +0 -1
- package/dist/config/types.d.ts.map +0 -1
- package/dist/config/validation.d.ts.map +0 -1
- package/dist/deploy/api/common/headers.d.ts.map +0 -1
- package/dist/deploy/api/common/index.d.ts +0 -4
- package/dist/deploy/api/common/index.d.ts.map +0 -1
- package/dist/deploy/api/common/index.js +0 -19
- package/dist/deploy/api/common/request.d.ts.map +0 -1
- package/dist/deploy/api/common/types.d.ts.map +0 -1
- package/dist/deploy/api/common.d.ts +0 -2
- package/dist/deploy/api/common.d.ts.map +0 -1
- package/dist/deploy/api/common.js +0 -17
- package/dist/deploy/api/deployment-logs.d.ts.map +0 -1
- package/dist/deploy/api/deployments.d.ts.map +0 -1
- package/dist/deploy/api/environments.d.ts.map +0 -1
- package/dist/deploy/api/index.d.ts.map +0 -1
- package/dist/deploy/api/logs.d.ts.map +0 -1
- package/dist/deploy/api/organizations.d.ts.map +0 -1
- package/dist/deploy/api/projects.d.ts.map +0 -1
- package/dist/deploy/api/source-control.d.ts.map +0 -1
- package/dist/deploy/api.d.ts.map +0 -1
- package/dist/deploy/tasks/deployment-result.d.ts.map +0 -1
- package/dist/deploy/tasks/deployments.d.ts.map +0 -1
- package/dist/deploy/tasks/editing-host.d.ts.map +0 -1
- package/dist/deploy/tasks/environments.d.ts.map +0 -1
- package/dist/deploy/tasks/index.d.ts +0 -10
- package/dist/deploy/tasks/index.d.ts.map +0 -1
- package/dist/deploy/tasks/index.js +0 -25
- package/dist/deploy/tasks/logs.d.ts.map +0 -1
- package/dist/deploy/tasks/organizations.d.ts.map +0 -1
- package/dist/deploy/tasks/projects.d.ts.map +0 -1
- package/dist/deploy/tasks/shared.d.ts.map +0 -1
- package/dist/deploy/tasks/site-bind.d.ts.map +0 -1
- package/dist/deploy/tasks/site.d.ts.map +0 -1
- package/dist/deploy/tasks/source-control.d.ts.map +0 -1
- package/dist/deploy/tasks/types.d.ts.map +0 -1
- package/dist/deploy/tasks.d.ts +0 -3
- package/dist/deploy/tasks.d.ts.map +0 -1
- package/dist/deploy/tasks.js +0 -18
- package/dist/recipe/api/auth.d.ts.map +0 -1
- package/dist/recipe/api/authoring-client.d.ts.map +0 -1
- package/dist/recipe/api/client.d.ts.map +0 -1
- package/dist/recipe/api/graphql.d.ts.map +0 -1
- package/dist/recipe/api/ref-encoding.d.ts.map +0 -1
- package/dist/recipe/api/site-discovery.d.ts.map +0 -1
- package/dist/recipe/api/sites-client.d.ts.map +0 -1
- package/dist/recipe/cache.d.ts.map +0 -1
- package/dist/recipe/compile/component-section.d.ts.map +0 -1
- package/dist/recipe/compile/component-template.d.ts.map +0 -1
- package/dist/recipe/compile/content-item.d.ts.map +0 -1
- package/dist/recipe/compile/content-template.d.ts.map +0 -1
- package/dist/recipe/compile/enumeration.d.ts.map +0 -1
- package/dist/recipe/compile/page-design.d.ts.map +0 -1
- package/dist/recipe/compile/parameters-template.d.ts +0 -14
- package/dist/recipe/compile/parameters-template.d.ts.map +0 -1
- package/dist/recipe/compile/parameters-template.js +0 -92
- package/dist/recipe/compile/partial-design.d.ts.map +0 -1
- package/dist/recipe/compile/section-definition.d.ts.map +0 -1
- package/dist/recipe/compile/shared.d.ts.map +0 -1
- package/dist/recipe/compile/site-template.d.ts.map +0 -1
- package/dist/recipe/compile/site.d.ts.map +0 -1
- package/dist/recipe/compile.d.ts.map +0 -1
- package/dist/recipe/execute.d.ts.map +0 -1
- package/dist/recipe/guids.d.ts.map +0 -1
- package/dist/recipe/index.d.ts.map +0 -1
- package/dist/recipe/io.d.ts.map +0 -1
- package/dist/recipe/ir/operations.d.ts.map +0 -1
- package/dist/recipe/ir/sitecore-templates.d.ts.map +0 -1
- package/dist/recipe/layout/emit.d.ts.map +0 -1
- package/dist/recipe/layout/templates-mapping.d.ts.map +0 -1
- package/dist/recipe/plan.d.ts.map +0 -1
- package/dist/recipe/policy.d.ts.map +0 -1
- package/dist/recipe/rollback.d.ts.map +0 -1
- package/dist/recipe/schema/field-types.d.ts.map +0 -1
- package/dist/recipe/schema/recipe.d.ts.map +0 -1
- package/dist/recipe/schema/source-fields.d.ts.map +0 -1
- package/dist/recipe/tasks/compile.d.ts.map +0 -1
- package/dist/recipe/tasks/diff.d.ts.map +0 -1
- package/dist/recipe/tasks/index.d.ts +0 -9
- package/dist/recipe/tasks/index.d.ts.map +0 -1
- package/dist/recipe/tasks/index.js +0 -13
- package/dist/recipe/tasks/placeholder-allow.d.ts.map +0 -1
- package/dist/recipe/tasks/plan.d.ts.map +0 -1
- package/dist/recipe/tasks/prune-defaults.d.ts.map +0 -1
- package/dist/recipe/tasks/push.d.ts.map +0 -1
- package/dist/recipe/tasks/shared.d.ts.map +0 -1
- package/dist/recipe/validate.d.ts.map +0 -1
- package/dist/serialization/commands.d.ts.map +0 -1
- package/dist/serialization/compare.d.ts.map +0 -1
- package/dist/serialization/field-filter.d.ts.map +0 -1
- package/dist/serialization/filesystem-store/constants.d.ts.map +0 -1
- package/dist/serialization/filesystem-store/index.d.ts +0 -4
- package/dist/serialization/filesystem-store/index.d.ts.map +0 -1
- package/dist/serialization/filesystem-store/index.js +0 -15
- package/dist/serialization/filesystem-store/items.d.ts.map +0 -1
- package/dist/serialization/filesystem-store/roles.d.ts.map +0 -1
- package/dist/serialization/filesystem-store/users.d.ts.map +0 -1
- package/dist/serialization/filesystem-store/utils.d.ts.map +0 -1
- package/dist/serialization/filesystem-store.d.ts +0 -2
- package/dist/serialization/filesystem-store.d.ts.map +0 -1
- package/dist/serialization/filesystem-store.js +0 -17
- package/dist/serialization/item-path.d.ts.map +0 -1
- package/dist/serialization/path-provider.d.ts.map +0 -1
- package/dist/serialization/signature.d.ts.map +0 -1
- package/dist/serialization/sitecore-api/auth.d.ts +0 -31
- package/dist/serialization/sitecore-api/auth.d.ts.map +0 -1
- package/dist/serialization/sitecore-api/auth.js +0 -319
- package/dist/serialization/sitecore-api/graphql.d.ts +0 -12
- package/dist/serialization/sitecore-api/graphql.d.ts.map +0 -1
- package/dist/serialization/sitecore-api/history.d.ts +0 -9
- package/dist/serialization/sitecore-api/history.d.ts.map +0 -1
- package/dist/serialization/sitecore-api/index.d.ts +0 -7
- package/dist/serialization/sitecore-api/index.d.ts.map +0 -1
- package/dist/serialization/sitecore-api/index.js +0 -22
- package/dist/serialization/sitecore-api/items.d.ts +0 -8
- package/dist/serialization/sitecore-api/items.d.ts.map +0 -1
- package/dist/serialization/sitecore-api/items.js +0 -132
- package/dist/serialization/sitecore-api/publish.d.ts +0 -14
- package/dist/serialization/sitecore-api/publish.d.ts.map +0 -1
- package/dist/serialization/sitecore-api/publish.js +0 -43
- package/dist/serialization/sitecore-api/roles.d.ts +0 -9
- package/dist/serialization/sitecore-api/roles.d.ts.map +0 -1
- package/dist/serialization/sitecore-api/users.d.ts +0 -9
- package/dist/serialization/sitecore-api/users.d.ts.map +0 -1
- package/dist/serialization/sitecore-api.d.ts +0 -2
- package/dist/serialization/sitecore-api.d.ts.map +0 -1
- package/dist/serialization/sitecore-api.js +0 -17
- package/dist/serialization/tasks/diff.d.ts.map +0 -1
- package/dist/serialization/tasks/env/constants.d.ts.map +0 -1
- package/dist/serialization/tasks/env/deploy-token.d.ts.map +0 -1
- package/dist/serialization/tasks/env/index.d.ts +0 -5
- package/dist/serialization/tasks/env/index.d.ts.map +0 -1
- package/dist/serialization/tasks/env/index.js +0 -11
- package/dist/serialization/tasks/env/init/auth.d.ts.map +0 -1
- package/dist/serialization/tasks/env/init/deploy-lookup.d.ts.map +0 -1
- package/dist/serialization/tasks/env/init.d.ts.map +0 -1
- package/dist/serialization/tasks/env/logout.d.ts.map +0 -1
- package/dist/serialization/tasks/env/status.d.ts.map +0 -1
- package/dist/serialization/tasks/env.d.ts +0 -2
- package/dist/serialization/tasks/env.d.ts.map +0 -1
- package/dist/serialization/tasks/env.js +0 -17
- package/dist/serialization/tasks/helpers/collect.d.ts.map +0 -1
- package/dist/serialization/tasks/helpers/commands.d.ts.map +0 -1
- package/dist/serialization/tasks/helpers/filesystem.d.ts.map +0 -1
- package/dist/serialization/tasks/helpers/index.d.ts +0 -6
- package/dist/serialization/tasks/helpers/index.d.ts.map +0 -1
- package/dist/serialization/tasks/helpers/index.js +0 -13
- package/dist/serialization/tasks/helpers/items.d.ts.map +0 -1
- package/dist/serialization/tasks/helpers/sitecore.d.ts.map +0 -1
- package/dist/serialization/tasks/helpers.d.ts +0 -2
- package/dist/serialization/tasks/helpers.d.ts.map +0 -1
- package/dist/serialization/tasks/helpers.js +0 -17
- package/dist/serialization/tasks/index.d.ts +0 -8
- package/dist/serialization/tasks/index.d.ts.map +0 -1
- package/dist/serialization/tasks/index.js +0 -19
- package/dist/serialization/tasks/info.d.ts.map +0 -1
- package/dist/serialization/tasks/package.d.ts.map +0 -1
- package/dist/serialization/tasks/pull.d.ts.map +0 -1
- package/dist/serialization/tasks/push.d.ts.map +0 -1
- package/dist/serialization/tasks/roles.d.ts.map +0 -1
- package/dist/serialization/tasks/shared.d.ts.map +0 -1
- package/dist/serialization/tasks/types.d.ts.map +0 -1
- package/dist/serialization/tasks/users.d.ts.map +0 -1
- package/dist/serialization/tasks/validate.d.ts.map +0 -1
- package/dist/serialization/tasks/watch.d.ts.map +0 -1
- package/dist/serialization/tasks.d.ts +0 -4
- package/dist/serialization/tasks.d.ts.map +0 -1
- package/dist/serialization/tasks.js +0 -19
- package/dist/serialization/tree-spec.d.ts.map +0 -1
- package/dist/serialization/types.d.ts.map +0 -1
- package/dist/serialization/wildcard.d.ts.map +0 -1
- package/dist/serialization/yaml.d.ts.map +0 -1
- package/dist/shared/browser.d.ts.map +0 -1
- package/dist/shared/cli-options.d.ts.map +0 -1
- package/dist/shared/cli-tasks.d.ts.map +0 -1
- package/dist/shared/config-template.d.ts.map +0 -1
- package/dist/shared/env.d.ts +0 -28
- package/dist/shared/env.d.ts.map +0 -1
- package/dist/shared/env.js +0 -38
- package/dist/shared/errors.d.ts.map +0 -1
- package/dist/shared/graphql.d.ts.map +0 -1
- package/dist/shared/history.d.ts.map +0 -1
- package/dist/shared/keychain.d.ts.map +0 -1
- package/dist/shared/logger.d.ts.map +0 -1
- package/dist/shared/output.d.ts.map +0 -1
- package/dist/shared/prompt.d.ts.map +0 -1
- package/dist/shared/redact.d.ts.map +0 -1
- package/dist/shared/spinner.d.ts.map +0 -1
- package/dist/shared/style.d.ts.map +0 -1
- package/dist/shared/telemetry.d.ts.map +0 -1
- package/dist/shared/validate.d.ts.map +0 -1
- package/dist/sites/api/collections.d.ts.map +0 -1
- package/dist/sites/api/index.d.ts +0 -26
- package/dist/sites/api/index.d.ts.map +0 -1
- package/dist/sites/api/index.js +0 -55
- package/dist/sites/api/jobs.d.ts.map +0 -1
- package/dist/sites/api/languages.d.ts.map +0 -1
- package/dist/sites/api/request.d.ts.map +0 -1
- package/dist/sites/api/sites.d.ts.map +0 -1
- package/dist/sites/api/types.d.ts.map +0 -1
- /package/dist/serialization/{sitecore-api → api}/graphql.js +0 -0
- /package/dist/serialization/{sitecore-api → api}/history.js +0 -0
- /package/dist/serialization/{sitecore-api → api}/roles.js +0 -0
- /package/dist/serialization/{sitecore-api → api}/users.js +0 -0
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runCleanupDeadTemplates = void 0;
|
|
4
|
+
const cli_tasks_1 = require("../../../shared/cli-tasks");
|
|
5
|
+
const errors_1 = require("../../../shared/errors");
|
|
6
|
+
const dead_templates_1 = require("../audit/dead-templates");
|
|
7
|
+
const template_dependencies_1 = require("../audit/template-dependencies");
|
|
8
|
+
const shared_1 = require("../shared");
|
|
9
|
+
const PROTECTED_TEMPLATE_ROOTS = [
|
|
10
|
+
"/sitecore/templates/System",
|
|
11
|
+
"/sitecore/templates/Branches/System",
|
|
12
|
+
];
|
|
13
|
+
/**
|
|
14
|
+
* The Authoring API's template-cache can lag ~30-90s after a large
|
|
15
|
+
* cascade delete: deleting a template whose dependents were JUST
|
|
16
|
+
* removed may 4xx with "template has dependents" until the cache
|
|
17
|
+
* settles. The pre-flight `audit template-dependencies` has already
|
|
18
|
+
* filtered templates with *real* structural dependents, so a dependents
|
|
19
|
+
* error here is the stale-cache false positive — retry past the settle
|
|
20
|
+
* window before surfacing it. (With `--force` the pre-flight is skipped,
|
|
21
|
+
* so a genuine dependents error simply retries then surfaces — a bounded
|
|
22
|
+
* ~39s cost, not a hang.)
|
|
23
|
+
*/
|
|
24
|
+
const TEMPLATE_CACHE_LAG = /dependent|used by/i;
|
|
25
|
+
const RETRY_DELAYS_MS = [4000, 10000, 25000];
|
|
26
|
+
const deleteItemTemplateWithRetry = async (client, templateId, logger) => {
|
|
27
|
+
for (let attempt = 0;; attempt += 1) {
|
|
28
|
+
try {
|
|
29
|
+
await client.deleteItemTemplate(templateId);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
34
|
+
if (attempt >= RETRY_DELAYS_MS.length || !TEMPLATE_CACHE_LAG.test(message)) {
|
|
35
|
+
throw error;
|
|
36
|
+
}
|
|
37
|
+
const waitMs = RETRY_DELAYS_MS[attempt];
|
|
38
|
+
logger.info(`Template-cache lag on ${templateId} — retrying in ${waitMs / 1000}s ` +
|
|
39
|
+
`(attempt ${attempt + 1}/${RETRY_DELAYS_MS.length}).`, "yellow");
|
|
40
|
+
await new Promise((resolve) => setTimeout(resolve, waitMs));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Walk a template root bottom-up and delete folders that are empty after
|
|
46
|
+
* the dead-templates purge.
|
|
47
|
+
*
|
|
48
|
+
* Algorithm:
|
|
49
|
+
* 1. List children of the root.
|
|
50
|
+
* 2. For each child, recurse: if it's a template-folder-shaped node
|
|
51
|
+
* (no template fields beyond folder template id), check its
|
|
52
|
+
* children. If empty, delete it.
|
|
53
|
+
* 3. Bubble up — a parent may become empty after its children are
|
|
54
|
+
* deleted.
|
|
55
|
+
*
|
|
56
|
+
* Returns the list of folder deletions attempted, with status.
|
|
57
|
+
*/
|
|
58
|
+
const cleanupEmptyTemplateFolders = async (client, rootPath, options) => {
|
|
59
|
+
const actions = [];
|
|
60
|
+
const walk = async (path) => {
|
|
61
|
+
// Returns true if the folder ended up empty (parent should re-check).
|
|
62
|
+
const children = await client.getChildren({ path });
|
|
63
|
+
if (children.length === 0)
|
|
64
|
+
return true;
|
|
65
|
+
// Recurse into each child; track which ones are themselves empty folders.
|
|
66
|
+
const childResults = await Promise.all(children.map(async (child) => {
|
|
67
|
+
// Walk recursively; this may delete the child if it ends empty.
|
|
68
|
+
const childEmpty = await walk(child.path);
|
|
69
|
+
if (!childEmpty)
|
|
70
|
+
return false;
|
|
71
|
+
const action = {
|
|
72
|
+
path: child.path,
|
|
73
|
+
itemId: child.itemId,
|
|
74
|
+
status: options.whatIf ? "what-if" : "deleted",
|
|
75
|
+
};
|
|
76
|
+
if (!options.whatIf) {
|
|
77
|
+
try {
|
|
78
|
+
await client.deleteItem({ itemId: child.itemId, permanently: true });
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
action.status = "failed";
|
|
82
|
+
action.error = error instanceof Error ? error.message : String(error);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
actions.push(action);
|
|
86
|
+
return action.status !== "failed";
|
|
87
|
+
}));
|
|
88
|
+
// The current folder is empty iff every child ended empty (and was
|
|
89
|
+
// successfully deleted, or marked what-if).
|
|
90
|
+
return childResults.every((r) => r === true);
|
|
91
|
+
};
|
|
92
|
+
await walk(rootPath);
|
|
93
|
+
return actions;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Delete templates that have zero items deriving from them, then
|
|
97
|
+
* optionally clean up empty template folders left behind.
|
|
98
|
+
*
|
|
99
|
+
* Strategy:
|
|
100
|
+
* 1. Run `audit dead-templates` to identify candidates.
|
|
101
|
+
* 2. For each dead template, call `deleteItemTemplate(templateId)`.
|
|
102
|
+
* 3. If `--cleanup-empty-folders` (default true), walk the template
|
|
103
|
+
* tree bottom-up and delete folders that ended up empty.
|
|
104
|
+
*
|
|
105
|
+
* Safety rails:
|
|
106
|
+
* - `--root` defaults to `/sitecore/templates/Project` (project-owned).
|
|
107
|
+
* - Refuses to operate on `/sitecore/templates/System` without
|
|
108
|
+
* `--force`. Deleting system templates breaks editor UIs even when
|
|
109
|
+
* they show zero items in the search index.
|
|
110
|
+
* - `--allow-write` / `allowWrite` enforced outside `--what-if`.
|
|
111
|
+
* - Cascades not handled: the underlying mutation fails (returns
|
|
112
|
+
* `successful: false`) if a template is still used as a base
|
|
113
|
+
* template by another, even when no items derive from it. Those
|
|
114
|
+
* failures surface as per-record errors with the operator's
|
|
115
|
+
* suggested next step in the message.
|
|
116
|
+
*/
|
|
117
|
+
const runCleanupDeadTemplates = async (options) => {
|
|
118
|
+
const logger = (0, shared_1.toLogger)(options);
|
|
119
|
+
const root = options.root ?? "/sitecore/templates/Project";
|
|
120
|
+
if (!options.force && PROTECTED_TEMPLATE_ROOTS.some((p) => root.startsWith(p))) {
|
|
121
|
+
throw (0, errors_1.createScaiError)(`Refusing to operate on protected template root '${root}'.`, "INPUT_INVALID", { hint: "Pass --force to override (only when you intentionally target a system tree)." });
|
|
122
|
+
}
|
|
123
|
+
const { envName, root: rootConfig, client } = (0, shared_1.resolveTenant)(options);
|
|
124
|
+
if (!options.whatIf) {
|
|
125
|
+
(0, shared_1.ensureAllowWriteForCleanup)(rootConfig, envName, options.allowWrite, "cleanup-dead-templates");
|
|
126
|
+
}
|
|
127
|
+
else if (!logger.isJson()) {
|
|
128
|
+
logger.info("What-if mode active — no templates or folders will be deleted.", "yellow");
|
|
129
|
+
}
|
|
130
|
+
// Reuse the audit task to find candidates.
|
|
131
|
+
const dead = await (0, dead_templates_1.runAuditDeadTemplates)({
|
|
132
|
+
...options,
|
|
133
|
+
// Suppress the audit's own report — we'll emit a combined cleanup
|
|
134
|
+
// report below. Two ways: pipe through --json + ignore, or swallow
|
|
135
|
+
// the print via a side-channel. For now we just let the audit print
|
|
136
|
+
// its own report; under --json the caller sees two records (audit
|
|
137
|
+
// then cleanup) which is reasonable.
|
|
138
|
+
});
|
|
139
|
+
const templateActions = await (0, cli_tasks_1.mapWithConcurrency)(dead, async (t) => {
|
|
140
|
+
// Pre-flight check: `audit dead-templates` only counts primary-template
|
|
141
|
+
// refs (items whose `_template` is t.templateId). Templates can still
|
|
142
|
+
// be in use as base templates, insert-options entries, branch sources,
|
|
143
|
+
// or datasource templates — none of which the dead-templates audit
|
|
144
|
+
// sees. Running `audit template-dependencies` here catches all four
|
|
145
|
+
// structural shapes via the search index before we attempt a delete
|
|
146
|
+
// the Authoring API would reject anyway. The agent gets a structured
|
|
147
|
+
// `blockers` list instead of a terse "is used by other items" string.
|
|
148
|
+
//
|
|
149
|
+
// --force skips the pre-flight and lets the Authoring API decide
|
|
150
|
+
// (preserves the existing escape hatch for ops who know the API
|
|
151
|
+
// would accept the delete despite stale index entries).
|
|
152
|
+
if (!options.force) {
|
|
153
|
+
const blockers = await (0, template_dependencies_1.runAuditTemplateDependencies)({
|
|
154
|
+
...options,
|
|
155
|
+
templateId: t.templateId,
|
|
156
|
+
silent: true,
|
|
157
|
+
});
|
|
158
|
+
if (blockers.length > 0) {
|
|
159
|
+
return {
|
|
160
|
+
templateId: t.templateId,
|
|
161
|
+
name: t.name,
|
|
162
|
+
fullName: t.fullName,
|
|
163
|
+
status: "blocked",
|
|
164
|
+
blockers,
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
if (options.whatIf) {
|
|
169
|
+
return {
|
|
170
|
+
templateId: t.templateId,
|
|
171
|
+
name: t.name,
|
|
172
|
+
fullName: t.fullName,
|
|
173
|
+
status: "what-if",
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
try {
|
|
177
|
+
await deleteItemTemplateWithRetry(client, t.templateId, logger);
|
|
178
|
+
return {
|
|
179
|
+
templateId: t.templateId,
|
|
180
|
+
name: t.name,
|
|
181
|
+
fullName: t.fullName,
|
|
182
|
+
status: "purged",
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
catch (error) {
|
|
186
|
+
return {
|
|
187
|
+
templateId: t.templateId,
|
|
188
|
+
name: t.name,
|
|
189
|
+
fullName: t.fullName,
|
|
190
|
+
status: "failed",
|
|
191
|
+
error: error instanceof Error ? error.message : String(error),
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
}, options.concurrency ?? 4);
|
|
195
|
+
let folderActions = [];
|
|
196
|
+
const cleanupFolders = options.cleanupEmptyFolders !== false;
|
|
197
|
+
if (cleanupFolders && templateActions.length > 0) {
|
|
198
|
+
folderActions = await cleanupEmptyTemplateFolders(client, root, {
|
|
199
|
+
whatIf: Boolean(options.whatIf),
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
const purged = templateActions.filter((a) => a.status === "purged").length;
|
|
203
|
+
const failed = templateActions.filter((a) => a.status === "failed").length;
|
|
204
|
+
const blocked = templateActions.filter((a) => a.status === "blocked").length;
|
|
205
|
+
const wouldDelete = templateActions.filter((a) => a.status === "what-if").length;
|
|
206
|
+
const foldersRemoved = folderActions.filter((a) => a.status === "deleted").length;
|
|
207
|
+
const blockedSuffix = blocked > 0 ? `, ${blocked} blocked by inbound refs` : "";
|
|
208
|
+
const summary = options.whatIf
|
|
209
|
+
? `Plan: would delete ${wouldDelete} dead template${wouldDelete === 1 ? "" : "s"}${folderActions.length > 0
|
|
210
|
+
? ` and ${folderActions.length} empty folder${folderActions.length === 1 ? "" : "s"}`
|
|
211
|
+
: ""}${blockedSuffix}.`
|
|
212
|
+
: `Deleted ${purged} template${purged === 1 ? "" : "s"}${foldersRemoved > 0
|
|
213
|
+
? ` and ${foldersRemoved} empty folder${foldersRemoved === 1 ? "" : "s"}`
|
|
214
|
+
: ""}${failed > 0 ? ` (${failed} template failure${failed === 1 ? "" : "s"})` : ""}${blockedSuffix}.`;
|
|
215
|
+
(0, shared_1.printReport)({
|
|
216
|
+
logger,
|
|
217
|
+
command: "cleanup.dead-templates.purge",
|
|
218
|
+
envName,
|
|
219
|
+
results: [...templateActions, ...folderActions.map((f) => ({ ...f, kind: "folder" }))],
|
|
220
|
+
summary,
|
|
221
|
+
formatLine: (a) => "templateId" in a
|
|
222
|
+
? `${a.status === "what-if"
|
|
223
|
+
? "[would delete] "
|
|
224
|
+
: a.status === "failed"
|
|
225
|
+
? "[failed] "
|
|
226
|
+
: a.status === "blocked"
|
|
227
|
+
? `[blocked × ${a.blockers?.length ?? 0}] `
|
|
228
|
+
: ""}${a.fullName ?? a.name}${a.error ? ` — ${a.error}` : ""}${a.status === "blocked" && a.blockers && a.blockers.length > 0
|
|
229
|
+
? ` — ${a.blockers
|
|
230
|
+
.slice(0, 3)
|
|
231
|
+
.map((b) => `${b.referenceKind}:${b.path ?? b.name}`)
|
|
232
|
+
.join(", ")}${a.blockers.length > 3 ? "…" : ""}`
|
|
233
|
+
: ""}`
|
|
234
|
+
: `${a.status === "what-if" ? "[would delete folder] " : a.status === "failed" ? "[failed folder] " : "[folder] "}${a.path}${a.error ? ` — ${a.error}` : ""}`,
|
|
235
|
+
extra: {
|
|
236
|
+
root,
|
|
237
|
+
whatIf: Boolean(options.whatIf),
|
|
238
|
+
templatePurgedCount: purged,
|
|
239
|
+
templateFailedCount: failed,
|
|
240
|
+
templateBlockedCount: blocked,
|
|
241
|
+
foldersRemovedCount: foldersRemoved,
|
|
242
|
+
},
|
|
243
|
+
options,
|
|
244
|
+
});
|
|
245
|
+
return { templates: templateActions, folders: folderActions };
|
|
246
|
+
};
|
|
247
|
+
exports.runCleanupDeadTemplates = runCleanupDeadTemplates;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { type DuplicatesGroup } from "../audit/duplicates";
|
|
2
|
+
import { type ReferenceReport } from "../audit/references";
|
|
3
|
+
import { type HygieneCommonOptions } from "../shared";
|
|
4
|
+
export type DuplicatesKeepRule = "oldest" | "newest" | "shortest-path" | "interactive";
|
|
5
|
+
export interface CleanupDuplicatesOptions extends HygieneCommonOptions {
|
|
6
|
+
root?: string;
|
|
7
|
+
index?: string;
|
|
8
|
+
limit?: number;
|
|
9
|
+
includeSystem?: boolean;
|
|
10
|
+
includeSystemFields?: boolean;
|
|
11
|
+
language?: string;
|
|
12
|
+
batchSize?: number;
|
|
13
|
+
minGroupSize?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Which member of each duplicate group survives. Default `oldest`
|
|
16
|
+
* (created-date) — the original wins, most likely the one with
|
|
17
|
+
* inbound refs.
|
|
18
|
+
*/
|
|
19
|
+
keepRule?: DuplicatesKeepRule;
|
|
20
|
+
/** Concurrency for delete calls. Default 4. */
|
|
21
|
+
concurrency?: number;
|
|
22
|
+
whatIf?: boolean;
|
|
23
|
+
allowWrite?: boolean;
|
|
24
|
+
/** Required when `keepRule === "interactive"` and stdin isn't a TTY. */
|
|
25
|
+
nonInteractive?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Skip the inbound-reference pre-flight. Use when the operator
|
|
28
|
+
* knows refs to dupes are acceptable (e.g. a content migration that
|
|
29
|
+
* will rebuild refs separately). The pre-flight is enabled by
|
|
30
|
+
* default so a dupe delete doesn't silently break content links;
|
|
31
|
+
* `audit broken-links list` was the previous post-cleanup mitigation
|
|
32
|
+
* but the agent never knew to run it. Inverse: `--force` also
|
|
33
|
+
* bypasses (existing escape hatch).
|
|
34
|
+
*/
|
|
35
|
+
skipRefCheck?: boolean;
|
|
36
|
+
/** Force-delete dupes even when blockers are found. */
|
|
37
|
+
force?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Skip the internal `runAuditDuplicates` call and use this pre-
|
|
40
|
+
* computed group list as the cleanup input. Set by the CLI's
|
|
41
|
+
* `--from-stdin` flag when the operator pipes `scai hygiene audit
|
|
42
|
+
* duplicates list --json` directly into the cleanup. Eliminates the
|
|
43
|
+
* dual-discovery drift where audit and cleanup run the same hash
|
|
44
|
+
* pass twice (and could disagree on the group set when the tenant
|
|
45
|
+
* changes between calls).
|
|
46
|
+
*/
|
|
47
|
+
preComputedGroups?: DuplicatesGroup[];
|
|
48
|
+
}
|
|
49
|
+
export interface DuplicatePurgeAction {
|
|
50
|
+
contentHash: string;
|
|
51
|
+
kept: {
|
|
52
|
+
itemId: string;
|
|
53
|
+
path: string;
|
|
54
|
+
};
|
|
55
|
+
deleted: Array<{
|
|
56
|
+
itemId: string;
|
|
57
|
+
path: string;
|
|
58
|
+
status: "deleted" | "what-if" | "failed" | "blocked";
|
|
59
|
+
error?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Inbound-reference reports that blocked the delete. Populated
|
|
62
|
+
* when status is "blocked". The cleanup ran `audit references`
|
|
63
|
+
* for the dupe's itemId; the operator can resolve each pointer
|
|
64
|
+
* before re-running, or pass `--skip-ref-check` / `--force` to
|
|
65
|
+
* delete anyway and clean up dangling refs after.
|
|
66
|
+
*/
|
|
67
|
+
blockers?: ReferenceReport[];
|
|
68
|
+
}>;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Purge duplicate items, keeping one per group according to `--keep-rule`.
|
|
72
|
+
*
|
|
73
|
+
* Strategy:
|
|
74
|
+
* 1. Run `audit duplicates` to find groups.
|
|
75
|
+
* 2. For each group, apply the keep-rule to pick the survivor.
|
|
76
|
+
* 3. Delete the rest via `deleteItem(permanently: true)`.
|
|
77
|
+
*
|
|
78
|
+
* Notes:
|
|
79
|
+
* - **Inbound refs to deleted dupes become broken.** Run
|
|
80
|
+
* `audit broken-links list` after a purge — the duplicates that
|
|
81
|
+
* other content pointed to leave dangling references behind.
|
|
82
|
+
* - With `--keep-rule interactive`, the command prompts per group.
|
|
83
|
+
* Honors `s`/`skip` per-group to leave a group untouched.
|
|
84
|
+
* Requires a TTY; pass any other keep-rule when scripting.
|
|
85
|
+
*/
|
|
86
|
+
export declare const runCleanupDuplicates: (options: CleanupDuplicatesOptions) => Promise<DuplicatePurgeAction[]>;
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.runCleanupDuplicates = void 0;
|
|
7
|
+
const node_readline_1 = __importDefault(require("node:readline"));
|
|
8
|
+
const cli_tasks_1 = require("../../../shared/cli-tasks");
|
|
9
|
+
const errors_1 = require("../../../shared/errors");
|
|
10
|
+
const duplicates_1 = require("../audit/duplicates");
|
|
11
|
+
const references_1 = require("../audit/references");
|
|
12
|
+
const shared_1 = require("../shared");
|
|
13
|
+
const pickByRule = (group, rule) => {
|
|
14
|
+
const sorted = [...group.members];
|
|
15
|
+
switch (rule) {
|
|
16
|
+
case "oldest":
|
|
17
|
+
sorted.sort((a, b) => {
|
|
18
|
+
const aT = a.createdDate ? Date.parse(a.createdDate) : Number.POSITIVE_INFINITY;
|
|
19
|
+
const bT = b.createdDate ? Date.parse(b.createdDate) : Number.POSITIVE_INFINITY;
|
|
20
|
+
return aT - bT;
|
|
21
|
+
});
|
|
22
|
+
break;
|
|
23
|
+
case "newest":
|
|
24
|
+
sorted.sort((a, b) => {
|
|
25
|
+
const aT = a.updatedDate ? Date.parse(a.updatedDate) : 0;
|
|
26
|
+
const bT = b.updatedDate ? Date.parse(b.updatedDate) : 0;
|
|
27
|
+
return bT - aT;
|
|
28
|
+
});
|
|
29
|
+
break;
|
|
30
|
+
case "shortest-path":
|
|
31
|
+
sorted.sort((a, b) => {
|
|
32
|
+
const lenDiff = a.path.length - b.path.length;
|
|
33
|
+
return lenDiff !== 0 ? lenDiff : a.path.localeCompare(b.path);
|
|
34
|
+
});
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
return { kept: sorted[0], rest: sorted.slice(1) };
|
|
38
|
+
};
|
|
39
|
+
const promptForKeep = async (group) => {
|
|
40
|
+
const rl = node_readline_1.default.createInterface({ input: process.stdin, output: process.stdout });
|
|
41
|
+
try {
|
|
42
|
+
process.stdout.write(`\nDuplicate group [${group.contentHash}] — ${group.count} copies:\n`);
|
|
43
|
+
group.members.forEach((m, i) => {
|
|
44
|
+
process.stdout.write(` [${i + 1}] ${m.path}${m.createdDate ? ` (created ${m.createdDate.slice(0, 10)})` : ""}\n`);
|
|
45
|
+
});
|
|
46
|
+
process.stdout.write(` [s]kip group\nKeep which? [1-${group.members.length}/s]: `);
|
|
47
|
+
const answer = await new Promise((resolve) => rl.question("", (a) => resolve(a.trim().toLowerCase())));
|
|
48
|
+
if (answer === "s" || answer === "skip") {
|
|
49
|
+
// Skip = keep first, delete none (signaled by returning empty rest).
|
|
50
|
+
return { kept: group.members[0], rest: [] };
|
|
51
|
+
}
|
|
52
|
+
const idx = parseInt(answer, 10) - 1;
|
|
53
|
+
if (!Number.isFinite(idx) || idx < 0 || idx >= group.members.length) {
|
|
54
|
+
throw (0, errors_1.createScaiError)(`Invalid selection '${answer}' for group ${group.contentHash}.`, "INPUT_INVALID");
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
kept: group.members[idx],
|
|
58
|
+
rest: group.members.filter((_, i) => i !== idx),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
finally {
|
|
62
|
+
rl.close();
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Purge duplicate items, keeping one per group according to `--keep-rule`.
|
|
67
|
+
*
|
|
68
|
+
* Strategy:
|
|
69
|
+
* 1. Run `audit duplicates` to find groups.
|
|
70
|
+
* 2. For each group, apply the keep-rule to pick the survivor.
|
|
71
|
+
* 3. Delete the rest via `deleteItem(permanently: true)`.
|
|
72
|
+
*
|
|
73
|
+
* Notes:
|
|
74
|
+
* - **Inbound refs to deleted dupes become broken.** Run
|
|
75
|
+
* `audit broken-links list` after a purge — the duplicates that
|
|
76
|
+
* other content pointed to leave dangling references behind.
|
|
77
|
+
* - With `--keep-rule interactive`, the command prompts per group.
|
|
78
|
+
* Honors `s`/`skip` per-group to leave a group untouched.
|
|
79
|
+
* Requires a TTY; pass any other keep-rule when scripting.
|
|
80
|
+
*/
|
|
81
|
+
const runCleanupDuplicates = async (options) => {
|
|
82
|
+
const logger = (0, shared_1.toLogger)(options);
|
|
83
|
+
const keepRule = options.keepRule ?? "oldest";
|
|
84
|
+
if (keepRule === "interactive") {
|
|
85
|
+
if (!process.stdin.isTTY || options.nonInteractive) {
|
|
86
|
+
throw (0, errors_1.createScaiError)("--keep-rule interactive requires a TTY (cannot run with --non-interactive or piped stdin).", "INPUT_INVALID", { hint: "Pass --keep-rule oldest|newest|shortest-path for CI / agent use." });
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
const { envName, root: rootConfig, client } = (0, shared_1.resolveTenant)(options);
|
|
90
|
+
if (!options.whatIf) {
|
|
91
|
+
(0, shared_1.ensureAllowWriteForCleanup)(rootConfig, envName, options.allowWrite, "cleanup-duplicates");
|
|
92
|
+
}
|
|
93
|
+
else if (!logger.isJson()) {
|
|
94
|
+
logger.info("What-if mode active — no items will be deleted.", "yellow");
|
|
95
|
+
}
|
|
96
|
+
// Reuse audit to find groups — unless the caller piped in an audit
|
|
97
|
+
// envelope via --from-stdin. Skipping the internal audit prevents the
|
|
98
|
+
// tenant-state-changed-between-calls drift the dual-discovery model
|
|
99
|
+
// could surface, and shaves the full discovery scan off the cleanup.
|
|
100
|
+
const groups = options.preComputedGroups ??
|
|
101
|
+
(await (0, duplicates_1.runAuditDuplicates)({ ...options, json: true, quiet: true }));
|
|
102
|
+
const actions = [];
|
|
103
|
+
for (const group of groups) {
|
|
104
|
+
let selection;
|
|
105
|
+
if (keepRule === "interactive") {
|
|
106
|
+
selection = await promptForKeep(group);
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
selection = pickByRule(group, keepRule);
|
|
110
|
+
}
|
|
111
|
+
const action = {
|
|
112
|
+
contentHash: group.contentHash,
|
|
113
|
+
kept: { itemId: selection.kept.itemId, path: selection.kept.path },
|
|
114
|
+
deleted: [],
|
|
115
|
+
};
|
|
116
|
+
// Pre-flight: scan content for inbound refs to each deletion
|
|
117
|
+
// candidate. `audit references` with `cache: true` shares its
|
|
118
|
+
// field-cache across back-to-back calls so only the first scan
|
|
119
|
+
// pays the full O(items × fields) cost; subsequent dupes hit the
|
|
120
|
+
// warm cache. `--skip-ref-check` or `--force` opts out for
|
|
121
|
+
// operators who know inbound refs are acceptable.
|
|
122
|
+
const runRefCheck = !options.skipRefCheck && !options.force && !options.whatIf;
|
|
123
|
+
const deleteResults = await (0, cli_tasks_1.mapWithConcurrency)(selection.rest, async (m) => {
|
|
124
|
+
if (runRefCheck) {
|
|
125
|
+
const refs = await (0, references_1.runAuditReferences)({
|
|
126
|
+
...options,
|
|
127
|
+
to: m.itemId,
|
|
128
|
+
silent: true,
|
|
129
|
+
cache: true,
|
|
130
|
+
});
|
|
131
|
+
if (refs.length > 0) {
|
|
132
|
+
return {
|
|
133
|
+
itemId: m.itemId,
|
|
134
|
+
path: m.path,
|
|
135
|
+
status: "blocked",
|
|
136
|
+
blockers: refs,
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
if (options.whatIf) {
|
|
141
|
+
return { itemId: m.itemId, path: m.path, status: "what-if" };
|
|
142
|
+
}
|
|
143
|
+
try {
|
|
144
|
+
await client.deleteItem({
|
|
145
|
+
itemId: (0, shared_1.dashifyItemId)(m.itemId),
|
|
146
|
+
permanently: true,
|
|
147
|
+
});
|
|
148
|
+
return { itemId: m.itemId, path: m.path, status: "deleted" };
|
|
149
|
+
}
|
|
150
|
+
catch (error) {
|
|
151
|
+
return {
|
|
152
|
+
itemId: m.itemId,
|
|
153
|
+
path: m.path,
|
|
154
|
+
status: "failed",
|
|
155
|
+
error: error instanceof Error ? error.message : String(error),
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
}, options.concurrency ?? 4);
|
|
159
|
+
action.deleted = deleteResults;
|
|
160
|
+
actions.push(action);
|
|
161
|
+
}
|
|
162
|
+
const totalDeleted = actions.reduce((n, a) => n + a.deleted.filter((d) => d.status === "deleted").length, 0);
|
|
163
|
+
const totalFailed = actions.reduce((n, a) => n + a.deleted.filter((d) => d.status === "failed").length, 0);
|
|
164
|
+
const totalBlocked = actions.reduce((n, a) => n + a.deleted.filter((d) => d.status === "blocked").length, 0);
|
|
165
|
+
const blockedSuffix = totalBlocked > 0 ? `; ${totalBlocked} blocked by inbound refs` : "";
|
|
166
|
+
const summary = options.whatIf
|
|
167
|
+
? `Plan: would delete ${actions.reduce((n, a) => n + a.deleted.length, 0)} duplicate item${actions.reduce((n, a) => n + a.deleted.length, 0) === 1 ? "" : "s"} across ${actions.length} group${actions.length === 1 ? "" : "s"} (keep-rule: ${keepRule}).`
|
|
168
|
+
: `Deleted ${totalDeleted} duplicate${totalDeleted === 1 ? "" : "s"} across ${actions.length} group${actions.length === 1 ? "" : "s"} (keep-rule: ${keepRule})${totalFailed > 0 ? `; ${totalFailed} failed` : ""}${blockedSuffix}.`;
|
|
169
|
+
(0, shared_1.printReport)({
|
|
170
|
+
logger,
|
|
171
|
+
command: "cleanup.duplicates.purge",
|
|
172
|
+
envName,
|
|
173
|
+
results: actions,
|
|
174
|
+
summary,
|
|
175
|
+
formatLine: (a) => `[${a.contentHash}] keep ${a.kept.path}; deleted ${a.deleted
|
|
176
|
+
.map((d) => `${d.status === "deleted" ? "" : `[${d.status}] `}${d.path}`)
|
|
177
|
+
.join(", ")}`,
|
|
178
|
+
extra: {
|
|
179
|
+
keepRule,
|
|
180
|
+
whatIf: Boolean(options.whatIf),
|
|
181
|
+
groupCount: actions.length,
|
|
182
|
+
deletedCount: totalDeleted,
|
|
183
|
+
failedCount: totalFailed,
|
|
184
|
+
},
|
|
185
|
+
options,
|
|
186
|
+
});
|
|
187
|
+
return actions;
|
|
188
|
+
};
|
|
189
|
+
exports.runCleanupDuplicates = runCleanupDuplicates;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { type HygieneCommonOptions } from "../shared";
|
|
2
|
+
export interface CleanupEmptyFoldersOptions extends HygieneCommonOptions {
|
|
3
|
+
/** Required. Root path to clean up under. */
|
|
4
|
+
root: string;
|
|
5
|
+
/** Cap on deletions. Default 500. */
|
|
6
|
+
maxDeletions?: number;
|
|
7
|
+
whatIf?: boolean;
|
|
8
|
+
allowWrite?: boolean;
|
|
9
|
+
baseline?: boolean;
|
|
10
|
+
output?: string;
|
|
11
|
+
format?: "json" | "csv" | "markdown";
|
|
12
|
+
/**
|
|
13
|
+
* Permit operating against `/sitecore/system` and templates roots.
|
|
14
|
+
* Off by default. Required even with `--what-if` to avoid surprise.
|
|
15
|
+
*/
|
|
16
|
+
force?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Additional template IDs to treat as folders, beyond the well-known
|
|
19
|
+
* Sitecore folder templates. Accept any case + dashed/curly/flat
|
|
20
|
+
* GUID form — values are normalised before comparison. Repeat or
|
|
21
|
+
* comma-separate at the CLI layer.
|
|
22
|
+
*
|
|
23
|
+
* Without an allowlist, the cleanup would delete *any* leaf item
|
|
24
|
+
* (Pages, Datasources, etc.) the moment its children were emptied —
|
|
25
|
+
* the original implementation had exactly this footgun in production.
|
|
26
|
+
*/
|
|
27
|
+
folderTemplateIds?: string[];
|
|
28
|
+
/**
|
|
29
|
+
* Treat any item whose template name matches this regular expression
|
|
30
|
+
* as a folder for deletion purposes. Off by default. Use with care —
|
|
31
|
+
* a permissive pattern (e.g. `.*Folder.*`) will sweep "Folder Settings"
|
|
32
|
+
* or "Folder Mapping" templates alongside actual folders. The default
|
|
33
|
+
* folder-id allowlist is the safer surface for most operators.
|
|
34
|
+
*/
|
|
35
|
+
templateNamePattern?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Disable the folder-template gate and revert to the pre-2026
|
|
38
|
+
* behaviour of deleting any leaf item with zero children. Provided
|
|
39
|
+
* only as an emergency escape hatch — pair with `--what-if` first
|
|
40
|
+
* and a tightly scoped `--root` to avoid mass deletion of Page items.
|
|
41
|
+
*/
|
|
42
|
+
anyTemplate?: boolean;
|
|
43
|
+
}
|
|
44
|
+
export interface EmptyFolderAction {
|
|
45
|
+
itemId: string;
|
|
46
|
+
path: string;
|
|
47
|
+
status: "deleted" | "what-if" | "failed";
|
|
48
|
+
error?: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Delete folder-like items that have no children, recursively
|
|
52
|
+
* bottom-up under `--root`.
|
|
53
|
+
*
|
|
54
|
+
* Strategy:
|
|
55
|
+
* 1. Walk the tree depth-first via `getChildren`.
|
|
56
|
+
* 2. At each node, recurse; if every child reports as "empty after
|
|
57
|
+
* cleanup" (i.e. itself got deleted), and the node itself has
|
|
58
|
+
* no remaining children, delete the node.
|
|
59
|
+
* 3. Continue bubbling up — parent may become empty after its
|
|
60
|
+
* children are deleted.
|
|
61
|
+
*
|
|
62
|
+
* Safety rails:
|
|
63
|
+
* - `--root` required; no tenant-wide form.
|
|
64
|
+
* - `/sitecore/system`, `/sitecore/templates`, `/sitecore/layout`
|
|
65
|
+
* refused without `--force`.
|
|
66
|
+
* - `--allow-write` (or env `allowWrite`) required outside
|
|
67
|
+
* `--what-if`.
|
|
68
|
+
* - `--max-deletions` caps total folder removals.
|
|
69
|
+
* - Items that have content (non-folder template, fields with
|
|
70
|
+
* values) are NOT touched — we ONLY delete items with zero
|
|
71
|
+
* children, regardless of their template. If a "Page" item has
|
|
72
|
+
* no children, the operator should clean it via `cleanup
|
|
73
|
+
* duplicates` or similar, not here.
|
|
74
|
+
*/
|
|
75
|
+
export declare const runCleanupEmptyFolders: (options: CleanupEmptyFoldersOptions) => Promise<EmptyFolderAction[]>;
|