Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded to Sitecore 10.2 with Sitecore Content Serialization and CLI #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 12 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"sitecore.cli": {
"version": "2.0.0",
"commands": [
"sitecore"
]
}
}
}
10 changes: 0 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,3 @@ build/
[Bb]in/
[Oo]bj/

# Hedgehog Team Development for Sitecore
*.scproj.user
IconCache/
T4RenderCache/
BuiltFiles_*.txt

# Sitecore
Lib/Sitecore/Sitecore.Kernel.xml
Lib/Sitecore*.dll

249 changes: 249 additions & 0 deletions .sitecore/schemas/ModuleFile.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,249 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "ModuleFile",
"description": "Sitecore module definition file schema",
"allOf": [
{
"title": "ModuleConfiguration",
"type": "object",
"description": "Defines a \"DevEx Module\" that is a Helix-like module that can contain serialized item configurations, etc.\nThis class is overridden with Serialization-specific derived versions that provide access to their module-specific settings.",
"additionalProperties": {},
"required": [
"namespace"
],
"properties": {
"$schema": {
"type": "string"
},
"namespace": {
"type": "string",
"description": "The namespace of the module. All resources in the module inherit this namespace.\nNamespaces can contain letters, numbers, dots (.), and hyphens (-).",
"minLength": 1,
"pattern": "^[A-Za-z0-9\\.\\-\\$\\{\\}\\(\\)]+$"
},
"description": {
"type": "string",
"description": "Description of the module, for reference/docs purposes only"
},
"references": {
"type": "array",
"description": "Names of other modules that are referenced by resources in this module. Wildcards are allowed, i.e. Foundation.*.",
"items": {
"type": "string"
}
},
"source": {
"type": "string",
"description": "Generic identifier as to where the module came from. Used internally for error messaging. Do not set in a module file; it will be ignored."
}
}
},
{
"title": "SerializationModuleConfiguration",
"type": "object",
"additionalProperties": {},
"required": [
"namespace"
],
"properties": {
"$schema": {
"type": "string"
},
"namespace": {
"type": "string",
"description": "The namespace of the module. All resources in the module inherit this namespace.\nNamespaces can contain letters, numbers, dots (.), and hyphens (-).",
"minLength": 1,
"pattern": "^[A-Za-z0-9\\.\\-\\$\\{\\}\\(\\)]+$"
},
"description": {
"type": "string",
"description": "Description of the module, for reference/docs purposes only"
},
"references": {
"type": "array",
"description": "Names of other modules that are referenced by resources in this module. Wildcards are allowed, i.e. Foundation.*.",
"items": {
"type": "string"
}
},
"source": {
"type": "string",
"description": "Generic identifier as to where the module came from. Used internally for error messaging. Do not set in a module file; it will be ignored."
},
"items": {
"description": "Configures content item serialization in this module",
"oneOf": [
{
"$ref": "#/allOf/1/definitions/SerializationModuleConfigurationItems"
}
]
}
},
"definitions": {
"SerializationModuleConfigurationItems": {
"type": "object",
"additionalProperties": false,
"required": [
"includes"
],
"properties": {
"path": {
"type": "string",
"description": "The relative physical path to store serialized item files at. Serialized items will be stored at this path using sub-directories named the same as the name attribute on their include.\nPrefix the path with ~/ for a root configuration relative path instead of a module-relative path. Use '$(module)' to insert the module name when using a root relative path.\nSet DefaultModuleRelativeSerializationPath on the root configuration to configure the default."
},
"includes": {
"type": "array",
"description": "Configure item paths to serialize in this module",
"minItems": 1,
"items": {
"$ref": "#/allOf/1/definitions/FilesystemTreeSpec"
}
}
}
},
"FilesystemTreeSpec": {
"type": "object",
"additionalProperties": false,
"required": [
"path",
"name"
],
"properties": {
"path": {
"type": "string",
"description": "The Sitecore item path that forms the root of this include.",
"minLength": 1
},
"scope": {
"description": "The scope of items to be serialized (how deep to traverse the tree)",
"oneOf": [
{
"$ref": "#/allOf/1/definitions/TreeScope"
}
]
},
"allowedPushOperations": {
"description": "When pushing into Sitecore, what is allowed to happen when we detect changes?",
"oneOf": [
{
"$ref": "#/allOf/1/definitions/AllowedPushOperations"
}
]
},
"rules": {
"type": "array",
"description": "Additional rules to apply to children of the root path, i.e. exclusions, path aliases. Rules are executed in order; execution stops after the first matching rule is executed. Place the MOST SPECIFIC rules first.",
"items": {
"$ref": "#/allOf/1/definitions/FilesystemTreeSpecRule"
}
},
"maxRelativePathLength": {
"type": [
"integer",
"null"
],
"description": "Max item path length relative to the root before requiring use of path aliases to shorten paths. In most cases, this should be set globally in sitecore.json.",
"format": "int32"
},
"name": {
"type": "string",
"description": "Name of the subtree. Must be unique within the module. Serialized items will be stored in a folder by this name. Favor terse names.",
"minLength": 1
},
"database": {
"type": "string",
"description": "The Sitecore database that this path is sourced from. Unless you really know what you're doing, do not change this."
}
}
},
"TreeScope": {
"type": "string",
"description": "The allowed scopes for a serialized tree root.\nNote that tree rules can modify what is included under a root,\nbut prefetched data ignores rules.",
"x-enumNames": [
"SingleItem",
"ItemAndChildren",
"ItemAndDescendants",
"DescendantsOnly"
],
"enum": [
"singleItem",
"itemAndChildren",
"itemAndDescendants",
"descendantsOnly"
]
},
"AllowedPushOperations": {
"type": "string",
"description": "The allowed operations when pushing changed items to Sitecore.",
"x-enumNames": [
"CreateUpdateAndDelete",
"CreateAndUpdate",
"CreateOnly"
],
"enum": [
"createUpdateAndDelete",
"createAndUpdate",
"createOnly"
]
},
"FilesystemTreeSpecRule": {
"type": "object",
"additionalProperties": false,
"required": [
"path"
],
"properties": {
"path": {
"type": "string",
"description": "Child path to apply the rule to. Should be relative to the TreeSpec path.",
"minLength": 1,
"pattern": "^(/.+|\\*)$"
},
"scope": {
"description": "Sets the scope of items that are included by this rule. Items that are not part of this scope are excluded by this rule.",
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/allOf/1/definitions/TreeRuleScope"
}
]
},
"allowedPushOperations": {
"description": "Overrides the allowed operations for this path and descendants (other paths will follow the TreeSpec allowed operations)",
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/allOf/1/definitions/AllowedPushOperations"
}
]
},
"alias": {
"type": "string",
"description": "Defines a 'path alias' that allows subtrees within the subtree to be stored higher up the filesystem.\nFor example if the TreeSpec path was /sitecore/foo, and a rule was created /bar/baz -> alias 'a',\nthen the /sitecore/foo/bar/baz/hello item would be stored on the filesystem as if its path were\n/a/hello instead of its full path.\n \nUsed to circumvent long path length restrictions imposed by the OS."
}
}
},
"TreeRuleScope": {
"type": "string",
"description": "The included scope for a TreeSpecRule",
"x-enumNames": [
"Ignored",
"SingleItem",
"ItemAndChildren",
"ItemAndDescendants"
],
"enum": [
"ignored",
"singleItem",
"itemAndChildren",
"itemAndDescendants"
]
}
}
}
]
}
50 changes: 50 additions & 0 deletions .sitecore/schemas/RootConfigurationFile.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "RootConfigurationFile",
"type": "object",
"description": "Defines the root Sitecore Developer Configuration file",
"additionalProperties": false,
"required": [
"modules"
],
"properties": {
"$schema": {
"type": "string"
},
"modules": {
"type": "array",
"description": "Sitecore module file resolution globs",
"minItems": 1,
"items": {
"type": "string"
}
},
"serialization": {
"description": "Global item serialization default settings",
"oneOf": [
{
"$ref": "#/definitions/SerializationRootConfiguration"
}
]
}
},
"definitions": {
"SerializationRootConfiguration": {
"type": "object",
"additionalProperties": false,
"properties": {
"defaultMaxRelativeItemPathLength": {
"type": "integer",
"description": "Max relative item path length to serialize before considering path too long (and requiring aliasing to shorten).\nOverridable on a per-module basis; this is the default when it is unspecified.",
"format": "int32",
"default": 120
},
"defaultModuleRelativeSerializationPath": {
"type": "string",
"description": "The default relative physical path from a module file where serialized items for that module will be stored.\nFor example given module /c/foo/bar.module.json, and default '/serialization/items' path,\nthe serialized items for bar would be stored at /c/foo/bar/serialization/items.\nPrefix the path with ~/ for a root configuration relative path instead of a module-relative path.\nUse '$(module)' to insert the module name when using a root relative path.\nOverridable on a per-module basis; this is the default when it is unspecified.",
"default": "serialization"
}
}
}
}
}
Loading