@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,21 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
export declare const collectList: (value: string, previous?: string[]) => string[];
|
|
3
|
+
export declare const normalizeArgs: (argv: string[]) => string[];
|
|
4
|
+
export declare const addConfigOption: (command: Command) => Command;
|
|
5
|
+
export declare const addEnvironmentOption: (command: Command) => Command;
|
|
6
|
+
export declare const addVerbosityOptions: (command: Command) => Command;
|
|
7
|
+
export declare const addAllowWriteOption: (command: Command) => Command;
|
|
8
|
+
export declare const addIncludeExcludeOptions: (command: Command) => Command;
|
|
9
|
+
export declare const addWhatIfOption: (command: Command) => Command;
|
|
10
|
+
export declare const addSkipValidationOption: (command: Command) => Command;
|
|
11
|
+
export declare const addForceOption: (command: Command) => Command;
|
|
12
|
+
export declare const addUseDebugSignaturesOption: (command: Command) => Command;
|
|
13
|
+
export declare const addPublishOptions: (command: Command) => Command;
|
|
14
|
+
export declare const addSkipPullOption: (command: Command) => Command;
|
|
15
|
+
export declare const addAllowFileChangesOption: (command: Command) => Command;
|
|
16
|
+
export declare const addExplainOptions: (command: Command) => Command;
|
|
17
|
+
export declare const addDiffOptions: (command: Command) => Command;
|
|
18
|
+
export declare const addValidateOptions: (command: Command) => Command;
|
|
19
|
+
export declare const addPackageCreateOptions: (command: Command) => Command;
|
|
20
|
+
export declare const addPackageInstallOptions: (command: Command) => Command;
|
|
21
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/commands/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAQ5C,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,EAAE,WAAU,MAAM,EAAO,KAAG,MAAM,EACvC,CAAC;AAErC,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,EAAE,KAAG,MAAM,EAYjD,CAAC;AAEL,eAAO,MAAM,eAAe,GAAI,SAAS,OAAO,KAAG,OAMhD,CAAC;AAEJ,eAAO,MAAM,oBAAoB,GAAI,SAAS,OAAO,KAAG,OAMrD,CAAC;AAEJ,eAAO,MAAM,mBAAmB,GAAI,SAAS,OAAO,KAAG,OAOsC,CAAC;AAE9F,eAAO,MAAM,mBAAmB,GAAI,SAAS,OAAO,KAAG,OAIpD,CAAC;AAEJ,eAAO,MAAM,wBAAwB,GAAI,SAAS,OAAO,KAAG,OAavD,CAAC;AAEN,eAAO,MAAM,eAAe,GAAI,SAAS,OAAO,KAAG,OAC+C,CAAC;AAEnG,eAAO,MAAM,uBAAuB,GAAI,SAAS,OAAO,KAAG,OACwC,CAAC;AAEpG,eAAO,MAAM,cAAc,GAAI,SAAS,OAAO,KAAG,OACkC,CAAC;AAErF,eAAO,MAAM,2BAA2B,GAAI,SAAS,OAAO,KAAG,OAI5D,CAAC;AAEJ,eAAO,MAAM,iBAAiB,GAAI,SAAS,OAAO,KAAG,OAWhD,CAAC;AAEN,eAAO,MAAM,iBAAiB,GAAI,SAAS,OAAO,KAAG,OAC8C,CAAC;AAEpG,eAAO,MAAM,yBAAyB,GAAI,SAAS,OAAO,KAAG,OAI1D,CAAC;AAEJ,eAAO,MAAM,iBAAiB,GAAI,SAAS,OAAO,KAAG,OAG6C,CAAC;AAEnG,eAAO,MAAM,cAAc,GAAI,SAAS,OAAO,KAAG,OAUwC,CAAC;AAE3F,eAAO,MAAM,kBAAkB,GAAI,SAAS,OAAO,KAAG,OAInD,CAAC;AAEJ,eAAO,MAAM,uBAAuB,GAAI,SAAS,OAAO,KAAG,OAMQ,CAAC;AAEpE,eAAO,MAAM,wBAAwB,GAAI,SAAS,OAAO,KAAG,OAevD,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addPackageInstallOptions = exports.addPackageCreateOptions = exports.addValidateOptions = exports.addDiffOptions = exports.addExplainOptions = exports.addAllowFileChangesOption = exports.addSkipPullOption = exports.addPublishOptions = exports.addUseDebugSignaturesOption = exports.addForceOption = exports.addSkipValidationOption = exports.addWhatIfOption = exports.addIncludeExcludeOptions = exports.addAllowWriteOption = exports.addVerbosityOptions = exports.addEnvironmentOption = exports.addConfigOption = exports.normalizeArgs = exports.collectList = void 0;
|
|
4
|
+
const commander_1 = require("commander");
|
|
5
|
+
const splitComma = (value) => value
|
|
6
|
+
.split(",")
|
|
7
|
+
.map((entry) => entry.trim())
|
|
8
|
+
.filter((entry) => entry.length > 0);
|
|
9
|
+
const collectList = (value, previous = []) => previous.concat(splitComma(value));
|
|
10
|
+
exports.collectList = collectList;
|
|
11
|
+
const normalizeArgs = (argv) => argv.map((arg) => {
|
|
12
|
+
if (arg === "-fr") {
|
|
13
|
+
return "--force";
|
|
14
|
+
}
|
|
15
|
+
if (arg === "--env" || arg === "--env-name") {
|
|
16
|
+
return "--environment-name";
|
|
17
|
+
}
|
|
18
|
+
if (arg === "-q") {
|
|
19
|
+
return "--quiet";
|
|
20
|
+
}
|
|
21
|
+
return arg;
|
|
22
|
+
});
|
|
23
|
+
exports.normalizeArgs = normalizeArgs;
|
|
24
|
+
const addConfigOption = (command) => command.addOption(new commander_1.Option("-c, --config <path>", "Path to a sitecoreai.cli.json file, or a directory containing one (walks up if not in the dir itself).").default(process.cwd()));
|
|
25
|
+
exports.addConfigOption = addConfigOption;
|
|
26
|
+
const addEnvironmentOption = (command) => command.addOption(new commander_1.Option("-n, --environment-name <name>", "Config environment name from sitecoreai.cli.json (alias: --env-name)"));
|
|
27
|
+
exports.addEnvironmentOption = addEnvironmentOption;
|
|
28
|
+
const addVerbosityOptions = (command) => command
|
|
29
|
+
.addOption(new commander_1.Option("-v, --verbose", "Write some additional diagnostic and performance data"))
|
|
30
|
+
.addOption(new commander_1.Option("-t, --trace", "Write more additional diagnostic and performance data"))
|
|
31
|
+
.addOption(new commander_1.Option("-q, --quiet", "Suppress non-error output"))
|
|
32
|
+
.addOption(new commander_1.Option("--json", "Output machine-readable JSON"))
|
|
33
|
+
.addOption(new commander_1.Option("--log-file <path>", "Write logs to a file"))
|
|
34
|
+
.addOption(new commander_1.Option("--non-interactive", "Disable prompts and require explicit input"));
|
|
35
|
+
exports.addVerbosityOptions = addVerbosityOptions;
|
|
36
|
+
const addAllowWriteOption = (command) => command.option("--allow-write", "Allow write operations for this command without updating config");
|
|
37
|
+
exports.addAllowWriteOption = addAllowWriteOption;
|
|
38
|
+
const addIncludeExcludeOptions = (command) => command
|
|
39
|
+
.option("-i, --include <value>", "Module configurations to include. Wildcards and multiple values are allowed", exports.collectList, [])
|
|
40
|
+
.option("-e, --exclude <value>", "Module configurations to explicitly exclude. Wildcards and multiple values are allowed", exports.collectList, []);
|
|
41
|
+
exports.addIncludeExcludeOptions = addIncludeExcludeOptions;
|
|
42
|
+
const addWhatIfOption = (command) => command.option("-w, --what-if", "Lists commands that would be executed, without executing them");
|
|
43
|
+
exports.addWhatIfOption = addWhatIfOption;
|
|
44
|
+
const addSkipValidationOption = (command) => command.option("-s, --skip-validation", "Skips filesystem integrity validation prior to syncing");
|
|
45
|
+
exports.addSkipValidationOption = addSkipValidationOption;
|
|
46
|
+
const addForceOption = (command) => command.option("--force", "Perform force sync. In case you have invalid includes");
|
|
47
|
+
exports.addForceOption = addForceOption;
|
|
48
|
+
const addUseDebugSignaturesOption = (command) => command.option("--use-debug-signatures", "Use debug (un-hashed) item signatures to diagnose hash mismatches. Much slower");
|
|
49
|
+
exports.addUseDebugSignaturesOption = addUseDebugSignaturesOption;
|
|
50
|
+
const addPublishOptions = (command) => command
|
|
51
|
+
.option("-p, --publish", "Publish synced items. Not recommended to use with Publishing Service due to performance drop")
|
|
52
|
+
.option("--targets, --pt <value>", "Comma separated list of targets database to publish. Blank publishes to the default publishing target (first one in the list)", exports.collectList, []);
|
|
53
|
+
exports.addPublishOptions = addPublishOptions;
|
|
54
|
+
const addSkipPullOption = (command) => command.option("-s, --skip-pull", "Skips pulling data from Sitecore before starting the watcher");
|
|
55
|
+
exports.addSkipPullOption = addSkipPullOption;
|
|
56
|
+
const addAllowFileChangesOption = (command) => command.option("--allow-file-changes", "Don't stop watch if files change. May result in tree corruption if underlying state is changed; use only if some other program is touching serialized files that are not changing");
|
|
57
|
+
exports.addAllowFileChangesOption = addAllowFileChangesOption;
|
|
58
|
+
const addExplainOptions = (command) => command
|
|
59
|
+
.option("-p, --path <path>", "Item path to explain")
|
|
60
|
+
.option("-d, --database <database>", "Database of the item path to explain (default: master)");
|
|
61
|
+
exports.addExplainOptions = addExplainOptions;
|
|
62
|
+
const addDiffOptions = (command) => command
|
|
63
|
+
.option("-s, --source <name>", "Named Sitecore endpoint to use as a source for comparison")
|
|
64
|
+
.option("-d, --destination <name>", "Named Sitecore endpoint to use as a destination for comparison")
|
|
65
|
+
.option("-p, --path <path>", "Item path to compare (instead of include/exclude)")
|
|
66
|
+
.option("--source-database <database>", "Source database (when used with --path)")
|
|
67
|
+
.option("--destination-database <database>", "Destination database (when used with --path)")
|
|
68
|
+
.option("--push", "Applies the differences detected to the destination (diff + push)");
|
|
69
|
+
exports.addDiffOptions = addDiffOptions;
|
|
70
|
+
const addValidateOptions = (command) => command.option("-f, --fix", "Execute possible fix operations when validating the serialized items");
|
|
71
|
+
exports.addValidateOptions = addValidateOptions;
|
|
72
|
+
const addPackageCreateOptions = (command) => command
|
|
73
|
+
.option("-o, --output <path>", "Package path to output (will have extension added if not provided)")
|
|
74
|
+
.option("--overwrite", "Allow overwriting an existing package");
|
|
75
|
+
exports.addPackageCreateOptions = addPackageCreateOptions;
|
|
76
|
+
const addPackageInstallOptions = (command) => command
|
|
77
|
+
.option("-f, --package <path>", "Package path to install from")
|
|
78
|
+
.option("--authority, --auth <url>", "Identity authority for the environment, i.e. identity server or AAD tenant URL")
|
|
79
|
+
.option("--cm <url>", "Sitecore content management hostname to connect to")
|
|
80
|
+
.option("--client-id <id>", "The OAuth ClientID to send. Defaults to 'Device' for device auth, and 'SitecoreCLIServer' for client credentials")
|
|
81
|
+
.option("--client-secret <secret>", "The OAuth client secret to send. Only used for client credentials authentication");
|
|
82
|
+
exports.addPackageInstallOptions = addPackageInstallOptions;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
type ShellEnvSnapshot = Record<string, string | undefined>;
|
|
3
|
+
type RunCli = (argv: string[], options?: {
|
|
4
|
+
baseEnv?: ShellEnvSnapshot;
|
|
5
|
+
skipBanner?: boolean;
|
|
6
|
+
shellMode?: boolean;
|
|
7
|
+
}) => Promise<void>;
|
|
8
|
+
export declare const createShellCommand: (runCli: RunCli) => Command;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=shell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../../src/commands/shell.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,KAAK,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;AAE3D,KAAK,MAAM,GAAG,CACZ,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,KAChF,OAAO,CAAC,IAAI,CAAC,CAAC;AA0EnB,eAAO,MAAM,kBAAkB,GAAI,QAAQ,MAAM,KAAG,OA4EnD,CAAC"}
|
|
@@ -0,0 +1,155 @@
|
|
|
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.createShellCommand = void 0;
|
|
7
|
+
const node_readline_1 = __importDefault(require("node:readline"));
|
|
8
|
+
const commander_1 = require("commander");
|
|
9
|
+
const prompt_1 = require("../shared/prompt");
|
|
10
|
+
const shared_1 = require("./shared");
|
|
11
|
+
const parseShellArgs = (input) => {
|
|
12
|
+
const args = [];
|
|
13
|
+
let current = "";
|
|
14
|
+
let quote = null;
|
|
15
|
+
let escaped = false;
|
|
16
|
+
for (let i = 0; i < input.length; i += 1) {
|
|
17
|
+
const char = input[i];
|
|
18
|
+
if (escaped) {
|
|
19
|
+
current += char;
|
|
20
|
+
escaped = false;
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
if (char === "\\" && quote !== "'") {
|
|
24
|
+
escaped = true;
|
|
25
|
+
continue;
|
|
26
|
+
}
|
|
27
|
+
if (quote) {
|
|
28
|
+
if (char === quote) {
|
|
29
|
+
quote = null;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
current += char;
|
|
33
|
+
}
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
if (char === "'" || char === '"') {
|
|
37
|
+
quote = char;
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
if (/\s/.test(char)) {
|
|
41
|
+
if (current) {
|
|
42
|
+
args.push(current);
|
|
43
|
+
current = "";
|
|
44
|
+
}
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
current += char;
|
|
48
|
+
}
|
|
49
|
+
if (current) {
|
|
50
|
+
args.push(current);
|
|
51
|
+
}
|
|
52
|
+
return args;
|
|
53
|
+
};
|
|
54
|
+
const snapshotShellEnv = () => ({
|
|
55
|
+
SITECOREAI_NON_INTERACTIVE: process.env.SITECOREAI_NON_INTERACTIVE,
|
|
56
|
+
SITECOREAI_JSON: process.env.SITECOREAI_JSON,
|
|
57
|
+
SITECOREAI_QUIET: process.env.SITECOREAI_QUIET,
|
|
58
|
+
SITECOREAI_TRACE_HTTP: process.env.SITECOREAI_TRACE_HTTP,
|
|
59
|
+
});
|
|
60
|
+
const restoreShellEnv = (snapshot) => {
|
|
61
|
+
for (const [key, value] of Object.entries(snapshot)) {
|
|
62
|
+
if (value === undefined) {
|
|
63
|
+
delete process.env[key];
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
process.env[key] = value;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
const shellHelp = () => {
|
|
71
|
+
console.log("Interactive shell commands:");
|
|
72
|
+
console.log(" exit | quit Exit the shell");
|
|
73
|
+
console.log(" help | ? Show this help");
|
|
74
|
+
console.log(" <command> Run any scai command");
|
|
75
|
+
console.log("");
|
|
76
|
+
console.log("Examples:");
|
|
77
|
+
console.log(" status");
|
|
78
|
+
console.log(" init --environment-name demo --cm https://cm.example");
|
|
79
|
+
console.log(" deploy projects list");
|
|
80
|
+
};
|
|
81
|
+
const createShellCommand = (runCli) => {
|
|
82
|
+
const command = new commander_1.Command("shell")
|
|
83
|
+
.description("Start an interactive shell")
|
|
84
|
+
.action(async () => {
|
|
85
|
+
(0, prompt_1.assertInteractive)("Shell mode requires a TTY.", "Run without --non-interactive.");
|
|
86
|
+
const envSnapshot = snapshotShellEnv();
|
|
87
|
+
const rl = node_readline_1.default.createInterface({
|
|
88
|
+
input: process.stdin,
|
|
89
|
+
output: process.stdout,
|
|
90
|
+
prompt: "scai> ",
|
|
91
|
+
});
|
|
92
|
+
const closeShell = () => {
|
|
93
|
+
rl.close();
|
|
94
|
+
};
|
|
95
|
+
rl.on("SIGINT", () => {
|
|
96
|
+
rl.write("\n");
|
|
97
|
+
closeShell();
|
|
98
|
+
});
|
|
99
|
+
rl.on("close", () => {
|
|
100
|
+
console.log("Shell closed.");
|
|
101
|
+
});
|
|
102
|
+
rl.prompt();
|
|
103
|
+
rl.on("line", (line) => {
|
|
104
|
+
void (async () => {
|
|
105
|
+
rl.pause();
|
|
106
|
+
const trimmed = line.trim();
|
|
107
|
+
if (!trimmed) {
|
|
108
|
+
rl.resume();
|
|
109
|
+
rl.prompt();
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if (trimmed === "exit" || trimmed === "quit") {
|
|
113
|
+
closeShell();
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
if (trimmed === "help" || trimmed === "?") {
|
|
117
|
+
shellHelp();
|
|
118
|
+
rl.resume();
|
|
119
|
+
rl.prompt();
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
const inputArgs = parseShellArgs(trimmed);
|
|
123
|
+
if (inputArgs.length === 0) {
|
|
124
|
+
rl.resume();
|
|
125
|
+
rl.prompt();
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
const [firstArg] = inputArgs;
|
|
129
|
+
if (firstArg === "scai" || firstArg === "sitecoreai-cli") {
|
|
130
|
+
inputArgs.shift();
|
|
131
|
+
}
|
|
132
|
+
if (inputArgs[0] === "shell") {
|
|
133
|
+
console.log("Already in shell. Type 'exit' to leave.");
|
|
134
|
+
rl.resume();
|
|
135
|
+
rl.prompt();
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
restoreShellEnv(envSnapshot);
|
|
139
|
+
await runCli((0, shared_1.normalizeArgs)(["node", "scai", ...inputArgs]), {
|
|
140
|
+
baseEnv: envSnapshot,
|
|
141
|
+
skipBanner: true,
|
|
142
|
+
shellMode: true,
|
|
143
|
+
});
|
|
144
|
+
rl.resume();
|
|
145
|
+
rl.prompt();
|
|
146
|
+
})();
|
|
147
|
+
});
|
|
148
|
+
await new Promise((resolve) => {
|
|
149
|
+
rl.on("close", resolve);
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
command.addHelpText("after", "\nExample:\n $ scai shell\n scai> status\n scai> exit\n");
|
|
153
|
+
return command;
|
|
154
|
+
};
|
|
155
|
+
exports.createShellCommand = createShellCommand;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,eAAO,MAAM,mBAAmB,QAAO,OAatC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createStatusCommand = void 0;
|
|
4
|
+
const commander_1 = require("commander");
|
|
5
|
+
const shared_1 = require("./shared");
|
|
6
|
+
const tasks_1 = require("../serialization/tasks");
|
|
7
|
+
const createStatusCommand = () => {
|
|
8
|
+
const command = new commander_1.Command("status").description("Show configured Sitecore environments for this CLI");
|
|
9
|
+
(0, shared_1.addConfigOption)(command);
|
|
10
|
+
(0, shared_1.addVerbosityOptions)(command);
|
|
11
|
+
command.addHelpText("after", "\nExample:\n $ scai status\n");
|
|
12
|
+
command.action(async (options) => (0, tasks_1.runStatus)(options));
|
|
13
|
+
return command;
|
|
14
|
+
};
|
|
15
|
+
exports.createStatusCommand = createStatusCommand;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/commands/telemetry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAcpC,eAAO,MAAM,sBAAsB,QAAO,OA2BzC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createTelemetryCommand = void 0;
|
|
4
|
+
const commander_1 = require("commander");
|
|
5
|
+
const shared_1 = require("./shared");
|
|
6
|
+
const telemetry_1 = require("../shared/telemetry");
|
|
7
|
+
const logger_1 = require("../shared/logger");
|
|
8
|
+
const createTelemetryCommand = () => {
|
|
9
|
+
const command = new commander_1.Command("telemetry").description("Telemetry utilities");
|
|
10
|
+
const status = new commander_1.Command("status").description("Show telemetry status");
|
|
11
|
+
(0, shared_1.addConfigOption)(status);
|
|
12
|
+
(0, shared_1.addVerbosityOptions)(status);
|
|
13
|
+
status.action(async (options) => {
|
|
14
|
+
const logger = new logger_1.Logger(Boolean(options.verbose), Boolean(options.trace), Boolean(options.json), Boolean(options.quiet), options.logFile);
|
|
15
|
+
const statusInfo = (0, telemetry_1.getTelemetryStatus)(options.config ?? process.cwd());
|
|
16
|
+
if (logger.isJson()) {
|
|
17
|
+
logger.json(statusInfo);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
logger.info(`Telemetry: ${statusInfo.enabled ? "enabled" : "disabled"}`, "cyan");
|
|
21
|
+
logger.info(`Source: ${statusInfo.source}`);
|
|
22
|
+
logger.info(`Endpoint: ${statusInfo.url}`);
|
|
23
|
+
});
|
|
24
|
+
command.addCommand(status);
|
|
25
|
+
command.addHelpText("after", "\nExample:\n $ scai telemetry status\n");
|
|
26
|
+
return command;
|
|
27
|
+
};
|
|
28
|
+
exports.createTelemetryCommand = createTelemetryCommand;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { EnvironmentConfiguration, RootConfigurationFile } from "./types";
|
|
2
|
+
export declare const applyEnvOverrides: (envName: string, env: EnvironmentConfiguration, includeGlobal: boolean) => EnvironmentConfiguration;
|
|
3
|
+
export declare const stripAuthenticationTokensFromConfig: (config: RootConfigurationFile) => RootConfigurationFile;
|
|
4
|
+
//# sourceMappingURL=env-overrides.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-overrides.d.ts","sourceRoot":"","sources":["../../src/config/env-overrides.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AA4C/E,eAAO,MAAM,iBAAiB,GAC5B,SAAS,MAAM,EACf,KAAK,wBAAwB,EAC7B,eAAe,OAAO,KACrB,wBAqJF,CAAC;AAqBF,eAAO,MAAM,mCAAmC,GAC9C,QAAQ,qBAAqB,KAC5B,qBASF,CAAC"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.stripAuthenticationTokensFromConfig = exports.applyEnvOverrides = void 0;
|
|
4
|
+
const toBoolean = (value) => {
|
|
5
|
+
if (!value) {
|
|
6
|
+
return undefined;
|
|
7
|
+
}
|
|
8
|
+
const normalized = value.trim().toLowerCase();
|
|
9
|
+
if (["1", "true", "yes", "on"].includes(normalized)) {
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
if (["0", "false", "no", "off"].includes(normalized)) {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
return undefined;
|
|
16
|
+
};
|
|
17
|
+
const normalizeEnvKey = (name) => name
|
|
18
|
+
.trim()
|
|
19
|
+
.toUpperCase()
|
|
20
|
+
.replace(/[^A-Z0-9]+/g, "_")
|
|
21
|
+
.replace(/^_+|_+$/g, "");
|
|
22
|
+
const getEnvOverride = (envName, key, includeGlobal) => {
|
|
23
|
+
const scopedKey = `SITECOREAI_ENV_${normalizeEnvKey(envName)}_${key}`;
|
|
24
|
+
const scopedValue = process.env[scopedKey];
|
|
25
|
+
if (scopedValue && scopedValue.trim().length > 0) {
|
|
26
|
+
return scopedValue.trim();
|
|
27
|
+
}
|
|
28
|
+
if (!includeGlobal) {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
const globalKey = `SITECOREAI_${key}`;
|
|
32
|
+
const globalValue = process.env[globalKey];
|
|
33
|
+
if (globalValue && globalValue.trim().length > 0) {
|
|
34
|
+
return globalValue.trim();
|
|
35
|
+
}
|
|
36
|
+
return undefined;
|
|
37
|
+
};
|
|
38
|
+
const applyEnvOverrides = (envName, env, includeGlobal) => {
|
|
39
|
+
const overrides = {};
|
|
40
|
+
const allowWrite = toBoolean(getEnvOverride(envName, "ALLOW_WRITE", includeGlobal));
|
|
41
|
+
if (allowWrite !== undefined) {
|
|
42
|
+
overrides.allowWrite = allowWrite;
|
|
43
|
+
}
|
|
44
|
+
const useClientCredentials = toBoolean(getEnvOverride(envName, "USE_CLIENT_CREDENTIALS", includeGlobal));
|
|
45
|
+
if (useClientCredentials !== undefined) {
|
|
46
|
+
overrides.useClientCredentials = useClientCredentials;
|
|
47
|
+
}
|
|
48
|
+
const host = getEnvOverride(envName, "CM_HOST", includeGlobal);
|
|
49
|
+
if (host !== undefined) {
|
|
50
|
+
overrides.host = host;
|
|
51
|
+
}
|
|
52
|
+
const authority = getEnvOverride(envName, "AUTHORITY", includeGlobal);
|
|
53
|
+
if (authority !== undefined) {
|
|
54
|
+
overrides.authority = authority;
|
|
55
|
+
}
|
|
56
|
+
const audience = getEnvOverride(envName, "AUDIENCE", includeGlobal);
|
|
57
|
+
if (audience !== undefined) {
|
|
58
|
+
overrides.audience = audience;
|
|
59
|
+
}
|
|
60
|
+
const clientId = getEnvOverride(envName, "CLIENT_ID", includeGlobal);
|
|
61
|
+
if (clientId !== undefined) {
|
|
62
|
+
overrides.clientId = clientId;
|
|
63
|
+
}
|
|
64
|
+
const clientSecret = getEnvOverride(envName, "CLIENT_SECRET", includeGlobal);
|
|
65
|
+
if (clientSecret !== undefined) {
|
|
66
|
+
overrides.clientSecret = clientSecret;
|
|
67
|
+
}
|
|
68
|
+
const deployToken = getEnvOverride(envName, "DEPLOY_TOKEN", includeGlobal);
|
|
69
|
+
if (deployToken !== undefined) {
|
|
70
|
+
overrides.deployToken = deployToken;
|
|
71
|
+
}
|
|
72
|
+
// CM/admin access token override — useful when keychain storage is
|
|
73
|
+
// unreliable (e.g. headless CI, sandboxed shells) or for one-off
|
|
74
|
+
// debugging. Read by `getAccessToken` in serialization/sitecore-api/auth.ts
|
|
75
|
+
// before falling through to client-credentials.
|
|
76
|
+
const accessToken = getEnvOverride(envName, "ACCESS_TOKEN", includeGlobal);
|
|
77
|
+
if (accessToken !== undefined) {
|
|
78
|
+
overrides.accessToken = accessToken;
|
|
79
|
+
}
|
|
80
|
+
// Recipe parent paths — read by `resolveRecipeRoots` in
|
|
81
|
+
// src/recipe/tasks/shared.ts when --templates-root / --renderings-root
|
|
82
|
+
// CLI flags are absent.
|
|
83
|
+
const templatesRoot = getEnvOverride(envName, "TEMPLATES_ROOT", includeGlobal);
|
|
84
|
+
if (templatesRoot !== undefined) {
|
|
85
|
+
overrides.templatesRoot = templatesRoot;
|
|
86
|
+
}
|
|
87
|
+
const renderingsRoot = getEnvOverride(envName, "RENDERINGS_ROOT", includeGlobal);
|
|
88
|
+
if (renderingsRoot !== undefined) {
|
|
89
|
+
overrides.renderingsRoot = renderingsRoot;
|
|
90
|
+
}
|
|
91
|
+
// Phase 2 per-site folder layout roots — read by `runRecipePush` /
|
|
92
|
+
// `runRecipeCompile` to wire
|
|
93
|
+
// `CompileContext.{componentsRoot, contentModelsRoot}` so recipes
|
|
94
|
+
// with `section:` land at `<componentsRoot>/<section>/<Component>`
|
|
95
|
+
// and content templates land under `<contentModelsRoot>`.
|
|
96
|
+
const componentsRoot = getEnvOverride(envName, "COMPONENTS_ROOT", includeGlobal);
|
|
97
|
+
if (componentsRoot !== undefined) {
|
|
98
|
+
overrides.componentsRoot = componentsRoot;
|
|
99
|
+
}
|
|
100
|
+
const contentModelsRoot = getEnvOverride(envName, "CONTENT_MODELS_ROOT", includeGlobal);
|
|
101
|
+
if (contentModelsRoot !== undefined) {
|
|
102
|
+
overrides.contentModelsRoot = contentModelsRoot;
|
|
103
|
+
}
|
|
104
|
+
// Phase 4 composition roots — read by `runRecipePush` to wire
|
|
105
|
+
// `CompileContext.{partialDesignsRoot, pageDesignsRoot, contentItemsRoot}`
|
|
106
|
+
// and to seed `crossRecipeRefs[PAGE_DESIGNS_ROOT_REF_KEY]`.
|
|
107
|
+
const partialDesignsRoot = getEnvOverride(envName, "PARTIAL_DESIGNS_ROOT", includeGlobal);
|
|
108
|
+
if (partialDesignsRoot !== undefined) {
|
|
109
|
+
overrides.partialDesignsRoot = partialDesignsRoot;
|
|
110
|
+
}
|
|
111
|
+
const pageDesignsRoot = getEnvOverride(envName, "PAGE_DESIGNS_ROOT", includeGlobal);
|
|
112
|
+
if (pageDesignsRoot !== undefined) {
|
|
113
|
+
overrides.pageDesignsRoot = pageDesignsRoot;
|
|
114
|
+
}
|
|
115
|
+
const contentItemsRoot = getEnvOverride(envName, "CONTENT_ITEMS_ROOT", includeGlobal);
|
|
116
|
+
if (contentItemsRoot !== undefined) {
|
|
117
|
+
overrides.contentItemsRoot = contentItemsRoot;
|
|
118
|
+
}
|
|
119
|
+
// SXA Headless variants root — read by `runRecipePush` to wire
|
|
120
|
+
// `CompileContext.headlessVariantsRoot` so component recipes' variants
|
|
121
|
+
// land under `<headlessVariantsRoot>/<section>/<rendering>/<variant>`
|
|
122
|
+
// (SXA Headless tree) instead of the legacy "under the rendering
|
|
123
|
+
// item" location.
|
|
124
|
+
const headlessVariantsRoot = getEnvOverride(envName, "HEADLESS_VARIANTS_ROOT", includeGlobal);
|
|
125
|
+
if (headlessVariantsRoot !== undefined) {
|
|
126
|
+
overrides.headlessVariantsRoot = headlessVariantsRoot;
|
|
127
|
+
}
|
|
128
|
+
// SXA Available Renderings root — read by `compileRecipeSet` to
|
|
129
|
+
// emit one Available Renderings section per `recipe.section` with
|
|
130
|
+
// every rendering in that section listed.
|
|
131
|
+
const availableRenderingsRoot = getEnvOverride(envName, "AVAILABLE_RENDERINGS_ROOT", includeGlobal);
|
|
132
|
+
if (availableRenderingsRoot !== undefined) {
|
|
133
|
+
overrides.availableRenderingsRoot = availableRenderingsRoot;
|
|
134
|
+
}
|
|
135
|
+
// Enumerations root — required for EnumerationRecipe compilation
|
|
136
|
+
// and for any field that carries `sitecore.enumHandle`.
|
|
137
|
+
const enumerationsRoot = getEnvOverride(envName, "ENUMERATIONS_ROOT", includeGlobal);
|
|
138
|
+
if (enumerationsRoot !== undefined) {
|
|
139
|
+
overrides.enumerationsRoot = enumerationsRoot;
|
|
140
|
+
}
|
|
141
|
+
// Placeholder Settings roots — read by recipe push's placeholder
|
|
142
|
+
// resolver to find items by `Placeholder Key` and append the
|
|
143
|
+
// recipe's rendering to their `Allowed Controls`. Comma-separated.
|
|
144
|
+
const placeholderSettingsRoots = getEnvOverride(envName, "PLACEHOLDER_SETTINGS_ROOTS", includeGlobal);
|
|
145
|
+
if (placeholderSettingsRoots !== undefined) {
|
|
146
|
+
overrides.placeholderSettingsRoots = placeholderSettingsRoots
|
|
147
|
+
.split(",")
|
|
148
|
+
.map((s) => s.trim())
|
|
149
|
+
.filter((s) => s.length > 0);
|
|
150
|
+
}
|
|
151
|
+
const organizationId = getEnvOverride(envName, "ORGANIZATION_ID", includeGlobal);
|
|
152
|
+
if (organizationId !== undefined) {
|
|
153
|
+
overrides.organizationId = organizationId;
|
|
154
|
+
}
|
|
155
|
+
const tenantId = getEnvOverride(envName, "TENANT_ID", includeGlobal);
|
|
156
|
+
if (tenantId !== undefined) {
|
|
157
|
+
overrides.tenantId = tenantId;
|
|
158
|
+
}
|
|
159
|
+
const projectId = getEnvOverride(envName, "PROJECT_ID", includeGlobal);
|
|
160
|
+
if (projectId !== undefined) {
|
|
161
|
+
overrides.projectId = projectId;
|
|
162
|
+
}
|
|
163
|
+
const environmentId = getEnvOverride(envName, "ENVIRONMENT_ID", includeGlobal);
|
|
164
|
+
if (environmentId !== undefined) {
|
|
165
|
+
overrides.environmentId = environmentId;
|
|
166
|
+
}
|
|
167
|
+
const environmentType = getEnvOverride(envName, "ENVIRONMENT_TYPE", includeGlobal);
|
|
168
|
+
if (environmentType !== undefined) {
|
|
169
|
+
const normalized = environmentType.trim().toLowerCase();
|
|
170
|
+
if (normalized === "cm" || normalized === "eh") {
|
|
171
|
+
overrides.environmentType = normalized;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return { ...env, ...overrides };
|
|
175
|
+
};
|
|
176
|
+
exports.applyEnvOverrides = applyEnvOverrides;
|
|
177
|
+
const stripAuthenticationTokens = (env) => {
|
|
178
|
+
const sanitized = { ...env };
|
|
179
|
+
delete sanitized.accessToken;
|
|
180
|
+
delete sanitized.refreshToken;
|
|
181
|
+
delete sanitized.refreshTokenParameters;
|
|
182
|
+
delete sanitized.expiresIn;
|
|
183
|
+
delete sanitized.lastUpdated;
|
|
184
|
+
delete sanitized.deployToken;
|
|
185
|
+
delete sanitized.clientSecret;
|
|
186
|
+
return sanitized;
|
|
187
|
+
};
|
|
188
|
+
const stripAuthenticationTokensFromProfiles = (envProfiles) => Object.fromEntries(Object.entries(envProfiles).map(([name, env]) => [name, stripAuthenticationTokens(env)]));
|
|
189
|
+
const stripAuthenticationTokensFromConfig = (config) => {
|
|
190
|
+
if (!config.envProfiles) {
|
|
191
|
+
return config;
|
|
192
|
+
}
|
|
193
|
+
const sanitizedProfiles = stripAuthenticationTokensFromProfiles(config.envProfiles);
|
|
194
|
+
return {
|
|
195
|
+
...config,
|
|
196
|
+
envProfiles: sanitizedProfiles,
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
exports.stripAuthenticationTokensFromConfig = stripAuthenticationTokensFromConfig;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { EnvironmentConfiguration, RootConfiguration, RootConfigurationFile, SerializationModuleConfiguration, SerializationModuleConfigurationItems, SerializationRootConfiguration, Settings, UserConfiguration, } from "./types";
|
|
2
|
+
export { resolveRootConfigurationPath } from "./paths";
|
|
3
|
+
export { readRootConfigurationFile, writeRootConfigurationFile, mergeEnvironmentConfigurations, readRootConfiguration, } from "./root-config";
|
|
4
|
+
export { normalizeModuleConfiguration, readSerializationModules } from "./modules";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,wBAAwB,EACxB,iBAAiB,EACjB,qBAAqB,EACrB,gCAAgC,EAChC,qCAAqC,EACrC,8BAA8B,EAC9B,QAAQ,EACR,iBAAiB,GAClB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,8BAA8B,EAC9B,qBAAqB,GACtB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readSerializationModules = exports.normalizeModuleConfiguration = exports.readRootConfiguration = exports.mergeEnvironmentConfigurations = exports.writeRootConfigurationFile = exports.readRootConfigurationFile = exports.resolveRootConfigurationPath = void 0;
|
|
4
|
+
var paths_1 = require("./paths");
|
|
5
|
+
Object.defineProperty(exports, "resolveRootConfigurationPath", { enumerable: true, get: function () { return paths_1.resolveRootConfigurationPath; } });
|
|
6
|
+
var root_config_1 = require("./root-config");
|
|
7
|
+
Object.defineProperty(exports, "readRootConfigurationFile", { enumerable: true, get: function () { return root_config_1.readRootConfigurationFile; } });
|
|
8
|
+
Object.defineProperty(exports, "writeRootConfigurationFile", { enumerable: true, get: function () { return root_config_1.writeRootConfigurationFile; } });
|
|
9
|
+
Object.defineProperty(exports, "mergeEnvironmentConfigurations", { enumerable: true, get: function () { return root_config_1.mergeEnvironmentConfigurations; } });
|
|
10
|
+
Object.defineProperty(exports, "readRootConfiguration", { enumerable: true, get: function () { return root_config_1.readRootConfiguration; } });
|
|
11
|
+
var modules_1 = require("./modules");
|
|
12
|
+
Object.defineProperty(exports, "normalizeModuleConfiguration", { enumerable: true, get: function () { return modules_1.normalizeModuleConfiguration; } });
|
|
13
|
+
Object.defineProperty(exports, "readSerializationModules", { enumerable: true, get: function () { return modules_1.readSerializationModules; } });
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { RootConfiguration, SerializationModuleConfiguration } from "./types";
|
|
2
|
+
export declare const normalizeModuleConfiguration: (raw: Partial<SerializationModuleConfiguration>, moduleFile: string, rootConfig: RootConfiguration) => SerializationModuleConfiguration;
|
|
3
|
+
export declare const readSerializationModules: (rootConfig: RootConfiguration, include?: string[], exclude?: string[]) => Promise<SerializationModuleConfiguration[]>;
|
|
4
|
+
//# sourceMappingURL=modules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../../src/config/modules.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,iBAAiB,EAAE,gCAAgC,EAAE,MAAM,SAAS,CAAC;AAoEnF,eAAO,MAAM,4BAA4B,GACvC,KAAK,OAAO,CAAC,gCAAgC,CAAC,EAC9C,YAAY,MAAM,EAClB,YAAY,iBAAiB,KAC5B,gCA6DF,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,YAAY,iBAAiB,EAC7B,UAAU,MAAM,EAAE,EAClB,UAAU,MAAM,EAAE,KACjB,OAAO,CAAC,gCAAgC,EAAE,CAsD5C,CAAC"}
|