@sitecoreai-labs/sitecoreai-cli 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +67 -0
- package/LICENSE +21 -0
- package/README.md +357 -0
- package/bin/sitecoreai-cli +3 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +358 -0
- package/dist/commands/config.d.ts +3 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +27 -0
- package/dist/commands/deploy/deployments.d.ts +3 -0
- package/dist/commands/deploy/deployments.d.ts.map +1 -0
- package/dist/commands/deploy/deployments.js +58 -0
- package/dist/commands/deploy/editing-host.d.ts +3 -0
- package/dist/commands/deploy/editing-host.d.ts.map +1 -0
- package/dist/commands/deploy/editing-host.js +49 -0
- package/dist/commands/deploy/environments/deployments.d.ts +3 -0
- package/dist/commands/deploy/environments/deployments.d.ts.map +1 -0
- package/dist/commands/deploy/environments/deployments.js +28 -0
- package/dist/commands/deploy/environments/index.d.ts +3 -0
- package/dist/commands/deploy/environments/index.d.ts.map +1 -0
- package/dist/commands/deploy/environments/index.js +29 -0
- package/dist/commands/deploy/environments/mutations.d.ts +9 -0
- package/dist/commands/deploy/environments/mutations.d.ts.map +1 -0
- package/dist/commands/deploy/environments/mutations.js +103 -0
- package/dist/commands/deploy/environments/queries.d.ts +7 -0
- package/dist/commands/deploy/environments/queries.d.ts.map +1 -0
- package/dist/commands/deploy/environments/queries.js +56 -0
- package/dist/commands/deploy/environments/variables.d.ts +3 -0
- package/dist/commands/deploy/environments/variables.d.ts.map +1 -0
- package/dist/commands/deploy/environments/variables.js +40 -0
- package/dist/commands/deploy/environments.d.ts +2 -0
- package/dist/commands/deploy/environments.d.ts.map +1 -0
- package/dist/commands/deploy/environments.js +17 -0
- package/dist/commands/deploy/index.d.ts +3 -0
- package/dist/commands/deploy/index.d.ts.map +1 -0
- package/dist/commands/deploy/index.js +26 -0
- package/dist/commands/deploy/logs.d.ts +3 -0
- package/dist/commands/deploy/logs.d.ts.map +1 -0
- package/dist/commands/deploy/logs.js +39 -0
- package/dist/commands/deploy/organizations.d.ts +3 -0
- package/dist/commands/deploy/organizations.d.ts.map +1 -0
- package/dist/commands/deploy/organizations.js +29 -0
- package/dist/commands/deploy/projects.d.ts +3 -0
- package/dist/commands/deploy/projects.d.ts.map +1 -0
- package/dist/commands/deploy/projects.js +74 -0
- package/dist/commands/deploy/shared.d.ts +3 -0
- package/dist/commands/deploy/shared.d.ts.map +1 -0
- package/dist/commands/deploy/shared.js +12 -0
- package/dist/commands/deploy/site.d.ts +10 -0
- package/dist/commands/deploy/site.d.ts.map +1 -0
- package/dist/commands/deploy/site.js +36 -0
- package/dist/commands/deploy/source-control.d.ts +3 -0
- package/dist/commands/deploy/source-control.d.ts.map +1 -0
- package/dist/commands/deploy/source-control.js +89 -0
- package/dist/commands/deploy.d.ts +2 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/commands/deploy.js +5 -0
- package/dist/commands/history.d.ts +3 -0
- package/dist/commands/history.d.ts.map +1 -0
- package/dist/commands/history.js +88 -0
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +32 -0
- package/dist/commands/login.d.ts +3 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +21 -0
- package/dist/commands/logout.d.ts +3 -0
- package/dist/commands/logout.d.ts.map +1 -0
- package/dist/commands/logout.js +18 -0
- package/dist/commands/recipe/index.d.ts +3 -0
- package/dist/commands/recipe/index.d.ts.map +1 -0
- package/dist/commands/recipe/index.js +158 -0
- package/dist/commands/serialization/index.d.ts +3 -0
- package/dist/commands/serialization/index.d.ts.map +1 -0
- package/dist/commands/serialization/index.js +89 -0
- package/dist/commands/serialization/package.d.ts +3 -0
- package/dist/commands/serialization/package.d.ts.map +1 -0
- package/dist/commands/serialization/package.js +36 -0
- package/dist/commands/shared.d.ts +21 -0
- package/dist/commands/shared.d.ts.map +1 -0
- package/dist/commands/shared.js +82 -0
- package/dist/commands/shell.d.ts +10 -0
- package/dist/commands/shell.d.ts.map +1 -0
- package/dist/commands/shell.js +155 -0
- package/dist/commands/status.d.ts +3 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +15 -0
- package/dist/commands/telemetry.d.ts +3 -0
- package/dist/commands/telemetry.d.ts.map +1 -0
- package/dist/commands/telemetry.js +28 -0
- package/dist/config/env-overrides.d.ts +4 -0
- package/dist/config/env-overrides.d.ts.map +1 -0
- package/dist/config/env-overrides.js +199 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +13 -0
- package/dist/config/modules.d.ts +4 -0
- package/dist/config/modules.d.ts.map +1 -0
- package/dist/config/modules.js +152 -0
- package/dist/config/paths.d.ts +2 -0
- package/dist/config/paths.d.ts.map +1 -0
- package/dist/config/paths.js +39 -0
- package/dist/config/root-config.d.ts +10 -0
- package/dist/config/root-config.d.ts.map +1 -0
- package/dist/config/root-config.js +159 -0
- package/dist/config/schema.json +278 -0
- package/dist/config/serialization-module.schema.json +127 -0
- package/dist/config/telemetry.schema.json +21 -0
- package/dist/config/types.d.ts +245 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +19 -0
- package/dist/config/validation.d.ts +10 -0
- package/dist/config/validation.d.ts.map +1 -0
- package/dist/config/validation.js +43 -0
- package/dist/deploy/api/common/headers.d.ts +2 -0
- package/dist/deploy/api/common/headers.d.ts.map +1 -0
- package/dist/deploy/api/common/headers.js +10 -0
- package/dist/deploy/api/common/index.d.ts +4 -0
- package/dist/deploy/api/common/index.d.ts.map +1 -0
- package/dist/deploy/api/common/index.js +19 -0
- package/dist/deploy/api/common/request.d.ts +9 -0
- package/dist/deploy/api/common/request.d.ts.map +1 -0
- package/dist/deploy/api/common/request.js +253 -0
- package/dist/deploy/api/common/types.d.ts +44 -0
- package/dist/deploy/api/common/types.d.ts.map +1 -0
- package/dist/deploy/api/common/types.js +5 -0
- package/dist/deploy/api/common.d.ts +2 -0
- package/dist/deploy/api/common.d.ts.map +1 -0
- package/dist/deploy/api/common.js +17 -0
- package/dist/deploy/api/deployment-logs.d.ts +2 -0
- package/dist/deploy/api/deployment-logs.d.ts.map +1 -0
- package/dist/deploy/api/deployment-logs.js +23 -0
- package/dist/deploy/api/deployments.d.ts +9 -0
- package/dist/deploy/api/deployments.d.ts.map +1 -0
- package/dist/deploy/api/deployments.js +61 -0
- package/dist/deploy/api/environments.d.ts +21 -0
- package/dist/deploy/api/environments.d.ts.map +1 -0
- package/dist/deploy/api/environments.js +67 -0
- package/dist/deploy/api/index.d.ts +9 -0
- package/dist/deploy/api/index.d.ts.map +1 -0
- package/dist/deploy/api/index.js +24 -0
- package/dist/deploy/api/logs.d.ts +8 -0
- package/dist/deploy/api/logs.d.ts.map +1 -0
- package/dist/deploy/api/logs.js +29 -0
- package/dist/deploy/api/organizations.d.ts +6 -0
- package/dist/deploy/api/organizations.d.ts.map +1 -0
- package/dist/deploy/api/organizations.js +18 -0
- package/dist/deploy/api/projects.d.ts +13 -0
- package/dist/deploy/api/projects.d.ts.map +1 -0
- package/dist/deploy/api/projects.js +42 -0
- package/dist/deploy/api/source-control.d.ts +15 -0
- package/dist/deploy/api/source-control.d.ts.map +1 -0
- package/dist/deploy/api/source-control.js +71 -0
- package/dist/deploy/api.d.ts +2 -0
- package/dist/deploy/api.d.ts.map +1 -0
- package/dist/deploy/api.js +17 -0
- package/dist/deploy/tasks/deployment-result.d.ts +6 -0
- package/dist/deploy/tasks/deployment-result.d.ts.map +1 -0
- package/dist/deploy/tasks/deployment-result.js +36 -0
- package/dist/deploy/tasks/deployments.d.ts +10 -0
- package/dist/deploy/tasks/deployments.d.ts.map +1 -0
- package/dist/deploy/tasks/deployments.js +201 -0
- package/dist/deploy/tasks/editing-host.d.ts +28 -0
- package/dist/deploy/tasks/editing-host.d.ts.map +1 -0
- package/dist/deploy/tasks/editing-host.js +216 -0
- package/dist/deploy/tasks/environments.d.ts +20 -0
- package/dist/deploy/tasks/environments.d.ts.map +1 -0
- package/dist/deploy/tasks/environments.js +364 -0
- package/dist/deploy/tasks/index.d.ts +10 -0
- package/dist/deploy/tasks/index.d.ts.map +1 -0
- package/dist/deploy/tasks/index.js +25 -0
- package/dist/deploy/tasks/logs.d.ts +5 -0
- package/dist/deploy/tasks/logs.d.ts.map +1 -0
- package/dist/deploy/tasks/logs.js +56 -0
- package/dist/deploy/tasks/organizations.d.ts +6 -0
- package/dist/deploy/tasks/organizations.d.ts.map +1 -0
- package/dist/deploy/tasks/organizations.js +51 -0
- package/dist/deploy/tasks/projects.d.ts +11 -0
- package/dist/deploy/tasks/projects.d.ts.map +1 -0
- package/dist/deploy/tasks/projects.js +246 -0
- package/dist/deploy/tasks/shared.d.ts +63 -0
- package/dist/deploy/tasks/shared.d.ts.map +1 -0
- package/dist/deploy/tasks/shared.js +261 -0
- package/dist/deploy/tasks/site-bind.d.ts +21 -0
- package/dist/deploy/tasks/site-bind.d.ts.map +1 -0
- package/dist/deploy/tasks/site-bind.js +142 -0
- package/dist/deploy/tasks/site.d.ts +14 -0
- package/dist/deploy/tasks/site.d.ts.map +1 -0
- package/dist/deploy/tasks/site.js +29 -0
- package/dist/deploy/tasks/source-control.d.ts +14 -0
- package/dist/deploy/tasks/source-control.d.ts.map +1 -0
- package/dist/deploy/tasks/source-control.js +173 -0
- package/dist/deploy/tasks/types.d.ts +204 -0
- package/dist/deploy/tasks/types.d.ts.map +1 -0
- package/dist/deploy/tasks/types.js +7 -0
- package/dist/deploy/tasks.d.ts +3 -0
- package/dist/deploy/tasks.d.ts.map +1 -0
- package/dist/deploy/tasks.js +18 -0
- package/dist/recipe/api/auth.d.ts +9 -0
- package/dist/recipe/api/auth.d.ts.map +1 -0
- package/dist/recipe/api/auth.js +12 -0
- package/dist/recipe/api/authoring-client.d.ts +37 -0
- package/dist/recipe/api/authoring-client.d.ts.map +1 -0
- package/dist/recipe/api/authoring-client.js +495 -0
- package/dist/recipe/api/client.d.ts +99 -0
- package/dist/recipe/api/client.d.ts.map +1 -0
- package/dist/recipe/api/client.js +17 -0
- package/dist/recipe/api/graphql.d.ts +15 -0
- package/dist/recipe/api/graphql.d.ts.map +1 -0
- package/dist/recipe/api/graphql.js +38 -0
- package/dist/recipe/api/ref-encoding.d.ts +38 -0
- package/dist/recipe/api/ref-encoding.d.ts.map +1 -0
- package/dist/recipe/api/ref-encoding.js +160 -0
- package/dist/recipe/api/site-discovery.d.ts +49 -0
- package/dist/recipe/api/site-discovery.d.ts.map +1 -0
- package/dist/recipe/api/site-discovery.js +127 -0
- package/dist/recipe/api/sites-client.d.ts +48 -0
- package/dist/recipe/api/sites-client.d.ts.map +1 -0
- package/dist/recipe/api/sites-client.js +19 -0
- package/dist/recipe/cache.d.ts +36 -0
- package/dist/recipe/cache.d.ts.map +1 -0
- package/dist/recipe/cache.js +114 -0
- package/dist/recipe/compile/component-section.d.ts +46 -0
- package/dist/recipe/compile/component-section.d.ts.map +1 -0
- package/dist/recipe/compile/component-section.js +143 -0
- package/dist/recipe/compile/component-template.d.ts +34 -0
- package/dist/recipe/compile/component-template.d.ts.map +1 -0
- package/dist/recipe/compile/component-template.js +709 -0
- package/dist/recipe/compile/content-item.d.ts +31 -0
- package/dist/recipe/compile/content-item.d.ts.map +1 -0
- package/dist/recipe/compile/content-item.js +189 -0
- package/dist/recipe/compile/content-template.d.ts +18 -0
- package/dist/recipe/compile/content-template.d.ts.map +1 -0
- package/dist/recipe/compile/content-template.js +52 -0
- package/dist/recipe/compile/enumeration.d.ts +59 -0
- package/dist/recipe/compile/enumeration.d.ts.map +1 -0
- package/dist/recipe/compile/enumeration.js +236 -0
- package/dist/recipe/compile/page-design.d.ts +22 -0
- package/dist/recipe/compile/page-design.d.ts.map +1 -0
- package/dist/recipe/compile/page-design.js +93 -0
- package/dist/recipe/compile/parameters-template.d.ts +14 -0
- package/dist/recipe/compile/parameters-template.d.ts.map +1 -0
- package/dist/recipe/compile/parameters-template.js +92 -0
- package/dist/recipe/compile/partial-design.d.ts +18 -0
- package/dist/recipe/compile/partial-design.d.ts.map +1 -0
- package/dist/recipe/compile/partial-design.js +76 -0
- package/dist/recipe/compile/section-definition.d.ts +18 -0
- package/dist/recipe/compile/section-definition.d.ts.map +1 -0
- package/dist/recipe/compile/section-definition.js +26 -0
- package/dist/recipe/compile/shared.d.ts +442 -0
- package/dist/recipe/compile/shared.d.ts.map +1 -0
- package/dist/recipe/compile/shared.js +843 -0
- package/dist/recipe/compile/site-template.d.ts +52 -0
- package/dist/recipe/compile/site-template.d.ts.map +1 -0
- package/dist/recipe/compile/site-template.js +140 -0
- package/dist/recipe/compile/site.d.ts +44 -0
- package/dist/recipe/compile/site.d.ts.map +1 -0
- package/dist/recipe/compile/site.js +127 -0
- package/dist/recipe/compile.d.ts +93 -0
- package/dist/recipe/compile.d.ts.map +1 -0
- package/dist/recipe/compile.js +741 -0
- package/dist/recipe/execute.d.ts +119 -0
- package/dist/recipe/execute.d.ts.map +1 -0
- package/dist/recipe/execute.js +273 -0
- package/dist/recipe/guids.d.ts +400 -0
- package/dist/recipe/guids.d.ts.map +1 -0
- package/dist/recipe/guids.js +488 -0
- package/dist/recipe/index.d.ts +32 -0
- package/dist/recipe/index.d.ts.map +1 -0
- package/dist/recipe/index.js +156 -0
- package/dist/recipe/io.d.ts +21 -0
- package/dist/recipe/io.d.ts.map +1 -0
- package/dist/recipe/io.js +147 -0
- package/dist/recipe/ir/operations.d.ts +692 -0
- package/dist/recipe/ir/operations.d.ts.map +1 -0
- package/dist/recipe/ir/operations.js +347 -0
- package/dist/recipe/ir/sitecore-templates.d.ts +455 -0
- package/dist/recipe/ir/sitecore-templates.d.ts.map +1 -0
- package/dist/recipe/ir/sitecore-templates.js +465 -0
- package/dist/recipe/layout/emit.d.ts +101 -0
- package/dist/recipe/layout/emit.d.ts.map +1 -0
- package/dist/recipe/layout/emit.js +127 -0
- package/dist/recipe/layout/templates-mapping.d.ts +28 -0
- package/dist/recipe/layout/templates-mapping.d.ts.map +1 -0
- package/dist/recipe/layout/templates-mapping.js +29 -0
- package/dist/recipe/plan.d.ts +134 -0
- package/dist/recipe/plan.d.ts.map +1 -0
- package/dist/recipe/plan.js +565 -0
- package/dist/recipe/policy.d.ts +43 -0
- package/dist/recipe/policy.d.ts.map +1 -0
- package/dist/recipe/policy.js +75 -0
- package/dist/recipe/rollback.d.ts +72 -0
- package/dist/recipe/rollback.d.ts.map +1 -0
- package/dist/recipe/rollback.js +130 -0
- package/dist/recipe/schema/field-types.d.ts +72 -0
- package/dist/recipe/schema/field-types.d.ts.map +1 -0
- package/dist/recipe/schema/field-types.js +118 -0
- package/dist/recipe/schema/recipe.d.ts +1545 -0
- package/dist/recipe/schema/recipe.d.ts.map +1 -0
- package/dist/recipe/schema/recipe.js +1175 -0
- package/dist/recipe/schema/source-fields.d.ts +48 -0
- package/dist/recipe/schema/source-fields.d.ts.map +1 -0
- package/dist/recipe/schema/source-fields.js +79 -0
- package/dist/recipe/tasks/compile.d.ts +14 -0
- package/dist/recipe/tasks/compile.d.ts.map +1 -0
- package/dist/recipe/tasks/compile.js +89 -0
- package/dist/recipe/tasks/diff.d.ts +17 -0
- package/dist/recipe/tasks/diff.d.ts.map +1 -0
- package/dist/recipe/tasks/diff.js +6 -0
- package/dist/recipe/tasks/index.d.ts +9 -0
- package/dist/recipe/tasks/index.d.ts.map +1 -0
- package/dist/recipe/tasks/index.js +13 -0
- package/dist/recipe/tasks/placeholder-allow.d.ts +53 -0
- package/dist/recipe/tasks/placeholder-allow.d.ts.map +1 -0
- package/dist/recipe/tasks/placeholder-allow.js +218 -0
- package/dist/recipe/tasks/plan.d.ts +11 -0
- package/dist/recipe/tasks/plan.d.ts.map +1 -0
- package/dist/recipe/tasks/plan.js +72 -0
- package/dist/recipe/tasks/prune-defaults.d.ts +90 -0
- package/dist/recipe/tasks/prune-defaults.d.ts.map +1 -0
- package/dist/recipe/tasks/prune-defaults.js +184 -0
- package/dist/recipe/tasks/push.d.ts +18 -0
- package/dist/recipe/tasks/push.d.ts.map +1 -0
- package/dist/recipe/tasks/push.js +417 -0
- package/dist/recipe/tasks/shared.d.ts +152 -0
- package/dist/recipe/tasks/shared.d.ts.map +1 -0
- package/dist/recipe/tasks/shared.js +94 -0
- package/dist/recipe/validate.d.ts +103 -0
- package/dist/recipe/validate.d.ts.map +1 -0
- package/dist/recipe/validate.js +297 -0
- package/dist/serialization/commands.d.ts +48 -0
- package/dist/serialization/commands.d.ts.map +1 -0
- package/dist/serialization/commands.js +175 -0
- package/dist/serialization/compare.d.ts +29 -0
- package/dist/serialization/compare.d.ts.map +1 -0
- package/dist/serialization/compare.js +124 -0
- package/dist/serialization/field-filter.d.ts +7 -0
- package/dist/serialization/field-filter.d.ts.map +1 -0
- package/dist/serialization/field-filter.js +20 -0
- package/dist/serialization/filesystem-store/constants.d.ts +3 -0
- package/dist/serialization/filesystem-store/constants.d.ts.map +1 -0
- package/dist/serialization/filesystem-store/constants.js +5 -0
- package/dist/serialization/filesystem-store/index.d.ts +4 -0
- package/dist/serialization/filesystem-store/index.d.ts.map +1 -0
- package/dist/serialization/filesystem-store/index.js +15 -0
- package/dist/serialization/filesystem-store/items.d.ts +10 -0
- package/dist/serialization/filesystem-store/items.d.ts.map +1 -0
- package/dist/serialization/filesystem-store/items.js +64 -0
- package/dist/serialization/filesystem-store/roles.d.ts +6 -0
- package/dist/serialization/filesystem-store/roles.d.ts.map +1 -0
- package/dist/serialization/filesystem-store/roles.js +46 -0
- package/dist/serialization/filesystem-store/users.d.ts +6 -0
- package/dist/serialization/filesystem-store/users.d.ts.map +1 -0
- package/dist/serialization/filesystem-store/users.js +46 -0
- package/dist/serialization/filesystem-store/utils.d.ts +2 -0
- package/dist/serialization/filesystem-store/utils.d.ts.map +1 -0
- package/dist/serialization/filesystem-store/utils.js +17 -0
- package/dist/serialization/filesystem-store.d.ts +2 -0
- package/dist/serialization/filesystem-store.d.ts.map +1 -0
- package/dist/serialization/filesystem-store.js +17 -0
- package/dist/serialization/item-path.d.ts +32 -0
- package/dist/serialization/item-path.d.ts.map +1 -0
- package/dist/serialization/item-path.js +123 -0
- package/dist/serialization/path-provider.d.ts +12 -0
- package/dist/serialization/path-provider.d.ts.map +1 -0
- package/dist/serialization/path-provider.js +271 -0
- package/dist/serialization/signature.d.ts +4 -0
- package/dist/serialization/signature.d.ts.map +1 -0
- package/dist/serialization/signature.js +71 -0
- package/dist/serialization/sitecore-api/auth.d.ts +31 -0
- package/dist/serialization/sitecore-api/auth.d.ts.map +1 -0
- package/dist/serialization/sitecore-api/auth.js +319 -0
- package/dist/serialization/sitecore-api/graphql.d.ts +12 -0
- package/dist/serialization/sitecore-api/graphql.d.ts.map +1 -0
- package/dist/serialization/sitecore-api/graphql.js +20 -0
- package/dist/serialization/sitecore-api/history.d.ts +9 -0
- package/dist/serialization/sitecore-api/history.d.ts.map +1 -0
- package/dist/serialization/sitecore-api/history.js +36 -0
- package/dist/serialization/sitecore-api/index.d.ts +7 -0
- package/dist/serialization/sitecore-api/index.d.ts.map +1 -0
- package/dist/serialization/sitecore-api/index.js +22 -0
- package/dist/serialization/sitecore-api/items.d.ts +8 -0
- package/dist/serialization/sitecore-api/items.d.ts.map +1 -0
- package/dist/serialization/sitecore-api/items.js +132 -0
- package/dist/serialization/sitecore-api/publish.d.ts +14 -0
- package/dist/serialization/sitecore-api/publish.d.ts.map +1 -0
- package/dist/serialization/sitecore-api/publish.js +43 -0
- package/dist/serialization/sitecore-api/roles.d.ts +9 -0
- package/dist/serialization/sitecore-api/roles.d.ts.map +1 -0
- package/dist/serialization/sitecore-api/roles.js +42 -0
- package/dist/serialization/sitecore-api/users.d.ts +9 -0
- package/dist/serialization/sitecore-api/users.d.ts.map +1 -0
- package/dist/serialization/sitecore-api/users.js +62 -0
- package/dist/serialization/sitecore-api.d.ts +2 -0
- package/dist/serialization/sitecore-api.d.ts.map +1 -0
- package/dist/serialization/sitecore-api.js +17 -0
- package/dist/serialization/tasks/diff.d.ts +3 -0
- package/dist/serialization/tasks/diff.d.ts.map +1 -0
- package/dist/serialization/tasks/diff.js +109 -0
- package/dist/serialization/tasks/env/constants.d.ts +2 -0
- package/dist/serialization/tasks/env/constants.d.ts.map +1 -0
- package/dist/serialization/tasks/env/constants.js +4 -0
- package/dist/serialization/tasks/env/deploy-token.d.ts +3 -0
- package/dist/serialization/tasks/env/deploy-token.d.ts.map +1 -0
- package/dist/serialization/tasks/env/deploy-token.js +128 -0
- package/dist/serialization/tasks/env/index.d.ts +5 -0
- package/dist/serialization/tasks/env/index.d.ts.map +1 -0
- package/dist/serialization/tasks/env/index.js +11 -0
- package/dist/serialization/tasks/env/init/auth.d.ts +24 -0
- package/dist/serialization/tasks/env/init/auth.d.ts.map +1 -0
- package/dist/serialization/tasks/env/init/auth.js +122 -0
- package/dist/serialization/tasks/env/init/deploy-lookup.d.ts +22 -0
- package/dist/serialization/tasks/env/init/deploy-lookup.d.ts.map +1 -0
- package/dist/serialization/tasks/env/init/deploy-lookup.js +244 -0
- package/dist/serialization/tasks/env/init.d.ts +3 -0
- package/dist/serialization/tasks/env/init.d.ts.map +1 -0
- package/dist/serialization/tasks/env/init.js +253 -0
- package/dist/serialization/tasks/env/logout.d.ts +3 -0
- package/dist/serialization/tasks/env/logout.d.ts.map +1 -0
- package/dist/serialization/tasks/env/logout.js +61 -0
- package/dist/serialization/tasks/env/status.d.ts +3 -0
- package/dist/serialization/tasks/env/status.d.ts.map +1 -0
- package/dist/serialization/tasks/env/status.js +149 -0
- package/dist/serialization/tasks/env.d.ts +2 -0
- package/dist/serialization/tasks/env.d.ts.map +1 -0
- package/dist/serialization/tasks/env.js +17 -0
- package/dist/serialization/tasks/helpers/collect.d.ts +8 -0
- package/dist/serialization/tasks/helpers/collect.d.ts.map +1 -0
- package/dist/serialization/tasks/helpers/collect.js +29 -0
- package/dist/serialization/tasks/helpers/commands.d.ts +5 -0
- package/dist/serialization/tasks/helpers/commands.d.ts.map +1 -0
- package/dist/serialization/tasks/helpers/commands.js +14 -0
- package/dist/serialization/tasks/helpers/filesystem.d.ts +6 -0
- package/dist/serialization/tasks/helpers/filesystem.d.ts.map +1 -0
- package/dist/serialization/tasks/helpers/filesystem.js +27 -0
- package/dist/serialization/tasks/helpers/index.d.ts +6 -0
- package/dist/serialization/tasks/helpers/index.d.ts.map +1 -0
- package/dist/serialization/tasks/helpers/index.js +13 -0
- package/dist/serialization/tasks/helpers/items.d.ts +3 -0
- package/dist/serialization/tasks/helpers/items.d.ts.map +1 -0
- package/dist/serialization/tasks/helpers/items.js +5 -0
- package/dist/serialization/tasks/helpers/sitecore.d.ts +5 -0
- package/dist/serialization/tasks/helpers/sitecore.d.ts.map +1 -0
- package/dist/serialization/tasks/helpers/sitecore.js +109 -0
- package/dist/serialization/tasks/helpers.d.ts +2 -0
- package/dist/serialization/tasks/helpers.d.ts.map +1 -0
- package/dist/serialization/tasks/helpers.js +17 -0
- package/dist/serialization/tasks/index.d.ts +8 -0
- package/dist/serialization/tasks/index.d.ts.map +1 -0
- package/dist/serialization/tasks/index.js +19 -0
- package/dist/serialization/tasks/info.d.ts +4 -0
- package/dist/serialization/tasks/info.d.ts.map +1 -0
- package/dist/serialization/tasks/info.js +82 -0
- package/dist/serialization/tasks/package.d.ts +4 -0
- package/dist/serialization/tasks/package.d.ts.map +1 -0
- package/dist/serialization/tasks/package.js +171 -0
- package/dist/serialization/tasks/pull.d.ts +3 -0
- package/dist/serialization/tasks/pull.d.ts.map +1 -0
- package/dist/serialization/tasks/pull.js +82 -0
- package/dist/serialization/tasks/push.d.ts +3 -0
- package/dist/serialization/tasks/push.d.ts.map +1 -0
- package/dist/serialization/tasks/push.js +101 -0
- package/dist/serialization/tasks/roles.d.ts +6 -0
- package/dist/serialization/tasks/roles.d.ts.map +1 -0
- package/dist/serialization/tasks/roles.js +103 -0
- package/dist/serialization/tasks/shared.d.ts +19 -0
- package/dist/serialization/tasks/shared.d.ts.map +1 -0
- package/dist/serialization/tasks/shared.js +59 -0
- package/dist/serialization/tasks/types.d.ts +73 -0
- package/dist/serialization/tasks/types.d.ts.map +1 -0
- package/dist/serialization/tasks/types.js +8 -0
- package/dist/serialization/tasks/users.d.ts +5 -0
- package/dist/serialization/tasks/users.d.ts.map +1 -0
- package/dist/serialization/tasks/users.js +90 -0
- package/dist/serialization/tasks/validate.d.ts +5 -0
- package/dist/serialization/tasks/validate.d.ts.map +1 -0
- package/dist/serialization/tasks/validate.js +50 -0
- package/dist/serialization/tasks/watch.d.ts +3 -0
- package/dist/serialization/tasks/watch.d.ts.map +1 -0
- package/dist/serialization/tasks/watch.js +75 -0
- package/dist/serialization/tasks.d.ts +4 -0
- package/dist/serialization/tasks.d.ts.map +1 -0
- package/dist/serialization/tasks.js +19 -0
- package/dist/serialization/tree-spec.d.ts +51 -0
- package/dist/serialization/tree-spec.d.ts.map +1 -0
- package/dist/serialization/tree-spec.js +241 -0
- package/dist/serialization/types.d.ts +75 -0
- package/dist/serialization/types.d.ts.map +1 -0
- package/dist/serialization/types.js +2 -0
- package/dist/serialization/wildcard.d.ts +3 -0
- package/dist/serialization/wildcard.d.ts.map +1 -0
- package/dist/serialization/wildcard.js +24 -0
- package/dist/serialization/yaml.d.ts +9 -0
- package/dist/serialization/yaml.d.ts.map +1 -0
- package/dist/serialization/yaml.js +307 -0
- package/dist/shared/browser.d.ts +2 -0
- package/dist/shared/browser.d.ts.map +1 -0
- package/dist/shared/browser.js +36 -0
- package/dist/shared/cli-options.d.ts +17 -0
- package/dist/shared/cli-options.d.ts.map +1 -0
- package/dist/shared/cli-options.js +8 -0
- package/dist/shared/cli-tasks.d.ts +38 -0
- package/dist/shared/cli-tasks.d.ts.map +1 -0
- package/dist/shared/cli-tasks.js +108 -0
- package/dist/shared/config-template.d.ts +23 -0
- package/dist/shared/config-template.d.ts.map +1 -0
- package/dist/shared/config-template.js +38 -0
- package/dist/shared/env.d.ts +28 -0
- package/dist/shared/env.d.ts.map +1 -0
- package/dist/shared/env.js +38 -0
- package/dist/shared/errors.d.ts +21 -0
- package/dist/shared/errors.d.ts.map +1 -0
- package/dist/shared/errors.js +59 -0
- package/dist/shared/graphql.d.ts +76 -0
- package/dist/shared/graphql.d.ts.map +1 -0
- package/dist/shared/graphql.js +222 -0
- package/dist/shared/history.d.ts +12 -0
- package/dist/shared/history.d.ts.map +1 -0
- package/dist/shared/history.js +62 -0
- package/dist/shared/keychain.d.ts +15 -0
- package/dist/shared/keychain.d.ts.map +1 -0
- package/dist/shared/keychain.js +177 -0
- package/dist/shared/logger.d.ts +24 -0
- package/dist/shared/logger.d.ts.map +1 -0
- package/dist/shared/logger.js +157 -0
- package/dist/shared/output.d.ts +7 -0
- package/dist/shared/output.d.ts.map +1 -0
- package/dist/shared/output.js +21 -0
- package/dist/shared/prompt.d.ts +5 -0
- package/dist/shared/prompt.d.ts.map +1 -0
- package/dist/shared/prompt.js +87 -0
- package/dist/shared/redact.d.ts +3 -0
- package/dist/shared/redact.d.ts.map +1 -0
- package/dist/shared/redact.js +47 -0
- package/dist/shared/spinner.d.ts +5 -0
- package/dist/shared/spinner.d.ts.map +1 -0
- package/dist/shared/spinner.js +89 -0
- package/dist/shared/style.d.ts +2 -0
- package/dist/shared/style.d.ts.map +1 -0
- package/dist/shared/style.js +61 -0
- package/dist/shared/telemetry.d.ts +21 -0
- package/dist/shared/telemetry.d.ts.map +1 -0
- package/dist/shared/telemetry.js +226 -0
- package/dist/shared/validate.d.ts +3 -0
- package/dist/shared/validate.d.ts.map +1 -0
- package/dist/shared/validate.js +32 -0
- package/dist/sites/api/collections.d.ts +25 -0
- package/dist/sites/api/collections.d.ts.map +1 -0
- package/dist/sites/api/collections.js +21 -0
- package/dist/sites/api/index.d.ts +26 -0
- package/dist/sites/api/index.d.ts.map +1 -0
- package/dist/sites/api/index.js +55 -0
- package/dist/sites/api/jobs.d.ts +31 -0
- package/dist/sites/api/jobs.d.ts.map +1 -0
- package/dist/sites/api/jobs.js +10 -0
- package/dist/sites/api/languages.d.ts +22 -0
- package/dist/sites/api/languages.d.ts.map +1 -0
- package/dist/sites/api/languages.js +18 -0
- package/dist/sites/api/request.d.ts +24 -0
- package/dist/sites/api/request.d.ts.map +1 -0
- package/dist/sites/api/request.js +99 -0
- package/dist/sites/api/sites.d.ts +53 -0
- package/dist/sites/api/sites.d.ts.map +1 -0
- package/dist/sites/api/sites.js +41 -0
- package/dist/sites/api/types.d.ts +29 -0
- package/dist/sites/api/types.d.ts.map +1 -0
- package/dist/sites/api/types.js +4 -0
- package/package.json +109 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runStatus = void 0;
|
|
4
|
+
const config_1 = require("../../../config");
|
|
5
|
+
const keychain_1 = require("../../../shared/keychain");
|
|
6
|
+
const shared_1 = require("../shared");
|
|
7
|
+
const runStatus = async (options) => {
|
|
8
|
+
const logger = (0, shared_1.toLogger)(options);
|
|
9
|
+
const configPath = options.config ?? process.cwd();
|
|
10
|
+
const rootConfigFile = (0, config_1.readRootConfigurationFile)(configPath);
|
|
11
|
+
const defaultName = rootConfigFile.config.defaultEnvProfile;
|
|
12
|
+
const root = (0, config_1.readRootConfiguration)(configPath, defaultName);
|
|
13
|
+
const envProfiles = rootConfigFile.config.envProfiles ?? {};
|
|
14
|
+
const reservedName = "default";
|
|
15
|
+
const names = Object.keys(envProfiles)
|
|
16
|
+
.filter((name) => name !== reservedName)
|
|
17
|
+
.sort((a, b) => a.localeCompare(b));
|
|
18
|
+
if (logger.isJson()) {
|
|
19
|
+
const results = [];
|
|
20
|
+
for (const name of names) {
|
|
21
|
+
const env = root.environments[name] ?? envProfiles[name];
|
|
22
|
+
const cachedCmTokens = env.cacheAuthenticationToken === false ? undefined : await (0, keychain_1.getCmTokens)(name);
|
|
23
|
+
const deployToken = (await (0, keychain_1.getDeployToken)(name)) ?? env.deployToken;
|
|
24
|
+
results.push({
|
|
25
|
+
name,
|
|
26
|
+
isDefault: name === defaultName,
|
|
27
|
+
host: env.host ?? null,
|
|
28
|
+
authority: env.authority ?? null,
|
|
29
|
+
ref: env.ref ?? null,
|
|
30
|
+
environmentType: env.environmentType ?? null,
|
|
31
|
+
ids: {
|
|
32
|
+
organizationId: env.organizationId ?? null,
|
|
33
|
+
tenantId: env.tenantId ?? null,
|
|
34
|
+
projectId: env.projectId ?? null,
|
|
35
|
+
environmentId: env.environmentId ?? null,
|
|
36
|
+
},
|
|
37
|
+
editingHostEnvironmentIds: env.editingHostEnvironmentIds ?? [],
|
|
38
|
+
cmAuth: env.useClientCredentials
|
|
39
|
+
? env.clientId && env.clientSecret
|
|
40
|
+
? "client-credentials"
|
|
41
|
+
: "client-credentials (incomplete)"
|
|
42
|
+
: cachedCmTokens?.accessToken || cachedCmTokens?.refreshToken
|
|
43
|
+
? "keychain"
|
|
44
|
+
: env.accessToken || env.refreshToken
|
|
45
|
+
? "cached"
|
|
46
|
+
: env.cacheAuthenticationToken === false
|
|
47
|
+
? "disabled"
|
|
48
|
+
: "missing",
|
|
49
|
+
deployToken: Boolean(deployToken),
|
|
50
|
+
allowWrite: Boolean(env.allowWrite),
|
|
51
|
+
deployTokenExpiresIn: env.deployTokenExpiresIn ?? null,
|
|
52
|
+
deployTokenLastUpdated: env.deployTokenLastUpdated ?? null,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
logger.json({
|
|
56
|
+
defaultEnvProfile: defaultName ?? null,
|
|
57
|
+
envProfiles: results,
|
|
58
|
+
});
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
logger.info(`Default environment: ${defaultName ?? "(not set)"}`, "cyan");
|
|
62
|
+
if (defaultName === reservedName) {
|
|
63
|
+
logger.warn("The environment name 'default' is reserved. Choose a different name and set it as default.");
|
|
64
|
+
}
|
|
65
|
+
else if (defaultName && !envProfiles[defaultName]) {
|
|
66
|
+
logger.warn(`Default environment '${defaultName}' was not found in env profiles. Run init to add it.`);
|
|
67
|
+
}
|
|
68
|
+
if (envProfiles[reservedName]) {
|
|
69
|
+
logger.warn("Found a reserved 'default' environment entry. It will be ignored by status.");
|
|
70
|
+
}
|
|
71
|
+
if (names.length === 0) {
|
|
72
|
+
logger.warn("No environments are configured. Use the init command to add one.");
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
for (const name of names) {
|
|
76
|
+
const env = root.environments[name] ?? envProfiles[name];
|
|
77
|
+
const cachedCmTokens = env.cacheAuthenticationToken === false ? undefined : await (0, keychain_1.getCmTokens)(name);
|
|
78
|
+
const hasCachedCmTokens = Boolean(cachedCmTokens?.accessToken || cachedCmTokens?.refreshToken);
|
|
79
|
+
const deployToken = (await (0, keychain_1.getDeployToken)(name)) ?? env.deployToken;
|
|
80
|
+
const hasConfig = Boolean(env.host ||
|
|
81
|
+
env.authority ||
|
|
82
|
+
env.ref ||
|
|
83
|
+
env.organizationId ||
|
|
84
|
+
env.tenantId ||
|
|
85
|
+
env.projectId ||
|
|
86
|
+
env.environmentId ||
|
|
87
|
+
env.deployToken ||
|
|
88
|
+
env.clientId ||
|
|
89
|
+
env.clientSecret ||
|
|
90
|
+
env.audience ||
|
|
91
|
+
env.useClientCredentials !== undefined ||
|
|
92
|
+
env.allowWrite !== undefined ||
|
|
93
|
+
(env.variables && Object.keys(env.variables).length > 0));
|
|
94
|
+
const cmAuth = env.useClientCredentials
|
|
95
|
+
? env.clientId && env.clientSecret
|
|
96
|
+
? "client-credentials"
|
|
97
|
+
: "client-credentials (incomplete)"
|
|
98
|
+
: hasCachedCmTokens
|
|
99
|
+
? "keychain"
|
|
100
|
+
: env.accessToken || env.refreshToken
|
|
101
|
+
? "cached"
|
|
102
|
+
: env.cacheAuthenticationToken === false
|
|
103
|
+
? "disabled"
|
|
104
|
+
: "missing";
|
|
105
|
+
const hasDeployToken = Boolean(deployToken);
|
|
106
|
+
const label = name === defaultName ? `${name} (default)` : name;
|
|
107
|
+
if (!hasConfig) {
|
|
108
|
+
logger.warn(`\n${label}`, "yellow");
|
|
109
|
+
logger.info(" status: empty (not configured)");
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
logger.info(`\n${label}`, "green");
|
|
113
|
+
logger.info(` host: ${env.host ?? "(not set)"}`);
|
|
114
|
+
logger.info(` authority: ${env.authority ?? "(not set)"}`);
|
|
115
|
+
if (env.ref) {
|
|
116
|
+
logger.info(` ref: ${env.ref}`);
|
|
117
|
+
}
|
|
118
|
+
if (env.environmentType) {
|
|
119
|
+
logger.info(` environmentType: ${env.environmentType}`);
|
|
120
|
+
}
|
|
121
|
+
if (env.organizationId || env.tenantId || env.projectId || env.environmentId) {
|
|
122
|
+
logger.info(" ids:");
|
|
123
|
+
logger.info(` organizationId: ${env.organizationId ?? "-"}`);
|
|
124
|
+
logger.info(` tenantId: ${env.tenantId ?? "-"}`);
|
|
125
|
+
logger.info(` projectId: ${env.projectId ?? "-"}`);
|
|
126
|
+
logger.info(` environmentId: ${env.environmentId ?? "-"}`);
|
|
127
|
+
}
|
|
128
|
+
if (env.editingHostEnvironmentIds && env.editingHostEnvironmentIds.length > 0) {
|
|
129
|
+
logger.info(" editingHostEnvironmentIds:");
|
|
130
|
+
for (const id of env.editingHostEnvironmentIds) {
|
|
131
|
+
logger.info(` ${id}`);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
logger.info(` cmAuth: ${cmAuth}`);
|
|
135
|
+
logger.info(` deployToken: ${hasDeployToken ? "set" : "missing"}`);
|
|
136
|
+
if (env.deployTokenExpiresIn && env.deployTokenLastUpdated) {
|
|
137
|
+
const last = Date.parse(env.deployTokenLastUpdated);
|
|
138
|
+
if (!Number.isNaN(last)) {
|
|
139
|
+
const expiresAt = last + env.deployTokenExpiresIn * 1000;
|
|
140
|
+
const msRemaining = expiresAt - Date.now();
|
|
141
|
+
if (msRemaining <= 10 * 60 * 1000) {
|
|
142
|
+
logger.warn(" deployToken: expiring soon", "yellow");
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
logger.info(` allowWrite: ${env.allowWrite ? "true" : "false"}`);
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
exports.runStatus = runStatus;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../src/serialization/tasks/env.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./env/index"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { readRootConfiguration } from "../../../config";
|
|
2
|
+
import { FilesystemTreeSpec } from "../../tree-spec";
|
|
3
|
+
import { ItemData, ItemMetadata } from "../../types";
|
|
4
|
+
export declare const collectItemData: (environmentName: string, root: ReturnType<typeof readRootConfiguration>, subtrees: FilesystemTreeSpec[], useDebugSignatures: boolean) => Promise<{
|
|
5
|
+
items: ItemData[];
|
|
6
|
+
metadata: ItemMetadata[];
|
|
7
|
+
}>;
|
|
8
|
+
//# sourceMappingURL=collect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collect.d.ts","sourceRoot":"","sources":["../../../../src/serialization/tasks/helpers/collect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAKrD,eAAO,MAAM,eAAe,GAC1B,iBAAiB,MAAM,EACvB,MAAM,UAAU,CAAC,OAAO,qBAAqB,CAAC,EAC9C,UAAU,kBAAkB,EAAE,EAC9B,oBAAoB,OAAO,KAC1B,OAAO,CAAC;IAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;IAAC,QAAQ,EAAE,YAAY,EAAE,CAAA;CAAE,CAuCzD,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.collectItemData = void 0;
|
|
4
|
+
const field_filter_1 = require("../../field-filter");
|
|
5
|
+
const sitecore_api_1 = require("../../sitecore-api");
|
|
6
|
+
const shared_1 = require("../shared");
|
|
7
|
+
const errors_1 = require("../../../shared/errors");
|
|
8
|
+
const collectItemData = async (environmentName, root, subtrees, useDebugSignatures) => {
|
|
9
|
+
const env = root.environments[environmentName];
|
|
10
|
+
if (!env) {
|
|
11
|
+
throw (0, errors_1.createCliError)(`Environment ${environmentName} was not defined.`, "ENV_NOT_FOUND");
|
|
12
|
+
}
|
|
13
|
+
const apiTimeoutMs = (0, shared_1.resolveApiTimeoutMs)(root);
|
|
14
|
+
const items = [];
|
|
15
|
+
const metadata = [];
|
|
16
|
+
for (const subtree of subtrees) {
|
|
17
|
+
const filter = (0, field_filter_1.createFieldFilterSet)(root.serialization.excludedFields, []);
|
|
18
|
+
const subtreeMetadata = await (0, sitecore_api_1.fetchItemMetadata)(env, subtree.database, subtree.path.toPathString(), subtree.scope, filter, useDebugSignatures, { timeoutMs: apiTimeoutMs });
|
|
19
|
+
const filtered = subtreeMetadata.filter((item) => subtree.includesPath(item.path));
|
|
20
|
+
metadata.push(...filtered);
|
|
21
|
+
}
|
|
22
|
+
for (const meta of metadata) {
|
|
23
|
+
const filter = (0, field_filter_1.createFieldFilterSet)(root.serialization.excludedFields, []);
|
|
24
|
+
const itemData = await (0, sitecore_api_1.fetchItemData)(env, meta.database ?? "master", meta.id, "SingleItem", filter, { timeoutMs: apiTimeoutMs });
|
|
25
|
+
items.push(...itemData);
|
|
26
|
+
}
|
|
27
|
+
return { items, metadata };
|
|
28
|
+
};
|
|
29
|
+
exports.collectItemData = collectItemData;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FilesystemTreeSpec } from "../../tree-spec";
|
|
2
|
+
import { ItemMetadata } from "../../types";
|
|
3
|
+
import { ItemCommand } from "../../commands";
|
|
4
|
+
export declare const buildCommandsForDatabase: (subtrees: FilesystemTreeSpec[], sourceMetadata: ItemMetadata[], destinationMetadata: ItemMetadata[], applyAllowedPushOperations: boolean) => ItemCommand[];
|
|
5
|
+
//# sourceMappingURL=commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../src/serialization/tasks/helpers/commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAA2B,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEtE,eAAO,MAAM,wBAAwB,GACnC,UAAU,kBAAkB,EAAE,EAC9B,gBAAgB,YAAY,EAAE,EAC9B,qBAAqB,YAAY,EAAE,EACnC,4BAA4B,OAAO,KAClC,WAAW,EAUb,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildCommandsForDatabase = void 0;
|
|
4
|
+
const commands_1 = require("../../commands");
|
|
5
|
+
const buildCommandsForDatabase = (subtrees, sourceMetadata, destinationMetadata, applyAllowedPushOperations) => {
|
|
6
|
+
const commands = [];
|
|
7
|
+
for (const subtree of subtrees) {
|
|
8
|
+
const source = sourceMetadata.filter((item) => subtree.includesPath(item.path));
|
|
9
|
+
const destination = destinationMetadata.filter((item) => subtree.includesPath(item.path));
|
|
10
|
+
commands.push(...(0, commands_1.buildCommandsForSubtree)(subtree, source, destination, applyAllowedPushOperations));
|
|
11
|
+
}
|
|
12
|
+
return commands;
|
|
13
|
+
};
|
|
14
|
+
exports.buildCommandsForDatabase = buildCommandsForDatabase;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FilesystemPathProvider } from "../../path-provider";
|
|
2
|
+
import { ItemData } from "../../types";
|
|
3
|
+
import { Logger } from "../../../shared/logger";
|
|
4
|
+
import { ItemCommand } from "../../commands";
|
|
5
|
+
export declare const applyFilesystemCommands: (commands: ItemCommand[], pathProvider: FilesystemPathProvider, sourceData: Map<string, ItemData>, logger: Logger) => Promise<string[]>;
|
|
6
|
+
//# sourceMappingURL=filesystem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filesystem.d.ts","sourceRoot":"","sources":["../../../../src/serialization/tasks/helpers/filesystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,eAAO,MAAM,uBAAuB,GAClC,UAAU,WAAW,EAAE,EACvB,cAAc,sBAAsB,EACpC,YAAY,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,EACjC,QAAQ,MAAM,KACb,OAAO,CAAC,MAAM,EAAE,CA0BlB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.applyFilesystemCommands = void 0;
|
|
4
|
+
const filesystem_store_1 = require("../../filesystem-store");
|
|
5
|
+
const applyFilesystemCommands = async (commands, pathProvider, sourceData, logger) => {
|
|
6
|
+
const processedIds = [];
|
|
7
|
+
for (const command of commands) {
|
|
8
|
+
if (command.type === "recycle") {
|
|
9
|
+
await (0, filesystem_store_1.removeItemFromFilesystem)(pathProvider, command.source);
|
|
10
|
+
logger.info(command.source.path.toPathString(), "yellow");
|
|
11
|
+
continue;
|
|
12
|
+
}
|
|
13
|
+
const itemData = command.sourceData ?? sourceData.get(command.source.id);
|
|
14
|
+
if (!itemData) {
|
|
15
|
+
continue;
|
|
16
|
+
}
|
|
17
|
+
if (command.type === "move" || command.type === "rename") {
|
|
18
|
+
if (command.destination) {
|
|
19
|
+
await (0, filesystem_store_1.removeItemFromFilesystem)(pathProvider, command.destination);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
await (0, filesystem_store_1.writeItemToFilesystem)(pathProvider, itemData);
|
|
23
|
+
processedIds.push(itemData.id);
|
|
24
|
+
}
|
|
25
|
+
return processedIds;
|
|
26
|
+
};
|
|
27
|
+
exports.applyFilesystemCommands = applyFilesystemCommands;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { collectItemData } from "./collect";
|
|
2
|
+
export { buildCommandsForDatabase } from "./commands";
|
|
3
|
+
export { applyFilesystemCommands } from "./filesystem";
|
|
4
|
+
export { applySitecoreCommands } from "./sitecore";
|
|
5
|
+
export { buildItemDataMap } from "./items";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/serialization/tasks/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildItemDataMap = exports.applySitecoreCommands = exports.applyFilesystemCommands = exports.buildCommandsForDatabase = exports.collectItemData = void 0;
|
|
4
|
+
var collect_1 = require("./collect");
|
|
5
|
+
Object.defineProperty(exports, "collectItemData", { enumerable: true, get: function () { return collect_1.collectItemData; } });
|
|
6
|
+
var commands_1 = require("./commands");
|
|
7
|
+
Object.defineProperty(exports, "buildCommandsForDatabase", { enumerable: true, get: function () { return commands_1.buildCommandsForDatabase; } });
|
|
8
|
+
var filesystem_1 = require("./filesystem");
|
|
9
|
+
Object.defineProperty(exports, "applyFilesystemCommands", { enumerable: true, get: function () { return filesystem_1.applyFilesystemCommands; } });
|
|
10
|
+
var sitecore_1 = require("./sitecore");
|
|
11
|
+
Object.defineProperty(exports, "applySitecoreCommands", { enumerable: true, get: function () { return sitecore_1.applySitecoreCommands; } });
|
|
12
|
+
var items_1 = require("./items");
|
|
13
|
+
Object.defineProperty(exports, "buildItemDataMap", { enumerable: true, get: function () { return items_1.buildItemDataMap; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"items.d.ts","sourceRoot":"","sources":["../../../../src/serialization/tasks/helpers/items.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,eAAO,MAAM,gBAAgB,GAAI,OAAO,QAAQ,EAAE,KAAG,GAAG,CAAC,MAAM,EAAE,QAAQ,CAC1B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { readRootConfiguration } from "../../../config";
|
|
2
|
+
import { Logger } from "../../../shared/logger";
|
|
3
|
+
import { ItemCommand } from "../../commands";
|
|
4
|
+
export declare const applySitecoreCommands: (root: ReturnType<typeof readRootConfiguration>, environmentName: string, database: string, commands: ItemCommand[], logger: Logger, whatIf?: boolean) => Promise<string[]>;
|
|
5
|
+
//# sourceMappingURL=sitecore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sitecore.d.ts","sourceRoot":"","sources":["../../../../src/serialization/tasks/helpers/sitecore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAGjD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,eAAO,MAAM,qBAAqB,GAChC,MAAM,UAAU,CAAC,OAAO,qBAAqB,CAAC,EAC9C,iBAAiB,MAAM,EACvB,UAAU,MAAM,EAChB,UAAU,WAAW,EAAE,EACvB,QAAQ,MAAM,EACd,SAAS,OAAO,KACf,OAAO,CAAC,MAAM,EAAE,CA8GlB,CAAC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.applySitecoreCommands = void 0;
|
|
4
|
+
const sitecore_api_1 = require("../../sitecore-api");
|
|
5
|
+
const shared_1 = require("../shared");
|
|
6
|
+
const applySitecoreCommands = async (root, environmentName, database, commands, logger, whatIf) => {
|
|
7
|
+
if (whatIf || commands.length === 0) {
|
|
8
|
+
return [];
|
|
9
|
+
}
|
|
10
|
+
const toApiItemData = (item) => ({
|
|
11
|
+
id: item.id,
|
|
12
|
+
parentId: item.parentId,
|
|
13
|
+
templateId: item.templateId,
|
|
14
|
+
database,
|
|
15
|
+
path: item.path.toPathString(),
|
|
16
|
+
name: item.name,
|
|
17
|
+
branchId: item.branchId ?? undefined,
|
|
18
|
+
sharedFields: item.sharedFields.map((field) => ({
|
|
19
|
+
fieldId: field.fieldId,
|
|
20
|
+
nameHint: field.nameHint,
|
|
21
|
+
value: field.value ?? "",
|
|
22
|
+
blobId: field.blobId ?? undefined,
|
|
23
|
+
})),
|
|
24
|
+
unversionedFields: item.unversionedFields.map((language) => ({
|
|
25
|
+
language: language.language,
|
|
26
|
+
fields: language.fields.map((field) => ({
|
|
27
|
+
fieldId: field.fieldId,
|
|
28
|
+
nameHint: field.nameHint,
|
|
29
|
+
value: field.value ?? "",
|
|
30
|
+
blobId: field.blobId ?? undefined,
|
|
31
|
+
})),
|
|
32
|
+
})),
|
|
33
|
+
versions: item.versions.map((version) => ({
|
|
34
|
+
language: version.language,
|
|
35
|
+
version: version.version,
|
|
36
|
+
fields: version.fields.map((field) => ({
|
|
37
|
+
fieldId: field.fieldId,
|
|
38
|
+
nameHint: field.nameHint,
|
|
39
|
+
value: field.value ?? "",
|
|
40
|
+
blobId: field.blobId ?? undefined,
|
|
41
|
+
})),
|
|
42
|
+
})),
|
|
43
|
+
});
|
|
44
|
+
const commandsByType = commands
|
|
45
|
+
.map((command) => {
|
|
46
|
+
const parentId = command.destination?.parentId ?? command.source.parentId;
|
|
47
|
+
switch (command.type) {
|
|
48
|
+
case "create":
|
|
49
|
+
return {
|
|
50
|
+
itemID: command.source.id,
|
|
51
|
+
parentID: parentId,
|
|
52
|
+
database,
|
|
53
|
+
command: "CREATE",
|
|
54
|
+
data: toApiItemData(command.sourceData ?? command.source),
|
|
55
|
+
};
|
|
56
|
+
case "update":
|
|
57
|
+
return {
|
|
58
|
+
itemID: command.source.id,
|
|
59
|
+
parentID: parentId,
|
|
60
|
+
database,
|
|
61
|
+
command: "UPDATE",
|
|
62
|
+
data: toApiItemData(command.sourceData ?? command.source),
|
|
63
|
+
};
|
|
64
|
+
case "move":
|
|
65
|
+
return {
|
|
66
|
+
itemID: command.source.id,
|
|
67
|
+
parentID: parentId,
|
|
68
|
+
database,
|
|
69
|
+
command: "MOVE",
|
|
70
|
+
data: command.source.parentId,
|
|
71
|
+
};
|
|
72
|
+
case "rename":
|
|
73
|
+
return {
|
|
74
|
+
itemID: command.source.id,
|
|
75
|
+
parentID: parentId,
|
|
76
|
+
database,
|
|
77
|
+
command: "RENAME",
|
|
78
|
+
data: command.source.path.itemName,
|
|
79
|
+
};
|
|
80
|
+
case "recycle":
|
|
81
|
+
return {
|
|
82
|
+
itemID: command.source.id,
|
|
83
|
+
parentID: parentId,
|
|
84
|
+
database,
|
|
85
|
+
command: "RECYCLE",
|
|
86
|
+
data: null,
|
|
87
|
+
};
|
|
88
|
+
default:
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
})
|
|
92
|
+
.filter(Boolean);
|
|
93
|
+
const env = root.environments[environmentName];
|
|
94
|
+
const apiTimeoutMs = (0, shared_1.resolveApiTimeoutMs)(root);
|
|
95
|
+
const results = await (0, sitecore_api_1.executeSerializationCommands)(env, commandsByType, "Information", {
|
|
96
|
+
timeoutMs: apiTimeoutMs,
|
|
97
|
+
});
|
|
98
|
+
for (const result of results) {
|
|
99
|
+
if (result?.messages) {
|
|
100
|
+
for (const message of result.messages) {
|
|
101
|
+
logger.info(message.message);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return commands
|
|
106
|
+
.filter((command) => command.type !== "recycle")
|
|
107
|
+
.map((command) => command.source.id);
|
|
108
|
+
};
|
|
109
|
+
exports.applySitecoreCommands = applySitecoreCommands;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/serialization/tasks/helpers.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./helpers/index"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { runInfo, runExplain } from "./info";
|
|
2
|
+
export { runPull } from "./pull";
|
|
3
|
+
export { runPush } from "./push";
|
|
4
|
+
export { runDiff } from "./diff";
|
|
5
|
+
export { runValidate } from "./validate";
|
|
6
|
+
export { runWatch } from "./watch";
|
|
7
|
+
export { runPackageCreate, runPackageInstall } from "./package";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/serialization/tasks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runPackageInstall = exports.runPackageCreate = exports.runWatch = exports.runValidate = exports.runDiff = exports.runPush = exports.runPull = exports.runExplain = exports.runInfo = void 0;
|
|
4
|
+
var info_1 = require("./info");
|
|
5
|
+
Object.defineProperty(exports, "runInfo", { enumerable: true, get: function () { return info_1.runInfo; } });
|
|
6
|
+
Object.defineProperty(exports, "runExplain", { enumerable: true, get: function () { return info_1.runExplain; } });
|
|
7
|
+
var pull_1 = require("./pull");
|
|
8
|
+
Object.defineProperty(exports, "runPull", { enumerable: true, get: function () { return pull_1.runPull; } });
|
|
9
|
+
var push_1 = require("./push");
|
|
10
|
+
Object.defineProperty(exports, "runPush", { enumerable: true, get: function () { return push_1.runPush; } });
|
|
11
|
+
var diff_1 = require("./diff");
|
|
12
|
+
Object.defineProperty(exports, "runDiff", { enumerable: true, get: function () { return diff_1.runDiff; } });
|
|
13
|
+
var validate_1 = require("./validate");
|
|
14
|
+
Object.defineProperty(exports, "runValidate", { enumerable: true, get: function () { return validate_1.runValidate; } });
|
|
15
|
+
var watch_1 = require("./watch");
|
|
16
|
+
Object.defineProperty(exports, "runWatch", { enumerable: true, get: function () { return watch_1.runWatch; } });
|
|
17
|
+
var package_1 = require("./package");
|
|
18
|
+
Object.defineProperty(exports, "runPackageCreate", { enumerable: true, get: function () { return package_1.runPackageCreate; } });
|
|
19
|
+
Object.defineProperty(exports, "runPackageInstall", { enumerable: true, get: function () { return package_1.runPackageInstall; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../src/serialization/tasks/info.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE7D,eAAO,MAAM,OAAO,GAAU,SAAS,aAAa,KAAG,OAAO,CAAC,IAAI,CAsDlE,CAAC;AAEF,eAAO,MAAM,UAAU,GAAU,SAAS,cAAc,KAAG,OAAO,CAAC,IAAI,CAmCtE,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runExplain = exports.runInfo = void 0;
|
|
4
|
+
const item_path_1 = require("../item-path");
|
|
5
|
+
const path_provider_1 = require("../path-provider");
|
|
6
|
+
const shared_1 = require("./shared");
|
|
7
|
+
const runInfo = async (options) => {
|
|
8
|
+
const logger = (0, shared_1.toLogger)(options);
|
|
9
|
+
const { root, modules } = await (0, shared_1.loadConfigAndModules)(options);
|
|
10
|
+
if (logger.isJson()) {
|
|
11
|
+
logger.json({
|
|
12
|
+
excludedFields: root.serialization.excludedFields,
|
|
13
|
+
modules,
|
|
14
|
+
});
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
if (root.serialization.excludedFields.length > 0) {
|
|
18
|
+
logger.info("Excluded Fields From Default Serialization Config:", "cyan");
|
|
19
|
+
for (const field of root.serialization.excludedFields) {
|
|
20
|
+
logger.verbose(` ${field.fieldId} ${field.description ?? ""}`.trim(), "yellow");
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
if (modules.length === 0) {
|
|
24
|
+
logger.warn("No modules were resolved with file globs.");
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
for (const module of modules) {
|
|
28
|
+
if (!module.items.includes.length && !module.roles.length && !module.users.length) {
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
logger.info("");
|
|
32
|
+
logger.info(module.namespace, "green");
|
|
33
|
+
if (module.description) {
|
|
34
|
+
logger.info(module.description);
|
|
35
|
+
}
|
|
36
|
+
logger.verbose(` File: ${module.sourceIdentifier}`, "gray");
|
|
37
|
+
if (module.references.length > 0) {
|
|
38
|
+
logger.verbose(` Depends on: ${module.references.join(", ")}`, "gray");
|
|
39
|
+
}
|
|
40
|
+
logger.info(" Subtrees:", "gray");
|
|
41
|
+
for (const subtree of module.items.includes) {
|
|
42
|
+
logger.info(` ${subtree.name}: ${subtree.database}:${subtree.path.toPathString()}`, "cyan");
|
|
43
|
+
logger.verbose(` Scope: ${subtree.scope}`, "gray");
|
|
44
|
+
logger.verbose(` Push operations: ${subtree.allowedPushOperations}`, "gray");
|
|
45
|
+
logger.verbose(` Path: ${subtree.physicalPath}`, "gray");
|
|
46
|
+
}
|
|
47
|
+
if (module.roles.length > 0) {
|
|
48
|
+
logger.info(` Roles: ${module.roles.length}`, "gray");
|
|
49
|
+
}
|
|
50
|
+
if (module.users.length > 0) {
|
|
51
|
+
logger.info(` Users: ${module.users.length}`, "gray");
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
exports.runInfo = runInfo;
|
|
56
|
+
const runExplain = async (options) => {
|
|
57
|
+
const logger = (0, shared_1.toLogger)(options);
|
|
58
|
+
const { modules } = await (0, shared_1.loadConfigAndModules)(options);
|
|
59
|
+
const database = options.database ?? "master";
|
|
60
|
+
const itemPath = item_path_1.ItemPath.fromPathString(options.path);
|
|
61
|
+
const includeSpecs = modules
|
|
62
|
+
.flatMap((module) => module.items.includes)
|
|
63
|
+
.filter((spec) => spec.database.toLowerCase() === database.toLowerCase());
|
|
64
|
+
const pathProvider = new path_provider_1.FilesystemPathProvider(includeSpecs);
|
|
65
|
+
for (const module of modules) {
|
|
66
|
+
for (const include of module.items.includes) {
|
|
67
|
+
if (include.database.toLowerCase() !== database.toLowerCase()) {
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
if (include.includesPath(itemPath)) {
|
|
71
|
+
logger.info(`Path ${itemPath.toPathString()} of ${database} database is included!`, "green");
|
|
72
|
+
const physicalPath = pathProvider.getPhysicalPathForItemPath(itemPath, ".yml");
|
|
73
|
+
if (physicalPath) {
|
|
74
|
+
logger.info(`Physical path:\n${physicalPath}`);
|
|
75
|
+
}
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
logger.info(`Path ${itemPath.toPathString()} of ${database} database is not included in any module configuration.`, "red");
|
|
81
|
+
};
|
|
82
|
+
exports.runExplain = runExplain;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { PackageCreateOptions, PackageInstallOptions } from "./types";
|
|
2
|
+
export declare const runPackageCreate: (options: PackageCreateOptions) => Promise<void>;
|
|
3
|
+
export declare const runPackageInstall: (options: PackageInstallOptions) => Promise<void>;
|
|
4
|
+
//# sourceMappingURL=package.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../../src/serialization/tasks/package.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAkB3E,eAAO,MAAM,gBAAgB,GAAU,SAAS,oBAAoB,KAAG,OAAO,CAAC,IAAI,CAqElF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAU,SAAS,qBAAqB,KAAG,OAAO,CAAC,IAAI,CAgGpF,CAAC"}
|